ember-source 2.0.3 → 2.0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +21795 -0
- data/dist/ember-template-compiler.js +1624 -1624
- data/dist/ember-testing.js +159 -158
- data/dist/ember-tests.js +67864 -0
- data/dist/ember-tests.prod.js +67737 -0
- data/dist/ember.debug.cjs.js +52806 -0
- data/dist/ember.debug.js +8586 -8586
- data/dist/ember.js +8586 -8586
- data/dist/ember.min.js +14 -14
- data/dist/ember.prod.js +8555 -8555
- metadata +6 -2
|
@@ -1,1078 +1,1164 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
while (start < end) {
|
|
12
|
-
// since timers is an array of pairs 'l' will always
|
|
13
|
-
// be an integer
|
|
14
|
-
l = (end - start) / 2;
|
|
1
|
+
/*!
|
|
2
|
+
* @overview Ember - JavaScript Application Framework
|
|
3
|
+
* @copyright Copyright 2011-2015 Tilde Inc. and contributors
|
|
4
|
+
* Portions Copyright 2006-2011 Strobe Inc.
|
|
5
|
+
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
6
|
+
* @license Licensed under MIT license
|
|
7
|
+
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
8
|
+
* @version 2.0.3
|
|
9
|
+
*/
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
(function() {
|
|
12
|
+
var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
13
|
+
var mainContext = this;
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
end = middle;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
15
|
+
(function() {
|
|
16
|
+
var isNode = typeof window === 'undefined' &&
|
|
17
|
+
typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
if (!isNode) {
|
|
20
|
+
Ember = this.Ember = this.Ember || {};
|
|
28
21
|
}
|
|
29
|
-
});
|
|
30
|
-
enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], function (exports, _utils, _queue) {
|
|
31
|
-
'use strict';
|
|
32
22
|
|
|
33
|
-
|
|
23
|
+
if (typeof Ember === 'undefined') { Ember = {}; };
|
|
34
24
|
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
25
|
+
if (typeof Ember.__loader === 'undefined') {
|
|
26
|
+
var registry = {};
|
|
27
|
+
var seen = {};
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
enifed = function(name, deps, callback) {
|
|
30
|
+
var value = { };
|
|
40
31
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
if (!callback) {
|
|
33
|
+
value.deps = [];
|
|
34
|
+
value.callback = deps;
|
|
35
|
+
} else {
|
|
36
|
+
value.deps = deps;
|
|
37
|
+
value.callback = callback;
|
|
38
|
+
}
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
40
|
+
registry[name] = value;
|
|
41
|
+
};
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
requirejs = eriuqer = requireModule = function(name) {
|
|
44
|
+
return internalRequire(name, null);
|
|
45
|
+
}
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var queues = this.queues;
|
|
57
|
-
var queue = queues[name];
|
|
47
|
+
function internalRequire(name, referrerName) {
|
|
48
|
+
var exports = seen[name];
|
|
58
49
|
|
|
59
|
-
if (
|
|
60
|
-
|
|
50
|
+
if (exports !== undefined) {
|
|
51
|
+
return exports;
|
|
61
52
|
}
|
|
62
53
|
|
|
63
|
-
|
|
64
|
-
noSuchMethod(name);
|
|
65
|
-
}
|
|
54
|
+
exports = seen[name] = {};
|
|
66
55
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
if (!registry[name]) {
|
|
57
|
+
if (referrerName) {
|
|
58
|
+
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
|
59
|
+
} else {
|
|
60
|
+
throw new Error('Could not find module ' + name);
|
|
61
|
+
}
|
|
71
62
|
}
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
flush: function () {
|
|
75
|
-
var queues = this.queues;
|
|
76
|
-
var queueNames = this.queueNames;
|
|
77
|
-
var queueName, queue, queueItems, priorQueueNameIndex;
|
|
78
|
-
var queueNameIndex = 0;
|
|
79
|
-
var numberOfQueues = queueNames.length;
|
|
80
|
-
var options = this.options;
|
|
81
|
-
|
|
82
|
-
while (queueNameIndex < numberOfQueues) {
|
|
83
|
-
queueName = queueNames[queueNameIndex];
|
|
84
|
-
queue = queues[queueName];
|
|
85
63
|
|
|
86
|
-
|
|
64
|
+
var mod = registry[name];
|
|
65
|
+
var deps = mod.deps;
|
|
66
|
+
var callback = mod.callback;
|
|
67
|
+
var reified = [];
|
|
68
|
+
var length = deps.length;
|
|
87
69
|
|
|
88
|
-
|
|
89
|
-
|
|
70
|
+
for (var i=0; i<length; i++) {
|
|
71
|
+
if (deps[i] === 'exports') {
|
|
72
|
+
reified.push(exports);
|
|
90
73
|
} else {
|
|
91
|
-
|
|
92
|
-
queueNameIndex = 0;
|
|
74
|
+
reified.push(internalRequire(resolve(deps[i], name), name));
|
|
93
75
|
}
|
|
94
76
|
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
enifed('backburner/platform', ['exports'], function (exports) {
|
|
99
|
-
// In IE 6-8, try/finally doesn't work without a catch.
|
|
100
|
-
// Unfortunately, this is impossible to test for since wrapping it in a parent try/catch doesn't trigger the bug.
|
|
101
|
-
// This tests for another broken try/catch behavior that only exhibits in the same versions of IE.
|
|
102
|
-
'use strict';
|
|
103
77
|
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
x();
|
|
107
|
-
} catch (e) {} // jshint ignore:line
|
|
108
|
-
return !!e;
|
|
109
|
-
})();
|
|
78
|
+
callback.apply(this, reified);
|
|
110
79
|
|
|
111
|
-
|
|
112
|
-
|
|
80
|
+
return exports;
|
|
81
|
+
};
|
|
113
82
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
83
|
+
function resolve(child, name) {
|
|
84
|
+
if (child.charAt(0) !== '.') {
|
|
85
|
+
return child;
|
|
86
|
+
}
|
|
87
|
+
var parts = child.split('/');
|
|
88
|
+
var parentBase = name.split('/').slice(0, -1);
|
|
117
89
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
platform = global;
|
|
121
|
-
} else {
|
|
122
|
-
throw new Error('no global: `self` or `global` found');
|
|
123
|
-
}
|
|
90
|
+
for (var i=0, l=parts.length; i<l; i++) {
|
|
91
|
+
var part = parts[i];
|
|
124
92
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
93
|
+
if (part === '..') {
|
|
94
|
+
parentBase.pop();
|
|
95
|
+
} else if (part === '.') {
|
|
96
|
+
continue;
|
|
97
|
+
} else {
|
|
98
|
+
parentBase.push(part);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
129
101
|
|
|
130
|
-
|
|
102
|
+
return parentBase.join('/');
|
|
103
|
+
}
|
|
131
104
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
105
|
+
requirejs._eak_seen = registry;
|
|
106
|
+
|
|
107
|
+
Ember.__loader = {
|
|
108
|
+
define: enifed,
|
|
109
|
+
require: eriuqer,
|
|
110
|
+
registry: registry
|
|
111
|
+
};
|
|
112
|
+
} else {
|
|
113
|
+
enifed = Ember.__loader.define;
|
|
114
|
+
requirejs = eriuqer = requireModule = Ember.__loader.require;
|
|
139
115
|
}
|
|
116
|
+
})();
|
|
140
117
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var queue = this._queue;
|
|
144
|
-
queue.push(target, method, args, stack);
|
|
118
|
+
enifed('backburner', ['exports', './backburner/utils', './backburner/platform', './backburner/binary-search', './backburner/deferred-action-queues'], function (exports, _backburnerUtils, _backburnerPlatform, _backburnerBinarySearch, _backburnerDeferredActionQueues) {
|
|
119
|
+
'use strict';
|
|
145
120
|
|
|
146
|
-
|
|
147
|
-
queue: this,
|
|
148
|
-
target: target,
|
|
149
|
-
method: method
|
|
150
|
-
};
|
|
151
|
-
},
|
|
121
|
+
exports.default = Backburner;
|
|
152
122
|
|
|
153
|
-
|
|
154
|
-
|
|
123
|
+
function Backburner(queueNames, options) {
|
|
124
|
+
this.queueNames = queueNames;
|
|
125
|
+
this.options = options || {};
|
|
126
|
+
if (!this.options.defaultQueue) {
|
|
127
|
+
this.options.defaultQueue = queueNames[0];
|
|
128
|
+
}
|
|
129
|
+
this.instanceStack = [];
|
|
130
|
+
this._debouncees = [];
|
|
131
|
+
this._throttlers = [];
|
|
132
|
+
this._timers = [];
|
|
133
|
+
this._eventCallbacks = {
|
|
134
|
+
end: [],
|
|
135
|
+
begin: []
|
|
136
|
+
};
|
|
137
|
+
}
|
|
155
138
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
139
|
+
Backburner.prototype = {
|
|
140
|
+
begin: function () {
|
|
141
|
+
var options = this.options;
|
|
142
|
+
var onBegin = options && options.onBegin;
|
|
143
|
+
var previousInstance = this.currentInstance;
|
|
159
144
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
queue[i + 3] = stack; // replace stack
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
145
|
+
if (previousInstance) {
|
|
146
|
+
this.instanceStack.push(previousInstance);
|
|
165
147
|
}
|
|
166
148
|
|
|
167
|
-
|
|
149
|
+
this.currentInstance = new _backburnerDeferredActionQueues.default(this.queueNames, options);
|
|
150
|
+
this._trigger('begin', this.currentInstance, previousInstance);
|
|
151
|
+
if (onBegin) {
|
|
152
|
+
onBegin(this.currentInstance, previousInstance);
|
|
153
|
+
}
|
|
168
154
|
},
|
|
169
155
|
|
|
170
|
-
|
|
171
|
-
var
|
|
156
|
+
end: function () {
|
|
157
|
+
var options = this.options;
|
|
158
|
+
var onEnd = options && options.onEnd;
|
|
159
|
+
var currentInstance = this.currentInstance;
|
|
160
|
+
var nextInstance = null;
|
|
172
161
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
162
|
+
// Prevent double-finally bug in Safari 6.0.2 and iOS 6
|
|
163
|
+
// This bug appears to be resolved in Safari 6.0.5 and iOS 7
|
|
164
|
+
var finallyAlreadyCalled = false;
|
|
165
|
+
try {
|
|
166
|
+
currentInstance.flush();
|
|
167
|
+
} finally {
|
|
168
|
+
if (!finallyAlreadyCalled) {
|
|
169
|
+
finallyAlreadyCalled = true;
|
|
176
170
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
171
|
+
this.currentInstance = null;
|
|
172
|
+
|
|
173
|
+
if (this.instanceStack.length) {
|
|
174
|
+
nextInstance = this.instanceStack.pop();
|
|
175
|
+
this.currentInstance = nextInstance;
|
|
176
|
+
}
|
|
177
|
+
this._trigger('end', currentInstance, nextInstance);
|
|
178
|
+
if (onEnd) {
|
|
179
|
+
onEnd(currentInstance, nextInstance);
|
|
180
|
+
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
|
|
184
|
-
targetQueue.push(method, queue.push(target, method, args, stack) - 4);
|
|
185
183
|
},
|
|
186
184
|
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
/**
|
|
186
|
+
Trigger an event. Supports up to two arguments. Designed around
|
|
187
|
+
triggering transition events from one run loop instance to the
|
|
188
|
+
next, which requires an argument for the first instance and then
|
|
189
|
+
an argument for the next instance.
|
|
190
|
+
@private
|
|
191
|
+
@method _trigger
|
|
192
|
+
@param {String} eventName
|
|
193
|
+
@param {any} arg1
|
|
194
|
+
@param {any} arg2
|
|
195
|
+
*/
|
|
196
|
+
_trigger: function (eventName, arg1, arg2) {
|
|
197
|
+
var callbacks = this._eventCallbacks[eventName];
|
|
198
|
+
if (callbacks) {
|
|
199
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
200
|
+
callbacks[i](arg1, arg2);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
189
204
|
|
|
190
|
-
|
|
191
|
-
|
|
205
|
+
on: function (eventName, callback) {
|
|
206
|
+
if (typeof callback !== 'function') {
|
|
207
|
+
throw new TypeError('Callback must be a function');
|
|
208
|
+
}
|
|
209
|
+
var callbacks = this._eventCallbacks[eventName];
|
|
210
|
+
if (callbacks) {
|
|
211
|
+
callbacks.push(callback);
|
|
192
212
|
} else {
|
|
193
|
-
|
|
213
|
+
throw new TypeError('Cannot on() event "' + eventName + '" because it does not exist');
|
|
194
214
|
}
|
|
195
|
-
|
|
196
|
-
return {
|
|
197
|
-
queue: this,
|
|
198
|
-
target: target,
|
|
199
|
-
method: method
|
|
200
|
-
};
|
|
201
215
|
},
|
|
202
216
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
217
|
+
off: function (eventName, callback) {
|
|
218
|
+
if (eventName) {
|
|
219
|
+
var callbacks = this._eventCallbacks[eventName];
|
|
220
|
+
var callbackFound = false;
|
|
221
|
+
if (!callbacks) return;
|
|
222
|
+
if (callback) {
|
|
223
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
224
|
+
if (callbacks[i] === callback) {
|
|
225
|
+
callbackFound = true;
|
|
226
|
+
callbacks.splice(i, 1);
|
|
227
|
+
i--;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (!callbackFound) {
|
|
232
|
+
throw new TypeError('Cannot off() callback that does not exist');
|
|
215
233
|
}
|
|
234
|
+
} else {
|
|
235
|
+
throw new TypeError('Cannot off() event "' + eventName + '" because it does not exist');
|
|
216
236
|
}
|
|
217
|
-
|
|
218
|
-
this.pushUniqueWithoutGuid(target, method, args, stack);
|
|
219
|
-
|
|
220
|
-
return {
|
|
221
|
-
queue: this,
|
|
222
|
-
target: target,
|
|
223
|
-
method: method
|
|
224
|
-
};
|
|
225
237
|
},
|
|
226
238
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
239
|
+
run: function () /* target, method, args */{
|
|
240
|
+
var length = arguments.length;
|
|
241
|
+
var method, target, args;
|
|
242
|
+
|
|
243
|
+
if (length === 1) {
|
|
244
|
+
method = arguments[0];
|
|
245
|
+
target = null;
|
|
230
246
|
} else {
|
|
231
|
-
|
|
247
|
+
target = arguments[0];
|
|
248
|
+
method = arguments[1];
|
|
232
249
|
}
|
|
233
|
-
},
|
|
234
250
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (args && args.length > 0) {
|
|
238
|
-
method.apply(target, args);
|
|
239
|
-
} else {
|
|
240
|
-
method.call(target);
|
|
241
|
-
}
|
|
242
|
-
} catch (error) {
|
|
243
|
-
onError(error, errorRecordedForStack);
|
|
251
|
+
if (_backburnerUtils.isString(method)) {
|
|
252
|
+
method = target[method];
|
|
244
253
|
}
|
|
245
|
-
},
|
|
246
254
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
255
|
+
if (length > 2) {
|
|
256
|
+
args = new Array(length - 2);
|
|
257
|
+
for (var i = 0, l = length - 2; i < l; i++) {
|
|
258
|
+
args[i] = arguments[i + 2];
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
args = [];
|
|
253
262
|
}
|
|
254
263
|
|
|
255
|
-
var
|
|
256
|
-
var options = this.options;
|
|
257
|
-
var before = options && options.before;
|
|
258
|
-
var after = options && options.after;
|
|
259
|
-
var onError = globalOptions.onError || globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod];
|
|
260
|
-
var target, method, args, errorRecordedForStack;
|
|
261
|
-
var invoke = onError ? this.invokeWithOnError : this.invoke;
|
|
264
|
+
var onError = getOnError(this.options);
|
|
262
265
|
|
|
263
|
-
this.
|
|
264
|
-
var queueItems = this._queueBeingFlushed = this._queue.slice();
|
|
265
|
-
this._queue = [];
|
|
266
|
+
this.begin();
|
|
266
267
|
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
// guard against Safari 6's double-finally bug
|
|
269
|
+
var didFinally = false;
|
|
270
|
+
|
|
271
|
+
if (onError) {
|
|
272
|
+
try {
|
|
273
|
+
return method.apply(target, args);
|
|
274
|
+
} catch (error) {
|
|
275
|
+
onError(error);
|
|
276
|
+
} finally {
|
|
277
|
+
if (!didFinally) {
|
|
278
|
+
didFinally = true;
|
|
279
|
+
this.end();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
} else {
|
|
283
|
+
try {
|
|
284
|
+
return method.apply(target, args);
|
|
285
|
+
} finally {
|
|
286
|
+
if (!didFinally) {
|
|
287
|
+
didFinally = true;
|
|
288
|
+
this.end();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
269
291
|
}
|
|
292
|
+
},
|
|
270
293
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
errorRecordedForStack = queueItems[i + 3]; // Debugging assistance
|
|
294
|
+
join: function () /* target, method, args */{
|
|
295
|
+
if (this.currentInstance) {
|
|
296
|
+
var length = arguments.length;
|
|
297
|
+
var method, target;
|
|
276
298
|
|
|
277
|
-
if (
|
|
299
|
+
if (length === 1) {
|
|
300
|
+
method = arguments[0];
|
|
301
|
+
target = null;
|
|
302
|
+
} else {
|
|
303
|
+
target = arguments[0];
|
|
304
|
+
method = arguments[1];
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (_backburnerUtils.isString(method)) {
|
|
278
308
|
method = target[method];
|
|
279
309
|
}
|
|
280
310
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
// Once that is in place, when you are at a breakpoint and navigate
|
|
292
|
-
// here in the stack explorer, you can look at `errorRecordedForStack.stack`,
|
|
293
|
-
// which will be the captured stack when this job was scheduled.
|
|
294
|
-
//
|
|
295
|
-
invoke(target, method, args, onError, errorRecordedForStack);
|
|
311
|
+
if (length === 1) {
|
|
312
|
+
return method();
|
|
313
|
+
} else if (length === 2) {
|
|
314
|
+
return method.call(target);
|
|
315
|
+
} else {
|
|
316
|
+
var args = new Array(length - 2);
|
|
317
|
+
for (var i = 0, l = length - 2; i < l; i++) {
|
|
318
|
+
args[i] = arguments[i + 2];
|
|
319
|
+
}
|
|
320
|
+
return method.apply(target, args);
|
|
296
321
|
}
|
|
322
|
+
} else {
|
|
323
|
+
return this.run.apply(this, arguments);
|
|
297
324
|
}
|
|
325
|
+
},
|
|
298
326
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
327
|
+
defer: function (queueName /* , target, method, args */) {
|
|
328
|
+
var length = arguments.length;
|
|
329
|
+
var method, target, args;
|
|
302
330
|
|
|
303
|
-
|
|
331
|
+
if (length === 2) {
|
|
332
|
+
method = arguments[1];
|
|
333
|
+
target = null;
|
|
334
|
+
} else {
|
|
335
|
+
target = arguments[1];
|
|
336
|
+
method = arguments[2];
|
|
337
|
+
}
|
|
304
338
|
|
|
305
|
-
if (
|
|
306
|
-
|
|
307
|
-
this.flush(true);
|
|
339
|
+
if (_backburnerUtils.isString(method)) {
|
|
340
|
+
method = target[method];
|
|
308
341
|
}
|
|
309
|
-
},
|
|
310
342
|
|
|
311
|
-
|
|
312
|
-
var queue = this._queue,
|
|
313
|
-
currentTarget,
|
|
314
|
-
currentMethod,
|
|
315
|
-
i,
|
|
316
|
-
l;
|
|
317
|
-
var target = actionToCancel.target;
|
|
318
|
-
var method = actionToCancel.method;
|
|
319
|
-
var GUID_KEY = this.globalOptions.GUID_KEY;
|
|
343
|
+
var stack = this.DEBUG ? new Error() : undefined;
|
|
320
344
|
|
|
321
|
-
if (
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
for (i = 0, l = targetQueue.length; i < l; i++) {
|
|
326
|
-
if (targetQueue[i] === method) {
|
|
327
|
-
targetQueue.splice(i, 1);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
345
|
+
if (length > 3) {
|
|
346
|
+
args = new Array(length - 3);
|
|
347
|
+
for (var i = 3; i < length; i++) {
|
|
348
|
+
args[i - 3] = arguments[i];
|
|
330
349
|
}
|
|
350
|
+
} else {
|
|
351
|
+
args = undefined;
|
|
331
352
|
}
|
|
332
353
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
currentMethod = queue[i + 1];
|
|
336
|
-
|
|
337
|
-
if (currentTarget === target && currentMethod === method) {
|
|
338
|
-
queue.splice(i, 4);
|
|
339
|
-
return true;
|
|
340
|
-
}
|
|
354
|
+
if (!this.currentInstance) {
|
|
355
|
+
createAutorun(this);
|
|
341
356
|
}
|
|
357
|
+
return this.currentInstance.schedule(queueName, target, method, args, false, stack);
|
|
358
|
+
},
|
|
342
359
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
360
|
+
deferOnce: function (queueName /* , target, method, args */) {
|
|
361
|
+
var length = arguments.length;
|
|
362
|
+
var method, target, args;
|
|
346
363
|
|
|
347
|
-
if (
|
|
348
|
-
|
|
364
|
+
if (length === 2) {
|
|
365
|
+
method = arguments[1];
|
|
366
|
+
target = null;
|
|
367
|
+
} else {
|
|
368
|
+
target = arguments[1];
|
|
369
|
+
method = arguments[2];
|
|
349
370
|
}
|
|
350
371
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
372
|
+
if (_backburnerUtils.isString(method)) {
|
|
373
|
+
method = target[method];
|
|
374
|
+
}
|
|
354
375
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
376
|
+
var stack = this.DEBUG ? new Error() : undefined;
|
|
377
|
+
|
|
378
|
+
if (length > 3) {
|
|
379
|
+
args = new Array(length - 3);
|
|
380
|
+
for (var i = 3; i < length; i++) {
|
|
381
|
+
args[i - 3] = arguments[i];
|
|
360
382
|
}
|
|
383
|
+
} else {
|
|
384
|
+
args = undefined;
|
|
361
385
|
}
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
});
|
|
365
|
-
enifed('backburner/utils', ['exports'], function (exports) {
|
|
366
|
-
'use strict';
|
|
367
386
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
exports.wrapInTryCatch = wrapInTryCatch;
|
|
374
|
-
var NUMBER = /\d+/;
|
|
387
|
+
if (!this.currentInstance) {
|
|
388
|
+
createAutorun(this);
|
|
389
|
+
}
|
|
390
|
+
return this.currentInstance.schedule(queueName, target, method, args, true, stack);
|
|
391
|
+
},
|
|
375
392
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
}
|
|
393
|
+
setTimeout: function () {
|
|
394
|
+
var l = arguments.length;
|
|
395
|
+
var args = new Array(l);
|
|
381
396
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
return new Date().getTime();
|
|
386
|
-
};
|
|
397
|
+
for (var x = 0; x < l; x++) {
|
|
398
|
+
args[x] = arguments[x];
|
|
399
|
+
}
|
|
387
400
|
|
|
388
|
-
|
|
401
|
+
var length = args.length,
|
|
402
|
+
method,
|
|
403
|
+
wait,
|
|
404
|
+
target,
|
|
405
|
+
methodOrTarget,
|
|
406
|
+
methodOrWait,
|
|
407
|
+
methodOrArgs;
|
|
389
408
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
409
|
+
if (length === 0) {
|
|
410
|
+
return;
|
|
411
|
+
} else if (length === 1) {
|
|
412
|
+
method = args.shift();
|
|
413
|
+
wait = 0;
|
|
414
|
+
} else if (length === 2) {
|
|
415
|
+
methodOrTarget = args[0];
|
|
416
|
+
methodOrWait = args[1];
|
|
393
417
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
418
|
+
if (_backburnerUtils.isFunction(methodOrWait) || _backburnerUtils.isFunction(methodOrTarget[methodOrWait])) {
|
|
419
|
+
target = args.shift();
|
|
420
|
+
method = args.shift();
|
|
421
|
+
wait = 0;
|
|
422
|
+
} else if (_backburnerUtils.isCoercableNumber(methodOrWait)) {
|
|
423
|
+
method = args.shift();
|
|
424
|
+
wait = args.shift();
|
|
425
|
+
} else {
|
|
426
|
+
method = args.shift();
|
|
427
|
+
wait = 0;
|
|
428
|
+
}
|
|
429
|
+
} else {
|
|
430
|
+
var last = args[args.length - 1];
|
|
397
431
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
432
|
+
if (_backburnerUtils.isCoercableNumber(last)) {
|
|
433
|
+
wait = args.pop();
|
|
434
|
+
} else {
|
|
435
|
+
wait = 0;
|
|
436
|
+
}
|
|
401
437
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
438
|
+
methodOrTarget = args[0];
|
|
439
|
+
methodOrArgs = args[1];
|
|
405
440
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
441
|
+
if (_backburnerUtils.isFunction(methodOrArgs) || _backburnerUtils.isString(methodOrArgs) && methodOrTarget !== null && methodOrArgs in methodOrTarget) {
|
|
442
|
+
target = args.shift();
|
|
443
|
+
method = args.shift();
|
|
444
|
+
} else {
|
|
445
|
+
method = args.shift();
|
|
446
|
+
}
|
|
412
447
|
}
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
enifed('backburner', ['exports', './backburner/utils', './backburner/platform', './backburner/binary-search', './backburner/deferred-action-queues'], function (exports, _backburnerUtils, _backburnerPlatform, _backburnerBinarySearch, _backburnerDeferredActionQueues) {
|
|
417
|
-
'use strict';
|
|
418
|
-
|
|
419
|
-
exports.default = Backburner;
|
|
420
|
-
|
|
421
|
-
function Backburner(queueNames, options) {
|
|
422
|
-
this.queueNames = queueNames;
|
|
423
|
-
this.options = options || {};
|
|
424
|
-
if (!this.options.defaultQueue) {
|
|
425
|
-
this.options.defaultQueue = queueNames[0];
|
|
426
|
-
}
|
|
427
|
-
this.instanceStack = [];
|
|
428
|
-
this._debouncees = [];
|
|
429
|
-
this._throttlers = [];
|
|
430
|
-
this._timers = [];
|
|
431
|
-
this._eventCallbacks = {
|
|
432
|
-
end: [],
|
|
433
|
-
begin: []
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
448
|
|
|
437
|
-
|
|
438
|
-
begin: function () {
|
|
439
|
-
var options = this.options;
|
|
440
|
-
var onBegin = options && options.onBegin;
|
|
441
|
-
var previousInstance = this.currentInstance;
|
|
449
|
+
var executeAt = _backburnerUtils.now() + parseInt(wait, 10);
|
|
442
450
|
|
|
443
|
-
if (
|
|
444
|
-
|
|
451
|
+
if (_backburnerUtils.isString(method)) {
|
|
452
|
+
method = target[method];
|
|
445
453
|
}
|
|
446
454
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
455
|
+
var onError = getOnError(this.options);
|
|
456
|
+
|
|
457
|
+
function fn() {
|
|
458
|
+
if (onError) {
|
|
459
|
+
try {
|
|
460
|
+
method.apply(target, args);
|
|
461
|
+
} catch (e) {
|
|
462
|
+
onError(e);
|
|
463
|
+
}
|
|
464
|
+
} else {
|
|
465
|
+
method.apply(target, args);
|
|
466
|
+
}
|
|
451
467
|
}
|
|
452
|
-
},
|
|
453
468
|
|
|
454
|
-
|
|
455
|
-
var
|
|
456
|
-
var onEnd = options && options.onEnd;
|
|
457
|
-
var currentInstance = this.currentInstance;
|
|
458
|
-
var nextInstance = null;
|
|
469
|
+
// find position to insert
|
|
470
|
+
var i = _backburnerBinarySearch.default(executeAt, this._timers);
|
|
459
471
|
|
|
460
|
-
|
|
461
|
-
// This bug appears to be resolved in Safari 6.0.5 and iOS 7
|
|
462
|
-
var finallyAlreadyCalled = false;
|
|
463
|
-
try {
|
|
464
|
-
currentInstance.flush();
|
|
465
|
-
} finally {
|
|
466
|
-
if (!finallyAlreadyCalled) {
|
|
467
|
-
finallyAlreadyCalled = true;
|
|
472
|
+
this._timers.splice(i, 0, executeAt, fn);
|
|
468
473
|
|
|
469
|
-
|
|
474
|
+
updateLaterTimer(this, executeAt, wait);
|
|
470
475
|
|
|
471
|
-
|
|
472
|
-
nextInstance = this.instanceStack.pop();
|
|
473
|
-
this.currentInstance = nextInstance;
|
|
474
|
-
}
|
|
475
|
-
this._trigger('end', currentInstance, nextInstance);
|
|
476
|
-
if (onEnd) {
|
|
477
|
-
onEnd(currentInstance, nextInstance);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
476
|
+
return fn;
|
|
481
477
|
},
|
|
482
478
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
@private
|
|
489
|
-
@method _trigger
|
|
490
|
-
@param {String} eventName
|
|
491
|
-
@param {any} arg1
|
|
492
|
-
@param {any} arg2
|
|
493
|
-
*/
|
|
494
|
-
_trigger: function (eventName, arg1, arg2) {
|
|
495
|
-
var callbacks = this._eventCallbacks[eventName];
|
|
496
|
-
if (callbacks) {
|
|
497
|
-
for (var i = 0; i < callbacks.length; i++) {
|
|
498
|
-
callbacks[i](arg1, arg2);
|
|
499
|
-
}
|
|
479
|
+
throttle: function (target, method /* , args, wait, [immediate] */) {
|
|
480
|
+
var backburner = this;
|
|
481
|
+
var args = new Array(arguments.length);
|
|
482
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
483
|
+
args[i] = arguments[i];
|
|
500
484
|
}
|
|
501
|
-
|
|
485
|
+
var immediate = args.pop();
|
|
486
|
+
var wait, throttler, index, timer;
|
|
502
487
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
var callbacks = this._eventCallbacks[eventName];
|
|
508
|
-
if (callbacks) {
|
|
509
|
-
callbacks.push(callback);
|
|
488
|
+
if (_backburnerUtils.isNumber(immediate) || _backburnerUtils.isString(immediate)) {
|
|
489
|
+
wait = immediate;
|
|
490
|
+
immediate = true;
|
|
510
491
|
} else {
|
|
511
|
-
|
|
492
|
+
wait = args.pop();
|
|
512
493
|
}
|
|
513
|
-
},
|
|
514
494
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
i--;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
495
|
+
wait = parseInt(wait, 10);
|
|
496
|
+
|
|
497
|
+
index = findThrottler(target, method, this._throttlers);
|
|
498
|
+
if (index > -1) {
|
|
499
|
+
return this._throttlers[index];
|
|
500
|
+
} // throttled
|
|
501
|
+
|
|
502
|
+
timer = _backburnerPlatform.default.setTimeout(function () {
|
|
503
|
+
if (!immediate) {
|
|
504
|
+
backburner.run.apply(backburner, args);
|
|
528
505
|
}
|
|
529
|
-
|
|
530
|
-
|
|
506
|
+
var index = findThrottler(target, method, backburner._throttlers);
|
|
507
|
+
if (index > -1) {
|
|
508
|
+
backburner._throttlers.splice(index, 1);
|
|
531
509
|
}
|
|
532
|
-
}
|
|
533
|
-
|
|
510
|
+
}, wait);
|
|
511
|
+
|
|
512
|
+
if (immediate) {
|
|
513
|
+
this.run.apply(this, args);
|
|
534
514
|
}
|
|
515
|
+
|
|
516
|
+
throttler = [target, method, timer];
|
|
517
|
+
|
|
518
|
+
this._throttlers.push(throttler);
|
|
519
|
+
|
|
520
|
+
return throttler;
|
|
535
521
|
},
|
|
536
522
|
|
|
537
|
-
|
|
538
|
-
var
|
|
539
|
-
var
|
|
523
|
+
debounce: function (target, method /* , args, wait, [immediate] */) {
|
|
524
|
+
var backburner = this;
|
|
525
|
+
var args = new Array(arguments.length);
|
|
526
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
527
|
+
args[i] = arguments[i];
|
|
528
|
+
}
|
|
540
529
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
530
|
+
var immediate = args.pop();
|
|
531
|
+
var wait, index, debouncee, timer;
|
|
532
|
+
|
|
533
|
+
if (_backburnerUtils.isNumber(immediate) || _backburnerUtils.isString(immediate)) {
|
|
534
|
+
wait = immediate;
|
|
535
|
+
immediate = false;
|
|
544
536
|
} else {
|
|
545
|
-
|
|
546
|
-
method = arguments[1];
|
|
537
|
+
wait = args.pop();
|
|
547
538
|
}
|
|
548
539
|
|
|
549
|
-
|
|
550
|
-
|
|
540
|
+
wait = parseInt(wait, 10);
|
|
541
|
+
// Remove debouncee
|
|
542
|
+
index = findDebouncee(target, method, this._debouncees);
|
|
543
|
+
|
|
544
|
+
if (index > -1) {
|
|
545
|
+
debouncee = this._debouncees[index];
|
|
546
|
+
this._debouncees.splice(index, 1);
|
|
547
|
+
clearTimeout(debouncee[2]);
|
|
551
548
|
}
|
|
552
549
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
args[i] = arguments[i + 2];
|
|
550
|
+
timer = _backburnerPlatform.default.setTimeout(function () {
|
|
551
|
+
if (!immediate) {
|
|
552
|
+
backburner.run.apply(backburner, args);
|
|
557
553
|
}
|
|
558
|
-
|
|
559
|
-
|
|
554
|
+
var index = findDebouncee(target, method, backburner._debouncees);
|
|
555
|
+
if (index > -1) {
|
|
556
|
+
backburner._debouncees.splice(index, 1);
|
|
557
|
+
}
|
|
558
|
+
}, wait);
|
|
559
|
+
|
|
560
|
+
if (immediate && index === -1) {
|
|
561
|
+
backburner.run.apply(backburner, args);
|
|
560
562
|
}
|
|
561
563
|
|
|
562
|
-
|
|
564
|
+
debouncee = [target, method, timer];
|
|
563
565
|
|
|
564
|
-
|
|
566
|
+
backburner._debouncees.push(debouncee);
|
|
565
567
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
+
return debouncee;
|
|
569
|
+
},
|
|
568
570
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
571
|
+
cancelTimers: function () {
|
|
572
|
+
var clearItems = function (item) {
|
|
573
|
+
clearTimeout(item[2]);
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
_backburnerUtils.each(this._throttlers, clearItems);
|
|
577
|
+
this._throttlers = [];
|
|
578
|
+
|
|
579
|
+
_backburnerUtils.each(this._debouncees, clearItems);
|
|
580
|
+
this._debouncees = [];
|
|
581
|
+
|
|
582
|
+
if (this._laterTimer) {
|
|
583
|
+
clearTimeout(this._laterTimer);
|
|
584
|
+
this._laterTimer = null;
|
|
585
|
+
}
|
|
586
|
+
this._timers = [];
|
|
587
|
+
|
|
588
|
+
if (this._autorun) {
|
|
589
|
+
clearTimeout(this._autorun);
|
|
590
|
+
this._autorun = null;
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
|
|
594
|
+
hasTimers: function () {
|
|
595
|
+
return !!this._timers.length || !!this._debouncees.length || !!this._throttlers.length || this._autorun;
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
cancel: function (timer) {
|
|
599
|
+
var timerType = typeof timer;
|
|
600
|
+
|
|
601
|
+
if (timer && timerType === 'object' && timer.queue && timer.method) {
|
|
602
|
+
// we're cancelling a deferOnce
|
|
603
|
+
return timer.queue.cancel(timer);
|
|
604
|
+
} else if (timerType === 'function') {
|
|
605
|
+
// we're cancelling a setTimeout
|
|
606
|
+
for (var i = 0, l = this._timers.length; i < l; i += 2) {
|
|
607
|
+
if (this._timers[i + 1] === timer) {
|
|
608
|
+
this._timers.splice(i, 2); // remove the two elements
|
|
609
|
+
if (i === 0) {
|
|
610
|
+
if (this._laterTimer) {
|
|
611
|
+
// Active timer? Then clear timer and reset for future timer
|
|
612
|
+
clearTimeout(this._laterTimer);
|
|
613
|
+
this._laterTimer = null;
|
|
614
|
+
}
|
|
615
|
+
if (this._timers.length > 0) {
|
|
616
|
+
// Update to next available timer when available
|
|
617
|
+
updateLaterTimer(this, this._timers[0], this._timers[0] - _backburnerUtils.now());
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return true;
|
|
587
621
|
}
|
|
588
622
|
}
|
|
623
|
+
} else if (Object.prototype.toString.call(timer) === '[object Array]') {
|
|
624
|
+
// we're cancelling a throttle or debounce
|
|
625
|
+
return this._cancelItem(findThrottler, this._throttlers, timer) || this._cancelItem(findDebouncee, this._debouncees, timer);
|
|
626
|
+
} else {
|
|
627
|
+
return; // timer was null or not a timer
|
|
589
628
|
}
|
|
590
629
|
},
|
|
591
630
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
var length = arguments.length;
|
|
595
|
-
var method, target;
|
|
631
|
+
_cancelItem: function (findMethod, array, timer) {
|
|
632
|
+
var item, index;
|
|
596
633
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
} else {
|
|
601
|
-
target = arguments[0];
|
|
602
|
-
method = arguments[1];
|
|
603
|
-
}
|
|
634
|
+
if (timer.length < 3) {
|
|
635
|
+
return false;
|
|
636
|
+
}
|
|
604
637
|
|
|
605
|
-
|
|
606
|
-
method = target[method];
|
|
607
|
-
}
|
|
638
|
+
index = findMethod(timer[0], timer[1], array);
|
|
608
639
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
return method.apply(target, args);
|
|
640
|
+
if (index > -1) {
|
|
641
|
+
|
|
642
|
+
item = array[index];
|
|
643
|
+
|
|
644
|
+
if (item[2] === timer[2]) {
|
|
645
|
+
array.splice(index, 1);
|
|
646
|
+
clearTimeout(timer[2]);
|
|
647
|
+
return true;
|
|
619
648
|
}
|
|
620
|
-
} else {
|
|
621
|
-
return this.run.apply(this, arguments);
|
|
622
649
|
}
|
|
623
|
-
},
|
|
624
650
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
651
|
+
return false;
|
|
652
|
+
}
|
|
653
|
+
};
|
|
628
654
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
} else {
|
|
633
|
-
target = arguments[1];
|
|
634
|
-
method = arguments[2];
|
|
635
|
-
}
|
|
655
|
+
Backburner.prototype.schedule = Backburner.prototype.defer;
|
|
656
|
+
Backburner.prototype.scheduleOnce = Backburner.prototype.deferOnce;
|
|
657
|
+
Backburner.prototype.later = Backburner.prototype.setTimeout;
|
|
636
658
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
659
|
+
if (_backburnerPlatform.needsIETryCatchFix) {
|
|
660
|
+
var originalRun = Backburner.prototype.run;
|
|
661
|
+
Backburner.prototype.run = _backburnerUtils.wrapInTryCatch(originalRun);
|
|
640
662
|
|
|
641
|
-
|
|
663
|
+
var originalEnd = Backburner.prototype.end;
|
|
664
|
+
Backburner.prototype.end = _backburnerUtils.wrapInTryCatch(originalEnd);
|
|
665
|
+
}
|
|
642
666
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
667
|
+
function getOnError(options) {
|
|
668
|
+
return options.onError || options.onErrorTarget && options.onErrorTarget[options.onErrorMethod];
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function createAutorun(backburner) {
|
|
672
|
+
backburner.begin();
|
|
673
|
+
backburner._autorun = _backburnerPlatform.default.setTimeout(function () {
|
|
674
|
+
backburner._autorun = null;
|
|
675
|
+
backburner.end();
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
function updateLaterTimer(backburner, executeAt, wait) {
|
|
680
|
+
var n = _backburnerUtils.now();
|
|
681
|
+
if (!backburner._laterTimer || executeAt < backburner._laterTimerExpiresAt || backburner._laterTimerExpiresAt < n) {
|
|
682
|
+
|
|
683
|
+
if (backburner._laterTimer) {
|
|
684
|
+
// Clear when:
|
|
685
|
+
// - Already expired
|
|
686
|
+
// - New timer is earlier
|
|
687
|
+
clearTimeout(backburner._laterTimer);
|
|
688
|
+
|
|
689
|
+
if (backburner._laterTimerExpiresAt < n) {
|
|
690
|
+
// If timer was never triggered
|
|
691
|
+
// Calculate the left-over wait-time
|
|
692
|
+
wait = Math.max(0, executeAt - n);
|
|
647
693
|
}
|
|
648
|
-
} else {
|
|
649
|
-
args = undefined;
|
|
650
694
|
}
|
|
651
695
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
696
|
+
backburner._laterTimer = _backburnerPlatform.default.setTimeout(function () {
|
|
697
|
+
backburner._laterTimer = null;
|
|
698
|
+
backburner._laterTimerExpiresAt = null;
|
|
699
|
+
executeTimers(backburner);
|
|
700
|
+
}, wait);
|
|
657
701
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
702
|
+
backburner._laterTimerExpiresAt = n + wait;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
661
705
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
} else {
|
|
666
|
-
target = arguments[1];
|
|
667
|
-
method = arguments[2];
|
|
668
|
-
}
|
|
706
|
+
function executeTimers(backburner) {
|
|
707
|
+
var n = _backburnerUtils.now();
|
|
708
|
+
var fns, i, l;
|
|
669
709
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
}
|
|
710
|
+
backburner.run(function () {
|
|
711
|
+
i = _backburnerBinarySearch.default(n, backburner._timers);
|
|
673
712
|
|
|
674
|
-
|
|
713
|
+
fns = backburner._timers.splice(0, i);
|
|
675
714
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
for (var i = 3; i < length; i++) {
|
|
679
|
-
args[i - 3] = arguments[i];
|
|
680
|
-
}
|
|
681
|
-
} else {
|
|
682
|
-
args = undefined;
|
|
715
|
+
for (i = 1, l = fns.length; i < l; i += 2) {
|
|
716
|
+
backburner.schedule(backburner.options.defaultQueue, null, fns[i]);
|
|
683
717
|
}
|
|
718
|
+
});
|
|
684
719
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
},
|
|
720
|
+
if (backburner._timers.length) {
|
|
721
|
+
updateLaterTimer(backburner, backburner._timers[0], backburner._timers[0] - n);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
690
724
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
725
|
+
function findDebouncee(target, method, debouncees) {
|
|
726
|
+
return findItem(target, method, debouncees);
|
|
727
|
+
}
|
|
694
728
|
|
|
695
|
-
|
|
696
|
-
|
|
729
|
+
function findThrottler(target, method, throttlers) {
|
|
730
|
+
return findItem(target, method, throttlers);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function findItem(target, method, collection) {
|
|
734
|
+
var item;
|
|
735
|
+
var index = -1;
|
|
736
|
+
|
|
737
|
+
for (var i = 0, l = collection.length; i < l; i++) {
|
|
738
|
+
item = collection[i];
|
|
739
|
+
if (item[0] === target && item[1] === method) {
|
|
740
|
+
index = i;
|
|
741
|
+
break;
|
|
697
742
|
}
|
|
743
|
+
}
|
|
698
744
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
methodOrWait,
|
|
705
|
-
methodOrArgs;
|
|
745
|
+
return index;
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
enifed("backburner/binary-search", ["exports"], function (exports) {
|
|
749
|
+
"use strict";
|
|
706
750
|
|
|
707
|
-
|
|
708
|
-
return;
|
|
709
|
-
} else if (length === 1) {
|
|
710
|
-
method = args.shift();
|
|
711
|
-
wait = 0;
|
|
712
|
-
} else if (length === 2) {
|
|
713
|
-
methodOrTarget = args[0];
|
|
714
|
-
methodOrWait = args[1];
|
|
751
|
+
exports.default = binarySearch;
|
|
715
752
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
753
|
+
function binarySearch(time, timers) {
|
|
754
|
+
var start = 0;
|
|
755
|
+
var end = timers.length - 2;
|
|
756
|
+
var middle, l;
|
|
757
|
+
|
|
758
|
+
while (start < end) {
|
|
759
|
+
// since timers is an array of pairs 'l' will always
|
|
760
|
+
// be an integer
|
|
761
|
+
l = (end - start) / 2;
|
|
762
|
+
|
|
763
|
+
// compensate for the index in case even number
|
|
764
|
+
// of pairs inside timers
|
|
765
|
+
middle = start + l - l % 2;
|
|
766
|
+
|
|
767
|
+
if (time >= timers[middle]) {
|
|
768
|
+
start = middle + 2;
|
|
727
769
|
} else {
|
|
728
|
-
|
|
770
|
+
end = middle;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
729
773
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
774
|
+
return time >= timers[start] ? start + 2 : start;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], function (exports, _utils, _queue) {
|
|
778
|
+
'use strict';
|
|
735
779
|
|
|
736
|
-
|
|
737
|
-
|
|
780
|
+
exports.default = DeferredActionQueues;
|
|
781
|
+
|
|
782
|
+
function DeferredActionQueues(queueNames, options) {
|
|
783
|
+
var queues = this.queues = {};
|
|
784
|
+
this.queueNames = queueNames = queueNames || [];
|
|
785
|
+
|
|
786
|
+
this.options = options;
|
|
787
|
+
|
|
788
|
+
_utils.each(queueNames, function (queueName) {
|
|
789
|
+
queues[queueName] = new _queue.default(queueName, options[queueName], options);
|
|
790
|
+
});
|
|
791
|
+
}
|
|
738
792
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
} else {
|
|
743
|
-
method = args.shift();
|
|
744
|
-
}
|
|
745
|
-
}
|
|
793
|
+
function noSuchQueue(name) {
|
|
794
|
+
throw new Error('You attempted to schedule an action in a queue (' + name + ') that doesn\'t exist');
|
|
795
|
+
}
|
|
746
796
|
|
|
747
|
-
|
|
797
|
+
function noSuchMethod(name) {
|
|
798
|
+
throw new Error('You attempted to schedule an action in a queue (' + name + ') for a method that doesn\'t exist');
|
|
799
|
+
}
|
|
748
800
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
801
|
+
DeferredActionQueues.prototype = {
|
|
802
|
+
schedule: function (name, target, method, args, onceFlag, stack) {
|
|
803
|
+
var queues = this.queues;
|
|
804
|
+
var queue = queues[name];
|
|
752
805
|
|
|
753
|
-
|
|
806
|
+
if (!queue) {
|
|
807
|
+
noSuchQueue(name);
|
|
808
|
+
}
|
|
754
809
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
try {
|
|
758
|
-
method.apply(target, args);
|
|
759
|
-
} catch (e) {
|
|
760
|
-
onError(e);
|
|
761
|
-
}
|
|
762
|
-
} else {
|
|
763
|
-
method.apply(target, args);
|
|
764
|
-
}
|
|
810
|
+
if (!method) {
|
|
811
|
+
noSuchMethod(name);
|
|
765
812
|
}
|
|
766
813
|
|
|
767
|
-
|
|
768
|
-
|
|
814
|
+
if (onceFlag) {
|
|
815
|
+
return queue.pushUnique(target, method, args, stack);
|
|
816
|
+
} else {
|
|
817
|
+
return queue.push(target, method, args, stack);
|
|
818
|
+
}
|
|
819
|
+
},
|
|
769
820
|
|
|
770
|
-
|
|
821
|
+
flush: function () {
|
|
822
|
+
var queues = this.queues;
|
|
823
|
+
var queueNames = this.queueNames;
|
|
824
|
+
var queueName, queue, queueItems, priorQueueNameIndex;
|
|
825
|
+
var queueNameIndex = 0;
|
|
826
|
+
var numberOfQueues = queueNames.length;
|
|
827
|
+
var options = this.options;
|
|
771
828
|
|
|
772
|
-
|
|
829
|
+
while (queueNameIndex < numberOfQueues) {
|
|
830
|
+
queueName = queueNames[queueNameIndex];
|
|
831
|
+
queue = queues[queueName];
|
|
773
832
|
|
|
774
|
-
|
|
775
|
-
},
|
|
833
|
+
var numberOfQueueItems = queue._queue.length;
|
|
776
834
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
835
|
+
if (numberOfQueueItems === 0) {
|
|
836
|
+
queueNameIndex++;
|
|
837
|
+
} else {
|
|
838
|
+
queue.flush(false /* async */);
|
|
839
|
+
queueNameIndex = 0;
|
|
840
|
+
}
|
|
782
841
|
}
|
|
783
|
-
|
|
784
|
-
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
});
|
|
845
|
+
enifed('backburner/platform', ['exports'], function (exports) {
|
|
846
|
+
// In IE 6-8, try/finally doesn't work without a catch.
|
|
847
|
+
// Unfortunately, this is impossible to test for since wrapping it in a parent try/catch doesn't trigger the bug.
|
|
848
|
+
// This tests for another broken try/catch behavior that only exhibits in the same versions of IE.
|
|
849
|
+
'use strict';
|
|
785
850
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
851
|
+
var needsIETryCatchFix = (function (e, x) {
|
|
852
|
+
try {
|
|
853
|
+
x();
|
|
854
|
+
} catch (e) {} // jshint ignore:line
|
|
855
|
+
return !!e;
|
|
856
|
+
})();
|
|
792
857
|
|
|
793
|
-
|
|
858
|
+
exports.needsIETryCatchFix = needsIETryCatchFix;
|
|
859
|
+
var platform;
|
|
794
860
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
} // throttled
|
|
861
|
+
/* global self */
|
|
862
|
+
if (typeof self === 'object') {
|
|
863
|
+
platform = self;
|
|
799
864
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
backburner._throttlers.splice(index, 1);
|
|
807
|
-
}
|
|
808
|
-
}, wait);
|
|
865
|
+
/* global global */
|
|
866
|
+
} else if (typeof global === 'object') {
|
|
867
|
+
platform = global;
|
|
868
|
+
} else {
|
|
869
|
+
throw new Error('no global: `self` or `global` found');
|
|
870
|
+
}
|
|
809
871
|
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
872
|
+
exports.default = platform;
|
|
873
|
+
});
|
|
874
|
+
enifed('backburner/queue', ['exports', './utils'], function (exports, _utils) {
|
|
875
|
+
'use strict';
|
|
813
876
|
|
|
814
|
-
|
|
877
|
+
exports.default = Queue;
|
|
815
878
|
|
|
816
|
-
|
|
879
|
+
function Queue(name, options, globalOptions) {
|
|
880
|
+
this.name = name;
|
|
881
|
+
this.globalOptions = globalOptions || {};
|
|
882
|
+
this.options = options;
|
|
883
|
+
this._queue = [];
|
|
884
|
+
this.targetQueues = {};
|
|
885
|
+
this._queueBeingFlushed = undefined;
|
|
886
|
+
}
|
|
817
887
|
|
|
818
|
-
|
|
888
|
+
Queue.prototype = {
|
|
889
|
+
push: function (target, method, args, stack) {
|
|
890
|
+
var queue = this._queue;
|
|
891
|
+
queue.push(target, method, args, stack);
|
|
892
|
+
|
|
893
|
+
return {
|
|
894
|
+
queue: this,
|
|
895
|
+
target: target,
|
|
896
|
+
method: method
|
|
897
|
+
};
|
|
819
898
|
},
|
|
820
899
|
|
|
821
|
-
|
|
822
|
-
var
|
|
823
|
-
var args = new Array(arguments.length);
|
|
824
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
825
|
-
args[i] = arguments[i];
|
|
826
|
-
}
|
|
900
|
+
pushUniqueWithoutGuid: function (target, method, args, stack) {
|
|
901
|
+
var queue = this._queue;
|
|
827
902
|
|
|
828
|
-
var
|
|
829
|
-
|
|
903
|
+
for (var i = 0, l = queue.length; i < l; i += 4) {
|
|
904
|
+
var currentTarget = queue[i];
|
|
905
|
+
var currentMethod = queue[i + 1];
|
|
830
906
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
907
|
+
if (currentTarget === target && currentMethod === method) {
|
|
908
|
+
queue[i + 2] = args; // replace args
|
|
909
|
+
queue[i + 3] = stack; // replace stack
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
836
912
|
}
|
|
837
913
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
index = findDebouncee(target, method, this._debouncees);
|
|
914
|
+
queue.push(target, method, args, stack);
|
|
915
|
+
},
|
|
841
916
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
this._debouncees.splice(index, 1);
|
|
845
|
-
clearTimeout(debouncee[2]);
|
|
846
|
-
}
|
|
917
|
+
targetQueue: function (targetQueue, target, method, args, stack) {
|
|
918
|
+
var queue = this._queue;
|
|
847
919
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
var index = findDebouncee(target, method, backburner._debouncees);
|
|
853
|
-
if (index > -1) {
|
|
854
|
-
backburner._debouncees.splice(index, 1);
|
|
855
|
-
}
|
|
856
|
-
}, wait);
|
|
920
|
+
for (var i = 0, l = targetQueue.length; i < l; i += 2) {
|
|
921
|
+
var currentMethod = targetQueue[i];
|
|
922
|
+
var currentIndex = targetQueue[i + 1];
|
|
857
923
|
|
|
858
|
-
|
|
859
|
-
|
|
924
|
+
if (currentMethod === method) {
|
|
925
|
+
queue[currentIndex + 2] = args; // replace args
|
|
926
|
+
queue[currentIndex + 3] = stack; // replace stack
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
860
929
|
}
|
|
861
930
|
|
|
862
|
-
|
|
931
|
+
targetQueue.push(method, queue.push(target, method, args, stack) - 4);
|
|
932
|
+
},
|
|
863
933
|
|
|
864
|
-
|
|
934
|
+
pushUniqueWithGuid: function (guid, target, method, args, stack) {
|
|
935
|
+
var hasLocalQueue = this.targetQueues[guid];
|
|
865
936
|
|
|
866
|
-
|
|
867
|
-
|
|
937
|
+
if (hasLocalQueue) {
|
|
938
|
+
this.targetQueue(hasLocalQueue, target, method, args, stack);
|
|
939
|
+
} else {
|
|
940
|
+
this.targetQueues[guid] = [method, this._queue.push(target, method, args, stack) - 4];
|
|
941
|
+
}
|
|
868
942
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
943
|
+
return {
|
|
944
|
+
queue: this,
|
|
945
|
+
target: target,
|
|
946
|
+
method: method
|
|
872
947
|
};
|
|
948
|
+
},
|
|
873
949
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
950
|
+
pushUnique: function (target, method, args, stack) {
|
|
951
|
+
var queue = this._queue,
|
|
952
|
+
currentTarget,
|
|
953
|
+
currentMethod,
|
|
954
|
+
i,
|
|
955
|
+
l;
|
|
956
|
+
var KEY = this.globalOptions.GUID_KEY;
|
|
879
957
|
|
|
880
|
-
if (
|
|
881
|
-
|
|
882
|
-
|
|
958
|
+
if (target && KEY) {
|
|
959
|
+
var guid = target[KEY];
|
|
960
|
+
if (guid) {
|
|
961
|
+
return this.pushUniqueWithGuid(guid, target, method, args, stack);
|
|
962
|
+
}
|
|
883
963
|
}
|
|
884
|
-
this._timers = [];
|
|
885
964
|
|
|
886
|
-
|
|
887
|
-
clearTimeout(this._autorun);
|
|
888
|
-
this._autorun = null;
|
|
889
|
-
}
|
|
890
|
-
},
|
|
965
|
+
this.pushUniqueWithoutGuid(target, method, args, stack);
|
|
891
966
|
|
|
892
|
-
|
|
893
|
-
|
|
967
|
+
return {
|
|
968
|
+
queue: this,
|
|
969
|
+
target: target,
|
|
970
|
+
method: method
|
|
971
|
+
};
|
|
894
972
|
},
|
|
895
973
|
|
|
896
|
-
|
|
897
|
-
|
|
974
|
+
invoke: function (target, method, args, _, _errorRecordedForStack) {
|
|
975
|
+
if (args && args.length > 0) {
|
|
976
|
+
method.apply(target, args);
|
|
977
|
+
} else {
|
|
978
|
+
method.call(target);
|
|
979
|
+
}
|
|
980
|
+
},
|
|
898
981
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
if (this._timers[i + 1] === timer) {
|
|
906
|
-
this._timers.splice(i, 2); // remove the two elements
|
|
907
|
-
if (i === 0) {
|
|
908
|
-
if (this._laterTimer) {
|
|
909
|
-
// Active timer? Then clear timer and reset for future timer
|
|
910
|
-
clearTimeout(this._laterTimer);
|
|
911
|
-
this._laterTimer = null;
|
|
912
|
-
}
|
|
913
|
-
if (this._timers.length > 0) {
|
|
914
|
-
// Update to next available timer when available
|
|
915
|
-
updateLaterTimer(this, this._timers[0], this._timers[0] - _backburnerUtils.now());
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
return true;
|
|
919
|
-
}
|
|
982
|
+
invokeWithOnError: function (target, method, args, onError, errorRecordedForStack) {
|
|
983
|
+
try {
|
|
984
|
+
if (args && args.length > 0) {
|
|
985
|
+
method.apply(target, args);
|
|
986
|
+
} else {
|
|
987
|
+
method.call(target);
|
|
920
988
|
}
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
return this._cancelItem(findThrottler, this._throttlers, timer) || this._cancelItem(findDebouncee, this._debouncees, timer);
|
|
924
|
-
} else {
|
|
925
|
-
return; // timer was null or not a timer
|
|
989
|
+
} catch (error) {
|
|
990
|
+
onError(error, errorRecordedForStack);
|
|
926
991
|
}
|
|
927
992
|
},
|
|
928
993
|
|
|
929
|
-
|
|
930
|
-
var
|
|
994
|
+
flush: function (sync) {
|
|
995
|
+
var queue = this._queue;
|
|
996
|
+
var length = queue.length;
|
|
931
997
|
|
|
932
|
-
if (
|
|
933
|
-
return
|
|
998
|
+
if (length === 0) {
|
|
999
|
+
return;
|
|
934
1000
|
}
|
|
935
1001
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1002
|
+
var globalOptions = this.globalOptions;
|
|
1003
|
+
var options = this.options;
|
|
1004
|
+
var before = options && options.before;
|
|
1005
|
+
var after = options && options.after;
|
|
1006
|
+
var onError = globalOptions.onError || globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod];
|
|
1007
|
+
var target, method, args, errorRecordedForStack;
|
|
1008
|
+
var invoke = onError ? this.invokeWithOnError : this.invoke;
|
|
939
1009
|
|
|
940
|
-
|
|
1010
|
+
this.targetQueues = Object.create(null);
|
|
1011
|
+
var queueItems = this._queueBeingFlushed = this._queue.slice();
|
|
1012
|
+
this._queue = [];
|
|
941
1013
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
clearTimeout(timer[2]);
|
|
945
|
-
return true;
|
|
946
|
-
}
|
|
1014
|
+
if (before) {
|
|
1015
|
+
before();
|
|
947
1016
|
}
|
|
948
1017
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1018
|
+
for (var i = 0; i < length; i += 4) {
|
|
1019
|
+
target = queueItems[i];
|
|
1020
|
+
method = queueItems[i + 1];
|
|
1021
|
+
args = queueItems[i + 2];
|
|
1022
|
+
errorRecordedForStack = queueItems[i + 3]; // Debugging assistance
|
|
952
1023
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1024
|
+
if (_utils.isString(method)) {
|
|
1025
|
+
method = target[method];
|
|
1026
|
+
}
|
|
956
1027
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1028
|
+
// method could have been nullified / canceled during flush
|
|
1029
|
+
if (method) {
|
|
1030
|
+
//
|
|
1031
|
+
// ** Attention intrepid developer **
|
|
1032
|
+
//
|
|
1033
|
+
// To find out the stack of this task when it was scheduled onto
|
|
1034
|
+
// the run loop, add the following to your app.js:
|
|
1035
|
+
//
|
|
1036
|
+
// Ember.run.backburner.DEBUG = true; // NOTE: This slows your app, don't leave it on in production.
|
|
1037
|
+
//
|
|
1038
|
+
// Once that is in place, when you are at a breakpoint and navigate
|
|
1039
|
+
// here in the stack explorer, you can look at `errorRecordedForStack.stack`,
|
|
1040
|
+
// which will be the captured stack when this job was scheduled.
|
|
1041
|
+
//
|
|
1042
|
+
invoke(target, method, args, onError, errorRecordedForStack);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
960
1045
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1046
|
+
if (after) {
|
|
1047
|
+
after();
|
|
1048
|
+
}
|
|
964
1049
|
|
|
965
|
-
|
|
966
|
-
return options.onError || options.onErrorTarget && options.onErrorTarget[options.onErrorMethod];
|
|
967
|
-
}
|
|
1050
|
+
this._queueBeingFlushed = undefined;
|
|
968
1051
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
});
|
|
975
|
-
}
|
|
1052
|
+
if (sync !== false && this._queue.length > 0) {
|
|
1053
|
+
// check if new items have been added
|
|
1054
|
+
this.flush(true);
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
976
1057
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1058
|
+
cancel: function (actionToCancel) {
|
|
1059
|
+
var queue = this._queue,
|
|
1060
|
+
currentTarget,
|
|
1061
|
+
currentMethod,
|
|
1062
|
+
i,
|
|
1063
|
+
l;
|
|
1064
|
+
var target = actionToCancel.target;
|
|
1065
|
+
var method = actionToCancel.method;
|
|
1066
|
+
var GUID_KEY = this.globalOptions.GUID_KEY;
|
|
980
1067
|
|
|
981
|
-
if (
|
|
982
|
-
|
|
983
|
-
// - Already expired
|
|
984
|
-
// - New timer is earlier
|
|
985
|
-
clearTimeout(backburner._laterTimer);
|
|
1068
|
+
if (GUID_KEY && this.targetQueues && target) {
|
|
1069
|
+
var targetQueue = this.targetQueues[target[GUID_KEY]];
|
|
986
1070
|
|
|
987
|
-
if (
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1071
|
+
if (targetQueue) {
|
|
1072
|
+
for (i = 0, l = targetQueue.length; i < l; i++) {
|
|
1073
|
+
if (targetQueue[i] === method) {
|
|
1074
|
+
targetQueue.splice(i, 1);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
991
1077
|
}
|
|
992
1078
|
}
|
|
993
1079
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
executeTimers(backburner);
|
|
998
|
-
}, wait);
|
|
1080
|
+
for (i = 0, l = queue.length; i < l; i += 4) {
|
|
1081
|
+
currentTarget = queue[i];
|
|
1082
|
+
currentMethod = queue[i + 1];
|
|
999
1083
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1084
|
+
if (currentTarget === target && currentMethod === method) {
|
|
1085
|
+
queue.splice(i, 4);
|
|
1086
|
+
return true;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1003
1089
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1090
|
+
// if not found in current queue
|
|
1091
|
+
// could be in the queue that is being flushed
|
|
1092
|
+
queue = this._queueBeingFlushed;
|
|
1007
1093
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1094
|
+
if (!queue) {
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1010
1097
|
|
|
1011
|
-
|
|
1098
|
+
for (i = 0, l = queue.length; i < l; i += 4) {
|
|
1099
|
+
currentTarget = queue[i];
|
|
1100
|
+
currentMethod = queue[i + 1];
|
|
1012
1101
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1102
|
+
if (currentTarget === target && currentMethod === method) {
|
|
1103
|
+
// don't mess with array during flush
|
|
1104
|
+
// just nullify the method
|
|
1105
|
+
queue[i + 1] = null;
|
|
1106
|
+
return true;
|
|
1107
|
+
}
|
|
1015
1108
|
}
|
|
1016
|
-
});
|
|
1017
|
-
|
|
1018
|
-
if (backburner._timers.length) {
|
|
1019
|
-
updateLaterTimer(backburner, backburner._timers[0], backburner._timers[0] - n);
|
|
1020
1109
|
}
|
|
1021
|
-
}
|
|
1110
|
+
};
|
|
1111
|
+
});
|
|
1112
|
+
enifed('backburner/utils', ['exports'], function (exports) {
|
|
1113
|
+
'use strict';
|
|
1022
1114
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1115
|
+
exports.each = each;
|
|
1116
|
+
exports.isString = isString;
|
|
1117
|
+
exports.isFunction = isFunction;
|
|
1118
|
+
exports.isNumber = isNumber;
|
|
1119
|
+
exports.isCoercableNumber = isCoercableNumber;
|
|
1120
|
+
exports.wrapInTryCatch = wrapInTryCatch;
|
|
1121
|
+
var NUMBER = /\d+/;
|
|
1026
1122
|
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1123
|
+
function each(collection, callback) {
|
|
1124
|
+
for (var i = 0; i < collection.length; i++) {
|
|
1125
|
+
callback(collection[i]);
|
|
1126
|
+
}
|
|
1029
1127
|
}
|
|
1030
1128
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1129
|
+
// Date.now is not available in browsers < IE9
|
|
1130
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility
|
|
1131
|
+
var now = Date.now || function () {
|
|
1132
|
+
return new Date().getTime();
|
|
1133
|
+
};
|
|
1034
1134
|
|
|
1035
|
-
|
|
1036
|
-
item = collection[i];
|
|
1037
|
-
if (item[0] === target && item[1] === method) {
|
|
1038
|
-
index = i;
|
|
1039
|
-
break;
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1135
|
+
exports.now = now;
|
|
1042
1136
|
|
|
1043
|
-
|
|
1137
|
+
function isString(suspect) {
|
|
1138
|
+
return typeof suspect === 'string';
|
|
1044
1139
|
}
|
|
1045
|
-
});
|
|
1046
|
-
requireModule("ember-debug");
|
|
1047
|
-
requireModule("ember-template-compiler");
|
|
1048
1140
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1141
|
+
function isFunction(suspect) {
|
|
1142
|
+
return typeof suspect === 'function';
|
|
1143
|
+
}
|
|
1051
1144
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
SILENCE: _emberMetalUtils.symbol('SILENCE')
|
|
1056
|
-
};
|
|
1145
|
+
function isNumber(suspect) {
|
|
1146
|
+
return typeof suspect === 'number';
|
|
1147
|
+
}
|
|
1057
1148
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
getLevel: function (id) {
|
|
1069
|
-
var level = this.individualLevels[id];
|
|
1070
|
-
if (!level) {
|
|
1071
|
-
level = this.defaultLevel;
|
|
1149
|
+
function isCoercableNumber(number) {
|
|
1150
|
+
return isNumber(number) || NUMBER.test(number);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
function wrapInTryCatch(func) {
|
|
1154
|
+
return function () {
|
|
1155
|
+
try {
|
|
1156
|
+
return func.apply(this, arguments);
|
|
1157
|
+
} catch (e) {
|
|
1158
|
+
throw e;
|
|
1072
1159
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
};
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1076
1162
|
});
|
|
1077
1163
|
enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/error', 'ember-metal/logger', 'ember-debug/deprecation-manager', 'ember-metal/environment'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberMetalError, _emberMetalLogger, _emberDebugDeprecationManager, _emberMetalEnvironment) {
|
|
1078
1164
|
/*global __fail__*/
|
|
@@ -1400,6 +1486,242 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
|
1400
1486
|
_emberMetalCore.default.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
|
|
1401
1487
|
}
|
|
1402
1488
|
});
|
|
1489
|
+
enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary', 'ember-metal/utils'], function (exports, _emberMetalDictionary, _emberMetalUtils) {
|
|
1490
|
+
'use strict';
|
|
1491
|
+
|
|
1492
|
+
var deprecationLevels = {
|
|
1493
|
+
RAISE: _emberMetalUtils.symbol('RAISE'),
|
|
1494
|
+
LOG: _emberMetalUtils.symbol('LOG'),
|
|
1495
|
+
SILENCE: _emberMetalUtils.symbol('SILENCE')
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
exports.deprecationLevels = deprecationLevels;
|
|
1499
|
+
exports.default = {
|
|
1500
|
+
defaultLevel: deprecationLevels.LOG,
|
|
1501
|
+
individualLevels: _emberMetalDictionary.default(null),
|
|
1502
|
+
setDefaultLevel: function (level) {
|
|
1503
|
+
this.defaultLevel = level;
|
|
1504
|
+
},
|
|
1505
|
+
setLevel: function (id, level) {
|
|
1506
|
+
this.individualLevels[id] = level;
|
|
1507
|
+
},
|
|
1508
|
+
getLevel: function (id) {
|
|
1509
|
+
var level = this.individualLevels[id];
|
|
1510
|
+
if (!level) {
|
|
1511
|
+
level = this.defaultLevel;
|
|
1512
|
+
}
|
|
1513
|
+
return level;
|
|
1514
|
+
}
|
|
1515
|
+
};
|
|
1516
|
+
});
|
|
1517
|
+
enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/merge', 'ember-metal/instrumentation', 'ember-metal/utils', 'ember-metal/error', 'ember-metal/cache', 'ember-metal/logger', 'ember-metal/property_get', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/property_set', 'ember-metal/map', 'ember-metal/get_properties', 'ember-metal/set_properties', 'ember-metal/watch_key', 'ember-metal/chains', 'ember-metal/watch_path', 'ember-metal/watching', 'ember-metal/expand_properties', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/computed_macros', 'ember-metal/observer', 'ember-metal/mixin', 'ember-metal/binding', 'ember-metal/run_loop', 'ember-metal/libraries', 'ember-metal/is_none', 'ember-metal/is_empty', 'ember-metal/is_blank', 'ember-metal/is_present', 'backburner', 'ember-metal/streams/utils', 'ember-metal/streams/stream'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberMetalMerge, _emberMetalInstrumentation, _emberMetalUtils, _emberMetalError, _emberMetalCache, _emberMetalLogger, _emberMetalProperty_get, _emberMetalEvents, _emberMetalObserver_set, _emberMetalProperty_events, _emberMetalProperties, _emberMetalProperty_set, _emberMetalMap, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalWatch_key, _emberMetalChains, _emberMetalWatch_path, _emberMetalWatching, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalAlias, _emberMetalComputed_macros, _emberMetalObserver, _emberMetalMixin, _emberMetalBinding, _emberMetalRun_loop, _emberMetalLibraries, _emberMetalIs_none, _emberMetalIs_empty, _emberMetalIs_blank, _emberMetalIs_present, _backburner, _emberMetalStreamsUtils, _emberMetalStreamsStream) {
|
|
1518
|
+
/**
|
|
1519
|
+
@module ember
|
|
1520
|
+
@submodule ember-metal
|
|
1521
|
+
*/
|
|
1522
|
+
|
|
1523
|
+
// BEGIN IMPORTS
|
|
1524
|
+
'use strict';
|
|
1525
|
+
|
|
1526
|
+
_emberMetalComputed.computed.empty = _emberMetalComputed_macros.empty;
|
|
1527
|
+
_emberMetalComputed.computed.notEmpty = _emberMetalComputed_macros.notEmpty;
|
|
1528
|
+
_emberMetalComputed.computed.none = _emberMetalComputed_macros.none;
|
|
1529
|
+
_emberMetalComputed.computed.not = _emberMetalComputed_macros.not;
|
|
1530
|
+
_emberMetalComputed.computed.bool = _emberMetalComputed_macros.bool;
|
|
1531
|
+
_emberMetalComputed.computed.match = _emberMetalComputed_macros.match;
|
|
1532
|
+
_emberMetalComputed.computed.equal = _emberMetalComputed_macros.equal;
|
|
1533
|
+
_emberMetalComputed.computed.gt = _emberMetalComputed_macros.gt;
|
|
1534
|
+
_emberMetalComputed.computed.gte = _emberMetalComputed_macros.gte;
|
|
1535
|
+
_emberMetalComputed.computed.lt = _emberMetalComputed_macros.lt;
|
|
1536
|
+
_emberMetalComputed.computed.lte = _emberMetalComputed_macros.lte;
|
|
1537
|
+
_emberMetalComputed.computed.alias = _emberMetalAlias.default;
|
|
1538
|
+
_emberMetalComputed.computed.oneWay = _emberMetalComputed_macros.oneWay;
|
|
1539
|
+
_emberMetalComputed.computed.reads = _emberMetalComputed_macros.oneWay;
|
|
1540
|
+
_emberMetalComputed.computed.readOnly = _emberMetalComputed_macros.readOnly;
|
|
1541
|
+
_emberMetalComputed.computed.defaultTo = _emberMetalComputed_macros.defaultTo;
|
|
1542
|
+
_emberMetalComputed.computed.deprecatingAlias = _emberMetalComputed_macros.deprecatingAlias;
|
|
1543
|
+
_emberMetalComputed.computed.and = _emberMetalComputed_macros.and;
|
|
1544
|
+
_emberMetalComputed.computed.or = _emberMetalComputed_macros.or;
|
|
1545
|
+
_emberMetalComputed.computed.any = _emberMetalComputed_macros.any;
|
|
1546
|
+
_emberMetalComputed.computed.collect = _emberMetalComputed_macros.collect;
|
|
1547
|
+
|
|
1548
|
+
// END IMPORTS
|
|
1549
|
+
|
|
1550
|
+
// BEGIN EXPORTS
|
|
1551
|
+
var EmberInstrumentation = _emberMetalCore.default.Instrumentation = {};
|
|
1552
|
+
EmberInstrumentation.instrument = _emberMetalInstrumentation.instrument;
|
|
1553
|
+
EmberInstrumentation.subscribe = _emberMetalInstrumentation.subscribe;
|
|
1554
|
+
EmberInstrumentation.unsubscribe = _emberMetalInstrumentation.unsubscribe;
|
|
1555
|
+
EmberInstrumentation.reset = _emberMetalInstrumentation.reset;
|
|
1556
|
+
|
|
1557
|
+
_emberMetalCore.default.instrument = _emberMetalInstrumentation.instrument;
|
|
1558
|
+
_emberMetalCore.default.subscribe = _emberMetalInstrumentation.subscribe;
|
|
1559
|
+
|
|
1560
|
+
_emberMetalCore.default._Cache = _emberMetalCache.default;
|
|
1561
|
+
|
|
1562
|
+
_emberMetalCore.default.generateGuid = _emberMetalUtils.generateGuid;
|
|
1563
|
+
_emberMetalCore.default.GUID_KEY = _emberMetalUtils.GUID_KEY;
|
|
1564
|
+
_emberMetalCore.default.platform = {
|
|
1565
|
+
defineProperty: true,
|
|
1566
|
+
hasPropertyAccessors: true
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
_emberMetalCore.default.Error = _emberMetalError.default;
|
|
1570
|
+
_emberMetalCore.default.guidFor = _emberMetalUtils.guidFor;
|
|
1571
|
+
_emberMetalCore.default.META_DESC = _emberMetalUtils.META_DESC;
|
|
1572
|
+
_emberMetalCore.default.EMPTY_META = _emberMetalUtils.EMPTY_META;
|
|
1573
|
+
_emberMetalCore.default.meta = _emberMetalUtils.meta;
|
|
1574
|
+
_emberMetalCore.default.inspect = _emberMetalUtils.inspect;
|
|
1575
|
+
_emberMetalCore.default.tryCatchFinally = _emberMetalUtils.deprecatedTryCatchFinally;
|
|
1576
|
+
_emberMetalCore.default.makeArray = _emberMetalUtils.makeArray;
|
|
1577
|
+
_emberMetalCore.default.canInvoke = _emberMetalUtils.canInvoke;
|
|
1578
|
+
_emberMetalCore.default.tryInvoke = _emberMetalUtils.tryInvoke;
|
|
1579
|
+
_emberMetalCore.default.wrap = _emberMetalUtils.wrap;
|
|
1580
|
+
_emberMetalCore.default.apply = _emberMetalUtils.apply;
|
|
1581
|
+
_emberMetalCore.default.applyStr = _emberMetalUtils.applyStr;
|
|
1582
|
+
_emberMetalCore.default.uuid = _emberMetalUtils.uuid;
|
|
1583
|
+
|
|
1584
|
+
_emberMetalCore.default.Logger = _emberMetalLogger.default;
|
|
1585
|
+
|
|
1586
|
+
_emberMetalCore.default.get = _emberMetalProperty_get.get;
|
|
1587
|
+
_emberMetalCore.default.getWithDefault = _emberMetalProperty_get.getWithDefault;
|
|
1588
|
+
_emberMetalCore.default.normalizeTuple = _emberMetalProperty_get.normalizeTuple;
|
|
1589
|
+
_emberMetalCore.default._getPath = _emberMetalProperty_get._getPath;
|
|
1590
|
+
|
|
1591
|
+
_emberMetalCore.default.on = _emberMetalEvents.on;
|
|
1592
|
+
_emberMetalCore.default.addListener = _emberMetalEvents.addListener;
|
|
1593
|
+
_emberMetalCore.default.removeListener = _emberMetalEvents.removeListener;
|
|
1594
|
+
_emberMetalCore.default._suspendListener = _emberMetalEvents.suspendListener;
|
|
1595
|
+
_emberMetalCore.default._suspendListeners = _emberMetalEvents.suspendListeners;
|
|
1596
|
+
_emberMetalCore.default.sendEvent = _emberMetalEvents.sendEvent;
|
|
1597
|
+
_emberMetalCore.default.hasListeners = _emberMetalEvents.hasListeners;
|
|
1598
|
+
_emberMetalCore.default.watchedEvents = _emberMetalEvents.watchedEvents;
|
|
1599
|
+
_emberMetalCore.default.listenersFor = _emberMetalEvents.listenersFor;
|
|
1600
|
+
_emberMetalCore.default.accumulateListeners = _emberMetalEvents.accumulateListeners;
|
|
1601
|
+
|
|
1602
|
+
_emberMetalCore.default._ObserverSet = _emberMetalObserver_set.default;
|
|
1603
|
+
|
|
1604
|
+
_emberMetalCore.default.propertyWillChange = _emberMetalProperty_events.propertyWillChange;
|
|
1605
|
+
_emberMetalCore.default.propertyDidChange = _emberMetalProperty_events.propertyDidChange;
|
|
1606
|
+
_emberMetalCore.default.overrideChains = _emberMetalProperty_events.overrideChains;
|
|
1607
|
+
_emberMetalCore.default.beginPropertyChanges = _emberMetalProperty_events.beginPropertyChanges;
|
|
1608
|
+
_emberMetalCore.default.endPropertyChanges = _emberMetalProperty_events.endPropertyChanges;
|
|
1609
|
+
_emberMetalCore.default.changeProperties = _emberMetalProperty_events.changeProperties;
|
|
1610
|
+
|
|
1611
|
+
_emberMetalCore.default.defineProperty = _emberMetalProperties.defineProperty;
|
|
1612
|
+
|
|
1613
|
+
_emberMetalCore.default.set = _emberMetalProperty_set.set;
|
|
1614
|
+
_emberMetalCore.default.trySet = _emberMetalProperty_set.trySet;
|
|
1615
|
+
|
|
1616
|
+
_emberMetalCore.default.OrderedSet = _emberMetalMap.OrderedSet;
|
|
1617
|
+
_emberMetalCore.default.Map = _emberMetalMap.Map;
|
|
1618
|
+
_emberMetalCore.default.MapWithDefault = _emberMetalMap.MapWithDefault;
|
|
1619
|
+
|
|
1620
|
+
_emberMetalCore.default.getProperties = _emberMetalGet_properties.default;
|
|
1621
|
+
_emberMetalCore.default.setProperties = _emberMetalSet_properties.default;
|
|
1622
|
+
|
|
1623
|
+
_emberMetalCore.default.watchKey = _emberMetalWatch_key.watchKey;
|
|
1624
|
+
_emberMetalCore.default.unwatchKey = _emberMetalWatch_key.unwatchKey;
|
|
1625
|
+
|
|
1626
|
+
_emberMetalCore.default.flushPendingChains = _emberMetalChains.flushPendingChains;
|
|
1627
|
+
_emberMetalCore.default.removeChainWatcher = _emberMetalChains.removeChainWatcher;
|
|
1628
|
+
_emberMetalCore.default._ChainNode = _emberMetalChains.ChainNode;
|
|
1629
|
+
_emberMetalCore.default.finishChains = _emberMetalChains.finishChains;
|
|
1630
|
+
|
|
1631
|
+
_emberMetalCore.default.watchPath = _emberMetalWatch_path.watchPath;
|
|
1632
|
+
_emberMetalCore.default.unwatchPath = _emberMetalWatch_path.unwatchPath;
|
|
1633
|
+
|
|
1634
|
+
_emberMetalCore.default.watch = _emberMetalWatching.watch;
|
|
1635
|
+
_emberMetalCore.default.isWatching = _emberMetalWatching.isWatching;
|
|
1636
|
+
_emberMetalCore.default.unwatch = _emberMetalWatching.unwatch;
|
|
1637
|
+
_emberMetalCore.default.rewatch = _emberMetalWatching.rewatch;
|
|
1638
|
+
_emberMetalCore.default.destroy = _emberMetalWatching.destroy;
|
|
1639
|
+
|
|
1640
|
+
_emberMetalCore.default.expandProperties = _emberMetalExpand_properties.default;
|
|
1641
|
+
|
|
1642
|
+
_emberMetalCore.default.ComputedProperty = _emberMetalComputed.ComputedProperty;
|
|
1643
|
+
_emberMetalCore.default.computed = _emberMetalComputed.computed;
|
|
1644
|
+
_emberMetalCore.default.cacheFor = _emberMetalComputed.cacheFor;
|
|
1645
|
+
|
|
1646
|
+
_emberMetalCore.default.addObserver = _emberMetalObserver.addObserver;
|
|
1647
|
+
_emberMetalCore.default.observersFor = _emberMetalObserver.observersFor;
|
|
1648
|
+
_emberMetalCore.default.removeObserver = _emberMetalObserver.removeObserver;
|
|
1649
|
+
_emberMetalCore.default._suspendObserver = _emberMetalObserver._suspendObserver;
|
|
1650
|
+
_emberMetalCore.default._suspendObservers = _emberMetalObserver._suspendObservers;
|
|
1651
|
+
|
|
1652
|
+
_emberMetalCore.default.IS_BINDING = _emberMetalMixin.IS_BINDING;
|
|
1653
|
+
_emberMetalCore.default.required = _emberMetalMixin.required;
|
|
1654
|
+
_emberMetalCore.default.aliasMethod = _emberMetalMixin.aliasMethod;
|
|
1655
|
+
_emberMetalCore.default.observer = _emberMetalMixin.observer;
|
|
1656
|
+
_emberMetalCore.default.immediateObserver = _emberMetalMixin._immediateObserver;
|
|
1657
|
+
_emberMetalCore.default.mixin = _emberMetalMixin.mixin;
|
|
1658
|
+
_emberMetalCore.default.Mixin = _emberMetalMixin.Mixin;
|
|
1659
|
+
|
|
1660
|
+
_emberMetalCore.default.bind = _emberMetalBinding.bind;
|
|
1661
|
+
_emberMetalCore.default.Binding = _emberMetalBinding.Binding;
|
|
1662
|
+
_emberMetalCore.default.isGlobalPath = _emberMetalBinding.isGlobalPath;
|
|
1663
|
+
|
|
1664
|
+
_emberMetalCore.default.run = _emberMetalRun_loop.default;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
@class Backburner
|
|
1668
|
+
@for Ember
|
|
1669
|
+
@private
|
|
1670
|
+
*/
|
|
1671
|
+
_emberMetalCore.default.Backburner = _backburner.default;
|
|
1672
|
+
// this is the new go forward, once Ember Data updates to using `_Backburner` we
|
|
1673
|
+
// can remove the non-underscored version.
|
|
1674
|
+
_emberMetalCore.default._Backburner = _backburner.default;
|
|
1675
|
+
|
|
1676
|
+
_emberMetalCore.default.libraries = new _emberMetalLibraries.default();
|
|
1677
|
+
_emberMetalCore.default.libraries.registerCoreLibrary('Ember', _emberMetalCore.default.VERSION);
|
|
1678
|
+
|
|
1679
|
+
_emberMetalCore.default.isNone = _emberMetalIs_none.default;
|
|
1680
|
+
_emberMetalCore.default.isEmpty = _emberMetalIs_empty.default;
|
|
1681
|
+
_emberMetalCore.default.isBlank = _emberMetalIs_blank.default;
|
|
1682
|
+
_emberMetalCore.default.isPresent = _emberMetalIs_present.default;
|
|
1683
|
+
|
|
1684
|
+
_emberMetalCore.default.merge = _emberMetalMerge.default;
|
|
1685
|
+
|
|
1686
|
+
_emberMetalCore.default.FEATURES = _emberMetalFeatures.FEATURES;
|
|
1687
|
+
_emberMetalCore.default.FEATURES.isEnabled = _emberMetalFeatures.default;
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
A function may be assigned to `Ember.onerror` to be called when Ember
|
|
1691
|
+
internals encounter an error. This is useful for specialized error handling
|
|
1692
|
+
and reporting code.
|
|
1693
|
+
|
|
1694
|
+
```javascript
|
|
1695
|
+
Ember.onerror = function(error) {
|
|
1696
|
+
Em.$.ajax('/report-error', 'POST', {
|
|
1697
|
+
stack: error.stack,
|
|
1698
|
+
otherInformation: 'whatever app state you want to provide'
|
|
1699
|
+
});
|
|
1700
|
+
};
|
|
1701
|
+
```
|
|
1702
|
+
|
|
1703
|
+
Internally, `Ember.onerror` is used as Backburner's error handler.
|
|
1704
|
+
|
|
1705
|
+
@event onerror
|
|
1706
|
+
@for Ember
|
|
1707
|
+
@param {Exception} error the error object
|
|
1708
|
+
@public
|
|
1709
|
+
*/
|
|
1710
|
+
_emberMetalCore.default.onerror = null;
|
|
1711
|
+
// END EXPORTS
|
|
1712
|
+
|
|
1713
|
+
// do this for side-effects of updating Ember.assert, warn, etc when
|
|
1714
|
+
// ember-debug is present
|
|
1715
|
+
// This needs to be called before any deprecateFunc
|
|
1716
|
+
if (_emberMetalCore.default.__loader.registry['ember-debug']) {
|
|
1717
|
+
requireModule('ember-debug');
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
_emberMetalCore.default.create = _emberMetalCore.default.deprecateFunc('Ember.create is deprecated in favor of Object.create', { id: 'ember-metal.ember-create', until: '3.0.0' }, Object.create);
|
|
1721
|
+
_emberMetalCore.default.keys = _emberMetalCore.default.deprecateFunc('Ember.keys is deprecated in favor of Object.keys', { id: 'ember-metal.ember.keys', until: '3.0.0' }, Object.keys);
|
|
1722
|
+
|
|
1723
|
+
exports.default = _emberMetalCore.default;
|
|
1724
|
+
});
|
|
1403
1725
|
enifed('ember-metal/alias', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/core', 'ember-metal/error', 'ember-metal/properties', 'ember-metal/computed', 'ember-metal/utils', 'ember-metal/dependent_keys'], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalCore, _emberMetalError, _emberMetalProperties, _emberMetalComputed, _emberMetalUtils, _emberMetalDependent_keys) {
|
|
1404
1726
|
'use strict';
|
|
1405
1727
|
|
|
@@ -10648,312 +10970,139 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
|
10648
10970
|
|
|
10649
10971
|
'use strict';
|
|
10650
10972
|
|
|
10651
|
-
exports.isWatching = isWatching;
|
|
10652
|
-
exports.unwatch = unwatch;
|
|
10653
|
-
exports.destroy = destroy;
|
|
10654
|
-
|
|
10655
|
-
/**
|
|
10656
|
-
Starts watching a property on an object. Whenever the property changes,
|
|
10657
|
-
invokes `Ember.propertyWillChange` and `Ember.propertyDidChange`. This is the
|
|
10658
|
-
primitive used by observers and dependent keys; usually you will never call
|
|
10659
|
-
this method directly but instead use higher level methods like
|
|
10660
|
-
`Ember.addObserver()`
|
|
10661
|
-
|
|
10662
|
-
@private
|
|
10663
|
-
@method watch
|
|
10664
|
-
@for Ember
|
|
10665
|
-
@param obj
|
|
10666
|
-
@param {String} _keyPath
|
|
10667
|
-
*/
|
|
10668
|
-
function watch(obj, _keyPath, m) {
|
|
10669
|
-
// can't watch length on Array - it is special...
|
|
10670
|
-
if (_keyPath === 'length' && Array.isArray(obj)) {
|
|
10671
|
-
return;
|
|
10672
|
-
}
|
|
10673
|
-
|
|
10674
|
-
if (!_emberMetalPath_cache.isPath(_keyPath)) {
|
|
10675
|
-
_emberMetalWatch_key.watchKey(obj, _keyPath, m);
|
|
10676
|
-
} else {
|
|
10677
|
-
_emberMetalWatch_path.watchPath(obj, _keyPath, m);
|
|
10678
|
-
}
|
|
10679
|
-
}
|
|
10680
|
-
|
|
10681
|
-
exports.watch = watch;
|
|
10682
|
-
|
|
10683
|
-
function isWatching(obj, key) {
|
|
10684
|
-
var meta = obj['__ember_meta__'];
|
|
10685
|
-
return (meta && meta.watching[key]) > 0;
|
|
10686
|
-
}
|
|
10687
|
-
|
|
10688
|
-
watch.flushPending = _emberMetalChains.flushPendingChains;
|
|
10689
|
-
|
|
10690
|
-
function unwatch(obj, _keyPath, m) {
|
|
10691
|
-
// can't watch length on Array - it is special...
|
|
10692
|
-
if (_keyPath === 'length' && Array.isArray(obj)) {
|
|
10693
|
-
return;
|
|
10694
|
-
}
|
|
10695
|
-
|
|
10696
|
-
if (!_emberMetalPath_cache.isPath(_keyPath)) {
|
|
10697
|
-
_emberMetalWatch_key.unwatchKey(obj, _keyPath, m);
|
|
10698
|
-
} else {
|
|
10699
|
-
_emberMetalWatch_path.unwatchPath(obj, _keyPath, m);
|
|
10700
|
-
}
|
|
10701
|
-
}
|
|
10702
|
-
|
|
10703
|
-
var NODE_STACK = [];
|
|
10704
|
-
|
|
10705
|
-
/**
|
|
10706
|
-
Tears down the meta on an object so that it can be garbage collected.
|
|
10707
|
-
Multiple calls will have no effect.
|
|
10708
|
-
|
|
10709
|
-
@method destroy
|
|
10710
|
-
@for Ember
|
|
10711
|
-
@param {Object} obj the object to destroy
|
|
10712
|
-
@return {void}
|
|
10713
|
-
@private
|
|
10714
|
-
*/
|
|
10715
|
-
|
|
10716
|
-
function destroy(obj) {
|
|
10717
|
-
var meta = obj['__ember_meta__'];
|
|
10718
|
-
var node, nodes, key, nodeObject;
|
|
10719
|
-
|
|
10720
|
-
if (meta) {
|
|
10721
|
-
obj['__ember_meta__'] = null;
|
|
10722
|
-
// remove chainWatchers to remove circular references that would prevent GC
|
|
10723
|
-
node = meta.chains;
|
|
10724
|
-
if (node) {
|
|
10725
|
-
NODE_STACK.push(node);
|
|
10726
|
-
// process tree
|
|
10727
|
-
while (NODE_STACK.length > 0) {
|
|
10728
|
-
node = NODE_STACK.pop();
|
|
10729
|
-
// push children
|
|
10730
|
-
nodes = node._chains;
|
|
10731
|
-
if (nodes) {
|
|
10732
|
-
for (key in nodes) {
|
|
10733
|
-
if (nodes[key] !== undefined) {
|
|
10734
|
-
NODE_STACK.push(nodes[key]);
|
|
10735
|
-
}
|
|
10736
|
-
}
|
|
10737
|
-
}
|
|
10738
|
-
// remove chainWatcher in node object
|
|
10739
|
-
if (node._watching) {
|
|
10740
|
-
nodeObject = node._object;
|
|
10741
|
-
if (nodeObject) {
|
|
10742
|
-
_emberMetalChains.removeChainWatcher(nodeObject, node._key, node);
|
|
10743
|
-
}
|
|
10744
|
-
}
|
|
10745
|
-
}
|
|
10746
|
-
}
|
|
10747
|
-
}
|
|
10748
|
-
}
|
|
10749
|
-
});
|
|
10750
|
-
enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/merge', 'ember-metal/instrumentation', 'ember-metal/utils', 'ember-metal/error', 'ember-metal/cache', 'ember-metal/logger', 'ember-metal/property_get', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/property_set', 'ember-metal/map', 'ember-metal/get_properties', 'ember-metal/set_properties', 'ember-metal/watch_key', 'ember-metal/chains', 'ember-metal/watch_path', 'ember-metal/watching', 'ember-metal/expand_properties', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/computed_macros', 'ember-metal/observer', 'ember-metal/mixin', 'ember-metal/binding', 'ember-metal/run_loop', 'ember-metal/libraries', 'ember-metal/is_none', 'ember-metal/is_empty', 'ember-metal/is_blank', 'ember-metal/is_present', 'backburner', 'ember-metal/streams/utils', 'ember-metal/streams/stream'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberMetalMerge, _emberMetalInstrumentation, _emberMetalUtils, _emberMetalError, _emberMetalCache, _emberMetalLogger, _emberMetalProperty_get, _emberMetalEvents, _emberMetalObserver_set, _emberMetalProperty_events, _emberMetalProperties, _emberMetalProperty_set, _emberMetalMap, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalWatch_key, _emberMetalChains, _emberMetalWatch_path, _emberMetalWatching, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalAlias, _emberMetalComputed_macros, _emberMetalObserver, _emberMetalMixin, _emberMetalBinding, _emberMetalRun_loop, _emberMetalLibraries, _emberMetalIs_none, _emberMetalIs_empty, _emberMetalIs_blank, _emberMetalIs_present, _backburner, _emberMetalStreamsUtils, _emberMetalStreamsStream) {
|
|
10751
|
-
/**
|
|
10752
|
-
@module ember
|
|
10753
|
-
@submodule ember-metal
|
|
10754
|
-
*/
|
|
10755
|
-
|
|
10756
|
-
// BEGIN IMPORTS
|
|
10757
|
-
'use strict';
|
|
10758
|
-
|
|
10759
|
-
_emberMetalComputed.computed.empty = _emberMetalComputed_macros.empty;
|
|
10760
|
-
_emberMetalComputed.computed.notEmpty = _emberMetalComputed_macros.notEmpty;
|
|
10761
|
-
_emberMetalComputed.computed.none = _emberMetalComputed_macros.none;
|
|
10762
|
-
_emberMetalComputed.computed.not = _emberMetalComputed_macros.not;
|
|
10763
|
-
_emberMetalComputed.computed.bool = _emberMetalComputed_macros.bool;
|
|
10764
|
-
_emberMetalComputed.computed.match = _emberMetalComputed_macros.match;
|
|
10765
|
-
_emberMetalComputed.computed.equal = _emberMetalComputed_macros.equal;
|
|
10766
|
-
_emberMetalComputed.computed.gt = _emberMetalComputed_macros.gt;
|
|
10767
|
-
_emberMetalComputed.computed.gte = _emberMetalComputed_macros.gte;
|
|
10768
|
-
_emberMetalComputed.computed.lt = _emberMetalComputed_macros.lt;
|
|
10769
|
-
_emberMetalComputed.computed.lte = _emberMetalComputed_macros.lte;
|
|
10770
|
-
_emberMetalComputed.computed.alias = _emberMetalAlias.default;
|
|
10771
|
-
_emberMetalComputed.computed.oneWay = _emberMetalComputed_macros.oneWay;
|
|
10772
|
-
_emberMetalComputed.computed.reads = _emberMetalComputed_macros.oneWay;
|
|
10773
|
-
_emberMetalComputed.computed.readOnly = _emberMetalComputed_macros.readOnly;
|
|
10774
|
-
_emberMetalComputed.computed.defaultTo = _emberMetalComputed_macros.defaultTo;
|
|
10775
|
-
_emberMetalComputed.computed.deprecatingAlias = _emberMetalComputed_macros.deprecatingAlias;
|
|
10776
|
-
_emberMetalComputed.computed.and = _emberMetalComputed_macros.and;
|
|
10777
|
-
_emberMetalComputed.computed.or = _emberMetalComputed_macros.or;
|
|
10778
|
-
_emberMetalComputed.computed.any = _emberMetalComputed_macros.any;
|
|
10779
|
-
_emberMetalComputed.computed.collect = _emberMetalComputed_macros.collect;
|
|
10780
|
-
|
|
10781
|
-
// END IMPORTS
|
|
10782
|
-
|
|
10783
|
-
// BEGIN EXPORTS
|
|
10784
|
-
var EmberInstrumentation = _emberMetalCore.default.Instrumentation = {};
|
|
10785
|
-
EmberInstrumentation.instrument = _emberMetalInstrumentation.instrument;
|
|
10786
|
-
EmberInstrumentation.subscribe = _emberMetalInstrumentation.subscribe;
|
|
10787
|
-
EmberInstrumentation.unsubscribe = _emberMetalInstrumentation.unsubscribe;
|
|
10788
|
-
EmberInstrumentation.reset = _emberMetalInstrumentation.reset;
|
|
10789
|
-
|
|
10790
|
-
_emberMetalCore.default.instrument = _emberMetalInstrumentation.instrument;
|
|
10791
|
-
_emberMetalCore.default.subscribe = _emberMetalInstrumentation.subscribe;
|
|
10792
|
-
|
|
10793
|
-
_emberMetalCore.default._Cache = _emberMetalCache.default;
|
|
10794
|
-
|
|
10795
|
-
_emberMetalCore.default.generateGuid = _emberMetalUtils.generateGuid;
|
|
10796
|
-
_emberMetalCore.default.GUID_KEY = _emberMetalUtils.GUID_KEY;
|
|
10797
|
-
_emberMetalCore.default.platform = {
|
|
10798
|
-
defineProperty: true,
|
|
10799
|
-
hasPropertyAccessors: true
|
|
10800
|
-
};
|
|
10801
|
-
|
|
10802
|
-
_emberMetalCore.default.Error = _emberMetalError.default;
|
|
10803
|
-
_emberMetalCore.default.guidFor = _emberMetalUtils.guidFor;
|
|
10804
|
-
_emberMetalCore.default.META_DESC = _emberMetalUtils.META_DESC;
|
|
10805
|
-
_emberMetalCore.default.EMPTY_META = _emberMetalUtils.EMPTY_META;
|
|
10806
|
-
_emberMetalCore.default.meta = _emberMetalUtils.meta;
|
|
10807
|
-
_emberMetalCore.default.inspect = _emberMetalUtils.inspect;
|
|
10808
|
-
_emberMetalCore.default.tryCatchFinally = _emberMetalUtils.deprecatedTryCatchFinally;
|
|
10809
|
-
_emberMetalCore.default.makeArray = _emberMetalUtils.makeArray;
|
|
10810
|
-
_emberMetalCore.default.canInvoke = _emberMetalUtils.canInvoke;
|
|
10811
|
-
_emberMetalCore.default.tryInvoke = _emberMetalUtils.tryInvoke;
|
|
10812
|
-
_emberMetalCore.default.wrap = _emberMetalUtils.wrap;
|
|
10813
|
-
_emberMetalCore.default.apply = _emberMetalUtils.apply;
|
|
10814
|
-
_emberMetalCore.default.applyStr = _emberMetalUtils.applyStr;
|
|
10815
|
-
_emberMetalCore.default.uuid = _emberMetalUtils.uuid;
|
|
10816
|
-
|
|
10817
|
-
_emberMetalCore.default.Logger = _emberMetalLogger.default;
|
|
10818
|
-
|
|
10819
|
-
_emberMetalCore.default.get = _emberMetalProperty_get.get;
|
|
10820
|
-
_emberMetalCore.default.getWithDefault = _emberMetalProperty_get.getWithDefault;
|
|
10821
|
-
_emberMetalCore.default.normalizeTuple = _emberMetalProperty_get.normalizeTuple;
|
|
10822
|
-
_emberMetalCore.default._getPath = _emberMetalProperty_get._getPath;
|
|
10823
|
-
|
|
10824
|
-
_emberMetalCore.default.on = _emberMetalEvents.on;
|
|
10825
|
-
_emberMetalCore.default.addListener = _emberMetalEvents.addListener;
|
|
10826
|
-
_emberMetalCore.default.removeListener = _emberMetalEvents.removeListener;
|
|
10827
|
-
_emberMetalCore.default._suspendListener = _emberMetalEvents.suspendListener;
|
|
10828
|
-
_emberMetalCore.default._suspendListeners = _emberMetalEvents.suspendListeners;
|
|
10829
|
-
_emberMetalCore.default.sendEvent = _emberMetalEvents.sendEvent;
|
|
10830
|
-
_emberMetalCore.default.hasListeners = _emberMetalEvents.hasListeners;
|
|
10831
|
-
_emberMetalCore.default.watchedEvents = _emberMetalEvents.watchedEvents;
|
|
10832
|
-
_emberMetalCore.default.listenersFor = _emberMetalEvents.listenersFor;
|
|
10833
|
-
_emberMetalCore.default.accumulateListeners = _emberMetalEvents.accumulateListeners;
|
|
10834
|
-
|
|
10835
|
-
_emberMetalCore.default._ObserverSet = _emberMetalObserver_set.default;
|
|
10836
|
-
|
|
10837
|
-
_emberMetalCore.default.propertyWillChange = _emberMetalProperty_events.propertyWillChange;
|
|
10838
|
-
_emberMetalCore.default.propertyDidChange = _emberMetalProperty_events.propertyDidChange;
|
|
10839
|
-
_emberMetalCore.default.overrideChains = _emberMetalProperty_events.overrideChains;
|
|
10840
|
-
_emberMetalCore.default.beginPropertyChanges = _emberMetalProperty_events.beginPropertyChanges;
|
|
10841
|
-
_emberMetalCore.default.endPropertyChanges = _emberMetalProperty_events.endPropertyChanges;
|
|
10842
|
-
_emberMetalCore.default.changeProperties = _emberMetalProperty_events.changeProperties;
|
|
10843
|
-
|
|
10844
|
-
_emberMetalCore.default.defineProperty = _emberMetalProperties.defineProperty;
|
|
10845
|
-
|
|
10846
|
-
_emberMetalCore.default.set = _emberMetalProperty_set.set;
|
|
10847
|
-
_emberMetalCore.default.trySet = _emberMetalProperty_set.trySet;
|
|
10848
|
-
|
|
10849
|
-
_emberMetalCore.default.OrderedSet = _emberMetalMap.OrderedSet;
|
|
10850
|
-
_emberMetalCore.default.Map = _emberMetalMap.Map;
|
|
10851
|
-
_emberMetalCore.default.MapWithDefault = _emberMetalMap.MapWithDefault;
|
|
10852
|
-
|
|
10853
|
-
_emberMetalCore.default.getProperties = _emberMetalGet_properties.default;
|
|
10854
|
-
_emberMetalCore.default.setProperties = _emberMetalSet_properties.default;
|
|
10855
|
-
|
|
10856
|
-
_emberMetalCore.default.watchKey = _emberMetalWatch_key.watchKey;
|
|
10857
|
-
_emberMetalCore.default.unwatchKey = _emberMetalWatch_key.unwatchKey;
|
|
10858
|
-
|
|
10859
|
-
_emberMetalCore.default.flushPendingChains = _emberMetalChains.flushPendingChains;
|
|
10860
|
-
_emberMetalCore.default.removeChainWatcher = _emberMetalChains.removeChainWatcher;
|
|
10861
|
-
_emberMetalCore.default._ChainNode = _emberMetalChains.ChainNode;
|
|
10862
|
-
_emberMetalCore.default.finishChains = _emberMetalChains.finishChains;
|
|
10863
|
-
|
|
10864
|
-
_emberMetalCore.default.watchPath = _emberMetalWatch_path.watchPath;
|
|
10865
|
-
_emberMetalCore.default.unwatchPath = _emberMetalWatch_path.unwatchPath;
|
|
10866
|
-
|
|
10867
|
-
_emberMetalCore.default.watch = _emberMetalWatching.watch;
|
|
10868
|
-
_emberMetalCore.default.isWatching = _emberMetalWatching.isWatching;
|
|
10869
|
-
_emberMetalCore.default.unwatch = _emberMetalWatching.unwatch;
|
|
10870
|
-
_emberMetalCore.default.rewatch = _emberMetalWatching.rewatch;
|
|
10871
|
-
_emberMetalCore.default.destroy = _emberMetalWatching.destroy;
|
|
10872
|
-
|
|
10873
|
-
_emberMetalCore.default.expandProperties = _emberMetalExpand_properties.default;
|
|
10874
|
-
|
|
10875
|
-
_emberMetalCore.default.ComputedProperty = _emberMetalComputed.ComputedProperty;
|
|
10876
|
-
_emberMetalCore.default.computed = _emberMetalComputed.computed;
|
|
10877
|
-
_emberMetalCore.default.cacheFor = _emberMetalComputed.cacheFor;
|
|
10878
|
-
|
|
10879
|
-
_emberMetalCore.default.addObserver = _emberMetalObserver.addObserver;
|
|
10880
|
-
_emberMetalCore.default.observersFor = _emberMetalObserver.observersFor;
|
|
10881
|
-
_emberMetalCore.default.removeObserver = _emberMetalObserver.removeObserver;
|
|
10882
|
-
_emberMetalCore.default._suspendObserver = _emberMetalObserver._suspendObserver;
|
|
10883
|
-
_emberMetalCore.default._suspendObservers = _emberMetalObserver._suspendObservers;
|
|
10884
|
-
|
|
10885
|
-
_emberMetalCore.default.IS_BINDING = _emberMetalMixin.IS_BINDING;
|
|
10886
|
-
_emberMetalCore.default.required = _emberMetalMixin.required;
|
|
10887
|
-
_emberMetalCore.default.aliasMethod = _emberMetalMixin.aliasMethod;
|
|
10888
|
-
_emberMetalCore.default.observer = _emberMetalMixin.observer;
|
|
10889
|
-
_emberMetalCore.default.immediateObserver = _emberMetalMixin._immediateObserver;
|
|
10890
|
-
_emberMetalCore.default.mixin = _emberMetalMixin.mixin;
|
|
10891
|
-
_emberMetalCore.default.Mixin = _emberMetalMixin.Mixin;
|
|
10892
|
-
|
|
10893
|
-
_emberMetalCore.default.bind = _emberMetalBinding.bind;
|
|
10894
|
-
_emberMetalCore.default.Binding = _emberMetalBinding.Binding;
|
|
10895
|
-
_emberMetalCore.default.isGlobalPath = _emberMetalBinding.isGlobalPath;
|
|
10896
|
-
|
|
10897
|
-
_emberMetalCore.default.run = _emberMetalRun_loop.default;
|
|
10973
|
+
exports.isWatching = isWatching;
|
|
10974
|
+
exports.unwatch = unwatch;
|
|
10975
|
+
exports.destroy = destroy;
|
|
10898
10976
|
|
|
10899
10977
|
/**
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10978
|
+
Starts watching a property on an object. Whenever the property changes,
|
|
10979
|
+
invokes `Ember.propertyWillChange` and `Ember.propertyDidChange`. This is the
|
|
10980
|
+
primitive used by observers and dependent keys; usually you will never call
|
|
10981
|
+
this method directly but instead use higher level methods like
|
|
10982
|
+
`Ember.addObserver()`
|
|
10983
|
+
|
|
10984
|
+
@private
|
|
10985
|
+
@method watch
|
|
10986
|
+
@for Ember
|
|
10987
|
+
@param obj
|
|
10988
|
+
@param {String} _keyPath
|
|
10903
10989
|
*/
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10990
|
+
function watch(obj, _keyPath, m) {
|
|
10991
|
+
// can't watch length on Array - it is special...
|
|
10992
|
+
if (_keyPath === 'length' && Array.isArray(obj)) {
|
|
10993
|
+
return;
|
|
10994
|
+
}
|
|
10908
10995
|
|
|
10909
|
-
|
|
10910
|
-
|
|
10996
|
+
if (!_emberMetalPath_cache.isPath(_keyPath)) {
|
|
10997
|
+
_emberMetalWatch_key.watchKey(obj, _keyPath, m);
|
|
10998
|
+
} else {
|
|
10999
|
+
_emberMetalWatch_path.watchPath(obj, _keyPath, m);
|
|
11000
|
+
}
|
|
11001
|
+
}
|
|
10911
11002
|
|
|
10912
|
-
|
|
10913
|
-
_emberMetalCore.default.isEmpty = _emberMetalIs_empty.default;
|
|
10914
|
-
_emberMetalCore.default.isBlank = _emberMetalIs_blank.default;
|
|
10915
|
-
_emberMetalCore.default.isPresent = _emberMetalIs_present.default;
|
|
11003
|
+
exports.watch = watch;
|
|
10916
11004
|
|
|
10917
|
-
|
|
11005
|
+
function isWatching(obj, key) {
|
|
11006
|
+
var meta = obj['__ember_meta__'];
|
|
11007
|
+
return (meta && meta.watching[key]) > 0;
|
|
11008
|
+
}
|
|
10918
11009
|
|
|
10919
|
-
|
|
10920
|
-
|
|
11010
|
+
watch.flushPending = _emberMetalChains.flushPendingChains;
|
|
11011
|
+
|
|
11012
|
+
function unwatch(obj, _keyPath, m) {
|
|
11013
|
+
// can't watch length on Array - it is special...
|
|
11014
|
+
if (_keyPath === 'length' && Array.isArray(obj)) {
|
|
11015
|
+
return;
|
|
11016
|
+
}
|
|
11017
|
+
|
|
11018
|
+
if (!_emberMetalPath_cache.isPath(_keyPath)) {
|
|
11019
|
+
_emberMetalWatch_key.unwatchKey(obj, _keyPath, m);
|
|
11020
|
+
} else {
|
|
11021
|
+
_emberMetalWatch_path.unwatchPath(obj, _keyPath, m);
|
|
11022
|
+
}
|
|
11023
|
+
}
|
|
11024
|
+
|
|
11025
|
+
var NODE_STACK = [];
|
|
10921
11026
|
|
|
10922
11027
|
/**
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
and reporting code.
|
|
10926
|
-
|
|
10927
|
-
```javascript
|
|
10928
|
-
Ember.onerror = function(error) {
|
|
10929
|
-
Em.$.ajax('/report-error', 'POST', {
|
|
10930
|
-
stack: error.stack,
|
|
10931
|
-
otherInformation: 'whatever app state you want to provide'
|
|
10932
|
-
});
|
|
10933
|
-
};
|
|
10934
|
-
```
|
|
10935
|
-
|
|
10936
|
-
Internally, `Ember.onerror` is used as Backburner's error handler.
|
|
11028
|
+
Tears down the meta on an object so that it can be garbage collected.
|
|
11029
|
+
Multiple calls will have no effect.
|
|
10937
11030
|
|
|
10938
|
-
@
|
|
11031
|
+
@method destroy
|
|
10939
11032
|
@for Ember
|
|
10940
|
-
@param {
|
|
10941
|
-
@
|
|
11033
|
+
@param {Object} obj the object to destroy
|
|
11034
|
+
@return {void}
|
|
11035
|
+
@private
|
|
10942
11036
|
*/
|
|
10943
|
-
_emberMetalCore.default.onerror = null;
|
|
10944
|
-
// END EXPORTS
|
|
10945
11037
|
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
11038
|
+
function destroy(obj) {
|
|
11039
|
+
var meta = obj['__ember_meta__'];
|
|
11040
|
+
var node, nodes, key, nodeObject;
|
|
11041
|
+
|
|
11042
|
+
if (meta) {
|
|
11043
|
+
obj['__ember_meta__'] = null;
|
|
11044
|
+
// remove chainWatchers to remove circular references that would prevent GC
|
|
11045
|
+
node = meta.chains;
|
|
11046
|
+
if (node) {
|
|
11047
|
+
NODE_STACK.push(node);
|
|
11048
|
+
// process tree
|
|
11049
|
+
while (NODE_STACK.length > 0) {
|
|
11050
|
+
node = NODE_STACK.pop();
|
|
11051
|
+
// push children
|
|
11052
|
+
nodes = node._chains;
|
|
11053
|
+
if (nodes) {
|
|
11054
|
+
for (key in nodes) {
|
|
11055
|
+
if (nodes[key] !== undefined) {
|
|
11056
|
+
NODE_STACK.push(nodes[key]);
|
|
11057
|
+
}
|
|
11058
|
+
}
|
|
11059
|
+
}
|
|
11060
|
+
// remove chainWatcher in node object
|
|
11061
|
+
if (node._watching) {
|
|
11062
|
+
nodeObject = node._object;
|
|
11063
|
+
if (nodeObject) {
|
|
11064
|
+
_emberMetalChains.removeChainWatcher(nodeObject, node._key, node);
|
|
11065
|
+
}
|
|
11066
|
+
}
|
|
11067
|
+
}
|
|
11068
|
+
}
|
|
11069
|
+
}
|
|
11070
|
+
}
|
|
11071
|
+
});
|
|
11072
|
+
enifed('ember-template-compiler', ['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-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-each-into-collection', 'ember-template-compiler/plugins/assert-no-view-and-controller-paths', 'ember-template-compiler/plugins/assert-no-view-helper', 'ember-template-compiler/compat'], function (exports, _emberMetal, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths, _emberTemplateCompilerPluginsAssertNoViewHelper, _emberTemplateCompilerCompat) {
|
|
11073
|
+
'use strict';
|
|
11074
|
+
|
|
11075
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax.default);
|
|
11076
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldClassBindingSyntax.default);
|
|
11077
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformItemClass.default);
|
|
11078
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut.default);
|
|
11079
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly.default);
|
|
11080
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformAngleBracketComponents.default);
|
|
11081
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformInputOnToOnEvent.default);
|
|
11082
|
+
|
|
11083
|
+
if (_emberMetal.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
|
11084
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachIntoCollection.default);
|
|
11085
|
+
} else {
|
|
11086
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths.default);
|
|
11087
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewHelper.default);
|
|
10951
11088
|
}
|
|
10952
11089
|
|
|
10953
|
-
|
|
10954
|
-
|
|
11090
|
+
exports._Ember = _emberMetal.default;
|
|
11091
|
+
exports.precompile = _emberTemplateCompilerSystemPrecompile.default;
|
|
11092
|
+
exports.compile = _emberTemplateCompilerSystemCompile.default;
|
|
11093
|
+
exports.template = _emberTemplateCompilerSystemTemplate.default;
|
|
11094
|
+
exports.registerPlugin = _emberTemplateCompilerPlugins.registerPlugin;
|
|
11095
|
+
});
|
|
10955
11096
|
|
|
10956
|
-
|
|
11097
|
+
// used for adding Ember.Handlebars.compile for backwards compat
|
|
11098
|
+
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) {
|
|
11099
|
+
'use strict';
|
|
11100
|
+
|
|
11101
|
+
var EmberHandlebars = _emberMetalCore.default.Handlebars = _emberMetalCore.default.Handlebars || {};
|
|
11102
|
+
|
|
11103
|
+
EmberHandlebars.precompile = _emberTemplateCompilerCompatPrecompile.default;
|
|
11104
|
+
EmberHandlebars.compile = _emberTemplateCompilerSystemCompile.default;
|
|
11105
|
+
EmberHandlebars.template = _emberTemplateCompilerSystemTemplate.default;
|
|
10957
11106
|
});
|
|
10958
11107
|
enifed('ember-template-compiler/compat/precompile', ['exports', 'ember-metal/core', 'ember-template-compiler/system/compile_options'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCompile_options) {
|
|
10959
11108
|
/**
|
|
@@ -10982,14 +11131,39 @@ enifed('ember-template-compiler/compat/precompile', ['exports', 'ember-metal/cor
|
|
|
10982
11131
|
return compileFunc(string, _emberTemplateCompilerSystemCompile_options.default());
|
|
10983
11132
|
};
|
|
10984
11133
|
});
|
|
10985
|
-
enifed('ember-template-compiler/
|
|
11134
|
+
enifed('ember-template-compiler/plugins', ['exports'], function (exports) {
|
|
11135
|
+
/**
|
|
11136
|
+
@module ember
|
|
11137
|
+
@submodule ember-template-compiler
|
|
11138
|
+
*/
|
|
11139
|
+
|
|
11140
|
+
/**
|
|
11141
|
+
@private
|
|
11142
|
+
@property helpers
|
|
11143
|
+
*/
|
|
10986
11144
|
'use strict';
|
|
10987
11145
|
|
|
10988
|
-
|
|
11146
|
+
exports.registerPlugin = registerPlugin;
|
|
11147
|
+
var plugins = {
|
|
11148
|
+
ast: []
|
|
11149
|
+
};
|
|
10989
11150
|
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
11151
|
+
/**
|
|
11152
|
+
Adds an AST plugin to be used by Ember.HTMLBars.compile.
|
|
11153
|
+
|
|
11154
|
+
@private
|
|
11155
|
+
@method registerASTPlugin
|
|
11156
|
+
*/
|
|
11157
|
+
|
|
11158
|
+
function registerPlugin(type, Plugin) {
|
|
11159
|
+
if (!plugins[type]) {
|
|
11160
|
+
throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.');
|
|
11161
|
+
}
|
|
11162
|
+
|
|
11163
|
+
plugins[type].push(Plugin);
|
|
11164
|
+
}
|
|
11165
|
+
|
|
11166
|
+
exports.default = plugins;
|
|
10993
11167
|
});
|
|
10994
11168
|
enifed('ember-template-compiler/plugins/assert-no-view-and-controller-paths', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
|
10995
11169
|
'use strict';
|
|
@@ -11757,40 +11931,6 @@ enifed('ember-template-compiler/plugins/transform-old-class-binding-syntax', ['e
|
|
|
11757
11931
|
return segments;
|
|
11758
11932
|
}
|
|
11759
11933
|
});
|
|
11760
|
-
enifed('ember-template-compiler/plugins', ['exports'], function (exports) {
|
|
11761
|
-
/**
|
|
11762
|
-
@module ember
|
|
11763
|
-
@submodule ember-template-compiler
|
|
11764
|
-
*/
|
|
11765
|
-
|
|
11766
|
-
/**
|
|
11767
|
-
@private
|
|
11768
|
-
@property helpers
|
|
11769
|
-
*/
|
|
11770
|
-
'use strict';
|
|
11771
|
-
|
|
11772
|
-
exports.registerPlugin = registerPlugin;
|
|
11773
|
-
var plugins = {
|
|
11774
|
-
ast: []
|
|
11775
|
-
};
|
|
11776
|
-
|
|
11777
|
-
/**
|
|
11778
|
-
Adds an AST plugin to be used by Ember.HTMLBars.compile.
|
|
11779
|
-
|
|
11780
|
-
@private
|
|
11781
|
-
@method registerASTPlugin
|
|
11782
|
-
*/
|
|
11783
|
-
|
|
11784
|
-
function registerPlugin(type, Plugin) {
|
|
11785
|
-
if (!plugins[type]) {
|
|
11786
|
-
throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.');
|
|
11787
|
-
}
|
|
11788
|
-
|
|
11789
|
-
plugins[type].push(Plugin);
|
|
11790
|
-
}
|
|
11791
|
-
|
|
11792
|
-
exports.default = plugins;
|
|
11793
|
-
});
|
|
11794
11934
|
enifed('ember-template-compiler/system/calculate-location-display', ['exports'], function (exports) {
|
|
11795
11935
|
'use strict';
|
|
11796
11936
|
|
|
@@ -11958,41 +12098,22 @@ enifed('ember-template-compiler/system/template', ['exports', 'htmlbars-runtime/
|
|
|
11958
12098
|
|
|
11959
12099
|
exports.default = function (templateSpec) {
|
|
11960
12100
|
if (!templateSpec.render) {
|
|
11961
|
-
templateSpec = _htmlbarsRuntimeHooks.wrap(templateSpec);
|
|
11962
|
-
}
|
|
11963
|
-
|
|
11964
|
-
templateSpec.isTop = true;
|
|
11965
|
-
templateSpec.isMethod = false;
|
|
11966
|
-
|
|
11967
|
-
return templateSpec;
|
|
11968
|
-
};
|
|
11969
|
-
});
|
|
11970
|
-
enifed('ember-template-compiler', ['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-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-each-into-collection', 'ember-template-compiler/plugins/assert-no-view-and-controller-paths', 'ember-template-compiler/plugins/assert-no-view-helper', 'ember-template-compiler/compat'], function (exports, _emberMetal, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths, _emberTemplateCompilerPluginsAssertNoViewHelper, _emberTemplateCompilerCompat) {
|
|
11971
|
-
'use strict';
|
|
11972
|
-
|
|
11973
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax.default);
|
|
11974
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldClassBindingSyntax.default);
|
|
11975
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformItemClass.default);
|
|
11976
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut.default);
|
|
11977
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly.default);
|
|
11978
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformAngleBracketComponents.default);
|
|
11979
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformInputOnToOnEvent.default);
|
|
11980
|
-
|
|
11981
|
-
if (_emberMetal.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
|
11982
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachIntoCollection.default);
|
|
11983
|
-
} else {
|
|
11984
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths.default);
|
|
11985
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewHelper.default);
|
|
11986
|
-
}
|
|
12101
|
+
templateSpec = _htmlbarsRuntimeHooks.wrap(templateSpec);
|
|
12102
|
+
}
|
|
11987
12103
|
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
12104
|
+
templateSpec.isTop = true;
|
|
12105
|
+
templateSpec.isMethod = false;
|
|
12106
|
+
|
|
12107
|
+
return templateSpec;
|
|
12108
|
+
};
|
|
11993
12109
|
});
|
|
12110
|
+
enifed("htmlbars-compiler", ["exports", "./htmlbars-compiler/compiler"], function (exports, _htmlbarsCompilerCompiler) {
|
|
12111
|
+
"use strict";
|
|
11994
12112
|
|
|
11995
|
-
|
|
12113
|
+
exports.compile = _htmlbarsCompilerCompiler.compile;
|
|
12114
|
+
exports.compileSpec = _htmlbarsCompilerCompiler.compileSpec;
|
|
12115
|
+
exports.template = _htmlbarsCompilerCompiler.template;
|
|
12116
|
+
});
|
|
11996
12117
|
enifed("htmlbars-compiler/compiler", ["exports", "../htmlbars-syntax/parser", "./template-compiler", "../htmlbars-runtime/hooks", "../htmlbars-runtime/render"], function (exports, _htmlbarsSyntaxParser, _templateCompiler, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender) {
|
|
11997
12118
|
/*jshint evil:true*/
|
|
11998
12119
|
"use strict";
|
|
@@ -13272,12 +13393,23 @@ enifed("htmlbars-compiler/utils", ["exports"], function (exports) {
|
|
|
13272
13393
|
}
|
|
13273
13394
|
}
|
|
13274
13395
|
});
|
|
13275
|
-
enifed(
|
|
13276
|
-
|
|
13396
|
+
enifed('htmlbars-runtime', ['exports', './htmlbars-runtime/hooks', './htmlbars-runtime/render', '../htmlbars-util/morph-utils', '../htmlbars-util/template-utils', './htmlbars-runtime/expression-visitor', 'htmlbars-runtime/hooks'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils, _htmlbarsRuntimeExpressionVisitor, _htmlbarsRuntimeHooks2) {
|
|
13397
|
+
'use strict';
|
|
13277
13398
|
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13399
|
+
var internal = {
|
|
13400
|
+
blockFor: _htmlbarsUtilTemplateUtils.blockFor,
|
|
13401
|
+
manualElement: _htmlbarsRuntimeRender.manualElement,
|
|
13402
|
+
hostBlock: _htmlbarsRuntimeHooks2.hostBlock,
|
|
13403
|
+
continueBlock: _htmlbarsRuntimeHooks2.continueBlock,
|
|
13404
|
+
hostYieldWithShadowTemplate: _htmlbarsRuntimeHooks2.hostYieldWithShadowTemplate,
|
|
13405
|
+
visitChildren: _htmlbarsUtilMorphUtils.visitChildren,
|
|
13406
|
+
validateChildMorphs: _htmlbarsRuntimeExpressionVisitor.validateChildMorphs,
|
|
13407
|
+
clearMorph: _htmlbarsUtilTemplateUtils.clearMorph
|
|
13408
|
+
};
|
|
13409
|
+
|
|
13410
|
+
exports.hooks = _htmlbarsRuntimeHooks.default;
|
|
13411
|
+
exports.render = _htmlbarsRuntimeRender.default;
|
|
13412
|
+
exports.internal = internal;
|
|
13281
13413
|
});
|
|
13282
13414
|
enifed("htmlbars-runtime/expression-visitor", ["exports", "../htmlbars-util/object-utils", "../htmlbars-util/morph-utils"], function (exports, _htmlbarsUtilObjectUtils, _htmlbarsUtilMorphUtils) {
|
|
13283
13415
|
"use strict";
|
|
@@ -15150,23 +15282,14 @@ enifed("htmlbars-runtime/render", ["exports", "../htmlbars-util/array-utils", ".
|
|
|
15150
15282
|
return fragment;
|
|
15151
15283
|
}
|
|
15152
15284
|
});
|
|
15153
|
-
enifed(
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
var internal = {
|
|
15157
|
-
blockFor: _htmlbarsUtilTemplateUtils.blockFor,
|
|
15158
|
-
manualElement: _htmlbarsRuntimeRender.manualElement,
|
|
15159
|
-
hostBlock: _htmlbarsRuntimeHooks2.hostBlock,
|
|
15160
|
-
continueBlock: _htmlbarsRuntimeHooks2.continueBlock,
|
|
15161
|
-
hostYieldWithShadowTemplate: _htmlbarsRuntimeHooks2.hostYieldWithShadowTemplate,
|
|
15162
|
-
visitChildren: _htmlbarsUtilMorphUtils.visitChildren,
|
|
15163
|
-
validateChildMorphs: _htmlbarsRuntimeExpressionVisitor.validateChildMorphs,
|
|
15164
|
-
clearMorph: _htmlbarsUtilTemplateUtils.clearMorph
|
|
15165
|
-
};
|
|
15285
|
+
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) {
|
|
15286
|
+
"use strict";
|
|
15166
15287
|
|
|
15167
|
-
exports.
|
|
15168
|
-
exports.
|
|
15169
|
-
exports.
|
|
15288
|
+
exports.builders = _htmlbarsSyntaxBuilders.default;
|
|
15289
|
+
exports.parse = _htmlbarsSyntaxParser.default;
|
|
15290
|
+
exports.print = _htmlbarsSyntaxGenerationPrint.default;
|
|
15291
|
+
exports.traverse = _htmlbarsSyntaxTraversalTraverse.default;
|
|
15292
|
+
exports.Walker = _htmlbarsSyntaxTraversalWalker.default;
|
|
15170
15293
|
});
|
|
15171
15294
|
enifed("htmlbars-syntax/builders", ["exports"], function (exports) {
|
|
15172
15295
|
// Statements
|
|
@@ -17103,6 +17226,95 @@ enifed('htmlbars-syntax/handlebars/utils', ['exports'], function (exports) {
|
|
|
17103
17226
|
return (contextPath ? contextPath + '.' : '') + id;
|
|
17104
17227
|
}
|
|
17105
17228
|
});
|
|
17229
|
+
enifed("htmlbars-syntax/parser", ["exports", "./handlebars/compiler/base", "../htmlbars-syntax", "../simple-html-tokenizer/evented-tokenizer", "../simple-html-tokenizer/entity-parser", "../simple-html-tokenizer/char-refs/full", "./parser/handlebars-node-visitors", "./parser/tokenizer-event-handlers"], function (exports, _handlebarsCompilerBase, _htmlbarsSyntax, _simpleHtmlTokenizerEventedTokenizer, _simpleHtmlTokenizerEntityParser, _simpleHtmlTokenizerCharRefsFull, _parserHandlebarsNodeVisitors, _parserTokenizerEventHandlers) {
|
|
17230
|
+
"use strict";
|
|
17231
|
+
|
|
17232
|
+
exports.preprocess = preprocess;
|
|
17233
|
+
exports.Parser = Parser;
|
|
17234
|
+
|
|
17235
|
+
function preprocess(html, options) {
|
|
17236
|
+
var ast = typeof html === 'object' ? html : _handlebarsCompilerBase.parse(html);
|
|
17237
|
+
var combined = new Parser(html, options).acceptNode(ast);
|
|
17238
|
+
|
|
17239
|
+
if (options && options.plugins && options.plugins.ast) {
|
|
17240
|
+
for (var i = 0, l = options.plugins.ast.length; i < l; i++) {
|
|
17241
|
+
var plugin = new options.plugins.ast[i](options);
|
|
17242
|
+
|
|
17243
|
+
plugin.syntax = _htmlbarsSyntax;
|
|
17244
|
+
|
|
17245
|
+
combined = plugin.transform(combined);
|
|
17246
|
+
}
|
|
17247
|
+
}
|
|
17248
|
+
|
|
17249
|
+
return combined;
|
|
17250
|
+
}
|
|
17251
|
+
|
|
17252
|
+
exports.default = preprocess;
|
|
17253
|
+
|
|
17254
|
+
var entityParser = new _simpleHtmlTokenizerEntityParser.default(_simpleHtmlTokenizerCharRefsFull.default);
|
|
17255
|
+
|
|
17256
|
+
function Parser(source, options) {
|
|
17257
|
+
this.options = options || {};
|
|
17258
|
+
this.elementStack = [];
|
|
17259
|
+
this.tokenizer = new _simpleHtmlTokenizerEventedTokenizer.default(this, entityParser);
|
|
17260
|
+
|
|
17261
|
+
this.currentNode = null;
|
|
17262
|
+
this.currentAttribute = null;
|
|
17263
|
+
|
|
17264
|
+
if (typeof source === 'string') {
|
|
17265
|
+
this.source = source.split(/(?:\r\n?|\n)/g);
|
|
17266
|
+
}
|
|
17267
|
+
}
|
|
17268
|
+
|
|
17269
|
+
for (var key in _parserHandlebarsNodeVisitors.default) {
|
|
17270
|
+
Parser.prototype[key] = _parserHandlebarsNodeVisitors.default[key];
|
|
17271
|
+
}
|
|
17272
|
+
|
|
17273
|
+
for (var key in _parserTokenizerEventHandlers.default) {
|
|
17274
|
+
Parser.prototype[key] = _parserTokenizerEventHandlers.default[key];
|
|
17275
|
+
}
|
|
17276
|
+
|
|
17277
|
+
Parser.prototype.acceptNode = function (node) {
|
|
17278
|
+
return this[node.type](node);
|
|
17279
|
+
};
|
|
17280
|
+
|
|
17281
|
+
Parser.prototype.currentElement = function () {
|
|
17282
|
+
return this.elementStack[this.elementStack.length - 1];
|
|
17283
|
+
};
|
|
17284
|
+
|
|
17285
|
+
Parser.prototype.sourceForMustache = function (mustache) {
|
|
17286
|
+
var firstLine = mustache.loc.start.line - 1;
|
|
17287
|
+
var lastLine = mustache.loc.end.line - 1;
|
|
17288
|
+
var currentLine = firstLine - 1;
|
|
17289
|
+
var firstColumn = mustache.loc.start.column + 2;
|
|
17290
|
+
var lastColumn = mustache.loc.end.column - 2;
|
|
17291
|
+
var string = [];
|
|
17292
|
+
var line;
|
|
17293
|
+
|
|
17294
|
+
if (!this.source) {
|
|
17295
|
+
return '{{' + mustache.path.id.original + '}}';
|
|
17296
|
+
}
|
|
17297
|
+
|
|
17298
|
+
while (currentLine < lastLine) {
|
|
17299
|
+
currentLine++;
|
|
17300
|
+
line = this.source[currentLine];
|
|
17301
|
+
|
|
17302
|
+
if (currentLine === firstLine) {
|
|
17303
|
+
if (firstLine === lastLine) {
|
|
17304
|
+
string.push(line.slice(firstColumn, lastColumn));
|
|
17305
|
+
} else {
|
|
17306
|
+
string.push(line.slice(firstColumn));
|
|
17307
|
+
}
|
|
17308
|
+
} else if (currentLine === lastLine) {
|
|
17309
|
+
string.push(line.slice(0, lastColumn));
|
|
17310
|
+
} else {
|
|
17311
|
+
string.push(line);
|
|
17312
|
+
}
|
|
17313
|
+
}
|
|
17314
|
+
|
|
17315
|
+
return string.join('\n');
|
|
17316
|
+
};
|
|
17317
|
+
});
|
|
17106
17318
|
enifed("htmlbars-syntax/parser/handlebars-node-visitors", ["exports", "../builders", "../utils"], function (exports, _builders, _utils) {
|
|
17107
17319
|
"use strict";
|
|
17108
17320
|
|
|
@@ -17538,95 +17750,6 @@ enifed("htmlbars-syntax/parser/tokenizer-event-handlers", ["exports", "../../htm
|
|
|
17538
17750
|
return "`" + tag.name + "` (on line " + tag.loc.end.line + ")";
|
|
17539
17751
|
}
|
|
17540
17752
|
});
|
|
17541
|
-
enifed("htmlbars-syntax/parser", ["exports", "./handlebars/compiler/base", "../htmlbars-syntax", "../simple-html-tokenizer/evented-tokenizer", "../simple-html-tokenizer/entity-parser", "../simple-html-tokenizer/char-refs/full", "./parser/handlebars-node-visitors", "./parser/tokenizer-event-handlers"], function (exports, _handlebarsCompilerBase, _htmlbarsSyntax, _simpleHtmlTokenizerEventedTokenizer, _simpleHtmlTokenizerEntityParser, _simpleHtmlTokenizerCharRefsFull, _parserHandlebarsNodeVisitors, _parserTokenizerEventHandlers) {
|
|
17542
|
-
"use strict";
|
|
17543
|
-
|
|
17544
|
-
exports.preprocess = preprocess;
|
|
17545
|
-
exports.Parser = Parser;
|
|
17546
|
-
|
|
17547
|
-
function preprocess(html, options) {
|
|
17548
|
-
var ast = typeof html === 'object' ? html : _handlebarsCompilerBase.parse(html);
|
|
17549
|
-
var combined = new Parser(html, options).acceptNode(ast);
|
|
17550
|
-
|
|
17551
|
-
if (options && options.plugins && options.plugins.ast) {
|
|
17552
|
-
for (var i = 0, l = options.plugins.ast.length; i < l; i++) {
|
|
17553
|
-
var plugin = new options.plugins.ast[i](options);
|
|
17554
|
-
|
|
17555
|
-
plugin.syntax = _htmlbarsSyntax;
|
|
17556
|
-
|
|
17557
|
-
combined = plugin.transform(combined);
|
|
17558
|
-
}
|
|
17559
|
-
}
|
|
17560
|
-
|
|
17561
|
-
return combined;
|
|
17562
|
-
}
|
|
17563
|
-
|
|
17564
|
-
exports.default = preprocess;
|
|
17565
|
-
|
|
17566
|
-
var entityParser = new _simpleHtmlTokenizerEntityParser.default(_simpleHtmlTokenizerCharRefsFull.default);
|
|
17567
|
-
|
|
17568
|
-
function Parser(source, options) {
|
|
17569
|
-
this.options = options || {};
|
|
17570
|
-
this.elementStack = [];
|
|
17571
|
-
this.tokenizer = new _simpleHtmlTokenizerEventedTokenizer.default(this, entityParser);
|
|
17572
|
-
|
|
17573
|
-
this.currentNode = null;
|
|
17574
|
-
this.currentAttribute = null;
|
|
17575
|
-
|
|
17576
|
-
if (typeof source === 'string') {
|
|
17577
|
-
this.source = source.split(/(?:\r\n?|\n)/g);
|
|
17578
|
-
}
|
|
17579
|
-
}
|
|
17580
|
-
|
|
17581
|
-
for (var key in _parserHandlebarsNodeVisitors.default) {
|
|
17582
|
-
Parser.prototype[key] = _parserHandlebarsNodeVisitors.default[key];
|
|
17583
|
-
}
|
|
17584
|
-
|
|
17585
|
-
for (var key in _parserTokenizerEventHandlers.default) {
|
|
17586
|
-
Parser.prototype[key] = _parserTokenizerEventHandlers.default[key];
|
|
17587
|
-
}
|
|
17588
|
-
|
|
17589
|
-
Parser.prototype.acceptNode = function (node) {
|
|
17590
|
-
return this[node.type](node);
|
|
17591
|
-
};
|
|
17592
|
-
|
|
17593
|
-
Parser.prototype.currentElement = function () {
|
|
17594
|
-
return this.elementStack[this.elementStack.length - 1];
|
|
17595
|
-
};
|
|
17596
|
-
|
|
17597
|
-
Parser.prototype.sourceForMustache = function (mustache) {
|
|
17598
|
-
var firstLine = mustache.loc.start.line - 1;
|
|
17599
|
-
var lastLine = mustache.loc.end.line - 1;
|
|
17600
|
-
var currentLine = firstLine - 1;
|
|
17601
|
-
var firstColumn = mustache.loc.start.column + 2;
|
|
17602
|
-
var lastColumn = mustache.loc.end.column - 2;
|
|
17603
|
-
var string = [];
|
|
17604
|
-
var line;
|
|
17605
|
-
|
|
17606
|
-
if (!this.source) {
|
|
17607
|
-
return '{{' + mustache.path.id.original + '}}';
|
|
17608
|
-
}
|
|
17609
|
-
|
|
17610
|
-
while (currentLine < lastLine) {
|
|
17611
|
-
currentLine++;
|
|
17612
|
-
line = this.source[currentLine];
|
|
17613
|
-
|
|
17614
|
-
if (currentLine === firstLine) {
|
|
17615
|
-
if (firstLine === lastLine) {
|
|
17616
|
-
string.push(line.slice(firstColumn, lastColumn));
|
|
17617
|
-
} else {
|
|
17618
|
-
string.push(line.slice(firstColumn));
|
|
17619
|
-
}
|
|
17620
|
-
} else if (currentLine === lastLine) {
|
|
17621
|
-
string.push(line.slice(0, lastColumn));
|
|
17622
|
-
} else {
|
|
17623
|
-
string.push(line);
|
|
17624
|
-
}
|
|
17625
|
-
}
|
|
17626
|
-
|
|
17627
|
-
return string.join('\n');
|
|
17628
|
-
};
|
|
17629
|
-
});
|
|
17630
17753
|
enifed("htmlbars-syntax/traversal/errors", ["exports"], function (exports) {
|
|
17631
17754
|
"use strict";
|
|
17632
17755
|
|
|
@@ -17975,15 +18098,6 @@ enifed('htmlbars-syntax/utils', ['exports', '../htmlbars-util/array-utils'], fun
|
|
|
17975
18098
|
}
|
|
17976
18099
|
}
|
|
17977
18100
|
});
|
|
17978
|
-
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) {
|
|
17979
|
-
"use strict";
|
|
17980
|
-
|
|
17981
|
-
exports.builders = _htmlbarsSyntaxBuilders.default;
|
|
17982
|
-
exports.parse = _htmlbarsSyntaxParser.default;
|
|
17983
|
-
exports.print = _htmlbarsSyntaxGenerationPrint.default;
|
|
17984
|
-
exports.traverse = _htmlbarsSyntaxTraversalTraverse.default;
|
|
17985
|
-
exports.Walker = _htmlbarsSyntaxTraversalWalker.default;
|
|
17986
|
-
});
|
|
17987
18101
|
enifed("htmlbars-test-helpers", ["exports", "../simple-html-tokenizer", "../htmlbars-util/array-utils"], function (exports, _simpleHtmlTokenizer, _htmlbarsUtilArrayUtils) {
|
|
17988
18102
|
"use strict";
|
|
17989
18103
|
|
|
@@ -18111,6 +18225,16 @@ enifed("htmlbars-test-helpers", ["exports", "../simple-html-tokenizer", "../html
|
|
|
18111
18225
|
}
|
|
18112
18226
|
}
|
|
18113
18227
|
});
|
|
18228
|
+
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) {
|
|
18229
|
+
'use strict';
|
|
18230
|
+
|
|
18231
|
+
exports.SafeString = _htmlbarsUtilSafeString.default;
|
|
18232
|
+
exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression;
|
|
18233
|
+
exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace;
|
|
18234
|
+
exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs;
|
|
18235
|
+
exports.linkParams = _htmlbarsUtilMorphUtils.linkParams;
|
|
18236
|
+
exports.dump = _htmlbarsUtilMorphUtils.dump;
|
|
18237
|
+
});
|
|
18114
18238
|
enifed('htmlbars-util/array-utils', ['exports'], function (exports) {
|
|
18115
18239
|
'use strict';
|
|
18116
18240
|
|
|
@@ -18669,320 +18793,53 @@ enifed("htmlbars-util/template-utils", ["exports", "../htmlbars-util/morph-utils
|
|
|
18669
18793
|
}
|
|
18670
18794
|
if (destroySelf && destroy) {
|
|
18671
18795
|
destroy(morph);
|
|
18672
|
-
}
|
|
18673
|
-
|
|
18674
|
-
_htmlbarsUtilMorphUtils.visitChildren(morph.childNodes, destroyNode);
|
|
18675
|
-
|
|
18676
|
-
// TODO: Deal with logical children that are not in the DOM tree
|
|
18677
|
-
morph.clear();
|
|
18678
|
-
if (didCleanup) {
|
|
18679
|
-
didCleanup(env, morph, destroySelf);
|
|
18680
|
-
}
|
|
18681
|
-
|
|
18682
|
-
morph.lastResult = null;
|
|
18683
|
-
morph.lastYielded = null;
|
|
18684
|
-
morph.childNodes = null;
|
|
18685
|
-
}
|
|
18686
|
-
|
|
18687
|
-
function clearMorphList(morphList, morph, env) {
|
|
18688
|
-
var item = morphList.firstChildMorph;
|
|
18689
|
-
|
|
18690
|
-
while (item) {
|
|
18691
|
-
var next = item.nextMorph;
|
|
18692
|
-
delete morph.morphMap[item.key];
|
|
18693
|
-
clearMorph(item, env, true);
|
|
18694
|
-
item.destroy();
|
|
18695
|
-
|
|
18696
|
-
item = next;
|
|
18697
|
-
}
|
|
18698
|
-
|
|
18699
|
-
// Remove the MorphList from the morph.
|
|
18700
|
-
morphList.clear();
|
|
18701
|
-
morph.morphList = null;
|
|
18702
|
-
}
|
|
18703
|
-
});
|
|
18704
|
-
enifed("htmlbars-util/void-tag-names", ["exports", "./array-utils"], function (exports, _arrayUtils) {
|
|
18705
|
-
"use strict";
|
|
18706
|
-
|
|
18707
|
-
// The HTML elements in this list are speced by
|
|
18708
|
-
// http://www.w3.org/TR/html-markup/syntax.html#syntax-elements,
|
|
18709
|
-
// and will be forced to close regardless of if they have a
|
|
18710
|
-
// self-closing /> at the end.
|
|
18711
|
-
var voidTagNames = "area base br col command embed hr img input keygen link meta param source track wbr";
|
|
18712
|
-
var voidMap = {};
|
|
18713
|
-
|
|
18714
|
-
_arrayUtils.forEach(voidTagNames.split(" "), function (tagName) {
|
|
18715
|
-
voidMap[tagName] = true;
|
|
18716
|
-
});
|
|
18717
|
-
|
|
18718
|
-
exports.default = voidMap;
|
|
18719
|
-
});
|
|
18720
|
-
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) {
|
|
18721
|
-
'use strict';
|
|
18722
|
-
|
|
18723
|
-
exports.SafeString = _htmlbarsUtilSafeString.default;
|
|
18724
|
-
exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression;
|
|
18725
|
-
exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace;
|
|
18726
|
-
exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs;
|
|
18727
|
-
exports.linkParams = _htmlbarsUtilMorphUtils.linkParams;
|
|
18728
|
-
exports.dump = _htmlbarsUtilMorphUtils.dump;
|
|
18729
|
-
});
|
|
18730
|
-
(function() {
|
|
18731
|
-
})();
|
|
18732
|
-
/*!
|
|
18733
|
-
* @overview Ember - JavaScript Application Framework
|
|
18734
|
-
* @copyright Copyright 2011-2015 Tilde Inc. and contributors
|
|
18735
|
-
* Portions Copyright 2006-2011 Strobe Inc.
|
|
18736
|
-
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
18737
|
-
* @license Licensed under MIT license
|
|
18738
|
-
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
18739
|
-
* @version 2.0.3
|
|
18740
|
-
*/
|
|
18741
|
-
|
|
18742
|
-
var enifed, requireModule, eriuqer, requirejs, Ember;
|
|
18743
|
-
var mainContext = this;
|
|
18744
|
-
|
|
18745
|
-
(function() {
|
|
18746
|
-
var isNode = typeof window === 'undefined' &&
|
|
18747
|
-
typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
|
|
18748
|
-
|
|
18749
|
-
if (!isNode) {
|
|
18750
|
-
Ember = this.Ember = this.Ember || {};
|
|
18751
|
-
}
|
|
18752
|
-
|
|
18753
|
-
if (typeof Ember === 'undefined') { Ember = {}; };
|
|
18754
|
-
|
|
18755
|
-
if (typeof Ember.__loader === 'undefined') {
|
|
18756
|
-
var registry = {};
|
|
18757
|
-
var seen = {};
|
|
18758
|
-
|
|
18759
|
-
enifed = function(name, deps, callback) {
|
|
18760
|
-
var value = { };
|
|
18761
|
-
|
|
18762
|
-
if (!callback) {
|
|
18763
|
-
value.deps = [];
|
|
18764
|
-
value.callback = deps;
|
|
18765
|
-
} else {
|
|
18766
|
-
value.deps = deps;
|
|
18767
|
-
value.callback = callback;
|
|
18768
|
-
}
|
|
18769
|
-
|
|
18770
|
-
registry[name] = value;
|
|
18771
|
-
};
|
|
18772
|
-
|
|
18773
|
-
requirejs = eriuqer = requireModule = function(name) {
|
|
18774
|
-
return internalRequire(name, null);
|
|
18775
|
-
}
|
|
18776
|
-
|
|
18777
|
-
function internalRequire(name, referrerName) {
|
|
18778
|
-
var exports = seen[name];
|
|
18779
|
-
|
|
18780
|
-
if (exports !== undefined) {
|
|
18781
|
-
return exports;
|
|
18782
|
-
}
|
|
18783
|
-
|
|
18784
|
-
exports = seen[name] = {};
|
|
18785
|
-
|
|
18786
|
-
if (!registry[name]) {
|
|
18787
|
-
if (referrerName) {
|
|
18788
|
-
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
|
18789
|
-
} else {
|
|
18790
|
-
throw new Error('Could not find module ' + name);
|
|
18791
|
-
}
|
|
18792
|
-
}
|
|
18793
|
-
|
|
18794
|
-
var mod = registry[name];
|
|
18795
|
-
var deps = mod.deps;
|
|
18796
|
-
var callback = mod.callback;
|
|
18797
|
-
var reified = [];
|
|
18798
|
-
var length = deps.length;
|
|
18799
|
-
|
|
18800
|
-
for (var i=0; i<length; i++) {
|
|
18801
|
-
if (deps[i] === 'exports') {
|
|
18802
|
-
reified.push(exports);
|
|
18803
|
-
} else {
|
|
18804
|
-
reified.push(internalRequire(resolve(deps[i], name), name));
|
|
18805
|
-
}
|
|
18806
|
-
}
|
|
18807
|
-
|
|
18808
|
-
callback.apply(this, reified);
|
|
18809
|
-
|
|
18810
|
-
return exports;
|
|
18811
|
-
};
|
|
18812
|
-
|
|
18813
|
-
function resolve(child, name) {
|
|
18814
|
-
if (child.charAt(0) !== '.') {
|
|
18815
|
-
return child;
|
|
18816
|
-
}
|
|
18817
|
-
var parts = child.split('/');
|
|
18818
|
-
var parentBase = name.split('/').slice(0, -1);
|
|
18819
|
-
|
|
18820
|
-
for (var i=0, l=parts.length; i<l; i++) {
|
|
18821
|
-
var part = parts[i];
|
|
18822
|
-
|
|
18823
|
-
if (part === '..') {
|
|
18824
|
-
parentBase.pop();
|
|
18825
|
-
} else if (part === '.') {
|
|
18826
|
-
continue;
|
|
18827
|
-
} else {
|
|
18828
|
-
parentBase.push(part);
|
|
18829
|
-
}
|
|
18830
|
-
}
|
|
18831
|
-
|
|
18832
|
-
return parentBase.join('/');
|
|
18833
|
-
}
|
|
18834
|
-
|
|
18835
|
-
requirejs._eak_seen = registry;
|
|
18836
|
-
|
|
18837
|
-
Ember.__loader = {
|
|
18838
|
-
define: enifed,
|
|
18839
|
-
require: eriuqer,
|
|
18840
|
-
registry: registry
|
|
18841
|
-
};
|
|
18842
|
-
} else {
|
|
18843
|
-
enifed = Ember.__loader.define;
|
|
18844
|
-
requirejs = eriuqer = requireModule = Ember.__loader.require;
|
|
18845
|
-
}
|
|
18846
|
-
})();
|
|
18847
|
-
|
|
18848
|
-
enifed('morph-range/morph-list', ['exports', './utils'], function (exports, _utils) {
|
|
18849
|
-
'use strict';
|
|
18850
|
-
|
|
18851
|
-
function MorphList() {
|
|
18852
|
-
// morph graph
|
|
18853
|
-
this.firstChildMorph = null;
|
|
18854
|
-
this.lastChildMorph = null;
|
|
18855
|
-
|
|
18856
|
-
this.mountedMorph = null;
|
|
18857
|
-
}
|
|
18858
|
-
|
|
18859
|
-
var prototype = MorphList.prototype;
|
|
18860
|
-
|
|
18861
|
-
prototype.clear = function MorphList$clear() {
|
|
18862
|
-
var current = this.firstChildMorph;
|
|
18863
|
-
|
|
18864
|
-
while (current) {
|
|
18865
|
-
var next = current.nextMorph;
|
|
18866
|
-
current.previousMorph = null;
|
|
18867
|
-
current.nextMorph = null;
|
|
18868
|
-
current.parentMorphList = null;
|
|
18869
|
-
current = next;
|
|
18870
|
-
}
|
|
18871
|
-
|
|
18872
|
-
this.firstChildMorph = this.lastChildMorph = null;
|
|
18873
|
-
};
|
|
18874
|
-
|
|
18875
|
-
prototype.destroy = function MorphList$destroy() {};
|
|
18876
|
-
|
|
18877
|
-
prototype.appendMorph = function MorphList$appendMorph(morph) {
|
|
18878
|
-
this.insertBeforeMorph(morph, null);
|
|
18879
|
-
};
|
|
18880
|
-
|
|
18881
|
-
prototype.insertBeforeMorph = function MorphList$insertBeforeMorph(morph, referenceMorph) {
|
|
18882
|
-
if (morph.parentMorphList !== null) {
|
|
18883
|
-
morph.unlink();
|
|
18884
|
-
}
|
|
18885
|
-
if (referenceMorph && referenceMorph.parentMorphList !== this) {
|
|
18886
|
-
throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.');
|
|
18887
|
-
}
|
|
18888
|
-
|
|
18889
|
-
var mountedMorph = this.mountedMorph;
|
|
18890
|
-
|
|
18891
|
-
if (mountedMorph) {
|
|
18892
|
-
|
|
18893
|
-
var parentNode = mountedMorph.firstNode.parentNode;
|
|
18894
|
-
var referenceNode = referenceMorph ? referenceMorph.firstNode : mountedMorph.lastNode.nextSibling;
|
|
18895
|
-
|
|
18896
|
-
_utils.insertBefore(parentNode, morph.firstNode, morph.lastNode, referenceNode);
|
|
18897
|
-
|
|
18898
|
-
// was not in list mode replace current content
|
|
18899
|
-
if (!this.firstChildMorph) {
|
|
18900
|
-
_utils.clear(this.mountedMorph.firstNode.parentNode, this.mountedMorph.firstNode, this.mountedMorph.lastNode);
|
|
18901
|
-
}
|
|
18902
|
-
}
|
|
18903
|
-
|
|
18904
|
-
morph.parentMorphList = this;
|
|
18905
|
-
|
|
18906
|
-
var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph;
|
|
18907
|
-
if (previousMorph) {
|
|
18908
|
-
previousMorph.nextMorph = morph;
|
|
18909
|
-
morph.previousMorph = previousMorph;
|
|
18910
|
-
} else {
|
|
18911
|
-
this.firstChildMorph = morph;
|
|
18912
|
-
}
|
|
18913
|
-
|
|
18914
|
-
if (referenceMorph) {
|
|
18915
|
-
referenceMorph.previousMorph = morph;
|
|
18916
|
-
morph.nextMorph = referenceMorph;
|
|
18917
|
-
} else {
|
|
18918
|
-
this.lastChildMorph = morph;
|
|
18919
|
-
}
|
|
18920
|
-
|
|
18921
|
-
this.firstChildMorph._syncFirstNode();
|
|
18922
|
-
this.lastChildMorph._syncLastNode();
|
|
18923
|
-
};
|
|
18796
|
+
}
|
|
18924
18797
|
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
18798
|
+
_htmlbarsUtilMorphUtils.visitChildren(morph.childNodes, destroyNode);
|
|
18799
|
+
|
|
18800
|
+
// TODO: Deal with logical children that are not in the DOM tree
|
|
18801
|
+
morph.clear();
|
|
18802
|
+
if (didCleanup) {
|
|
18803
|
+
didCleanup(env, morph, destroySelf);
|
|
18928
18804
|
}
|
|
18929
18805
|
|
|
18930
|
-
morph.
|
|
18931
|
-
|
|
18806
|
+
morph.lastResult = null;
|
|
18807
|
+
morph.lastYielded = null;
|
|
18808
|
+
morph.childNodes = null;
|
|
18809
|
+
}
|
|
18932
18810
|
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
enifed('morph-range/morph-list.umd', ['exports', './morph-list'], function (exports, _morphList) {
|
|
18936
|
-
'use strict';
|
|
18811
|
+
function clearMorphList(morphList, morph, env) {
|
|
18812
|
+
var item = morphList.firstChildMorph;
|
|
18937
18813
|
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18814
|
+
while (item) {
|
|
18815
|
+
var next = item.nextMorph;
|
|
18816
|
+
delete morph.morphMap[item.key];
|
|
18817
|
+
clearMorph(item, env, true);
|
|
18818
|
+
item.destroy();
|
|
18819
|
+
|
|
18820
|
+
item = next;
|
|
18945
18821
|
}
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18822
|
+
|
|
18823
|
+
// Remove the MorphList from the morph.
|
|
18824
|
+
morphList.clear();
|
|
18825
|
+
morph.morphList = null;
|
|
18826
|
+
}
|
|
18949
18827
|
});
|
|
18950
|
-
enifed("
|
|
18951
|
-
// inclusive of both nodes
|
|
18828
|
+
enifed("htmlbars-util/void-tag-names", ["exports", "./array-utils"], function (exports, _arrayUtils) {
|
|
18952
18829
|
"use strict";
|
|
18953
18830
|
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
}
|
|
18831
|
+
// The HTML elements in this list are speced by
|
|
18832
|
+
// http://www.w3.org/TR/html-markup/syntax.html#syntax-elements,
|
|
18833
|
+
// and will be forced to close regardless of if they have a
|
|
18834
|
+
// self-closing /> at the end.
|
|
18835
|
+
var voidTagNames = "area base br col command embed hr img input keygen link meta param source track wbr";
|
|
18836
|
+
var voidMap = {};
|
|
18961
18837
|
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
nextNode = node.nextSibling;
|
|
18966
|
-
parentNode.removeChild(node);
|
|
18967
|
-
if (node === lastNode) {
|
|
18968
|
-
break;
|
|
18969
|
-
}
|
|
18970
|
-
node = nextNode;
|
|
18971
|
-
} while (node);
|
|
18972
|
-
}
|
|
18838
|
+
_arrayUtils.forEach(voidTagNames.split(" "), function (tagName) {
|
|
18839
|
+
voidMap[tagName] = true;
|
|
18840
|
+
});
|
|
18973
18841
|
|
|
18974
|
-
|
|
18975
|
-
var node = firstNode;
|
|
18976
|
-
var nextNode;
|
|
18977
|
-
do {
|
|
18978
|
-
nextNode = node.nextSibling;
|
|
18979
|
-
parentNode.insertBefore(node, refNode);
|
|
18980
|
-
if (node === lastNode) {
|
|
18981
|
-
break;
|
|
18982
|
-
}
|
|
18983
|
-
node = nextNode;
|
|
18984
|
-
} while (node);
|
|
18985
|
-
}
|
|
18842
|
+
exports.default = voidMap;
|
|
18986
18843
|
});
|
|
18987
18844
|
enifed('morph-range', ['exports', './morph-range/utils'], function (exports, _morphRangeUtils) {
|
|
18988
18845
|
'use strict';
|
|
@@ -19248,6 +19105,159 @@ enifed('morph-range', ['exports', './morph-range/utils'], function (exports, _mo
|
|
|
19248
19105
|
|
|
19249
19106
|
exports.default = Morph;
|
|
19250
19107
|
});
|
|
19108
|
+
enifed('morph-range/morph-list', ['exports', './utils'], function (exports, _utils) {
|
|
19109
|
+
'use strict';
|
|
19110
|
+
|
|
19111
|
+
function MorphList() {
|
|
19112
|
+
// morph graph
|
|
19113
|
+
this.firstChildMorph = null;
|
|
19114
|
+
this.lastChildMorph = null;
|
|
19115
|
+
|
|
19116
|
+
this.mountedMorph = null;
|
|
19117
|
+
}
|
|
19118
|
+
|
|
19119
|
+
var prototype = MorphList.prototype;
|
|
19120
|
+
|
|
19121
|
+
prototype.clear = function MorphList$clear() {
|
|
19122
|
+
var current = this.firstChildMorph;
|
|
19123
|
+
|
|
19124
|
+
while (current) {
|
|
19125
|
+
var next = current.nextMorph;
|
|
19126
|
+
current.previousMorph = null;
|
|
19127
|
+
current.nextMorph = null;
|
|
19128
|
+
current.parentMorphList = null;
|
|
19129
|
+
current = next;
|
|
19130
|
+
}
|
|
19131
|
+
|
|
19132
|
+
this.firstChildMorph = this.lastChildMorph = null;
|
|
19133
|
+
};
|
|
19134
|
+
|
|
19135
|
+
prototype.destroy = function MorphList$destroy() {};
|
|
19136
|
+
|
|
19137
|
+
prototype.appendMorph = function MorphList$appendMorph(morph) {
|
|
19138
|
+
this.insertBeforeMorph(morph, null);
|
|
19139
|
+
};
|
|
19140
|
+
|
|
19141
|
+
prototype.insertBeforeMorph = function MorphList$insertBeforeMorph(morph, referenceMorph) {
|
|
19142
|
+
if (morph.parentMorphList !== null) {
|
|
19143
|
+
morph.unlink();
|
|
19144
|
+
}
|
|
19145
|
+
if (referenceMorph && referenceMorph.parentMorphList !== this) {
|
|
19146
|
+
throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.');
|
|
19147
|
+
}
|
|
19148
|
+
|
|
19149
|
+
var mountedMorph = this.mountedMorph;
|
|
19150
|
+
|
|
19151
|
+
if (mountedMorph) {
|
|
19152
|
+
|
|
19153
|
+
var parentNode = mountedMorph.firstNode.parentNode;
|
|
19154
|
+
var referenceNode = referenceMorph ? referenceMorph.firstNode : mountedMorph.lastNode.nextSibling;
|
|
19155
|
+
|
|
19156
|
+
_utils.insertBefore(parentNode, morph.firstNode, morph.lastNode, referenceNode);
|
|
19157
|
+
|
|
19158
|
+
// was not in list mode replace current content
|
|
19159
|
+
if (!this.firstChildMorph) {
|
|
19160
|
+
_utils.clear(this.mountedMorph.firstNode.parentNode, this.mountedMorph.firstNode, this.mountedMorph.lastNode);
|
|
19161
|
+
}
|
|
19162
|
+
}
|
|
19163
|
+
|
|
19164
|
+
morph.parentMorphList = this;
|
|
19165
|
+
|
|
19166
|
+
var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph;
|
|
19167
|
+
if (previousMorph) {
|
|
19168
|
+
previousMorph.nextMorph = morph;
|
|
19169
|
+
morph.previousMorph = previousMorph;
|
|
19170
|
+
} else {
|
|
19171
|
+
this.firstChildMorph = morph;
|
|
19172
|
+
}
|
|
19173
|
+
|
|
19174
|
+
if (referenceMorph) {
|
|
19175
|
+
referenceMorph.previousMorph = morph;
|
|
19176
|
+
morph.nextMorph = referenceMorph;
|
|
19177
|
+
} else {
|
|
19178
|
+
this.lastChildMorph = morph;
|
|
19179
|
+
}
|
|
19180
|
+
|
|
19181
|
+
this.firstChildMorph._syncFirstNode();
|
|
19182
|
+
this.lastChildMorph._syncLastNode();
|
|
19183
|
+
};
|
|
19184
|
+
|
|
19185
|
+
prototype.removeChildMorph = function MorphList$removeChildMorph(morph) {
|
|
19186
|
+
if (morph.parentMorphList !== this) {
|
|
19187
|
+
throw new Error("Cannot remove a morph from a parent it is not inside of");
|
|
19188
|
+
}
|
|
19189
|
+
|
|
19190
|
+
morph.destroy();
|
|
19191
|
+
};
|
|
19192
|
+
|
|
19193
|
+
exports.default = MorphList;
|
|
19194
|
+
});
|
|
19195
|
+
enifed('morph-range/morph-list.umd', ['exports', './morph-list'], function (exports, _morphList) {
|
|
19196
|
+
'use strict';
|
|
19197
|
+
|
|
19198
|
+
(function (root, factory) {
|
|
19199
|
+
if (typeof enifed === 'function' && enifed.amd) {
|
|
19200
|
+
enifed([], factory);
|
|
19201
|
+
} else if (typeof exports === 'object') {
|
|
19202
|
+
module.exports = factory();
|
|
19203
|
+
} else {
|
|
19204
|
+
root.MorphList = factory();
|
|
19205
|
+
}
|
|
19206
|
+
})(undefined, function () {
|
|
19207
|
+
return _morphList.default;
|
|
19208
|
+
});
|
|
19209
|
+
});
|
|
19210
|
+
enifed("morph-range/utils", ["exports"], function (exports) {
|
|
19211
|
+
// inclusive of both nodes
|
|
19212
|
+
"use strict";
|
|
19213
|
+
|
|
19214
|
+
exports.clear = clear;
|
|
19215
|
+
exports.insertBefore = insertBefore;
|
|
19216
|
+
|
|
19217
|
+
function clear(parentNode, firstNode, lastNode) {
|
|
19218
|
+
if (!parentNode) {
|
|
19219
|
+
return;
|
|
19220
|
+
}
|
|
19221
|
+
|
|
19222
|
+
var node = firstNode;
|
|
19223
|
+
var nextNode;
|
|
19224
|
+
do {
|
|
19225
|
+
nextNode = node.nextSibling;
|
|
19226
|
+
parentNode.removeChild(node);
|
|
19227
|
+
if (node === lastNode) {
|
|
19228
|
+
break;
|
|
19229
|
+
}
|
|
19230
|
+
node = nextNode;
|
|
19231
|
+
} while (node);
|
|
19232
|
+
}
|
|
19233
|
+
|
|
19234
|
+
function insertBefore(parentNode, firstNode, lastNode, refNode) {
|
|
19235
|
+
var node = firstNode;
|
|
19236
|
+
var nextNode;
|
|
19237
|
+
do {
|
|
19238
|
+
nextNode = node.nextSibling;
|
|
19239
|
+
parentNode.insertBefore(node, refNode);
|
|
19240
|
+
if (node === lastNode) {
|
|
19241
|
+
break;
|
|
19242
|
+
}
|
|
19243
|
+
node = nextNode;
|
|
19244
|
+
} while (node);
|
|
19245
|
+
}
|
|
19246
|
+
});
|
|
19247
|
+
enifed('simple-html-tokenizer', ['exports', './simple-html-tokenizer/evented-tokenizer', './simple-html-tokenizer/tokenizer', './simple-html-tokenizer/tokenize', './simple-html-tokenizer/generator', './simple-html-tokenizer/generate', './simple-html-tokenizer/tokens'], function (exports, _simpleHtmlTokenizerEventedTokenizer, _simpleHtmlTokenizerTokenizer, _simpleHtmlTokenizerTokenize, _simpleHtmlTokenizerGenerator, _simpleHtmlTokenizerGenerate, _simpleHtmlTokenizerTokens) {
|
|
19248
|
+
/*jshint boss:true*/
|
|
19249
|
+
'use strict';
|
|
19250
|
+
|
|
19251
|
+
exports.EventedTokenizer = _simpleHtmlTokenizerEventedTokenizer.default;
|
|
19252
|
+
exports.Tokenizer = _simpleHtmlTokenizerTokenizer.default;
|
|
19253
|
+
exports.tokenize = _simpleHtmlTokenizerTokenize.default;
|
|
19254
|
+
exports.Generator = _simpleHtmlTokenizerGenerator.default;
|
|
19255
|
+
exports.generate = _simpleHtmlTokenizerGenerate.default;
|
|
19256
|
+
exports.StartTag = _simpleHtmlTokenizerTokens.StartTag;
|
|
19257
|
+
exports.EndTag = _simpleHtmlTokenizerTokens.EndTag;
|
|
19258
|
+
exports.Chars = _simpleHtmlTokenizerTokens.Chars;
|
|
19259
|
+
exports.Comment = _simpleHtmlTokenizerTokens.Comment;
|
|
19260
|
+
});
|
|
19251
19261
|
enifed("simple-html-tokenizer/char-refs/full", ["exports"], function (exports) {
|
|
19252
19262
|
"use strict";
|
|
19253
19263
|
|
|
@@ -22115,20 +22125,10 @@ enifed("simple-html-tokenizer/utils", ["exports"], function (exports) {
|
|
|
22115
22125
|
return input.replace(/\r\n?/g, "\n");
|
|
22116
22126
|
}
|
|
22117
22127
|
});
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
'use strict';
|
|
22128
|
+
requireModule("ember-debug");
|
|
22129
|
+
requireModule("ember-template-compiler");
|
|
22121
22130
|
|
|
22122
|
-
|
|
22123
|
-
exports.Tokenizer = _simpleHtmlTokenizerTokenizer.default;
|
|
22124
|
-
exports.tokenize = _simpleHtmlTokenizerTokenize.default;
|
|
22125
|
-
exports.Generator = _simpleHtmlTokenizerGenerator.default;
|
|
22126
|
-
exports.generate = _simpleHtmlTokenizerGenerate.default;
|
|
22127
|
-
exports.StartTag = _simpleHtmlTokenizerTokens.StartTag;
|
|
22128
|
-
exports.EndTag = _simpleHtmlTokenizerTokens.EndTag;
|
|
22129
|
-
exports.Chars = _simpleHtmlTokenizerTokens.Chars;
|
|
22130
|
-
exports.Comment = _simpleHtmlTokenizerTokens.Comment;
|
|
22131
|
-
});
|
|
22131
|
+
})();
|
|
22132
22132
|
;
|
|
22133
22133
|
if (typeof exports === "object") {
|
|
22134
22134
|
module.exports = Ember.__loader.require("ember-template-compiler");
|