dist/ember-template-compiler.js in ember-source-2.6.1 vs dist/ember-template-compiler.js in ember-source-2.6.2

- old
+ new

@@ -4,11 +4,11 @@ * @copyright Copyright 2011-2016 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 2.6.1 + * @version 2.6.2 */ var enifed, requireModule, require, Ember; var mainContext = this; @@ -111,393 +111,10 @@ enifed = Ember.__loader.define; require = requireModule = Ember.__loader.require; } })(); -enifed("backburner/binary-search", ["exports"], function (exports) { - "use strict"; - - exports.default = binarySearch; - - function binarySearch(time, timers) { - var start = 0; - var end = timers.length - 2; - var middle, l; - - while (start < end) { - // since timers is an array of pairs 'l' will always - // be an integer - l = (end - start) / 2; - - // compensate for the index in case even number - // of pairs inside timers - middle = start + l - l % 2; - - if (time >= timers[middle]) { - start = middle + 2; - } else { - end = middle; - } - } - - return time >= timers[start] ? start + 2 : start; - } -}); -enifed('backburner/deferred-action-queues', ['exports', 'backburner/utils', 'backburner/queue'], function (exports, _backburnerUtils, _backburnerQueue) { - 'use strict'; - - exports.default = DeferredActionQueues; - - function DeferredActionQueues(queueNames, options) { - var queues = this.queues = {}; - this.queueNames = queueNames = queueNames || []; - - this.options = options; - - _backburnerUtils.each(queueNames, function (queueName) { - queues[queueName] = new _backburnerQueue.default(queueName, options[queueName], options); - }); - } - - function noSuchQueue(name) { - throw new Error('You attempted to schedule an action in a queue (' + name + ') that doesn\'t exist'); - } - - function noSuchMethod(name) { - throw new Error('You attempted to schedule an action in a queue (' + name + ') for a method that doesn\'t exist'); - } - - DeferredActionQueues.prototype = { - schedule: function (name, target, method, args, onceFlag, stack) { - var queues = this.queues; - var queue = queues[name]; - - if (!queue) { - noSuchQueue(name); - } - - if (!method) { - noSuchMethod(name); - } - - if (onceFlag) { - return queue.pushUnique(target, method, args, stack); - } else { - return queue.push(target, method, args, stack); - } - }, - - flush: function () { - var queues = this.queues; - var queueNames = this.queueNames; - var queueName, queue; - var queueNameIndex = 0; - var numberOfQueues = queueNames.length; - - while (queueNameIndex < numberOfQueues) { - queueName = queueNames[queueNameIndex]; - queue = queues[queueName]; - - var numberOfQueueItems = queue._queue.length; - - if (numberOfQueueItems === 0) { - queueNameIndex++; - } else { - queue.flush(false /* async */); - queueNameIndex = 0; - } - } - } - }; -}); -enifed('backburner/platform', ['exports'], function (exports) { - 'use strict'; - - var GlobalContext; - - /* global self */ - if (typeof self === 'object') { - GlobalContext = self; - - /* global global */ - } else if (typeof global === 'object') { - GlobalContext = global; - - /* global window */ - } else if (typeof window === 'object') { - GlobalContext = window; - } else { - throw new Error('no global: `self`, `global` nor `window` was found'); - } - - exports.default = GlobalContext; -}); -enifed('backburner/queue', ['exports', 'backburner/utils'], function (exports, _backburnerUtils) { - 'use strict'; - - exports.default = Queue; - - function Queue(name, options, globalOptions) { - this.name = name; - this.globalOptions = globalOptions || {}; - this.options = options; - this._queue = []; - this.targetQueues = {}; - this._queueBeingFlushed = undefined; - } - - Queue.prototype = { - push: function (target, method, args, stack) { - var queue = this._queue; - queue.push(target, method, args, stack); - - return { - queue: this, - target: target, - method: method - }; - }, - - pushUniqueWithoutGuid: function (target, method, args, stack) { - var queue = this._queue; - - for (var i = 0, l = queue.length; i < l; i += 4) { - var currentTarget = queue[i]; - var currentMethod = queue[i + 1]; - - if (currentTarget === target && currentMethod === method) { - queue[i + 2] = args; // replace args - queue[i + 3] = stack; // replace stack - return; - } - } - - queue.push(target, method, args, stack); - }, - - targetQueue: function (targetQueue, target, method, args, stack) { - var queue = this._queue; - - for (var i = 0, l = targetQueue.length; i < l; i += 2) { - var currentMethod = targetQueue[i]; - var currentIndex = targetQueue[i + 1]; - - if (currentMethod === method) { - queue[currentIndex + 2] = args; // replace args - queue[currentIndex + 3] = stack; // replace stack - return; - } - } - - targetQueue.push(method, queue.push(target, method, args, stack) - 4); - }, - - pushUniqueWithGuid: function (guid, target, method, args, stack) { - var hasLocalQueue = this.targetQueues[guid]; - - if (hasLocalQueue) { - this.targetQueue(hasLocalQueue, target, method, args, stack); - } else { - this.targetQueues[guid] = [method, this._queue.push(target, method, args, stack) - 4]; - } - - return { - queue: this, - target: target, - method: method - }; - }, - - pushUnique: function (target, method, args, stack) { - var KEY = this.globalOptions.GUID_KEY; - - if (target && KEY) { - var guid = target[KEY]; - if (guid) { - return this.pushUniqueWithGuid(guid, target, method, args, stack); - } - } - - this.pushUniqueWithoutGuid(target, method, args, stack); - - return { - queue: this, - target: target, - method: method - }; - }, - - invoke: function (target, method, args, _, _errorRecordedForStack) { - if (args && args.length > 0) { - method.apply(target, args); - } else { - method.call(target); - } - }, - - invokeWithOnError: function (target, method, args, onError, errorRecordedForStack) { - try { - if (args && args.length > 0) { - method.apply(target, args); - } else { - method.call(target); - } - } catch (error) { - onError(error, errorRecordedForStack); - } - }, - - flush: function (sync) { - var queue = this._queue; - var length = queue.length; - - if (length === 0) { - return; - } - - var globalOptions = this.globalOptions; - var options = this.options; - var before = options && options.before; - var after = options && options.after; - var onError = globalOptions.onError || globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod]; - var target, method, args, errorRecordedForStack; - var invoke = onError ? this.invokeWithOnError : this.invoke; - - this.targetQueues = Object.create(null); - var queueItems = this._queueBeingFlushed = this._queue.slice(); - this._queue = []; - - if (before) { - before(); - } - - for (var i = 0; i < length; i += 4) { - target = queueItems[i]; - method = queueItems[i + 1]; - args = queueItems[i + 2]; - errorRecordedForStack = queueItems[i + 3]; // Debugging assistance - - if (_backburnerUtils.isString(method)) { - method = target[method]; - } - - // method could have been nullified / canceled during flush - if (method) { - // - // ** Attention intrepid developer ** - // - // To find out the stack of this task when it was scheduled onto - // the run loop, add the following to your app.js: - // - // Ember.run.backburner.DEBUG = true; // NOTE: This slows your app, don't leave it on in production. - // - // Once that is in place, when you are at a breakpoint and navigate - // here in the stack explorer, you can look at `errorRecordedForStack.stack`, - // which will be the captured stack when this job was scheduled. - // - invoke(target, method, args, onError, errorRecordedForStack); - } - } - - if (after) { - after(); - } - - this._queueBeingFlushed = undefined; - - if (sync !== false && this._queue.length > 0) { - // check if new items have been added - this.flush(true); - } - }, - - cancel: function (actionToCancel) { - var queue = this._queue, - currentTarget, - currentMethod, - i, - l; - var target = actionToCancel.target; - var method = actionToCancel.method; - var GUID_KEY = this.globalOptions.GUID_KEY; - - if (GUID_KEY && this.targetQueues && target) { - var targetQueue = this.targetQueues[target[GUID_KEY]]; - - if (targetQueue) { - for (i = 0, l = targetQueue.length; i < l; i++) { - if (targetQueue[i] === method) { - targetQueue.splice(i, 1); - } - } - } - } - - for (i = 0, l = queue.length; i < l; i += 4) { - currentTarget = queue[i]; - currentMethod = queue[i + 1]; - - if (currentTarget === target && currentMethod === method) { - queue.splice(i, 4); - return true; - } - } - - // if not found in current queue - // could be in the queue that is being flushed - queue = this._queueBeingFlushed; - - if (!queue) { - return; - } - - for (i = 0, l = queue.length; i < l; i += 4) { - currentTarget = queue[i]; - currentMethod = queue[i + 1]; - - if (currentTarget === target && currentMethod === method) { - // don't mess with array during flush - // just nullify the method - queue[i + 1] = null; - return true; - } - } - } - }; -}); -enifed('backburner/utils', ['exports'], function (exports) { - 'use strict'; - - exports.each = each; - exports.isString = isString; - exports.isFunction = isFunction; - exports.isNumber = isNumber; - exports.isCoercableNumber = isCoercableNumber; - var NUMBER = /\d+/; - - function each(collection, callback) { - for (var i = 0; i < collection.length; i++) { - callback(collection[i]); - } - } - - function isString(suspect) { - return typeof suspect === 'string'; - } - - function isFunction(suspect) { - return typeof suspect === 'function'; - } - - function isNumber(suspect) { - return typeof suspect === 'number'; - } - - function isCoercableNumber(number) { - return isNumber(number) || NUMBER.test(number); - } -}); enifed('backburner', ['exports', 'backburner/utils', 'backburner/platform', 'backburner/binary-search', 'backburner/deferred-action-queues'], function (exports, _backburnerUtils, _backburnerPlatform, _backburnerBinarySearch, _backburnerDeferredActionQueues) { 'use strict'; exports.default = Backburner; @@ -1152,10 +769,393 @@ function clearItems(item) { this._platform.clearTimeout(item[2]); } }); +enifed("backburner/binary-search", ["exports"], function (exports) { + "use strict"; + + exports.default = binarySearch; + + function binarySearch(time, timers) { + var start = 0; + var end = timers.length - 2; + var middle, l; + + while (start < end) { + // since timers is an array of pairs 'l' will always + // be an integer + l = (end - start) / 2; + + // compensate for the index in case even number + // of pairs inside timers + middle = start + l - l % 2; + + if (time >= timers[middle]) { + start = middle + 2; + } else { + end = middle; + } + } + + return time >= timers[start] ? start + 2 : start; + } +}); +enifed('backburner/deferred-action-queues', ['exports', 'backburner/utils', 'backburner/queue'], function (exports, _backburnerUtils, _backburnerQueue) { + 'use strict'; + + exports.default = DeferredActionQueues; + + function DeferredActionQueues(queueNames, options) { + var queues = this.queues = {}; + this.queueNames = queueNames = queueNames || []; + + this.options = options; + + _backburnerUtils.each(queueNames, function (queueName) { + queues[queueName] = new _backburnerQueue.default(queueName, options[queueName], options); + }); + } + + function noSuchQueue(name) { + throw new Error('You attempted to schedule an action in a queue (' + name + ') that doesn\'t exist'); + } + + function noSuchMethod(name) { + throw new Error('You attempted to schedule an action in a queue (' + name + ') for a method that doesn\'t exist'); + } + + DeferredActionQueues.prototype = { + schedule: function (name, target, method, args, onceFlag, stack) { + var queues = this.queues; + var queue = queues[name]; + + if (!queue) { + noSuchQueue(name); + } + + if (!method) { + noSuchMethod(name); + } + + if (onceFlag) { + return queue.pushUnique(target, method, args, stack); + } else { + return queue.push(target, method, args, stack); + } + }, + + flush: function () { + var queues = this.queues; + var queueNames = this.queueNames; + var queueName, queue; + var queueNameIndex = 0; + var numberOfQueues = queueNames.length; + + while (queueNameIndex < numberOfQueues) { + queueName = queueNames[queueNameIndex]; + queue = queues[queueName]; + + var numberOfQueueItems = queue._queue.length; + + if (numberOfQueueItems === 0) { + queueNameIndex++; + } else { + queue.flush(false /* async */); + queueNameIndex = 0; + } + } + } + }; +}); +enifed('backburner/platform', ['exports'], function (exports) { + 'use strict'; + + var GlobalContext; + + /* global self */ + if (typeof self === 'object') { + GlobalContext = self; + + /* global global */ + } else if (typeof global === 'object') { + GlobalContext = global; + + /* global window */ + } else if (typeof window === 'object') { + GlobalContext = window; + } else { + throw new Error('no global: `self`, `global` nor `window` was found'); + } + + exports.default = GlobalContext; +}); +enifed('backburner/queue', ['exports', 'backburner/utils'], function (exports, _backburnerUtils) { + 'use strict'; + + exports.default = Queue; + + function Queue(name, options, globalOptions) { + this.name = name; + this.globalOptions = globalOptions || {}; + this.options = options; + this._queue = []; + this.targetQueues = {}; + this._queueBeingFlushed = undefined; + } + + Queue.prototype = { + push: function (target, method, args, stack) { + var queue = this._queue; + queue.push(target, method, args, stack); + + return { + queue: this, + target: target, + method: method + }; + }, + + pushUniqueWithoutGuid: function (target, method, args, stack) { + var queue = this._queue; + + for (var i = 0, l = queue.length; i < l; i += 4) { + var currentTarget = queue[i]; + var currentMethod = queue[i + 1]; + + if (currentTarget === target && currentMethod === method) { + queue[i + 2] = args; // replace args + queue[i + 3] = stack; // replace stack + return; + } + } + + queue.push(target, method, args, stack); + }, + + targetQueue: function (targetQueue, target, method, args, stack) { + var queue = this._queue; + + for (var i = 0, l = targetQueue.length; i < l; i += 2) { + var currentMethod = targetQueue[i]; + var currentIndex = targetQueue[i + 1]; + + if (currentMethod === method) { + queue[currentIndex + 2] = args; // replace args + queue[currentIndex + 3] = stack; // replace stack + return; + } + } + + targetQueue.push(method, queue.push(target, method, args, stack) - 4); + }, + + pushUniqueWithGuid: function (guid, target, method, args, stack) { + var hasLocalQueue = this.targetQueues[guid]; + + if (hasLocalQueue) { + this.targetQueue(hasLocalQueue, target, method, args, stack); + } else { + this.targetQueues[guid] = [method, this._queue.push(target, method, args, stack) - 4]; + } + + return { + queue: this, + target: target, + method: method + }; + }, + + pushUnique: function (target, method, args, stack) { + var KEY = this.globalOptions.GUID_KEY; + + if (target && KEY) { + var guid = target[KEY]; + if (guid) { + return this.pushUniqueWithGuid(guid, target, method, args, stack); + } + } + + this.pushUniqueWithoutGuid(target, method, args, stack); + + return { + queue: this, + target: target, + method: method + }; + }, + + invoke: function (target, method, args, _, _errorRecordedForStack) { + if (args && args.length > 0) { + method.apply(target, args); + } else { + method.call(target); + } + }, + + invokeWithOnError: function (target, method, args, onError, errorRecordedForStack) { + try { + if (args && args.length > 0) { + method.apply(target, args); + } else { + method.call(target); + } + } catch (error) { + onError(error, errorRecordedForStack); + } + }, + + flush: function (sync) { + var queue = this._queue; + var length = queue.length; + + if (length === 0) { + return; + } + + var globalOptions = this.globalOptions; + var options = this.options; + var before = options && options.before; + var after = options && options.after; + var onError = globalOptions.onError || globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod]; + var target, method, args, errorRecordedForStack; + var invoke = onError ? this.invokeWithOnError : this.invoke; + + this.targetQueues = Object.create(null); + var queueItems = this._queueBeingFlushed = this._queue.slice(); + this._queue = []; + + if (before) { + before(); + } + + for (var i = 0; i < length; i += 4) { + target = queueItems[i]; + method = queueItems[i + 1]; + args = queueItems[i + 2]; + errorRecordedForStack = queueItems[i + 3]; // Debugging assistance + + if (_backburnerUtils.isString(method)) { + method = target[method]; + } + + // method could have been nullified / canceled during flush + if (method) { + // + // ** Attention intrepid developer ** + // + // To find out the stack of this task when it was scheduled onto + // the run loop, add the following to your app.js: + // + // Ember.run.backburner.DEBUG = true; // NOTE: This slows your app, don't leave it on in production. + // + // Once that is in place, when you are at a breakpoint and navigate + // here in the stack explorer, you can look at `errorRecordedForStack.stack`, + // which will be the captured stack when this job was scheduled. + // + invoke(target, method, args, onError, errorRecordedForStack); + } + } + + if (after) { + after(); + } + + this._queueBeingFlushed = undefined; + + if (sync !== false && this._queue.length > 0) { + // check if new items have been added + this.flush(true); + } + }, + + cancel: function (actionToCancel) { + var queue = this._queue, + currentTarget, + currentMethod, + i, + l; + var target = actionToCancel.target; + var method = actionToCancel.method; + var GUID_KEY = this.globalOptions.GUID_KEY; + + if (GUID_KEY && this.targetQueues && target) { + var targetQueue = this.targetQueues[target[GUID_KEY]]; + + if (targetQueue) { + for (i = 0, l = targetQueue.length; i < l; i++) { + if (targetQueue[i] === method) { + targetQueue.splice(i, 1); + } + } + } + } + + for (i = 0, l = queue.length; i < l; i += 4) { + currentTarget = queue[i]; + currentMethod = queue[i + 1]; + + if (currentTarget === target && currentMethod === method) { + queue.splice(i, 4); + return true; + } + } + + // if not found in current queue + // could be in the queue that is being flushed + queue = this._queueBeingFlushed; + + if (!queue) { + return; + } + + for (i = 0, l = queue.length; i < l; i += 4) { + currentTarget = queue[i]; + currentMethod = queue[i + 1]; + + if (currentTarget === target && currentMethod === method) { + // don't mess with array during flush + // just nullify the method + queue[i + 1] = null; + return true; + } + } + } + }; +}); +enifed('backburner/utils', ['exports'], function (exports) { + 'use strict'; + + exports.each = each; + exports.isString = isString; + exports.isFunction = isFunction; + exports.isNumber = isNumber; + exports.isCoercableNumber = isCoercableNumber; + var NUMBER = /\d+/; + + function each(collection, callback) { + for (var i = 0; i < collection.length; i++) { + callback(collection[i]); + } + } + + function isString(suspect) { + return typeof suspect === 'string'; + } + + function isFunction(suspect) { + return typeof suspect === 'function'; + } + + function isNumber(suspect) { + return typeof suspect === 'number'; + } + + function isCoercableNumber(number) { + return isNumber(number) || NUMBER.test(number); + } +}); enifed('ember-debug/deprecate', ['exports', 'ember-metal/core', 'ember-metal/error', 'ember-metal/logger', 'ember-debug/handlers'], function (exports, _emberMetalCore, _emberMetalError, _emberMetalLogger, _emberDebugHandlers) { /*global __fail__*/ 'use strict'; @@ -3986,11 +3986,11 @@ cross-platform libraries such as jQuery. For more details, see [Ember-Runtime](http://emberjs.com/api/modules/ember-runtime.html). @class Ember @static - @version 2.6.1 + @version 2.6.2 @public */ if ('undefined' === typeof Ember) { // Create core object. Make it act like an instance of Ember.Namespace so that @@ -4028,15 +4028,15 @@ /** The semantic version. @property VERSION @type String - @default '2.6.1' + @default '2.6.2' @static @public */ - Ember.VERSION = '2.6.1'; + Ember.VERSION = '2.6.2'; /** The hash of environment variables used to control various configuration settings. To specify your own or override default settings, add the desired properties to a global hash named `EmberENV` (or `ENV` for @@ -4520,17 +4520,15 @@ */ function addListener(obj, eventName, target, method, once) { _emberMetalDebug.assert('You must pass at least an object and event name to Ember.addListener', !!obj && !!eventName); - if (eventName === 'didInitAttrs' && obj.isComponent) { - _emberMetalDebug.deprecate('[DEPRECATED] didInitAttrs called in ' + obj.toString() + '.', false, { - id: 'ember-views.did-init-attrs', - until: '3.0.0', - url: 'http://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs' - }); - } + _emberMetalDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', { + id: 'ember-views.did-init-attrs', + until: '3.0.0', + url: 'http://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs' + }); if (!method && 'function' === typeof target) { method = target; target = null; } @@ -11608,10 +11606,19 @@ } else { return false; } }; }); +enifed('ember-template-compiler/compat', ['exports', 'ember-metal/core', 'ember-template-compiler/compat/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template'], function (exports, _emberMetalCore, _emberTemplateCompilerCompatPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate) { + 'use strict'; + + var EmberHandlebars = _emberMetalCore.default.Handlebars = _emberMetalCore.default.Handlebars || {}; + + EmberHandlebars.precompile = _emberTemplateCompilerCompatPrecompile.default; + EmberHandlebars.compile = _emberTemplateCompilerSystemCompile.default; + EmberHandlebars.template = _emberTemplateCompilerSystemTemplate.default; +}); enifed('ember-template-compiler/compat/precompile', ['exports', 'require', 'ember-template-compiler/system/compile_options'], function (exports, _require, _emberTemplateCompilerSystemCompile_options) { /** @module ember @submodule ember-template-compiler */ @@ -11635,19 +11642,10 @@ var compileFunc = asObject ? compile : compileSpec; return compileFunc(string, _emberTemplateCompilerSystemCompile_options.default()); }; }); -enifed('ember-template-compiler/compat', ['exports', 'ember-metal/core', 'ember-template-compiler/compat/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template'], function (exports, _emberMetalCore, _emberTemplateCompilerCompatPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate) { - 'use strict'; - - var EmberHandlebars = _emberMetalCore.default.Handlebars = _emberMetalCore.default.Handlebars || {}; - - EmberHandlebars.precompile = _emberTemplateCompilerCompatPrecompile.default; - EmberHandlebars.compile = _emberTemplateCompilerSystemCompile.default; - EmberHandlebars.template = _emberTemplateCompilerSystemTemplate.default; -}); enifed('ember-template-compiler/index', ['exports', 'ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-template-compiler/plugins', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-item-class', 'ember-template-compiler/plugins/transform-closure-component-attrs-into-mut', 'ember-template-compiler/plugins/transform-component-attrs-into-mut', 'ember-template-compiler/plugins/transform-component-curly-to-readonly', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-input-on-to-onEvent', 'ember-template-compiler/plugins/transform-top-level-components', 'ember-template-compiler/plugins/deprecate-render-model', 'ember-template-compiler/plugins/prevent-render-block', 'ember-template-compiler/plugins/transform-inline-link-to', 'ember-template-compiler/plugins/assert-no-view-and-controller-paths', 'ember-template-compiler/plugins/assert-no-view-helper', 'ember-template-compiler/plugins/assert-no-each-in', 'ember-template-compiler/compat'], function (exports, _emberMetal, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformClosureComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsTransformTopLevelComponents, _emberTemplateCompilerPluginsDeprecateRenderModel, _emberTemplateCompilerPluginsPreventRenderBlock, _emberTemplateCompilerPluginsTransformInlineLinkTo, _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths, _emberTemplateCompilerPluginsAssertNoViewHelper, _emberTemplateCompilerPluginsAssertNoEachIn, _emberTemplateCompilerCompat) { 'use strict'; _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax.default); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldClassBindingSyntax.default); @@ -11674,10 +11672,44 @@ exports.template = _emberTemplateCompilerSystemTemplate.default; exports.registerPlugin = _emberTemplateCompilerPlugins.registerPlugin; }); // used for adding Ember.Handlebars.compile for backwards compat +enifed('ember-template-compiler/plugins', ['exports'], function (exports) { + /** + @module ember + @submodule ember-template-compiler + */ + + /** + @private + @property helpers + */ + 'use strict'; + + exports.registerPlugin = registerPlugin; + var plugins = { + ast: [] + }; + + /** + Adds an AST plugin to be used by Ember.HTMLBars.compile. + + @private + @method registerASTPlugin + */ + + function registerPlugin(type, Plugin) { + if (!plugins[type]) { + throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.'); + } + + plugins[type].push(Plugin); + } + + exports.default = plugins; +}); enifed('ember-template-compiler/plugins/assert-no-each-in', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) { 'use strict'; function AssertNoEachIn() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; @@ -12628,44 +12660,10 @@ } } exports.default = TransformTopLevelComponents; }); -enifed('ember-template-compiler/plugins', ['exports'], function (exports) { - /** - @module ember - @submodule ember-template-compiler - */ - - /** - @private - @property helpers - */ - 'use strict'; - - exports.registerPlugin = registerPlugin; - var plugins = { - ast: [] - }; - - /** - Adds an AST plugin to be used by Ember.HTMLBars.compile. - - @private - @method registerASTPlugin - */ - - function registerPlugin(type, Plugin) { - if (!plugins[type]) { - throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.'); - } - - plugins[type].push(Plugin); - } - - exports.default = plugins; -}); enifed('ember-template-compiler/system/calculate-location-display', ['exports'], function (exports) { 'use strict'; exports.default = calculateLocationDisplay; @@ -12772,11 +12770,11 @@ options.plugins = plugins; options.buildMeta = function buildMeta(program) { return { fragmentReason: fragmentReason(program), - revision: 'Ember@2.6.1', + revision: 'Ember@2.6.2', loc: program.loc, moduleName: options.moduleName }; }; @@ -12908,10 +12906,17 @@ return templateSpec; }; exports.default = template; }); +enifed("htmlbars-compiler", ["exports", "htmlbars-compiler/compiler"], function (exports, _htmlbarsCompilerCompiler) { + "use strict"; + + exports.compile = _htmlbarsCompilerCompiler.compile; + exports.compileSpec = _htmlbarsCompilerCompiler.compileSpec; + exports.template = _htmlbarsCompilerCompiler.template; +}); enifed("htmlbars-compiler/compiler", ["exports", "htmlbars-syntax/parser", "htmlbars-compiler/template-compiler", "htmlbars-runtime/hooks", "htmlbars-runtime/render"], function (exports, _htmlbarsSyntaxParser, _htmlbarsCompilerTemplateCompiler, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender) { /*jshint evil:true*/ "use strict"; exports.compileSpec = compileSpec; @@ -14164,16 +14169,27 @@ compiler[method].call(compiler); } } } }); -enifed("htmlbars-compiler", ["exports", "htmlbars-compiler/compiler"], function (exports, _htmlbarsCompilerCompiler) { - "use strict"; +enifed('htmlbars-runtime', ['exports', 'htmlbars-runtime/hooks', 'htmlbars-runtime/render', 'htmlbars-util/morph-utils', 'htmlbars-util/template-utils'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) { + 'use strict'; - exports.compile = _htmlbarsCompilerCompiler.compile; - exports.compileSpec = _htmlbarsCompilerCompiler.compileSpec; - exports.template = _htmlbarsCompilerCompiler.template; + var internal = { + blockFor: _htmlbarsUtilTemplateUtils.blockFor, + manualElement: _htmlbarsRuntimeRender.manualElement, + hostBlock: _htmlbarsRuntimeHooks.hostBlock, + continueBlock: _htmlbarsRuntimeHooks.continueBlock, + hostYieldWithShadowTemplate: _htmlbarsRuntimeHooks.hostYieldWithShadowTemplate, + visitChildren: _htmlbarsUtilMorphUtils.visitChildren, + validateChildMorphs: _htmlbarsUtilMorphUtils.validateChildMorphs, + clearMorph: _htmlbarsUtilTemplateUtils.clearMorph + }; + + exports.hooks = _htmlbarsRuntimeHooks.default; + exports.render = _htmlbarsRuntimeRender.default; + exports.internal = internal; }); enifed('htmlbars-runtime/expression-visitor', ['exports'], function (exports) { /** # Expression Nodes: @@ -16036,27 +16052,18 @@ } return fragment; } }); -enifed('htmlbars-runtime', ['exports', 'htmlbars-runtime/hooks', 'htmlbars-runtime/render', 'htmlbars-util/morph-utils', 'htmlbars-util/template-utils'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) { - 'use strict'; +enifed("htmlbars-syntax", ["exports", "htmlbars-syntax/builders", "htmlbars-syntax/parser", "htmlbars-syntax/generation/print", "htmlbars-syntax/traversal/traverse", "htmlbars-syntax/traversal/walker"], function (exports, _htmlbarsSyntaxBuilders, _htmlbarsSyntaxParser, _htmlbarsSyntaxGenerationPrint, _htmlbarsSyntaxTraversalTraverse, _htmlbarsSyntaxTraversalWalker) { + "use strict"; - var internal = { - blockFor: _htmlbarsUtilTemplateUtils.blockFor, - manualElement: _htmlbarsRuntimeRender.manualElement, - hostBlock: _htmlbarsRuntimeHooks.hostBlock, - continueBlock: _htmlbarsRuntimeHooks.continueBlock, - hostYieldWithShadowTemplate: _htmlbarsRuntimeHooks.hostYieldWithShadowTemplate, - visitChildren: _htmlbarsUtilMorphUtils.visitChildren, - validateChildMorphs: _htmlbarsUtilMorphUtils.validateChildMorphs, - clearMorph: _htmlbarsUtilTemplateUtils.clearMorph - }; - - exports.hooks = _htmlbarsRuntimeHooks.default; - exports.render = _htmlbarsRuntimeRender.default; - exports.internal = internal; + exports.builders = _htmlbarsSyntaxBuilders.default; + exports.parse = _htmlbarsSyntaxParser.default; + exports.print = _htmlbarsSyntaxGenerationPrint.default; + exports.traverse = _htmlbarsSyntaxTraversalTraverse.default; + exports.Walker = _htmlbarsSyntaxTraversalWalker.default; }); enifed("htmlbars-syntax/builders", ["exports"], function (exports) { // Statements "use strict"; @@ -17996,10 +18003,99 @@ function appendContextPath(contextPath, id) { return (contextPath ? contextPath + '.' : '') + id; } }); +enifed("htmlbars-syntax/parser", ["exports", "htmlbars-syntax/handlebars/compiler/base", "htmlbars-syntax", "simple-html-tokenizer/evented-tokenizer", "simple-html-tokenizer/entity-parser", "simple-html-tokenizer/html5-named-char-refs", "htmlbars-syntax/parser/handlebars-node-visitors", "htmlbars-syntax/parser/tokenizer-event-handlers"], function (exports, _htmlbarsSyntaxHandlebarsCompilerBase, _htmlbarsSyntax, _simpleHtmlTokenizerEventedTokenizer, _simpleHtmlTokenizerEntityParser, _simpleHtmlTokenizerHtml5NamedCharRefs, _htmlbarsSyntaxParserHandlebarsNodeVisitors, _htmlbarsSyntaxParserTokenizerEventHandlers) { + "use strict"; + + exports.preprocess = preprocess; + exports.Parser = Parser; + + function preprocess(html, options) { + var ast = typeof html === 'object' ? html : _htmlbarsSyntaxHandlebarsCompilerBase.parse(html); + var combined = new Parser(html, options).acceptNode(ast); + + if (options && options.plugins && options.plugins.ast) { + for (var i = 0, l = options.plugins.ast.length; i < l; i++) { + var plugin = new options.plugins.ast[i](options); + + plugin.syntax = _htmlbarsSyntax; + + combined = plugin.transform(combined); + } + } + + return combined; + } + + exports.default = preprocess; + + var entityParser = new _simpleHtmlTokenizerEntityParser.default(_simpleHtmlTokenizerHtml5NamedCharRefs.default); + + function Parser(source, options) { + this.options = options || {}; + this.elementStack = []; + this.tokenizer = new _simpleHtmlTokenizerEventedTokenizer.default(this, entityParser); + + this.currentNode = null; + this.currentAttribute = null; + + if (typeof source === 'string') { + this.source = source.split(/(?:\r\n?|\n)/g); + } + } + + for (var key in _htmlbarsSyntaxParserHandlebarsNodeVisitors.default) { + Parser.prototype[key] = _htmlbarsSyntaxParserHandlebarsNodeVisitors.default[key]; + } + + for (var key in _htmlbarsSyntaxParserTokenizerEventHandlers.default) { + Parser.prototype[key] = _htmlbarsSyntaxParserTokenizerEventHandlers.default[key]; + } + + Parser.prototype.acceptNode = function (node) { + return this[node.type](node); + }; + + Parser.prototype.currentElement = function () { + return this.elementStack[this.elementStack.length - 1]; + }; + + Parser.prototype.sourceForMustache = function (mustache) { + var firstLine = mustache.loc.start.line - 1; + var lastLine = mustache.loc.end.line - 1; + var currentLine = firstLine - 1; + var firstColumn = mustache.loc.start.column + 2; + var lastColumn = mustache.loc.end.column - 2; + var string = []; + var line; + + if (!this.source) { + return '{{' + mustache.path.id.original + '}}'; + } + + while (currentLine < lastLine) { + currentLine++; + line = this.source[currentLine]; + + if (currentLine === firstLine) { + if (firstLine === lastLine) { + string.push(line.slice(firstColumn, lastColumn)); + } else { + string.push(line.slice(firstColumn)); + } + } else if (currentLine === lastLine) { + string.push(line.slice(0, lastColumn)); + } else { + string.push(line); + } + } + + return string.join('\n'); + }; +}); enifed("htmlbars-syntax/parser/handlebars-node-visitors", ["exports", "htmlbars-syntax/builders", "htmlbars-syntax/utils"], function (exports, _htmlbarsSyntaxBuilders, _htmlbarsSyntaxUtils) { "use strict"; exports.default = { @@ -18440,99 +18536,10 @@ function formatEndTagInfo(tag) { return "`" + tag.name + "` (on line " + tag.loc.end.line + ")"; } }); -enifed("htmlbars-syntax/parser", ["exports", "htmlbars-syntax/handlebars/compiler/base", "htmlbars-syntax", "simple-html-tokenizer/evented-tokenizer", "simple-html-tokenizer/entity-parser", "simple-html-tokenizer/html5-named-char-refs", "htmlbars-syntax/parser/handlebars-node-visitors", "htmlbars-syntax/parser/tokenizer-event-handlers"], function (exports, _htmlbarsSyntaxHandlebarsCompilerBase, _htmlbarsSyntax, _simpleHtmlTokenizerEventedTokenizer, _simpleHtmlTokenizerEntityParser, _simpleHtmlTokenizerHtml5NamedCharRefs, _htmlbarsSyntaxParserHandlebarsNodeVisitors, _htmlbarsSyntaxParserTokenizerEventHandlers) { - "use strict"; - - exports.preprocess = preprocess; - exports.Parser = Parser; - - function preprocess(html, options) { - var ast = typeof html === 'object' ? html : _htmlbarsSyntaxHandlebarsCompilerBase.parse(html); - var combined = new Parser(html, options).acceptNode(ast); - - if (options && options.plugins && options.plugins.ast) { - for (var i = 0, l = options.plugins.ast.length; i < l; i++) { - var plugin = new options.plugins.ast[i](options); - - plugin.syntax = _htmlbarsSyntax; - - combined = plugin.transform(combined); - } - } - - return combined; - } - - exports.default = preprocess; - - var entityParser = new _simpleHtmlTokenizerEntityParser.default(_simpleHtmlTokenizerHtml5NamedCharRefs.default); - - function Parser(source, options) { - this.options = options || {}; - this.elementStack = []; - this.tokenizer = new _simpleHtmlTokenizerEventedTokenizer.default(this, entityParser); - - this.currentNode = null; - this.currentAttribute = null; - - if (typeof source === 'string') { - this.source = source.split(/(?:\r\n?|\n)/g); - } - } - - for (var key in _htmlbarsSyntaxParserHandlebarsNodeVisitors.default) { - Parser.prototype[key] = _htmlbarsSyntaxParserHandlebarsNodeVisitors.default[key]; - } - - for (var key in _htmlbarsSyntaxParserTokenizerEventHandlers.default) { - Parser.prototype[key] = _htmlbarsSyntaxParserTokenizerEventHandlers.default[key]; - } - - Parser.prototype.acceptNode = function (node) { - return this[node.type](node); - }; - - Parser.prototype.currentElement = function () { - return this.elementStack[this.elementStack.length - 1]; - }; - - Parser.prototype.sourceForMustache = function (mustache) { - var firstLine = mustache.loc.start.line - 1; - var lastLine = mustache.loc.end.line - 1; - var currentLine = firstLine - 1; - var firstColumn = mustache.loc.start.column + 2; - var lastColumn = mustache.loc.end.column - 2; - var string = []; - var line; - - if (!this.source) { - return '{{' + mustache.path.id.original + '}}'; - } - - while (currentLine < lastLine) { - currentLine++; - line = this.source[currentLine]; - - if (currentLine === firstLine) { - if (firstLine === lastLine) { - string.push(line.slice(firstColumn, lastColumn)); - } else { - string.push(line.slice(firstColumn)); - } - } else if (currentLine === lastLine) { - string.push(line.slice(0, lastColumn)); - } else { - string.push(line); - } - } - - return string.join('\n'); - }; -}); enifed("htmlbars-syntax/traversal/errors", ["exports"], function (exports) { "use strict"; exports.cannotRemoveNode = cannotRemoveNode; exports.cannotReplaceNode = cannotReplaceNode; @@ -18877,19 +18884,10 @@ } else { return mustache.path; } } }); -enifed("htmlbars-syntax", ["exports", "htmlbars-syntax/builders", "htmlbars-syntax/parser", "htmlbars-syntax/generation/print", "htmlbars-syntax/traversal/traverse", "htmlbars-syntax/traversal/walker"], function (exports, _htmlbarsSyntaxBuilders, _htmlbarsSyntaxParser, _htmlbarsSyntaxGenerationPrint, _htmlbarsSyntaxTraversalTraverse, _htmlbarsSyntaxTraversalWalker) { - "use strict"; - - exports.builders = _htmlbarsSyntaxBuilders.default; - exports.parse = _htmlbarsSyntaxParser.default; - exports.print = _htmlbarsSyntaxGenerationPrint.default; - exports.traverse = _htmlbarsSyntaxTraversalTraverse.default; - exports.Walker = _htmlbarsSyntaxTraversalWalker.default; -}); enifed("htmlbars-test-helpers", ["exports", "simple-html-tokenizer/index", "htmlbars-util/array-utils"], function (exports, _simpleHtmlTokenizerIndex, _htmlbarsUtilArrayUtils) { "use strict"; exports.equalInnerHTML = equalInnerHTML; exports.equalHTML = equalHTML; @@ -19013,10 +19011,20 @@ } else { return el[textProperty]; } } }); +enifed('htmlbars-util', ['exports', 'htmlbars-util/safe-string', 'htmlbars-util/handlebars/utils', 'htmlbars-util/namespaces', 'htmlbars-util/morph-utils'], function (exports, _htmlbarsUtilSafeString, _htmlbarsUtilHandlebarsUtils, _htmlbarsUtilNamespaces, _htmlbarsUtilMorphUtils) { + 'use strict'; + + exports.SafeString = _htmlbarsUtilSafeString.default; + exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression; + exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace; + exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs; + exports.linkParams = _htmlbarsUtilMorphUtils.linkParams; + exports.dump = _htmlbarsUtilMorphUtils.dump; +}); enifed('htmlbars-util/array-utils', ['exports'], function (exports) { 'use strict'; exports.forEach = forEach; exports.map = map; @@ -19634,159 +19642,10 @@ voidMap[tagName] = true; }); exports.default = voidMap; }); -enifed('htmlbars-util', ['exports', 'htmlbars-util/safe-string', 'htmlbars-util/handlebars/utils', 'htmlbars-util/namespaces', 'htmlbars-util/morph-utils'], function (exports, _htmlbarsUtilSafeString, _htmlbarsUtilHandlebarsUtils, _htmlbarsUtilNamespaces, _htmlbarsUtilMorphUtils) { - 'use strict'; - - exports.SafeString = _htmlbarsUtilSafeString.default; - exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression; - exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace; - exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs; - exports.linkParams = _htmlbarsUtilMorphUtils.linkParams; - exports.dump = _htmlbarsUtilMorphUtils.dump; -}); -enifed('morph-range/morph-list', ['exports', 'morph-range/utils'], function (exports, _morphRangeUtils) { - 'use strict'; - - function MorphList() { - // morph graph - this.firstChildMorph = null; - this.lastChildMorph = null; - - this.mountedMorph = null; - } - - var prototype = MorphList.prototype; - - prototype.clear = function MorphList$clear() { - var current = this.firstChildMorph; - - while (current) { - var next = current.nextMorph; - current.previousMorph = null; - current.nextMorph = null; - current.parentMorphList = null; - current = next; - } - - this.firstChildMorph = this.lastChildMorph = null; - }; - - prototype.destroy = function MorphList$destroy() {}; - - prototype.appendMorph = function MorphList$appendMorph(morph) { - this.insertBeforeMorph(morph, null); - }; - - prototype.insertBeforeMorph = function MorphList$insertBeforeMorph(morph, referenceMorph) { - if (morph.parentMorphList !== null) { - morph.unlink(); - } - if (referenceMorph && referenceMorph.parentMorphList !== this) { - throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.'); - } - - var mountedMorph = this.mountedMorph; - - if (mountedMorph) { - - var parentNode = mountedMorph.firstNode.parentNode; - var referenceNode = referenceMorph ? referenceMorph.firstNode : mountedMorph.lastNode.nextSibling; - - _morphRangeUtils.insertBefore(parentNode, morph.firstNode, morph.lastNode, referenceNode); - - // was not in list mode replace current content - if (!this.firstChildMorph) { - _morphRangeUtils.clear(this.mountedMorph.firstNode.parentNode, this.mountedMorph.firstNode, this.mountedMorph.lastNode); - } - } - - morph.parentMorphList = this; - - var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph; - if (previousMorph) { - previousMorph.nextMorph = morph; - morph.previousMorph = previousMorph; - } else { - this.firstChildMorph = morph; - } - - if (referenceMorph) { - referenceMorph.previousMorph = morph; - morph.nextMorph = referenceMorph; - } else { - this.lastChildMorph = morph; - } - - this.firstChildMorph._syncFirstNode(); - this.lastChildMorph._syncLastNode(); - }; - - prototype.removeChildMorph = function MorphList$removeChildMorph(morph) { - if (morph.parentMorphList !== this) { - throw new Error("Cannot remove a morph from a parent it is not inside of"); - } - - morph.destroy(); - }; - - exports.default = MorphList; -}); -enifed('morph-range/morph-list.umd', ['exports', 'morph-range/morph-list'], function (exports, _morphRangeMorphList) { - 'use strict'; - - (function (root, factory) { - if (typeof define === 'function' && define.amd) { - define([], factory); - } else if (typeof exports === 'object') { - module.exports = factory(); - } else { - root.MorphList = factory(); - } - })(undefined, function () { - return _morphRangeMorphList.default; - }); -}); -enifed("morph-range/utils", ["exports"], function (exports) { - // inclusive of both nodes - "use strict"; - - exports.clear = clear; - exports.insertBefore = insertBefore; - - function clear(parentNode, firstNode, lastNode) { - if (!parentNode) { - return; - } - - var node = firstNode; - var nextNode; - do { - nextNode = node.nextSibling; - parentNode.removeChild(node); - if (node === lastNode) { - break; - } - node = nextNode; - } while (node); - } - - function insertBefore(parentNode, firstNode, lastNode, refNode) { - var node = firstNode; - var nextNode; - do { - nextNode = node.nextSibling; - parentNode.insertBefore(node, refNode); - if (node === lastNode) { - break; - } - node = nextNode; - } while (node); - } -}); enifed('morph-range', ['exports', 'morph-range/utils'], function (exports, _morphRangeUtils) { 'use strict'; // constructor just initializes the fields // use one of the static initializers to create a valid morph. @@ -20061,9 +19920,148 @@ Morph.prototype.appendToNode = function Morph$appendToNode(parentNode) { _morphRangeUtils.insertBefore(parentNode, this.firstNode, this.lastNode, null); }; exports.default = Morph; +}); +enifed('morph-range/morph-list', ['exports', 'morph-range/utils'], function (exports, _morphRangeUtils) { + 'use strict'; + + function MorphList() { + // morph graph + this.firstChildMorph = null; + this.lastChildMorph = null; + + this.mountedMorph = null; + } + + var prototype = MorphList.prototype; + + prototype.clear = function MorphList$clear() { + var current = this.firstChildMorph; + + while (current) { + var next = current.nextMorph; + current.previousMorph = null; + current.nextMorph = null; + current.parentMorphList = null; + current = next; + } + + this.firstChildMorph = this.lastChildMorph = null; + }; + + prototype.destroy = function MorphList$destroy() {}; + + prototype.appendMorph = function MorphList$appendMorph(morph) { + this.insertBeforeMorph(morph, null); + }; + + prototype.insertBeforeMorph = function MorphList$insertBeforeMorph(morph, referenceMorph) { + if (morph.parentMorphList !== null) { + morph.unlink(); + } + if (referenceMorph && referenceMorph.parentMorphList !== this) { + throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.'); + } + + var mountedMorph = this.mountedMorph; + + if (mountedMorph) { + + var parentNode = mountedMorph.firstNode.parentNode; + var referenceNode = referenceMorph ? referenceMorph.firstNode : mountedMorph.lastNode.nextSibling; + + _morphRangeUtils.insertBefore(parentNode, morph.firstNode, morph.lastNode, referenceNode); + + // was not in list mode replace current content + if (!this.firstChildMorph) { + _morphRangeUtils.clear(this.mountedMorph.firstNode.parentNode, this.mountedMorph.firstNode, this.mountedMorph.lastNode); + } + } + + morph.parentMorphList = this; + + var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph; + if (previousMorph) { + previousMorph.nextMorph = morph; + morph.previousMorph = previousMorph; + } else { + this.firstChildMorph = morph; + } + + if (referenceMorph) { + referenceMorph.previousMorph = morph; + morph.nextMorph = referenceMorph; + } else { + this.lastChildMorph = morph; + } + + this.firstChildMorph._syncFirstNode(); + this.lastChildMorph._syncLastNode(); + }; + + prototype.removeChildMorph = function MorphList$removeChildMorph(morph) { + if (morph.parentMorphList !== this) { + throw new Error("Cannot remove a morph from a parent it is not inside of"); + } + + morph.destroy(); + }; + + exports.default = MorphList; +}); +enifed('morph-range/morph-list.umd', ['exports', 'morph-range/morph-list'], function (exports, _morphRangeMorphList) { + 'use strict'; + + (function (root, factory) { + if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.MorphList = factory(); + } + })(undefined, function () { + return _morphRangeMorphList.default; + }); +}); +enifed("morph-range/utils", ["exports"], function (exports) { + // inclusive of both nodes + "use strict"; + + exports.clear = clear; + exports.insertBefore = insertBefore; + + function clear(parentNode, firstNode, lastNode) { + if (!parentNode) { + return; + } + + var node = firstNode; + var nextNode; + do { + nextNode = node.nextSibling; + parentNode.removeChild(node); + if (node === lastNode) { + break; + } + node = nextNode; + } while (node); + } + + function insertBefore(parentNode, firstNode, lastNode, refNode) { + var node = firstNode; + var nextNode; + do { + nextNode = node.nextSibling; + parentNode.insertBefore(node, refNode); + if (node === lastNode) { + break; + } + node = nextNode; + } while (node); + } }); enifed("simple-html-tokenizer/entity-parser", ["exports"], function (exports) { "use strict"; function EntityParser(named) { \ No newline at end of file