Files larger than 1 MB are truncated. Click
here to display the full file (may cause the browser to become unresponsive) or use the
Open button to view outside of Swarm.
{"version":3,"sources":["license.js","loader.js","@glimmer/node.js","@glimmer/reference.js","@glimmer/runtime.js","@glimmer/util.js","@glimmer/wire-format.js","backburner.js","container.js","dag-map.js","ember-application/index.js","ember-application/initializers/dom-templates.js","ember-application/system/application-instance.js","ember-application/system/application.js","ember-application/system/engine-instance.js","ember-application/system/engine-parent.js","ember-application/system/engine.js","ember-application/system/resolver.js","ember-application/utils/validate-type.js","ember-babel.js","ember-console.js","ember-debug/deprecate.js","ember-debug/error.js","ember-debug/features.js","ember-debug/handlers.js","ember-debug/index.js","ember-debug/testing.js","ember-debug/warn.js","ember-environment.js","ember-extension-support/container_debug_adapter.js","ember-extension-support/data_adapter.js","ember-extension-support/index.js","ember-glimmer/component-managers/abstract.js","ember-glimmer/component-managers/curly.js","ember-glimmer/component-managers/mount.js","ember-glimmer/component-managers/outlet.js","ember-glimmer/component-managers/render.js","ember-glimmer/component-managers/root.js","ember-glimmer/component.js","ember-glimmer/components/checkbox.js","ember-glimmer/components/link-to.js","ember-glimmer/components/text_area.js","ember-glimmer/components/text_field.js","ember-glimmer/dom.js","ember-glimmer/environment.js","ember-glimmer/helper.js","ember-glimmer/helpers/-class.js","ember-glimmer/helpers/-html-safe.js","ember-glimmer/helpers/-input-type.js","ember-glimmer/helpers/-normalize-class.js","ember-glimmer/helpers/action.js","ember-glimmer/helpers/component.js","ember-glimmer/helpers/concat.js","ember-glimmer/helpers/each-in.js","ember-glimmer/helpers/get.js","ember-glimmer/helpers/hash.js","ember-glimmer/helpers/if-unless.js","ember-glimmer/helpers/loc.js","ember-glimmer/helpers/log.js","ember-glimmer/helpers/mut.js","ember-glimmer/helpers/query-param.js","ember-glimmer/helpers/readonly.js","ember-glimmer/helpers/unbound.js","ember-glimmer/index.js","ember-glimmer/modifiers/action.js","ember-glimmer/protocol-for-url.js","ember-glimmer/renderer.js","ember-glimmer/setup-registry.js","ember-glimmer/syntax.js","ember-glimmer/syntax/-text-area.js","ember-glimmer/syntax/dynamic-component.js","ember-glimmer/syntax/input.js","ember-glimmer/syntax/mount.js","ember-glimmer/syntax/outlet.js","ember-glimmer/syntax/render.js","ember-glimmer/syntax/utils.js","ember-glimmer/template.js","ember-glimmer/template_registry.js","ember-glimmer/templates/component.js","ember-glimmer/templates/empty.js","ember-glimmer/templates/link-to.js","ember-glimmer/templates/outlet.js","ember-glimmer/templates/root.js","ember-glimmer/utils/bindings.js","ember-glimmer/utils/curly-component-state-bucket.js","ember-glimmer/utils/debug-stack.js","ember-glimmer/utils/iterable.js","ember-glimmer/utils/process-args.js","ember-glimmer/utils/references.js","ember-glimmer/utils/string.js","ember-glimmer/utils/to-bool.js","ember-glimmer/views/outlet.js","ember-metal.js","ember-routing/ext/controller.js","ember-routing/ext/run_loop.js","ember-routing/index.js","ember-routing/location/api.js","ember-routing/location/auto_location.js","ember-routing/location/hash_location.js","ember-routing/location/history_location.js","ember-routing/location/none_location.js","ember-routing/location/util.js","ember-routing/services/router.js","ember-routing/services/routing.js","ember-routing/system/cache.js","ember-routing/system/controller_for.js","ember-routing/system/dsl.js","ember-routing/system/generate_controller.js","ember-routing/system/query_params.js","ember-routing/system/route.js","ember-routing/system/router.js","ember-routing/system/router_state.js","ember-routing/utils.js","ember-runtime/compare.js","ember-runtime/computed/computed_macros.js","ember-runtime/computed/reduce_computed_macros.js","ember-runtime/controllers/controller.js","ember-runtime/copy.js","ember-runtime/ext/function.js","ember-runtime/ext/rsvp.js","ember-runtime/ext/string.js","ember-runtime/index.js","ember-runtime/inject.js","ember-runtime/is-equal.js","ember-runtime/mixins/-proxy.js","ember-runtime/mixins/action_handler.js","ember-runtime/mixins/array.js","ember-runtime/mixins/comparable.js","ember-runtime/mixins/container_proxy.js","ember-runtime/mixins/controller.js","ember-runtime/mixins/copyable.js","ember-runtime/mixins/enumerable.js","ember-runtime/mixins/evented.js","ember-runtime/mixins/freezable.js","ember-runtime/mixins/mutable_array.js","ember-runtime/mixins/mutable_enumerable.js","ember-runtime/mixins/observable.js","ember-runtime/mixins/promise_proxy.js","ember-runtime/mixins/registry_proxy.js","ember-runtime/mixins/target_action_support.js","ember-runtime/string_registry.js","ember-runtime/system/application.js","ember-runtime/system/array_proxy.js","ember-runtime/system/core_object.js","ember-runtime/system/lazy_load.js","ember-runtime/system/namespace.js","ember-runtime/system/native_array.js","ember-runtime/system/object.js","ember-runtime/system/object_proxy.js","ember-runtime/system/service.js","ember-runtime/system/string.js","ember-runtime/utils.js","ember-utils.js","ember-views/compat/attrs.js","ember-views/compat/fallback-view-registry.js","ember-views/component_lookup.js","ember-views/index.js","ember-views/mixins/action_support.js","ember-views/mixins/child_views_support.js","ember-views/mixins/class_names_support.js","ember-views/mixins/text_support.js","ember-views/mixins/view_state_support.js","ember-views/mixins/view_support.js","ember-views/system/action_manager.js","ember-views/system/event_dispatcher.js","ember-views/system/ext.js","ember-views/system/jquery.js","ember-views/system/lookup_partial.js","ember-views/system/utils.js","ember-views/utils/lookup-component.js","ember-views/views/core_view.js","ember-views/views/states.js","ember-views/views/states/default.js","ember-views/views/states/destroying.js","ember-views/views/states/has_element.js","ember-views/views/states/in_dom.js","ember-views/views/states/pre_render.js","ember/features.js","ember/index.js","ember/version.js","node-module.js","route-recognizer.js","router.js","rsvp.js","bootstrap"],"sourcesContent":["/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2017 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 2.18.0\n */\n","/*global process */\nvar enifed, requireModule, Ember;\nvar mainContext = this; // Used in ember-environment/lib/global.js\n\n(function() {\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\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\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] = requireModule;\n } else {\n reified[i] = internalRequire(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n\n return exports;\n }\n\n var isNode = typeof window === 'undefined' &&\n typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n if (!isNode) {\n Ember = this.Ember = this.Ember || {};\n }\n\n if (typeof Ember === 'undefined') { Ember = {}; }\n\n if (typeof Ember.__loader === 'undefined') {\n var registry = {};\n var seen = {};\n\n enifed = function(name, deps, callback) {\n var value = { };\n\n if (!callback) {\n value.deps = [];\n value.callback = deps;\n } else {\n value.deps = deps;\n value.callback = callback;\n }\n\n registry[name] = value;\n };\n\n requireModule = function(name) {\n return internalRequire(name, null);\n };\n\n // setup `require` module\n requireModule['default'] = requireModule;\n\n requireModule.has = function registryHas(moduleName) {\n return !!registry[moduleName] || !!registry[moduleName + '/index'];\n };\n\n requireModule._eak_seen = registry;\n\n Ember.__loader = {\n define: enifed,\n require: requireModule,\n registry: registry\n };\n } else {\n enifed = Ember.__loader.define;\n requireModule = Ember.__loader.require;\n }\n})();\n","enifed(\"@glimmer/node\", [\"exports\", \"@glimmer/runtime\"], function (exports, _runtime) {\n \"use strict\";\n\n exports.NodeDOMTreeConstruction = undefined;\n\n function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);\n }\n\n var NodeDOMTreeConstruction = function (_DOMTreeConstruction) {\n _inherits(NodeDOMTreeConstruction, _DOMTreeConstruction);\n\n function NodeDOMTreeConstruction(doc) {\n _classCallCheck(this, NodeDOMTreeConstruction);\n\n return _possibleConstructorReturn(this, _DOMTreeConstruction.call(this, doc));\n }\n // override to prevent usage of `this.document` until after the constructor\n\n\n NodeDOMTreeConstruction.prototype.setupUselessElement = function () {};\n\n NodeDOMTreeConstruction.prototype.insertHTMLBefore = function (parent, reference, html) {\n var prev = reference ? reference.previousSibling : parent.lastChild;\n var raw = this.document.createRawHTMLSection(html);\n parent.insertBefore(raw, reference);\n var first = prev ? prev.nextSibling : parent.firstChild;\n var last = reference ? reference.previousSibling : parent.lastChild;\n return new _runtime.ConcreteBounds(parent, first, last);\n };\n // override to avoid SVG detection/work when in node (this is not needed in SSR)\n\n\n NodeDOMTreeConstruction.prototype.createElement = function (tag) {\n return this.document.createElement(tag);\n };\n // override to avoid namespace shenanigans when in node (this is not needed in SSR)\n\n\n NodeDOMTreeConstruction.prototype.setAttribute = function (element, name, value) {\n element.setAttribute(name, value);\n };\n\n return NodeDOMTreeConstruction;\n }(_runtime.DOMTreeConstruction);\n\n exports.NodeDOMTreeConstruction = NodeDOMTreeConstruction;\n});","enifed(\"@glimmer/reference\", [\"exports\", \"@glimmer/util\"], function (exports, _util) {\n \"use strict\";\n\n exports.isModified = exports.ReferenceCache = exports.map = exports.CachedReference = exports.UpdatableTag = exports.CachedTag = exports.combine = exports.combineSlice = exports.combineTagged = exports.DirtyableTag = exports.CURRENT_TAG = exports.VOLATILE_TAG = exports.CONSTANT_TAG = exports.TagWrapper = exports.RevisionTag = exports.VOLATILE = exports.INITIAL = exports.CONSTANT = exports.IteratorSynchronizer = exports.ReferenceIterator = exports.IterationArtifacts = exports.referenceFromParts = exports.ListItem = exports.isConst = exports.ConstReference = undefined;\n\n function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);\n }\n\n function _classCallCheck$1(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var CONSTANT = 0;\n var INITIAL = 1;\n var VOLATILE = NaN;\n var RevisionTag = function () {\n function RevisionTag() {\n _classCallCheck$1(this, RevisionTag);\n }\n\n RevisionTag.prototype.validate = function (snapshot) {\n return this.value() === snapshot;\n };\n\n return RevisionTag;\n }();\n RevisionTag.id = 0;\n var VALUE = [];\n var VALIDATE = [];\n var TagWrapper = function () {\n function TagWrapper(type, inner) {\n _classCallCheck$1(this, TagWrapper);\n\n this.type = type;\n this.inner = inner;\n }\n\n TagWrapper.prototype.value = function () {\n var func = VALUE[this.type];\n return func(this.inner);\n };\n\n TagWrapper.prototype.validate = function (snapshot) {\n var func = VALIDATE[this.type];\n return func(this.inner, snapshot);\n };\n\n return TagWrapper;\n }();\n function register(Type) {\n var type = VALUE.length;\n VALUE.push(function (tag) {\n return tag.value();\n });\n VALIDATE.push(function (tag, snapshot) {\n return tag.validate(snapshot);\n });\n Type.id = type;\n }\n ///\n // CONSTANT: 0\n VALUE.push(function () {\n return CONSTANT;\n });\n VALIDATE.push(function (_tag, snapshot) {\n return snapshot === CONSTANT;\n });\n var CONSTANT_TAG = new TagWrapper(0, null);\n // VOLATILE: 1\n VALUE.push(function () {\n return VOLATILE;\n });\n VALIDATE.push(function (_tag, snapshot) {\n return snapshot === VOLATILE;\n });\n var VOLATILE_TAG = new TagWrapper(1, null);\n // CURRENT: 2\n VALUE.push(function () {\n return $REVISION;\n });\n VALIDATE.push(function (_tag, snapshot) {\n return snapshot === $REVISION;\n });\n var CURRENT_TAG = new TagWrapper(2, null);\n ///\n var $REVISION = INITIAL;\n var DirtyableTag = function (_RevisionTag) {\n _inherits(DirtyableTag, _RevisionTag);\n\n DirtyableTag.create = function () {\n var revision = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $REVISION;\n\n return new TagWrapper(this.id, new DirtyableTag(revision));\n };\n\n function DirtyableTag() {\n var revision = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $REVISION;\n\n _classCallCheck$1(this, DirtyableTag);\n\n var _this = _possibleConstructorReturn(this, _RevisionTag.call(this));\n\n _this.revision = revision;\n return _this;\n }\n\n DirtyableTag.prototype.value = function () {\n return this.revision;\n };\n\n DirtyableTag.prototype.dirty = function () {\n this.revision = ++$REVISION;\n };\n\n return DirtyableTag;\n }(RevisionTag);\n register(DirtyableTag);\n\n function _combine(tags) {\n switch (tags.length) {\n case 0:\n return CONSTANT_TAG;\n case 1:\n return tags[0];\n case 2:\n return TagsPair.create(tags[0], tags[1]);\n default:\n return TagsCombinator.create(tags);\n }\n }\n var CachedTag = function (_RevisionTag2) {\n _inherits(CachedTag, _RevisionTag2);\n\n function CachedTag() {\n _classCallCheck$1(this, CachedTag);\n\n var _this2 = _possibleConstructorReturn(this, _RevisionTag2.apply(this, arguments));\n\n _this2.lastChecked = null;\n _this2.lastValue = null;\n return _this2;\n }\n\n CachedTag.prototype.value = function () {\n var lastChecked = this.lastChecked,\n lastValue = this.lastValue;\n\n if (lastChecked !== $REVISION) {\n this.lastChecked = $REVISION;\n this.lastValue = lastValue = this.compute();\n }\n return this.lastValue;\n };\n\n CachedTag.prototype.invalidate = function () {\n this.lastChecked = null;\n };\n\n return CachedTag;\n }(RevisionTag);\n\n var TagsPair = function (_CachedTag) {\n _inherits(TagsPair, _CachedTag);\n\n TagsPair.create = function (first, second) {\n return new TagWrapper(this.id, new TagsPair(first, second));\n };\n\n function TagsPair(first, second) {\n _classCallCheck$1(this, TagsPair);\n\n var _this3 = _possibleConstructorReturn(this, _CachedTag.call(this));\n\n _this3.first = first;\n _this3.second = second;\n return _this3;\n }\n\n TagsPair.prototype.compute = function () {\n return Math.max(this.first.value(), this.second.value());\n };\n\n return TagsPair;\n }(CachedTag);\n\n register(TagsPair);\n\n var TagsCombinator = function (_CachedTag2) {\n _inherits(TagsCombinator, _CachedTag2);\n\n TagsCombinator.create = function (tags) {\n return new TagWrapper(this.id, new TagsCombinator(tags));\n };\n\n function TagsCombinator(tags) {\n _classCallCheck$1(this, TagsCombinator);\n\n var _this4 = _possibleConstructorReturn(this, _CachedTag2.call(this));\n\n _this4.tags = tags;\n return _this4;\n }\n\n TagsCombinator.prototype.compute = function () {\n var tags = this.tags,\n i,\n value;\n\n var max = -1;\n for (i = 0; i < tags.length; i++) {\n value = tags[i].value();\n\n max = Math.max(value, max);\n }\n return max;\n };\n\n return TagsCombinator;\n }(CachedTag);\n\n register(TagsCombinator);\n var UpdatableTag = function (_CachedTag3) {\n _inherits(UpdatableTag, _CachedTag3);\n\n UpdatableTag.create = function (tag) {\n return new TagWrapper(this.id, new UpdatableTag(tag));\n };\n\n function UpdatableTag(tag) {\n _classCallCheck$1(this, UpdatableTag);\n\n var _this5 = _possibleConstructorReturn(this, _CachedTag3.call(this));\n\n _this5.tag = tag;\n _this5.lastUpdated = INITIAL;\n return _this5;\n }\n\n UpdatableTag.prototype.compute = function () {\n return Math.max(this.lastUpdated, this.tag.value());\n };\n\n UpdatableTag.prototype.update = function (tag) {\n if (tag !== this.tag) {\n this.tag = tag;\n this.lastUpdated = $REVISION;\n this.invalidate();\n }\n };\n\n return UpdatableTag;\n }(CachedTag);\n register(UpdatableTag);\n var CachedReference = function () {\n function CachedReference() {\n _classCallCheck$1(this, CachedReference);\n\n this.lastRevision = null;\n this.lastValue = null;\n }\n\n CachedReference.prototype.value = function () {\n var tag = this.tag,\n lastRevision = this.lastRevision,\n lastValue = this.lastValue;\n\n if (!lastRevision || !tag.validate(lastRevision)) {\n lastValue = this.lastValue = this.compute();\n this.lastRevision = tag.value();\n }\n return lastValue;\n };\n\n CachedReference.prototype.invalidate = function () {\n this.lastRevision = null;\n };\n\n return CachedReference;\n }();\n\n var MapperReference = function (_CachedReference) {\n _inherits(MapperReference, _CachedReference);\n\n function MapperReference(reference, mapper) {\n _classCallCheck$1(this, MapperReference);\n\n var _this6 = _possibleConstructorReturn(this, _CachedReference.call(this));\n\n _this6.tag = reference.tag;\n _this6.reference = reference;\n _this6.mapper = mapper;\n return _this6;\n }\n\n MapperReference.prototype.compute = function () {\n var reference = this.reference,\n mapper = this.mapper;\n\n return mapper(reference.value());\n };\n\n return MapperReference;\n }(CachedReference);\n\n //////////\n var ReferenceCache = function () {\n function ReferenceCache(reference) {\n _classCallCheck$1(this, ReferenceCache);\n\n this.lastValue = null;\n this.lastRevision = null;\n this.initialized = false;\n this.tag = reference.tag;\n this.reference = reference;\n }\n\n ReferenceCache.prototype.peek = function () {\n if (!this.initialized) {\n return this.initialize();\n }\n return this.lastValue;\n };\n\n ReferenceCache.prototype.revalidate = function () {\n if (!this.initialized) {\n return this.initialize();\n }\n var reference = this.reference,\n lastRevision = this.lastRevision;\n\n var tag = reference.tag;\n if (tag.validate(lastRevision)) return NOT_MODIFIED;\n this.lastRevision = tag.value();\n var lastValue = this.lastValue;\n\n var value = reference.value();\n if (value === lastValue) return NOT_MODIFIED;\n this.lastValue = value;\n return value;\n };\n\n ReferenceCache.prototype.initialize = function () {\n var reference = this.reference;\n\n var value = this.lastValue = reference.value();\n this.lastRevision = reference.tag.value();\n this.initialized = true;\n return value;\n };\n\n return ReferenceCache;\n }();\n var NOT_MODIFIED = \"adb3b78e-3d22-4e4b-877a-6317c2c5c145\";\n\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var ConstReference = function () {\n function ConstReference(inner) {\n _classCallCheck(this, ConstReference);\n\n this.inner = inner;\n this.tag = CONSTANT_TAG;\n }\n\n ConstReference.prototype.value = function () {\n return this.inner;\n };\n\n return ConstReference;\n }();\n\n\n function _defaults$1(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$2(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$1(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$1(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$1(subClass, superClass);\n }\n\n var ListItem = function (_ListNode) {\n _inherits$1(ListItem, _ListNode);\n\n function ListItem(iterable, result) {\n _classCallCheck$2(this, ListItem);\n\n var _this = _possibleConstructorReturn$1(this, _ListNode.call(this, iterable.valueReferenceFor(result)));\n\n _this.retained = false;\n _this.seen = false;\n _this.key = result.key;\n _this.iterable = iterable;\n _this.memo = iterable.memoReferenceFor(result);\n return _this;\n }\n\n ListItem.prototype.update = function (item) {\n this.retained = true;\n this.iterable.updateValueReference(this.value, item);\n this.iterable.updateMemoReference(this.memo, item);\n };\n\n ListItem.prototype.shouldRemove = function () {\n return !this.retained;\n };\n\n ListItem.prototype.reset = function () {\n this.retained = false;\n this.seen = false;\n };\n\n return ListItem;\n }(_util.ListNode);\n var IterationArtifacts = function () {\n function IterationArtifacts(iterable) {\n _classCallCheck$2(this, IterationArtifacts);\n\n this.map = (0, _util.dict)();\n this.list = new _util.LinkedList();\n this.tag = iterable.tag;\n this.iterable = iterable;\n }\n\n IterationArtifacts.prototype.isEmpty = function () {\n var iterator = this.iterator = this.iterable.iterate();\n return iterator.isEmpty();\n };\n\n IterationArtifacts.prototype.iterate = function () {\n var iterator = this.iterator || this.iterable.iterate();\n this.iterator = null;\n return iterator;\n };\n\n IterationArtifacts.prototype.has = function (key) {\n return !!this.map[key];\n };\n\n IterationArtifacts.prototype.get = function (key) {\n return this.map[key];\n };\n\n IterationArtifacts.prototype.wasSeen = function (key) {\n var node = this.map[key];\n return node && node.seen;\n };\n\n IterationArtifacts.prototype.append = function (item) {\n var map = this.map,\n list = this.list,\n iterable = this.iterable;\n\n var node = map[item.key] = new ListItem(iterable, item);\n list.append(node);\n return node;\n };\n\n IterationArtifacts.prototype.insertBefore = function (item, reference) {\n var map = this.map,\n list = this.list,\n iterable = this.iterable;\n\n var node = map[item.key] = new ListItem(iterable, item);\n node.retained = true;\n list.insertBefore(node, reference);\n return node;\n };\n\n IterationArtifacts.prototype.move = function (item, reference) {\n var list = this.list;\n\n item.retained = true;\n list.remove(item);\n list.insertBefore(item, reference);\n };\n\n IterationArtifacts.prototype.remove = function (item) {\n var list = this.list;\n\n list.remove(item);\n delete this.map[item.key];\n };\n\n IterationArtifacts.prototype.nextNode = function (item) {\n return this.list.nextNode(item);\n };\n\n IterationArtifacts.prototype.head = function () {\n return this.list.head();\n };\n\n return IterationArtifacts;\n }();\n var ReferenceIterator = function () {\n // if anyone needs to construct this object with something other than\n // an iterable, let @wycats know.\n function ReferenceIterator(iterable) {\n _classCallCheck$2(this, ReferenceIterator);\n\n this.iterator = null;\n var artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }\n\n ReferenceIterator.prototype.next = function () {\n var artifacts = this.artifacts;\n\n var iterator = this.iterator = this.iterator || artifacts.iterate();\n var item = iterator.next();\n if (!item) return null;\n return artifacts.append(item);\n };\n\n return ReferenceIterator;\n }();\n var Phase;\n (function (Phase) {\n Phase[Phase[\"Append\"] = 0] = \"Append\";\n Phase[Phase[\"Prune\"] = 1] = \"Prune\";\n Phase[Phase[\"Done\"] = 2] = \"Done\";\n })(Phase || (Phase = {}));\n var IteratorSynchronizer = function () {\n function IteratorSynchronizer(_ref) {\n var target = _ref.target,\n artifacts = _ref.artifacts;\n\n _classCallCheck$2(this, IteratorSynchronizer);\n\n this.target = target;\n this.artifacts = artifacts;\n this.iterator = artifacts.iterate();\n this.current = artifacts.head();\n }\n\n IteratorSynchronizer.prototype.sync = function () {\n var phase = Phase.Append;\n while (true) {\n switch (phase) {\n case Phase.Append:\n phase = this.nextAppend();\n break;\n case Phase.Prune:\n phase = this.nextPrune();\n break;\n case Phase.Done:\n this.nextDone();\n return;\n }\n }\n };\n\n IteratorSynchronizer.prototype.advanceToKey = function (key) {\n var current = this.current,\n artifacts = this.artifacts;\n\n var seek = current;\n while (seek && seek.key !== key) {\n seek.seen = true;\n seek = artifacts.nextNode(seek);\n }\n this.current = seek && artifacts.nextNode(seek);\n };\n\n IteratorSynchronizer.prototype.nextAppend = function () {\n var iterator = this.iterator,\n current = this.current,\n artifacts = this.artifacts;\n\n var item = iterator.next();\n if (item === null) {\n return this.startPrune();\n }\n var key = item.key;\n\n if (current && current.key === key) {\n this.nextRetain(item);\n } else if (artifacts.has(key)) {\n this.nextMove(item);\n } else {\n this.nextInsert(item);\n }\n return Phase.Append;\n };\n\n IteratorSynchronizer.prototype.nextRetain = function (item) {\n var artifacts = this.artifacts,\n current = this.current;\n\n current = current;\n current.update(item);\n this.current = artifacts.nextNode(current);\n this.target.retain(item.key, current.value, current.memo);\n };\n\n IteratorSynchronizer.prototype.nextMove = function (item) {\n var current = this.current,\n artifacts = this.artifacts,\n target = this.target;\n var key = item.key;\n\n var found = artifacts.get(item.key);\n found.update(item);\n if (artifacts.wasSeen(item.key)) {\n artifacts.move(found, current);\n target.move(found.key, found.value, found.memo, current ? current.key : null);\n } else {\n this.advanceToKey(key);\n }\n };\n\n IteratorSynchronizer.prototype.nextInsert = function (item) {\n var artifacts = this.artifacts,\n target = this.target,\n current = this.current;\n\n var node = artifacts.insertBefore(item, current);\n target.insert(node.key, node.value, node.memo, current ? current.key : null);\n };\n\n IteratorSynchronizer.prototype.startPrune = function () {\n this.current = this.artifacts.head();\n return Phase.Prune;\n };\n\n IteratorSynchronizer.prototype.nextPrune = function () {\n var artifacts = this.artifacts,\n target = this.target,\n current = this.current;\n\n if (current === null) {\n return Phase.Done;\n }\n var node = current;\n this.current = artifacts.nextNode(node);\n if (node.shouldRemove()) {\n artifacts.remove(node);\n target.delete(node.key);\n } else {\n node.reset();\n }\n return Phase.Prune;\n };\n\n IteratorSynchronizer.prototype.nextDone = function () {\n this.target.done();\n };\n\n return IteratorSynchronizer;\n }();\n\n exports.ConstReference = ConstReference;\n exports.isConst = function (reference) {\n return reference.tag === CONSTANT_TAG;\n };\n exports.ListItem = ListItem;\n exports.referenceFromParts = function (root, parts) {\n var reference = root,\n i;\n for (i = 0; i < parts.length; i++) {\n reference = reference.get(parts[i]);\n }\n return reference;\n };\n exports.IterationArtifacts = IterationArtifacts;\n exports.ReferenceIterator = ReferenceIterator;\n exports.IteratorSynchronizer = IteratorSynchronizer;\n exports.CONSTANT = CONSTANT;\n exports.INITIAL = INITIAL;\n exports.VOLATILE = VOLATILE;\n exports.RevisionTag = RevisionTag;\n exports.TagWrapper = TagWrapper;\n exports.CONSTANT_TAG = CONSTANT_TAG;\n exports.VOLATILE_TAG = VOLATILE_TAG;\n exports.CURRENT_TAG = CURRENT_TAG;\n exports.DirtyableTag = DirtyableTag;\n exports.combineTagged = function (tagged) {\n var optimized = [],\n i,\n l,\n tag;\n for (i = 0, l = tagged.length; i < l; i++) {\n tag = tagged[i].tag;\n\n if (tag === VOLATILE_TAG) return VOLATILE_TAG;\n if (tag === CONSTANT_TAG) continue;\n optimized.push(tag);\n }\n return _combine(optimized);\n };\n exports.combineSlice = function (slice) {\n var optimized = [],\n tag;\n var node = slice.head();\n while (node !== null) {\n tag = node.tag;\n\n if (tag === VOLATILE_TAG) return VOLATILE_TAG;\n if (tag !== CONSTANT_TAG) optimized.push(tag);\n node = slice.nextNode(node);\n }\n return _combine(optimized);\n };\n exports.combine = function (tags) {\n var optimized = [],\n i,\n l,\n tag;\n for (i = 0, l = tags.length; i < l; i++) {\n tag = tags[i];\n\n if (tag === VOLATILE_TAG) return VOLATILE_TAG;\n if (tag === CONSTANT_TAG) continue;\n optimized.push(tag);\n }\n return _combine(optimized);\n };\n exports.CachedTag = CachedTag;\n exports.UpdatableTag = UpdatableTag;\n exports.CachedReference = CachedReference;\n exports.map = function (reference, mapper) {\n return new MapperReference(reference, mapper);\n };\n exports.ReferenceCache = ReferenceCache;\n exports.isModified = function (value) {\n return value !== NOT_MODIFIED;\n };\n});","enifed('@glimmer/runtime', ['exports', '@glimmer/util', '@glimmer/reference', '@glimmer/wire-format'], function (exports, _util, _reference2, _wireFormat) {\n 'use strict';\n\n exports.ConcreteBounds = exports.ElementStack = exports.insertHTMLBefore = exports.isWhitespace = exports.DOMTreeConstruction = exports.IDOMChanges = exports.DOMChanges = exports.isComponentDefinition = exports.ComponentDefinition = exports.PartialDefinition = exports.Environment = exports.Scope = exports.isSafeString = exports.RenderResult = exports.UpdatingVM = exports.compileExpression = exports.compileList = exports.InlineMacros = exports.BlockMacros = exports.getDynamicVar = exports.resetDebuggerCallback = exports.setDebuggerCallback = exports.normalizeTextValue = exports.debugSlice = exports.Register = exports.readDOMAttr = exports.defaultPropertyManagers = exports.defaultAttributeManagers = exports.defaultManagers = exports.INPUT_VALUE_PROPERTY_MANAGER = exports.PropertyManager = exports.AttributeManager = exports.IAttributeManager = exports.CompiledDynamicTemplate = exports.CompiledStaticTemplate = exports.compileLayout = exports.OpcodeBuilderDSL = exports.ConditionalReference = exports.PrimitiveReference = exports.UNDEFINED_REFERENCE = exports.NULL_REFERENCE = exports.templateFactory = exports.Simple = undefined;\n\n function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n /**\n * Registers\n *\n * For the most part, these follows MIPS naming conventions, however the\n * register numbers are different.\n */\n var Register;\n (function (Register) {\n // $0 or $pc (program counter): pointer into `program` for the next insturction; -1 means exit\n Register[Register[\"pc\"] = 0] = \"pc\";\n // $1 or $ra (return address): pointer into `program` for the return\n Register[Register[\"ra\"] = 1] = \"ra\";\n // $2 or $fp (frame pointer): pointer into the `evalStack` for the base of the stack\n Register[Register[\"fp\"] = 2] = \"fp\";\n // $3 or $sp (stack pointer): pointer into the `evalStack` for the top of the stack\n Register[Register[\"sp\"] = 3] = \"sp\";\n // $4-$5 or $s0-$s1 (saved): callee saved general-purpose registers\n Register[Register[\"s0\"] = 4] = \"s0\";\n Register[Register[\"s1\"] = 5] = \"s1\";\n // $6-$7 or $t0-$t1 (temporaries): caller saved general-purpose registers\n Register[Register[\"t0\"] = 6] = \"t0\";\n Register[Register[\"t1\"] = 7] = \"t1\";\n })(Register || (exports.Register = Register = {}));\n\n var AppendOpcodes = function () {\n function AppendOpcodes() {\n _classCallCheck(this, AppendOpcodes);\n\n this.evaluateOpcode = (0, _util.fillNulls)(72 /* Size */).slice();\n }\n\n AppendOpcodes.prototype.add = function (name, evaluate) {\n this.evaluateOpcode[name] = evaluate;\n };\n\n AppendOpcodes.prototype.evaluate = function (vm, opcode, type) {\n var func = this.evaluateOpcode[type];\n func(vm, opcode);\n };\n\n return AppendOpcodes;\n }();\n var APPEND_OPCODES = new AppendOpcodes();\n var AbstractOpcode = function () {\n function AbstractOpcode() {\n _classCallCheck(this, AbstractOpcode);\n\n (0, _util.initializeGuid)(this);\n }\n\n AbstractOpcode.prototype.toJSON = function () {\n return { guid: this._guid, type: this.type };\n };\n\n return AbstractOpcode;\n }();\n var UpdatingOpcode = function (_AbstractOpcode) {\n _inherits(UpdatingOpcode, _AbstractOpcode);\n\n function UpdatingOpcode() {\n _classCallCheck(this, UpdatingOpcode);\n\n var _this = _possibleConstructorReturn(this, _AbstractOpcode.apply(this, arguments));\n\n _this.next = null;\n _this.prev = null;\n return _this;\n }\n\n return UpdatingOpcode;\n }(AbstractOpcode);\n\n function _defaults$1(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$1(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$1(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$1(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$1(subClass, superClass);\n }\n\n var PrimitiveReference = function (_ConstReference) {\n _inherits$1(PrimitiveReference, _ConstReference);\n\n function PrimitiveReference(value) {\n _classCallCheck$1(this, PrimitiveReference);\n\n return _possibleConstructorReturn$1(this, _ConstReference.call(this, value));\n }\n\n PrimitiveReference.create = function (value) {\n if (value === undefined) {\n return UNDEFINED_REFERENCE;\n } else if (value === null) {\n return NULL_REFERENCE;\n } else if (value === true) {\n return TRUE_REFERENCE;\n } else if (value === false) {\n return FALSE_REFERENCE;\n } else if (typeof value === 'number') {\n return new ValueReference(value);\n } else {\n return new StringReference(value);\n }\n };\n\n PrimitiveReference.prototype.get = function () {\n return UNDEFINED_REFERENCE;\n };\n\n return PrimitiveReference;\n }(_reference2.ConstReference);\n\n var StringReference = function (_PrimitiveReference) {\n _inherits$1(StringReference, _PrimitiveReference);\n\n function StringReference() {\n _classCallCheck$1(this, StringReference);\n\n var _this2 = _possibleConstructorReturn$1(this, _PrimitiveReference.apply(this, arguments));\n\n _this2.lengthReference = null;\n return _this2;\n }\n\n StringReference.prototype.get = function (key) {\n var lengthReference;\n\n if (key === 'length') {\n lengthReference = this.lengthReference;\n\n\n if (lengthReference === null) {\n lengthReference = this.lengthReference = new ValueReference(this.inner.length);\n }\n return lengthReference;\n } else {\n return _PrimitiveReference.prototype.get.call(this, key);\n }\n };\n\n return StringReference;\n }(PrimitiveReference);\n\n var ValueReference = function (_PrimitiveReference2) {\n _inherits$1(ValueReference, _PrimitiveReference2);\n\n function ValueReference(value) {\n _classCallCheck$1(this, ValueReference);\n\n return _possibleConstructorReturn$1(this, _PrimitiveReference2.call(this, value));\n }\n\n return ValueReference;\n }(PrimitiveReference);\n\n var UNDEFINED_REFERENCE = new ValueReference(undefined);\n var NULL_REFERENCE = new ValueReference(null);\n var TRUE_REFERENCE = new ValueReference(true);\n var FALSE_REFERENCE = new ValueReference(false);\n var ConditionalReference = function () {\n function ConditionalReference(inner) {\n _classCallCheck$1(this, ConditionalReference);\n\n this.inner = inner;\n this.tag = inner.tag;\n }\n\n ConditionalReference.prototype.value = function () {\n return this.toBool(this.inner.value());\n };\n\n ConditionalReference.prototype.toBool = function (value) {\n return !!value;\n };\n\n return ConditionalReference;\n }();\n\n function _defaults$2(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$2(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$2(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$2(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$2(subClass, superClass);\n }\n\n var ConcatReference = function (_CachedReference) {\n _inherits$2(ConcatReference, _CachedReference);\n\n function ConcatReference(parts) {\n _classCallCheck$2(this, ConcatReference);\n\n var _this = _possibleConstructorReturn$2(this, _CachedReference.call(this));\n\n _this.parts = parts;\n _this.tag = (0, _reference2.combineTagged)(parts);\n return _this;\n }\n\n ConcatReference.prototype.compute = function () {\n var parts = new Array(),\n i,\n value;\n for (i = 0; i < this.parts.length; i++) {\n value = this.parts[i].value();\n\n if (value !== null && value !== undefined) {\n parts[i] = castToString(value);\n }\n }\n if (parts.length > 0) {\n return parts.join('');\n }\n return null;\n };\n\n return ConcatReference;\n }(_reference2.CachedReference);\n function castToString(value) {\n if (typeof value.toString !== 'function') {\n return '';\n }\n return String(value);\n }\n\n APPEND_OPCODES.add(1 /* Helper */, function (vm, _ref) {\n var _helper = _ref.op1;\n\n var stack = vm.stack;\n var helper = vm.constants.getFunction(_helper);\n var args = stack.pop();\n var value = helper(vm, args);\n args.clear();\n vm.stack.push(value);\n });\n APPEND_OPCODES.add(2 /* Function */, function (vm, _ref2) {\n var _function = _ref2.op1;\n\n var func = vm.constants.getFunction(_function);\n vm.stack.push(func(vm));\n });\n APPEND_OPCODES.add(5 /* GetVariable */, function (vm, _ref3) {\n var symbol = _ref3.op1;\n\n var expr = vm.referenceForSymbol(symbol);\n vm.stack.push(expr);\n });\n APPEND_OPCODES.add(4 /* SetVariable */, function (vm, _ref4) {\n var symbol = _ref4.op1;\n\n var expr = vm.stack.pop();\n vm.scope().bindSymbol(symbol, expr);\n });\n APPEND_OPCODES.add(70 /* ResolveMaybeLocal */, function (vm, _ref5) {\n var _name = _ref5.op1;\n\n var name = vm.constants.getString(_name);\n var locals = vm.scope().getPartialMap();\n var ref = locals[name];\n if (ref === undefined) {\n ref = vm.getSelf().get(name);\n }\n vm.stack.push(ref);\n });\n APPEND_OPCODES.add(19 /* RootScope */, function (vm, _ref6) {\n var symbols = _ref6.op1,\n bindCallerScope = _ref6.op2;\n\n vm.pushRootScope(symbols, !!bindCallerScope);\n });\n APPEND_OPCODES.add(6 /* GetProperty */, function (vm, _ref7) {\n var _key = _ref7.op1;\n\n var key = vm.constants.getString(_key);\n var expr = vm.stack.pop();\n vm.stack.push(expr.get(key));\n });\n APPEND_OPCODES.add(7 /* PushBlock */, function (vm, _ref8) {\n var _block = _ref8.op1;\n\n var block = _block ? vm.constants.getBlock(_block) : null;\n vm.stack.push(block);\n });\n APPEND_OPCODES.add(8 /* GetBlock */, function (vm, _ref9) {\n var _block = _ref9.op1;\n\n vm.stack.push(vm.scope().getBlock(_block));\n });\n APPEND_OPCODES.add(9 /* HasBlock */, function (vm, _ref10) {\n var _block = _ref10.op1;\n\n var hasBlock = !!vm.scope().getBlock(_block);\n vm.stack.push(hasBlock ? TRUE_REFERENCE : FALSE_REFERENCE);\n });\n APPEND_OPCODES.add(10 /* HasBlockParams */, function (vm, _ref11) {\n var _block = _ref11.op1;\n\n var block = vm.scope().getBlock(_block);\n var hasBlockParams = block && block.symbolTable.parameters.length;\n vm.stack.push(hasBlockParams ? TRUE_REFERENCE : FALSE_REFERENCE);\n });\n APPEND_OPCODES.add(11 /* Concat */, function (vm, _ref12) {\n var count = _ref12.op1,\n i;\n\n var out = [];\n for (i = count; i > 0; i--) {\n out.push(vm.stack.pop());\n }\n vm.stack.push(new ConcatReference(out.reverse()));\n });\n\n var _createClass = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _classCallCheck$4(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Arguments = function () {\n function Arguments() {\n _classCallCheck$4(this, Arguments);\n\n this.stack = null;\n this.positional = new PositionalArguments();\n this.named = new NamedArguments();\n }\n\n Arguments.prototype.empty = function () {\n this.setup(null, true);\n return this;\n };\n\n Arguments.prototype.setup = function (stack, synthetic) {\n this.stack = stack;\n var names = stack.fromTop(0);\n var namedCount = names.length;\n var positionalCount = stack.fromTop(namedCount + 1);\n\n var positional = this.positional;\n positional.setup(stack, positionalCount + namedCount + 2, positionalCount);\n var named = this.named;\n named.setup(stack, namedCount, names, synthetic);\n };\n\n Arguments.prototype.at = function (pos) {\n return this.positional.at(pos);\n };\n\n Arguments.prototype.get = function (name) {\n return this.named.get(name);\n };\n\n Arguments.prototype.capture = function () {\n return {\n tag: this.tag,\n length: this.length,\n positional: this.positional.capture(),\n named: this.named.capture()\n };\n };\n\n Arguments.prototype.clear = function () {\n var stack = this.stack,\n length = this.length;\n\n stack.pop(length + 2);\n };\n\n _createClass(Arguments, [{\n key: 'tag',\n get: function () {\n return (0, _reference2.combineTagged)([this.positional, this.named]);\n }\n }, {\n key: 'length',\n get: function () {\n return this.positional.length + this.named.length;\n }\n }]);\n\n return Arguments;\n }();\n\n var PositionalArguments = function () {\n function PositionalArguments() {\n _classCallCheck$4(this, PositionalArguments);\n\n this.length = 0;\n this.stack = null;\n this.start = 0;\n this._tag = null;\n this._references = null;\n }\n\n PositionalArguments.prototype.setup = function (stack, start, length) {\n this.stack = stack;\n this.start = start;\n this.length = length;\n this._tag = null;\n this._references = null;\n };\n\n PositionalArguments.prototype.at = function (position) {\n var start = this.start,\n length = this.length;\n\n if (position < 0 || position >= length) {\n return UNDEFINED_REFERENCE;\n }\n // stack: pos1, pos2, pos3, named1, named2\n // start: 4 (top - 4)\n //\n // at(0) === pos1 === top - start\n // at(1) === pos2 === top - (start - 1)\n // at(2) === pos3 === top - (start - 2)\n\n return this.stack.fromTop(start - position - 1);\n };\n\n PositionalArguments.prototype.capture = function () {\n return new CapturedPositionalArguments(this.tag, this.references);\n };\n\n _createClass(PositionalArguments, [{\n key: 'tag',\n get: function () {\n var tag = this._tag;\n if (!tag) {\n tag = this._tag = (0, _reference2.combineTagged)(this.references);\n }\n return tag;\n }\n }, {\n key: 'references',\n get: function () {\n var references = this._references,\n length,\n i;\n if (!references) {\n length = this.length;\n\n\n references = this._references = new Array(length);\n for (i = 0; i < length; i++) {\n references[i] = this.at(i);\n }\n }\n return references;\n }\n }]);\n\n return PositionalArguments;\n }();\n\n var CapturedPositionalArguments = function () {\n function CapturedPositionalArguments(tag, references) {\n var length = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : references.length;\n\n _classCallCheck$4(this, CapturedPositionalArguments);\n\n this.tag = tag;\n this.references = references;\n this.length = length;\n }\n\n CapturedPositionalArguments.prototype.at = function (position) {\n return this.references[position];\n };\n\n CapturedPositionalArguments.prototype.value = function () {\n return this.references.map(this.valueOf);\n };\n\n CapturedPositionalArguments.prototype.get = function (name) {\n var references = this.references,\n length = this.length,\n idx;\n\n if (name === 'length') {\n return PrimitiveReference.create(length);\n } else {\n idx = parseInt(name, 10);\n\n if (idx < 0 || idx >= length) {\n return UNDEFINED_REFERENCE;\n } else {\n return references[idx];\n }\n }\n };\n\n CapturedPositionalArguments.prototype.valueOf = function (reference) {\n return reference.value();\n };\n\n return CapturedPositionalArguments;\n }();\n\n var NamedArguments = function () {\n function NamedArguments() {\n _classCallCheck$4(this, NamedArguments);\n\n this.length = 0;\n this._tag = null;\n this._references = null;\n this._names = null;\n this._realNames = _util.EMPTY_ARRAY;\n }\n\n NamedArguments.prototype.setup = function (stack, length, names, synthetic) {\n this.stack = stack;\n this.length = length;\n this._tag = null;\n this._references = null;\n if (synthetic) {\n this._names = names;\n this._realNames = _util.EMPTY_ARRAY;\n } else {\n this._names = null;\n this._realNames = names;\n }\n };\n\n NamedArguments.prototype.has = function (name) {\n return this.names.indexOf(name) !== -1;\n };\n\n NamedArguments.prototype.get = function (name) {\n var names = this.names,\n length = this.length;\n\n var idx = names.indexOf(name);\n if (idx === -1) {\n return UNDEFINED_REFERENCE;\n }\n // stack: pos1, pos2, pos3, named1, named2\n // start: 4 (top - 4)\n // namedDict: { named1: 1, named2: 0 };\n //\n // get('named1') === named1 === top - (start - 1)\n // get('named2') === named2 === top - start\n\n return this.stack.fromTop(length - idx);\n };\n\n NamedArguments.prototype.capture = function () {\n return new CapturedNamedArguments(this.tag, this.names, this.references);\n };\n\n NamedArguments.prototype.sliceName = function (name) {\n return name.slice(1);\n };\n\n _createClass(NamedArguments, [{\n key: 'tag',\n get: function () {\n return (0, _reference2.combineTagged)(this.references);\n }\n }, {\n key: 'names',\n get: function () {\n var names = this._names;\n if (!names) {\n names = this._names = this._realNames.map(this.sliceName);\n }\n return names;\n }\n }, {\n key: 'references',\n get: function () {\n var references = this._references,\n names,\n length,\n i;\n if (!references) {\n names = this.names, length = this.length;\n\n\n references = this._references = [];\n for (i = 0; i < length; i++) {\n references[i] = this.get(names[i]);\n }\n }\n return references;\n }\n }]);\n\n return NamedArguments;\n }();\n\n var CapturedNamedArguments = function () {\n function CapturedNamedArguments(tag, names, references) {\n _classCallCheck$4(this, CapturedNamedArguments);\n\n this.tag = tag;\n this.names = names;\n this.references = references;\n this.length = names.length;\n this._map = null;\n }\n\n CapturedNamedArguments.prototype.has = function (name) {\n return this.names.indexOf(name) !== -1;\n };\n\n CapturedNamedArguments.prototype.get = function (name) {\n var names = this.names,\n references = this.references;\n\n var idx = names.indexOf(name);\n if (idx === -1) {\n return UNDEFINED_REFERENCE;\n } else {\n return references[idx];\n }\n };\n\n CapturedNamedArguments.prototype.value = function () {\n var names = this.names,\n references = this.references,\n i,\n name;\n\n var out = (0, _util.dict)();\n for (i = 0; i < names.length; i++) {\n name = names[i];\n\n out[name] = references[i].value();\n }\n return out;\n };\n\n _createClass(CapturedNamedArguments, [{\n key: 'map',\n get: function () {\n var map$$1 = this._map,\n names,\n references,\n i,\n name;\n if (!map$$1) {\n names = this.names, references = this.references;\n\n\n map$$1 = this._map = (0, _util.dict)();\n for (i = 0; i < names.length; i++) {\n name = names[i];\n\n map$$1[name] = references[i];\n }\n }\n return map$$1;\n }\n }]);\n\n return CapturedNamedArguments;\n }();\n\n var ARGS = new Arguments();\n\n function _defaults$5(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$6(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$5(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$5(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$5(subClass, superClass);\n }\n\n APPEND_OPCODES.add(20 /* ChildScope */, function (vm) {\n return vm.pushChildScope();\n });\n APPEND_OPCODES.add(21 /* PopScope */, function (vm) {\n return vm.popScope();\n });\n APPEND_OPCODES.add(39 /* PushDynamicScope */, function (vm) {\n return vm.pushDynamicScope();\n });\n APPEND_OPCODES.add(40 /* PopDynamicScope */, function (vm) {\n return vm.popDynamicScope();\n });\n APPEND_OPCODES.add(12 /* Immediate */, function (vm, _ref) {\n var number = _ref.op1;\n\n vm.stack.push(number);\n });\n APPEND_OPCODES.add(13 /* Constant */, function (vm, _ref2) {\n var other = _ref2.op1;\n\n vm.stack.push(vm.constants.getOther(other));\n });\n APPEND_OPCODES.add(14 /* PrimitiveReference */, function (vm, _ref3) {\n var primitive = _ref3.op1;\n\n var stack = vm.stack;\n\n var value = primitive & ~(3 << 30);\n switch ((primitive & 3 << 30) >>> 30) {\n case 0:\n stack.push(PrimitiveReference.create(value));\n break;\n case 1:\n stack.push(PrimitiveReference.create(vm.constants.getFloat(value)));\n break;\n case 2:\n stack.push(PrimitiveReference.create(vm.constants.getString(value)));\n break;\n case 3:\n switch (value) {\n case 0:\n stack.push(FALSE_REFERENCE);\n break;\n case 1:\n stack.push(TRUE_REFERENCE);\n break;\n case 2:\n stack.push(NULL_REFERENCE);\n break;\n case 3:\n stack.push(UNDEFINED_REFERENCE);\n break;\n }\n break;\n }\n });\n APPEND_OPCODES.add(15 /* Dup */, function (vm, _ref4) {\n var register = _ref4.op1,\n offset = _ref4.op2;\n\n var position = vm.fetchValue(register) - offset;\n vm.stack.dup(position);\n });\n APPEND_OPCODES.add(16 /* Pop */, function (vm, _ref5) {\n var count = _ref5.op1;\n return vm.stack.pop(count);\n });\n APPEND_OPCODES.add(17 /* Load */, function (vm, _ref6) {\n var register = _ref6.op1;\n return vm.load(register);\n });\n APPEND_OPCODES.add(18 /* Fetch */, function (vm, _ref7) {\n var register = _ref7.op1;\n return vm.fetch(register);\n });\n APPEND_OPCODES.add(38 /* BindDynamicScope */, function (vm, _ref8) {\n var _names = _ref8.op1;\n\n var names = vm.constants.getArray(_names);\n vm.bindDynamicScope(names);\n });\n APPEND_OPCODES.add(47 /* PushFrame */, function (vm) {\n return vm.pushFrame();\n });\n APPEND_OPCODES.add(48 /* PopFrame */, function (vm) {\n return vm.popFrame();\n });\n APPEND_OPCODES.add(49 /* Enter */, function (vm, _ref9) {\n var args = _ref9.op1;\n return vm.enter(args);\n });\n APPEND_OPCODES.add(50 /* Exit */, function (vm) {\n return vm.exit();\n });\n APPEND_OPCODES.add(41 /* CompileDynamicBlock */, function (vm) {\n var stack = vm.stack;\n var block = stack.pop();\n stack.push(block ? block.compileDynamic(vm.env) : null);\n });\n APPEND_OPCODES.add(42 /* InvokeStatic */, function (vm, _ref10) {\n var _block = _ref10.op1;\n\n var block = vm.constants.getBlock(_block);\n var compiled = block.compileStatic(vm.env);\n vm.call(compiled.handle);\n });\n APPEND_OPCODES.add(43 /* InvokeDynamic */, function (vm, _ref11) {\n var _invoker = _ref11.op1;\n\n var invoker = vm.constants.getOther(_invoker);\n var block = vm.stack.pop();\n invoker.invoke(vm, block);\n });\n APPEND_OPCODES.add(44 /* Jump */, function (vm, _ref12) {\n var target = _ref12.op1;\n return vm.goto(target);\n });\n APPEND_OPCODES.add(45 /* JumpIf */, function (vm, _ref13) {\n var target = _ref13.op1,\n cache;\n\n var reference = vm.stack.pop();\n if ((0, _reference2.isConst)(reference)) {\n if (reference.value()) {\n vm.goto(target);\n }\n } else {\n cache = new _reference2.ReferenceCache(reference);\n\n if (cache.peek()) {\n vm.goto(target);\n }\n vm.updateWith(new Assert(cache));\n }\n });\n APPEND_OPCODES.add(46 /* JumpUnless */, function (vm, _ref14) {\n var target = _ref14.op1,\n cache;\n\n var reference = vm.stack.pop();\n if ((0, _reference2.isConst)(reference)) {\n if (!reference.value()) {\n vm.goto(target);\n }\n } else {\n cache = new _reference2.ReferenceCache(reference);\n\n if (!cache.peek()) {\n vm.goto(target);\n }\n vm.updateWith(new Assert(cache));\n }\n });\n APPEND_OPCODES.add(22 /* Return */, function (vm) {\n return vm.return();\n });\n APPEND_OPCODES.add(23 /* ReturnTo */, function (vm, _ref15) {\n var relative = _ref15.op1;\n\n vm.returnTo(relative);\n });\n var ConstTest = function (ref) {\n return new _reference2.ConstReference(!!ref.value());\n };\n var SimpleTest = function (ref) {\n return ref;\n };\n var EnvironmentTest = function (ref, env) {\n return env.toConditionalReference(ref);\n };\n APPEND_OPCODES.add(51 /* Test */, function (vm, _ref16) {\n var _func = _ref16.op1;\n\n var stack = vm.stack;\n var operand = stack.pop();\n var func = vm.constants.getFunction(_func);\n stack.push(func(operand, vm.env));\n });\n var Assert = function (_UpdatingOpcode) {\n _inherits$5(Assert, _UpdatingOpcode);\n\n function Assert(cache) {\n _classCallCheck$6(this, Assert);\n\n var _this = _possibleConstructorReturn$5(this, _UpdatingOpcode.call(this));\n\n _this.type = 'assert';\n _this.tag = cache.tag;\n _this.cache = cache;\n return _this;\n }\n\n Assert.prototype.evaluate = function (vm) {\n var cache = this.cache;\n\n if ((0, _reference2.isModified)(cache.revalidate())) {\n vm.throw();\n }\n };\n\n Assert.prototype.toJSON = function () {\n var type = this.type,\n _guid = this._guid,\n cache = this.cache;\n\n var expected = void 0;\n try {\n expected = JSON.stringify(cache.peek());\n } catch (e) {\n expected = String(cache.peek());\n }\n return {\n args: [],\n details: { expected: expected },\n guid: _guid,\n type: type\n };\n };\n\n return Assert;\n }(UpdatingOpcode);\n var JumpIfNotModifiedOpcode = function (_UpdatingOpcode2) {\n _inherits$5(JumpIfNotModifiedOpcode, _UpdatingOpcode2);\n\n function JumpIfNotModifiedOpcode(tag, target) {\n _classCallCheck$6(this, JumpIfNotModifiedOpcode);\n\n var _this2 = _possibleConstructorReturn$5(this, _UpdatingOpcode2.call(this));\n\n _this2.target = target;\n _this2.type = 'jump-if-not-modified';\n _this2.tag = tag;\n _this2.lastRevision = tag.value();\n return _this2;\n }\n\n JumpIfNotModifiedOpcode.prototype.evaluate = function (vm) {\n var tag = this.tag,\n target = this.target,\n lastRevision = this.lastRevision;\n\n if (!vm.alwaysRevalidate && tag.validate(lastRevision)) {\n vm.goto(target);\n }\n };\n\n JumpIfNotModifiedOpcode.prototype.didModify = function () {\n this.lastRevision = this.tag.value();\n };\n\n JumpIfNotModifiedOpcode.prototype.toJSON = function () {\n return {\n args: [JSON.stringify(this.target.inspect())],\n guid: this._guid,\n type: this.type\n };\n };\n\n return JumpIfNotModifiedOpcode;\n }(UpdatingOpcode);\n var DidModifyOpcode = function (_UpdatingOpcode3) {\n _inherits$5(DidModifyOpcode, _UpdatingOpcode3);\n\n function DidModifyOpcode(target) {\n _classCallCheck$6(this, DidModifyOpcode);\n\n var _this3 = _possibleConstructorReturn$5(this, _UpdatingOpcode3.call(this));\n\n _this3.target = target;\n _this3.type = 'did-modify';\n _this3.tag = _reference2.CONSTANT_TAG;\n return _this3;\n }\n\n DidModifyOpcode.prototype.evaluate = function () {\n this.target.didModify();\n };\n\n return DidModifyOpcode;\n }(UpdatingOpcode);\n var LabelOpcode = function () {\n function LabelOpcode(label) {\n _classCallCheck$6(this, LabelOpcode);\n\n this.tag = _reference2.CONSTANT_TAG;\n this.type = 'label';\n this.label = null;\n this.prev = null;\n this.next = null;\n (0, _util.initializeGuid)(this);\n this.label = label;\n }\n\n LabelOpcode.prototype.evaluate = function () {};\n\n LabelOpcode.prototype.inspect = function () {\n return this.label + ' [' + this._guid + ']';\n };\n\n LabelOpcode.prototype.toJSON = function () {\n return {\n args: [JSON.stringify(this.inspect())],\n guid: this._guid,\n type: this.type\n };\n };\n\n return LabelOpcode;\n }();\n\n function _defaults$4(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$4(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$4(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$4(subClass, superClass);\n }\n\n function _classCallCheck$5(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n APPEND_OPCODES.add(24 /* Text */, function (vm, _ref) {\n var text = _ref.op1;\n\n vm.elements().appendText(vm.constants.getString(text));\n });\n APPEND_OPCODES.add(25 /* Comment */, function (vm, _ref2) {\n var text = _ref2.op1;\n\n vm.elements().appendComment(vm.constants.getString(text));\n });\n APPEND_OPCODES.add(27 /* OpenElement */, function (vm, _ref3) {\n var tag = _ref3.op1;\n\n vm.elements().openElement(vm.constants.getString(tag));\n });\n APPEND_OPCODES.add(28 /* OpenElementWithOperations */, function (vm, _ref4) {\n var tag = _ref4.op1;\n\n var tagName = vm.constants.getString(tag);\n var operations = vm.stack.pop();\n vm.elements().openElement(tagName, operations);\n });\n APPEND_OPCODES.add(29 /* OpenDynamicElement */, function (vm) {\n var operations = vm.stack.pop();\n var tagName = vm.stack.pop().value();\n vm.elements().openElement(tagName, operations);\n });\n APPEND_OPCODES.add(36 /* PushRemoteElement */, function (vm) {\n var elementRef = vm.stack.pop(),\n cache,\n _cache;\n var nextSiblingRef = vm.stack.pop();\n var element = void 0;\n var nextSibling = void 0;\n if ((0, _reference2.isConst)(elementRef)) {\n element = elementRef.value();\n } else {\n cache = new _reference2.ReferenceCache(elementRef);\n\n element = cache.peek();\n vm.updateWith(new Assert(cache));\n }\n if ((0, _reference2.isConst)(nextSiblingRef)) {\n nextSibling = nextSiblingRef.value();\n } else {\n _cache = new _reference2.ReferenceCache(nextSiblingRef);\n\n nextSibling = _cache.peek();\n vm.updateWith(new Assert(_cache));\n }\n vm.elements().pushRemoteElement(element, nextSibling);\n });\n APPEND_OPCODES.add(37 /* PopRemoteElement */, function (vm) {\n return vm.elements().popRemoteElement();\n });\n\n var ClassList = function () {\n function ClassList() {\n _classCallCheck$5(this, ClassList);\n\n this.list = null;\n this.isConst = true;\n }\n\n ClassList.prototype.append = function (reference) {\n var list = this.list,\n isConst$$1 = this.isConst;\n\n if (list === null) list = this.list = [];\n list.push(reference);\n this.isConst = isConst$$1 && (0, _reference2.isConst)(reference);\n };\n\n ClassList.prototype.toReference = function () {\n var list = this.list,\n isConst$$1 = this.isConst;\n\n if (!list) return NULL_REFERENCE;\n if (isConst$$1) return PrimitiveReference.create(toClassName(list));\n return new ClassListReference(list);\n };\n\n return ClassList;\n }();\n\n var ClassListReference = function (_CachedReference) {\n _inherits$4(ClassListReference, _CachedReference);\n\n function ClassListReference(list) {\n _classCallCheck$5(this, ClassListReference);\n\n var _this = _possibleConstructorReturn$4(this, _CachedReference.call(this));\n\n _this.list = [];\n _this.tag = (0, _reference2.combineTagged)(list);\n _this.list = list;\n return _this;\n }\n\n ClassListReference.prototype.compute = function () {\n return toClassName(this.list);\n };\n\n return ClassListReference;\n }(_reference2.CachedReference);\n\n function toClassName(list) {\n var ret = [],\n i,\n value;\n for (i = 0; i < list.length; i++) {\n value = list[i].value();\n\n if (value !== false && value !== null && value !== undefined) ret.push(value);\n }\n return ret.length === 0 ? null : ret.join(' ');\n }\n var SimpleElementOperations = function () {\n function SimpleElementOperations(env) {\n _classCallCheck$5(this, SimpleElementOperations);\n\n this.env = env;\n this.opcodes = null;\n this.classList = null;\n }\n\n SimpleElementOperations.prototype.addStaticAttribute = function (element, name, value) {\n if (name === 'class') {\n this.addClass(PrimitiveReference.create(value));\n } else {\n this.env.getAppendOperations().setAttribute(element, name, value);\n }\n };\n\n SimpleElementOperations.prototype.addStaticAttributeNS = function (element, namespace, name, value) {\n this.env.getAppendOperations().setAttribute(element, name, value, namespace);\n };\n\n SimpleElementOperations.prototype.addDynamicAttribute = function (element, name, reference, isTrusting) {\n var attributeManager, attribute;\n\n if (name === 'class') {\n this.addClass(reference);\n } else {\n attributeManager = this.env.attributeFor(element, name, isTrusting);\n attribute = new DynamicAttribute(element, attributeManager, name, reference);\n\n this.addAttribute(attribute);\n }\n };\n\n SimpleElementOperations.prototype.addDynamicAttributeNS = function (element, namespace, name, reference, isTrusting) {\n var attributeManager = this.env.attributeFor(element, name, isTrusting, namespace);\n var nsAttribute = new DynamicAttribute(element, attributeManager, name, reference, namespace);\n this.addAttribute(nsAttribute);\n };\n\n SimpleElementOperations.prototype.flush = function (element, vm) {\n var env = vm.env,\n i,\n attributeManager,\n attribute,\n opcode;\n var opcodes = this.opcodes,\n classList = this.classList;\n\n for (i = 0; opcodes && i < opcodes.length; i++) {\n vm.updateWith(opcodes[i]);\n }\n if (classList) {\n attributeManager = env.attributeFor(element, 'class', false);\n attribute = new DynamicAttribute(element, attributeManager, 'class', classList.toReference());\n opcode = attribute.flush(env);\n\n if (opcode) {\n vm.updateWith(opcode);\n }\n }\n this.opcodes = null;\n this.classList = null;\n };\n\n SimpleElementOperations.prototype.addClass = function (reference) {\n var classList = this.classList;\n\n if (!classList) {\n classList = this.classList = new ClassList();\n }\n classList.append(reference);\n };\n\n SimpleElementOperations.prototype.addAttribute = function (attribute) {\n var opcode = attribute.flush(this.env),\n opcodes;\n if (opcode) {\n opcodes = this.opcodes;\n\n\n if (!opcodes) {\n opcodes = this.opcodes = [];\n }\n opcodes.push(opcode);\n }\n };\n\n return SimpleElementOperations;\n }();\n var ComponentElementOperations = function () {\n function ComponentElementOperations(env) {\n _classCallCheck$5(this, ComponentElementOperations);\n\n this.env = env;\n this.attributeNames = null;\n this.attributes = null;\n this.classList = null;\n }\n\n ComponentElementOperations.prototype.addStaticAttribute = function (element, name, value) {\n if (name === 'class') {\n this.addClass(PrimitiveReference.create(value));\n } else if (this.shouldAddAttribute(name)) {\n this.addAttribute(name, new StaticAttribute(element, name, value));\n }\n };\n\n ComponentElementOperations.prototype.addStaticAttributeNS = function (element, namespace, name, value) {\n if (this.shouldAddAttribute(name)) {\n this.addAttribute(name, new StaticAttribute(element, name, value, namespace));\n }\n };\n\n ComponentElementOperations.prototype.addDynamicAttribute = function (element, name, reference, isTrusting) {\n var attributeManager, attribute;\n\n if (name === 'class') {\n this.addClass(reference);\n } else if (this.shouldAddAttribute(name)) {\n attributeManager = this.env.attributeFor(element, name, isTrusting);\n attribute = new DynamicAttribute(element, attributeManager, name, reference);\n\n this.addAttribute(name, attribute);\n }\n };\n\n ComponentElementOperations.prototype.addDynamicAttributeNS = function (element, namespace, name, reference, isTrusting) {\n var attributeManager, nsAttribute;\n\n if (this.shouldAddAttribute(name)) {\n attributeManager = this.env.attributeFor(element, name, isTrusting, namespace);\n nsAttribute = new DynamicAttribute(element, attributeManager, name, reference, namespace);\n\n this.addAttribute(name, nsAttribute);\n }\n };\n\n ComponentElementOperations.prototype.flush = function (element, vm) {\n var env = this.env,\n i,\n opcode,\n attributeManager,\n attribute,\n _opcode;\n var attributes = this.attributes,\n classList = this.classList;\n\n for (i = 0; attributes && i < attributes.length; i++) {\n opcode = attributes[i].flush(env);\n\n if (opcode) {\n vm.updateWith(opcode);\n }\n }\n if (classList) {\n attributeManager = env.attributeFor(element, 'class', false);\n attribute = new DynamicAttribute(element, attributeManager, 'class', classList.toReference());\n _opcode = attribute.flush(env);\n\n if (_opcode) {\n vm.updateWith(_opcode);\n }\n }\n };\n\n ComponentElementOperations.prototype.shouldAddAttribute = function (name) {\n return !this.attributeNames || this.attributeNames.indexOf(name) === -1;\n };\n\n ComponentElementOperations.prototype.addClass = function (reference) {\n var classList = this.classList;\n\n if (!classList) {\n classList = this.classList = new ClassList();\n }\n classList.append(reference);\n };\n\n ComponentElementOperations.prototype.addAttribute = function (name, attribute) {\n var attributeNames = this.attributeNames,\n attributes = this.attributes;\n\n if (!attributeNames) {\n attributeNames = this.attributeNames = [];\n attributes = this.attributes = [];\n }\n attributeNames.push(name);\n attributes.push(attribute);\n };\n\n return ComponentElementOperations;\n }();\n APPEND_OPCODES.add(33 /* FlushElement */, function (vm) {\n var stack = vm.elements();\n var action = 'FlushElementOpcode#evaluate';\n stack.expectOperations(action).flush(stack.expectConstructing(action), vm);\n stack.flushElement();\n });\n APPEND_OPCODES.add(34 /* CloseElement */, function (vm) {\n return vm.elements().closeElement();\n });\n APPEND_OPCODES.add(30 /* StaticAttr */, function (vm, _ref5) {\n var _name = _ref5.op1,\n _value = _ref5.op2,\n _namespace = _ref5.op3,\n namespace;\n\n var name = vm.constants.getString(_name);\n var value = vm.constants.getString(_value);\n if (_namespace) {\n namespace = vm.constants.getString(_namespace);\n\n vm.elements().setStaticAttributeNS(namespace, name, value);\n } else {\n vm.elements().setStaticAttribute(name, value);\n }\n });\n APPEND_OPCODES.add(35 /* Modifier */, function (vm, _ref6) {\n var _manager = _ref6.op1;\n\n var manager = vm.constants.getOther(_manager);\n var stack = vm.stack;\n var args = stack.pop();\n var tag = args.tag;\n\n var _vm$elements = vm.elements(),\n element = _vm$elements.constructing,\n updateOperations = _vm$elements.updateOperations;\n\n var dynamicScope = vm.dynamicScope();\n var modifier = manager.create(element, args, dynamicScope, updateOperations);\n args.clear();\n vm.env.scheduleInstallModifier(modifier, manager);\n var destructor = manager.getDestructor(modifier);\n if (destructor) {\n vm.newDestroyable(destructor);\n }\n vm.updateWith(new UpdateModifierOpcode(tag, manager, modifier));\n });\n var UpdateModifierOpcode = function (_UpdatingOpcode) {\n _inherits$4(UpdateModifierOpcode, _UpdatingOpcode);\n\n function UpdateModifierOpcode(tag, manager, modifier) {\n _classCallCheck$5(this, UpdateModifierOpcode);\n\n var _this2 = _possibleConstructorReturn$4(this, _UpdatingOpcode.call(this));\n\n _this2.tag = tag;\n _this2.manager = manager;\n _this2.modifier = modifier;\n _this2.type = 'update-modifier';\n _this2.lastUpdated = tag.value();\n return _this2;\n }\n\n UpdateModifierOpcode.prototype.evaluate = function (vm) {\n var manager = this.manager,\n modifier = this.modifier,\n tag = this.tag,\n lastUpdated = this.lastUpdated;\n\n if (!tag.validate(lastUpdated)) {\n vm.env.scheduleUpdateModifier(modifier, manager);\n this.lastUpdated = tag.value();\n }\n };\n\n UpdateModifierOpcode.prototype.toJSON = function () {\n return {\n guid: this._guid,\n type: this.type\n };\n };\n\n return UpdateModifierOpcode;\n }(UpdatingOpcode);\n var StaticAttribute = function () {\n function StaticAttribute(element, name, value, namespace) {\n _classCallCheck$5(this, StaticAttribute);\n\n this.element = element;\n this.name = name;\n this.value = value;\n this.namespace = namespace;\n }\n\n StaticAttribute.prototype.flush = function (env) {\n env.getAppendOperations().setAttribute(this.element, this.name, this.value, this.namespace);\n return null;\n };\n\n return StaticAttribute;\n }();\n var DynamicAttribute = function () {\n function DynamicAttribute(element, attributeManager, name, reference, namespace) {\n _classCallCheck$5(this, DynamicAttribute);\n\n this.element = element;\n this.attributeManager = attributeManager;\n this.name = name;\n this.reference = reference;\n this.namespace = namespace;\n this.cache = null;\n this.tag = reference.tag;\n }\n\n DynamicAttribute.prototype.patch = function (env) {\n var element = this.element,\n cache = this.cache;\n\n var value = cache.revalidate();\n if ((0, _reference2.isModified)(value)) {\n this.attributeManager.updateAttribute(env, element, value, this.namespace);\n }\n };\n\n DynamicAttribute.prototype.flush = function (env) {\n var reference = this.reference,\n element = this.element,\n value,\n cache,\n _value2;\n\n if ((0, _reference2.isConst)(reference)) {\n value = reference.value();\n\n this.attributeManager.setAttribute(env, element, value, this.namespace);\n return null;\n } else {\n cache = this.cache = new _reference2.ReferenceCache(reference);\n _value2 = cache.peek();\n\n this.attributeManager.setAttribute(env, element, _value2, this.namespace);\n return new PatchElementOpcode(this);\n }\n };\n\n DynamicAttribute.prototype.toJSON = function () {\n var element = this.element,\n namespace = this.namespace,\n name = this.name,\n cache = this.cache;\n\n var formattedElement = formatElement(element);\n var lastValue = cache.peek();\n if (namespace) {\n return {\n element: formattedElement,\n lastValue: lastValue,\n name: name,\n namespace: namespace,\n type: 'attribute'\n };\n }\n return {\n element: formattedElement,\n lastValue: lastValue,\n name: name,\n namespace: namespace === undefined ? null : namespace,\n type: 'attribute'\n };\n };\n\n return DynamicAttribute;\n }();\n function formatElement(element) {\n return JSON.stringify('<' + element.tagName.toLowerCase() + ' />');\n }\n APPEND_OPCODES.add(32 /* DynamicAttrNS */, function (vm, _ref7) {\n var _name = _ref7.op1,\n _namespace = _ref7.op2,\n trusting = _ref7.op3;\n\n var name = vm.constants.getString(_name);\n var namespace = vm.constants.getString(_namespace);\n var reference = vm.stack.pop();\n vm.elements().setDynamicAttributeNS(namespace, name, reference, !!trusting);\n });\n APPEND_OPCODES.add(31 /* DynamicAttr */, function (vm, _ref8) {\n var _name = _ref8.op1,\n trusting = _ref8.op2;\n\n var name = vm.constants.getString(_name);\n var reference = vm.stack.pop();\n vm.elements().setDynamicAttribute(name, reference, !!trusting);\n });\n var PatchElementOpcode = function (_UpdatingOpcode2) {\n _inherits$4(PatchElementOpcode, _UpdatingOpcode2);\n\n function PatchElementOpcode(operation) {\n _classCallCheck$5(this, PatchElementOpcode);\n\n var _this3 = _possibleConstructorReturn$4(this, _UpdatingOpcode2.call(this));\n\n _this3.type = 'patch-element';\n _this3.tag = operation.tag;\n _this3.operation = operation;\n return _this3;\n }\n\n PatchElementOpcode.prototype.evaluate = function (vm) {\n this.operation.patch(vm.env);\n };\n\n PatchElementOpcode.prototype.toJSON = function () {\n var _guid = this._guid,\n type = this.type,\n operation = this.operation;\n\n return {\n details: operation.toJSON(),\n guid: _guid,\n type: type\n };\n };\n\n return PatchElementOpcode;\n }(UpdatingOpcode);\n\n function _defaults$3(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$3(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$3(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$3(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$3(subClass, superClass);\n }\n\n APPEND_OPCODES.add(56 /* PushComponentManager */, function (vm, _ref) {\n var _definition = _ref.op1;\n\n var definition = vm.constants.getOther(_definition);\n var stack = vm.stack;\n stack.push({ definition: definition, manager: definition.manager, component: null });\n });\n APPEND_OPCODES.add(57 /* PushDynamicComponentManager */, function (vm) {\n var stack = vm.stack;\n var reference = stack.pop();\n var cache = (0, _reference2.isConst)(reference) ? undefined : new _reference2.ReferenceCache(reference);\n var definition = cache ? cache.peek() : reference.value();\n stack.push({ definition: definition, manager: definition.manager, component: null });\n if (cache) {\n vm.updateWith(new Assert(cache));\n }\n });\n APPEND_OPCODES.add(58 /* PushArgs */, function (vm, _ref2) {\n var synthetic = _ref2.op1;\n\n var stack = vm.stack;\n ARGS.setup(stack, !!synthetic);\n stack.push(ARGS);\n });\n APPEND_OPCODES.add(59 /* PrepareArgs */, function (vm, _ref3) {\n var _state = _ref3.op1,\n positional,\n named,\n positionalCount,\n i,\n names,\n namedCount,\n atNames,\n _i,\n value,\n atName;\n\n var stack = vm.stack;\n\n var _vm$fetchValue = vm.fetchValue(_state),\n definition = _vm$fetchValue.definition,\n manager = _vm$fetchValue.manager;\n\n var args = stack.pop();\n var preparedArgs = manager.prepareArgs(definition, args);\n if (preparedArgs) {\n args.clear();\n positional = preparedArgs.positional, named = preparedArgs.named;\n positionalCount = positional.length;\n\n for (i = 0; i < positionalCount; i++) {\n stack.push(positional[i]);\n }\n stack.push(positionalCount);\n names = Object.keys(named);\n namedCount = names.length;\n atNames = [];\n\n for (_i = 0; _i < namedCount; _i++) {\n value = named[names[_i]];\n atName = '@' + names[_i];\n\n stack.push(value);\n atNames.push(atName);\n }\n stack.push(atNames);\n args.setup(stack, false);\n }\n stack.push(args);\n });\n APPEND_OPCODES.add(60 /* CreateComponent */, function (vm, _ref4) {\n var _vm$fetchValue2;\n\n var flags = _ref4.op1,\n _state = _ref4.op2;\n\n var definition = void 0;\n var manager = void 0;\n var args = vm.stack.pop();\n var dynamicScope = vm.dynamicScope();\n var state = (_vm$fetchValue2 = vm.fetchValue(_state), definition = _vm$fetchValue2.definition, manager = _vm$fetchValue2.manager, _vm$fetchValue2);\n\n var component = manager.create(vm.env, definition, args, dynamicScope, vm.getSelf(), !!(flags & 1));\n state.component = component;\n vm.updateWith(new UpdateComponentOpcode(args.tag, definition.name, component, manager, dynamicScope));\n });\n APPEND_OPCODES.add(61 /* RegisterComponentDestructor */, function (vm, _ref5) {\n var _state = _ref5.op1;\n\n var _vm$fetchValue3 = vm.fetchValue(_state),\n manager = _vm$fetchValue3.manager,\n component = _vm$fetchValue3.component;\n\n var destructor = manager.getDestructor(component);\n if (destructor) vm.newDestroyable(destructor);\n });\n APPEND_OPCODES.add(65 /* BeginComponentTransaction */, function (vm) {\n vm.beginCacheGroup();\n vm.elements().pushSimpleBlock();\n });\n APPEND_OPCODES.add(62 /* PushComponentOperations */, function (vm) {\n vm.stack.push(new ComponentElementOperations(vm.env));\n });\n APPEND_OPCODES.add(67 /* DidCreateElement */, function (vm, _ref6) {\n var _state = _ref6.op1;\n\n var _vm$fetchValue4 = vm.fetchValue(_state),\n manager = _vm$fetchValue4.manager,\n component = _vm$fetchValue4.component;\n\n var action = 'DidCreateElementOpcode#evaluate';\n manager.didCreateElement(component, vm.elements().expectConstructing(action), vm.elements().expectOperations(action));\n });\n APPEND_OPCODES.add(63 /* GetComponentSelf */, function (vm, _ref7) {\n var _state = _ref7.op1;\n\n var state = vm.fetchValue(_state);\n vm.stack.push(state.manager.getSelf(state.component));\n });\n APPEND_OPCODES.add(64 /* GetComponentLayout */, function (vm, _ref8) {\n var _state = _ref8.op1;\n\n var _vm$fetchValue5 = vm.fetchValue(_state),\n manager = _vm$fetchValue5.manager,\n definition = _vm$fetchValue5.definition,\n component = _vm$fetchValue5.component;\n\n vm.stack.push(manager.layoutFor(definition, component, vm.env));\n });\n APPEND_OPCODES.add(68 /* DidRenderLayout */, function (vm, _ref9) {\n var _state = _ref9.op1;\n\n var _vm$fetchValue6 = vm.fetchValue(_state),\n manager = _vm$fetchValue6.manager,\n component = _vm$fetchValue6.component;\n\n var bounds = vm.elements().popBlock();\n manager.didRenderLayout(component, bounds);\n vm.env.didCreate(component, manager);\n vm.updateWith(new DidUpdateLayoutOpcode(manager, component, bounds));\n });\n APPEND_OPCODES.add(66 /* CommitComponentTransaction */, function (vm) {\n return vm.commitCacheGroup();\n });\n var UpdateComponentOpcode = function (_UpdatingOpcode) {\n _inherits$3(UpdateComponentOpcode, _UpdatingOpcode);\n\n function UpdateComponentOpcode(tag, name, component, manager, dynamicScope) {\n _classCallCheck$3(this, UpdateComponentOpcode);\n\n var _this = _possibleConstructorReturn$3(this, _UpdatingOpcode.call(this));\n\n _this.name = name;\n _this.component = component;\n _this.manager = manager;\n _this.dynamicScope = dynamicScope;\n _this.type = 'update-component';\n var componentTag = manager.getTag(component);\n if (componentTag) {\n _this.tag = (0, _reference2.combine)([tag, componentTag]);\n } else {\n _this.tag = tag;\n }\n return _this;\n }\n\n UpdateComponentOpcode.prototype.evaluate = function () {\n var component = this.component,\n manager = this.manager,\n dynamicScope = this.dynamicScope;\n\n manager.update(component, dynamicScope);\n };\n\n UpdateComponentOpcode.prototype.toJSON = function () {\n return {\n args: [JSON.stringify(this.name)],\n guid: this._guid,\n type: this.type\n };\n };\n\n return UpdateComponentOpcode;\n }(UpdatingOpcode);\n var DidUpdateLayoutOpcode = function (_UpdatingOpcode2) {\n _inherits$3(DidUpdateLayoutOpcode, _UpdatingOpcode2);\n\n function DidUpdateLayoutOpcode(manager, component, bounds) {\n _classCallCheck$3(this, DidUpdateLayoutOpcode);\n\n var _this2 = _possibleConstructorReturn$3(this, _UpdatingOpcode2.call(this));\n\n _this2.manager = manager;\n _this2.component = component;\n _this2.bounds = bounds;\n _this2.type = 'did-update-layout';\n _this2.tag = _reference2.CONSTANT_TAG;\n return _this2;\n }\n\n DidUpdateLayoutOpcode.prototype.evaluate = function (vm) {\n var manager = this.manager,\n component = this.component,\n bounds = this.bounds;\n\n manager.didUpdateLayout(component, bounds);\n vm.env.didUpdate(component, manager);\n };\n\n return DidUpdateLayoutOpcode;\n }(UpdatingOpcode);\n\n function _classCallCheck$8(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Cursor = function Cursor(element, nextSibling) {\n _classCallCheck$8(this, Cursor);\n\n this.element = element;\n this.nextSibling = nextSibling;\n };\n\n var ConcreteBounds = function () {\n function ConcreteBounds(parentNode, first, last) {\n _classCallCheck$8(this, ConcreteBounds);\n\n this.parentNode = parentNode;\n this.first = first;\n this.last = last;\n }\n\n ConcreteBounds.prototype.parentElement = function () {\n return this.parentNode;\n };\n\n ConcreteBounds.prototype.firstNode = function () {\n return this.first;\n };\n\n ConcreteBounds.prototype.lastNode = function () {\n return this.last;\n };\n\n return ConcreteBounds;\n }();\n var SingleNodeBounds = function () {\n function SingleNodeBounds(parentNode, node) {\n _classCallCheck$8(this, SingleNodeBounds);\n\n this.parentNode = parentNode;\n this.node = node;\n }\n\n SingleNodeBounds.prototype.parentElement = function () {\n return this.parentNode;\n };\n\n SingleNodeBounds.prototype.firstNode = function () {\n return this.node;\n };\n\n SingleNodeBounds.prototype.lastNode = function () {\n return this.node;\n };\n\n return SingleNodeBounds;\n }();\n\n function single(parent, node) {\n return new SingleNodeBounds(parent, node);\n }\n function move(bounds, reference) {\n var parent = bounds.parentElement(),\n next;\n var first = bounds.firstNode();\n var last = bounds.lastNode();\n var node = first;\n while (node) {\n next = node.nextSibling;\n\n parent.insertBefore(node, reference);\n if (node === last) return next;\n node = next;\n }\n return null;\n }\n function clear(bounds) {\n var parent = bounds.parentElement(),\n next;\n var first = bounds.firstNode();\n var last = bounds.lastNode();\n var node = first;\n while (node) {\n next = node.nextSibling;\n\n parent.removeChild(node);\n if (node === last) return next;\n node = next;\n }\n return null;\n }\n\n function _defaults$7(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$7(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$7(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$7(subClass, superClass);\n }\n\n function _classCallCheck$9(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var First = function () {\n function First(node) {\n _classCallCheck$9(this, First);\n\n this.node = node;\n }\n\n First.prototype.firstNode = function () {\n return this.node;\n };\n\n return First;\n }();\n\n var Last = function () {\n function Last(node) {\n _classCallCheck$9(this, Last);\n\n this.node = node;\n }\n\n Last.prototype.lastNode = function () {\n return this.node;\n };\n\n return Last;\n }();\n\n var Fragment = function () {\n function Fragment(bounds$$1) {\n _classCallCheck$9(this, Fragment);\n\n this.bounds = bounds$$1;\n }\n\n Fragment.prototype.parentElement = function () {\n return this.bounds.parentElement();\n };\n\n Fragment.prototype.firstNode = function () {\n return this.bounds.firstNode();\n };\n\n Fragment.prototype.lastNode = function () {\n return this.bounds.lastNode();\n };\n\n Fragment.prototype.update = function (bounds$$1) {\n this.bounds = bounds$$1;\n };\n\n return Fragment;\n }();\n var ElementStack = function () {\n function ElementStack(env, parentNode, nextSibling) {\n _classCallCheck$9(this, ElementStack);\n\n this.constructing = null;\n this.operations = null;\n this.elementStack = new _util.Stack();\n this.nextSiblingStack = new _util.Stack();\n this.blockStack = new _util.Stack();\n this.env = env;\n this.dom = env.getAppendOperations();\n this.updateOperations = env.getDOM();\n this.element = parentNode;\n this.nextSibling = nextSibling;\n this.defaultOperations = new SimpleElementOperations(env);\n this.pushSimpleBlock();\n this.elementStack.push(this.element);\n this.nextSiblingStack.push(this.nextSibling);\n }\n\n ElementStack.forInitialRender = function (env, parentNode, nextSibling) {\n return new ElementStack(env, parentNode, nextSibling);\n };\n\n ElementStack.resume = function (env, tracker, nextSibling) {\n var parentNode = tracker.parentElement();\n var stack = new ElementStack(env, parentNode, nextSibling);\n stack.pushBlockTracker(tracker);\n return stack;\n };\n\n ElementStack.prototype.expectConstructing = function () {\n return this.constructing;\n };\n\n ElementStack.prototype.expectOperations = function () {\n return this.operations;\n };\n\n ElementStack.prototype.block = function () {\n return this.blockStack.current;\n };\n\n ElementStack.prototype.popElement = function () {\n var elementStack = this.elementStack,\n nextSiblingStack = this.nextSiblingStack;\n\n var topElement = elementStack.pop();\n nextSiblingStack.pop();\n // LOGGER.debug(`-> element stack ${this.elementStack.toArray().map(e => e.tagName).join(', ')}`);\n this.element = elementStack.current;\n this.nextSibling = nextSiblingStack.current;\n return topElement;\n };\n\n ElementStack.prototype.pushSimpleBlock = function () {\n var tracker = new SimpleBlockTracker(this.element);\n this.pushBlockTracker(tracker);\n return tracker;\n };\n\n ElementStack.prototype.pushUpdatableBlock = function () {\n var tracker = new UpdatableBlockTracker(this.element);\n this.pushBlockTracker(tracker);\n return tracker;\n };\n\n ElementStack.prototype.pushBlockTracker = function (tracker) {\n var isRemote = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var current = this.blockStack.current;\n if (current !== null) {\n current.newDestroyable(tracker);\n if (!isRemote) {\n current.newBounds(tracker);\n }\n }\n this.blockStack.push(tracker);\n return tracker;\n };\n\n ElementStack.prototype.pushBlockList = function (list) {\n var tracker = new BlockListTracker(this.element, list);\n var current = this.blockStack.current;\n if (current !== null) {\n current.newDestroyable(tracker);\n current.newBounds(tracker);\n }\n this.blockStack.push(tracker);\n return tracker;\n };\n\n ElementStack.prototype.popBlock = function () {\n this.block().finalize(this);\n return this.blockStack.pop();\n };\n\n ElementStack.prototype.openElement = function (tag, _operations) {\n // workaround argument.length transpile of arg initializer\n var operations = _operations === undefined ? this.defaultOperations : _operations;\n var element = this.dom.createElement(tag, this.element);\n this.constructing = element;\n this.operations = operations;\n return element;\n };\n\n ElementStack.prototype.flushElement = function () {\n var parent = this.element;\n var element = this.constructing;\n this.dom.insertBefore(parent, element, this.nextSibling);\n this.constructing = null;\n this.operations = null;\n this.pushElement(element, null);\n this.block().openElement(element);\n };\n\n ElementStack.prototype.pushRemoteElement = function (element) {\n var nextSibling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n this.pushElement(element, nextSibling);\n var tracker = new RemoteBlockTracker(element);\n this.pushBlockTracker(tracker, true);\n };\n\n ElementStack.prototype.popRemoteElement = function () {\n this.popBlock();\n this.popElement();\n };\n\n ElementStack.prototype.pushElement = function (element, nextSibling) {\n this.element = element;\n this.elementStack.push(element);\n // LOGGER.debug(`-> element stack ${this.elementStack.toArray().map(e => e.tagName).join(', ')}`);\n this.nextSibling = nextSibling;\n this.nextSiblingStack.push(nextSibling);\n };\n\n ElementStack.prototype.newDestroyable = function (d) {\n this.block().newDestroyable(d);\n };\n\n ElementStack.prototype.newBounds = function (bounds$$1) {\n this.block().newBounds(bounds$$1);\n };\n\n ElementStack.prototype.appendText = function (string) {\n var dom = this.dom;\n\n var text = dom.createTextNode(string);\n dom.insertBefore(this.element, text, this.nextSibling);\n this.block().newNode(text);\n return text;\n };\n\n ElementStack.prototype.appendComment = function (string) {\n var dom = this.dom;\n\n var comment = dom.createComment(string);\n dom.insertBefore(this.element, comment, this.nextSibling);\n this.block().newNode(comment);\n return comment;\n };\n\n ElementStack.prototype.setStaticAttribute = function (name, value) {\n this.expectOperations('setStaticAttribute').addStaticAttribute(this.expectConstructing('setStaticAttribute'), name, value);\n };\n\n ElementStack.prototype.setStaticAttributeNS = function (namespace, name, value) {\n this.expectOperations('setStaticAttributeNS').addStaticAttributeNS(this.expectConstructing('setStaticAttributeNS'), namespace, name, value);\n };\n\n ElementStack.prototype.setDynamicAttribute = function (name, reference, isTrusting) {\n this.expectOperations('setDynamicAttribute').addDynamicAttribute(this.expectConstructing('setDynamicAttribute'), name, reference, isTrusting);\n };\n\n ElementStack.prototype.setDynamicAttributeNS = function (namespace, name, reference, isTrusting) {\n this.expectOperations('setDynamicAttributeNS').addDynamicAttributeNS(this.expectConstructing('setDynamicAttributeNS'), namespace, name, reference, isTrusting);\n };\n\n ElementStack.prototype.closeElement = function () {\n this.block().closeElement();\n this.popElement();\n };\n\n return ElementStack;\n }();\n var SimpleBlockTracker = function () {\n function SimpleBlockTracker(parent) {\n _classCallCheck$9(this, SimpleBlockTracker);\n\n this.parent = parent;\n this.first = null;\n this.last = null;\n this.destroyables = null;\n this.nesting = 0;\n }\n\n SimpleBlockTracker.prototype.destroy = function () {\n var destroyables = this.destroyables,\n i;\n\n if (destroyables && destroyables.length) {\n for (i = 0; i < destroyables.length; i++) {\n destroyables[i].destroy();\n }\n }\n };\n\n SimpleBlockTracker.prototype.parentElement = function () {\n return this.parent;\n };\n\n SimpleBlockTracker.prototype.firstNode = function () {\n return this.first && this.first.firstNode();\n };\n\n SimpleBlockTracker.prototype.lastNode = function () {\n return this.last && this.last.lastNode();\n };\n\n SimpleBlockTracker.prototype.openElement = function (element) {\n this.newNode(element);\n this.nesting++;\n };\n\n SimpleBlockTracker.prototype.closeElement = function () {\n this.nesting--;\n };\n\n SimpleBlockTracker.prototype.newNode = function (node) {\n if (this.nesting !== 0) return;\n if (!this.first) {\n this.first = new First(node);\n }\n this.last = new Last(node);\n };\n\n SimpleBlockTracker.prototype.newBounds = function (bounds$$1) {\n if (this.nesting !== 0) return;\n if (!this.first) {\n this.first = bounds$$1;\n }\n this.last = bounds$$1;\n };\n\n SimpleBlockTracker.prototype.newDestroyable = function (d) {\n this.destroyables = this.destroyables || [];\n this.destroyables.push(d);\n };\n\n SimpleBlockTracker.prototype.finalize = function (stack) {\n if (!this.first) {\n stack.appendComment('');\n }\n };\n\n return SimpleBlockTracker;\n }();\n\n var RemoteBlockTracker = function (_SimpleBlockTracker) {\n _inherits$7(RemoteBlockTracker, _SimpleBlockTracker);\n\n function RemoteBlockTracker() {\n _classCallCheck$9(this, RemoteBlockTracker);\n\n return _possibleConstructorReturn$7(this, _SimpleBlockTracker.apply(this, arguments));\n }\n\n RemoteBlockTracker.prototype.destroy = function () {\n _SimpleBlockTracker.prototype.destroy.call(this);\n clear(this);\n };\n\n return RemoteBlockTracker;\n }(SimpleBlockTracker);\n\n var UpdatableBlockTracker = function (_SimpleBlockTracker2) {\n _inherits$7(UpdatableBlockTracker, _SimpleBlockTracker2);\n\n function UpdatableBlockTracker() {\n _classCallCheck$9(this, UpdatableBlockTracker);\n\n return _possibleConstructorReturn$7(this, _SimpleBlockTracker2.apply(this, arguments));\n }\n\n UpdatableBlockTracker.prototype.reset = function (env) {\n var destroyables = this.destroyables,\n i;\n\n if (destroyables && destroyables.length) {\n for (i = 0; i < destroyables.length; i++) {\n env.didDestroy(destroyables[i]);\n }\n }\n var nextSibling = clear(this);\n this.first = null;\n this.last = null;\n this.destroyables = null;\n this.nesting = 0;\n return nextSibling;\n };\n\n return UpdatableBlockTracker;\n }(SimpleBlockTracker);\n\n var BlockListTracker = function () {\n function BlockListTracker(parent, boundList) {\n _classCallCheck$9(this, BlockListTracker);\n\n this.parent = parent;\n this.boundList = boundList;\n this.parent = parent;\n this.boundList = boundList;\n }\n\n BlockListTracker.prototype.destroy = function () {\n this.boundList.forEachNode(function (node) {\n return node.destroy();\n });\n };\n\n BlockListTracker.prototype.parentElement = function () {\n return this.parent;\n };\n\n BlockListTracker.prototype.firstNode = function () {\n var head = this.boundList.head();\n return head && head.firstNode();\n };\n\n BlockListTracker.prototype.lastNode = function () {\n var tail = this.boundList.tail();\n return tail && tail.lastNode();\n };\n\n BlockListTracker.prototype.openElement = function () {\n (0, _util.assert)(false, 'Cannot openElement directly inside a block list');\n };\n\n BlockListTracker.prototype.closeElement = function () {\n (0, _util.assert)(false, 'Cannot closeElement directly inside a block list');\n };\n\n BlockListTracker.prototype.newNode = function () {\n (0, _util.assert)(false, 'Cannot create a new node directly inside a block list');\n };\n\n BlockListTracker.prototype.newBounds = function () {};\n\n BlockListTracker.prototype.newDestroyable = function () {};\n\n BlockListTracker.prototype.finalize = function () {};\n\n return BlockListTracker;\n }();\n\n function _classCallCheck$10(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var COMPONENT_DEFINITION_BRAND = 'COMPONENT DEFINITION [id=e59c754e-61eb-4392-8c4a-2c0ac72bfcd4]';\n function isComponentDefinition(obj) {\n return typeof obj === 'object' && obj !== null && obj[COMPONENT_DEFINITION_BRAND];\n }\n\n\n function _defaults$8(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$8(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$8(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$8(subClass, superClass);\n }\n\n function _classCallCheck$11(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function isSafeString(value) {\n return typeof value === 'object' && value !== null && typeof value.toHTML === 'function';\n }\n function isNode(value) {\n return typeof value === 'object' && value !== null && typeof value.nodeType === 'number';\n }\n function isString(value) {\n return typeof value === 'string';\n }\n\n var Upsert = function Upsert(bounds$$1) {\n _classCallCheck$11(this, Upsert);\n\n this.bounds = bounds$$1;\n };\n\n function cautiousInsert(dom, cursor, value) {\n if (isString(value)) {\n return TextUpsert.insert(dom, cursor, value);\n }\n if (isSafeString(value)) {\n return SafeStringUpsert.insert(dom, cursor, value);\n }\n if (isNode(value)) {\n return NodeUpsert.insert(dom, cursor, value);\n }\n throw (0, _util.unreachable)();\n }\n function trustingInsert(dom, cursor, value) {\n if (isString(value)) {\n return HTMLUpsert.insert(dom, cursor, value);\n }\n if (isNode(value)) {\n return NodeUpsert.insert(dom, cursor, value);\n }\n throw (0, _util.unreachable)();\n }\n\n var TextUpsert = function (_Upsert) {\n _inherits$8(TextUpsert, _Upsert);\n\n TextUpsert.insert = function (dom, cursor, value) {\n var textNode = dom.createTextNode(value);\n dom.insertBefore(cursor.element, textNode, cursor.nextSibling);\n var bounds$$1 = new SingleNodeBounds(cursor.element, textNode);\n return new TextUpsert(bounds$$1, textNode);\n };\n\n function TextUpsert(bounds$$1, textNode) {\n _classCallCheck$11(this, TextUpsert);\n\n var _this = _possibleConstructorReturn$8(this, _Upsert.call(this, bounds$$1));\n\n _this.textNode = textNode;\n return _this;\n }\n\n TextUpsert.prototype.update = function (_dom, value) {\n var textNode;\n\n if (isString(value)) {\n textNode = this.textNode;\n\n\n textNode.nodeValue = value;\n return true;\n } else {\n return false;\n }\n };\n\n return TextUpsert;\n }(Upsert);\n\n var HTMLUpsert = function (_Upsert2) {\n _inherits$8(HTMLUpsert, _Upsert2);\n\n function HTMLUpsert() {\n _classCallCheck$11(this, HTMLUpsert);\n\n return _possibleConstructorReturn$8(this, _Upsert2.apply(this, arguments));\n }\n\n HTMLUpsert.insert = function (dom, cursor, value) {\n var bounds$$1 = dom.insertHTMLBefore(cursor.element, cursor.nextSibling, value);\n return new HTMLUpsert(bounds$$1);\n };\n\n HTMLUpsert.prototype.update = function (dom, value) {\n var bounds$$1, parentElement, nextSibling;\n\n if (isString(value)) {\n bounds$$1 = this.bounds;\n parentElement = bounds$$1.parentElement();\n nextSibling = clear(bounds$$1);\n\n this.bounds = dom.insertHTMLBefore(parentElement, nextSibling, value);\n return true;\n } else {\n return false;\n }\n };\n\n return HTMLUpsert;\n }(Upsert);\n\n var SafeStringUpsert = function (_Upsert3) {\n _inherits$8(SafeStringUpsert, _Upsert3);\n\n function SafeStringUpsert(bounds$$1, lastStringValue) {\n _classCallCheck$11(this, SafeStringUpsert);\n\n var _this3 = _possibleConstructorReturn$8(this, _Upsert3.call(this, bounds$$1));\n\n _this3.lastStringValue = lastStringValue;\n return _this3;\n }\n\n SafeStringUpsert.insert = function (dom, cursor, value) {\n var stringValue = value.toHTML();\n var bounds$$1 = dom.insertHTMLBefore(cursor.element, cursor.nextSibling, stringValue);\n return new SafeStringUpsert(bounds$$1, stringValue);\n };\n\n SafeStringUpsert.prototype.update = function (dom, value) {\n var stringValue, bounds$$1, parentElement, nextSibling;\n\n if (isSafeString(value)) {\n stringValue = value.toHTML();\n\n if (stringValue !== this.lastStringValue) {\n bounds$$1 = this.bounds;\n parentElement = bounds$$1.parentElement();\n nextSibling = clear(bounds$$1);\n\n this.bounds = dom.insertHTMLBefore(parentElement, nextSibling, stringValue);\n this.lastStringValue = stringValue;\n }\n return true;\n } else {\n return false;\n }\n };\n\n return SafeStringUpsert;\n }(Upsert);\n\n var NodeUpsert = function (_Upsert4) {\n _inherits$8(NodeUpsert, _Upsert4);\n\n function NodeUpsert() {\n _classCallCheck$11(this, NodeUpsert);\n\n return _possibleConstructorReturn$8(this, _Upsert4.apply(this, arguments));\n }\n\n NodeUpsert.insert = function (dom, cursor, node) {\n dom.insertBefore(cursor.element, node, cursor.nextSibling);\n return new NodeUpsert(single(cursor.element, node));\n };\n\n NodeUpsert.prototype.update = function (dom, value) {\n var bounds$$1, parentElement, nextSibling;\n\n if (isNode(value)) {\n bounds$$1 = this.bounds;\n parentElement = bounds$$1.parentElement();\n nextSibling = clear(bounds$$1);\n\n this.bounds = dom.insertNodeBefore(parentElement, value, nextSibling);\n return true;\n } else {\n return false;\n }\n };\n\n return NodeUpsert;\n }(Upsert);\n\n function _defaults$6(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$6(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$6(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$6(subClass, superClass);\n }\n\n function _classCallCheck$7(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n APPEND_OPCODES.add(26 /* DynamicContent */, function (vm, _ref) {\n var append = _ref.op1;\n\n var opcode = vm.constants.getOther(append);\n opcode.evaluate(vm);\n });\n function isEmpty(value) {\n return value === null || value === undefined || typeof value.toString !== 'function';\n }\n function normalizeTextValue(value) {\n if (isEmpty(value)) {\n return '';\n }\n return String(value);\n }\n function normalizeTrustedValue(value) {\n if (isEmpty(value)) {\n return '';\n }\n if (isString(value)) {\n return value;\n }\n if (isSafeString(value)) {\n return value.toHTML();\n }\n if (isNode(value)) {\n return value;\n }\n return String(value);\n }\n function normalizeValue(value) {\n if (isEmpty(value)) {\n return '';\n }\n if (isString(value)) {\n return value;\n }\n if (isSafeString(value) || isNode(value)) {\n return value;\n }\n return String(value);\n }\n var AppendDynamicOpcode = function () {\n function AppendDynamicOpcode() {\n _classCallCheck$7(this, AppendDynamicOpcode);\n }\n\n AppendDynamicOpcode.prototype.evaluate = function (vm) {\n var reference = vm.stack.pop();\n var normalized = this.normalize(reference);\n var value = void 0;\n var cache = void 0;\n if ((0, _reference2.isConst)(reference)) {\n value = normalized.value();\n } else {\n cache = new _reference2.ReferenceCache(normalized);\n value = cache.peek();\n }\n var stack = vm.elements();\n var upsert = this.insert(vm.env.getAppendOperations(), stack, value);\n var bounds$$1 = new Fragment(upsert.bounds);\n stack.newBounds(bounds$$1);\n if (cache /* i.e. !isConst(reference) */) {\n vm.updateWith(this.updateWith(vm, reference, cache, bounds$$1, upsert));\n }\n };\n\n return AppendDynamicOpcode;\n }();\n var IsComponentDefinitionReference = function (_ConditionalReference) {\n _inherits$6(IsComponentDefinitionReference, _ConditionalReference);\n\n function IsComponentDefinitionReference() {\n _classCallCheck$7(this, IsComponentDefinitionReference);\n\n return _possibleConstructorReturn$6(this, _ConditionalReference.apply(this, arguments));\n }\n\n IsComponentDefinitionReference.create = function (inner) {\n return new IsComponentDefinitionReference(inner);\n };\n\n IsComponentDefinitionReference.prototype.toBool = function (value) {\n return isComponentDefinition(value);\n };\n\n return IsComponentDefinitionReference;\n }(ConditionalReference);\n\n var UpdateOpcode = function (_UpdatingOpcode) {\n _inherits$6(UpdateOpcode, _UpdatingOpcode);\n\n function UpdateOpcode(cache, bounds$$1, upsert) {\n _classCallCheck$7(this, UpdateOpcode);\n\n var _this2 = _possibleConstructorReturn$6(this, _UpdatingOpcode.call(this));\n\n _this2.cache = cache;\n _this2.bounds = bounds$$1;\n _this2.upsert = upsert;\n _this2.tag = cache.tag;\n return _this2;\n }\n\n UpdateOpcode.prototype.evaluate = function (vm) {\n var value = this.cache.revalidate(),\n bounds$$1,\n upsert,\n dom,\n cursor;\n if ((0, _reference2.isModified)(value)) {\n bounds$$1 = this.bounds, upsert = this.upsert;\n dom = vm.dom;\n\n\n if (!this.upsert.update(dom, value)) {\n cursor = new Cursor(bounds$$1.parentElement(), clear(bounds$$1));\n\n upsert = this.upsert = this.insert(vm.env.getAppendOperations(), cursor, value);\n }\n bounds$$1.update(upsert.bounds);\n }\n };\n\n UpdateOpcode.prototype.toJSON = function () {\n var guid = this._guid,\n type = this.type,\n cache = this.cache;\n\n return {\n details: { lastValue: JSON.stringify(cache.peek()) },\n guid: guid,\n type: type\n };\n };\n\n return UpdateOpcode;\n }(UpdatingOpcode);\n\n var OptimizedCautiousAppendOpcode = function (_AppendDynamicOpcode) {\n _inherits$6(OptimizedCautiousAppendOpcode, _AppendDynamicOpcode);\n\n function OptimizedCautiousAppendOpcode() {\n _classCallCheck$7(this, OptimizedCautiousAppendOpcode);\n\n var _this3 = _possibleConstructorReturn$6(this, _AppendDynamicOpcode.apply(this, arguments));\n\n _this3.type = 'optimized-cautious-append';\n return _this3;\n }\n\n OptimizedCautiousAppendOpcode.prototype.normalize = function (reference) {\n return (0, _reference2.map)(reference, normalizeValue);\n };\n\n OptimizedCautiousAppendOpcode.prototype.insert = function (dom, cursor, value) {\n return cautiousInsert(dom, cursor, value);\n };\n\n OptimizedCautiousAppendOpcode.prototype.updateWith = function (_vm, _reference, cache, bounds$$1, upsert) {\n return new OptimizedCautiousUpdateOpcode(cache, bounds$$1, upsert);\n };\n\n return OptimizedCautiousAppendOpcode;\n }(AppendDynamicOpcode);\n\n var OptimizedCautiousUpdateOpcode = function (_UpdateOpcode) {\n _inherits$6(OptimizedCautiousUpdateOpcode, _UpdateOpcode);\n\n function OptimizedCautiousUpdateOpcode() {\n _classCallCheck$7(this, OptimizedCautiousUpdateOpcode);\n\n var _this4 = _possibleConstructorReturn$6(this, _UpdateOpcode.apply(this, arguments));\n\n _this4.type = 'optimized-cautious-update';\n return _this4;\n }\n\n OptimizedCautiousUpdateOpcode.prototype.insert = function (dom, cursor, value) {\n return cautiousInsert(dom, cursor, value);\n };\n\n return OptimizedCautiousUpdateOpcode;\n }(UpdateOpcode);\n\n var OptimizedTrustingAppendOpcode = function (_AppendDynamicOpcode2) {\n _inherits$6(OptimizedTrustingAppendOpcode, _AppendDynamicOpcode2);\n\n function OptimizedTrustingAppendOpcode() {\n _classCallCheck$7(this, OptimizedTrustingAppendOpcode);\n\n var _this5 = _possibleConstructorReturn$6(this, _AppendDynamicOpcode2.apply(this, arguments));\n\n _this5.type = 'optimized-trusting-append';\n return _this5;\n }\n\n OptimizedTrustingAppendOpcode.prototype.normalize = function (reference) {\n return (0, _reference2.map)(reference, normalizeTrustedValue);\n };\n\n OptimizedTrustingAppendOpcode.prototype.insert = function (dom, cursor, value) {\n return trustingInsert(dom, cursor, value);\n };\n\n OptimizedTrustingAppendOpcode.prototype.updateWith = function (_vm, _reference, cache, bounds$$1, upsert) {\n return new OptimizedTrustingUpdateOpcode(cache, bounds$$1, upsert);\n };\n\n return OptimizedTrustingAppendOpcode;\n }(AppendDynamicOpcode);\n\n var OptimizedTrustingUpdateOpcode = function (_UpdateOpcode2) {\n _inherits$6(OptimizedTrustingUpdateOpcode, _UpdateOpcode2);\n\n function OptimizedTrustingUpdateOpcode() {\n _classCallCheck$7(this, OptimizedTrustingUpdateOpcode);\n\n var _this6 = _possibleConstructorReturn$6(this, _UpdateOpcode2.apply(this, arguments));\n\n _this6.type = 'optimized-trusting-update';\n return _this6;\n }\n\n OptimizedTrustingUpdateOpcode.prototype.insert = function (dom, cursor, value) {\n return trustingInsert(dom, cursor, value);\n };\n\n return OptimizedTrustingUpdateOpcode;\n }(UpdateOpcode);\n\n function _classCallCheck$12(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n /* tslint:disable */\n function debugCallback(context, get) {\n console.info('Use `context`, and `get(<path>)` to debug this template.');\n // for example...\n context === get('this');\n debugger;\n }\n /* tslint:enable */\n var callback = debugCallback;\n // For testing purposes\n\n\n var ScopeInspector = function () {\n function ScopeInspector(scope, symbols, evalInfo) {\n var i, slot, name, ref;\n\n _classCallCheck$12(this, ScopeInspector);\n\n this.scope = scope;\n this.locals = (0, _util.dict)();\n for (i = 0; i < evalInfo.length; i++) {\n slot = evalInfo[i];\n name = symbols[slot - 1];\n ref = scope.getSymbol(slot);\n\n this.locals[name] = ref;\n }\n }\n\n ScopeInspector.prototype.get = function (path) {\n var scope = this.scope,\n locals = this.locals;\n\n var parts = path.split('.');\n\n var _path$split = path.split('.'),\n head = _path$split[0],\n tail = _path$split.slice(1);\n\n var evalScope = scope.getEvalScope();\n var ref = void 0;\n if (head === 'this') {\n ref = scope.getSelf();\n } else if (locals[head]) {\n ref = locals[head];\n } else if (head.indexOf('@') === 0 && evalScope[head]) {\n ref = evalScope[head];\n } else {\n ref = this.scope.getSelf();\n tail = parts;\n }\n return tail.reduce(function (r, part) {\n return r.get(part);\n }, ref);\n };\n\n return ScopeInspector;\n }();\n\n APPEND_OPCODES.add(71 /* Debugger */, function (vm, _ref) {\n var _symbols = _ref.op1,\n _evalInfo = _ref.op2;\n\n var symbols = vm.constants.getOther(_symbols);\n var evalInfo = vm.constants.getArray(_evalInfo);\n var inspector = new ScopeInspector(vm.scope(), symbols, evalInfo);\n callback(vm.getSelf().value(), function (path) {\n return inspector.get(path).value();\n });\n });\n\n APPEND_OPCODES.add(69 /* GetPartialTemplate */, function (vm) {\n var stack = vm.stack;\n var definition = stack.pop();\n stack.push(definition.value().template.asPartial());\n });\n\n function _classCallCheck$13(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var IterablePresenceReference = function () {\n function IterablePresenceReference(artifacts) {\n _classCallCheck$13(this, IterablePresenceReference);\n\n this.tag = artifacts.tag;\n this.artifacts = artifacts;\n }\n\n IterablePresenceReference.prototype.value = function () {\n return !this.artifacts.isEmpty();\n };\n\n return IterablePresenceReference;\n }();\n\n APPEND_OPCODES.add(54 /* PutIterator */, function (vm) {\n var stack = vm.stack;\n var listRef = stack.pop();\n var key = stack.pop();\n var iterable = vm.env.iterableFor(listRef, key.value());\n var iterator = new _reference2.ReferenceIterator(iterable);\n stack.push(iterator);\n stack.push(new IterablePresenceReference(iterator.artifacts));\n });\n APPEND_OPCODES.add(52 /* EnterList */, function (vm, _ref) {\n var relativeStart = _ref.op1;\n\n vm.enterList(relativeStart);\n });\n APPEND_OPCODES.add(53 /* ExitList */, function (vm) {\n return vm.exitList();\n });\n APPEND_OPCODES.add(55 /* Iterate */, function (vm, _ref2) {\n var breaks = _ref2.op1,\n tryOpcode;\n\n var stack = vm.stack;\n var item = stack.peek().next();\n if (item) {\n tryOpcode = vm.iterate(item.memo, item.value);\n\n vm.enterItem(item.key, tryOpcode);\n } else {\n vm.goto(breaks);\n }\n });\n\n var Ops$2;\n (function (Ops$$1) {\n Ops$$1[Ops$$1[\"OpenComponentElement\"] = 0] = \"OpenComponentElement\";\n Ops$$1[Ops$$1[\"DidCreateElement\"] = 1] = \"DidCreateElement\";\n Ops$$1[Ops$$1[\"DidRenderLayout\"] = 2] = \"DidRenderLayout\";\n Ops$$1[Ops$$1[\"FunctionExpression\"] = 3] = \"FunctionExpression\";\n })(Ops$2 || (Ops$2 = {}));\n\n function _classCallCheck$17(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var CompiledStaticTemplate = function CompiledStaticTemplate(handle) {\n _classCallCheck$17(this, CompiledStaticTemplate);\n\n this.handle = handle;\n };\n var CompiledDynamicTemplate = function CompiledDynamicTemplate(handle, symbolTable) {\n _classCallCheck$17(this, CompiledDynamicTemplate);\n\n this.handle = handle;\n this.symbolTable = symbolTable;\n };\n\n var _createClass$2 = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _classCallCheck$20(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var ComponentLayoutBuilder = function () {\n function ComponentLayoutBuilder(env) {\n _classCallCheck$20(this, ComponentLayoutBuilder);\n\n this.env = env;\n }\n\n ComponentLayoutBuilder.prototype.wrapLayout = function (layout) {\n this.inner = new WrappedBuilder(this.env, layout);\n };\n\n ComponentLayoutBuilder.prototype.fromLayout = function (componentName, layout) {\n this.inner = new UnwrappedBuilder(this.env, componentName, layout);\n };\n\n ComponentLayoutBuilder.prototype.compile = function () {\n return this.inner.compile();\n };\n\n _createClass$2(ComponentLayoutBuilder, [{\n key: 'tag',\n get: function () {\n return this.inner.tag;\n }\n }, {\n key: 'attrs',\n get: function () {\n return this.inner.attrs;\n }\n }]);\n\n return ComponentLayoutBuilder;\n }();\n\n var WrappedBuilder = function () {\n function WrappedBuilder(env, layout) {\n _classCallCheck$20(this, WrappedBuilder);\n\n this.env = env;\n this.layout = layout;\n this.tag = new ComponentTagBuilder();\n this.attrs = new ComponentAttrsBuilder();\n }\n\n WrappedBuilder.prototype.compile = function () {\n //========DYNAMIC\n // PutValue(TagExpr)\n // Test\n // JumpUnless(BODY)\n // OpenDynamicPrimitiveElement\n // DidCreateElement\n // ...attr statements...\n // FlushElement\n // BODY: Noop\n // ...body statements...\n // PutValue(TagExpr)\n // Test\n // JumpUnless(END)\n // CloseElement\n // END: Noop\n // DidRenderLayout\n // Exit\n //\n //========STATIC\n // OpenPrimitiveElementOpcode\n // DidCreateElement\n // ...attr statements...\n // FlushElement\n // ...body statements...\n // CloseElement\n // DidRenderLayout\n // Exit\n var env = this.env,\n layout = this.layout,\n attrs,\n i;\n\n var meta = { templateMeta: layout.meta, symbols: layout.symbols, asPartial: false };\n var dynamicTag = this.tag.getDynamic();\n var staticTag = this.tag.getStatic();\n var b = builder(env, meta);\n b.startLabels();\n if (dynamicTag) {\n b.fetch(Register.s1);\n expr(dynamicTag, b);\n b.dup();\n b.load(Register.s1);\n b.test('simple');\n b.jumpUnless('BODY');\n b.fetch(Register.s1);\n b.pushComponentOperations();\n b.openDynamicElement();\n } else if (staticTag) {\n b.pushComponentOperations();\n b.openElementWithOperations(staticTag);\n }\n if (dynamicTag || staticTag) {\n b.didCreateElement(Register.s0);\n attrs = this.attrs.buffer;\n\n for (i = 0; i < attrs.length; i++) {\n compileStatement(attrs[i], b);\n }\n b.flushElement();\n }\n b.label('BODY');\n b.invokeStatic(layout.asBlock());\n if (dynamicTag) {\n b.fetch(Register.s1);\n b.test('simple');\n b.jumpUnless('END');\n b.closeElement();\n } else if (staticTag) {\n b.closeElement();\n }\n b.label('END');\n b.didRenderLayout(Register.s0);\n if (dynamicTag) {\n b.load(Register.s1);\n }\n b.stopLabels();\n var start = b.start;\n b.finalize();\n\n return new CompiledDynamicTemplate(start, {\n meta: meta,\n hasEval: layout.hasEval,\n symbols: layout.symbols.concat([ATTRS_BLOCK])\n });\n };\n\n return WrappedBuilder;\n }();\n\n var UnwrappedBuilder = function () {\n function UnwrappedBuilder(env, componentName, layout) {\n _classCallCheck$20(this, UnwrappedBuilder);\n\n this.env = env;\n this.componentName = componentName;\n this.layout = layout;\n this.attrs = new ComponentAttrsBuilder();\n }\n\n UnwrappedBuilder.prototype.compile = function () {\n var env = this.env,\n layout = this.layout;\n\n return layout.asLayout(this.componentName, this.attrs.buffer).compileDynamic(env);\n };\n\n _createClass$2(UnwrappedBuilder, [{\n key: 'tag',\n get: function () {\n throw new Error('BUG: Cannot call `tag` on an UnwrappedBuilder');\n }\n }]);\n\n return UnwrappedBuilder;\n }();\n\n var ComponentTagBuilder = function () {\n function ComponentTagBuilder() {\n _classCallCheck$20(this, ComponentTagBuilder);\n\n this.isDynamic = null;\n this.isStatic = null;\n this.staticTagName = null;\n this.dynamicTagName = null;\n }\n\n ComponentTagBuilder.prototype.getDynamic = function () {\n if (this.isDynamic) {\n return this.dynamicTagName;\n }\n };\n\n ComponentTagBuilder.prototype.getStatic = function () {\n if (this.isStatic) {\n return this.staticTagName;\n }\n };\n\n ComponentTagBuilder.prototype.static = function (tagName) {\n this.isStatic = true;\n this.staticTagName = tagName;\n };\n\n ComponentTagBuilder.prototype.dynamic = function (tagName) {\n this.isDynamic = true;\n this.dynamicTagName = [_wireFormat.Ops.ClientSideExpression, Ops$2.FunctionExpression, tagName];\n };\n\n return ComponentTagBuilder;\n }();\n\n var ComponentAttrsBuilder = function () {\n function ComponentAttrsBuilder() {\n _classCallCheck$20(this, ComponentAttrsBuilder);\n\n this.buffer = [];\n }\n\n ComponentAttrsBuilder.prototype.static = function (name, value) {\n this.buffer.push([_wireFormat.Ops.StaticAttr, name, value, null]);\n };\n\n ComponentAttrsBuilder.prototype.dynamic = function (name, value) {\n this.buffer.push([_wireFormat.Ops.DynamicAttr, name, [_wireFormat.Ops.ClientSideExpression, Ops$2.FunctionExpression, value], null]);\n };\n\n return ComponentAttrsBuilder;\n }();\n\n var ComponentBuilder = function () {\n function ComponentBuilder(builder) {\n _classCallCheck$20(this, ComponentBuilder);\n\n this.builder = builder;\n this.env = builder.env;\n }\n\n ComponentBuilder.prototype.static = function (definition, args) {\n var params = args[0],\n hash = args[1],\n _default = args[2],\n inverse = args[3];\n var builder = this.builder;\n\n builder.pushComponentManager(definition);\n builder.invokeComponent(null, params, hash, _default, inverse);\n };\n\n ComponentBuilder.prototype.dynamic = function (definitionArgs, getDefinition, args) {\n var params = args[0],\n hash = args[1],\n block = args[2],\n inverse = args[3];\n var builder = this.builder;\n\n if (!definitionArgs || definitionArgs.length === 0) {\n throw new Error(\"Dynamic syntax without an argument\");\n }\n var meta = this.builder.meta.templateMeta;\n\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n builder.compileArgs(definitionArgs[0], definitionArgs[1], true);\n builder.helper(function (vm, a) {\n return getDefinition(vm, a, meta);\n });\n builder.dup();\n builder.test('simple');\n builder.enter(2);\n builder.jumpUnless('ELSE');\n builder.pushDynamicComponentManager();\n builder.invokeComponent(null, params, hash, block, inverse);\n builder.label('ELSE');\n builder.exit();\n builder.return();\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n };\n\n return ComponentBuilder;\n }();\n function builder(env, meta) {\n return new OpcodeBuilder(env, meta);\n }\n\n function _classCallCheck$21(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var RawInlineBlock = function () {\n function RawInlineBlock(meta, statements, parameters) {\n _classCallCheck$21(this, RawInlineBlock);\n\n this.meta = meta;\n this.statements = statements;\n this.parameters = parameters;\n }\n\n RawInlineBlock.prototype.scan = function () {\n return new CompilableTemplate(this.statements, { parameters: this.parameters, meta: this.meta });\n };\n\n return RawInlineBlock;\n }();\n\n var _createClass$1 = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _defaults$9(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$9(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$9(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$9(subClass, superClass);\n }\n\n function _classCallCheck$19(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Labels = function () {\n function Labels() {\n _classCallCheck$19(this, Labels);\n\n this.labels = (0, _util.dict)();\n this.targets = [];\n }\n\n Labels.prototype.label = function (name, index) {\n this.labels[name] = index;\n };\n\n Labels.prototype.target = function (at, Target, _target) {\n this.targets.push({ at: at, Target: Target, target: _target });\n };\n\n Labels.prototype.patch = function (program) {\n var targets = this.targets,\n labels = this.labels,\n i,\n _targets$i,\n at,\n target,\n goto;\n\n for (i = 0; i < targets.length; i++) {\n _targets$i = targets[i], at = _targets$i.at, target = _targets$i.target;\n goto = labels[target] - at;\n\n program.heap.setbyaddr(at + 1, goto);\n }\n };\n\n return Labels;\n }();\n\n var BasicOpcodeBuilder = function () {\n function BasicOpcodeBuilder(env, meta, program) {\n _classCallCheck$19(this, BasicOpcodeBuilder);\n\n this.env = env;\n this.meta = meta;\n this.program = program;\n this.labelsStack = new _util.Stack();\n this.constants = program.constants;\n this.heap = program.heap;\n this.start = this.heap.malloc();\n }\n\n BasicOpcodeBuilder.prototype.upvars = function (count) {\n return (0, _util.fillNulls)(count);\n };\n\n BasicOpcodeBuilder.prototype.reserve = function (name) {\n this.push(name, 0, 0, 0);\n };\n\n BasicOpcodeBuilder.prototype.push = function (name) {\n var op1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var op2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var op3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\n this.heap.push(name);\n this.heap.push(op1);\n this.heap.push(op2);\n this.heap.push(op3);\n };\n\n BasicOpcodeBuilder.prototype.finalize = function () {\n this.push(22 /* Return */);\n this.heap.finishMalloc(this.start);\n return this.start;\n };\n // args\n\n\n BasicOpcodeBuilder.prototype.pushArgs = function (synthetic) {\n this.push(58 /* PushArgs */, synthetic === true ? 1 : 0);\n };\n // helpers\n\n\n BasicOpcodeBuilder.prototype.startLabels = function () {\n this.labelsStack.push(new Labels());\n };\n\n BasicOpcodeBuilder.prototype.stopLabels = function () {\n var label = this.labelsStack.pop();\n label.patch(this.program);\n };\n // components\n\n\n BasicOpcodeBuilder.prototype.pushComponentManager = function (definition) {\n this.push(56 /* PushComponentManager */, this.other(definition));\n };\n\n BasicOpcodeBuilder.prototype.pushDynamicComponentManager = function () {\n this.push(57 /* PushDynamicComponentManager */);\n };\n\n BasicOpcodeBuilder.prototype.prepareArgs = function (state) {\n this.push(59 /* PrepareArgs */, state);\n };\n\n BasicOpcodeBuilder.prototype.createComponent = function (state, hasDefault, hasInverse) {\n var flag = (hasDefault === true ? 1 : 0) | (hasInverse === true ? 1 : 0) << 1;\n this.push(60 /* CreateComponent */, flag, state);\n };\n\n BasicOpcodeBuilder.prototype.registerComponentDestructor = function (state) {\n this.push(61 /* RegisterComponentDestructor */, state);\n };\n\n BasicOpcodeBuilder.prototype.beginComponentTransaction = function () {\n this.push(65 /* BeginComponentTransaction */);\n };\n\n BasicOpcodeBuilder.prototype.commitComponentTransaction = function () {\n this.push(66 /* CommitComponentTransaction */);\n };\n\n BasicOpcodeBuilder.prototype.pushComponentOperations = function () {\n this.push(62 /* PushComponentOperations */);\n };\n\n BasicOpcodeBuilder.prototype.getComponentSelf = function (state) {\n this.push(63 /* GetComponentSelf */, state);\n };\n\n BasicOpcodeBuilder.prototype.getComponentLayout = function (state) {\n this.push(64 /* GetComponentLayout */, state);\n };\n\n BasicOpcodeBuilder.prototype.didCreateElement = function (state) {\n this.push(67 /* DidCreateElement */, state);\n };\n\n BasicOpcodeBuilder.prototype.didRenderLayout = function (state) {\n this.push(68 /* DidRenderLayout */, state);\n };\n // partial\n\n\n BasicOpcodeBuilder.prototype.getPartialTemplate = function () {\n this.push(69 /* GetPartialTemplate */);\n };\n\n BasicOpcodeBuilder.prototype.resolveMaybeLocal = function (name) {\n this.push(70 /* ResolveMaybeLocal */, this.string(name));\n };\n // debugger\n\n\n BasicOpcodeBuilder.prototype.debugger = function (symbols, evalInfo) {\n this.push(71 /* Debugger */, this.constants.other(symbols), this.constants.array(evalInfo));\n };\n // content\n\n\n BasicOpcodeBuilder.prototype.dynamicContent = function (Opcode) {\n this.push(26 /* DynamicContent */, this.other(Opcode));\n };\n\n BasicOpcodeBuilder.prototype.cautiousAppend = function () {\n this.dynamicContent(new OptimizedCautiousAppendOpcode());\n };\n\n BasicOpcodeBuilder.prototype.trustingAppend = function () {\n this.dynamicContent(new OptimizedTrustingAppendOpcode());\n };\n // dom\n\n\n BasicOpcodeBuilder.prototype.text = function (_text) {\n this.push(24 /* Text */, this.constants.string(_text));\n };\n\n BasicOpcodeBuilder.prototype.openPrimitiveElement = function (tag) {\n this.push(27 /* OpenElement */, this.constants.string(tag));\n };\n\n BasicOpcodeBuilder.prototype.openElementWithOperations = function (tag) {\n this.push(28 /* OpenElementWithOperations */, this.constants.string(tag));\n };\n\n BasicOpcodeBuilder.prototype.openDynamicElement = function () {\n this.push(29 /* OpenDynamicElement */);\n };\n\n BasicOpcodeBuilder.prototype.flushElement = function () {\n this.push(33 /* FlushElement */);\n };\n\n BasicOpcodeBuilder.prototype.closeElement = function () {\n this.push(34 /* CloseElement */);\n };\n\n BasicOpcodeBuilder.prototype.staticAttr = function (_name, _namespace, _value) {\n var name = this.constants.string(_name);\n var namespace = _namespace ? this.constants.string(_namespace) : 0;\n var value = this.constants.string(_value);\n this.push(30 /* StaticAttr */, name, value, namespace);\n };\n\n BasicOpcodeBuilder.prototype.dynamicAttrNS = function (_name, _namespace, trusting) {\n var name = this.constants.string(_name);\n var namespace = this.constants.string(_namespace);\n this.push(32 /* DynamicAttrNS */, name, namespace, trusting === true ? 1 : 0);\n };\n\n BasicOpcodeBuilder.prototype.dynamicAttr = function (_name, trusting) {\n var name = this.constants.string(_name);\n this.push(31 /* DynamicAttr */, name, trusting === true ? 1 : 0);\n };\n\n BasicOpcodeBuilder.prototype.comment = function (_comment) {\n var comment = this.constants.string(_comment);\n this.push(25 /* Comment */, comment);\n };\n\n BasicOpcodeBuilder.prototype.modifier = function (_definition) {\n this.push(35 /* Modifier */, this.other(_definition));\n };\n // lists\n\n\n BasicOpcodeBuilder.prototype.putIterator = function () {\n this.push(54 /* PutIterator */);\n };\n\n BasicOpcodeBuilder.prototype.enterList = function (start) {\n this.reserve(52 /* EnterList */);\n this.labels.target(this.pos, 52 /* EnterList */, start);\n };\n\n BasicOpcodeBuilder.prototype.exitList = function () {\n this.push(53 /* ExitList */);\n };\n\n BasicOpcodeBuilder.prototype.iterate = function (breaks) {\n this.reserve(55 /* Iterate */);\n this.labels.target(this.pos, 55 /* Iterate */, breaks);\n };\n // expressions\n\n\n BasicOpcodeBuilder.prototype.setVariable = function (symbol) {\n this.push(4 /* SetVariable */, symbol);\n };\n\n BasicOpcodeBuilder.prototype.getVariable = function (symbol) {\n this.push(5 /* GetVariable */, symbol);\n };\n\n BasicOpcodeBuilder.prototype.getProperty = function (key) {\n this.push(6 /* GetProperty */, this.string(key));\n };\n\n BasicOpcodeBuilder.prototype.getBlock = function (symbol) {\n this.push(8 /* GetBlock */, symbol);\n };\n\n BasicOpcodeBuilder.prototype.hasBlock = function (symbol) {\n this.push(9 /* HasBlock */, symbol);\n };\n\n BasicOpcodeBuilder.prototype.hasBlockParams = function (symbol) {\n this.push(10 /* HasBlockParams */, symbol);\n };\n\n BasicOpcodeBuilder.prototype.concat = function (size) {\n this.push(11 /* Concat */, size);\n };\n\n BasicOpcodeBuilder.prototype.function = function (f) {\n this.push(2 /* Function */, this.func(f));\n };\n\n BasicOpcodeBuilder.prototype.load = function (register) {\n this.push(17 /* Load */, register);\n };\n\n BasicOpcodeBuilder.prototype.fetch = function (register) {\n this.push(18 /* Fetch */, register);\n };\n\n BasicOpcodeBuilder.prototype.dup = function () {\n var register = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Register.sp;\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n return this.push(15 /* Dup */, register, offset);\n };\n\n BasicOpcodeBuilder.prototype.pop = function () {\n var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n\n return this.push(16 /* Pop */, count);\n };\n // vm\n\n\n BasicOpcodeBuilder.prototype.pushRemoteElement = function () {\n this.push(36 /* PushRemoteElement */);\n };\n\n BasicOpcodeBuilder.prototype.popRemoteElement = function () {\n this.push(37 /* PopRemoteElement */);\n };\n\n BasicOpcodeBuilder.prototype.label = function (name) {\n this.labels.label(name, this.nextPos);\n };\n\n BasicOpcodeBuilder.prototype.pushRootScope = function (symbols, bindCallerScope) {\n this.push(19 /* RootScope */, symbols, bindCallerScope ? 1 : 0);\n };\n\n BasicOpcodeBuilder.prototype.pushChildScope = function () {\n this.push(20 /* ChildScope */);\n };\n\n BasicOpcodeBuilder.prototype.popScope = function () {\n this.push(21 /* PopScope */);\n };\n\n BasicOpcodeBuilder.prototype.returnTo = function (label) {\n this.reserve(23 /* ReturnTo */);\n this.labels.target(this.pos, 23 /* ReturnTo */, label);\n };\n\n BasicOpcodeBuilder.prototype.pushDynamicScope = function () {\n this.push(39 /* PushDynamicScope */);\n };\n\n BasicOpcodeBuilder.prototype.popDynamicScope = function () {\n this.push(40 /* PopDynamicScope */);\n };\n\n BasicOpcodeBuilder.prototype.pushImmediate = function (value) {\n this.push(13 /* Constant */, this.other(value));\n };\n\n BasicOpcodeBuilder.prototype.primitive = function (_primitive) {\n var flag = 0;\n var primitive = void 0;\n switch (typeof _primitive) {\n case 'number':\n if (_primitive % 1 === 0 && _primitive > 0) {\n primitive = _primitive;\n } else {\n primitive = this.float(_primitive);\n flag = 1;\n }\n break;\n case 'string':\n primitive = this.string(_primitive);\n flag = 2;\n break;\n case 'boolean':\n primitive = _primitive | 0;\n flag = 3;\n break;\n case 'object':\n // assume null\n primitive = 2;\n flag = 3;\n break;\n case 'undefined':\n primitive = 3;\n flag = 3;\n break;\n default:\n throw new Error('Invalid primitive passed to pushPrimitive');\n }\n this.push(14 /* PrimitiveReference */, flag << 30 | primitive);\n };\n\n BasicOpcodeBuilder.prototype.helper = function (func) {\n this.push(1 /* Helper */, this.func(func));\n };\n\n BasicOpcodeBuilder.prototype.pushBlock = function (block) {\n this.push(7 /* PushBlock */, this.block(block));\n };\n\n BasicOpcodeBuilder.prototype.bindDynamicScope = function (_names) {\n this.push(38 /* BindDynamicScope */, this.names(_names));\n };\n\n BasicOpcodeBuilder.prototype.enter = function (args) {\n this.push(49 /* Enter */, args);\n };\n\n BasicOpcodeBuilder.prototype.exit = function () {\n this.push(50 /* Exit */);\n };\n\n BasicOpcodeBuilder.prototype.return = function () {\n this.push(22 /* Return */);\n };\n\n BasicOpcodeBuilder.prototype.pushFrame = function () {\n this.push(47 /* PushFrame */);\n };\n\n BasicOpcodeBuilder.prototype.popFrame = function () {\n this.push(48 /* PopFrame */);\n };\n\n BasicOpcodeBuilder.prototype.compileDynamicBlock = function () {\n this.push(41 /* CompileDynamicBlock */);\n };\n\n BasicOpcodeBuilder.prototype.invokeDynamic = function (invoker) {\n this.push(43 /* InvokeDynamic */, this.other(invoker));\n };\n\n BasicOpcodeBuilder.prototype.invokeStatic = function (block) {\n var callerCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0,\n i;\n var parameters = block.symbolTable.parameters;\n\n var calleeCount = parameters.length;\n var count = Math.min(callerCount, calleeCount);\n this.pushFrame();\n if (count) {\n this.pushChildScope();\n for (i = 0; i < count; i++) {\n this.dup(Register.fp, callerCount - i);\n this.setVariable(parameters[i]);\n }\n }\n var _block = this.constants.block(block);\n this.push(42 /* InvokeStatic */, _block);\n if (count) {\n this.popScope();\n }\n this.popFrame();\n };\n\n BasicOpcodeBuilder.prototype.test = function (testFunc) {\n var _func = void 0;\n if (testFunc === 'const') {\n _func = ConstTest;\n } else if (testFunc === 'simple') {\n _func = SimpleTest;\n } else if (testFunc === 'environment') {\n _func = EnvironmentTest;\n } else if (typeof testFunc === 'function') {\n _func = testFunc;\n } else {\n throw new Error('unreachable');\n }\n var func = this.constants.function(_func);\n this.push(51 /* Test */, func);\n };\n\n BasicOpcodeBuilder.prototype.jump = function (target) {\n this.reserve(44 /* Jump */);\n this.labels.target(this.pos, 44 /* Jump */, target);\n };\n\n BasicOpcodeBuilder.prototype.jumpIf = function (target) {\n this.reserve(45 /* JumpIf */);\n this.labels.target(this.pos, 45 /* JumpIf */, target);\n };\n\n BasicOpcodeBuilder.prototype.jumpUnless = function (target) {\n this.reserve(46 /* JumpUnless */);\n this.labels.target(this.pos, 46 /* JumpUnless */, target);\n };\n\n BasicOpcodeBuilder.prototype.string = function (_string) {\n return this.constants.string(_string);\n };\n\n BasicOpcodeBuilder.prototype.float = function (num) {\n return this.constants.float(num);\n };\n\n BasicOpcodeBuilder.prototype.names = function (_names) {\n var names = [],\n i,\n n;\n for (i = 0; i < _names.length; i++) {\n n = _names[i];\n\n names[i] = this.constants.string(n);\n }\n return this.constants.array(names);\n };\n\n BasicOpcodeBuilder.prototype.symbols = function (_symbols) {\n return this.constants.array(_symbols);\n };\n\n BasicOpcodeBuilder.prototype.other = function (value) {\n return this.constants.other(value);\n };\n\n BasicOpcodeBuilder.prototype.block = function (_block2) {\n return _block2 ? this.constants.block(_block2) : 0;\n };\n\n BasicOpcodeBuilder.prototype.func = function (_func2) {\n return this.constants.function(_func2);\n };\n\n _createClass$1(BasicOpcodeBuilder, [{\n key: 'pos',\n get: function () {\n return (0, _util.typePos)(this.heap.size());\n }\n }, {\n key: 'nextPos',\n get: function () {\n return this.heap.size();\n }\n }, {\n key: 'labels',\n get: function () {\n return this.labelsStack.current;\n }\n }]);\n\n return BasicOpcodeBuilder;\n }();\n\n function isCompilableExpression(expr$$1) {\n return typeof expr$$1 === 'object' && expr$$1 !== null && typeof expr$$1.compile === 'function';\n }\n\n var OpcodeBuilder = function (_BasicOpcodeBuilder) {\n _inherits$9(OpcodeBuilder, _BasicOpcodeBuilder);\n\n function OpcodeBuilder(env, meta) {\n var program = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : env.program;\n\n _classCallCheck$19(this, OpcodeBuilder);\n\n var _this = _possibleConstructorReturn$9(this, _BasicOpcodeBuilder.call(this, env, meta, program));\n\n _this.component = new ComponentBuilder(_this);\n return _this;\n }\n\n OpcodeBuilder.prototype.compileArgs = function (params, hash, synthetic) {\n var positional = 0,\n i,\n val,\n _i;\n if (params) {\n for (i = 0; i < params.length; i++) {\n expr(params[i], this);\n }\n positional = params.length;\n }\n this.pushImmediate(positional);\n var names = _util.EMPTY_ARRAY;\n if (hash) {\n names = hash[0];\n val = hash[1];\n\n for (_i = 0; _i < val.length; _i++) {\n expr(val[_i], this);\n }\n }\n this.pushImmediate(names);\n this.pushArgs(synthetic);\n };\n\n OpcodeBuilder.prototype.compile = function (expr$$1) {\n if (isCompilableExpression(expr$$1)) {\n return expr$$1.compile(this);\n } else {\n return expr$$1;\n }\n };\n\n OpcodeBuilder.prototype.guardedAppend = function (expression, trusting) {\n this.startLabels();\n this.pushFrame();\n this.returnTo('END');\n expr(expression, this);\n this.dup();\n this.test(function (reference) {\n return IsComponentDefinitionReference.create(reference);\n });\n this.enter(2);\n this.jumpUnless('ELSE');\n this.pushDynamicComponentManager();\n this.invokeComponent(null, null, null, null, null);\n this.exit();\n this.return();\n this.label('ELSE');\n if (trusting) {\n this.trustingAppend();\n } else {\n this.cautiousAppend();\n }\n this.exit();\n this.return();\n this.label('END');\n this.popFrame();\n this.stopLabels();\n };\n\n OpcodeBuilder.prototype.invokeComponent = function (attrs, params, hash, block) {\n var inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n\n this.fetch(Register.s0);\n this.dup(Register.sp, 1);\n this.load(Register.s0);\n this.pushBlock(block);\n this.pushBlock(inverse);\n this.compileArgs(params, hash, false);\n this.prepareArgs(Register.s0);\n this.beginComponentTransaction();\n this.pushDynamicScope();\n this.createComponent(Register.s0, block !== null, inverse !== null);\n this.registerComponentDestructor(Register.s0);\n this.getComponentSelf(Register.s0);\n this.getComponentLayout(Register.s0);\n this.invokeDynamic(new InvokeDynamicLayout(attrs && attrs.scan()));\n this.popFrame();\n this.popScope();\n this.popDynamicScope();\n this.commitComponentTransaction();\n this.load(Register.s0);\n };\n\n OpcodeBuilder.prototype.template = function (block) {\n if (!block) return null;\n return new RawInlineBlock(this.meta, block.statements, block.parameters);\n };\n\n return OpcodeBuilder;\n }(BasicOpcodeBuilder);\n\n function _classCallCheck$18(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Ops$3 = _wireFormat.Ops;\n var ATTRS_BLOCK = '&attrs';\n\n var Compilers = function () {\n function Compilers() {\n var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n _classCallCheck$18(this, Compilers);\n\n this.offset = offset;\n this.names = (0, _util.dict)();\n this.funcs = [];\n }\n\n Compilers.prototype.add = function (name, func) {\n this.funcs.push(func);\n this.names[name] = this.funcs.length - 1;\n };\n\n Compilers.prototype.compile = function (sexp, builder) {\n var name = sexp[this.offset];\n var index = this.names[name];\n var func = this.funcs[index];\n (0, _util.assert)(!!func, 'expected an implementation for ' + (this.offset === 0 ? Ops$3[sexp[0]] : Ops$2[sexp[1]]));\n func(sexp, builder);\n };\n\n return Compilers;\n }();\n\n var STATEMENTS = new Compilers();\n var CLIENT_SIDE = new Compilers(1);\n STATEMENTS.add(Ops$3.Text, function (sexp, builder) {\n builder.text(sexp[1]);\n });\n STATEMENTS.add(Ops$3.Comment, function (sexp, builder) {\n builder.comment(sexp[1]);\n });\n STATEMENTS.add(Ops$3.CloseElement, function (_sexp, builder) {\n builder.closeElement();\n });\n STATEMENTS.add(Ops$3.FlushElement, function (_sexp, builder) {\n builder.flushElement();\n });\n STATEMENTS.add(Ops$3.Modifier, function (sexp, builder) {\n var env = builder.env,\n meta = builder.meta;\n var name = sexp[1],\n params = sexp[2],\n hash = sexp[3];\n\n if (env.hasModifier(name, meta.templateMeta)) {\n builder.compileArgs(params, hash, true);\n builder.modifier(env.lookupModifier(name, meta.templateMeta));\n } else {\n throw new Error('Compile Error ' + name + ' is not a modifier: Helpers may not be used in the element form.');\n }\n });\n STATEMENTS.add(Ops$3.StaticAttr, function (sexp, builder) {\n var name = sexp[1],\n value = sexp[2],\n namespace = sexp[3];\n\n builder.staticAttr(name, namespace, value);\n });\n STATEMENTS.add(Ops$3.DynamicAttr, function (sexp, builder) {\n dynamicAttr(sexp, false, builder);\n });\n STATEMENTS.add(Ops$3.TrustingAttr, function (sexp, builder) {\n dynamicAttr(sexp, true, builder);\n });\n function dynamicAttr(sexp, trusting, builder) {\n var name = sexp[1],\n value = sexp[2],\n namespace = sexp[3];\n\n expr(value, builder);\n if (namespace) {\n builder.dynamicAttrNS(name, namespace, trusting);\n } else {\n builder.dynamicAttr(name, trusting);\n }\n }\n STATEMENTS.add(Ops$3.OpenElement, function (sexp, builder) {\n builder.openPrimitiveElement(sexp[1]);\n });\n CLIENT_SIDE.add(Ops$2.OpenComponentElement, function (sexp, builder) {\n builder.pushComponentOperations();\n builder.openElementWithOperations(sexp[2]);\n });\n CLIENT_SIDE.add(Ops$2.DidCreateElement, function (_sexp, builder) {\n builder.didCreateElement(Register.s0);\n });\n CLIENT_SIDE.add(Ops$2.DidRenderLayout, function (_sexp, builder) {\n builder.didRenderLayout(Register.s0);\n });\n STATEMENTS.add(Ops$3.Append, function (sexp, builder) {\n var value = sexp[1],\n trusting = sexp[2];\n\n var _builder$env$macros = builder.env.macros(),\n inlines = _builder$env$macros.inlines;\n\n var returned = inlines.compile(sexp, builder) || value;\n if (returned === true) return;\n var isGet = E.isGet(value);\n var isMaybeLocal = E.isMaybeLocal(value);\n if (trusting) {\n builder.guardedAppend(value, true);\n } else {\n if (isGet || isMaybeLocal) {\n builder.guardedAppend(value, false);\n } else {\n expr(value, builder);\n builder.cautiousAppend();\n }\n }\n });\n STATEMENTS.add(Ops$3.Block, function (sexp, builder) {\n var name = sexp[1],\n params = sexp[2],\n hash = sexp[3],\n _template = sexp[4],\n _inverse = sexp[5];\n\n var template = builder.template(_template);\n var inverse = builder.template(_inverse);\n var templateBlock = template && template.scan();\n var inverseBlock = inverse && inverse.scan();\n\n var _builder$env$macros2 = builder.env.macros(),\n blocks = _builder$env$macros2.blocks;\n\n blocks.compile(name, params, hash, templateBlock, inverseBlock, builder);\n });\n var InvokeDynamicLayout = function () {\n function InvokeDynamicLayout(attrs) {\n _classCallCheck$18(this, InvokeDynamicLayout);\n\n this.attrs = attrs;\n }\n\n InvokeDynamicLayout.prototype.invoke = function (vm, layout) {\n var _layout$symbolTable = layout.symbolTable,\n symbols = _layout$symbolTable.symbols,\n hasEval = _layout$symbolTable.hasEval,\n i,\n symbol,\n value;\n\n var stack = vm.stack;\n var scope = vm.pushRootScope(symbols.length + 1, true);\n scope.bindSelf(stack.pop());\n scope.bindBlock(symbols.indexOf(ATTRS_BLOCK) + 1, this.attrs);\n var lookup = null;\n\n if (hasEval) {\n symbols.indexOf('$eval') + 1;\n lookup = (0, _util.dict)();\n }\n var callerNames = stack.pop();\n for (i = callerNames.length - 1; i >= 0; i--) {\n symbol = symbols.indexOf(callerNames[i]);\n value = stack.pop();\n\n if (symbol !== -1) scope.bindSymbol(symbol + 1, value);\n if (hasEval) lookup[callerNames[i]] = value;\n }\n var numPositionalArgs = stack.pop();\n (0, _util.assert)(typeof numPositionalArgs === 'number', '[BUG] Incorrect value of positional argument count found during invoke-dynamic-layout.');\n // Currently we don't support accessing positional args in templates, so just throw them away\n stack.pop(numPositionalArgs);\n var inverseSymbol = symbols.indexOf('&inverse');\n var inverse = stack.pop();\n if (inverseSymbol !== -1) {\n scope.bindBlock(inverseSymbol + 1, inverse);\n }\n if (lookup) lookup['&inverse'] = inverse;\n var defaultSymbol = symbols.indexOf('&default');\n var defaultBlock = stack.pop();\n if (defaultSymbol !== -1) {\n scope.bindBlock(defaultSymbol + 1, defaultBlock);\n }\n if (lookup) lookup['&default'] = defaultBlock;\n if (lookup) scope.bindEvalScope(lookup);\n vm.pushFrame();\n vm.call(layout.handle);\n };\n\n InvokeDynamicLayout.prototype.toJSON = function () {\n return { GlimmerDebug: '<invoke-dynamic-layout>' };\n };\n\n return InvokeDynamicLayout;\n }();\n STATEMENTS.add(Ops$3.Component, function (sexp, builder) {\n var tag = sexp[1],\n attrs = sexp[2],\n args = sexp[3],\n block = sexp[4],\n child,\n attrsBlock,\n definition,\n i,\n stmts,\n _i;\n\n if (builder.env.hasComponentDefinition(tag, builder.meta.templateMeta)) {\n child = builder.template(block);\n attrsBlock = new RawInlineBlock(builder.meta, attrs, _util.EMPTY_ARRAY);\n definition = builder.env.getComponentDefinition(tag, builder.meta.templateMeta);\n\n builder.pushComponentManager(definition);\n builder.invokeComponent(attrsBlock, null, args, child && child.scan());\n } else if (block && block.parameters.length) {\n throw new Error('Compile Error: Cannot find component ' + tag);\n } else {\n builder.openPrimitiveElement(tag);\n for (i = 0; i < attrs.length; i++) {\n STATEMENTS.compile(attrs[i], builder);\n }\n builder.flushElement();\n if (block) {\n stmts = block.statements;\n\n for (_i = 0; _i < stmts.length; _i++) {\n STATEMENTS.compile(stmts[_i], builder);\n }\n }\n builder.closeElement();\n }\n });\n var PartialInvoker = function () {\n function PartialInvoker(outerSymbols, evalInfo) {\n _classCallCheck$18(this, PartialInvoker);\n\n this.outerSymbols = outerSymbols;\n this.evalInfo = evalInfo;\n }\n\n PartialInvoker.prototype.invoke = function (vm, _partial) {\n var partial = _partial,\n i,\n slot,\n name,\n ref,\n _i2,\n _name,\n symbol,\n value;\n var partialSymbols = partial.symbolTable.symbols;\n var outerScope = vm.scope();\n var evalScope = outerScope.getEvalScope();\n var partialScope = vm.pushRootScope(partialSymbols.length, false);\n partialScope.bindCallerScope(outerScope.getCallerScope());\n partialScope.bindEvalScope(evalScope);\n partialScope.bindSelf(outerScope.getSelf());\n var evalInfo = this.evalInfo,\n outerSymbols = this.outerSymbols;\n\n var locals = Object.create(outerScope.getPartialMap());\n for (i = 0; i < evalInfo.length; i++) {\n slot = evalInfo[i];\n name = outerSymbols[slot - 1];\n ref = outerScope.getSymbol(slot);\n\n locals[name] = ref;\n }\n if (evalScope) {\n for (_i2 = 0; _i2 < partialSymbols.length; _i2++) {\n _name = partialSymbols[_i2];\n symbol = _i2 + 1;\n value = evalScope[_name];\n\n if (value !== undefined) partialScope.bind(symbol, value);\n }\n }\n partialScope.bindPartialMap(locals);\n vm.pushFrame();\n vm.call(partial.handle);\n };\n\n return PartialInvoker;\n }();\n STATEMENTS.add(Ops$3.Partial, function (sexp, builder) {\n var name = sexp[1],\n evalInfo = sexp[2];\n var _builder$meta = builder.meta,\n templateMeta = _builder$meta.templateMeta,\n symbols = _builder$meta.symbols;\n\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n expr(name, builder);\n builder.pushImmediate(1);\n builder.pushImmediate(_util.EMPTY_ARRAY);\n builder.pushArgs(true);\n builder.helper(function (vm, args) {\n var env = vm.env;\n\n var nameRef = args.positional.at(0);\n return (0, _reference2.map)(nameRef, function (n) {\n if (typeof n === 'string' && n) {\n if (!env.hasPartial(n, templateMeta)) {\n throw new Error('Could not find a partial named \"' + n + '\"');\n }\n return env.lookupPartial(n, templateMeta);\n } else if (n) {\n throw new Error('Could not find a partial named \"' + String(n) + '\"');\n } else {\n return null;\n }\n });\n });\n builder.dup();\n builder.test('simple');\n builder.enter(2);\n builder.jumpUnless('ELSE');\n builder.getPartialTemplate();\n builder.compileDynamicBlock();\n builder.invokeDynamic(new PartialInvoker(symbols, evalInfo));\n builder.popScope();\n builder.popFrame();\n builder.label('ELSE');\n builder.exit();\n builder.return();\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n\n var InvokeDynamicYield = function () {\n function InvokeDynamicYield(callerCount) {\n _classCallCheck$18(this, InvokeDynamicYield);\n\n this.callerCount = callerCount;\n }\n\n InvokeDynamicYield.prototype.invoke = function (vm, block) {\n var callerCount = this.callerCount,\n i;\n\n var stack = vm.stack;\n if (!block) {\n // To balance the pop{Frame,Scope}\n vm.pushFrame();\n vm.pushCallerScope();\n return;\n }\n var table = block.symbolTable;\n var locals = table.parameters; // always present in inline blocks\n var calleeCount = locals ? locals.length : 0;\n var count = Math.min(callerCount, calleeCount);\n vm.pushFrame();\n vm.pushCallerScope(calleeCount > 0);\n var scope = vm.scope();\n for (i = 0; i < count; i++) {\n scope.bindSymbol(locals[i], stack.fromBase(callerCount - i));\n }\n vm.call(block.handle);\n };\n\n InvokeDynamicYield.prototype.toJSON = function () {\n return { GlimmerDebug: '<invoke-dynamic-yield caller-count=' + this.callerCount + '>' };\n };\n\n return InvokeDynamicYield;\n }();\n\n STATEMENTS.add(Ops$3.Yield, function (sexp, builder) {\n var to = sexp[1],\n params = sexp[2];\n\n var count = compileList(params, builder);\n builder.getBlock(to);\n builder.compileDynamicBlock();\n builder.invokeDynamic(new InvokeDynamicYield(count));\n builder.popScope();\n builder.popFrame();\n if (count) {\n builder.pop(count);\n }\n });\n STATEMENTS.add(Ops$3.Debugger, function (sexp, builder) {\n var evalInfo = sexp[1];\n\n builder.debugger(builder.meta.symbols, evalInfo);\n });\n STATEMENTS.add(Ops$3.ClientSideStatement, function (sexp, builder) {\n CLIENT_SIDE.compile(sexp, builder);\n });\n var EXPRESSIONS = new Compilers();\n var CLIENT_SIDE_EXPRS = new Compilers(1);\n var E = _wireFormat.Expressions;\n function expr(expression, builder) {\n if (Array.isArray(expression)) {\n EXPRESSIONS.compile(expression, builder);\n } else {\n builder.primitive(expression);\n }\n }\n EXPRESSIONS.add(Ops$3.Unknown, function (sexp, builder) {\n var name = sexp[1];\n if (builder.env.hasHelper(name, builder.meta.templateMeta)) {\n EXPRESSIONS.compile([Ops$3.Helper, name, _util.EMPTY_ARRAY, null], builder);\n } else if (builder.meta.asPartial) {\n builder.resolveMaybeLocal(name);\n } else {\n builder.getVariable(0);\n builder.getProperty(name);\n }\n });\n EXPRESSIONS.add(Ops$3.Concat, function (sexp, builder) {\n var parts = sexp[1],\n i;\n for (i = 0; i < parts.length; i++) {\n expr(parts[i], builder);\n }\n builder.concat(parts.length);\n });\n CLIENT_SIDE_EXPRS.add(Ops$2.FunctionExpression, function (sexp, builder) {\n builder.function(sexp[2]);\n });\n EXPRESSIONS.add(Ops$3.Helper, function (sexp, builder) {\n var env = builder.env,\n meta = builder.meta;\n var name = sexp[1],\n params = sexp[2],\n hash = sexp[3];\n\n if (env.hasHelper(name, meta.templateMeta)) {\n builder.compileArgs(params, hash, true);\n builder.helper(env.lookupHelper(name, meta.templateMeta));\n } else {\n throw new Error('Compile Error: ' + name + ' is not a helper');\n }\n });\n EXPRESSIONS.add(Ops$3.Get, function (sexp, builder) {\n var head = sexp[1],\n path = sexp[2],\n i;\n\n builder.getVariable(head);\n for (i = 0; i < path.length; i++) {\n builder.getProperty(path[i]);\n }\n });\n EXPRESSIONS.add(Ops$3.MaybeLocal, function (sexp, builder) {\n var path = sexp[1],\n head,\n i;\n\n if (builder.meta.asPartial) {\n head = path[0];\n\n path = path.slice(1);\n builder.resolveMaybeLocal(head);\n } else {\n builder.getVariable(0);\n }\n for (i = 0; i < path.length; i++) {\n builder.getProperty(path[i]);\n }\n });\n EXPRESSIONS.add(Ops$3.Undefined, function (_sexp, builder) {\n return builder.primitive(undefined);\n });\n EXPRESSIONS.add(Ops$3.HasBlock, function (sexp, builder) {\n builder.hasBlock(sexp[1]);\n });\n EXPRESSIONS.add(Ops$3.HasBlockParams, function (sexp, builder) {\n builder.hasBlockParams(sexp[1]);\n });\n EXPRESSIONS.add(Ops$3.ClientSideExpression, function (sexp, builder) {\n CLIENT_SIDE_EXPRS.compile(sexp, builder);\n });\n function compileList(params, builder) {\n var i;\n\n if (!params) return 0;\n for (i = 0; i < params.length; i++) {\n expr(params[i], builder);\n }\n return params.length;\n }\n var Blocks = function () {\n function Blocks() {\n _classCallCheck$18(this, Blocks);\n\n this.names = (0, _util.dict)();\n this.funcs = [];\n }\n\n Blocks.prototype.add = function (name, func) {\n this.funcs.push(func);\n this.names[name] = this.funcs.length - 1;\n };\n\n Blocks.prototype.addMissing = function (func) {\n this.missing = func;\n };\n\n Blocks.prototype.compile = function (name, params, hash, template, inverse, builder) {\n var index = this.names[name],\n func,\n handled,\n _func;\n if (index === undefined) {\n (0, _util.assert)(!!this.missing, name + ' not found, and no catch-all block handler was registered');\n func = this.missing;\n handled = func(name, params, hash, template, inverse, builder);\n\n (0, _util.assert)(!!handled, name + ' not found, and the catch-all block handler didn\\'t handle it');\n } else {\n _func = this.funcs[index];\n\n _func(params, hash, template, inverse, builder);\n }\n };\n\n return Blocks;\n }();\n var BLOCKS = new Blocks();\n var Inlines = function () {\n function Inlines() {\n _classCallCheck$18(this, Inlines);\n\n this.names = (0, _util.dict)();\n this.funcs = [];\n }\n\n Inlines.prototype.add = function (name, func) {\n this.funcs.push(func);\n this.names[name] = this.funcs.length - 1;\n };\n\n Inlines.prototype.addMissing = function (func) {\n this.missing = func;\n };\n\n Inlines.prototype.compile = function (sexp, builder) {\n var value = sexp[1],\n func,\n returned,\n _func2,\n _returned;\n // TODO: Fix this so that expression macros can return\n // things like components, so that {{component foo}}\n // is the same as {{(component foo)}}\n if (!Array.isArray(value)) return ['expr', value];\n var name = void 0;\n var params = void 0;\n var hash = void 0;\n if (value[0] === Ops$3.Helper) {\n name = value[1];\n params = value[2];\n hash = value[3];\n } else if (value[0] === Ops$3.Unknown) {\n name = value[1];\n params = hash = null;\n } else {\n return ['expr', value];\n }\n var index = this.names[name];\n if (index === undefined && this.missing) {\n func = this.missing;\n returned = func(name, params, hash, builder);\n\n return returned === false ? ['expr', value] : returned;\n } else if (index !== undefined) {\n _func2 = this.funcs[index];\n _returned = _func2(name, params, hash, builder);\n\n return _returned === false ? ['expr', value] : _returned;\n } else {\n return ['expr', value];\n }\n };\n\n return Inlines;\n }();\n var INLINES = new Inlines();\n populateBuiltins(BLOCKS, INLINES);\n function populateBuiltins() {\n var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Blocks();\n var inlines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Inlines();\n\n blocks.add('if', function (params, _hash, template, inverse, builder) {\n // PutArgs\n // Test(Environment)\n // Enter(BEGIN, END)\n // BEGIN: Noop\n // JumpUnless(ELSE)\n // Evaluate(default)\n // Jump(END)\n // ELSE: Noop\n // Evalulate(inverse)\n // END: Noop\n // Exit\n if (!params || params.length !== 1) {\n throw new Error('SYNTAX ERROR: #if requires a single argument');\n }\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n expr(params[0], builder);\n builder.test('environment');\n builder.enter(1);\n builder.jumpUnless('ELSE');\n builder.invokeStatic(template);\n if (inverse) {\n builder.jump('EXIT');\n builder.label('ELSE');\n builder.invokeStatic(inverse);\n builder.label('EXIT');\n builder.exit();\n builder.return();\n } else {\n builder.label('ELSE');\n builder.exit();\n builder.return();\n }\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n blocks.add('unless', function (params, _hash, template, inverse, builder) {\n // PutArgs\n // Test(Environment)\n // Enter(BEGIN, END)\n // BEGIN: Noop\n // JumpUnless(ELSE)\n // Evaluate(default)\n // Jump(END)\n // ELSE: Noop\n // Evalulate(inverse)\n // END: Noop\n // Exit\n if (!params || params.length !== 1) {\n throw new Error('SYNTAX ERROR: #unless requires a single argument');\n }\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n expr(params[0], builder);\n builder.test('environment');\n builder.enter(1);\n builder.jumpIf('ELSE');\n builder.invokeStatic(template);\n if (inverse) {\n builder.jump('EXIT');\n builder.label('ELSE');\n builder.invokeStatic(inverse);\n builder.label('EXIT');\n builder.exit();\n builder.return();\n } else {\n builder.label('ELSE');\n builder.exit();\n builder.return();\n }\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n blocks.add('with', function (params, _hash, template, inverse, builder) {\n // PutArgs\n // Test(Environment)\n // Enter(BEGIN, END)\n // BEGIN: Noop\n // JumpUnless(ELSE)\n // Evaluate(default)\n // Jump(END)\n // ELSE: Noop\n // Evalulate(inverse)\n // END: Noop\n // Exit\n if (!params || params.length !== 1) {\n throw new Error('SYNTAX ERROR: #with requires a single argument');\n }\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n expr(params[0], builder);\n builder.dup();\n builder.test('environment');\n builder.enter(2);\n builder.jumpUnless('ELSE');\n builder.invokeStatic(template, 1);\n if (inverse) {\n builder.jump('EXIT');\n builder.label('ELSE');\n builder.invokeStatic(inverse);\n builder.label('EXIT');\n builder.exit();\n builder.return();\n } else {\n builder.label('ELSE');\n builder.exit();\n builder.return();\n }\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n blocks.add('each', function (params, hash, template, inverse, builder) {\n // Enter(BEGIN, END)\n // BEGIN: Noop\n // PutArgs\n // PutIterable\n // JumpUnless(ELSE)\n // EnterList(BEGIN2, END2)\n // ITER: Noop\n // NextIter(BREAK)\n // BEGIN2: Noop\n // PushChildScope\n // Evaluate(default)\n // PopScope\n // END2: Noop\n // Exit\n // Jump(ITER)\n // BREAK: Noop\n // ExitList\n // Jump(END)\n // ELSE: Noop\n // Evalulate(inverse)\n // END: Noop\n // Exit\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n if (hash && hash[0][0] === 'key') {\n expr(hash[1][0], builder);\n } else {\n builder.primitive(null);\n }\n expr(params[0], builder);\n builder.enter(2);\n builder.putIterator();\n builder.jumpUnless('ELSE');\n builder.pushFrame();\n builder.returnTo('ITER');\n builder.dup(Register.fp, 1);\n builder.enterList('BODY');\n builder.label('ITER');\n builder.iterate('BREAK');\n builder.label('BODY');\n builder.invokeStatic(template, 2);\n builder.pop(2);\n builder.exit();\n builder.return();\n builder.label('BREAK');\n builder.exitList();\n builder.popFrame();\n if (inverse) {\n builder.jump('EXIT');\n builder.label('ELSE');\n builder.invokeStatic(inverse);\n builder.label('EXIT');\n builder.exit();\n builder.return();\n } else {\n builder.label('ELSE');\n builder.exit();\n builder.return();\n }\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n blocks.add('-in-element', function (params, hash, template, _inverse, builder) {\n var keys, values;\n\n if (!params || params.length !== 1) {\n throw new Error('SYNTAX ERROR: #-in-element requires a single argument');\n }\n builder.startLabels();\n builder.pushFrame();\n builder.returnTo('END');\n if (hash && hash[0].length) {\n keys = hash[0], values = hash[1];\n\n\n if (keys.length === 1 && keys[0] === 'nextSibling') {\n expr(values[0], builder);\n } else {\n throw new Error('SYNTAX ERROR: #-in-element does not take a `' + keys[0] + '` option');\n }\n } else {\n expr(null, builder);\n }\n expr(params[0], builder);\n builder.dup();\n builder.test('simple');\n builder.enter(3);\n builder.jumpUnless('ELSE');\n builder.pushRemoteElement();\n builder.invokeStatic(template);\n builder.popRemoteElement();\n builder.label('ELSE');\n builder.exit();\n builder.return();\n builder.label('END');\n builder.popFrame();\n builder.stopLabels();\n });\n blocks.add('-with-dynamic-vars', function (_params, hash, template, _inverse, builder) {\n var names, expressions;\n\n if (hash) {\n names = hash[0], expressions = hash[1];\n\n\n compileList(expressions, builder);\n builder.pushDynamicScope();\n builder.bindDynamicScope(names);\n builder.invokeStatic(template);\n builder.popDynamicScope();\n } else {\n builder.invokeStatic(template);\n }\n });\n return { blocks: blocks, inlines: inlines };\n }\n function compileStatement(statement, builder) {\n STATEMENTS.compile(statement, builder);\n }\n function compileStatements(statements, meta, env) {\n var b = new OpcodeBuilder(env, meta),\n i;\n for (i = 0; i < statements.length; i++) {\n compileStatement(statements[i], b);\n }\n return b;\n }\n\n function _classCallCheck$16(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var CompilableTemplate = function () {\n function CompilableTemplate(statements, symbolTable) {\n _classCallCheck$16(this, CompilableTemplate);\n\n this.statements = statements;\n this.symbolTable = symbolTable;\n this.compiledStatic = null;\n this.compiledDynamic = null;\n }\n\n CompilableTemplate.prototype.compileStatic = function (env) {\n var compiledStatic = this.compiledStatic,\n builder,\n handle;\n\n if (!compiledStatic) {\n builder = compileStatements(this.statements, this.symbolTable.meta, env);\n\n builder.finalize();\n handle = builder.start;\n\n compiledStatic = this.compiledStatic = new CompiledStaticTemplate(handle);\n }\n return compiledStatic;\n };\n\n CompilableTemplate.prototype.compileDynamic = function (env) {\n var compiledDynamic = this.compiledDynamic,\n staticBlock;\n\n if (!compiledDynamic) {\n staticBlock = this.compileStatic(env);\n\n compiledDynamic = new CompiledDynamicTemplate(staticBlock.handle, this.symbolTable);\n }\n return compiledDynamic;\n };\n\n return CompilableTemplate;\n }();\n\n function _classCallCheck$15(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Ops$1 = _wireFormat.Ops;\n\n var Scanner = function () {\n function Scanner(block, env) {\n _classCallCheck$15(this, Scanner);\n\n this.block = block;\n this.env = env;\n }\n\n Scanner.prototype.scanEntryPoint = function (meta) {\n var block = this.block;\n var statements = block.statements,\n symbols = block.symbols,\n hasEval = block.hasEval;\n\n return new CompilableTemplate(statements, { meta: meta, symbols: symbols, hasEval: hasEval });\n };\n\n Scanner.prototype.scanBlock = function (meta) {\n var block = this.block;\n var statements = block.statements;\n\n return new CompilableTemplate(statements, { meta: meta, parameters: _util.EMPTY_ARRAY });\n };\n\n Scanner.prototype.scanLayout = function (meta, attrs, componentName) {\n var block = this.block,\n i,\n statement,\n tagName;\n var statements = block.statements,\n symbols = block.symbols,\n hasEval = block.hasEval;\n\n var newStatements = [];\n var toplevel = void 0;\n var inTopLevel = false;\n for (i = 0; i < statements.length; i++) {\n statement = statements[i];\n\n if (_wireFormat.Statements.isComponent(statement)) {\n tagName = statement[1];\n\n if (!this.env.hasComponentDefinition(tagName, meta.templateMeta)) {\n if (toplevel !== undefined) {\n newStatements.push([Ops$1.OpenElement, tagName]);\n } else {\n toplevel = tagName;\n decorateTopLevelElement(tagName, symbols, attrs, newStatements);\n }\n addFallback(statement, newStatements);\n } else {\n if (toplevel === undefined && tagName === componentName) {\n toplevel = tagName;\n decorateTopLevelElement(tagName, symbols, attrs, newStatements);\n addFallback(statement, newStatements);\n } else {\n newStatements.push(statement);\n }\n }\n } else {\n if (toplevel === undefined && _wireFormat.Statements.isOpenElement(statement)) {\n toplevel = statement[1];\n inTopLevel = true;\n decorateTopLevelElement(toplevel, symbols, attrs, newStatements);\n } else {\n if (inTopLevel) {\n if (_wireFormat.Statements.isFlushElement(statement)) {\n inTopLevel = false;\n } else if (_wireFormat.Statements.isModifier(statement)) {\n throw Error('Found modifier \"' + statement[1] + '\" on the top-level element of \"' + componentName + '\". Modifiers cannot be on the top-level element');\n }\n }\n newStatements.push(statement);\n }\n }\n }\n newStatements.push([Ops$1.ClientSideStatement, Ops$2.DidRenderLayout]);\n return new CompilableTemplate(newStatements, { meta: meta, hasEval: hasEval, symbols: symbols });\n };\n\n return Scanner;\n }();\n\n function addFallback(statement, buffer) {\n var attrs = statement[2],\n block = statement[4],\n i,\n statements,\n _i;\n\n for (i = 0; i < attrs.length; i++) {\n buffer.push(attrs[i]);\n }\n buffer.push([Ops$1.FlushElement]);\n if (block) {\n statements = block.statements;\n\n\n for (_i = 0; _i < statements.length; _i++) {\n buffer.push(statements[_i]);\n }\n }\n buffer.push([Ops$1.CloseElement]);\n }\n function decorateTopLevelElement(tagName, symbols, attrs, buffer) {\n var attrsSymbol = symbols.push(ATTRS_BLOCK);\n buffer.push([Ops$1.ClientSideStatement, Ops$2.OpenComponentElement, tagName]);\n buffer.push([Ops$1.ClientSideStatement, Ops$2.DidCreateElement]);\n buffer.push([Ops$1.Yield, attrsSymbol, _util.EMPTY_ARRAY]);\n buffer.push.apply(buffer, attrs);\n }\n\n function _classCallCheck$24(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Constants = function () {\n function Constants() {\n _classCallCheck$24(this, Constants);\n\n // `0` means NULL\n this.references = [];\n this.strings = [];\n this.expressions = [];\n this.floats = [];\n this.arrays = [];\n this.blocks = [];\n this.functions = [];\n this.others = [];\n }\n\n Constants.prototype.getReference = function (value) {\n return this.references[value - 1];\n };\n\n Constants.prototype.reference = function (value) {\n var index = this.references.length;\n this.references.push(value);\n return index + 1;\n };\n\n Constants.prototype.getString = function (value) {\n return this.strings[value - 1];\n };\n\n Constants.prototype.getFloat = function (value) {\n return this.floats[value - 1];\n };\n\n Constants.prototype.float = function (value) {\n return this.floats.push(value);\n };\n\n Constants.prototype.string = function (value) {\n var index = this.strings.length;\n this.strings.push(value);\n return index + 1;\n };\n\n Constants.prototype.getExpression = function (value) {\n return this.expressions[value - 1];\n };\n\n Constants.prototype.getArray = function (value) {\n return this.arrays[value - 1];\n };\n\n Constants.prototype.getNames = function (value) {\n var _names = [],\n i,\n n;\n var names = this.getArray(value);\n for (i = 0; i < names.length; i++) {\n n = names[i];\n\n _names[i] = this.getString(n);\n }\n return _names;\n };\n\n Constants.prototype.array = function (values) {\n var index = this.arrays.length;\n this.arrays.push(values);\n return index + 1;\n };\n\n Constants.prototype.getBlock = function (value) {\n return this.blocks[value - 1];\n };\n\n Constants.prototype.block = function (_block) {\n var index = this.blocks.length;\n this.blocks.push(_block);\n return index + 1;\n };\n\n Constants.prototype.getFunction = function (value) {\n return this.functions[value - 1];\n };\n\n Constants.prototype.function = function (f) {\n var index = this.functions.length;\n this.functions.push(f);\n return index + 1;\n };\n\n Constants.prototype.getOther = function (value) {\n return this.others[value - 1];\n };\n\n Constants.prototype.other = function (_other) {\n var index = this.others.length;\n this.others.push(_other);\n return index + 1;\n };\n\n return Constants;\n }();\n\n var badProtocols = ['javascript:', 'vbscript:'];\n var badTags = ['A', 'BODY', 'LINK', 'IMG', 'IFRAME', 'BASE', 'FORM'];\n var badTagsForDataURI = ['EMBED'];\n var badAttributes = ['href', 'src', 'background', 'action'];\n var badAttributesForDataURI = ['src'];\n function has(array, item) {\n return array.indexOf(item) !== -1;\n }\n function checkURI(tagName, attribute) {\n return (tagName === null || has(badTags, tagName)) && has(badAttributes, attribute);\n }\n function checkDataURI(tagName, attribute) {\n if (tagName === null) return false;\n return has(badTagsForDataURI, tagName) && has(badAttributesForDataURI, attribute);\n }\n function requiresSanitization(tagName, attribute) {\n return checkURI(tagName, attribute) || checkDataURI(tagName, attribute);\n }\n function sanitizeAttributeValue(env, element, attribute, value) {\n var tagName = null,\n protocol;\n if (value === null || value === undefined) {\n return value;\n }\n if (isSafeString(value)) {\n return value.toHTML();\n }\n if (!element) {\n tagName = null;\n } else {\n tagName = element.tagName.toUpperCase();\n }\n var str = normalizeTextValue(value);\n if (checkURI(tagName, attribute)) {\n protocol = env.protocolForURL(str);\n\n if (has(badProtocols, protocol)) {\n return 'unsafe:' + str;\n }\n }\n if (checkDataURI(tagName, attribute)) {\n return 'unsafe:' + str;\n }\n return str;\n }\n\n /*\n * @method normalizeProperty\n * @param element {HTMLElement}\n * @param slotName {String}\n * @returns {Object} { name, type }\n */\n function normalizeProperty(element, slotName) {\n var type = void 0,\n normalized = void 0,\n lower;\n if (slotName in element) {\n normalized = slotName;\n type = 'prop';\n } else {\n lower = slotName.toLowerCase();\n\n if (lower in element) {\n type = 'prop';\n normalized = lower;\n } else {\n type = 'attr';\n normalized = slotName;\n }\n }\n if (type === 'prop' && (normalized.toLowerCase() === 'style' || preferAttr(element.tagName, normalized))) {\n type = 'attr';\n }\n return { normalized: normalized, type: type };\n }\n\n // properties that MUST be set as attributes, due to:\n // * browser bug\n // * strange spec outlier\n var ATTR_OVERRIDES = {\n // phantomjs < 2.0 lets you set it as a prop but won't reflect it\n // back to the attribute. button.getAttribute('type') === null\n BUTTON: { type: true, form: true },\n INPUT: {\n // Some version of IE (like IE9) actually throw an exception\n // if you set input.type = 'something-unknown'\n type: true,\n form: true,\n // Chrome 46.0.2464.0: 'autocorrect' in document.createElement('input') === false\n // Safari 8.0.7: 'autocorrect' in document.createElement('input') === false\n // Mobile Safari (iOS 8.4 simulator): 'autocorrect' in document.createElement('input') === true\n autocorrect: true,\n // Chrome 54.0.2840.98: 'list' in document.createElement('input') === true\n // Safari 9.1.3: 'list' in document.createElement('input') === false\n list: true\n },\n // element.form is actually a legitimate readOnly property, that is to be\n // mutated, but must be mutated by setAttribute...\n SELECT: { form: true },\n OPTION: { form: true },\n TEXTAREA: { form: true },\n LABEL: { form: true },\n FIELDSET: { form: true },\n LEGEND: { form: true },\n OBJECT: { form: true }\n };\n function preferAttr(tagName, propName) {\n var tag = ATTR_OVERRIDES[tagName.toUpperCase()];\n return tag && tag[propName.toLowerCase()] || false;\n }\n\n function _defaults$12(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$27(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$12(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$12(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$12(subClass, superClass);\n }\n\n var innerHTMLWrapper = {\n colgroup: { depth: 2, before: '<table><colgroup>', after: '</colgroup></table>' },\n table: { depth: 1, before: '<table>', after: '</table>' },\n tbody: { depth: 2, before: '<table><tbody>', after: '</tbody></table>' },\n tfoot: { depth: 2, before: '<table><tfoot>', after: '</tfoot></table>' },\n thead: { depth: 2, before: '<table><thead>', after: '</thead></table>' },\n tr: { depth: 3, before: '<table><tbody><tr>', after: '</tr></tbody></table>' }\n };\n // Patch: innerHTML Fix\n // Browsers: IE9\n // Reason: IE9 don't allow us to set innerHTML on col, colgroup, frameset,\n // html, style, table, tbody, tfoot, thead, title, tr.\n // Fix: Wrap the innerHTML we are about to set in its parents, apply the\n // wrapped innerHTML on a div, then move the unwrapped nodes into the\n // target position.\n\n function treeConstruction(document, DOMTreeConstructionClass) {\n if (!document) return DOMTreeConstructionClass;\n if (!shouldApplyFix(document)) {\n return DOMTreeConstructionClass;\n }\n var div = document.createElement('div');\n return function (_DOMTreeConstructionC) {\n _inherits$12(DOMTreeConstructionWithInnerHTMLFix, _DOMTreeConstructionC);\n\n function DOMTreeConstructionWithInnerHTMLFix() {\n _classCallCheck$27(this, DOMTreeConstructionWithInnerHTMLFix);\n\n return _possibleConstructorReturn$12(this, _DOMTreeConstructionC.apply(this, arguments));\n }\n\n DOMTreeConstructionWithInnerHTMLFix.prototype.insertHTMLBefore = function (parent, referenceNode, html) {\n if (html === null || html === '') {\n return _DOMTreeConstructionC.prototype.insertHTMLBefore.call(this, parent, referenceNode, html);\n }\n var parentTag = parent.tagName.toLowerCase();\n var wrapper = innerHTMLWrapper[parentTag];\n if (wrapper === undefined) {\n return _DOMTreeConstructionC.prototype.insertHTMLBefore.call(this, parent, referenceNode, html);\n }\n return fixInnerHTML(parent, wrapper, div, html, referenceNode);\n };\n\n return DOMTreeConstructionWithInnerHTMLFix;\n }(DOMTreeConstructionClass);\n }\n function fixInnerHTML(parent, wrapper, div, html, reference) {\n var wrappedHtml = wrapper.before + html + wrapper.after,\n i;\n div.innerHTML = wrappedHtml;\n var parentNode = div;\n for (i = 0; i < wrapper.depth; i++) {\n parentNode = parentNode.childNodes[0];\n }\n\n var _moveNodesBefore = moveNodesBefore(parentNode, parent, reference),\n first = _moveNodesBefore[0],\n last = _moveNodesBefore[1];\n\n return new ConcreteBounds(parent, first, last);\n }\n function shouldApplyFix(document) {\n var table = document.createElement('table');\n try {\n table.innerHTML = '<tbody></tbody>';\n } catch (e) {} finally {\n if (table.childNodes.length !== 0) {\n // It worked as expected, no fix required\n return false;\n }\n }\n return true;\n }\n\n function _defaults$13(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$28(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$13(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$13(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$13(subClass, superClass);\n }\n\n // Patch: insertAdjacentHTML on SVG Fix\n // Browsers: Safari, IE, Edge, Firefox ~33-34\n // Reason: insertAdjacentHTML does not exist on SVG elements in Safari. It is\n // present but throws an exception on IE and Edge. Old versions of\n // Firefox create nodes in the incorrect namespace.\n // Fix: Since IE and Edge silently fail to create SVG nodes using\n // innerHTML, and because Firefox may create nodes in the incorrect\n // namespace using innerHTML on SVG elements, an HTML-string wrapping\n // approach is used. A pre/post SVG tag is added to the string, then\n // that whole string is added to a div. The created nodes are plucked\n // out and applied to the target location on DOM.\n function treeConstruction$1(document, TreeConstructionClass, svgNamespace) {\n if (!document) return TreeConstructionClass;\n if (!shouldApplyFix$1(document, svgNamespace)) {\n return TreeConstructionClass;\n }\n var div = document.createElement('div');\n return function (_TreeConstructionClas) {\n _inherits$13(TreeConstructionWithSVGInnerHTMLFix, _TreeConstructionClas);\n\n function TreeConstructionWithSVGInnerHTMLFix() {\n _classCallCheck$28(this, TreeConstructionWithSVGInnerHTMLFix);\n\n return _possibleConstructorReturn$13(this, _TreeConstructionClas.apply(this, arguments));\n }\n\n TreeConstructionWithSVGInnerHTMLFix.prototype.insertHTMLBefore = function (parent, reference, html) {\n if (html === null || html === '') {\n return _TreeConstructionClas.prototype.insertHTMLBefore.call(this, parent, reference, html);\n }\n if (parent.namespaceURI !== svgNamespace) {\n return _TreeConstructionClas.prototype.insertHTMLBefore.call(this, parent, reference, html);\n }\n return fixSVG(parent, div, html, reference);\n };\n\n return TreeConstructionWithSVGInnerHTMLFix;\n }(TreeConstructionClass);\n }\n function fixSVG(parent, div, html, reference) {\n div.innerHTML = '<svg>' + html + '</svg>';\n // IE, Edge: also do not correctly support using `innerHTML` on SVG\n // namespaced elements. So here a wrapper is used.\n\n\n var _moveNodesBefore = moveNodesBefore(div.firstChild, parent, reference),\n first = _moveNodesBefore[0],\n last = _moveNodesBefore[1];\n\n return new ConcreteBounds(parent, first, last);\n }\n function shouldApplyFix$1(document, svgNamespace) {\n var svg = document.createElementNS(svgNamespace, 'svg');\n try {\n svg['insertAdjacentHTML']('beforeend', '<circle></circle>');\n } catch (e) {\n // IE, Edge: Will throw, insertAdjacentHTML is unsupported on SVG\n // Safari: Will throw, insertAdjacentHTML is not present on SVG\n } finally {\n // FF: Old versions will create a node in the wrong namespace\n if (svg.childNodes.length === 1 && svg.firstChild.namespaceURI === 'http://www.w3.org/2000/svg') {\n // The test worked as expected, no fix required\n return false;\n }\n return true;\n }\n }\n\n function _defaults$14(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _classCallCheck$29(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn$14(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$14(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$14(subClass, superClass);\n }\n\n // Patch: Adjacent text node merging fix\n // Browsers: IE, Edge, Firefox w/o inspector open\n // Reason: These browsers will merge adjacent text nodes. For exmaple given\n // <div>Hello</div> with div.insertAdjacentHTML(' world') browsers\n // with proper behavior will populate div.childNodes with two items.\n // These browsers will populate it with one merged node instead.\n // Fix: Add these nodes to a wrapper element, then iterate the childNodes\n // of that wrapper and move the nodes to their target location. Note\n // that potential SVG bugs will have been handled before this fix.\n // Note that this fix must only apply to the previous text node, as\n // the base implementation of `insertHTMLBefore` already handles\n // following text nodes correctly.\n\n function treeConstruction$2(document, TreeConstructionClass) {\n if (!document) return TreeConstructionClass;\n if (!shouldApplyFix$2(document)) {\n return TreeConstructionClass;\n }\n return function (_TreeConstructionClas) {\n _inherits$14(TreeConstructionWithTextNodeMergingFix, _TreeConstructionClas);\n\n function TreeConstructionWithTextNodeMergingFix(document) {\n _classCallCheck$29(this, TreeConstructionWithTextNodeMergingFix);\n\n var _this2 = _possibleConstructorReturn$14(this, _TreeConstructionClas.call(this, document));\n\n _this2.uselessComment = _this2.createComment('');\n return _this2;\n }\n\n TreeConstructionWithTextNodeMergingFix.prototype.insertHTMLBefore = function (parent, reference, html) {\n if (html === null) {\n return _TreeConstructionClas.prototype.insertHTMLBefore.call(this, parent, reference, html);\n }\n var didSetUselessComment = false;\n var nextPrevious = reference ? reference.previousSibling : parent.lastChild;\n if (nextPrevious && nextPrevious instanceof Text) {\n didSetUselessComment = true;\n parent.insertBefore(this.uselessComment, reference);\n }\n var bounds = _TreeConstructionClas.prototype.insertHTMLBefore.call(this, parent, reference, html);\n if (didSetUselessComment) {\n parent.removeChild(this.uselessComment);\n }\n return bounds;\n };\n\n return TreeConstructionWithTextNodeMergingFix;\n }(TreeConstructionClass);\n }\n function shouldApplyFix$2(document) {\n var mergingTextDiv = document.createElement('div');\n mergingTextDiv.innerHTML = 'first';\n mergingTextDiv.insertAdjacentHTML('beforeend', 'second');\n if (mergingTextDiv.childNodes.length === 2) {\n // It worked as expected, no fix required\n return false;\n }\n return true;\n }\n\n function _defaults$11(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$11(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$11(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$11(subClass, superClass);\n }\n\n function _classCallCheck$26(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var SVG_NAMESPACE$$1 = 'http://www.w3.org/2000/svg';\n // http://www.w3.org/TR/html/syntax.html#html-integration-point\n var SVG_INTEGRATION_POINTS = { foreignObject: 1, desc: 1, title: 1 };\n // http://www.w3.org/TR/html/syntax.html#adjust-svg-attributes\n // TODO: Adjust SVG attributes\n // http://www.w3.org/TR/html/syntax.html#parsing-main-inforeign\n // TODO: Adjust SVG elements\n // http://www.w3.org/TR/html/syntax.html#parsing-main-inforeign\n var BLACKLIST_TABLE = Object.create(null);\n [\"b\", \"big\", \"blockquote\", \"body\", \"br\", \"center\", \"code\", \"dd\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"head\", \"hr\", \"i\", \"img\", \"li\", \"listing\", \"main\", \"meta\", \"nobr\", \"ol\", \"p\", \"pre\", \"ruby\", \"s\", \"small\", \"span\", \"strong\", \"strike\", \"sub\", \"sup\", \"table\", \"tt\", \"u\", \"ul\", \"var\"].forEach(function (tag) {\n return BLACKLIST_TABLE[tag] = 1;\n });\n var WHITESPACE = /[\\t-\\r \\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]/;\n var doc = typeof document === 'undefined' ? null : document;\n\n function moveNodesBefore(source, target, nextSibling) {\n var first = source.firstChild;\n var last = null;\n var current = first;\n while (current) {\n last = current;\n current = current.nextSibling;\n target.insertBefore(last, nextSibling);\n }\n return [first, last];\n }\n var DOMOperations = function () {\n function DOMOperations(document) {\n _classCallCheck$26(this, DOMOperations);\n\n this.document = document;\n this.setupUselessElement();\n }\n // split into seperate method so that NodeDOMTreeConstruction\n // can override it.\n\n\n DOMOperations.prototype.setupUselessElement = function () {\n this.uselessElement = this.document.createElement('div');\n };\n\n DOMOperations.prototype.createElement = function (tag, context) {\n var isElementInSVGNamespace = void 0,\n isHTMLIntegrationPoint = void 0;\n if (context) {\n isElementInSVGNamespace = context.namespaceURI === SVG_NAMESPACE$$1 || tag === 'svg';\n isHTMLIntegrationPoint = SVG_INTEGRATION_POINTS[context.tagName];\n } else {\n isElementInSVGNamespace = tag === 'svg';\n isHTMLIntegrationPoint = false;\n }\n if (isElementInSVGNamespace && !isHTMLIntegrationPoint) {\n // FIXME: This does not properly handle <font> with color, face, or\n // size attributes, which is also disallowed by the spec. We should fix\n // this.\n if (BLACKLIST_TABLE[tag]) {\n throw new Error('Cannot create a ' + tag + ' inside an SVG context');\n }\n return this.document.createElementNS(SVG_NAMESPACE$$1, tag);\n } else {\n return this.document.createElement(tag);\n }\n };\n\n DOMOperations.prototype.insertBefore = function (parent, node, reference) {\n parent.insertBefore(node, reference);\n };\n\n DOMOperations.prototype.insertHTMLBefore = function (_parent, nextSibling, html) {\n return _insertHTMLBefore(this.uselessElement, _parent, nextSibling, html);\n };\n\n DOMOperations.prototype.createTextNode = function (text) {\n return this.document.createTextNode(text);\n };\n\n DOMOperations.prototype.createComment = function (data) {\n return this.document.createComment(data);\n };\n\n return DOMOperations;\n }();\n var DOM;\n (function (DOM) {\n var TreeConstruction = function (_DOMOperations) {\n _inherits$11(TreeConstruction, _DOMOperations);\n\n function TreeConstruction() {\n _classCallCheck$26(this, TreeConstruction);\n\n return _possibleConstructorReturn$11(this, _DOMOperations.apply(this, arguments));\n }\n\n TreeConstruction.prototype.createElementNS = function (namespace, tag) {\n return this.document.createElementNS(namespace, tag);\n };\n\n TreeConstruction.prototype.setAttribute = function (element, name, value, namespace) {\n if (namespace) {\n element.setAttributeNS(namespace, name, value);\n } else {\n element.setAttribute(name, value);\n }\n };\n\n return TreeConstruction;\n }(DOMOperations);\n\n DOM.TreeConstruction = TreeConstruction;\n var appliedTreeContruction = TreeConstruction;\n appliedTreeContruction = treeConstruction$2(doc, appliedTreeContruction);\n appliedTreeContruction = treeConstruction(doc, appliedTreeContruction);\n appliedTreeContruction = treeConstruction$1(doc, appliedTreeContruction, SVG_NAMESPACE$$1);\n DOM.DOMTreeConstruction = appliedTreeContruction;\n })(DOM || (DOM = {}));\n var DOMChanges = function (_DOMOperations2) {\n _inherits$11(DOMChanges, _DOMOperations2);\n\n function DOMChanges(document) {\n _classCallCheck$26(this, DOMChanges);\n\n var _this2 = _possibleConstructorReturn$11(this, _DOMOperations2.call(this, document));\n\n _this2.document = document;\n _this2.namespace = null;\n return _this2;\n }\n\n DOMChanges.prototype.setAttribute = function (element, name, value) {\n element.setAttribute(name, value);\n };\n\n DOMChanges.prototype.setAttributeNS = function (element, namespace, name, value) {\n element.setAttributeNS(namespace, name, value);\n };\n\n DOMChanges.prototype.removeAttribute = function (element, name) {\n element.removeAttribute(name);\n };\n\n DOMChanges.prototype.removeAttributeNS = function (element, namespace, name) {\n element.removeAttributeNS(namespace, name);\n };\n\n DOMChanges.prototype.insertNodeBefore = function (parent, node, reference) {\n var firstChild, lastChild;\n\n if (isDocumentFragment(node)) {\n firstChild = node.firstChild, lastChild = node.lastChild;\n\n\n this.insertBefore(parent, node, reference);\n return new ConcreteBounds(parent, firstChild, lastChild);\n } else {\n this.insertBefore(parent, node, reference);\n return new SingleNodeBounds(parent, node);\n }\n };\n\n DOMChanges.prototype.insertTextBefore = function (parent, nextSibling, text) {\n var textNode = this.createTextNode(text);\n this.insertBefore(parent, textNode, nextSibling);\n return textNode;\n };\n\n DOMChanges.prototype.insertBefore = function (element, node, reference) {\n element.insertBefore(node, reference);\n };\n\n DOMChanges.prototype.insertAfter = function (element, node, reference) {\n this.insertBefore(element, node, reference.nextSibling);\n };\n\n return DOMChanges;\n }(DOMOperations);\n function _insertHTMLBefore(_useless, _parent, _nextSibling, html) {\n // TypeScript vendored an old version of the DOM spec where `insertAdjacentHTML`\n // only exists on `HTMLElement` but not on `Element`. We actually work with the\n // newer version of the DOM API here (and monkey-patch this method in `./compat`\n // when we detect older browsers). This is a hack to work around this limitation.\n var parent = _parent;\n var useless = _useless;\n var nextSibling = _nextSibling;\n var prev = nextSibling ? nextSibling.previousSibling : parent.lastChild;\n var last = void 0;\n if (html === null || html === '') {\n return new ConcreteBounds(parent, null, null);\n }\n if (nextSibling === null) {\n parent.insertAdjacentHTML('beforeend', html);\n last = parent.lastChild;\n } else if (nextSibling instanceof HTMLElement) {\n nextSibling.insertAdjacentHTML('beforebegin', html);\n last = nextSibling.previousSibling;\n } else {\n // Non-element nodes do not support insertAdjacentHTML, so add an\n // element and call it on that element. Then remove the element.\n //\n // This also protects Edge, IE and Firefox w/o the inspector open\n // from merging adjacent text nodes. See ./compat/text-node-merging-fix.ts\n parent.insertBefore(useless, nextSibling);\n useless.insertAdjacentHTML('beforebegin', html);\n last = useless.previousSibling;\n parent.removeChild(useless);\n }\n var first = prev ? prev.nextSibling : parent.firstChild;\n return new ConcreteBounds(parent, first, last);\n }\n function isDocumentFragment(node) {\n return node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;\n }\n var helper = DOMChanges;\n helper = function (document, DOMChangesClass) {\n if (!document) return DOMChangesClass;\n if (!shouldApplyFix$2(document)) {\n return DOMChangesClass;\n }\n return function (_DOMChangesClass) {\n _inherits$14(DOMChangesWithTextNodeMergingFix, _DOMChangesClass);\n\n function DOMChangesWithTextNodeMergingFix(document) {\n _classCallCheck$29(this, DOMChangesWithTextNodeMergingFix);\n\n var _this = _possibleConstructorReturn$14(this, _DOMChangesClass.call(this, document));\n\n _this.uselessComment = document.createComment('');\n return _this;\n }\n\n DOMChangesWithTextNodeMergingFix.prototype.insertHTMLBefore = function (parent, nextSibling, html) {\n if (html === null) {\n return _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n }\n var didSetUselessComment = false;\n var nextPrevious = nextSibling ? nextSibling.previousSibling : parent.lastChild;\n if (nextPrevious && nextPrevious instanceof Text) {\n didSetUselessComment = true;\n parent.insertBefore(this.uselessComment, nextSibling);\n }\n var bounds = _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n if (didSetUselessComment) {\n parent.removeChild(this.uselessComment);\n }\n return bounds;\n };\n\n return DOMChangesWithTextNodeMergingFix;\n }(DOMChangesClass);\n }(doc, helper);\n helper = function (document, DOMChangesClass) {\n if (!document) return DOMChangesClass;\n if (!shouldApplyFix(document)) {\n return DOMChangesClass;\n }\n var div = document.createElement('div');\n return function (_DOMChangesClass) {\n _inherits$12(DOMChangesWithInnerHTMLFix, _DOMChangesClass);\n\n function DOMChangesWithInnerHTMLFix() {\n _classCallCheck$27(this, DOMChangesWithInnerHTMLFix);\n\n return _possibleConstructorReturn$12(this, _DOMChangesClass.apply(this, arguments));\n }\n\n DOMChangesWithInnerHTMLFix.prototype.insertHTMLBefore = function (parent, nextSibling, html) {\n if (html === null || html === '') {\n return _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n }\n var parentTag = parent.tagName.toLowerCase();\n var wrapper = innerHTMLWrapper[parentTag];\n if (wrapper === undefined) {\n return _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n }\n return fixInnerHTML(parent, wrapper, div, html, nextSibling);\n };\n\n return DOMChangesWithInnerHTMLFix;\n }(DOMChangesClass);\n }(doc, helper);\n helper = function (document, DOMChangesClass, svgNamespace) {\n if (!document) return DOMChangesClass;\n if (!shouldApplyFix$1(document, svgNamespace)) {\n return DOMChangesClass;\n }\n var div = document.createElement('div');\n return function (_DOMChangesClass) {\n _inherits$13(DOMChangesWithSVGInnerHTMLFix, _DOMChangesClass);\n\n function DOMChangesWithSVGInnerHTMLFix() {\n _classCallCheck$28(this, DOMChangesWithSVGInnerHTMLFix);\n\n return _possibleConstructorReturn$13(this, _DOMChangesClass.apply(this, arguments));\n }\n\n DOMChangesWithSVGInnerHTMLFix.prototype.insertHTMLBefore = function (parent, nextSibling, html) {\n if (html === null || html === '') {\n return _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n }\n if (parent.namespaceURI !== svgNamespace) {\n return _DOMChangesClass.prototype.insertHTMLBefore.call(this, parent, nextSibling, html);\n }\n return fixSVG(parent, div, html, nextSibling);\n };\n\n return DOMChangesWithSVGInnerHTMLFix;\n }(DOMChangesClass);\n }(doc, helper, SVG_NAMESPACE$$1);\n var helper$1 = helper;\n var DOMTreeConstruction = DOM.DOMTreeConstruction;\n\n function _defaults$10(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n function _possibleConstructorReturn$10(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$10(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$10(subClass, superClass);\n }\n\n function _classCallCheck$25(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function defaultManagers(element, attr) {\n var tagName = element.tagName;\n var isSVG = element.namespaceURI === SVG_NAMESPACE$$1;\n if (isSVG) {\n return defaultAttributeManagers(tagName, attr);\n }\n\n var _normalizeProperty = normalizeProperty(element, attr),\n type = _normalizeProperty.type,\n normalized = _normalizeProperty.normalized;\n\n if (type === 'attr') {\n return defaultAttributeManagers(tagName, normalized);\n } else {\n return defaultPropertyManagers(tagName, normalized);\n }\n }\n function defaultPropertyManagers(tagName, attr) {\n if (requiresSanitization(tagName, attr)) {\n return new SafePropertyManager(attr);\n }\n if (isUserInputValue(tagName, attr)) {\n return INPUT_VALUE_PROPERTY_MANAGER;\n }\n if (isOptionSelected(tagName, attr)) {\n return OPTION_SELECTED_MANAGER;\n }\n return new PropertyManager(attr);\n }\n function defaultAttributeManagers(tagName, attr) {\n if (requiresSanitization(tagName, attr)) {\n return new SafeAttributeManager(attr);\n }\n return new AttributeManager(attr);\n }\n\n\n var AttributeManager = function () {\n function AttributeManager(attr) {\n _classCallCheck$25(this, AttributeManager);\n\n this.attr = attr;\n }\n\n AttributeManager.prototype.setAttribute = function (env, element, value, namespace) {\n var dom = env.getAppendOperations();\n var normalizedValue = normalizeAttributeValue(value);\n if (!isAttrRemovalValue(normalizedValue)) {\n dom.setAttribute(element, this.attr, normalizedValue, namespace);\n }\n };\n\n AttributeManager.prototype.updateAttribute = function (env, element, value, namespace) {\n if (value === null || value === undefined || value === false) {\n if (namespace) {\n env.getDOM().removeAttributeNS(element, namespace, this.attr);\n } else {\n env.getDOM().removeAttribute(element, this.attr);\n }\n } else {\n this.setAttribute(env, element, value);\n }\n };\n\n return AttributeManager;\n }();\n\n var PropertyManager = function (_AttributeManager) {\n _inherits$10(PropertyManager, _AttributeManager);\n\n function PropertyManager() {\n _classCallCheck$25(this, PropertyManager);\n\n return _possibleConstructorReturn$10(this, _AttributeManager.apply(this, arguments));\n }\n\n PropertyManager.prototype.setAttribute = function (_env, element, value) {\n if (!isAttrRemovalValue(value)) {\n element[this.attr] = value;\n }\n };\n\n PropertyManager.prototype.removeAttribute = function (env, element, namespace) {\n // TODO this sucks but to preserve properties first and to meet current\n // semantics we must do this.\n var attr = this.attr;\n\n if (namespace) {\n env.getDOM().removeAttributeNS(element, namespace, attr);\n } else {\n env.getDOM().removeAttribute(element, attr);\n }\n };\n\n PropertyManager.prototype.updateAttribute = function (env, element, value, namespace) {\n // ensure the property is always updated\n element[this.attr] = value;\n if (isAttrRemovalValue(value)) {\n this.removeAttribute(env, element, namespace);\n }\n };\n\n return PropertyManager;\n }(AttributeManager);\n\n function normalizeAttributeValue(value) {\n if (value === false || value === undefined || value === null) {\n return null;\n }\n if (value === true) {\n return '';\n }\n // onclick function etc in SSR\n if (typeof value === 'function') {\n return null;\n }\n return String(value);\n }\n function isAttrRemovalValue(value) {\n return value === null || value === undefined;\n }\n\n var SafePropertyManager = function (_PropertyManager) {\n _inherits$10(SafePropertyManager, _PropertyManager);\n\n function SafePropertyManager() {\n _classCallCheck$25(this, SafePropertyManager);\n\n return _possibleConstructorReturn$10(this, _PropertyManager.apply(this, arguments));\n }\n\n SafePropertyManager.prototype.setAttribute = function (env, element, value) {\n _PropertyManager.prototype.setAttribute.call(this, env, element, sanitizeAttributeValue(env, element, this.attr, value));\n };\n\n SafePropertyManager.prototype.updateAttribute = function (env, element, value) {\n _PropertyManager.prototype.updateAttribute.call(this, env, element, sanitizeAttributeValue(env, element, this.attr, value));\n };\n\n return SafePropertyManager;\n }(PropertyManager);\n\n function isUserInputValue(tagName, attribute) {\n return (tagName === 'INPUT' || tagName === 'TEXTAREA') && attribute === 'value';\n }\n\n var InputValuePropertyManager = function (_AttributeManager2) {\n _inherits$10(InputValuePropertyManager, _AttributeManager2);\n\n function InputValuePropertyManager() {\n _classCallCheck$25(this, InputValuePropertyManager);\n\n return _possibleConstructorReturn$10(this, _AttributeManager2.apply(this, arguments));\n }\n\n InputValuePropertyManager.prototype.setAttribute = function (_env, element, value) {\n element.value = normalizeTextValue(value);\n };\n\n InputValuePropertyManager.prototype.updateAttribute = function (_env, element, value) {\n var input = element;\n var currentValue = input.value;\n var normalizedValue = normalizeTextValue(value);\n if (currentValue !== normalizedValue) {\n input.value = normalizedValue;\n }\n };\n\n return InputValuePropertyManager;\n }(AttributeManager);\n\n var INPUT_VALUE_PROPERTY_MANAGER = new InputValuePropertyManager('value');\n function isOptionSelected(tagName, attribute) {\n return tagName === 'OPTION' && attribute === 'selected';\n }\n\n var OptionSelectedManager = function (_PropertyManager2) {\n _inherits$10(OptionSelectedManager, _PropertyManager2);\n\n function OptionSelectedManager() {\n _classCallCheck$25(this, OptionSelectedManager);\n\n return _possibleConstructorReturn$10(this, _PropertyManager2.apply(this, arguments));\n }\n\n OptionSelectedManager.prototype.setAttribute = function (_env, element, value) {\n if (value !== null && value !== undefined && value !== false) {\n element.selected = true;\n }\n };\n\n OptionSelectedManager.prototype.updateAttribute = function (_env, element, value) {\n var option = element;\n if (value) {\n option.selected = true;\n } else {\n option.selected = false;\n }\n };\n\n return OptionSelectedManager;\n }(PropertyManager);\n\n var OPTION_SELECTED_MANAGER = new OptionSelectedManager('selected');\n\n var SafeAttributeManager = function (_AttributeManager3) {\n _inherits$10(SafeAttributeManager, _AttributeManager3);\n\n function SafeAttributeManager() {\n _classCallCheck$25(this, SafeAttributeManager);\n\n return _possibleConstructorReturn$10(this, _AttributeManager3.apply(this, arguments));\n }\n\n SafeAttributeManager.prototype.setAttribute = function (env, element, value) {\n _AttributeManager3.prototype.setAttribute.call(this, env, element, sanitizeAttributeValue(env, element, this.attr, value));\n };\n\n SafeAttributeManager.prototype.updateAttribute = function (env, element, value) {\n _AttributeManager3.prototype.updateAttribute.call(this, env, element, sanitizeAttributeValue(env, element, this.attr, value));\n };\n\n return SafeAttributeManager;\n }(AttributeManager);\n\n var _createClass$4 = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _classCallCheck$23(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var Scope = function () {\n function Scope(\n // the 0th slot is `self`\n slots, callerScope,\n // named arguments and blocks passed to a layout that uses eval\n evalScope,\n // locals in scope when the partial was invoked\n partialMap) {\n _classCallCheck$23(this, Scope);\n\n this.slots = slots;\n this.callerScope = callerScope;\n this.evalScope = evalScope;\n this.partialMap = partialMap;\n }\n\n Scope.root = function (self) {\n var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0,\n i;\n\n var refs = new Array(size + 1);\n for (i = 0; i <= size; i++) {\n refs[i] = UNDEFINED_REFERENCE;\n }\n return new Scope(refs, null, null, null).init({ self: self });\n };\n\n Scope.sized = function () {\n var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0,\n i;\n\n var refs = new Array(size + 1);\n for (i = 0; i <= size; i++) {\n refs[i] = UNDEFINED_REFERENCE;\n }\n return new Scope(refs, null, null, null);\n };\n\n Scope.prototype.init = function (_ref) {\n var self = _ref.self;\n\n this.slots[0] = self;\n return this;\n };\n\n Scope.prototype.getSelf = function () {\n return this.get(0);\n };\n\n Scope.prototype.getSymbol = function (symbol) {\n return this.get(symbol);\n };\n\n Scope.prototype.getBlock = function (symbol) {\n return this.get(symbol);\n };\n\n Scope.prototype.getEvalScope = function () {\n return this.evalScope;\n };\n\n Scope.prototype.getPartialMap = function () {\n return this.partialMap;\n };\n\n Scope.prototype.bind = function (symbol, value) {\n this.set(symbol, value);\n };\n\n Scope.prototype.bindSelf = function (self) {\n this.set(0, self);\n };\n\n Scope.prototype.bindSymbol = function (symbol, value) {\n this.set(symbol, value);\n };\n\n Scope.prototype.bindBlock = function (symbol, value) {\n this.set(symbol, value);\n };\n\n Scope.prototype.bindEvalScope = function (map$$1) {\n this.evalScope = map$$1;\n };\n\n Scope.prototype.bindPartialMap = function (map$$1) {\n this.partialMap = map$$1;\n };\n\n Scope.prototype.bindCallerScope = function (scope) {\n this.callerScope = scope;\n };\n\n Scope.prototype.getCallerScope = function () {\n return this.callerScope;\n };\n\n Scope.prototype.child = function () {\n return new Scope(this.slots.slice(), this.callerScope, this.evalScope, this.partialMap);\n };\n\n Scope.prototype.get = function (index) {\n if (index >= this.slots.length) {\n throw new RangeError('BUG: cannot get $' + index + ' from scope; length=' + this.slots.length);\n }\n return this.slots[index];\n };\n\n Scope.prototype.set = function (index, value) {\n if (index >= this.slots.length) {\n throw new RangeError('BUG: cannot get $' + index + ' from scope; length=' + this.slots.length);\n }\n this.slots[index] = value;\n };\n\n return Scope;\n }();\n\n var Transaction = function () {\n function Transaction() {\n _classCallCheck$23(this, Transaction);\n\n this.scheduledInstallManagers = [];\n this.scheduledInstallModifiers = [];\n this.scheduledUpdateModifierManagers = [];\n this.scheduledUpdateModifiers = [];\n this.createdComponents = [];\n this.createdManagers = [];\n this.updatedComponents = [];\n this.updatedManagers = [];\n this.destructors = [];\n }\n\n Transaction.prototype.didCreate = function (component, manager) {\n this.createdComponents.push(component);\n this.createdManagers.push(manager);\n };\n\n Transaction.prototype.didUpdate = function (component, manager) {\n this.updatedComponents.push(component);\n this.updatedManagers.push(manager);\n };\n\n Transaction.prototype.scheduleInstallModifier = function (modifier, manager) {\n this.scheduledInstallManagers.push(manager);\n this.scheduledInstallModifiers.push(modifier);\n };\n\n Transaction.prototype.scheduleUpdateModifier = function (modifier, manager) {\n this.scheduledUpdateModifierManagers.push(manager);\n this.scheduledUpdateModifiers.push(modifier);\n };\n\n Transaction.prototype.didDestroy = function (d) {\n this.destructors.push(d);\n };\n\n Transaction.prototype.commit = function () {\n var createdComponents = this.createdComponents,\n createdManagers = this.createdManagers,\n i,\n component,\n manager,\n _i,\n _component,\n _manager,\n _i2,\n _i3,\n _manager2,\n modifier,\n _i4,\n _manager3,\n _modifier;\n\n for (i = 0; i < createdComponents.length; i++) {\n component = createdComponents[i];\n manager = createdManagers[i];\n\n manager.didCreate(component);\n }\n var updatedComponents = this.updatedComponents,\n updatedManagers = this.updatedManagers;\n\n for (_i = 0; _i < updatedComponents.length; _i++) {\n _component = updatedComponents[_i];\n _manager = updatedManagers[_i];\n\n _manager.didUpdate(_component);\n }\n var destructors = this.destructors;\n\n for (_i2 = 0; _i2 < destructors.length; _i2++) {\n destructors[_i2].destroy();\n }\n var scheduledInstallManagers = this.scheduledInstallManagers,\n scheduledInstallModifiers = this.scheduledInstallModifiers;\n\n for (_i3 = 0; _i3 < scheduledInstallManagers.length; _i3++) {\n _manager2 = scheduledInstallManagers[_i3];\n modifier = scheduledInstallModifiers[_i3];\n\n _manager2.install(modifier);\n }\n var scheduledUpdateModifierManagers = this.scheduledUpdateModifierManagers,\n scheduledUpdateModifiers = this.scheduledUpdateModifiers;\n\n for (_i4 = 0; _i4 < scheduledUpdateModifierManagers.length; _i4++) {\n _manager3 = scheduledUpdateModifierManagers[_i4];\n _modifier = scheduledUpdateModifiers[_i4];\n\n _manager3.update(_modifier);\n }\n };\n\n return Transaction;\n }();\n\n var Opcode = function () {\n function Opcode(heap) {\n _classCallCheck$23(this, Opcode);\n\n this.heap = heap;\n this.offset = 0;\n }\n\n _createClass$4(Opcode, [{\n key: 'type',\n get: function () {\n return this.heap.getbyaddr(this.offset);\n }\n }, {\n key: 'op1',\n get: function () {\n return this.heap.getbyaddr(this.offset + 1);\n }\n }, {\n key: 'op2',\n get: function () {\n return this.heap.getbyaddr(this.offset + 2);\n }\n }, {\n key: 'op3',\n get: function () {\n return this.heap.getbyaddr(this.offset + 3);\n }\n }]);\n\n return Opcode;\n }();\n var TableSlotState;\n (function (TableSlotState) {\n TableSlotState[TableSlotState[\"Allocated\"] = 0] = \"Allocated\";\n TableSlotState[TableSlotState[\"Freed\"] = 1] = \"Freed\";\n TableSlotState[TableSlotState[\"Purged\"] = 2] = \"Purged\";\n TableSlotState[TableSlotState[\"Pointer\"] = 3] = \"Pointer\";\n })(TableSlotState || (TableSlotState = {}));\n var Heap = function () {\n function Heap() {\n _classCallCheck$23(this, Heap);\n\n this.heap = [];\n this.offset = 0;\n this.handle = 0;\n /**\n * layout:\n *\n * - pointer into heap\n * - size\n * - freed (0 or 1)\n */\n this.table = [];\n }\n\n Heap.prototype.push = function (item) {\n this.heap[this.offset++] = item;\n };\n\n Heap.prototype.getbyaddr = function (address) {\n return this.heap[address];\n };\n\n Heap.prototype.setbyaddr = function (address, value) {\n this.heap[address] = value;\n };\n\n Heap.prototype.malloc = function () {\n this.table.push(this.offset, 0, 0);\n var handle = this.handle;\n this.handle += 3;\n return handle;\n };\n\n Heap.prototype.finishMalloc = function (handle) {\n var start = this.table[handle];\n var finish = this.offset;\n this.table[handle + 1] = finish - start;\n };\n\n Heap.prototype.size = function () {\n return this.offset;\n };\n // It is illegal to close over this address, as compaction\n // may move it. However, it is legal to use this address\n // multiple times between compactions.\n\n\n Heap.prototype.getaddr = function (handle) {\n return this.table[handle];\n };\n\n Heap.prototype.gethandle = function (address) {\n this.table.push(address, 0, TableSlotState.Pointer);\n var handle = this.handle;\n this.handle += 3;\n return handle;\n };\n\n Heap.prototype.sizeof = function () {\n return -1;\n };\n\n Heap.prototype.free = function (handle) {\n this.table[handle + 2] = 1;\n };\n\n Heap.prototype.compact = function () {\n var compactedSize = 0,\n i,\n offset,\n size,\n state,\n j;\n var table = this.table,\n length = this.table.length,\n heap = this.heap;\n\n for (i = 0; i < length; i += 3) {\n offset = table[i];\n size = table[i + 1];\n state = table[i + 2];\n\n if (state === TableSlotState.Purged) {\n continue;\n } else if (state === TableSlotState.Freed) {\n // transition to \"already freed\"\n // a good improvement would be to reuse\n // these slots\n table[i + 2] = 2;\n compactedSize += size;\n } else if (state === TableSlotState.Allocated) {\n for (j = offset; j <= i + size; j++) {\n heap[j - compactedSize] = heap[j];\n }\n table[i] = offset - compactedSize;\n } else if (state === TableSlotState.Pointer) {\n table[i] = offset - compactedSize;\n }\n }\n this.offset = this.offset - compactedSize;\n };\n\n return Heap;\n }();\n var Program = function () {\n function Program() {\n _classCallCheck$23(this, Program);\n\n this.heap = new Heap();\n this._opcode = new Opcode(this.heap);\n this.constants = new Constants();\n }\n\n Program.prototype.opcode = function (offset) {\n this._opcode.offset = offset;\n return this._opcode;\n };\n\n return Program;\n }();\n var Environment = function () {\n function Environment(_ref2) {\n var appendOperations = _ref2.appendOperations,\n updateOperations = _ref2.updateOperations;\n\n _classCallCheck$23(this, Environment);\n\n this._macros = null;\n this._transaction = null;\n this.program = new Program();\n this.appendOperations = appendOperations;\n this.updateOperations = updateOperations;\n }\n\n Environment.prototype.toConditionalReference = function (reference) {\n return new ConditionalReference(reference);\n };\n\n Environment.prototype.getAppendOperations = function () {\n return this.appendOperations;\n };\n\n Environment.prototype.getDOM = function () {\n return this.updateOperations;\n };\n\n Environment.prototype.getIdentity = function (object) {\n return (0, _util.ensureGuid)(object) + '';\n };\n\n Environment.prototype.begin = function () {\n (0, _util.assert)(!this._transaction, 'a glimmer transaction was begun, but one already exists. You may have a nested transaction');\n this._transaction = new Transaction();\n };\n\n Environment.prototype.didCreate = function (component, manager) {\n this.transaction.didCreate(component, manager);\n };\n\n Environment.prototype.didUpdate = function (component, manager) {\n this.transaction.didUpdate(component, manager);\n };\n\n Environment.prototype.scheduleInstallModifier = function (modifier, manager) {\n this.transaction.scheduleInstallModifier(modifier, manager);\n };\n\n Environment.prototype.scheduleUpdateModifier = function (modifier, manager) {\n this.transaction.scheduleUpdateModifier(modifier, manager);\n };\n\n Environment.prototype.didDestroy = function (d) {\n this.transaction.didDestroy(d);\n };\n\n Environment.prototype.commit = function () {\n var transaction = this.transaction;\n this._transaction = null;\n transaction.commit();\n };\n\n Environment.prototype.attributeFor = function (element, attr, isTrusting, namespace) {\n return defaultManagers(element, attr, isTrusting, namespace === undefined ? null : namespace);\n };\n\n Environment.prototype.macros = function () {\n var macros = this._macros;\n if (!macros) {\n this._macros = macros = this.populateBuiltins();\n }\n return macros;\n };\n\n Environment.prototype.populateBuiltins = function () {\n return populateBuiltins();\n };\n\n _createClass$4(Environment, [{\n key: 'transaction',\n get: function () {\n return this._transaction;\n }\n }]);\n\n return Environment;\n }();\n\n function _defaults$15(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults),\n i,\n key,\n value;for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }return obj;\n }\n\n var _createClass$5 = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _possibleConstructorReturn$15(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits$15(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults$15(subClass, superClass);\n }\n\n function _classCallCheck$30(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var UpdatingVM = function () {\n function UpdatingVM(env, _ref) {\n var _ref$alwaysRevalidate = _ref.alwaysRevalidate,\n alwaysRevalidate = _ref$alwaysRevalidate === undefined ? false : _ref$alwaysRevalidate;\n\n _classCallCheck$30(this, UpdatingVM);\n\n this.frameStack = new _util.Stack();\n this.env = env;\n this.constants = env.program.constants;\n this.dom = env.getDOM();\n this.alwaysRevalidate = alwaysRevalidate;\n }\n\n UpdatingVM.prototype.execute = function (opcodes, handler) {\n var frameStack = this.frameStack,\n opcode;\n\n this.try(opcodes, handler);\n while (true) {\n if (frameStack.isEmpty()) break;\n opcode = this.frame.nextStatement();\n\n if (opcode === null) {\n this.frameStack.pop();\n continue;\n }\n opcode.evaluate(this);\n }\n };\n\n UpdatingVM.prototype.goto = function (op) {\n this.frame.goto(op);\n };\n\n UpdatingVM.prototype.try = function (ops, handler) {\n this.frameStack.push(new UpdatingVMFrame(this, ops, handler));\n };\n\n UpdatingVM.prototype.throw = function () {\n this.frame.handleException();\n this.frameStack.pop();\n };\n\n UpdatingVM.prototype.evaluateOpcode = function (opcode) {\n opcode.evaluate(this);\n };\n\n _createClass$5(UpdatingVM, [{\n key: 'frame',\n get: function () {\n return this.frameStack.current;\n }\n }]);\n\n return UpdatingVM;\n }();\n\n var BlockOpcode = function (_UpdatingOpcode) {\n _inherits$15(BlockOpcode, _UpdatingOpcode);\n\n function BlockOpcode(start, state, bounds$$1, children) {\n _classCallCheck$30(this, BlockOpcode);\n\n var _this = _possibleConstructorReturn$15(this, _UpdatingOpcode.call(this));\n\n _this.start = start;\n _this.type = \"block\";\n _this.next = null;\n _this.prev = null;\n var env = state.env,\n scope = state.scope,\n dynamicScope = state.dynamicScope,\n stack = state.stack;\n\n _this.children = children;\n _this.env = env;\n _this.scope = scope;\n _this.dynamicScope = dynamicScope;\n _this.stack = stack;\n _this.bounds = bounds$$1;\n return _this;\n }\n\n BlockOpcode.prototype.parentElement = function () {\n return this.bounds.parentElement();\n };\n\n BlockOpcode.prototype.firstNode = function () {\n return this.bounds.firstNode();\n };\n\n BlockOpcode.prototype.lastNode = function () {\n return this.bounds.lastNode();\n };\n\n BlockOpcode.prototype.evaluate = function (vm) {\n vm.try(this.children, null);\n };\n\n BlockOpcode.prototype.destroy = function () {\n this.bounds.destroy();\n };\n\n BlockOpcode.prototype.didDestroy = function () {\n this.env.didDestroy(this.bounds);\n };\n\n BlockOpcode.prototype.toJSON = function () {\n var details = (0, _util.dict)();\n details[\"guid\"] = '' + this._guid;\n return {\n guid: this._guid,\n type: this.type,\n details: details,\n children: this.children.toArray().map(function (op) {\n return op.toJSON();\n })\n };\n };\n\n return BlockOpcode;\n }(UpdatingOpcode);\n var TryOpcode = function (_BlockOpcode) {\n _inherits$15(TryOpcode, _BlockOpcode);\n\n function TryOpcode(start, state, bounds$$1, children) {\n _classCallCheck$30(this, TryOpcode);\n\n var _this2 = _possibleConstructorReturn$15(this, _BlockOpcode.call(this, start, state, bounds$$1, children));\n\n _this2.type = \"try\";\n _this2.tag = _this2._tag = _reference2.UpdatableTag.create(_reference2.CONSTANT_TAG);\n return _this2;\n }\n\n TryOpcode.prototype.didInitializeChildren = function () {\n this._tag.inner.update((0, _reference2.combineSlice)(this.children));\n };\n\n TryOpcode.prototype.evaluate = function (vm) {\n vm.try(this.children, this);\n };\n\n TryOpcode.prototype.handleException = function () {\n var _this3 = this;\n\n var env = this.env,\n bounds$$1 = this.bounds,\n children = this.children,\n scope = this.scope,\n dynamicScope = this.dynamicScope,\n start = this.start,\n stack = this.stack,\n prev = this.prev,\n next = this.next;\n\n children.clear();\n var elementStack = ElementStack.resume(env, bounds$$1, bounds$$1.reset(env));\n var vm = new VM(env, scope, dynamicScope, elementStack);\n var updating = new _util.LinkedList();\n vm.execute(start, function (vm) {\n vm.stack = EvaluationStack.restore(stack);\n vm.updatingOpcodeStack.push(updating);\n vm.updateWith(_this3);\n vm.updatingOpcodeStack.push(children);\n });\n this.prev = prev;\n this.next = next;\n };\n\n TryOpcode.prototype.toJSON = function () {\n var json = _BlockOpcode.prototype.toJSON.call(this);\n var details = json[\"details\"];\n if (!details) {\n details = json[\"details\"] = {};\n }\n return _BlockOpcode.prototype.toJSON.call(this);\n };\n\n return TryOpcode;\n }(BlockOpcode);\n\n var ListRevalidationDelegate = function () {\n function ListRevalidationDelegate(opcode, marker) {\n _classCallCheck$30(this, ListRevalidationDelegate);\n\n this.opcode = opcode;\n this.marker = marker;\n this.didInsert = false;\n this.didDelete = false;\n this.map = opcode.map;\n this.updating = opcode['children'];\n }\n\n ListRevalidationDelegate.prototype.insert = function (key, item, memo, before) {\n var map$$1 = this.map,\n opcode = this.opcode,\n updating = this.updating;\n\n var nextSibling = null;\n var reference = null;\n if (before) {\n reference = map$$1[before];\n nextSibling = reference['bounds'].firstNode();\n } else {\n nextSibling = this.marker;\n }\n var vm = opcode.vmForInsertion(nextSibling);\n var tryOpcode = null;\n var start = opcode.start;\n\n vm.execute(start, function (vm) {\n map$$1[key] = tryOpcode = vm.iterate(memo, item);\n vm.updatingOpcodeStack.push(new _util.LinkedList());\n vm.updateWith(tryOpcode);\n vm.updatingOpcodeStack.push(tryOpcode.children);\n });\n updating.insertBefore(tryOpcode, reference);\n this.didInsert = true;\n };\n\n ListRevalidationDelegate.prototype.retain = function () {};\n\n ListRevalidationDelegate.prototype.move = function (key, _item, _memo, before) {\n var map$$1 = this.map,\n updating = this.updating;\n\n var entry = map$$1[key];\n var reference = map$$1[before] || null;\n if (before) {\n move(entry, reference.firstNode());\n } else {\n move(entry, this.marker);\n }\n updating.remove(entry);\n updating.insertBefore(entry, reference);\n };\n\n ListRevalidationDelegate.prototype.delete = function (key) {\n var map$$1 = this.map;\n\n var opcode = map$$1[key];\n opcode.didDestroy();\n clear(opcode);\n this.updating.remove(opcode);\n delete map$$1[key];\n this.didDelete = true;\n };\n\n ListRevalidationDelegate.prototype.done = function () {\n this.opcode.didInitializeChildren(this.didInsert || this.didDelete);\n };\n\n return ListRevalidationDelegate;\n }();\n\n var ListBlockOpcode = function (_BlockOpcode2) {\n _inherits$15(ListBlockOpcode, _BlockOpcode2);\n\n function ListBlockOpcode(start, state, bounds$$1, children, artifacts) {\n _classCallCheck$30(this, ListBlockOpcode);\n\n var _this4 = _possibleConstructorReturn$15(this, _BlockOpcode2.call(this, start, state, bounds$$1, children));\n\n _this4.type = \"list-block\";\n _this4.map = (0, _util.dict)();\n _this4.lastIterated = _reference2.INITIAL;\n _this4.artifacts = artifacts;\n var _tag = _this4._tag = _reference2.UpdatableTag.create(_reference2.CONSTANT_TAG);\n _this4.tag = (0, _reference2.combine)([artifacts.tag, _tag]);\n return _this4;\n }\n\n ListBlockOpcode.prototype.didInitializeChildren = function () {\n var listDidChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n this.lastIterated = this.artifacts.tag.value();\n if (listDidChange) {\n this._tag.inner.update((0, _reference2.combineSlice)(this.children));\n }\n };\n\n ListBlockOpcode.prototype.evaluate = function (vm) {\n var artifacts = this.artifacts,\n lastIterated = this.lastIterated,\n bounds$$1,\n dom,\n marker,\n target,\n synchronizer;\n\n if (!artifacts.tag.validate(lastIterated)) {\n bounds$$1 = this.bounds;\n dom = vm.dom;\n marker = dom.createComment('');\n\n dom.insertAfter(bounds$$1.parentElement(), marker, bounds$$1.lastNode());\n target = new ListRevalidationDelegate(this, marker);\n synchronizer = new _reference2.IteratorSynchronizer({ target: target, artifacts: artifacts });\n\n synchronizer.sync();\n this.parentElement().removeChild(marker);\n }\n // Run now-updated updating opcodes\n _BlockOpcode2.prototype.evaluate.call(this, vm);\n };\n\n ListBlockOpcode.prototype.vmForInsertion = function (nextSibling) {\n var env = this.env,\n scope = this.scope,\n dynamicScope = this.dynamicScope;\n\n var elementStack = ElementStack.forInitialRender(this.env, this.bounds.parentElement(), nextSibling);\n return new VM(env, scope, dynamicScope, elementStack);\n };\n\n ListBlockOpcode.prototype.toJSON = function () {\n var json = _BlockOpcode2.prototype.toJSON.call(this);\n var map$$1 = this.map;\n var inner = Object.keys(map$$1).map(function (key) {\n return JSON.stringify(key) + ': ' + map$$1[key]._guid;\n }).join(\", \");\n var details = json[\"details\"];\n if (!details) {\n details = json[\"details\"] = {};\n }\n details[\"map\"] = '{' + inner + '}';\n return json;\n };\n\n return ListBlockOpcode;\n }(BlockOpcode);\n\n var UpdatingVMFrame = function () {\n function UpdatingVMFrame(vm, ops, exceptionHandler) {\n _classCallCheck$30(this, UpdatingVMFrame);\n\n this.vm = vm;\n this.ops = ops;\n this.exceptionHandler = exceptionHandler;\n this.vm = vm;\n this.ops = ops;\n this.current = ops.head();\n }\n\n UpdatingVMFrame.prototype.goto = function (op) {\n this.current = op;\n };\n\n UpdatingVMFrame.prototype.nextStatement = function () {\n var current = this.current,\n ops = this.ops;\n\n if (current) this.current = ops.nextNode(current);\n return current;\n };\n\n UpdatingVMFrame.prototype.handleException = function () {\n if (this.exceptionHandler) {\n this.exceptionHandler.handleException();\n }\n };\n\n return UpdatingVMFrame;\n }();\n\n function _classCallCheck$31(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var RenderResult = function () {\n function RenderResult(env, updating, bounds$$1) {\n _classCallCheck$31(this, RenderResult);\n\n this.env = env;\n this.updating = updating;\n this.bounds = bounds$$1;\n }\n\n RenderResult.prototype.rerender = function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { alwaysRevalidate: false },\n _ref$alwaysRevalidate = _ref.alwaysRevalidate,\n alwaysRevalidate = _ref$alwaysRevalidate === undefined ? false : _ref$alwaysRevalidate;\n\n var env = this.env,\n updating = this.updating;\n\n var vm = new UpdatingVM(env, { alwaysRevalidate: alwaysRevalidate });\n vm.execute(updating, this);\n };\n\n RenderResult.prototype.parentElement = function () {\n return this.bounds.parentElement();\n };\n\n RenderResult.prototype.firstNode = function () {\n return this.bounds.firstNode();\n };\n\n RenderResult.prototype.lastNode = function () {\n return this.bounds.lastNode();\n };\n\n RenderResult.prototype.opcodes = function () {\n return this.updating;\n };\n\n RenderResult.prototype.handleException = function () {\n throw \"this should never happen\";\n };\n\n RenderResult.prototype.destroy = function () {\n this.bounds.destroy();\n clear(this.bounds);\n };\n\n return RenderResult;\n }();\n\n var _createClass$3 = function () {\n function defineProperties(target, props) {\n var i, descriptor;\n\n for (i = 0; i < props.length; i++) {\n descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n }();\n\n function _classCallCheck$22(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var EvaluationStack = function () {\n function EvaluationStack(stack, fp, sp) {\n _classCallCheck$22(this, EvaluationStack);\n\n this.stack = stack;\n this.fp = fp;\n this.sp = sp;\n }\n\n EvaluationStack.empty = function () {\n return new this([], 0, -1);\n };\n\n EvaluationStack.restore = function (snapshot) {\n return new this(snapshot.slice(), 0, snapshot.length - 1);\n };\n\n EvaluationStack.prototype.isEmpty = function () {\n return this.sp === -1;\n };\n\n EvaluationStack.prototype.push = function (value) {\n this.stack[++this.sp] = value;\n };\n\n EvaluationStack.prototype.dup = function () {\n var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.sp;\n\n this.push(this.stack[position]);\n };\n\n EvaluationStack.prototype.pop = function () {\n var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n\n var top = this.stack[this.sp];\n this.sp -= n;\n return top;\n };\n\n EvaluationStack.prototype.peek = function () {\n return this.stack[this.sp];\n };\n\n EvaluationStack.prototype.fromBase = function (offset) {\n return this.stack[this.fp - offset];\n };\n\n EvaluationStack.prototype.fromTop = function (offset) {\n return this.stack[this.sp - offset];\n };\n\n EvaluationStack.prototype.capture = function (items) {\n var end = this.sp + 1;\n\n return this.stack.slice(end - items, end);\n };\n\n EvaluationStack.prototype.reset = function () {\n this.stack.length = 0;\n };\n\n EvaluationStack.prototype.toArray = function () {\n return this.stack.slice(this.fp, this.sp + 1);\n };\n\n return EvaluationStack;\n }();\n\n var VM = function () {\n function VM(env, scope, dynamicScope, elementStack) {\n _classCallCheck$22(this, VM);\n\n this.env = env;\n this.elementStack = elementStack;\n this.dynamicScopeStack = new _util.Stack();\n this.scopeStack = new _util.Stack();\n this.updatingOpcodeStack = new _util.Stack();\n this.cacheGroups = new _util.Stack();\n this.listBlockStack = new _util.Stack();\n this.stack = EvaluationStack.empty();\n /* Registers */\n this.pc = -1;\n this.ra = -1;\n this.s0 = null;\n this.s1 = null;\n this.t0 = null;\n this.t1 = null;\n this.env = env;\n this.heap = env.program.heap;\n this.constants = env.program.constants;\n this.elementStack = elementStack;\n this.scopeStack.push(scope);\n this.dynamicScopeStack.push(dynamicScope);\n }\n\n // Fetch a value from a register onto the stack\n VM.prototype.fetch = function (register) {\n this.stack.push(this[Register[register]]);\n };\n // Load a value from the stack into a register\n\n\n VM.prototype.load = function (register) {\n this[Register[register]] = this.stack.pop();\n };\n // Fetch a value from a register\n\n\n VM.prototype.fetchValue = function (register) {\n return this[Register[register]];\n };\n // Load a value into a register\n\n\n VM.prototype.loadValue = function (register, value) {\n this[Register[register]] = value;\n };\n // Start a new frame and save $ra and $fp on the stack\n\n\n VM.prototype.pushFrame = function () {\n this.stack.push(this.ra);\n this.stack.push(this.fp);\n this.fp = this.sp - 1;\n };\n // Restore $ra, $sp and $fp\n\n\n VM.prototype.popFrame = function () {\n this.sp = this.fp - 1;\n this.ra = this.stack.fromBase(0);\n this.fp = this.stack.fromBase(-1);\n };\n // Jump to an address in `program`\n\n\n VM.prototype.goto = function (offset) {\n this.pc = (0, _util.typePos)(this.pc + offset);\n };\n // Save $pc into $ra, then jump to a new address in `program` (jal in MIPS)\n\n\n VM.prototype.call = function (handle) {\n var pc = this.heap.getaddr(handle);\n this.ra = this.pc;\n this.pc = pc;\n };\n // Put a specific `program` address in $ra\n\n\n VM.prototype.returnTo = function (offset) {\n this.ra = (0, _util.typePos)(this.pc + offset);\n };\n // Return to the `program` address stored in $ra\n\n\n VM.prototype.return = function () {\n this.pc = this.ra;\n };\n\n VM.initial = function (env, self, dynamicScope, elementStack, program) {\n var scope = Scope.root(self, program.symbolTable.symbols.length);\n var vm = new VM(env, scope, dynamicScope, elementStack);\n vm.pc = vm.heap.getaddr(program.handle);\n vm.updatingOpcodeStack.push(new _util.LinkedList());\n return vm;\n };\n\n VM.prototype.capture = function (args) {\n return {\n dynamicScope: this.dynamicScope(),\n env: this.env,\n scope: this.scope(),\n stack: this.stack.capture(args)\n };\n };\n\n VM.prototype.beginCacheGroup = function () {\n this.cacheGroups.push(this.updating().tail());\n };\n\n VM.prototype.commitCacheGroup = function () {\n // JumpIfNotModified(END)\n // (head)\n // (....)\n // (tail)\n // DidModify\n // END: Noop\n var END = new LabelOpcode(\"END\");\n var opcodes = this.updating();\n var marker = this.cacheGroups.pop();\n var head = marker ? opcodes.nextNode(marker) : opcodes.head();\n var tail = opcodes.tail();\n var tag = (0, _reference2.combineSlice)(new _util.ListSlice(head, tail));\n var guard = new JumpIfNotModifiedOpcode(tag, END);\n opcodes.insertBefore(guard, head);\n opcodes.append(new DidModifyOpcode(guard));\n opcodes.append(END);\n };\n\n VM.prototype.enter = function (args) {\n var updating = new _util.LinkedList();\n var state = this.capture(args);\n var tracker = this.elements().pushUpdatableBlock();\n var tryOpcode = new TryOpcode(this.heap.gethandle(this.pc), state, tracker, updating);\n this.didEnter(tryOpcode);\n };\n\n VM.prototype.iterate = function (memo, value) {\n var stack = this.stack;\n stack.push(value);\n stack.push(memo);\n var state = this.capture(2);\n var tracker = this.elements().pushUpdatableBlock();\n // let ip = this.ip;\n // this.ip = end + 4;\n // this.frames.push(ip);\n return new TryOpcode(this.heap.gethandle(this.pc), state, tracker, new _util.LinkedList());\n };\n\n VM.prototype.enterItem = function (key, opcode) {\n this.listBlock().map[key] = opcode;\n this.didEnter(opcode);\n };\n\n VM.prototype.enterList = function (relativeStart) {\n var updating = new _util.LinkedList();\n var state = this.capture(0);\n var tracker = this.elements().pushBlockList(updating);\n var artifacts = this.stack.peek().artifacts;\n var start = this.heap.gethandle((0, _util.typePos)(this.pc + relativeStart));\n var opcode = new ListBlockOpcode(start, state, tracker, updating, artifacts);\n this.listBlockStack.push(opcode);\n this.didEnter(opcode);\n };\n\n VM.prototype.didEnter = function (opcode) {\n this.updateWith(opcode);\n this.updatingOpcodeStack.push(opcode.children);\n };\n\n VM.prototype.exit = function () {\n this.elements().popBlock();\n this.updatingOpcodeStack.pop();\n var parent = this.updating().tail();\n parent.didInitializeChildren();\n };\n\n VM.prototype.exitList = function () {\n this.exit();\n this.listBlockStack.pop();\n };\n\n VM.prototype.updateWith = function (opcode) {\n this.updating().append(opcode);\n };\n\n VM.prototype.listBlock = function () {\n return this.listBlockStack.current;\n };\n\n VM.prototype.updating = function () {\n return this.updatingOpcodeStack.current;\n };\n\n VM.prototype.elements = function () {\n return this.elementStack;\n };\n\n VM.prototype.scope = function () {\n return this.scopeStack.current;\n };\n\n VM.prototype.dynamicScope = function () {\n return this.dynamicScopeStack.current;\n };\n\n VM.prototype.pushChildScope = function () {\n this.scopeStack.push(this.scope().child());\n };\n\n VM.prototype.pushCallerScope = function () {\n var childScope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var callerScope = this.scope().getCallerScope();\n this.scopeStack.push(childScope ? callerScope.child() : callerScope);\n };\n\n VM.prototype.pushDynamicScope = function () {\n var child = this.dynamicScope().child();\n this.dynamicScopeStack.push(child);\n return child;\n };\n\n VM.prototype.pushRootScope = function (size, bindCaller) {\n var scope = Scope.sized(size);\n if (bindCaller) scope.bindCallerScope(this.scope());\n this.scopeStack.push(scope);\n return scope;\n };\n\n VM.prototype.popScope = function () {\n this.scopeStack.pop();\n };\n\n VM.prototype.popDynamicScope = function () {\n this.dynamicScopeStack.pop();\n };\n\n VM.prototype.newDestroyable = function (d) {\n this.elements().newDestroyable(d);\n };\n /// SCOPE HELPERS\n\n\n VM.prototype.getSelf = function () {\n return this.scope().getSelf();\n };\n\n VM.prototype.referenceForSymbol = function (symbol) {\n return this.scope().getSymbol(symbol);\n };\n /// EXECUTION\n\n\n VM.prototype.execute = function (start, initialize) {\n this.pc = this.heap.getaddr(start);\n if (initialize) initialize(this);\n var result = void 0;\n while (true) {\n result = this.next();\n if (result.done) break;\n }\n return result.value;\n };\n\n VM.prototype.next = function () {\n var env = this.env,\n updatingOpcodeStack = this.updatingOpcodeStack,\n elementStack = this.elementStack;\n\n var opcode = this.nextStatement(env);\n var result = void 0;\n if (opcode !== null) {\n APPEND_OPCODES.evaluate(this, opcode, opcode.type);\n result = { done: false, value: null };\n } else {\n // Unload the stack\n this.stack.reset();\n result = {\n done: true,\n value: new RenderResult(env, updatingOpcodeStack.pop(), elementStack.popBlock())\n };\n }\n return result;\n };\n\n VM.prototype.nextStatement = function (env) {\n var pc = this.pc;\n\n if (pc === -1) {\n return null;\n }\n var program = env.program;\n this.pc += 4;\n return program.opcode(pc);\n };\n\n VM.prototype.evaluateOpcode = function (opcode) {\n APPEND_OPCODES.evaluate(this, opcode, opcode.type);\n };\n\n VM.prototype.bindDynamicScope = function (names) {\n var scope = this.dynamicScope(),\n i,\n name;\n for (i = names.length - 1; i >= 0; i--) {\n name = this.constants.getString(names[i]);\n\n scope.set(name, this.stack.pop());\n }\n };\n\n _createClass$3(VM, [{\n key: 'fp',\n get: function () {\n return this.stack.fp;\n },\n set: function (fp) {\n this.stack.fp = fp;\n }\n }, {\n key: 'sp',\n get: function () {\n return this.stack.sp;\n },\n set: function (sp) {\n this.stack.sp = sp;\n }\n }]);\n\n return VM;\n }();\n\n function _classCallCheck$14(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var TemplateIterator = function () {\n function TemplateIterator(vm) {\n _classCallCheck$14(this, TemplateIterator);\n\n this.vm = vm;\n }\n\n TemplateIterator.prototype.next = function () {\n return this.vm.next();\n };\n\n return TemplateIterator;\n }();\n var clientId = 0;\n\n\n var ScannableTemplate = function () {\n function ScannableTemplate(id, meta, env, rawBlock) {\n _classCallCheck$14(this, ScannableTemplate);\n\n this.id = id;\n this.meta = meta;\n this.env = env;\n this.entryPoint = null;\n this.layout = null;\n this.partial = null;\n this.block = null;\n this.scanner = new Scanner(rawBlock, env);\n this.symbols = rawBlock.symbols;\n this.hasEval = rawBlock.hasEval;\n }\n\n ScannableTemplate.prototype.render = function (self, appendTo, dynamicScope) {\n var env = this.env;\n\n var elementStack = ElementStack.forInitialRender(env, appendTo, null);\n var compiled = this.asEntryPoint().compileDynamic(env);\n var vm = VM.initial(env, self, dynamicScope, elementStack, compiled);\n return new TemplateIterator(vm);\n };\n\n ScannableTemplate.prototype.asEntryPoint = function () {\n if (!this.entryPoint) this.entryPoint = this.scanner.scanEntryPoint(this.compilationMeta());\n return this.entryPoint;\n };\n\n ScannableTemplate.prototype.asLayout = function (componentName, attrs) {\n if (!this.layout) this.layout = this.scanner.scanLayout(this.compilationMeta(), attrs || _util.EMPTY_ARRAY, componentName);\n return this.layout;\n };\n\n ScannableTemplate.prototype.asPartial = function () {\n if (!this.partial) this.partial = this.scanner.scanEntryPoint(this.compilationMeta(true));\n return this.partial;\n };\n\n ScannableTemplate.prototype.asBlock = function () {\n if (!this.block) this.block = this.scanner.scanBlock(this.compilationMeta());\n return this.block;\n };\n\n ScannableTemplate.prototype.compilationMeta = function () {\n var asPartial = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n return { templateMeta: this.meta, symbols: this.symbols, asPartial: asPartial };\n };\n\n return ScannableTemplate;\n }();\n\n function _classCallCheck$32(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var DynamicVarReference = function () {\n function DynamicVarReference(scope, nameRef) {\n _classCallCheck$32(this, DynamicVarReference);\n\n this.scope = scope;\n this.nameRef = nameRef;\n var varTag = this.varTag = _reference2.UpdatableTag.create(_reference2.CONSTANT_TAG);\n this.tag = (0, _reference2.combine)([nameRef.tag, varTag]);\n }\n\n DynamicVarReference.prototype.value = function () {\n return this.getVar().value();\n };\n\n DynamicVarReference.prototype.get = function (key) {\n return this.getVar().get(key);\n };\n\n DynamicVarReference.prototype.getVar = function () {\n var name = String(this.nameRef.value());\n var ref = this.scope.get(name);\n this.varTag.inner.update(ref.tag);\n return ref;\n };\n\n return DynamicVarReference;\n }();\n\n function _classCallCheck$33(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var NodeType;\n (function (NodeType) {\n NodeType[NodeType[\"Element\"] = 0] = \"Element\";\n NodeType[NodeType[\"Attribute\"] = 1] = \"Attribute\";\n NodeType[NodeType[\"Text\"] = 2] = \"Text\";\n NodeType[NodeType[\"CdataSection\"] = 3] = \"CdataSection\";\n NodeType[NodeType[\"EntityReference\"] = 4] = \"EntityReference\";\n NodeType[NodeType[\"Entity\"] = 5] = \"Entity\";\n NodeType[NodeType[\"ProcessingInstruction\"] = 6] = \"ProcessingInstruction\";\n NodeType[NodeType[\"Comment\"] = 7] = \"Comment\";\n NodeType[NodeType[\"Document\"] = 8] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 9] = \"DocumentType\";\n NodeType[NodeType[\"DocumentFragment\"] = 10] = \"DocumentFragment\";\n NodeType[NodeType[\"Notation\"] = 11] = \"Notation\";\n })(NodeType || (NodeType = {}));\n\n var interfaces = Object.freeze({\n get NodeType() {\n return NodeType;\n }\n });\n\n exports.Simple = interfaces;\n exports.templateFactory = function (_ref) {\n var templateId = _ref.id,\n meta = _ref.meta,\n block = _ref.block;\n\n var parsedBlock = void 0;\n var id = templateId || 'client-' + clientId++;\n\n return { id: id, meta: meta, create: function (env, envMeta) {\n var newMeta = envMeta ? (0, _util.assign)({}, envMeta, meta) : meta;\n if (!parsedBlock) {\n parsedBlock = JSON.parse(block);\n }\n return new ScannableTemplate(id, newMeta, env, parsedBlock);\n } };\n };\n exports.NULL_REFERENCE = NULL_REFERENCE;\n exports.UNDEFINED_REFERENCE = UNDEFINED_REFERENCE;\n exports.PrimitiveReference = PrimitiveReference;\n exports.ConditionalReference = ConditionalReference;\n exports.OpcodeBuilderDSL = OpcodeBuilder;\n exports.compileLayout = function (compilable, env) {\n var builder = new ComponentLayoutBuilder(env);\n compilable.compile(builder);\n return builder.compile();\n };\n exports.CompiledStaticTemplate = CompiledStaticTemplate;\n exports.CompiledDynamicTemplate = CompiledDynamicTemplate;\n exports.IAttributeManager = AttributeManager;\n exports.AttributeManager = AttributeManager;\n exports.PropertyManager = PropertyManager;\n exports.INPUT_VALUE_PROPERTY_MANAGER = INPUT_VALUE_PROPERTY_MANAGER;\n exports.defaultManagers = defaultManagers;\n exports.defaultAttributeManagers = defaultAttributeManagers;\n exports.defaultPropertyManagers = defaultPropertyManagers;\n exports.readDOMAttr = function (element, attr) {\n var isSVG = element.namespaceURI === SVG_NAMESPACE$$1;\n\n var _normalizeProperty2 = normalizeProperty(element, attr),\n type = _normalizeProperty2.type,\n normalized = _normalizeProperty2.normalized;\n\n if (isSVG) {\n return element.getAttribute(normalized);\n }\n if (type === 'attr') {\n return element.getAttribute(normalized);\n }\n {\n return element[normalized];\n }\n };\n exports.Register = Register;\n exports.debugSlice = function () {};\n exports.normalizeTextValue = normalizeTextValue;\n exports.setDebuggerCallback = function (cb) {\n callback = cb;\n };\n exports.resetDebuggerCallback = function () {\n callback = debugCallback;\n };\n exports.getDynamicVar = function (vm, args) {\n var scope = vm.dynamicScope();\n var nameRef = args.positional.at(0);\n return new DynamicVarReference(scope, nameRef);\n };\n exports.BlockMacros = Blocks;\n exports.InlineMacros = Inlines;\n exports.compileList = compileList;\n exports.compileExpression = expr;\n exports.UpdatingVM = UpdatingVM;\n exports.RenderResult = RenderResult;\n exports.isSafeString = isSafeString;\n exports.Scope = Scope;\n exports.Environment = Environment;\n exports.PartialDefinition = function PartialDefinition(name, // for debugging\n template) {\n _classCallCheck$33(this, PartialDefinition);\n\n this.name = name;\n this.template = template;\n };\n exports.ComponentDefinition = function ComponentDefinition(name, manager, ComponentClass) {\n _classCallCheck$10(this, ComponentDefinition);\n\n this[COMPONENT_DEFINITION_BRAND] = true;\n this.name = name;\n this.manager = manager;\n this.ComponentClass = ComponentClass;\n };\n exports.isComponentDefinition = isComponentDefinition;\n exports.DOMChanges = helper$1;\n exports.IDOMChanges = DOMChanges;\n exports.DOMTreeConstruction = DOMTreeConstruction;\n exports.isWhitespace = function (string) {\n return WHITESPACE.test(string);\n };\n exports.insertHTMLBefore = _insertHTMLBefore;\n exports.ElementStack = ElementStack;\n exports.ConcreteBounds = ConcreteBounds;\n});","enifed('@glimmer/util', ['exports'], function (exports) {\n 'use strict';\n\n // There is a small whitelist of namespaced attributes specially\n // enumerated in\n // https://www.w3.org/TR/html/syntax.html#attributes-0\n //\n // > When a foreign element has one of the namespaced attributes given by\n // > the local name and namespace of the first and second cells of a row\n // > from the following table, it must be written using the name given by\n // > the third cell from the same row.\n //\n // In all other cases, colons are interpreted as a regular character\n // with no special meaning:\n //\n // > No other namespaced attribute can be expressed in the HTML syntax.\n\n var XLINK = 'http://www.w3.org/1999/xlink';\n var XML = 'http://www.w3.org/XML/1998/namespace';\n var XMLNS = 'http://www.w3.org/2000/xmlns/';\n var WHITELIST = {\n 'xlink:actuate': XLINK,\n 'xlink:arcrole': XLINK,\n 'xlink:href': XLINK,\n 'xlink:role': XLINK,\n 'xlink:show': XLINK,\n 'xlink:title': XLINK,\n 'xlink:type': XLINK,\n 'xml:base': XML,\n 'xml:lang': XML,\n 'xml:space': XML,\n 'xmlns': XMLNS,\n 'xmlns:xlink': XMLNS\n };\n\n // import Logger from './logger';\n // let alreadyWarned = false;\n // import Logger from './logger';\n\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var LogLevel;\n (function (LogLevel) {\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n LogLevel[LogLevel[\"Warn\"] = 2] = \"Warn\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n })(LogLevel || (exports.LogLevel = LogLevel = {}));\n\n var NullConsole = function () {\n function NullConsole() {\n _classCallCheck(this, NullConsole);\n }\n\n NullConsole.prototype.log = function () {};\n\n NullConsole.prototype.warn = function () {};\n\n NullConsole.prototype.error = function () {};\n\n NullConsole.prototype.trace = function () {};\n\n return NullConsole;\n }();\n\n var ALWAYS = void 0;\n var Logger = function () {\n function Logger(_ref) {\n var console = _ref.console,\n level = _ref.level;\n\n _classCallCheck(this, Logger);\n\n this.f = ALWAYS;\n this.force = ALWAYS;\n this.console = console;\n this.level = level;\n }\n\n Logger.prototype.skipped = function (level) {\n return level < this.level;\n };\n\n Logger.prototype.trace = function (message) {\n var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref2$stackTrace = _ref2.stackTrace,\n stackTrace = _ref2$stackTrace === undefined ? false : _ref2$stackTrace;\n\n if (this.skipped(LogLevel.Trace)) return;\n this.console.log(message);\n if (stackTrace) this.console.trace();\n };\n\n Logger.prototype.debug = function (message) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref3$stackTrace = _ref3.stackTrace,\n stackTrace = _ref3$stackTrace === undefined ? false : _ref3$stackTrace;\n\n if (this.skipped(LogLevel.Debug)) return;\n this.console.log(message);\n if (stackTrace) this.console.trace();\n };\n\n Logger.prototype.warn = function (message) {\n var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref4$stackTrace = _ref4.stackTrace,\n stackTrace = _ref4$stackTrace === undefined ? false : _ref4$stackTrace;\n\n if (this.skipped(LogLevel.Warn)) return;\n this.console.warn(message);\n if (stackTrace) this.console.trace();\n };\n\n Logger.prototype.error = function (message) {\n if (this.skipped(LogLevel.Error)) return;\n this.console.error(message);\n };\n\n return Logger;\n }();\n var _console = typeof console === 'undefined' ? new NullConsole() : console;\n ALWAYS = new Logger({ console: _console, level: LogLevel.Trace });\n var LOG_LEVEL = LogLevel.Debug;\n var logger = new Logger({ console: _console, level: LOG_LEVEL });\n\n var objKeys = Object.keys;\n\n var GUID = 0;\n function initializeGuid(object) {\n return object._guid = ++GUID;\n }\n function ensureGuid(object) {\n return object._guid || initializeGuid(object);\n }\n\n function _classCallCheck$1(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var proto = Object.create(null, {\n // without this, we will always still end up with (new\n // EmptyObject()).constructor === Object\n constructor: {\n value: undefined,\n enumerable: false,\n writable: true\n }\n });\n function EmptyObject() {}\n EmptyObject.prototype = proto;\n function dict() {\n // let d = Object.create(null);\n // d.x = 1;\n // delete d.x;\n // return d;\n return new EmptyObject();\n }\n var DictSet = function () {\n function DictSet() {\n _classCallCheck$1(this, DictSet);\n\n this.dict = dict();\n }\n\n DictSet.prototype.add = function (obj) {\n if (typeof obj === 'string') this.dict[obj] = obj;else this.dict[ensureGuid(obj)] = obj;\n return this;\n };\n\n DictSet.prototype.delete = function (obj) {\n if (typeof obj === 'string') delete this.dict[obj];else if (obj._guid) delete this.dict[obj._guid];\n };\n\n DictSet.prototype.forEach = function (callback) {\n var dict = this.dict,\n i;\n\n var dictKeys = Object.keys(dict);\n for (i = 0; dictKeys.length; i++) {\n callback(dict[dictKeys[i]]);\n }\n };\n\n DictSet.prototype.toArray = function () {\n return Object.keys(this.dict);\n };\n\n return DictSet;\n }();\n var Stack = function () {\n function Stack() {\n _classCallCheck$1(this, Stack);\n\n this.stack = [];\n this.current = null;\n }\n\n Stack.prototype.toArray = function () {\n return this.stack;\n };\n\n Stack.prototype.push = function (item) {\n this.current = item;\n this.stack.push(item);\n };\n\n Stack.prototype.pop = function () {\n var item = this.stack.pop();\n var len = this.stack.length;\n this.current = len === 0 ? null : this.stack[len - 1];\n return item === undefined ? null : item;\n };\n\n Stack.prototype.isEmpty = function () {\n return this.stack.length === 0;\n };\n\n return Stack;\n }();\n\n function _classCallCheck$2(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var LinkedList = function () {\n function LinkedList() {\n _classCallCheck$2(this, LinkedList);\n\n this.clear();\n }\n\n LinkedList.fromSlice = function (slice) {\n var list = new LinkedList();\n slice.forEachNode(function (n) {\n return list.append(n.clone());\n });\n return list;\n };\n\n LinkedList.prototype.head = function () {\n return this._head;\n };\n\n LinkedList.prototype.tail = function () {\n return this._tail;\n };\n\n LinkedList.prototype.clear = function () {\n this._head = this._tail = null;\n };\n\n LinkedList.prototype.isEmpty = function () {\n return this._head === null;\n };\n\n LinkedList.prototype.toArray = function () {\n var out = [];\n this.forEachNode(function (n) {\n return out.push(n);\n });\n return out;\n };\n\n LinkedList.prototype.splice = function (start, end, reference) {\n var before = void 0;\n if (reference === null) {\n before = this._tail;\n this._tail = end;\n } else {\n before = reference.prev;\n end.next = reference;\n reference.prev = end;\n }\n if (before) {\n before.next = start;\n start.prev = before;\n }\n };\n\n LinkedList.prototype.nextNode = function (node) {\n return node.next;\n };\n\n LinkedList.prototype.prevNode = function (node) {\n return node.prev;\n };\n\n LinkedList.prototype.forEachNode = function (callback) {\n var node = this._head;\n while (node !== null) {\n callback(node);\n node = node.next;\n }\n };\n\n LinkedList.prototype.contains = function (needle) {\n var node = this._head;\n while (node !== null) {\n if (node === needle) return true;\n node = node.next;\n }\n return false;\n };\n\n LinkedList.prototype.insertBefore = function (node) {\n var reference = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (reference === null) return this.append(node);\n if (reference.prev) reference.prev.next = node;else this._head = node;\n node.prev = reference.prev;\n node.next = reference;\n reference.prev = node;\n return node;\n };\n\n LinkedList.prototype.append = function (node) {\n var tail = this._tail;\n if (tail) {\n tail.next = node;\n node.prev = tail;\n node.next = null;\n } else {\n this._head = node;\n }\n return this._tail = node;\n };\n\n LinkedList.prototype.pop = function () {\n if (this._tail) return this.remove(this._tail);\n return null;\n };\n\n LinkedList.prototype.prepend = function (node) {\n if (this._head) return this.insertBefore(node, this._head);\n return this._head = this._tail = node;\n };\n\n LinkedList.prototype.remove = function (node) {\n if (node.prev) node.prev.next = node.next;else this._head = node.next;\n if (node.next) node.next.prev = node.prev;else this._tail = node.prev;\n return node;\n };\n\n return LinkedList;\n }();\n var ListSlice = function () {\n function ListSlice(head, tail) {\n _classCallCheck$2(this, ListSlice);\n\n this._head = head;\n this._tail = tail;\n }\n\n ListSlice.toList = function (slice) {\n var list = new LinkedList();\n slice.forEachNode(function (n) {\n return list.append(n.clone());\n });\n return list;\n };\n\n ListSlice.prototype.forEachNode = function (callback) {\n var node = this._head;\n while (node !== null) {\n callback(node);\n node = this.nextNode(node);\n }\n };\n\n ListSlice.prototype.contains = function (needle) {\n var node = this._head;\n while (node !== null) {\n if (node === needle) return true;\n node = node.next;\n }\n return false;\n };\n\n ListSlice.prototype.head = function () {\n return this._head;\n };\n\n ListSlice.prototype.tail = function () {\n return this._tail;\n };\n\n ListSlice.prototype.toArray = function () {\n var out = [];\n this.forEachNode(function (n) {\n return out.push(n);\n });\n return out;\n };\n\n ListSlice.prototype.nextNode = function (node) {\n if (node === this._tail) return null;\n return node.next;\n };\n\n ListSlice.prototype.prevNode = function (node) {\n if (node === this._head) return null;\n return node.prev;\n };\n\n ListSlice.prototype.isEmpty = function () {\n return false;\n };\n\n return ListSlice;\n }();\n var EMPTY_SLICE = new ListSlice(null, null);\n\n var HAS_NATIVE_WEAKMAP = function () {\n // detect if `WeakMap` is even present\n var hasWeakMap = typeof WeakMap === 'function';\n if (!hasWeakMap) {\n return false;\n }\n var instance = new WeakMap();\n // use `Object`'s `.toString` directly to prevent us from detecting\n // polyfills as native weakmaps\n return Object.prototype.toString.call(instance) === '[object WeakMap]';\n }();\n\n var HAS_TYPED_ARRAYS = typeof Uint32Array !== 'undefined';\n var A = void 0;\n if (HAS_TYPED_ARRAYS) {\n A = Uint32Array;\n } else {\n A = Array;\n }\n var A$1 = A;\n var EMPTY_ARRAY = HAS_NATIVE_WEAKMAP ? Object.freeze([]) : [];\n\n exports.getAttrNamespace = function (attrName) {\n return WHITELIST[attrName] || null;\n };\n exports.assert = function (test, msg) {\n // if (!alreadyWarned) {\n // alreadyWarned = true;\n // Logger.warn(\"Don't leave debug assertions on in public builds\");\n // }\n if (!test) {\n throw new Error(msg || \"assertion failure\");\n }\n };\n exports.LOGGER = logger;\n exports.Logger = Logger;\n exports.LogLevel = LogLevel;\n exports.assign = function (obj) {\n var i, assignment, keys, j, key;\n\n for (i = 1; i < arguments.length; i++) {\n assignment = arguments[i];\n\n if (assignment === null || typeof assignment !== 'object') continue;\n keys = objKeys(assignment);\n\n for (j = 0; j < keys.length; j++) {\n key = keys[j];\n\n obj[key] = assignment[key];\n }\n }\n return obj;\n };\n exports.fillNulls = function (count) {\n var arr = new Array(count),\n i;\n for (i = 0; i < count; i++) {\n arr[i] = null;\n }\n return arr;\n };\n exports.ensureGuid = ensureGuid;\n exports.initializeGuid = initializeGuid;\n exports.Stack = Stack;\n exports.DictSet = DictSet;\n exports.dict = dict;\n exports.EMPTY_SLICE = EMPTY_SLICE;\n exports.LinkedList = LinkedList;\n exports.ListNode = function ListNode(value) {\n _classCallCheck$2(this, ListNode);\n\n this.next = null;\n this.prev = null;\n this.value = value;\n };\n exports.ListSlice = ListSlice;\n exports.A = A$1;\n exports.EMPTY_ARRAY = EMPTY_ARRAY;\n exports.HAS_NATIVE_WEAKMAP = HAS_NATIVE_WEAKMAP;\n exports.unwrap = function (val) {\n if (val === null || val === undefined) throw new Error('Expected value to be present');\n return val;\n };\n exports.expect = function (val, message) {\n if (val === null || val === undefined) throw new Error(message);\n return val;\n };\n exports.unreachable = function () {\n return new Error('unreachable');\n };\n exports.typePos = function (lastOperand) {\n return lastOperand - 4;\n };\n});","enifed(\"@glimmer/wire-format\", [\"exports\"], function (exports) {\n \"use strict\";\n\n var Opcodes;\n (function (Opcodes) {\n // Statements\n Opcodes[Opcodes[\"Text\"] = 0] = \"Text\";\n Opcodes[Opcodes[\"Append\"] = 1] = \"Append\";\n Opcodes[Opcodes[\"Comment\"] = 2] = \"Comment\";\n Opcodes[Opcodes[\"Modifier\"] = 3] = \"Modifier\";\n Opcodes[Opcodes[\"Block\"] = 4] = \"Block\";\n Opcodes[Opcodes[\"Component\"] = 5] = \"Component\";\n Opcodes[Opcodes[\"OpenElement\"] = 6] = \"OpenElement\";\n Opcodes[Opcodes[\"FlushElement\"] = 7] = \"FlushElement\";\n Opcodes[Opcodes[\"CloseElement\"] = 8] = \"CloseElement\";\n Opcodes[Opcodes[\"StaticAttr\"] = 9] = \"StaticAttr\";\n Opcodes[Opcodes[\"DynamicAttr\"] = 10] = \"DynamicAttr\";\n Opcodes[Opcodes[\"Yield\"] = 11] = \"Yield\";\n Opcodes[Opcodes[\"Partial\"] = 12] = \"Partial\";\n Opcodes[Opcodes[\"DynamicArg\"] = 13] = \"DynamicArg\";\n Opcodes[Opcodes[\"StaticArg\"] = 14] = \"StaticArg\";\n Opcodes[Opcodes[\"TrustingAttr\"] = 15] = \"TrustingAttr\";\n Opcodes[Opcodes[\"Debugger\"] = 16] = \"Debugger\";\n Opcodes[Opcodes[\"ClientSideStatement\"] = 17] = \"ClientSideStatement\";\n // Expressions\n Opcodes[Opcodes[\"Unknown\"] = 18] = \"Unknown\";\n Opcodes[Opcodes[\"Get\"] = 19] = \"Get\";\n Opcodes[Opcodes[\"MaybeLocal\"] = 20] = \"MaybeLocal\";\n Opcodes[Opcodes[\"FixThisBeforeWeMerge\"] = 21] = \"FixThisBeforeWeMerge\";\n Opcodes[Opcodes[\"HasBlock\"] = 22] = \"HasBlock\";\n Opcodes[Opcodes[\"HasBlockParams\"] = 23] = \"HasBlockParams\";\n Opcodes[Opcodes[\"Undefined\"] = 24] = \"Undefined\";\n Opcodes[Opcodes[\"Helper\"] = 25] = \"Helper\";\n Opcodes[Opcodes[\"Concat\"] = 26] = \"Concat\";\n Opcodes[Opcodes[\"ClientSideExpression\"] = 27] = \"ClientSideExpression\";\n })(Opcodes || (exports.Ops = Opcodes = {}));\n\n function is(variant) {\n return function (value) {\n return Array.isArray(value) && value[0] === variant;\n };\n }\n var Expressions;\n (function (Expressions) {\n Expressions.isUnknown = is(Opcodes.Unknown);\n Expressions.isGet = is(Opcodes.Get);\n Expressions.isConcat = is(Opcodes.Concat);\n Expressions.isHelper = is(Opcodes.Helper);\n Expressions.isHasBlock = is(Opcodes.HasBlock);\n Expressions.isHasBlockParams = is(Opcodes.HasBlockParams);\n Expressions.isUndefined = is(Opcodes.Undefined);\n Expressions.isClientSide = is(Opcodes.ClientSideExpression);\n Expressions.isMaybeLocal = is(Opcodes.MaybeLocal);\n\n Expressions.isPrimitiveValue = function (value) {\n if (value === null) {\n return true;\n }\n return typeof value !== 'object';\n };\n })(Expressions || (exports.Expressions = Expressions = {}));\n var Statements;\n (function (Statements) {\n Statements.isText = is(Opcodes.Text);\n Statements.isAppend = is(Opcodes.Append);\n Statements.isComment = is(Opcodes.Comment);\n Statements.isModifier = is(Opcodes.Modifier);\n Statements.isBlock = is(Opcodes.Block);\n Statements.isComponent = is(Opcodes.Component);\n Statements.isOpenElement = is(Opcodes.OpenElement);\n Statements.isFlushElement = is(Opcodes.FlushElement);\n Statements.isCloseElement = is(Opcodes.CloseElement);\n Statements.isStaticAttr = is(Opcodes.StaticAttr);\n Statements.isDynamicAttr = is(Opcodes.DynamicAttr);\n Statements.isYield = is(Opcodes.Yield);\n Statements.isPartial = is(Opcodes.Partial);\n Statements.isDynamicArg = is(Opcodes.DynamicArg);\n Statements.isStaticArg = is(Opcodes.StaticArg);\n Statements.isTrustingAttr = is(Opcodes.TrustingAttr);\n Statements.isDebugger = is(Opcodes.Debugger);\n Statements.isClientSide = is(Opcodes.ClientSideStatement);\n function isAttribute(val) {\n return val[0] === Opcodes.StaticAttr || val[0] === Opcodes.DynamicAttr || val[0] === Opcodes.TrustingAttr;\n }\n Statements.isAttribute = isAttribute;\n function isArgument(val) {\n return val[0] === Opcodes.StaticArg || val[0] === Opcodes.DynamicArg;\n }\n Statements.isArgument = isArgument;\n\n Statements.isParameter = function (val) {\n return isAttribute(val) || isArgument(val);\n };\n\n Statements.getParameterName = function (s) {\n return s[1];\n };\n })(Statements || (exports.Statements = Statements = {}));\n\n exports.is = is;\n exports.Expressions = Expressions;\n exports.Statements = Statements;\n exports.Ops = Opcodes;\n});","enifed('backburner', ['exports'], function (exports) {\n 'use strict';\n\n var NUMBER = /\\d+/;\n function isString(suspect) {\n return typeof suspect === 'string';\n }\n function isFunction(suspect) {\n return typeof suspect === 'function';\n }\n function isNumber(suspect) {\n return typeof suspect === 'number';\n }\n function isCoercableNumber(suspect) {\n return isNumber(suspect) && suspect === suspect || NUMBER.test(suspect);\n }\n function noSuchQueue(name) {\n throw new Error('You attempted to schedule an action in a queue (' + name + ') that doesn\\'t exist');\n }\n function noSuchMethod(name) {\n throw new Error('You attempted to schedule an action in a queue (' + name + ') for a method that doesn\\'t exist');\n }\n function getOnError(options) {\n return options.onError || options.onErrorTarget && options.onErrorTarget[options.onErrorMethod];\n }\n function findItem(target, method, collection) {\n var index = -1,\n i,\n l;\n for (i = 0, l = collection.length; i < l; i += 4) {\n if (collection[i] === target && collection[i + 1] === method) {\n index = i;\n break;\n }\n }\n return index;\n }\n function findTimer(timer, collection) {\n var index = -1,\n i;\n for (i = 3; i < collection.length; i += 4) {\n if (collection[i] === timer) {\n index = i - 3;\n break;\n }\n }\n return index;\n }\n\n function binarySearch(time, timers) {\n var start = 0;\n var end = timers.length - 2;\n var middle = void 0;\n var l = void 0;\n while (start < end) {\n // since timers is an array of pairs 'l' will always\n // be an integer\n l = (end - start) / 2;\n // compensate for the index in case even number\n // of pairs inside timers\n middle = start + l - l % 2;\n if (time >= timers[middle]) {\n start = middle + 2;\n } else {\n end = middle;\n }\n }\n return time >= timers[start] ? start + 2 : start;\n }\n\n var Queue = function () {\n function Queue(name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var globalOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n\n this._queueBeingFlushed = [];\n this.targetQueues = Object.create(null);\n this.index = 0;\n this._queue = [];\n this.name = name;\n this.options = options;\n this.globalOptions = globalOptions;\n }\n\n Queue.prototype.push = function (target, method, args, stack) {\n this._queue.push(target, method, args, stack);\n return {\n queue: this,\n target: target,\n method: method\n };\n };\n\n Queue.prototype.pushUnique = function (target, method, args, stack) {\n var guid = this.guidForTarget(target);\n if (guid) {\n this.pushUniqueWithGuid(guid, target, method, args, stack);\n } else {\n this.pushUniqueWithoutGuid(target, method, args, stack);\n }\n return {\n queue: this,\n target: target,\n method: method\n };\n };\n\n Queue.prototype.flush = function (sync) {\n var _options = this.options,\n before = _options.before,\n after = _options.after,\n onError,\n i;\n\n var target = void 0;\n var method = void 0;\n var args = void 0;\n var errorRecordedForStack = void 0;\n this.targetQueues = Object.create(null);\n if (this._queueBeingFlushed.length === 0) {\n this._queueBeingFlushed = this._queue;\n this._queue = [];\n }\n if (before !== undefined) {\n before();\n }\n var invoke = void 0;\n var queueItems = this._queueBeingFlushed;\n if (queueItems.length > 0) {\n onError = getOnError(this.globalOptions);\n\n invoke = onError ? this.invokeWithOnError : this.invoke;\n for (i = this.index; i < queueItems.length; i += 4) {\n this.index += 4;\n method = queueItems[i + 1];\n // method could have been nullified / canceled during flush\n if (method !== null) {\n //\n // ** Attention intrepid developer **\n //\n // To find out the stack of this task when it was scheduled onto\n // the run loop, add the following to your app.js:\n //\n // Ember.run.backburner.DEBUG = true; // NOTE: This slows your app, don't leave it on in production.\n //\n // Once that is in place, when you are at a breakpoint and navigate\n // here in the stack explorer, you can look at `errorRecordedForStack.stack`,\n // which will be the captured stack when this job was scheduled.\n //\n // One possible long-term solution is the following Chrome issue:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=332624\n //\n target = queueItems[i];\n args = queueItems[i + 2];\n errorRecordedForStack = queueItems[i + 3]; // Debugging assistance\n invoke(target, method, args, onError, errorRecordedForStack);\n }\n if (this.index !== this._queueBeingFlushed.length && this.globalOptions.mustYield && this.globalOptions.mustYield()) {\n return 1 /* Pause */;\n }\n }\n }\n if (after !== undefined) {\n after();\n }\n this._queueBeingFlushed.length = 0;\n this.index = 0;\n if (sync !== false && this._queue.length > 0) {\n // check if new items have been added\n this.flush(true);\n }\n };\n\n Queue.prototype.hasWork = function () {\n return this._queueBeingFlushed.length > 0 || this._queue.length > 0;\n };\n\n Queue.prototype.cancel = function (_ref) {\n var target = _ref.target,\n method = _ref.method,\n t,\n i,\n l;\n\n var queue = this._queue;\n var guid = this.guidForTarget(target);\n var targetQueue = guid ? this.targetQueues[guid] : undefined;\n if (targetQueue !== undefined) {\n t = void 0;\n\n for (i = 0, l = targetQueue.length; i < l; i += 2) {\n t = targetQueue[i];\n if (t === method) {\n targetQueue.splice(i, 2);\n break;\n }\n }\n }\n var index = findItem(target, method, queue);\n if (index > -1) {\n queue.splice(index, 4);\n return true;\n }\n // if not found in current queue\n // could be in the queue that is being flushed\n queue = this._queueBeingFlushed;\n index = findItem(target, method, queue);\n if (index > -1) {\n queue[index + 1] = null;\n return true;\n }\n return false;\n };\n\n Queue.prototype.guidForTarget = function (target) {\n if (!target) {\n return;\n }\n var peekGuid = this.globalOptions.peekGuid;\n if (peekGuid) {\n return peekGuid(target);\n }\n var KEY = this.globalOptions.GUID_KEY;\n if (KEY) {\n return target[KEY];\n }\n };\n\n Queue.prototype.pushUniqueWithoutGuid = function (target, method, args, stack) {\n var queue = this._queue;\n var index = findItem(target, method, queue);\n if (index > -1) {\n queue[index + 2] = args; // replace args\n queue[index + 3] = stack; // replace stack\n } else {\n queue.push(target, method, args, stack);\n }\n };\n\n Queue.prototype.targetQueue = function (_targetQueue, target, method, args, stack) {\n var queue = this._queue,\n i,\n l,\n currentMethod,\n currentIndex;\n for (i = 0, l = _targetQueue.length; i < l; i += 2) {\n currentMethod = _targetQueue[i];\n\n if (currentMethod === method) {\n currentIndex = _targetQueue[i + 1];\n\n queue[currentIndex + 2] = args; // replace args\n queue[currentIndex + 3] = stack; // replace stack\n return;\n }\n }\n _targetQueue.push(method, queue.push(target, method, args, stack) - 4);\n };\n\n Queue.prototype.pushUniqueWithGuid = function (guid, target, method, args, stack) {\n var localQueue = this.targetQueues[guid];\n if (localQueue !== undefined) {\n this.targetQueue(localQueue, target, method, args, stack);\n } else {\n this.targetQueues[guid] = [method, this._queue.push(target, method, args, stack) - 4];\n }\n };\n\n Queue.prototype.invoke = function (target, method, args /*, onError, errorRecordedForStack */) {\n if (args !== undefined) {\n method.apply(target, args);\n } else {\n method.call(target);\n }\n };\n\n Queue.prototype.invokeWithOnError = function (target, method, args, onError, errorRecordedForStack) {\n try {\n if (args !== undefined) {\n method.apply(target, args);\n } else {\n method.call(target);\n }\n } catch (error) {\n onError(error, errorRecordedForStack);\n }\n };\n\n return Queue;\n }();\n\n var DeferredActionQueues = function () {\n function DeferredActionQueues() {\n var queueNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var options = arguments[1];\n\n\n this.queues = {};\n this.queueNameIndex = 0;\n this.queueNames = queueNames;\n queueNames.reduce(function (queues, queueName) {\n queues[queueName] = new Queue(queueName, options[queueName], options);\n return queues;\n }, this.queues);\n }\n /*\n @method schedule\n @param {String} queueName\n @param {Any} target\n @param {Any} method\n @param {Any} args\n @param {Boolean} onceFlag\n @param {Any} stack\n @return queue\n */\n\n DeferredActionQueues.prototype.schedule = function (queueName, target, method, args, onceFlag, stack) {\n var queues = this.queues;\n var queue = queues[queueName];\n if (!queue) {\n noSuchQueue(queueName);\n }\n if (!method) {\n noSuchMethod(queueName);\n }\n if (onceFlag) {\n return queue.pushUnique(target, method, args, stack);\n } else {\n return queue.push(target, method, args, stack);\n }\n };\n\n DeferredActionQueues.prototype.flush = function () {\n var queue = void 0;\n var queueName = void 0;\n var numberOfQueues = this.queueNames.length;\n while (this.queueNameIndex < numberOfQueues) {\n queueName = this.queueNames[this.queueNameIndex];\n queue = this.queues[queueName];\n if (queue.hasWork() === false) {\n this.queueNameIndex++;\n } else {\n if (queue.flush(false /* async */) === 1 /* Pause */) {\n return 1 /* Pause */;\n }\n this.queueNameIndex = 0; // only reset to first queue if non-pause break\n }\n }\n };\n\n return DeferredActionQueues;\n }();\n\n // accepts a function that when invoked will return an iterator\n // iterator will drain until completion\n var iteratorDrain = function (fn) {\n var iterator = fn();\n var result = iterator.next();\n while (result.done === false) {\n result.value();\n result = iterator.next();\n }\n };\n\n var noop = function () {};\n var SET_TIMEOUT = setTimeout;\n function parseArgs() {\n var length = arguments.length,\n i;\n var method = void 0;\n var target = void 0;\n var args = void 0;\n if (length === 1) {\n method = arguments[0];\n target = null;\n } else {\n target = arguments[0];\n method = arguments[1];\n if (isString(method)) {\n method = target[method];\n }\n if (length > 2) {\n args = new Array(length - 2);\n for (i = 0; i < length - 2; i++) {\n args[i] = arguments[i + 2];\n }\n }\n }\n return [target, method, args];\n }\n\n var Backburner = function () {\n function Backburner(queueNames) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n this.DEBUG = false;\n this.currentInstance = null;\n this._timerTimeoutId = null;\n this._autorun = null;\n this.queueNames = queueNames;\n this.options = options;\n if (!this.options.defaultQueue) {\n this.options.defaultQueue = queueNames[0];\n }\n this.instanceStack = [];\n this._timers = [];\n this._debouncees = [];\n this._throttlers = [];\n this._eventCallbacks = {\n end: [],\n begin: []\n };\n this._onBegin = this.options.onBegin || noop;\n this._onEnd = this.options.onEnd || noop;\n var _platform = this.options._platform || {};\n var platform = Object.create(null);\n platform.setTimeout = _platform.setTimeout || function (fn, ms) {\n return setTimeout(fn, ms);\n };\n platform.clearTimeout = _platform.clearTimeout || function (id) {\n return clearTimeout(id);\n };\n platform.next = _platform.next || function (fn) {\n return SET_TIMEOUT(fn, 0);\n };\n platform.clearNext = _platform.clearNext || platform.clearTimeout;\n platform.now = _platform.now || function () {\n return Date.now();\n };\n this._platform = platform;\n this._boundRunExpiredTimers = function () {\n _this._runExpiredTimers();\n };\n this._boundAutorunEnd = function () {\n _this._autorun = null;\n _this.end();\n };\n }\n /*\n @method begin\n @return instantiated class DeferredActionQueues\n */\n\n Backburner.prototype.begin = function () {\n var options = this.options;\n var previousInstance = this.currentInstance;\n var current = void 0;\n if (this._autorun !== null) {\n current = previousInstance;\n this._cancelAutorun();\n } else {\n if (previousInstance !== null) {\n this.instanceStack.push(previousInstance);\n }\n current = this.currentInstance = new DeferredActionQueues(this.queueNames, options);\n this._trigger('begin', current, previousInstance);\n }\n this._onBegin(current, previousInstance);\n return current;\n };\n\n Backburner.prototype.end = function () {\n var currentInstance = this.currentInstance,\n next;\n var nextInstance = null;\n if (currentInstance === null) {\n throw new Error('end called without begin');\n }\n // Prevent double-finally bug in Safari 6.0.2 and iOS 6\n // This bug appears to be resolved in Safari 6.0.5 and iOS 7\n var finallyAlreadyCalled = false;\n var result = void 0;\n try {\n result = currentInstance.flush();\n } finally {\n if (!finallyAlreadyCalled) {\n finallyAlreadyCalled = true;\n if (result === 1 /* Pause */) {\n next = this._platform.next;\n\n this._autorun = next(this._boundAutorunEnd);\n } else {\n this.currentInstance = null;\n if (this.instanceStack.length > 0) {\n nextInstance = this.instanceStack.pop();\n this.currentInstance = nextInstance;\n }\n this._trigger('end', currentInstance, nextInstance);\n this._onEnd(currentInstance, nextInstance);\n }\n }\n }\n };\n\n Backburner.prototype.on = function (eventName, callback) {\n if (typeof callback !== 'function') {\n throw new TypeError('Callback must be a function');\n }\n var callbacks = this._eventCallbacks[eventName];\n if (callbacks !== undefined) {\n callbacks.push(callback);\n } else {\n throw new TypeError('Cannot on() event ' + eventName + ' because it does not exist');\n }\n };\n\n Backburner.prototype.off = function (eventName, callback) {\n var callbacks = this._eventCallbacks[eventName],\n i;\n if (!eventName || callbacks === undefined) {\n throw new TypeError('Cannot off() event ' + eventName + ' because it does not exist');\n }\n var callbackFound = false;\n if (callback) {\n for (i = 0; i < callbacks.length; i++) {\n if (callbacks[i] === callback) {\n callbackFound = true;\n callbacks.splice(i, 1);\n i--;\n }\n }\n }\n if (!callbackFound) {\n throw new TypeError('Cannot off() callback that does not exist');\n }\n };\n\n Backburner.prototype.run = function () {\n var _parseArgs = parseArgs.apply(undefined, arguments),\n target = _parseArgs[0],\n method = _parseArgs[1],\n args = _parseArgs[2];\n\n return this._run(target, method, args);\n };\n\n Backburner.prototype.join = function () {\n var _parseArgs2 = parseArgs.apply(undefined, arguments),\n target = _parseArgs2[0],\n method = _parseArgs2[1],\n args = _parseArgs2[2];\n\n return this._join(target, method, args);\n };\n\n Backburner.prototype.defer = function () {\n return this.schedule.apply(this, arguments);\n };\n\n Backburner.prototype.schedule = function (queueName) {\n for (_len = arguments.length, _args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n _args[_key - 1] = arguments[_key];\n }\n\n var _parseArgs3 = parseArgs.apply(undefined, _args),\n target = _parseArgs3[0],\n method = _parseArgs3[1],\n args = _parseArgs3[2],\n _len,\n _args,\n _key;\n\n var stack = this.DEBUG ? new Error() : undefined;\n return this._ensureInstance().schedule(queueName, target, method, args, false, stack);\n };\n\n Backburner.prototype.scheduleIterable = function (queueName, iterable) {\n var stack = this.DEBUG ? new Error() : undefined;\n return this._ensureInstance().schedule(queueName, null, iteratorDrain, [iterable], false, stack);\n };\n\n Backburner.prototype.deferOnce = function () {\n return this.scheduleOnce.apply(this, arguments);\n };\n\n Backburner.prototype.scheduleOnce = function (queueName) {\n for (_len2 = arguments.length, _args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n _args[_key2 - 1] = arguments[_key2];\n }\n\n var _parseArgs4 = parseArgs.apply(undefined, _args),\n target = _parseArgs4[0],\n method = _parseArgs4[1],\n args = _parseArgs4[2],\n _len2,\n _args,\n _key2;\n\n var stack = this.DEBUG ? new Error() : undefined;\n return this._ensureInstance().schedule(queueName, target, method, args, true, stack);\n };\n\n Backburner.prototype.setTimeout = function () {\n return this.later.apply(this, arguments);\n };\n\n Backburner.prototype.later = function () {\n for (_len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var length = args.length,\n _len3,\n args,\n _key3,\n last;\n var wait = 0;\n var method = void 0;\n var target = void 0;\n var methodOrTarget = void 0;\n var methodOrWait = void 0;\n var methodOrArgs = void 0;\n if (length === 0) {\n return;\n } else if (length === 1) {\n method = args.shift();\n } else if (length === 2) {\n methodOrTarget = args[0];\n methodOrWait = args[1];\n if (isFunction(methodOrWait)) {\n target = args.shift();\n method = args.shift();\n } else if (methodOrTarget !== null && isString(methodOrWait) && methodOrWait in methodOrTarget) {\n target = args.shift();\n method = target[args.shift()];\n } else if (isCoercableNumber(methodOrWait)) {\n method = args.shift();\n wait = parseInt(args.shift(), 10);\n } else {\n method = args.shift();\n }\n } else {\n last = args[args.length - 1];\n\n if (isCoercableNumber(last)) {\n wait = parseInt(args.pop(), 10);\n }\n methodOrTarget = args[0];\n methodOrArgs = args[1];\n if (isFunction(methodOrArgs)) {\n target = args.shift();\n method = args.shift();\n } else if (methodOrTarget !== null && isString(methodOrArgs) && methodOrArgs in methodOrTarget) {\n target = args.shift();\n method = target[args.shift()];\n } else {\n method = args.shift();\n }\n }\n var onError = getOnError(this.options);\n var executeAt = this._platform.now() + wait;\n var fn = void 0;\n if (onError) {\n fn = function () {\n try {\n method.apply(target, args);\n } catch (e) {\n onError(e);\n }\n };\n } else {\n fn = function () {\n method.apply(target, args);\n };\n }\n return this._setTimeout(fn, executeAt);\n };\n\n Backburner.prototype.throttle = function (target, method) /*, ...args, wait, [immediate] */{\n var _this2 = this,\n _len4,\n args,\n _key4;\n\n for (_len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n\n var immediate = args.pop();\n var isImmediate = void 0;\n var wait = void 0;\n if (isCoercableNumber(immediate)) {\n wait = immediate;\n isImmediate = true;\n } else {\n wait = args.pop();\n isImmediate = immediate === true;\n }\n if (isString(method)) {\n method = target[method];\n }\n var index = findItem(target, method, this._throttlers);\n if (index > -1) {\n this._throttlers[index + 2] = args;\n return this._throttlers[index + 3];\n } // throttled\n wait = parseInt(wait, 10);\n var timer = this._platform.setTimeout(function () {\n var i = findTimer(timer, _this2._throttlers);\n\n var _throttlers$splice = _this2._throttlers.splice(i, 4),\n context = _throttlers$splice[0],\n func = _throttlers$splice[1],\n params = _throttlers$splice[2];\n\n if (isImmediate === false) {\n _this2._run(context, func, params);\n }\n }, wait);\n if (isImmediate) {\n this._join(target, method, args);\n }\n this._throttlers.push(target, method, args, timer);\n return timer;\n };\n\n Backburner.prototype.debounce = function (target, method) /* , wait, [immediate] */{\n var _this3 = this,\n _len5,\n args,\n _key5,\n timerId;\n\n for (_len5 = arguments.length, args = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {\n args[_key5 - 2] = arguments[_key5];\n }\n\n var immediate = args.pop();\n var isImmediate = void 0;\n var wait = void 0;\n if (isCoercableNumber(immediate)) {\n wait = immediate;\n isImmediate = false;\n } else {\n wait = args.pop();\n isImmediate = immediate === true;\n }\n if (isString(method)) {\n method = target[method];\n }\n wait = parseInt(wait, 10);\n // Remove debouncee\n var index = findItem(target, method, this._debouncees);\n if (index > -1) {\n timerId = this._debouncees[index + 3];\n\n this._platform.clearTimeout(timerId);\n this._debouncees.splice(index, 4);\n }\n var timer = this._platform.setTimeout(function () {\n var i = findTimer(timer, _this3._debouncees);\n\n var _debouncees$splice = _this3._debouncees.splice(i, 4),\n context = _debouncees$splice[0],\n func = _debouncees$splice[1],\n params = _debouncees$splice[2];\n\n if (isImmediate === false) {\n _this3._run(context, func, params);\n }\n }, wait);\n if (isImmediate && index === -1) {\n this._join(target, method, args);\n }\n this._debouncees.push(target, method, args, timer);\n return timer;\n };\n\n Backburner.prototype.cancelTimers = function () {\n var i, t;\n\n for (i = 3; i < this._throttlers.length; i += 4) {\n this._platform.clearTimeout(this._throttlers[i]);\n }\n this._throttlers = [];\n for (t = 3; t < this._debouncees.length; t += 4) {\n this._platform.clearTimeout(this._debouncees[t]);\n }\n this._debouncees = [];\n this._clearTimerTimeout();\n this._timers = [];\n this._cancelAutorun();\n };\n\n Backburner.prototype.hasTimers = function () {\n return this._timers.length > 0 || this._debouncees.length > 0 || this._throttlers.length > 0 || this._autorun !== null;\n };\n\n Backburner.prototype.cancel = function (timer) {\n if (!timer) {\n return false;\n }\n var timerType = typeof timer;\n if (timerType === 'number' || timerType === 'string') {\n return this._cancelItem(timer, this._throttlers) || this._cancelItem(timer, this._debouncees);\n } else if (timerType === 'function') {\n return this._cancelLaterTimer(timer);\n } else if (timerType === 'object' && timer.queue && timer.method) {\n return timer.queue.cancel(timer);\n }\n return false;\n };\n\n Backburner.prototype.ensureInstance = function () {\n this._ensureInstance();\n };\n\n Backburner.prototype._join = function (target, method, args) {\n if (this.currentInstance === null) {\n return this._run(target, method, args);\n }\n if (target === undefined && args === undefined) {\n return method();\n } else {\n return method.apply(target, args);\n }\n };\n\n Backburner.prototype._run = function (target, method, args) {\n var onError = getOnError(this.options);\n this.begin();\n if (onError) {\n try {\n return method.apply(target, args);\n } catch (error) {\n onError(error);\n } finally {\n this.end();\n }\n } else {\n try {\n return method.apply(target, args);\n } finally {\n this.end();\n }\n }\n };\n\n Backburner.prototype._cancelAutorun = function () {\n if (this._autorun !== null) {\n this._platform.clearNext(this._autorun);\n this._autorun = null;\n }\n };\n\n Backburner.prototype._setTimeout = function (fn, executeAt) {\n if (this._timers.length === 0) {\n this._timers.push(executeAt, fn);\n this._installTimerTimeout();\n return fn;\n }\n // find position to insert\n var i = binarySearch(executeAt, this._timers);\n this._timers.splice(i, 0, executeAt, fn);\n // we should be the new earliest timer if i == 0\n if (i === 0) {\n this._reinstallTimerTimeout();\n }\n return fn;\n };\n\n Backburner.prototype._cancelLaterTimer = function (timer) {\n var i;\n\n for (i = 1; i < this._timers.length; i += 2) {\n if (this._timers[i] === timer) {\n i = i - 1;\n this._timers.splice(i, 2); // remove the two elements\n if (i === 0) {\n this._reinstallTimerTimeout();\n }\n return true;\n }\n }\n return false;\n };\n\n Backburner.prototype._cancelItem = function (timer, array) {\n var index = findTimer(timer, array);\n if (index > -1) {\n this._platform.clearTimeout(timer);\n array.splice(index, 4);\n return true;\n }\n return false;\n };\n\n Backburner.prototype._trigger = function (eventName, arg1, arg2) {\n var callbacks = this._eventCallbacks[eventName],\n i;\n if (callbacks !== undefined) {\n for (i = 0; i < callbacks.length; i++) {\n callbacks[i](arg1, arg2);\n }\n }\n };\n\n Backburner.prototype._runExpiredTimers = function () {\n this._timerTimeoutId = null;\n if (this._timers.length === 0) {\n return;\n }\n this.begin();\n this._scheduleExpiredTimers();\n this.end();\n };\n\n Backburner.prototype._scheduleExpiredTimers = function () {\n var timers = this._timers,\n executeAt,\n fn;\n var l = timers.length;\n var i = 0;\n var defaultQueue = this.options.defaultQueue;\n var n = this._platform.now();\n for (; i < l; i += 2) {\n executeAt = timers[i];\n\n if (executeAt <= n) {\n fn = timers[i + 1];\n\n this.schedule(defaultQueue, null, fn);\n } else {\n break;\n }\n }\n timers.splice(0, i);\n this._installTimerTimeout();\n };\n\n Backburner.prototype._reinstallTimerTimeout = function () {\n this._clearTimerTimeout();\n this._installTimerTimeout();\n };\n\n Backburner.prototype._clearTimerTimeout = function () {\n if (this._timerTimeoutId === null) {\n return;\n }\n this._platform.clearTimeout(this._timerTimeoutId);\n this._timerTimeoutId = null;\n };\n\n Backburner.prototype._installTimerTimeout = function () {\n if (this._timers.length === 0) {\n return;\n }\n var minExpiresAt = this._timers[0];\n var n = this._platform.now();\n var wait = Math.max(0, minExpiresAt - n);\n this._timerTimeoutId = this._platform.setTimeout(this._boundRunExpiredTimers, wait);\n };\n\n Backburner.prototype._ensureInstance = function () {\n var currentInstance = this.currentInstance,\n next;\n if (currentInstance === null) {\n currentInstance = this.begin();\n next = this._platform.next;\n\n this._autorun = next(this._boundAutorunEnd);\n }\n return currentInstance;\n };\n\n return Backburner;\n }();\n\n Backburner.Queue = Queue;\n\n exports.default = Backburner;\n});","enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports, _emberUtils, _emberDebug) {\n 'use strict';\n\n exports.Container = exports.privatize = exports.Registry = undefined;\n\n /* globals Proxy */\n var CONTAINER_OVERRIDE = (0, _emberUtils.symbol)('CONTAINER_OVERRIDE');\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\n var Container = function () {\n function Container(registry) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n this.registry = registry;\n this.owner = options.owner || null;\n this.cache = (0, _emberUtils.dictionary)(options.cache || null);\n this.factoryManagerCache = (0, _emberUtils.dictionary)(options.factoryManagerCache || null);\n this[CONTAINER_OVERRIDE] = undefined;\n this.isDestroyed = false;\n }\n\n /**\n @private\n @property registry\n @type Registry\n @since 1.11.0\n */\n\n /**\n @private\n @property cache\n @type InheritingDict\n */\n\n /**\n @private\n @property validationCache\n @type InheritingDict\n */\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 {Object} [options]\n @param {String} [options.source] The fullname of the request source (used for local lookup)\n @return {any}\n */\n\n Container.prototype.lookup = function (fullName, options) {\n false && !this.registry.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName));\n\n return _lookup(this, this.registry.normalize(fullName), options);\n };\n\n Container.prototype.destroy = function () {\n destroyDestroyables(this);\n this.isDestroyed = true;\n };\n\n Container.prototype.reset = function (fullName) {\n if (fullName === undefined) {\n resetCache(this);\n } else {\n resetMember(this, this.registry.normalize(fullName));\n }\n };\n\n Container.prototype.ownerInjection = function () {\n var _ref;\n\n return _ref = {}, _ref[_emberUtils.OWNER] = this.owner, _ref;\n };\n\n Container.prototype._resolverCacheKey = function (name, options) {\n return this.registry.resolverCacheKey(name, options);\n };\n\n Container.prototype.factoryFor = function (fullName) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n expandedFullName;\n\n var normalizedName = this.registry.normalize(fullName);\n\n false && !this.registry.isValidFullName(normalizedName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName));\n\n if (options.source) {\n expandedFullName = this.registry.expandLocalLookup(fullName, options);\n // if expandLocalLookup returns falsey, we do not support local lookup\n\n if (!expandedFullName) {\n return;\n }\n\n normalizedName = expandedFullName;\n }\n\n var cacheKey = this._resolverCacheKey(normalizedName, options);\n var cached = this.factoryManagerCache[cacheKey];\n\n if (cached !== undefined) {\n return cached;\n }\n\n var factory = this.registry.resolve(normalizedName);\n\n if (factory === undefined) {\n return;\n }\n\n var manager = new FactoryManager(this, factory, fullName, normalizedName);\n\n this.factoryManagerCache[cacheKey] = manager;\n return manager;\n };\n\n return Container;\n }();\n\n /*\n * Wrap a factory manager in a proxy which will not permit properties to be\n * set on the manager.\n */\n\n\n function isSingleton(container, fullName) {\n return container.registry.getOption(fullName, 'singleton') !== false;\n }\n\n function isInstantiatable(container, fullName) {\n return container.registry.getOption(fullName, 'instantiate') !== false;\n }\n\n function _lookup(container, fullName) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n expandedFullName,\n cacheKey,\n cached;\n\n if (options.source) {\n expandedFullName = container.registry.expandLocalLookup(fullName, options);\n\n // if expandLocalLookup returns falsey, we do not support local lookup\n if (!expandedFullName) {\n return;\n }\n\n fullName = expandedFullName;\n }\n\n if (options.singleton !== false) {\n cacheKey = container._resolverCacheKey(fullName, options);\n cached = container.cache[cacheKey];\n\n if (cached !== undefined) {\n return cached;\n }\n }\n\n return instantiateFactory(container, fullName, options);\n }\n\n function isSingletonClass(container, fullName, _ref2) {\n var instantiate = _ref2.instantiate,\n singleton = _ref2.singleton;\n\n return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName);\n }\n\n function isSingletonInstance(container, fullName, _ref3) {\n var instantiate = _ref3.instantiate,\n singleton = _ref3.singleton;\n\n return singleton !== false && instantiate !== false && isSingleton(container, fullName) && isInstantiatable(container, fullName);\n }\n\n function isFactoryClass(container, fullname, _ref4) {\n var instantiate = _ref4.instantiate,\n singleton = _ref4.singleton;\n\n return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname);\n }\n\n function isFactoryInstance(container, fullName, _ref5) {\n var instantiate = _ref5.instantiate,\n singleton = _ref5.singleton;\n\n return instantiate !== false && (singleton !== false || isSingleton(container, fullName)) && isInstantiatable(container, fullName);\n }\n\n function instantiateFactory(container, fullName, options) {\n var factoryManager = container.factoryFor(fullName),\n cacheKey;\n\n if (factoryManager === undefined) {\n return;\n }\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 cacheKey = container._resolverCacheKey(fullName, options);\n\n return container.cache[cacheKey] = factoryManager.create();\n }\n\n // SomeClass { singleton: false, instantiate: true }\n if (isFactoryInstance(container, fullName, options)) {\n return factoryManager.create();\n }\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\n throw new Error('Could not create factory');\n }\n\n function buildInjections(container, injections) {\n var hash = {},\n injection,\n i;\n var isDynamic = false;\n\n if (injections.length > 0) {\n injection = void 0;\n\n for (i = 0; i < injections.length; i++) {\n injection = injections[i];\n hash[injection.property] = _lookup(container, injection.fullName);\n if (!isDynamic) {\n isDynamic = !isSingleton(container, injection.fullName);\n }\n }\n }\n\n return { injections: hash, isDynamic: isDynamic };\n }\n\n function injectionsFor(container, fullName) {\n var registry = container.registry;\n\n var _fullName$split = fullName.split(':'),\n type = _fullName$split[0];\n\n var injections = registry.getTypeInjections(type).concat(registry.getInjections(fullName));\n return buildInjections(container, injections);\n }\n\n function destroyDestroyables(container) {\n var cache = container.cache,\n i,\n key,\n value;\n var keys = Object.keys(cache);\n\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n value = cache[key];\n\n\n if (value.destroy) {\n value.destroy();\n }\n }\n }\n\n function resetCache(container) {\n destroyDestroyables(container);\n container.cache = (0, _emberUtils.dictionary)(null);\n container.factoryManagerCache = (0, _emberUtils.dictionary)(null);\n }\n\n function resetMember(container, fullName) {\n var member = container.cache[fullName];\n\n delete container.factoryManagerCache[fullName];\n\n if (member) {\n delete container.cache[fullName];\n\n if (member.destroy) {\n member.destroy();\n }\n }\n }\n\n var FactoryManager = function () {\n function FactoryManager(container, factory, fullName, normalizedName) {\n\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\n FactoryManager.prototype.toString = function () {\n if (this.madeToString === undefined) {\n this.madeToString = this.container.registry.makeToString(this.class, this.fullName);\n }\n\n return this.madeToString;\n };\n\n FactoryManager.prototype.create = function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _injectionsFor,\n injections,\n isDynamic;\n\n var injectionsCache = this.injections;\n if (injectionsCache === undefined) {\n _injectionsFor = injectionsFor(this.container, this.normalizedName), injections = _injectionsFor.injections, isDynamic = _injectionsFor.isDynamic;\n\n\n injectionsCache = injections;\n if (!isDynamic) {\n this.injections = injections;\n }\n }\n\n var props = (0, _emberUtils.assign)({}, injectionsCache, options);\n\n if (!this.class.create) {\n throw new Error('Failed to create an instance of \\'' + this.normalizedName + '\\'. Most likely an improperly defined class or' + ' an invalid module export.');\n }\n\n // required to allow access to things like\n // the customized toString, _debugContainerKey,\n // owner, etc. without a double extend and without\n // modifying the objects properties\n if (typeof this.class._initFactory === 'function') {\n this.class._initFactory(this);\n } else {\n // in the non-EmberObject case we need to still setOwner\n // this is required for supporting glimmer environment and\n // template instantiation which rely heavily on\n // `options[OWNER]` being passed into `create`\n // TODO: clean this up, and remove in future versions\n (0, _emberUtils.setOwner)(props, this.owner);\n }\n\n return this.class.create(props);\n };\n\n return FactoryManager;\n }();\n\n var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/;\n\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\n var Registry = function () {\n function Registry() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\n this.fallback = options.fallback || null;\n this.resolver = options.resolver || null;\n\n if (typeof this.resolver === 'function') {\n deprecateResolverFunction(this);\n }\n\n this.registrations = (0, _emberUtils.dictionary)(options.registrations || null);\n\n this._typeInjections = (0, _emberUtils.dictionary)(null);\n this._injections = (0, _emberUtils.dictionary)(null);\n\n this._localLookupCache = Object.create(null);\n this._normalizeCache = (0, _emberUtils.dictionary)(null);\n this._resolveCache = (0, _emberUtils.dictionary)(null);\n this._failCache = (0, _emberUtils.dictionary)(null);\n\n this._options = (0, _emberUtils.dictionary)(null);\n this._typeOptions = (0, _emberUtils.dictionary)(null);\n }\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 /**\n An object that has a `resolve` method that resolves a name.\n @private\n @property resolver\n @type Resolver\n */\n\n /**\n @private\n @property registrations\n @type InheritingDict\n */\n\n /**\n @private\n @property _typeInjections\n @type InheritingDict\n */\n\n /**\n @private\n @property _injections\n @type InheritingDict\n */\n\n /**\n @private\n @property _normalizeCache\n @type InheritingDict\n */\n\n /**\n @private\n @property _resolveCache\n @type InheritingDict\n */\n\n /**\n @private\n @property _options\n @type InheritingDict\n */\n\n /**\n @private\n @property _typeOptions\n @type InheritingDict\n */\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\n Registry.prototype.container = function (options) {\n return new Container(this, options);\n };\n\n Registry.prototype.register = function (fullName, factory) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n false && !(factory !== undefined) && (0, _emberDebug.assert)('Attempting to register an unknown factory: \\'' + fullName + '\\'', factory !== undefined);\n\n var normalizedName = this.normalize(fullName);\n false && !!this._resolveCache[normalizedName] && (0, _emberDebug.assert)('Cannot re-register: \\'' + fullName + '\\', as it has already been resolved.', !this._resolveCache[normalizedName]);\n\n delete this._failCache[normalizedName];\n this.registrations[normalizedName] = factory;\n this._options[normalizedName] = options;\n };\n\n Registry.prototype.unregister = function (fullName) {\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n\n var normalizedName = this.normalize(fullName);\n\n this._localLookupCache = Object.create(null);\n\n delete this.registrations[normalizedName];\n delete this._resolveCache[normalizedName];\n delete this._failCache[normalizedName];\n delete this._options[normalizedName];\n };\n\n Registry.prototype.resolve = function (fullName, options) {\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n\n var factory = _resolve(this, this.normalize(fullName), options),\n _fallback;\n if (factory === undefined && this.fallback !== null) {\n\n factory = (_fallback = this.fallback).resolve.apply(_fallback, arguments);\n }\n return factory;\n };\n\n Registry.prototype.describe = function (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 Registry.prototype.normalizeFullName = function (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 Registry.prototype.normalize = function (fullName) {\n return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName));\n };\n\n Registry.prototype.makeToString = function (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 factory.toString();\n }\n };\n\n Registry.prototype.has = function (fullName, options) {\n if (!this.isValidFullName(fullName)) {\n return false;\n }\n\n var source = options && options.source && this.normalize(options.source);\n\n return _has(this, this.normalize(fullName), source);\n };\n\n Registry.prototype.optionsForType = function (type, options) {\n this._typeOptions[type] = options;\n };\n\n Registry.prototype.getOptionsForType = function (type) {\n var optionsForType = this._typeOptions[type];\n if (optionsForType === undefined && this.fallback !== null) {\n optionsForType = this.fallback.getOptionsForType(type);\n }\n return optionsForType;\n };\n\n Registry.prototype.options = function (fullName) {\n var _options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var normalizedName = this.normalize(fullName);\n this._options[normalizedName] = _options;\n };\n\n Registry.prototype.getOptions = function (fullName) {\n var normalizedName = this.normalize(fullName);\n var options = this._options[normalizedName];\n\n if (options === undefined && this.fallback !== null) {\n options = this.fallback.getOptions(fullName);\n }\n return options;\n };\n\n Registry.prototype.getOption = function (fullName, optionName) {\n var options = this._options[fullName];\n\n if (options && options[optionName] !== undefined) {\n return options[optionName];\n }\n\n var type = fullName.split(':')[0];\n options = this._typeOptions[type];\n\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 };\n\n Registry.prototype.typeInjection = function (type, property, fullName) {\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n\n var fullNameType = fullName.split(':')[0];\n false && !(fullNameType !== type) && (0, _emberDebug.assert)('Cannot inject a \\'' + fullName + '\\' on other ' + type + '(s).', fullNameType !== type);\n\n var injections = this._typeInjections[type] || (this._typeInjections[type] = []);\n\n injections.push({ property: property, fullName: fullName });\n };\n\n Registry.prototype.injection = function (fullName, property, injectionName) {\n false && !this.isValidFullName(injectionName) && (0, _emberDebug.assert)('Invalid injectionName, expected: \\'type:name\\' got: ' + injectionName, this.isValidFullName(injectionName));\n\n var normalizedInjectionName = this.normalize(injectionName);\n\n if (fullName.indexOf(':') === -1) {\n return this.typeInjection(fullName, property, normalizedInjectionName);\n }\n\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n\n var normalizedName = this.normalize(fullName);\n\n var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);\n\n injections.push({ property: property, fullName: normalizedInjectionName });\n };\n\n Registry.prototype.knownForType = function (type) {\n var fallbackKnown = void 0,\n resolverKnown = void 0,\n index,\n fullName,\n itemType;\n\n var localKnown = (0, _emberUtils.dictionary)(null);\n var registeredNames = Object.keys(this.registrations);\n for (index = 0; index < registeredNames.length; index++) {\n fullName = registeredNames[index];\n itemType = fullName.split(':')[0];\n\n\n if (itemType === type) {\n localKnown[fullName] = true;\n }\n }\n\n if (this.fallback !== null) {\n fallbackKnown = this.fallback.knownForType(type);\n }\n\n if (this.resolver !== null && this.resolver.knownForType) {\n resolverKnown = this.resolver.knownForType(type);\n }\n\n return (0, _emberUtils.assign)({}, fallbackKnown, localKnown, resolverKnown);\n };\n\n Registry.prototype.isValidFullName = function (fullName) {\n return VALID_FULL_NAME_REGEXP.test(fullName);\n };\n\n Registry.prototype.getInjections = function (fullName) {\n var injections = this._injections[fullName] || [];\n if (this.fallback !== null) {\n injections = injections.concat(this.fallback.getInjections(fullName));\n }\n return injections;\n };\n\n Registry.prototype.getTypeInjections = function (type) {\n var injections = this._typeInjections[type] || [];\n if (this.fallback !== null) {\n injections = injections.concat(this.fallback.getTypeInjections(type));\n }\n return injections;\n };\n\n Registry.prototype.resolverCacheKey = function (name, options) {\n return name;\n };\n\n Registry.prototype.expandLocalLookup = function (fullName, options) {\n var normalizedFullName, normalizedSource;\n\n if (this.resolver !== null && this.resolver.expandLocalLookup) {\n false && !this.isValidFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.isValidFullName(fullName));\n false && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);\n false && !this.isValidFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.isValidFullName(options.source));\n\n normalizedFullName = this.normalize(fullName);\n normalizedSource = this.normalize(options.source);\n\n\n return _expandLocalLookup(this, normalizedFullName, normalizedSource);\n } else if (this.fallback !== null) {\n return this.fallback.expandLocalLookup(fullName, options);\n } else {\n return null;\n }\n };\n\n return Registry;\n }();\n\n function deprecateResolverFunction(registry) {\n false && !false && (0, _emberDebug.deprecate)('Passing a `resolver` function into a Registry is deprecated. Please pass in a Resolver object with a `resolve` method.', false, { id: 'ember-application.registry-resolver-as-function', until: '3.0.0', url: 'https://emberjs.com/deprecations/v2.x#toc_registry-resolver-as-function' });\n\n registry.resolver = { resolve: registry.resolver };\n }\n\n function _expandLocalLookup(registry, normalizedName, normalizedSource) {\n var cache = registry._localLookupCache;\n var normalizedNameCache = cache[normalizedName];\n\n if (!normalizedNameCache) {\n normalizedNameCache = cache[normalizedName] = Object.create(null);\n }\n\n var cached = normalizedNameCache[normalizedSource];\n\n if (cached !== undefined) {\n return cached;\n }\n\n var expanded = registry.resolver.expandLocalLookup(normalizedName, normalizedSource);\n\n return normalizedNameCache[normalizedSource] = expanded;\n }\n\n function _resolve(registry, normalizedName, options) {\n if (options && options.source) {\n // when `source` is provided expand normalizedName\n // and source into the full normalizedName\n expandedNormalizedName = registry.expandLocalLookup(normalizedName, options);\n\n // if expandLocalLookup returns falsey, we do not support local lookup\n\n if (!expandedNormalizedName) {\n return;\n }\n\n normalizedName = expandedNormalizedName;\n }\n\n var cacheKey = registry.resolverCacheKey(normalizedName, options),\n expandedNormalizedName;\n var cached = registry._resolveCache[cacheKey];\n if (cached !== undefined) {\n return cached;\n }\n if (registry._failCache[cacheKey]) {\n return;\n }\n\n var resolved = void 0;\n\n if (registry.resolver) {\n resolved = registry.resolver.resolve(normalizedName, options && options.source);\n }\n\n if (resolved === undefined) {\n resolved = registry.registrations[normalizedName];\n }\n\n if (resolved === undefined) {\n registry._failCache[cacheKey] = true;\n } else {\n registry._resolveCache[cacheKey] = resolved;\n }\n\n return resolved;\n }\n\n function _has(registry, fullName, source) {\n return registry.resolve(fullName, { source: source }) !== undefined;\n }\n\n var privateNames = (0, _emberUtils.dictionary)(null);\n var privateSuffix = ('' + Math.random() + Date.now()).replace('.', '');\n\n /*\n Public API for the container is still in flux.\n The public API, specified on the application namespace should be considered the stable API.\n // @module container\n @private\n */\n\n exports.Registry = Registry;\n exports.privatize = function (_ref6) {\n var fullName = _ref6[0];\n\n var name = privateNames[fullName];\n if (name) {\n return name;\n }\n\n var _fullName$split2 = fullName.split(':'),\n type = _fullName$split2[0],\n rawName = _fullName$split2[1];\n\n return privateNames[fullName] = (0, _emberUtils.intern)(type + ':' + rawName + '-' + privateSuffix);\n };\n exports.Container = Container;\n});","enifed(\"dag-map\", [\"exports\"], function (exports) {\n \"use strict\";\n\n /**\n * A topologically ordered map of key/value pairs with a simple API for adding constraints.\n *\n * Edges can forward reference keys that have not been added yet (the forward reference will\n * map the key to undefined).\n */\n\n var DAG = function () {\n function DAG() {\n this._vertices = new Vertices();\n }\n /**\n * Adds a key/value pair with dependencies on other key/value pairs.\n *\n * @public\n * @param key The key of the vertex to be added.\n * @param value The value of that vertex.\n * @param before A key or array of keys of the vertices that must\n * be visited before this vertex.\n * @param after An string or array of strings with the keys of the\n * vertices that must be after this vertex is visited.\n */\n DAG.prototype.add = function (key, value, before, after) {\n if (!key) throw new Error('argument `key` is required');\n var vertices = this._vertices,\n i;\n var v = vertices.add(key);\n v.val = value;\n if (before) {\n if (typeof before === \"string\") {\n vertices.addEdge(v, vertices.add(before));\n } else {\n for (var i = 0; i < before.length; i++) {\n vertices.addEdge(v, vertices.add(before[i]));\n }\n }\n }\n if (after) {\n if (typeof after === \"string\") {\n vertices.addEdge(vertices.add(after), v);\n } else {\n for (i = 0; i < after.length; i++) {\n vertices.addEdge(vertices.add(after[i]), v);\n }\n }\n }\n };\n /**\n * @deprecated please use add.\n */\n DAG.prototype.addEdges = function (key, value, before, after) {\n this.add(key, value, before, after);\n };\n /**\n * Visits key/value pairs in topological order.\n *\n * @public\n * @param callback The function to be invoked with each key/value.\n */\n DAG.prototype.each = function (callback) {\n this._vertices.walk(callback);\n };\n /**\n * @deprecated please use each.\n */\n DAG.prototype.topsort = function (callback) {\n this.each(callback);\n };\n return DAG;\n }();\n exports.default = DAG;\n\n /** @private */\n var Vertices = function () {\n function Vertices() {\n this.length = 0;\n this.stack = new IntStack();\n this.path = new IntStack();\n this.result = new IntStack();\n }\n Vertices.prototype.add = function (key) {\n if (!key) throw new Error(\"missing key\");\n var l = this.length | 0,\n i;\n var vertex;\n for (i = 0; i < l; i++) {\n vertex = this[i];\n if (vertex.key === key) return vertex;\n }\n this.length = l + 1;\n return this[l] = {\n idx: l,\n key: key,\n val: undefined,\n out: false,\n flag: false,\n length: 0\n };\n };\n Vertices.prototype.addEdge = function (v, w) {\n this.check(v, w.key);\n var l = w.length | 0,\n i;\n for (i = 0; i < l; i++) {\n if (w[i] === v.idx) return;\n }\n w.length = l + 1;\n w[l] = v.idx;\n v.out = true;\n };\n Vertices.prototype.walk = function (cb) {\n var i, vertex;\n\n this.reset();\n for (i = 0; i < this.length; i++) {\n vertex = this[i];\n\n if (vertex.out) continue;\n this.visit(vertex, \"\");\n }\n this.each(this.result, cb);\n };\n Vertices.prototype.check = function (v, w) {\n var i, key, msg_1;\n\n if (v.key === w) {\n throw new Error(\"cycle detected: \" + w + \" <- \" + w);\n }\n // quick check\n if (v.length === 0) return;\n // shallow check\n for (i = 0; i < v.length; i++) {\n key = this[v[i]].key;\n\n if (key === w) {\n throw new Error(\"cycle detected: \" + w + \" <- \" + v.key + \" <- \" + w);\n }\n }\n // deep check\n this.reset();\n this.visit(v, w);\n if (this.path.length > 0) {\n msg_1 = \"cycle detected: \" + w;\n\n this.each(this.path, function (key) {\n msg_1 += \" <- \" + key;\n });\n throw new Error(msg_1);\n }\n };\n Vertices.prototype.reset = function () {\n var i, l;\n\n this.stack.length = 0;\n this.path.length = 0;\n this.result.length = 0;\n for (i = 0, l = this.length; i < l; i++) {\n this[i].flag = false;\n }\n };\n Vertices.prototype.visit = function (start, search) {\n var _a = this,\n stack = _a.stack,\n path = _a.path,\n result = _a.result,\n index,\n vertex;\n stack.push(start.idx);\n while (stack.length) {\n index = stack.pop() | 0;\n\n if (index >= 0) {\n // enter\n vertex = this[index];\n\n if (vertex.flag) continue;\n vertex.flag = true;\n path.push(index);\n if (search === vertex.key) break;\n // push exit\n stack.push(~index);\n this.pushIncoming(vertex);\n } else {\n // exit\n path.pop();\n result.push(~index);\n }\n }\n };\n Vertices.prototype.pushIncoming = function (incomming) {\n var stack = this.stack,\n i,\n index;\n for (i = incomming.length - 1; i >= 0; i--) {\n index = incomming[i];\n\n if (!this[index].flag) {\n stack.push(index);\n }\n }\n };\n Vertices.prototype.each = function (indices, cb) {\n var i, l, vertex;\n\n for (i = 0, l = indices.length; i < l; i++) {\n vertex = this[indices[i]];\n\n cb(vertex.key, vertex.val);\n }\n };\n return Vertices;\n }();\n /** @private */\n var IntStack = function () {\n function IntStack() {\n this.length = 0;\n }\n IntStack.prototype.push = function (n) {\n this[this.length++] = n | 0;\n };\n IntStack.prototype.pop = function () {\n return this[--this.length] | 0;\n };\n return IntStack;\n }();\n});","enifed('ember-application/index', ['exports', 'ember-application/system/application', 'ember-application/system/application-instance', 'ember-application/system/resolver', 'ember-application/system/engine', 'ember-application/system/engine-instance', 'ember-application/system/engine-parent', 'ember-application/initializers/dom-templates'], function (exports, _application, _applicationInstance, _resolver, _engine, _engineInstance, _engineParent) {\n 'use strict';\n\n exports.setEngineParent = exports.getEngineParent = exports.EngineInstance = exports.Engine = exports.Resolver = exports.ApplicationInstance = exports.Application = undefined;\n Object.defineProperty(exports, 'Application', {\n enumerable: true,\n get: function () {\n return _application.default;\n }\n });\n Object.defineProperty(exports, 'ApplicationInstance', {\n enumerable: true,\n get: function () {\n return _applicationInstance.default;\n }\n });\n Object.defineProperty(exports, 'Resolver', {\n enumerable: true,\n get: function () {\n return _resolver.default;\n }\n });\n Object.defineProperty(exports, 'Engine', {\n enumerable: true,\n get: function () {\n return _engine.default;\n }\n });\n Object.defineProperty(exports, 'EngineInstance', {\n enumerable: true,\n get: function () {\n return _engineInstance.default;\n }\n });\n Object.defineProperty(exports, 'getEngineParent', {\n enumerable: true,\n get: function () {\n return _engineParent.getEngineParent;\n }\n });\n Object.defineProperty(exports, 'setEngineParent', {\n enumerable: true,\n get: function () {\n return _engineParent.setEngineParent;\n }\n });\n});","enifed('ember-application/initializers/dom-templates', ['require', 'ember-glimmer', 'ember-environment', 'ember-application/system/application'], function (_require2, _emberGlimmer, _emberEnvironment, _application) {\n 'use strict';\n\n var bootstrap = function () {};\n\n _application.default.initializer({\n name: 'domTemplates',\n initialize: function () {\n var bootstrapModuleId = 'ember-template-compiler/system/bootstrap';\n var context = void 0;\n if (_emberEnvironment.environment.hasDOM && (0, _require2.has)(bootstrapModuleId)) {\n bootstrap = (0, _require2.default)(bootstrapModuleId).default;\n context = document;\n }\n\n bootstrap({ context: context, hasTemplate: _emberGlimmer.hasTemplate, setTemplate: _emberGlimmer.setTemplate });\n }\n });\n});","enifed('ember-application/system/application-instance', ['exports', 'ember-utils', 'ember-metal', 'ember-runtime', 'ember-environment', 'ember-views', 'ember-application/system/engine-instance'], function (exports, _emberUtils, _emberMetal, _emberRuntime, _emberEnvironment, _emberViews, _engineInstance) {\n 'use strict';\n\n /**\n The `ApplicationInstance` encapsulates all of the stateful aspects of a\n running `Application`.\n \n At a high-level, we break application boot into two distinct phases:\n \n * Definition time, where all of the classes, templates, and other\n dependencies are loaded (typically in the browser).\n * Run time, where we begin executing the application once everything\n has loaded.\n \n Definition time can be expensive and only needs to happen once since it is\n an idempotent operation. For example, between test runs and FastBoot\n requests, the application stays the same. It is only the state that we want\n to reset.\n \n That state is what the `ApplicationInstance` manages: it is responsible for\n creating the container that contains all application state, and disposing of\n it once the particular test run or FastBoot request has finished.\n \n @public\n @class ApplicationInstance\n @extends EngineInstance\n */\n\n /**\n @module @ember/application\n */\n\n var ApplicationInstance = _engineInstance.default.extend({\n /**\n The `Application` for which this is an instance.\n @property {Application} application\n @private\n */\n application: null,\n\n /**\n The DOM events for which the event dispatcher should listen.\n By default, the application's `Ember.EventDispatcher` listens\n for a set of standard DOM events, such as `mousedown` and\n `keyup`, and delegates them to your application's `Ember.View`\n instances.\n @private\n @property {Object} customEvents\n */\n customEvents: null,\n\n /**\n The root DOM element of the Application as an element or a\n [jQuery-compatible selector\n string](http://api.jquery.com/category/selectors/).\n @private\n @property {String|DOMElement} rootElement\n */\n rootElement: null,\n\n init: function () {\n this._super.apply(this, arguments);\n\n // Register this instance in the per-instance registry.\n //\n // Why do we need to register the instance in the first place?\n // Because we need a good way for the root route (a.k.a ApplicationRoute)\n // to notify us when it has created the root-most view. That view is then\n // appended to the rootElement, in the case of apps, to the fixture harness\n // in tests, or rendered to a string in the case of FastBoot.\n this.register('-application-instance:main', this, { instantiate: false });\n },\n _bootSync: function (options) {\n var router;\n\n if (this._booted) {\n return this;\n }\n\n options = new BootOptions(options);\n\n this.setupRegistry(options);\n\n if (options.rootElement) {\n this.rootElement = options.rootElement;\n } else {\n this.rootElement = this.application.rootElement;\n }\n\n if (options.location) {\n router = (0, _emberMetal.get)(this, 'router');\n\n (0, _emberMetal.set)(router, 'location', options.location);\n }\n\n this.application.runInstanceInitializers(this);\n\n if (options.isInteractive) {\n this.setupEventDispatcher();\n }\n\n this._booted = true;\n\n return this;\n },\n setupRegistry: function (options) {\n this.constructor.setupRegistry(this.__registry__, options);\n },\n\n router: (0, _emberMetal.computed)(function () {\n return this.lookup('router:main');\n }).readOnly(),\n\n didCreateRootView: function (view) {\n view.appendTo(this.rootElement);\n },\n startRouting: function () {\n var router = (0, _emberMetal.get)(this, 'router');\n router.startRouting();\n this._didSetupRouter = true;\n },\n setupRouter: function () {\n if (this._didSetupRouter) {\n return;\n }\n this._didSetupRouter = true;\n\n var router = (0, _emberMetal.get)(this, 'router');\n router.setupRouter();\n },\n handleURL: function (url) {\n var router = (0, _emberMetal.get)(this, 'router');\n\n this.setupRouter();\n return router.handleURL(url);\n },\n setupEventDispatcher: function () {\n var dispatcher = this.lookup('event_dispatcher:main');\n var applicationCustomEvents = (0, _emberMetal.get)(this.application, 'customEvents');\n var instanceCustomEvents = (0, _emberMetal.get)(this, 'customEvents');\n\n var customEvents = (0, _emberUtils.assign)({}, applicationCustomEvents, instanceCustomEvents);\n dispatcher.setup(customEvents, this.rootElement);\n\n return dispatcher;\n },\n getURL: function () {\n return (0, _emberMetal.get)(this, 'router.url');\n },\n visit: function (url) {\n var _this = this;\n\n this.setupRouter();\n\n var bootOptions = this.__container__.lookup('-environment:main');\n\n var router = (0, _emberMetal.get)(this, 'router');\n\n var handleTransitionResolve = function () {\n if (!bootOptions.options.shouldRender) {\n // No rendering is needed, and routing has completed, simply return.\n return _this;\n } else {\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n // Resolve once rendering is completed. `router.handleURL` returns the transition (as a thennable)\n // which resolves once the transition is completed, but the transition completion only queues up\n // a scheduled revalidation (into the `render` queue) in the Renderer.\n //\n // This uses `run.schedule('afterRender', ....)` to resolve after that rendering has completed.\n _emberMetal.run.schedule('afterRender', null, resolve, _this);\n });\n }\n };\n\n var handleTransitionReject = function (error) {\n if (error.error) {\n throw error.error;\n } else if (error.name === 'TransitionAborted' && router._routerMicrolib.activeTransition) {\n return router._routerMicrolib.activeTransition.then(handleTransitionResolve, handleTransitionReject);\n } else if (error.name === 'TransitionAborted') {\n throw new Error(error.message);\n } else {\n throw error;\n }\n };\n\n var location = (0, _emberMetal.get)(router, 'location');\n\n // Keeps the location adapter's internal URL in-sync\n location.setURL(url);\n\n // getURL returns the set url with the rootURL stripped off\n return router.handleURL(location.getURL()).then(handleTransitionResolve, handleTransitionReject);\n }\n });\n\n ApplicationInstance.reopenClass({\n setupRegistry: function (registry) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!options.toEnvironment) {\n options = new BootOptions(options);\n }\n\n registry.register('-environment:main', options.toEnvironment(), { instantiate: false });\n registry.register('service:-document', options.document, { instantiate: false });\n\n this._super(registry, options);\n }\n });\n\n /**\n A list of boot-time configuration options for customizing the behavior of\n an `Ember.ApplicationInstance`.\n \n This is an interface class that exists purely to document the available\n options; you do not need to construct it manually. Simply pass a regular\n JavaScript object containing the desired options into methods that require\n one of these options object:\n \n ```javascript\n MyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n ```\n \n Not all combinations of the supported options are valid. See the documentation\n on `Ember.Application#visit` for the supported configurations.\n \n Internal, experimental or otherwise unstable flags are marked as private.\n \n @class BootOptions\n @namespace ApplicationInstance\n @public\n */\n function BootOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n /**\n Provide a specific instance of jQuery. This is useful in conjunction with\n the `document` option, as it allows you to use a copy of `jQuery` that is\n appropriately bound to the foreign `document` (e.g. a jsdom).\n This is highly experimental and support very incomplete at the moment.\n @property jQuery\n @type Object\n @default auto-detected\n @private\n */\n this.jQuery = _emberViews.jQuery; // This default is overridable below\n\n /**\n Interactive mode: whether we need to set up event delegation and invoke\n lifecycle callbacks on Components.\n @property isInteractive\n @type boolean\n @default auto-detected\n @private\n */\n this.isInteractive = _emberEnvironment.environment.hasDOM; // This default is overridable below\n\n /**\n Run in a full browser environment.\n When this flag is set to `false`, it will disable most browser-specific\n and interactive features. Specifically:\n * It does not use `jQuery` to append the root view; the `rootElement`\n (either specified as a subsequent option or on the application itself)\n must already be an `Element` in the given `document` (as opposed to a\n string selector).\n * It does not set up an `EventDispatcher`.\n * It does not run any `Component` lifecycle hooks (such as `didInsertElement`).\n * It sets the `location` option to `\"none\"`. (If you would like to use\n the location adapter specified in the app's router instead, you can also\n specify `{ location: null }` to specifically opt-out.)\n @property isBrowser\n @type boolean\n @default auto-detected\n @public\n */\n if (options.isBrowser !== undefined) {\n this.isBrowser = !!options.isBrowser;\n } else {\n this.isBrowser = _emberEnvironment.environment.hasDOM;\n }\n\n if (!this.isBrowser) {\n this.jQuery = null;\n this.isInteractive = false;\n this.location = 'none';\n }\n\n /**\n Disable rendering completely.\n When this flag is set to `true`, it will disable the entire rendering\n pipeline. Essentially, this puts the app into \"routing-only\" mode. No\n templates will be rendered, and no Components will be created.\n @property shouldRender\n @type boolean\n @default true\n @public\n */\n if (options.shouldRender !== undefined) {\n this.shouldRender = !!options.shouldRender;\n } else {\n this.shouldRender = true;\n }\n\n if (!this.shouldRender) {\n this.jQuery = null;\n this.isInteractive = false;\n }\n\n /**\n If present, render into the given `Document` object instead of the\n global `window.document` object.\n In practice, this is only useful in non-browser environment or in\n non-interactive mode, because Ember's `jQuery` dependency is\n implicitly bound to the current document, causing event delegation\n to not work properly when the app is rendered into a foreign\n document object (such as an iframe's `contentDocument`).\n In non-browser mode, this could be a \"`Document`-like\" object as\n Ember only interact with a small subset of the DOM API in non-\n interactive mode. While the exact requirements have not yet been\n formalized, the `SimpleDOM` library's implementation is known to\n work.\n @property document\n @type Document\n @default the global `document` object\n @public\n */\n if (options.document) {\n this.document = options.document;\n } else {\n this.document = typeof document !== 'undefined' ? document : null;\n }\n\n /**\n If present, overrides the application's `rootElement` property on\n the instance. This is useful for testing environment, where you\n might want to append the root view to a fixture area.\n In non-browser mode, because Ember does not have access to jQuery,\n this options must be specified as a DOM `Element` object instead of\n a selector string.\n See the documentation on `Ember.Applications`'s `rootElement` for\n details.\n @property rootElement\n @type String|Element\n @default null\n @public\n */\n if (options.rootElement) {\n this.rootElement = options.rootElement;\n }\n\n // Set these options last to give the user a chance to override the\n // defaults from the \"combo\" options like `isBrowser` (although in\n // practice, the resulting combination is probably invalid)\n\n /**\n If present, overrides the router's `location` property with this\n value. This is useful for environments where trying to modify the\n URL would be inappropriate.\n @property location\n @type string\n @default null\n @public\n */\n if (options.location !== undefined) {\n this.location = options.location;\n }\n\n if (options.jQuery !== undefined) {\n this.jQuery = options.jQuery;\n }\n\n if (options.isInteractive !== undefined) {\n this.isInteractive = !!options.isInteractive;\n }\n }\n\n BootOptions.prototype.toEnvironment = function () {\n var env = (0, _emberUtils.assign)({}, _emberEnvironment.environment);\n // For compatibility with existing code\n env.hasDOM = this.isBrowser;\n env.isInteractive = this.isInteractive;\n env.options = this;\n return env;\n };\n\n Object.defineProperty(ApplicationInstance.prototype, 'registry', {\n configurable: true,\n enumerable: false,\n get: function () {\n return (0, _emberRuntime.buildFakeRegistryWithDeprecations)(this, 'ApplicationInstance');\n }\n });\n\n exports.default = ApplicationInstance;\n});","enifed('ember-application/system/application', ['exports', 'ember-babel', 'ember-utils', 'ember-environment', 'ember-debug', 'ember-metal', 'ember-runtime', 'ember-views', 'ember-routing', 'ember-application/system/application-instance', 'container', 'ember-application/system/engine', 'ember-glimmer'], function (exports, _emberBabel, _emberUtils, _emberEnvironment, _emberDebug, _emberMetal, _emberRuntime, _emberViews, _emberRouting, _applicationInstance, _container, _engine, _emberGlimmer) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']);\n\n var librariesRegistered = false;\n\n /**\n An instance of `Ember.Application` is the starting point for every Ember\n application. It helps to instantiate, initialize and coordinate the many\n objects that make up your app.\n \n Each Ember app has one and only one `Ember.Application` object. In fact, the\n very first thing you should do in your application is create the instance:\n \n ```javascript\n window.App = Ember.Application.create();\n ```\n \n Typically, the application object is the only global variable. All other\n classes in your app should be properties on the `Ember.Application` instance,\n which highlights its first role: a global namespace.\n \n For example, if you define a view class, it might look like this:\n \n ```javascript\n App.MyView = Ember.View.extend();\n ```\n \n By default, calling `Ember.Application.create()` will automatically initialize\n your application by calling the `Ember.Application.initialize()` method. If\n you need to delay initialization, you can call your app's `deferReadiness()`\n method. When you are ready for your app to be initialized, call its\n `advanceReadiness()` method.\n \n You can define a `ready` method on the `Ember.Application` instance, which\n will be run by Ember when the application is initialized.\n \n Because `Ember.Application` inherits from `Ember.Namespace`, any classes\n you create will have useful string representations when calling `toString()`.\n See the `Ember.Namespace` documentation for more information.\n \n While you can think of your `Ember.Application` as a container that holds the\n other classes in your application, there are several other responsibilities\n going on under-the-hood that you may want to understand.\n \n ### Event Delegation\n \n Ember uses a technique called _event delegation_. This allows the framework\n to set up a global, shared event listener instead of requiring each view to\n do it manually. For example, instead of each view registering its own\n `mousedown` listener on its associated element, Ember sets up a `mousedown`\n listener on the `body`.\n \n If a `mousedown` event occurs, Ember will look at the target of the event and\n start walking up the DOM node tree, finding corresponding views and invoking\n their `mouseDown` method as it goes.\n \n `Ember.Application` has a number of default events that it listens for, as\n well as a mapping from lowercase events to camel-cased view method names. For\n example, the `keypress` event causes the `keyPress` method on the view to be\n called, the `dblclick` event causes `doubleClick` to be called, and so on.\n \n If there is a bubbling browser event that Ember does not listen for by\n default, you can specify custom events and their corresponding view method\n names by setting the application's `customEvents` property:\n \n ```javascript\n let App = Ember.Application.create({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n });\n ```\n \n To prevent Ember from setting up a listener for a default event,\n specify the event name with a `null` value in the `customEvents`\n property:\n \n ```javascript\n let App = Ember.Application.create({\n customEvents: {\n // prevent listeners for mouseenter/mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n });\n ```\n \n By default, the application sets up these event listeners on the document\n body. However, in cases where you are embedding an Ember application inside\n an existing page, you may want it to set up the listeners on an element\n inside the body.\n \n For example, if only events inside a DOM element with the ID of `ember-app`\n should be delegated, set your application's `rootElement` property:\n \n ```javascript\n let App = Ember.Application.create({\n rootElement: '#ember-app'\n });\n ```\n \n The `rootElement` can be either a DOM element or a jQuery-compatible selector\n string. Note that *views appended to the DOM outside the root element will\n not receive events.* If you specify a custom root element, make sure you only\n append views inside it!\n \n To learn more about the events Ember components use, see\n [components/handling-events](https://guides.emberjs.com/v2.6.0/components/handling-events/#toc_event-names).\n \n ### Initializers\n \n Libraries on top of Ember can add initializers, like so:\n \n ```javascript\n Ember.Application.initializer({\n name: 'api-adapter',\n \n initialize: function(application) {\n application.register('api-adapter:main', ApiAdapter);\n }\n });\n ```\n \n Initializers provide an opportunity to access the internal registry, which\n organizes the different components of an Ember application. Additionally\n they provide a chance to access the instantiated application. Beyond\n being used for libraries, initializers are also a great way to organize\n dependency injection or setup in your own application.\n \n ### Routing\n \n In addition to creating your application's router, `Ember.Application` is\n also responsible for telling the router when to start routing. Transitions\n between routes can be logged with the `LOG_TRANSITIONS` flag, and more\n detailed intra-transition logging can be logged with\n the `LOG_TRANSITIONS_INTERNAL` flag:\n \n ```javascript\n let App = Ember.Application.create({\n LOG_TRANSITIONS: true, // basic logging of successful transitions\n LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps\n });\n ```\n \n By default, the router will begin trying to translate the current URL into\n application state once the browser emits the `DOMContentReady` event. If you\n need to defer routing, you can call the application's `deferReadiness()`\n method. Once routing can begin, call the `advanceReadiness()` method.\n \n If there is any setup required before routing begins, you can implement a\n `ready()` method on your app that will be invoked immediately before routing\n begins.\n \n @class Application\n @extends Engine\n @uses RegistryProxyMixin\n @public\n */\n\n var Application = _engine.default.extend({\n /**\n The root DOM element of the Application. This can be specified as an\n element or a\n [jQuery-compatible selector string](http://api.jquery.com/category/selectors/).\n This is the element that will be passed to the Application's,\n `eventDispatcher`, which sets up the listeners for event delegation. Every\n view in your application should be a child of the element you specify here.\n @property rootElement\n @type DOMElement\n @default 'body'\n @public\n */\n rootElement: 'body',\n\n /**\n The `Ember.EventDispatcher` responsible for delegating events to this\n application's views.\n The event dispatcher is created by the application at initialization time\n and sets up event listeners on the DOM element described by the\n application's `rootElement` property.\n See the documentation for `Ember.EventDispatcher` for more information.\n @property eventDispatcher\n @type Ember.EventDispatcher\n @default null\n @public\n */\n eventDispatcher: null,\n\n /**\n The DOM events for which the event dispatcher should listen.\n By default, the application's `Ember.EventDispatcher` listens\n for a set of standard DOM events, such as `mousedown` and\n `keyup`, and delegates them to your application's `Ember.View`\n instances.\n If you would like additional bubbling events to be delegated to your\n views, set your `Ember.Application`'s `customEvents` property\n to a hash containing the DOM event name as the key and the\n corresponding view method name as the value. Setting an event to\n a value of `null` will prevent a default event listener from being\n added for that event.\n To add new events to be listened to:\n ```javascript\n let App = Ember.Application.create({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n });\n ```\n To prevent default events from being listened to:\n ```javascript\n let App = Ember.Application.create({\n customEvents: {\n // remove support for mouseenter / mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n });\n ```\n @property customEvents\n @type Object\n @default null\n @public\n */\n customEvents: null,\n\n /**\n Whether the application should automatically start routing and render\n templates to the `rootElement` on DOM ready. While default by true,\n other environments such as FastBoot or a testing harness can set this\n property to `false` and control the precise timing and behavior of the boot\n process.\n @property autoboot\n @type Boolean\n @default true\n @private\n */\n autoboot: true,\n\n /**\n Whether the application should be configured for the legacy \"globals mode\".\n Under this mode, the Application object serves as a global namespace for all\n classes.\n ```javascript\n let App = Ember.Application.create({\n ...\n });\n App.Router.reopen({\n location: 'none'\n });\n App.Router.map({\n ...\n });\n App.MyComponent = Ember.Component.extend({\n ...\n });\n ```\n This flag also exposes other internal APIs that assumes the existence of\n a special \"default instance\", like `App.__container__.lookup(...)`.\n This option is currently not configurable, its value is derived from\n the `autoboot` flag – disabling `autoboot` also implies opting-out of\n globals mode support, although they are ultimately orthogonal concerns.\n Some of the global modes features are already deprecated in 1.x. The\n existence of this flag is to untangle the globals mode code paths from\n the autoboot code paths, so that these legacy features can be reviewed\n for deprecation/removal separately.\n Forcing the (autoboot=true, _globalsMode=false) here and running the tests\n would reveal all the places where we are still relying on these legacy\n behavior internally (mostly just tests).\n @property _globalsMode\n @type Boolean\n @default true\n @private\n */\n _globalsMode: true,\n\n init: function () {\n this._super.apply(this, arguments);\n\n if (!this.$) {\n this.$ = _emberViews.jQuery;\n }\n\n registerLibraries();\n\n // Start off the number of deferrals at 1. This will be decremented by\n // the Application's own `boot` method.\n this._readinessDeferrals = 1;\n this._booted = false;\n\n this.autoboot = this._globalsMode = !!this.autoboot;\n\n if (this._globalsMode) {\n this._prepareForGlobalsMode();\n }\n\n if (this.autoboot) {\n this.waitForDOMReady();\n }\n },\n buildInstance: function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n options.base = this;\n options.application = this;\n return _applicationInstance.default.create(options);\n },\n _prepareForGlobalsMode: function () {\n // Create subclass of Ember.Router for this Application instance.\n // This is to ensure that someone reopening `App.Router` does not\n // tamper with the default `Ember.Router`.\n this.Router = (this.Router || _emberRouting.Router).extend();\n\n this._buildDeprecatedInstance();\n },\n _buildDeprecatedInstance: function () {\n // Build a default instance\n var instance = this.buildInstance();\n\n // Legacy support for App.__container__ and other global methods\n // on App that rely on a single, default instance.\n this.__deprecatedInstance__ = instance;\n this.__container__ = instance.__container__;\n },\n waitForDOMReady: function () {\n if (!this.$ || this.$.isReady) {\n _emberMetal.run.schedule('actions', this, 'domReady');\n } else {\n this.$().ready(_emberMetal.run.bind(this, 'domReady'));\n }\n },\n domReady: function () {\n if (this.isDestroyed) {\n return;\n }\n\n this._bootSync();\n\n // Continues to `didBecomeReady`\n },\n deferReadiness: function () {\n false && !(this instanceof Application) && (0, _emberDebug.assert)('You must call deferReadiness on an instance of Ember.Application', this instanceof Application);\n false && !(this._readinessDeferrals > 0) && (0, _emberDebug.assert)('You cannot defer readiness since the `ready()` hook has already been called.', this._readinessDeferrals > 0);\n\n this._readinessDeferrals++;\n },\n advanceReadiness: function () {\n false && !(this instanceof Application) && (0, _emberDebug.assert)('You must call advanceReadiness on an instance of Ember.Application', this instanceof Application);\n\n this._readinessDeferrals--;\n\n if (this._readinessDeferrals === 0) {\n _emberMetal.run.once(this, this.didBecomeReady);\n }\n },\n boot: function () {\n if (this._bootPromise) {\n return this._bootPromise;\n }\n\n try {\n this._bootSync();\n } catch (_) {\n // Ignore th error: in the asynchronous boot path, the error is already reflected\n // in the promise rejection\n }\n\n return this._bootPromise;\n },\n _bootSync: function () {\n if (this._booted) {\n return;\n }\n\n // Even though this returns synchronously, we still need to make sure the\n // boot promise exists for book-keeping purposes: if anything went wrong in\n // the boot process, we need to store the error as a rejection on the boot\n // promise so that a future caller of `boot()` can tell what failed.\n var defer = this._bootResolver = _emberRuntime.RSVP.defer();\n this._bootPromise = defer.promise;\n\n try {\n this.runInitializers();\n (0, _emberRuntime.runLoadHooks)('application', this);\n this.advanceReadiness();\n // Continues to `didBecomeReady`\n } catch (error) {\n // For the asynchronous boot path\n defer.reject(error);\n\n // For the synchronous boot path\n throw error;\n }\n },\n reset: function () {\n false && !(this._globalsMode && this.autoboot) && (0, _emberDebug.assert)('Calling reset() on instances of `Ember.Application` is not\\n supported when globals mode is disabled; call `visit()` to\\n create new `Ember.ApplicationInstance`s and dispose them\\n via their `destroy()` method instead.', this._globalsMode && this.autoboot);\n\n var instance = this.__deprecatedInstance__;\n\n this._readinessDeferrals = 1;\n this._bootPromise = null;\n this._bootResolver = null;\n this._booted = false;\n\n _emberMetal.run.join(this, function () {\n (0, _emberMetal.run)(instance, 'destroy');\n this._buildDeprecatedInstance();\n _emberMetal.run.schedule('actions', this, '_bootSync');\n });\n },\n didBecomeReady: function () {\n var instance;\n\n try {\n // TODO: Is this still needed for _globalsMode = false?\n if (!(0, _emberDebug.isTesting)()) {\n // Eagerly name all classes that are already loaded\n _emberRuntime.Namespace.processAll();\n (0, _emberRuntime.setNamespaceSearchDisabled)(true);\n }\n\n // See documentation on `_autoboot()` for details\n if (this.autoboot) {\n instance = void 0;\n\n\n if (this._globalsMode) {\n // If we already have the __deprecatedInstance__ lying around, boot it to\n // avoid unnecessary work\n instance = this.__deprecatedInstance__;\n } else {\n // Otherwise, build an instance and boot it. This is currently unreachable,\n // because we forced _globalsMode to === autoboot; but having this branch\n // allows us to locally toggle that flag for weeding out legacy globals mode\n // dependencies independently\n instance = this.buildInstance();\n }\n\n instance._bootSync();\n\n // TODO: App.ready() is not called when autoboot is disabled, is this correct?\n this.ready();\n\n instance.startRouting();\n }\n\n // For the asynchronous boot path\n this._bootResolver.resolve(this);\n\n // For the synchronous boot path\n this._booted = true;\n } catch (error) {\n // For the asynchronous boot path\n this._bootResolver.reject(error);\n\n // For the synchronous boot path\n throw error;\n }\n },\n ready: function () {\n return this;\n },\n willDestroy: function () {\n this._super.apply(this, arguments);\n (0, _emberRuntime.setNamespaceSearchDisabled)(false);\n this._booted = false;\n this._bootPromise = null;\n this._bootResolver = null;\n\n if (_emberRuntime._loaded.application === this) {\n _emberRuntime._loaded.application = undefined;\n }\n\n if (this._globalsMode && this.__deprecatedInstance__) {\n this.__deprecatedInstance__.destroy();\n }\n },\n visit: function (url, options) {\n var _this = this;\n\n return this.boot().then(function () {\n var instance = _this.buildInstance();\n\n return instance.boot(options).then(function () {\n return instance.visit(url);\n }).catch(function (error) {\n (0, _emberMetal.run)(instance, 'destroy');\n throw error;\n });\n });\n }\n });\n\n Object.defineProperty(Application.prototype, 'registry', {\n configurable: true,\n enumerable: false,\n get: function () {\n return (0, _emberRuntime.buildFakeRegistryWithDeprecations)(this, 'Application');\n }\n });\n\n Application.reopenClass({\n buildRegistry: function () {\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n var registry = this._super.apply(this, arguments);\n\n commonSetupRegistry(registry);\n\n (0, _emberGlimmer.setupApplicationRegistry)(registry);\n\n return registry;\n }\n });\n\n function commonSetupRegistry(registry) {\n registry.register('router:main', _emberRouting.Router.extend());\n registry.register('-view-registry:main', {\n create: function () {\n return (0, _emberUtils.dictionary)(null);\n }\n });\n\n registry.register('route:basic', _emberRouting.Route);\n registry.register('event_dispatcher:main', _emberViews.EventDispatcher);\n\n registry.injection('router:main', 'namespace', 'application:main');\n\n registry.register('location:auto', _emberRouting.AutoLocation);\n registry.register('location:hash', _emberRouting.HashLocation);\n registry.register('location:history', _emberRouting.HistoryLocation);\n registry.register('location:none', _emberRouting.NoneLocation);\n\n registry.register((0, _container.privatize)(_templateObject), _emberRouting.BucketCache);\n\n registry.register('service:router', _emberRouting.RouterService);\n registry.injection('service:router', '_router', 'router:main');\n }\n\n function registerLibraries() {\n if (!librariesRegistered) {\n librariesRegistered = true;\n\n if (_emberEnvironment.environment.hasDOM && typeof _emberViews.jQuery === 'function') {\n _emberMetal.libraries.registerCoreLibrary('jQuery', (0, _emberViews.jQuery)().jquery);\n }\n }\n }\n\n exports.default = Application;\n});","enifed('ember-application/system/engine-instance', ['exports', 'ember-babel', 'ember-utils', 'ember-runtime', 'ember-debug', 'ember-metal', 'container', 'ember-application/system/engine-parent'], function (exports, _emberBabel, _emberUtils, _emberRuntime, _emberDebug, _emberMetal, _container, _engineParent) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']);\n\n /**\n The `EngineInstance` encapsulates all of the stateful aspects of a\n running `Engine`.\n \n @public\n @class EngineInstance\n @extends EmberObject\n @uses RegistryProxyMixin\n @uses ContainerProxyMixin\n */\n\n var EngineInstance = _emberRuntime.Object.extend(_emberRuntime.RegistryProxyMixin, _emberRuntime.ContainerProxyMixin, {\n /**\n The base `Engine` for which this is an instance.\n @property {Ember.Engine} engine\n @private\n */\n base: null,\n\n init: function () {\n this._super.apply(this, arguments);\n\n (0, _emberUtils.guidFor)(this);\n\n var base = this.base;\n\n if (!base) {\n base = this.application;\n this.base = base;\n }\n\n // Create a per-instance registry that will use the application's registry\n // as a fallback for resolving registrations.\n var registry = this.__registry__ = new _container.Registry({\n fallback: base.__registry__\n });\n\n // Create a per-instance container from the instance's registry\n this.__container__ = registry.container({ owner: this });\n\n this._booted = false;\n },\n boot: function (options) {\n var _this = this;\n\n if (this._bootPromise) {\n return this._bootPromise;\n }\n\n this._bootPromise = new _emberRuntime.RSVP.Promise(function (resolve) {\n return resolve(_this._bootSync(options));\n });\n\n return this._bootPromise;\n },\n _bootSync: function (options) {\n if (this._booted) {\n return this;\n }\n\n false && !(0, _engineParent.getEngineParent)(this) && (0, _emberDebug.assert)('An engine instance\\'s parent must be set via `setEngineParent(engine, parent)` prior to calling `engine.boot()`.', (0, _engineParent.getEngineParent)(this));\n\n this.cloneParentDependencies();\n\n this.setupRegistry(options);\n\n this.base.runInstanceInitializers(this);\n\n this._booted = true;\n\n return this;\n },\n setupRegistry: function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.__container__.lookup('-environment:main');\n\n this.constructor.setupRegistry(this.__registry__, options);\n },\n unregister: function (fullName) {\n this.__container__.reset(fullName);\n this._super.apply(this, arguments);\n },\n buildChildEngineInstance: function (name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var Engine = this.lookup('engine:' + name);\n\n if (!Engine) {\n throw new _emberDebug.Error('You attempted to mount the engine \\'' + name + '\\', but it is not registered with its parent.');\n }\n\n var engineInstance = Engine.buildInstance(options);\n\n (0, _engineParent.setEngineParent)(engineInstance, this);\n\n return engineInstance;\n },\n cloneParentDependencies: function () {\n var _this2 = this;\n\n var parent = (0, _engineParent.getEngineParent)(this);\n\n ['route:basic', 'service:-routing', 'service:-glimmer-environment'].forEach(function (key) {\n return _this2.register(key, parent.resolveRegistration(key));\n });\n\n var env = parent.lookup('-environment:main');\n this.register('-environment:main', env, { instantiate: false });\n\n var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', 'renderer:-' + (env.isInteractive ? 'dom' : 'inert'), 'service:-document'];\n\n if (env.isInteractive) {\n singletons.push('event_dispatcher:main');\n }\n\n singletons.forEach(function (key) {\n return _this2.register(key, parent.lookup(key), { instantiate: false });\n });\n\n this.inject('view', '_environment', '-environment:main');\n this.inject('route', '_environment', '-environment:main');\n }\n });\n\n EngineInstance.reopenClass({\n setupRegistry: function (registry, options) {\n // when no options/environment is present, do nothing\n if (!options) {\n return;\n }\n\n registry.injection('view', '_environment', '-environment:main');\n registry.injection('route', '_environment', '-environment:main');\n\n if (options.isInteractive) {\n registry.injection('view', 'renderer', 'renderer:-dom');\n registry.injection('component', 'renderer', 'renderer:-dom');\n } else {\n registry.injection('view', 'renderer', 'renderer:-inert');\n registry.injection('component', 'renderer', 'renderer:-inert');\n }\n }\n });\n\n exports.default = EngineInstance;\n});","enifed('ember-application/system/engine-parent', ['exports', 'ember-utils'], function (exports, _emberUtils) {\n 'use strict';\n\n exports.ENGINE_PARENT = undefined;\n exports.getEngineParent =\n\n /**\n `getEngineParent` retrieves an engine instance's parent instance.\n \n @method getEngineParent\n @param {EngineInstance} engine An engine instance.\n @return {EngineInstance} The parent engine instance.\n @for @ember/engine\n @static\n @private\n */\n function (engine) {\n return engine[ENGINE_PARENT];\n }\n\n /**\n `setEngineParent` sets an engine instance's parent instance.\n \n @method setEngineParent\n @param {EngineInstance} engine An engine instance.\n @param {EngineInstance} parent The parent engine instance.\n @private\n */\n ;\n exports.setEngineParent = function (engine, parent) {\n engine[ENGINE_PARENT] = parent;\n };\n var ENGINE_PARENT = exports.ENGINE_PARENT = (0, _emberUtils.symbol)('ENGINE_PARENT');\n});","enifed('ember-application/system/engine', ['exports', 'ember-babel', 'ember-utils', 'ember-runtime', 'container', 'dag-map', 'ember-debug', 'ember-metal', 'ember-application/system/resolver', 'ember-application/system/engine-instance', 'ember-routing', 'ember-extension-support', 'ember-views', 'ember-glimmer'], function (exports, _emberBabel, _emberUtils, _emberRuntime, _container, _dagMap, _emberDebug, _emberMetal, _resolver, _engineInstance, _emberRouting, _emberExtensionSupport, _emberViews, _emberGlimmer) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']);\n\n function props(obj) {\n var properties = [];\n\n for (var key in obj) {\n properties.push(key);\n }\n\n return properties;\n }\n\n /**\n The `Engine` class contains core functionality for both applications and\n engines.\n \n Each engine manages a registry that's used for dependency injection and\n exposed through `RegistryProxy`.\n \n Engines also manage initializers and instance initializers.\n \n Engines can spawn `EngineInstance` instances via `buildInstance()`.\n \n @class Engine\n @extends Ember.Namespace\n @uses RegistryProxy\n @public\n */\n var Engine = _emberRuntime.Namespace.extend(_emberRuntime.RegistryProxyMixin, {\n init: function () {\n this._super.apply(this, arguments);\n\n this.buildRegistry();\n },\n\n /**\n A private flag indicating whether an engine's initializers have run yet.\n @private\n @property _initializersRan\n */\n _initializersRan: false,\n\n ensureInitializers: function () {\n if (!this._initializersRan) {\n this.runInitializers();\n this._initializersRan = true;\n }\n },\n buildInstance: function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this.ensureInitializers();\n options.base = this;\n return _engineInstance.default.create(options);\n },\n buildRegistry: function () {\n var registry = this.__registry__ = this.constructor.buildRegistry(this);\n\n return registry;\n },\n initializer: function (options) {\n this.constructor.initializer(options);\n },\n instanceInitializer: function (options) {\n this.constructor.instanceInitializer(options);\n },\n runInitializers: function () {\n var _this = this;\n\n this._runInitializer('initializers', function (name, initializer) {\n false && !!!initializer && (0, _emberDebug.assert)('No application initializer named \\'' + name + '\\'', !!initializer);\n\n if (initializer.initialize.length === 2) {\n false && !false && (0, _emberDebug.deprecate)('The `initialize` method for Application initializer \\'' + name + '\\' should take only one argument - `App`, an instance of an `Application`.', false, {\n id: 'ember-application.app-initializer-initialize-arguments',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_initializer-arity'\n });\n\n initializer.initialize(_this.__registry__, _this);\n } else {\n initializer.initialize(_this);\n }\n });\n },\n runInstanceInitializers: function (instance) {\n this._runInitializer('instanceInitializers', function (name, initializer) {\n false && !!!initializer && (0, _emberDebug.assert)('No instance initializer named \\'' + name + '\\'', !!initializer);\n\n initializer.initialize(instance);\n });\n },\n _runInitializer: function (bucketName, cb) {\n var initializersByName = (0, _emberMetal.get)(this.constructor, bucketName),\n i;\n var initializers = props(initializersByName);\n var graph = new _dagMap.default();\n var initializer = void 0;\n\n for (i = 0; i < initializers.length; i++) {\n initializer = initializersByName[initializers[i]];\n graph.add(initializer.name, initializer, initializer.before, initializer.after);\n }\n\n graph.topsort(cb);\n }\n });\n\n Engine.reopenClass({\n initializers: Object.create(null),\n instanceInitializers: Object.create(null),\n\n /**\n The goal of initializers should be to register dependencies and injections.\n This phase runs once. Because these initializers may load code, they are\n allowed to defer application readiness and advance it. If you need to access\n the container or store you should use an InstanceInitializer that will be run\n after all initializers and therefore after all code is loaded and the app is\n ready.\n Initializer receives an object which has the following attributes:\n `name`, `before`, `after`, `initialize`. The only required attribute is\n `initialize`, all others are optional.\n * `name` allows you to specify under which name the initializer is registered.\n This must be a unique name, as trying to register two initializers with the\n same name will result in an error.\n ```app/initializer/named-initializer.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('Running namedInitializer!');\n }\n export default {\n name: 'named-initializer',\n initialize\n };\n ```\n * `before` and `after` are used to ensure that this initializer is ran prior\n or after the one identified by the value. This value can be a single string\n or an array of strings, referencing the `name` of other initializers.\n An example of ordering initializers, we create an initializer named `first`:\n ```app/initializer/first.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('First initializer!');\n }\n export default {\n name: 'first',\n initialize\n };\n ```\n ```bash\n // DEBUG: First initializer!\n ```\n We add another initializer named `second`, specifying that it should run\n after the initializer named `first`:\n ```app/initializer/second.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('Second initializer!');\n }\n export default {\n name: 'second',\n after: 'first',\n initialize\n };\n ```\n ```\n // DEBUG: First initializer!\n // DEBUG: Second initializer!\n ```\n Afterwards we add a further initializer named `pre`, this time specifying\n that it should run before the initializer named `first`:\n ```app/initializer/pre.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('Pre initializer!');\n }\n export default {\n name: 'pre',\n before: 'first',\n initialize\n };\n ```\n ```bash\n // DEBUG: Pre initializer!\n // DEBUG: First initializer!\n // DEBUG: Second initializer!\n ```\n Finally we add an initializer named `post`, specifying it should run after\n both the `first` and the `second` initializers:\n ```app/initializer/post.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('Post initializer!');\n }\n export default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n };\n ```\n ```bash\n // DEBUG: Pre initializer!\n // DEBUG: First initializer!\n // DEBUG: Second initializer!\n // DEBUG: Post initializer!\n ```\n * `initialize` is a callback function that receives one argument,\n `application`, on which you can operate.\n Example of using `application` to register an adapter:\n ```app/initializer/api-adapter.js\n import ApiAdapter from '../utils/api-adapter';\n export function initialize(application) {\n application.register('api-adapter:main', ApiAdapter);\n }\n export default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n };\n ```\n @method initializer\n @param initializer {Object}\n @public\n */\n\n initializer: buildInitializerMethod('initializers', 'initializer'),\n\n /**\n Instance initializers run after all initializers have run. Because\n instance initializers run after the app is fully set up. We have access\n to the store, container, and other items. However, these initializers run\n after code has loaded and are not allowed to defer readiness.\n Instance initializer receives an object which has the following attributes:\n `name`, `before`, `after`, `initialize`. The only required attribute is\n `initialize`, all others are optional.\n * `name` allows you to specify under which name the instanceInitializer is\n registered. This must be a unique name, as trying to register two\n instanceInitializer with the same name will result in an error.\n ```app/initializer/named-instance-initializer.js\n import { debug } from '@ember/debug';\n export function initialize() {\n debug('Running named-instance-initializer!');\n }\n export default {\n name: 'named-instance-initializer',\n initialize\n };\n ```\n * `before` and `after` are used to ensure that this initializer is ran prior\n or after the one identified by the value. This value can be a single string\n or an array of strings, referencing the `name` of other initializers.\n * See Ember.Application.initializer for discussion on the usage of before\n and after.\n Example instanceInitializer to preload data into the store.\n ```app/initializer/preload-data.js\n import $ from 'jquery';\n export function initialize(application) {\n var userConfig, userConfigEncoded, store;\n // We have a HTML escaped JSON representation of the user's basic\n // configuration generated server side and stored in the DOM of the main\n // index.html file. This allows the app to have access to a set of data\n // without making any additional remote calls. Good for basic data that is\n // needed for immediate rendering of the page. Keep in mind, this data,\n // like all local models and data can be manipulated by the user, so it\n // should not be relied upon for security or authorization.\n // Grab the encoded data from the meta tag\n userConfigEncoded = $('head meta[name=app-user-config]').attr('content');\n // Unescape the text, then parse the resulting JSON into a real object\n userConfig = JSON.parse(unescape(userConfigEncoded));\n // Lookup the store\n store = application.lookup('service:store');\n // Push the encoded JSON into the store\n store.pushPayload(userConfig);\n }\n export default {\n name: 'named-instance-initializer',\n initialize\n };\n ```\n @method instanceInitializer\n @param instanceInitializer\n @public\n */\n instanceInitializer: buildInitializerMethod('instanceInitializers', 'instance initializer'),\n\n buildRegistry: function (namespace) {\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n var registry = new _container.Registry({\n resolver: resolverFor(namespace)\n });\n\n registry.set = _emberMetal.set;\n\n registry.register('application:main', namespace, { instantiate: false });\n\n commonSetupRegistry(registry);\n (0, _emberGlimmer.setupEngineRegistry)(registry);\n\n return registry;\n },\n\n /**\n Set this to provide an alternate class to `Ember.DefaultResolver`\n @deprecated Use 'Resolver' instead\n @property resolver\n @public\n */\n resolver: null,\n\n /**\n Set this to provide an alternate class to `Ember.DefaultResolver`\n @property resolver\n @public\n */\n Resolver: null\n });\n\n /**\n This function defines the default lookup rules for container lookups:\n \n * templates are looked up on `Ember.TEMPLATES`\n * other names are looked up on the application after classifying the name.\n For example, `controller:post` looks up `App.PostController` by default.\n * if the default lookup fails, look for registered classes on the container\n \n This allows the application to register default injections in the container\n that could be overridden by the normal naming convention.\n \n @private\n @method resolverFor\n @param {Ember.Namespace} namespace the namespace to look for classes\n @return {*} the resolved value for a given lookup\n */\n function resolverFor(namespace) {\n var ResolverClass = namespace.get('Resolver') || _resolver.default;\n\n return ResolverClass.create({\n namespace: namespace\n });\n }\n\n function buildInitializerMethod(bucketName, humanName) {\n return function (initializer) {\n var attrs;\n\n // If this is the first initializer being added to a subclass, we are going to reopen the class\n // to make sure we have a new `initializers` object, which extends from the parent class' using\n // prototypal inheritance. Without this, attempting to add initializers to the subclass would\n // pollute the parent class as well as other subclasses.\n if (this.superclass[bucketName] !== undefined && this.superclass[bucketName] === this[bucketName]) {\n attrs = {};\n\n attrs[bucketName] = Object.create(this[bucketName]);\n this.reopenClass(attrs);\n }\n\n false && !!this[bucketName][initializer.name] && (0, _emberDebug.assert)('The ' + humanName + ' \\'' + initializer.name + '\\' has already been registered', !this[bucketName][initializer.name]);\n false && !(0, _emberUtils.canInvoke)(initializer, 'initialize') && (0, _emberDebug.assert)('An ' + humanName + ' cannot be registered without an initialize function', (0, _emberUtils.canInvoke)(initializer, 'initialize'));\n false && !(initializer.name !== undefined) && (0, _emberDebug.assert)('An ' + humanName + ' cannot be registered without a name property', initializer.name !== undefined);\n\n this[bucketName][initializer.name] = initializer;\n };\n }\n\n function commonSetupRegistry(registry) {\n registry.optionsForType('component', { singleton: false });\n registry.optionsForType('view', { singleton: false });\n\n registry.register('controller:basic', _emberRuntime.Controller, { instantiate: false });\n\n registry.injection('view', '_viewRegistry', '-view-registry:main');\n registry.injection('renderer', '_viewRegistry', '-view-registry:main');\n registry.injection('event_dispatcher:main', '_viewRegistry', '-view-registry:main');\n\n registry.injection('route', '_topLevelViewTemplate', 'template:-outlet');\n\n registry.injection('view:-outlet', 'namespace', 'application:main');\n\n registry.injection('controller', 'target', 'router:main');\n registry.injection('controller', 'namespace', 'application:main');\n\n registry.injection('router', '_bucketCache', (0, _container.privatize)(_templateObject));\n registry.injection('route', '_bucketCache', (0, _container.privatize)(_templateObject));\n\n registry.injection('route', 'router', 'router:main');\n\n // Register the routing service...\n registry.register('service:-routing', _emberRouting.RoutingService);\n // Then inject the app router into it\n registry.injection('service:-routing', 'router', 'router:main');\n\n // DEBUGGING\n registry.register('resolver-for-debugging:main', registry.resolver, { instantiate: false });\n registry.injection('container-debug-adapter:main', 'resolver', 'resolver-for-debugging:main');\n registry.injection('data-adapter:main', 'containerDebugAdapter', 'container-debug-adapter:main');\n // Custom resolver authors may want to register their own ContainerDebugAdapter with this key\n\n registry.register('container-debug-adapter:main', _emberExtensionSupport.ContainerDebugAdapter);\n\n registry.register('component-lookup:main', _emberViews.ComponentLookup);\n }\n\n exports.default = Engine;\n});","enifed('ember-application/system/resolver', ['exports', 'ember-utils', 'ember-metal', 'ember-debug', 'ember-runtime', 'ember-application/utils/validate-type', 'ember-glimmer'], function (exports, _emberUtils, _emberMetal, _emberDebug, _emberRuntime, _validateType, _emberGlimmer) {\n 'use strict';\n\n exports.Resolver = undefined;\n /**\n @module @ember/application\n */\n\n exports.Resolver = _emberRuntime.Object.extend({\n /*\n This will be set to the Application instance when it is\n created.\n @property namespace\n */\n namespace: null,\n normalize: null, // required\n resolve: null, // required\n parseName: null, // required\n lookupDescription: null, // required\n makeToString: null, // required\n resolveOther: null, // required\n _logLookup: null // required\n });\n\n /**\n The DefaultResolver defines the default lookup rules to resolve\n container lookups before consulting the container for registered\n items:\n \n * templates are looked up on `Ember.TEMPLATES`\n * other names are looked up on the application after converting\n the name. For example, `controller:post` looks up\n `App.PostController` by default.\n * there are some nuances (see examples below)\n \n ### How Resolving Works\n \n The container calls this object's `resolve` method with the\n `fullName` argument.\n \n It first parses the fullName into an object using `parseName`.\n \n Then it checks for the presence of a type-specific instance\n method of the form `resolve[Type]` and calls it if it exists.\n For example if it was resolving 'template:post', it would call\n the `resolveTemplate` method.\n \n Its last resort is to call the `resolveOther` method.\n \n The methods of this object are designed to be easy to override\n in a subclass. For example, you could enhance how a template\n is resolved like so:\n \n ```app/app.js\n import Application from '@ember/application';\n import GlobalsResolver from '@ember/application/globals-resolver';\n \n App = Application.create({\n Resolver: GlobalsResolver.extend({\n resolveTemplate(parsedName) {\n let resolvedTemplate = this._super(parsedName);\n if (resolvedTemplate) { return resolvedTemplate; }\n \n return Ember.TEMPLATES['not_found'];\n }\n })\n });\n ```\n \n Some examples of how names are resolved:\n \n ```text\n 'template:post' //=> Ember.TEMPLATES['post']\n 'template:posts/byline' //=> Ember.TEMPLATES['posts/byline']\n 'template:posts.byline' //=> Ember.TEMPLATES['posts/byline']\n 'template:blogPost' //=> Ember.TEMPLATES['blog-post']\n 'controller:post' //=> App.PostController\n 'controller:posts.index' //=> App.PostsIndexController\n 'controller:blog/post' //=> Blog.PostController\n 'controller:basic' //=> Controller\n 'route:post' //=> App.PostRoute\n 'route:posts.index' //=> App.PostsIndexRoute\n 'route:blog/post' //=> Blog.PostRoute\n 'route:basic' //=> Route\n 'foo:post' //=> App.PostFoo\n 'model:post' //=> App.Post\n ```\n \n @class GlobalsResolver\n @extends EmberObject\n @public\n */\n\n var DefaultResolver = _emberRuntime.Object.extend({\n /**\n This will be set to the Application instance when it is\n created.\n @property namespace\n @public\n */\n namespace: null,\n\n init: function () {\n this._parseNameCache = (0, _emberUtils.dictionary)(null);\n },\n normalize: function (fullName) {\n var _fullName$split = fullName.split(':'),\n type = _fullName$split[0],\n name = _fullName$split[1],\n result;\n\n false && !(fullName.split(':').length === 2) && (0, _emberDebug.assert)('Tried to normalize a container name without a colon (:) in it. ' + 'You probably tried to lookup a name that did not contain a type, ' + 'a colon, and a name. A proper lookup name would be `view:post`.', fullName.split(':').length === 2);\n\n if (type !== 'template') {\n result = name.replace(/(\\.|_|-)./g, function (m) {\n return m.charAt(1).toUpperCase();\n });\n\n\n return type + ':' + result;\n } else {\n return fullName;\n }\n },\n resolve: function (fullName) {\n var parsedName = this.parseName(fullName);\n var resolveMethodName = parsedName.resolveMethodName;\n var resolved = void 0;\n\n if (this[resolveMethodName]) {\n resolved = this[resolveMethodName](parsedName);\n }\n\n resolved = resolved || this.resolveOther(parsedName);\n\n if (resolved) {\n (0, _validateType.default)(resolved, parsedName);\n }\n\n return resolved;\n },\n parseName: function (fullName) {\n return this._parseNameCache[fullName] || (this._parseNameCache[fullName] = this._parseName(fullName));\n },\n _parseName: function (fullName) {\n var _fullName$split2 = fullName.split(':'),\n type = _fullName$split2[0],\n fullNameWithoutType = _fullName$split2[1],\n parts,\n namespaceName;\n\n var name = fullNameWithoutType;\n var namespace = (0, _emberMetal.get)(this, 'namespace');\n var root = namespace;\n var lastSlashIndex = name.lastIndexOf('/');\n var dirname = lastSlashIndex !== -1 ? name.slice(0, lastSlashIndex) : null;\n\n if (type !== 'template' && lastSlashIndex !== -1) {\n parts = name.split('/');\n\n name = parts[parts.length - 1];\n namespaceName = _emberRuntime.String.capitalize(parts.slice(0, -1).join('.'));\n\n root = _emberRuntime.Namespace.byName(namespaceName);\n\n false && !root && (0, _emberDebug.assert)('You are looking for a ' + name + ' ' + type + ' in the ' + namespaceName + ' namespace, but the namespace could not be found', root);\n }\n\n var resolveMethodName = fullNameWithoutType === 'main' ? 'Main' : _emberRuntime.String.classify(type);\n\n if (!(name && type)) {\n throw new TypeError('Invalid fullName: `' + fullName + '`, must be of the form `type:name` ');\n }\n\n return {\n fullName: fullName,\n type: type,\n fullNameWithoutType: fullNameWithoutType,\n dirname: dirname,\n name: name,\n root: root,\n resolveMethodName: 'resolve' + resolveMethodName\n };\n },\n lookupDescription: function (fullName) {\n var parsedName = this.parseName(fullName);\n var description = void 0;\n\n if (parsedName.type === 'template') {\n return 'template at ' + parsedName.fullNameWithoutType.replace(/\\./g, '/');\n }\n\n description = parsedName.root + '.' + _emberRuntime.String.classify(parsedName.name).replace(/\\./g, '');\n\n if (parsedName.type !== 'model') {\n description += _emberRuntime.String.classify(parsedName.type);\n }\n\n return description;\n },\n makeToString: function (factory) {\n return factory.toString();\n },\n useRouterNaming: function (parsedName) {\n if (parsedName.name === 'basic') {\n parsedName.name = '';\n } else {\n parsedName.name = parsedName.name.replace(/\\./g, '_');\n }\n },\n resolveTemplate: function (parsedName) {\n var templateName = parsedName.fullNameWithoutType.replace(/\\./g, '/');\n\n return (0, _emberGlimmer.getTemplate)(templateName) || (0, _emberGlimmer.getTemplate)(_emberRuntime.String.decamelize(templateName));\n },\n resolveView: function (parsedName) {\n this.useRouterNaming(parsedName);\n return this.resolveOther(parsedName);\n },\n resolveController: function (parsedName) {\n this.useRouterNaming(parsedName);\n return this.resolveOther(parsedName);\n },\n resolveRoute: function (parsedName) {\n this.useRouterNaming(parsedName);\n return this.resolveOther(parsedName);\n },\n resolveModel: function (parsedName) {\n var className = _emberRuntime.String.classify(parsedName.name);\n var factory = (0, _emberMetal.get)(parsedName.root, className);\n\n return factory;\n },\n resolveHelper: function (parsedName) {\n return this.resolveOther(parsedName);\n },\n resolveOther: function (parsedName) {\n var className = _emberRuntime.String.classify(parsedName.name) + _emberRuntime.String.classify(parsedName.type);\n var factory = (0, _emberMetal.get)(parsedName.root, className);\n return factory;\n },\n resolveMain: function (parsedName) {\n var className = _emberRuntime.String.classify(parsedName.type);\n return (0, _emberMetal.get)(parsedName.root, className);\n },\n knownForType: function (type) {\n var namespace = (0, _emberMetal.get)(this, 'namespace'),\n index,\n name,\n containerName;\n var suffix = _emberRuntime.String.classify(type);\n var typeRegexp = new RegExp(suffix + '$');\n\n var known = (0, _emberUtils.dictionary)(null);\n var knownKeys = Object.keys(namespace);\n for (index = 0; index < knownKeys.length; index++) {\n name = knownKeys[index];\n\n\n if (typeRegexp.test(name)) {\n containerName = this.translateToContainerFullname(type, name);\n\n\n known[containerName] = true;\n }\n }\n\n return known;\n },\n translateToContainerFullname: function (type, name) {\n var suffix = _emberRuntime.String.classify(type);\n var namePrefix = name.slice(0, suffix.length * -1);\n var dasherizedName = _emberRuntime.String.dasherize(namePrefix);\n\n return type + ':' + dasherizedName;\n }\n });\n\n exports.default = DefaultResolver;\n});","enifed('ember-application/utils/validate-type', ['exports', 'ember-debug'], function (exports, _emberDebug) {\n 'use strict';\n\n exports.default = function (resolvedType, parsedName) {\n var validationAttributes = VALIDATED_TYPES[parsedName.type];\n\n if (!validationAttributes) {\n return;\n }\n\n var action = validationAttributes[0],\n factoryFlag = validationAttributes[1],\n expectedType = validationAttributes[2];\n false && !!!resolvedType[factoryFlag] && (0, _emberDebug.assert)('Expected ' + parsedName.fullName + ' to resolve to an ' + expectedType + ' but ' + ('instead it was ' + resolvedType + '.'), !!resolvedType[factoryFlag]);\n };\n\n var VALIDATED_TYPES = {\n route: ['assert', 'isRouteFactory', 'Ember.Route'],\n component: ['deprecate', 'isComponentFactory', 'Ember.Component'],\n view: ['deprecate', 'isViewFactory', 'Ember.View'],\n service: ['deprecate', 'isServiceFactory', 'Ember.Service']\n };\n});","enifed('ember-babel', ['exports'], function (exports) {\n 'use strict';\n\n exports.inherits = inherits;\n exports.taggedTemplateLiteralLoose = taggedTemplateLiteralLoose;\n exports.createClass = createClass;\n exports.defaults = defaults;\n function inherits(subClass, superClass) {\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : defaults(subClass, superClass);\n }\n\n function taggedTemplateLiteralLoose(strings, raw) {\n strings.raw = raw;\n return strings;\n }\n\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function createClass(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n }\n\n var possibleConstructorReturn = exports.possibleConstructorReturn = function (self, call) {\n return call && (typeof call === 'object' || typeof call === 'function') ? call : self;\n };\n\n var slice = exports.slice = Array.prototype.slice;\n});","enifed('ember-console', ['exports', 'ember-environment'], function (exports, _emberEnvironment) {\n 'use strict';\n\n function K() {}\n\n function consoleMethod(name) {\n var consoleObj = void 0;\n if (_emberEnvironment.context.imports.console) {\n consoleObj = _emberEnvironment.context.imports.console;\n } else if (typeof console !== 'undefined') {\n // eslint-disable-line no-undef\n consoleObj = console; // eslint-disable-line no-undef\n }\n\n var method = typeof consoleObj === 'object' ? consoleObj[name] : null;\n\n if (typeof method !== 'function') {\n return;\n }\n\n return method.bind(consoleObj);\n }\n\n /**\n Inside Ember-Metal, simply uses the methods from `imports.console`.\n Override this to provide more robust logging functionality.\n \n @class Logger\n @namespace Ember\n @public\n */\n var index = {\n /**\n Logs the arguments to the console.\n You can pass as many arguments as you want and they will be joined together with a space.\n ```javascript\n var foo = 1;\n Ember.Logger.log('log value of foo:', foo);\n // \"log value of foo: 1\" will be printed to the console\n ```\n @method log\n @for Ember.Logger\n @param {*} arguments\n @public\n */\n log: consoleMethod('log') || K,\n\n /**\n Prints the arguments to the console with a warning icon.\n You can pass as many arguments as you want and they will be joined together with a space.\n ```javascript\n Ember.Logger.warn('Something happened!');\n // \"Something happened!\" will be printed to the console with a warning icon.\n ```\n @method warn\n @for Ember.Logger\n @param {*} arguments\n @public\n */\n warn: consoleMethod('warn') || K,\n\n /**\n Prints the arguments to the console with an error icon, red text and a stack trace.\n You can pass as many arguments as you want and they will be joined together with a space.\n ```javascript\n Ember.Logger.error('Danger! Danger!');\n // \"Danger! Danger!\" will be printed to the console in red text.\n ```\n @method error\n @for Ember.Logger\n @param {*} arguments\n @public\n */\n error: consoleMethod('error') || K,\n\n /**\n Logs the arguments to the console.\n You can pass as many arguments as you want and they will be joined together with a space.\n ```javascript\n var foo = 1;\n Ember.Logger.info('log value of foo:', foo);\n // \"log value of foo: 1\" will be printed to the console\n ```\n @method info\n @for Ember.Logger\n @param {*} arguments\n @public\n */\n info: consoleMethod('info') || K,\n\n /**\n Logs the arguments to the console in blue text.\n You can pass as many arguments as you want and they will be joined together with a space.\n ```javascript\n var foo = 1;\n Ember.Logger.debug('log value of foo:', foo);\n // \"log value of foo: 1\" will be printed to the console\n ```\n @method debug\n @for Ember.Logger\n @param {*} arguments\n @public\n */\n debug: consoleMethod('debug') || consoleMethod('info') || K,\n\n /**\n If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace.\n ```javascript\n Ember.Logger.assert(true); // undefined\n Ember.Logger.assert(true === false); // Throws an Assertion failed error.\n Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message.\n ```\n @method assert\n @for Ember.Logger\n @param {Boolean} bool Value to test\n @param {String} message Assertion message on failed\n @public\n */\n assert: consoleMethod('assert') || function (test, message) {\n if (!test) {\n try {\n // attempt to preserve the stack\n throw new Error('assertion failed: ' + message);\n } catch (error) {\n setTimeout(function () {\n throw error;\n }, 0);\n }\n }\n }\n };\n\n exports.default = index;\n});","enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports) {\n 'use strict';\n\n exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = exports.registerHandler = undefined;\n\n /**\n @module @ember/debug\n @public\n */\n /**\n Allows for runtime registration of handler functions that override the default deprecation behavior.\n Deprecations are invoked by calls to [Ember.deprecate](https://emberjs.com/api/classes/Ember.html#method_deprecate).\n The following example demonstrates its usage by registering a handler that throws an error if the\n message contains the word \"should\", otherwise defers to the default handler.\n \n ```javascript\n Ember.Debug.registerDeprecationHandler((message, options, next) => {\n if (message.indexOf('should') !== -1) {\n throw new Error(`Deprecation message with should: ${message}`);\n } else {\n // defer to whatever handler was registered before this one\n next(message, options);\n }\n });\n ```\n \n The handler function takes the following arguments:\n \n <ul>\n <li> <code>message</code> - The message received from the deprecation call.</li>\n <li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li>\n <ul>\n <li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li>\n <li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li>\n </ul>\n <li> <code>next</code> - A function that calls into the previously registered handler.</li>\n </ul>\n \n @public\n @static\n @method registerDeprecationHandler\n @for @ember/debug\n @param handler {Function} A function to handle deprecation calls.\n @since 2.1.0\n */\n /*global __fail__*/\n\n exports.default = void 0;\n exports.registerHandler = function () {};\n exports.missingOptionsDeprecation = void 0;\n exports.missingOptionsIdDeprecation = void 0;\n exports.missingOptionsUntilDeprecation = void 0;\n});","enifed(\"ember-debug/error\", [\"exports\", \"ember-babel\"], function (exports, _emberBabel) {\n \"use strict\";\n\n /**\n @module @ember/error\n */\n\n /**\n A subclass of the JavaScript Error object for use in Ember.\n \n @class EmberError\n @extends Error\n @constructor\n @public\n */\n\n var EmberError = function (_ExtendBuiltin) {\n (0, _emberBabel.inherits)(EmberError, _ExtendBuiltin);\n\n function EmberError(message) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ExtendBuiltin.call(this)),\n _ret;\n\n if (!(_this instanceof EmberError)) {\n\n return _ret = new EmberError(message), (0, _emberBabel.possibleConstructorReturn)(_this, _ret);\n }\n\n var error = Error.call(_this, message);\n _this.stack = error.stack;\n _this.description = error.description;\n _this.fileName = error.fileName;\n _this.lineNumber = error.lineNumber;\n _this.message = error.message;\n _this.name = error.name;\n _this.number = error.number;\n _this.code = error.code;\n return _this;\n }\n\n return EmberError;\n }(function (klass) {\n function ExtendableBuiltin() {\n klass.apply(this, arguments);\n }\n\n ExtendableBuiltin.prototype = Object.create(klass.prototype);\n ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;\n return ExtendableBuiltin;\n }(Error));\n\n exports.default = EmberError;\n});","enifed('ember-debug/features', ['exports', 'ember-environment', 'ember/features'], function (exports, _emberEnvironment, _features) {\n 'use strict';\n\n exports.default =\n\n /**\n @module ember\n */\n\n /**\n The hash of enabled Canary features. Add to this, any canary features\n before creating your application.\n \n Alternatively (and recommended), you can also define `EmberENV.FEATURES`\n if you need to enable features flagged at runtime.\n \n @class FEATURES\n @namespace Ember\n @static\n @since 1.1.0\n @public\n */\n\n // Auto-generated\n\n /**\n Determine whether the specified `feature` is enabled. Used by Ember's\n build tools to exclude experimental features from beta/stable builds.\n \n You can define the following configuration options:\n \n * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n enabled/disabled.\n \n @method isEnabled\n @param {String} feature The feature to check\n @return {Boolean}\n @for Ember.FEATURES\n @since 1.1.0\n @public\n */\n function (feature) {\n var featureValue = FEATURES[feature];\n\n if (featureValue === true || featureValue === false || featureValue === undefined) {\n return featureValue;\n } else if (_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES) {\n return true;\n } else {\n return false;\n }\n };\n var FEATURES = _features.FEATURES;\n});","enifed('ember-debug/handlers', ['exports'], function (exports) {\n 'use strict';\n\n exports.HANDLERS = {};\n\n\n exports.registerHandler = function () {};\n exports.invoke = function () {};\n});","enifed('ember-debug/index', ['exports', 'ember-debug/warn', 'ember-debug/deprecate', 'ember-debug/features', 'ember-debug/error', 'ember-debug/testing', 'ember-environment', 'ember-console', 'ember/features'], function (exports, _warn2, _deprecate2, _features, _error, _testing, _emberEnvironment, _emberConsole, _features2) {\n 'use strict';\n\n exports._warnIfUsingStrippedFeatureFlags = exports.getDebugFunction = exports.setDebugFunction = exports.deprecateFunc = exports.runInDebug = exports.debugFreeze = exports.debugSeal = exports.deprecate = exports.debug = exports.warn = exports.info = exports.assert = exports.setTesting = exports.isTesting = exports.Error = exports.isFeatureEnabled = exports.registerDeprecationHandler = exports.registerWarnHandler = undefined;\n Object.defineProperty(exports, 'registerWarnHandler', {\n enumerable: true,\n get: function () {\n return _warn2.registerHandler;\n }\n });\n Object.defineProperty(exports, 'registerDeprecationHandler', {\n enumerable: true,\n get: function () {\n return _deprecate2.registerHandler;\n }\n });\n Object.defineProperty(exports, 'isFeatureEnabled', {\n enumerable: true,\n get: function () {\n return _features.default;\n }\n });\n Object.defineProperty(exports, 'Error', {\n enumerable: true,\n get: function () {\n return _error.default;\n }\n });\n Object.defineProperty(exports, 'isTesting', {\n enumerable: true,\n get: function () {\n return _testing.isTesting;\n }\n });\n Object.defineProperty(exports, 'setTesting', {\n enumerable: true,\n get: function () {\n return _testing.setTesting;\n }\n });\n var DEFAULT_FEATURES = _features2.DEFAULT_FEATURES,\n FEATURES = _features2.FEATURES;\n\n // These are the default production build versions:\n var noop = function () {};\n\n exports.assert = noop;\n exports.info = noop;\n exports.warn = noop;\n exports.debug = noop;\n exports.deprecate = noop;\n exports.debugSeal = noop;\n exports.debugFreeze = noop;\n exports.runInDebug = noop;\n exports.deprecateFunc = function () {\n return arguments[arguments.length - 1];\n };\n exports.setDebugFunction = noop;\n exports.getDebugFunction = noop;\n exports._warnIfUsingStrippedFeatureFlags = void 0;\n});","enifed(\"ember-debug/testing\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.isTesting = function () {\n return testing;\n };\n exports.setTesting = function (value) {\n testing = !!value;\n };\n var testing = false;\n});","enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate', 'ember-debug/handlers'], function (exports) {\n 'use strict';\n\n exports.missingOptionsDeprecation = exports.missingOptionsIdDeprecation = exports.registerHandler = undefined;\n\n /**\n @module @ember/debug\n */\n\n exports.default = function () {};\n exports.registerHandler = function () {};\n exports.missingOptionsIdDeprecation = void 0;\n exports.missingOptionsDeprecation = void 0;\n});","enifed('ember-environment', ['exports'], function (exports) {\n 'use strict';\n\n /* globals global, window, self, mainContext */\n\n // from lodash to catch fake globals\n\n function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }\n\n // element ids can ruin global miss checks\n\n\n // export real global\n var global$1 = checkGlobal(function (value) {\n return value && value.nodeType === undefined ? value : undefined;\n }(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || mainContext || // set before strict mode in Ember loader/wrapper\n new Function('return this')(); // eval outside of strict mode\n\n function defaultTrue(v) {\n return v === false ? false : true;\n }\n\n function defaultFalse(v) {\n return v === true ? true : false;\n }\n\n /* globals module */\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 var ENV = typeof global$1.EmberENV === 'object' && global$1.EmberENV || typeof global$1.ENV === 'object' && global$1.ENV || {};\n\n // ENABLE_ALL_FEATURES was documented, but you can't actually enable non optional features.\n if (ENV.ENABLE_ALL_FEATURES) {\n ENV.ENABLE_OPTIONAL_FEATURES = true;\n }\n\n /**\n Determines whether Ember should add to `Array`, `Function`, and `String`\n native object prototypes, a few extra methods in order to provide a more\n friendly API.\n \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 \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 \n @property EXTEND_PROTOTYPES\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n ENV.EXTEND_PROTOTYPES = function (obj) {\n if (obj === false) {\n return { String: false, Array: false, Function: false };\n } else if (!obj || obj === true) {\n return { String: true, Array: true, Function: true };\n } else {\n return {\n String: defaultTrue(obj.String),\n Array: defaultTrue(obj.Array),\n Function: defaultTrue(obj.Function)\n };\n }\n }(ENV.EXTEND_PROTOTYPES);\n\n /**\n The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log\n a full stack trace during deprecation warnings.\n \n @property LOG_STACKTRACE_ON_DEPRECATION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n ENV.LOG_STACKTRACE_ON_DEPRECATION = defaultTrue(ENV.LOG_STACKTRACE_ON_DEPRECATION);\n\n /**\n The `LOG_VERSION` property, when true, tells Ember to log versions of all\n dependent libraries in use.\n \n @property LOG_VERSION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n ENV.LOG_VERSION = defaultTrue(ENV.LOG_VERSION);\n\n /**\n Debug parameter you can turn on. This will log all bindings that fire to\n the console. This should be disabled in production code. Note that you\n can also enable this from the console or temporarily.\n \n @property LOG_BINDINGS\n @for EmberENV\n @type Boolean\n @default false\n @public\n */\n ENV.LOG_BINDINGS = defaultFalse(ENV.LOG_BINDINGS);\n\n ENV.RAISE_ON_DEPRECATION = defaultFalse(ENV.RAISE_ON_DEPRECATION);\n\n // check if window exists and actually is the global\n var hasDOM = typeof window !== 'undefined' && window === global$1 && window.document && window.document.createElement && !ENV.disableBrowserEnvironment; // is this a public thing?\n\n // legacy imports/exports/lookup stuff (should we keep this??)\n var originalContext = global$1.Ember || {};\n\n var context = {\n // import jQuery\n imports: originalContext.imports || global$1,\n // export Ember\n exports: originalContext.exports || global$1,\n // search for Namespaces\n lookup: originalContext.lookup || global$1\n };\n\n // TODO: cleanup single source of truth issues with this stuff\n var environment = hasDOM ? {\n hasDOM: true,\n isChrome: !!window.chrome && !window.opera,\n isFirefox: typeof InstallTrigger !== 'undefined',\n isPhantom: !!window.callPhantom,\n location: window.location,\n history: window.history,\n userAgent: window.navigator.userAgent,\n window: window\n } : {\n hasDOM: false,\n isChrome: false,\n isFirefox: false,\n isPhantom: false,\n location: null,\n history: null,\n userAgent: 'Lynx (textmode)',\n window: null\n };\n\n exports.ENV = ENV;\n exports.context = context;\n exports.environment = environment;\n});","enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-metal', 'ember-runtime'], function (exports, _emberMetal, _emberRuntime) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n /**\n The resolver instance of the application\n being debugged. This property will be injected\n on creation.\n @property resolver\n @default null\n @public\n */\n resolver: null,\n\n /**\n Returns true if it is possible to catalog a list of available\n classes in the resolver for a given type.\n @method canCatalogEntriesByType\n @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n @return {boolean} whether a list is available for this type.\n @public\n */\n canCatalogEntriesByType: function (type) {\n if (type === 'model' || type === 'template') {\n return false;\n }\n\n return true;\n },\n\n /**\n Returns the available classes a given type.\n @method catalogEntriesByType\n @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n @return {Array} An array of strings.\n @public\n */\n catalogEntriesByType: function (type) {\n var namespaces = (0, _emberRuntime.A)(_emberRuntime.Namespace.NAMESPACES);\n var types = (0, _emberRuntime.A)();\n var typeSuffixRegex = new RegExp(_emberRuntime.String.classify(type) + '$');\n\n namespaces.forEach(function (namespace) {\n var klass;\n\n if (namespace !== _emberMetal.default) {\n for (var key in namespace) {\n if (!namespace.hasOwnProperty(key)) {\n continue;\n }\n if (typeSuffixRegex.test(key)) {\n klass = namespace[key];\n\n if ((0, _emberRuntime.typeOf)(klass) === 'class') {\n types.push(_emberRuntime.String.dasherize(key.replace(typeSuffixRegex, '')));\n }\n }\n }\n }\n });\n return types;\n }\n });\n});","enifed('ember-extension-support/data_adapter', ['exports', 'ember-utils', 'ember-metal', 'ember-runtime'], function (exports, _emberUtils, _emberMetal, _emberRuntime) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n init: function () {\n this._super.apply(this, arguments);\n this.releaseMethods = (0, _emberRuntime.A)();\n },\n\n /**\n The container-debug-adapter which is used\n to list all models.\n @property containerDebugAdapter\n @default undefined\n @since 1.5.0\n @public\n **/\n containerDebugAdapter: undefined,\n\n /**\n The number of attributes to send\n as columns. (Enough to make the record\n identifiable).\n @private\n @property attributeLimit\n @default 3\n @since 1.3.0\n */\n attributeLimit: 3,\n\n /**\n Ember Data > v1.0.0-beta.18\n requires string model names to be passed\n around instead of the actual factories.\n This is a stamp for the Ember Inspector\n to differentiate between the versions\n to be able to support older versions too.\n @public\n @property acceptsModelName\n */\n acceptsModelName: true,\n\n /**\n Stores all methods that clear observers.\n These methods will be called on destruction.\n @private\n @property releaseMethods\n @since 1.3.0\n */\n releaseMethods: (0, _emberRuntime.A)(),\n\n /**\n Specifies how records can be filtered.\n Records returned will need to have a `filterValues`\n property with a key for every name in the returned array.\n @public\n @method getFilters\n @return {Array} List of objects defining filters.\n The object should have a `name` and `desc` property.\n */\n getFilters: function () {\n return (0, _emberRuntime.A)();\n },\n\n /**\n Fetch the model types and observe them for changes.\n @public\n @method watchModelTypes\n @param {Function} typesAdded Callback to call to add types.\n Takes an array of objects containing wrapped types (returned from `wrapModelType`).\n @param {Function} typesUpdated Callback to call when a type has changed.\n Takes an array of objects containing wrapped types.\n @return {Function} Method to call to remove all observers\n */\n watchModelTypes: function (typesAdded, typesUpdated) {\n var _this = this;\n\n var modelTypes = this.getModelTypes();\n var releaseMethods = (0, _emberRuntime.A)();\n var typesToSend = void 0;\n\n typesToSend = modelTypes.map(function (type) {\n var klass = type.klass;\n var wrapped = _this.wrapModelType(klass, type.name);\n releaseMethods.push(_this.observeModelType(type.name, typesUpdated));\n return wrapped;\n });\n\n typesAdded(typesToSend);\n\n var release = function () {\n releaseMethods.forEach(function (fn) {\n return fn();\n });\n _this.releaseMethods.removeObject(release);\n };\n this.releaseMethods.pushObject(release);\n return release;\n },\n _nameToClass: function (type) {\n var owner, Factory;\n\n if (typeof type === 'string') {\n owner = (0, _emberUtils.getOwner)(this);\n Factory = owner.factoryFor('model:' + type);\n\n type = Factory && Factory.class;\n }\n return type;\n },\n\n /**\n Fetch the records of a given type and observe them for changes.\n @public\n @method watchRecords\n @param {String} modelName The model name.\n @param {Function} recordsAdded Callback to call to add records.\n Takes an array of objects containing wrapped records.\n The object should have the following properties:\n columnValues: {Object} The key and value of a table cell.\n object: {Object} The actual record object.\n @param {Function} recordsUpdated Callback to call when a record has changed.\n Takes an array of objects containing wrapped records.\n @param {Function} recordsRemoved Callback to call when a record has removed.\n Takes the following parameters:\n index: The array index where the records were removed.\n count: The number of records removed.\n @return {Function} Method to call to remove all observers.\n */\n watchRecords: function (modelName, recordsAdded, recordsUpdated, recordsRemoved) {\n var _this2 = this;\n\n var releaseMethods = (0, _emberRuntime.A)();\n var klass = this._nameToClass(modelName);\n var records = this.getRecords(klass, modelName);\n var release = void 0;\n\n function recordUpdated(updatedRecord) {\n recordsUpdated([updatedRecord]);\n }\n\n var recordsToSend = records.map(function (record) {\n releaseMethods.push(_this2.observeRecord(record, recordUpdated));\n return _this2.wrapRecord(record);\n });\n\n var observer = { didChange: function (array, idx, removedCount, addedCount) {\n var i, record, wrapped;\n\n for (i = idx; i < idx + addedCount; i++) {\n record = (0, _emberRuntime.objectAt)(array, i);\n wrapped = _this2.wrapRecord(record);\n\n releaseMethods.push(_this2.observeRecord(record, recordUpdated));\n recordsAdded([wrapped]);\n }\n\n if (removedCount) {\n recordsRemoved(idx, removedCount);\n }\n }, willChange: function () {\n return this;\n }\n };\n (0, _emberRuntime.addArrayObserver)(records, this, observer);\n\n release = function () {\n releaseMethods.forEach(function (fn) {\n return fn();\n });\n (0, _emberRuntime.removeArrayObserver)(records, _this2, observer);\n _this2.releaseMethods.removeObject(release);\n };\n\n recordsAdded(recordsToSend);\n\n this.releaseMethods.pushObject(release);\n return release;\n },\n\n /**\n Clear all observers before destruction\n @private\n @method willDestroy\n */\n willDestroy: function () {\n this._super.apply(this, arguments);\n this.releaseMethods.forEach(function (fn) {\n return fn();\n });\n },\n\n /**\n Detect whether a class is a model.\n Test that against the model class\n of your persistence library.\n @private\n @method detect\n @param {Class} klass The class to test.\n @return boolean Whether the class is a model class or not.\n */\n detect: function () {\n return false;\n },\n\n /**\n Get the columns for a given model type.\n @private\n @method columnsForType\n @param {Class} type The model type.\n @return {Array} An array of columns of the following format:\n name: {String} The name of the column.\n desc: {String} Humanized description (what would show in a table column name).\n */\n columnsForType: function () {\n return (0, _emberRuntime.A)();\n },\n\n /**\n Adds observers to a model type class.\n @private\n @method observeModelType\n @param {String} modelName The model type name.\n @param {Function} typesUpdated Called when a type is modified.\n @return {Function} The function to call to remove observers.\n */\n\n observeModelType: function (modelName, typesUpdated) {\n var _this3 = this;\n\n var klass = this._nameToClass(modelName);\n var records = this.getRecords(klass, modelName);\n\n function onChange() {\n typesUpdated([this.wrapModelType(klass, modelName)]);\n }\n\n var observer = {\n didChange: function (array, idx, removedCount, addedCount) {\n // Only re-fetch records if the record count changed\n // (which is all we care about as far as model types are concerned).\n if (removedCount > 0 || addedCount > 0) {\n _emberMetal.run.scheduleOnce('actions', this, onChange);\n }\n },\n willChange: function () {\n return this;\n }\n };\n\n (0, _emberRuntime.addArrayObserver)(records, this, observer);\n\n return function () {\n return (0, _emberRuntime.removeArrayObserver)(records, _this3, observer);\n };\n },\n\n /**\n Wraps a given model type and observes changes to it.\n @private\n @method wrapModelType\n @param {Class} klass A model class.\n @param {String} modelName Name of the class.\n @return {Object} Contains the wrapped type and the function to remove observers\n Format:\n type: {Object} The wrapped type.\n The wrapped type has the following format:\n name: {String} The name of the type.\n count: {Integer} The number of records available.\n columns: {Columns} An array of columns to describe the record.\n object: {Class} The actual Model type class.\n release: {Function} The function to remove observers.\n */\n wrapModelType: function (klass, name) {\n var records = this.getRecords(klass, name);\n var typeToSend = void 0;\n\n typeToSend = {\n name: name,\n count: (0, _emberMetal.get)(records, 'length'),\n columns: this.columnsForType(klass),\n object: klass\n };\n\n return typeToSend;\n },\n\n /**\n Fetches all models defined in the application.\n @private\n @method getModelTypes\n @return {Array} Array of model types.\n */\n getModelTypes: function () {\n var _this4 = this;\n\n var containerDebugAdapter = this.get('containerDebugAdapter');\n var types = void 0;\n\n if (containerDebugAdapter.canCatalogEntriesByType('model')) {\n types = containerDebugAdapter.catalogEntriesByType('model');\n } else {\n types = this._getObjectsOnNamespaces();\n }\n\n // New adapters return strings instead of classes.\n types = (0, _emberRuntime.A)(types).map(function (name) {\n return {\n klass: _this4._nameToClass(name),\n name: name\n };\n });\n types = (0, _emberRuntime.A)(types).filter(function (type) {\n return _this4.detect(type.klass);\n });\n\n return (0, _emberRuntime.A)(types);\n },\n\n /**\n Loops over all namespaces and all objects\n attached to them.\n @private\n @method _getObjectsOnNamespaces\n @return {Array} Array of model type strings.\n */\n _getObjectsOnNamespaces: function () {\n var _this5 = this;\n\n var namespaces = (0, _emberRuntime.A)(_emberRuntime.Namespace.NAMESPACES);\n var types = (0, _emberRuntime.A)();\n\n namespaces.forEach(function (namespace) {\n var name;\n\n for (var key in namespace) {\n if (!namespace.hasOwnProperty(key)) {\n continue;\n }\n // Even though we will filter again in `getModelTypes`,\n // we should not call `lookupFactory` on non-models\n if (!_this5.detect(namespace[key])) {\n continue;\n }\n name = _emberRuntime.String.dasherize(key);\n\n types.push(name);\n }\n });\n return types;\n },\n\n /**\n Fetches all loaded records for a given type.\n @private\n @method getRecords\n @return {Array} An array of records.\n This array will be observed for changes,\n so it should update when new records are added/removed.\n */\n getRecords: function () {\n return (0, _emberRuntime.A)();\n },\n\n /**\n Wraps a record and observers changes to it.\n @private\n @method wrapRecord\n @param {Object} record The record instance.\n @return {Object} The wrapped record. Format:\n columnValues: {Array}\n searchKeywords: {Array}\n */\n wrapRecord: function (record) {\n var recordToSend = { object: record };\n\n recordToSend.columnValues = this.getRecordColumnValues(record);\n recordToSend.searchKeywords = this.getRecordKeywords(record);\n recordToSend.filterValues = this.getRecordFilterValues(record);\n recordToSend.color = this.getRecordColor(record);\n\n return recordToSend;\n },\n\n /**\n Gets the values for each column.\n @private\n @method getRecordColumnValues\n @return {Object} Keys should match column names defined\n by the model type.\n */\n getRecordColumnValues: function () {\n return {};\n },\n\n /**\n Returns keywords to match when searching records.\n @private\n @method getRecordKeywords\n @return {Array} Relevant keywords for search.\n */\n getRecordKeywords: function () {\n return (0, _emberRuntime.A)();\n },\n\n /**\n Returns the values of filters defined by `getFilters`.\n @private\n @method getRecordFilterValues\n @param {Object} record The record instance.\n @return {Object} The filter values.\n */\n getRecordFilterValues: function () {\n return {};\n },\n\n /**\n Each record can have a color that represents its state.\n @private\n @method getRecordColor\n @param {Object} record The record instance\n @return {String} The records color.\n Possible options: black, red, blue, green.\n */\n getRecordColor: function () {\n return null;\n },\n\n /**\n Observes all relevant properties and re-sends the wrapped record\n when a change occurs.\n @private\n @method observerRecord\n @param {Object} record The record instance.\n @param {Function} recordUpdated The callback to call when a record is updated.\n @return {Function} The function to call to remove all observers.\n */\n observeRecord: function () {\n return function () {};\n }\n });\n});","enifed('ember-extension-support/index', ['exports', 'ember-extension-support/data_adapter', 'ember-extension-support/container_debug_adapter'], function (exports, _data_adapter, _container_debug_adapter) {\n 'use strict';\n\n Object.defineProperty(exports, 'DataAdapter', {\n enumerable: true,\n get: function () {\n return _data_adapter.default;\n }\n });\n Object.defineProperty(exports, 'ContainerDebugAdapter', {\n enumerable: true,\n get: function () {\n return _container_debug_adapter.default;\n }\n });\n});","enifed('ember-glimmer/component-managers/abstract', ['exports'], function (exports) {\n 'use strict';\n\n var AbstractManager = function () {\n function AbstractManager() {\n\n this.debugStack = undefined;\n }\n\n AbstractManager.prototype.prepareArgs = function () {\n return null;\n };\n\n AbstractManager.prototype.didCreateElement = function () {}\n // noop\n\n // inheritors should also call `this.debugStack.pop()` to\n // ensure the rerendering assertion messages are properly\n // maintained\n ;\n\n AbstractManager.prototype.didRenderLayout = function () {\n // noop\n };\n\n AbstractManager.prototype.didCreate = function () {\n // noop\n };\n\n AbstractManager.prototype.getTag = function () {\n return null;\n };\n\n AbstractManager.prototype.update = function () {}\n // noop\n\n // inheritors should also call `this.debugStack.pop()` to\n // ensure the rerendering assertion messages are properly\n // maintained\n ;\n\n AbstractManager.prototype.didUpdateLayout = function () {\n // noop\n };\n\n AbstractManager.prototype.didUpdate = function () {\n // noop\n };\n\n return AbstractManager;\n }();\n\n exports.default = AbstractManager;\n});","enifed('ember-glimmer/component-managers/curly', ['exports', 'ember-babel', '@glimmer/reference', '@glimmer/runtime', 'container', 'ember-debug', 'ember-metal', 'ember-utils', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/utils/bindings', 'ember-glimmer/utils/curly-component-state-bucket', 'ember-glimmer/utils/process-args', 'ember-glimmer/utils/references', 'ember-glimmer/component-managers/abstract'], function (exports, _emberBabel, _reference, _runtime, _container, _emberDebug, _emberMetal, _emberUtils, _emberViews, _component, _bindings, _curlyComponentStateBucket, _processArgs, _references, _abstract) {\n 'use strict';\n\n exports.CurlyComponentDefinition = exports.PositionalArgumentReference = undefined;\n exports.validatePositionalParameters = function () {};\n exports.processComponentInitializationAssertions = function (component, props) {\n false && !function () {\n var classNameBindings = component.classNameBindings,\n i,\n binding;\n\n for (i = 0; i < classNameBindings.length; i++) {\n binding = classNameBindings[i];\n\n if (typeof binding !== 'string' || binding.length === 0) {\n return false;\n }\n }\n return true;\n }() && (0, _emberDebug.assert)('classNameBindings must be non-empty strings: ' + component, function () {\n var classNameBindings = component.classNameBindings,\n i,\n binding;\n for (i = 0; i < classNameBindings.length; i++) {\n binding = classNameBindings[i];\n if (typeof binding !== 'string' || binding.length === 0) {\n return false;\n }\n }return true;\n }());\n false && !function () {\n var classNameBindings = component.classNameBindings,\n i,\n binding;\n\n for (i = 0; i < classNameBindings.length; i++) {\n binding = classNameBindings[i];\n\n if (binding.split(' ').length > 1) {\n return false;\n }\n }\n return true;\n }() && (0, _emberDebug.assert)('classNameBindings must not have spaces in them: ' + component, function () {\n var classNameBindings = component.classNameBindings,\n i,\n binding;\n for (i = 0; i < classNameBindings.length; i++) {\n binding = classNameBindings[i];\n if (binding.split(' ').length > 1) {\n return false;\n }\n }return true;\n }());\n false && !(component.tagName !== '' || !component.classNameBindings || component.classNameBindings.length === 0) && (0, _emberDebug.assert)('You cannot use `classNameBindings` on a tag-less component: ' + component, component.tagName !== '' || !component.classNameBindings || component.classNameBindings.length === 0);\n false && !(component.tagName !== '' || props.id === component.elementId || !component.elementId && component.elementId !== '') && (0, _emberDebug.assert)('You cannot use `elementId` on a tag-less component: ' + component, component.tagName !== '' || props.id === component.elementId || !component.elementId && component.elementId !== '');\n false && !(component.tagName !== '' || !component.attributeBindings || component.attributeBindings.length === 0) && (0, _emberDebug.assert)('You cannot use `attributeBindings` on a tag-less component: ' + component, component.tagName !== '' || !component.attributeBindings || component.attributeBindings.length === 0);\n };\n exports.initialRenderInstrumentDetails = initialRenderInstrumentDetails;\n exports.rerenderInstrumentDetails = rerenderInstrumentDetails;\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['template:components/-default'], ['template:components/-default']);\n\n var DEFAULT_LAYOUT = (0, _container.privatize)(_templateObject);\n function aliasIdToElementId(args, props) {\n if (args.named.has('id')) {\n false && !!args.named.has('elementId') && (0, _emberDebug.assert)('You cannot invoke a component with both \\'id\\' and \\'elementId\\' at the same time.', !args.named.has('elementId'));\n\n props.elementId = props.id;\n }\n }\n // We must traverse the attributeBindings in reverse keeping track of\n // what has already been applied. This is essentially refining the concatenated\n // properties applying right to left.\n function applyAttributeBindings(element, attributeBindings, component, operations) {\n var seen = [],\n binding,\n parsed,\n attribute;\n var i = attributeBindings.length - 1;\n while (i !== -1) {\n binding = attributeBindings[i];\n parsed = _bindings.AttributeBinding.parse(binding);\n attribute = parsed[1];\n\n if (seen.indexOf(attribute) === -1) {\n seen.push(attribute);\n _bindings.AttributeBinding.install(element, component, parsed, operations);\n }\n i--;\n }\n if (seen.indexOf('id') === -1) {\n operations.addStaticAttribute(element, 'id', component.elementId);\n }\n if (seen.indexOf('style') === -1) {\n _bindings.IsVisibleBinding.install(element, component, operations);\n }\n }\n function tagName(vm) {\n var dynamicScope = vm.dynamicScope();\n // tslint:disable-next-line:no-shadowed-variable\n var tagName = dynamicScope.view.tagName;\n\n return _runtime.PrimitiveReference.create(tagName === '' ? null : tagName || 'div');\n }\n function ariaRole(vm) {\n return vm.getSelf().get('ariaRole');\n }\n\n var CurlyComponentLayoutCompiler = function () {\n function CurlyComponentLayoutCompiler(template) {\n\n this.template = template;\n }\n\n CurlyComponentLayoutCompiler.prototype.compile = function (builder) {\n builder.wrapLayout(this.template);\n builder.tag.dynamic(tagName);\n builder.attrs.dynamic('role', ariaRole);\n builder.attrs.static('class', 'ember-view');\n };\n\n return CurlyComponentLayoutCompiler;\n }();\n\n CurlyComponentLayoutCompiler.id = 'curly';\n\n var PositionalArgumentReference = exports.PositionalArgumentReference = function () {\n function PositionalArgumentReference(references) {\n\n this.tag = (0, _reference.combineTagged)(references);\n this._references = references;\n }\n\n PositionalArgumentReference.prototype.value = function () {\n return this._references.map(function (reference) {\n return reference.value();\n });\n };\n\n PositionalArgumentReference.prototype.get = function (key) {\n return _references.PropertyReference.create(this, key);\n };\n\n return PositionalArgumentReference;\n }();\n\n var CurlyComponentManager = function (_AbstractManager) {\n (0, _emberBabel.inherits)(CurlyComponentManager, _AbstractManager);\n\n function CurlyComponentManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractManager.apply(this, arguments));\n }\n\n CurlyComponentManager.prototype.prepareArgs = function (definition, args) {\n var componentPositionalParamsDefinition = definition.ComponentClass.class.positionalParams,\n remainingDefinitionPositionals,\n _positionalParamsToNa,\n length,\n i,\n name;\n\n var componentHasRestStylePositionalParams = typeof componentPositionalParamsDefinition === 'string';\n var componentHasPositionalParams = componentHasRestStylePositionalParams || componentPositionalParamsDefinition.length > 0;\n var needsPositionalParamMunging = componentHasPositionalParams && args.positional.length !== 0;\n var isClosureComponent = definition.args;\n if (!needsPositionalParamMunging && !isClosureComponent) {\n return null;\n }\n var capturedArgs = args.capture();\n // grab raw positional references array\n var positional = capturedArgs.positional.references;\n // handle prep for closure component with positional params\n var curriedNamed = void 0;\n if (definition.args) {\n remainingDefinitionPositionals = definition.args.positional.slice(positional.length);\n\n positional = positional.concat(remainingDefinitionPositionals);\n curriedNamed = definition.args.named;\n }\n // handle positionalParams\n var positionalParamsToNamed = void 0;\n if (componentHasRestStylePositionalParams) {\n\n positionalParamsToNamed = (_positionalParamsToNa = {}, _positionalParamsToNa[componentPositionalParamsDefinition] = new PositionalArgumentReference(positional), _positionalParamsToNa);\n positional = [];\n } else if (componentHasPositionalParams) {\n positionalParamsToNamed = {};\n length = Math.min(positional.length, componentPositionalParamsDefinition.length);\n\n for (i = 0; i < length; i++) {\n name = componentPositionalParamsDefinition[i];\n\n positionalParamsToNamed[name] = positional[i];\n }\n }\n var named = (0, _emberUtils.assign)({}, curriedNamed, positionalParamsToNamed, capturedArgs.named.map);\n return { positional: positional, named: named };\n };\n\n CurlyComponentManager.prototype.create = function (environment, definition, args, dynamicScope, callerSelfRef, hasBlock) {\n var parentView = dynamicScope.view;\n var factory = definition.ComponentClass;\n var capturedArgs = args.named.capture();\n var props = (0, _processArgs.processComponentArgs)(capturedArgs);\n aliasIdToElementId(args, props);\n props.parentView = parentView;\n props[_component.HAS_BLOCK] = hasBlock;\n props._targetObject = callerSelfRef.value();\n var component = factory.create(props);\n var finalizer = (0, _emberMetal._instrumentStart)('render.component', initialRenderInstrumentDetails, component);\n dynamicScope.view = component;\n if (parentView !== null && parentView !== undefined) {\n parentView.appendChild(component);\n }\n // We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components\n if (component.tagName === '') {\n if (environment.isInteractive) {\n component.trigger('willRender');\n }\n component._transitionTo('hasElement');\n if (environment.isInteractive) {\n component.trigger('willInsertElement');\n }\n }\n var bucket = new _curlyComponentStateBucket.default(environment, component, capturedArgs, finalizer);\n if (args.named.has('class')) {\n bucket.classRef = args.named.get('class');\n }\n\n if (environment.isInteractive && component.tagName !== '') {\n component.trigger('willRender');\n }\n return bucket;\n };\n\n CurlyComponentManager.prototype.layoutFor = function (definition, bucket, env) {\n var template = definition.template;\n if (!template) {\n template = this.templateFor(bucket.component, env);\n }\n return env.getCompiledBlock(CurlyComponentLayoutCompiler, template);\n };\n\n CurlyComponentManager.prototype.templateFor = function (component, env) {\n var Template = (0, _emberMetal.get)(component, 'layout'),\n template;\n var owner = component[_emberUtils.OWNER];\n if (Template) {\n return env.getTemplate(Template, owner);\n }\n var layoutName = (0, _emberMetal.get)(component, 'layoutName');\n if (layoutName) {\n template = owner.lookup('template:' + layoutName);\n\n if (template) {\n return template;\n }\n }\n return owner.lookup(DEFAULT_LAYOUT);\n };\n\n CurlyComponentManager.prototype.getSelf = function (_ref) {\n var component = _ref.component;\n\n return component[_component.ROOT_REF];\n };\n\n CurlyComponentManager.prototype.didCreateElement = function (_ref2, element, operations) {\n var component = _ref2.component,\n classRef = _ref2.classRef,\n environment = _ref2.environment;\n\n (0, _emberViews.setViewElement)(component, element);\n var attributeBindings = component.attributeBindings,\n classNames = component.classNames,\n classNameBindings = component.classNameBindings;\n\n if (attributeBindings && attributeBindings.length) {\n applyAttributeBindings(element, attributeBindings, component, operations);\n } else {\n operations.addStaticAttribute(element, 'id', component.elementId);\n _bindings.IsVisibleBinding.install(element, component, operations);\n }\n if (classRef) {\n // TODO should make addDynamicAttribute accept an opaque\n operations.addDynamicAttribute(element, 'class', classRef, false);\n }\n if (classNames && classNames.length) {\n classNames.forEach(function (name) {\n operations.addStaticAttribute(element, 'class', name);\n });\n }\n if (classNameBindings && classNameBindings.length) {\n classNameBindings.forEach(function (binding) {\n _bindings.ClassNameBinding.install(element, component, binding, operations);\n });\n }\n component._transitionTo('hasElement');\n if (environment.isInteractive) {\n component.trigger('willInsertElement');\n }\n };\n\n CurlyComponentManager.prototype.didRenderLayout = function (bucket, bounds) {\n bucket.component[_component.BOUNDS] = bounds;\n bucket.finalize();\n };\n\n CurlyComponentManager.prototype.getTag = function (_ref3) {\n var component = _ref3.component;\n\n return component[_component.DIRTY_TAG];\n };\n\n CurlyComponentManager.prototype.didCreate = function (_ref4) {\n var component = _ref4.component,\n environment = _ref4.environment;\n\n if (environment.isInteractive) {\n component._transitionTo('inDOM');\n component.trigger('didInsertElement');\n component.trigger('didRender');\n }\n };\n\n CurlyComponentManager.prototype.update = function (bucket) {\n var component = bucket.component,\n args = bucket.args,\n argsRevision = bucket.argsRevision,\n environment = bucket.environment,\n props;\n\n bucket.finalizer = (0, _emberMetal._instrumentStart)('render.component', rerenderInstrumentDetails, component);\n if (!args.tag.validate(argsRevision)) {\n props = (0, _processArgs.processComponentArgs)(args);\n\n bucket.argsRevision = args.tag.value();\n component[_component.IS_DISPATCHING_ATTRS] = true;\n component.setProperties(props);\n component[_component.IS_DISPATCHING_ATTRS] = false;\n component.trigger('didUpdateAttrs');\n component.trigger('didReceiveAttrs');\n }\n if (environment.isInteractive) {\n component.trigger('willUpdate');\n component.trigger('willRender');\n }\n };\n\n CurlyComponentManager.prototype.didUpdateLayout = function (bucket) {\n bucket.finalize();\n };\n\n CurlyComponentManager.prototype.didUpdate = function (_ref5) {\n var component = _ref5.component,\n environment = _ref5.environment;\n\n if (environment.isInteractive) {\n component.trigger('didUpdate');\n component.trigger('didRender');\n }\n };\n\n CurlyComponentManager.prototype.getDestructor = function (stateBucket) {\n return stateBucket;\n };\n\n return CurlyComponentManager;\n }(_abstract.default);\n\n exports.default = CurlyComponentManager;\n\n function initialRenderInstrumentDetails(component) {\n return component.instrumentDetails({ initialRender: true });\n }\n function rerenderInstrumentDetails(component) {\n return component.instrumentDetails({ initialRender: false });\n }\n var MANAGER = new CurlyComponentManager();\n\n exports.CurlyComponentDefinition = function (_ComponentDefinition) {\n (0, _emberBabel.inherits)(CurlyComponentDefinition, _ComponentDefinition);\n\n // tslint:disable-next-line:no-shadowed-variable\n function CurlyComponentDefinition(name, ComponentClass, template, args, customManager) {\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition.call(this, name, customManager || MANAGER, ComponentClass));\n\n _this2.template = template;\n _this2.args = args;\n return _this2;\n }\n\n return CurlyComponentDefinition;\n }(_runtime.ComponentDefinition);\n});","enifed('ember-glimmer/component-managers/mount', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-routing', 'ember-glimmer/utils/references', 'ember-glimmer/component-managers/abstract', 'ember-glimmer/component-managers/outlet'], function (exports, _emberBabel, _runtime, _emberRouting, _references, _abstract, _outlet) {\n 'use strict';\n\n exports.MountDefinition = undefined;\n\n var MountManager = function (_AbstractManager) {\n (0, _emberBabel.inherits)(MountManager, _AbstractManager);\n\n function MountManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractManager.apply(this, arguments));\n }\n\n MountManager.prototype.create = function (environment, _ref, args) {\n var name = _ref.name;\n\n var engine = environment.owner.buildChildEngineInstance(name);\n engine.boot();\n var bucket = { engine: engine };\n\n bucket.modelReference = args.named.get('model');\n\n return bucket;\n };\n\n MountManager.prototype.layoutFor = function (_definition, _ref2, env) {\n var engine = _ref2.engine;\n\n var template = engine.lookup('template:application');\n return env.getCompiledBlock(_outlet.OutletLayoutCompiler, template);\n };\n\n MountManager.prototype.getSelf = function (bucket) {\n var engine = bucket.engine,\n modelReference = bucket.modelReference;\n\n var applicationFactory = engine.factoryFor('controller:application');\n var controllerFactory = applicationFactory || (0, _emberRouting.generateControllerFactory)(engine, 'application');\n var controller = bucket.controller = controllerFactory.create();\n\n var model = modelReference.value();\n bucket.modelRevision = modelReference.tag.value();\n controller.set('model', model);\n\n return new _references.RootReference(controller);\n };\n\n MountManager.prototype.getDestructor = function (_ref3) {\n var engine = _ref3.engine;\n\n return engine;\n };\n\n MountManager.prototype.didRenderLayout = function () {};\n\n MountManager.prototype.update = function (bucket) {\n var controller = bucket.controller,\n modelReference = bucket.modelReference,\n modelRevision = bucket.modelRevision,\n model;\n\n if (!modelReference.tag.validate(modelRevision)) {\n model = modelReference.value();\n\n bucket.modelRevision = modelReference.tag.value();\n controller.set('model', model);\n }\n };\n\n return MountManager;\n }(_abstract.default);\n\n var MOUNT_MANAGER = new MountManager();\n\n exports.MountDefinition = function (_ComponentDefinition) {\n (0, _emberBabel.inherits)(MountDefinition, _ComponentDefinition);\n\n function MountDefinition(name) {\n return (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition.call(this, name, MOUNT_MANAGER, null));\n }\n\n return MountDefinition;\n }(_runtime.ComponentDefinition);\n});","enifed('ember-glimmer/component-managers/outlet', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-metal', 'ember-utils', 'ember-glimmer/utils/references', 'ember-glimmer/component-managers/abstract'], function (exports, _emberBabel, _runtime, _emberMetal, _emberUtils, _references, _abstract) {\n 'use strict';\n\n exports.OutletLayoutCompiler = exports.OutletComponentDefinition = exports.TopLevelOutletComponentDefinition = undefined;\n\n function instrumentationPayload(_ref) {\n var _ref$render = _ref.render,\n name = _ref$render.name,\n outlet = _ref$render.outlet;\n\n return { object: name + ':' + outlet };\n }\n function NOOP() {}\n\n var StateBucket = function () {\n function StateBucket(outletState) {\n\n this.outletState = outletState;\n this.instrument();\n }\n\n StateBucket.prototype.instrument = function () {\n this.finalizer = (0, _emberMetal._instrumentStart)('render.outlet', instrumentationPayload, this.outletState);\n };\n\n StateBucket.prototype.finalize = function () {\n var finalizer = this.finalizer;\n\n finalizer();\n this.finalizer = NOOP;\n };\n\n return StateBucket;\n }();\n\n var OutletComponentManager = function (_AbstractManager) {\n (0, _emberBabel.inherits)(OutletComponentManager, _AbstractManager);\n\n function OutletComponentManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractManager.apply(this, arguments));\n }\n\n OutletComponentManager.prototype.create = function (environment, definition, _args, dynamicScope) {\n var outletStateReference = dynamicScope.outletState = dynamicScope.outletState.get('outlets').get(definition.outletName);\n var outletState = outletStateReference.value();\n return new StateBucket(outletState);\n };\n\n OutletComponentManager.prototype.layoutFor = function (definition, _bucket, env) {\n return env.getCompiledBlock(OutletLayoutCompiler, definition.template);\n };\n\n OutletComponentManager.prototype.getSelf = function (_ref2) {\n var outletState = _ref2.outletState;\n\n return new _references.RootReference(outletState.render.controller);\n };\n\n OutletComponentManager.prototype.didRenderLayout = function (bucket) {\n bucket.finalize();\n };\n\n OutletComponentManager.prototype.getDestructor = function () {\n return null;\n };\n\n return OutletComponentManager;\n }(_abstract.default);\n\n var MANAGER = new OutletComponentManager();\n\n var TopLevelOutletComponentManager = function (_OutletComponentManag) {\n (0, _emberBabel.inherits)(TopLevelOutletComponentManager, _OutletComponentManag);\n\n function TopLevelOutletComponentManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _OutletComponentManag.apply(this, arguments));\n }\n\n TopLevelOutletComponentManager.prototype.create = function (environment, definition, _args, dynamicScope) {\n return new StateBucket(dynamicScope.outletState.value());\n };\n\n TopLevelOutletComponentManager.prototype.layoutFor = function (definition, _bucket, env) {\n return env.getCompiledBlock(TopLevelOutletLayoutCompiler, definition.template);\n };\n\n return TopLevelOutletComponentManager;\n }(OutletComponentManager);\n\n var TOP_LEVEL_MANAGER = new TopLevelOutletComponentManager();\n\n exports.TopLevelOutletComponentDefinition = function (_ComponentDefinition) {\n (0, _emberBabel.inherits)(TopLevelOutletComponentDefinition, _ComponentDefinition);\n\n function TopLevelOutletComponentDefinition(instance) {\n\n var _this3 = (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition.call(this, 'outlet', TOP_LEVEL_MANAGER, instance));\n\n _this3.template = instance.template;\n (0, _emberUtils.generateGuid)(_this3);\n return _this3;\n }\n\n return TopLevelOutletComponentDefinition;\n }(_runtime.ComponentDefinition);\n\n var TopLevelOutletLayoutCompiler = function () {\n function TopLevelOutletLayoutCompiler(template) {\n\n this.template = template;\n }\n\n TopLevelOutletLayoutCompiler.prototype.compile = function (builder) {\n builder.wrapLayout(this.template);\n builder.tag.static('div');\n builder.attrs.static('id', (0, _emberUtils.guidFor)(this));\n builder.attrs.static('class', 'ember-view');\n };\n\n return TopLevelOutletLayoutCompiler;\n }();\n\n TopLevelOutletLayoutCompiler.id = 'top-level-outlet';\n\n exports.OutletComponentDefinition = function (_ComponentDefinition2) {\n (0, _emberBabel.inherits)(OutletComponentDefinition, _ComponentDefinition2);\n\n function OutletComponentDefinition(outletName, template) {\n\n var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition2.call(this, 'outlet', MANAGER, null));\n\n _this4.outletName = outletName;\n _this4.template = template;\n (0, _emberUtils.generateGuid)(_this4);\n return _this4;\n }\n\n return OutletComponentDefinition;\n }(_runtime.ComponentDefinition);\n\n var OutletLayoutCompiler = exports.OutletLayoutCompiler = function () {\n function OutletLayoutCompiler(template) {\n\n this.template = template;\n }\n\n OutletLayoutCompiler.prototype.compile = function (builder) {\n builder.wrapLayout(this.template);\n };\n\n return OutletLayoutCompiler;\n }();\n\n OutletLayoutCompiler.id = 'outlet';\n});","enifed('ember-glimmer/component-managers/render', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-debug', 'ember-routing', 'ember-glimmer/utils/references', 'ember-glimmer/component-managers/abstract', 'ember-glimmer/component-managers/outlet'], function (exports, _emberBabel, _runtime, _emberDebug, _emberRouting, _references, _abstract, _outlet) {\n 'use strict';\n\n exports.RenderDefinition = exports.NON_SINGLETON_RENDER_MANAGER = exports.SINGLETON_RENDER_MANAGER = exports.AbstractRenderManager = undefined;\n\n var AbstractRenderManager = exports.AbstractRenderManager = function (_AbstractManager) {\n (0, _emberBabel.inherits)(AbstractRenderManager, _AbstractManager);\n\n function AbstractRenderManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractManager.apply(this, arguments));\n }\n\n AbstractRenderManager.prototype.layoutFor = function (definition, _bucket, env) {\n // only curly components can have lazy layout\n false && !!!definition.template && (0, _emberDebug.assert)('definition is missing a template', !!definition.template);\n\n return env.getCompiledBlock(_outlet.OutletLayoutCompiler, definition.template);\n };\n\n AbstractRenderManager.prototype.getSelf = function (_ref) {\n var controller = _ref.controller;\n\n return new _references.RootReference(controller);\n };\n\n return AbstractRenderManager;\n }(_abstract.default);\n\n var SingletonRenderManager = function (_AbstractRenderManage) {\n (0, _emberBabel.inherits)(SingletonRenderManager, _AbstractRenderManage);\n\n function SingletonRenderManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractRenderManage.apply(this, arguments));\n }\n\n SingletonRenderManager.prototype.create = function (env, definition, _args, dynamicScope) {\n var name = definition.name;\n\n var controller = env.owner.lookup('controller:' + name) || (0, _emberRouting.generateController)(env.owner, name);\n\n if (dynamicScope.rootOutletState) {\n dynamicScope.outletState = dynamicScope.rootOutletState.getOrphan(name);\n }\n return { controller: controller };\n };\n\n SingletonRenderManager.prototype.getDestructor = function () {\n return null;\n };\n\n return SingletonRenderManager;\n }(AbstractRenderManager);\n\n exports.SINGLETON_RENDER_MANAGER = new SingletonRenderManager();\n\n\n var NonSingletonRenderManager = function (_AbstractRenderManage2) {\n (0, _emberBabel.inherits)(NonSingletonRenderManager, _AbstractRenderManage2);\n\n function NonSingletonRenderManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractRenderManage2.apply(this, arguments));\n }\n\n NonSingletonRenderManager.prototype.create = function (environment, definition, args, dynamicScope) {\n var name = definition.name,\n env = definition.env;\n\n var modelRef = args.positional.at(0);\n var controllerFactory = env.owner.factoryFor('controller:' + name);\n var factory = controllerFactory || (0, _emberRouting.generateControllerFactory)(env.owner, name);\n var controller = factory.create({ model: modelRef.value() });\n\n if (dynamicScope.rootOutletState) {\n dynamicScope.outletState = dynamicScope.rootOutletState.getOrphan(name);\n }\n return { controller: controller, model: modelRef };\n };\n\n NonSingletonRenderManager.prototype.update = function (_ref2) {\n var controller = _ref2.controller,\n model = _ref2.model;\n\n controller.set('model', model.value());\n };\n\n NonSingletonRenderManager.prototype.getDestructor = function (_ref3) {\n var controller = _ref3.controller;\n\n return controller;\n };\n\n return NonSingletonRenderManager;\n }(AbstractRenderManager);\n\n exports.NON_SINGLETON_RENDER_MANAGER = new NonSingletonRenderManager();\n\n exports.RenderDefinition = function (_ComponentDefinition) {\n (0, _emberBabel.inherits)(RenderDefinition, _ComponentDefinition);\n\n function RenderDefinition(name, template, env, manager) {\n\n var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition.call(this, 'render', manager, null));\n\n _this4.name = name;\n _this4.template = template;\n _this4.env = env;\n return _this4;\n }\n\n return RenderDefinition;\n }(_runtime.ComponentDefinition);\n});","enifed('ember-glimmer/component-managers/root', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-metal', 'ember-glimmer/utils/curly-component-state-bucket', 'ember-glimmer/component-managers/curly'], function (exports, _emberBabel, _runtime, _emberMetal, _curlyComponentStateBucket, _curly) {\n 'use strict';\n\n exports.RootComponentDefinition = undefined;\n\n var RootComponentManager = function (_CurlyComponentManage) {\n (0, _emberBabel.inherits)(RootComponentManager, _CurlyComponentManage);\n\n function RootComponentManager() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _CurlyComponentManage.apply(this, arguments));\n }\n\n RootComponentManager.prototype.create = function (environment, definition, args, dynamicScope) {\n var component = definition.ComponentClass.create();\n\n var finalizer = (0, _emberMetal._instrumentStart)('render.component', _curly.initialRenderInstrumentDetails, component);\n dynamicScope.view = component;\n // We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components\n if (component.tagName === '') {\n if (environment.isInteractive) {\n component.trigger('willRender');\n }\n component._transitionTo('hasElement');\n if (environment.isInteractive) {\n component.trigger('willInsertElement');\n }\n }\n\n return new _curlyComponentStateBucket.default(environment, component, args.named.capture(), finalizer);\n };\n\n return RootComponentManager;\n }(_curly.default);\n\n var ROOT_MANAGER = new RootComponentManager();\n\n exports.RootComponentDefinition = function (_ComponentDefinition) {\n (0, _emberBabel.inherits)(RootComponentDefinition, _ComponentDefinition);\n\n function RootComponentDefinition(instance) {\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ComponentDefinition.call(this, '-root', ROOT_MANAGER, {\n class: instance.constructor,\n create: function () {\n return instance;\n }\n }));\n\n _this2.template = undefined;\n _this2.args = undefined;\n return _this2;\n }\n\n return RootComponentDefinition;\n }(_runtime.ComponentDefinition);\n});","enifed('ember-glimmer/component', ['exports', '@glimmer/reference', '@glimmer/runtime', 'ember-debug', 'ember-metal', 'ember-runtime', 'ember-utils', 'ember-views', 'ember-glimmer/utils/references'], function (exports, _reference, _runtime, _emberDebug, _emberMetal, _emberRuntime, _emberUtils, _emberViews, _references) {\n 'use strict';\n\n exports.BOUNDS = exports.HAS_BLOCK = exports.IS_DISPATCHING_ATTRS = exports.ROOT_REF = exports.ARGS = exports.DIRTY_TAG = undefined;\n\n var _CoreView$extend;\n\n var DIRTY_TAG = exports.DIRTY_TAG = (0, _emberUtils.symbol)('DIRTY_TAG');\n var ARGS = exports.ARGS = (0, _emberUtils.symbol)('ARGS');\n var ROOT_REF = exports.ROOT_REF = (0, _emberUtils.symbol)('ROOT_REF');\n var IS_DISPATCHING_ATTRS = exports.IS_DISPATCHING_ATTRS = (0, _emberUtils.symbol)('IS_DISPATCHING_ATTRS');\n exports.HAS_BLOCK = (0, _emberUtils.symbol)('HAS_BLOCK');\n\n var BOUNDS = exports.BOUNDS = (0, _emberUtils.symbol)('BOUNDS');\n /**\n @module @ember/component\n */\n /**\n A `Component` is a view that is completely\n isolated. Properties accessed in its templates go\n to the view object and actions are targeted at\n the view object. There is no access to the\n surrounding context or outer controller; all\n contextual information must be passed in.\n \n The easiest way to create a `Component` is via\n a template. If you name a template\n `app/components/my-foo.hbs`, you will be able to use\n `{{my-foo}}` in other templates, which will make\n an instance of the isolated component.\n \n ```app/components/my-foo.hbs\n {{person-profile person=currentUser}}\n ```\n \n ```app/components/person-profile.hbs\n <h1>{{person.title}}</h1>\n <img src={{person.avatar}}>\n <p class='signature'>{{person.signature}}</p>\n ```\n \n You can use `yield` inside a template to\n include the **contents** of any block attached to\n the component. The block will be executed in the\n context of the surrounding context or outer controller:\n \n ```handlebars\n {{#person-profile person=currentUser}}\n <p>Admin mode</p>\n {{! Executed in the controller's context. }}\n {{/person-profile}}\n ```\n \n ```app/components/person-profile.hbs\n <h1>{{person.title}}</h1>\n {{! Executed in the component's context. }}\n {{yield}} {{! block contents }}\n ```\n \n If you want to customize the component, in order to\n handle events or actions, you implement a subclass\n of `Component` named after the name of the\n component.\n \n For example, you could implement the action\n `hello` for the `person-profile` component:\n \n ```app/components/person-profile.js\n import Component from '@ember/component';\n \n export default Component.extend({\n actions: {\n hello(name) {\n console.log(\"Hello\", name);\n }\n }\n });\n ```\n \n And then use it in the component's template:\n \n ```app/templates/components/person-profile.hbs\n <h1>{{person.title}}</h1>\n {{yield}} <!-- block contents -->\n <button {{action 'hello' person.name}}>\n Say Hello to {{person.name}}\n </button>\n ```\n \n Components must have a `-` in their name to avoid\n conflicts with built-in controls that wrap HTML\n elements. This is consistent with the same\n requirement in web components.\n \n ## HTML Tag\n \n The default HTML tag name used for a component's DOM representation is `div`.\n This can be customized by setting the `tagName` property.\n The following component class:\n \n ```app/components/emphasized-paragraph.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'em'\n });\n ```\n \n Would result in instances with the following HTML:\n \n ```html\n <em id=\"ember1\" class=\"ember-view\"></em>\n ```\n \n ## HTML `class` Attribute\n \n The HTML `class` attribute of a component's tag can be set by providing a\n `classNames` property that is set to an array of strings:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n classNames: ['my-class', 'my-other-class']\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\n ```\n \n `class` attribute values can also be set by providing a `classNameBindings`\n property set to an array of properties names for the component. The return value\n of these properties will be added as part of the value for the components's `class`\n attribute. These properties can be computed properties:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n import { computed } from '@ember/object';\n \n export default Component.extend({\n classNameBindings: ['propertyA', 'propertyB'],\n \n propertyA: 'from-a',\n propertyB: computed(function() {\n if (someLogic) { return 'from-b'; }\n })\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view from-a from-b\"></div>\n ```\n \n If the value of a class name binding returns a boolean the property name\n itself will be used as the class name if the property is true.\n The class name will not be added if the value is `false` or `undefined`.\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n classNameBindings: ['hovered'],\n \n hovered: true\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view hovered\"></div>\n ```\n \n When using boolean class name bindings you can supply a string value other\n than the property name for use as the `class` HTML attribute by appending the\n preferred value after a \":\" character when defining the binding:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n classNameBindings: ['awesome:so-very-cool'],\n \n awesome: true\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\n ```\n \n Boolean value class name bindings whose property names are in a\n camelCase-style format will be converted to a dasherized format:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n classNameBindings: ['isUrgent'],\n \n isUrgent: true\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view is-urgent\"></div>\n ```\n \n Class name bindings can also refer to object values that are found by\n traversing a path relative to the component itself:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n import EmberObject from '@ember/object';\n \n export default Component.extend({\n classNameBindings: ['messages.empty'],\n \n messages: EmberObject.create({\n empty: true\n })\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view empty\"></div>\n ```\n \n If you want to add a class name for a property which evaluates to true and\n and a different class name if it evaluates to false, you can pass a binding\n like this:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n classNameBindings: ['isEnabled:enabled:disabled'],\n isEnabled: true\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view enabled\"></div>\n ```\n \n When isEnabled is `false`, the resulting HTML representation looks like\n this:\n \n ```html\n <div id=\"ember1\" class=\"ember-view disabled\"></div>\n ```\n \n This syntax offers the convenience to add a class if a property is `false`:\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\n export default Component.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: true\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view\"></div>\n ```\n \n When the `isEnabled` property on the component is set to `false`, it will result\n in component instances with an HTML representation of:\n \n ```html\n <div id=\"ember1\" class=\"ember-view disabled\"></div>\n ```\n \n Updates to the value of a class name binding will result in automatic\n update of the HTML `class` attribute in the component's rendered HTML\n representation. If the value becomes `false` or `undefined` the class name\n will be removed.\n Both `classNames` and `classNameBindings` are concatenated properties. See\n [EmberObject](/api/classes/Ember.Object.html) documentation for more\n information about concatenated properties.\n \n ## HTML Attributes\n \n The HTML attribute section of a component's tag can be set by providing an\n `attributeBindings` property set to an array of property names on the component.\n The return value of these properties will be used as the value of the component's\n HTML associated attribute:\n \n ```app/components/my-anchor.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'a',\n attributeBindings: ['href'],\n \n href: 'http://google.com'\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n ```\n \n One property can be mapped on to another by placing a \":\" between\n the source property and the destination property:\n \n ```app/components/my-anchor.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'a',\n attributeBindings: ['url:href'],\n \n url: 'http://google.com'\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n ```\n \n Namespaced attributes (e.g. `xlink:href`) are supported, but have to be\n mapped, since `:` is not a valid character for properties in Javascript:\n \n ```app/components/my-use.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'use',\n attributeBindings: ['xlinkHref:xlink:href'],\n \n xlinkHref: '#triangle'\n });\n ```\n \n Will result in component instances with an HTML representation of:\n \n ```html\n <use xlink:href=\"#triangle\"></use>\n ```\n \n If the return value of an `attributeBindings` monitored property is a boolean\n the attribute will be present or absent depending on the value:\n \n ```app/components/my-text-input.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n \n disabled: false\n });\n ```\n \n Will result in a component instance with an HTML representation of:\n \n ```html\n <input id=\"ember1\" class=\"ember-view\" />\n ```\n \n `attributeBindings` can refer to computed properties:\n \n ```app/components/my-text-input.js\n import Component from '@ember/component';\n import { computed } from '@ember/object';\n \n export default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n \n disabled: computed(function() {\n if (someLogic) {\n return true;\n } else {\n return false;\n }\n })\n });\n ```\n \n To prevent setting an attribute altogether, use `null` or `undefined` as the\n return value of the `attributeBindings` monitored property:\n \n ```app/components/my-text-input.js\n import Component from '@ember/component';\n \n export default Component.extend({\n tagName: 'form',\n attributeBindings: ['novalidate'],\n novalidate: null\n });\n ```\n \n Updates to the property of an attribute binding will result in automatic\n update of the HTML attribute in the component's rendered HTML representation.\n `attributeBindings` is a concatenated property. See [EmberObject](/api/classes/Ember.Object.html)\n documentation for more information about concatenated properties.\n \n ## Layouts\n \n See [Ember.Templates.helpers.yield](/api/classes/Ember.Templates.helpers.html#method_yield)\n for more information.\n \n Layout can be used to wrap content in a component. In addition\n to wrapping content in a Component's template, you can also use\n the public layout API in your Component JavaScript.\n \n ```app/templates/components/person-profile.hbs\n <h1>Person's Title</h1>\n <div class='details'>{{yield}}</div>\n ```\n \n ```app/components/person-profile.js\n import Component from '@ember/component';\n import layout from '../templates/components/person-profile';\n \n export default Component.extend({\n layout\n });\n ```\n \n The above will result in the following HTML output:\n \n ```html\n <h1>Person's Title</h1>\n <div class=\"details\">\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n </div>\n ```\n \n ## Responding to Browser Events\n \n Components can respond to user-initiated events in one of three ways: method\n implementation, through an event manager, and through `{{action}}` helper use\n in their template or layout.\n \n ### Method Implementation\n \n Components can respond to user-initiated events by implementing a method that\n matches the event name. A `jQuery.Event` object will be passed as the\n argument to this method.\n \n ```app/components/my-widget.js\n import Component from '@ember/component';\n \n export default Component.extend({\n click(event) {\n // will be called when an instance's\n // rendered element is clicked\n }\n });\n ```\n \n ### `{{action}}` Helper\n \n See [Ember.Templates.helpers.action](/api/classes/Ember.Templates.helpers.html#method_action).\n \n ### Event Names\n \n All of the event handling approaches described above respond to the same set\n of events. The names of the built-in events are listed below. (The hash of\n built-in events exists in `Ember.EventDispatcher`.) Additional, custom events\n can be registered by using `Ember.Application.customEvents`.\n \n Touch events:\n \n * `touchStart`\n * `touchMove`\n * `touchEnd`\n * `touchCancel`\n \n Keyboard events:\n \n * `keyDown`\n * `keyUp`\n * `keyPress`\n \n Mouse events:\n \n * `mouseDown`\n * `mouseUp`\n * `contextMenu`\n * `click`\n * `doubleClick`\n * `mouseMove`\n * `focusIn`\n * `focusOut`\n * `mouseEnter`\n * `mouseLeave`\n \n Form events:\n \n * `submit`\n * `change`\n * `focusIn`\n * `focusOut`\n * `input`\n \n HTML5 drag and drop events:\n \n * `dragStart`\n * `drag`\n * `dragEnter`\n * `dragLeave`\n * `dragOver`\n * `dragEnd`\n * `drop`\n \n @class Component\n @extends Ember.CoreView\n @uses Ember.TargetActionSupport\n @uses Ember.ClassNamesSupport\n @uses Ember.ActionSupport\n @uses Ember.ViewMixin\n @uses Ember.ViewStateSupport\n @public\n */\n var Component = _emberViews.CoreView.extend(_emberViews.ChildViewsSupport, _emberViews.ViewStateSupport, _emberViews.ClassNamesSupport, _emberRuntime.TargetActionSupport, _emberViews.ActionSupport, _emberViews.ViewMixin, (_CoreView$extend = {\n isComponent: true,\n init: function () {\n var _this = this;\n\n this._super.apply(this, arguments);\n this[IS_DISPATCHING_ATTRS] = false;\n this[DIRTY_TAG] = new _reference.DirtyableTag();\n this[ROOT_REF] = new _references.RootReference(this);\n this[BOUNDS] = null;\n // If a `defaultLayout` was specified move it to the `layout` prop.\n // `layout` is no longer a CP, so this just ensures that the `defaultLayout`\n // logic is supported with a deprecation\n if (this.defaultLayout && !this.layout) {\n false && !false && (0, _emberDebug.deprecate)('Specifying `defaultLayout` to ' + this + ' is deprecated. Please use `layout` instead.', false, {\n id: 'ember-views.component.defaultLayout',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-component-defaultlayout'\n });\n\n this.layout = this.defaultLayout;\n }\n // If in a tagless component, assert that no event handlers are defined\n false && !(this.tagName !== '' || !this.renderer._destinedForDOM || !function () {\n var eventDispatcher = (0, _emberUtils.getOwner)(_this).lookup('event_dispatcher:main'),\n methodName;\n var events = eventDispatcher && eventDispatcher._finalEvents || {};\n // tslint:disable-next-line:forin\n for (var key in events) {\n methodName = events[key];\n\n if (typeof _this[methodName] === 'function') {\n return true; // indicate that the assertion should be triggered\n }\n }\n return false;\n }()) && (0, _emberDebug.assert)('You can not define a function that handles DOM events in the `' + this + '` tagless component since it doesn\\'t have any DOM element.', this.tagName !== '' || !this.renderer._destinedForDOM || !function () {\n var eventDispatcher = (0, _emberUtils.getOwner)(_this).lookup('event_dispatcher:main'),\n methodName;var events = eventDispatcher && eventDispatcher._finalEvents || {};for (var key in events) {\n methodName = events[key];\n if (typeof _this[methodName] === 'function') {\n return true;\n }\n }return false;\n }());\n false && !!(this.tagName && this.tagName.isDescriptor) && (0, _emberDebug.assert)('You cannot use a computed property for the component\\'s `tagName` (' + this + ').', !(this.tagName && this.tagName.isDescriptor));\n },\n rerender: function () {\n this[DIRTY_TAG].dirty();\n this._super();\n },\n __defineNonEnumerable: function (property) {\n this[property.name] = property.descriptor.value;\n }\n }, _CoreView$extend[_emberMetal.PROPERTY_DID_CHANGE] = function (key) {\n if (this[IS_DISPATCHING_ATTRS]) {\n return;\n }\n var args = this[ARGS];\n var reference = args && args[key];\n if (reference) {\n if (reference[_references.UPDATE]) {\n reference[_references.UPDATE]((0, _emberMetal.get)(this, key));\n }\n }\n }, _CoreView$extend.getAttr = function (key) {\n // TODO Intimate API should be deprecated\n return this.get(key);\n }, _CoreView$extend.readDOMAttr = function (name) {\n var element = (0, _emberViews.getViewElement)(this);\n return (0, _runtime.readDOMAttr)(element, name);\n }, _CoreView$extend));\n Component[_emberUtils.NAME_KEY] = 'Ember.Component';\n Component.reopenClass({\n isComponentFactory: true,\n positionalParams: []\n });\n exports.default = Component;\n});","enifed('ember-glimmer/components/checkbox', ['exports', 'ember-metal', 'ember-glimmer/component', 'ember-glimmer/templates/empty'], function (exports, _emberMetal, _component, _empty) {\n 'use strict';\n\n exports.default = _component.default.extend({\n layout: _empty.default,\n classNames: ['ember-checkbox'],\n tagName: 'input',\n attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form'],\n type: 'checkbox',\n disabled: false,\n indeterminate: false,\n didInsertElement: function () {\n this._super.apply(this, arguments);\n (0, _emberMetal.get)(this, 'element').indeterminate = !!(0, _emberMetal.get)(this, 'indeterminate');\n },\n change: function () {\n (0, _emberMetal.set)(this, 'checked', this.$().prop('checked'));\n }\n });\n});","enifed('ember-glimmer/components/link-to', ['exports', 'ember-debug', 'ember-metal', 'ember-runtime', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/templates/link-to'], function (exports, _emberDebug, _emberMetal, _emberRuntime, _emberViews, _component, _linkTo) {\n 'use strict';\n\n /**\n @module @ember/routing\n */\n /**\n `LinkComponent` renders an element whose `click` event triggers a\n transition of the application's instance of `Router` to\n a supplied route by name.\n \n `LinkComponent` components are invoked with {{#link-to}}. Properties\n of this class can be overridden with `reopen` to customize application-wide\n behavior.\n \n @class LinkComponent\n @extends Component\n @see {Ember.Templates.helpers.link-to}\n @public\n **/\n\n var LinkComponent = _component.default.extend({\n layout: _linkTo.default,\n tagName: 'a',\n /**\n @deprecated Use current-when instead.\n @property currentWhen\n @private\n */\n currentWhen: (0, _emberRuntime.deprecatingAlias)('current-when', { id: 'ember-routing-view.deprecated-current-when', until: '3.0.0' }),\n /**\n Used to determine when this `LinkComponent` is active.\n @property current-when\n @public\n */\n 'current-when': null,\n /**\n Sets the `title` attribute of the `LinkComponent`'s HTML element.\n @property title\n @default null\n @public\n **/\n title: null,\n /**\n Sets the `rel` attribute of the `LinkComponent`'s HTML element.\n @property rel\n @default null\n @public\n **/\n rel: null,\n /**\n Sets the `tabindex` attribute of the `LinkComponent`'s HTML element.\n @property tabindex\n @default null\n @public\n **/\n tabindex: null,\n /**\n Sets the `target` attribute of the `LinkComponent`'s HTML element.\n @since 1.8.0\n @property target\n @default null\n @public\n **/\n target: null,\n /**\n The CSS class to apply to `LinkComponent`'s element when its `active`\n property is `true`.\n @property activeClass\n @type String\n @default active\n @public\n **/\n activeClass: 'active',\n /**\n The CSS class to apply to `LinkComponent`'s element when its `loading`\n property is `true`.\n @property loadingClass\n @type String\n @default loading\n @private\n **/\n loadingClass: 'loading',\n /**\n The CSS class to apply to a `LinkComponent`'s element when its `disabled`\n property is `true`.\n @property disabledClass\n @type String\n @default disabled\n @private\n **/\n disabledClass: 'disabled',\n /**\n Determines whether the `LinkComponent` will trigger routing via\n the `replaceWith` routing strategy.\n @property replace\n @type Boolean\n @default false\n @public\n **/\n replace: false,\n /**\n By default the `{{link-to}}` component will bind to the `href` and\n `title` attributes. It's discouraged that you override these defaults,\n however you can push onto the array if needed.\n @property attributeBindings\n @type Array | String\n @default ['title', 'rel', 'tabindex', 'target']\n @public\n */\n attributeBindings: ['href', 'title', 'rel', 'tabindex', 'target'],\n /**\n By default the `{{link-to}}` component will bind to the `active`, `loading`,\n and `disabled` classes. It is discouraged to override these directly.\n @property classNameBindings\n @type Array\n @default ['active', 'loading', 'disabled', 'ember-transitioning-in', 'ember-transitioning-out']\n @public\n */\n classNameBindings: ['active', 'loading', 'disabled', 'transitioningIn', 'transitioningOut'],\n /**\n By default the `{{link-to}}` component responds to the `click` event. You\n can override this globally by setting this property to your custom\n event name.\n This is particularly useful on mobile when one wants to avoid the 300ms\n click delay using some sort of custom `tap` event.\n @property eventName\n @type String\n @default click\n @private\n */\n eventName: 'click',\n init: function () {\n this._super.apply(this, arguments);\n // Map desired event name to invoke function\n var eventName = (0, _emberMetal.get)(this, 'eventName');\n this.on(eventName, this, this._invoke);\n },\n\n _routing: _emberRuntime.inject.service('-routing'),\n /**\n Accessed as a classname binding to apply the `LinkComponent`'s `disabledClass`\n CSS `class` to the element when the link is disabled.\n When `true` interactions with the element will not trigger route changes.\n @property disabled\n @private\n */\n disabled: (0, _emberMetal.computed)({\n get: function () {\n // always returns false for `get` because (due to the `set` just below)\n // the cached return value from the set will prevent this getter from _ever_\n // being called after a set has occured\n return false;\n },\n set: function (_key, value) {\n this._isDisabled = value;\n return value ? (0, _emberMetal.get)(this, 'disabledClass') : false;\n }\n }),\n _isActive: function (routerState) {\n if ((0, _emberMetal.get)(this, 'loading')) {\n return false;\n }\n var currentWhen = (0, _emberMetal.get)(this, 'current-when'),\n i;\n if (typeof currentWhen === 'boolean') {\n return currentWhen;\n }\n var isCurrentWhenSpecified = !!currentWhen;\n currentWhen = currentWhen || (0, _emberMetal.get)(this, 'qualifiedRouteName');\n currentWhen = currentWhen.split(' ');\n var routing = (0, _emberMetal.get)(this, '_routing');\n var models = (0, _emberMetal.get)(this, 'models');\n var resolvedQueryParams = (0, _emberMetal.get)(this, 'resolvedQueryParams');\n for (i = 0; i < currentWhen.length; i++) {\n if (routing.isActiveForRoute(models, resolvedQueryParams, currentWhen[i], routerState, isCurrentWhenSpecified)) {\n return true;\n }\n }\n return false;\n },\n\n /**\n Accessed as a classname binding to apply the `LinkComponent`'s `activeClass`\n CSS `class` to the element when the link is active.\n A `LinkComponent` is considered active when its `currentWhen` property is `true`\n or the application's current route is the route the `LinkComponent` would trigger\n transitions into.\n The `currentWhen` property can match against multiple routes by separating\n route names using the ` ` (space) character.\n @property active\n @private\n */\n active: (0, _emberMetal.computed)('activeClass', '_active', function () {\n return this.get('_active') ? (0, _emberMetal.get)(this, 'activeClass') : false;\n }),\n _active: (0, _emberMetal.computed)('_routing.currentState', function () {\n var currentState = (0, _emberMetal.get)(this, '_routing.currentState');\n if (!currentState) {\n return false;\n }\n return this._isActive(currentState);\n }),\n willBeActive: (0, _emberMetal.computed)('_routing.targetState', function () {\n var routing = (0, _emberMetal.get)(this, '_routing');\n var targetState = (0, _emberMetal.get)(routing, 'targetState');\n if ((0, _emberMetal.get)(routing, 'currentState') === targetState) {\n return;\n }\n return this._isActive(targetState);\n }),\n transitioningIn: (0, _emberMetal.computed)('active', 'willBeActive', function () {\n if ((0, _emberMetal.get)(this, 'willBeActive') === true && !(0, _emberMetal.get)(this, '_active')) {\n return 'ember-transitioning-in';\n } else {\n return false;\n }\n }),\n transitioningOut: (0, _emberMetal.computed)('active', 'willBeActive', function () {\n if ((0, _emberMetal.get)(this, 'willBeActive') === false && (0, _emberMetal.get)(this, '_active')) {\n return 'ember-transitioning-out';\n } else {\n return false;\n }\n }),\n _invoke: function (event) {\n if (!(0, _emberViews.isSimpleClick)(event)) {\n return true;\n }\n var preventDefault = (0, _emberMetal.get)(this, 'preventDefault');\n var targetAttribute = (0, _emberMetal.get)(this, 'target');\n if (preventDefault !== false) {\n if (!targetAttribute || targetAttribute === '_self') {\n event.preventDefault();\n }\n }\n if ((0, _emberMetal.get)(this, 'bubbles') === false) {\n event.stopPropagation();\n }\n if (this._isDisabled) {\n return false;\n }\n if ((0, _emberMetal.get)(this, 'loading')) {\n false && (0, _emberDebug.warn)('This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.', false);\n\n return false;\n }\n if (targetAttribute && targetAttribute !== '_self') {\n return false;\n }\n var qualifiedRouteName = (0, _emberMetal.get)(this, 'qualifiedRouteName');\n var models = (0, _emberMetal.get)(this, 'models');\n var queryParams = (0, _emberMetal.get)(this, 'queryParams.values');\n var shouldReplace = (0, _emberMetal.get)(this, 'replace');\n var payload = {\n queryParams: queryParams,\n routeName: qualifiedRouteName\n };\n // tslint:disable-next-line:max-line-length\n (0, _emberMetal.flaggedInstrument)('interaction.link-to', payload, this._generateTransition(payload, qualifiedRouteName, models, queryParams, shouldReplace));\n return false;\n },\n _generateTransition: function (payload, qualifiedRouteName, models, queryParams, shouldReplace) {\n var routing = (0, _emberMetal.get)(this, '_routing');\n return function () {\n payload.transition = routing.transitionTo(qualifiedRouteName, models, queryParams, shouldReplace);\n };\n },\n\n queryParams: null,\n qualifiedRouteName: (0, _emberMetal.computed)('targetRouteName', '_routing.currentState', function () {\n var params = (0, _emberMetal.get)(this, 'params');\n var paramsLength = params.length;\n var lastParam = params[paramsLength - 1];\n if (lastParam && lastParam.isQueryParams) {\n paramsLength--;\n }\n var onlyQueryParamsSupplied = this[_component.HAS_BLOCK] ? paramsLength === 0 : paramsLength === 1;\n if (onlyQueryParamsSupplied) {\n return (0, _emberMetal.get)(this, '_routing.currentRouteName');\n }\n return (0, _emberMetal.get)(this, 'targetRouteName');\n }),\n resolvedQueryParams: (0, _emberMetal.computed)('queryParams', function () {\n var resolvedQueryParams = {};\n var queryParams = (0, _emberMetal.get)(this, 'queryParams');\n if (!queryParams) {\n return resolvedQueryParams;\n }\n var values = queryParams.values;\n for (var key in values) {\n if (!values.hasOwnProperty(key)) {\n continue;\n }\n resolvedQueryParams[key] = values[key];\n }\n return resolvedQueryParams;\n }),\n /**\n Sets the element's `href` attribute to the url for\n the `LinkComponent`'s targeted route.\n If the `LinkComponent`'s `tagName` is changed to a value other\n than `a`, this property will be ignored.\n @property href\n @private\n */\n href: (0, _emberMetal.computed)('models', 'qualifiedRouteName', function () {\n if ((0, _emberMetal.get)(this, 'tagName') !== 'a') {\n return;\n }\n var qualifiedRouteName = (0, _emberMetal.get)(this, 'qualifiedRouteName');\n var models = (0, _emberMetal.get)(this, 'models');\n if ((0, _emberMetal.get)(this, 'loading')) {\n return (0, _emberMetal.get)(this, 'loadingHref');\n }\n var routing = (0, _emberMetal.get)(this, '_routing');\n var queryParams = (0, _emberMetal.get)(this, 'queryParams.values');\n\n return routing.generateURL(qualifiedRouteName, models, queryParams);\n }),\n loading: (0, _emberMetal.computed)('_modelsAreLoaded', 'qualifiedRouteName', function () {\n var qualifiedRouteName = (0, _emberMetal.get)(this, 'qualifiedRouteName');\n var modelsAreLoaded = (0, _emberMetal.get)(this, '_modelsAreLoaded');\n if (!modelsAreLoaded || qualifiedRouteName === null || qualifiedRouteName === undefined) {\n return (0, _emberMetal.get)(this, 'loadingClass');\n }\n }),\n _modelsAreLoaded: (0, _emberMetal.computed)('models', function () {\n var models = (0, _emberMetal.get)(this, 'models'),\n i,\n model;\n for (i = 0; i < models.length; i++) {\n model = models[i];\n\n if (model === null || model === undefined) {\n return false;\n }\n }\n return true;\n }),\n _getModels: function (params) {\n var modelCount = params.length - 1,\n i,\n value;\n var models = new Array(modelCount);\n for (i = 0; i < modelCount; i++) {\n value = params[i + 1];\n\n while (_emberRuntime.ControllerMixin.detect(value)) {\n false && !false && (0, _emberDebug.deprecate)('Providing `{{link-to}}` with a param that is wrapped in a controller is deprecated. ' + (this.parentView ? 'Please update `' + this.parentView + '` to use `{{link-to \"post\" someController.model}}` instead.' : ''), false, { id: 'ember-routing-views.controller-wrapped-param', until: '3.0.0' });\n\n value = value.get('model');\n }\n models[i] = value;\n }\n return models;\n },\n\n /**\n The default href value to use while a link-to is loading.\n Only applies when tagName is 'a'\n @property loadingHref\n @type String\n @default #\n @private\n */\n loadingHref: '#',\n didReceiveAttrs: function () {\n var queryParams = void 0;\n var params = (0, _emberMetal.get)(this, 'params');\n if (params) {\n // Do not mutate params in place\n params = params.slice();\n }\n false && !(params && params.length) && (0, _emberDebug.assert)('You must provide one or more parameters to the link-to component.', params && params.length);\n\n var disabledWhen = (0, _emberMetal.get)(this, 'disabledWhen');\n if (disabledWhen !== undefined) {\n this.set('disabled', disabledWhen);\n }\n // Process the positional arguments, in order.\n // 1. Inline link title comes first, if present.\n if (!this[_component.HAS_BLOCK]) {\n this.set('linkTitle', params.shift());\n }\n // 2. `targetRouteName` is now always at index 0.\n this.set('targetRouteName', params[0]);\n // 3. The last argument (if still remaining) is the `queryParams` object.\n var lastParam = params[params.length - 1];\n if (lastParam && lastParam.isQueryParams) {\n queryParams = params.pop();\n } else {\n queryParams = { values: {} };\n }\n this.set('queryParams', queryParams);\n // 4. Any remaining indices (excepting `targetRouteName` at 0) are `models`.\n if (params.length > 1) {\n this.set('models', this._getModels(params));\n } else {\n this.set('models', []);\n }\n }\n }); /**\n @module ember\n */\n /**\n The `{{link-to}}` component renders a link to the supplied\n `routeName` passing an optionally supplied model to the\n route as its `model` context of the route. The block\n for `{{link-to}}` becomes the innerHTML of the rendered\n element:\n \n ```handlebars\n {{#link-to 'photoGallery'}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n You can also use an inline form of `{{link-to}}` component by\n passing the link text as the first argument\n to the component:\n \n ```handlebars\n {{link-to 'Great Hamster Photos' 'photoGallery'}}\n ```\n \n Both will result in:\n \n ```html\n <a href=\"/hamster-photos\">\n Great Hamster Photos\n </a>\n ```\n \n ### Supplying a tagName\n By default `{{link-to}}` renders an `<a>` element. This can\n be overridden for a single use of `{{link-to}}` by supplying\n a `tagName` option:\n \n ```handlebars\n {{#link-to 'photoGallery' tagName=\"li\"}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n ```html\n <li>\n Great Hamster Photos\n </li>\n ```\n \n To override this option for your entire application, see\n \"Overriding Application-wide Defaults\".\n \n ### Disabling the `link-to` component\n By default `{{link-to}}` is enabled.\n any passed value to the `disabled` component property will disable\n the `link-to` component.\n \n static use: the `disabled` option:\n \n ```handlebars\n {{#link-to 'photoGallery' disabled=true}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n dynamic use: the `disabledWhen` option:\n \n ```handlebars\n {{#link-to 'photoGallery' disabledWhen=controller.someProperty}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n any truthy value passed to `disabled` will disable it except `undefined`.\n \n See \"Overriding Application-wide Defaults\" for more.\n \n ### Handling `href`\n `{{link-to}}` will use your application's Router to\n fill the element's `href` property with a url that\n matches the path to the supplied `routeName` for your\n router's configured `Location` scheme, which defaults\n to HashLocation.\n \n ### Handling current route\n `{{link-to}}` will apply a CSS class name of 'active'\n when the application's current route matches\n the supplied routeName. For example, if the application's\n current route is 'photoGallery.recent' the following\n use of `{{link-to}}`:\n \n ```handlebars\n {{#link-to 'photoGallery.recent'}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n will result in\n \n ```html\n <a href=\"/hamster-photos/this-week\" class=\"active\">\n Great Hamster Photos\n </a>\n ```\n \n The CSS class name used for active classes can be customized\n for a single use of `{{link-to}}` by passing an `activeClass`\n option:\n \n ```handlebars\n {{#link-to 'photoGallery.recent' activeClass=\"current-url\"}}\n Great Hamster Photos\n {{/link-to}}\n ```\n \n ```html\n <a href=\"/hamster-photos/this-week\" class=\"current-url\">\n Great Hamster Photos\n </a>\n ```\n \n To override this option for your entire application, see\n \"Overriding Application-wide Defaults\".\n \n ### Keeping a link active for other routes\n \n If you need a link to be 'active' even when it doesn't match\n the current route, you can use the `current-when` argument.\n \n ```handlebars\n {{#link-to 'photoGallery' current-when='photos'}}\n Photo Gallery\n {{/link-to}}\n ```\n \n This may be helpful for keeping links active for:\n \n * non-nested routes that are logically related\n * some secondary menu approaches\n * 'top navigation' with 'sub navigation' scenarios\n \n A link will be active if `current-when` is `true` or the current\n route is the route this link would transition to.\n \n To match multiple routes 'space-separate' the routes:\n \n ```handlebars\n {{#link-to 'gallery' current-when='photos drawings paintings'}}\n Art Gallery\n {{/link-to}}\n ```\n \n ### Supplying a model\n An optional model argument can be used for routes whose\n paths contain dynamic segments. This argument will become\n the model context of the linked route:\n \n ```javascript\n Router.map(function() {\n this.route(\"photoGallery\", {path: \"hamster-photos/:photo_id\"});\n });\n ```\n \n ```handlebars\n {{#link-to 'photoGallery' aPhoto}}\n {{aPhoto.title}}\n {{/link-to}}\n ```\n \n ```html\n <a href=\"/hamster-photos/42\">\n Tomster\n </a>\n ```\n \n ### Supplying multiple models\n For deep-linking to route paths that contain multiple\n dynamic segments, multiple model arguments can be used.\n As the router transitions through the route path, each\n supplied model argument will become the context for the\n route with the dynamic segments:\n \n ```javascript\n Router.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" }, function() {\n this.route(\"comment\", {path: \"comments/:comment_id\"});\n });\n });\n ```\n This argument will become the model context of the linked route:\n \n ```handlebars\n {{#link-to 'photoGallery.comment' aPhoto comment}}\n {{comment.body}}\n {{/link-to}}\n ```\n \n ```html\n <a href=\"/hamster-photos/42/comments/718\">\n A+++ would snuggle again.\n </a>\n ```\n \n ### Supplying an explicit dynamic segment value\n If you don't have a model object available to pass to `{{link-to}}`,\n an optional string or integer argument can be passed for routes whose\n paths contain dynamic segments. This argument will become the value\n of the dynamic segment:\n \n ```javascript\n Router.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" });\n });\n ```\n \n ```handlebars\n {{#link-to 'photoGallery' aPhotoId}}\n {{aPhoto.title}}\n {{/link-to}}\n ```\n \n ```html\n <a href=\"/hamster-photos/42\">\n Tomster\n </a>\n ```\n \n When transitioning into the linked route, the `model` hook will\n be triggered with parameters including this passed identifier.\n \n ### Allowing Default Action\n \n By default the `{{link-to}}` component prevents the default browser action\n by calling `preventDefault()` as this sort of action bubbling is normally\n handled internally and we do not want to take the browser to a new URL (for\n example).\n \n If you need to override this behavior specify `preventDefault=false` in\n your template:\n \n ```handlebars\n {{#link-to 'photoGallery' aPhotoId preventDefault=false}}\n {{aPhotoId.title}}\n {{/link-to}}\n ```\n \n ### Overriding attributes\n You can override any given property of the `LinkComponent`\n that is generated by the `{{link-to}}` component by passing\n key/value pairs, like so:\n \n ```handlebars\n {{#link-to aPhoto tagName='li' title='Following this link will change your life' classNames='pic sweet'}}\n Uh-mazing!\n {{/link-to}}\n ```\n \n See [LinkComponent](/api/classes/Ember.LinkComponent.html) for a\n complete list of overrideable properties. Be sure to also\n check out inherited properties of `LinkComponent`.\n \n ### Overriding Application-wide Defaults\n \n ``{{link-to}}`` creates an instance of `LinkComponent` for rendering. To\n override options for your entire application, export your customized\n `LinkComponent` from `app/components/link-to.js` with the desired overrides:\n \n ```javascript\n // app/components/link-to.js\n import LinkComponent from '@ember/routing/link-component';\n \n export default LinkComponent.extend({\n activeClass: \"is-active\",\n tagName: 'li'\n })\n ```\n \n It is also possible to override the default event in this manner:\n \n ```javascript\n import LinkCompoennt from '@ember/routing/link-component';\n \n export default LinkComponent.extend({\n eventName: 'customEventName'\n });\n ```\n \n @method link-to\n @for Ember.Templates.helpers\n @param {String} routeName\n @param {Object} [context]*\n @param [options] {Object} Handlebars key/value pairs of options, you can override any property of Ember.LinkComponent\n @return {String} HTML string\n @see {LinkComponent}\n @public\n */\n\n LinkComponent.toString = function () {\n return 'LinkComponent';\n };\n LinkComponent.reopenClass({\n positionalParams: 'params'\n });\n exports.default = LinkComponent;\n});","enifed('ember-glimmer/components/text_area', ['exports', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/templates/empty'], function (exports, _emberViews, _component, _empty) {\n 'use strict';\n\n exports.default = _component.default.extend(_emberViews.TextSupport, {\n classNames: ['ember-text-area'],\n layout: _empty.default,\n tagName: 'textarea',\n attributeBindings: ['rows', 'cols', 'name', 'selectionEnd', 'selectionStart', 'wrap', 'lang', 'dir', 'value'],\n rows: null,\n cols: null\n });\n});","enifed('ember-glimmer/components/text_field', ['exports', 'ember-environment', 'ember-metal', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/templates/empty'], function (exports, _emberEnvironment, _emberMetal, _emberViews, _component, _empty) {\n 'use strict';\n\n var inputTypes = Object.create(null); /**\n @module @ember/component\n */\n\n function canSetTypeOfInput(type) {\n if (type in inputTypes) {\n return inputTypes[type];\n }\n // if running in outside of a browser always return the\n // original type\n if (!_emberEnvironment.environment.hasDOM) {\n inputTypes[type] = type;\n return type;\n }\n var inputTypeTestElement = document.createElement('input');\n try {\n inputTypeTestElement.type = type;\n } catch (e) {\n // ignored\n }\n return inputTypes[type] = inputTypeTestElement.type === type;\n }\n /**\n \n The internal class used to create text inputs when the `{{input}}`\n helper is used with `type` of `text`.\n \n See [Ember.Templates.helpers.input](/api/classes/Ember.Templates.helpers.html#method_input) for usage details.\n \n ## Layout and LayoutName properties\n \n Because HTML `input` elements are self closing `layout` and `layoutName`\n properties will not be applied.\n \n @class TextField\n @extends Component\n @uses Ember.TextSupport\n @public\n */\n exports.default = _component.default.extend(_emberViews.TextSupport, {\n layout: _empty.default,\n classNames: ['ember-text-field'],\n tagName: 'input',\n attributeBindings: ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'type', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'value', 'width'],\n /**\n The `value` attribute of the input element. As the user inputs text, this\n property is updated live.\n @property value\n @type String\n @default \"\"\n @public\n */\n value: '',\n /**\n The `type` attribute of the input element.\n @property type\n @type String\n @default \"text\"\n @public\n */\n type: (0, _emberMetal.computed)({\n get: function () {\n return 'text';\n },\n set: function (_key, value) {\n var type = 'text';\n if (canSetTypeOfInput(value)) {\n type = value;\n }\n return type;\n }\n }),\n /**\n The `size` of the text field in characters.\n @property size\n @type String\n @default null\n @public\n */\n size: null,\n /**\n The `pattern` attribute of input element.\n @property pattern\n @type String\n @default null\n @public\n */\n pattern: null,\n /**\n The `min` attribute of input element used with `type=\"number\"` or `type=\"range\"`.\n @property min\n @type String\n @default null\n @since 1.4.0\n @public\n */\n min: null,\n /**\n The `max` attribute of input element used with `type=\"number\"` or `type=\"range\"`.\n @property max\n @type String\n @default null\n @since 1.4.0\n @public\n */\n max: null\n });\n});","enifed('ember-glimmer/dom', ['exports', '@glimmer/runtime', '@glimmer/node'], function (exports, _runtime, _node) {\n 'use strict';\n\n Object.defineProperty(exports, 'DOMChanges', {\n enumerable: true,\n get: function () {\n return _runtime.DOMChanges;\n }\n });\n Object.defineProperty(exports, 'DOMTreeConstruction', {\n enumerable: true,\n get: function () {\n return _runtime.DOMTreeConstruction;\n }\n });\n Object.defineProperty(exports, 'NodeDOMTreeConstruction', {\n enumerable: true,\n get: function () {\n return _node.NodeDOMTreeConstruction;\n }\n });\n});","enifed('ember-glimmer/environment', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-debug', 'ember-metal', 'ember-utils', 'ember-views', 'ember-glimmer/component-managers/curly', 'ember-glimmer/syntax', 'ember-glimmer/utils/debug-stack', 'ember-glimmer/utils/iterable', 'ember-glimmer/utils/references', 'ember-glimmer/helpers/-class', 'ember-glimmer/helpers/-html-safe', 'ember-glimmer/helpers/-input-type', 'ember-glimmer/helpers/-normalize-class', 'ember-glimmer/helpers/action', 'ember-glimmer/helpers/component', 'ember-glimmer/helpers/concat', 'ember-glimmer/helpers/each-in', 'ember-glimmer/helpers/get', 'ember-glimmer/helpers/hash', 'ember-glimmer/helpers/if-unless', 'ember-glimmer/helpers/log', 'ember-glimmer/helpers/mut', 'ember-glimmer/helpers/query-param', 'ember-glimmer/helpers/readonly', 'ember-glimmer/helpers/unbound', 'ember-glimmer/modifiers/action', 'ember-glimmer/protocol-for-url'], function (exports, _emberBabel, _runtime, _emberDebug, _emberMetal, _emberUtils, _emberViews, _curly, _syntax, _debugStack, _iterable, _references, _class, _htmlSafe, _inputType, _normalizeClass, _action, _component, _concat, _eachIn, _get, _hash, _ifUnless, _log, _mut, _queryParam, _readonly, _unbound, _action2, _protocolForUrl) {\n 'use strict';\n\n function instrumentationPayload(name) {\n return { object: 'component:' + name };\n }\n function isTemplateFactory(template) {\n return typeof template.create === 'function';\n }\n\n var Environment = function (_GlimmerEnvironment) {\n (0, _emberBabel.inherits)(Environment, _GlimmerEnvironment);\n\n Environment.create = function (options) {\n return new this(options);\n };\n\n function Environment(injections) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _GlimmerEnvironment.call(this, injections));\n\n _this.owner = injections[_emberUtils.OWNER];\n _this.isInteractive = _this.owner.lookup('-environment:main').isInteractive;\n // can be removed once https://github.com/tildeio/glimmer/pull/305 lands\n _this.destroyedComponents = [];\n (0, _protocolForUrl.default)(_this);\n _this._definitionCache = new _emberMetal.Cache(2000, function (_ref) {\n var name = _ref.name,\n source = _ref.source,\n owner = _ref.owner;\n\n var _lookupComponent = (0, _emberViews.lookupComponent)(owner, name, { source: source }),\n componentFactory = _lookupComponent.component,\n layout = _lookupComponent.layout;\n\n if (componentFactory || layout) {\n return new _curly.CurlyComponentDefinition(name, componentFactory, layout, undefined, void 0);\n }\n return undefined;\n }, function (_ref2) {\n var name = _ref2.name,\n source = _ref2.source,\n owner = _ref2.owner;\n\n var expandedName = source && _this._resolveLocalLookupName(name, source, owner) || name;\n var ownerGuid = (0, _emberUtils.guidFor)(owner);\n return ownerGuid + '|' + expandedName;\n });\n _this._templateCache = new _emberMetal.Cache(1000, function (_ref3) {\n var Template = _ref3.Template,\n owner = _ref3.owner,\n _Template$create;\n\n if (isTemplateFactory(Template)) {\n\n // we received a factory\n return Template.create((_Template$create = { env: _this }, _Template$create[_emberUtils.OWNER] = owner, _Template$create));\n } else {\n // we were provided an instance already\n return Template;\n }\n }, function (_ref4) {\n var Template = _ref4.Template,\n owner = _ref4.owner;\n return (0, _emberUtils.guidFor)(owner) + '|' + Template.id;\n });\n _this._compilerCache = new _emberMetal.Cache(10, function (Compiler) {\n return new _emberMetal.Cache(2000, function (template) {\n var compilable = new Compiler(template);\n return (0, _runtime.compileLayout)(compilable, _this);\n }, function (template) {\n var owner = template.meta.owner;\n return (0, _emberUtils.guidFor)(owner) + '|' + template.id;\n });\n }, function (Compiler) {\n return Compiler.id;\n });\n _this.builtInModifiers = {\n action: new _action2.default()\n };\n _this.builtInHelpers = {\n 'if': _ifUnless.inlineIf,\n action: _action.default,\n concat: _concat.default,\n get: _get.default,\n hash: _hash.default,\n log: _log.default,\n mut: _mut.default,\n 'query-params': _queryParam.default,\n readonly: _readonly.default,\n unbound: _unbound.default,\n 'unless': _ifUnless.inlineUnless,\n '-class': _class.default,\n '-each-in': _eachIn.default,\n '-input-type': _inputType.default,\n '-normalize-class': _normalizeClass.default,\n '-html-safe': _htmlSafe.default,\n '-get-dynamic-var': _runtime.getDynamicVar\n };\n\n return _this;\n }\n // this gets clobbered by installPlatformSpecificProtocolForURL\n // it really should just delegate to a platform specific injection\n\n\n Environment.prototype.protocolForURL = function (s) {\n return s;\n };\n\n Environment.prototype._resolveLocalLookupName = function (name, source, owner) {\n return owner._resolveLocalLookupName(name, source);\n };\n\n Environment.prototype.macros = function () {\n var macros = _GlimmerEnvironment.prototype.macros.call(this);\n (0, _syntax.populateMacros)(macros.blocks, macros.inlines);\n return macros;\n };\n\n Environment.prototype.hasComponentDefinition = function () {\n return false;\n };\n\n Environment.prototype.getComponentDefinition = function (name, _ref5) {\n var owner = _ref5.owner,\n moduleName = _ref5.moduleName;\n\n var finalizer = (0, _emberMetal._instrumentStart)('render.getComponentDefinition', instrumentationPayload, name);\n\n var definition = this._definitionCache.get({ name: name, source: moduleName && 'template:' + moduleName, owner: owner });\n finalizer();\n // TODO the glimmer-vm wants this to always have a def\n // but internally we need it to sometimes be undefined\n return definition;\n };\n\n Environment.prototype.getTemplate = function (Template, owner) {\n return this._templateCache.get({ Template: Template, owner: owner });\n };\n\n Environment.prototype.getCompiledBlock = function (Compiler, template) {\n var compilerCache = this._compilerCache.get(Compiler);\n return compilerCache.get(template);\n };\n\n Environment.prototype.hasPartial = function (name, meta) {\n return (0, _emberViews.hasPartial)(name, meta.owner);\n };\n\n Environment.prototype.lookupPartial = function (name, meta) {\n var partial = {\n name: name,\n template: (0, _emberViews.lookupPartial)(name, meta.owner)\n };\n if (partial.template) {\n return partial;\n } else {\n throw new Error(name + ' is not a partial');\n }\n };\n\n Environment.prototype.hasHelper = function (name, _ref6) {\n var owner = _ref6.owner,\n moduleName = _ref6.moduleName;\n\n if (name === 'component' || this.builtInHelpers[name]) {\n return true;\n }\n\n return owner.hasRegistration('helper:' + name, { source: 'template:' + moduleName }) || owner.hasRegistration('helper:' + name);\n };\n\n Environment.prototype.lookupHelper = function (name, meta) {\n if (name === 'component') {\n return function (vm, args) {\n return (0, _component.default)(vm, args, meta);\n };\n }\n var owner = meta.owner,\n moduleName = meta.moduleName;\n\n var helper = this.builtInHelpers[name];\n if (helper) {\n return helper;\n }\n\n var helperFactory = owner.factoryFor('helper:' + name, moduleName && { source: 'template:' + moduleName } || {}) || owner.factoryFor('helper:' + name);\n // TODO: try to unify this into a consistent protocol to avoid wasteful closure allocations\n var HelperReference = void 0;\n if (helperFactory.class.isSimpleHelperFactory) {\n HelperReference = _references.SimpleHelperReference;\n } else if (helperFactory.class.isHelperFactory) {\n HelperReference = _references.ClassBasedHelperReference;\n } else {\n throw new Error(name + ' is not a helper');\n }\n return function (vm, args) {\n return HelperReference.create(helperFactory, vm, args.capture());\n };\n };\n\n Environment.prototype.hasModifier = function (name) {\n return !!this.builtInModifiers[name];\n };\n\n Environment.prototype.lookupModifier = function (name) {\n var modifier = this.builtInModifiers[name];\n if (modifier) {\n return modifier;\n } else {\n throw new Error(name + ' is not a modifier');\n }\n };\n\n Environment.prototype.toConditionalReference = function (reference) {\n return _references.ConditionalReference.create(reference);\n };\n\n Environment.prototype.iterableFor = function (ref, key) {\n return (0, _iterable.default)(ref, key);\n };\n\n Environment.prototype.scheduleInstallModifier = function (modifier, manager) {\n if (this.isInteractive) {\n _GlimmerEnvironment.prototype.scheduleInstallModifier.call(this, modifier, manager);\n }\n };\n\n Environment.prototype.scheduleUpdateModifier = function (modifier, manager) {\n if (this.isInteractive) {\n _GlimmerEnvironment.prototype.scheduleUpdateModifier.call(this, modifier, manager);\n }\n };\n\n Environment.prototype.didDestroy = function (destroyable) {\n destroyable.destroy();\n };\n\n Environment.prototype.begin = function () {\n this.inTransaction = true;\n _GlimmerEnvironment.prototype.begin.call(this);\n };\n\n Environment.prototype.commit = function () {\n var destroyedComponents = this.destroyedComponents,\n i;\n this.destroyedComponents = [];\n // components queued for destruction must be destroyed before firing\n // `didCreate` to prevent errors when removing and adding a component\n // with the same name (would throw an error when added to view registry)\n for (i = 0; i < destroyedComponents.length; i++) {\n destroyedComponents[i].destroy();\n }\n _GlimmerEnvironment.prototype.commit.call(this);\n this.inTransaction = false;\n };\n\n return Environment;\n }(_runtime.Environment);\n\n exports.default = Environment;\n});","enifed('ember-glimmer/helper', ['exports', '@glimmer/reference', 'ember-runtime', 'ember-utils'], function (exports, _reference, _emberRuntime, _emberUtils) {\n 'use strict';\n\n exports.SimpleHelper = exports.RECOMPUTE_TAG = undefined;\n exports.helper =\n\n /**\n In many cases, the ceremony of a full `Helper` class is not required.\n The `helper` method create pure-function helpers without instances. For\n example:\n \n ```app/helpers/format-currency.js\n import { helper } from '@ember/component/helper';\n \n export default helper(function(params, hash) {\n let cents = params[0];\n let currency = hash.currency;\n return `${currency}${cents * 0.01}`;\n });\n ```\n \n @static\n @param {Function} helper The helper function\n @method helper\n @for @ember/component/helper\n @public\n @since 1.13.0\n */\n function (helperFn) {\n return new SimpleHelper(helperFn);\n };\n var RECOMPUTE_TAG = exports.RECOMPUTE_TAG = (0, _emberUtils.symbol)('RECOMPUTE_TAG');\n /**\n Ember Helpers are functions that can compute values, and are used in templates.\n For example, this code calls a helper named `format-currency`:\n \n ```handlebars\n <div>{{format-currency cents currency=\"$\"}}</div>\n ```\n \n Additionally a helper can be called as a nested helper (sometimes called a\n subexpression). In this example, the computed value of a helper is passed\n to a component named `show-money`:\n \n ```handlebars\n {{show-money amount=(format-currency cents currency=\"$\")}}\n ```\n \n Helpers defined using a class must provide a `compute` function. For example:\n \n ```app/helpers/format-currency.js\n import Helper from '@ember/component/helper';\n \n export default Helper.extend({\n compute(params, hash) {\n let cents = params[0];\n let currency = hash.currency;\n return `${currency}${cents * 0.01}`;\n }\n });\n ```\n \n Each time the input to a helper changes, the `compute` function will be\n called again.\n \n As instances, these helpers also have access to the container an will accept\n injected dependencies.\n \n Additionally, class helpers can call `recompute` to force a new computation.\n \n @class Helper\n @public\n @since 1.13.0\n */\n /**\n @module @ember/component\n */\n var Helper = _emberRuntime.FrameworkObject.extend({\n isHelperInstance: true,\n init: function () {\n this._super.apply(this, arguments);\n this[RECOMPUTE_TAG] = new _reference.DirtyableTag();\n },\n recompute: function () {\n this[RECOMPUTE_TAG].dirty();\n }\n });\n Helper.reopenClass({\n isHelperFactory: true\n });\n\n var SimpleHelper = exports.SimpleHelper = function () {\n function SimpleHelper(compute) {\n\n this.compute = compute;\n this.isHelperFactory = true;\n this.isHelperInstance = true;\n this.isSimpleHelperFactory = true;\n }\n\n SimpleHelper.prototype.create = function () {\n return this;\n };\n\n return SimpleHelper;\n }();\n exports.default = Helper;\n});","enifed('ember-glimmer/helpers/-class', ['exports', 'ember-runtime', 'ember-glimmer/utils/references'], function (exports, _emberRuntime, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(classHelper, args.capture());\n };\n\n function classHelper(_ref) {\n var positional = _ref.positional;\n\n var path = positional.at(0);\n var args = positional.length;\n var value = path.value();\n if (value === true) {\n if (args > 1) {\n return _emberRuntime.String.dasherize(positional.at(1).value());\n }\n return null;\n }\n if (value === false) {\n if (args > 2) {\n return _emberRuntime.String.dasherize(positional.at(2).value());\n }\n return null;\n }\n return value;\n }\n});","enifed('ember-glimmer/helpers/-html-safe', ['exports', 'ember-glimmer/utils/references', 'ember-glimmer/utils/string'], function (exports, _references, _string) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(htmlSafe, args.capture());\n };\n\n function htmlSafe(_ref) {\n var positional = _ref.positional;\n\n var path = positional.at(0);\n return new _string.SafeString(path.value());\n }\n});","enifed('ember-glimmer/helpers/-input-type', ['exports', 'ember-glimmer/utils/references'], function (exports, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(inputTypeHelper, args.capture());\n };\n\n function inputTypeHelper(_ref) {\n var positional = _ref.positional;\n\n var type = positional.at(0).value();\n if (type === 'checkbox') {\n return '-checkbox';\n }\n return '-text-field';\n }\n});","enifed('ember-glimmer/helpers/-normalize-class', ['exports', 'ember-runtime', 'ember-glimmer/utils/references'], function (exports, _emberRuntime, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(normalizeClass, args.capture());\n };\n\n function normalizeClass(_ref) {\n var positional = _ref.positional;\n\n var classNameParts = positional.at(0).value().split('.');\n var className = classNameParts[classNameParts.length - 1];\n var value = positional.at(1).value();\n if (value === true) {\n return _emberRuntime.String.dasherize(className);\n } else if (!value && value !== 0) {\n return '';\n } else {\n return String(value);\n }\n }\n});","enifed('ember-glimmer/helpers/action', ['exports', '@glimmer/reference', 'ember-debug', 'ember-metal', 'ember-utils', 'ember-glimmer/utils/references'], function (exports, _reference, _emberDebug, _emberMetal, _emberUtils, _references) {\n 'use strict';\n\n exports.ACTION = exports.INVOKE = undefined;\n\n exports.default = function (_vm, args) {\n var named = args.named,\n positional = args.positional;\n\n var capturedArgs = positional.capture();\n // The first two argument slots are reserved.\n // pos[0] is the context (or `this`)\n // pos[1] is the action name or function\n // Anything else is an action argument.\n\n var _capturedArgs$referen = capturedArgs.references,\n context = _capturedArgs$referen[0],\n action = _capturedArgs$referen[1],\n restArgs = _capturedArgs$referen.slice(2);\n // TODO: Is there a better way of doing this?\n\n\n var debugKey = action._propertyKey;\n var target = named.has('target') ? named.get('target') : context;\n var processArgs = makeArgsProcessor(named.has('value') && named.get('value'), restArgs);\n var fn = void 0;\n if (typeof action[INVOKE] === 'function') {\n fn = makeClosureAction(action, action, action[INVOKE], processArgs, debugKey);\n } else if ((0, _reference.isConst)(target) && (0, _reference.isConst)(action)) {\n fn = makeClosureAction(context.value(), target.value(), action.value(), processArgs, debugKey);\n } else {\n fn = makeDynamicClosureAction(context.value(), target, action, processArgs, debugKey);\n }\n fn[ACTION] = true;\n return new _references.UnboundReference(fn);\n };\n\n var INVOKE = exports.INVOKE = (0, _emberUtils.symbol)('INVOKE'); /**\n @module ember\n */\n var ACTION = exports.ACTION = (0, _emberUtils.symbol)('ACTION');\n /**\n The `{{action}}` helper provides a way to pass triggers for behavior (usually\n just a function) between components, and into components from controllers.\n \n ### Passing functions with the action helper\n \n There are three contexts an action helper can be used in. The first two\n contexts to discuss are attribute context, and Handlebars value context.\n \n ```handlebars\n {{! An example of attribute context }}\n <div onclick={{action \"save\"}}></div>\n {{! Examples of Handlebars value context }}\n {{input on-input=(action \"save\")}}\n {{yield (action \"refreshData\") andAnotherParam}}\n ```\n \n In these contexts,\n the helper is called a \"closure action\" helper. Its behavior is simple:\n If passed a function name, read that function off the `actions` property\n of the current context. Once that function is read (or if a function was\n passed), create a closure over that function and any arguments.\n The resulting value of an action helper used this way is simply a function.\n \n For example, in the attribute context:\n \n ```handlebars\n {{! An example of attribute context }}\n <div onclick={{action \"save\"}}></div>\n ```\n \n The resulting template render logic would be:\n \n ```js\n var div = document.createElement('div');\n var actionFunction = (function(context){\n return function() {\n return context.actions.save.apply(context, arguments);\n };\n })(context);\n div.onclick = actionFunction;\n ```\n \n Thus when the div is clicked, the action on that context is called.\n Because the `actionFunction` is just a function, closure actions can be\n passed between components and still execute in the correct context.\n \n Here is an example action handler on a component:\n \n ```app/components/my-component.js\n import Component from '@ember/component';\n \n export default Component.extend({\n actions: {\n save() {\n this.get('model').save();\n }\n }\n });\n ```\n \n Actions are always looked up on the `actions` property of the current context.\n This avoids collisions in the naming of common actions, such as `destroy`.\n Two options can be passed to the `action` helper when it is used in this way.\n \n * `target=someProperty` will look to `someProperty` instead of the current\n context for the `actions` hash. This can be useful when targeting a\n service for actions.\n * `value=\"target.value\"` will read the path `target.value` off the first\n argument to the action when it is called and rewrite the first argument\n to be that value. This is useful when attaching actions to event listeners.\n \n ### Invoking an action\n \n Closure actions curry both their scope and any arguments. When invoked, any\n additional arguments are added to the already curried list.\n Actions should be invoked using the [sendAction](/api/classes/Ember.Component.html#method_sendAction)\n method. The first argument to `sendAction` is the action to be called, and\n additional arguments are passed to the action function. This has interesting\n properties combined with currying of arguments. For example:\n \n ```app/components/my-component.js\n import Component from '@ember/component';\n \n export default Component.extend({\n actions: {\n // Usage {{input on-input=(action (action 'setName' model) value=\"target.value\")}}\n setName(model, name) {\n model.set('name', name);\n }\n }\n });\n ```\n \n The first argument (`model`) was curried over, and the run-time argument (`event`)\n becomes a second argument. Action calls can be nested this way because each simply\n returns a function. Any function can be passed to the `{{action}}` helper, including\n other actions.\n \n Actions invoked with `sendAction` have the same currying behavior as demonstrated\n with `on-input` above. For example:\n \n ```app/components/my-input.js\n import Component from '@ember/component';\n \n export default Component.extend({\n actions: {\n setName(model, name) {\n model.set('name', name);\n }\n }\n });\n ```\n \n ```handlebars\n {{my-input submit=(action 'setName' model)}}\n ```\n \n ```app/components/my-component.js\n import Component from '@ember/component';\n \n export default Component.extend({\n click() {\n // Note that model is not passed, it was curried in the template\n this.sendAction('submit', 'bob');\n }\n });\n ```\n \n ### Attaching actions to DOM elements\n \n The third context of the `{{action}}` helper can be called \"element space\".\n For example:\n \n ```handlebars\n {{! An example of element space }}\n <div {{action \"save\"}}></div>\n ```\n \n Used this way, the `{{action}}` helper provides a useful shortcut for\n registering an HTML element in a template for a single DOM event and\n forwarding that interaction to the template's context (controller or component).\n If the context of a template is a controller, actions used this way will\n bubble to routes when the controller does not implement the specified action.\n Once an action hits a route, it will bubble through the route hierarchy.\n \n ### Event Propagation\n \n `{{action}}` helpers called in element space can control event bubbling. Note\n that the closure style actions cannot.\n \n Events triggered through the action helper will automatically have\n `.preventDefault()` called on them. You do not need to do so in your event\n handlers. If you need to allow event propagation (to handle file inputs for\n example) you can supply the `preventDefault=false` option to the `{{action}}` helper:\n \n ```handlebars\n <div {{action \"sayHello\" preventDefault=false}}>\n <input type=\"file\" />\n <input type=\"checkbox\" />\n </div>\n ```\n \n To disable bubbling, pass `bubbles=false` to the helper:\n \n ```handlebars\n <button {{action 'edit' post bubbles=false}}>Edit</button>\n ```\n \n To disable bubbling with closure style actions you must create your own\n wrapper helper that makes use of `event.stopPropagation()`:\n \n ```handlebars\n <div onclick={{disable-bubbling (action \"sayHello\")}}>Hello</div>\n ```\n \n ```app/helpers/disable-bubbling.js\n import { helper } from '@ember/component/helper';\n \n export function disableBubbling([action]) {\n return function(event) {\n event.stopPropagation();\n return action(event);\n };\n }\n export default helper(disableBubbling);\n ```\n \n If you need the default handler to trigger you should either register your\n own event handler, or use event methods on your view class. See\n [\"Responding to Browser Events\"](/api/classes/Ember.Component#responding-to-browser-events)\n in the documentation for `Component` for more information.\n \n ### Specifying DOM event type\n \n `{{action}}` helpers called in element space can specify an event type.\n By default the `{{action}}` helper registers for DOM `click` events. You can\n supply an `on` option to the helper to specify a different DOM event name:\n \n ```handlebars\n <div {{action \"anActionName\" on=\"doubleClick\"}}>\n click me\n </div>\n ```\n \n See [\"Event Names\"](/api/classes/Ember.Component#event-names) for a list of\n acceptable DOM event names.\n \n ### Specifying whitelisted modifier keys\n \n `{{action}}` helpers called in element space can specify modifier keys.\n By default the `{{action}}` helper will ignore click events with pressed modifier\n keys. You can supply an `allowedKeys` option to specify which keys should not be ignored.\n \n ```handlebars\n <div {{action \"anActionName\" allowedKeys=\"alt\"}}>\n click me\n </div>\n ```\n \n This way the action will fire when clicking with the alt key pressed down.\n Alternatively, supply \"any\" to the `allowedKeys` option to accept any combination of modifier keys.\n \n ```handlebars\n <div {{action \"anActionName\" allowedKeys=\"any\"}}>\n click me with any key pressed\n </div>\n ```\n \n ### Specifying a Target\n \n A `target` option can be provided to the helper to change\n which object will receive the method call. This option must be a path\n to an object, accessible in the current context:\n \n ```app/templates/application.hbs\n <div {{action \"anActionName\" target=someService}}>\n click me\n </div>\n ```\n \n ```app/controllers/application.js\n import Controller from '@ember/controller';\n import { inject as service } from '@ember/service';\n \n export default Controller.extend({\n someService: service()\n });\n ```\n \n @method action\n @for Ember.Templates.helpers\n @public\n */\n\n function NOOP(args) {\n return args;\n }\n function makeArgsProcessor(valuePathRef, actionArgsRef) {\n var mergeArgs = void 0;\n if (actionArgsRef.length > 0) {\n mergeArgs = function (args) {\n return actionArgsRef.map(function (ref) {\n return ref.value();\n }).concat(args);\n };\n }\n var readValue = void 0;\n if (valuePathRef) {\n readValue = function (args) {\n var valuePath = valuePathRef.value();\n if (valuePath && args.length > 0) {\n args[0] = (0, _emberMetal.get)(args[0], valuePath);\n }\n return args;\n };\n }\n if (mergeArgs && readValue) {\n return function (args) {\n return readValue(mergeArgs(args));\n };\n } else {\n return mergeArgs || readValue || NOOP;\n }\n }\n function makeDynamicClosureAction(context, targetRef, actionRef, processArgs, debugKey) {\n return function () {\n return makeClosureAction(context, targetRef.value(), actionRef.value(), processArgs, debugKey).apply(undefined, arguments);\n };\n }\n function makeClosureAction(context, target, action, processArgs, debugKey) {\n var self = void 0,\n typeofAction;\n var fn = void 0;\n false && !!(0, _emberMetal.isNone)(action) && (0, _emberDebug.assert)('Action passed is null or undefined in (action) from ' + target + '.', !(0, _emberMetal.isNone)(action));\n\n if (typeof action[INVOKE] === 'function') {\n self = action;\n fn = action[INVOKE];\n } else {\n typeofAction = typeof action;\n\n if (typeofAction === 'string') {\n self = target;\n fn = target.actions && target.actions[action];\n false && !fn && (0, _emberDebug.assert)('An action named \\'' + action + '\\' was not found in ' + target, fn);\n } else if (typeofAction === 'function') {\n self = context;\n fn = action;\n } else {\n false && !false && (0, _emberDebug.assert)('An action could not be made for `' + (debugKey || action) + '` in ' + target + '. Please confirm that you are using either a quoted action name (i.e. `(action \\'' + (debugKey || 'myAction') + '\\')`) or a function available in ' + target + '.', false);\n }\n }\n return function () {\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var payload = { target: self, args: args, label: '@glimmer/closure-action' },\n _len,\n args,\n _key;\n return (0, _emberMetal.flaggedInstrument)('interaction.ember-action', payload, function () {\n return _emberMetal.run.join.apply(_emberMetal.run, [self, fn].concat(processArgs(args)));\n });\n };\n }\n});","enifed('ember-glimmer/helpers/component', ['exports', 'ember-babel', '@glimmer/runtime', 'ember-debug', 'ember-utils', 'ember-glimmer/component-managers/curly', 'ember-glimmer/utils/references'], function (exports, _emberBabel, _runtime, _emberDebug, _emberUtils, _curly, _references) {\n 'use strict';\n\n exports.ClosureComponentReference = undefined;\n\n exports.default = function (vm, args, meta) {\n return ClosureComponentReference.create(args.capture(), meta, vm.env);\n };\n\n var ClosureComponentReference = exports.ClosureComponentReference = function (_CachedReference) {\n (0, _emberBabel.inherits)(ClosureComponentReference, _CachedReference);\n\n ClosureComponentReference.create = function (args, meta, env) {\n return new ClosureComponentReference(args, meta, env);\n };\n\n function ClosureComponentReference(args, meta, env) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference.call(this));\n\n var firstArg = args.positional.at(0);\n _this.defRef = firstArg;\n _this.tag = firstArg.tag;\n _this.args = args;\n _this.meta = meta;\n _this.env = env;\n _this.lastDefinition = undefined;\n _this.lastName = undefined;\n return _this;\n }\n\n ClosureComponentReference.prototype.compute = function () {\n // TODO: Figure out how to extract this because it's nearly identical to\n // DynamicComponentReference::compute(). The only differences besides\n // currying are in the assertion messages.\n var args = this.args,\n defRef = this.defRef,\n env = this.env,\n meta = this.meta,\n lastDefinition = this.lastDefinition,\n lastName = this.lastName;\n\n var nameOrDef = defRef.value();\n var definition = void 0;\n if (nameOrDef && nameOrDef === lastName) {\n return lastDefinition;\n }\n this.lastName = nameOrDef;\n if (typeof nameOrDef === 'string') {\n // tslint:disable-next-line:max-line-length\n false && !(nameOrDef !== 'input') && (0, _emberDebug.assert)('You cannot use the input helper as a contextual helper. Please extend TextField or Checkbox to use it as a contextual component.', nameOrDef !== 'input');\n // tslint:disable-next-line:max-line-length\n\n false && !(nameOrDef !== 'textarea') && (0, _emberDebug.assert)('You cannot use the textarea helper as a contextual helper. Please extend TextArea to use it as a contextual component.', nameOrDef !== 'textarea');\n\n definition = env.getComponentDefinition(nameOrDef, meta);\n // tslint:disable-next-line:max-line-length\n false && !!!definition && (0, _emberDebug.assert)('The component helper cannot be used without a valid component name. You used \"' + nameOrDef + '\" via (component \"' + nameOrDef + '\")', !!definition);\n } else if ((0, _runtime.isComponentDefinition)(nameOrDef)) {\n definition = nameOrDef;\n } else {\n false && !nameOrDef && (0, _emberDebug.assert)('You cannot create a component from ' + nameOrDef + ' using the {{component}} helper', nameOrDef);\n\n return null;\n }\n var newDef = createCurriedDefinition(definition, args);\n this.lastDefinition = newDef;\n return newDef;\n };\n\n return ClosureComponentReference;\n }(_references.CachedReference);\n\n function createCurriedDefinition(definition, args) {\n var curriedArgs = curryArgs(definition, args);\n return new _curly.CurlyComponentDefinition(definition.name, definition.ComponentClass, definition.template, curriedArgs);\n }\n function curryArgs(definition, newArgs) {\n var args = definition.args,\n ComponentClass = definition.ComponentClass,\n limit,\n i,\n name;\n\n var positionalParams = ComponentClass.class.positionalParams;\n // The args being passed in are from the (component ...) invocation,\n // so the first positional argument is actually the name or component\n // definition. It needs to be dropped in order for any actual positional\n // args to coincide with the ComponentClass's positionParams.\n // For \"normal\" curly components this slicing is done at the syntax layer,\n // but we don't have that luxury here.\n\n var _newArgs$positional$r = newArgs.positional.references,\n slicedPositionalArgs = _newArgs$positional$r.slice(1);\n\n if (positionalParams && slicedPositionalArgs.length) {\n (0, _curly.validatePositionalParameters)(newArgs.named, slicedPositionalArgs, positionalParams);\n }\n\n // For non-rest position params, we need to perform the position -> name mapping\n // at each layer to avoid a collision later when the args are used to construct\n // the component instance (inside of processArgs(), inside of create()).\n var positionalToNamedParams = {};\n if (!(typeof positionalParams === 'string') && positionalParams.length > 0) {\n limit = Math.min(positionalParams.length, slicedPositionalArgs.length);\n\n for (i = 0; i < limit; i++) {\n name = positionalParams[i];\n\n positionalToNamedParams[name] = slicedPositionalArgs[i];\n }\n slicedPositionalArgs.length = 0; // Throw them away since you're merged in.\n }\n // args (aka 'oldArgs') may be undefined or simply be empty args, so\n // we need to fall back to an empty array or object.\n var oldNamed = args && args.named || {};\n var oldPositional = args && args.positional || [];\n // Merge positional arrays\n var positional = new Array(Math.max(oldPositional.length, slicedPositionalArgs.length));\n positional.splice.apply(positional, [0, oldPositional.length].concat(oldPositional));\n positional.splice.apply(positional, [0, slicedPositionalArgs.length].concat(slicedPositionalArgs));\n // Merge named maps\n var named = (0, _emberUtils.assign)({}, oldNamed, positionalToNamedParams, newArgs.named.map);\n return { positional: positional, named: named };\n }\n});","enifed('ember-glimmer/helpers/concat', ['exports', '@glimmer/runtime', 'ember-glimmer/utils/references'], function (exports, _runtime, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(concat, args.capture());\n };\n\n /**\n @module ember\n */\n /**\n Concatenates the given arguments into a string.\n \n Example:\n \n ```handlebars\n {{some-component name=(concat firstName \" \" lastName)}}\n \n {{! would pass name=\"<first name value> <last name value>\" to the component}}\n ```\n \n @public\n @method concat\n @for Ember.Templates.helpers\n @since 1.13.0\n */\n function concat(_ref) {\n var positional = _ref.positional;\n\n return positional.value().map(_runtime.normalizeTextValue).join('');\n }\n});","enifed('ember-glimmer/helpers/each-in', ['exports', 'ember-utils'], function (exports, _emberUtils) {\n 'use strict';\n\n exports.isEachIn = function (ref) {\n return ref && ref[EACH_IN_REFERENCE];\n };\n\n exports.default = function (_vm, args) {\n var ref = Object.create(args.positional.at(0));\n ref[EACH_IN_REFERENCE] = true;\n return ref;\n };\n\n /**\n The `{{#each}}` helper loops over elements in a collection. It is an extension\n of the base Handlebars `{{#each}}` helper.\n The default behavior of `{{#each}}` is to yield its inner block once for every\n item in an array passing the item as the first block parameter.\n \n ```javascript\n var developers = [{ name: 'Yehuda' },{ name: 'Tom' }, { name: 'Paul' }];\n ```\n \n ```handlebars\n {{#each developers key=\"name\" as |person|}}\n {{person.name}}\n {{! `this` is whatever it was outside the #each }}\n {{/each}}\n ```\n \n The same rules apply to arrays of primitives.\n \n ```javascript\n var developerNames = ['Yehuda', 'Tom', 'Paul']\n ```\n \n ```handlebars\n {{#each developerNames key=\"@index\" as |name|}}\n {{name}}\n {{/each}}\n ```\n \n During iteration, the index of each item in the array is provided as a second block parameter.\n \n ```handlebars\n <ul>\n {{#each people as |person index|}}\n <li>Hello, {{person.name}}! You're number {{index}} in line</li>\n {{/each}}\n </ul>\n ```\n \n ### Specifying Keys\n \n The `key` option is used to tell Ember how to determine if the array being\n iterated over with `{{#each}}` has changed between renders. By helping Ember\n detect that some elements in the array are the same, DOM elements can be\n re-used, significantly improving rendering speed.\n \n For example, here's the `{{#each}}` helper with its `key` set to `id`:\n \n ```handlebars\n {{#each model key=\"id\" as |item|}}\n {{/each}}\n ```\n \n When this `{{#each}}` re-renders, Ember will match up the previously rendered\n items (and reorder the generated DOM elements) based on each item's `id`\n property.\n By default the item's own reference is used.\n \n ### {{else}} condition\n \n `{{#each}}` can have a matching `{{else}}`. The contents of this block will render\n if the collection is empty.\n \n ```handlebars\n {{#each developers as |person|}}\n {{person.name}}\n {{else}}\n <p>Sorry, nobody is available for this task.</p>\n {{/each}}\n ```\n \n @method each\n @for Ember.Templates.helpers\n @public\n */\n /**\n The `{{each-in}}` helper loops over properties on an object.\n \n For example, given a `user` object that looks like:\n \n ```javascript\n {\n \"name\": \"Shelly Sails\",\n \"age\": 42\n }\n ```\n \n This template would display all properties on the `user`\n object in a list:\n \n ```handlebars\n <ul>\n {{#each-in user as |key value|}}\n <li>{{key}}: {{value}}</li>\n {{/each-in}}\n </ul>\n ```\n \n Outputting their name and age.\n \n @method each-in\n @for Ember.Templates.helpers\n @public\n @since 2.1.0\n */\n var EACH_IN_REFERENCE = (0, _emberUtils.symbol)('EACH_IN');\n});","enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', '@glimmer/reference', '@glimmer/runtime', 'ember-metal', 'ember-glimmer/utils/references'], function (exports, _emberBabel, _reference, _runtime, _emberMetal, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return GetHelperReference.create(args.positional.at(0), args.positional.at(1));\n };\n\n var GetHelperReference = function (_CachedReference) {\n (0, _emberBabel.inherits)(GetHelperReference, _CachedReference);\n\n GetHelperReference.create = function (sourceReference, pathReference) {\n var parts;\n\n if ((0, _reference.isConst)(pathReference)) {\n parts = pathReference.value().split('.');\n\n return (0, _reference.referenceFromParts)(sourceReference, parts);\n } else {\n return new GetHelperReference(sourceReference, pathReference);\n }\n };\n\n function GetHelperReference(sourceReference, pathReference) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference.call(this));\n\n _this.sourceReference = sourceReference;\n _this.pathReference = pathReference;\n _this.lastPath = null;\n _this.innerReference = _runtime.NULL_REFERENCE;\n var innerTag = _this.innerTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n _this.tag = (0, _reference.combine)([sourceReference.tag, pathReference.tag, innerTag]);\n return _this;\n }\n\n GetHelperReference.prototype.compute = function () {\n var lastPath = this.lastPath,\n innerReference = this.innerReference,\n innerTag = this.innerTag,\n pathType;\n\n var path = this.lastPath = this.pathReference.value();\n if (path !== lastPath) {\n if (path !== undefined && path !== null && path !== '') {\n pathType = typeof path;\n\n if (pathType === 'string') {\n innerReference = (0, _reference.referenceFromParts)(this.sourceReference, path.split('.'));\n } else if (pathType === 'number') {\n innerReference = this.sourceReference.get('' + path);\n }\n innerTag.inner.update(innerReference.tag);\n } else {\n innerReference = _runtime.NULL_REFERENCE;\n innerTag.inner.update(_reference.CONSTANT_TAG);\n }\n this.innerReference = innerReference;\n }\n return innerReference.value();\n };\n\n GetHelperReference.prototype[_references.UPDATE] = function (value) {\n (0, _emberMetal.set)(this.sourceReference.value(), this.pathReference.value(), value);\n };\n\n return GetHelperReference;\n }(_references.CachedReference);\n});","enifed(\"ember-glimmer/helpers/hash\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.default = function (_vm, args) {\n return args.named.capture();\n };\n});","enifed('ember-glimmer/helpers/if-unless', ['exports', 'ember-babel', '@glimmer/reference', 'ember-debug', 'ember-glimmer/utils/references'], function (exports, _emberBabel, _reference, _emberDebug, _references) {\n 'use strict';\n\n exports.inlineIf =\n\n /**\n The `if` helper allows you to conditionally render one of two branches,\n depending on the \"truthiness\" of a property.\n For example the following values are all falsey: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n \n This helper has two forms, block and inline.\n \n ## Block form\n \n You can use the block form of `if` to conditionally render a section of the template.\n \n To use it, pass the conditional value to the `if` helper,\n using the block form to wrap the section of template you want to conditionally render.\n Like so:\n \n ```handlebars\n {{! will not render if foo is falsey}}\n {{#if foo}}\n Welcome to the {{foo.bar}}\n {{/if}}\n ```\n \n You can also specify a template to show if the property is falsey by using\n the `else` helper.\n \n ```handlebars\n {{! is it raining outside?}}\n {{#if isRaining}}\n Yes, grab an umbrella!\n {{else}}\n No, it's lovely outside!\n {{/if}}\n ```\n \n You are also able to combine `else` and `if` helpers to create more complex\n conditional logic.\n \n ```handlebars\n {{#if isMorning}}\n Good morning\n {{else if isAfternoon}}\n Good afternoon\n {{else}}\n Good night\n {{/if}}\n ```\n \n ## Inline form\n \n The inline `if` helper conditionally renders a single property or string.\n \n In this form, the `if` helper receives three arguments, the conditional value,\n the value to render when truthy, and the value to render when falsey.\n \n For example, if `useLongGreeting` is truthy, the following:\n \n ```handlebars\n {{if useLongGreeting \"Hello\" \"Hi\"}} Alex\n ```\n \n Will render:\n \n ```html\n Hello Alex\n ```\n \n ### Nested `if`\n \n You can use the `if` helper inside another helper as a nested helper:\n \n ```handlebars\n {{some-component height=(if isBig \"100\" \"10\")}}\n ```\n \n One detail to keep in mind is that both branches of the `if` helper will be evaluated,\n so if you have `{{if condition \"foo\" (expensive-operation \"bar\")`,\n `expensive-operation` will always calculate.\n \n @method if\n @for Ember.Templates.helpers\n @public\n */\n function (_vm, _ref) {\n var positional = _ref.positional;\n false && !(positional.length === 3 || positional.length === 2) && (0, _emberDebug.assert)('The inline form of the `if` helper expects two or three arguments, e.g. ' + '`{{if trialExpired \"Expired\" expiryDate}}`.', positional.length === 3 || positional.length === 2);\n\n return ConditionalHelperReference.create(positional.at(0), positional.at(1), positional.at(2));\n }\n /**\n The inline `unless` helper conditionally renders a single property or string.\n This helper acts like a ternary operator. If the first property is falsy,\n the second argument will be displayed, otherwise, the third argument will be\n displayed\n \n ```handlebars\n {{unless useLongGreeting \"Hi\" \"Hello\"}} Ben\n ```\n \n You can use the `unless` helper inside another helper as a subexpression.\n \n ```handlebars\n {{some-component height=(unless isBig \"10\" \"100\")}}\n ```\n \n @method unless\n @for Ember.Templates.helpers\n @public\n */\n ;\n exports.inlineUnless = function (_vm, _ref2) {\n var positional = _ref2.positional;\n false && !(positional.length === 3 || positional.length === 2) && (0, _emberDebug.assert)('The inline form of the `unless` helper expects two or three arguments, e.g. ' + '`{{unless isFirstLogin \"Welcome back!\"}}`.', positional.length === 3 || positional.length === 2);\n\n return ConditionalHelperReference.create(positional.at(0), positional.at(2), positional.at(1));\n };\n\n var ConditionalHelperReference = function (_CachedReference) {\n (0, _emberBabel.inherits)(ConditionalHelperReference, _CachedReference);\n\n ConditionalHelperReference.create = function (_condRef, truthyRef, falsyRef) {\n var condRef = _references.ConditionalReference.create(_condRef);\n if ((0, _reference.isConst)(condRef)) {\n return condRef.value() ? truthyRef : falsyRef;\n } else {\n return new ConditionalHelperReference(condRef, truthyRef, falsyRef);\n }\n };\n\n function ConditionalHelperReference(cond, truthy, falsy) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference.call(this));\n\n _this.branchTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n _this.tag = (0, _reference.combine)([cond.tag, _this.branchTag]);\n _this.cond = cond;\n _this.truthy = truthy;\n _this.falsy = falsy;\n return _this;\n }\n\n ConditionalHelperReference.prototype.compute = function () {\n var branch = this.cond.value() ? this.truthy : this.falsy;\n this.branchTag.inner.update(branch.tag);\n return branch.value();\n };\n\n return ConditionalHelperReference;\n }(_references.CachedReference);\n});","enifed('ember-glimmer/helpers/loc', ['exports', 'ember-glimmer/helper', 'ember-runtime'], function (exports, _helper, _emberRuntime) {\n 'use strict';\n\n exports.default = (0, _helper.helper)(function (params) {\n return _emberRuntime.String.loc.apply(null, params);\n });\n});","enifed('ember-glimmer/helpers/log', ['exports', 'ember-glimmer/utils/references', 'ember-console'], function (exports, _references, _emberConsole) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(log, args.capture());\n };\n\n /**\n `log` allows you to output the value of variables in the current rendering\n context. `log` also accepts primitive types such as strings or numbers.\n \n ```handlebars\n {{log \"myVariable:\" myVariable }}\n ```\n \n @method log\n @for Ember.Templates.helpers\n @param {Array} params\n @public\n */\n function log(_ref) {\n var positional = _ref.positional;\n\n _emberConsole.default.log.apply(null, positional.value());\n }\n /**\n @module ember\n */\n});","enifed('ember-glimmer/helpers/mut', ['exports', 'ember-debug', 'ember-utils', 'ember-glimmer/utils/references', 'ember-glimmer/helpers/action'], function (exports, _emberDebug, _emberUtils, _references, _action) {\n 'use strict';\n\n exports.isMut = isMut;\n exports.unMut = function (ref) {\n return ref[SOURCE] || ref;\n };\n\n exports.default = function (_vm, args) {\n var rawRef = args.positional.at(0);\n if (isMut(rawRef)) {\n return rawRef;\n }\n // TODO: Improve this error message. This covers at least two distinct\n // cases:\n //\n // 1. (mut \"not a path\") – passing a literal, result from a helper\n // invocation, etc\n //\n // 2. (mut receivedValue) – passing a value received from the caller\n // that was originally derived from a literal, result from a helper\n // invocation, etc\n //\n // This message is alright for the first case, but could be quite\n // confusing for the second case.\n false && !rawRef[_references.UPDATE] && (0, _emberDebug.assert)('You can only pass a path to mut', rawRef[_references.UPDATE]);\n\n var wrappedRef = Object.create(rawRef);\n wrappedRef[SOURCE] = rawRef;\n wrappedRef[_action.INVOKE] = rawRef[_references.UPDATE];\n wrappedRef[MUT_REFERENCE] = true;\n return wrappedRef;\n };\n\n /**\n The `mut` helper lets you __clearly specify__ that a child `Component` can update the\n (mutable) value passed to it, which will __change the value of the parent component__.\n \n To specify that a parameter is mutable, when invoking the child `Component`:\n \n ```handlebars\n {{my-child childClickCount=(mut totalClicks)}}\n ```\n \n The child `Component` can then modify the parent's value just by modifying its own\n property:\n \n ```javascript\n // my-child.js\n export default Component.extend({\n click() {\n this.incrementProperty('childClickCount');\n }\n });\n ```\n \n Note that for curly components (`{{my-component}}`) the bindings are already mutable,\n making the `mut` unnecessary.\n \n Additionally, the `mut` helper can be combined with the `action` helper to\n mutate a value. For example:\n \n ```handlebars\n {{my-child childClickCount=totalClicks click-count-change=(action (mut totalClicks))}}\n ```\n \n The child `Component` would invoke the action with the new click value:\n \n ```javascript\n // my-child.js\n export default Component.extend({\n click() {\n this.get('click-count-change')(this.get('childClickCount') + 1);\n }\n });\n ```\n \n The `mut` helper changes the `totalClicks` value to what was provided as the action argument.\n \n The `mut` helper, when used with `action`, will return a function that\n sets the value passed to `mut` to its first argument. This works like any other\n closure action and interacts with the other features `action` provides.\n As an example, we can create a button that increments a value passing the value\n directly to the `action`:\n \n ```handlebars\n {{! inc helper is not provided by Ember }}\n <button onclick={{action (mut count) (inc count)}}>\n Increment count\n </button>\n ```\n \n You can also use the `value` option:\n \n ```handlebars\n <input value={{name}} oninput={{action (mut name) value=\"target.value\"}}>\n ```\n \n @method mut\n @param {Object} [attr] the \"two-way\" attribute that can be modified.\n @for Ember.Templates.helpers\n @public\n */\n var MUT_REFERENCE = (0, _emberUtils.symbol)('MUT');\n var SOURCE = (0, _emberUtils.symbol)('SOURCE');\n function isMut(ref) {\n return ref && ref[MUT_REFERENCE];\n }\n});","enifed('ember-glimmer/helpers/query-param', ['exports', 'ember-debug', 'ember-routing', 'ember-utils', 'ember-glimmer/utils/references'], function (exports, _emberDebug, _emberRouting, _emberUtils, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n return new _references.InternalHelperReference(queryParams, args.capture());\n };\n\n /**\n This is a helper to be used in conjunction with the link-to helper.\n It will supply url query parameters to the target route.\n \n Example\n \n ```handlebars\n {{#link-to 'posts' (query-params direction=\"asc\")}}Sort{{/link-to}}\n ```\n \n @method query-params\n @for Ember.Templates.helpers\n @param {Object} hash takes a hash of query parameters\n @return {Object} A `QueryParams` object for `{{link-to}}`\n @public\n */\n function queryParams(_ref) {\n var positional = _ref.positional,\n named = _ref.named;\n false && !(positional.value().length === 0) && (0, _emberDebug.assert)('The `query-params` helper only accepts hash parameters, e.g. (query-params queryParamPropertyName=\\'foo\\') as opposed to just (query-params \\'foo\\')', positional.value().length === 0);\n\n return _emberRouting.QueryParams.create({\n values: (0, _emberUtils.assign)({}, named.value())\n });\n }\n});","enifed('ember-glimmer/helpers/readonly', ['exports', 'ember-glimmer/utils/references', 'ember-glimmer/helpers/mut'], function (exports, _references, _mut) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n var ref = (0, _mut.unMut)(args.positional.at(0));\n var wrapped = Object.create(ref);\n wrapped[_references.UPDATE] = undefined;\n return wrapped;\n };\n});","enifed('ember-glimmer/helpers/unbound', ['exports', 'ember-debug', 'ember-glimmer/utils/references'], function (exports, _emberDebug, _references) {\n 'use strict';\n\n exports.default = function (_vm, args) {\n false && !(args.positional.length === 1 && args.named.length === 0) && (0, _emberDebug.assert)('unbound helper cannot be called with multiple params or hash params', args.positional.length === 1 && args.named.length === 0);\n\n return _references.UnboundReference.create(args.positional.at(0).value());\n };\n});","enifed('ember-glimmer/index', ['exports', 'ember-glimmer/helpers/action', 'ember-glimmer/templates/root', 'ember-glimmer/template', 'ember-glimmer/components/checkbox', 'ember-glimmer/components/text_field', 'ember-glimmer/components/text_area', 'ember-glimmer/components/link-to', 'ember-glimmer/component', 'ember-glimmer/helper', 'ember-glimmer/environment', 'ember-glimmer/utils/string', 'ember-glimmer/renderer', 'ember-glimmer/template_registry', 'ember-glimmer/setup-registry', 'ember-glimmer/dom', 'ember-glimmer/syntax', 'ember-glimmer/component-managers/abstract'], function (exports, _action, _root, _template, _checkbox, _text_field, _text_area, _linkTo, _component, _helper, _environment, _string, _renderer, _template_registry, _setupRegistry, _dom, _syntax, _abstract) {\n 'use strict';\n\n Object.defineProperty(exports, 'INVOKE', {\n enumerable: true,\n get: function () {\n return _action.INVOKE;\n }\n });\n Object.defineProperty(exports, 'RootTemplate', {\n enumerable: true,\n get: function () {\n return _root.default;\n }\n });\n Object.defineProperty(exports, 'template', {\n enumerable: true,\n get: function () {\n return _template.default;\n }\n });\n Object.defineProperty(exports, 'Checkbox', {\n enumerable: true,\n get: function () {\n return _checkbox.default;\n }\n });\n Object.defineProperty(exports, 'TextField', {\n enumerable: true,\n get: function () {\n return _text_field.default;\n }\n });\n Object.defineProperty(exports, 'TextArea', {\n enumerable: true,\n get: function () {\n return _text_area.default;\n }\n });\n Object.defineProperty(exports, 'LinkComponent', {\n enumerable: true,\n get: function () {\n return _linkTo.default;\n }\n });\n Object.defineProperty(exports, 'Component', {\n enumerable: true,\n get: function () {\n return _component.default;\n }\n });\n Object.defineProperty(exports, 'Helper', {\n enumerable: true,\n get: function () {\n return _helper.default;\n }\n });\n Object.defineProperty(exports, 'helper', {\n enumerable: true,\n get: function () {\n return _helper.helper;\n }\n });\n Object.defineProperty(exports, 'Environment', {\n enumerable: true,\n get: function () {\n return _environment.default;\n }\n });\n Object.defineProperty(exports, 'SafeString', {\n enumerable: true,\n get: function () {\n return _string.SafeString;\n }\n });\n Object.defineProperty(exports, 'escapeExpression', {\n enumerable: true,\n get: function () {\n return _string.escapeExpression;\n }\n });\n Object.defineProperty(exports, 'htmlSafe', {\n enumerable: true,\n get: function () {\n return _string.htmlSafe;\n }\n });\n Object.defineProperty(exports, 'isHTMLSafe', {\n enumerable: true,\n get: function () {\n return _string.isHTMLSafe;\n }\n });\n Object.defineProperty(exports, '_getSafeString', {\n enumerable: true,\n get: function () {\n return _string.getSafeString;\n }\n });\n Object.defineProperty(exports, 'Renderer', {\n enumerable: true,\n get: function () {\n return _renderer.Renderer;\n }\n });\n Object.defineProperty(exports, 'InertRenderer', {\n enumerable: true,\n get: function () {\n return _renderer.InertRenderer;\n }\n });\n Object.defineProperty(exports, 'InteractiveRenderer', {\n enumerable: true,\n get: function () {\n return _renderer.InteractiveRenderer;\n }\n });\n Object.defineProperty(exports, '_resetRenderers', {\n enumerable: true,\n get: function () {\n return _renderer._resetRenderers;\n }\n });\n Object.defineProperty(exports, 'getTemplate', {\n enumerable: true,\n get: function () {\n return _template_registry.getTemplate;\n }\n });\n Object.defineProperty(exports, 'setTemplate', {\n enumerable: true,\n get: function () {\n return _template_registry.setTemplate;\n }\n });\n Object.defineProperty(exports, 'hasTemplate', {\n enumerable: true,\n get: function () {\n return _template_registry.hasTemplate;\n }\n });\n Object.defineProperty(exports, 'getTemplates', {\n enumerable: true,\n get: function () {\n return _template_registry.getTemplates;\n }\n });\n Object.defineProperty(exports, 'setTemplates', {\n enumerable: true,\n get: function () {\n return _template_registry.setTemplates;\n }\n });\n Object.defineProperty(exports, 'setupEngineRegistry', {\n enumerable: true,\n get: function () {\n return _setupRegistry.setupEngineRegistry;\n }\n });\n Object.defineProperty(exports, 'setupApplicationRegistry', {\n enumerable: true,\n get: function () {\n return _setupRegistry.setupApplicationRegistry;\n }\n });\n Object.defineProperty(exports, 'DOMChanges', {\n enumerable: true,\n get: function () {\n return _dom.DOMChanges;\n }\n });\n Object.defineProperty(exports, 'NodeDOMTreeConstruction', {\n enumerable: true,\n get: function () {\n return _dom.NodeDOMTreeConstruction;\n }\n });\n Object.defineProperty(exports, 'DOMTreeConstruction', {\n enumerable: true,\n get: function () {\n return _dom.DOMTreeConstruction;\n }\n });\n Object.defineProperty(exports, '_registerMacros', {\n enumerable: true,\n get: function () {\n return _syntax.registerMacros;\n }\n });\n Object.defineProperty(exports, '_experimentalMacros', {\n enumerable: true,\n get: function () {\n return _syntax.experimentalMacros;\n }\n });\n Object.defineProperty(exports, 'AbstractComponentManager', {\n enumerable: true,\n get: function () {\n return _abstract.default;\n }\n });\n});","enifed('ember-glimmer/modifiers/action', ['exports', 'ember-debug', 'ember-metal', 'ember-utils', 'ember-views', 'ember-glimmer/helpers/action'], function (exports, _emberDebug, _emberMetal, _emberUtils, _emberViews, _action) {\n 'use strict';\n\n exports.ActionState = exports.ActionHelper = undefined;\n\n var MODIFIERS = ['alt', 'shift', 'meta', 'ctrl'];\n var POINTER_EVENT_TYPE_REGEX = /^click|mouse|touch/;\n function isAllowedEvent(event, allowedKeys) {\n var i;\n\n if (allowedKeys === null || allowedKeys === undefined) {\n if (POINTER_EVENT_TYPE_REGEX.test(event.type)) {\n return (0, _emberViews.isSimpleClick)(event);\n } else {\n allowedKeys = '';\n }\n }\n if (allowedKeys.indexOf('any') >= 0) {\n return true;\n }\n for (i = 0; i < MODIFIERS.length; i++) {\n if (event[MODIFIERS[i] + 'Key'] && allowedKeys.indexOf(MODIFIERS[i]) === -1) {\n return false;\n }\n }\n return true;\n }\n var ActionHelper = exports.ActionHelper = {\n // registeredActions is re-exported for compatibility with older plugins\n // that were using this undocumented API.\n registeredActions: _emberViews.ActionManager.registeredActions,\n registerAction: function (actionState) {\n var actionId = actionState.actionId;\n\n _emberViews.ActionManager.registeredActions[actionId] = actionState;\n return actionId;\n },\n unregisterAction: function (actionState) {\n var actionId = actionState.actionId;\n\n delete _emberViews.ActionManager.registeredActions[actionId];\n }\n };\n\n var ActionState = exports.ActionState = function () {\n function ActionState(element, actionId, actionName, actionArgs, namedArgs, positionalArgs, implicitTarget, dom) {\n\n this.element = element;\n this.actionId = actionId;\n this.actionName = actionName;\n this.actionArgs = actionArgs;\n this.namedArgs = namedArgs;\n this.positional = positionalArgs;\n this.implicitTarget = implicitTarget;\n this.dom = dom;\n this.eventName = this.getEventName();\n }\n\n ActionState.prototype.getEventName = function () {\n return this.namedArgs.get('on').value() || 'click';\n };\n\n ActionState.prototype.getActionArgs = function () {\n var result = new Array(this.actionArgs.length),\n i;\n for (i = 0; i < this.actionArgs.length; i++) {\n result[i] = this.actionArgs[i].value();\n }\n return result;\n };\n\n ActionState.prototype.getTarget = function () {\n var implicitTarget = this.implicitTarget,\n namedArgs = this.namedArgs;\n\n var target = void 0;\n if (namedArgs.has('target')) {\n target = namedArgs.get('target').value();\n } else {\n target = implicitTarget.value();\n }\n return target;\n };\n\n ActionState.prototype.handler = function (event) {\n var _this = this;\n\n var actionName = this.actionName,\n namedArgs = this.namedArgs;\n\n var bubbles = namedArgs.get('bubbles');\n var preventDefault = namedArgs.get('preventDefault');\n var allowedKeys = namedArgs.get('allowedKeys');\n var target = this.getTarget();\n if (!isAllowedEvent(event, allowedKeys.value())) {\n return true;\n }\n if (preventDefault.value() !== false) {\n event.preventDefault();\n }\n if (bubbles.value() === false) {\n event.stopPropagation();\n }\n (0, _emberMetal.run)(function () {\n var args = _this.getActionArgs();\n var payload = {\n args: args,\n target: target,\n name: null\n };\n if (typeof actionName[_action.INVOKE] === 'function') {\n (0, _emberMetal.flaggedInstrument)('interaction.ember-action', payload, function () {\n actionName[_action.INVOKE].apply(actionName, args);\n });\n return;\n }\n if (typeof actionName === 'function') {\n (0, _emberMetal.flaggedInstrument)('interaction.ember-action', payload, function () {\n actionName.apply(target, args);\n });\n return;\n }\n payload.name = actionName;\n if (target.send) {\n (0, _emberMetal.flaggedInstrument)('interaction.ember-action', payload, function () {\n target.send.apply(target, [actionName].concat(args));\n });\n } else {\n false && !(typeof target[actionName] === 'function') && (0, _emberDebug.assert)('The action \\'' + actionName + '\\' did not exist on ' + target, typeof target[actionName] === 'function');\n\n (0, _emberMetal.flaggedInstrument)('interaction.ember-action', payload, function () {\n target[actionName].apply(target, args);\n });\n }\n });\n return false;\n };\n\n ActionState.prototype.destroy = function () {\n ActionHelper.unregisterAction(this);\n };\n\n return ActionState;\n }();\n\n var ActionModifierManager = function () {\n function ActionModifierManager() {}\n\n ActionModifierManager.prototype.create = function (element, args, _dynamicScope, dom) {\n var _args$capture = args.capture(),\n named = _args$capture.named,\n positional = _args$capture.positional,\n actionLabel,\n i;\n\n var implicitTarget = void 0;\n var actionName = void 0;\n var actionNameRef = void 0;\n if (positional.length > 1) {\n implicitTarget = positional.at(0);\n actionNameRef = positional.at(1);\n if (actionNameRef[_action.INVOKE]) {\n actionName = actionNameRef;\n } else {\n actionLabel = actionNameRef._propertyKey;\n\n actionName = actionNameRef.value();\n false && !(typeof actionName === 'string' || typeof actionName === 'function') && (0, _emberDebug.assert)('You specified a quoteless path, `' + actionLabel + '`, to the ' + '{{action}} helper which did not resolve to an action name (a ' + 'string). Perhaps you meant to use a quoted actionName? (e.g. ' + '{{action \"' + actionLabel + '\"}}).', typeof actionName === 'string' || typeof actionName === 'function');\n }\n }\n var actionArgs = [];\n // The first two arguments are (1) `this` and (2) the action name.\n // Everything else is a param.\n for (i = 2; i < positional.length; i++) {\n actionArgs.push(positional.at(i));\n }\n var actionId = (0, _emberUtils.uuid)();\n return new ActionState(element, actionId, actionName, actionArgs, named, positional, implicitTarget, dom);\n };\n\n ActionModifierManager.prototype.install = function (actionState) {\n var dom = actionState.dom,\n element = actionState.element,\n actionId = actionState.actionId;\n\n ActionHelper.registerAction(actionState);\n dom.setAttribute(element, 'data-ember-action', '');\n dom.setAttribute(element, 'data-ember-action-' + actionId, actionId);\n };\n\n ActionModifierManager.prototype.update = function (actionState) {\n var positional = actionState.positional;\n\n var actionNameRef = positional.at(1);\n if (!actionNameRef[_action.INVOKE]) {\n actionState.actionName = actionNameRef.value();\n }\n actionState.eventName = actionState.getEventName();\n };\n\n ActionModifierManager.prototype.getDestructor = function (modifier) {\n return modifier;\n };\n\n return ActionModifierManager;\n }();\n\n exports.default = ActionModifierManager;\n});","enifed('ember-glimmer/protocol-for-url', ['exports', 'ember-environment', 'node-module'], function (exports, _emberEnvironment, _nodeModule) {\n 'use strict';\n\n exports.default = function (environment) {\n var protocol = void 0;\n if (_emberEnvironment.environment.hasDOM) {\n protocol = browserProtocolForURL.call(environment, 'foobar:baz');\n }\n // Test to see if our DOM implementation parses\n // and normalizes URLs.\n if (protocol === 'foobar:') {\n // Swap in the method that doesn't do this test now that\n // we know it works.\n environment.protocolForURL = browserProtocolForURL;\n } else if (typeof URL === 'object') {\n // URL globally provided, likely from FastBoot's sandbox\n nodeURL = URL;\n environment.protocolForURL = nodeProtocolForURL;\n } else if (_nodeModule.IS_NODE) {\n // Otherwise, we need to fall back to our own URL parsing.\n // Global `require` is shadowed by Ember's loader so we have to use the fully\n // qualified `module.require`.\n // tslint:disable-next-line:no-require-imports\n nodeURL = (0, _nodeModule.require)('url');\n environment.protocolForURL = nodeProtocolForURL;\n } else {\n throw new Error('Could not find valid URL parsing mechanism for URL Sanitization');\n }\n };\n /* globals module, URL */\n var nodeURL = void 0;\n var parsingNode = void 0;\n\n function browserProtocolForURL(url) {\n if (!parsingNode) {\n parsingNode = document.createElement('a');\n }\n parsingNode.href = url;\n return parsingNode.protocol;\n }\n function nodeProtocolForURL(url) {\n var protocol = null;\n if (typeof url === 'string') {\n protocol = nodeURL.parse(url).protocol;\n }\n return protocol === null ? ':' : protocol;\n }\n});","enifed('ember-glimmer/renderer', ['exports', 'ember-babel', '@glimmer/reference', 'ember-debug', 'ember-metal', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/component-managers/outlet', 'ember-glimmer/component-managers/root', 'ember-glimmer/utils/references', '@glimmer/runtime'], function (exports, _emberBabel, _reference, _emberDebug, _emberMetal, _emberViews, _component, _outlet, _root2, _references, _runtime) {\n 'use strict';\n\n exports.InteractiveRenderer = exports.InertRenderer = exports.Renderer = exports.DynamicScope = undefined;\n exports._resetRenderers = function () {\n renderers.length = 0;\n };\n var backburner = _emberMetal.run.backburner;\n\n var DynamicScope = exports.DynamicScope = function () {\n function DynamicScope(view, outletState, rootOutletState) {\n\n this.view = view;\n this.outletState = outletState;\n this.rootOutletState = rootOutletState;\n }\n\n DynamicScope.prototype.child = function () {\n return new DynamicScope(this.view, this.outletState, this.rootOutletState);\n };\n\n DynamicScope.prototype.get = function (key) {\n // tslint:disable-next-line:max-line-length\n false && !(key === 'outletState') && (0, _emberDebug.assert)('Using `-get-dynamic-scope` is only supported for `outletState` (you used `' + key + '`).', key === 'outletState');\n\n return this.outletState;\n };\n\n DynamicScope.prototype.set = function (key, value) {\n // tslint:disable-next-line:max-line-length\n false && !(key === 'outletState') && (0, _emberDebug.assert)('Using `-with-dynamic-scope` is only supported for `outletState` (you used `' + key + '`).', key === 'outletState');\n\n this.outletState = value;\n return value;\n };\n\n return DynamicScope;\n }();\n\n var RootState = function () {\n function RootState(root, env, template, self, parentElement, dynamicScope) {\n var _this = this;\n\n false && !(template !== undefined) && (0, _emberDebug.assert)('You cannot render `' + self.value() + '` without a template.', template !== undefined);\n\n this.id = (0, _emberViews.getViewId)(root);\n this.env = env;\n this.root = root;\n this.result = undefined;\n this.shouldReflush = false;\n this.destroyed = false;\n this._removing = false;\n var options = this.options = {\n alwaysRevalidate: false\n };\n this.render = function () {\n var iterator = template.render(self, parentElement, dynamicScope);\n var iteratorResult = void 0;\n do {\n iteratorResult = iterator.next();\n } while (!iteratorResult.done);\n var result = _this.result = iteratorResult.value;\n // override .render function after initial render\n _this.render = function () {\n return result.rerender(options);\n };\n };\n }\n\n RootState.prototype.isFor = function (possibleRoot) {\n return this.root === possibleRoot;\n };\n\n RootState.prototype.destroy = function () {\n var result = this.result,\n env = this.env,\n needsTransaction;\n\n this.destroyed = true;\n this.env = undefined;\n this.root = null;\n this.result = undefined;\n this.render = undefined;\n if (result) {\n /*\n Handles these scenarios:\n * When roots are removed during standard rendering process, a transaction exists already\n `.begin()` / `.commit()` are not needed.\n * When roots are being destroyed manually (`component.append(); component.destroy() case), no\n transaction exists already.\n * When roots are being destroyed during `Renderer#destroy`, no transaction exists\n */\n needsTransaction = !env.inTransaction;\n\n if (needsTransaction) {\n env.begin();\n }\n result.destroy();\n if (needsTransaction) {\n env.commit();\n }\n }\n };\n\n return RootState;\n }();\n\n var renderers = [];\n\n (0, _emberMetal.setHasViews)(function () {\n return renderers.length > 0;\n });\n function register(renderer) {\n false && !(renderers.indexOf(renderer) === -1) && (0, _emberDebug.assert)('Cannot register the same renderer twice', renderers.indexOf(renderer) === -1);\n\n renderers.push(renderer);\n }\n function deregister(renderer) {\n var index = renderers.indexOf(renderer);\n false && !(index !== -1) && (0, _emberDebug.assert)('Cannot deregister unknown unregistered renderer', index !== -1);\n\n renderers.splice(index, 1);\n }\n\n function K() {}\n var loops = 0;\n\n backburner.on('begin', function () {\n var i;\n\n for (i = 0; i < renderers.length; i++) {\n renderers[i]._scheduleRevalidate();\n }\n });\n backburner.on('end', function () {\n var i;\n\n for (i = 0; i < renderers.length; i++) {\n if (!renderers[i]._isValid()) {\n if (loops > 10) {\n loops = 0;\n // TODO: do something better\n renderers[i].destroy();\n throw new Error('infinite rendering invalidation detected');\n }\n loops++;\n return backburner.join(null, K);\n }\n }\n loops = 0;\n });\n\n var Renderer = exports.Renderer = function () {\n function Renderer(env, rootTemplate) {\n var _viewRegistry = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emberViews.fallbackViewRegistry;\n\n var destinedForDOM = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n\n this._env = env;\n this._rootTemplate = rootTemplate;\n this._viewRegistry = _viewRegistry;\n this._destinedForDOM = destinedForDOM;\n this._destroyed = false;\n this._roots = [];\n this._lastRevision = -1;\n this._isRenderingRoots = false;\n this._removedRoots = [];\n }\n // renderer HOOKS\n\n\n Renderer.prototype.appendOutletView = function (view, target) {\n var definition = new _outlet.TopLevelOutletComponentDefinition(view);\n var outletStateReference = view.toReference();\n this._appendDefinition(view, definition, target, outletStateReference);\n };\n\n Renderer.prototype.appendTo = function (view, target) {\n var rootDef = new _root2.RootComponentDefinition(view);\n this._appendDefinition(view, rootDef, target);\n };\n\n Renderer.prototype._appendDefinition = function (root, definition, target, outletStateReference) {\n var self = new _references.RootReference(definition);\n var dynamicScope = new DynamicScope(null, outletStateReference || _runtime.NULL_REFERENCE, outletStateReference);\n var rootState = new RootState(root, this._env, this._rootTemplate, self, target, dynamicScope);\n this._renderRoot(rootState);\n };\n\n Renderer.prototype.rerender = function () {\n this._scheduleRevalidate();\n };\n\n Renderer.prototype.register = function (view) {\n var id = (0, _emberViews.getViewId)(view);\n false && !!this._viewRegistry[id] && (0, _emberDebug.assert)('Attempted to register a view with an id already in use: ' + id, !this._viewRegistry[id]);\n\n this._viewRegistry[id] = view;\n };\n\n Renderer.prototype.unregister = function (view) {\n delete this._viewRegistry[(0, _emberViews.getViewId)(view)];\n };\n\n Renderer.prototype.remove = function (view) {\n view._transitionTo('destroying');\n this.cleanupRootFor(view);\n (0, _emberViews.setViewElement)(view, null);\n if (this._destinedForDOM) {\n view.trigger('didDestroyElement');\n }\n if (!view.isDestroying) {\n view.destroy();\n }\n };\n\n Renderer.prototype.cleanupRootFor = function (view) {\n // no need to cleanup roots if we have already been destroyed\n if (this._destroyed) {\n return;\n }\n var roots = this._roots,\n root;\n // traverse in reverse so we can remove items\n // without mucking up the index\n var i = this._roots.length;\n while (i--) {\n root = roots[i];\n\n if (root.isFor(view)) {\n root.destroy();\n roots.splice(i, 1);\n }\n }\n };\n\n Renderer.prototype.destroy = function () {\n if (this._destroyed) {\n return;\n }\n this._destroyed = true;\n this._clearAllRoots();\n };\n\n Renderer.prototype.getBounds = function (view) {\n var bounds = view[_component.BOUNDS];\n var parentElement = bounds.parentElement();\n var firstNode = bounds.firstNode();\n var lastNode = bounds.lastNode();\n return { parentElement: parentElement, firstNode: firstNode, lastNode: lastNode };\n };\n\n Renderer.prototype.createElement = function (tagName) {\n return this._env.getAppendOperations().createElement(tagName);\n };\n\n Renderer.prototype._renderRoot = function (root) {\n var roots = this._roots;\n\n roots.push(root);\n if (roots.length === 1) {\n register(this);\n }\n this._renderRootsTransaction();\n };\n\n Renderer.prototype._renderRoots = function () {\n var roots = this._roots,\n env = this._env,\n removedRoots = this._removedRoots,\n i,\n root,\n shouldReflush,\n _root,\n rootIndex;\n\n var globalShouldReflush = void 0;\n var initialRootsLength = void 0;\n do {\n env.begin();\n // ensure that for the first iteration of the loop\n // each root is processed\n initialRootsLength = roots.length;\n globalShouldReflush = false;\n for (i = 0; i < roots.length; i++) {\n root = roots[i];\n\n if (root.destroyed) {\n // add to the list of roots to be removed\n // they will be removed from `this._roots` later\n removedRoots.push(root);\n // skip over roots that have been marked as destroyed\n continue;\n }\n shouldReflush = root.shouldReflush;\n // when processing non-initial reflush loops,\n // do not process more roots than needed\n\n if (i >= initialRootsLength && !shouldReflush) {\n continue;\n }\n root.options.alwaysRevalidate = shouldReflush;\n // track shouldReflush based on this roots render result\n shouldReflush = root.shouldReflush = (0, _emberMetal.runInTransaction)(root, 'render');\n // globalShouldReflush should be `true` if *any* of\n // the roots need to reflush\n globalShouldReflush = globalShouldReflush || shouldReflush;\n }\n this._lastRevision = _reference.CURRENT_TAG.value();\n env.commit();\n } while (globalShouldReflush || roots.length > initialRootsLength);\n // remove any roots that were destroyed during this transaction\n while (removedRoots.length) {\n _root = removedRoots.pop();\n rootIndex = roots.indexOf(_root);\n\n roots.splice(rootIndex, 1);\n }\n if (this._roots.length === 0) {\n deregister(this);\n }\n };\n\n Renderer.prototype._renderRootsTransaction = function () {\n if (this._isRenderingRoots) {\n // currently rendering roots, a new root was added and will\n // be processed by the existing _renderRoots invocation\n return;\n }\n // used to prevent calling _renderRoots again (see above)\n // while we are actively rendering roots\n this._isRenderingRoots = true;\n var completedWithoutError = false;\n try {\n this._renderRoots();\n completedWithoutError = true;\n } finally {\n if (!completedWithoutError) {\n this._lastRevision = _reference.CURRENT_TAG.value();\n }\n this._isRenderingRoots = false;\n }\n };\n\n Renderer.prototype._clearAllRoots = function () {\n var roots = this._roots,\n i,\n root;\n for (i = 0; i < roots.length; i++) {\n root = roots[i];\n\n root.destroy();\n }\n this._removedRoots.length = 0;\n this._roots = [];\n // if roots were present before destroying\n // deregister this renderer instance\n if (roots.length) {\n deregister(this);\n }\n };\n\n Renderer.prototype._scheduleRevalidate = function () {\n backburner.scheduleOnce('render', this, this._revalidate);\n };\n\n Renderer.prototype._isValid = function () {\n return this._destroyed || this._roots.length === 0 || _reference.CURRENT_TAG.validate(this._lastRevision);\n };\n\n Renderer.prototype._revalidate = function () {\n if (this._isValid()) {\n return;\n }\n this._renderRootsTransaction();\n };\n\n return Renderer;\n }();\n\n exports.InertRenderer = function (_Renderer) {\n (0, _emberBabel.inherits)(InertRenderer, _Renderer);\n\n function InertRenderer() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _Renderer.apply(this, arguments));\n }\n\n InertRenderer.create = function (_ref) {\n var env = _ref.env,\n rootTemplate = _ref.rootTemplate,\n _viewRegistry = _ref._viewRegistry;\n\n return new this(env, rootTemplate, _viewRegistry, false);\n };\n\n InertRenderer.prototype.getElement = function () {\n throw new Error('Accessing `this.element` is not allowed in non-interactive environments (such as FastBoot).');\n };\n\n return InertRenderer;\n }(Renderer);\n\n exports.InteractiveRenderer = function (_Renderer2) {\n (0, _emberBabel.inherits)(InteractiveRenderer, _Renderer2);\n\n function InteractiveRenderer() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _Renderer2.apply(this, arguments));\n }\n\n InteractiveRenderer.create = function (_ref2) {\n var env = _ref2.env,\n rootTemplate = _ref2.rootTemplate,\n _viewRegistry = _ref2._viewRegistry;\n\n return new this(env, rootTemplate, _viewRegistry, true);\n };\n\n InteractiveRenderer.prototype.getElement = function (view) {\n return (0, _emberViews.getViewElement)(view);\n };\n\n return InteractiveRenderer;\n }(Renderer);\n});","enifed('ember-glimmer/setup-registry', ['exports', 'ember-babel', 'container', 'ember-environment', 'ember-glimmer/component', 'ember-glimmer/components/checkbox', 'ember-glimmer/components/link-to', 'ember-glimmer/components/text_area', 'ember-glimmer/components/text_field', 'ember-glimmer/dom', 'ember-glimmer/environment', 'ember-glimmer/renderer', 'ember-glimmer/templates/component', 'ember-glimmer/templates/outlet', 'ember-glimmer/templates/root', 'ember-glimmer/views/outlet', 'ember-glimmer/helpers/loc'], function (exports, _emberBabel, _container, _emberEnvironment, _component, _checkbox, _linkTo, _text_area, _text_field, _dom, _environment, _renderer, _component2, _outlet, _root, _outlet2, _loc) {\n 'use strict';\n\n exports.setupApplicationRegistry = function (registry) {\n registry.injection('service:-glimmer-environment', 'appendOperations', 'service:-dom-tree-construction');\n registry.injection('renderer', 'env', 'service:-glimmer-environment');\n registry.register((0, _container.privatize)(_templateObject), _root.default);\n registry.injection('renderer', 'rootTemplate', (0, _container.privatize)(_templateObject));\n registry.register('renderer:-dom', _renderer.InteractiveRenderer);\n registry.register('renderer:-inert', _renderer.InertRenderer);\n if (_emberEnvironment.environment.hasDOM) {\n registry.injection('service:-glimmer-environment', 'updateOperations', 'service:-dom-changes');\n }\n registry.register('service:-dom-changes', {\n create: function (_ref) {\n var document = _ref.document;\n\n return new _dom.DOMChanges(document);\n }\n });\n registry.register('service:-dom-tree-construction', {\n create: function (_ref2) {\n var document = _ref2.document;\n\n var Implementation = _emberEnvironment.environment.hasDOM ? _dom.DOMTreeConstruction : _dom.NodeDOMTreeConstruction;\n return new Implementation(document);\n }\n });\n };\n exports.setupEngineRegistry = function (registry) {\n registry.register('view:-outlet', _outlet2.default);\n registry.register('template:-outlet', _outlet.default);\n registry.injection('view:-outlet', 'template', 'template:-outlet');\n registry.injection('service:-dom-changes', 'document', 'service:-document');\n registry.injection('service:-dom-tree-construction', 'document', 'service:-document');\n registry.register((0, _container.privatize)(_templateObject2), _component2.default);\n registry.register('service:-glimmer-environment', _environment.default);\n registry.injection('template', 'env', 'service:-glimmer-environment');\n registry.optionsForType('helper', { instantiate: false });\n registry.register('helper:loc', _loc.default);\n registry.register('component:-text-field', _text_field.default);\n registry.register('component:-text-area', _text_area.default);\n registry.register('component:-checkbox', _checkbox.default);\n registry.register('component:link-to', _linkTo.default);\n registry.register((0, _container.privatize)(_templateObject3), _component.default);\n };\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['template:-root'], ['template:-root']),\n _templateObject2 = (0, _emberBabel.taggedTemplateLiteralLoose)(['template:components/-default'], ['template:components/-default']),\n _templateObject3 = (0, _emberBabel.taggedTemplateLiteralLoose)(['component:-default'], ['component:-default']);\n});","enifed('ember-glimmer/syntax', ['exports', 'ember-debug', 'ember-glimmer/syntax/-text-area', 'ember-glimmer/syntax/dynamic-component', 'ember-glimmer/syntax/input', 'ember-glimmer/syntax/mount', 'ember-glimmer/syntax/outlet', 'ember-glimmer/syntax/render', 'ember-glimmer/syntax/utils', 'ember-glimmer/utils/bindings'], function (exports, _emberDebug, _textArea, _dynamicComponent, _input, _mount, _outlet, _render, _utils, _bindings) {\n 'use strict';\n\n exports.experimentalMacros = undefined;\n exports.registerMacros =\n // This is a private API to allow for experimental macros\n // to be created in user space. Registering a macro should\n // should be done in an initializer.\n function (macro) {\n experimentalMacros.push(macro);\n };\n exports.populateMacros = function (blocks, inlines) {\n var i, macro;\n\n inlines.add('outlet', _outlet.outletMacro);\n inlines.add('component', _dynamicComponent.inlineComponentMacro);\n inlines.add('render', _render.renderMacro);\n inlines.add('mount', _mount.mountMacro);\n inlines.add('input', _input.inputMacro);\n inlines.add('textarea', _textArea.textAreaMacro);\n inlines.addMissing(refineInlineSyntax);\n blocks.add('component', _dynamicComponent.blockComponentMacro);\n blocks.addMissing(refineBlockSyntax);\n for (i = 0; i < experimentalMacros.length; i++) {\n macro = experimentalMacros[i];\n\n macro(blocks, inlines);\n }\n return { blocks: blocks, inlines: inlines };\n };\n\n function refineInlineSyntax(name, params, hash, builder) {\n false && !!(builder.env.builtInHelpers[name] && builder.env.owner.hasRegistration('helper:' + name)) && (0, _emberDebug.assert)('You attempted to overwrite the built-in helper \"' + name + '\" which is not allowed. Please rename the helper.', !(builder.env.builtInHelpers[name] && builder.env.owner.hasRegistration('helper:' + name)));\n\n var definition = void 0;\n if (name.indexOf('-') > -1) {\n definition = builder.env.getComponentDefinition(name, builder.meta.templateMeta);\n }\n if (definition) {\n (0, _bindings.wrapComponentClassAttribute)(hash);\n builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);\n return true;\n }\n return false;\n }\n function refineBlockSyntax(name, params, hash, _default, inverse, builder) {\n if (name.indexOf('-') === -1) {\n return false;\n }\n var meta = builder.meta.templateMeta;\n var definition = void 0;\n if (name.indexOf('-') > -1) {\n definition = builder.env.getComponentDefinition(name, meta);\n }\n if (definition) {\n (0, _bindings.wrapComponentClassAttribute)(hash);\n builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), _default, inverse]);\n return true;\n }\n false && !builder.env.hasHelper(name, meta) && (0, _emberDebug.assert)('A component or helper named \"' + name + '\" could not be found', builder.env.hasHelper(name, meta));\n false && !!builder.env.hasHelper(name, meta) && (0, _emberDebug.assert)('Helpers may not be used in the block form, for example {{#' + name + '}}{{/' + name + '}}. Please use a component, or alternatively use the helper in combination with a built-in Ember helper, for example {{#if (' + name + ')}}{{/if}}.', !builder.env.hasHelper(name, meta));\n\n return false;\n }\n var experimentalMacros = exports.experimentalMacros = [];\n});","enifed('ember-glimmer/syntax/-text-area', ['exports', 'ember-glimmer/utils/bindings', 'ember-glimmer/syntax/utils'], function (exports, _bindings, _utils) {\n 'use strict';\n\n exports.textAreaMacro = function (_name, params, hash, builder) {\n var definition = builder.env.getComponentDefinition('-text-area', builder.meta.templateMeta);\n (0, _bindings.wrapComponentClassAttribute)(hash);\n builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);\n return true;\n };\n});","enifed('ember-glimmer/syntax/dynamic-component', ['exports', '@glimmer/runtime', 'ember-debug', 'ember-glimmer/syntax/utils'], function (exports, _runtime, _emberDebug, _utils) {\n 'use strict';\n\n exports.dynamicComponentMacro = function (params, hash, _default, _inverse, builder) {\n var definitionArgs = [params.slice(0, 1), null, null, null];\n var args = [params.slice(1), (0, _utils.hashToArgs)(hash), null, null];\n builder.component.dynamic(definitionArgs, dynamicComponentFor, args);\n return true;\n };\n exports.blockComponentMacro = function (params, hash, _default, inverse, builder) {\n var definitionArgs = [params.slice(0, 1), null, null, null];\n var args = [params.slice(1), (0, _utils.hashToArgs)(hash), _default, inverse];\n builder.component.dynamic(definitionArgs, dynamicComponentFor, args);\n return true;\n };\n exports.inlineComponentMacro = function (_name, params, hash, builder) {\n var definitionArgs = [params.slice(0, 1), null, null, null];\n var args = [params.slice(1), (0, _utils.hashToArgs)(hash), null, null];\n builder.component.dynamic(definitionArgs, dynamicComponentFor, args);\n return true;\n };\n\n function dynamicComponentFor(vm, args, meta) {\n var env = vm.env;\n var nameRef = args.positional.at(0);\n return new DynamicComponentReference({ nameRef: nameRef, env: env, meta: meta, args: null });\n }\n\n\n var DynamicComponentReference = function () {\n function DynamicComponentReference(_ref) {\n var nameRef = _ref.nameRef,\n env = _ref.env,\n meta = _ref.meta,\n args = _ref.args;\n\n\n this.tag = nameRef.tag;\n this.nameRef = nameRef;\n this.env = env;\n this.meta = meta;\n this.args = args;\n }\n\n DynamicComponentReference.prototype.value = function () {\n var env = this.env,\n nameRef = this.nameRef,\n meta = this.meta,\n definition;\n\n var nameOrDef = nameRef.value();\n if (typeof nameOrDef === 'string') {\n definition = env.getComponentDefinition(nameOrDef, meta);\n // tslint:disable-next-line:max-line-length\n\n false && !!!definition && (0, _emberDebug.assert)('Could not find component named \"' + nameOrDef + '\" (no component or template with that name was found)', !!definition);\n\n return definition;\n } else if ((0, _runtime.isComponentDefinition)(nameOrDef)) {\n return nameOrDef;\n } else {\n return null;\n }\n };\n\n DynamicComponentReference.prototype.get = function () {};\n\n return DynamicComponentReference;\n }();\n});","enifed('ember-glimmer/syntax/input', ['exports', 'ember-debug', 'ember-glimmer/utils/bindings', 'ember-glimmer/syntax/dynamic-component', 'ember-glimmer/syntax/utils'], function (exports, _emberDebug, _bindings, _dynamicComponent, _utils) {\n 'use strict';\n\n exports.inputMacro =\n /**\n The `{{input}}` helper lets you create an HTML `<input />` component.\n It causes an `TextField` component to be rendered. For more info,\n see the [TextField](/api/classes/Ember.TextField.html) docs and\n the [templates guide](https://emberjs.com/guides/templates/input-helpers/).\n \n ```handlebars\n {{input value=\"987\"}}\n ```\n \n renders as:\n \n ```HTML\n <input type=\"text\" value=\"987\" />\n ```\n \n ### Text field\n \n If no `type` option is specified, a default of type 'text' is used.\n Many of the standard HTML attributes may be passed to this helper.\n <table>\n <tr><td>`readonly`</td><td>`required`</td><td>`autofocus`</td></tr>\n <tr><td>`value`</td><td>`placeholder`</td><td>`disabled`</td></tr>\n <tr><td>`size`</td><td>`tabindex`</td><td>`maxlength`</td></tr>\n <tr><td>`name`</td><td>`min`</td><td>`max`</td></tr>\n <tr><td>`pattern`</td><td>`accept`</td><td>`autocomplete`</td></tr>\n <tr><td>`autosave`</td><td>`formaction`</td><td>`formenctype`</td></tr>\n <tr><td>`formmethod`</td><td>`formnovalidate`</td><td>`formtarget`</td></tr>\n <tr><td>`height`</td><td>`inputmode`</td><td>`multiple`</td></tr>\n <tr><td>`step`</td><td>`width`</td><td>`form`</td></tr>\n <tr><td>`selectionDirection`</td><td>`spellcheck`</td><td> </td></tr>\n </table>\n When set to a quoted string, these values will be directly applied to the HTML\n element. When left unquoted, these values will be bound to a property on the\n template's current rendering context (most typically a controller instance).\n A very common use of this helper is to bind the `value` of an input to an Object's attribute:\n \n ```handlebars\n Search:\n {{input value=searchWord}}\n ```\n \n In this example, the initial value in the `<input />` will be set to the value of `searchWord`.\n If the user changes the text, the value of `searchWord` will also be updated.\n \n ### Actions\n \n The helper can send multiple actions based on user events.\n The action property defines the action which is sent when\n the user presses the return key.\n \n ```handlebars\n {{input action=\"submit\"}}\n ```\n \n The helper allows some user events to send actions.\n \n * `enter`\n * `insert-newline`\n * `escape-press`\n * `focus-in`\n * `focus-out`\n * `key-press`\n * `key-up`\n \n For example, if you desire an action to be sent when the input is blurred,\n you only need to setup the action name to the event name property.\n \n ```handlebars\n {{input focus-out=\"alertMessage\"}}\n ```\n See more about [Text Support Actions](/api/classes/Ember.TextField.html)\n \n ### Extending `TextField`\n \n Internally, `{{input type=\"text\"}}` creates an instance of `TextField`, passing\n arguments from the helper to `TextField`'s `create` method. You can extend the\n capabilities of text inputs in your applications by reopening this class. For example,\n if you are building a Bootstrap project where `data-*` attributes are used, you\n can add one to the `TextField`'s `attributeBindings` property:\n \n ```javascript\n import TextField from '@ember/component/text-field';\n TextField.reopen({\n attributeBindings: ['data-error']\n });\n ```\n \n Keep in mind when writing `TextField` subclasses that `TextField`\n itself extends `Component`. Expect isolated component semantics, not\n legacy 1.x view semantics (like `controller` being present).\n See more about [Ember components](/api/classes/Ember.Component.html)\n \n ### Checkbox\n \n Checkboxes are special forms of the `{{input}}` helper. To create a `<checkbox />`:\n \n ```handlebars\n Emberize Everything:\n {{input type=\"checkbox\" name=\"isEmberized\" checked=isEmberized}}\n ```\n \n This will bind checked state of this checkbox to the value of `isEmberized` -- if either one changes,\n it will be reflected in the other.\n \n The following HTML attributes can be set via the helper:\n \n * `checked`\n * `disabled`\n * `tabindex`\n * `indeterminate`\n * `name`\n * `autofocus`\n * `form`\n \n ### Extending `Checkbox`\n \n Internally, `{{input type=\"checkbox\"}}` creates an instance of `Checkbox`, passing\n arguments from the helper to `Checkbox`'s `create` method. You can extend the\n capablilties of checkbox inputs in your applications by reopening this class. For example,\n if you wanted to add a css class to all checkboxes in your application:\n \n ```javascript\n import Checkbox from '@ember/component/checkbox';\n \n Checkbox.reopen({\n classNames: ['my-app-checkbox']\n });\n ```\n \n @method input\n @for Ember.Templates.helpers\n @param {Hash} options\n @public\n */\n function (_name, params, hash, builder) {\n var keys = void 0,\n typeArg;\n var values = void 0;\n var typeIndex = -1;\n var valueIndex = -1;\n if (hash) {\n keys = hash[0];\n values = hash[1];\n typeIndex = keys.indexOf('type');\n valueIndex = keys.indexOf('value');\n }\n if (!params) {\n params = [];\n }\n if (typeIndex > -1) {\n typeArg = values[typeIndex];\n\n if (Array.isArray(typeArg)) {\n return (0, _dynamicComponent.dynamicComponentMacro)(params, hash, null, null, builder);\n } else if (typeArg === 'checkbox') {\n false && !(valueIndex === -1) && (0, _emberDebug.assert)('{{input type=\\'checkbox\\'}} does not support setting `value=someBooleanValue`; ' + 'you must use `checked=someBooleanValue` instead.', valueIndex === -1);\n\n (0, _bindings.wrapComponentClassAttribute)(hash);\n return buildSyntax('-checkbox', params, hash, builder);\n }\n }\n return buildSyntax('-text-field', params, hash, builder);\n };\n /**\n @module ember\n */\n function buildSyntax(type, params, hash, builder) {\n var definition = builder.env.getComponentDefinition(type, builder.meta.templateMeta);\n builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);\n return true;\n }\n});","enifed('ember-glimmer/syntax/mount', ['exports', 'ember-debug', 'ember-glimmer/component-managers/mount', 'ember-glimmer/syntax/utils'], function (exports, _emberDebug, _mount, _utils) {\n 'use strict';\n\n exports.mountMacro =\n /**\n The `{{mount}}` helper lets you embed a routeless engine in a template.\n Mounting an engine will cause an instance to be booted and its `application`\n template to be rendered.\n \n For example, the following template mounts the `ember-chat` engine:\n \n ```handlebars\n {{! application.hbs }}\n {{mount \"ember-chat\"}}\n ```\n \n Additionally, you can also pass in a `model` argument that will be\n set as the engines model. This can be an existing object:\n \n ```\n <div>\n {{mount 'admin' model=userSettings}}\n </div>\n ```\n \n Or an inline `hash`, and you can even pass components:\n \n ```\n <div>\n <h1>Application template!</h1>\n {{mount 'admin' model=(hash\n title='Secret Admin'\n signInButton=(component 'sign-in-button')\n )}}\n </div>\n ```\n \n @method mount\n @param {String} name Name of the engine to mount.\n @param {Object} [model] Object that will be set as\n the model of the engine.\n @for Ember.Templates.helpers\n @category ember-application-engines\n @public\n */\n function (_name, params, hash, builder) {\n false && !(params.length === 1) && (0, _emberDebug.assert)('You can only pass a single positional argument to the {{mount}} helper, e.g. {{mount \"chat-engine\"}}.', params.length === 1);\n\n var definitionArgs = [params.slice(0, 1), null, null, null];\n var args = [null, (0, _utils.hashToArgs)(hash), null, null];\n builder.component.dynamic(definitionArgs, dynamicEngineFor, args);\n return true;\n };\n\n function dynamicEngineFor(vm, args, meta) {\n var env = vm.env;\n var nameRef = args.positional.at(0);\n return new DynamicEngineReference({ nameRef: nameRef, env: env, meta: meta });\n }\n\n var DynamicEngineReference = function () {\n function DynamicEngineReference(_ref) {\n var nameRef = _ref.nameRef,\n env = _ref.env,\n meta = _ref.meta;\n\n\n this.tag = nameRef.tag;\n this.nameRef = nameRef;\n this.env = env;\n this.meta = meta;\n this._lastName = undefined;\n this._lastDef = undefined;\n }\n\n DynamicEngineReference.prototype.value = function () {\n var env = this.env,\n nameRef = this.nameRef;\n\n var nameOrDef = nameRef.value();\n if (typeof nameOrDef === 'string') {\n if (this._lastName === nameOrDef) {\n return this._lastDef;\n }\n false && !env.owner.hasRegistration('engine:' + nameOrDef) && (0, _emberDebug.assert)('You used `{{mount \\'' + nameOrDef + '\\'}}`, but the engine \\'' + nameOrDef + '\\' can not be found.', env.owner.hasRegistration('engine:' + nameOrDef));\n\n if (!env.owner.hasRegistration('engine:' + nameOrDef)) {\n return null;\n }\n this._lastName = nameOrDef;\n this._lastDef = new _mount.MountDefinition(nameOrDef);\n return this._lastDef;\n } else {\n false && !(nameOrDef === null || nameOrDef === undefined) && (0, _emberDebug.assert)('Invalid engine name \\'' + nameOrDef + '\\' specified, engine name must be either a string, null or undefined.', nameOrDef === null || nameOrDef === undefined);\n\n return null;\n }\n };\n\n return DynamicEngineReference;\n }();\n});","enifed('ember-glimmer/syntax/outlet', ['exports', '@glimmer/reference', 'ember-glimmer/component-managers/outlet'], function (exports, _reference, _outlet) {\n 'use strict';\n\n exports.outletMacro =\n /**\n The `{{outlet}}` helper lets you specify where a child route will render in\n your template. An important use of the `{{outlet}}` helper is in your\n application's `application.hbs` file:\n \n ```handlebars\n {{! app/templates/application.hbs }}\n <!-- header content goes here, and will always display -->\n {{my-header}}\n <div class=\"my-dynamic-content\">\n <!-- this content will change based on the current route, which depends on the current URL -->\n {{outlet}}\n </div>\n <!-- footer content goes here, and will always display -->\n {{my-footer}}\n ```\n \n See [templates guide](https://emberjs.com/guides/templates/the-application-template/) for\n additional information on using `{{outlet}}` in `application.hbs`.\n You may also specify a name for the `{{outlet}}`, which is useful when using more than one\n `{{outlet}}` in a template:\n \n ```handlebars\n {{outlet \"menu\"}}\n {{outlet \"sidebar\"}}\n {{outlet \"main\"}}\n ```\n \n Your routes can then render into a specific one of these `outlet`s by specifying the `outlet`\n attribute in your `renderTemplate` function:\n \n ```app/routes/menu.js\n import Route from '@ember/routing/route';\n \n export default Route.extend({\n renderTemplate() {\n this.render({ outlet: 'menu' });\n }\n });\n ```\n \n See the [routing guide](https://emberjs.com/guides/routing/rendering-a-template/) for more\n information on how your `route` interacts with the `{{outlet}}` helper.\n Note: Your content __will not render__ if there isn't an `{{outlet}}` for it.\n \n @method outlet\n @param {String} [name]\n @for Ember.Templates.helpers\n @public\n */\n function (_name, params, _hash, builder) {\n if (!params) {\n params = [];\n }\n var definitionArgs = [params.slice(0, 1), null, null, null];\n // FIXME\n builder.component.dynamic(definitionArgs, outletComponentFor, [[], null, null, null]);\n return true;\n };\n\n var OutletComponentReference = function () {\n function OutletComponentReference(outletNameRef, parentOutletStateRef) {\n\n this.outletNameRef = outletNameRef;\n this.parentOutletStateRef = parentOutletStateRef;\n this.definition = null;\n this.lastState = null;\n var outletStateTag = this.outletStateTag = _reference.UpdatableTag.create(parentOutletStateRef.tag);\n this.tag = (0, _reference.combine)([outletStateTag.inner, outletNameRef.tag]);\n }\n\n OutletComponentReference.prototype.value = function () {\n var outletNameRef = this.outletNameRef,\n parentOutletStateRef = this.parentOutletStateRef,\n definition = this.definition,\n lastState = this.lastState;\n\n var outletName = outletNameRef.value();\n var outletStateRef = parentOutletStateRef.get('outlets').get(outletName);\n var newState = this.lastState = outletStateRef.value();\n this.outletStateTag.inner.update(outletStateRef.tag);\n definition = revalidate(definition, lastState, newState);\n var hasTemplate = newState && newState.render.template;\n if (definition) {\n return definition;\n } else if (hasTemplate) {\n return this.definition = new _outlet.OutletComponentDefinition(outletName, newState.render.template);\n } else {\n return this.definition = null;\n }\n };\n\n return OutletComponentReference;\n }();\n\n function revalidate(definition, lastState, newState) {\n if (!lastState && !newState) {\n return definition;\n }\n if (!lastState && newState || lastState && !newState) {\n return null;\n }\n if (newState.render.template === lastState.render.template && newState.render.controller === lastState.render.controller) {\n return definition;\n }\n return null;\n }\n function outletComponentFor(vm, args) {\n var _vm$dynamicScope = vm.dynamicScope(),\n outletState = _vm$dynamicScope.outletState;\n\n var outletNameRef = void 0;\n if (args.positional.length === 0) {\n outletNameRef = new _reference.ConstReference('main');\n } else {\n outletNameRef = args.positional.at(0);\n }\n return new OutletComponentReference(outletNameRef, outletState);\n }\n});","enifed('ember-glimmer/syntax/render', ['exports', '@glimmer/reference', 'ember-debug', 'ember-glimmer/component-managers/render', 'ember-glimmer/syntax/utils'], function (exports, _reference, _emberDebug, _render, _utils) {\n 'use strict';\n\n exports.renderMacro =\n /**\n Calling ``{{render}}`` from within a template will insert another\n template that matches the provided name. The inserted template will\n access its properties on its own controller (rather than the controller\n of the parent template).\n \n If a view class with the same name exists, the view class also will be used.\n Note: A given controller may only be used *once* in your app in this manner.\n A singleton instance of the controller will be created for you.\n \n Example:\n \n ```app/controllers/navigation.js\n import Controller from '@ember/controller';\n \n export default Controller.extend({\n who: \"world\"\n });\n ```\n \n ```handlebars\n <!-- navigation.hbs -->\n Hello, {{who}}.\n ```\n \n ```handlebars\n <!-- application.hbs -->\n <h1>My great app</h1>\n {{render \"navigation\"}}\n ```\n \n ```html\n <h1>My great app</h1>\n <div class='ember-view'>\n Hello, world.\n </div>\n ```\n \n Optionally you may provide a second argument: a property path\n that will be bound to the `model` property of the controller.\n If a `model` property path is specified, then a new instance of the\n controller will be created and `{{render}}` can be used multiple times\n with the same name.\n \n For example if you had this `author` template.\n \n ```handlebars\n <div class=\"author\">\n Written by {{firstName}} {{lastName}}.\n Total Posts: {{postCount}}\n </div>\n ```\n \n You could render it inside the `post` template using the `render` helper.\n \n ```handlebars\n <div class=\"post\">\n <h1>{{title}}</h1>\n <div>{{body}}</div>\n {{render \"author\" author}}\n </div>\n ```\n \n @method render\n @for Ember.Templates.helpers\n @param {String} name\n @param {Object?} context\n @param {Hash} options\n @return {String} HTML string\n @public\n @deprecated Use a component instead\n */\n function (_name, params, hash, builder) {\n if (!params) {\n params = [];\n }\n var definitionArgs = [params.slice(0), hash, null, null];\n var args = [params.slice(1), (0, _utils.hashToArgs)(hash), null, null];\n builder.component.dynamic(definitionArgs, makeComponentDefinition, args);\n return true;\n };\n /**\n @module ember\n */\n function makeComponentDefinition(vm, args) {\n var env = vm.env,\n controllerNameRef;\n var nameRef = args.positional.at(0);\n false && !(0, _reference.isConst)(nameRef) && (0, _emberDebug.assert)('The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.', (0, _reference.isConst)(nameRef));\n false && !(args.positional.length === 1 || !(0, _reference.isConst)(args.positional.at(1))) && (0, _emberDebug.assert)('The second argument of {{render}} must be a path, e.g. {{render \"post\" post}}.', args.positional.length === 1 || !(0, _reference.isConst)(args.positional.at(1)));\n\n var templateName = nameRef.value();\n // tslint:disable-next-line:max-line-length\n false && !env.owner.hasRegistration('template:' + templateName) && (0, _emberDebug.assert)('You used `{{render \\'' + templateName + '\\'}}`, but \\'' + templateName + '\\' can not be found as a template.', env.owner.hasRegistration('template:' + templateName));\n\n var template = env.owner.lookup('template:' + templateName);\n var controllerName = void 0;\n if (args.named.has('controller')) {\n controllerNameRef = args.named.get('controller');\n // tslint:disable-next-line:max-line-length\n\n false && !(0, _reference.isConst)(controllerNameRef) && (0, _emberDebug.assert)('The controller argument for {{render}} must be quoted, e.g. {{render \"sidebar\" controller=\"foo\"}}.', (0, _reference.isConst)(controllerNameRef));\n\n // TODO should be ensuring this to string here\n controllerName = controllerNameRef.value();\n // tslint:disable-next-line:max-line-length\n false && !env.owner.hasRegistration('controller:' + controllerName) && (0, _emberDebug.assert)('The controller name you supplied \\'' + controllerName + '\\' did not resolve to a controller.', env.owner.hasRegistration('controller:' + controllerName));\n } else {\n controllerName = templateName;\n }\n if (args.positional.length === 1) {\n return new _reference.ConstReference(new _render.RenderDefinition(controllerName, template, env, _render.SINGLETON_RENDER_MANAGER));\n } else {\n return new _reference.ConstReference(new _render.RenderDefinition(controllerName, template, env, _render.NON_SINGLETON_RENDER_MANAGER));\n }\n }\n});","enifed(\"ember-glimmer/syntax/utils\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.hashToArgs = function (hash) {\n if (hash === null) {\n return null;\n }\n var names = hash[0].map(function (key) {\n return \"@\" + key;\n });\n return [names, hash[1]];\n };\n});","enifed('ember-glimmer/template', ['exports', '@glimmer/runtime', 'ember-utils'], function (exports, _runtime, _emberUtils) {\n 'use strict';\n\n exports.WrappedTemplateFactory = undefined;\n exports.default = function (json) {\n var factory = (0, _runtime.templateFactory)(json);\n return new WrappedTemplateFactory(factory);\n };\n\n var WrappedTemplateFactory = exports.WrappedTemplateFactory = function () {\n function WrappedTemplateFactory(factory) {\n\n this.factory = factory;\n this.id = factory.id;\n this.meta = factory.meta;\n }\n\n WrappedTemplateFactory.prototype.create = function (props) {\n var owner = props[_emberUtils.OWNER];\n return this.factory.create(props.env, { owner: owner });\n };\n\n return WrappedTemplateFactory;\n }();\n});","enifed(\"ember-glimmer/template_registry\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.setTemplates = function (templates) {\n TEMPLATES = templates;\n };\n exports.getTemplates = function () {\n return TEMPLATES;\n };\n exports.getTemplate = function (name) {\n if (TEMPLATES.hasOwnProperty(name)) {\n return TEMPLATES[name];\n }\n };\n exports.hasTemplate = function (name) {\n return TEMPLATES.hasOwnProperty(name);\n };\n exports.setTemplate = function (name, template) {\n return TEMPLATES[name] = template;\n };\n var TEMPLATES = {};\n});","enifed(\"ember-glimmer/templates/component\", [\"exports\", \"ember-glimmer/template\"], function (exports, _template) {\n \"use strict\";\n\n exports.default = (0, _template.default)({ \"id\": \"RxHsBKwy\", \"block\": \"{\\\"symbols\\\":[\\\"&default\\\"],\\\"statements\\\":[[11,1]],\\\"hasEval\\\":false}\", \"meta\": { \"moduleName\": \"packages/ember-glimmer/lib/templates/component.hbs\" } });\n});","enifed(\"ember-glimmer/templates/empty\", [\"exports\", \"ember-glimmer/template\"], function (exports, _template) {\n \"use strict\";\n\n exports.default = (0, _template.default)({ \"id\": \"5jp2oO+o\", \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[],\\\"hasEval\\\":false}\", \"meta\": { \"moduleName\": \"packages/ember-glimmer/lib/templates/empty.hbs\" } });\n});","enifed(\"ember-glimmer/templates/link-to\", [\"exports\", \"ember-glimmer/template\"], function (exports, _template) {\n \"use strict\";\n\n exports.default = (0, _template.default)({ \"id\": \"VZn3uSPL\", \"block\": \"{\\\"symbols\\\":[\\\"&default\\\"],\\\"statements\\\":[[4,\\\"if\\\",[[20,[\\\"linkTitle\\\"]]],null,{\\\"statements\\\":[[1,[18,\\\"linkTitle\\\"],false]],\\\"parameters\\\":[]},{\\\"statements\\\":[[11,1]],\\\"parameters\\\":[]}]],\\\"hasEval\\\":false}\", \"meta\": { \"moduleName\": \"packages/ember-glimmer/lib/templates/link-to.hbs\" } });\n});","enifed(\"ember-glimmer/templates/outlet\", [\"exports\", \"ember-glimmer/template\"], function (exports, _template) {\n \"use strict\";\n\n exports.default = (0, _template.default)({ \"id\": \"/7rqcQ85\", \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[18,\\\"outlet\\\"],false]],\\\"hasEval\\\":false}\", \"meta\": { \"moduleName\": \"packages/ember-glimmer/lib/templates/outlet.hbs\" } });\n});","enifed(\"ember-glimmer/templates/root\", [\"exports\", \"ember-glimmer/template\"], function (exports, _template) {\n \"use strict\";\n\n exports.default = (0, _template.default)({ \"id\": \"AdIsk/cm\", \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[25,\\\"component\\\",[[19,0,[]]],null],false]],\\\"hasEval\\\":false}\", \"meta\": { \"moduleName\": \"packages/ember-glimmer/lib/templates/root.hbs\" } });\n});","enifed('ember-glimmer/utils/bindings', ['exports', 'ember-babel', '@glimmer/reference', '@glimmer/wire-format', 'ember-debug', 'ember-metal', 'ember-runtime', 'ember-glimmer/component', 'ember-glimmer/utils/string'], function (exports, _emberBabel, _reference, _wireFormat, _emberDebug, _emberMetal, _emberRuntime, _component, _string) {\n 'use strict';\n\n exports.ClassNameBinding = exports.IsVisibleBinding = exports.AttributeBinding = undefined;\n exports.wrapComponentClassAttribute =\n // TODO we should probably do this transform at build time\n function (hash) {\n if (!hash) {\n return hash;\n }\n var keys = hash[0],\n values = hash[1],\n _values$index,\n type,\n getExp,\n path,\n propName;\n\n var index = keys.indexOf('class');\n if (index !== -1) {\n _values$index = values[index], type = _values$index[0];\n\n\n if (type === _wireFormat.Ops.Get || type === _wireFormat.Ops.MaybeLocal) {\n getExp = values[index];\n path = getExp[getExp.length - 1];\n propName = path[path.length - 1];\n\n hash[1][index] = [_wireFormat.Ops.Helper, ['-class'], [getExp, propName]];\n }\n }\n return hash;\n };\n\n function referenceForKey(component, key) {\n return component[_component.ROOT_REF].get(key);\n }\n function referenceForParts(component, parts) {\n var isAttrs = parts[0] === 'attrs';\n // TODO deprecate this\n if (isAttrs) {\n parts.shift();\n if (parts.length === 1) {\n return referenceForKey(component, parts[0]);\n }\n }\n return (0, _reference.referenceFromParts)(component[_component.ROOT_REF], parts);\n }exports.AttributeBinding = {\n parse: function (microsyntax) {\n var colonIndex = microsyntax.indexOf(':'),\n prop,\n attribute;\n if (colonIndex === -1) {\n false && !(microsyntax !== 'class') && (0, _emberDebug.assert)('You cannot use class as an attributeBinding, use classNameBindings instead.', microsyntax !== 'class');\n\n return [microsyntax, microsyntax, true];\n } else {\n prop = microsyntax.substring(0, colonIndex);\n attribute = microsyntax.substring(colonIndex + 1);\n\n false && !(attribute !== 'class') && (0, _emberDebug.assert)('You cannot use class as an attributeBinding, use classNameBindings instead.', attribute !== 'class');\n\n return [prop, attribute, false];\n }\n },\n install: function (element, component, parsed, operations) {\n var prop = parsed[0],\n attribute = parsed[1],\n isSimple = parsed[2],\n elementId;\n\n if (attribute === 'id') {\n elementId = (0, _emberMetal.get)(component, prop);\n\n if (elementId === undefined || elementId === null) {\n elementId = component.elementId;\n }\n operations.addStaticAttribute(element, 'id', elementId);\n return;\n }\n var isPath = prop.indexOf('.') > -1;\n var reference = isPath ? referenceForParts(component, prop.split('.')) : referenceForKey(component, prop);\n false && !!(isSimple && isPath) && (0, _emberDebug.assert)('Illegal attributeBinding: \\'' + prop + '\\' is not a valid attribute name.', !(isSimple && isPath));\n\n if (attribute === 'style') {\n reference = new StyleBindingReference(reference, referenceForKey(component, 'isVisible'));\n }\n operations.addDynamicAttribute(element, attribute, reference, false);\n }\n };\n\n var DISPLAY_NONE = 'display: none;';\n var SAFE_DISPLAY_NONE = (0, _string.htmlSafe)(DISPLAY_NONE);\n\n var StyleBindingReference = function (_CachedReference) {\n (0, _emberBabel.inherits)(StyleBindingReference, _CachedReference);\n\n function StyleBindingReference(inner, isVisible) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference.call(this));\n\n _this.inner = inner;\n _this.isVisible = isVisible;\n _this.tag = (0, _reference.combine)([inner.tag, isVisible.tag]);\n return _this;\n }\n\n StyleBindingReference.prototype.compute = function () {\n var value = this.inner.value(),\n style;\n var isVisible = this.isVisible.value();\n if (isVisible !== false) {\n return value;\n } else if (!value) {\n return SAFE_DISPLAY_NONE;\n } else {\n style = value + ' ' + DISPLAY_NONE;\n\n return (0, _string.isHTMLSafe)(value) ? (0, _string.htmlSafe)(style) : style;\n }\n };\n\n return StyleBindingReference;\n }(_reference.CachedReference);\n\n exports.IsVisibleBinding = {\n install: function (element, component, operations) {\n operations.addDynamicAttribute(element, 'style', (0, _reference.map)(referenceForKey(component, 'isVisible'), this.mapStyleValue), false);\n },\n mapStyleValue: function (isVisible) {\n return isVisible === false ? SAFE_DISPLAY_NONE : null;\n }\n };\n exports.ClassNameBinding = {\n install: function (element, component, microsyntax, operations) {\n var _microsyntax$split = microsyntax.split(':'),\n prop = _microsyntax$split[0],\n truthy = _microsyntax$split[1],\n falsy = _microsyntax$split[2],\n isPath,\n parts,\n value,\n ref;\n\n if (prop === '') {\n operations.addStaticAttribute(element, 'class', truthy);\n } else {\n isPath = prop.indexOf('.') > -1;\n parts = isPath ? prop.split('.') : [];\n value = isPath ? referenceForParts(component, parts) : referenceForKey(component, prop);\n ref = void 0;\n\n if (truthy === undefined) {\n ref = new SimpleClassNameBindingReference(value, isPath ? parts[parts.length - 1] : prop);\n } else {\n ref = new ColonClassNameBindingReference(value, truthy, falsy);\n }\n operations.addDynamicAttribute(element, 'class', ref, false);\n }\n }\n };\n\n\n var SimpleClassNameBindingReference = function (_CachedReference2) {\n (0, _emberBabel.inherits)(SimpleClassNameBindingReference, _CachedReference2);\n\n function SimpleClassNameBindingReference(inner, path) {\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference2.call(this));\n\n _this2.inner = inner;\n _this2.path = path;\n _this2.tag = inner.tag;\n _this2.inner = inner;\n _this2.path = path;\n _this2.dasherizedPath = null;\n return _this2;\n }\n\n SimpleClassNameBindingReference.prototype.compute = function () {\n var value = this.inner.value(),\n path,\n dasherizedPath;\n if (value === true) {\n path = this.path, dasherizedPath = this.dasherizedPath;\n\n\n return dasherizedPath || (this.dasherizedPath = _emberRuntime.String.dasherize(path));\n } else if (value || value === 0) {\n return String(value);\n } else {\n return null;\n }\n };\n\n return SimpleClassNameBindingReference;\n }(_reference.CachedReference);\n\n var ColonClassNameBindingReference = function (_CachedReference3) {\n (0, _emberBabel.inherits)(ColonClassNameBindingReference, _CachedReference3);\n\n function ColonClassNameBindingReference(inner) {\n var truthy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var falsy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n\n var _this3 = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference3.call(this));\n\n _this3.inner = inner;\n _this3.truthy = truthy;\n _this3.falsy = falsy;\n _this3.tag = inner.tag;\n return _this3;\n }\n\n ColonClassNameBindingReference.prototype.compute = function () {\n var inner = this.inner,\n truthy = this.truthy,\n falsy = this.falsy;\n\n return inner.value() ? truthy : falsy;\n };\n\n return ColonClassNameBindingReference;\n }(_reference.CachedReference);\n});","enifed('ember-glimmer/utils/curly-component-state-bucket', ['exports'], function (exports) {\n 'use strict';\n\n // tslint:disable-next-line:no-empty\n\n function NOOP() {}\n /**\n @module ember\n */\n /**\n Represents the internal state of the component.\n \n @class ComponentStateBucket\n @private\n */\n\n var ComponentStateBucket = function () {\n function ComponentStateBucket(environment, component, args, finalizer) {\n\n this.environment = environment;\n this.component = component;\n this.args = args;\n this.finalizer = finalizer;\n this.classRef = null;\n this.classRef = null;\n this.argsRevision = args.tag.value();\n }\n\n ComponentStateBucket.prototype.destroy = function () {\n var component = this.component,\n environment = this.environment;\n\n if (environment.isInteractive) {\n component.trigger('willDestroyElement');\n component.trigger('willClearRender');\n }\n environment.destroyedComponents.push(component);\n };\n\n ComponentStateBucket.prototype.finalize = function () {\n var finalizer = this.finalizer;\n\n finalizer();\n this.finalizer = NOOP;\n };\n\n return ComponentStateBucket;\n }();\n\n exports.default = ComponentStateBucket;\n});","enifed('ember-glimmer/utils/debug-stack', ['exports'], function (exports) {\n 'use strict';\n\n // @ts-check\n\n exports.default = void 0;\n});","enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', '@glimmer/reference', 'ember-metal', 'ember-runtime', 'ember-utils', 'ember-glimmer/helpers/each-in', 'ember-glimmer/utils/references'], function (exports, _emberBabel, _reference, _emberMetal, _emberRuntime, _emberUtils, _eachIn, _references) {\n 'use strict';\n\n exports.default = function (ref, keyPath) {\n if ((0, _eachIn.isEachIn)(ref)) {\n return new EachInIterable(ref, keyForEachIn(keyPath));\n } else {\n return new ArrayIterable(ref, keyForArray(keyPath));\n }\n };\n\n function keyForEachIn(keyPath) {\n switch (keyPath) {\n case '@index':\n case undefined:\n case null:\n return index;\n case '@identity':\n return identity;\n default:\n return function (item) {\n return (0, _emberMetal.get)(item, keyPath);\n };\n }\n }\n function keyForArray(keyPath) {\n switch (keyPath) {\n case '@index':\n return index;\n case '@identity':\n case undefined:\n case null:\n return identity;\n default:\n return function (item) {\n return (0, _emberMetal.get)(item, keyPath);\n };\n }\n }\n function index(_item, i) {\n return String(i);\n }\n function identity(item) {\n switch (typeof item) {\n case 'string':\n case 'number':\n return String(item);\n default:\n return (0, _emberUtils.guidFor)(item);\n }\n }\n function ensureUniqueKey(seen, key) {\n var seenCount = seen[key];\n if (seenCount > 0) {\n seen[key]++;\n return '' + key + 'be277757-bbbe-4620-9fcb-213ef433cca2' + seenCount;\n } else {\n seen[key] = 1;\n }\n return key;\n }\n\n var ArrayIterator = function () {\n function ArrayIterator(array, keyFor) {\n\n this.array = array;\n this.length = array.length;\n this.keyFor = keyFor;\n this.position = 0;\n this.seen = Object.create(null);\n }\n\n ArrayIterator.prototype.isEmpty = function () {\n return false;\n };\n\n ArrayIterator.prototype.getMemo = function (position) {\n return position;\n };\n\n ArrayIterator.prototype.getValue = function (position) {\n return this.array[position];\n };\n\n ArrayIterator.prototype.next = function () {\n var length = this.length,\n keyFor = this.keyFor,\n position = this.position,\n seen = this.seen;\n\n if (position >= length) {\n return null;\n }\n var value = this.getValue(position);\n var memo = this.getMemo(position);\n var key = ensureUniqueKey(seen, keyFor(value, memo));\n this.position++;\n return { key: key, value: value, memo: memo };\n };\n\n return ArrayIterator;\n }();\n\n var EmberArrayIterator = function (_ArrayIterator) {\n (0, _emberBabel.inherits)(EmberArrayIterator, _ArrayIterator);\n\n function EmberArrayIterator(array, keyFor) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ArrayIterator.call(this, array, keyFor));\n\n _this.length = (0, _emberMetal.get)(array, 'length');\n return _this;\n }\n\n EmberArrayIterator.prototype.getValue = function (position) {\n return (0, _emberRuntime.objectAt)(this.array, position);\n };\n\n return EmberArrayIterator;\n }(ArrayIterator);\n\n var ObjectKeysIterator = function (_ArrayIterator2) {\n (0, _emberBabel.inherits)(ObjectKeysIterator, _ArrayIterator2);\n\n function ObjectKeysIterator(keys, values, keyFor) {\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ArrayIterator2.call(this, values, keyFor));\n\n _this2.keys = keys;\n return _this2;\n }\n\n ObjectKeysIterator.prototype.getMemo = function (position) {\n return this.keys[position];\n };\n\n return ObjectKeysIterator;\n }(ArrayIterator);\n\n var EmptyIterator = function () {\n function EmptyIterator() {}\n\n EmptyIterator.prototype.isEmpty = function () {\n return true;\n };\n\n EmptyIterator.prototype.next = function () {\n throw new Error('Cannot call next() on an empty iterator');\n };\n\n return EmptyIterator;\n }();\n\n var EMPTY_ITERATOR = new EmptyIterator();\n\n var EachInIterable = function () {\n function EachInIterable(ref, keyFor) {\n\n this.ref = ref;\n this.keyFor = keyFor;\n var valueTag = this.valueTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n this.tag = (0, _reference.combine)([ref.tag, valueTag]);\n }\n\n EachInIterable.prototype.iterate = function () {\n var ref = this.ref,\n keyFor = this.keyFor,\n valueTag = this.valueTag,\n keys,\n values;\n\n var iterable = ref.value();\n valueTag.inner.update((0, _emberMetal.tagFor)(iterable));\n if ((0, _emberMetal.isProxy)(iterable)) {\n iterable = (0, _emberMetal.get)(iterable, 'content');\n }\n var typeofIterable = typeof iterable;\n if (iterable !== null && (typeofIterable === 'object' || typeofIterable === 'function')) {\n keys = Object.keys(iterable);\n values = keys.map(function (key) {\n return iterable[key];\n });\n\n return keys.length > 0 ? new ObjectKeysIterator(keys, values, keyFor) : EMPTY_ITERATOR;\n } else {\n return EMPTY_ITERATOR;\n }\n };\n\n EachInIterable.prototype.valueReferenceFor = function (item) {\n return new _references.UpdatablePrimitiveReference(item.memo);\n };\n\n EachInIterable.prototype.updateValueReference = function (reference, item) {\n reference.update(item.memo);\n };\n\n EachInIterable.prototype.memoReferenceFor = function (item) {\n return new _references.UpdatableReference(item.value);\n };\n\n EachInIterable.prototype.updateMemoReference = function (reference, item) {\n reference.update(item.value);\n };\n\n return EachInIterable;\n }();\n\n var ArrayIterable = function () {\n function ArrayIterable(ref, keyFor) {\n\n this.ref = ref;\n this.keyFor = keyFor;\n var valueTag = this.valueTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n this.tag = (0, _reference.combine)([ref.tag, valueTag]);\n }\n\n ArrayIterable.prototype.iterate = function () {\n var ref = this.ref,\n keyFor = this.keyFor,\n valueTag = this.valueTag,\n array;\n\n var iterable = ref.value();\n valueTag.inner.update((0, _emberMetal.tagForProperty)(iterable, '[]'));\n if (iterable === null || typeof iterable !== 'object') {\n return EMPTY_ITERATOR;\n }\n if (Array.isArray(iterable)) {\n return iterable.length > 0 ? new ArrayIterator(iterable, keyFor) : EMPTY_ITERATOR;\n } else if ((0, _emberRuntime.isEmberArray)(iterable)) {\n return (0, _emberMetal.get)(iterable, 'length') > 0 ? new EmberArrayIterator(iterable, keyFor) : EMPTY_ITERATOR;\n } else if (typeof iterable.forEach === 'function') {\n array = [];\n\n iterable.forEach(function (item) {\n array.push(item);\n });\n return array.length > 0 ? new ArrayIterator(array, keyFor) : EMPTY_ITERATOR;\n } else {\n return EMPTY_ITERATOR;\n }\n };\n\n ArrayIterable.prototype.valueReferenceFor = function (item) {\n return new _references.UpdatableReference(item.value);\n };\n\n ArrayIterable.prototype.updateValueReference = function (reference, item) {\n reference.update(item.value);\n };\n\n ArrayIterable.prototype.memoReferenceFor = function (item) {\n return new _references.UpdatablePrimitiveReference(item.memo);\n };\n\n ArrayIterable.prototype.updateMemoReference = function (reference, item) {\n reference.update(item.memo);\n };\n\n return ArrayIterable;\n }();\n});","enifed('ember-glimmer/utils/process-args', ['exports', 'ember-utils', 'ember-views', 'ember-glimmer/component', 'ember-glimmer/helpers/action', 'ember-glimmer/utils/references'], function (exports, _emberUtils, _emberViews, _component, _action, _references) {\n 'use strict';\n\n exports.processComponentArgs =\n\n // ComponentArgs takes EvaluatedNamedArgs and converts them into the\n // inputs needed by CurlyComponents (attrs and props, with mutable\n // cells, etc).\n function (namedArgs) {\n var keys = namedArgs.names,\n i,\n name,\n ref,\n value;\n var attrs = namedArgs.value();\n var props = Object.create(null);\n var args = Object.create(null);\n props[_component.ARGS] = args;\n for (i = 0; i < keys.length; i++) {\n name = keys[i];\n ref = namedArgs.get(name);\n value = attrs[name];\n\n if (typeof value === 'function' && value[_action.ACTION]) {\n attrs[name] = value;\n } else if (ref[_references.UPDATE]) {\n attrs[name] = new MutableCell(ref, value);\n }\n args[name] = ref;\n props[name] = value;\n }\n props.attrs = attrs;\n return props;\n };\n var REF = (0, _emberUtils.symbol)('REF');\n\n var MutableCell = function () {\n function MutableCell(ref, value) {\n\n this[_emberViews.MUTABLE_CELL] = true;\n this[REF] = ref;\n this.value = value;\n }\n\n MutableCell.prototype.update = function (val) {\n this[REF][_references.UPDATE](val);\n };\n\n return MutableCell;\n }();\n});","enifed('ember-glimmer/utils/references', ['exports', 'ember-babel', '@glimmer/reference', '@glimmer/runtime', 'ember-metal', 'ember-utils', 'ember-glimmer/helper', 'ember-glimmer/utils/to-bool'], function (exports, _emberBabel, _reference, _runtime, _emberMetal, _emberUtils, _helper, _toBool) {\n 'use strict';\n\n exports.UnboundReference = exports.InternalHelperReference = exports.ClassBasedHelperReference = exports.SimpleHelperReference = exports.ConditionalReference = exports.UpdatablePrimitiveReference = exports.UpdatableReference = exports.NestedPropertyReference = exports.RootPropertyReference = exports.PropertyReference = exports.RootReference = exports.CachedReference = exports.UPDATE = undefined;\n var UPDATE = exports.UPDATE = (0, _emberUtils.symbol)('UPDATE');\n\n // @abstract\n // @implements PathReference\n\n var EmberPathReference = function () {\n function EmberPathReference() {}\n\n EmberPathReference.prototype.get = function (key) {\n return PropertyReference.create(this, key);\n };\n\n return EmberPathReference;\n }();\n\n var CachedReference = exports.CachedReference = function (_EmberPathReference) {\n (0, _emberBabel.inherits)(CachedReference, _EmberPathReference);\n\n function CachedReference() {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _EmberPathReference.call(this));\n\n _this._lastRevision = null;\n _this._lastValue = null;\n return _this;\n }\n\n CachedReference.prototype.compute = function () {};\n\n CachedReference.prototype.value = function () {\n var tag = this.tag,\n _lastRevision = this._lastRevision,\n _lastValue = this._lastValue;\n\n if (!_lastRevision || !tag.validate(_lastRevision)) {\n _lastValue = this._lastValue = this.compute();\n this._lastRevision = tag.value();\n }\n return _lastValue;\n };\n\n return CachedReference;\n }(EmberPathReference);\n\n var RootReference = exports.RootReference = function (_ConstReference) {\n (0, _emberBabel.inherits)(RootReference, _ConstReference);\n\n function RootReference(value) {\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ConstReference.call(this, value));\n\n _this2.children = Object.create(null);\n return _this2;\n }\n\n RootReference.prototype.get = function (propertyKey) {\n var ref = this.children[propertyKey];\n if (ref === undefined) {\n ref = this.children[propertyKey] = new RootPropertyReference(this.inner, propertyKey);\n }\n return ref;\n };\n\n return RootReference;\n }(_reference.ConstReference);\n\n var PropertyReference = exports.PropertyReference = function (_CachedReference) {\n (0, _emberBabel.inherits)(PropertyReference, _CachedReference);\n\n function PropertyReference() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference.apply(this, arguments));\n }\n\n PropertyReference.create = function (parentReference, propertyKey) {\n if ((0, _reference.isConst)(parentReference)) {\n return new RootPropertyReference(parentReference.value(), propertyKey);\n } else {\n return new NestedPropertyReference(parentReference, propertyKey);\n }\n };\n\n PropertyReference.prototype.get = function (key) {\n return new NestedPropertyReference(this, key);\n };\n\n return PropertyReference;\n }(CachedReference);\n\n var RootPropertyReference = exports.RootPropertyReference = function (_PropertyReference) {\n (0, _emberBabel.inherits)(RootPropertyReference, _PropertyReference);\n\n function RootPropertyReference(parentValue, propertyKey) {\n\n var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _PropertyReference.call(this));\n\n _this4._parentValue = parentValue;\n _this4._propertyKey = propertyKey;\n\n _this4.tag = (0, _emberMetal.tagForProperty)(parentValue, propertyKey);\n\n return _this4;\n }\n\n RootPropertyReference.prototype.compute = function () {\n var _parentValue = this._parentValue,\n _propertyKey = this._propertyKey;\n\n return (0, _emberMetal.get)(_parentValue, _propertyKey);\n };\n\n RootPropertyReference.prototype[UPDATE] = function (value) {\n (0, _emberMetal.set)(this._parentValue, this._propertyKey, value);\n };\n\n return RootPropertyReference;\n }(PropertyReference);\n\n var NestedPropertyReference = exports.NestedPropertyReference = function (_PropertyReference2) {\n (0, _emberBabel.inherits)(NestedPropertyReference, _PropertyReference2);\n\n function NestedPropertyReference(parentReference, propertyKey) {\n\n var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _PropertyReference2.call(this));\n\n var parentReferenceTag = parentReference.tag;\n var parentObjectTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n _this5._parentReference = parentReference;\n _this5._parentObjectTag = parentObjectTag;\n _this5._propertyKey = propertyKey;\n\n _this5.tag = (0, _reference.combine)([parentReferenceTag, parentObjectTag]);\n\n return _this5;\n }\n\n NestedPropertyReference.prototype.compute = function () {\n var _parentReference = this._parentReference,\n _parentObjectTag = this._parentObjectTag,\n _propertyKey = this._propertyKey;\n\n var parentValue = _parentReference.value();\n _parentObjectTag.inner.update((0, _emberMetal.tagForProperty)(parentValue, _propertyKey));\n var parentValueType = typeof parentValue;\n if (parentValueType === 'string' && _propertyKey === 'length') {\n return parentValue.length;\n }\n if (parentValueType === 'object' && parentValue !== null || parentValueType === 'function') {\n return (0, _emberMetal.get)(parentValue, _propertyKey);\n } else {\n return undefined;\n }\n };\n\n NestedPropertyReference.prototype[UPDATE] = function (value) {\n var parent = this._parentReference.value();\n (0, _emberMetal.set)(parent, this._propertyKey, value);\n };\n\n return NestedPropertyReference;\n }(PropertyReference);\n\n var UpdatableReference = exports.UpdatableReference = function (_EmberPathReference2) {\n (0, _emberBabel.inherits)(UpdatableReference, _EmberPathReference2);\n\n function UpdatableReference(value) {\n\n var _this6 = (0, _emberBabel.possibleConstructorReturn)(this, _EmberPathReference2.call(this));\n\n _this6.tag = _reference.DirtyableTag.create();\n _this6._value = value;\n return _this6;\n }\n\n UpdatableReference.prototype.value = function () {\n return this._value;\n };\n\n UpdatableReference.prototype.update = function (value) {\n var _value = this._value;\n\n if (value !== _value) {\n this.tag.inner.dirty();\n this._value = value;\n }\n };\n\n return UpdatableReference;\n }(EmberPathReference);\n\n exports.UpdatablePrimitiveReference = function (_UpdatableReference) {\n (0, _emberBabel.inherits)(UpdatablePrimitiveReference, _UpdatableReference);\n\n function UpdatablePrimitiveReference() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _UpdatableReference.apply(this, arguments));\n }\n\n return UpdatablePrimitiveReference;\n }(UpdatableReference);\n\n exports.ConditionalReference = function (_GlimmerConditionalRe) {\n (0, _emberBabel.inherits)(ConditionalReference, _GlimmerConditionalRe);\n\n ConditionalReference.create = function (reference) {\n var value;\n\n if ((0, _reference.isConst)(reference)) {\n value = reference.value();\n\n if ((0, _emberMetal.isProxy)(value)) {\n return new RootPropertyReference(value, 'isTruthy');\n } else {\n return _runtime.PrimitiveReference.create((0, _toBool.default)(value));\n }\n }\n return new ConditionalReference(reference);\n };\n\n function ConditionalReference(reference) {\n\n var _this8 = (0, _emberBabel.possibleConstructorReturn)(this, _GlimmerConditionalRe.call(this, reference));\n\n _this8.objectTag = _reference.UpdatableTag.create(_reference.CONSTANT_TAG);\n _this8.tag = (0, _reference.combine)([reference.tag, _this8.objectTag]);\n return _this8;\n }\n\n ConditionalReference.prototype.toBool = function (predicate) {\n if ((0, _emberMetal.isProxy)(predicate)) {\n this.objectTag.inner.update((0, _emberMetal.tagForProperty)(predicate, 'isTruthy'));\n return (0, _emberMetal.get)(predicate, 'isTruthy');\n } else {\n this.objectTag.inner.update((0, _emberMetal.tagFor)(predicate));\n return (0, _toBool.default)(predicate);\n }\n };\n\n return ConditionalReference;\n }(_runtime.ConditionalReference);\n\n exports.SimpleHelperReference = function (_CachedReference2) {\n (0, _emberBabel.inherits)(SimpleHelperReference, _CachedReference2);\n\n SimpleHelperReference.create = function (Helper, _vm, args) {\n var helper = Helper.create(),\n positional,\n named,\n positionalValue,\n namedValue,\n result;\n if ((0, _reference.isConst)(args)) {\n positional = args.positional, named = args.named;\n positionalValue = positional.value();\n namedValue = named.value();\n result = helper.compute(positionalValue, namedValue);\n\n if (typeof result === 'object' && result !== null || typeof result === 'function') {\n return new RootReference(result);\n } else {\n return _runtime.PrimitiveReference.create(result);\n }\n } else {\n return new SimpleHelperReference(helper.compute, args);\n }\n };\n\n function SimpleHelperReference(helper, args) {\n\n var _this9 = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference2.call(this));\n\n _this9.tag = args.tag;\n _this9.helper = helper;\n _this9.args = args;\n return _this9;\n }\n\n SimpleHelperReference.prototype.compute = function () {\n var helper = this.helper,\n _args = this.args,\n positional = _args.positional,\n named = _args.named;\n\n var positionalValue = positional.value();\n var namedValue = named.value();\n\n return helper(positionalValue, namedValue);\n };\n\n return SimpleHelperReference;\n }(CachedReference);\n\n exports.ClassBasedHelperReference = function (_CachedReference3) {\n (0, _emberBabel.inherits)(ClassBasedHelperReference, _CachedReference3);\n\n ClassBasedHelperReference.create = function (helperClass, vm, args) {\n var instance = helperClass.create();\n vm.newDestroyable(instance);\n return new ClassBasedHelperReference(instance, args);\n };\n\n function ClassBasedHelperReference(instance, args) {\n\n var _this10 = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference3.call(this));\n\n _this10.tag = (0, _reference.combine)([instance[_helper.RECOMPUTE_TAG], args.tag]);\n _this10.instance = instance;\n _this10.args = args;\n return _this10;\n }\n\n ClassBasedHelperReference.prototype.compute = function () {\n var instance = this.instance,\n _args2 = this.args,\n positional = _args2.positional,\n named = _args2.named;\n\n var positionalValue = positional.value();\n var namedValue = named.value();\n\n return instance.compute(positionalValue, namedValue);\n };\n\n return ClassBasedHelperReference;\n }(CachedReference);\n\n exports.InternalHelperReference = function (_CachedReference4) {\n (0, _emberBabel.inherits)(InternalHelperReference, _CachedReference4);\n\n function InternalHelperReference(helper, args) {\n\n var _this11 = (0, _emberBabel.possibleConstructorReturn)(this, _CachedReference4.call(this));\n\n _this11.tag = args.tag;\n _this11.helper = helper;\n _this11.args = args;\n return _this11;\n }\n\n InternalHelperReference.prototype.compute = function () {\n var helper = this.helper,\n args = this.args;\n\n return helper(args);\n };\n\n return InternalHelperReference;\n }(CachedReference);\n\n exports.UnboundReference = function (_ConstReference2) {\n (0, _emberBabel.inherits)(UnboundReference, _ConstReference2);\n\n function UnboundReference() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _ConstReference2.apply(this, arguments));\n }\n\n UnboundReference.create = function (value) {\n if (typeof value === 'object' && value !== null) {\n return new UnboundReference(value);\n } else {\n return _runtime.PrimitiveReference.create(value);\n }\n };\n\n UnboundReference.prototype.get = function (key) {\n return new UnboundReference((0, _emberMetal.get)(this.inner, key));\n };\n\n return UnboundReference;\n }(_reference.ConstReference);\n});","enifed('ember-glimmer/utils/string', ['exports', 'ember-debug'], function (exports, _emberDebug) {\n 'use strict';\n\n exports.SafeString = undefined;\n exports.getSafeString = function () {\n false && !false && (0, _emberDebug.deprecate)('Ember.Handlebars.SafeString is deprecated in favor of Ember.String.htmlSafe', false, {\n id: 'ember-htmlbars.ember-handlebars-safestring',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x#toc_use-ember-string-htmlsafe-over-ember-handlebars-safestring'\n });\n\n return SafeString;\n };\n exports.escapeExpression = function (string) {\n if (typeof string !== 'string') {\n // don't escape SafeStrings, since they're already safe\n if (string && string.toHTML) {\n return string.toHTML();\n } else if (string === null || string === undefined) {\n return '';\n } else if (!string) {\n return string + '';\n }\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n }\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n }\n /**\n Mark a string as safe for unescaped output with Ember templates. If you\n return HTML from a helper, use this function to\n ensure Ember's rendering layer does not escape the HTML.\n \n ```javascript\n import { htmlSafe } from '@ember/string';\n \n htmlSafe('<div>someString</div>')\n ```\n \n @method htmlSafe\n @for @ember/template\n @static\n @return {Handlebars.SafeString} A string that will not be HTML escaped by Handlebars.\n @public\n */\n ;\n exports.htmlSafe = function (str) {\n if (str === null || str === undefined) {\n str = '';\n } else if (typeof str !== 'string') {\n str = '' + str;\n }\n return new SafeString(str);\n }\n /**\n Detects if a string was decorated using `htmlSafe`.\n \n ```javascript\n import { htmlSafe, isHTMLSafe } from '@ember/string';\n \n var plainString = 'plain string',\n safeString = htmlSafe('<div>someValue</div>');\n \n isHTMLSafe(plainString); // false\n isHTMLSafe(safeString); // true\n ```\n \n @method isHTMLSafe\n @for @ember/template\n @static\n @return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.\n @public\n */\n ;\n exports.isHTMLSafe = function (str) {\n return str !== null && typeof str === 'object' && typeof str.toHTML === 'function';\n };\n\n var SafeString = exports.SafeString = function () {\n function SafeString(string) {\n\n this.string = string;\n }\n\n SafeString.prototype.toString = function () {\n return '' + this.string;\n };\n\n SafeString.prototype.toHTML = function () {\n return this.toString();\n };\n\n return SafeString;\n }();\n\n var escape = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`',\n '=': '='\n };\n var possible = /[&<>\"'`=]/;\n var badChars = /[&<>\"'`=]/g;\n function escapeChar(chr) {\n return escape[chr];\n }\n});","enifed('ember-glimmer/utils/to-bool', ['exports', 'ember-metal', 'ember-runtime'], function (exports, _emberMetal, _emberRuntime) {\n 'use strict';\n\n exports.default = function (predicate) {\n if (!predicate) {\n return false;\n }\n if (predicate === true) {\n return true;\n }\n if ((0, _emberRuntime.isArray)(predicate)) {\n return (0, _emberMetal.get)(predicate, 'length') !== 0;\n }\n return true;\n };\n});","enifed('ember-glimmer/views/outlet', ['exports', 'ember-babel', '@glimmer/reference', 'ember-environment', 'ember-metal', 'ember-utils'], function (exports, _emberBabel, _reference, _emberEnvironment, _emberMetal, _emberUtils) {\n 'use strict';\n\n exports.RootOutletStateReference = undefined;\n\n var RootOutletStateReference = exports.RootOutletStateReference = function () {\n function RootOutletStateReference(outletView) {\n\n this.outletView = outletView;\n this.tag = outletView._tag;\n }\n\n RootOutletStateReference.prototype.get = function (key) {\n return new ChildOutletStateReference(this, key);\n };\n\n RootOutletStateReference.prototype.value = function () {\n return this.outletView.outletState;\n };\n\n RootOutletStateReference.prototype.getOrphan = function (name) {\n return new OrphanedOutletStateReference(this, name);\n };\n\n RootOutletStateReference.prototype.update = function (state) {\n this.outletView.setOutletState(state);\n };\n\n return RootOutletStateReference;\n }();\n\n var OrphanedOutletStateReference = function (_RootOutletStateRefer) {\n (0, _emberBabel.inherits)(OrphanedOutletStateReference, _RootOutletStateRefer);\n\n function OrphanedOutletStateReference(root, name) {\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RootOutletStateRefer.call(this, root.outletView));\n\n _this.root = root;\n _this.name = name;\n return _this;\n }\n\n OrphanedOutletStateReference.prototype.value = function () {\n var rootState = this.root.value();\n var orphans = rootState.outlets.main.outlets.__ember_orphans__;\n if (!orphans) {\n return null;\n }\n var matched = orphans.outlets[this.name];\n if (!matched) {\n return null;\n }\n var state = Object.create(null);\n state[matched.render.outlet] = matched;\n matched.wasUsed = true;\n return { outlets: state, render: undefined };\n };\n\n return OrphanedOutletStateReference;\n }(RootOutletStateReference);\n\n var ChildOutletStateReference = function () {\n function ChildOutletStateReference(parent, key) {\n\n this.parent = parent;\n this.key = key;\n this.tag = parent.tag;\n }\n\n ChildOutletStateReference.prototype.get = function (key) {\n return new ChildOutletStateReference(this, key);\n };\n\n ChildOutletStateReference.prototype.value = function () {\n var parent = this.parent.value();\n return parent && parent[this.key];\n };\n\n return ChildOutletStateReference;\n }();\n\n var OutletView = function () {\n OutletView.extend = function (injections) {\n return function (_OutletView) {\n (0, _emberBabel.inherits)(_class, _OutletView);\n\n function _class() {\n return (0, _emberBabel.possibleConstructorReturn)(this, _OutletView.apply(this, arguments));\n }\n\n _class.create = function (options) {\n if (options) {\n return _OutletView.create.call(this, (0, _emberUtils.assign)({}, injections, options));\n } else {\n return _OutletView.create.call(this, injections);\n }\n };\n\n return _class;\n }(OutletView);\n };\n\n OutletView.reopenClass = function (injections) {\n (0, _emberUtils.assign)(this, injections);\n };\n\n OutletView.create = function (options) {\n var _environment = options._environment,\n renderer = options.renderer,\n template = options.template;\n\n var owner = options[_emberUtils.OWNER];\n return new OutletView(_environment, renderer, owner, template);\n };\n\n function OutletView(_environment, renderer, owner, template) {\n\n this._environment = _environment;\n this.renderer = renderer;\n this.owner = owner;\n this.template = template;\n this.outletState = null;\n this._tag = _reference.DirtyableTag.create();\n }\n\n OutletView.prototype.appendTo = function (selector) {\n var env = this._environment || _emberEnvironment.environment;\n var target = void 0;\n if (env.hasDOM) {\n target = typeof selector === 'string' ? document.querySelector(selector) : selector;\n } else {\n target = selector;\n }\n _emberMetal.run.schedule('render', this.renderer, 'appendOutletView', this, target);\n };\n\n OutletView.prototype.rerender = function () {};\n\n OutletView.prototype.setOutletState = function (state) {\n this.outletState = {\n outlets: {\n main: state\n },\n render: {\n owner: undefined,\n into: undefined,\n outlet: 'main',\n name: '-top-level',\n controller: undefined,\n template: undefined\n }\n };\n this._tag.inner.dirty();\n };\n\n OutletView.prototype.toReference = function () {\n return new RootOutletStateReference(this);\n };\n\n OutletView.prototype.destroy = function () {};\n\n return OutletView;\n }();\n\n exports.default = OutletView;\n});","enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-debug', 'ember-babel', '@glimmer/reference', 'require', 'ember-console', 'backburner'], function (exports, emberEnvironment, emberUtils, emberDebug, emberBabel, _glimmer_reference, require, Logger, Backburner) {\n 'use strict';\n\n require = 'default' in require ? require['default'] : require;\n Logger = 'default' in Logger ? Logger['default'] : Logger;\n Backburner = 'default' in Backburner ? Backburner['default'] : Backburner;\n\n /**\n @module ember\n */\n\n /**\n This namespace contains all Ember methods and functions. Future versions of\n Ember may overwrite this namespace and therefore, you should avoid adding any\n new properties.\n \n At the heart of Ember is Ember-Runtime, a set of core functions that provide\n cross-platform compatibility and object property observing. Ember-Runtime is\n small and performance-focused so you can use it alongside other\n cross-platform libraries such as jQuery. For more details, see\n [Ember-Runtime](https://emberjs.com/api/modules/ember-runtime.html).\n \n @class Ember\n @static\n @public\n */\n var Ember = typeof emberEnvironment.context.imports.Ember === 'object' && emberEnvironment.context.imports.Ember || {},\n getPrototypeOf,\n metaStore;\n\n // Make sure these are set whether Ember was already defined or not\n Ember.isNamespace = true;\n Ember.toString = function () {\n return 'Ember';\n };\n\n /*\n When we render a rich template hierarchy, the set of events that\n *might* happen tends to be much larger than the set of events that\n actually happen. This implies that we should make listener creation &\n destruction cheap, even at the cost of making event dispatch more\n expensive.\n \n Thus we store a new listener with a single push and no new\n allocations, without even bothering to do deduplication -- we can\n save that for dispatch time, if an event actually happens.\n */\n\n /* listener flags */\n var ONCE = 1;\n var SUSPENDED = 2;\n\n var protoMethods = {\n addToListeners: function (eventName, target, method, flags) {\n if (this._listeners === undefined) {\n this._listeners = [];\n }\n this._listeners.push(eventName, target, method, flags);\n },\n _finalizeListeners: function () {\n if (this._listenersFinalized) {\n return;\n }\n if (this._listeners === undefined) {\n this._listeners = [];\n }\n var pointer = this.parent,\n listeners;\n while (pointer !== undefined) {\n listeners = pointer._listeners;\n\n if (listeners !== undefined) {\n this._listeners = this._listeners.concat(listeners);\n }\n if (pointer._listenersFinalized) {\n break;\n }\n pointer = pointer.parent;\n }\n this._listenersFinalized = true;\n },\n removeFromListeners: function (eventName, target, method, didRemove) {\n var pointer = this,\n listeners,\n index;\n while (pointer !== undefined) {\n listeners = pointer._listeners;\n\n if (listeners !== undefined) {\n for (index = listeners.length - 4; index >= 0; index -= 4) {\n if (listeners[index] === eventName && (!method || listeners[index + 1] === target && listeners[index + 2] === method)) {\n if (pointer === this) {\n // we are modifying our own list, so we edit directly\n if (typeof didRemove === 'function') {\n didRemove(eventName, target, listeners[index + 2]);\n }\n listeners.splice(index, 4);\n } else {\n // we are trying to remove an inherited listener, so we do\n // just-in-time copying to detach our own listeners from\n // our inheritance chain.\n this._finalizeListeners();\n return this.removeFromListeners(eventName, target, method);\n }\n }\n }\n }\n if (pointer._listenersFinalized) {\n break;\n }\n pointer = pointer.parent;\n }\n },\n matchingListeners: function (eventName) {\n var pointer = this,\n listeners,\n index,\n susIndex,\n resultIndex;\n var result = void 0;\n while (pointer !== undefined) {\n listeners = pointer._listeners;\n\n if (listeners !== undefined) {\n for (index = 0; index < listeners.length; index += 4) {\n if (listeners[index] === eventName) {\n result = result || [];\n pushUniqueListener(result, listeners, index);\n }\n }\n }\n if (pointer._listenersFinalized) {\n break;\n }\n pointer = pointer.parent;\n }\n var sus = this._suspendedListeners;\n if (sus !== undefined && result !== undefined) {\n for (susIndex = 0; susIndex < sus.length; susIndex += 3) {\n if (eventName === sus[susIndex]) {\n for (resultIndex = 0; resultIndex < result.length; resultIndex += 3) {\n if (result[resultIndex] === sus[susIndex + 1] && result[resultIndex + 1] === sus[susIndex + 2]) {\n result[resultIndex + 2] |= SUSPENDED;\n }\n }\n }\n }\n }\n return result;\n },\n suspendListeners: function (eventNames, target, method, callback) {\n var sus = this._suspendedListeners,\n i,\n _i;\n if (sus === undefined) {\n sus = this._suspendedListeners = [];\n }\n for (i = 0; i < eventNames.length; i++) {\n sus.push(eventNames[i], target, method);\n }\n try {\n return callback.call(target);\n } finally {\n if (sus.length === eventNames.length) {\n this._suspendedListeners = undefined;\n } else {\n for (_i = sus.length - 3; _i >= 0; _i -= 3) {\n if (sus[_i + 1] === target && sus[_i + 2] === method && eventNames.indexOf(sus[_i]) !== -1) {\n sus.splice(_i, 3);\n }\n }\n }\n }\n },\n watchedEvents: function () {\n var pointer = this,\n listeners,\n index;\n var names = {};\n while (pointer !== undefined) {\n listeners = pointer._listeners;\n\n if (listeners !== undefined) {\n for (index = 0; index < listeners.length; index += 4) {\n names[listeners[index]] = true;\n }\n }\n if (pointer._listenersFinalized) {\n break;\n }\n pointer = pointer.parent;\n }\n return Object.keys(names);\n }\n };\n\n function pushUniqueListener(destination, source, index) {\n var target = source[index + 1],\n destinationIndex;\n var method = source[index + 2];\n for (destinationIndex = 0; destinationIndex < destination.length; destinationIndex += 3) {\n if (destination[destinationIndex] === target && destination[destinationIndex + 1] === method) {\n return;\n }\n }\n destination.push(target, method, source[index + 3]);\n }\n\n /**\n @module @ember/object\n */\n /*\n The event system uses a series of nested hashes to store listeners on an\n object. When a listener is registered, or when an event arrives, these\n hashes are consulted to determine which target and action pair to invoke.\n \n The hashes are stored in the object's meta hash, and look like this:\n \n // Object's meta hash\n {\n listeners: { // variable name: `listenerSet`\n \"foo:changed\": [ // variable name: `actions`\n target, method, flags\n ]\n }\n }\n \n */\n\n /**\n Add an event listener\n \n @method addListener\n @static\n @for @ember/object/events\n @param obj\n @param {String} eventName\n @param {Object|Function} target A target object or a function\n @param {Function|String} method A function or the name of a function to be called on `target`\n @param {Boolean} once A flag whether a function should only be called once\n @public\n */\n function addListener(obj, eventName, target, method, once) {\n false && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to addListener', !!obj && !!eventName);\n false && !(eventName !== 'didInitAttrs') && emberDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', {\n id: 'ember-views.did-init-attrs',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs'\n });\n\n if (!method && 'function' === typeof target) {\n method = target;\n target = null;\n }\n\n var flags = 0;\n if (once) {\n flags |= ONCE;\n }\n\n meta(obj).addToListeners(eventName, target, method, flags);\n\n if ('function' === typeof obj.didAddListener) {\n obj.didAddListener(eventName, target, method);\n }\n }\n\n /**\n Remove an event listener\n \n Arguments should match those passed to `addListener`.\n \n @method removeListener\n @static\n @for @ember/object/events\n @param obj\n @param {String} eventName\n @param {Object|Function} target A target object or a function\n @param {Function|String} method A function or the name of a function to be called on `target`\n @public\n */\n function removeListener(obj, eventName, target, method) {\n false && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to removeListener', !!obj && !!eventName);\n\n if (!method && 'function' === typeof target) {\n method = target;\n target = null;\n }\n\n var func = 'function' === typeof obj.didRemoveListener ? obj.didRemoveListener.bind(obj) : function () {};\n meta(obj).removeFromListeners(eventName, target, method, func);\n }\n\n /**\n Suspend listener during callback.\n \n This should only be used by the target of the event listener\n when it is taking an action that would cause the event, e.g.\n an object might suspend its property change listener while it is\n setting that property.\n \n @method suspendListener\n @static\n @for @ember/object/events\n \n @private\n @param obj\n @param {String} eventName\n @param {Object|Function} target A target object or a function\n @param {Function|String} method A function or the name of a function to be called on `target`\n @param {Function} callback\n */\n function suspendListener(obj, eventName, target, method, callback) {\n return suspendListeners(obj, [eventName], target, method, callback);\n }\n\n /**\n Suspends multiple listeners during a callback.\n \n @method suspendListeners\n @static\n @for @ember/object/events\n \n @private\n @param obj\n @param {Array} eventNames Array of event names\n @param {Object|Function} target A target object or a function\n @param {Function|String} method A function or the name of a function to be called on `target`\n @param {Function} callback\n */\n function suspendListeners(obj, eventNames, target, method, callback) {\n if (!method && 'function' === typeof target) {\n method = target;\n target = null;\n }\n return meta(obj).suspendListeners(eventNames, target, method, callback);\n }\n\n /**\n Return a list of currently watched events\n \n @private\n @method watchedEvents\n @static\n @for @ember/object/events\n @param obj\n */\n\n\n /**\n Send an event. The execution of suspended listeners\n is skipped, and once listeners are removed. A listener without\n a target is executed on the passed object. If an array of actions\n is not passed, the actions stored on the passed object are invoked.\n \n @method sendEvent\n @static\n @for @ember/object/events\n @param obj\n @param {String} eventName\n @param {Array} params Optional parameters for each listener.\n @param {Array} actions Optional array of actions (listeners).\n @param {Meta} meta Optional meta to lookup listeners\n @return true\n @public\n */\n function sendEvent(obj, eventName, params, actions, _meta) {\n var meta$$1, i, target, method, flags;\n\n if (actions === undefined) {\n meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;\n\n actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);\n }\n\n if (actions === undefined || actions.length === 0) {\n return false;\n }\n\n for (i = actions.length - 3; i >= 0; i -= 3) {\n // looping in reverse for once listeners\n target = actions[i];\n method = actions[i + 1];\n flags = actions[i + 2];\n\n\n if (!method) {\n continue;\n }\n if (flags & SUSPENDED) {\n continue;\n }\n if (flags & ONCE) {\n removeListener(obj, eventName, target, method);\n }\n if (!target) {\n target = obj;\n }\n if ('string' === typeof method) {\n if (params) {\n emberUtils.applyStr(target, method, params);\n } else {\n target[method]();\n }\n } else {\n if (params) {\n method.apply(target, params);\n } else {\n method.call(target);\n }\n }\n }\n return true;\n }\n\n /**\n @private\n @method hasListeners\n @static\n @for @ember/object/events\n @param obj\n @param {String} eventName\n */\n\n\n /**\n @private\n @method listenersFor\n @static\n @for @ember/object/events\n @param obj\n @param {String} eventName\n */\n function listenersFor(obj, eventName) {\n var ret = [],\n i,\n target,\n method;\n var meta$$1 = exports.peekMeta(obj);\n var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;\n\n if (actions === undefined) {\n return ret;\n }\n\n for (i = 0; i < actions.length; i += 3) {\n target = actions[i];\n method = actions[i + 1];\n\n ret.push([target, method]);\n }\n\n return ret;\n }\n\n /**\n Define a property as a function that should be executed when\n a specified event or events are triggered.\n \n \n ``` javascript\n import EmberObject from '@ember/object';\n import { on } from '@ember/object/evented';\n import { sendEvent } from '@ember/object/events';\n \n let Job = EmberObject.extend({\n logCompleted: on('completed', function() {\n console.log('Job completed!');\n })\n });\n \n let job = Job.create();\n \n sendEvent(job, 'completed'); // Logs 'Job completed!'\n ```\n \n @method on\n @static\n @for @ember/object/evented\n @param {String} eventNames*\n @param {Function} func\n @return func\n @public\n */\n\n\n var hasViews = function () {\n return false;\n };\n\n function makeTag() {\n return new _glimmer_reference.DirtyableTag();\n }\n\n function tagFor(object, _meta) {\n var meta$$1;\n\n if (typeof object === 'object' && object !== null) {\n meta$$1 = _meta === undefined ? meta(object) : _meta;\n\n return meta$$1.writableTag(makeTag);\n } else {\n return _glimmer_reference.CONSTANT_TAG;\n }\n }\n\n function markObjectAsDirty(meta$$1, propertyKey) {\n var objectTag = meta$$1.readableTag();\n\n if (objectTag !== undefined) {\n objectTag.dirty();\n }\n\n var tags = meta$$1.readableTags();\n var propertyTag = tags !== undefined ? tags[propertyKey] : undefined;\n\n if (propertyTag !== undefined) {\n propertyTag.dirty();\n }\n\n if (propertyKey === 'content' && meta$$1.isProxy()) {\n objectTag.contentDidChange();\n }\n\n if (objectTag !== undefined || propertyTag !== undefined) {\n ensureRunloop();\n }\n }\n\n var backburner = void 0;\n function ensureRunloop() {\n if (backburner === undefined) {\n backburner = require('ember-metal').run.backburner;\n }\n\n if (hasViews()) {\n backburner.ensureInstance();\n }\n }\n\n /*\n this.observerSet = {\n [senderGuid]: { // variable name: `keySet`\n [keyName]: listIndex\n }\n },\n this.observers = [\n {\n sender: obj,\n keyName: keyName,\n eventName: eventName,\n listeners: [\n [target, method, flags]\n ]\n },\n ...\n ]\n */\n\n var ObserverSet = function () {\n function ObserverSet() {\n\n this.clear();\n }\n\n ObserverSet.prototype.add = function (sender, keyName, eventName) {\n var observerSet = this.observerSet;\n var observers = this.observers;\n var senderGuid = emberUtils.guidFor(sender);\n var keySet = observerSet[senderGuid];\n\n if (keySet === undefined) {\n observerSet[senderGuid] = keySet = {};\n }\n\n var index = keySet[keyName];\n if (index === undefined) {\n index = observers.push({\n sender: sender,\n keyName: keyName,\n eventName: eventName,\n listeners: []\n }) - 1;\n keySet[keyName] = index;\n }\n return observers[index].listeners;\n };\n\n ObserverSet.prototype.flush = function () {\n var observers = this.observers,\n i;\n var observer = void 0,\n sender = void 0;\n this.clear();\n for (i = 0; i < observers.length; ++i) {\n observer = observers[i];\n sender = observer.sender;\n if (sender.isDestroying || sender.isDestroyed) {\n continue;\n }\n sendEvent(sender, observer.eventName, [sender, observer.keyName], observer.listeners);\n }\n };\n\n ObserverSet.prototype.clear = function () {\n this.observerSet = {};\n this.observers = [];\n };\n\n return ObserverSet;\n }();\n\n /**\n @module ember\n */\n var id = 0;\n\n // Returns whether Type(value) is Object according to the terminology in the spec\n function isObject$1(value) {\n return typeof value === 'object' && value !== null || typeof value === 'function';\n }\n\n /*\n * @class Ember.WeakMap\n * @public\n * @category ember-metal-weakmap\n *\n * A partial polyfill for [WeakMap](http://www.ecma-international.org/ecma-262/6.0/#sec-weakmap-objects).\n *\n * There is a small but important caveat. This implementation assumes that the\n * weak map will live longer (in the sense of garbage collection) than all of its\n * keys, otherwise it is possible to leak the values stored in the weak map. In\n * practice, most use cases satisfy this limitation which is why it is included\n * in ember-metal.\n */\n var WeakMapPolyfill = function () {\n function WeakMapPolyfill(iterable) {\n var i, _iterable$i, key, value;\n\n this._id = emberUtils.GUID_KEY + id++;\n\n if (iterable === null || iterable === undefined) {} else if (Array.isArray(iterable)) {\n for (i = 0; i < iterable.length; i++) {\n _iterable$i = iterable[i], key = _iterable$i[0], value = _iterable$i[1];\n\n\n this.set(key, value);\n }\n } else {\n throw new TypeError('The weak map constructor polyfill only supports an array argument');\n }\n }\n\n /*\n * @method get\n * @param key {Object | Function}\n * @return {Any} stored value\n */\n\n WeakMapPolyfill.prototype.get = function (obj) {\n if (!isObject$1(obj)) {\n return undefined;\n }\n\n var meta$$1 = exports.peekMeta(obj),\n map,\n val;\n if (meta$$1 !== undefined) {\n map = meta$$1.readableWeak();\n\n if (map !== undefined) {\n val = map[this._id];\n\n if (val === UNDEFINED) {\n return undefined;\n }\n return val;\n }\n }\n };\n\n /*\n * @method set\n * @param key {Object | Function}\n * @param value {Any}\n * @return {WeakMap} the weak map\n */\n\n WeakMapPolyfill.prototype.set = function (obj, value) {\n if (!isObject$1(obj)) {\n throw new TypeError('Invalid value used as weak map key');\n }\n\n if (value === undefined) {\n value = UNDEFINED;\n }\n\n meta(obj).writableWeak()[this._id] = value;\n\n return this;\n };\n\n /*\n * @method has\n * @param key {Object | Function}\n * @return {boolean} if the key exists\n */\n\n WeakMapPolyfill.prototype.has = function (obj) {\n if (!isObject$1(obj)) {\n return false;\n }\n\n var meta$$1 = exports.peekMeta(obj),\n map;\n if (meta$$1 !== undefined) {\n map = meta$$1.readableWeak();\n\n if (map !== undefined) {\n return map[this._id] !== undefined;\n }\n }\n\n return false;\n };\n\n /*\n * @method delete\n * @param key {Object | Function}\n * @return {boolean} if the key was deleted\n */\n\n WeakMapPolyfill.prototype.delete = function (obj) {\n if (this.has(obj)) {\n delete exports.peekMeta(obj).writableWeak()[this._id];\n return true;\n } else {\n return false;\n }\n };\n\n /*\n * @method toString\n * @return {String}\n */\n\n WeakMapPolyfill.prototype.toString = function () {\n return '[object WeakMap]';\n };\n\n return WeakMapPolyfill;\n }();\n\n var weak_map = emberUtils.HAS_NATIVE_WEAKMAP ? WeakMap : WeakMapPolyfill;\n\n exports.runInTransaction = void 0;\n\n\n // detect-backtracking-rerender by default is debug build only\n // detect-glimmer-allow-backtracking-rerender can be enabled in custom builds\n {\n // in production do nothing to detect reflushes\n exports.runInTransaction = function (context$$1, methodName) {\n context$$1[methodName]();\n return false;\n };\n }\n\n /**\n @module ember\n @private\n */\n\n var PROPERTY_DID_CHANGE = emberUtils.symbol('PROPERTY_DID_CHANGE');\n\n var beforeObserverSet = new ObserverSet();\n var observerSet = new ObserverSet();\n var deferred = 0;\n\n // ..........................................................\n // PROPERTY CHANGES\n //\n\n /**\n This function is called just before an object property is about to change.\n It will notify any before observers and prepare caches among other things.\n \n Normally you will not need to call this method directly but if for some\n reason you can't directly watch a property you can invoke this method\n manually along with `Ember.propertyDidChange()` which you should call just\n after the property value changes.\n \n @method propertyWillChange\n @for Ember\n @param {Object} obj The object with the property that will change\n @param {String} keyName The property key (or path) that will change.\n @return {void}\n @private\n */\n function propertyWillChange(obj, keyName, _meta) {\n var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;\n if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {\n return;\n }\n\n var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;\n var possibleDesc = obj[keyName];\n var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n if (isDescriptor && possibleDesc.willChange) {\n possibleDesc.willChange(obj, keyName);\n }\n\n if (watching) {\n dependentKeysWillChange(obj, keyName, meta$$1);\n chainsWillChange(obj, keyName, meta$$1);\n notifyBeforeObservers(obj, keyName, meta$$1);\n }\n }\n\n /**\n This function is called just after an object property has changed.\n It will notify any observers and clear caches among other things.\n \n Normally you will not need to call this method directly but if for some\n reason you can't directly watch a property you can invoke this method\n manually along with `Ember.propertyWillChange()` which you should call just\n before the property value changes.\n \n @method propertyDidChange\n @for Ember\n @param {Object} obj The object with the property that will change\n @param {String} keyName The property key (or path) that will change.\n @param {Meta} meta The objects meta.\n @return {void}\n @private\n */\n function propertyDidChange(obj, keyName, _meta) {\n var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;\n var hasMeta = meta$$1 !== undefined;\n\n if (hasMeta && !meta$$1.isInitialized(obj)) {\n return;\n }\n\n var possibleDesc = obj[keyName];\n var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n // shouldn't this mean that we're watching this key?\n if (isDescriptor && possibleDesc.didChange) {\n possibleDesc.didChange(obj, keyName);\n }\n\n if (hasMeta && meta$$1.peekWatching(keyName) > 0) {\n dependentKeysDidChange(obj, keyName, meta$$1);\n chainsDidChange(obj, keyName, meta$$1);\n notifyObservers(obj, keyName, meta$$1);\n }\n\n if (obj[PROPERTY_DID_CHANGE]) {\n obj[PROPERTY_DID_CHANGE](keyName);\n }\n\n if (hasMeta) {\n if (meta$$1.isSourceDestroying()) {\n return;\n }\n markObjectAsDirty(meta$$1, keyName);\n }\n }\n\n var WILL_SEEN = void 0;\n var DID_SEEN = void 0;\n // called whenever a property is about to change to clear the cache of any dependent keys (and notify those properties of changes, etc...)\n function dependentKeysWillChange(obj, depKey, meta$$1) {\n if (meta$$1.isSourceDestroying() || !meta$$1.hasDeps(depKey)) {\n return;\n }\n var seen = WILL_SEEN;\n var top = !seen;\n\n if (top) {\n seen = WILL_SEEN = {};\n }\n\n iterDeps(propertyWillChange, obj, depKey, seen, meta$$1);\n\n if (top) {\n WILL_SEEN = null;\n }\n }\n\n // called whenever a property has just changed to update dependent keys\n function dependentKeysDidChange(obj, depKey, meta$$1) {\n if (meta$$1.isSourceDestroying() || !meta$$1.hasDeps(depKey)) {\n return;\n }\n var seen = DID_SEEN;\n var top = !seen;\n\n if (top) {\n seen = DID_SEEN = {};\n }\n\n iterDeps(propertyDidChange, obj, depKey, seen, meta$$1);\n\n if (top) {\n DID_SEEN = null;\n }\n }\n\n function iterDeps(method, obj, depKey, seen, meta$$1) {\n var possibleDesc = void 0,\n isDescriptor = void 0;\n var guid = emberUtils.guidFor(obj);\n var current = seen[guid];\n\n if (!current) {\n current = seen[guid] = {};\n }\n\n if (current[depKey]) {\n return;\n }\n\n current[depKey] = true;\n\n meta$$1.forEachInDeps(depKey, function (key, value) {\n if (!value) {\n return;\n }\n\n possibleDesc = obj[key];\n isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n if (isDescriptor && possibleDesc._suspended === obj) {\n return;\n }\n\n method(obj, key, meta$$1);\n });\n }\n\n function chainsWillChange(obj, keyName, meta$$1) {\n var chainWatchers = meta$$1.readableChainWatchers();\n if (chainWatchers !== undefined) {\n chainWatchers.notify(keyName, false, propertyWillChange);\n }\n }\n\n function chainsDidChange(obj, keyName, meta$$1) {\n var chainWatchers = meta$$1.readableChainWatchers();\n if (chainWatchers !== undefined) {\n chainWatchers.notify(keyName, true, propertyDidChange);\n }\n }\n\n function overrideChains(obj, keyName, meta$$1) {\n var chainWatchers = meta$$1.readableChainWatchers();\n if (chainWatchers !== undefined) {\n chainWatchers.revalidate(keyName);\n }\n }\n\n /**\n @method beginPropertyChanges\n @chainable\n @private\n */\n function beginPropertyChanges() {\n deferred++;\n }\n\n /**\n @method endPropertyChanges\n @private\n */\n function endPropertyChanges() {\n deferred--;\n if (deferred <= 0) {\n beforeObserverSet.clear();\n observerSet.flush();\n }\n }\n\n /**\n Make a series of property changes together in an\n exception-safe way.\n \n ```javascript\n Ember.changeProperties(function() {\n obj1.set('foo', mayBlowUpWhenSet);\n obj2.set('bar', baz);\n });\n ```\n \n @method changeProperties\n @param {Function} callback\n @param [binding]\n @private\n */\n function changeProperties(callback, binding) {\n beginPropertyChanges();\n try {\n callback.call(binding);\n } finally {\n endPropertyChanges();\n }\n }\n\n function indexOf(array, target, method) {\n var index = -1,\n i;\n // hashes are added to the end of the event array\n // so it makes sense to start searching at the end\n // of the array and search in reverse\n for (i = array.length - 3; i >= 0; i -= 3) {\n if (target === array[i] && method === array[i + 1]) {\n index = i;\n break;\n }\n }\n return index;\n }\n\n function accumulateListeners(obj, eventName, otherActions, meta$$1) {\n var actions = meta$$1.matchingListeners(eventName),\n i,\n target,\n method,\n flags,\n actionIndex;\n if (actions === undefined) {\n return;\n }\n var newActions = [];\n\n for (i = actions.length - 3; i >= 0; i -= 3) {\n target = actions[i];\n method = actions[i + 1];\n flags = actions[i + 2];\n actionIndex = indexOf(otherActions, target, method);\n\n\n if (actionIndex === -1) {\n otherActions.push(target, method, flags);\n newActions.push(target, method, flags);\n }\n }\n\n return newActions;\n }\n\n function notifyBeforeObservers(obj, keyName, meta$$1) {\n if (meta$$1.isSourceDestroying()) {\n return;\n }\n\n var eventName = keyName + ':before';\n var listeners = void 0,\n added = void 0;\n if (deferred > 0) {\n listeners = beforeObserverSet.add(obj, keyName, eventName);\n added = accumulateListeners(obj, eventName, listeners, meta$$1);\n }\n sendEvent(obj, eventName, [obj, keyName], added);\n }\n\n function notifyObservers(obj, keyName, meta$$1) {\n if (meta$$1.isSourceDestroying()) {\n return;\n }\n\n var eventName = keyName + ':change';\n var listeners = void 0;\n if (deferred > 0) {\n listeners = observerSet.add(obj, keyName, eventName);\n accumulateListeners(obj, eventName, listeners, meta$$1);\n } else {\n sendEvent(obj, eventName, [obj, keyName]);\n }\n }\n\n /**\n @module @ember/object\n */\n\n // ..........................................................\n // DESCRIPTOR\n //\n\n /**\n Objects of this type can implement an interface to respond to requests to\n get and set. The default implementation handles simple properties.\n \n @class Descriptor\n @private\n */\n function Descriptor() {\n this.isDescriptor = true;\n }\n\n (function () {\n // https://github.com/spalger/kibana/commit/b7e35e6737df585585332857a4c397dc206e7ff9\n var a = Object.create(Object.prototype, {\n prop: {\n configurable: true,\n value: 1\n }\n });\n\n Object.defineProperty(a, 'prop', {\n configurable: true,\n value: 2\n });\n\n return a.prop === 2;\n })();\n // ..........................................................\n // DEFINING PROPERTIES API\n //\n\n\n /**\n NOTE: This is a low-level method used by other parts of the API. You almost\n never want to call this method directly. Instead you should use\n `mixin()` to define new properties.\n \n Defines a property on an object. This method works much like the ES5\n `Object.defineProperty()` method except that it can also accept computed\n properties and other special descriptors.\n \n Normally this method takes only three parameters. However if you pass an\n instance of `Descriptor` as the third param then you can pass an\n optional value as the fourth parameter. This is often more efficient than\n creating new descriptor hashes for each property.\n \n ## Examples\n \n ```javascript\n import { defineProperty, computed } from '@ember/object';\n \n // ES5 compatible mode\n defineProperty(contact, 'firstName', {\n writable: true,\n configurable: false,\n enumerable: true,\n value: 'Charles'\n });\n \n // define a simple property\n defineProperty(contact, 'lastName', undefined, 'Jolley');\n \n // define a computed property\n defineProperty(contact, 'fullName', computed('firstName', 'lastName', function() {\n return this.firstName+' '+this.lastName;\n }));\n ```\n \n @private\n @method defineProperty\n @for @ember/object\n @param {Object} obj the object to define this property on. This may be a prototype.\n @param {String} keyName the name of the property\n @param {Descriptor} [desc] an instance of `Descriptor` (typically a\n computed property) or an ES5 descriptor.\n You must provide this or `data` but not both.\n @param {*} [data] something other than a descriptor, that will\n become the explicit value of this property.\n */\n\n\n function defineProperty(obj, keyName, desc, data, meta$$1) {\n if (meta$$1 === undefined) {\n meta$$1 = meta(obj);\n }\n\n var watchEntry = meta$$1.peekWatching(keyName);\n var watching = watchEntry !== undefined && watchEntry > 0;\n var possibleDesc = obj[keyName];\n var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n if (isDescriptor) {\n possibleDesc.teardown(obj, keyName, meta$$1);\n }\n\n var value = void 0;\n if (desc instanceof Descriptor) {\n value = desc;\n {\n obj[keyName] = value;\n }\n\n didDefineComputedProperty(obj.constructor);\n\n if (typeof desc.setup === 'function') {\n desc.setup(obj, keyName);\n }\n } else if (desc === undefined || desc === null) {\n value = data;\n\n {\n obj[keyName] = data;\n }\n } else {\n value = desc;\n\n // fallback to ES5\n Object.defineProperty(obj, keyName, desc);\n }\n\n // if key is being watched, override chains that\n // were initialized with the prototype\n if (watching) {\n overrideChains(obj, keyName, meta$$1);\n }\n\n // The `value` passed to the `didDefineProperty` hook is\n // either the descriptor or data, whichever was passed.\n if (typeof obj.didDefineProperty === 'function') {\n obj.didDefineProperty(obj, keyName, value);\n }\n\n return this;\n }\n\n var hasCachedComputedProperties = false;\n\n\n function didDefineComputedProperty(constructor) {\n if (hasCachedComputedProperties === false) {\n return;\n }\n var cache = meta(constructor).readableCache();\n\n if (cache && cache._computedProperties !== undefined) {\n cache._computedProperties = undefined;\n }\n }\n\n function watchKey(obj, keyName, _meta) {\n if (typeof obj !== 'object' || obj === null) {\n return;\n }\n\n var meta$$1 = _meta === undefined ? meta(obj) : _meta,\n possibleDesc,\n isDescriptor;\n var count = meta$$1.peekWatching(keyName) || 0;\n meta$$1.writeWatching(keyName, count + 1);\n\n if (count === 0) {\n // activate watching first time\n possibleDesc = obj[keyName];\n isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n if (isDescriptor && possibleDesc.willWatch) {\n possibleDesc.willWatch(obj, keyName, meta$$1);\n }\n\n if (typeof obj.willWatchProperty === 'function') {\n obj.willWatchProperty(keyName);\n }\n }\n }\n\n function unwatchKey(obj, keyName, _meta) {\n if (typeof obj !== 'object' || obj === null) {\n return;\n }\n var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta,\n possibleDesc,\n isDescriptor;\n\n // do nothing of this object has already been destroyed\n if (meta$$1 === undefined || meta$$1.isSourceDestroyed()) {\n return;\n }\n\n var count = meta$$1.peekWatching(keyName);\n if (count === 1) {\n meta$$1.writeWatching(keyName, 0);\n\n possibleDesc = obj[keyName];\n isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;\n\n\n if (isDescriptor && possibleDesc.didUnwatch) {\n possibleDesc.didUnwatch(obj, keyName, meta$$1);\n }\n\n if (typeof obj.didUnwatchProperty === 'function') {\n obj.didUnwatchProperty(keyName);\n }\n } else if (count > 1) {\n meta$$1.writeWatching(keyName, count - 1);\n }\n }\n\n function makeChainNode(obj) {\n return new ChainNode(null, null, obj);\n }\n\n function watchPath(obj, keyPath, meta$$1) {\n if (typeof obj !== 'object' || obj === null) {\n return;\n }\n var m = meta$$1 === undefined ? meta(obj) : meta$$1;\n var counter = m.peekWatching(keyPath) || 0;\n\n m.writeWatching(keyPath, counter + 1);\n if (counter === 0) {\n // activate watching first time\n m.writableChains(makeChainNode).add(keyPath);\n }\n }\n\n function unwatchPath(obj, keyPath, meta$$1) {\n if (typeof obj !== 'object' || obj === null) {\n return;\n }\n var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;\n\n if (m === undefined) {\n return;\n }\n var counter = m.peekWatching(keyPath) || 0;\n\n if (counter === 1) {\n m.writeWatching(keyPath, 0);\n m.writableChains(makeChainNode).remove(keyPath);\n } else if (counter > 1) {\n m.writeWatching(keyPath, counter - 1);\n }\n }\n\n var FIRST_KEY = /^([^\\.]+)/;\n\n function firstKey(path) {\n return path.match(FIRST_KEY)[0];\n }\n\n function isObject(obj) {\n return typeof obj === 'object' && obj !== null;\n }\n\n function isVolatile(obj) {\n return !(isObject(obj) && obj.isDescriptor && obj._volatile === false);\n }\n\n var ChainWatchers = function () {\n function ChainWatchers() {\n\n // chain nodes that reference a key in this obj by key\n // we only create ChainWatchers when we are going to add them\n // so create this upfront\n this.chains = Object.create(null);\n }\n\n ChainWatchers.prototype.add = function (key, node) {\n var nodes = this.chains[key];\n if (nodes === undefined) {\n this.chains[key] = [node];\n } else {\n nodes.push(node);\n }\n };\n\n ChainWatchers.prototype.remove = function (key, node) {\n var nodes = this.chains[key],\n i;\n if (nodes !== undefined) {\n for (i = 0; i < nodes.length; i++) {\n if (nodes[i] === node) {\n nodes.splice(i, 1);\n break;\n }\n }\n }\n };\n\n ChainWatchers.prototype.has = function (key, node) {\n var nodes = this.chains[key],\n i;\n if (nodes !== undefined) {\n for (i = 0; i < nodes.length; i++) {\n if (nodes[i] === node) {\n return true;\n }\n }\n }\n return false;\n };\n\n ChainWatchers.prototype.revalidateAll = function () {\n for (var key in this.chains) {\n this.notify(key, true, undefined);\n }\n };\n\n ChainWatchers.prototype.revalidate = function (key) {\n this.notify(key, true, undefined);\n };\n\n // key: the string key that is part of a path changed\n // revalidate: boolean; the chains that are watching this value should revalidate\n // callback: function that will be called with the object and path that\n // will be/are invalidated by this key change, depending on\n // whether the revalidate flag is passed\n\n\n ChainWatchers.prototype.notify = function (key, revalidate, callback) {\n var nodes = this.chains[key],\n i,\n _i,\n obj,\n path;\n if (nodes === undefined || nodes.length === 0) {\n return;\n }\n\n var affected = void 0;\n\n if (callback) {\n affected = [];\n }\n\n for (i = 0; i < nodes.length; i++) {\n nodes[i].notify(revalidate, affected);\n }\n\n if (callback === undefined) {\n return;\n }\n\n // we gather callbacks so we don't notify them during revalidation\n for (_i = 0; _i < affected.length; _i += 2) {\n obj = affected[_i];\n path = affected[_i + 1];\n\n callback(obj, path);\n }\n };\n\n return ChainWatchers;\n }();\n\n function makeChainWatcher() {\n return new ChainWatchers();\n }\n\n function addChainWatcher(obj, keyName, node) {\n var m = meta(obj);\n m.writableChainWatchers(makeChainWatcher).add(keyName, node);\n watchKey(obj, keyName, m);\n }\n\n function removeChainWatcher(obj, keyName, node, _meta) {\n if (!isObject(obj)) {\n return;\n }\n\n var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;\n\n if (meta$$1 === undefined || meta$$1.readableChainWatchers() === undefined) {\n return;\n }\n\n // make meta writable\n meta$$1 = meta(obj);\n\n meta$$1.readableChainWatchers().remove(keyName, node);\n\n unwatchKey(obj, keyName, meta$$1);\n }\n\n // A ChainNode watches a single key on an object. If you provide a starting\n // value for the key then the node won't actually watch it. For a root node\n // pass null for parent and key and object for value.\n\n var ChainNode = function () {\n function ChainNode(parent, key, value) {\n\n this._parent = parent;\n this._key = key;\n\n // _watching is true when calling get(this._parent, this._key) will\n // return the value of this node.\n //\n // It is false for the root of a chain (because we have no parent)\n // and for global paths (because the parent node is the object with\n // the observer on it)\n var isWatching = this._watching = value === undefined,\n obj;\n\n this._chains = undefined;\n this._object = undefined;\n this.count = 0;\n\n this._value = value;\n this._paths = undefined;\n if (isWatching) {\n obj = parent.value();\n\n\n if (!isObject(obj)) {\n return;\n }\n\n this._object = obj;\n\n addChainWatcher(this._object, this._key, this);\n }\n }\n\n ChainNode.prototype.value = function () {\n var obj;\n\n if (this._value === undefined && this._watching) {\n obj = this._parent.value();\n\n this._value = lazyGet(obj, this._key);\n }\n return this._value;\n };\n\n ChainNode.prototype.destroy = function () {\n if (this._watching) {\n removeChainWatcher(this._object, this._key, this);\n this._watching = false; // so future calls do nothing\n }\n };\n\n // copies a top level object only\n\n\n ChainNode.prototype.copy = function (obj) {\n var ret = new ChainNode(null, null, obj),\n path;\n var paths = this._paths;\n if (paths !== undefined) {\n path = void 0;\n\n for (path in paths) {\n if (paths[path] > 0) {\n ret.add(path);\n }\n }\n }\n return ret;\n };\n\n // called on the root node of a chain to setup watchers on the specified\n // path.\n\n\n ChainNode.prototype.add = function (path) {\n var paths = this._paths || (this._paths = {});\n paths[path] = (paths[path] || 0) + 1;\n\n var key = firstKey(path);\n var tail = path.slice(key.length + 1);\n\n this.chain(key, tail);\n };\n\n // called on the root node of a chain to teardown watcher on the specified\n // path\n\n\n ChainNode.prototype.remove = function (path) {\n var paths = this._paths;\n if (paths === undefined) {\n return;\n }\n if (paths[path] > 0) {\n paths[path]--;\n }\n\n var key = firstKey(path);\n var tail = path.slice(key.length + 1);\n\n this.unchain(key, tail);\n };\n\n ChainNode.prototype.chain = function (key, path) {\n var chains = this._chains;\n var node = void 0;\n if (chains === undefined) {\n chains = this._chains = Object.create(null);\n } else {\n node = chains[key];\n }\n\n if (node === undefined) {\n node = chains[key] = new ChainNode(this, key, undefined);\n }\n\n node.count++; // count chains...\n\n // chain rest of path if there is one\n if (path) {\n key = firstKey(path);\n path = path.slice(key.length + 1);\n node.chain(key, path);\n }\n };\n\n ChainNode.prototype.unchain = function (key, path) {\n var chains = this._chains,\n nextKey,\n nextPath;\n var node = chains[key];\n\n // unchain rest of path first...\n if (path && path.length > 1) {\n nextKey = firstKey(path);\n nextPath = path.slice(nextKey.length + 1);\n\n node.unchain(nextKey, nextPath);\n }\n\n // delete node if needed.\n node.count--;\n if (node.count <= 0) {\n chains[node._key] = undefined;\n node.destroy();\n }\n };\n\n ChainNode.prototype.notify = function (revalidate, affected) {\n if (revalidate && this._watching) {\n parentValue = this._parent.value();\n\n\n if (parentValue !== this._object) {\n removeChainWatcher(this._object, this._key, this);\n\n if (isObject(parentValue)) {\n this._object = parentValue;\n addChainWatcher(parentValue, this._key, this);\n } else {\n this._object = undefined;\n }\n }\n this._value = undefined;\n }\n\n // then notify chains...\n var chains = this._chains,\n parentValue,\n node;\n if (chains !== undefined) {\n node = void 0;\n\n for (var key in chains) {\n node = chains[key];\n if (node !== undefined) {\n node.notify(revalidate, affected);\n }\n }\n }\n\n if (affected && this._parent) {\n this._parent.populateAffected(this._key, 1, affected);\n }\n };\n\n ChainNode.prototype.populateAffected = function (path, depth, affected) {\n if (this._key) {\n path = this._key + '.' + path;\n }\n\n if (this._parent) {\n this._parent.populateAffected(path, depth + 1, affected);\n } else if (depth > 1) {\n affected.push(this.value(), path);\n }\n };\n\n return ChainNode;\n }();\n\n function lazyGet(obj, key) {\n if (!isObject(obj)) {\n return;\n }\n\n var meta$$1 = exports.peekMeta(obj),\n cache;\n\n // check if object meant only to be a prototype\n if (meta$$1 !== undefined && meta$$1.proto === obj) {\n return;\n }\n\n // Use `get` if the return value is an EachProxy or an uncacheable value.\n if (isVolatile(obj[key])) {\n return get(obj, key);\n // Otherwise attempt to get the cached value of the computed property\n } else {\n cache = meta$$1.readableCache();\n\n if (cache !== undefined) {\n return cacheFor.get(cache, key);\n }\n }\n }\n\n /**\n @module ember\n */\n\n var UNDEFINED = emberUtils.symbol('undefined');\n\n // FLAGS\n var SOURCE_DESTROYING = 1 << 1;\n var SOURCE_DESTROYED = 1 << 2;\n var META_DESTROYED = 1 << 3;\n var IS_PROXY = 1 << 4;\n\n var META_FIELD = '__ember_meta__';\n var NODE_STACK = [];\n\n var Meta = function () {\n function Meta(obj, parentMeta) {\n\n this._cache = undefined;\n this._weak = undefined;\n this._watching = undefined;\n this._mixins = undefined;\n this._bindings = undefined;\n this._values = undefined;\n this._deps = undefined;\n this._chainWatchers = undefined;\n this._chains = undefined;\n this._tag = undefined;\n this._tags = undefined;\n this._factory = undefined;\n\n // initial value for all flags right now is false\n // see FLAGS const for detailed list of flags used\n this._flags = 0;\n\n // used only internally\n this.source = obj;\n\n // when meta(obj).proto === obj, the object is intended to be only a\n // prototype and doesn't need to actually be observable itself\n this.proto = undefined;\n\n // The next meta in our inheritance chain. We (will) track this\n // explicitly instead of using prototypical inheritance because we\n // have detailed knowledge of how each property should really be\n // inherited, and we can optimize it much better than JS runtimes.\n this.parent = parentMeta;\n\n this._listeners = undefined;\n this._listenersFinalized = false;\n this._suspendedListeners = undefined;\n }\n\n Meta.prototype.isInitialized = function (obj) {\n return this.proto !== obj;\n };\n\n Meta.prototype.destroy = function () {\n if (this.isMetaDestroyed()) {\n return;\n }\n\n // remove chainWatchers to remove circular references that would prevent GC\n var nodes = void 0,\n key = void 0,\n nodeObject = void 0,\n foreignMeta;\n var node = this.readableChains();\n if (node !== undefined) {\n NODE_STACK.push(node);\n // process tree\n while (NODE_STACK.length > 0) {\n node = NODE_STACK.pop();\n // push children\n nodes = node._chains;\n if (nodes !== undefined) {\n for (key in nodes) {\n if (nodes[key] !== undefined) {\n NODE_STACK.push(nodes[key]);\n }\n }\n }\n\n // remove chainWatcher in node object\n if (node._watching) {\n nodeObject = node._object;\n if (nodeObject !== undefined) {\n foreignMeta = exports.peekMeta(nodeObject);\n // avoid cleaning up chain watchers when both current and\n // foreign objects are being destroyed\n // if both are being destroyed manual cleanup is not needed\n // as they will be GC'ed and no non-destroyed references will\n // be remaining\n\n if (foreignMeta && !foreignMeta.isSourceDestroying()) {\n removeChainWatcher(nodeObject, node._key, node, foreignMeta);\n }\n }\n }\n }\n }\n\n this.setMetaDestroyed();\n };\n\n Meta.prototype.isSourceDestroying = function () {\n return (this._flags & SOURCE_DESTROYING) !== 0;\n };\n\n Meta.prototype.setSourceDestroying = function () {\n this._flags |= SOURCE_DESTROYING;\n };\n\n Meta.prototype.isSourceDestroyed = function () {\n return (this._flags & SOURCE_DESTROYED) !== 0;\n };\n\n Meta.prototype.setSourceDestroyed = function () {\n this._flags |= SOURCE_DESTROYED;\n };\n\n Meta.prototype.isMetaDestroyed = function () {\n return (this._flags & META_DESTROYED) !== 0;\n };\n\n Meta.prototype.setMetaDestroyed = function () {\n this._flags |= META_DESTROYED;\n };\n\n Meta.prototype.isProxy = function () {\n return (this._flags & IS_PROXY) !== 0;\n };\n\n Meta.prototype.setProxy = function () {\n this._flags |= IS_PROXY;\n };\n\n Meta.prototype._getOrCreateOwnMap = function (key) {\n return this[key] || (this[key] = Object.create(null));\n };\n\n Meta.prototype._getInherited = function (key) {\n var pointer = this,\n map;\n while (pointer !== undefined) {\n map = pointer[key];\n\n if (map !== undefined) {\n return map;\n }\n pointer = pointer.parent;\n }\n };\n\n Meta.prototype._findInherited = function (key, subkey) {\n var pointer = this,\n map,\n value;\n while (pointer !== undefined) {\n map = pointer[key];\n\n if (map !== undefined) {\n value = map[subkey];\n\n if (value !== undefined) {\n return value;\n }\n }\n pointer = pointer.parent;\n }\n };\n\n // Implements a member that provides a lazily created map of maps,\n // with inheritance at both levels.\n\n\n Meta.prototype.writeDeps = function (subkey, itemkey, value) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot modify dependent keys for `' + itemkey + '` on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var outerMap = this._getOrCreateOwnMap('_deps');\n var innerMap = outerMap[subkey];\n if (innerMap === undefined) {\n innerMap = outerMap[subkey] = Object.create(null);\n }\n innerMap[itemkey] = value;\n };\n\n Meta.prototype.peekDeps = function (subkey, itemkey) {\n var pointer = this,\n map,\n value,\n itemvalue;\n while (pointer !== undefined) {\n map = pointer._deps;\n\n if (map !== undefined) {\n value = map[subkey];\n\n if (value !== undefined) {\n itemvalue = value[itemkey];\n\n if (itemvalue !== undefined) {\n return itemvalue;\n }\n }\n }\n pointer = pointer.parent;\n }\n };\n\n Meta.prototype.hasDeps = function (subkey) {\n var pointer = this,\n deps;\n while (pointer !== undefined) {\n deps = pointer._deps;\n\n if (deps !== undefined && deps[subkey] !== undefined) {\n return true;\n }\n pointer = pointer.parent;\n }\n return false;\n };\n\n Meta.prototype.forEachInDeps = function (subkey, fn) {\n return this._forEachIn('_deps', subkey, fn);\n };\n\n Meta.prototype._forEachIn = function (key, subkey, fn) {\n var pointer = this,\n map,\n innerMap,\n i;\n var seen = void 0;\n var calls = void 0;\n while (pointer !== undefined) {\n map = pointer[key];\n\n if (map !== undefined) {\n innerMap = map[subkey];\n\n if (innerMap !== undefined) {\n for (var innerKey in innerMap) {\n seen = seen || Object.create(null);\n if (seen[innerKey] === undefined) {\n seen[innerKey] = true;\n calls = calls || [];\n calls.push(innerKey, innerMap[innerKey]);\n }\n }\n }\n }\n pointer = pointer.parent;\n }\n\n if (calls !== undefined) {\n for (i = 0; i < calls.length; i += 2) {\n fn(calls[i], calls[i + 1]);\n }\n }\n };\n\n Meta.prototype.writableCache = function () {\n return this._getOrCreateOwnMap('_cache');\n };\n\n Meta.prototype.readableCache = function () {\n return this._cache;\n };\n\n Meta.prototype.writableWeak = function () {\n return this._getOrCreateOwnMap('_weak');\n };\n\n Meta.prototype.readableWeak = function () {\n return this._weak;\n };\n\n Meta.prototype.writableTags = function () {\n return this._getOrCreateOwnMap('_tags');\n };\n\n Meta.prototype.readableTags = function () {\n return this._tags;\n };\n\n Meta.prototype.writableTag = function (create) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot create a new tag for `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var ret = this._tag;\n if (ret === undefined) {\n ret = this._tag = create(this.source);\n }\n return ret;\n };\n\n Meta.prototype.readableTag = function () {\n return this._tag;\n };\n\n Meta.prototype.writableChainWatchers = function (create) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot create a new chain watcher for `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var ret = this._chainWatchers;\n if (ret === undefined) {\n ret = this._chainWatchers = create(this.source);\n }\n return ret;\n };\n\n Meta.prototype.readableChainWatchers = function () {\n return this._chainWatchers;\n };\n\n Meta.prototype.writableChains = function (create) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot create a new chains for `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var ret = this._chains;\n if (ret === undefined) {\n if (this.parent === undefined) {\n ret = create(this.source);\n } else {\n ret = this.parent.writableChains(create).copy(this.source);\n }\n this._chains = ret;\n }\n return ret;\n };\n\n Meta.prototype.readableChains = function () {\n return this._getInherited('_chains');\n };\n\n Meta.prototype.writeWatching = function (subkey, value) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot update watchers for `' + subkey + '` on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var map = this._getOrCreateOwnMap('_watching');\n map[subkey] = value;\n };\n\n Meta.prototype.peekWatching = function (subkey) {\n return this._findInherited('_watching', subkey);\n };\n\n Meta.prototype.writeMixins = function (subkey, value) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot add mixins for `' + subkey + '` on `' + emberUtils.toString(this.source) + '` call writeMixins after it has been destroyed.', !this.isMetaDestroyed());\n\n var map = this._getOrCreateOwnMap('_mixins');\n map[subkey] = value;\n };\n\n Meta.prototype.peekMixins = function (subkey) {\n return this._findInherited('_mixins', subkey);\n };\n\n Meta.prototype.forEachMixins = function (fn) {\n var pointer = this,\n map;\n var seen = void 0;\n while (pointer !== undefined) {\n map = pointer._mixins;\n\n if (map !== undefined) {\n for (var key in map) {\n seen = seen || Object.create(null);\n if (seen[key] === undefined) {\n seen[key] = true;\n fn(key, map[key]);\n }\n }\n }\n pointer = pointer.parent;\n }\n };\n\n Meta.prototype.writeBindings = function (subkey, value) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot add a binding for `' + subkey + '` on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var map = this._getOrCreateOwnMap('_bindings');\n map[subkey] = value;\n };\n\n Meta.prototype.peekBindings = function (subkey) {\n return this._findInherited('_bindings', subkey);\n };\n\n Meta.prototype.forEachBindings = function (fn) {\n var pointer = this,\n map;\n var seen = void 0;\n while (pointer !== undefined) {\n map = pointer._bindings;\n\n if (map !== undefined) {\n for (var key in map) {\n seen = seen || Object.create(null);\n if (seen[key] === undefined) {\n seen[key] = true;\n fn(key, map[key]);\n }\n }\n }\n pointer = pointer.parent;\n }\n };\n\n Meta.prototype.clearBindings = function () {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot clear bindings on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n this._bindings = undefined;\n };\n\n Meta.prototype.writeValues = function (subkey, value) {\n false && !!this.isMetaDestroyed() && emberDebug.assert('Cannot set the value of `' + subkey + '` on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());\n\n var map = this._getOrCreateOwnMap('_values');\n map[subkey] = value;\n };\n\n Meta.prototype.peekValues = function (subkey) {\n return this._findInherited('_values', subkey);\n };\n\n Meta.prototype.deleteFromValues = function (subkey) {\n delete this._getOrCreateOwnMap('_values')[subkey];\n };\n\n emberBabel.createClass(Meta, [{\n key: 'factory',\n set: function (factory) {\n this._factory = factory;\n },\n get: function () {\n return this._factory;\n }\n }]);\n\n return Meta;\n }();\n\n for (var name in protoMethods) {\n Meta.prototype[name] = protoMethods[name];\n }\n\n var META_DESC = {\n writable: true,\n configurable: true,\n enumerable: false,\n value: null\n };\n\n var EMBER_META_PROPERTY = {\n name: META_FIELD,\n descriptor: META_DESC\n };\n\n var setMeta = void 0;\n exports.peekMeta = void 0;\n\n // choose the one appropriate for given platform\n if (emberUtils.HAS_NATIVE_WEAKMAP) {\n getPrototypeOf = Object.getPrototypeOf;\n metaStore = new WeakMap();\n\n\n setMeta = function (obj, meta) {\n metaStore.set(obj, meta);\n };\n\n exports.peekMeta = function (obj) {\n var pointer = obj;\n var meta = void 0;\n while (pointer !== undefined && pointer !== null) {\n meta = metaStore.get(pointer);\n // jshint loopfunc:true\n if (meta !== undefined) {\n return meta;\n }\n\n pointer = getPrototypeOf(pointer);\n }\n };\n } else {\n setMeta = function (obj, meta) {\n if (obj.__defineNonEnumerable) {\n obj.__defineNonEnumerable(EMBER_META_PROPERTY);\n } else {\n Object.defineProperty(obj, META_FIELD, META_DESC);\n }\n\n obj[META_FIELD] = meta;\n };\n\n exports.peekMeta = function (obj) {\n return obj[META_FIELD];\n };\n }\n\n /**\n Tears down the meta on an object so that it can be garbage collected.\n Multiple calls will have no effect.\n \n @method deleteMeta\n @for Ember\n @param {Object} obj the object to destroy\n @return {void}\n @private\n */\n\n\n /**\n Retrieves the meta hash for an object. If `writable` is true ensures the\n hash is writable for this object as well.\n \n The meta object contains information about computed property descriptors as\n well as any watched properties and other information. You generally will\n not access this information directly but instead work with higher level\n methods that manipulate this hash indirectly.\n \n @method meta\n @for Ember\n @private\n \n @param {Object} obj The object to retrieve meta for\n @param {Boolean} [writable=true] Pass `false` if you do not intend to modify\n the meta hash, allowing the method to avoid making an unnecessary copy.\n @return {Object} the meta hash for an object\n */\n function meta(obj) {\n var maybeMeta = exports.peekMeta(obj);\n var parent = void 0;\n\n // remove this code, in-favor of explicit parent\n if (maybeMeta !== undefined) {\n if (maybeMeta.source === obj) {\n return maybeMeta;\n }\n parent = maybeMeta;\n }\n\n var newMeta = new Meta(obj, parent);\n setMeta(obj, newMeta);\n return newMeta;\n }\n\n var Cache = function () {\n function Cache(limit, func, key, store) {\n\n this.size = 0;\n this.misses = 0;\n this.hits = 0;\n this.limit = limit;\n this.func = func;\n this.key = key;\n this.store = store || new DefaultStore();\n }\n\n Cache.prototype.get = function (obj) {\n var key = this.key === undefined ? obj : this.key(obj);\n var value = this.store.get(key);\n if (value === undefined) {\n this.misses++;\n value = this._set(key, this.func(obj));\n } else if (value === UNDEFINED) {\n this.hits++;\n value = undefined;\n } else {\n this.hits++;\n // nothing to translate\n }\n\n return value;\n };\n\n Cache.prototype.set = function (obj, value) {\n var key = this.key === undefined ? obj : this.key(obj);\n return this._set(key, value);\n };\n\n Cache.prototype._set = function (key, value) {\n if (this.limit > this.size) {\n this.size++;\n if (value === undefined) {\n this.store.set(key, UNDEFINED);\n } else {\n this.store.set(key, value);\n }\n }\n\n return value;\n };\n\n Cache.prototype.purge = function () {\n this.store.clear();\n this.size = 0;\n this.hits = 0;\n this.misses = 0;\n };\n\n return Cache;\n }();\n\n var DefaultStore = function () {\n function DefaultStore() {\n\n this.data = Object.create(null);\n }\n\n DefaultStore.prototype.get = function (key) {\n return this.data[key];\n };\n\n DefaultStore.prototype.set = function (key, value) {\n this.data[key] = value;\n };\n\n DefaultStore.prototype.clear = function () {\n this.data = Object.create(null);\n };\n\n return DefaultStore;\n }();\n\n var IS_GLOBAL_PATH = /^[A-Z$].*[\\.]/;\n\n var isGlobalPathCache = new Cache(1000, function (key) {\n return IS_GLOBAL_PATH.test(key);\n });\n var firstDotIndexCache = new Cache(1000, function (key) {\n return key.indexOf('.');\n });\n\n var firstKeyCache = new Cache(1000, function (path) {\n var index = firstDotIndexCache.get(path);\n return index === -1 ? path : path.slice(0, index);\n });\n\n var tailPathCache = new Cache(1000, function (path) {\n var index = firstDotIndexCache.get(path);\n return index === -1 ? undefined : path.slice(index + 1);\n });\n\n function isGlobalPath(path) {\n return isGlobalPathCache.get(path);\n }\n\n function isPath(path) {\n return firstDotIndexCache.get(path) !== -1;\n }\n\n function getFirstKey(path) {\n return firstKeyCache.get(path);\n }\n\n function getTailPath(path) {\n return tailPathCache.get(path);\n }\n\n /**\n @module @ember/object\n */\n\n var ALLOWABLE_TYPES = {\n object: true,\n function: true,\n string: true\n };\n\n // ..........................................................\n // GET AND SET\n //\n // If we are on a platform that supports accessors we can use those.\n // Otherwise simulate accessors by looking up the property directly on the\n // object.\n\n /**\n Gets the value of a property on an object. If the property is computed,\n the function will be invoked. If the property is not defined but the\n object implements the `unknownProperty` method then that will be invoked.\n \n ```javascript\n Ember.get(obj, \"name\");\n ```\n \n If you plan to run on IE8 and older browsers then you should use this\n method anytime you want to retrieve a property on an object that you don't\n know for sure is private. (Properties beginning with an underscore '_'\n are considered private.)\n \n On all newer browsers, you only need to use this method to retrieve\n properties if the property might not be defined on the object and you want\n to respect the `unknownProperty` handler. Otherwise you can ignore this\n method.\n \n Note that if the object itself is `undefined`, this method will throw\n an error.\n \n @method get\n @for @ember/object\n @static\n @param {Object} obj The object to retrieve from.\n @param {String} keyName The property key to retrieve\n @return {Object} the property value or `null`.\n @public\n */\n function get(obj, keyName) {\n false && !(arguments.length === 2) && emberDebug.assert('Get must be called with two arguments; an object and a property key', arguments.length === 2);\n false && !(obj !== undefined && obj !== null) && emberDebug.assert('Cannot call get with \\'' + keyName + '\\' on an undefined object.', obj !== undefined && obj !== null);\n false && !(typeof keyName === 'string') && emberDebug.assert('The key provided to get must be a string, you passed ' + keyName, typeof keyName === 'string');\n false && !(keyName.lastIndexOf('this.', 0) !== 0) && emberDebug.assert('\\'this\\' in paths is not supported', keyName.lastIndexOf('this.', 0) !== 0);\n false && !(keyName !== '') && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');\n\n var value = obj[keyName];\n var isDescriptor = value !== null && typeof value === 'object' && value.isDescriptor;\n\n if (isDescriptor) {\n return value.get(obj, keyName);\n } else if (isPath(keyName)) {\n return _getPath(obj, keyName);\n } else if (value === undefined && 'object' === typeof obj && !(keyName in obj) && typeof obj.unknownProperty === 'function') {\n return obj.unknownProperty(keyName);\n } else {\n return value;\n }\n }\n\n function _getPath(root, path) {\n var obj = root,\n i;\n var parts = path.split('.');\n\n for (i = 0; i < parts.length; i++) {\n if (!isGettable(obj)) {\n return undefined;\n }\n\n obj = get(obj, parts[i]);\n\n if (obj && obj.isDestroyed) {\n return undefined;\n }\n }\n\n return obj;\n }\n\n function isGettable(obj) {\n return obj !== undefined && obj !== null && ALLOWABLE_TYPES[typeof obj];\n }\n\n /**\n Retrieves the value of a property from an Object, or a default value in the\n case that the property returns `undefined`.\n \n ```javascript\n Ember.getWithDefault(person, 'lastName', 'Doe');\n ```\n \n @method getWithDefault\n @for @ember/object\n @static\n @param {Object} obj The object to retrieve from.\n @param {String} keyName The name of the property to retrieve\n @param {Object} defaultValue The value to return if the property value is undefined\n @return {Object} The property value or the defaultValue.\n @public\n */\n\n\n /**\n @module @ember/object\n */\n /**\n Sets the value of a property on an object, respecting computed properties\n and notifying observers and other listeners of the change. If the\n property is not defined but the object implements the `setUnknownProperty`\n method then that will be invoked as well.\n \n ```javascript\n Ember.set(obj, \"name\", value);\n ```\n \n @method set\n @static\n @for @ember/object\n @param {Object} obj The object to modify.\n @param {String} keyName The property key to set\n @param {Object} value The value to set\n @return {Object} the passed value.\n @public\n */\n function set(obj, keyName, value, tolerant) {\n false && !(arguments.length === 3 || arguments.length === 4) && emberDebug.assert('Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false', arguments.length === 3 || arguments.length === 4);\n false && !(obj && typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call set with \\'' + keyName + '\\' on an undefined object.', obj && typeof obj === 'object' || typeof obj === 'function');\n false && !(typeof keyName === 'string') && emberDebug.assert('The key provided to set must be a string, you passed ' + keyName, typeof keyName === 'string');\n false && !(keyName.lastIndexOf('this.', 0) !== 0) && emberDebug.assert('\\'this\\' in paths is not supported', keyName.lastIndexOf('this.', 0) !== 0);\n false && !!obj.isDestroyed && emberDebug.assert('calling set on destroyed object: ' + emberUtils.toString(obj) + '.' + keyName + ' = ' + emberUtils.toString(value), !obj.isDestroyed);\n\n if (isPath(keyName)) {\n return setPath(obj, keyName, value, tolerant);\n }\n\n var currentValue = obj[keyName],\n meta$$1;\n var isDescriptor = currentValue !== null && typeof currentValue === 'object' && currentValue.isDescriptor;\n\n if (isDescriptor) {\n /* computed property */\n currentValue.set(obj, keyName, value);\n } else if (currentValue === undefined && 'object' === typeof obj && !(keyName in obj) && typeof obj.setUnknownProperty === 'function') {\n /* unknown property */\n obj.setUnknownProperty(keyName, value);\n } else if (!(currentValue === value)) {\n meta$$1 = exports.peekMeta(obj);\n\n propertyWillChange(obj, keyName, meta$$1);\n\n {\n obj[keyName] = value;\n }\n\n propertyDidChange(obj, keyName, meta$$1);\n }\n\n return value;\n }\n\n function setPath(root, path, value, tolerant) {\n var parts = path.split('.');\n var keyName = parts.pop();\n\n false && !(keyName.trim().length > 0) && emberDebug.assert('Property set failed: You passed an empty path', keyName.trim().length > 0);\n\n var newPath = parts.join('.');\n\n var newRoot = _getPath(root, newPath);\n\n if (newRoot) {\n return set(newRoot, keyName, value);\n } else if (!tolerant) {\n throw new emberDebug.Error('Property set failed: object in path \"' + newPath + '\" could not be found or was destroyed.');\n }\n }\n\n /**\n Error-tolerant form of `Ember.set`. Will not blow up if any part of the\n chain is `undefined`, `null`, or destroyed.\n \n This is primarily used when syncing bindings, which may try to update after\n an object has been destroyed.\n \n @method trySet\n @static\n @for @ember/object\n @param {Object} root The object to modify.\n @param {String} path The property path to set\n @param {Object} value The value to set\n @public\n */\n function trySet(root, path, value) {\n return set(root, path, value, true);\n }\n\n /**\n @module @ember/object\n */\n\n var END_WITH_EACH_REGEX = /\\.@each$/;\n\n /**\n Expands `pattern`, invoking `callback` for each expansion.\n \n The only pattern supported is brace-expansion, anything else will be passed\n once to `callback` directly.\n \n Example\n \n ```js\n import { expandProperties } from '@ember/object/computed';\n \n function echo(arg){ console.log(arg); }\n \n expandProperties('foo.bar', echo); //=> 'foo.bar'\n expandProperties('{foo,bar}', echo); //=> 'foo', 'bar'\n expandProperties('foo.{bar,baz}', echo); //=> 'foo.bar', 'foo.baz'\n expandProperties('{foo,bar}.baz', echo); //=> 'foo.baz', 'bar.baz'\n expandProperties('foo.{bar,baz}.[]', echo) //=> 'foo.bar.[]', 'foo.baz.[]'\n expandProperties('{foo,bar}.{spam,eggs}', echo) //=> 'foo.spam', 'foo.eggs', 'bar.spam', 'bar.eggs'\n expandProperties('{foo}.bar.{baz}') //=> 'foo.bar.baz'\n ```\n \n @method expandProperties\n @static\n @for @ember/object\n @public\n @param {String} pattern The property pattern to expand.\n @param {Function} callback The callback to invoke. It is invoked once per\n expansion, and is passed the expansion.\n */\n function expandProperties(pattern, callback) {\n false && !(typeof pattern === 'string') && emberDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');\n false && !(pattern.indexOf(' ') === -1) && emberDebug.assert('Brace expanded properties cannot contain spaces, e.g. \"user.{firstName, lastName}\" should be \"user.{firstName,lastName}\"', pattern.indexOf(' ') === -1);\n // regex to look for double open, double close, or unclosed braces\n\n false && !(pattern.match(/\\{[^}{]*\\{|\\}[^}{]*\\}|\\{[^}]*$/g) === null) && emberDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, pattern.match(/\\{[^}{]*\\{|\\}[^}{]*\\}|\\{[^}]*$/g) === null);\n\n var start = pattern.indexOf('{');\n if (start < 0) {\n callback(pattern.replace(END_WITH_EACH_REGEX, '.[]'));\n } else {\n dive('', pattern, start, callback);\n }\n }\n\n function dive(prefix, pattern, start, callback) {\n var end = pattern.indexOf('}'),\n i = 0,\n newStart = void 0,\n arrayLength = void 0;\n var tempArr = pattern.substring(start + 1, end).split(',');\n var after = pattern.substring(end + 1);\n prefix = prefix + pattern.substring(0, start);\n\n arrayLength = tempArr.length;\n while (i < arrayLength) {\n newStart = after.indexOf('{');\n if (newStart < 0) {\n callback((prefix + tempArr[i++] + after).replace(END_WITH_EACH_REGEX, '.[]'));\n } else {\n dive(prefix + tempArr[i++], after, newStart, callback);\n }\n }\n }\n\n /**\n @module ember\n */\n /**\n Starts watching a property on an object. Whenever the property changes,\n invokes `Ember.propertyWillChange` and `Ember.propertyDidChange`. This is the\n primitive used by observers and dependent keys; usually you will never call\n this method directly but instead use higher level methods like\n `Ember.addObserver()`\n \n @private\n @method watch\n @for Ember\n @param obj\n @param {String} _keyPath\n */\n function watch(obj, _keyPath, m) {\n if (isPath(_keyPath)) {\n watchPath(obj, _keyPath, m);\n } else {\n watchKey(obj, _keyPath, m);\n }\n }\n\n function watcherCount(obj, key) {\n var meta$$1 = exports.peekMeta(obj);\n return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;\n }\n\n function unwatch(obj, _keyPath, m) {\n if (isPath(_keyPath)) {\n unwatchPath(obj, _keyPath, m);\n } else {\n unwatchKey(obj, _keyPath, m);\n }\n }\n\n // ..........................................................\n // DEPENDENT KEYS\n //\n\n function addDependentKeys(desc, obj, keyName, meta) {\n // the descriptor has a list of dependent keys, so\n // add all of its dependent keys.\n var depKeys = desc._dependentKeys,\n idx,\n depKey;\n if (depKeys === null || depKeys === undefined) {\n return;\n }\n\n for (idx = 0; idx < depKeys.length; idx++) {\n depKey = depKeys[idx];\n // Increment the number of times depKey depends on keyName.\n\n meta.writeDeps(depKey, keyName, (meta.peekDeps(depKey, keyName) || 0) + 1);\n // Watch the depKey\n watch(obj, depKey, meta);\n }\n }\n\n function removeDependentKeys(desc, obj, keyName, meta) {\n // the descriptor has a list of dependent keys, so\n // remove all of its dependent keys.\n var depKeys = desc._dependentKeys,\n idx,\n depKey;\n if (depKeys === null || depKeys === undefined) {\n return;\n }\n\n for (idx = 0; idx < depKeys.length; idx++) {\n depKey = depKeys[idx];\n // Decrement the number of times depKey depends on keyName.\n\n meta.writeDeps(depKey, keyName, (meta.peekDeps(depKey, keyName) || 0) - 1);\n // Unwatch the depKey\n unwatch(obj, depKey, meta);\n }\n }\n\n /**\n @module @ember/object\n */\n\n var DEEP_EACH_REGEX = /\\.@each\\.[^.]+\\./;\n\n /**\n A computed property transforms an object literal with object's accessor function(s) into a property.\n \n By default the function backing the computed property will only be called\n once and the result will be cached. You can specify various properties\n that your computed property depends on. This will force the cached\n result to be recomputed if the dependencies are modified.\n \n In the following example we declare a computed property - `fullName` - by calling\n `computed` with property dependencies (`firstName` and `lastName`) as leading arguments and getter accessor function. The `fullName` getter function\n will be called once (regardless of how many times it is accessed) as long\n as its dependencies have not changed. Once `firstName` or `lastName` are updated\n any future calls (or anything bound) to `fullName` will incorporate the new\n values.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n // these will be supplied by `create`\n firstName: null,\n lastName: null,\n \n fullName: computed('firstName', 'lastName', function() {\n let firstName = this.get('firstName'),\n lastName = this.get('lastName');\n \n return `${firstName} ${lastName}`;\n })\n });\n \n let tom = Person.create({\n firstName: 'Tom',\n lastName: 'Dale'\n });\n \n tom.get('fullName') // 'Tom Dale'\n ```\n \n You can also define what Ember should do when setting a computed property by providing additional function (`set`) in hash argument.\n If you try to set a computed property, it will try to invoke setter accessor function with the key and\n value you want to set it to as arguments.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n // these will be supplied by `create`\n firstName: null,\n lastName: null,\n \n fullName: computed('firstName', 'lastName', {\n get(key) {\n let firstName = this.get('firstName'),\n lastName = this.get('lastName');\n \n return firstName + ' ' + lastName;\n },\n set(key, value) {\n let [firstName, lastName] = value.split(' ');\n \n this.set('firstName', firstName);\n this.set('lastName', lastName);\n \n return value;\n }\n })\n });\n \n let person = Person.create();\n \n person.set('fullName', 'Peter Wagenet');\n person.get('firstName'); // 'Peter'\n person.get('lastName'); // 'Wagenet'\n ```\n \n You can overwrite computed property with normal property (no longer computed), that won't change if dependencies change, if you set computed property and it won't have setter accessor function defined.\n \n You can also mark computed property as `.readOnly()` and block all attempts to set it.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n // these will be supplied by `create`\n firstName: null,\n lastName: null,\n \n fullName: computed('firstName', 'lastName', {\n get(key) {\n let firstName = this.get('firstName');\n let lastName = this.get('lastName');\n \n return firstName + ' ' + lastName;\n }\n }).readOnly()\n });\n \n let person = Person.create();\n person.set('fullName', 'Peter Wagenet'); // Uncaught Error: Cannot set read-only property \"fullName\" on object: <(...):emberXXX>\n ```\n \n Additional resources:\n - [New CP syntax RFC](https://github.com/emberjs/rfcs/blob/master/text/0011-improved-cp-syntax.md)\n - [New computed syntax explained in \"Ember 1.12 released\" ](https://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_new-computed-syntax)\n \n @class ComputedProperty\n @public\n */\n function ComputedProperty(config, opts) {\n this.isDescriptor = true;\n var hasGetterOnly = typeof config === 'function';\n if (hasGetterOnly) {\n this._getter = config;\n } else {\n false && !(typeof config === 'object' && !Array.isArray(config)) && emberDebug.assert('computed expects a function or an object as last argument.', typeof config === 'object' && !Array.isArray(config));\n false && !Object.keys(config).every(function (key) {\n return key === 'get' || key === 'set';\n }) && emberDebug.assert('Config object passed to computed can only contain `get` or `set` keys.', Object.keys(config).every(function (key) {\n return key === 'get' || key === 'set';\n }));\n\n this._getter = config.get;\n this._setter = config.set;\n }\n false && !(!!this._getter || !!this._setter) && emberDebug.assert('Computed properties must receive a getter or a setter, you passed none.', !!this._getter || !!this._setter);\n\n this._suspended = undefined;\n this._meta = undefined;\n this._volatile = false;\n\n this._dependentKeys = opts && opts.dependentKeys;\n this._readOnly = opts && hasGetterOnly && opts.readOnly === true;\n }\n\n ComputedProperty.prototype = new Descriptor();\n ComputedProperty.prototype.constructor = ComputedProperty;\n\n var ComputedPropertyPrototype = ComputedProperty.prototype;\n\n /**\n Call on a computed property to set it into non-cached mode. When in this\n mode the computed property will not automatically cache the return value.\n \n It also does not automatically fire any change events. You must manually notify\n any changes if you want to observe this property.\n \n Dependency keys have no effect on volatile properties as they are for cache\n invalidation and notification when cached value is invalidated.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let outsideService = EmberObject.extend({\n value: computed(function() {\n return OutsideService.getValue();\n }).volatile()\n }).create();\n ```\n \n @method volatile\n @return {ComputedProperty} this\n @chainable\n @public\n */\n ComputedPropertyPrototype.volatile = function () {\n this._volatile = true;\n return this;\n };\n\n /**\n Call on a computed property to set it into read-only mode. When in this\n mode the computed property will throw an error when set.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n guid: computed(function() {\n return 'guid-guid-guid';\n }).readOnly()\n });\n \n let person = Person.create();\n \n person.set('guid', 'new-guid'); // will throw an exception\n ```\n \n @method readOnly\n @return {ComputedProperty} this\n @chainable\n @public\n */\n ComputedPropertyPrototype.readOnly = function () {\n this._readOnly = true;\n false && !!(this._readOnly && this._setter && this._setter !== this._getter) && emberDebug.assert('Computed properties that define a setter using the new syntax cannot be read-only', !(this._readOnly && this._setter && this._setter !== this._getter));\n\n return this;\n };\n\n /**\n Sets the dependent keys on this computed property. Pass any number of\n arguments containing key paths that this computed property depends on.\n \n ```javascript\n import EmberObject, { computed } from '@ember/object';\n \n let President = EmberObject.extend({\n fullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n \n // Tell Ember that this computed property depends on firstName\n // and lastName\n })\n });\n \n let president = President.create({\n firstName: 'Barack',\n lastName: 'Obama'\n });\n \n president.get('fullName'); // 'Barack Obama'\n ```\n \n @method property\n @param {String} path* zero or more property paths\n @return {ComputedProperty} this\n @chainable\n @public\n */\n ComputedPropertyPrototype.property = function () {\n var args = [],\n i;\n\n function addArg(property) {\n false && emberDebug.warn('Dependent keys containing @each only work one level deep. ' + ('You used the key \"' + property + '\" which is invalid. ') + 'Please create an intermediary computed property.', DEEP_EACH_REGEX.test(property) === false, { id: 'ember-metal.computed-deep-each' });\n\n args.push(property);\n }\n\n for (i = 0; i < arguments.length; i++) {\n expandProperties(arguments[i], addArg);\n }\n\n this._dependentKeys = args;\n return this;\n };\n\n /**\n In some cases, you may want to annotate computed properties with additional\n metadata about how they function or what values they operate on. For example,\n computed property functions may close over variables that are then no longer\n available for introspection.\n \n You can pass a hash of these values to a computed property like this:\n \n ```\n import { computed } from '@ember/object';\n import Person from 'my-app/utils/person';\n \n person: computed(function() {\n let personId = this.get('personId');\n return Person.create({ id: personId });\n }).meta({ type: Person })\n ```\n \n The hash that you pass to the `meta()` function will be saved on the\n computed property descriptor under the `_meta` key. Ember runtime\n exposes a public API for retrieving these values from classes,\n via the `metaForProperty()` function.\n \n @method meta\n @param {Object} meta\n @chainable\n @public\n */\n ComputedPropertyPrototype.meta = function (meta$$1) {\n if (arguments.length === 0) {\n return this._meta || {};\n } else {\n this._meta = meta$$1;\n return this;\n }\n };\n\n // invalidate cache when CP key changes\n ComputedPropertyPrototype.didChange = function (obj, keyName) {\n // _suspended is set via a CP.set to ensure we don't clear\n // the cached value set by the setter\n if (this._volatile || this._suspended === obj) {\n return;\n }\n\n // don't create objects just to invalidate\n var meta$$1 = exports.peekMeta(obj);\n if (meta$$1 === undefined || meta$$1.source !== obj) {\n return;\n }\n\n var cache = meta$$1.readableCache();\n if (cache !== undefined && cache[keyName] !== undefined) {\n cache[keyName] = undefined;\n removeDependentKeys(this, obj, keyName, meta$$1);\n }\n };\n\n ComputedPropertyPrototype.get = function (obj, keyName) {\n if (this._volatile) {\n return this._getter.call(obj, keyName);\n }\n\n var meta$$1 = meta(obj);\n var cache = meta$$1.writableCache();\n\n var result = cache[keyName];\n if (result === UNDEFINED) {\n return undefined;\n } else if (result !== undefined) {\n return result;\n }\n\n var ret = this._getter.call(obj, keyName);\n\n cache[keyName] = ret === undefined ? UNDEFINED : ret;\n\n var chainWatchers = meta$$1.readableChainWatchers();\n if (chainWatchers !== undefined) {\n chainWatchers.revalidate(keyName);\n }\n addDependentKeys(this, obj, keyName, meta$$1);\n\n return ret;\n };\n\n ComputedPropertyPrototype.set = function (obj, keyName, value) {\n if (this._readOnly) {\n this._throwReadOnlyError(obj, keyName);\n }\n\n if (!this._setter) {\n return this.clobberSet(obj, keyName, value);\n }\n\n if (this._volatile) {\n return this.volatileSet(obj, keyName, value);\n }\n\n return this.setWithSuspend(obj, keyName, value);\n };\n\n ComputedPropertyPrototype._throwReadOnlyError = function (obj, keyName) {\n throw new emberDebug.Error('Cannot set read-only property \"' + keyName + '\" on object: ' + emberUtils.inspect(obj));\n };\n\n ComputedPropertyPrototype.clobberSet = function (obj, keyName, value) {\n var cachedValue = cacheFor(obj, keyName);\n defineProperty(obj, keyName, null, cachedValue);\n set(obj, keyName, value);\n return value;\n };\n\n ComputedPropertyPrototype.volatileSet = function (obj, keyName, value) {\n return this._setter.call(obj, keyName, value);\n };\n\n ComputedPropertyPrototype.setWithSuspend = function (obj, keyName, value) {\n var oldSuspended = this._suspended;\n this._suspended = obj;\n try {\n return this._set(obj, keyName, value);\n } finally {\n this._suspended = oldSuspended;\n }\n };\n\n ComputedPropertyPrototype._set = function (obj, keyName, value) {\n var meta$$1 = meta(obj);\n var cache = meta$$1.writableCache();\n\n var val = cache[keyName];\n var hadCachedValue = val !== undefined;\n\n var cachedValue = void 0;\n if (hadCachedValue && val !== UNDEFINED) {\n cachedValue = val;\n }\n\n var ret = this._setter.call(obj, keyName, value, cachedValue);\n\n // allows setter to return the same value that is cached already\n if (hadCachedValue && cachedValue === ret) {\n return ret;\n }\n\n propertyWillChange(obj, keyName, meta$$1);\n\n if (!hadCachedValue) {\n addDependentKeys(this, obj, keyName, meta$$1);\n }\n\n cache[keyName] = ret === undefined ? UNDEFINED : ret;\n\n propertyDidChange(obj, keyName, meta$$1);\n\n return ret;\n };\n\n /* called before property is overridden */\n ComputedPropertyPrototype.teardown = function (obj, keyName, meta$$1) {\n if (this._volatile) {\n return;\n }\n var cache = meta$$1.readableCache();\n if (cache !== undefined && cache[keyName] !== undefined) {\n removeDependentKeys(this, obj, keyName, meta$$1);\n cache[keyName] = undefined;\n }\n };\n\n /**\n This helper returns a new property descriptor that wraps the passed\n computed property function. You can use this helper to define properties\n with mixins or via `defineProperty()`.\n \n If you pass a function as an argument, it will be used as a getter. A computed\n property defined in this way might look like this:\n \n ```js\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n \n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n \n fullName: computed('firstName', 'lastName', function() {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n })\n });\n \n let client = Person.create();\n \n client.get('fullName'); // 'Betty Jones'\n \n client.set('lastName', 'Fuller');\n client.get('fullName'); // 'Betty Fuller'\n ```\n \n You can pass a hash with two functions, `get` and `set`, as an\n argument to provide both a getter and setter:\n \n ```js\n import EmberObject, { computed } from '@ember/object';\n \n let Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n \n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n \n fullName: computed('firstName', 'lastName', {\n get(key) {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n },\n set(key, value) {\n let [firstName, lastName] = value.split(/\\s+/);\n this.setProperties({ firstName, lastName });\n return value;\n }\n })\n });\n \n let client = Person.create();\n client.get('firstName'); // 'Betty'\n \n client.set('fullName', 'Carroll Fuller');\n client.get('firstName'); // 'Carroll'\n ```\n \n The `set` function should accept two parameters, `key` and `value`. The value\n returned from `set` will be the new value of the property.\n \n _Note: This is the preferred way to define computed properties when writing third-party\n libraries that depend on or use Ember, since there is no guarantee that the user\n will have [prototype Extensions](https://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/) enabled._\n \n The alternative syntax, with prototype extensions, might look like:\n \n ```js\n fullName: function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n }.property('firstName', 'lastName')\n ```\n \n @method computed\n @for @ember/object\n @static\n @param {String} [dependentKeys*] Optional dependent keys that trigger this computed property.\n @param {Function} func The computed property function.\n @return {ComputedProperty} property descriptor instance\n @public\n */\n\n\n /**\n Returns the cached value for a property, if one exists.\n This can be useful for peeking at the value of a computed\n property that is generated lazily, without accidentally causing\n it to be created.\n \n @method cacheFor\n @static\n @for @ember/object/internals\n @param {Object} obj the object whose property you want to check\n @param {String} key the name of the property whose cached value you want\n to return\n @return {Object} the cached value\n @public\n */\n function cacheFor(obj, key) {\n var meta$$1 = exports.peekMeta(obj);\n var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;\n var ret = cache !== undefined ? cache[key] : undefined;\n\n if (ret === UNDEFINED) {\n return undefined;\n }\n return ret;\n }\n\n cacheFor.set = function (cache, key, value) {\n if (value === undefined) {\n cache[key] = UNDEFINED;\n } else {\n cache[key] = value;\n }\n };\n\n cacheFor.get = function (cache, key) {\n var ret = cache[key];\n if (ret === UNDEFINED) {\n return undefined;\n }\n return ret;\n };\n\n cacheFor.remove = function (cache, key) {\n cache[key] = undefined;\n };\n\n var CONSUMED = {};\n\n var AliasedProperty = function (_Descriptor) {\n emberBabel.inherits(AliasedProperty, _Descriptor);\n\n function AliasedProperty(altKey) {\n\n var _this = emberBabel.possibleConstructorReturn(this, _Descriptor.call(this));\n\n _this.isDescriptor = true;\n _this.altKey = altKey;\n _this._dependentKeys = [altKey];\n return _this;\n }\n\n AliasedProperty.prototype.setup = function (obj, keyName) {\n false && !(this.altKey !== keyName) && emberDebug.assert('Setting alias \\'' + keyName + '\\' on self', this.altKey !== keyName);\n\n var meta$$1 = meta(obj);\n if (meta$$1.peekWatching(keyName)) {\n addDependentKeys(this, obj, keyName, meta$$1);\n }\n };\n\n AliasedProperty.prototype.teardown = function (obj, keyName, meta$$1) {\n if (meta$$1.peekWatching(keyName)) {\n removeDependentKeys(this, obj, keyName, meta$$1);\n }\n };\n\n AliasedProperty.prototype.willWatch = function (obj, keyName, meta$$1) {\n addDependentKeys(this, obj, keyName, meta$$1);\n };\n\n AliasedProperty.prototype.didUnwatch = function (obj, keyName, meta$$1) {\n removeDependentKeys(this, obj, keyName, meta$$1);\n };\n\n AliasedProperty.prototype.get = function (obj, keyName) {\n var ret = get(obj, this.altKey);\n var meta$$1 = meta(obj);\n var cache = meta$$1.writableCache();\n if (cache[keyName] !== CONSUMED) {\n cache[keyName] = CONSUMED;\n addDependentKeys(this, obj, keyName, meta$$1);\n }\n return ret;\n };\n\n AliasedProperty.prototype.set = function (obj, keyName, value) {\n return set(obj, this.altKey, value);\n };\n\n AliasedProperty.prototype.readOnly = function () {\n this.set = AliasedProperty_readOnlySet;\n return this;\n };\n\n AliasedProperty.prototype.oneWay = function () {\n this.set = AliasedProperty_oneWaySet;\n return this;\n };\n\n return AliasedProperty;\n }(Descriptor);\n\n function AliasedProperty_readOnlySet(obj, keyName) {\n throw new emberDebug.Error('Cannot set read-only property \\'' + keyName + '\\' on object: ' + emberUtils.inspect(obj));\n }\n\n function AliasedProperty_oneWaySet(obj, keyName, value) {\n defineProperty(obj, keyName, null);\n return set(obj, keyName, value);\n }\n\n // Backwards compatibility with Ember Data.\n AliasedProperty.prototype._meta = undefined;\n AliasedProperty.prototype.meta = ComputedProperty.prototype.meta;\n\n /**\n @module @ember/polyfills\n */\n /**\n Merge the contents of two objects together into the first object.\n \n ```javascript\n import { merge } from '@ember/polyfills';\n \n merge({ first: 'Tom' }, { last: 'Dale' }); // { first: 'Tom', last: 'Dale' }\n var a = { first: 'Yehuda' };\n var b = { last: 'Katz' };\n merge(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }\n ```\n \n @method merge\n @static\n @for @ember/polyfills\n @param {Object} original The object to merge into\n @param {Object} updates The object to copy properties from\n @return {Object}\n @public\n */\n\n\n /**\n @module ember\n */\n\n /**\n Used internally to allow changing properties in a backwards compatible way, and print a helpful\n deprecation warning.\n \n @method deprecateProperty\n @param {Object} object The object to add the deprecated property to.\n @param {String} deprecatedKey The property to add (and print deprecation warnings upon accessing).\n @param {String} newKey The property that will be aliased.\n @private\n @since 1.7.0\n */\n\n /* eslint no-console:off */\n /* global console */\n\n /**\n @module @ember/instrumentation\n @private\n */\n\n /**\n The purpose of the Ember Instrumentation module is\n to provide efficient, general-purpose instrumentation\n for Ember.\n \n Subscribe to a listener by using `subscribe`:\n \n ```javascript\n import { subscribe } from '@ember/instrumentation';\n \n subscribe(\"render\", {\n before(name, timestamp, payload) {\n \n },\n \n after(name, timestamp, payload) {\n \n }\n });\n ```\n \n If you return a value from the `before` callback, that same\n value will be passed as a fourth parameter to the `after`\n callback.\n \n Instrument a block of code by using `instrument`:\n \n ```javascript\n import { instrument } from '@ember/instrumentation';\n \n instrument(\"render.handlebars\", payload, function() {\n // rendering logic\n }, binding);\n ```\n \n Event names passed to `instrument` are namespaced\n by periods, from more general to more specific. Subscribers\n can listen for events by whatever level of granularity they\n are interested in.\n \n In the above example, the event is `render.handlebars`,\n and the subscriber listened for all events beginning with\n `render`. It would receive callbacks for events named\n `render`, `render.handlebars`, `render.container`, or\n even `render.handlebars.layout`.\n \n @class Instrumentation\n @static\n @private\n */\n var subscribers = [];\n var cache = {};\n\n function populateListeners(name) {\n var listeners = [],\n i;\n var subscriber = void 0;\n\n for (i = 0; i < subscribers.length; i++) {\n subscriber = subscribers[i];\n if (subscriber.regex.test(name)) {\n listeners.push(subscriber.object);\n }\n }\n\n cache[name] = listeners;\n return listeners;\n }\n\n var time = function () {\n var perf = 'undefined' !== typeof window ? window.performance || {} : {};\n var fn = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow;\n // fn.bind will be available in all the browsers that support the advanced window.performance... ;-)\n return fn ? fn.bind(perf) : function () {\n return +new Date();\n };\n }();\n\n /**\n Notifies event's subscribers, calls `before` and `after` hooks.\n \n @method instrument\n @for @ember/instrumentation\n @static\n @param {String} [name] Namespaced event name.\n @param {Object} _payload\n @param {Function} callback Function that you're instrumenting.\n @param {Object} binding Context that instrument function is called with.\n @private\n */\n\n\n exports.flaggedInstrument = void 0;\n {\n exports.flaggedInstrument = function (name, payload, callback) {\n return callback();\n };\n }\n function withFinalizer(callback, finalizer, payload, binding) {\n var result = void 0;\n try {\n result = callback.call(binding);\n } catch (e) {\n payload.exception = e;\n result = payload;\n } finally {\n finalizer();\n }\n return result;\n }\n\n function NOOP() {}\n\n // private for now\n function _instrumentStart(name, _payload, _payloadParam) {\n if (subscribers.length === 0) {\n return NOOP;\n }\n\n var listeners = cache[name];\n\n if (!listeners) {\n listeners = populateListeners(name);\n }\n\n if (listeners.length === 0) {\n return NOOP;\n }\n\n var payload = _payload(_payloadParam);\n\n var STRUCTURED_PROFILE = emberEnvironment.ENV.STRUCTURED_PROFILE;\n var timeName = void 0;\n if (STRUCTURED_PROFILE) {\n timeName = name + ': ' + payload.object;\n console.time(timeName);\n }\n\n var beforeValues = new Array(listeners.length);\n var i = void 0,\n listener = void 0;\n var timestamp = time();\n for (i = 0; i < listeners.length; i++) {\n listener = listeners[i];\n beforeValues[i] = listener.before(name, timestamp, payload);\n }\n\n return function () {\n var i = void 0,\n listener = void 0;\n var timestamp = time();\n for (i = 0; i < listeners.length; i++) {\n listener = listeners[i];\n if (typeof listener.after === 'function') {\n listener.after(name, timestamp, payload, beforeValues[i]);\n }\n }\n\n if (STRUCTURED_PROFILE) {\n console.timeEnd(timeName);\n }\n };\n }\n\n /**\n Subscribes to a particular event or instrumented block of code.\n \n @method subscribe\n @for @ember/instrumentation\n @static\n \n @param {String} [pattern] Namespaced event name.\n @param {Object} [object] Before and After hooks.\n \n @return {Subscriber}\n @private\n */\n\n\n /**\n Unsubscribes from a particular event or instrumented block of code.\n \n @method unsubscribe\n @for @ember/instrumentation\n @static\n \n @param {Object} [subscriber]\n @private\n */\n\n\n /**\n Resets `Instrumentation` by flushing list of subscribers.\n \n @method reset\n @for @ember/instrumentation\n @static\n @private\n */\n\n\n var onerror = void 0;\n var onErrorTarget = {\n get onerror() {\n return onerror;\n }\n };\n\n // Ember.onerror getter\n\n // Ember.onerror setter\n\n\n var dispatchOverride = void 0;\n\n // allows testing adapter to override dispatch\n\n\n /**\n @module @ember/utils\n */\n /**\n Returns true if the passed value is null or undefined. This avoids errors\n from JSLint complaining about use of ==, which can be technically\n confusing.\n \n ```javascript\n isNone(); // true\n isNone(null); // true\n isNone(undefined); // true\n isNone(''); // false\n isNone([]); // false\n isNone(function() {}); // false\n ```\n \n @method isNone\n @static\n @for @ember/utils\n @param {Object} obj Value to test\n @return {Boolean}\n @public\n */\n function isNone(obj) {\n return obj === null || obj === undefined;\n }\n\n /**\n @module @ember/utils\n */\n /**\n Verifies that a value is `null` or `undefined`, an empty string, or an empty\n array.\n \n Constrains the rules on `isNone` by returning true for empty strings and\n empty arrays.\n \n ```javascript\n isEmpty(); // true\n isEmpty(null); // true\n isEmpty(undefined); // true\n isEmpty(''); // true\n isEmpty([]); // true\n isEmpty({}); // false\n isEmpty('Adam Hawkins'); // false\n isEmpty([0,1,2]); // false\n isEmpty('\\n\\t'); // false\n isEmpty(' '); // false\n ```\n \n @method isEmpty\n @static\n @for @ember/utils\n @param {Object} obj Value to test\n @return {Boolean}\n @public\n */\n function isEmpty(obj) {\n var none = isNone(obj),\n size,\n length;\n if (none) {\n return none;\n }\n\n if (typeof obj.size === 'number') {\n return !obj.size;\n }\n\n var objectType = typeof obj;\n\n if (objectType === 'object') {\n size = get(obj, 'size');\n\n if (typeof size === 'number') {\n return !size;\n }\n }\n\n if (typeof obj.length === 'number' && objectType !== 'function') {\n return !obj.length;\n }\n\n if (objectType === 'object') {\n length = get(obj, 'length');\n\n if (typeof length === 'number') {\n return !length;\n }\n }\n\n return false;\n }\n\n /**\n @module @ember/utils\n */\n /**\n A value is blank if it is empty or a whitespace string.\n \n ```javascript\n import { isBlank } from '@ember/utils';\n \n isBlank(); // true\n isBlank(null); // true\n isBlank(undefined); // true\n isBlank(''); // true\n isBlank([]); // true\n isBlank('\\n\\t'); // true\n isBlank(' '); // true\n isBlank({}); // false\n isBlank('\\n\\t Hello'); // false\n isBlank('Hello world'); // false\n isBlank([1,2,3]); // false\n ```\n \n @method isBlank\n @static\n @for @ember/utils\n @param {Object} obj Value to test\n @return {Boolean}\n @since 1.5.0\n @public\n */\n function isBlank(obj) {\n return isEmpty(obj) || typeof obj === 'string' && /\\S/.test(obj) === false;\n }\n\n /**\n @module @ember/utils\n */\n /**\n A value is present if it not `isBlank`.\n \n ```javascript\n isPresent(); // false\n isPresent(null); // false\n isPresent(undefined); // false\n isPresent(''); // false\n isPresent(' '); // false\n isPresent('\\n\\t'); // false\n isPresent([]); // false\n isPresent({ length: 0 }) // false\n isPresent(false); // true\n isPresent(true); // true\n isPresent('string'); // true\n isPresent(0); // true\n isPresent(function() {}) // true\n isPresent({}); // true\n isPresent(false); // true\n isPresent('\\n\\t Hello'); // true\n isPresent([1,2,3]); // true\n ```\n \n @method isPresent\n @static\n @for @ember/utils\n @param {Object} obj Value to test\n @return {Boolean}\n @since 1.8.0\n @public\n */\n\n\n var backburner$1 = new Backburner(['sync', 'actions', 'destroy'], {\n GUID_KEY: emberUtils.GUID_KEY,\n sync: {\n before: beginPropertyChanges,\n after: endPropertyChanges\n },\n defaultQueue: 'actions',\n onBegin: function (current) {\n run.currentRunLoop = current;\n },\n onEnd: function (current, next) {\n run.currentRunLoop = next;\n },\n onErrorTarget: onErrorTarget,\n onErrorMethod: 'onerror'\n });\n\n /**\n @module @ember/runloop\n */\n // ..........................................................\n // run - this is ideally the only public API the dev sees\n //\n\n /**\n Runs the passed target and method inside of a RunLoop, ensuring any\n deferred actions including bindings and views updates are flushed at the\n end.\n \n Normally you should not need to invoke this method yourself. However if\n you are implementing raw event handlers when interfacing with other\n libraries or plugins, you should probably wrap all of your code inside this\n call.\n \n ```javascript\n import { run } from '@ember/runloop';\n \n run(function() {\n // code to be executed within a RunLoop\n });\n ```\n @method run\n @for @ember/runloop\n @static\n @param {Object} [target] target of method to call\n @param {Function|String} method Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.\n @param {Object} [args*] Any additional arguments you wish to pass to the method.\n @return {Object} return value from invoking the passed function.\n @public\n */\n function run() {\n return backburner$1.run.apply(backburner$1, arguments);\n }\n\n /**\n If no run-loop is present, it creates a new one. If a run loop is\n present it will queue itself to run on the existing run-loops action\n queue.\n \n Please note: This is not for normal usage, and should be used sparingly.\n \n If invoked when not within a run loop:\n \n ```javascript\n import { join } from '@ember/runloop';\n \n join(function() {\n // creates a new run-loop\n });\n ```\n \n Alternatively, if called within an existing run loop:\n \n ```javascript\n import { run, join } from '@ember/runloop';\n \n run(function() {\n // creates a new run-loop\n \n join(function() {\n // joins with the existing run-loop, and queues for invocation on\n // the existing run-loops action queue.\n });\n });\n ```\n \n @method join\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to call\n @param {Function|String} method Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.\n @param {Object} [args*] Any additional arguments you wish to pass to the method.\n @return {Object} Return value from invoking the passed function. Please note,\n when called within an existing loop, no return value is possible.\n @public\n */\n run.join = function () {\n return backburner$1.join.apply(backburner$1, arguments);\n };\n\n /**\n Allows you to specify which context to call the specified function in while\n adding the execution of that function to the Ember run loop. This ability\n makes this method a great way to asynchronously integrate third-party libraries\n into your Ember application.\n \n `bind` takes two main arguments, the desired context and the function to\n invoke in that context. Any additional arguments will be supplied as arguments\n to the function that is passed in.\n \n Let's use the creation of a TinyMCE component as an example. Currently,\n TinyMCE provides a setup configuration option we can use to do some processing\n after the TinyMCE instance is initialized but before it is actually rendered.\n We can use that setup option to do some additional setup for our component.\n The component itself could look something like the following:\n \n ```app/components/rich-text-editor.js\n import Component from '@ember/component';\n import { on } from '@ember/object/evented';\n import { bind } from '@ember/runloop';\n \n export default Component.extend({\n initializeTinyMCE: on('didInsertElement', function() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: Ember.run.bind(this, this.setupEditor)\n });\n }),\n \n didInsertElement() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: Ember.run.bind(this, this.setupEditor)\n });\n }\n \n setupEditor(editor) {\n this.set('editor', editor);\n \n editor.on('change', function() {\n console.log('content changed!');\n });\n }\n });\n ```\n \n In this example, we use Ember.run.bind to bind the setupEditor method to the\n context of the RichTextEditor component and to have the invocation of that\n method be safely handled and executed by the Ember run loop.\n \n @method bind\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to call\n @param {Function|String} method Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.\n @param {Object} [args*] Any additional arguments you wish to pass to the method.\n @return {Function} returns a new function that will always have a particular context\n @since 1.4.0\n @public\n */\n run.bind = function () {\n var _len, curried, _key;\n\n for (_len = arguments.length, curried = Array(_len), _key = 0; _key < _len; _key++) {\n curried[_key] = arguments[_key];\n }\n\n return function () {\n var _len2, args, _key2;\n\n for (_len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return run.join.apply(run, curried.concat(args));\n };\n };\n\n run.backburner = backburner$1;\n run.currentRunLoop = null;\n run.queues = backburner$1.queueNames;\n\n /**\n Begins a new RunLoop. Any deferred actions invoked after the begin will\n be buffered until you invoke a matching call to `run.end()`. This is\n a lower-level way to use a RunLoop instead of using `run()`.\n \n ```javascript\n import { begin, end } from '@ember/runloop';\n \n begin();\n // code to be executed within a RunLoop\n end();\n ```\n \n @method begin\n @static\n @for @ember/runloop\n @return {void}\n @public\n */\n run.begin = function () {\n backburner$1.begin();\n };\n\n /**\n Ends a RunLoop. This must be called sometime after you call\n `run.begin()` to flush any deferred actions. This is a lower-level way\n to use a RunLoop instead of using `run()`.\n \n ```javascript\n import { begin, end } from '@ember/runloop';\n \n begin();\n // code to be executed within a RunLoop\n end();\n ```\n \n @method end\n @static\n @for @ember/runloop\n @return {void}\n @public\n */\n run.end = function () {\n backburner$1.end();\n };\n\n /**\n Array of named queues. This array determines the order in which queues\n are flushed at the end of the RunLoop. You can define your own queues by\n simply adding the queue name to this array. Normally you should not need\n to inspect or modify this property.\n \n @property queues\n @type Array\n @default ['sync', 'actions', 'destroy']\n @private\n */\n\n /**\n Adds the passed target/method and any optional arguments to the named\n queue to be executed at the end of the RunLoop. If you have not already\n started a RunLoop when calling this method one will be started for you\n automatically.\n \n At the end of a RunLoop, any methods scheduled in this way will be invoked.\n Methods will be invoked in an order matching the named queues defined in\n the `run.queues` property.\n \n ```javascript\n import { schedule } from '@ember/runloop';\n \n schedule('sync', this, function() {\n // this will be executed in the first RunLoop queue, when bindings are synced\n console.log('scheduled on sync queue');\n });\n \n schedule('actions', this, function() {\n // this will be executed in the 'actions' queue, after bindings have synced.\n console.log('scheduled on actions queue');\n });\n \n // Note the functions will be run in order based on the run queues order.\n // Output would be:\n // scheduled on sync queue\n // scheduled on actions queue\n ```\n \n @method schedule\n @static\n @for @ember/runloop\n @param {String} queue The name of the queue to schedule against.\n Default queues are 'sync' and 'actions'\n @param {Object} [target] target object to use as the context when invoking a method.\n @param {String|Function} method The method to invoke. If you pass a string it\n will be resolved on the target object at the time the scheduled item is\n invoked allowing you to change the target function.\n @param {Object} [arguments*] Optional arguments to be passed to the queued method.\n @return {*} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.schedule = function () /* queue, target, method */{\n false && !(run.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run.currentRunLoop || !emberDebug.isTesting());\n\n return backburner$1.schedule.apply(backburner$1, arguments);\n };\n\n // Used by global test teardown\n run.hasScheduledTimers = function () {\n return backburner$1.hasTimers();\n };\n\n // Used by global test teardown\n run.cancelTimers = function () {\n backburner$1.cancelTimers();\n };\n\n /**\n Immediately flushes any events scheduled in the 'sync' queue. Bindings\n use this queue so this method is a useful way to immediately force all\n bindings in the application to sync.\n \n You should call this method anytime you need any changed state to propagate\n throughout the app immediately without repainting the UI (which happens\n in the later 'render' queue added by the `ember-views` package).\n \n ```javascript\n run.sync();\n ```\n \n @method sync\n @static\n @for @ember/runloop\n @return {void}\n @private\n */\n run.sync = function () {\n if (backburner$1.currentInstance) {\n backburner$1.currentInstance.queues.sync.flush();\n }\n };\n\n /**\n Invokes the passed target/method and optional arguments after a specified\n period of time. The last parameter of this method must always be a number\n of milliseconds.\n \n You should use this method whenever you need to run some action after a\n period of time instead of using `setTimeout()`. This method will ensure that\n items that expire during the same script execution cycle all execute\n together, which is often more efficient than using a real setTimeout.\n \n ```javascript\n import { later } from '@ember/runloop';\n \n later(myContext, function() {\n // code here will execute within a RunLoop in about 500ms with this == myContext\n }, 500);\n ```\n \n @method later\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to invoke\n @param {Function|String} method The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @param {Number} wait Number of milliseconds to wait.\n @return {*} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.later = function () /*target, method*/{\n return backburner$1.later.apply(backburner$1, arguments);\n };\n\n /**\n Schedule a function to run one time during the current RunLoop. This is equivalent\n to calling `scheduleOnce` with the \"actions\" queue.\n \n @method once\n @static\n @for @ember/runloop\n @param {Object} [target] The target of the method to invoke.\n @param {Function|String} method The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @return {Object} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.once = function () {\n var _len3, args, _key3;\n\n false && !(run.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run.currentRunLoop || !emberDebug.isTesting());\n\n for (_len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n args.unshift('actions');\n return backburner$1.scheduleOnce.apply(backburner$1, args);\n };\n\n /**\n Schedules a function to run one time in a given queue of the current RunLoop.\n Calling this method with the same queue/target/method combination will have\n no effect (past the initial call).\n \n Note that although you can pass optional arguments these will not be\n considered when looking for duplicates. New arguments will replace previous\n calls.\n \n ```javascript\n import { run, scheduleOnce } from '@ember/runloop';\n \n function sayHi() {\n console.log('hi');\n }\n \n run(function() {\n scheduleOnce('afterRender', myContext, sayHi);\n scheduleOnce('afterRender', myContext, sayHi);\n // sayHi will only be executed once, in the afterRender queue of the RunLoop\n });\n ```\n \n Also note that for `run.scheduleOnce` to prevent additional calls, you need to\n pass the same function instance. The following case works as expected:\n \n ```javascript\n function log() {\n console.log('Logging only once');\n }\n \n function scheduleIt() {\n scheduleOnce('actions', myContext, log);\n }\n \n scheduleIt();\n scheduleIt();\n ```\n \n But this other case will schedule the function multiple times:\n \n ```javascript\n import { scheduleOnce } from '@ember/runloop';\n \n function scheduleIt() {\n scheduleOnce('actions', myContext, function() {\n console.log('Closure');\n });\n }\n \n scheduleIt();\n scheduleIt();\n \n // \"Closure\" will print twice, even though we're using `run.scheduleOnce`,\n // because the function we pass to it won't match the\n // previously scheduled operation.\n ```\n \n Available queues, and their order, can be found at `run.queues`\n \n @method scheduleOnce\n @static\n @for @ember/runloop\n @param {String} [queue] The name of the queue to schedule against. Default queues are 'sync' and 'actions'.\n @param {Object} [target] The target of the method to invoke.\n @param {Function|String} method The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @return {Object} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.scheduleOnce = function () /*queue, target, method*/{\n false && !(run.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run.currentRunLoop || !emberDebug.isTesting());\n\n return backburner$1.scheduleOnce.apply(backburner$1, arguments);\n };\n\n /**\n Schedules an item to run from within a separate run loop, after\n control has been returned to the system. This is equivalent to calling\n `run.later` with a wait time of 1ms.\n \n ```javascript\n import { next } from '@ember/runloop';\n \n next(myContext, function() {\n // code to be executed in the next run loop,\n // which will be scheduled after the current one\n });\n ```\n \n Multiple operations scheduled with `run.next` will coalesce\n into the same later run loop, along with any other operations\n scheduled by `run.later` that expire right around the same\n time that `run.next` operations will fire.\n \n Note that there are often alternatives to using `run.next`.\n For instance, if you'd like to schedule an operation to happen\n after all DOM element operations have completed within the current\n run loop, you can make use of the `afterRender` run loop queue (added\n by the `ember-views` package, along with the preceding `render` queue\n where all the DOM element operations happen).\n \n Example:\n \n ```app/components/my-component.js\n import Component from '@ember/component';\n import { scheduleOnce } from '@ember/runloop';\n \n export Component.extend({\n didInsertElement() {\n this._super(...arguments);\n scheduleOnce('afterRender', this, 'processChildElements');\n },\n \n processChildElements() {\n // ... do something with component's child component\n // elements after they've finished rendering, which\n // can't be done within this component's\n // `didInsertElement` hook because that gets run\n // before the child elements have been added to the DOM.\n }\n });\n ```\n \n One benefit of the above approach compared to using `run.next` is\n that you will be able to perform DOM/CSS operations before unprocessed\n elements are rendered to the screen, which may prevent flickering or\n other artifacts caused by delaying processing until after rendering.\n \n The other major benefit to the above approach is that `run.next`\n introduces an element of non-determinism, which can make things much\n harder to test, due to its reliance on `setTimeout`; it's much harder\n to guarantee the order of scheduled operations when they are scheduled\n outside of the current run loop, i.e. with `run.next`.\n \n @method next\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to invoke\n @param {Function|String} method The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @return {Object} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.next = function () {\n var _len4, args, _key4;\n\n for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n args.push(1);\n return backburner$1.later.apply(backburner$1, args);\n };\n\n /**\n Cancels a scheduled item. Must be a value returned by `later()`,\n `once()`, `scheduleOnce()`, `next()`, `debounce()`, or\n `throttle()`.\n \n ```javascript\n import {\n next,\n cancel,\n later,\n scheduleOnce,\n once,\n throttle,\n debounce\n } from '@ember/runloop';\n \n let runNext = next(myContext, function() {\n // will not be executed\n });\n \n cancel(runNext);\n \n let runLater = later(myContext, function() {\n // will not be executed\n }, 500);\n \n cancel(runLater);\n \n let runScheduleOnce = scheduleOnce('afterRender', myContext, function() {\n // will not be executed\n });\n \n cancel(runScheduleOnce);\n \n let runOnce = once(myContext, function() {\n // will not be executed\n });\n \n cancel(runOnce);\n \n let throttle = throttle(myContext, function() {\n // will not be executed\n }, 1, false);\n \n cancel(throttle);\n \n let debounce = debounce(myContext, function() {\n // will not be executed\n }, 1);\n \n cancel(debounce);\n \n let debounceImmediate = debounce(myContext, function() {\n // will be executed since we passed in true (immediate)\n }, 100, true);\n \n // the 100ms delay until this method can be called again will be canceled\n cancel(debounceImmediate);\n ```\n \n @method cancel\n @static\n @for @ember/runloop\n @param {Object} timer Timer object to cancel\n @return {Boolean} true if canceled or false/undefined if it wasn't found\n @public\n */\n run.cancel = function (timer) {\n return backburner$1.cancel(timer);\n };\n\n /**\n Delay calling the target method until the debounce period has elapsed\n with no additional debounce calls. If `debounce` is called again before\n the specified time has elapsed, the timer is reset and the entire period\n must pass again before the target method is called.\n \n This method should be used when an event may be called multiple times\n but the action should only be called once when the event is done firing.\n A common example is for scroll events where you only want updates to\n happen once scrolling has ceased.\n \n ```javascript\n import { debounce } from '@ember/runloop';\n \n function whoRan() {\n console.log(this.name + ' ran.');\n }\n \n let myContext = { name: 'debounce' };\n \n debounce(myContext, whoRan, 150);\n \n // less than 150ms passes\n debounce(myContext, whoRan, 150);\n \n // 150ms passes\n // whoRan is invoked with context myContext\n // console logs 'debounce ran.' one time.\n ```\n \n Immediate allows you to run the function immediately, but debounce\n other calls for this function until the wait time has elapsed. If\n `debounce` is called again before the specified time has elapsed,\n the timer is reset and the entire period must pass again before\n the method can be called again.\n \n ```javascript\n import { debounce } from '@ember/runloop';\n \n function whoRan() {\n console.log(this.name + ' ran.');\n }\n \n let myContext = { name: 'debounce' };\n \n debounce(myContext, whoRan, 150, true);\n \n // console logs 'debounce ran.' one time immediately.\n // 100ms passes\n debounce(myContext, whoRan, 150, true);\n \n // 150ms passes and nothing else is logged to the console and\n // the debouncee is no longer being watched\n debounce(myContext, whoRan, 150, true);\n \n // console logs 'debounce ran.' one time immediately.\n // 150ms passes and nothing else is logged to the console and\n // the debouncee is no longer being watched\n ```\n \n @method debounce\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to invoke\n @param {Function|String} method The method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @param {Number} wait Number of milliseconds to wait.\n @param {Boolean} immediate Trigger the function on the leading instead\n of the trailing edge of the wait interval. Defaults to false.\n @return {Array} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.debounce = function () {\n return backburner$1.debounce.apply(backburner$1, arguments);\n };\n\n /**\n Ensure that the target method is never called more frequently than\n the specified spacing period. The target method is called immediately.\n \n ```javascript\n import { throttle } from '@ember/runloop';\n \n function whoRan() {\n console.log(this.name + ' ran.');\n }\n \n let myContext = { name: 'throttle' };\n \n throttle(myContext, whoRan, 150);\n // whoRan is invoked with context myContext\n // console logs 'throttle ran.'\n \n // 50ms passes\n throttle(myContext, whoRan, 150);\n \n // 50ms passes\n throttle(myContext, whoRan, 150);\n \n // 150ms passes\n throttle(myContext, whoRan, 150);\n // whoRan is invoked with context myContext\n // console logs 'throttle ran.'\n ```\n \n @method throttle\n @static\n @for @ember/runloop\n @param {Object} [target] target of method to invoke\n @param {Function|String} method The method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.\n @param {Object} [args*] Optional arguments to pass to the timeout.\n @param {Number} spacing Number of milliseconds to space out requests.\n @param {Boolean} immediate Trigger the function on the leading instead\n of the trailing edge of the wait interval. Defaults to true.\n @return {Array} Timer information for use in canceling, see `run.cancel`.\n @public\n */\n run.throttle = function () {\n return backburner$1.throttle.apply(backburner$1, arguments);\n };\n\n /**\n Add a new named queue after the specified queue.\n \n The queue to add will only be added once.\n \n @method _addQueue\n @param {String} name the name of the queue to add.\n @param {String} after the name of the queue to add after.\n @private\n */\n run._addQueue = function (name, after) {\n if (run.queues.indexOf(name) === -1) {\n run.queues.splice(run.queues.indexOf(after) + 1, 0, name);\n }\n };\n\n /**\n @module ember\n */\n /**\n Helper class that allows you to register your library with Ember.\n \n Singleton created at `Ember.libraries`.\n \n @class Libraries\n @constructor\n @private\n */\n var Libraries = function () {\n function Libraries() {\n\n this._registry = [];\n this._coreLibIndex = 0;\n }\n\n Libraries.prototype._getLibraryByName = function (name) {\n var libs = this._registry,\n i;\n var count = libs.length;\n\n for (i = 0; i < count; i++) {\n if (libs[i].name === name) {\n return libs[i];\n }\n }\n };\n\n Libraries.prototype.register = function (name, version, isCoreLibrary) {\n var index = this._registry.length;\n\n if (!this._getLibraryByName(name)) {\n if (isCoreLibrary) {\n index = this._coreLibIndex++;\n }\n this._registry.splice(index, 0, { name: name, version: version });\n } else {\n false && emberDebug.warn('Library \"' + name + '\" is already registered with Ember.', false, { id: 'ember-metal.libraries-register' });\n }\n };\n\n Libraries.prototype.registerCoreLibrary = function (name, version) {\n this.register(name, version, true);\n };\n\n Libraries.prototype.deRegister = function (name) {\n var lib = this._getLibraryByName(name);\n var index = void 0;\n\n if (lib) {\n index = this._registry.indexOf(lib);\n this._registry.splice(index, 1);\n }\n };\n\n return Libraries;\n }();\n\n var libraries = new Libraries();\n\n /**\n @module ember\n */\n\n /*\n JavaScript (before ES6) does not have a Map implementation. Objects,\n which are often used as dictionaries, may only have Strings as keys.\n \n Because Ember has a way to get a unique identifier for every object\n via `guidFor`, we can implement a performant Map with arbitrary\n keys. Because it is commonly used in low-level bookkeeping, Map is\n implemented as a pure JavaScript object for performance.\n \n This implementation follows the current iteration of the ES6 proposal for\n maps (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets),\n with one exception: as we do not have the luxury of in-VM iteration, we implement a\n forEach method for iteration.\n \n Map is mocked out to look like an Ember object, so you can do\n `EmberMap.create()` for symmetry with other Ember classes.\n */\n\n function copyNull(obj) {\n var output = Object.create(null);\n\n for (var prop in obj) {\n // hasOwnPropery is not needed because obj is Object.create(null);\n output[prop] = obj[prop];\n }\n\n return output;\n }\n\n function copyMap(original, newObject) {\n var keys = original._keys.copy();\n var values = copyNull(original._values);\n\n newObject._keys = keys;\n newObject._values = values;\n newObject.size = original.size;\n\n return newObject;\n }\n\n /**\n This class is used internally by Ember and Ember Data.\n Please do not use it at this time. We plan to clean it up\n and add many tests soon.\n \n @class OrderedSet\n @namespace Ember\n @constructor\n @private\n */\n\n var OrderedSet = function () {\n function OrderedSet() {\n\n this.clear();\n }\n\n /**\n @method create\n @static\n @return {Ember.OrderedSet}\n @private\n */\n\n OrderedSet.create = function () {\n var Constructor = this;\n return new Constructor();\n };\n\n /**\n @method clear\n @private\n */\n\n OrderedSet.prototype.clear = function () {\n this.presenceSet = Object.create(null);\n this.list = [];\n this.size = 0;\n };\n\n /**\n @method add\n @param obj\n @param guid (optional, and for internal use)\n @return {Ember.OrderedSet}\n @private\n */\n\n OrderedSet.prototype.add = function (obj, _guid) {\n var guid = _guid || emberUtils.guidFor(obj);\n var presenceSet = this.presenceSet;\n var list = this.list;\n\n if (presenceSet[guid] !== true) {\n presenceSet[guid] = true;\n this.size = list.push(obj);\n }\n\n return this;\n };\n\n /**\n @since 1.8.0\n @method delete\n @param obj\n @param _guid (optional and for internal use only)\n @return {Boolean}\n @private\n */\n\n OrderedSet.prototype.delete = function (obj, _guid) {\n var guid = _guid || emberUtils.guidFor(obj),\n index;\n var presenceSet = this.presenceSet;\n var list = this.list;\n\n if (presenceSet[guid] === true) {\n delete presenceSet[guid];\n index = list.indexOf(obj);\n\n if (index > -1) {\n list.splice(index, 1);\n }\n this.size = list.length;\n return true;\n } else {\n return false;\n }\n };\n\n /**\n @method isEmpty\n @return {Boolean}\n @private\n */\n\n OrderedSet.prototype.isEmpty = function () {\n return this.size === 0;\n };\n\n /**\n @method has\n @param obj\n @return {Boolean}\n @private\n */\n\n OrderedSet.prototype.has = function (obj) {\n if (this.size === 0) {\n return false;\n }\n\n var guid = emberUtils.guidFor(obj);\n var presenceSet = this.presenceSet;\n\n return presenceSet[guid] === true;\n };\n\n /**\n @method forEach\n @param {Function} fn\n @param self\n @private\n */\n\n OrderedSet.prototype.forEach = function (fn /*, ...thisArg*/) {\n false && !(typeof fn === 'function') && emberDebug.assert(Object.prototype.toString.call(fn) + ' is not a function', typeof fn === 'function');\n\n if (this.size === 0) {\n return;\n }\n\n var list = this.list,\n i,\n _i;\n\n if (arguments.length === 2) {\n for (i = 0; i < list.length; i++) {\n fn.call(arguments[1], list[i]);\n }\n } else {\n for (_i = 0; _i < list.length; _i++) {\n fn(list[_i]);\n }\n }\n };\n\n /**\n @method toArray\n @return {Array}\n @private\n */\n\n OrderedSet.prototype.toArray = function () {\n return this.list.slice();\n };\n\n /**\n @method copy\n @return {Ember.OrderedSet}\n @private\n */\n\n OrderedSet.prototype.copy = function () {\n var Constructor = this.constructor;\n var set = new Constructor();\n\n set.presenceSet = copyNull(this.presenceSet);\n set.list = this.toArray();\n set.size = this.size;\n\n return set;\n };\n\n return OrderedSet;\n }();\n\n /**\n A Map stores values indexed by keys. Unlike JavaScript's\n default Objects, the keys of a Map can be any JavaScript\n object.\n \n Internally, a Map has two data structures:\n \n 1. `keys`: an OrderedSet of all of the existing keys\n 2. `values`: a JavaScript Object indexed by the `guidFor(key)`\n \n When a key/value pair is added for the first time, we\n add the key to the `keys` OrderedSet, and create or\n replace an entry in `values`. When an entry is deleted,\n we delete its entry in `keys` and `values`.\n \n @class Map\n @namespace Ember\n @private\n @constructor\n */\n\n var Map = function () {\n function Map() {\n\n this._keys = new OrderedSet();\n this._values = Object.create(null);\n this.size = 0;\n }\n\n /**\n @method create\n @static\n @private\n */\n\n Map.create = function () {\n var Constructor = this;\n return new Constructor();\n };\n\n /**\n Retrieve the value associated with a given key.\n @method get\n @param {*} key\n @return {*} the value associated with the key, or `undefined`\n @private\n */\n\n Map.prototype.get = function (key) {\n if (this.size === 0) {\n return;\n }\n\n var values = this._values;\n var guid = emberUtils.guidFor(key);\n\n return values[guid];\n };\n\n /**\n Adds a value to the map. If a value for the given key has already been\n provided, the new value will replace the old value.\n @method set\n @param {*} key\n @param {*} value\n @return {Ember.Map}\n @private\n */\n\n Map.prototype.set = function (key, value) {\n var keys = this._keys;\n var values = this._values;\n var guid = emberUtils.guidFor(key);\n\n // ensure we don't store -0\n var k = key === -0 ? 0 : key;\n\n keys.add(k, guid);\n\n values[guid] = value;\n\n this.size = keys.size;\n\n return this;\n };\n\n /**\n Removes a value from the map for an associated key.\n @since 1.8.0\n @method delete\n @param {*} key\n @return {Boolean} true if an item was removed, false otherwise\n @private\n */\n\n Map.prototype.delete = function (key) {\n if (this.size === 0) {\n return false;\n }\n // don't use ES6 \"delete\" because it will be annoying\n // to use in browsers that are not ES6 friendly;\n var keys = this._keys;\n var values = this._values;\n var guid = emberUtils.guidFor(key);\n\n if (keys.delete(key, guid)) {\n delete values[guid];\n this.size = keys.size;\n return true;\n } else {\n return false;\n }\n };\n\n /**\n Check whether a key is present.\n @method has\n @param {*} key\n @return {Boolean} true if the item was present, false otherwise\n @private\n */\n\n Map.prototype.has = function (key) {\n return this._keys.has(key);\n };\n\n /**\n Iterate over all the keys and values. Calls the function once\n for each key, passing in value, key, and the map being iterated over,\n in that order.\n The keys are guaranteed to be iterated over in insertion order.\n @method forEach\n @param {Function} callback\n @param {*} self if passed, the `this` value inside the\n callback. By default, `this` is the map.\n @private\n */\n\n Map.prototype.forEach = function (callback /*, ...thisArg*/) {\n false && !(typeof callback === 'function') && emberDebug.assert(Object.prototype.toString.call(callback) + ' is not a function', typeof callback === 'function');\n\n if (this.size === 0) {\n return;\n }\n\n var map = this;\n var cb = void 0,\n thisArg = void 0;\n\n if (arguments.length === 2) {\n thisArg = arguments[1];\n cb = function (key) {\n return callback.call(thisArg, map.get(key), key, map);\n };\n } else {\n cb = function (key) {\n return callback(map.get(key), key, map);\n };\n }\n\n this._keys.forEach(cb);\n };\n\n /**\n @method clear\n @private\n */\n\n Map.prototype.clear = function () {\n this._keys.clear();\n this._values = Object.create(null);\n this.size = 0;\n };\n\n /**\n @method copy\n @return {Ember.Map}\n @private\n */\n\n Map.prototype.copy = function () {\n return copyMap(this, new Map());\n };\n\n return Map;\n }();\n\n /**\n @class MapWithDefault\n @namespace Ember\n @extends Ember.Map\n @private\n @constructor\n @param [options]\n @param {*} [options.defaultValue]\n */\n\n var MapWithDefault = function (_Map) {\n emberBabel.inherits(MapWithDefault, _Map);\n\n function MapWithDefault(options) {\n\n var _this = emberBabel.possibleConstructorReturn(this, _Map.call(this));\n\n _this.defaultValue = options.defaultValue;\n return _this;\n }\n\n /**\n @method create\n @static\n @param [options]\n @param {*} [options.defaultValue]\n @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns\n `MapWithDefault` otherwise returns `EmberMap`\n @private\n */\n\n MapWithDefault.create = function (options) {\n if (options) {\n return new MapWithDefault(options);\n } else {\n return new Map();\n }\n };\n\n /**\n Retrieve the value associated with a given key.\n @method get\n @param {*} key\n @return {*} the value associated with the key, or the default value\n @private\n */\n\n MapWithDefault.prototype.get = function (key) {\n var hasValue = this.has(key),\n defaultValue;\n\n if (hasValue) {\n return _Map.prototype.get.call(this, key);\n } else {\n defaultValue = this.defaultValue(key);\n\n this.set(key, defaultValue);\n return defaultValue;\n }\n };\n\n /**\n @method copy\n @return {Ember.MapWithDefault}\n @private\n */\n\n MapWithDefault.prototype.copy = function () {\n var Constructor = this.constructor;\n return copyMap(this, new Constructor({\n defaultValue: this.defaultValue\n }));\n };\n\n return MapWithDefault;\n }(Map);\n\n /**\n @module @ember/object\n */\n\n /**\n To get multiple properties at once, call `getProperties`\n with an object followed by a list of strings or an array:\n \n ```javascript\n import { getProperties } from '@ember/object';\n \n getProperties(record, 'firstName', 'lastName', 'zipCode');\n // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n ```\n \n is equivalent to:\n \n ```javascript\n import { getProperties } from '@ember/object';\n \n getProperties(record, ['firstName', 'lastName', 'zipCode']);\n // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n ```\n \n @method getProperties\n @static\n @for @ember/object\n @param {Object} obj\n @param {String...|Array} list of keys to get\n @return {Object}\n @public\n */\n\n\n /**\n @module @ember/object\n */\n /**\n Set a list of properties on an object. These properties are set inside\n a single `beginPropertyChanges` and `endPropertyChanges` batch, so\n observers will be buffered.\n \n ```javascript\n let anObject = Ember.Object.create();\n \n anObject.setProperties({\n firstName: 'Stanley',\n lastName: 'Stuart',\n age: 21\n });\n ```\n \n @method setProperties\n @static\n @for @ember/object\n @param obj\n @param {Object} properties\n @return properties\n @public\n */\n\n\n /**\n @module @ember/object\n */\n\n function changeEvent(keyName) {\n return keyName + ':change';\n }\n\n function beforeEvent(keyName) {\n return keyName + ':before';\n }\n\n /**\n @method addObserver\n @static\n @for @ember/object/observers\n @param obj\n @param {String} _path\n @param {Object|Function} target\n @param {Function|String} [method]\n @public\n */\n function addObserver(obj, _path, target, method) {\n addListener(obj, changeEvent(_path), target, method);\n watch(obj, _path);\n\n return this;\n }\n\n /**\n @method removeObserver\n @static\n @for @ember/object/observers\n @param obj\n @param {String} path\n @param {Object|Function} target\n @param {Function|String} [method]\n @public\n */\n function removeObserver(obj, path, target, method) {\n unwatch(obj, path);\n removeListener(obj, changeEvent(path), target, method);\n\n return this;\n }\n\n /**\n @method _addBeforeObserver\n @static\n @for @ember/object/observers\n @param obj\n @param {String} path\n @param {Object|Function} target\n @param {Function|String} [method]\n @deprecated\n @private\n */\n function _addBeforeObserver(obj, path, target, method) {\n addListener(obj, beforeEvent(path), target, method);\n watch(obj, path);\n\n return this;\n }\n\n // Suspend observer during callback.\n //\n // This should only be used by the target of the observer\n // while it is setting the observed path.\n function _suspendObserver(obj, path, target, method, callback) {\n return suspendListener(obj, changeEvent(path), target, method, callback);\n }\n\n /**\n @method removeBeforeObserver\n @static\n @for @ember/object/observers\n @param obj\n @param {String} path\n @param {Object|Function} target\n @param {Function|String} [method]\n @deprecated\n @private\n */\n function _removeBeforeObserver(obj, path, target, method) {\n unwatch(obj, path);\n removeListener(obj, beforeEvent(path), target, method);\n\n return this;\n }\n\n /**\n @module ember\n */\n\n // ..........................................................\n // BINDING\n //\n\n var Binding = function () {\n function Binding(toPath, fromPath) {\n\n // Configuration\n this._from = fromPath;\n this._to = toPath;\n this._oneWay = undefined;\n\n // State\n this._direction = undefined;\n this._readyToSync = undefined;\n this._fromObj = undefined;\n this._fromPath = undefined;\n this._toObj = undefined;\n }\n\n /**\n @class Binding\n @namespace Ember\n @deprecated See https://emberjs.com/deprecations/v2.x#toc_ember-binding\n @public\n */\n\n /**\n This copies the Binding so it can be connected to another object.\n @method copy\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.copy = function () {\n var copy = new Binding(this._to, this._from);\n if (this._oneWay) {\n copy._oneWay = true;\n }\n return copy;\n };\n\n // ..........................................................\n // CONFIG\n //\n\n /**\n This will set `from` property path to the specified value. It will not\n attempt to resolve this property path to an actual object until you\n connect the binding.\n The binding will search for the property path starting at the root object\n you pass when you `connect()` the binding. It follows the same rules as\n `get()` - see that method for more information.\n @method from\n @param {String} path The property path to connect to.\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.from = function (path) {\n this._from = path;\n return this;\n };\n\n /**\n This will set the `to` property path to the specified value. It will not\n attempt to resolve this property path to an actual object until you\n connect the binding.\n The binding will search for the property path starting at the root object\n you pass when you `connect()` the binding. It follows the same rules as\n `get()` - see that method for more information.\n @method to\n @param {String|Tuple} path A property path or tuple.\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.to = function (path) {\n this._to = path;\n return this;\n };\n\n /**\n Configures the binding as one way. A one-way binding will relay changes\n on the `from` side to the `to` side, but not the other way around. This\n means that if you change the `to` side directly, the `from` side may have\n a different value.\n @method oneWay\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.oneWay = function () {\n this._oneWay = true;\n return this;\n };\n\n /**\n @method toString\n @return {String} string representation of binding\n @public\n */\n\n Binding.prototype.toString = function () {\n var oneWay = this._oneWay ? '[oneWay]' : '';\n return 'Ember.Binding<' + emberUtils.guidFor(this) + '>(' + this._from + ' -> ' + this._to + ')' + oneWay;\n };\n\n // ..........................................................\n // CONNECT AND SYNC\n //\n\n /**\n Attempts to connect this binding instance so that it can receive and relay\n changes. This method will raise an exception if you have not set the\n from/to properties yet.\n @method connect\n @param {Object} obj The root object for this binding.\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.connect = function (obj) {\n false && !!!obj && emberDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);\n\n var fromObj = void 0,\n fromPath = void 0,\n possibleGlobal = void 0,\n name;\n\n // If the binding's \"from\" path could be interpreted as a global, verify\n // whether the path refers to a global or not by consulting `Ember.lookup`.\n if (isGlobalPath(this._from)) {\n name = getFirstKey(this._from);\n\n possibleGlobal = emberEnvironment.context.lookup[name];\n\n if (possibleGlobal) {\n fromObj = possibleGlobal;\n fromPath = getTailPath(this._from);\n }\n }\n\n if (fromObj === undefined) {\n fromObj = obj;\n fromPath = this._from;\n }\n\n trySet(obj, this._to, get(fromObj, fromPath));\n\n // Add an observer on the object to be notified when the binding should be updated.\n addObserver(fromObj, fromPath, this, 'fromDidChange');\n\n // If the binding is a two-way binding, also set up an observer on the target.\n if (!this._oneWay) {\n addObserver(obj, this._to, this, 'toDidChange');\n }\n\n addListener(obj, 'willDestroy', this, 'disconnect');\n\n fireDeprecations(obj, this._to, this._from, possibleGlobal, this._oneWay, !possibleGlobal && !this._oneWay);\n\n this._readyToSync = true;\n this._fromObj = fromObj;\n this._fromPath = fromPath;\n this._toObj = obj;\n\n return this;\n };\n\n /**\n Disconnects the binding instance. Changes will no longer be relayed. You\n will not usually need to call this method.\n @method disconnect\n @return {Ember.Binding} `this`\n @public\n */\n\n Binding.prototype.disconnect = function () {\n false && !!!this._toObj && emberDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);\n\n // Remove an observer on the object so we're no longer notified of\n // changes that should update bindings.\n\n removeObserver(this._fromObj, this._fromPath, this, 'fromDidChange');\n\n // If the binding is two-way, remove the observer from the target as well.\n if (!this._oneWay) {\n removeObserver(this._toObj, this._to, this, 'toDidChange');\n }\n\n this._readyToSync = false; // Disable scheduled syncs...\n return this;\n };\n\n // ..........................................................\n // PRIVATE\n //\n\n /* Called when the from side changes. */\n\n Binding.prototype.fromDidChange = function () {\n this._scheduleSync('fwd');\n };\n\n /* Called when the to side changes. */\n\n Binding.prototype.toDidChange = function () {\n this._scheduleSync('back');\n };\n\n Binding.prototype._scheduleSync = function (dir) {\n var existingDir = this._direction;\n\n // If we haven't scheduled the binding yet, schedule it.\n if (existingDir === undefined) {\n run.schedule('sync', this, '_sync');\n this._direction = dir;\n }\n\n // If both a 'back' and 'fwd' sync have been scheduled on the same object,\n // default to a 'fwd' sync so that it remains deterministic.\n if (existingDir === 'back' && dir === 'fwd') {\n this._direction = 'fwd';\n }\n };\n\n Binding.prototype._sync = function () {\n var log = emberEnvironment.ENV.LOG_BINDINGS,\n fromValue,\n toValue;\n\n var toObj = this._toObj;\n\n // Don't synchronize destroyed objects or disconnected bindings.\n if (toObj.isDestroyed || !this._readyToSync) {\n return;\n }\n\n // Get the direction of the binding for the object we are\n // synchronizing from.\n var direction = this._direction;\n\n var fromObj = this._fromObj;\n var fromPath = this._fromPath;\n\n this._direction = undefined;\n\n // If we're synchronizing from the remote object...\n if (direction === 'fwd') {\n fromValue = get(fromObj, fromPath);\n\n if (log) {\n Logger.log(' ', this.toString(), '->', fromValue, fromObj);\n }\n if (this._oneWay) {\n trySet(toObj, this._to, fromValue);\n } else {\n _suspendObserver(toObj, this._to, this, 'toDidChange', function () {\n trySet(toObj, this._to, fromValue);\n });\n }\n // If we're synchronizing *to* the remote object.\n } else if (direction === 'back') {\n toValue = get(toObj, this._to);\n\n if (log) {\n Logger.log(' ', this.toString(), '<-', toValue, toObj);\n }\n _suspendObserver(fromObj, fromPath, this, 'fromDidChange', function () {\n trySet(fromObj, fromPath, toValue);\n });\n }\n };\n\n return Binding;\n }();\n\n function fireDeprecations(obj, toPath, fromPath, deprecateGlobal, deprecateOneWay, deprecateAlias) {\n\n var objectInfo = 'The `' + toPath + '` property of `' + obj + '` is an `Ember.Binding` connected to `' + fromPath + '`, but ';\n false && !!deprecateGlobal && emberDebug.deprecate(objectInfo + ('`Ember.Binding` is deprecated. Since you' + ' are binding to a global consider using a service instead.'), !deprecateGlobal, {\n id: 'ember-metal.binding',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x#toc_ember-binding'\n });\n false && !!deprecateOneWay && emberDebug.deprecate(objectInfo + ('`Ember.Binding` is deprecated. Since you' + ' are using a `oneWay` binding consider using a `readOnly` computed' + ' property instead.'), !deprecateOneWay, {\n id: 'ember-metal.binding',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x#toc_ember-binding'\n });\n false && !!deprecateAlias && emberDebug.deprecate(objectInfo + ('`Ember.Binding` is deprecated. Consider' + ' using an `alias` computed property instead.'), !deprecateAlias, {\n id: 'ember-metal.binding',\n until: '3.0.0',\n url: 'https://emberjs.com/deprecations/v2.x#toc_ember-binding'\n });\n }\n\n (function (to, from) {\n for (var key in from) {\n if (from.hasOwnProperty(key)) {\n to[key] = from[key];\n }\n }\n })(Binding, {\n\n /*\n See `Ember.Binding.from`.\n @method from\n @static\n */\n from: function (from) {\n var C = this;\n return new C(undefined, from);\n },\n\n /*\n See `Ember.Binding.to`.\n @method to\n @static\n */\n to: function (to) {\n var C = this;\n return new C(to, undefined);\n }\n });\n /**\n An `Ember.Binding` connects the properties of two objects so that whenever\n the value of one property changes, the other property will be changed also.\n \n ## Automatic Creation of Bindings with `/^*Binding/`-named Properties.\n \n You do not usually create Binding objects directly but instead describe\n bindings in your class or object definition using automatic binding\n detection.\n \n Properties ending in a `Binding` suffix will be converted to `Ember.Binding`\n instances. The value of this property should be a string representing a path\n to another object or a custom binding instance created using Binding helpers\n (see \"One Way Bindings\"):\n \n ```\n valueBinding: \"MyApp.someController.title\"\n ```\n \n This will create a binding from `MyApp.someController.title` to the `value`\n property of your object instance automatically. Now the two values will be\n kept in sync.\n \n ## One Way Bindings\n \n One especially useful binding customization you can use is the `oneWay()`\n helper. This helper tells Ember that you are only interested in\n receiving changes on the object you are binding from. For example, if you\n are binding to a preference and you want to be notified if the preference\n has changed, but your object will not be changing the preference itself, you\n could do:\n \n ```\n bigTitlesBinding: Ember.Binding.oneWay(\"MyApp.preferencesController.bigTitles\")\n ```\n \n This way if the value of `MyApp.preferencesController.bigTitles` changes the\n `bigTitles` property of your object will change also. However, if you\n change the value of your `bigTitles` property, it will not update the\n `preferencesController`.\n \n One way bindings are almost twice as fast to setup and twice as fast to\n execute because the binding only has to worry about changes to one side.\n \n You should consider using one way bindings anytime you have an object that\n may be created frequently and you do not intend to change a property; only\n to monitor it for changes (such as in the example above).\n \n ## Adding Bindings Manually\n \n All of the examples above show you how to configure a custom binding, but the\n result of these customizations will be a binding template, not a fully active\n Binding instance. The binding will actually become active only when you\n instantiate the object the binding belongs to. It is useful, however, to\n understand what actually happens when the binding is activated.\n \n For a binding to function it must have at least a `from` property and a `to`\n property. The `from` property path points to the object/key that you want to\n bind from while the `to` path points to the object/key you want to bind to.\n \n When you define a custom binding, you are usually describing the property\n you want to bind from (such as `MyApp.someController.value` in the examples\n above). When your object is created, it will automatically assign the value\n you want to bind `to` based on the name of your binding key. In the\n examples above, during init, Ember objects will effectively call\n something like this on your binding:\n \n ```javascript\n binding = Ember.Binding.from(\"valueBinding\").to(\"value\");\n ```\n \n This creates a new binding instance based on the template you provide, and\n sets the to path to the `value` property of the new object. Now that the\n binding is fully configured with a `from` and a `to`, it simply needs to be\n connected to become active. This is done through the `connect()` method:\n \n ```javascript\n binding.connect(this);\n ```\n \n Note that when you connect a binding you pass the object you want it to be\n connected to. This object will be used as the root for both the from and\n to side of the binding when inspecting relative paths. This allows the\n binding to be automatically inherited by subclassed objects as well.\n \n This also allows you to bind between objects using the paths you declare in\n `from` and `to`:\n \n ```javascript\n // Example 1\n binding = Ember.Binding.from(\"App.someObject.value\").to(\"value\");\n binding.connect(this);\n \n // Example 2\n binding = Ember.Binding.from(\"parentView.value\").to(\"App.someObject.value\");\n binding.connect(this);\n ```\n \n Now that the binding is connected, it will observe both the from and to side\n and relay changes.\n \n If you ever needed to do so (you almost never will, but it is useful to\n understand this anyway), you could manually create an active binding by\n using the `Ember.bind()` helper method. (This is the same method used by\n to setup your bindings on objects):\n \n ```javascript\n Ember.bind(MyApp.anotherObject, \"value\", \"MyApp.someController.value\");\n ```\n \n Both of these code fragments have the same effect as doing the most friendly\n form of binding creation like so:\n \n ```javascript\n MyApp.anotherObject = Ember.Object.create({\n valueBinding: \"MyApp.someController.value\",\n \n // OTHER CODE FOR THIS OBJECT...\n });\n ```\n \n Ember's built in binding creation method makes it easy to automatically\n create bindings for you. You should always use the highest-level APIs\n available, even if you understand how it works underneath.\n \n @class Binding\n @namespace Ember\n @since Ember 0.9\n @public\n */\n // Ember.Binding = Binding; ES6TODO: where to put this?\n\n\n /**\n Global helper method to create a new binding. Just pass the root object\n along with a `to` and `from` path to create and connect the binding.\n \n @method bind\n @for Ember\n @param {Object} obj The root object of the transform.\n @param {String} to The path to the 'to' side of the binding.\n Must be relative to obj.\n @param {String} from The path to the 'from' side of the binding.\n Must be relative to obj or a global path.\n @return {Ember.Binding} binding instance\n @public\n */\n\n\n /**\n @module @ember/object\n */\n var a_concat = Array.prototype.concat;\n var isArray = Array.isArray;\n\n function isMethod(obj) {\n return 'function' === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;\n }\n\n var CONTINUE = {};\n\n function mixinProperties(mixinsMeta, mixin) {\n var guid = void 0;\n\n if (mixin instanceof Mixin) {\n guid = emberUtils.guidFor(mixin);\n if (mixinsMeta.peekMixins(guid)) {\n return CONTINUE;\n }\n mixinsMeta.writeMixins(guid, mixin);\n return mixin.properties;\n } else {\n return mixin; // apply anonymous mixin properties\n }\n }\n\n function concatenatedMixinProperties(concatProp, props, values, base) {\n // reset before adding each new mixin to pickup concats from previous\n var concats = values[concatProp] || base[concatProp];\n if (props[concatProp]) {\n concats = concats ? a_concat.call(concats, props[concatProp]) : props[concatProp];\n }\n return concats;\n }\n\n function giveDescriptorSuper(meta$$1, key, property, values, descs, base) {\n var superProperty = void 0,\n possibleDesc,\n superDesc;\n\n // Computed properties override methods, and do not call super to them\n if (values[key] === undefined) {\n // Find the original descriptor in a parent mixin\n superProperty = descs[key];\n }\n\n // If we didn't find the original descriptor in a parent mixin, find\n // it on the original object.\n if (!superProperty) {\n possibleDesc = base[key];\n superDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;\n\n\n superProperty = superDesc;\n }\n\n if (superProperty === undefined || !(superProperty instanceof ComputedProperty)) {\n return property;\n }\n\n // Since multiple mixins may inherit from the same parent, we need\n // to clone the computed property so that other mixins do not receive\n // the wrapped version.\n property = Object.create(property);\n property._getter = emberUtils.wrap(property._getter, superProperty._getter);\n if (superProperty._setter) {\n if (property._setter) {\n property._setter = emberUtils.wrap(property._setter, superProperty._setter);\n } else {\n property._setter = superProperty._setter;\n }\n }\n\n return property;\n }\n\n function giveMethodSuper(obj, key, method, values, descs) {\n var superMethod = void 0;\n\n // Methods overwrite computed properties, and do not call super to them.\n if (descs[key] === undefined) {\n // Find the original method in a parent mixin\n superMethod = values[key];\n }\n\n // If we didn't find the original value in a parent mixin, find it in\n // the original object\n superMethod = superMethod || obj[key];\n\n // Only wrap the new method if the original method was a function\n if (superMethod === undefined || 'function' !== typeof superMethod) {\n return method;\n }\n\n return emberUtils.wrap(method, superMethod);\n }\n\n function applyConcatenatedProperties(obj, key, value, values) {\n var baseValue = values[key] || obj[key];\n var ret = void 0;\n\n if (baseValue === null || baseValue === undefined) {\n ret = emberUtils.makeArray(value);\n } else if (isArray(baseValue)) {\n if (value === null || value === undefined) {\n ret = baseValue;\n } else {\n ret = a_concat.call(baseValue, value);\n }\n } else {\n ret = a_concat.call(emberUtils.makeArray(baseValue), value);\n }\n\n return ret;\n }\n\n function applyMergedProperties(obj, key, value, values) {\n var baseValue = values[key] || obj[key],\n propValue;\n\n false && !!isArray(value) && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', !isArray(value));\n\n if (!baseValue) {\n return value;\n }\n\n var newBase = emberUtils.assign({}, baseValue);\n var hasFunction = false;\n\n for (var prop in value) {\n if (!value.hasOwnProperty(prop)) {\n continue;\n }\n\n propValue = value[prop];\n\n if (isMethod(propValue)) {\n // TODO: support for Computed Properties, etc?\n hasFunction = true;\n newBase[prop] = giveMethodSuper(obj, prop, propValue, baseValue, {});\n } else {\n newBase[prop] = propValue;\n }\n }\n\n if (hasFunction) {\n newBase._super = emberUtils.ROOT;\n }\n\n return newBase;\n }\n\n function addNormalizedProperty(base, key, value, meta$$1, descs, values, concats, mergings) {\n if (value instanceof Descriptor) {\n if (value === REQUIRED && descs[key]) {\n return CONTINUE;\n }\n\n // Wrap descriptor function to implement\n // _super() if needed\n if (value._getter) {\n value = giveDescriptorSuper(meta$$1, key, value, values, descs, base);\n }\n\n descs[key] = value;\n values[key] = undefined;\n } else {\n if (concats && concats.indexOf(key) >= 0 || key === 'concatenatedProperties' || key === 'mergedProperties') {\n value = applyConcatenatedProperties(base, key, value, values);\n } else if (mergings && mergings.indexOf(key) > -1) {\n value = applyMergedProperties(base, key, value, values);\n } else if (isMethod(value)) {\n value = giveMethodSuper(base, key, value, values, descs);\n }\n\n descs[key] = undefined;\n values[key] = value;\n }\n }\n\n function mergeMixins(mixins, meta$$1, descs, values, base, keys) {\n var currentMixin = void 0,\n props = void 0,\n key = void 0,\n concats = void 0,\n mergings = void 0,\n i;\n\n function removeKeys(keyName) {\n delete descs[keyName];\n delete values[keyName];\n }\n\n for (i = 0; i < mixins.length; i++) {\n currentMixin = mixins[i];\n false && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');\n\n props = mixinProperties(meta$$1, currentMixin);\n if (props === CONTINUE) {\n continue;\n }\n\n if (props) {\n if (base.willMergeMixin) {\n base.willMergeMixin(props);\n }\n concats = concatenatedMixinProperties('concatenatedProperties', props, values, base);\n mergings = concatenatedMixinProperties('mergedProperties', props, values, base);\n\n for (key in props) {\n if (!props.hasOwnProperty(key)) {\n continue;\n }\n keys.push(key);\n addNormalizedProperty(base, key, props[key], meta$$1, descs, values, concats, mergings);\n }\n\n // manually copy toString() because some JS engines do not enumerate it\n if (props.hasOwnProperty('toString')) {\n base.toString = props.toString;\n }\n } else if (currentMixin.mixins) {\n mergeMixins(currentMixin.mixins, meta$$1, descs, values, base, keys);\n if (currentMixin._without) {\n currentMixin._without.forEach(removeKeys);\n }\n }\n }\n }\n\n function detectBinding(key) {\n var length = key.length;\n\n return length > 7 && key.charCodeAt(length - 7) === 66 && key.indexOf('inding', length - 6) !== -1;\n }\n // warm both paths of above function\n detectBinding('notbound');\n detectBinding('fooBinding');\n\n function connectBindings(obj, meta$$1) {\n // TODO Mixin.apply(instance) should disconnect binding if exists\n meta$$1.forEachBindings(function (key, binding) {\n var to;\n\n if (binding) {\n to = key.slice(0, -7); // strip Binding off end\n\n if (binding instanceof Binding) {\n binding = binding.copy(); // copy prototypes' instance\n binding.to(to);\n } else {\n // binding is string path\n binding = new Binding(to, binding);\n }\n binding.connect(obj);\n obj[key] = binding;\n }\n });\n // mark as applied\n meta$$1.clearBindings();\n }\n\n function finishPartial(obj, meta$$1) {\n connectBindings(obj, meta$$1 === undefined ? meta(obj) : meta$$1);\n return obj;\n }\n\n function followAlias(obj, desc, descs, values) {\n var altKey = desc.methodName;\n var value = void 0;\n var possibleDesc = void 0;\n if (descs[altKey] || values[altKey]) {\n value = values[altKey];\n desc = descs[altKey];\n } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor) {\n desc = possibleDesc;\n value = undefined;\n } else {\n desc = undefined;\n value = obj[altKey];\n }\n\n return { desc: desc, value: value };\n }\n\n function updateObserversAndListeners(obj, key, paths, updateMethod) {\n var i;\n\n if (paths) {\n for (i = 0; i < paths.length; i++) {\n updateMethod(obj, paths[i], null, key);\n }\n }\n }\n\n function replaceObserversAndListeners(obj, key, observerOrListener) {\n var prev = obj[key];\n\n if (typeof prev === 'function') {\n updateObserversAndListeners(obj, key, prev.__ember_observesBefore__, _removeBeforeObserver);\n updateObserversAndListeners(obj, key, prev.__ember_observes__, removeObserver);\n updateObserversAndListeners(obj, key, prev.__ember_listens__, removeListener);\n }\n\n if (typeof observerOrListener === 'function') {\n updateObserversAndListeners(obj, key, observerOrListener.__ember_observesBefore__, _addBeforeObserver);\n updateObserversAndListeners(obj, key, observerOrListener.__ember_observes__, addObserver);\n updateObserversAndListeners(obj, key, observerOrListener.__ember_listens__, addListener);\n }\n }\n\n function applyMixin(obj, mixins, partial) {\n var descs = {},\n i,\n followed;\n var values = {};\n var meta$$1 = meta(obj);\n var keys = [];\n var key = void 0,\n value = void 0,\n desc = void 0;\n\n obj._super = emberUtils.ROOT;\n\n // Go through all mixins and hashes passed in, and:\n //\n // * Handle concatenated properties\n // * Handle merged properties\n // * Set up _super wrapping if necessary\n // * Set up computed property descriptors\n // * Copying `toString` in broken browsers\n mergeMixins(mixins, meta$$1, descs, values, obj, keys);\n\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n if (key === 'constructor' || !values.hasOwnProperty(key)) {\n continue;\n }\n\n desc = descs[key];\n value = values[key];\n\n if (desc === REQUIRED) {\n continue;\n }\n\n while (desc && desc instanceof Alias) {\n followed = followAlias(obj, desc, descs, values);\n\n desc = followed.desc;\n value = followed.value;\n }\n\n if (desc === undefined && value === undefined) {\n continue;\n }\n\n replaceObserversAndListeners(obj, key, value);\n\n if (detectBinding(key)) {\n meta$$1.writeBindings(key, value);\n }\n\n defineProperty(obj, key, desc, value, meta$$1);\n }\n\n if (!partial) {\n // don't apply to prototype\n finishPartial(obj, meta$$1);\n }\n\n return obj;\n }\n\n /**\n @method mixin\n @param obj\n @param mixins*\n @return obj\n @private\n */\n\n\n /**\n The `Mixin` class allows you to create mixins, whose properties can be\n added to other classes. For instance,\n \n ```javascript\n import Mixin from '@ember/object/mixin';\n \n const EditableMixin = Mixin.create({\n edit() {\n console.log('starting to edit');\n this.set('isEditing', true);\n },\n isEditing: false\n });\n ```\n \n ```javascript\n import EmberObject from '@ember/object';\n import EditableMixin from '../mixins/editable';\n \n // Mix mixins into classes by passing them as the first arguments to\n // `.extend.`\n const Comment = EmberObject.extend(EditableMixin, {\n post: null\n });\n \n let comment = Comment.create({\n post: somePost\n });\n \n comment.edit(); // outputs 'starting to edit'\n ```\n \n Note that Mixins are created with `Mixin.create`, not\n `Mixin.extend`.\n \n Note that mixins extend a constructor's prototype so arrays and object literals\n defined as properties will be shared amongst objects that implement the mixin.\n If you want to define a property in a mixin that is not shared, you can define\n it either as a computed property or have it be created on initialization of the object.\n \n ```javascript\n // filters array will be shared amongst any object implementing mixin\n import Mixin from '@ember/object/mixin';\n import { A } from '@ember/array';\n \n const FilterableMixin = Mixin.create({\n filters: A()\n });\n ```\n \n ```javascript\n import Mixin from '@ember/object/mixin';\n import { A } from '@ember/array';\n import { computed } from '@ember/object';\n \n // filters will be a separate array for every object implementing the mixin\n const FilterableMixin = Mixin.create({\n filters: computed(function() {\n return A();\n })\n });\n ```\n \n ```javascript\n import Mixin from '@ember/object/mixin';\n import { A } from '@ember/array';\n \n // filters will be created as a separate array during the object's initialization\n const Filterable = Mixin.create({\n filters: null,\n \n init() {\n this._super(...arguments);\n this.set(\"filters\", A());\n }\n });\n ```\n \n @class Mixin\n @public\n */\n\n var Mixin = function () {\n function Mixin(mixins, properties) {\n\n this.properties = properties;\n\n var length = mixins && mixins.length,\n m,\n i,\n x;\n\n if (length > 0) {\n m = new Array(length);\n\n\n for (i = 0; i < length; i++) {\n x = mixins[i];\n\n if (x instanceof Mixin) {\n m[i] = x;\n } else {\n m[i] = new Mixin(undefined, x);\n }\n }\n\n this.mixins = m;\n } else {\n this.mixins = undefined;\n }\n this.ownerConstructor = undefined;\n this._without = undefined;\n this[emberUtils.GUID_KEY] = null;\n this[emberUtils.NAME_KEY] = null;\n emberDebug.debugSeal(this);\n }\n\n Mixin.applyPartial = function (obj) {\n var _len2, args, _key2;\n\n for (_len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return applyMixin(obj, args, true);\n };\n\n /**\n @method create\n @for @ember/object/mixin\n @static\n @param arguments*\n @public\n */\n\n Mixin.create = function () {\n // ES6TODO: this relies on a global state?\n unprocessedFlag = true;\n var M = this,\n _len3,\n args,\n _key3;\n\n for (_len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return new M(args, undefined);\n };\n\n // returns the mixins currently applied to the specified object\n // TODO: Make `mixin`\n\n\n Mixin.mixins = function (obj) {\n var meta$$1 = exports.peekMeta(obj);\n var ret = [];\n if (meta$$1 === undefined) {\n return ret;\n }\n\n meta$$1.forEachMixins(function (key, currentMixin) {\n // skip primitive mixins since these are always anonymous\n if (!currentMixin.properties) {\n ret.push(currentMixin);\n }\n });\n\n return ret;\n };\n\n /**\n @method reopen\n @param arguments*\n @private\n */\n\n Mixin.prototype.reopen = function () {\n var currentMixin = void 0;\n\n if (this.properties) {\n currentMixin = new Mixin(undefined, this.properties);\n this.properties = undefined;\n this.mixins = [currentMixin];\n } else if (!this.mixins) {\n this.mixins = [];\n }\n\n var mixins = this.mixins;\n var idx = void 0;\n\n for (idx = 0; idx < arguments.length; idx++) {\n currentMixin = arguments[idx];\n false && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');\n\n if (currentMixin instanceof Mixin) {\n mixins.push(currentMixin);\n } else {\n mixins.push(new Mixin(undefined, currentMixin));\n }\n }\n\n return this;\n };\n\n /**\n @method apply\n @param obj\n @return applied object\n @private\n */\n\n Mixin.prototype.apply = function (obj) {\n return applyMixin(obj, [this], false);\n };\n\n Mixin.prototype.applyPartial = function (obj) {\n return applyMixin(obj, [this], true);\n };\n\n /**\n @method detect\n @param obj\n @return {Boolean}\n @private\n */\n\n Mixin.prototype.detect = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n if (obj instanceof Mixin) {\n return _detect(obj, this, {});\n }\n var meta$$1 = exports.peekMeta(obj);\n if (meta$$1 === undefined) {\n return false;\n }\n return !!meta$$1.peekMixins(emberUtils.guidFor(this));\n };\n\n Mixin.prototype.without = function () {\n var ret = new Mixin([this]),\n _len4,\n args,\n _key4;\n\n for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n ret._without = args;\n return ret;\n };\n\n Mixin.prototype.keys = function () {\n var keys = {};\n\n\n _keys(keys, this, {});\n var ret = Object.keys(keys);\n return ret;\n };\n\n return Mixin;\n }();\n\n Mixin._apply = applyMixin;\n Mixin.finishPartial = finishPartial;\n\n var MixinPrototype = Mixin.prototype;\n MixinPrototype.toString = Object.toString;\n\n emberDebug.debugSeal(MixinPrototype);\n\n var unprocessedFlag = false;\n\n function _detect(curMixin, targetMixin, seen) {\n var guid = emberUtils.guidFor(curMixin);\n\n if (seen[guid]) {\n return false;\n }\n seen[guid] = true;\n\n if (curMixin === targetMixin) {\n return true;\n }\n var mixins = curMixin.mixins;\n var loc = mixins ? mixins.length : 0;\n while (--loc >= 0) {\n if (_detect(mixins[loc], targetMixin, seen)) {\n return true;\n }\n }\n return false;\n }\n\n function _keys(ret, mixin, seen) {\n var props, i, key;\n\n if (seen[emberUtils.guidFor(mixin)]) {\n return;\n }\n seen[emberUtils.guidFor(mixin)] = true;\n\n if (mixin.properties) {\n props = Object.keys(mixin.properties);\n\n for (i = 0; i < props.length; i++) {\n key = props[i];\n\n ret[key] = true;\n }\n } else if (mixin.mixins) {\n mixin.mixins.forEach(function (x) {\n return _keys(ret, x, seen);\n });\n }\n }\n\n var REQUIRED = new Descriptor();\n REQUIRED.toString = function () {\n return '(Required Property)';\n };\n\n /**\n Denotes a required property for a mixin\n \n @method required\n @for Ember\n @private\n */\n\n\n function Alias(methodName) {\n this.isDescriptor = true;\n this.methodName = methodName;\n }\n\n Alias.prototype = new Descriptor();\n\n /**\n Makes a method available via an additional name.\n \n ```app/utils/person.js\n import EmberObject, {\n aliasMethod\n } from '@ember/object';\n \n export default EmberObject.extend({\n name() {\n return 'Tomhuda Katzdale';\n },\n moniker: aliasMethod('name')\n });\n ```\n \n ```javascript\n let goodGuy = Person.create();\n \n goodGuy.name(); // 'Tomhuda Katzdale'\n goodGuy.moniker(); // 'Tomhuda Katzdale'\n ```\n \n @method aliasMethod\n @static\n @for @ember/object\n @param {String} methodName name of the method to alias\n @public\n */\n\n\n // ..........................................................\n // OBSERVER HELPER\n //\n\n /**\n Specify a method that observes property changes.\n \n ```javascript\n import EmberObject from '@ember/object';\n import { observer } from '@ember/object';\n \n export default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n });\n ```\n \n Also available as `Function.prototype.observes` if prototype extensions are\n enabled.\n \n @method observer\n @for @ember/object\n @param {String} propertyNames*\n @param {Function} func\n @return func\n @public\n @static\n */\n function observer() {\n var _paths = void 0,\n func = void 0,\n _len5,\n args,\n _key5,\n i;\n\n for (_len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n if (typeof args[args.length - 1] !== 'function') {\n // revert to old, soft-deprecated argument ordering\n false && !false && emberDebug.deprecate('Passing the dependentKeys after the callback function in observer is deprecated. Ensure the callback function is the last argument.', false, { id: 'ember-metal.observer-argument-order', until: '3.0.0' });\n\n func = args.shift();\n _paths = args;\n } else {\n func = args.pop();\n _paths = args;\n }\n\n false && !(typeof func === 'function') && emberDebug.assert('observer called without a function', typeof func === 'function');\n false && !(_paths.length > 0 && _paths.every(function (p) {\n return typeof p === 'string' && p.length;\n })) && emberDebug.assert('observer called without valid path', _paths.length > 0 && _paths.every(function (p) {\n return typeof p === 'string' && p.length;\n }));\n\n var paths = [];\n var addWatchedProperty = function (path) {\n return paths.push(path);\n };\n\n for (i = 0; i < _paths.length; ++i) {\n expandProperties(_paths[i], addWatchedProperty);\n }\n\n func.__ember_observes__ = paths;\n return func;\n }\n\n /**\n Specify a method that observes property changes.\n \n ```javascript\n import EmberObject from '@ember/object';\n \n EmberObject.extend({\n valueObserver: Ember.immediateObserver('value', function() {\n // Executes whenever the \"value\" property changes\n })\n });\n ```\n \n In the future, `observer` may become asynchronous. In this event,\n `immediateObserver` will maintain the synchronous behavior.\n \n Also available as `Function.prototype.observesImmediately` if prototype extensions are\n enabled.\n \n @method _immediateObserver\n @for Ember\n @param {String} propertyNames*\n @param {Function} func\n @deprecated Use `observer` instead.\n @return func\n @private\n */\n\n\n /**\n When observers fire, they are called with the arguments `obj`, `keyName`.\n \n Note, `@each.property` observer is called per each add or replace of an element\n and it's not called with a specific enumeration item.\n \n A `_beforeObserver` fires before a property changes.\n \n @method beforeObserver\n @for Ember\n @param {String} propertyNames*\n @param {Function} func\n @return func\n @deprecated\n @private\n */\n\n\n /**\n @module ember\n @private\n */\n\n /**\n Read-only property that returns the result of a container lookup.\n \n @class InjectedProperty\n @namespace Ember\n @constructor\n @param {String} type The container type the property will lookup\n @param {String} name (optional) The name the property will lookup, defaults\n to the property's name\n @private\n */\n function InjectedProperty(type, name) {\n this.type = type;\n this.name = name;\n\n this._super$Constructor(injectedPropertyGet);\n AliasedPropertyPrototype.oneWay.call(this);\n }\n\n function injectedPropertyGet(keyName) {\n var desc = this[keyName];\n var owner = emberUtils.getOwner(this) || this.container; // fallback to `container` for backwards compat\n\n false && !(desc && desc.isDescriptor && desc.type) && emberDebug.assert('InjectedProperties should be defined with the inject computed property macros.', desc && desc.isDescriptor && desc.type);\n false && !owner && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);\n\n return owner.lookup(desc.type + ':' + (desc.name || keyName));\n }\n\n InjectedProperty.prototype = Object.create(Descriptor.prototype);\n\n var InjectedPropertyPrototype = InjectedProperty.prototype;\n var ComputedPropertyPrototype$1 = ComputedProperty.prototype;\n var AliasedPropertyPrototype = AliasedProperty.prototype;\n\n InjectedPropertyPrototype._super$Constructor = ComputedProperty;\n\n InjectedPropertyPrototype.get = ComputedPropertyPrototype$1.get;\n InjectedPropertyPrototype.readOnly = ComputedPropertyPrototype$1.readOnly;\n InjectedPropertyPrototype.teardown = ComputedPropertyPrototype$1.teardown;\n\n var splice = Array.prototype.splice;\n\n /**\n A wrapper for a native ES5 descriptor. In an ideal world, we wouldn't need\n this at all, however, the way we currently flatten/merge our mixins require\n a special value to denote a descriptor.\n \n @class Descriptor\n @private\n */\n\n var Descriptor$1 = function (_EmberDescriptor) {\n emberBabel.inherits(Descriptor$$1, _EmberDescriptor);\n\n function Descriptor$$1(desc) {\n\n var _this = emberBabel.possibleConstructorReturn(this, _EmberDescriptor.call(this));\n\n _this.desc = desc;\n return _this;\n }\n\n Descriptor$$1.prototype.setup = function (obj, key) {\n Object.defineProperty(obj, key, this.desc);\n };\n\n Descriptor$$1.prototype.teardown = function () {};\n\n return Descriptor$$1;\n }(Descriptor);\n\n exports['default'] = Ember;\n exports.computed = function () {\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var func = args.pop(),\n _len,\n args,\n _key;\n\n var cp = new ComputedProperty(func);\n\n if (args.length > 0) {\n cp.property.apply(cp, args);\n }\n\n return cp;\n };\n exports.cacheFor = cacheFor;\n exports.ComputedProperty = ComputedProperty;\n exports.alias = function (altKey) {\n return new AliasedProperty(altKey);\n };\n exports.merge = function (original, updates) {\n if (updates === null || typeof updates !== 'object') {\n return original;\n }\n\n var props = Object.keys(updates),\n i;\n var prop = void 0;\n\n for (i = 0; i < props.length; i++) {\n prop = props[i];\n original[prop] = updates[prop];\n }\n\n return original;\n };\n exports.deprecateProperty = function (object, deprecatedKey, newKey, options) {\n function _deprecate() {\n false && !false && emberDebug.deprecate('Usage of `' + deprecatedKey + '` is deprecated, use `' + newKey + '` instead.', false, options);\n }\n\n Object.defineProperty(object, deprecatedKey, {\n configurable: true,\n enumerable: false,\n set: function (value) {\n _deprecate();\n set(this, newKey, value);\n },\n get: function () {\n _deprecate();\n return get(this, newKey);\n }\n });\n };\n exports.instrument = function (name, _payload, callback, binding) {\n if (arguments.length <= 3 && typeof _payload === 'function') {\n binding = callback;\n callback = _payload;\n _payload = undefined;\n }\n if (subscribers.length === 0) {\n return callback.call(binding);\n }\n var payload = _payload || {};\n var finalizer = _instrumentStart(name, function () {\n return payload;\n });\n\n if (finalizer) {\n return withFinalizer(callback, finalizer, payload, binding);\n } else {\n return callback.call(binding);\n }\n };\n exports._instrumentStart = _instrumentStart;\n exports.instrumentationReset = function () {\n subscribers.length = 0;\n cache = {};\n };\n exports.instrumentationSubscribe = function (pattern, object) {\n var paths = pattern.split('.'),\n i;\n var path = void 0;\n var regex = [];\n\n for (i = 0; i < paths.length; i++) {\n path = paths[i];\n if (path === '*') {\n regex.push('[^\\\\.]*');\n } else {\n regex.push(path);\n }\n }\n\n regex = regex.join('\\\\.');\n regex = regex + '(\\\\..*)?';\n\n var subscriber = {\n pattern: pattern,\n regex: new RegExp('^' + regex + '$'),\n object: object\n };\n\n subscribers.push(subscriber);\n cache = {};\n\n return subscriber;\n };\n exports.instrumentationUnsubscribe = function (subscriber) {\n var index = void 0,\n i;\n\n for (i = 0; i < subscribers.length; i++) {\n if (subscribers[i] === subscriber) {\n index = i;\n }\n }\n\n subscribers.splice(index, 1);\n cache = {};\n };\n exports.getOnerror = function () {\n return onerror;\n };\n exports.setOnerror = function (handler) {\n onerror = handler;\n };\n exports.setDispatchOverride = function (handler) {\n dispatchOverride = handler;\n };\n exports.getDispatchOverride = function () {\n return dispatchOverride;\n };\n exports.META_DESC = META_DESC;\n exports.meta = meta;\n exports.deleteMeta = function (obj) {\n var meta = exports.peekMeta(obj);\n if (meta !== undefined) {\n meta.destroy();\n }\n };\n exports.Cache = Cache;\n exports._getPath = _getPath;\n exports.get = get;\n exports.getWithDefault = function (root, key, defaultValue) {\n var value = get(root, key);\n\n if (value === undefined) {\n return defaultValue;\n }\n return value;\n };\n exports.set = set;\n exports.trySet = trySet;\n exports.WeakMap = weak_map;\n exports.WeakMapPolyfill = WeakMapPolyfill;\n exports.addListener = addListener;\n exports.hasListeners = function (obj, eventName) {\n var meta$$1 = exports.peekMeta(obj);\n if (meta$$1 === undefined) {\n return false;\n }\n var matched = meta$$1.matchingListeners(eventName);\n return matched !== undefined && matched.length > 0;\n };\n exports.listenersFor = listenersFor;\n exports.on = function () {\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var func = args.pop(),\n _len,\n args,\n _key;\n var events = args;\n\n false && !(typeof func === 'function') && emberDebug.assert('on expects function as last argument', typeof func === 'function');\n false && !(events.length > 0 && events.every(function (p) {\n return typeof p === 'string' && p.length;\n })) && emberDebug.assert('on called without valid event names', events.length > 0 && events.every(function (p) {\n return typeof p === 'string' && p.length;\n }));\n\n func.__ember_listens__ = events;\n return func;\n };\n exports.removeListener = removeListener;\n exports.sendEvent = sendEvent;\n exports.suspendListener = suspendListener;\n exports.suspendListeners = suspendListeners;\n exports.watchedEvents = function (obj) {\n var meta$$1 = exports.peekMeta(obj);\n return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];\n };\n exports.isNone = isNone;\n exports.isEmpty = isEmpty;\n exports.isBlank = isBlank;\n exports.isPresent = function (obj) {\n return !isBlank(obj);\n };\n exports.run = run;\n exports.ObserverSet = ObserverSet;\n exports.beginPropertyChanges = beginPropertyChanges;\n exports.changeProperties = changeProperties;\n exports.endPropertyChanges = endPropertyChanges;\n exports.overrideChains = overrideChains;\n exports.propertyDidChange = propertyDidChange;\n exports.propertyWillChange = propertyWillChange;\n exports.PROPERTY_DID_CHANGE = PROPERTY_DID_CHANGE;\n exports.defineProperty = defineProperty;\n exports.Descriptor = Descriptor;\n exports._hasCachedComputedProperties = function () {\n hasCachedComputedProperties = true;\n };\n exports.watchKey = watchKey;\n exports.unwatchKey = unwatchKey;\n exports.ChainNode = ChainNode;\n exports.finishChains = function (meta$$1) {\n // finish any current chains node watchers that reference obj\n var chainWatchers = meta$$1.readableChainWatchers();\n if (chainWatchers !== undefined) {\n chainWatchers.revalidateAll();\n }\n // ensure that if we have inherited any chains they have been\n // copied onto our own meta.\n if (meta$$1.readableChains() !== undefined) {\n meta$$1.writableChains(makeChainNode);\n }\n };\n exports.removeChainWatcher = removeChainWatcher;\n exports.watchPath = watchPath;\n exports.unwatchPath = unwatchPath;\n exports.isWatching = function (obj, key) {\n return watcherCount(obj, key) > 0;\n };\n exports.unwatch = unwatch;\n exports.watch = watch;\n exports.watcherCount = watcherCount;\n exports.libraries = libraries;\n exports.Libraries = Libraries;\n exports.Map = Map;\n exports.MapWithDefault = MapWithDefault;\n exports.OrderedSet = OrderedSet;\n exports.getProperties = function (obj) {\n var ret = {};\n var propertyNames = arguments;\n var i = 1;\n\n if (arguments.length === 2 && Array.isArray(arguments[1])) {\n i = 0;\n propertyNames = arguments[1];\n }\n for (; i < propertyNames.length; i++) {\n ret[propertyNames[i]] = get(obj, propertyNames[i]);\n }\n return ret;\n };\n exports.setProperties = function (obj, properties) {\n if (properties === null || typeof properties !== 'object') {\n return properties;\n }\n changeProperties(function () {\n var props = Object.keys(properties),\n i;\n var propertyName = void 0;\n\n for (i = 0; i < props.length; i++) {\n propertyName = props[i];\n\n set(obj, propertyName, properties[propertyName]);\n }\n });\n return properties;\n };\n exports.expandProperties = expandProperties;\n exports._suspendObserver = _suspendObserver;\n exports._suspendObservers = function (obj, paths, target, method, callback) {\n var events = paths.map(changeEvent);\n return suspendListeners(obj, events, target, method, callback);\n };\n exports.addObserver = addObserver;\n exports.observersFor = function (obj, path) {\n return listenersFor(obj, changeEvent(path));\n };\n exports.removeObserver = removeObserver;\n exports._addBeforeObserver = _addBeforeObserver;\n exports._removeBeforeObserver = _removeBeforeObserver;\n exports.Mixin = Mixin;\n exports.aliasMethod = function (methodName) {\n return new Alias(methodName);\n };\n exports._immediateObserver = function () {\n var i, arg;\n\n false && !false && emberDebug.deprecate('Usage of `Ember.immediateObserver` is deprecated, use `observer` instead.', false, { id: 'ember-metal.immediate-observer', until: '3.0.0' });\n\n for (i = 0; i < arguments.length; i++) {\n arg = arguments[i];\n\n false && !(typeof arg !== 'string' || arg.indexOf('.') === -1) && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);\n }\n\n return observer.apply(this, arguments);\n };\n exports._beforeObserver = function () {\n for (_len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n var func = args[args.length - 1],\n _len6,\n args,\n _key6,\n i;\n var paths = void 0;\n\n var addWatchedProperty = function (path) {\n paths.push(path);\n };\n\n var _paths = args.slice(0, -1);\n\n if (typeof func !== 'function') {\n // revert to old, soft-deprecated argument ordering\n\n func = args[0];\n _paths = args.slice(1);\n }\n\n paths = [];\n\n for (i = 0; i < _paths.length; ++i) {\n expandProperties(_paths[i], addWatchedProperty);\n }\n\n if (typeof func !== 'function') {\n throw new emberDebug.EmberError('_beforeObserver called without a function');\n }\n\n func.__ember_observesBefore__ = paths;\n return func;\n };\n exports.mixin = function (obj) {\n var _len, args, _key;\n\n for (_len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n applyMixin(obj, args, false);\n return obj;\n };\n exports.observer = observer;\n exports.required = function () {\n false && !false && emberDebug.deprecate('Ember.required is deprecated as its behavior is inconsistent and unreliable.', false, { id: 'ember-metal.required', until: '3.0.0' });\n\n return REQUIRED;\n };\n exports.REQUIRED = REQUIRED;\n exports.hasUnprocessedMixins = function () {\n return unprocessedFlag;\n };\n exports.clearUnprocessedMixins = function () {\n unprocessedFlag = false;\n };\n exports.detectBinding = detectBinding;\n exports.Binding = Binding;\n exports.bind = function (obj, to, from) {\n return new Binding(to, from).connect(obj);\n };\n exports.isGlobalPath = isGlobalPath;\n exports.InjectedProperty = InjectedProperty;\n exports.setHasViews = function (fn) {\n hasViews = fn;\n };\n exports.tagForProperty = function (object, propertyKey, _meta) {\n if (typeof object !== 'object' || object === null) {\n return _glimmer_reference.CONSTANT_TAG;\n }\n\n var meta$$1 = _meta === undefined ? meta(object) : _meta;\n if (meta$$1.isProxy()) {\n return tagFor(object, meta$$1);\n }\n\n var tags = meta$$1.writableTags();\n var tag = tags[propertyKey];\n if (tag) {\n return tag;\n }\n\n return tags[propertyKey] = makeTag();\n };\n exports.tagFor = tagFor;\n exports.markObjectAsDirty = markObjectAsDirty;\n exports.replace = function (array, idx, amt, objects) {\n var args = [].concat(objects);\n var ret = [];\n // https://code.google.com/p/chromium/issues/detail?id=56588\n var size = 60000;\n var start = idx;\n var ends = amt;\n var count = void 0,\n chunk = void 0;\n\n while (args.length) {\n count = ends > size ? size : ends;\n if (count <= 0) {\n count = 0;\n }\n\n chunk = args.splice(0, size);\n chunk = [start, count].concat(chunk);\n\n start += size;\n ends -= count;\n\n ret = ret.concat(splice.apply(array, chunk));\n }\n return ret;\n };\n exports.didRender = void 0;\n exports.assertNotRendered = void 0;\n exports.isProxy = function (value) {\n var meta$$1;\n\n if (typeof value === 'object' && value !== null) {\n meta$$1 = exports.peekMeta(value);\n\n return meta$$1 === undefined ? false : meta$$1.isProxy();\n }\n\n return false;\n };\n exports.descriptor = function (desc) {\n return new Descriptor$1(desc);\n };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n});","enifed('ember-routing/ext/controller', ['exports', 'ember-metal', 'ember-runtime', 'ember-routing/utils'], function (exports, _emberMetal, _emberRuntime, _utils) {\n 'use strict';\n\n /**\n @module ember\n */\n\n _emberRuntime.ControllerMixin.reopen({\n concatenatedProperties: ['queryParams'],\n\n /**\n Defines which query parameters the controller accepts.\n If you give the names `['category','page']` it will bind\n the values of these query parameters to the variables\n `this.category` and `this.page`.\n By default, Ember coerces query parameter values using `toggleProperty`.\n This behavior may lead to unexpected results.\n To explicitly configure a query parameter property so it coerces as expected, you must define a type property:\n ```javascript\n queryParams: [{\n category: {\n type: 'boolean'\n }\n }]\n ```\n @property queryParams\n @public\n */\n queryParams: null,\n\n /**\n This property is updated to various different callback functions depending on\n the current \"state\" of the backing route. It is used by\n `Ember.Controller.prototype._qpChanged`.\n The methods backing each state can be found in the `Ember.Route.prototype._qp` computed\n property return value (the `.states` property). The current values are listed here for\n the sanity of future travelers:\n * `inactive` - This state is used when this controller instance is not part of the active\n route hierarchy. Set in `Ember.Route.prototype._reset` (a `router.js` microlib hook) and\n `Ember.Route.prototype.actions.finalizeQueryParamChange`.\n * `active` - This state is used when this controller instance is part of the active\n route hierarchy. Set in `Ember.Route.prototype.actions.finalizeQueryParamChange`.\n * `allowOverrides` - This state is used in `Ember.Route.prototype.setup` (`route.js` microlib hook).\n @method _qpDelegate\n @private\n */\n _qpDelegate: null, _qpChanged: function (controller, _prop) {\n var prop = _prop.substr(0, _prop.length - 3);\n\n var delegate = controller._qpDelegate;\n var value = (0, _emberMetal.get)(controller, prop);\n delegate(prop, value);\n },\n transitionToRoute: function () {\n // target may be either another controller or a router\n var target = (0, _emberMetal.get)(this, 'target'),\n _len,\n args,\n _key;\n var method = target.transitionToRoute || target.transitionTo;\n\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return method.apply(target, (0, _utils.prefixRouteNameArg)(this, args));\n },\n replaceRoute: function () {\n // target may be either another controller or a router\n var target = (0, _emberMetal.get)(this, 'target'),\n _len2,\n args,\n _key2;\n var method = target.replaceRoute || target.replaceWith;\n\n for (_len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return method.apply(target, (0, _utils.prefixRouteNameArg)(this, args));\n }\n });\n\n exports.default = _emberRuntime.ControllerMixin;\n});","enifed('ember-routing/ext/run_loop', ['ember-metal'], function (_emberMetal) {\n 'use strict';\n\n // Add a new named queue after the 'actions' queue (where RSVP promises\n // resolve), which is used in router transitions to prevent unnecessary\n // loading state entry if all context promises resolve on the\n // 'actions' queue first.\n\n _emberMetal.run._addQueue('routerTransitions', 'actions');\n});","enifed('ember-routing/index', ['exports', 'ember-routing/location/api', 'ember-routing/location/none_location', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/system/generate_controller', 'ember-routing/system/controller_for', 'ember-routing/system/dsl', 'ember-routing/system/router', 'ember-routing/system/route', 'ember-routing/system/query_params', 'ember-routing/services/routing', 'ember-routing/services/router', 'ember-routing/system/cache', 'ember-routing/ext/run_loop', 'ember-routing/ext/controller'], function (exports, _api, _none_location, _hash_location, _history_location, _auto_location, _generate_controller, _controller_for, _dsl, _router, _route, _query_params, _routing, _router2, _cache) {\n 'use strict';\n\n exports.BucketCache = exports.RouterService = exports.RoutingService = exports.QueryParams = exports.Route = exports.Router = exports.RouterDSL = exports.controllerFor = exports.generateControllerFactory = exports.generateController = exports.AutoLocation = exports.HistoryLocation = exports.HashLocation = exports.NoneLocation = exports.Location = undefined;\n Object.defineProperty(exports, 'Location', {\n enumerable: true,\n get: function () {\n return _api.default;\n }\n });\n Object.defineProperty(exports, 'NoneLocation', {\n enumerable: true,\n get: function () {\n return _none_location.default;\n }\n });\n Object.defineProperty(exports, 'HashLocation', {\n enumerable: true,\n get: function () {\n return _hash_location.default;\n }\n });\n Object.defineProperty(exports, 'HistoryLocation', {\n enumerable: true,\n get: function () {\n return _history_location.default;\n }\n });\n Object.defineProperty(exports, 'AutoLocation', {\n enumerable: true,\n get: function () {\n return _auto_location.default;\n }\n });\n Object.defineProperty(exports, 'generateController', {\n enumerable: true,\n get: function () {\n return _generate_controller.default;\n }\n });\n Object.defineProperty(exports, 'generateControllerFactory', {\n enumerable: true,\n get: function () {\n return _generate_controller.generateControllerFactory;\n }\n });\n Object.defineProperty(exports, 'controllerFor', {\n enumerable: true,\n get: function () {\n return _controller_for.default;\n }\n });\n Object.defineProperty(exports, 'RouterDSL', {\n enumerable: true,\n get: function () {\n return _dsl.default;\n }\n });\n Object.defineProperty(exports, 'Router', {\n enumerable: true,\n get: function () {\n return _router.default;\n }\n });\n Object.defineProperty(exports, 'Route', {\n enumerable: true,\n get: function () {\n return _route.default;\n }\n });\n Object.defineProperty(exports, 'QueryParams', {\n enumerable: true,\n get: function () {\n return _query_params.default;\n }\n });\n Object.defineProperty(exports, 'RoutingService', {\n enumerable: true,\n get: function () {\n return _routing.default;\n }\n });\n Object.defineProperty(exports, 'RouterService', {\n enumerable: true,\n get: function () {\n return _router2.default;\n }\n });\n Object.defineProperty(exports, 'BucketCache', {\n enumerable: true,\n get: function () {\n return _cache.default;\n }\n });\n});","enifed('ember-routing/location/api', ['exports', 'ember-debug', 'ember-environment', 'ember-routing/location/util'], function (exports, _emberDebug, _emberEnvironment, _util) {\n 'use strict';\n\n exports.default = {\n /**\n This is deprecated in favor of using the container to lookup the location\n implementation as desired.\n For example:\n ```javascript\n // Given a location registered as follows:\n container.register('location:history-test', HistoryTestLocation);\n // You could create a new instance via:\n container.lookup('location:history-test');\n ```\n @method create\n @param {Object} options\n @return {Object} an instance of an implementation of the `location` API\n @deprecated Use the container to lookup the location implementation that you\n need.\n @private\n */\n create: function (options) {\n var implementation = options && options.implementation;\n false && !!!implementation && (0, _emberDebug.assert)('Ember.Location.create: you must specify a \\'implementation\\' option', !!implementation);\n\n var implementationClass = this.implementations[implementation];\n false && !!!implementationClass && (0, _emberDebug.assert)('Ember.Location.create: ' + implementation + ' is not a valid implementation', !!implementationClass);\n\n return implementationClass.create.apply(implementationClass, arguments);\n },\n\n implementations: {},\n _location: _emberEnvironment.environment.location,\n\n /**\n Returns the current `location.hash` by parsing location.href since browsers\n inconsistently URL-decode `location.hash`.\n https://bugzilla.mozilla.org/show_bug.cgi?id=483304\n @private\n @method getHash\n @since 1.4.0\n */\n _getHash: function () {\n return (0, _util.getHash)(this.location);\n }\n };\n});","enifed('ember-routing/location/auto_location', ['exports', 'ember-utils', 'ember-metal', 'ember-debug', 'ember-runtime', 'ember-environment', 'ember-routing/location/util'], function (exports, _emberUtils, _emberMetal, _emberDebug, _emberRuntime, _emberEnvironment, _util) {\n 'use strict';\n\n exports.getHistoryPath = getHistoryPath;\n exports.getHashPath = getHashPath;\n exports.default = _emberRuntime.Object.extend({\n /**\n @private\n The browser's `location` object. This is typically equivalent to\n `window.location`, but may be overridden for testing.\n @property location\n @default environment.location\n */\n location: _emberEnvironment.environment.location,\n\n /**\n @private\n The browser's `history` object. This is typically equivalent to\n `window.history`, but may be overridden for testing.\n @since 1.5.1\n @property history\n @default environment.history\n */\n history: _emberEnvironment.environment.history,\n\n /**\n @private\n The user agent's global variable. In browsers, this will be `window`.\n @since 1.11\n @property global\n @default window\n */\n global: _emberEnvironment.environment.window,\n\n /**\n @private\n The browser's `userAgent`. This is typically equivalent to\n `navigator.userAgent`, but may be overridden for testing.\n @since 1.5.1\n @property userAgent\n @default environment.history\n */\n userAgent: _emberEnvironment.environment.userAgent,\n\n /**\n @private\n This property is used by the router to know whether to cancel the routing\n setup process, which is needed while we redirect the browser.\n @since 1.5.1\n @property cancelRouterSetup\n @default false\n */\n cancelRouterSetup: false,\n\n /**\n @private\n Will be pre-pended to path upon state change.\n @since 1.5.1\n @property rootURL\n @default '/'\n */\n rootURL: '/',\n\n /**\n Called by the router to instruct the location to do any feature detection\n necessary. In the case of AutoLocation, we detect whether to use history\n or hash concrete implementations.\n @private\n */\n detect: function () {\n var rootURL = this.rootURL;\n\n false && !(rootURL.charAt(rootURL.length - 1) === '/') && (0, _emberDebug.assert)('rootURL must end with a trailing forward slash e.g. \"/app/\"', rootURL.charAt(rootURL.length - 1) === '/');\n\n var implementation = detectImplementation({\n location: this.location,\n history: this.history,\n userAgent: this.userAgent,\n rootURL: rootURL,\n documentMode: this.documentMode,\n global: this.global\n });\n\n if (implementation === false) {\n (0, _emberMetal.set)(this, 'cancelRouterSetup', true);\n implementation = 'none';\n }\n\n var concrete = (0, _emberUtils.getOwner)(this).lookup('location:' + implementation);\n (0, _emberMetal.set)(concrete, 'rootURL', rootURL);\n\n false && !!!concrete && (0, _emberDebug.assert)('Could not find location \\'' + implementation + '\\'.', !!concrete);\n\n (0, _emberMetal.set)(this, 'concreteImplementation', concrete);\n },\n\n initState: delegateToConcreteImplementation('initState'),\n getURL: delegateToConcreteImplementation('getURL'),\n setURL: delegateToConcreteImplementation('setURL'),\n replaceURL: delegateToConcreteImplementation('replaceURL'),\n onUpdateURL: delegateToConcreteImplementation('onUpdateURL'),\n formatURL: delegateToConcreteImplementation('formatURL'),\n\n willDestroy: function () {\n var concreteImplementation = (0, _emberMetal.get)(this, 'concreteImplementation');\n\n if (concreteImplementation) {\n concreteImplementation.destroy();\n }\n }\n });\n\n function delegateToConcreteImplementation(methodName) {\n return function () {\n var concreteImplementation = (0, _emberMetal.get)(this, 'concreteImplementation'),\n _len,\n args,\n _key;\n false && !!!concreteImplementation && (0, _emberDebug.assert)('AutoLocation\\'s detect() method should be called before calling any other hooks.', !!concreteImplementation);\n\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (0, _emberUtils.tryInvoke)(concreteImplementation, methodName, args);\n };\n }\n\n /*\n Given the browser's `location`, `history` and `userAgent`, and a configured\n root URL, this function detects whether the browser supports the [History\n API](https://developer.mozilla.org/en-US/docs/Web/API/History) and returns a\n string representing the Location object to use based on its determination.\n \n For example, if the page loads in an evergreen browser, this function would\n return the string \"history\", meaning the history API and thus HistoryLocation\n should be used. If the page is loaded in IE8, it will return the string\n \"hash,\" indicating that the History API should be simulated by manipulating the\n hash portion of the location.\n \n */\n\n function detectImplementation(options) {\n var location = options.location,\n historyPath,\n hashPath;\n var userAgent = options.userAgent;\n var history = options.history;\n var documentMode = options.documentMode;\n var global = options.global;\n var rootURL = options.rootURL;\n\n var implementation = 'none';\n var cancelRouterSetup = false;\n var currentPath = (0, _util.getFullPath)(location);\n\n if ((0, _util.supportsHistory)(userAgent, history)) {\n historyPath = getHistoryPath(rootURL, location);\n\n // If the browser supports history and we have a history path, we can use\n // the history location with no redirects.\n\n if (currentPath === historyPath) {\n return 'history';\n } else {\n if (currentPath.substr(0, 2) === '/#') {\n history.replaceState({ path: historyPath }, null, historyPath);\n implementation = 'history';\n } else {\n cancelRouterSetup = true;\n (0, _util.replacePath)(location, historyPath);\n }\n }\n } else if ((0, _util.supportsHashChange)(documentMode, global)) {\n hashPath = getHashPath(rootURL, location);\n\n // Be sure we're using a hashed path, otherwise let's switch over it to so\n // we start off clean and consistent. We'll count an index path with no\n // hash as \"good enough\" as well.\n\n if (currentPath === hashPath || currentPath === '/' && hashPath === '/#/') {\n implementation = 'hash';\n } else {\n // Our URL isn't in the expected hash-supported format, so we want to\n // cancel the router setup and replace the URL to start off clean\n cancelRouterSetup = true;\n (0, _util.replacePath)(location, hashPath);\n }\n }\n\n if (cancelRouterSetup) {\n return false;\n }\n\n return implementation;\n }\n\n /**\n @private\n \n Returns the current path as it should appear for HistoryLocation supported\n browsers. This may very well differ from the real current path (e.g. if it\n starts off as a hashed URL)\n */\n function getHistoryPath(rootURL, location) {\n var path = (0, _util.getPath)(location);\n var hash = (0, _util.getHash)(location);\n var query = (0, _util.getQuery)(location);\n var rootURLIndex = path.indexOf(rootURL);\n var routeHash = void 0,\n hashParts = void 0;\n\n false && !(rootURLIndex === 0) && (0, _emberDebug.assert)('Path ' + path + ' does not start with the provided rootURL ' + rootURL, rootURLIndex === 0);\n\n // By convention, Ember.js routes using HashLocation are required to start\n // with `#/`. Anything else should NOT be considered a route and should\n // be passed straight through, without transformation.\n if (hash.substr(0, 2) === '#/') {\n // There could be extra hash segments after the route\n hashParts = hash.substr(1).split('#');\n // The first one is always the route url\n routeHash = hashParts.shift();\n\n // If the path already has a trailing slash, remove the one\n // from the hashed route so we don't double up.\n if (path.charAt(path.length - 1) === '/') {\n routeHash = routeHash.substr(1);\n }\n\n // This is the \"expected\" final order\n path += routeHash + query;\n\n if (hashParts.length) {\n path += '#' + hashParts.join('#');\n }\n } else {\n path += query + hash;\n }\n\n return path;\n }\n\n /**\n @private\n \n Returns the current path as it should appear for HashLocation supported\n browsers. This may very well differ from the real current path.\n \n @method _getHashPath\n */\n function getHashPath(rootURL, location) {\n var path = rootURL;\n var historyPath = getHistoryPath(rootURL, location);\n var routePath = historyPath.substr(rootURL.length);\n\n if (routePath !== '') {\n if (routePath[0] !== '/') {\n routePath = '/' + routePath;\n }\n\n path += '#' + routePath;\n }\n\n return path;\n }\n});","enifed('ember-routing/location/hash_location', ['exports', 'ember-metal', 'ember-runtime', 'ember-routing/location/api'], function (exports, _emberMetal, _emberRuntime, _api) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n implementation: 'hash',\n\n init: function () {\n (0, _emberMetal.set)(this, 'location', (0, _emberMetal.get)(this, '_location') || window.location);\n\n this._hashchangeHandler = undefined;\n },\n\n /**\n @private\n Returns normalized location.hash\n @since 1.5.1\n @method getHash\n */\n getHash: _api.default._getHash,\n\n /**\n Returns the normalized URL, constructed from `location.hash`.\n e.g. `#/foo` => `/foo` as well as `#/foo#bar` => `/foo#bar`.\n By convention, hashed paths must begin with a forward slash, otherwise they\n are not treated as a path so we can distinguish intent.\n @private\n @method getURL\n */\n getURL: function () {\n var originalPath = this.getHash().substr(1);\n var outPath = originalPath;\n\n if (outPath[0] !== '/') {\n outPath = '/';\n\n // Only add the # if the path isn't empty.\n // We do NOT want `/#` since the ampersand\n // is only included (conventionally) when\n // the location.hash has a value\n if (originalPath) {\n outPath += '#' + originalPath;\n }\n }\n\n return outPath;\n },\n\n /**\n Set the `location.hash` and remembers what was set. This prevents\n `onUpdateURL` callbacks from triggering when the hash was set by\n `HashLocation`.\n @private\n @method setURL\n @param path {String}\n */\n setURL: function (path) {\n (0, _emberMetal.get)(this, 'location').hash = path;\n (0, _emberMetal.set)(this, 'lastSetURL', path);\n },\n\n /**\n Uses location.replace to update the url without a page reload\n or history modification.\n @private\n @method replaceURL\n @param path {String}\n */\n replaceURL: function (path) {\n (0, _emberMetal.get)(this, 'location').replace('#' + path);\n (0, _emberMetal.set)(this, 'lastSetURL', path);\n },\n\n /**\n Register a callback to be invoked when the hash changes. These\n callbacks will execute when the user presses the back or forward\n button, but not after `setURL` is invoked.\n @private\n @method onUpdateURL\n @param callback {Function}\n */\n onUpdateURL: function (callback) {\n this._removeEventListener();\n\n this._hashchangeHandler = _emberMetal.run.bind(this, function () {\n var path = this.getURL();\n if ((0, _emberMetal.get)(this, 'lastSetURL') === path) {\n return;\n }\n\n (0, _emberMetal.set)(this, 'lastSetURL', null);\n\n callback(path);\n });\n\n window.addEventListener('hashchange', this._hashchangeHandler);\n },\n\n /**\n Given a URL, formats it to be placed into the page as part\n of an element's `href` attribute.\n This is used, for example, when using the {{action}} helper\n to generate a URL based on an event.\n @private\n @method formatURL\n @param url {String}\n */\n formatURL: function (url) {\n return '#' + url;\n },\n\n /**\n Cleans up the HashLocation event listener.\n @private\n @method willDestroy\n */\n willDestroy: function () {\n this._removeEventListener();\n },\n _removeEventListener: function () {\n if (this._hashchangeHandler) {\n window.removeEventListener('hashchange', this._hashchangeHandler);\n }\n }\n });\n});","enifed('ember-routing/location/history_location', ['exports', 'ember-metal', 'ember-runtime', 'ember-routing/location/api'], function (exports, _emberMetal, _emberRuntime, _api) {\n 'use strict';\n\n /**\n @module @ember/routing\n */\n\n var popstateFired = false;\n\n function _uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r, v;\n r = Math.random() * 16 | 0;\n v = c === 'x' ? r : r & 3 | 8;\n return v.toString(16);\n });\n }\n\n /**\n Ember.HistoryLocation implements the location API using the browser's\n history.pushState API.\n \n Using `HistoryLocation` results in URLs that are indistinguishable from a\n standard URL. This relies upon the browser's `history` API.\n \n Example:\n \n ```app/router.js\n Router.map(function() {\n this.route('posts', function() {\n this.route('new');\n });\n });\n \n Router.reopen({\n location: 'history'\n });\n ```\n \n This will result in a posts.new url of `/posts/new`.\n \n Keep in mind that your server must serve the Ember app at all the routes you\n define.\n \n @class HistoryLocation\n @extends EmberObject\n @protected\n */\n exports.default = _emberRuntime.Object.extend({\n implementation: 'history',\n\n init: function () {\n this._super.apply(this, arguments);\n\n var base = document.querySelector('base');\n var baseURL = '';\n if (base) {\n baseURL = base.getAttribute('href');\n }\n\n (0, _emberMetal.set)(this, 'baseURL', baseURL);\n (0, _emberMetal.set)(this, 'location', (0, _emberMetal.get)(this, 'location') || window.location);\n\n this._popstateHandler = undefined;\n },\n\n /**\n Used to set state on first call to setURL\n @private\n @method initState\n */\n initState: function () {\n var history = (0, _emberMetal.get)(this, 'history') || window.history;\n (0, _emberMetal.set)(this, 'history', history);\n\n if (history && 'state' in history) {\n this.supportsHistory = true;\n }\n\n this.replaceState(this.formatURL(this.getURL()));\n },\n\n /**\n Will be pre-pended to path upon state change\n @property rootURL\n @default '/'\n @private\n */\n rootURL: '/',\n\n /**\n Returns the current `location.pathname` without `rootURL` or `baseURL`\n @private\n @method getURL\n @return url {String}\n */\n getURL: function () {\n var location = (0, _emberMetal.get)(this, 'location');\n var path = location.pathname;\n\n var rootURL = (0, _emberMetal.get)(this, 'rootURL');\n var baseURL = (0, _emberMetal.get)(this, 'baseURL');\n\n // remove trailing slashes if they exists\n rootURL = rootURL.replace(/\\/$/, '');\n baseURL = baseURL.replace(/\\/$/, '');\n\n // remove baseURL and rootURL from start of path\n var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '').replace(/\\/\\/$/g, '/'); // remove extra slashes\n\n var search = location.search || '';\n url += search + this.getHash();\n\n return url;\n },\n\n /**\n Uses `history.pushState` to update the url without a page reload.\n @private\n @method setURL\n @param path {String}\n */\n setURL: function (path) {\n var state = this.getState();\n path = this.formatURL(path);\n\n if (!state || state.path !== path) {\n this.pushState(path);\n }\n },\n\n /**\n Uses `history.replaceState` to update the url without a page reload\n or history modification.\n @private\n @method replaceURL\n @param path {String}\n */\n replaceURL: function (path) {\n var state = this.getState();\n path = this.formatURL(path);\n\n if (!state || state.path !== path) {\n this.replaceState(path);\n }\n },\n\n /**\n Get the current `history.state`. Checks for if a polyfill is\n required and if so fetches this._historyState. The state returned\n from getState may be null if an iframe has changed a window's\n history.\n The object returned will contain a `path` for the given state as well\n as a unique state `id`. The state index will allow the app to distinguish\n between two states with similar paths but should be unique from one another.\n @private\n @method getState\n @return state {Object}\n */\n getState: function () {\n if (this.supportsHistory) {\n return (0, _emberMetal.get)(this, 'history').state;\n }\n\n return this._historyState;\n },\n\n /**\n Pushes a new state.\n @private\n @method pushState\n @param path {String}\n */\n pushState: function (path) {\n var state = { path: path, uuid: _uuid() };\n\n (0, _emberMetal.get)(this, 'history').pushState(state, null, path);\n\n this._historyState = state;\n\n // used for webkit workaround\n this._previousURL = this.getURL();\n },\n\n /**\n Replaces the current state.\n @private\n @method replaceState\n @param path {String}\n */\n replaceState: function (path) {\n var state = { path: path, uuid: _uuid() };\n\n (0, _emberMetal.get)(this, 'history').replaceState(state, null, path);\n\n this._historyState = state;\n\n // used for webkit workaround\n this._previousURL = this.getURL();\n },\n\n /**\n Register a callback to be invoked whenever the browser\n history changes, including using forward and back buttons.\n @private\n @method onUpdateURL\n @param callback {Function}\n */\n onUpdateURL: function (callback) {\n var _this = this;\n\n this._removeEventListener();\n\n this._popstateHandler = function () {\n // Ignore initial page load popstate event in Chrome\n if (!popstateFired) {\n popstateFired = true;\n if (_this.getURL() === _this._previousURL) {\n return;\n }\n }\n callback(_this.getURL());\n };\n\n window.addEventListener('popstate', this._popstateHandler);\n },\n\n /**\n Used when using `{{action}}` helper. The url is always appended to the rootURL.\n @private\n @method formatURL\n @param url {String}\n @return formatted url {String}\n */\n formatURL: function (url) {\n var rootURL = (0, _emberMetal.get)(this, 'rootURL');\n var baseURL = (0, _emberMetal.get)(this, 'baseURL');\n\n if (url !== '') {\n // remove trailing slashes if they exists\n rootURL = rootURL.replace(/\\/$/, '');\n baseURL = baseURL.replace(/\\/$/, '');\n } else if (baseURL[0] === '/' && rootURL[0] === '/') {\n // if baseURL and rootURL both start with a slash\n // ... remove trailing slash from baseURL if it exists\n baseURL = baseURL.replace(/\\/$/, '');\n }\n\n return baseURL + rootURL + url;\n },\n\n /**\n Cleans up the HistoryLocation event listener.\n @private\n @method willDestroy\n */\n willDestroy: function () {\n this._removeEventListener();\n },\n\n /**\n @private\n Returns normalized location.hash\n @method getHash\n */\n getHash: _api.default._getHash,\n\n _removeEventListener: function () {\n if (this._popstateHandler) {\n window.removeEventListener('popstate', this._popstateHandler);\n }\n }\n });\n});","enifed('ember-routing/location/none_location', ['exports', 'ember-metal', 'ember-debug', 'ember-runtime'], function (exports, _emberMetal, _emberDebug, _emberRuntime) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n implementation: 'none',\n path: '',\n\n detect: function () {\n var rootURL = this.rootURL;\n\n false && !(rootURL.charAt(rootURL.length - 1) === '/') && (0, _emberDebug.assert)('rootURL must end with a trailing forward slash e.g. \"/app/\"', rootURL.charAt(rootURL.length - 1) === '/');\n },\n\n /**\n Will be pre-pended to path.\n @private\n @property rootURL\n @default '/'\n */\n rootURL: '/',\n\n /**\n Returns the current path without `rootURL`.\n @private\n @method getURL\n @return {String} path\n */\n getURL: function () {\n var path = (0, _emberMetal.get)(this, 'path');\n var rootURL = (0, _emberMetal.get)(this, 'rootURL');\n\n // remove trailing slashes if they exists\n rootURL = rootURL.replace(/\\/$/, '');\n\n // remove rootURL from url\n return path.replace(new RegExp('^' + rootURL + '(?=/|$)'), '');\n },\n\n /**\n Set the path and remembers what was set. Using this method\n to change the path will not invoke the `updateURL` callback.\n @private\n @method setURL\n @param path {String}\n */\n setURL: function (path) {\n (0, _emberMetal.set)(this, 'path', path);\n },\n\n /**\n Register a callback to be invoked when the path changes. These\n callbacks will execute when the user presses the back or forward\n button, but not after `setURL` is invoked.\n @private\n @method onUpdateURL\n @param callback {Function}\n */\n onUpdateURL: function (callback) {\n this.updateCallback = callback;\n },\n\n /**\n Sets the path and calls the `updateURL` callback.\n @private\n @method handleURL\n @param url {String}\n */\n handleURL: function (url) {\n (0, _emberMetal.set)(this, 'path', url);\n this.updateCallback(url);\n },\n\n /**\n Given a URL, formats it to be placed into the page as part\n of an element's `href` attribute.\n This is used, for example, when using the {{action}} helper\n to generate a URL based on an event.\n @private\n @method formatURL\n @param url {String}\n @return {String} url\n */\n formatURL: function (url) {\n var rootURL = (0, _emberMetal.get)(this, 'rootURL');\n\n if (url !== '') {\n // remove trailing slashes if they exists\n rootURL = rootURL.replace(/\\/$/, '');\n }\n\n return rootURL + url;\n }\n });\n});","enifed('ember-routing/location/util', ['exports'], function (exports) {\n 'use strict';\n\n exports.getPath = getPath;\n exports.getQuery = getQuery;\n exports.getHash = getHash;\n exports.getFullPath = function (location) {\n return getPath(location) + getQuery(location) + getHash(location);\n };\n exports.getOrigin = getOrigin;\n exports.supportsHashChange =\n\n /*\n `documentMode` only exist in Internet Explorer, and it's tested because IE8 running in\n IE7 compatibility mode claims to support `onhashchange` but actually does not.\n \n `global` is an object that may have an `onhashchange` property.\n \n @private\n @function supportsHashChange\n */\n function (documentMode, global) {\n return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);\n }\n\n /*\n `userAgent` is a user agent string. We use user agent testing here, because\n the stock Android browser is known to have buggy versions of the History API,\n in some Android versions.\n \n @private\n @function supportsHistory\n */\n ;\n exports.supportsHistory = function (userAgent, history) {\n // Boosted from Modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n // The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support\n // Unfortunately support is really buggy and there is no clean way to detect\n // these bugs, so we fall back to a user agent sniff :(\n\n // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies\n // itself as 'Mobile Safari' as well, nor Windows Phone.\n if ((userAgent.indexOf('Android 2.') !== -1 || userAgent.indexOf('Android 4.0') !== -1) && userAgent.indexOf('Mobile Safari') !== -1 && userAgent.indexOf('Chrome') === -1 && userAgent.indexOf('Windows Phone') === -1) {\n return false;\n }\n\n return !!(history && 'pushState' in history);\n }\n\n /**\n Replaces the current location, making sure we explicitly include the origin\n to prevent redirecting to a different origin.\n \n @private\n */\n ;\n exports.replacePath = function (location, path) {\n location.replace(getOrigin(location) + path);\n };\n /**\n @private\n \n Returns the current `location.pathname`, normalized for IE inconsistencies.\n */\n function getPath(location) {\n var pathname = location.pathname;\n // Various versions of IE/Opera don't always return a leading slash\n if (pathname[0] !== '/') {\n pathname = '/' + pathname;\n }\n\n return pathname;\n }\n\n /**\n @private\n \n Returns the current `location.search`.\n */\n function getQuery(location) {\n return location.search;\n }\n\n /**\n @private\n \n Returns the current `location.hash` by parsing location.href since browsers\n inconsistently URL-decode `location.hash`.\n \n Should be passed the browser's `location` object as the first argument.\n \n https://bugzilla.mozilla.org/show_bug.cgi?id=483304\n */\n function getHash(location) {\n var href = location.href;\n var hashIndex = href.indexOf('#');\n\n if (hashIndex === -1) {\n return '';\n } else {\n return href.substr(hashIndex);\n }\n }\n\n function getOrigin(location) {\n var origin = location.origin;\n\n // Older browsers, especially IE, don't have origin\n if (!origin) {\n origin = location.protocol + '//' + location.hostname;\n\n if (location.port) {\n origin += ':' + location.port;\n }\n }\n\n return origin;\n }\n});","enifed('ember-routing/services/router', ['exports', 'ember-runtime', 'ember-routing/utils'], function (exports, _emberRuntime, _utils) {\n 'use strict';\n\n /**\n The Router service is the public API that provides component/view layer\n access to the router.\n \n @public\n @class RouterService\n @category ember-routing-router-service\n */\n /**\n @module ember\n */\n\n var RouterService = _emberRuntime.Service.extend({\n\n /**\n Name of the current route.\n This property represent the logical name of the route,\n which is comma separated.\n For the following router:\n ```app/router.js\n Router.map(function() {\n this.route('about);\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n It will return:\n * `index` when you visit `/`\n * `about` when you visit `/about`\n * `blog.index` when you visit `/blog`\n * `blog.post` when you visit `/blog/some-post-id`\n @property currentRouteName\n @type String\n @public\n */\n currentRouteName: (0, _emberRuntime.readOnly)('_router.currentRouteName'),\n\n /**\n Current URL for the application.\n This property represent the URL path for this route.\n For the following router:\n ```app/router.js\n Router.map(function() {\n this.route('about);\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n It will return:\n * `/` when you visit `/`\n * `/about` when you visit `/about`\n * `/blog/index` when you visit `/blog`\n * `/blog/post` when you visit `/blog/some-post-id`\n @property currentURL\n @type String\n @public\n */\n currentURL: (0, _emberRuntime.readOnly)('_router.currentURL'),\n\n /**\n The `location` property determines the type of URL's that your\n application will use.\n The following location types are currently available:\n * `auto`\n * `hash`\n * `history`\n * `none`\n @property location\n @default 'hash'\n @see {Ember.Location}\n @public\n */\n location: (0, _emberRuntime.readOnly)('_router.location'),\n\n /**\n The `rootURL` property represents the URL of the root of\n the application, '/' by default.\n This prefix is assumed on all routes defined on this app.\n IF you change the `rootURL` in your environment configuration\n like so:\n ```config/environment.js\n 'use strict';\n module.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/my-root',\n …\n }\n ]\n ```\n This property will return `/my-root`.\n @property rootURL\n @default '/'\n @public\n */\n rootURL: (0, _emberRuntime.readOnly)('_router.rootURL'),\n _router: null,\n\n transitionTo: function () {\n for (_len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if ((0, _utils.resemblesURL)(args[0])) {\n return this._router._doURLTransition('transitionTo', args[0]);\n }\n\n var _extractRouteArgs = (0, _utils.extractRouteArgs)(args),\n routeName = _extractRouteArgs.routeName,\n models = _extractRouteArgs.models,\n queryParams = _extractRouteArgs.queryParams,\n _len,\n args,\n _key;\n\n var transition = this._router._doTransition(routeName, models, queryParams, true);\n transition._keepDefaultQueryParamValues = true;\n\n return transition;\n },\n replaceWith: function () /* routeNameOrUrl, ...models, options */{\n return this.transitionTo.apply(this, arguments).method('replace');\n },\n urlFor: function () /* routeName, ...models, options */{\n var _router;\n\n return (_router = this._router).generate.apply(_router, arguments);\n },\n isActive: function () {\n for (_len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var _extractRouteArgs2 = (0, _utils.extractRouteArgs)(args),\n routeName = _extractRouteArgs2.routeName,\n models = _extractRouteArgs2.models,\n queryParams = _extractRouteArgs2.queryParams,\n _len2,\n args,\n _key2;\n\n var routerMicrolib = this._router._routerMicrolib;\n\n if (!routerMicrolib.isActiveIntent(routeName, models, null)) {\n return false;\n }\n var hasQueryParams = Object.keys(queryParams).length > 0;\n\n if (hasQueryParams) {\n this._router._prepareQueryParams(routeName, models, queryParams, true /* fromRouterService */);\n return (0, _utils.shallowEqual)(queryParams, routerMicrolib.state.queryParams);\n }\n\n return true;\n }\n });\n\n exports.default = RouterService;\n});","enifed('ember-routing/services/routing', ['exports', 'ember-utils', 'ember-runtime', 'ember-metal'], function (exports, _emberUtils, _emberRuntime, _emberMetal) {\n 'use strict';\n\n exports.default = _emberRuntime.Service.extend({\n router: null,\n\n targetState: (0, _emberRuntime.readOnly)('router.targetState'),\n currentState: (0, _emberRuntime.readOnly)('router.currentState'),\n currentRouteName: (0, _emberRuntime.readOnly)('router.currentRouteName'),\n currentPath: (0, _emberRuntime.readOnly)('router.currentPath'),\n\n hasRoute: function (routeName) {\n return (0, _emberMetal.get)(this, 'router').hasRoute(routeName);\n },\n transitionTo: function (routeName, models, queryParams, shouldReplace) {\n var router = (0, _emberMetal.get)(this, 'router');\n\n var transition = router._doTransition(routeName, models, queryParams);\n\n if (shouldReplace) {\n transition.method('replace');\n }\n\n return transition;\n },\n normalizeQueryParams: function (routeName, models, queryParams) {\n (0, _emberMetal.get)(this, 'router')._prepareQueryParams(routeName, models, queryParams);\n },\n generateURL: function (routeName, models, queryParams) {\n var router = (0, _emberMetal.get)(this, 'router');\n // return early when the router microlib is not present, which is the case for {{link-to}} in integration tests\n if (!router._routerMicrolib) {\n return;\n }\n\n var visibleQueryParams = {};\n if (queryParams) {\n (0, _emberUtils.assign)(visibleQueryParams, queryParams);\n this.normalizeQueryParams(routeName, models, visibleQueryParams);\n }\n\n return router.generate.apply(router, [routeName].concat(models, [{ queryParams: visibleQueryParams }]));\n },\n isActiveForRoute: function (contexts, queryParams, routeName, routerState, isCurrentWhenSpecified) {\n var router = (0, _emberMetal.get)(this, 'router');\n\n var handlers = router._routerMicrolib.recognizer.handlersFor(routeName);\n var leafName = handlers[handlers.length - 1].handler;\n var maximumContexts = numberOfContextsAcceptedByHandler(routeName, handlers);\n\n // NOTE: any ugliness in the calculation of activeness is largely\n // due to the fact that we support automatic normalizing of\n // `resource` -> `resource.index`, even though there might be\n // dynamic segments / query params defined on `resource.index`\n // which complicates (and makes somewhat ambiguous) the calculation\n // of activeness for links that link to `resource` instead of\n // directly to `resource.index`.\n\n // if we don't have enough contexts revert back to full route name\n // this is because the leaf route will use one of the contexts\n if (contexts.length > maximumContexts) {\n routeName = leafName;\n }\n\n return routerState.isActiveIntent(routeName, contexts, queryParams, !isCurrentWhenSpecified);\n }\n });\n\n function numberOfContextsAcceptedByHandler(handler, handlerInfos) {\n var req = 0,\n i;\n for (i = 0; i < handlerInfos.length; i++) {\n req += handlerInfos[i].names.length;\n if (handlerInfos[i].handler === handler) {\n break;\n }\n }\n\n return req;\n }\n});","enifed('ember-routing/system/cache', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n init: function () {\n this.cache = Object.create(null);\n },\n has: function (bucketKey) {\n return !!this.cache[bucketKey];\n },\n stash: function (bucketKey, key, value) {\n var bucket = this.cache[bucketKey];\n\n if (!bucket) {\n bucket = this.cache[bucketKey] = Object.create(null);\n }\n\n bucket[key] = value;\n },\n lookup: function (bucketKey, prop, defaultValue) {\n var cache = this.cache;\n if (!this.has(bucketKey)) {\n return defaultValue;\n }\n\n var bucket = cache[bucketKey];\n if (prop in bucket && bucket[prop] !== undefined) {\n return bucket[prop];\n } else {\n return defaultValue;\n }\n }\n });\n});","enifed(\"ember-routing/system/controller_for\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.default =\n /**\n @module ember\n */\n\n /**\n Finds a controller instance.\n \n @for Ember\n @method controllerFor\n @private\n */\n function (container, controllerName, lookupOptions) {\n return container.lookup(\"controller:\" + controllerName, lookupOptions);\n };\n});","enifed('ember-routing/system/dsl', ['exports', 'ember-utils', 'ember-debug'], function (exports, _emberUtils, _emberDebug) {\n 'use strict';\n\n var uuid = 0;\n\n var DSL = function () {\n function DSL(name, options) {\n\n this.parent = name;\n this.enableLoadingSubstates = options && options.enableLoadingSubstates;\n this.matches = [];\n this.explicitIndex = undefined;\n this.options = options;\n }\n\n DSL.prototype.route = function (name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n fullName,\n dsl;\n var callback = arguments[2];\n\n var dummyErrorRoute = '/_unused_dummy_error_path_route_' + name + '/:error';\n if (arguments.length === 2 && typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n false && !function () {\n if (options.overrideNameAssertion === true) {\n return true;\n }\n\n return ['array', 'basic', 'object', 'application'].indexOf(name) === -1;\n }() && (0, _emberDebug.assert)('\\'' + name + '\\' cannot be used as a route name.', function () {\n if (options.overrideNameAssertion === true) {\n return true;\n }return ['array', 'basic', 'object', 'application'].indexOf(name) === -1;\n }());\n\n if (this.enableLoadingSubstates) {\n createRoute(this, name + '_loading', { resetNamespace: options.resetNamespace });\n createRoute(this, name + '_error', { resetNamespace: options.resetNamespace, path: dummyErrorRoute });\n }\n\n if (callback) {\n fullName = getFullName(this, name, options.resetNamespace);\n dsl = new DSL(fullName, this.options);\n\n\n createRoute(dsl, 'loading');\n createRoute(dsl, 'error', { path: dummyErrorRoute });\n\n callback.call(dsl);\n\n createRoute(this, name, options, dsl.generate());\n } else {\n createRoute(this, name, options);\n }\n };\n\n DSL.prototype.push = function (url, name, callback, serialize) {\n var parts = name.split('.'),\n localFullName,\n routeInfo;\n\n if (this.options.engineInfo) {\n localFullName = name.slice(this.options.engineInfo.fullName.length + 1);\n routeInfo = (0, _emberUtils.assign)({ localFullName: localFullName }, this.options.engineInfo);\n\n\n if (serialize) {\n routeInfo.serializeMethod = serialize;\n }\n\n this.options.addRouteForEngine(name, routeInfo);\n } else if (serialize) {\n throw new Error('Defining a route serializer on route \\'' + name + '\\' outside an Engine is not allowed.');\n }\n\n if (url === '' || url === '/' || parts[parts.length - 1] === 'index') {\n this.explicitIndex = true;\n }\n\n this.matches.push(url, name, callback);\n };\n\n DSL.prototype.resource = function (name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var callback = arguments[2];\n\n if (arguments.length === 2 && typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options.resetNamespace = true;\n false && !false && (0, _emberDebug.deprecate)('this.resource() is deprecated. Use this.route(\\'name\\', { resetNamespace: true }, function () {}) instead.', false, { id: 'ember-routing.router-resource', until: '3.0.0' });\n\n this.route(name, options, callback);\n };\n\n DSL.prototype.generate = function () {\n var dslMatches = this.matches;\n\n if (!this.explicitIndex) {\n this.route('index', { path: '/' });\n }\n\n return function (match) {\n var i;\n\n for (i = 0; i < dslMatches.length; i += 3) {\n match(dslMatches[i]).to(dslMatches[i + 1], dslMatches[i + 2]);\n }\n };\n };\n\n DSL.prototype.mount = function (_name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n shouldResetEngineInfo,\n oldEngineInfo,\n optionsForChild,\n childDSL,\n substateName,\n _localFullName,\n _routeInfo;\n\n var engineRouteMap = this.options.resolveRouteMap(_name);\n var name = _name;\n\n if (options.as) {\n name = options.as;\n }\n\n var fullName = getFullName(this, name, options.resetNamespace);\n\n var engineInfo = {\n name: _name,\n instanceId: uuid++,\n mountPoint: fullName,\n fullName: fullName\n };\n\n var path = options.path;\n\n if (typeof path !== 'string') {\n path = '/' + name;\n }\n\n var callback = void 0;\n var dummyErrorRoute = '/_unused_dummy_error_path_route_' + name + '/:error';\n if (engineRouteMap) {\n shouldResetEngineInfo = false;\n oldEngineInfo = this.options.engineInfo;\n\n if (oldEngineInfo) {\n shouldResetEngineInfo = true;\n this.options.engineInfo = engineInfo;\n }\n\n optionsForChild = (0, _emberUtils.assign)({ engineInfo: engineInfo }, this.options);\n childDSL = new DSL(fullName, optionsForChild);\n\n\n createRoute(childDSL, 'loading');\n createRoute(childDSL, 'error', { path: dummyErrorRoute });\n\n engineRouteMap.class.call(childDSL);\n\n callback = childDSL.generate();\n\n if (shouldResetEngineInfo) {\n this.options.engineInfo = oldEngineInfo;\n }\n }\n\n var routeInfo = (0, _emberUtils.assign)({ localFullName: 'application' }, engineInfo);\n\n if (this.enableLoadingSubstates) {\n // These values are important to register the loading routes under their\n // proper names for the Router and within the Engine's registry.\n substateName = name + '_loading';\n _localFullName = 'application_loading';\n _routeInfo = (0, _emberUtils.assign)({ localFullName: _localFullName }, engineInfo);\n\n createRoute(this, substateName, { resetNamespace: options.resetNamespace });\n this.options.addRouteForEngine(substateName, _routeInfo);\n\n substateName = name + '_error';\n _localFullName = 'application_error';\n _routeInfo = (0, _emberUtils.assign)({ localFullName: _localFullName }, engineInfo);\n createRoute(this, substateName, { resetNamespace: options.resetNamespace, path: dummyErrorRoute });\n this.options.addRouteForEngine(substateName, _routeInfo);\n }\n\n this.options.addRouteForEngine(fullName, routeInfo);\n\n this.push(path, fullName, callback);\n };\n\n return DSL;\n }();\n\n exports.default = DSL;\n\n function canNest(dsl) {\n return dsl.parent !== 'application';\n }\n\n function getFullName(dsl, name, resetNamespace) {\n if (canNest(dsl) && resetNamespace !== true) {\n return dsl.parent + '.' + name;\n } else {\n return name;\n }\n }\n\n function createRoute(dsl, name) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = arguments[3];\n\n var fullName = getFullName(dsl, name, options.resetNamespace);\n\n if (typeof options.path !== 'string') {\n options.path = '/' + name;\n }\n\n dsl.push(options.path, fullName, callback, options.serialize);\n }\n\n DSL.map = function (callback) {\n var dsl = new DSL();\n callback.call(dsl);\n return dsl;\n };\n});","enifed('ember-routing/system/generate_controller', ['exports', 'ember-metal', 'ember-debug'], function (exports) {\n 'use strict';\n\n exports.generateControllerFactory = generateControllerFactory;\n exports.default =\n\n /**\n Generates and instantiates a controller extending from `controller:basic`\n if present, or `Ember.Controller` if not.\n \n @for Ember\n @method generateController\n @private\n @since 1.3.0\n */\n function (owner, controllerName) {\n generateControllerFactory(owner, controllerName);\n\n var instance = owner.lookup('controller:' + controllerName);\n\n return instance;\n };\n\n /**\n @module ember\n */\n\n /**\n Generates a controller factory\n \n @for Ember\n @method generateControllerFactory\n @private\n */\n\n function generateControllerFactory(owner, controllerName) {\n var Factory = owner.factoryFor('controller:basic').class;\n\n Factory = Factory.extend({\n toString: function () {\n return '(generated ' + controllerName + ' controller)';\n }\n });\n\n owner.register('controller:' + controllerName, Factory);\n\n return Factory;\n }\n});","enifed('ember-routing/system/query_params', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {\n 'use strict';\n\n exports.default = _emberRuntime.Object.extend({\n isQueryParams: true,\n values: null\n });\n});","enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', 'ember-debug', 'ember-runtime', 'ember-routing/system/generate_controller', 'ember-routing/utils'], function (exports, _emberUtils, _embe