ember-source 4.3.0-beta.1 → 4.4.0-alpha.3
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.
- package/blueprints/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +4 -4
- package/blueprints/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/component/index.js +2 -2
- package/blueprints/component-class/index.js +2 -2
- package/blueprints/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +7 -5
- package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/controller/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/helper/files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper/mu-files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +6 -4
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/initializer/files/__root__/initializers/__name__.js +2 -3
- package/blueprints/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +6 -7
- package/blueprints/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +3 -4
- package/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +2 -3
- package/blueprints/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +2 -2
- package/blueprints/mixin/files/__root__/mixins/__name__.js +1 -2
- package/blueprints/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/route/files/__root__/__path__/__name__.js +2 -2
- package/blueprints/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/util-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +2 -3
- package/build-metadata.json +3 -3
- package/dist/dependencies/router_js.js +1 -1
- package/dist/ember-template-compiler.js +17 -144
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +4 -2
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +843 -772
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +3 -3
- package/dist/packages/@ember/-internals/glimmer/index.js +55 -29
- package/dist/packages/@ember/-internals/metal/index.js +18 -28
- package/dist/packages/@ember/-internals/routing/lib/location/hash_location.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +67 -12
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +2 -0
- package/dist/packages/@ember/-internals/routing/lib/system/generate_controller.js +3 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +16 -9
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +15 -20
- package/dist/packages/@ember/-internals/routing/lib/utils.js +2 -1
- package/dist/packages/@ember/-internals/runtime/lib/compare.js +19 -5
- package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +4 -4
- package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +29 -29
- package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +51 -50
- package/dist/packages/@ember/-internals/utils/index.js +1 -1
- package/dist/packages/@ember/application/instance.js +3 -3
- package/dist/packages/@ember/canary-features/index.js +6 -14
- package/dist/packages/@ember/debug/lib/capture-render-tree.js +2 -0
- package/dist/packages/@ember/debug/lib/handlers.js +1 -1
- package/dist/packages/@ember/runloop/index.js +31 -528
- package/dist/packages/@ember/runloop/type-tests.ts/begin-end.test.js +5 -0
- package/dist/packages/@ember/runloop/type-tests.ts/bind.test.js +59 -0
- package/dist/packages/@ember/runloop/type-tests.ts/cancel.test.js +5 -0
- package/dist/packages/@ember/runloop/type-tests.ts/debounce.test.js +77 -0
- package/dist/packages/@ember/runloop/type-tests.ts/join.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/later.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/next.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/once.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/run.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/schedule-once.test.js +39 -0
- package/dist/packages/@ember/runloop/type-tests.ts/schedule.test.js +39 -0
- package/dist/packages/@ember/runloop/type-tests.ts/throttle.test.js +77 -0
- package/dist/packages/ember/index.js +4 -14
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +330 -245
- package/package.json +4 -4
package/dist/ember.debug.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 4.
|
|
9
|
+
* @version 4.4.0-alpha.3
|
|
10
10
|
*/
|
|
11
11
|
/* eslint-disable no-var */
|
|
12
12
|
|
|
@@ -335,8 +335,6 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
|
|
|
335
335
|
@public
|
|
336
336
|
@method factoryFor
|
|
337
337
|
@param {String} fullName
|
|
338
|
-
@param {Object} [options]
|
|
339
|
-
@param {String} [options.source] The fullname of the request source (used for local lookup)
|
|
340
338
|
@return {any}
|
|
341
339
|
*/
|
|
342
340
|
|
|
@@ -347,7 +345,9 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
|
|
|
347
345
|
}
|
|
348
346
|
|
|
349
347
|
var normalizedName = this.registry.normalize(fullName);
|
|
350
|
-
(true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName)));
|
|
348
|
+
(true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName))); // TODO: This needs to return a Factory to be compatible with Owner.
|
|
349
|
+
// We should correctly the types so that this cast is not necessary.
|
|
350
|
+
|
|
351
351
|
return factoryFor(this, normalizedName, fullName);
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -2142,7 +2142,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
|
|
|
2142
2142
|
|
|
2143
2143
|
_exports.default = _default;
|
|
2144
2144
|
});
|
|
2145
|
-
define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@glimmer/manager", "@glimmer/reference", "@glimmer/validator", "@ember/-internals/metal", "@ember/object", "@ember/-internals/browser-environment", "@ember/-internals/views", "@ember/engine", "@ember/instrumentation", "@ember/service", "@ember/string", "@glimmer/destroyable", "@ember/runloop", "@glimmer/util", "@glimmer/runtime", "@ember/-internals/runtime", "@ember/-internals/environment", "@ember/-internals/container", "@glimmer/node", "@ember/-internals/glimmer", "@glimmer/global-context", "@ember/-internals/routing", "@glimmer/program", "rsvp"], function (_exports, _opcodeCompiler, _owner2, _utils, _debug, _manager2, _reference, _validator, _metal, _object, _browserEnvironment, _views, _engine, _instrumentation, _service, _string, _destroyable, _runloop, _util, _runtime, _runtime2, _environment2, _container, _node, _glimmer, _globalContext, _routing2, _program, _rsvp) {
|
|
2145
|
+
define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@glimmer/manager", "@glimmer/reference", "@glimmer/validator", "@ember/-internals/metal", "@ember/object", "@ember/-internals/browser-environment", "@ember/-internals/views", "@ember/engine", "@ember/engine/instance", "@ember/instrumentation", "@ember/service", "@ember/string", "@glimmer/destroyable", "@ember/runloop", "@glimmer/util", "@glimmer/runtime", "@ember/-internals/runtime", "@ember/-internals/environment", "@ember/-internals/container", "@glimmer/node", "@ember/-internals/glimmer", "@glimmer/global-context", "@ember/-internals/routing", "@glimmer/program", "rsvp"], function (_exports, _opcodeCompiler, _owner2, _utils, _debug, _manager2, _reference, _validator, _metal, _object, _browserEnvironment, _views, _engine, _instance, _instrumentation, _service, _string, _destroyable, _runloop, _util, _runtime, _runtime2, _environment2, _container, _node, _glimmer, _globalContext, _routing2, _program, _rsvp) {
|
|
2146
2146
|
"use strict";
|
|
2147
2147
|
|
|
2148
2148
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -3284,11 +3284,13 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
3284
3284
|
}
|
|
3285
3285
|
|
|
3286
3286
|
get isEngine() {
|
|
3287
|
-
|
|
3287
|
+
var owner = this.owner;
|
|
3288
|
+
return owner instanceof _instance.default && (0, _engine.getEngineParent)(owner) !== undefined;
|
|
3288
3289
|
}
|
|
3289
3290
|
|
|
3290
3291
|
get engineMountPoint() {
|
|
3291
|
-
|
|
3292
|
+
var owner = this.owner;
|
|
3293
|
+
return owner instanceof _instance.default ? owner.mountPoint : undefined;
|
|
3292
3294
|
}
|
|
3293
3295
|
|
|
3294
3296
|
classFor(state) {
|
|
@@ -4158,13 +4160,12 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4158
4160
|
var self;
|
|
4159
4161
|
var fn$$1;
|
|
4160
4162
|
(true && !(action$$1 !== undefined && action$$1 !== null) && (0, _debug.assert)(`Action passed is null or undefined in (action) from ${target}.`, action$$1 !== undefined && action$$1 !== null));
|
|
4161
|
-
var typeofAction = typeof action$$1;
|
|
4162
4163
|
|
|
4163
|
-
if (
|
|
4164
|
+
if (typeof action$$1 === 'string') {
|
|
4164
4165
|
self = target;
|
|
4165
4166
|
fn$$1 = target.actions && target.actions[action$$1];
|
|
4166
4167
|
(true && !(Boolean(fn$$1)) && (0, _debug.assert)(`An action named '${action$$1}' was not found in ${target}`, Boolean(fn$$1)));
|
|
4167
|
-
} else if (
|
|
4168
|
+
} else if (typeof action$$1 === 'function') {
|
|
4168
4169
|
self = context;
|
|
4169
4170
|
fn$$1 = action$$1;
|
|
4170
4171
|
} else {
|
|
@@ -5411,6 +5412,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
5411
5412
|
|
|
5412
5413
|
if (owner.lookup('-environment:main').isInteractive) {
|
|
5413
5414
|
this.__dispatcher = owner.lookup('event_dispatcher:main');
|
|
5415
|
+
(true && !(this.__dispatcher instanceof _views.EventDispatcher) && (0, _debug.assert)('Expected dispatcher to be an EventDispatcher', this.__dispatcher instanceof _views.EventDispatcher));
|
|
5414
5416
|
} else {
|
|
5415
5417
|
// In FastBoot we have no EventDispatcher. Set to null to not try again to look it up.
|
|
5416
5418
|
this.__dispatcher = null;
|
|
@@ -6045,11 +6047,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
6045
6047
|
var currentOwner = (0, _reference.valueForRef)(currentStateRef).render.owner;
|
|
6046
6048
|
|
|
6047
6049
|
if (parentOwner && parentOwner !== currentOwner) {
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
var mountPoint = engine.mountPoint;
|
|
6052
|
-
state.engine = engine;
|
|
6050
|
+
(true && !(currentOwner instanceof _instance.default) && (0, _debug.assert)('Expected currentOwner to be an EngineInstance', currentOwner instanceof _instance.default));
|
|
6051
|
+
var mountPoint = currentOwner.mountPoint;
|
|
6052
|
+
state.engine = currentOwner;
|
|
6053
6053
|
state.engineBucket = {
|
|
6054
6054
|
mountPoint
|
|
6055
6055
|
};
|
|
@@ -6853,7 +6853,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
6853
6853
|
(true && !(typeof original === 'string') && (0, _debug.assert)('[BUG] expecting a string literal for the `original` argument', typeof original === 'string'));
|
|
6854
6854
|
return (0, _reference.createComputeRef)(() => {
|
|
6855
6855
|
var nameOrValue = (0, _reference.valueForRef)(nameOrValueRef);
|
|
6856
|
-
(true && !(typeof nameOrValue !== 'string') && (0, _debug.assert)(`Passing a dynamic string to the \`(${type})\` keyword is disallowed. ` + `(You specified \`(${type} ${original})\` and \`${original}\` evaluated into "${nameOrValue}".) ` + `This ensures we can statically analyze the template and determine which ${type}s are used. ` + `If the ${type} name is always the same, use a string literal instead, i.e. \`(${type} "${nameOrValue}")\`. ` + `Otherwise, import the ${type}s into JavaScript and pass them
|
|
6856
|
+
(true && !(typeof nameOrValue !== 'string') && (0, _debug.assert)(`Passing a dynamic string to the \`(${type})\` keyword is disallowed. ` + `(You specified \`(${type} ${original})\` and \`${original}\` evaluated into "${nameOrValue}".) ` + `This ensures we can statically analyze the template and determine which ${type}s are used. ` + `If the ${type} name is always the same, use a string literal instead, i.e. \`(${type} "${nameOrValue}")\`. ` + `Otherwise, import the ${type}s into JavaScript and pass them directly. ` + 'See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ' + loc, typeof nameOrValue !== 'string'));
|
|
6857
6857
|
return nameOrValue;
|
|
6858
6858
|
});
|
|
6859
6859
|
});
|
|
@@ -7217,6 +7217,26 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7217
7217
|
(true && !(positional.length === 1 && Object.keys(named).length === 0) && (0, _debug.assert)('unbound helper cannot be called with multiple params or hash params', positional.length === 1 && Object.keys(named).length === 0));
|
|
7218
7218
|
return (0, _reference.createUnboundRef)((0, _reference.valueForRef)(positional[0]), '(result of an `unbound` helper)');
|
|
7219
7219
|
});
|
|
7220
|
+
/**
|
|
7221
|
+
@module ember
|
|
7222
|
+
*/
|
|
7223
|
+
|
|
7224
|
+
internalHelper(() => {
|
|
7225
|
+
return (0, _reference.createConstRef)(uniqueId$1(), 'unique-id');
|
|
7226
|
+
}); // From https://gist.github.com/selfish/fef2c0ba6cdfe07af76e64cecd74888b
|
|
7227
|
+
//
|
|
7228
|
+
// This code should be reasonably fast, and provide a unique value every time
|
|
7229
|
+
// it's called, which is what we need here. It produces a string formatted as a
|
|
7230
|
+
// standard UUID, which avoids accidentally turning Ember-specific
|
|
7231
|
+
// implementation details into an intimate API.
|
|
7232
|
+
|
|
7233
|
+
function uniqueId$1() {
|
|
7234
|
+
// @ts-expect-error this one-liner abuses weird JavaScript semantics that
|
|
7235
|
+
// TypeScript (legitimately) doesn't like, but they're nonetheless valid and
|
|
7236
|
+
// specced.
|
|
7237
|
+
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, a => (a ^ Math.random() * 16 >> a / 4).toString(16));
|
|
7238
|
+
}
|
|
7239
|
+
|
|
7220
7240
|
var MODIFIERS = ['alt', 'shift', 'meta', 'ctrl'];
|
|
7221
7241
|
var POINTER_EVENT_TYPE_REGEX = /^click|mouse|touch/;
|
|
7222
7242
|
|
|
@@ -7453,6 +7473,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7453
7473
|
|
|
7454
7474
|
ensureEventSetup(actionState) {
|
|
7455
7475
|
var dispatcher = actionState.owner.lookup('event_dispatcher:main');
|
|
7476
|
+
(true && !(dispatcher instanceof _views.EventDispatcher) && (0, _debug.assert)('Expected dispatcher to be an EventDispatcher', dispatcher instanceof _views.EventDispatcher));
|
|
7456
7477
|
dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.setupHandlerForEmberEvent(actionState.eventName);
|
|
7457
7478
|
}
|
|
7458
7479
|
|
|
@@ -7506,6 +7527,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7506
7527
|
// mount is a runtime helper, this shouldn't use dynamic layout
|
|
7507
7528
|
// we should resolve the engine app template in the helper
|
|
7508
7529
|
// it also should use the owner that looked up the mount helper.
|
|
7530
|
+
(true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected owner to be an EngineInstance', owner instanceof _instance.default));
|
|
7509
7531
|
var engine = owner.buildChildEngineInstance(name);
|
|
7510
7532
|
engine.boot();
|
|
7511
7533
|
var applicationFactory = engine.factoryFor(`controller:application`);
|
|
@@ -7722,28 +7744,17 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7722
7744
|
Note: Your content __will not render__ if there isn't an `{{outlet}}` for it.
|
|
7723
7745
|
|
|
7724
7746
|
@method outlet
|
|
7725
|
-
@param {String} [name]
|
|
7726
7747
|
@for Ember.Templates.helpers
|
|
7727
7748
|
@public
|
|
7728
7749
|
*/
|
|
7729
7750
|
|
|
7730
|
-
var outletHelper = internalHelper((
|
|
7751
|
+
var outletHelper = internalHelper((_args, owner, scope) => {
|
|
7731
7752
|
(true && !(owner) && (0, _debug.assert)('Expected owner to be present, {{outlet}} requires an owner', owner));
|
|
7732
7753
|
(true && !(scope) && (0, _debug.assert)('Expected dynamic scope to be present. You may have attempted to use the {{outlet}} keyword dynamically. This keyword cannot be used dynamically.', scope));
|
|
7733
|
-
var nameRef;
|
|
7734
|
-
|
|
7735
|
-
if (args.positional.length === 0) {
|
|
7736
|
-
nameRef = (0, _reference.createPrimitiveRef)('main');
|
|
7737
|
-
} else {
|
|
7738
|
-
var maybeNameRef = args.positional[0];
|
|
7739
|
-
(true && !(maybeNameRef) && (0, _debug.assert)('Expected at least one positional arg', maybeNameRef));
|
|
7740
|
-
nameRef = maybeNameRef;
|
|
7741
|
-
}
|
|
7742
|
-
|
|
7743
7754
|
var outletRef = (0, _reference.createComputeRef)(() => {
|
|
7744
7755
|
var state = (0, _reference.valueForRef)(scope.get('outletState'));
|
|
7745
7756
|
var outlets = state !== undefined ? state.outlets : undefined;
|
|
7746
|
-
return outlets !== undefined ? outlets
|
|
7757
|
+
return outlets !== undefined ? outlets.main : undefined;
|
|
7747
7758
|
});
|
|
7748
7759
|
var lastState = null;
|
|
7749
7760
|
var definition = null;
|
|
@@ -7782,11 +7793,10 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7782
7793
|
named.model = (0, _reference.createDebugAliasRef)('@model', named.model);
|
|
7783
7794
|
}
|
|
7784
7795
|
|
|
7785
|
-
var
|
|
7786
|
-
|
|
7796
|
+
var args = (0, _runtime.createCapturedArgs)(named, _runtime.EMPTY_POSITIONAL);
|
|
7787
7797
|
definition = (0, _runtime.curry)(0
|
|
7788
7798
|
/* Component */
|
|
7789
|
-
, new OutletComponentDefinition(state), (_b = (_a = outletState === null || outletState === void 0 ? void 0 : outletState.render) === null || _a === void 0 ? void 0 : _a.owner) !== null && _b !== void 0 ? _b : owner,
|
|
7799
|
+
, new OutletComponentDefinition(state), (_b = (_a = outletState === null || outletState === void 0 ? void 0 : outletState.render) === null || _a === void 0 ? void 0 : _a.owner) !== null && _b !== void 0 ? _b : owner, args, true);
|
|
7790
7800
|
} else {
|
|
7791
7801
|
definition = null;
|
|
7792
7802
|
}
|
|
@@ -7836,9 +7846,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7836
7846
|
};
|
|
7837
7847
|
}
|
|
7838
7848
|
|
|
7839
|
-
function componentFor(name, owner
|
|
7849
|
+
function componentFor(name, owner) {
|
|
7840
7850
|
var fullName = `component:${name}`;
|
|
7841
|
-
return owner.factoryFor(fullName
|
|
7851
|
+
return owner.factoryFor(fullName) || null;
|
|
7842
7852
|
}
|
|
7843
7853
|
|
|
7844
7854
|
function layoutFor(name, owner, options) {
|
|
@@ -7847,7 +7857,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
7847
7857
|
}
|
|
7848
7858
|
|
|
7849
7859
|
function lookupComponentPair(owner, name, options) {
|
|
7850
|
-
var component = componentFor(name, owner
|
|
7860
|
+
var component = componentFor(name, owner);
|
|
7851
7861
|
|
|
7852
7862
|
if (component !== null && component.class !== undefined) {
|
|
7853
7863
|
var _layout = (0, _manager2.getComponentTemplate)(component.class);
|
|
@@ -8644,7 +8654,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
8644
8654
|
target = selector;
|
|
8645
8655
|
}
|
|
8646
8656
|
|
|
8647
|
-
var renderer = this.owner.lookup('renderer:-dom');
|
|
8657
|
+
var renderer = this.owner.lookup('renderer:-dom'); // SAFETY: It's not clear that this cast is safe.
|
|
8658
|
+
// The types for appendOutletView may be incorrect or this is a potential bug.
|
|
8659
|
+
|
|
8648
8660
|
(0, _runloop.schedule)('render', renderer, 'appendOutletView', this, target);
|
|
8649
8661
|
}
|
|
8650
8662
|
|
|
@@ -8708,6 +8720,18 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
8708
8720
|
registry.register((0, _container.privatize)`component:-default`, Component);
|
|
8709
8721
|
}
|
|
8710
8722
|
}
|
|
8723
|
+
/**
|
|
8724
|
+
Associate a class with a component manager (an object that is responsible for
|
|
8725
|
+
coordinating the lifecycle events that occurs when invoking, rendering and
|
|
8726
|
+
re-rendering a component).
|
|
8727
|
+
|
|
8728
|
+
@method setComponentManager
|
|
8729
|
+
@param {Function} factory a function to create the owner for an object
|
|
8730
|
+
@param {Object} obj the object to associate with the componetn manager
|
|
8731
|
+
@return {Object} the same object passed in
|
|
8732
|
+
@public
|
|
8733
|
+
*/
|
|
8734
|
+
|
|
8711
8735
|
|
|
8712
8736
|
function setComponentManager$1(manager, obj) {
|
|
8713
8737
|
return (0, _manager2.setComponentManager)(manager, obj);
|
|
@@ -9776,7 +9800,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
9776
9800
|
return true;
|
|
9777
9801
|
}
|
|
9778
9802
|
/**
|
|
9779
|
-
@
|
|
9803
|
+
@public
|
|
9780
9804
|
@method hasListeners
|
|
9781
9805
|
@static
|
|
9782
9806
|
@for @ember/object/events
|
|
@@ -11536,13 +11560,13 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11536
11560
|
}
|
|
11537
11561
|
|
|
11538
11562
|
function _getProp(obj, keyName) {
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11563
|
+
if (obj == null) {
|
|
11564
|
+
return;
|
|
11565
|
+
}
|
|
11566
|
+
|
|
11543
11567
|
var value;
|
|
11544
11568
|
|
|
11545
|
-
if (
|
|
11569
|
+
if (typeof obj === 'object' || typeof obj === 'function') {
|
|
11546
11570
|
if (true
|
|
11547
11571
|
/* DEBUG */
|
|
11548
11572
|
) {
|
|
@@ -11551,7 +11575,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11551
11575
|
value = obj[keyName];
|
|
11552
11576
|
}
|
|
11553
11577
|
|
|
11554
|
-
if (value === undefined &&
|
|
11578
|
+
if (value === undefined && typeof obj === 'object' && !(keyName in obj) && typeof obj.unknownProperty === 'function') {
|
|
11555
11579
|
value = obj.unknownProperty(keyName);
|
|
11556
11580
|
}
|
|
11557
11581
|
|
|
@@ -11565,14 +11589,14 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11565
11589
|
}
|
|
11566
11590
|
}
|
|
11567
11591
|
} else {
|
|
11592
|
+
// SAFETY: It should be ok to access properties on any non-nullish value
|
|
11568
11593
|
value = obj[keyName];
|
|
11569
11594
|
}
|
|
11570
11595
|
|
|
11571
11596
|
return value;
|
|
11572
11597
|
}
|
|
11573
11598
|
|
|
11574
|
-
function _getPath(
|
|
11575
|
-
var obj = root;
|
|
11599
|
+
function _getPath(obj, path) {
|
|
11576
11600
|
var parts = typeof path === 'string' ? path.split('.') : path;
|
|
11577
11601
|
|
|
11578
11602
|
for (var part of parts) {
|
|
@@ -11595,12 +11619,12 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11595
11619
|
_getProp({}, 1);
|
|
11596
11620
|
|
|
11597
11621
|
_getProp({
|
|
11598
|
-
|
|
11622
|
+
unknownProperty() {}
|
|
11599
11623
|
|
|
11600
11624
|
}, 'a');
|
|
11601
11625
|
|
|
11602
11626
|
_getProp({
|
|
11603
|
-
|
|
11627
|
+
unknownProperty() {}
|
|
11604
11628
|
|
|
11605
11629
|
}, 1);
|
|
11606
11630
|
|
|
@@ -11890,7 +11914,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11890
11914
|
confusing.
|
|
11891
11915
|
|
|
11892
11916
|
```javascript
|
|
11893
|
-
isNone(); // true
|
|
11894
11917
|
isNone(null); // true
|
|
11895
11918
|
isNone(undefined); // true
|
|
11896
11919
|
isNone(''); // false
|
|
@@ -11925,7 +11948,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11925
11948
|
to check emptiness.
|
|
11926
11949
|
|
|
11927
11950
|
```javascript
|
|
11928
|
-
isEmpty(); // true
|
|
11929
11951
|
isEmpty(null); // true
|
|
11930
11952
|
isEmpty(undefined); // true
|
|
11931
11953
|
isEmpty(''); // true
|
|
@@ -11950,31 +11972,21 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11950
11972
|
|
|
11951
11973
|
|
|
11952
11974
|
function isEmpty(obj) {
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
if (none) {
|
|
11956
|
-
return none;
|
|
11975
|
+
if (obj === null || obj === undefined) {
|
|
11976
|
+
return true;
|
|
11957
11977
|
}
|
|
11958
11978
|
|
|
11959
11979
|
if (typeof obj.unknownProperty !== 'function' && typeof obj.size === 'number') {
|
|
11960
11980
|
return !obj.size;
|
|
11961
11981
|
}
|
|
11962
11982
|
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
if (objectType === 'object') {
|
|
11983
|
+
if (typeof obj === 'object') {
|
|
11966
11984
|
var size = get(obj, 'size');
|
|
11967
11985
|
|
|
11968
11986
|
if (typeof size === 'number') {
|
|
11969
11987
|
return !size;
|
|
11970
11988
|
}
|
|
11971
|
-
}
|
|
11972
|
-
|
|
11973
|
-
if (typeof obj.length === 'number' && objectType !== 'function') {
|
|
11974
|
-
return !obj.length;
|
|
11975
|
-
}
|
|
11976
11989
|
|
|
11977
|
-
if (objectType === 'object') {
|
|
11978
11990
|
var length = get(obj, 'length');
|
|
11979
11991
|
|
|
11980
11992
|
if (typeof length === 'number') {
|
|
@@ -11982,6 +11994,10 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11982
11994
|
}
|
|
11983
11995
|
}
|
|
11984
11996
|
|
|
11997
|
+
if (typeof obj.length === 'number' && typeof obj !== 'function') {
|
|
11998
|
+
return !obj.length;
|
|
11999
|
+
}
|
|
12000
|
+
|
|
11985
12001
|
return false;
|
|
11986
12002
|
}
|
|
11987
12003
|
/**
|
|
@@ -11994,7 +12010,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11994
12010
|
```javascript
|
|
11995
12011
|
import { isBlank } from '@ember/utils';
|
|
11996
12012
|
|
|
11997
|
-
isBlank(); // true
|
|
11998
12013
|
isBlank(null); // true
|
|
11999
12014
|
isBlank(undefined); // true
|
|
12000
12015
|
isBlank(''); // true
|
|
@@ -12028,7 +12043,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
12028
12043
|
A value is present if it not `isBlank`.
|
|
12029
12044
|
|
|
12030
12045
|
```javascript
|
|
12031
|
-
isPresent(); // false
|
|
12032
12046
|
isPresent(null); // false
|
|
12033
12047
|
isPresent(undefined); // false
|
|
12034
12048
|
isPresent(''); // false
|
|
@@ -14390,7 +14404,7 @@ define("@ember/-internals/routing/lib/location/hash_location", ["exports", "@emb
|
|
|
14390
14404
|
onUpdateURL(callback) {
|
|
14391
14405
|
this._removeEventListener();
|
|
14392
14406
|
|
|
14393
|
-
this._hashchangeHandler = (0, _runloop.bind)(this, function () {
|
|
14407
|
+
this._hashchangeHandler = (0, _runloop.bind)(this, function (_event) {
|
|
14394
14408
|
var path = this.getURL();
|
|
14395
14409
|
|
|
14396
14410
|
if (this.lastSetURL === path) {
|
|
@@ -14985,7 +14999,7 @@ define("@ember/-internals/routing/lib/location/util", ["exports"], function (_ex
|
|
|
14985
14999
|
location.replace(getOrigin(location) + path);
|
|
14986
15000
|
}
|
|
14987
15001
|
});
|
|
14988
|
-
define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service", "@glimmer/validator", "@ember/-internals/routing/lib/utils"], function (_exports, _owner, _runtime, _utils, _debug, _computed, _service, _validator, _utils2) {
|
|
15002
|
+
define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service", "@glimmer/validator", "@ember/-internals/routing/lib/system/router", "@ember/-internals/routing/lib/utils"], function (_exports, _owner, _runtime, _utils, _debug, _computed, _service, _validator, _router, _utils2) {
|
|
14989
15003
|
"use strict";
|
|
14990
15004
|
|
|
14991
15005
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -15016,6 +15030,55 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15016
15030
|
class RouterService extends _service.default.extend(_runtime.Evented) {
|
|
15017
15031
|
constructor() {
|
|
15018
15032
|
super(...arguments);
|
|
15033
|
+
/**
|
|
15034
|
+
You can register a listener for events emitted by this service with `.on()`:
|
|
15035
|
+
```app/routes/contact-form.js
|
|
15036
|
+
import Route from '@ember/routing';
|
|
15037
|
+
import { service } from '@ember/service';
|
|
15038
|
+
export default class extends Route {
|
|
15039
|
+
@service router;
|
|
15040
|
+
activate() {
|
|
15041
|
+
this.router.on('routeWillChange', (transition) => {
|
|
15042
|
+
if (!transition.to.find(route => route.name === this.routeName)) {
|
|
15043
|
+
alert("Please save or cancel your changes.");
|
|
15044
|
+
transition.abort();
|
|
15045
|
+
}
|
|
15046
|
+
})
|
|
15047
|
+
}
|
|
15048
|
+
}
|
|
15049
|
+
```
|
|
15050
|
+
@method on
|
|
15051
|
+
@param {String} eventName
|
|
15052
|
+
@param {Function} callback
|
|
15053
|
+
@public
|
|
15054
|
+
*/
|
|
15055
|
+
|
|
15056
|
+
/**
|
|
15057
|
+
You can unregister a listener for events emitted by this service with `.off()`:
|
|
15058
|
+
```app/routes/contact-form.js
|
|
15059
|
+
import Route from '@ember/routing';
|
|
15060
|
+
import { service } from '@ember/service';
|
|
15061
|
+
export default class extends Route {
|
|
15062
|
+
@service router;
|
|
15063
|
+
callback = (transition) => {
|
|
15064
|
+
if (!transition.to.find(route => route.name === this.routeName)) {
|
|
15065
|
+
alert("Please save or cancel your changes.");
|
|
15066
|
+
transition.abort();
|
|
15067
|
+
}
|
|
15068
|
+
};
|
|
15069
|
+
activate() {
|
|
15070
|
+
this.router.on('routeWillChange', this.callback);
|
|
15071
|
+
}
|
|
15072
|
+
deactivate() {
|
|
15073
|
+
this.router.off('routeWillChange', this.callback);
|
|
15074
|
+
}
|
|
15075
|
+
```
|
|
15076
|
+
@method off
|
|
15077
|
+
@param {String} eventName
|
|
15078
|
+
@param {Function} callback
|
|
15079
|
+
@public
|
|
15080
|
+
*/
|
|
15081
|
+
|
|
15019
15082
|
/**
|
|
15020
15083
|
The `routeWillChange` event is fired at the beginning of any
|
|
15021
15084
|
attempted transition with a `Transition` object as the sole
|
|
@@ -15028,9 +15091,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15028
15091
|
import { service } from '@ember/service';
|
|
15029
15092
|
export default class extends Route {
|
|
15030
15093
|
@service router;
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
this.router.on('routeWillChange', (transition) => {
|
|
15094
|
+
activate() {
|
|
15095
|
+
this.router.on('routeWillChange', (transition) => {
|
|
15034
15096
|
if (!transition.to.find(route => route.name === this.routeName)) {
|
|
15035
15097
|
alert("Please save or cancel your changes.");
|
|
15036
15098
|
transition.abort();
|
|
@@ -15055,9 +15117,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15055
15117
|
import { service } from '@ember/service';
|
|
15056
15118
|
export default class extends Route {
|
|
15057
15119
|
@service router;
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
this.router.on('routeDidChange', (transition) => {
|
|
15120
|
+
activate() {
|
|
15121
|
+
this.router.on('routeDidChange', (transition) => {
|
|
15061
15122
|
ga.send('pageView', {
|
|
15062
15123
|
current: transition.to.name,
|
|
15063
15124
|
from: transition.from.name
|
|
@@ -15122,6 +15183,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15122
15183
|
var owner = (0, _owner.getOwner)(this);
|
|
15123
15184
|
(true && !(owner) && (0, _debug.assert)('RouterService is unexpectedly missing an owner', owner));
|
|
15124
15185
|
router = owner.lookup('router:main');
|
|
15186
|
+
(true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTER SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
|
|
15125
15187
|
return this[ROUTER] = router;
|
|
15126
15188
|
}
|
|
15127
15189
|
|
|
@@ -15188,7 +15250,6 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15188
15250
|
|
|
15189
15251
|
var transition = this._router._doTransition(routeName, models, queryParams, true);
|
|
15190
15252
|
|
|
15191
|
-
transition['_keepDefaultQueryParamValues'] = true;
|
|
15192
15253
|
return transition;
|
|
15193
15254
|
}
|
|
15194
15255
|
/**
|
|
@@ -15367,19 +15428,26 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15367
15428
|
var hasQueryParams = Object.keys(queryParams).length > 0;
|
|
15368
15429
|
|
|
15369
15430
|
if (hasQueryParams) {
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
this._router._prepareQueryParams( // UNSAFE: casting `routeName as string` here encodes the existing
|
|
15431
|
+
// UNSAFE: casting `routeName as string` here encodes the existing
|
|
15373
15432
|
// assumption but may be wrong: `extractRouteArgs` correctly returns it
|
|
15374
15433
|
// as `string | undefined`. There may be bugs if `_prepareQueryParams`
|
|
15375
15434
|
// does not correctly account for `undefined` values for `routeName`.
|
|
15376
15435
|
// Spoilers: under the hood this currently uses router.js APIs which
|
|
15377
15436
|
// *do not* account for this being `undefined`.
|
|
15378
|
-
|
|
15437
|
+
var targetRouteName = routeName;
|
|
15438
|
+
queryParams = Object.assign({}, queryParams);
|
|
15439
|
+
|
|
15440
|
+
this._router._prepareQueryParams(targetRouteName, models, queryParams, true
|
|
15379
15441
|
/* fromRouterService */
|
|
15380
15442
|
);
|
|
15381
15443
|
|
|
15382
|
-
|
|
15444
|
+
var currentQueryParams = Object.assign({}, routerMicrolib.state.queryParams);
|
|
15445
|
+
|
|
15446
|
+
this._router._prepareQueryParams(targetRouteName, models, currentQueryParams, true
|
|
15447
|
+
/* fromRouterService */
|
|
15448
|
+
);
|
|
15449
|
+
|
|
15450
|
+
return (0, _utils2.shallowEqual)(queryParams, currentQueryParams);
|
|
15383
15451
|
}
|
|
15384
15452
|
|
|
15385
15453
|
return true;
|
|
@@ -15455,7 +15523,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
15455
15523
|
|
|
15456
15524
|
__decorate([(0, _computed.readOnly)('_router.currentRoute')], RouterService.prototype, "currentRoute", void 0);
|
|
15457
15525
|
});
|
|
15458
|
-
define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service"], function (_exports, _owner, _utils, _debug, _computed, _service) {
|
|
15526
|
+
define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service", "@ember/-internals/routing/lib/system/router"], function (_exports, _owner, _utils, _debug, _computed, _service, _router) {
|
|
15459
15527
|
"use strict";
|
|
15460
15528
|
|
|
15461
15529
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -15489,6 +15557,7 @@ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-in
|
|
|
15489
15557
|
var owner = (0, _owner.getOwner)(this);
|
|
15490
15558
|
(true && !(owner) && (0, _debug.assert)('RoutingService is unexpectedly missing an owner', owner));
|
|
15491
15559
|
router = owner.lookup('router:main');
|
|
15560
|
+
(true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTING SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
|
|
15492
15561
|
router.setupRouter();
|
|
15493
15562
|
return this[ROUTER] = router;
|
|
15494
15563
|
}
|
|
@@ -15912,7 +15981,7 @@ define("@ember/-internals/routing/lib/system/engines", ["exports"], function (_e
|
|
|
15912
15981
|
value: true
|
|
15913
15982
|
});
|
|
15914
15983
|
});
|
|
15915
|
-
define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "@ember/-internals/metal", "@ember/debug"], function (_exports, _metal, _debug) {
|
|
15984
|
+
define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "@ember/-internals/metal", "@ember/controller", "@ember/debug"], function (_exports, _metal, _controller, _debug) {
|
|
15916
15985
|
"use strict";
|
|
15917
15986
|
|
|
15918
15987
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -15959,6 +16028,7 @@ define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "
|
|
|
15959
16028
|
generateControllerFactory(owner, controllerName);
|
|
15960
16029
|
var fullName = `controller:${controllerName}`;
|
|
15961
16030
|
var instance = owner.lookup(fullName);
|
|
16031
|
+
(true && !(instance instanceof _controller.default) && (0, _debug.assert)('Expected an instance of controller', instance instanceof _controller.default));
|
|
15962
16032
|
|
|
15963
16033
|
if (true
|
|
15964
16034
|
/* DEBUG */
|
|
@@ -16002,7 +16072,7 @@ define("@ember/-internals/routing/lib/system/route-info", ["exports"], function
|
|
|
16002
16072
|
value: true
|
|
16003
16073
|
});
|
|
16004
16074
|
});
|
|
16005
|
-
define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/object/compat", "@ember/runloop", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller"], function (_exports, _container, _metal, _owner, _runtime, _utils, _debug, _compat, _runloop, _router_js, _utils2, _generate_controller) {
|
|
16075
|
+
define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/routing", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/controller", "@ember/debug", "@ember/engine/instance", "@ember/object/compat", "@ember/runloop", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller", "@ember/-internals/routing/lib/system/router"], function (_exports, _container, _metal, _owner, _routing, _runtime, _utils, _controller2, _debug, _instance, _compat, _runloop, _router_js, _utils2, _generate_controller, _router) {
|
|
16006
16076
|
"use strict";
|
|
16007
16077
|
|
|
16008
16078
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -16028,13 +16098,13 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
16028
16098
|
|
|
16029
16099
|
class Route extends _runtime.Object.extend(_runtime.ActionHandler, _runtime.Evented) {
|
|
16030
16100
|
constructor(owner) {
|
|
16031
|
-
super(
|
|
16101
|
+
super(owner);
|
|
16032
16102
|
this.context = {};
|
|
16033
16103
|
|
|
16034
16104
|
if (owner) {
|
|
16035
16105
|
var router = owner.lookup('router:main');
|
|
16036
16106
|
var bucketCache = owner.lookup((0, _container.privatize)`-bucket-cache:main`);
|
|
16037
|
-
(true && !(router && bucketCache) && (0, _debug.assert)('ROUTER BUG: Expected route injections to be defined on the route. This is an internal bug, please open an issue on Github if you see this message!', router && bucketCache));
|
|
16107
|
+
(true && !(router instanceof _router.default && bucketCache instanceof _routing.BucketCache) && (0, _debug.assert)('ROUTER BUG: Expected route injections to be defined on the route. This is an internal bug, please open an issue on Github if you see this message!', router instanceof _router.default && bucketCache instanceof _routing.BucketCache));
|
|
16038
16108
|
this._router = router;
|
|
16039
16109
|
this._bucketCache = bucketCache;
|
|
16040
16110
|
this._topLevelViewTemplate = owner.lookup('template:-outlet');
|
|
@@ -16115,7 +16185,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
16115
16185
|
_setRouteName(name) {
|
|
16116
16186
|
this.routeName = name;
|
|
16117
16187
|
var owner = (0, _owner.getOwner)(this);
|
|
16118
|
-
(true && !(owner) && (0, _debug.assert)('
|
|
16188
|
+
(true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected route to have EngineInstance as owner', owner instanceof _instance.default));
|
|
16119
16189
|
this.fullRouteName = getEngineRouteName(owner, name);
|
|
16120
16190
|
}
|
|
16121
16191
|
/**
|
|
@@ -16856,8 +16926,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
16856
16926
|
} else {
|
|
16857
16927
|
if (transition.resolveIndex < 1) {
|
|
16858
16928
|
return;
|
|
16859
|
-
} // SAFETY:
|
|
16860
|
-
// generics to infer it.
|
|
16929
|
+
} // SAFETY: This should be correct, but TS is unable to infer this.
|
|
16861
16930
|
|
|
16862
16931
|
|
|
16863
16932
|
return transition[_router_js.STATE_SYMBOL].routeInfos[transition.resolveIndex - 1].context;
|
|
@@ -16968,6 +17037,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
16968
17037
|
// passed a model to skip the assertion.
|
|
16969
17038
|
|
|
16970
17039
|
(true && !(controller !== undefined || _skipAssert === true) && (0, _debug.assert)(`The controller named '${name}' could not be found. Make sure that this route exists and has already been entered at least once. If you are accessing a controller not associated with a route, make sure the controller class is explicitly defined.`, controller !== undefined || _skipAssert === true));
|
|
17040
|
+
(true && !(controller === undefined || controller instanceof _controller2.default) && (0, _debug.assert)(`Expected controller:${name} to be an instance of Controller`, controller === undefined || controller instanceof _controller2.default));
|
|
16971
17041
|
return controller;
|
|
16972
17042
|
}
|
|
16973
17043
|
/**
|
|
@@ -17032,7 +17102,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17032
17102
|
modelFor(_name) {
|
|
17033
17103
|
var name;
|
|
17034
17104
|
var owner = (0, _owner.getOwner)(this);
|
|
17035
|
-
(true && !(owner) && (0, _debug.assert)('
|
|
17105
|
+
(true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected router owner to be an EngineInstance', owner instanceof _instance.default));
|
|
17036
17106
|
var transition = this._router && this._router._routerMicrolib ? this._router._routerMicrolib.activeTransition : undefined; // Only change the route name when there is an active transition.
|
|
17037
17107
|
// Otherwise, use the passed in route name.
|
|
17038
17108
|
|
|
@@ -17160,10 +17230,11 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17160
17230
|
var hasRouterDefinedQueryParams = Object.keys(queryParameterConfiguraton).length > 0;
|
|
17161
17231
|
|
|
17162
17232
|
if (controller) {
|
|
17163
|
-
// the developer has authored a controller class in their application for
|
|
17233
|
+
(true && !(controller instanceof _controller2.default) && (0, _debug.assert)('Expected an instance of controller', controller instanceof _controller2.default)); // the developer has authored a controller class in their application for
|
|
17164
17234
|
// this route find its query params and normalize their object shape them
|
|
17165
17235
|
// merge in the query params for the route. As a mergedProperty,
|
|
17166
17236
|
// Route#queryParams is always at least `{}`
|
|
17237
|
+
|
|
17167
17238
|
var controllerDefinedQueryParameterConfiguration = (0, _metal.get)(controller, 'queryParams') || [];
|
|
17168
17239
|
var normalizedControllerQueryParameterConfiguration = (0, _utils2.normalizeControllerQueryParams)(controllerDefinedQueryParameterConfiguration);
|
|
17169
17240
|
combinedQueryParameterConfiguration = mergeEachQueryParams(normalizedControllerQueryParameterConfiguration, queryParameterConfiguraton);
|
|
@@ -17327,7 +17398,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17327
17398
|
var owner = (0, _owner.getOwner)(route);
|
|
17328
17399
|
(true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
|
|
17329
17400
|
var name, templateName, into, outlet, model;
|
|
17330
|
-
var controller
|
|
17401
|
+
var controller;
|
|
17331
17402
|
|
|
17332
17403
|
if (options) {
|
|
17333
17404
|
into = options.into && options.into.replace(/\//g, '.');
|
|
@@ -17360,6 +17431,8 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17360
17431
|
(true && !(isDefaultRender || controller !== undefined) && (0, _debug.assert)(`You passed \`controller: '${controllerName}'\` into the \`render\` method, but no such controller could be found.`, isDefaultRender || controller !== undefined));
|
|
17361
17432
|
}
|
|
17362
17433
|
|
|
17434
|
+
(true && !(controller instanceof _controller2.default) && (0, _debug.assert)('Expected an instance of controller', controller instanceof _controller2.default));
|
|
17435
|
+
|
|
17363
17436
|
if (model === undefined) {
|
|
17364
17437
|
model = route.currentModel;
|
|
17365
17438
|
} else {
|
|
@@ -17692,7 +17765,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17692
17765
|
qp.serializedValue = svalue;
|
|
17693
17766
|
var thisQueryParamHasDefaultValue = qp.serializedDefaultValue === svalue;
|
|
17694
17767
|
|
|
17695
|
-
if (!thisQueryParamHasDefaultValue
|
|
17768
|
+
if (!thisQueryParamHasDefaultValue) {
|
|
17696
17769
|
finalParams.push({
|
|
17697
17770
|
value: svalue,
|
|
17698
17771
|
visible: true,
|
|
@@ -17728,7 +17801,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
|
|
|
17728
17801
|
var _default = Route;
|
|
17729
17802
|
_exports.default = _default;
|
|
17730
17803
|
});
|
|
17731
|
-
define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/debug", "@ember/error", "@ember/runloop", "@ember/-internals/routing/lib/location/api", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/dsl", "@ember/-internals/routing/lib/system/route", "@ember/-internals/routing/lib/system/router_state", "router_js"], function (_exports, _container, _metal, _owner, _runtime, _debug, _error2, _runloop, _api, _utils, _dsl, _route, _router_state, _router_js) {
|
|
17804
|
+
define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/routing", "@ember/-internals/runtime", "@ember/debug", "@ember/error", "@ember/runloop", "@ember/-internals/routing/lib/location/api", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/dsl", "@ember/-internals/routing/lib/system/route", "@ember/-internals/routing/lib/system/router_state", "router_js", "@ember/engine/instance"], function (_exports, _container, _metal, _owner, _routing, _runtime, _debug, _error2, _runloop, _api, _utils, _dsl, _route, _router_state, _router_js, _instance) {
|
|
17732
17805
|
"use strict";
|
|
17733
17806
|
|
|
17734
17807
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -17806,7 +17879,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
17806
17879
|
|
|
17807
17880
|
class EmberRouter extends _runtime.Object.extend(_runtime.Evented) {
|
|
17808
17881
|
constructor(owner) {
|
|
17809
|
-
super(
|
|
17882
|
+
super(owner);
|
|
17810
17883
|
this._didSetupRouter = false;
|
|
17811
17884
|
this._initialTransitionStarted = false;
|
|
17812
17885
|
this.currentURL = null;
|
|
@@ -17821,6 +17894,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
17821
17894
|
this._handledErrors = new Set();
|
|
17822
17895
|
this._engineInstances = Object.create(null);
|
|
17823
17896
|
this._engineInfoByRoute = Object.create(null);
|
|
17897
|
+
this._slowTransitionTimer = null;
|
|
17824
17898
|
this.currentState = null;
|
|
17825
17899
|
this.targetState = null;
|
|
17826
17900
|
|
|
@@ -17828,7 +17902,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
17828
17902
|
|
|
17829
17903
|
this.namespace = owner.lookup('application:main');
|
|
17830
17904
|
var bucketCache = owner.lookup((0, _container.privatize)`-bucket-cache:main`);
|
|
17831
|
-
(true && !(bucketCache
|
|
17905
|
+
(true && !(bucketCache instanceof _routing.BucketCache) && (0, _debug.assert)('BUG: BucketCache should always be present', bucketCache instanceof _routing.BucketCache));
|
|
17832
17906
|
this._bucketCache = bucketCache;
|
|
17833
17907
|
var routerService = owner.lookup('service:router');
|
|
17834
17908
|
(true && !(routerService !== undefined) && (0, _debug.assert)('BUG: RouterService should always be present', routerService !== undefined));
|
|
@@ -18456,11 +18530,13 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
18456
18530
|
var instances = this._engineInstances;
|
|
18457
18531
|
|
|
18458
18532
|
for (var name in instances) {
|
|
18459
|
-
var
|
|
18460
|
-
(true && !(
|
|
18533
|
+
var instanceMap = instances[name];
|
|
18534
|
+
(true && !(instanceMap) && (0, _debug.assert)('has instanceMap', instanceMap));
|
|
18461
18535
|
|
|
18462
|
-
for (var id in
|
|
18463
|
-
|
|
18536
|
+
for (var id in instanceMap) {
|
|
18537
|
+
var instance = instanceMap[id];
|
|
18538
|
+
(true && !(instance) && (0, _debug.assert)('has instance', instance));
|
|
18539
|
+
(0, _runloop.run)(instance, 'destroy');
|
|
18464
18540
|
}
|
|
18465
18541
|
}
|
|
18466
18542
|
}
|
|
@@ -18673,7 +18749,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
18673
18749
|
}
|
|
18674
18750
|
}
|
|
18675
18751
|
|
|
18676
|
-
_doTransition(_targetRouteName, models, _queryParams,
|
|
18752
|
+
_doTransition(_targetRouteName, models, _queryParams, _fromRouterService) {
|
|
18677
18753
|
var targetRouteName = _targetRouteName || (0, _utils.getActiveTargetName)(this._routerMicrolib);
|
|
18678
18754
|
|
|
18679
18755
|
(true && !(Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)) && (0, _debug.assert)(`The route ${targetRouteName} was not found`, Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)));
|
|
@@ -18684,7 +18760,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
18684
18760
|
|
|
18685
18761
|
Object.assign(queryParams, _queryParams);
|
|
18686
18762
|
|
|
18687
|
-
this._prepareQueryParams(targetRouteName, models, queryParams, Boolean(
|
|
18763
|
+
this._prepareQueryParams(targetRouteName, models, queryParams, Boolean(_fromRouterService));
|
|
18688
18764
|
|
|
18689
18765
|
var transition = this._routerMicrolib.transitionTo(targetRouteName, ...models, {
|
|
18690
18766
|
queryParams
|
|
@@ -18936,7 +19012,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
18936
19012
|
_scheduleLoadingEvent(transition, originRoute) {
|
|
18937
19013
|
this._cancelSlowTransitionTimer();
|
|
18938
19014
|
|
|
18939
|
-
this._slowTransitionTimer = (0, _runloop.scheduleOnce)('routerTransitions', this,
|
|
19015
|
+
this._slowTransitionTimer = (0, _runloop.scheduleOnce)('routerTransitions', this, this._handleSlowTransition, transition, originRoute);
|
|
18940
19016
|
}
|
|
18941
19017
|
|
|
18942
19018
|
_handleSlowTransition(transition, originRoute) {
|
|
@@ -18993,7 +19069,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
18993
19069
|
|
|
18994
19070
|
if (!engineInstance) {
|
|
18995
19071
|
var owner = (0, _owner.getOwner)(this);
|
|
18996
|
-
(true && !(owner) && (0, _debug.assert)('
|
|
19072
|
+
(true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected router to have EngineInstance as owner', owner instanceof _instance.default));
|
|
18997
19073
|
(true && !(owner.hasRegistration(`engine:${name}`)) && (0, _debug.assert)(`You attempted to mount the engine '${name}' in your router map, but the engine can not be found.`, owner.hasRegistration(`engine:${name}`)));
|
|
18998
19074
|
engineInstance = owner.buildChildEngineInstance(name, {
|
|
18999
19075
|
routable: true,
|
|
@@ -19298,16 +19374,6 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
|
|
|
19298
19374
|
(0, _metal.set)(router, 'currentPath', path);
|
|
19299
19375
|
(0, _metal.set)(router, 'currentRouteName', currentRouteName);
|
|
19300
19376
|
(0, _metal.set)(router, 'currentURL', currentURL);
|
|
19301
|
-
var owner = (0, _owner.getOwner)(router);
|
|
19302
|
-
(true && !(owner) && (0, _debug.assert)('Router is unexpectedly missing an owner', owner));
|
|
19303
|
-
var appController = owner.lookup('controller:application');
|
|
19304
|
-
|
|
19305
|
-
if (!appController) {
|
|
19306
|
-
// appController might not exist when top-level loading/error
|
|
19307
|
-
// substates have been entered since ApplicationRoute hasn't
|
|
19308
|
-
// actually been entered at that point.
|
|
19309
|
-
return;
|
|
19310
|
-
}
|
|
19311
19377
|
}
|
|
19312
19378
|
|
|
19313
19379
|
function didBeginTransition(transition, router) {
|
|
@@ -19671,7 +19737,7 @@ define("@ember/-internals/routing/lib/system/transition", [], function () {
|
|
|
19671
19737
|
@type {Transition | undefined}
|
|
19672
19738
|
*/
|
|
19673
19739
|
});
|
|
19674
|
-
define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/debug", "@ember/error", "router_js"], function (_exports, _metal, _owner, _debug, _error, _router_js) {
|
|
19740
|
+
define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/debug", "@ember/engine/instance", "@ember/error", "router_js"], function (_exports, _metal, _owner, _debug, _instance, _error, _router_js) {
|
|
19675
19741
|
"use strict";
|
|
19676
19742
|
|
|
19677
19743
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -19911,7 +19977,7 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
|
|
|
19911
19977
|
function prefixRouteNameArg(route, args) {
|
|
19912
19978
|
var routeName;
|
|
19913
19979
|
var owner = (0, _owner.getOwner)(route);
|
|
19914
|
-
(true && !(owner) && (0, _debug.assert)('
|
|
19980
|
+
(true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected route to have EngineInstance as owner', owner instanceof _instance.default));
|
|
19915
19981
|
var prefix = owner.mountPoint; // only alter the routeName if it's actually referencing a route.
|
|
19916
19982
|
|
|
19917
19983
|
if (owner.routable && typeof args[0] === 'string') {
|
|
@@ -20164,7 +20230,7 @@ define("@ember/-internals/runtime/index", ["exports", "@ember/-internals/runtime
|
|
|
20164
20230
|
}
|
|
20165
20231
|
});
|
|
20166
20232
|
});
|
|
20167
|
-
define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/runtime/lib/type-of", "@ember/-internals/runtime/lib/mixins/comparable"], function (_exports, _typeOf, _comparable) {
|
|
20233
|
+
define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/runtime/lib/type-of", "@ember/-internals/runtime/lib/mixins/comparable", "@ember/debug"], function (_exports, _typeOf, _comparable, _debug) {
|
|
20168
20234
|
"use strict";
|
|
20169
20235
|
|
|
20170
20236
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -20202,8 +20268,9 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
|
|
|
20202
20268
|
// SSt `------'`
|
|
20203
20269
|
|
|
20204
20270
|
function spaceship(a, b) {
|
|
20205
|
-
var diff = a - b;
|
|
20206
|
-
|
|
20271
|
+
var diff = a - b; // SAFETY: Number casts true into 1 and false into 0. Therefore, this must end up as one of the Compare values.
|
|
20272
|
+
|
|
20273
|
+
return Number(diff > 0) - Number(diff < 0);
|
|
20207
20274
|
}
|
|
20208
20275
|
/**
|
|
20209
20276
|
@module @ember/utils
|
|
@@ -20265,11 +20332,12 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
|
|
|
20265
20332
|
var type1 = (0, _typeOf.typeOf)(v);
|
|
20266
20333
|
var type2 = (0, _typeOf.typeOf)(w);
|
|
20267
20334
|
|
|
20268
|
-
if (type1 === 'instance' &&
|
|
20335
|
+
if (type1 === 'instance' && isComparable(v) && v.constructor.compare) {
|
|
20269
20336
|
return v.constructor.compare(v, w);
|
|
20270
20337
|
}
|
|
20271
20338
|
|
|
20272
|
-
if (type2 === 'instance' &&
|
|
20339
|
+
if (type2 === 'instance' && isComparable(w) && w.constructor.compare) {
|
|
20340
|
+
// SAFETY: Multiplying by a negative just changes the sign
|
|
20273
20341
|
return w.constructor.compare(w, v) * -1;
|
|
20274
20342
|
}
|
|
20275
20343
|
|
|
@@ -20282,14 +20350,20 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
|
|
|
20282
20350
|
|
|
20283
20351
|
switch (type1) {
|
|
20284
20352
|
case 'boolean':
|
|
20353
|
+
(true && !(typeof v === 'boolean' && typeof w === 'boolean') && (0, _debug.assert)('both are boolean', typeof v === 'boolean' && typeof w === 'boolean'));
|
|
20354
|
+
return spaceship(Number(v), Number(w));
|
|
20355
|
+
|
|
20285
20356
|
case 'number':
|
|
20357
|
+
(true && !(typeof v === 'number' && typeof w === 'number') && (0, _debug.assert)('both are numbers', typeof v === 'number' && typeof w === 'number'));
|
|
20286
20358
|
return spaceship(v, w);
|
|
20287
20359
|
|
|
20288
20360
|
case 'string':
|
|
20361
|
+
(true && !(typeof v === 'string' && typeof w === 'string') && (0, _debug.assert)('both are strings', typeof v === 'string' && typeof w === 'string'));
|
|
20289
20362
|
return spaceship(v.localeCompare(w), 0);
|
|
20290
20363
|
|
|
20291
20364
|
case 'array':
|
|
20292
20365
|
{
|
|
20366
|
+
(true && !(Array.isArray(v) && Array.isArray(w)) && (0, _debug.assert)('both are arrays', Array.isArray(v) && Array.isArray(w)));
|
|
20293
20367
|
var vLen = v.length;
|
|
20294
20368
|
var wLen = w.length;
|
|
20295
20369
|
var len = Math.min(vLen, wLen);
|
|
@@ -20308,19 +20382,24 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
|
|
|
20308
20382
|
}
|
|
20309
20383
|
|
|
20310
20384
|
case 'instance':
|
|
20311
|
-
if (
|
|
20385
|
+
if (isComparable(v) && v.compare) {
|
|
20312
20386
|
return v.compare(v, w);
|
|
20313
20387
|
}
|
|
20314
20388
|
|
|
20315
20389
|
return 0;
|
|
20316
20390
|
|
|
20317
20391
|
case 'date':
|
|
20392
|
+
(true && !(v instanceof Date && w instanceof Date) && (0, _debug.assert)('both are dates', v instanceof Date && w instanceof Date));
|
|
20318
20393
|
return spaceship(v.getTime(), w.getTime());
|
|
20319
20394
|
|
|
20320
20395
|
default:
|
|
20321
20396
|
return 0;
|
|
20322
20397
|
}
|
|
20323
20398
|
}
|
|
20399
|
+
|
|
20400
|
+
function isComparable(value) {
|
|
20401
|
+
return _comparable.default.detect(value);
|
|
20402
|
+
}
|
|
20324
20403
|
});
|
|
20325
20404
|
define("@ember/-internals/runtime/lib/ext/rsvp", ["exports", "rsvp", "@ember/runloop", "@ember/-internals/error-handling", "@ember/debug"], function (_exports, RSVP, _runloop, _errorHandling, _debug) {
|
|
20326
20405
|
"use strict";
|
|
@@ -22447,13 +22526,13 @@ define("@ember/-internals/runtime/lib/mixins/comparable", ["exports", "@ember/-i
|
|
|
22447
22526
|
var _default = _metal.Mixin.create({
|
|
22448
22527
|
/**
|
|
22449
22528
|
__Required.__ You must implement this method to apply this mixin.
|
|
22450
|
-
|
|
22529
|
+
Override to return the result of the comparison of the two parameters. The
|
|
22451
22530
|
compare method should return:
|
|
22452
|
-
|
|
22531
|
+
- `-1` if `a < b`
|
|
22453
22532
|
- `0` if `a == b`
|
|
22454
22533
|
- `1` if `a > b`
|
|
22455
|
-
|
|
22456
|
-
|
|
22534
|
+
Default implementation raises an exception.
|
|
22535
|
+
@method compare
|
|
22457
22536
|
@param a {Object} the first object to compare
|
|
22458
22537
|
@param b {Object} the second object to compare
|
|
22459
22538
|
@return {Number} the result of the comparison
|
|
@@ -22486,7 +22565,7 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
|
|
|
22486
22565
|
var containerProxyMixin = {
|
|
22487
22566
|
/**
|
|
22488
22567
|
The container stores state.
|
|
22489
|
-
|
|
22568
|
+
@private
|
|
22490
22569
|
@property {Ember.Container} __container__
|
|
22491
22570
|
*/
|
|
22492
22571
|
__container__: null,
|
|
@@ -22494,16 +22573,16 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
|
|
|
22494
22573
|
/**
|
|
22495
22574
|
Returns an object that can be used to provide an owner to a
|
|
22496
22575
|
manually created instance.
|
|
22497
|
-
|
|
22498
|
-
|
|
22576
|
+
Example:
|
|
22577
|
+
```
|
|
22499
22578
|
import { getOwner } from '@ember/application';
|
|
22500
|
-
|
|
22501
|
-
|
|
22579
|
+
let owner = getOwner(this);
|
|
22580
|
+
User.create(
|
|
22502
22581
|
owner.ownerInjection(),
|
|
22503
22582
|
{ username: 'rwjblue' }
|
|
22504
22583
|
)
|
|
22505
22584
|
```
|
|
22506
|
-
|
|
22585
|
+
@public
|
|
22507
22586
|
@method ownerInjection
|
|
22508
22587
|
@since 2.3.0
|
|
22509
22588
|
@return {Object}
|
|
@@ -22514,30 +22593,30 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
|
|
|
22514
22593
|
|
|
22515
22594
|
/**
|
|
22516
22595
|
Given a fullName return a corresponding instance.
|
|
22517
|
-
|
|
22596
|
+
The default behavior is for lookup to return a singleton instance.
|
|
22518
22597
|
The singleton is scoped to the container, allowing multiple containers
|
|
22519
22598
|
to all have their own locally scoped singletons.
|
|
22520
|
-
|
|
22599
|
+
```javascript
|
|
22521
22600
|
let registry = new Registry();
|
|
22522
22601
|
let container = registry.container();
|
|
22523
|
-
|
|
22524
|
-
|
|
22525
|
-
|
|
22526
|
-
|
|
22602
|
+
registry.register('api:twitter', Twitter);
|
|
22603
|
+
let twitter = container.lookup('api:twitter');
|
|
22604
|
+
twitter instanceof Twitter; // => true
|
|
22605
|
+
// by default the container will return singletons
|
|
22527
22606
|
let twitter2 = container.lookup('api:twitter');
|
|
22528
22607
|
twitter2 instanceof Twitter; // => true
|
|
22529
|
-
|
|
22608
|
+
twitter === twitter2; //=> true
|
|
22530
22609
|
```
|
|
22531
|
-
|
|
22532
|
-
|
|
22610
|
+
If singletons are not wanted an optional flag can be provided at lookup.
|
|
22611
|
+
```javascript
|
|
22533
22612
|
let registry = new Registry();
|
|
22534
22613
|
let container = registry.container();
|
|
22535
|
-
|
|
22536
|
-
|
|
22614
|
+
registry.register('api:twitter', Twitter);
|
|
22615
|
+
let twitter = container.lookup('api:twitter', { singleton: false });
|
|
22537
22616
|
let twitter2 = container.lookup('api:twitter', { singleton: false });
|
|
22538
|
-
|
|
22617
|
+
twitter === twitter2; //=> false
|
|
22539
22618
|
```
|
|
22540
|
-
|
|
22619
|
+
@public
|
|
22541
22620
|
@method lookup
|
|
22542
22621
|
@param {String} fullName
|
|
22543
22622
|
@param {Object} options
|
|
@@ -22562,32 +22641,32 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
|
|
|
22562
22641
|
|
|
22563
22642
|
/**
|
|
22564
22643
|
Given a fullName return a factory manager.
|
|
22565
|
-
|
|
22644
|
+
This method returns a manager which can be used for introspection of the
|
|
22566
22645
|
factory's class or for the creation of factory instances with initial
|
|
22567
22646
|
properties. The manager is an object with the following properties:
|
|
22568
|
-
|
|
22647
|
+
* `class` - The registered or resolved class.
|
|
22569
22648
|
* `create` - A function that will create an instance of the class with
|
|
22570
22649
|
any dependencies injected.
|
|
22571
|
-
|
|
22572
|
-
|
|
22650
|
+
For example:
|
|
22651
|
+
```javascript
|
|
22573
22652
|
import { getOwner } from '@ember/application';
|
|
22574
|
-
|
|
22653
|
+
let owner = getOwner(otherInstance);
|
|
22575
22654
|
// the owner is commonly the `applicationInstance`, and can be accessed via
|
|
22576
22655
|
// an instance initializer.
|
|
22577
|
-
|
|
22578
|
-
|
|
22656
|
+
let factory = owner.factoryFor('service:bespoke');
|
|
22657
|
+
factory.class;
|
|
22579
22658
|
// The registered or resolved class. For example when used with an Ember-CLI
|
|
22580
22659
|
// app, this would be the default export from `app/services/bespoke.js`.
|
|
22581
|
-
|
|
22660
|
+
let instance = factory.create({
|
|
22582
22661
|
someProperty: 'an initial property value'
|
|
22583
22662
|
});
|
|
22584
22663
|
// Create an instance with any injections and the passed options as
|
|
22585
22664
|
// initial properties.
|
|
22586
22665
|
```
|
|
22587
|
-
|
|
22666
|
+
Any instances created via the factory's `.create()` method *must* be destroyed
|
|
22588
22667
|
manually by the caller of `.create()`. Typically, this is done during the creating
|
|
22589
22668
|
objects own `destroy` or `willDestroy` methods.
|
|
22590
|
-
|
|
22669
|
+
@public
|
|
22591
22670
|
@method factoryFor
|
|
22592
22671
|
@param {String} fullName
|
|
22593
22672
|
@param {Object} options
|
|
@@ -23474,62 +23553,62 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23474
23553
|
|
|
23475
23554
|
/**
|
|
23476
23555
|
Given a fullName return the corresponding factory.
|
|
23477
|
-
|
|
23556
|
+
@public
|
|
23478
23557
|
@method resolveRegistration
|
|
23479
23558
|
@param {String} fullName
|
|
23480
23559
|
@return {Function} fullName's factory
|
|
23481
23560
|
*/
|
|
23482
|
-
resolveRegistration(fullName
|
|
23561
|
+
resolveRegistration(fullName) {
|
|
23483
23562
|
(true && !(this.__registry__.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.__registry__.isValidFullName(fullName)));
|
|
23484
|
-
return this.__registry__.resolve(fullName
|
|
23563
|
+
return this.__registry__.resolve(fullName);
|
|
23485
23564
|
},
|
|
23486
23565
|
|
|
23487
23566
|
/**
|
|
23488
23567
|
Registers a factory that can be used for dependency injection (with
|
|
23489
23568
|
`inject`) or for service lookup. Each factory is registered with
|
|
23490
23569
|
a full name including two parts: `type:name`.
|
|
23491
|
-
|
|
23492
|
-
|
|
23570
|
+
A simple example:
|
|
23571
|
+
```javascript
|
|
23493
23572
|
import Application from '@ember/application';
|
|
23494
23573
|
import EmberObject from '@ember/object';
|
|
23495
|
-
|
|
23496
|
-
|
|
23574
|
+
let App = Application.create();
|
|
23575
|
+
App.Orange = EmberObject.extend();
|
|
23497
23576
|
App.register('fruit:favorite', App.Orange);
|
|
23498
23577
|
```
|
|
23499
|
-
|
|
23578
|
+
Ember will resolve factories from the `App` namespace automatically.
|
|
23500
23579
|
For example `App.CarsController` will be discovered and returned if
|
|
23501
23580
|
an application requests `controller:cars`.
|
|
23502
|
-
|
|
23503
|
-
|
|
23581
|
+
An example of registering a controller with a non-standard name:
|
|
23582
|
+
```javascript
|
|
23504
23583
|
import Application from '@ember/application';
|
|
23505
23584
|
import Controller from '@ember/controller';
|
|
23506
|
-
|
|
23585
|
+
let App = Application.create();
|
|
23507
23586
|
let Session = Controller.extend();
|
|
23508
|
-
|
|
23509
|
-
|
|
23587
|
+
App.register('controller:session', Session);
|
|
23588
|
+
// The Session controller can now be treated like a normal controller,
|
|
23510
23589
|
// despite its non-standard name.
|
|
23511
23590
|
App.ApplicationController = Controller.extend({
|
|
23512
23591
|
needs: ['session']
|
|
23513
23592
|
});
|
|
23514
23593
|
```
|
|
23515
|
-
|
|
23594
|
+
Registered factories are **instantiated** by having `create`
|
|
23516
23595
|
called on them. Additionally they are **singletons**, each time
|
|
23517
23596
|
they are looked up they return the same instance.
|
|
23518
|
-
|
|
23519
|
-
|
|
23597
|
+
Some examples modifying that default behavior:
|
|
23598
|
+
```javascript
|
|
23520
23599
|
import Application from '@ember/application';
|
|
23521
23600
|
import EmberObject from '@ember/object';
|
|
23522
|
-
|
|
23523
|
-
|
|
23601
|
+
let App = Application.create();
|
|
23602
|
+
App.Person = EmberObject.extend();
|
|
23524
23603
|
App.Orange = EmberObject.extend();
|
|
23525
23604
|
App.Email = EmberObject.extend();
|
|
23526
23605
|
App.session = EmberObject.create();
|
|
23527
|
-
|
|
23606
|
+
App.register('model:user', App.Person, { singleton: false });
|
|
23528
23607
|
App.register('fruit:favorite', App.Orange);
|
|
23529
23608
|
App.register('communication:main', App.Email, { singleton: false });
|
|
23530
23609
|
App.register('session', App.session, { instantiate: false });
|
|
23531
23610
|
```
|
|
23532
|
-
|
|
23611
|
+
@method register
|
|
23533
23612
|
@param fullName {String} type:name (e.g., 'model:user')
|
|
23534
23613
|
@param factory {any} (e.g., App.Person)
|
|
23535
23614
|
@param options {Object} (optional) disable instantiation or singleton usage
|
|
@@ -23539,17 +23618,17 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23539
23618
|
|
|
23540
23619
|
/**
|
|
23541
23620
|
Unregister a factory.
|
|
23542
|
-
|
|
23621
|
+
```javascript
|
|
23543
23622
|
import Application from '@ember/application';
|
|
23544
23623
|
import EmberObject from '@ember/object';
|
|
23545
|
-
|
|
23624
|
+
let App = Application.create();
|
|
23546
23625
|
let User = EmberObject.extend();
|
|
23547
23626
|
App.register('model:user', User);
|
|
23548
|
-
|
|
23549
|
-
|
|
23627
|
+
App.resolveRegistration('model:user').create() instanceof User //=> true
|
|
23628
|
+
App.unregister('model:user')
|
|
23550
23629
|
App.resolveRegistration('model:user') === undefined //=> true
|
|
23551
23630
|
```
|
|
23552
|
-
|
|
23631
|
+
@public
|
|
23553
23632
|
@method unregister
|
|
23554
23633
|
@param {String} fullName
|
|
23555
23634
|
*/
|
|
@@ -23557,7 +23636,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23557
23636
|
|
|
23558
23637
|
/**
|
|
23559
23638
|
Check if a factory is registered.
|
|
23560
|
-
|
|
23639
|
+
@public
|
|
23561
23640
|
@method hasRegistration
|
|
23562
23641
|
@param {String} fullName
|
|
23563
23642
|
@return {Boolean}
|
|
@@ -23566,7 +23645,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23566
23645
|
|
|
23567
23646
|
/**
|
|
23568
23647
|
Return a specific registered option for a particular factory.
|
|
23569
|
-
|
|
23648
|
+
@public
|
|
23570
23649
|
@method registeredOption
|
|
23571
23650
|
@param {String} fullName
|
|
23572
23651
|
@param {String} optionName
|
|
@@ -23576,7 +23655,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23576
23655
|
|
|
23577
23656
|
/**
|
|
23578
23657
|
Register options for a particular factory.
|
|
23579
|
-
|
|
23658
|
+
@public
|
|
23580
23659
|
@method registerOptions
|
|
23581
23660
|
@param {String} fullName
|
|
23582
23661
|
@param {Object} options
|
|
@@ -23585,7 +23664,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23585
23664
|
|
|
23586
23665
|
/**
|
|
23587
23666
|
Return registered options for a particular factory.
|
|
23588
|
-
|
|
23667
|
+
@public
|
|
23589
23668
|
@method registeredOptions
|
|
23590
23669
|
@param {String} fullName
|
|
23591
23670
|
@return {Object} options
|
|
@@ -23594,22 +23673,22 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23594
23673
|
|
|
23595
23674
|
/**
|
|
23596
23675
|
Allow registering options for all factories of a type.
|
|
23597
|
-
|
|
23676
|
+
```javascript
|
|
23598
23677
|
import Application from '@ember/application';
|
|
23599
|
-
|
|
23678
|
+
let App = Application.create();
|
|
23600
23679
|
let appInstance = App.buildInstance();
|
|
23601
|
-
|
|
23680
|
+
// if all of type `connection` must not be singletons
|
|
23602
23681
|
appInstance.registerOptionsForType('connection', { singleton: false });
|
|
23603
|
-
|
|
23682
|
+
appInstance.register('connection:twitter', TwitterConnection);
|
|
23604
23683
|
appInstance.register('connection:facebook', FacebookConnection);
|
|
23605
|
-
|
|
23684
|
+
let twitter = appInstance.lookup('connection:twitter');
|
|
23606
23685
|
let twitter2 = appInstance.lookup('connection:twitter');
|
|
23607
|
-
|
|
23608
|
-
|
|
23686
|
+
twitter === twitter2; // => false
|
|
23687
|
+
let facebook = appInstance.lookup('connection:facebook');
|
|
23609
23688
|
let facebook2 = appInstance.lookup('connection:facebook');
|
|
23610
|
-
|
|
23689
|
+
facebook === facebook2; // => false
|
|
23611
23690
|
```
|
|
23612
|
-
|
|
23691
|
+
@public
|
|
23613
23692
|
@method registerOptionsForType
|
|
23614
23693
|
@param {String} type
|
|
23615
23694
|
@param {Object} options
|
|
@@ -23618,7 +23697,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23618
23697
|
|
|
23619
23698
|
/**
|
|
23620
23699
|
Return the registered options for all factories of a type.
|
|
23621
|
-
|
|
23700
|
+
@public
|
|
23622
23701
|
@method registeredOptionsForType
|
|
23623
23702
|
@param {String} type
|
|
23624
23703
|
@return {Object} options
|
|
@@ -23628,41 +23707,42 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
|
|
|
23628
23707
|
/**
|
|
23629
23708
|
Define a dependency injection onto a specific factory or all factories
|
|
23630
23709
|
of a type.
|
|
23631
|
-
|
|
23710
|
+
When Ember instantiates a controller, view, or other framework component
|
|
23632
23711
|
it can attach a dependency to that component. This is often used to
|
|
23633
23712
|
provide services to a set of framework components.
|
|
23634
|
-
|
|
23635
|
-
|
|
23713
|
+
An example of providing a session object to all controllers:
|
|
23714
|
+
```javascript
|
|
23636
23715
|
import { alias } from '@ember/object/computed';
|
|
23637
23716
|
import Application from '@ember/application';
|
|
23638
23717
|
import Controller from '@ember/controller';
|
|
23639
23718
|
import EmberObject from '@ember/object';
|
|
23640
|
-
|
|
23719
|
+
let App = Application.create();
|
|
23641
23720
|
let Session = EmberObject.extend({ isAuthenticated: false });
|
|
23642
|
-
|
|
23721
|
+
// A factory must be registered before it can be injected
|
|
23643
23722
|
App.register('session:main', Session);
|
|
23644
|
-
|
|
23723
|
+
// Inject 'session:main' onto all factories of the type 'controller'
|
|
23645
23724
|
// with the name 'session'
|
|
23646
23725
|
App.inject('controller', 'session', 'session:main');
|
|
23647
|
-
|
|
23726
|
+
App.IndexController = Controller.extend({
|
|
23648
23727
|
isLoggedIn: alias('session.isAuthenticated')
|
|
23649
23728
|
});
|
|
23650
23729
|
```
|
|
23651
|
-
|
|
23652
|
-
|
|
23730
|
+
Injections can also be performed on specific factories.
|
|
23731
|
+
```javascript
|
|
23653
23732
|
App.inject(<full_name or type>, <property name>, <full_name>)
|
|
23654
23733
|
App.inject('route', 'source', 'source:main')
|
|
23655
23734
|
App.inject('route:application', 'email', 'model:email')
|
|
23656
23735
|
```
|
|
23657
|
-
|
|
23736
|
+
It is important to note that injections can only be performed on
|
|
23658
23737
|
classes that are instantiated by Ember itself. Instantiating a class
|
|
23659
23738
|
directly (via `create` or `new`) bypasses the dependency injection
|
|
23660
23739
|
system.
|
|
23661
|
-
|
|
23740
|
+
@public
|
|
23662
23741
|
@method inject
|
|
23663
23742
|
@param factoryNameOrType {String}
|
|
23664
23743
|
@param property {String}
|
|
23665
23744
|
@param injectionName {String}
|
|
23745
|
+
@deprecated
|
|
23666
23746
|
**/
|
|
23667
23747
|
inject: registryAlias('injection')
|
|
23668
23748
|
});
|
|
@@ -26079,7 +26159,7 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
26079
26159
|
|
|
26080
26160
|
|
|
26081
26161
|
function canInvoke(obj, methodName) {
|
|
26082
|
-
return obj
|
|
26162
|
+
return obj != null && typeof obj[methodName] === 'function';
|
|
26083
26163
|
}
|
|
26084
26164
|
/**
|
|
26085
26165
|
@module @ember/utils
|
|
@@ -28374,12 +28454,12 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
|
|
|
28374
28454
|
@default auto-detected
|
|
28375
28455
|
@private
|
|
28376
28456
|
*/
|
|
28377
|
-
this.isInteractive = environment.hasDOM; // This default is overridable below
|
|
28457
|
+
this.isInteractive = Boolean(environment.hasDOM); // This default is overridable below
|
|
28378
28458
|
|
|
28379
28459
|
/**
|
|
28380
28460
|
@property _renderMode
|
|
28381
28461
|
@type string
|
|
28382
|
-
@default
|
|
28462
|
+
@default undefined
|
|
28383
28463
|
@private
|
|
28384
28464
|
*/
|
|
28385
28465
|
|
|
@@ -28406,7 +28486,7 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
|
|
|
28406
28486
|
if (options.isBrowser !== undefined) {
|
|
28407
28487
|
this.isBrowser = Boolean(options.isBrowser);
|
|
28408
28488
|
} else {
|
|
28409
|
-
this.isBrowser = environment.hasDOM;
|
|
28489
|
+
this.isBrowser = Boolean(environment.hasDOM);
|
|
28410
28490
|
}
|
|
28411
28491
|
|
|
28412
28492
|
if (!this.isBrowser) {
|
|
@@ -29647,7 +29727,7 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
29647
29727
|
Object.defineProperty(_exports, "__esModule", {
|
|
29648
29728
|
value: true
|
|
29649
29729
|
});
|
|
29650
|
-
_exports.FEATURES = _exports.
|
|
29730
|
+
_exports.FEATURES = _exports.EMBER_UNIQUE_ID_HELPER = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_CACHED = _exports.DEFAULT_FEATURES = void 0;
|
|
29651
29731
|
_exports.isEnabled = isEnabled;
|
|
29652
29732
|
|
|
29653
29733
|
/**
|
|
@@ -29661,15 +29741,11 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
29661
29741
|
@public
|
|
29662
29742
|
*/
|
|
29663
29743
|
var DEFAULT_FEATURES = {
|
|
29664
|
-
EMBER_LIBRARIES_ISREGISTERED:
|
|
29665
|
-
EMBER_IMPROVED_INSTRUMENTATION:
|
|
29666
|
-
EMBER_NAMED_BLOCKS: true,
|
|
29667
|
-
EMBER_GLIMMER_HELPER_MANAGER: true,
|
|
29668
|
-
EMBER_GLIMMER_INVOKE_HELPER: true,
|
|
29669
|
-
EMBER_STRICT_MODE: true,
|
|
29670
|
-
EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
|
|
29744
|
+
EMBER_LIBRARIES_ISREGISTERED: null,
|
|
29745
|
+
EMBER_IMPROVED_INSTRUMENTATION: null,
|
|
29671
29746
|
EMBER_ROUTING_ROUTER_SERVICE_REFRESH: true,
|
|
29672
|
-
EMBER_CACHED: true
|
|
29747
|
+
EMBER_CACHED: true,
|
|
29748
|
+
EMBER_UNIQUE_ID_HELPER: null
|
|
29673
29749
|
};
|
|
29674
29750
|
/**
|
|
29675
29751
|
The hash of enabled Canary features. Add to this, any canary features
|
|
@@ -29725,20 +29801,12 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
29725
29801
|
_exports.EMBER_LIBRARIES_ISREGISTERED = EMBER_LIBRARIES_ISREGISTERED;
|
|
29726
29802
|
var EMBER_IMPROVED_INSTRUMENTATION = featureValue(FEATURES.EMBER_IMPROVED_INSTRUMENTATION);
|
|
29727
29803
|
_exports.EMBER_IMPROVED_INSTRUMENTATION = EMBER_IMPROVED_INSTRUMENTATION;
|
|
29728
|
-
var EMBER_NAMED_BLOCKS = featureValue(FEATURES.EMBER_NAMED_BLOCKS);
|
|
29729
|
-
_exports.EMBER_NAMED_BLOCKS = EMBER_NAMED_BLOCKS;
|
|
29730
|
-
var EMBER_GLIMMER_HELPER_MANAGER = featureValue(FEATURES.EMBER_GLIMMER_HELPER_MANAGER);
|
|
29731
|
-
_exports.EMBER_GLIMMER_HELPER_MANAGER = EMBER_GLIMMER_HELPER_MANAGER;
|
|
29732
|
-
var EMBER_GLIMMER_INVOKE_HELPER = featureValue(FEATURES.EMBER_GLIMMER_INVOKE_HELPER);
|
|
29733
|
-
_exports.EMBER_GLIMMER_INVOKE_HELPER = EMBER_GLIMMER_INVOKE_HELPER;
|
|
29734
|
-
var EMBER_STRICT_MODE = featureValue(FEATURES.EMBER_STRICT_MODE);
|
|
29735
|
-
_exports.EMBER_STRICT_MODE = EMBER_STRICT_MODE;
|
|
29736
|
-
var EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = featureValue(FEATURES.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS);
|
|
29737
|
-
_exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = EMBER_DYNAMIC_HELPERS_AND_MODIFIERS;
|
|
29738
29804
|
var EMBER_ROUTING_ROUTER_SERVICE_REFRESH = featureValue(FEATURES.EMBER_ROUTING_ROUTER_SERVICE_REFRESH);
|
|
29739
29805
|
_exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = EMBER_ROUTING_ROUTER_SERVICE_REFRESH;
|
|
29740
29806
|
var EMBER_CACHED = featureValue(FEATURES.EMBER_CACHED);
|
|
29741
29807
|
_exports.EMBER_CACHED = EMBER_CACHED;
|
|
29808
|
+
var EMBER_UNIQUE_ID_HELPER = featureValue(FEATURES.EMBER_UNIQUE_ID_HELPER);
|
|
29809
|
+
_exports.EMBER_UNIQUE_ID_HELPER = EMBER_UNIQUE_ID_HELPER;
|
|
29742
29810
|
});
|
|
29743
29811
|
define("@ember/component/helper", ["exports", "@ember/-internals/glimmer"], function (_exports, _glimmer) {
|
|
29744
29812
|
"use strict";
|
|
@@ -30296,6 +30364,8 @@ define("@ember/debug/lib/capture-render-tree", ["exports", "@glimmer/util"], fun
|
|
|
30296
30364
|
@since 3.14.0
|
|
30297
30365
|
*/
|
|
30298
30366
|
function captureRenderTree(app) {
|
|
30367
|
+
// SAFETY: Ideally we'd assert here but that causes awkward circular requires since this is also in @ember/debug.
|
|
30368
|
+
// This is only for debug stuff so not very risky.
|
|
30299
30369
|
var renderer = (0, _util.expect)(app.lookup('renderer:-dom'), `BUG: owner is missing renderer`);
|
|
30300
30370
|
return renderer.debugRenderTree.capture();
|
|
30301
30371
|
}
|
|
@@ -30499,7 +30569,7 @@ define("@ember/debug/lib/handlers", ["exports"], function (_exports) {
|
|
|
30499
30569
|
var HANDLERS = {};
|
|
30500
30570
|
_exports.HANDLERS = HANDLERS;
|
|
30501
30571
|
|
|
30502
|
-
var registerHandler = ()
|
|
30572
|
+
var registerHandler = function registerHandler(_type, _callback) {};
|
|
30503
30573
|
|
|
30504
30574
|
_exports.registerHandler = registerHandler;
|
|
30505
30575
|
|
|
@@ -34819,7 +34889,7 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
34819
34889
|
_exports._hasScheduledTimers = _hasScheduledTimers;
|
|
34820
34890
|
_exports._rsvpErrorQueue = _exports._queues = void 0;
|
|
34821
34891
|
_exports.begin = begin;
|
|
34822
|
-
_exports.bind =
|
|
34892
|
+
_exports.bind = bind;
|
|
34823
34893
|
_exports.cancel = cancel;
|
|
34824
34894
|
_exports.debounce = debounce;
|
|
34825
34895
|
_exports.end = end;
|
|
@@ -34841,7 +34911,7 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
34841
34911
|
currentRunLoop = current;
|
|
34842
34912
|
}
|
|
34843
34913
|
|
|
34844
|
-
function onEnd(
|
|
34914
|
+
function onEnd(_current, next) {
|
|
34845
34915
|
currentRunLoop = next;
|
|
34846
34916
|
(0, _metal.flushAsyncObservers)();
|
|
34847
34917
|
}
|
|
@@ -34884,164 +34954,25 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
34884
34954
|
onErrorMethod: 'onerror',
|
|
34885
34955
|
flush
|
|
34886
34956
|
});
|
|
34887
|
-
/**
|
|
34888
|
-
@module @ember/runloop
|
|
34889
|
-
*/
|
|
34890
|
-
// ..........................................................
|
|
34891
|
-
// run - this is ideally the only public API the dev sees
|
|
34892
|
-
//
|
|
34893
|
-
|
|
34894
|
-
/**
|
|
34895
|
-
Runs the passed target and method inside of a RunLoop, ensuring any
|
|
34896
|
-
deferred actions including bindings and views updates are flushed at the
|
|
34897
|
-
end.
|
|
34898
|
-
|
|
34899
|
-
Normally you should not need to invoke this method yourself. However if
|
|
34900
|
-
you are implementing raw event handlers when interfacing with other
|
|
34901
|
-
libraries or plugins, you should probably wrap all of your code inside this
|
|
34902
|
-
call.
|
|
34903
|
-
|
|
34904
|
-
```javascript
|
|
34905
|
-
import { run } from '@ember/runloop';
|
|
34906
|
-
|
|
34907
|
-
run(function() {
|
|
34908
|
-
// code to be executed within a RunLoop
|
|
34909
|
-
});
|
|
34910
|
-
```
|
|
34911
|
-
@method run
|
|
34912
|
-
@for @ember/runloop
|
|
34913
|
-
@static
|
|
34914
|
-
@param {Object} [target] target of method to call
|
|
34915
|
-
@param {Function|String} method Method to invoke.
|
|
34916
|
-
May be a function or a string. If you pass a string
|
|
34917
|
-
then it will be looked up on the passed target.
|
|
34918
|
-
@param {Object} [args*] Any additional arguments you wish to pass to the method.
|
|
34919
|
-
@return {Object} return value from invoking the passed function.
|
|
34920
|
-
@public
|
|
34921
|
-
*/
|
|
34922
|
-
|
|
34923
34957
|
|
|
34924
34958
|
_exports._backburner = _backburner;
|
|
34925
34959
|
|
|
34926
34960
|
function run() {
|
|
34961
|
+
// @ts-expect-error TS doesn't like our spread args
|
|
34927
34962
|
return _backburner.run(...arguments);
|
|
34928
34963
|
}
|
|
34929
|
-
/**
|
|
34930
|
-
If no run-loop is present, it creates a new one. If a run loop is
|
|
34931
|
-
present it will queue itself to run on the existing run-loops action
|
|
34932
|
-
queue.
|
|
34933
|
-
|
|
34934
|
-
Please note: This is not for normal usage, and should be used sparingly.
|
|
34935
|
-
|
|
34936
|
-
If invoked when not within a run loop:
|
|
34937
|
-
|
|
34938
|
-
```javascript
|
|
34939
|
-
import { join } from '@ember/runloop';
|
|
34940
|
-
|
|
34941
|
-
join(function() {
|
|
34942
|
-
// creates a new run-loop
|
|
34943
|
-
});
|
|
34944
|
-
```
|
|
34945
|
-
|
|
34946
|
-
Alternatively, if called within an existing run loop:
|
|
34947
|
-
|
|
34948
|
-
```javascript
|
|
34949
|
-
import { run, join } from '@ember/runloop';
|
|
34950
|
-
|
|
34951
|
-
run(function() {
|
|
34952
|
-
// creates a new run-loop
|
|
34953
|
-
|
|
34954
|
-
join(function() {
|
|
34955
|
-
// joins with the existing run-loop, and queues for invocation on
|
|
34956
|
-
// the existing run-loops action queue.
|
|
34957
|
-
});
|
|
34958
|
-
});
|
|
34959
|
-
```
|
|
34960
|
-
|
|
34961
|
-
@method join
|
|
34962
|
-
@static
|
|
34963
|
-
@for @ember/runloop
|
|
34964
|
-
@param {Object} [target] target of method to call
|
|
34965
|
-
@param {Function|String} method Method to invoke.
|
|
34966
|
-
May be a function or a string. If you pass a string
|
|
34967
|
-
then it will be looked up on the passed target.
|
|
34968
|
-
@param {Object} [args*] Any additional arguments you wish to pass to the method.
|
|
34969
|
-
@return {Object} Return value from invoking the passed function. Please note,
|
|
34970
|
-
when called within an existing loop, no return value is possible.
|
|
34971
|
-
@public
|
|
34972
|
-
*/
|
|
34973
34964
|
|
|
34965
|
+
function join(methodOrTarget, methodOrArg) {
|
|
34966
|
+
for (var _len = arguments.length, additionalArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
34967
|
+
additionalArgs[_key - 2] = arguments[_key];
|
|
34968
|
+
}
|
|
34974
34969
|
|
|
34975
|
-
|
|
34976
|
-
return _backburner.join(...arguments);
|
|
34970
|
+
return _backburner.join(methodOrTarget, methodOrArg, ...additionalArgs);
|
|
34977
34971
|
}
|
|
34978
|
-
/**
|
|
34979
|
-
Allows you to specify which context to call the specified function in while
|
|
34980
|
-
adding the execution of that function to the Ember run loop. This ability
|
|
34981
|
-
makes this method a great way to asynchronously integrate third-party libraries
|
|
34982
|
-
into your Ember application.
|
|
34983
|
-
|
|
34984
|
-
`bind` takes two main arguments, the desired context and the function to
|
|
34985
|
-
invoke in that context. Any additional arguments will be supplied as arguments
|
|
34986
|
-
to the function that is passed in.
|
|
34987
|
-
|
|
34988
|
-
Let's use the creation of a TinyMCE component as an example. Currently,
|
|
34989
|
-
TinyMCE provides a setup configuration option we can use to do some processing
|
|
34990
|
-
after the TinyMCE instance is initialized but before it is actually rendered.
|
|
34991
|
-
We can use that setup option to do some additional setup for our component.
|
|
34992
|
-
The component itself could look something like the following:
|
|
34993
|
-
|
|
34994
|
-
```app/components/rich-text-editor.js
|
|
34995
|
-
import Component from '@ember/component';
|
|
34996
|
-
import { on } from '@ember/object/evented';
|
|
34997
|
-
import { bind } from '@ember/runloop';
|
|
34998
|
-
|
|
34999
|
-
export default Component.extend({
|
|
35000
|
-
initializeTinyMCE: on('didInsertElement', function() {
|
|
35001
|
-
tinymce.init({
|
|
35002
|
-
selector: '#' + this.$().prop('id'),
|
|
35003
|
-
setup: bind(this, this.setupEditor)
|
|
35004
|
-
});
|
|
35005
|
-
}),
|
|
35006
|
-
|
|
35007
|
-
didInsertElement() {
|
|
35008
|
-
tinymce.init({
|
|
35009
|
-
selector: '#' + this.$().prop('id'),
|
|
35010
|
-
setup: bind(this, this.setupEditor)
|
|
35011
|
-
});
|
|
35012
|
-
}
|
|
35013
|
-
|
|
35014
|
-
setupEditor(editor) {
|
|
35015
|
-
this.set('editor', editor);
|
|
35016
|
-
|
|
35017
|
-
editor.on('change', function() {
|
|
35018
|
-
console.log('content changed!');
|
|
35019
|
-
});
|
|
35020
|
-
}
|
|
35021
|
-
});
|
|
35022
|
-
```
|
|
35023
|
-
|
|
35024
|
-
In this example, we use `bind` to bind the setupEditor method to the
|
|
35025
|
-
context of the RichTextEditor component and to have the invocation of that
|
|
35026
|
-
method be safely handled and executed by the Ember run loop.
|
|
35027
|
-
|
|
35028
|
-
@method bind
|
|
35029
|
-
@static
|
|
35030
|
-
@for @ember/runloop
|
|
35031
|
-
@param {Object} [target] target of method to call
|
|
35032
|
-
@param {Function|String} method Method to invoke.
|
|
35033
|
-
May be a function or a string. If you pass a string
|
|
35034
|
-
then it will be looked up on the passed target.
|
|
35035
|
-
@param {Object} [args*] Any additional arguments you wish to pass to the method.
|
|
35036
|
-
@return {Function} returns a new function that will always have a particular context
|
|
35037
|
-
@since 1.4.0
|
|
35038
|
-
@public
|
|
35039
|
-
*/
|
|
35040
|
-
|
|
35041
34972
|
|
|
35042
|
-
|
|
35043
|
-
for (var
|
|
35044
|
-
curried[
|
|
34973
|
+
function bind() {
|
|
34974
|
+
for (var _len2 = arguments.length, curried = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
34975
|
+
curried[_key2] = arguments[_key2];
|
|
35045
34976
|
}
|
|
35046
34977
|
|
|
35047
34978
|
(true && !(function (methodOrTarget, methodOrArg) {
|
|
@@ -35054,12 +34985,12 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35054
34985
|
} else if (length === 1) {
|
|
35055
34986
|
return typeof methodOrTarget === 'function';
|
|
35056
34987
|
} else {
|
|
35057
|
-
|
|
35058
|
-
|
|
35059
|
-
methodOrTarget !== null && type === 'string' && methodOrArg in methodOrTarget || // second argument is the name of a method in first argument
|
|
34988
|
+
return typeof methodOrArg === 'function' || // second argument is a function
|
|
34989
|
+
methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget || // second argument is the name of a method in first argument
|
|
35060
34990
|
typeof methodOrTarget === 'function' //first argument is a function
|
|
35061
34991
|
;
|
|
35062
|
-
}
|
|
34992
|
+
} // @ts-expect-error TS doesn't like our spread args
|
|
34993
|
+
|
|
35063
34994
|
}(...curried)) && (0, _debug.assert)('could not find a suitable method to bind', function (methodOrTarget, methodOrArg) {
|
|
35064
34995
|
var length = arguments.length;
|
|
35065
34996
|
|
|
@@ -35068,18 +34999,18 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35068
34999
|
} else if (length === 1) {
|
|
35069
35000
|
return typeof methodOrTarget === 'function';
|
|
35070
35001
|
} else {
|
|
35071
|
-
|
|
35072
|
-
return type === 'function' || methodOrTarget !== null && type === 'string' && methodOrArg in methodOrTarget || typeof methodOrTarget === 'function';
|
|
35002
|
+
return typeof methodOrArg === 'function' || methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget || typeof methodOrTarget === 'function';
|
|
35073
35003
|
}
|
|
35074
|
-
}(...curried)));
|
|
35004
|
+
}(...curried))); // @ts-expect-error TS doesn't like our spread args
|
|
35005
|
+
|
|
35075
35006
|
return function () {
|
|
35076
|
-
for (var
|
|
35077
|
-
args[
|
|
35007
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
35008
|
+
args[_key3] = arguments[_key3];
|
|
35078
35009
|
}
|
|
35079
35010
|
|
|
35080
35011
|
return join(...curried.concat(args));
|
|
35081
35012
|
};
|
|
35082
|
-
}
|
|
35013
|
+
}
|
|
35083
35014
|
/**
|
|
35084
35015
|
Begins a new RunLoop. Any deferred actions invoked after the begin will
|
|
35085
35016
|
be buffered until you invoke a matching call to `end()`. This is
|
|
@@ -35101,8 +35032,6 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35101
35032
|
*/
|
|
35102
35033
|
|
|
35103
35034
|
|
|
35104
|
-
_exports.bind = bind;
|
|
35105
|
-
|
|
35106
35035
|
function begin() {
|
|
35107
35036
|
_backburner.begin();
|
|
35108
35037
|
}
|
|
@@ -35130,52 +35059,9 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35130
35059
|
function end() {
|
|
35131
35060
|
_backburner.end();
|
|
35132
35061
|
}
|
|
35133
|
-
/**
|
|
35134
|
-
Adds the passed target/method and any optional arguments to the named
|
|
35135
|
-
queue to be executed at the end of the RunLoop. If you have not already
|
|
35136
|
-
started a RunLoop when calling this method one will be started for you
|
|
35137
|
-
automatically.
|
|
35138
|
-
|
|
35139
|
-
At the end of a RunLoop, any methods scheduled in this way will be invoked.
|
|
35140
|
-
Methods will be invoked in an order matching the named queues defined in
|
|
35141
|
-
the `queues` property.
|
|
35142
|
-
|
|
35143
|
-
```javascript
|
|
35144
|
-
import { schedule } from '@ember/runloop';
|
|
35145
|
-
|
|
35146
|
-
schedule('afterRender', this, function() {
|
|
35147
|
-
// this will be executed in the 'afterRender' queue
|
|
35148
|
-
console.log('scheduled on afterRender queue');
|
|
35149
|
-
});
|
|
35150
|
-
|
|
35151
|
-
schedule('actions', this, function() {
|
|
35152
|
-
// this will be executed in the 'actions' queue
|
|
35153
|
-
console.log('scheduled on actions queue');
|
|
35154
|
-
});
|
|
35155
|
-
|
|
35156
|
-
// Note the functions will be run in order based on the run queues order.
|
|
35157
|
-
// Output would be:
|
|
35158
|
-
// scheduled on actions queue
|
|
35159
|
-
// scheduled on afterRender queue
|
|
35160
|
-
```
|
|
35161
|
-
|
|
35162
|
-
@method schedule
|
|
35163
|
-
@static
|
|
35164
|
-
@for @ember/runloop
|
|
35165
|
-
@param {String} queue The name of the queue to schedule against. Default queues is 'actions'
|
|
35166
|
-
@param {Object} [target] target object to use as the context when invoking a method.
|
|
35167
|
-
@param {String|Function} method The method to invoke. If you pass a string it
|
|
35168
|
-
will be resolved on the target object at the time the scheduled item is
|
|
35169
|
-
invoked allowing you to change the target function.
|
|
35170
|
-
@param {Object} [arguments*] Optional arguments to be passed to the queued method.
|
|
35171
|
-
@return {*} Timer information for use in canceling, see `cancel`.
|
|
35172
|
-
@public
|
|
35173
|
-
*/
|
|
35174
|
-
|
|
35175
35062
|
|
|
35176
|
-
function
|
|
35177
|
-
|
|
35178
|
-
schedule() {
|
|
35063
|
+
function schedule() {
|
|
35064
|
+
// @ts-expect-error TS doesn't like the rest args here
|
|
35179
35065
|
return _backburner.schedule(...arguments);
|
|
35180
35066
|
} // Used by global test teardown
|
|
35181
35067
|
|
|
@@ -35188,226 +35074,31 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35188
35074
|
function _cancelTimers() {
|
|
35189
35075
|
_backburner.cancelTimers();
|
|
35190
35076
|
}
|
|
35191
|
-
/**
|
|
35192
|
-
Invokes the passed target/method and optional arguments after a specified
|
|
35193
|
-
period of time. The last parameter of this method must always be a number
|
|
35194
|
-
of milliseconds.
|
|
35195
|
-
|
|
35196
|
-
You should use this method whenever you need to run some action after a
|
|
35197
|
-
period of time instead of using `setTimeout()`. This method will ensure that
|
|
35198
|
-
items that expire during the same script execution cycle all execute
|
|
35199
|
-
together, which is often more efficient than using a real setTimeout.
|
|
35200
|
-
|
|
35201
|
-
```javascript
|
|
35202
|
-
import { later } from '@ember/runloop';
|
|
35203
|
-
|
|
35204
|
-
later(myContext, function() {
|
|
35205
|
-
// code here will execute within a RunLoop in about 500ms with this == myContext
|
|
35206
|
-
}, 500);
|
|
35207
|
-
```
|
|
35208
|
-
|
|
35209
|
-
@method later
|
|
35210
|
-
@static
|
|
35211
|
-
@for @ember/runloop
|
|
35212
|
-
@param {Object} [target] target of method to invoke
|
|
35213
|
-
@param {Function|String} method The method to invoke.
|
|
35214
|
-
If you pass a string it will be resolved on the
|
|
35215
|
-
target at the time the method is invoked.
|
|
35216
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35217
|
-
@param {Number} wait Number of milliseconds to wait.
|
|
35218
|
-
@return {*} Timer information for use in canceling, see `cancel`.
|
|
35219
|
-
@public
|
|
35220
|
-
*/
|
|
35221
|
-
|
|
35222
35077
|
|
|
35223
|
-
function
|
|
35224
|
-
/*target, method*/
|
|
35225
|
-
later() {
|
|
35078
|
+
function later() {
|
|
35226
35079
|
return _backburner.later(...arguments);
|
|
35227
35080
|
}
|
|
35228
|
-
/**
|
|
35229
|
-
Schedule a function to run one time during the current RunLoop. This is equivalent
|
|
35230
|
-
to calling `scheduleOnce` with the "actions" queue.
|
|
35231
|
-
|
|
35232
|
-
@method once
|
|
35233
|
-
@static
|
|
35234
|
-
@for @ember/runloop
|
|
35235
|
-
@param {Object} [target] The target of the method to invoke.
|
|
35236
|
-
@param {Function|String} method The method to invoke.
|
|
35237
|
-
If you pass a string it will be resolved on the
|
|
35238
|
-
target at the time the method is invoked.
|
|
35239
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35240
|
-
@return {Object} Timer information for use in canceling, see `cancel`.
|
|
35241
|
-
@public
|
|
35242
|
-
*/
|
|
35243
|
-
|
|
35244
35081
|
|
|
35245
35082
|
function once() {
|
|
35246
|
-
for (var
|
|
35247
|
-
args[
|
|
35083
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
35084
|
+
args[_key4] = arguments[_key4];
|
|
35248
35085
|
}
|
|
35249
35086
|
|
|
35250
|
-
args
|
|
35251
|
-
return _backburner.scheduleOnce(...args);
|
|
35087
|
+
// @ts-expect-error TS doesn't like the rest args here
|
|
35088
|
+
return _backburner.scheduleOnce('actions', ...args);
|
|
35252
35089
|
}
|
|
35253
|
-
/**
|
|
35254
|
-
Schedules a function to run one time in a given queue of the current RunLoop.
|
|
35255
|
-
Calling this method with the same queue/target/method combination will have
|
|
35256
|
-
no effect (past the initial call).
|
|
35257
|
-
|
|
35258
|
-
Note that although you can pass optional arguments these will not be
|
|
35259
|
-
considered when looking for duplicates. New arguments will replace previous
|
|
35260
|
-
calls.
|
|
35261
|
-
|
|
35262
|
-
```javascript
|
|
35263
|
-
import { run, scheduleOnce } from '@ember/runloop';
|
|
35264
|
-
|
|
35265
|
-
function sayHi() {
|
|
35266
|
-
console.log('hi');
|
|
35267
|
-
}
|
|
35268
|
-
|
|
35269
|
-
run(function() {
|
|
35270
|
-
scheduleOnce('afterRender', myContext, sayHi);
|
|
35271
|
-
scheduleOnce('afterRender', myContext, sayHi);
|
|
35272
|
-
// sayHi will only be executed once, in the afterRender queue of the RunLoop
|
|
35273
|
-
});
|
|
35274
|
-
```
|
|
35275
|
-
|
|
35276
|
-
Also note that for `scheduleOnce` to prevent additional calls, you need to
|
|
35277
|
-
pass the same function instance. The following case works as expected:
|
|
35278
|
-
|
|
35279
|
-
```javascript
|
|
35280
|
-
function log() {
|
|
35281
|
-
console.log('Logging only once');
|
|
35282
|
-
}
|
|
35283
|
-
|
|
35284
|
-
function scheduleIt() {
|
|
35285
|
-
scheduleOnce('actions', myContext, log);
|
|
35286
|
-
}
|
|
35287
|
-
|
|
35288
|
-
scheduleIt();
|
|
35289
|
-
scheduleIt();
|
|
35290
|
-
```
|
|
35291
|
-
|
|
35292
|
-
But this other case will schedule the function multiple times:
|
|
35293
|
-
|
|
35294
|
-
```javascript
|
|
35295
|
-
import { scheduleOnce } from '@ember/runloop';
|
|
35296
|
-
|
|
35297
|
-
function scheduleIt() {
|
|
35298
|
-
scheduleOnce('actions', myContext, function() {
|
|
35299
|
-
console.log('Closure');
|
|
35300
|
-
});
|
|
35301
|
-
}
|
|
35302
|
-
|
|
35303
|
-
scheduleIt();
|
|
35304
|
-
scheduleIt();
|
|
35305
|
-
|
|
35306
|
-
// "Closure" will print twice, even though we're using `scheduleOnce`,
|
|
35307
|
-
// because the function we pass to it won't match the
|
|
35308
|
-
// previously scheduled operation.
|
|
35309
|
-
```
|
|
35310
|
-
|
|
35311
|
-
Available queues, and their order, can be found at `queues`
|
|
35312
|
-
|
|
35313
|
-
@method scheduleOnce
|
|
35314
|
-
@static
|
|
35315
|
-
@for @ember/runloop
|
|
35316
|
-
@param {String} [queue] The name of the queue to schedule against. Default queues is 'actions'.
|
|
35317
|
-
@param {Object} [target] The target of the method to invoke.
|
|
35318
|
-
@param {Function|String} method The method to invoke.
|
|
35319
|
-
If you pass a string it will be resolved on the
|
|
35320
|
-
target at the time the method is invoked.
|
|
35321
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35322
|
-
@return {Object} Timer information for use in canceling, see `cancel`.
|
|
35323
|
-
@public
|
|
35324
|
-
*/
|
|
35325
35090
|
|
|
35326
|
-
|
|
35327
|
-
|
|
35328
|
-
/* queue, target, method*/
|
|
35329
|
-
scheduleOnce() {
|
|
35091
|
+
function scheduleOnce() {
|
|
35092
|
+
// @ts-expect-error TS doesn't like the rest args here
|
|
35330
35093
|
return _backburner.scheduleOnce(...arguments);
|
|
35331
35094
|
}
|
|
35332
|
-
/**
|
|
35333
|
-
Schedules an item to run from within a separate run loop, after
|
|
35334
|
-
control has been returned to the system. This is equivalent to calling
|
|
35335
|
-
`later` with a wait time of 1ms.
|
|
35336
|
-
|
|
35337
|
-
```javascript
|
|
35338
|
-
import { next } from '@ember/runloop';
|
|
35339
|
-
|
|
35340
|
-
next(myContext, function() {
|
|
35341
|
-
// code to be executed in the next run loop,
|
|
35342
|
-
// which will be scheduled after the current one
|
|
35343
|
-
});
|
|
35344
|
-
```
|
|
35345
|
-
|
|
35346
|
-
Multiple operations scheduled with `next` will coalesce
|
|
35347
|
-
into the same later run loop, along with any other operations
|
|
35348
|
-
scheduled by `later` that expire right around the same
|
|
35349
|
-
time that `next` operations will fire.
|
|
35350
|
-
|
|
35351
|
-
Note that there are often alternatives to using `next`.
|
|
35352
|
-
For instance, if you'd like to schedule an operation to happen
|
|
35353
|
-
after all DOM element operations have completed within the current
|
|
35354
|
-
run loop, you can make use of the `afterRender` run loop queue (added
|
|
35355
|
-
by the `ember-views` package, along with the preceding `render` queue
|
|
35356
|
-
where all the DOM element operations happen).
|
|
35357
|
-
|
|
35358
|
-
Example:
|
|
35359
|
-
|
|
35360
|
-
```app/components/my-component.js
|
|
35361
|
-
import Component from '@ember/component';
|
|
35362
|
-
import { scheduleOnce } from '@ember/runloop';
|
|
35363
|
-
|
|
35364
|
-
export Component.extend({
|
|
35365
|
-
didInsertElement() {
|
|
35366
|
-
this._super(...arguments);
|
|
35367
|
-
scheduleOnce('afterRender', this, 'processChildElements');
|
|
35368
|
-
},
|
|
35369
|
-
|
|
35370
|
-
processChildElements() {
|
|
35371
|
-
// ... do something with component's child component
|
|
35372
|
-
// elements after they've finished rendering, which
|
|
35373
|
-
// can't be done within this component's
|
|
35374
|
-
// `didInsertElement` hook because that gets run
|
|
35375
|
-
// before the child elements have been added to the DOM.
|
|
35376
|
-
}
|
|
35377
|
-
});
|
|
35378
|
-
```
|
|
35379
|
-
|
|
35380
|
-
One benefit of the above approach compared to using `next` is
|
|
35381
|
-
that you will be able to perform DOM/CSS operations before unprocessed
|
|
35382
|
-
elements are rendered to the screen, which may prevent flickering or
|
|
35383
|
-
other artifacts caused by delaying processing until after rendering.
|
|
35384
|
-
|
|
35385
|
-
The other major benefit to the above approach is that `next`
|
|
35386
|
-
introduces an element of non-determinism, which can make things much
|
|
35387
|
-
harder to test, due to its reliance on `setTimeout`; it's much harder
|
|
35388
|
-
to guarantee the order of scheduled operations when they are scheduled
|
|
35389
|
-
outside of the current run loop, i.e. with `next`.
|
|
35390
|
-
|
|
35391
|
-
@method next
|
|
35392
|
-
@static
|
|
35393
|
-
@for @ember/runloop
|
|
35394
|
-
@param {Object} [target] target of method to invoke
|
|
35395
|
-
@param {Function|String} method The method to invoke.
|
|
35396
|
-
If you pass a string it will be resolved on the
|
|
35397
|
-
target at the time the method is invoked.
|
|
35398
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35399
|
-
@return {Object} Timer information for use in canceling, see `cancel`.
|
|
35400
|
-
@public
|
|
35401
|
-
*/
|
|
35402
|
-
|
|
35403
35095
|
|
|
35404
35096
|
function next() {
|
|
35405
|
-
for (var
|
|
35406
|
-
args[
|
|
35097
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
35098
|
+
args[_key5] = arguments[_key5];
|
|
35407
35099
|
}
|
|
35408
35100
|
|
|
35409
|
-
|
|
35410
|
-
return _backburner.later(...args);
|
|
35101
|
+
return _backburner.later(...args, 1);
|
|
35411
35102
|
}
|
|
35412
35103
|
/**
|
|
35413
35104
|
Cancels a scheduled item. Must be a value returned by `later()`,
|
|
@@ -35481,133 +35172,523 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
|
|
|
35481
35172
|
function cancel(timer) {
|
|
35482
35173
|
return _backburner.cancel(timer);
|
|
35483
35174
|
}
|
|
35484
|
-
|
|
35485
|
-
|
|
35486
|
-
|
|
35487
|
-
|
|
35488
|
-
|
|
35489
|
-
|
|
35490
|
-
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
|
|
35494
|
-
|
|
35495
|
-
|
|
35496
|
-
|
|
35497
|
-
|
|
35498
|
-
|
|
35499
|
-
|
|
35175
|
+
|
|
35176
|
+
function debounce() {
|
|
35177
|
+
// @ts-expect-error TS doesn't like the rest args here
|
|
35178
|
+
return _backburner.debounce(...arguments);
|
|
35179
|
+
}
|
|
35180
|
+
|
|
35181
|
+
function throttle() {
|
|
35182
|
+
// @ts-expect-error TS doesn't like the rest args here
|
|
35183
|
+
return _backburner.throttle(...arguments);
|
|
35184
|
+
}
|
|
35185
|
+
});
|
|
35186
|
+
define("@ember/runloop/type-tests.ts/begin-end.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35187
|
+
"use strict";
|
|
35188
|
+
|
|
35189
|
+
(0, _expectType.expectTypeOf)((0, _runloop.begin)()).toEqualTypeOf(); // code to be executed within a RunLoop
|
|
35190
|
+
|
|
35191
|
+
(0, _expectType.expectTypeOf)((0, _runloop.end)()).toEqualTypeOf();
|
|
35192
|
+
});
|
|
35193
|
+
define("@ember/runloop/type-tests.ts/bind.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35194
|
+
"use strict";
|
|
35195
|
+
|
|
35196
|
+
class Foo {
|
|
35197
|
+
test(_foo, _bar, _baz) {
|
|
35198
|
+
return 1;
|
|
35500
35199
|
}
|
|
35501
|
-
|
|
35502
|
-
|
|
35503
|
-
|
|
35504
|
-
|
|
35505
|
-
|
|
35506
|
-
|
|
35507
|
-
|
|
35508
|
-
|
|
35509
|
-
|
|
35510
|
-
|
|
35511
|
-
|
|
35512
|
-
|
|
35513
|
-
|
|
35514
|
-
|
|
35515
|
-
|
|
35516
|
-
|
|
35517
|
-
|
|
35518
|
-
|
|
35519
|
-
|
|
35520
|
-
|
|
35521
|
-
|
|
35522
|
-
|
|
35523
|
-
|
|
35524
|
-
|
|
35200
|
+
|
|
35201
|
+
}
|
|
35202
|
+
|
|
35203
|
+
var foo = new Foo(); // With only function
|
|
35204
|
+
|
|
35205
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
|
|
35206
|
+
return 1;
|
|
35207
|
+
})).toEqualTypeOf();
|
|
35208
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
|
|
35209
|
+
return 1;
|
|
35210
|
+
}, 1)).toEqualTypeOf();
|
|
35211
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
|
|
35212
|
+
return 1;
|
|
35213
|
+
}, 1, true)).toEqualTypeOf();
|
|
35214
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
|
|
35215
|
+
return 1;
|
|
35216
|
+
}, 1, true, 'baz')).toEqualTypeOf();
|
|
35217
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
|
|
35218
|
+
return 1;
|
|
35219
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35220
|
+
(0, _runloop.bind)(_foo => {
|
|
35221
|
+
return 1; // @ts-expect-error invalid argument
|
|
35222
|
+
}, 'string'); // With target and function
|
|
35223
|
+
|
|
35224
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
|
|
35225
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35226
|
+
return 1;
|
|
35227
|
+
})).toEqualTypeOf();
|
|
35228
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
|
|
35229
|
+
return 1;
|
|
35230
|
+
}, 1)).toEqualTypeOf();
|
|
35231
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
|
|
35232
|
+
return 1;
|
|
35233
|
+
}, 1, true)).toEqualTypeOf();
|
|
35234
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
|
|
35235
|
+
return 1;
|
|
35236
|
+
}, 1, true, 'baz')).toEqualTypeOf();
|
|
35237
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
|
|
35238
|
+
return 1;
|
|
35239
|
+
}, 1, true, undefined)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35240
|
+
|
|
35241
|
+
(0, _runloop.bind)(foo, function (_foo) {
|
|
35242
|
+
return 1;
|
|
35243
|
+
}, 'string'); // With function string reference
|
|
35244
|
+
|
|
35245
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test')).toEqualTypeOf();
|
|
35246
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1)).toEqualTypeOf();
|
|
35247
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true)).toEqualTypeOf();
|
|
35248
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true, 'baz')).toEqualTypeOf();
|
|
35249
|
+
(0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true, undefined)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35250
|
+
|
|
35251
|
+
(0, _runloop.bind)(foo, 'test', 'string');
|
|
35252
|
+
});
|
|
35253
|
+
define("@ember/runloop/type-tests.ts/cancel.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35254
|
+
"use strict";
|
|
35255
|
+
|
|
35256
|
+
var runNext = (0, _runloop.next)(null, () => {// will not be executed
|
|
35257
|
+
});
|
|
35258
|
+
(0, _expectType.expectTypeOf)((0, _runloop.cancel)(runNext)).toEqualTypeOf();
|
|
35259
|
+
});
|
|
35260
|
+
define("@ember/runloop/type-tests.ts/debounce.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35261
|
+
"use strict";
|
|
35262
|
+
|
|
35263
|
+
// From Docs
|
|
35264
|
+
function whoRan() {// Do stuff
|
|
35265
|
+
}
|
|
35266
|
+
|
|
35267
|
+
var myContext = {
|
|
35268
|
+
name: 'debounce',
|
|
35269
|
+
|
|
35270
|
+
test(_foo, _baz) {}
|
|
35271
|
+
|
|
35272
|
+
};
|
|
35273
|
+
(0, _runloop.debounce)(myContext, whoRan, 150); // less than 150ms passes
|
|
35274
|
+
|
|
35275
|
+
(0, _runloop.debounce)(myContext, whoRan, 150);
|
|
35276
|
+
(0, _runloop.debounce)(myContext, whoRan, 150, true); // console logs 'debounce ran.' one time immediately.
|
|
35277
|
+
// 100ms passes
|
|
35278
|
+
|
|
35279
|
+
(0, _runloop.debounce)(myContext, whoRan, 150, true); // 150ms passes and nothing else is logged to the console and
|
|
35280
|
+
// the debouncee is no longer being watched
|
|
35281
|
+
|
|
35282
|
+
(0, _runloop.debounce)(myContext, whoRan, 150, true); // console logs 'debounce ran.' one time immediately.
|
|
35283
|
+
// 150ms passes and nothing else is logged to the console and
|
|
35284
|
+
// the debouncee is no longer being watched
|
|
35285
|
+
// Method only
|
|
35286
|
+
|
|
35287
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _baz) => {}, 1, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Requires wait
|
|
35288
|
+
|
|
35289
|
+
(0, _runloop.debounce)((_foo, _baz) => {}, 1, true); // @ts-expect-error Requires all args
|
|
35290
|
+
|
|
35291
|
+
(0, _runloop.debounce)((_foo, _baz) => {}, 1, 1); // Can set immediate
|
|
35292
|
+
|
|
35293
|
+
(0, _runloop.debounce)((_foo, _baz) => {}, 1, true, 1, true); // With target
|
|
35294
|
+
|
|
35295
|
+
(0, _runloop.debounce)(myContext, function (_foo, _baz) {
|
|
35296
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf(myContext);
|
|
35297
|
+
}, 1, true, 1, true); // With key
|
|
35298
|
+
|
|
35299
|
+
(0, _runloop.debounce)(myContext, 'test', 1, true, 1, true); // @ts-expect-error invalid key
|
|
35300
|
+
|
|
35301
|
+
(0, _runloop.debounce)(myContext, 'invalid');
|
|
35302
|
+
|
|
35303
|
+
class Foo {
|
|
35304
|
+
test(_foo, _bar, _baz) {
|
|
35305
|
+
return 1;
|
|
35525
35306
|
}
|
|
35526
|
-
|
|
35527
|
-
let myContext = { name: 'debounce' };
|
|
35528
|
-
|
|
35529
|
-
debounce(myContext, whoRan, 150, true);
|
|
35530
|
-
|
|
35531
|
-
// console logs 'debounce ran.' one time immediately.
|
|
35532
|
-
// 100ms passes
|
|
35533
|
-
debounce(myContext, whoRan, 150, true);
|
|
35534
|
-
|
|
35535
|
-
// 150ms passes and nothing else is logged to the console and
|
|
35536
|
-
// the debouncee is no longer being watched
|
|
35537
|
-
debounce(myContext, whoRan, 150, true);
|
|
35538
|
-
|
|
35539
|
-
// console logs 'debounce ran.' one time immediately.
|
|
35540
|
-
// 150ms passes and nothing else is logged to the console and
|
|
35541
|
-
// the debouncee is no longer being watched
|
|
35542
|
-
```
|
|
35543
|
-
|
|
35544
|
-
@method debounce
|
|
35545
|
-
@static
|
|
35546
|
-
@for @ember/runloop
|
|
35547
|
-
@param {Object} [target] target of method to invoke
|
|
35548
|
-
@param {Function|String} method The method to invoke.
|
|
35549
|
-
May be a function or a string. If you pass a string
|
|
35550
|
-
then it will be looked up on the passed target.
|
|
35551
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35552
|
-
@param {Number} wait Number of milliseconds to wait.
|
|
35553
|
-
@param {Boolean} immediate Trigger the function on the leading instead
|
|
35554
|
-
of the trailing edge of the wait interval. Defaults to false.
|
|
35555
|
-
@return {Array} Timer information for use in canceling, see `cancel`.
|
|
35556
|
-
@public
|
|
35557
|
-
*/
|
|
35558
35307
|
|
|
35308
|
+
}
|
|
35309
|
+
|
|
35310
|
+
var foo = new Foo(); // With only function
|
|
35311
|
+
|
|
35312
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _bar, _baz) => {
|
|
35313
|
+
return 1;
|
|
35314
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35315
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _bar, _baz) => {
|
|
35316
|
+
return 1;
|
|
35317
|
+
}, 1, true, 'string', 1)).toEqualTypeOf();
|
|
35318
|
+
(0, _runloop.debounce)(_foo => {
|
|
35319
|
+
return 1; // @ts-expect-error invalid argument
|
|
35320
|
+
}, 'string'); // With target and function
|
|
35321
|
+
|
|
35322
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
|
|
35323
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35324
|
+
return 1;
|
|
35325
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35326
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
|
|
35327
|
+
return 1;
|
|
35328
|
+
}, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35329
|
+
|
|
35330
|
+
(0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
|
|
35331
|
+
return 1;
|
|
35332
|
+
}, 1, 'string', true, 1); // With function string reference
|
|
35333
|
+
|
|
35334
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
|
|
35335
|
+
(0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35336
|
+
|
|
35337
|
+
(0, _runloop.debounce)(foo, 'test', 'string');
|
|
35338
|
+
});
|
|
35339
|
+
define("@ember/runloop/type-tests.ts/join.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35340
|
+
"use strict";
|
|
35341
|
+
|
|
35342
|
+
class Foo {
|
|
35343
|
+
test(_foo, _bar, _baz) {
|
|
35344
|
+
return 1;
|
|
35345
|
+
}
|
|
35559
35346
|
|
|
35560
|
-
function debounce() {
|
|
35561
|
-
return _backburner.debounce(...arguments);
|
|
35562
35347
|
}
|
|
35563
|
-
|
|
35564
|
-
|
|
35565
|
-
|
|
35566
|
-
|
|
35567
|
-
|
|
35568
|
-
|
|
35569
|
-
|
|
35570
|
-
|
|
35571
|
-
|
|
35348
|
+
|
|
35349
|
+
var foo = new Foo(); // With only function
|
|
35350
|
+
|
|
35351
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)((_foo, _bar, _baz) => {
|
|
35352
|
+
return 1;
|
|
35353
|
+
}, 1, true)).toEqualTypeOf();
|
|
35354
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)((_foo, _bar, _baz) => {
|
|
35355
|
+
return 1;
|
|
35356
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35357
|
+
(0, _runloop.join)(_foo => {
|
|
35358
|
+
return 1; // @ts-expect-error invalid argument
|
|
35359
|
+
}, 'string'); // With target and function
|
|
35360
|
+
|
|
35361
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)(foo, function (_foo, _bar, _baz) {
|
|
35362
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35363
|
+
return 1;
|
|
35364
|
+
}, 1, true)).toEqualTypeOf();
|
|
35365
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)(foo, function (_foo, _bar, _baz) {
|
|
35366
|
+
return 1;
|
|
35367
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35368
|
+
|
|
35369
|
+
(0, _runloop.join)(foo, function (_foo, _bar, _baz) {
|
|
35370
|
+
return 1;
|
|
35371
|
+
}, 1, 'string'); // With function string reference
|
|
35372
|
+
|
|
35373
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)(foo, 'test', 1, true)).toEqualTypeOf();
|
|
35374
|
+
(0, _expectType.expectTypeOf)((0, _runloop.join)(foo, 'test', 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35375
|
+
|
|
35376
|
+
(0, _runloop.join)(foo, 'test', 'string');
|
|
35377
|
+
});
|
|
35378
|
+
define("@ember/runloop/type-tests.ts/later.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35379
|
+
"use strict";
|
|
35380
|
+
|
|
35381
|
+
class Foo {
|
|
35382
|
+
test(_foo, _bar, _baz) {
|
|
35383
|
+
return 1;
|
|
35572
35384
|
}
|
|
35573
|
-
|
|
35574
|
-
let myContext = { name: 'throttle' };
|
|
35575
|
-
|
|
35576
|
-
throttle(myContext, whoRan, 150);
|
|
35577
|
-
// whoRan is invoked with context myContext
|
|
35578
|
-
// console logs 'throttle ran.'
|
|
35579
|
-
|
|
35580
|
-
// 50ms passes
|
|
35581
|
-
throttle(myContext, whoRan, 150);
|
|
35582
|
-
|
|
35583
|
-
// 50ms passes
|
|
35584
|
-
throttle(myContext, whoRan, 150);
|
|
35585
|
-
|
|
35586
|
-
// 150ms passes
|
|
35587
|
-
throttle(myContext, whoRan, 150);
|
|
35588
|
-
// whoRan is invoked with context myContext
|
|
35589
|
-
// console logs 'throttle ran.'
|
|
35590
|
-
```
|
|
35591
|
-
|
|
35592
|
-
@method throttle
|
|
35593
|
-
@static
|
|
35594
|
-
@for @ember/runloop
|
|
35595
|
-
@param {Object} [target] target of method to invoke
|
|
35596
|
-
@param {Function|String} method The method to invoke.
|
|
35597
|
-
May be a function or a string. If you pass a string
|
|
35598
|
-
then it will be looked up on the passed target.
|
|
35599
|
-
@param {Object} [args*] Optional arguments to pass to the timeout.
|
|
35600
|
-
@param {Number} spacing Number of milliseconds to space out requests.
|
|
35601
|
-
@param {Boolean} immediate Trigger the function on the leading instead
|
|
35602
|
-
of the trailing edge of the wait interval. Defaults to true.
|
|
35603
|
-
@return {Array} Timer information for use in canceling, see `cancel`.
|
|
35604
|
-
@public
|
|
35605
|
-
*/
|
|
35606
35385
|
|
|
35386
|
+
}
|
|
35607
35387
|
|
|
35608
|
-
|
|
35609
|
-
|
|
35388
|
+
var foo = new Foo(); // With only function
|
|
35389
|
+
|
|
35390
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)((_foo, _bar, _baz) => {
|
|
35391
|
+
return 1;
|
|
35392
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35393
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)((_foo, _bar, _baz) => {
|
|
35394
|
+
return 1;
|
|
35395
|
+
}, 1, true, 'string', 1)).toEqualTypeOf();
|
|
35396
|
+
(0, _runloop.later)(_foo => {
|
|
35397
|
+
return 1; // @ts-expect-error invalid argument
|
|
35398
|
+
}, 'string'); // With target and function
|
|
35399
|
+
|
|
35400
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)(foo, function (_foo, _bar, _baz) {
|
|
35401
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35402
|
+
return 1;
|
|
35403
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35404
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)(foo, function (_foo, _bar, _baz) {
|
|
35405
|
+
return 1;
|
|
35406
|
+
}, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35407
|
+
|
|
35408
|
+
(0, _runloop.later)(foo, function (_foo, _bar, _baz) {
|
|
35409
|
+
return 1;
|
|
35410
|
+
}, 1, 'string', true, 1); // With function string reference
|
|
35411
|
+
|
|
35412
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
|
|
35413
|
+
(0, _expectType.expectTypeOf)((0, _runloop.later)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35414
|
+
|
|
35415
|
+
(0, _runloop.later)(foo, 'test', 'string');
|
|
35416
|
+
});
|
|
35417
|
+
define("@ember/runloop/type-tests.ts/next.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35418
|
+
"use strict";
|
|
35419
|
+
|
|
35420
|
+
class Foo {
|
|
35421
|
+
test(_foo, _bar, _baz) {
|
|
35422
|
+
return 1;
|
|
35423
|
+
}
|
|
35424
|
+
|
|
35425
|
+
}
|
|
35426
|
+
|
|
35427
|
+
var foo = new Foo(); // With only function
|
|
35428
|
+
|
|
35429
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)((_foo, _bar, _baz) => {
|
|
35430
|
+
return 1;
|
|
35431
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35432
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)((_foo, _bar, _baz) => {
|
|
35433
|
+
return 1;
|
|
35434
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35435
|
+
(0, _runloop.next)(_foo => {
|
|
35436
|
+
return 1; // @ts-expect-error invalid argument
|
|
35437
|
+
}, 'string'); // With target and function
|
|
35438
|
+
|
|
35439
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)(foo, function (_foo, _bar, _baz) {
|
|
35440
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35441
|
+
return 1;
|
|
35442
|
+
}, 1, true)).toEqualTypeOf();
|
|
35443
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)(foo, function (_foo, _bar, _baz) {
|
|
35444
|
+
return 1;
|
|
35445
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35446
|
+
|
|
35447
|
+
(0, _runloop.next)(foo, function (_foo, _bar, _baz) {
|
|
35448
|
+
return 1;
|
|
35449
|
+
}, 1, 'string', true); // With function string reference
|
|
35450
|
+
|
|
35451
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
|
|
35452
|
+
(0, _expectType.expectTypeOf)((0, _runloop.next)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35453
|
+
|
|
35454
|
+
(0, _runloop.next)(foo, 'test', 'string');
|
|
35455
|
+
});
|
|
35456
|
+
define("@ember/runloop/type-tests.ts/once.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35457
|
+
"use strict";
|
|
35458
|
+
|
|
35459
|
+
class Foo {
|
|
35460
|
+
test(_foo, _bar, _baz) {
|
|
35461
|
+
return 1;
|
|
35462
|
+
}
|
|
35463
|
+
|
|
35464
|
+
}
|
|
35465
|
+
|
|
35466
|
+
var foo = new Foo(); // With only function
|
|
35467
|
+
|
|
35468
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)((_foo, _bar, _baz) => {
|
|
35469
|
+
return 1;
|
|
35470
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35471
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)((_foo, _bar, _baz) => {
|
|
35472
|
+
return 1;
|
|
35473
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35474
|
+
(0, _runloop.once)(_foo => {
|
|
35475
|
+
return 1; // @ts-expect-error invalid argument
|
|
35476
|
+
}, 'string'); // With target and function
|
|
35477
|
+
|
|
35478
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)(foo, function (_foo, _bar, _baz) {
|
|
35479
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35480
|
+
return 1;
|
|
35481
|
+
}, 1, true)).toEqualTypeOf();
|
|
35482
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)(foo, function (_foo, _bar, _baz) {
|
|
35483
|
+
return 1;
|
|
35484
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35485
|
+
|
|
35486
|
+
(0, _runloop.once)(foo, function (_foo, _bar, _baz) {
|
|
35487
|
+
return 1;
|
|
35488
|
+
}, 1, 'string', true); // With function string reference
|
|
35489
|
+
|
|
35490
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
|
|
35491
|
+
(0, _expectType.expectTypeOf)((0, _runloop.once)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35492
|
+
|
|
35493
|
+
(0, _runloop.once)(foo, 'test', 'string');
|
|
35494
|
+
});
|
|
35495
|
+
define("@ember/runloop/type-tests.ts/run.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35496
|
+
"use strict";
|
|
35497
|
+
|
|
35498
|
+
class Foo {
|
|
35499
|
+
test(_foo, _bar, _baz) {
|
|
35500
|
+
return 1;
|
|
35501
|
+
}
|
|
35502
|
+
|
|
35503
|
+
}
|
|
35504
|
+
|
|
35505
|
+
var foo = new Foo(); // With only function
|
|
35506
|
+
|
|
35507
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)((_foo, _bar, _baz) => {
|
|
35508
|
+
return 1;
|
|
35509
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35510
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)((_foo, _bar, _baz) => {
|
|
35511
|
+
return 1;
|
|
35512
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35513
|
+
(0, _runloop.run)(_foo => {
|
|
35514
|
+
return 1; // @ts-expect-error invalid argument
|
|
35515
|
+
}, 'string'); // With target and function
|
|
35516
|
+
|
|
35517
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)(foo, function (_foo, _bar, _baz) {
|
|
35518
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35519
|
+
return 1;
|
|
35520
|
+
}, 1, true)).toEqualTypeOf();
|
|
35521
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)(foo, function (_foo, _bar, _baz) {
|
|
35522
|
+
return 1;
|
|
35523
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35524
|
+
|
|
35525
|
+
(0, _runloop.run)(foo, function (_foo, _bar, _baz) {
|
|
35526
|
+
return 1;
|
|
35527
|
+
}, 1, 'string', true); // With function string reference
|
|
35528
|
+
|
|
35529
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
|
|
35530
|
+
(0, _expectType.expectTypeOf)((0, _runloop.run)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35531
|
+
|
|
35532
|
+
(0, _runloop.run)(foo, 'test', 'string');
|
|
35533
|
+
});
|
|
35534
|
+
define("@ember/runloop/type-tests.ts/schedule-once.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35535
|
+
"use strict";
|
|
35536
|
+
|
|
35537
|
+
class Foo {
|
|
35538
|
+
test(_foo, _bar, _baz) {
|
|
35539
|
+
return 1;
|
|
35540
|
+
}
|
|
35541
|
+
|
|
35542
|
+
}
|
|
35543
|
+
|
|
35544
|
+
var foo = new Foo(); // With only function
|
|
35545
|
+
|
|
35546
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', (_foo, _bar, _baz) => {
|
|
35547
|
+
return 1;
|
|
35548
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35549
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', (_foo, _bar, _baz) => {
|
|
35550
|
+
return 1;
|
|
35551
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35552
|
+
(0, _runloop.scheduleOnce)('my-queue', _foo => {
|
|
35553
|
+
return 1;
|
|
35554
|
+
}, // @ts-expect-error invalid argument
|
|
35555
|
+
'string'); // With target and function
|
|
35556
|
+
|
|
35557
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35558
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35559
|
+
return 1;
|
|
35560
|
+
}, 1, true)).toEqualTypeOf();
|
|
35561
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35562
|
+
return 1;
|
|
35563
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35564
|
+
|
|
35565
|
+
(0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35566
|
+
return 1;
|
|
35567
|
+
}, 1, 'string', true); // With function string reference
|
|
35568
|
+
|
|
35569
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, 'test', 1, true, 'string')).toEqualTypeOf();
|
|
35570
|
+
(0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35571
|
+
|
|
35572
|
+
(0, _runloop.scheduleOnce)('my-queue', foo, 'test', 'string');
|
|
35573
|
+
});
|
|
35574
|
+
define("@ember/runloop/type-tests.ts/schedule.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35575
|
+
"use strict";
|
|
35576
|
+
|
|
35577
|
+
class Foo {
|
|
35578
|
+
test(_foo, _bar, _baz) {
|
|
35579
|
+
return 1;
|
|
35580
|
+
}
|
|
35581
|
+
|
|
35582
|
+
}
|
|
35583
|
+
|
|
35584
|
+
var foo = new Foo(); // With only function
|
|
35585
|
+
|
|
35586
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', (_foo, _bar, _baz) => {
|
|
35587
|
+
return 1;
|
|
35588
|
+
}, 1, true, undefined)).toEqualTypeOf();
|
|
35589
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', (_foo, _bar, _baz) => {
|
|
35590
|
+
return 1;
|
|
35591
|
+
}, 1, true, 'string')).toEqualTypeOf();
|
|
35592
|
+
(0, _runloop.schedule)('my-queue', _foo => {
|
|
35593
|
+
return 1;
|
|
35594
|
+
}, // @ts-expect-error invalid argument
|
|
35595
|
+
'string'); // With target and function
|
|
35596
|
+
|
|
35597
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35598
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35599
|
+
return 1;
|
|
35600
|
+
}, 1, true)).toEqualTypeOf();
|
|
35601
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35602
|
+
return 1;
|
|
35603
|
+
}, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35604
|
+
|
|
35605
|
+
(0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
|
|
35606
|
+
return 1;
|
|
35607
|
+
}, 1, 'string', true); // With function string reference
|
|
35608
|
+
|
|
35609
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, 'test', 1, true, 'string')).toEqualTypeOf();
|
|
35610
|
+
(0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35611
|
+
|
|
35612
|
+
(0, _runloop.schedule)('my-queue', foo, 'test', 'string');
|
|
35613
|
+
});
|
|
35614
|
+
define("@ember/runloop/type-tests.ts/throttle.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
|
|
35615
|
+
"use strict";
|
|
35616
|
+
|
|
35617
|
+
// From Docs
|
|
35618
|
+
function whoRan() {// Do stuff
|
|
35610
35619
|
}
|
|
35620
|
+
|
|
35621
|
+
var myContext = {
|
|
35622
|
+
name: 'throttle',
|
|
35623
|
+
|
|
35624
|
+
test(_foo, _baz) {}
|
|
35625
|
+
|
|
35626
|
+
};
|
|
35627
|
+
(0, _runloop.throttle)(myContext, whoRan, 150); // less than 150ms passes
|
|
35628
|
+
|
|
35629
|
+
(0, _runloop.throttle)(myContext, whoRan, 150);
|
|
35630
|
+
(0, _runloop.throttle)(myContext, whoRan, 150, true); // console logs 'throttle ran.' one time immediately.
|
|
35631
|
+
// 100ms passes
|
|
35632
|
+
|
|
35633
|
+
(0, _runloop.throttle)(myContext, whoRan, 150, true); // 150ms passes and nothing else is logged to the console and
|
|
35634
|
+
// the throttlee is no longer being watched
|
|
35635
|
+
|
|
35636
|
+
(0, _runloop.throttle)(myContext, whoRan, 150, true); // console logs 'throttle ran.' one time immediately.
|
|
35637
|
+
// 150ms passes and nothing else is logged to the console and
|
|
35638
|
+
// the throttlee is no longer being watched
|
|
35639
|
+
// Method only
|
|
35640
|
+
|
|
35641
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _baz) => {}, 1, undefined, 1)).toEqualTypeOf(); // Wait is optional
|
|
35642
|
+
|
|
35643
|
+
(0, _runloop.throttle)((_foo, _baz) => {}, 1, true); // @ts-expect-error Requires all args
|
|
35644
|
+
|
|
35645
|
+
(0, _runloop.throttle)((_foo, _baz) => {}, 1, 1); // Can set immediate
|
|
35646
|
+
|
|
35647
|
+
(0, _runloop.throttle)((_foo, _baz) => {}, 1, true, 1, true); // With target
|
|
35648
|
+
|
|
35649
|
+
(0, _runloop.throttle)(myContext, function (_foo, _baz) {
|
|
35650
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf(myContext);
|
|
35651
|
+
}, 1, true, 1, true); // With key
|
|
35652
|
+
|
|
35653
|
+
(0, _runloop.throttle)(myContext, 'test', 1, true, 1, true); // @ts-expect-error invalid key
|
|
35654
|
+
|
|
35655
|
+
(0, _runloop.throttle)(myContext, 'invalid');
|
|
35656
|
+
|
|
35657
|
+
class Foo {
|
|
35658
|
+
test(_foo, _bar, _baz) {
|
|
35659
|
+
return 1;
|
|
35660
|
+
}
|
|
35661
|
+
|
|
35662
|
+
}
|
|
35663
|
+
|
|
35664
|
+
var foo = new Foo(); // With only function
|
|
35665
|
+
|
|
35666
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _bar, _baz) => {
|
|
35667
|
+
return 1;
|
|
35668
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35669
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _bar, _baz) => {
|
|
35670
|
+
return 1;
|
|
35671
|
+
}, 1, true, 'string', 1)).toEqualTypeOf();
|
|
35672
|
+
(0, _runloop.throttle)(_foo => {
|
|
35673
|
+
return 1; // @ts-expect-error invalid argument
|
|
35674
|
+
}, 'string'); // With target and function
|
|
35675
|
+
|
|
35676
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
|
|
35677
|
+
(0, _expectType.expectTypeOf)(this).toEqualTypeOf();
|
|
35678
|
+
return 1;
|
|
35679
|
+
}, 1, true, undefined, 1)).toEqualTypeOf();
|
|
35680
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
|
|
35681
|
+
return 1;
|
|
35682
|
+
}, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
|
|
35683
|
+
|
|
35684
|
+
(0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
|
|
35685
|
+
return 1;
|
|
35686
|
+
}, 1, 'string', true, 1); // With function string reference
|
|
35687
|
+
|
|
35688
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
|
|
35689
|
+
(0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
|
|
35690
|
+
|
|
35691
|
+
(0, _runloop.throttle)(foo, 'test', 'string');
|
|
35611
35692
|
});
|
|
35612
35693
|
define("@ember/service/index", ["exports", "@ember/-internals/runtime", "@ember/-internals/metal"], function (_exports, _runtime, _metal) {
|
|
35613
35694
|
"use strict";
|
|
@@ -55442,20 +55523,9 @@ define("ember/index", ["exports", "require", "@ember/-internals/environment", "@
|
|
|
55442
55523
|
Ember._get = _runtime2.get;
|
|
55443
55524
|
Ember._on = _runtime2.on;
|
|
55444
55525
|
Ember._fn = _runtime2.fn;
|
|
55445
|
-
|
|
55446
|
-
|
|
55447
|
-
|
|
55448
|
-
) {
|
|
55449
|
-
Ember._helperManagerCapabilities = _manager.helperCapabilities;
|
|
55450
|
-
Ember._setHelperManager = _manager.setHelperManager;
|
|
55451
|
-
}
|
|
55452
|
-
|
|
55453
|
-
if (true
|
|
55454
|
-
/* EMBER_GLIMMER_INVOKE_HELPER */
|
|
55455
|
-
) {
|
|
55456
|
-
Ember._invokeHelper = _runtime2.invokeHelper;
|
|
55457
|
-
}
|
|
55458
|
-
|
|
55526
|
+
Ember._helperManagerCapabilities = _manager.helperCapabilities;
|
|
55527
|
+
Ember._setHelperManager = _manager.setHelperManager;
|
|
55528
|
+
Ember._invokeHelper = _runtime2.invokeHelper;
|
|
55459
55529
|
Ember._captureRenderTree = EmberDebug.captureRenderTree;
|
|
55460
55530
|
|
|
55461
55531
|
var deprecateImportFromString = function (name, message) {
|
|
@@ -55469,6 +55539,7 @@ define("ember/index", ["exports", "require", "@ember/-internals/environment", "@
|
|
|
55469
55539
|
id: 'ember-string.htmlsafe-ishtmlsafe',
|
|
55470
55540
|
for: 'ember-source',
|
|
55471
55541
|
since: {
|
|
55542
|
+
available: '3.25',
|
|
55472
55543
|
enabled: '3.25'
|
|
55473
55544
|
},
|
|
55474
55545
|
until: '4.0.0',
|
|
@@ -55651,7 +55722,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
55651
55722
|
value: true
|
|
55652
55723
|
});
|
|
55653
55724
|
_exports.default = void 0;
|
|
55654
|
-
var _default = "4.
|
|
55725
|
+
var _default = "4.4.0-alpha.3";
|
|
55655
55726
|
_exports.default = _default;
|
|
55656
55727
|
});
|
|
55657
55728
|
define("route-recognizer", ["exports"], function (_exports) {
|
|
@@ -58217,7 +58288,7 @@ define("router_js", ["exports", "rsvp", "route-recognizer"], function (_exports,
|
|
|
58217
58288
|
var lastArg = modelsArray[modelsArray.length - 1];
|
|
58218
58289
|
var queryParams = {};
|
|
58219
58290
|
|
|
58220
|
-
if (lastArg
|
|
58291
|
+
if (lastArg && Object.prototype.hasOwnProperty.call(lastArg, 'queryParams')) {
|
|
58221
58292
|
// We just checked this.
|
|
58222
58293
|
// TODO: Use an assertion?
|
|
58223
58294
|
queryParams = modelsArray.pop().queryParams;
|