ember-source 4.4.0-alpha.1 → 4.4.0-alpha.4

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/blueprints/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +4 -4
  3. package/blueprints/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +3 -3
  4. package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +2 -2
  5. package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +3 -3
  6. package/blueprints/component/index.js +2 -2
  7. package/blueprints/component-class/index.js +2 -2
  8. package/blueprints/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +4 -4
  9. package/blueprints/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +7 -5
  10. package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +6 -6
  11. package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +4 -4
  12. package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +6 -6
  13. package/blueprints/controller/files/__root__/__path__/__name__.js +1 -2
  14. package/blueprints/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
  15. package/blueprints/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
  16. package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  17. package/blueprints/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
  18. package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  19. package/blueprints/helper/files/__root__/__collection__/__name__.js +1 -1
  20. package/blueprints/helper/mu-files/__root__/__collection__/__name__.js +1 -1
  21. package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
  22. package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +6 -4
  23. package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
  24. package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
  25. package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
  26. package/blueprints/initializer/files/__root__/initializers/__name__.js +2 -3
  27. package/blueprints/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +6 -7
  28. package/blueprints/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
  29. package/blueprints/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +3 -4
  30. package/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +2 -3
  31. package/blueprints/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +5 -5
  32. package/blueprints/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
  33. package/blueprints/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +2 -2
  34. package/blueprints/mixin/files/__root__/mixins/__name__.js +1 -2
  35. package/blueprints/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
  36. package/blueprints/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
  37. package/blueprints/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
  38. package/blueprints/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +1 -1
  39. package/blueprints/route/files/__root__/__path__/__name__.js +2 -2
  40. package/blueprints/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
  41. package/blueprints/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
  42. package/blueprints/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  43. package/blueprints/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
  44. package/blueprints/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  45. package/blueprints/service/files/__root__/__path__/__name__.js +1 -2
  46. package/blueprints/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
  47. package/blueprints/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
  48. package/blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  49. package/blueprints/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
  50. package/blueprints/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +3 -3
  51. package/blueprints/util-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
  52. package/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
  53. package/blueprints/util-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
  54. package/blueprints/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +2 -3
  55. package/build-metadata.json +3 -3
  56. package/dist/dependencies/router_js.js +1 -1
  57. package/dist/ember-template-compiler.js +20 -143
  58. package/dist/ember-template-compiler.map +1 -1
  59. package/dist/ember-testing.js +5 -3
  60. package/dist/ember-testing.map +1 -1
  61. package/dist/ember.debug.js +1132 -1719
  62. package/dist/ember.debug.map +1 -1
  63. package/dist/header/license.js +1 -1
  64. package/dist/packages/@ember/-internals/container/index.js +3 -19
  65. package/dist/packages/@ember/-internals/extension-support/lib/container_debug_adapter.js +10 -19
  66. package/dist/packages/@ember/-internals/extension-support/lib/data_adapter.js +113 -112
  67. package/dist/packages/@ember/-internals/glimmer/index.js +163 -773
  68. package/dist/packages/@ember/-internals/metal/index.js +19 -32
  69. package/dist/packages/@ember/-internals/routing/lib/location/hash_location.js +1 -1
  70. package/dist/packages/@ember/-internals/routing/lib/services/router.js +67 -12
  71. package/dist/packages/@ember/-internals/routing/lib/services/routing.js +2 -0
  72. package/dist/packages/@ember/-internals/routing/lib/system/generate_controller.js +3 -1
  73. package/dist/packages/@ember/-internals/routing/lib/system/route.js +15 -7
  74. package/dist/packages/@ember/-internals/routing/lib/system/router.js +16 -21
  75. package/dist/packages/@ember/-internals/routing/lib/utils.js +2 -1
  76. package/dist/packages/@ember/-internals/runtime/lib/compare.js +19 -5
  77. package/dist/packages/@ember/-internals/runtime/lib/ext/rsvp.js +8 -4
  78. package/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +1 -1
  79. package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +1 -1
  80. package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +4 -4
  81. package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +29 -29
  82. package/dist/packages/@ember/-internals/runtime/lib/mixins/promise_proxy.js +16 -16
  83. package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +51 -50
  84. package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +8 -8
  85. package/dist/packages/@ember/-internals/utils/index.js +1 -1
  86. package/dist/packages/@ember/-internals/views/lib/system/utils.js +4 -2
  87. package/dist/packages/@ember/-internals/views/lib/views/core_view.js +5 -22
  88. package/dist/packages/@ember/application/instance.js +3 -3
  89. package/dist/packages/@ember/canary-features/index.js +4 -12
  90. package/dist/packages/@ember/debug/index.js +1 -1
  91. package/dist/packages/@ember/debug/lib/capture-render-tree.js +2 -0
  92. package/dist/packages/@ember/debug/lib/handlers.js +1 -1
  93. package/dist/packages/@ember/renderer/index.js +21 -0
  94. package/dist/packages/@ember/runloop/index.js +31 -528
  95. package/dist/packages/@ember/runloop/type-tests.ts/begin-end.test.js +5 -0
  96. package/dist/packages/@ember/runloop/type-tests.ts/bind.test.js +59 -0
  97. package/dist/packages/@ember/runloop/type-tests.ts/cancel.test.js +5 -0
  98. package/dist/packages/@ember/runloop/type-tests.ts/debounce.test.js +77 -0
  99. package/dist/packages/@ember/runloop/type-tests.ts/join.test.js +38 -0
  100. package/dist/packages/@ember/runloop/type-tests.ts/later.test.js +38 -0
  101. package/dist/packages/@ember/runloop/type-tests.ts/next.test.js +38 -0
  102. package/dist/packages/@ember/runloop/type-tests.ts/once.test.js +38 -0
  103. package/dist/packages/@ember/runloop/type-tests.ts/run.test.js +38 -0
  104. package/dist/packages/@ember/runloop/type-tests.ts/schedule-once.test.js +39 -0
  105. package/dist/packages/@ember/runloop/type-tests.ts/schedule.test.js +39 -0
  106. package/dist/packages/@ember/runloop/type-tests.ts/throttle.test.js +77 -0
  107. package/dist/packages/ember/index.js +4 -14
  108. package/dist/packages/ember/version.js +1 -1
  109. package/docs/data.json +658 -383
  110. package/package.json +10 -10
@@ -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.4.0-alpha.1
9
+ * @version 4.4.0-alpha.4
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
 
@@ -704,22 +704,6 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
704
704
  container(options) {
705
705
  return new Container(this, options);
706
706
  }
707
- /**
708
- Registers a factory for later injection.
709
- Example:
710
- ```javascript
711
- let registry = new Registry();
712
- registry.register('model:user', Person, {singleton: false });
713
- registry.register('fruit:favorite', Orange);
714
- registry.register('communication:main', Email, {singleton: false});
715
- ```
716
- @private
717
- @method register
718
- @param {String} fullName
719
- @param {Function} factory
720
- @param {Object} options
721
- */
722
-
723
707
 
724
708
  register(fullName, factory, options) {
725
709
  if (options === void 0) {
@@ -1497,23 +1481,11 @@ define("@ember/-internals/extension-support/lib/container_debug_adapter", ["expo
1497
1481
  @since 1.5.0
1498
1482
  @public
1499
1483
  */
1500
- var _default = _runtime.Object.extend({
1501
- init() {
1502
- this._super(...arguments);
1503
-
1484
+ class ContainerDebugAdapter extends _runtime.Object {
1485
+ constructor(owner) {
1486
+ super(owner);
1504
1487
  this.resolver = (0, _owner.getOwner)(this).lookup('resolver-for-debugging:main');
1505
- },
1506
-
1507
- /**
1508
- The resolver instance of the application
1509
- being debugged. This property will be injected
1510
- on creation.
1511
- @property resolver
1512
- @default null
1513
- @public
1514
- */
1515
- resolver: null,
1516
-
1488
+ }
1517
1489
  /**
1518
1490
  Returns true if it is possible to catalog a list of available
1519
1491
  classes in the resolver for a given type.
@@ -1522,14 +1494,15 @@ define("@ember/-internals/extension-support/lib/container_debug_adapter", ["expo
1522
1494
  @return {boolean} whether a list is available for this type.
1523
1495
  @public
1524
1496
  */
1497
+
1498
+
1525
1499
  canCatalogEntriesByType(type) {
1526
1500
  if (type === 'model' || type === 'template') {
1527
1501
  return false;
1528
1502
  }
1529
1503
 
1530
1504
  return true;
1531
- },
1532
-
1505
+ }
1533
1506
  /**
1534
1507
  Returns the available classes a given type.
1535
1508
  @method catalogEntriesByType
@@ -1537,6 +1510,8 @@ define("@ember/-internals/extension-support/lib/container_debug_adapter", ["expo
1537
1510
  @return {Array} An array of strings.
1538
1511
  @public
1539
1512
  */
1513
+
1514
+
1540
1515
  catalogEntriesByType(type) {
1541
1516
  var namespaces = (0, _runtime.A)(_runtime.Namespace.NAMESPACES);
1542
1517
  var types = (0, _runtime.A)();
@@ -1559,9 +1534,9 @@ define("@ember/-internals/extension-support/lib/container_debug_adapter", ["expo
1559
1534
  return types;
1560
1535
  }
1561
1536
 
1562
- });
1537
+ }
1563
1538
 
1564
- _exports.default = _default;
1539
+ _exports.default = ContainerDebugAdapter;
1565
1540
  });
1566
1541
  define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@ember/-internals/owner", "@ember/runloop", "@ember/-internals/metal", "@ember/string", "@ember/-internals/runtime", "@glimmer/validator"], function (_exports, _owner, _runloop, _metal, _string, _runtime, _validator) {
1567
1542
  "use strict";
@@ -1583,12 +1558,12 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1583
1558
 
1584
1559
  class RecordsWatcher {
1585
1560
  constructor(records, recordsAdded, recordsUpdated, recordsRemoved, wrapRecord, release) {
1561
+ this.wrapRecord = wrapRecord;
1562
+ this.release = release;
1586
1563
  this.recordCaches = new Map();
1587
1564
  this.added = [];
1588
1565
  this.updated = [];
1589
1566
  this.removed = [];
1590
- this.release = release;
1591
- this.wrapRecord = wrapRecord;
1592
1567
  this.recordArrayCache = (0, _validator.createCache)(() => {
1593
1568
  var seen = new Set(); // Track `[]` for legacy support
1594
1569
 
@@ -1600,7 +1575,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1600
1575
  // should not be polled again in the future
1601
1576
 
1602
1577
  (0, _validator.untrack)(() => {
1603
- this.recordCaches.forEach((cache, record) => {
1578
+ this.recordCaches.forEach((_cache, record) => {
1604
1579
  if (!seen.has(record)) {
1605
1580
  this.removed.push(wrapRecord(record));
1606
1581
  this.recordCaches.delete(record);
@@ -1652,6 +1627,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1652
1627
 
1653
1628
  class TypeWatcher {
1654
1629
  constructor(records, onChange, release) {
1630
+ this.release = release;
1655
1631
  var hasBeenAccessed = false;
1656
1632
  this.cache = (0, _validator.createCache)(() => {
1657
1633
  // Empty iteration, we're doing this just
@@ -1720,49 +1696,47 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1720
1696
  */
1721
1697
 
1722
1698
 
1723
- var _default = _runtime.Object.extend({
1724
- init() {
1725
- this._super(...arguments);
1726
-
1727
- this.containerDebugAdapter = (0, _owner.getOwner)(this).lookup('container-debug-adapter:main');
1699
+ class DataAdapter extends _runtime.Object {
1700
+ constructor(owner) {
1701
+ super(owner);
1728
1702
  this.releaseMethods = (0, _runtime.A)();
1729
1703
  this.recordsWatchers = new Map();
1730
1704
  this.typeWatchers = new Map();
1731
1705
  this.flushWatchers = null;
1732
- },
1733
-
1734
- /**
1735
- The container-debug-adapter which is used
1736
- to list all models.
1737
- @property containerDebugAdapter
1738
- @default undefined
1739
- @since 1.5.0
1740
- @public
1741
- **/
1706
+ /**
1707
+ The container-debug-adapter which is used
1708
+ to list all models.
1709
+ @property containerDebugAdapter
1710
+ @default undefined
1711
+ @since 1.5.0
1712
+ @public
1713
+ **/
1742
1714
 
1743
- /**
1744
- The number of attributes to send
1745
- as columns. (Enough to make the record
1746
- identifiable).
1747
- @private
1748
- @property attributeLimit
1749
- @default 3
1750
- @since 1.3.0
1751
- */
1752
- attributeLimit: 3,
1715
+ /**
1716
+ The number of attributes to send
1717
+ as columns. (Enough to make the record
1718
+ identifiable).
1719
+ @private
1720
+ @property attributeLimit
1721
+ @default 3
1722
+ @since 1.3.0
1723
+ */
1753
1724
 
1754
- /**
1755
- Ember Data > v1.0.0-beta.18
1756
- requires string model names to be passed
1757
- around instead of the actual factories.
1758
- This is a stamp for the Ember Inspector
1759
- to differentiate between the versions
1760
- to be able to support older versions too.
1761
- @public
1762
- @property acceptsModelName
1763
- */
1764
- acceptsModelName: true,
1725
+ this.attributeLimit = 3;
1726
+ /**
1727
+ Ember Data > v1.0.0-beta.18
1728
+ requires string model names to be passed
1729
+ around instead of the actual factories.
1730
+ This is a stamp for the Ember Inspector
1731
+ to differentiate between the versions
1732
+ to be able to support older versions too.
1733
+ @public
1734
+ @property acceptsModelName
1735
+ */
1765
1736
 
1737
+ this.acceptsModelName = true;
1738
+ this.containerDebugAdapter = (0, _owner.getOwner)(this).lookup('container-debug-adapter:main');
1739
+ }
1766
1740
  /**
1767
1741
  Map from records arrays to RecordsWatcher instances
1768
1742
  @private
@@ -1802,10 +1776,11 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1802
1776
  @return {Array} List of objects defining filters.
1803
1777
  The object should have a `name` and `desc` property.
1804
1778
  */
1779
+
1780
+
1805
1781
  getFilters() {
1806
1782
  return (0, _runtime.A)();
1807
- },
1808
-
1783
+ }
1809
1784
  /**
1810
1785
  Fetch the model types and observe them for changes.
1811
1786
  @public
@@ -1816,6 +1791,8 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1816
1791
  Takes an array of objects containing wrapped types.
1817
1792
  @return {Function} Method to call to remove all observers
1818
1793
  */
1794
+
1795
+
1819
1796
  watchModelTypes(typesAdded, typesUpdated) {
1820
1797
  var modelTypes = this.getModelTypes();
1821
1798
  var releaseMethods = (0, _runtime.A)();
@@ -1835,7 +1812,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1835
1812
 
1836
1813
  this.releaseMethods.pushObject(release);
1837
1814
  return release;
1838
- },
1815
+ }
1839
1816
 
1840
1817
  _nameToClass(type) {
1841
1818
  if (typeof type === 'string') {
@@ -1845,8 +1822,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1845
1822
  }
1846
1823
 
1847
1824
  return type;
1848
- },
1849
-
1825
+ }
1850
1826
  /**
1851
1827
  Fetch the records of a given type and observe them for changes.
1852
1828
  @public
@@ -1863,6 +1839,8 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1863
1839
  Takes an array of objects containing wrapped records.
1864
1840
  @return {Function} Method to call to remove all observers.
1865
1841
  */
1842
+
1843
+
1866
1844
  watchRecords(modelName, recordsAdded, recordsUpdated, recordsRemoved) {
1867
1845
  var klass = this._nameToClass(modelName);
1868
1846
 
@@ -1883,7 +1861,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1883
1861
  }
1884
1862
 
1885
1863
  return recordsWatcher.release;
1886
- },
1864
+ }
1887
1865
 
1888
1866
  updateFlushWatchers() {
1889
1867
  if (this.flushWatchers === null) {
@@ -1900,13 +1878,14 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1900
1878
 
1901
1879
  this.flushWatchers = null;
1902
1880
  }
1903
- },
1904
-
1881
+ }
1905
1882
  /**
1906
1883
  Clear all observers before destruction
1907
1884
  @private
1908
1885
  @method willDestroy
1909
1886
  */
1887
+
1888
+
1910
1889
  willDestroy() {
1911
1890
  this._super(...arguments);
1912
1891
 
@@ -1917,8 +1896,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1917
1896
  if (this.flushWatchers) {
1918
1897
  _runloop._backburner.off('end', this.flushWatchers);
1919
1898
  }
1920
- },
1921
-
1899
+ }
1922
1900
  /**
1923
1901
  Detect whether a class is a model.
1924
1902
  Test that against the model class
@@ -1927,10 +1905,11 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1927
1905
  @method detect
1928
1906
  @return boolean Whether the class is a model class or not.
1929
1907
  */
1930
- detect() {
1931
- return false;
1932
- },
1933
1908
 
1909
+
1910
+ detect(_klass) {
1911
+ return false;
1912
+ }
1934
1913
  /**
1935
1914
  Get the columns for a given model type.
1936
1915
  @public
@@ -1939,10 +1918,11 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1939
1918
  name: {String} The name of the column.
1940
1919
  desc: {String} Humanized description (what would show in a table column name).
1941
1920
  */
1942
- columnsForType() {
1943
- return (0, _runtime.A)();
1944
- },
1945
1921
 
1922
+
1923
+ columnsForType(_klass) {
1924
+ return (0, _runtime.A)();
1925
+ }
1946
1926
  /**
1947
1927
  Adds observers to a model type class.
1948
1928
  @private
@@ -1951,6 +1931,8 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1951
1931
  @param {Function} typesUpdated Called when a type is modified.
1952
1932
  @return {Function} The function to call to remove observers.
1953
1933
  */
1934
+
1935
+
1954
1936
  observeModelType(modelName, typesUpdated) {
1955
1937
  var klass = this._nameToClass(modelName);
1956
1938
 
@@ -1976,63 +1958,50 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
1976
1958
  }
1977
1959
 
1978
1960
  return typeWatcher.release;
1979
- },
1980
-
1961
+ }
1981
1962
  /**
1982
1963
  Wraps a given model type and observes changes to it.
1983
1964
  @private
1984
1965
  @method wrapModelType
1985
1966
  @param {Class} klass A model class.
1986
1967
  @param {String} modelName Name of the class.
1987
- @return {Object} Contains the wrapped type and the function to remove observers
1988
- Format:
1989
- type: {Object} The wrapped type.
1990
- The wrapped type has the following format:
1991
- name: {String} The name of the type.
1992
- count: {Integer} The number of records available.
1993
- columns: {Columns} An array of columns to describe the record.
1994
- object: {Class} The actual Model type class.
1995
- release: {Function} The function to remove observers.
1968
+ @return {Object} The wrapped type has the following format:
1969
+ name: {String} The name of the type.
1970
+ count: {Integer} The number of records available.
1971
+ columns: {Columns} An array of columns to describe the record.
1972
+ object: {Class} The actual Model type class.
1996
1973
  */
1974
+
1975
+
1997
1976
  wrapModelType(klass, name) {
1998
1977
  var records = this.getRecords(klass, name);
1999
- var typeToSend;
2000
- typeToSend = {
1978
+ return {
2001
1979
  name,
2002
1980
  count: (0, _metal.get)(records, 'length'),
2003
1981
  columns: this.columnsForType(klass),
2004
1982
  object: klass
2005
1983
  };
2006
- return typeToSend;
2007
- },
2008
-
1984
+ }
2009
1985
  /**
2010
1986
  Fetches all models defined in the application.
2011
1987
  @private
2012
1988
  @method getModelTypes
2013
1989
  @return {Array} Array of model types.
2014
1990
  */
2015
- getModelTypes() {
2016
- var containerDebugAdapter = this.get('containerDebugAdapter');
2017
- var types;
2018
1991
 
2019
- if (containerDebugAdapter.canCatalogEntriesByType('model')) {
2020
- types = containerDebugAdapter.catalogEntriesByType('model');
2021
- } else {
2022
- types = this._getObjectsOnNamespaces();
2023
- } // New adapters return strings instead of classes.
2024
1992
 
1993
+ getModelTypes() {
1994
+ var containerDebugAdapter = this.containerDebugAdapter;
1995
+ var stringTypes = containerDebugAdapter.canCatalogEntriesByType('model') ? containerDebugAdapter.catalogEntriesByType('model') : this._getObjectsOnNamespaces(); // New adapters return strings instead of classes.
2025
1996
 
2026
- types = (0, _runtime.A)(types).map(name => {
1997
+ var klassTypes = (0, _runtime.A)(stringTypes).map(name => {
2027
1998
  return {
2028
1999
  klass: this._nameToClass(name),
2029
2000
  name
2030
2001
  };
2031
2002
  });
2032
- types = (0, _runtime.A)(types).filter(type => this.detect(type.klass));
2033
- return (0, _runtime.A)(types);
2034
- },
2035
-
2003
+ return (0, _runtime.A)(klassTypes).filter(type => this.detect(type.klass));
2004
+ }
2036
2005
  /**
2037
2006
  Loops over all namespaces and all objects
2038
2007
  attached to them.
@@ -2040,6 +2009,8 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2040
2009
  @method _getObjectsOnNamespaces
2041
2010
  @return {Array} Array of model type strings.
2042
2011
  */
2012
+
2013
+
2043
2014
  _getObjectsOnNamespaces() {
2044
2015
  var namespaces = (0, _runtime.A)(_runtime.Namespace.NAMESPACES);
2045
2016
  var types = (0, _runtime.A)();
@@ -2060,8 +2031,7 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2060
2031
  }
2061
2032
  });
2062
2033
  return types;
2063
- },
2064
-
2034
+ }
2065
2035
  /**
2066
2036
  Fetches all loaded records for a given type.
2067
2037
  @public
@@ -2070,10 +2040,11 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2070
2040
  This array will be observed for changes,
2071
2041
  so it should update when new records are added/removed.
2072
2042
  */
2073
- getRecords() {
2074
- return (0, _runtime.A)();
2075
- },
2076
2043
 
2044
+
2045
+ getRecords(_klass, _name) {
2046
+ return (0, _runtime.A)();
2047
+ }
2077
2048
  /**
2078
2049
  Wraps a record and observers changes to it.
2079
2050
  @private
@@ -2083,17 +2054,17 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2083
2054
  columnValues: {Array}
2084
2055
  searchKeywords: {Array}
2085
2056
  */
2057
+
2058
+
2086
2059
  wrapRecord(record) {
2087
- var recordToSend = {
2088
- object: record
2060
+ return {
2061
+ object: record,
2062
+ columnValues: this.getRecordColumnValues(record),
2063
+ searchKeywords: this.getRecordKeywords(record),
2064
+ filterValues: this.getRecordFilterValues(record),
2065
+ color: this.getRecordColor(record)
2089
2066
  };
2090
- recordToSend.columnValues = this.getRecordColumnValues(record);
2091
- recordToSend.searchKeywords = this.getRecordKeywords(record);
2092
- recordToSend.filterValues = this.getRecordFilterValues(record);
2093
- recordToSend.color = this.getRecordColor(record);
2094
- return recordToSend;
2095
- },
2096
-
2067
+ }
2097
2068
  /**
2098
2069
  Gets the values for each column.
2099
2070
  @public
@@ -2101,20 +2072,22 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2101
2072
  @return {Object} Keys should match column names defined
2102
2073
  by the model type.
2103
2074
  */
2104
- getRecordColumnValues() {
2105
- return {};
2106
- },
2107
2075
 
2076
+
2077
+ getRecordColumnValues(_record) {
2078
+ return {};
2079
+ }
2108
2080
  /**
2109
2081
  Returns keywords to match when searching records.
2110
2082
  @public
2111
2083
  @method getRecordKeywords
2112
2084
  @return {Array} Relevant keywords for search.
2113
2085
  */
2114
- getRecordKeywords() {
2115
- return (0, _runtime.A)();
2116
- },
2117
2086
 
2087
+
2088
+ getRecordKeywords(_record) {
2089
+ return (0, _runtime.A)();
2090
+ }
2118
2091
  /**
2119
2092
  Returns the values of filters defined by `getFilters`.
2120
2093
  @public
@@ -2122,10 +2095,11 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2122
2095
  @param {Object} record The record instance.
2123
2096
  @return {Object} The filter values.
2124
2097
  */
2125
- getRecordFilterValues() {
2126
- return {};
2127
- },
2128
2098
 
2099
+
2100
+ getRecordFilterValues(_record) {
2101
+ return {};
2102
+ }
2129
2103
  /**
2130
2104
  Each record can have a color that represents its state.
2131
2105
  @public
@@ -2134,15 +2108,17 @@ define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@emb
2134
2108
  @return {String} The records color.
2135
2109
  Possible options: black, red, blue, green.
2136
2110
  */
2137
- getRecordColor() {
2111
+
2112
+
2113
+ getRecordColor(_record) {
2138
2114
  return null;
2139
2115
  }
2140
2116
 
2141
- });
2117
+ }
2142
2118
 
2143
- _exports.default = _default;
2119
+ _exports.default = DataAdapter;
2144
2120
  });
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) {
2121
+ 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
2122
  "use strict";
2147
2123
 
2148
2124
  Object.defineProperty(_exports, "__esModule", {
@@ -2476,7 +2452,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
2476
2452
  class AbstractInput extends InternalComponent {
2477
2453
  constructor() {
2478
2454
  super(...arguments);
2479
- this._value = valueFrom(this.args.named.value);
2455
+ this._value = valueFrom(this.args.named['value']);
2480
2456
  }
2481
2457
 
2482
2458
  validateArguments() {
@@ -2734,7 +2710,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
2734
2710
  class Input extends AbstractInput {
2735
2711
  constructor() {
2736
2712
  super(...arguments);
2737
- this._checked = valueFrom(this.args.named.checked);
2713
+ this._checked = valueFrom(this.args.named['checked']);
2738
2714
  }
2739
2715
 
2740
2716
  static toString() {
@@ -2774,7 +2750,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
2774
2750
 
2775
2751
  get checked() {
2776
2752
  if (this.isCheckbox) {
2777
- (true && (0, _debug.warn)('`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type="checkbox" @checked={{...}} />`?', (0, _validator.untrack)(() => this.args.named.checked !== undefined || this.args.named.value === undefined || typeof (0, _reference.valueForRef)(this.args.named.value) === 'string'), {
2753
+ (true && (0, _debug.warn)('`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type="checkbox" @checked={{...}} />`?', (0, _validator.untrack)(() => this.args.named['checked'] !== undefined || this.args.named['value'] === undefined || typeof (0, _reference.valueForRef)(this.args.named['value']) === 'string'), {
2778
2754
  id: 'ember.built-in-components.input-checkbox-value'
2779
2755
  }));
2780
2756
  return this._checked.get();
@@ -2784,7 +2760,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
2784
2760
  }
2785
2761
 
2786
2762
  set checked(checked) {
2787
- (true && (0, _debug.warn)('`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type="checkbox" @checked={{...}} />`?', (0, _validator.untrack)(() => this.args.named.checked !== undefined || this.args.named.value === undefined || typeof (0, _reference.valueForRef)(this.args.named.value) === 'string'), {
2763
+ (true && (0, _debug.warn)('`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type="checkbox" @checked={{...}} />`?', (0, _validator.untrack)(() => this.args.named['checked'] !== undefined || this.args.named['value'] === undefined || typeof (0, _reference.valueForRef)(this.args.named['value']) === 'string'), {
2788
2764
  id: 'ember.built-in-components.input-checkbox-value'
2789
2765
  }));
2790
2766
 
@@ -3284,11 +3260,13 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
3284
3260
  }
3285
3261
 
3286
3262
  get isEngine() {
3287
- return (0, _engine.getEngineParent)(this.owner) !== undefined;
3263
+ var owner = this.owner;
3264
+ return owner instanceof _instance.default && (0, _engine.getEngineParent)(owner) !== undefined;
3288
3265
  }
3289
3266
 
3290
3267
  get engineMountPoint() {
3291
- return this.owner.mountPoint;
3268
+ var owner = this.owner;
3269
+ return owner instanceof _instance.default ? owner.mountPoint : undefined;
3292
3270
  }
3293
3271
 
3294
3272
  classFor(state) {
@@ -4091,8 +4069,8 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4091
4069
  var [context, action$$1, ...restArgs] = positional;
4092
4070
  (true && !(context && action$$1) && (0, _debug.assert)('hash position arguments', context && action$$1));
4093
4071
  var debugKey = action$$1.debugLabel;
4094
- var target = 'target' in named && named.target ? named.target : context;
4095
- var processArgs = makeArgsProcessor('value' in named && named.value || false, restArgs);
4072
+ var target = 'target' in named ? named['target'] : context;
4073
+ var processArgs = makeArgsProcessor('value' in named && named['value'] || false, restArgs);
4096
4074
  var fn$$1;
4097
4075
 
4098
4076
  if ((0, _reference.isInvokableRef)(action$$1)) {
@@ -4158,13 +4136,12 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4158
4136
  var self;
4159
4137
  var fn$$1;
4160
4138
  (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
4139
 
4163
- if (typeofAction === 'string') {
4140
+ if (typeof action$$1 === 'string') {
4164
4141
  self = target;
4165
4142
  fn$$1 = target.actions && target.actions[action$$1];
4166
4143
  (true && !(Boolean(fn$$1)) && (0, _debug.assert)(`An action named '${action$$1}' was not found in ${target}`, Boolean(fn$$1)));
4167
- } else if (typeofAction === 'function') {
4144
+ } else if (typeof action$$1 === 'function') {
4168
4145
  self = context;
4169
4146
  fn$$1 = action$$1;
4170
4147
  } else {
@@ -4734,624 +4711,6 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4734
4711
  }
4735
4712
 
4736
4713
  var lazyEventsProcessed = new WeakMap();
4737
- /**
4738
- @module @ember/component
4739
- */
4740
-
4741
- /**
4742
- A component is a reusable UI element that consists of a `.hbs` template and an
4743
- optional JavaScript class that defines its behavior. For example, someone
4744
- might make a `button` in the template and handle the click behavior in the
4745
- JavaScript file that shares the same name as the template.
4746
-
4747
- Components are broken down into two categories:
4748
-
4749
- - Components _without_ JavaScript, that are based only on a template. These
4750
- are called Template-only or TO components.
4751
- - Components _with_ JavaScript, which consist of a template and a backing
4752
- class.
4753
-
4754
- Ember ships with two types of JavaScript classes for components:
4755
-
4756
- 1. Glimmer components, imported from `@glimmer/component`, which are the
4757
- default component's for Ember Octane (3.15) and more recent editions.
4758
- 2. Classic components, imported from `@ember/component`, which were the
4759
- default for older editions of Ember (pre 3.15).
4760
-
4761
- Below is the documentation for Classic components. If you are looking for the
4762
- API documentation for Template-only or Glimmer components, it is
4763
- [available here](/ember/release/modules/@glimmer%2Fcomponent).
4764
-
4765
- ## Defining a Classic Component
4766
-
4767
- If you want to customize the component in order to handle events, transform
4768
- arguments or maintain internal state, you implement a subclass of `Component`.
4769
-
4770
- One example is to add computed properties to your component:
4771
-
4772
- ```app/components/person-profile.js
4773
- import Component from '@ember/component';
4774
-
4775
- export default Component.extend({
4776
- displayName: computed('person.title', 'person.firstName', 'person.lastName', function() {
4777
- let { title, firstName, lastName } = this.person;
4778
-
4779
- if (title) {
4780
- return `${title} ${lastName}`;
4781
- } else {
4782
- return `${firstName} ${lastName}`;
4783
- }
4784
- })
4785
- });
4786
- ```
4787
-
4788
- And then use it in the component's template:
4789
-
4790
- ```app/templates/components/person-profile.hbs
4791
- <h1>{{this.displayName}}</h1>
4792
- {{yield}}
4793
- ```
4794
-
4795
- ## Customizing a Classic Component's HTML Element in JavaScript
4796
-
4797
- ### HTML Tag
4798
-
4799
- The default HTML tag name used for a component's HTML representation is `div`.
4800
- This can be customized by setting the `tagName` property.
4801
-
4802
- Consider the following component class:
4803
-
4804
- ```app/components/emphasized-paragraph.js
4805
- import Component from '@ember/component';
4806
-
4807
- export default Component.extend({
4808
- tagName: 'em'
4809
- });
4810
- ```
4811
-
4812
- When invoked, this component would produce output that looks something like
4813
- this:
4814
-
4815
- ```html
4816
- <em id="ember1" class="ember-view"></em>
4817
- ```
4818
-
4819
- ### HTML `class` Attribute
4820
-
4821
- The HTML `class` attribute of a component's tag can be set by providing a
4822
- `classNames` property that is set to an array of strings:
4823
-
4824
- ```app/components/my-widget.js
4825
- import Component from '@ember/component';
4826
-
4827
- export default Component.extend({
4828
- classNames: ['my-class', 'my-other-class']
4829
- });
4830
- ```
4831
-
4832
- Invoking this component will produce output that looks like this:
4833
-
4834
- ```html
4835
- <div id="ember1" class="ember-view my-class my-other-class"></div>
4836
- ```
4837
-
4838
- `class` attribute values can also be set by providing a `classNameBindings`
4839
- property set to an array of properties names for the component. The return
4840
- value of these properties will be added as part of the value for the
4841
- components's `class` attribute. These properties can be computed properties:
4842
-
4843
- ```app/components/my-widget.js
4844
- import Component from '@ember/component';
4845
- import { computed } from '@ember/object';
4846
-
4847
- export default Component.extend({
4848
- classNames: ['my-class', 'my-other-class'],
4849
- classNameBindings: ['propertyA', 'propertyB'],
4850
-
4851
- propertyA: 'from-a',
4852
- propertyB: computed(function() {
4853
- if (someLogic) { return 'from-b'; }
4854
- })
4855
- });
4856
- ```
4857
-
4858
- Invoking this component will produce HTML that looks like:
4859
-
4860
- ```html
4861
- <div id="ember1" class="ember-view my-class my-other-class from-a from-b"></div>
4862
- ```
4863
-
4864
- Note that `classNames` and `classNameBindings` is in addition to the `class`
4865
- attribute passed with the angle bracket invocation syntax. Therefore, if this
4866
- component was invoked like so:
4867
-
4868
- ```handlebars
4869
- <MyWidget class="from-invocation" />
4870
- ```
4871
-
4872
- The resulting HTML will look similar to this:
4873
-
4874
- ```html
4875
- <div id="ember1" class="from-invocation ember-view my-class my-other-class from-a from-b"></div>
4876
- ```
4877
-
4878
- If the value of a class name binding returns a boolean the property name
4879
- itself will be used as the class name if the property is true. The class name
4880
- will not be added if the value is `false` or `undefined`.
4881
-
4882
- ```app/components/my-widget.js
4883
- import Component from '@ember/component';
4884
-
4885
- export default Component.extend({
4886
- classNameBindings: ['hovered'],
4887
-
4888
- hovered: true
4889
- });
4890
- ```
4891
-
4892
- Invoking this component will produce HTML that looks like:
4893
-
4894
- ```html
4895
- <div id="ember1" class="ember-view hovered"></div>
4896
- ```
4897
-
4898
- ### Custom Class Names for Boolean Values
4899
-
4900
- When using boolean class name bindings you can supply a string value other
4901
- than the property name for use as the `class` HTML attribute by appending the
4902
- preferred value after a ":" character when defining the binding:
4903
-
4904
- ```app/components/my-widget.js
4905
- import Component from '@ember/component';
4906
-
4907
- export default Component.extend({
4908
- classNameBindings: ['awesome:so-very-cool'],
4909
-
4910
- awesome: true
4911
- });
4912
- ```
4913
-
4914
- Invoking this component will produce HTML that looks like:
4915
-
4916
- ```html
4917
- <div id="ember1" class="ember-view so-very-cool"></div>
4918
- ```
4919
-
4920
- Boolean value class name bindings whose property names are in a
4921
- camelCase-style format will be converted to a dasherized format:
4922
-
4923
- ```app/components/my-widget.js
4924
- import Component from '@ember/component';
4925
-
4926
- export default Component.extend({
4927
- classNameBindings: ['isUrgent'],
4928
-
4929
- isUrgent: true
4930
- });
4931
- ```
4932
-
4933
- Invoking this component will produce HTML that looks like:
4934
-
4935
- ```html
4936
- <div id="ember1" class="ember-view is-urgent"></div>
4937
- ```
4938
-
4939
- Class name bindings can also refer to object values that are found by
4940
- traversing a path relative to the component itself:
4941
-
4942
- ```app/components/my-widget.js
4943
- import Component from '@ember/component';
4944
- import EmberObject from '@ember/object';
4945
-
4946
- export default Component.extend({
4947
- classNameBindings: ['messages.empty'],
4948
-
4949
- messages: EmberObject.create({
4950
- empty: true
4951
- })
4952
- });
4953
- ```
4954
-
4955
- Invoking this component will produce HTML that looks like:
4956
-
4957
- ```html
4958
- <div id="ember1" class="ember-view empty"></div>
4959
- ```
4960
-
4961
- If you want to add a class name for a property which evaluates to true and
4962
- and a different class name if it evaluates to false, you can pass a binding
4963
- like this:
4964
-
4965
- ```app/components/my-widget.js
4966
- import Component from '@ember/component';
4967
-
4968
- export default Component.extend({
4969
- classNameBindings: ['isEnabled:enabled:disabled'],
4970
- isEnabled: true
4971
- });
4972
- ```
4973
-
4974
- Invoking this component will produce HTML that looks like:
4975
-
4976
- ```html
4977
- <div id="ember1" class="ember-view enabled"></div>
4978
- ```
4979
-
4980
- When isEnabled is `false`, the resulting HTML representation looks like this:
4981
-
4982
- ```html
4983
- <div id="ember1" class="ember-view disabled"></div>
4984
- ```
4985
-
4986
- This syntax offers the convenience to add a class if a property is `false`:
4987
-
4988
- ```app/components/my-widget.js
4989
- import Component from '@ember/component';
4990
-
4991
- // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false
4992
- export default Component.extend({
4993
- classNameBindings: ['isEnabled::disabled'],
4994
- isEnabled: true
4995
- });
4996
- ```
4997
-
4998
- Invoking this component when the `isEnabled` property is true will produce
4999
- HTML that looks like:
5000
-
5001
- ```html
5002
- <div id="ember1" class="ember-view"></div>
5003
- ```
5004
-
5005
- Invoking it when the `isEnabled` property on the component is `false` will
5006
- produce HTML that looks like:
5007
-
5008
- ```html
5009
- <div id="ember1" class="ember-view disabled"></div>
5010
- ```
5011
-
5012
- Updates to the value of a class name binding will result in automatic update
5013
- of the HTML `class` attribute in the component's rendered HTML
5014
- representation. If the value becomes `false` or `undefined` the class name
5015
- will be removed.
5016
-
5017
- Both `classNames` and `classNameBindings` are concatenated properties. See
5018
- [EmberObject](/ember/release/classes/EmberObject) documentation for more
5019
- information about concatenated properties.
5020
-
5021
- ### Other HTML Attributes
5022
-
5023
- The HTML attribute section of a component's tag can be set by providing an
5024
- `attributeBindings` property set to an array of property names on the component.
5025
- The return value of these properties will be used as the value of the component's
5026
- HTML associated attribute:
5027
-
5028
- ```app/components/my-anchor.js
5029
- import Component from '@ember/component';
5030
-
5031
- export default Component.extend({
5032
- tagName: 'a',
5033
- attributeBindings: ['href'],
5034
-
5035
- href: 'http://google.com'
5036
- });
5037
- ```
5038
-
5039
- Invoking this component will produce HTML that looks like:
5040
-
5041
- ```html
5042
- <a id="ember1" class="ember-view" href="http://google.com"></a>
5043
- ```
5044
-
5045
- One property can be mapped on to another by placing a ":" between
5046
- the source property and the destination property:
5047
-
5048
- ```app/components/my-anchor.js
5049
- import Component from '@ember/component';
5050
-
5051
- export default Component.extend({
5052
- tagName: 'a',
5053
- attributeBindings: ['url:href'],
5054
-
5055
- url: 'http://google.com'
5056
- });
5057
- ```
5058
-
5059
- Invoking this component will produce HTML that looks like:
5060
-
5061
- ```html
5062
- <a id="ember1" class="ember-view" href="http://google.com"></a>
5063
- ```
5064
-
5065
- HTML attributes passed with angle bracket invocations will take precedence
5066
- over those specified in `attributeBindings`. Therefore, if this component was
5067
- invoked like so:
5068
-
5069
- ```handlebars
5070
- <MyAnchor href="http://bing.com" @url="http://google.com" />
5071
- ```
5072
-
5073
- The resulting HTML will looks like this:
5074
-
5075
- ```html
5076
- <a id="ember1" class="ember-view" href="http://bing.com"></a>
5077
- ```
5078
-
5079
- Note that the `href` attribute is ultimately set to `http://bing.com`,
5080
- despite it having attribute binidng to the `url` property, which was
5081
- set to `http://google.com`.
5082
-
5083
- Namespaced attributes (e.g. `xlink:href`) are supported, but have to be
5084
- mapped, since `:` is not a valid character for properties in Javascript:
5085
-
5086
- ```app/components/my-use.js
5087
- import Component from '@ember/component';
5088
-
5089
- export default Component.extend({
5090
- tagName: 'use',
5091
- attributeBindings: ['xlinkHref:xlink:href'],
5092
-
5093
- xlinkHref: '#triangle'
5094
- });
5095
- ```
5096
-
5097
- Invoking this component will produce HTML that looks like:
5098
-
5099
- ```html
5100
- <use xlink:href="#triangle"></use>
5101
- ```
5102
-
5103
- If the value of a property monitored by `attributeBindings` is a boolean, the
5104
- attribute will be present or absent depending on the value:
5105
-
5106
- ```app/components/my-text-input.js
5107
- import Component from '@ember/component';
5108
-
5109
- export default Component.extend({
5110
- tagName: 'input',
5111
- attributeBindings: ['disabled'],
5112
-
5113
- disabled: false
5114
- });
5115
- ```
5116
-
5117
- Invoking this component will produce HTML that looks like:
5118
-
5119
- ```html
5120
- <input id="ember1" class="ember-view" />
5121
- ```
5122
-
5123
- `attributeBindings` can refer to computed properties:
5124
-
5125
- ```app/components/my-text-input.js
5126
- import Component from '@ember/component';
5127
- import { computed } from '@ember/object';
5128
-
5129
- export default Component.extend({
5130
- tagName: 'input',
5131
- attributeBindings: ['disabled'],
5132
-
5133
- disabled: computed(function() {
5134
- if (someLogic) {
5135
- return true;
5136
- } else {
5137
- return false;
5138
- }
5139
- })
5140
- });
5141
- ```
5142
-
5143
- To prevent setting an attribute altogether, use `null` or `undefined` as the
5144
- value of the property used in `attributeBindings`:
5145
-
5146
- ```app/components/my-text-input.js
5147
- import Component from '@ember/component';
5148
-
5149
- export default Component.extend({
5150
- tagName: 'form',
5151
- attributeBindings: ['novalidate'],
5152
- novalidate: null
5153
- });
5154
- ```
5155
-
5156
- Updates to the property of an attribute binding will result in automatic
5157
- update of the HTML attribute in the component's HTML output.
5158
-
5159
- `attributeBindings` is a concatenated property. See
5160
- [EmberObject](/ember/release/classes/EmberObject) documentation for more
5161
- information about concatenated properties.
5162
-
5163
- ## Layouts
5164
-
5165
- The `layout` property can be used to dynamically specify a template associated
5166
- with a component class, instead of relying on Ember to link together a
5167
- component class and a template based on file names.
5168
-
5169
- In general, applications should not use this feature, but it's commonly used
5170
- in addons for historical reasons.
5171
-
5172
- The `layout` property should be set to the default export of a template
5173
- module, which is the name of a template file without the `.hbs` extension.
5174
-
5175
- ```app/templates/components/person-profile.hbs
5176
- <h1>Person's Title</h1>
5177
- <div class='details'>{{yield}}</div>
5178
- ```
5179
-
5180
- ```app/components/person-profile.js
5181
- import Component from '@ember/component';
5182
- import layout from '../templates/components/person-profile';
5183
-
5184
- export default Component.extend({
5185
- layout
5186
- });
5187
- ```
5188
-
5189
- If you invoke the component:
5190
-
5191
- ```handlebars
5192
- <PersonProfile>
5193
- <h2>Chief Basket Weaver</h2>
5194
- <h3>Fisherman Industries</h3>
5195
- </PersonProfile>
5196
- ```
5197
-
5198
- or
5199
-
5200
- ```handlebars
5201
- {{#person-profile}}
5202
- <h2>Chief Basket Weaver</h2>
5203
- <h3>Fisherman Industries</h3>
5204
- {{/person-profile}}
5205
- ```
5206
-
5207
- It will result in the following HTML output:
5208
-
5209
- ```html
5210
- <h1>Person's Title</h1>
5211
- <div class="details">
5212
- <h2>Chief Basket Weaver</h2>
5213
- <h3>Fisherman Industries</h3>
5214
- </div>
5215
- ```
5216
-
5217
- ## Handling Browser Events
5218
-
5219
- Components can respond to user-initiated events in one of three ways: passing
5220
- actions with angle bracket invocation, adding event handler methods to the
5221
- component's class, or adding actions to the component's template.
5222
-
5223
- ### Passing Actions With Angle Bracket Invocation
5224
-
5225
- For one-off events specific to particular instance of a component, it is possible
5226
- to pass actions to the component's element using angle bracket invocation syntax.
5227
-
5228
- ```handlebars
5229
- <MyWidget {{action 'firstWidgetClicked'}} />
5230
-
5231
- <MyWidget {{action 'secondWidgetClicked'}} />
5232
- ```
5233
-
5234
- In this case, when the first component is clicked on, Ember will invoke the
5235
- `firstWidgetClicked` action. When the second component is clicked on, Ember
5236
- will invoke the `secondWidgetClicked` action instead.
5237
-
5238
- Besides `{{action}}`, it is also possible to pass any arbitrary element modifiers
5239
- using the angle bracket invocation syntax.
5240
-
5241
- ### Event Handler Methods
5242
-
5243
- Components can also respond to user-initiated events by implementing a method
5244
- that matches the event name. This approach is appropriate when the same event
5245
- should be handled by all instances of the same component.
5246
-
5247
- An event object will be passed as the argument to the event handler method.
5248
-
5249
- ```app/components/my-widget.js
5250
- import Component from '@ember/component';
5251
-
5252
- export default Component.extend({
5253
- click(event) {
5254
- // `event.target` is either the component's element or one of its children
5255
- let tag = event.target.tagName.toLowerCase();
5256
- console.log('clicked on a `<${tag}>` HTML element!');
5257
- }
5258
- });
5259
- ```
5260
-
5261
- In this example, whenever the user clicked anywhere inside the component, it
5262
- will log a message to the console.
5263
-
5264
- It is possible to handle event types other than `click` by implementing the
5265
- following event handler methods. In addition, custom events can be registered
5266
- by using `Application.customEvents`.
5267
-
5268
- Touch events:
5269
-
5270
- * `touchStart`
5271
- * `touchMove`
5272
- * `touchEnd`
5273
- * `touchCancel`
5274
-
5275
- Keyboard events:
5276
-
5277
- * `keyDown`
5278
- * `keyUp`
5279
- * `keyPress`
5280
-
5281
- Mouse events:
5282
-
5283
- * `mouseDown`
5284
- * `mouseUp`
5285
- * `contextMenu`
5286
- * `click`
5287
- * `doubleClick`
5288
- * `focusIn`
5289
- * `focusOut`
5290
-
5291
- Form events:
5292
-
5293
- * `submit`
5294
- * `change`
5295
- * `focusIn`
5296
- * `focusOut`
5297
- * `input`
5298
-
5299
- Drag and drop events:
5300
-
5301
- * `dragStart`
5302
- * `drag`
5303
- * `dragEnter`
5304
- * `dragLeave`
5305
- * `dragOver`
5306
- * `dragEnd`
5307
- * `drop`
5308
-
5309
- ### `{{action}}` Helper
5310
-
5311
- Instead of handling all events of a particular type anywhere inside the
5312
- component's element, you may instead want to limit it to a particular
5313
- element in the component's template. In this case, it would be more
5314
- convenient to implement an action instead.
5315
-
5316
- For example, you could implement the action `hello` for the `person-profile`
5317
- component:
5318
-
5319
- ```app/components/person-profile.js
5320
- import Component from '@ember/component';
5321
-
5322
- export default Component.extend({
5323
- actions: {
5324
- hello(name) {
5325
- console.log("Hello", name);
5326
- }
5327
- }
5328
- });
5329
- ```
5330
-
5331
- And then use it in the component's template:
5332
-
5333
- ```app/templates/components/person-profile.hbs
5334
- <h1>{{@person.name}}</h1>
5335
-
5336
- <button {{action 'hello' @person.name}}>
5337
- Say Hello to {{@person.name}}
5338
- </button>
5339
- ```
5340
-
5341
- When the user clicks the button, Ember will invoke the `hello` action,
5342
- passing in the current value of `@person.name` as an argument.
5343
-
5344
- See [Ember.Templates.helpers.action](/ember/release/classes/Ember.Templates.helpers/methods/action?anchor=action).
5345
-
5346
- @class Component
5347
- @extends Ember.CoreView
5348
- @uses Ember.TargetActionSupport
5349
- @uses Ember.ClassNamesSupport
5350
- @uses Ember.ActionSupport
5351
- @uses Ember.ViewMixin
5352
- @uses Ember.ViewStateSupport
5353
- @public
5354
- */
5355
4714
 
5356
4715
  var Component = _views.CoreView.extend(_views.ChildViewsSupport, _views.ViewStateSupport, _views.ClassNamesSupport, _runtime2.TargetActionSupport, _views.ActionSupport, _views.ViewMixin, {
5357
4716
  isComponent: true,
@@ -5411,6 +4770,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
5411
4770
 
5412
4771
  if (owner.lookup('-environment:main').isInteractive) {
5413
4772
  this.__dispatcher = owner.lookup('event_dispatcher:main');
4773
+ (true && !(this.__dispatcher instanceof _views.EventDispatcher) && (0, _debug.assert)('Expected dispatcher to be an EventDispatcher', this.__dispatcher instanceof _views.EventDispatcher));
5414
4774
  } else {
5415
4775
  // In FastBoot we have no EventDispatcher. Set to null to not try again to look it up.
5416
4776
  this.__dispatcher = null;
@@ -5660,23 +5020,6 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
5660
5020
  @since 1.13.0
5661
5021
  */
5662
5022
 
5663
- /**
5664
- Layout can be used to wrap content in a component.
5665
- @property layout
5666
- @type Function
5667
- @public
5668
- */
5669
-
5670
- /**
5671
- The name of the layout to lookup if no layout is provided.
5672
- By default `Component` will lookup a template with this name in
5673
- `Ember.TEMPLATES` (a shared global object).
5674
- @property layoutName
5675
- @type String
5676
- @default null
5677
- @private
5678
- */
5679
-
5680
5023
  /**
5681
5024
  The HTML `id` of the component's element in the DOM. You can provide this
5682
5025
  value yourself but it must be unique (just as in HTML):
@@ -6045,11 +5388,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
6045
5388
  var currentOwner = (0, _reference.valueForRef)(currentStateRef).render.owner;
6046
5389
 
6047
5390
  if (parentOwner && parentOwner !== currentOwner) {
6048
- var engine = currentOwner;
6049
- (true && !(typeof currentOwner.mountPoint === 'string') && (0, _debug.assert)('invalid engine: missing mountPoint', typeof currentOwner.mountPoint === 'string'));
6050
- (true && !(currentOwner.routable === true) && (0, _debug.assert)('invalid engine: missing routable', currentOwner.routable === true));
6051
- var mountPoint = engine.mountPoint;
6052
- state.engine = engine;
5391
+ (true && !(currentOwner instanceof _instance.default) && (0, _debug.assert)('Expected currentOwner to be an EngineInstance', currentOwner instanceof _instance.default));
5392
+ var mountPoint = currentOwner.mountPoint;
5393
+ state.engine = currentOwner;
6053
5394
  state.engineBucket = {
6054
5395
  mountPoint
6055
5396
  };
@@ -6739,7 +6080,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
6739
6080
  },
6740
6081
 
6741
6082
  warnIfStyleNotTrusted(value) {
6742
- (true && (0, _debug.warn)((0, _views.constructStyleDeprecationMessage)(value), (() => {
6083
+ (true && (0, _debug.warn)((0, _views.constructStyleDeprecationMessage)(String(value)), (() => {
6743
6084
  if (value === null || value === undefined || isHTMLSafe$1(value)) {
6744
6085
  return true;
6745
6086
  }
@@ -6835,9 +6176,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
6835
6176
  } = _ref12;
6836
6177
  var nameOrValueRef = positional[0];
6837
6178
  (true && !(positional.length === 1 && nameOrValueRef) && (0, _debug.assert)(`[BUG] wrong number of positional arguments, expecting 1, got ${positional.length}`, positional.length === 1 && nameOrValueRef));
6838
- var typeRef = named.type;
6839
- var locRef = named.loc;
6840
- var originalRef = named.original;
6179
+ var typeRef = named['type'];
6180
+ var locRef = named['loc'];
6181
+ var originalRef = named['original'];
6841
6182
  (true && !(typeRef) && (0, _debug.assert)(`[BUG] expecting \`type\` named argument`, typeRef));
6842
6183
  (true && !(locRef) && (0, _debug.assert)(`[BUG] expecting \`loc\` named argument`, locRef));
6843
6184
  (true && !(originalRef) && (0, _debug.assert)(`[BUG] expecting \`original\` named argument`, originalRef)); // Bug: why do these fail?
@@ -6853,7 +6194,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
6853
6194
  (true && !(typeof original === 'string') && (0, _debug.assert)('[BUG] expecting a string literal for the `original` argument', typeof original === 'string'));
6854
6195
  return (0, _reference.createComputeRef)(() => {
6855
6196
  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 to the ${type} keyword. ` + 'See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ' + loc, typeof nameOrValue !== 'string'));
6197
+ (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
6198
  return nameOrValue;
6858
6199
  });
6859
6200
  });
@@ -7217,6 +6558,26 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7217
6558
  (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
6559
  return (0, _reference.createUnboundRef)((0, _reference.valueForRef)(positional[0]), '(result of an `unbound` helper)');
7219
6560
  });
6561
+ /**
6562
+ @module ember
6563
+ */
6564
+
6565
+ internalHelper(() => {
6566
+ return (0, _reference.createConstRef)(uniqueId$1(), 'unique-id');
6567
+ }); // From https://gist.github.com/selfish/fef2c0ba6cdfe07af76e64cecd74888b
6568
+ //
6569
+ // This code should be reasonably fast, and provide a unique value every time
6570
+ // it's called, which is what we need here. It produces a string formatted as a
6571
+ // standard UUID, which avoids accidentally turning Ember-specific
6572
+ // implementation details into an intimate API.
6573
+
6574
+ function uniqueId$1() {
6575
+ // @ts-expect-error this one-liner abuses weird JavaScript semantics that
6576
+ // TypeScript (legitimately) doesn't like, but they're nonetheless valid and
6577
+ // specced.
6578
+ return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, a => (a ^ Math.random() * 16 >> a / 4).toString(16));
6579
+ }
6580
+
7220
6581
  var MODIFIERS = ['alt', 'shift', 'meta', 'ctrl'];
7221
6582
  var POINTER_EVENT_TYPE_REGEX = /^click|mouse|touch/;
7222
6583
 
@@ -7453,6 +6814,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7453
6814
 
7454
6815
  ensureEventSetup(actionState) {
7455
6816
  var dispatcher = actionState.owner.lookup('event_dispatcher:main');
6817
+ (true && !(dispatcher instanceof _views.EventDispatcher) && (0, _debug.assert)('Expected dispatcher to be an EventDispatcher', dispatcher instanceof _views.EventDispatcher));
7456
6818
  dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.setupHandlerForEmberEvent(actionState.eventName);
7457
6819
  }
7458
6820
 
@@ -7506,6 +6868,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7506
6868
  // mount is a runtime helper, this shouldn't use dynamic layout
7507
6869
  // we should resolve the engine app template in the helper
7508
6870
  // it also should use the owner that looked up the mount helper.
6871
+ (true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected owner to be an EngineInstance', owner instanceof _instance.default));
7509
6872
  var engine = owner.buildChildEngineInstance(name);
7510
6873
  engine.boot();
7511
6874
  var applicationFactory = engine.factoryFor(`controller:application`);
@@ -7722,28 +7085,17 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7722
7085
  Note: Your content __will not render__ if there isn't an `{{outlet}}` for it.
7723
7086
 
7724
7087
  @method outlet
7725
- @param {String} [name]
7726
7088
  @for Ember.Templates.helpers
7727
7089
  @public
7728
7090
  */
7729
7091
 
7730
- var outletHelper = internalHelper((args, owner, scope) => {
7092
+ var outletHelper = internalHelper((_args, owner, scope) => {
7731
7093
  (true && !(owner) && (0, _debug.assert)('Expected owner to be present, {{outlet}} requires an owner', owner));
7732
7094
  (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
7095
  var outletRef = (0, _reference.createComputeRef)(() => {
7744
7096
  var state = (0, _reference.valueForRef)(scope.get('outletState'));
7745
7097
  var outlets = state !== undefined ? state.outlets : undefined;
7746
- return outlets !== undefined ? outlets[(0, _reference.valueForRef)(nameRef)] : undefined;
7098
+ return outlets !== undefined ? outlets['main'] : undefined;
7747
7099
  });
7748
7100
  var lastState = null;
7749
7101
  var definition = null;
@@ -7768,7 +7120,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7768
7120
  // provide the correct updated value. So we stop updating and return
7769
7121
  // the _last_ model value for that outlet.
7770
7122
 
7771
- named.model = (0, _reference.createComputeRef)(() => {
7123
+ named['model'] = (0, _reference.createComputeRef)(() => {
7772
7124
  if (lastState === state) {
7773
7125
  model = (0, _reference.valueForRef)(modelRef);
7774
7126
  }
@@ -7779,14 +7131,13 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7779
7131
  if (true
7780
7132
  /* DEBUG */
7781
7133
  ) {
7782
- named.model = (0, _reference.createDebugAliasRef)('@model', named.model);
7134
+ named['model'] = (0, _reference.createDebugAliasRef)('@model', named['model']);
7783
7135
  }
7784
7136
 
7785
- var _args2 = (0, _runtime.createCapturedArgs)(named, _runtime.EMPTY_POSITIONAL);
7786
-
7137
+ var args = (0, _runtime.createCapturedArgs)(named, _runtime.EMPTY_POSITIONAL);
7787
7138
  definition = (0, _runtime.curry)(0
7788
7139
  /* 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, _args2, true);
7140
+ , 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
7141
  } else {
7791
7142
  definition = null;
7792
7143
  }
@@ -7836,9 +7187,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7836
7187
  };
7837
7188
  }
7838
7189
 
7839
- function componentFor(name, owner, options) {
7190
+ function componentFor(name, owner) {
7840
7191
  var fullName = `component:${name}`;
7841
- return owner.factoryFor(fullName, options) || null;
7192
+ return owner.factoryFor(fullName) || null;
7842
7193
  }
7843
7194
 
7844
7195
  function layoutFor(name, owner, options) {
@@ -7847,7 +7198,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7847
7198
  }
7848
7199
 
7849
7200
  function lookupComponentPair(owner, name, options) {
7850
- var component = componentFor(name, owner, options);
7201
+ var component = componentFor(name, owner);
7851
7202
 
7852
7203
  if (component !== null && component.class !== undefined) {
7853
7204
  var _layout = (0, _manager2.getComponentTemplate)(component.class);
@@ -8066,6 +7417,107 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
8066
7417
 
8067
7418
  }
8068
7419
 
7420
+ var TOP_LEVEL_NAME = '-top-level';
7421
+ var TOP_LEVEL_OUTLET = 'main';
7422
+
7423
+ class OutletView {
7424
+ constructor(_environment, owner, template, namespace) {
7425
+ this._environment = _environment;
7426
+ this.owner = owner;
7427
+ this.template = template;
7428
+ this.namespace = namespace;
7429
+ var outletStateTag = (0, _validator.createTag)();
7430
+ var outletState = {
7431
+ outlets: {
7432
+ main: undefined
7433
+ },
7434
+ render: {
7435
+ owner: owner,
7436
+ into: undefined,
7437
+ outlet: TOP_LEVEL_OUTLET,
7438
+ name: TOP_LEVEL_NAME,
7439
+ controller: undefined,
7440
+ model: undefined,
7441
+ template
7442
+ }
7443
+ };
7444
+ var ref = this.ref = (0, _reference.createComputeRef)(() => {
7445
+ (0, _validator.consumeTag)(outletStateTag);
7446
+ return outletState;
7447
+ }, state => {
7448
+ (0, _validator.dirtyTag)(outletStateTag);
7449
+ outletState.outlets['main'] = state;
7450
+ });
7451
+ this.state = {
7452
+ ref,
7453
+ name: TOP_LEVEL_NAME,
7454
+ outlet: TOP_LEVEL_OUTLET,
7455
+ template,
7456
+ controller: undefined,
7457
+ model: undefined
7458
+ };
7459
+ }
7460
+
7461
+ static extend(injections) {
7462
+ return class extends OutletView {
7463
+ static create(options) {
7464
+ if (options) {
7465
+ return super.create(Object.assign({}, injections, options));
7466
+ } else {
7467
+ return super.create(injections);
7468
+ }
7469
+ }
7470
+
7471
+ };
7472
+ }
7473
+
7474
+ static reopenClass(injections) {
7475
+ Object.assign(this, injections);
7476
+ }
7477
+
7478
+ static create(options) {
7479
+ var {
7480
+ environment: _environment,
7481
+ application: namespace,
7482
+ template: templateFactory$$1
7483
+ } = options;
7484
+ var owner = (0, _owner2.getOwner)(options);
7485
+ (true && !(owner) && (0, _debug.assert)('OutletView is unexpectedly missing an owner', owner));
7486
+ var template = templateFactory$$1(owner);
7487
+ return new OutletView(_environment, owner, template, namespace);
7488
+ }
7489
+
7490
+ appendTo(selector) {
7491
+ var target;
7492
+
7493
+ if (this._environment.hasDOM) {
7494
+ target = typeof selector === 'string' ? document.querySelector(selector) : selector;
7495
+ } else {
7496
+ target = selector;
7497
+ }
7498
+
7499
+ var renderer = this.owner.lookup('renderer:-dom'); // SAFETY: It's not clear that this cast is safe.
7500
+ // The types for appendOutletView may be incorrect or this is a potential bug.
7501
+
7502
+ (0, _runloop.schedule)('render', renderer, 'appendOutletView', this, target);
7503
+ }
7504
+
7505
+ rerender() {
7506
+ /**/
7507
+ }
7508
+
7509
+ setOutletState(state) {
7510
+ (0, _reference.updateRef)(this.ref, state);
7511
+ }
7512
+
7513
+ destroy() {
7514
+ /**/
7515
+ }
7516
+
7517
+ }
7518
+
7519
+ _exports.OutletView = OutletView;
7520
+
8069
7521
  class DynamicScope {
8070
7522
  constructor(view, outletState) {
8071
7523
  this.view = view;
@@ -8123,7 +7575,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
8123
7575
  this.root = root;
8124
7576
  this.runtime = runtime;
8125
7577
  (true && !(template !== undefined) && (0, _debug.assert)(`You cannot render \`${(0, _reference.valueForRef)(self)}\` without a template.`, template !== undefined));
8126
- this.id = (0, _views.getViewId)(root);
7578
+ this.id = root instanceof OutletView ? (0, _utils.guidFor)(root) : (0, _views.getViewId)(root);
8127
7579
  this.result = undefined;
8128
7580
  this.destroyed = false;
8129
7581
  this.render = errorLoopTransaction(() => {
@@ -8565,104 +8017,6 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
8565
8017
  "moduleName": "packages/@ember/-internals/glimmer/lib/templates/outlet.hbs",
8566
8018
  "isStrictMode": false
8567
8019
  });
8568
- var TOP_LEVEL_NAME = '-top-level';
8569
- var TOP_LEVEL_OUTLET = 'main';
8570
-
8571
- class OutletView {
8572
- constructor(_environment, owner, template, namespace) {
8573
- this._environment = _environment;
8574
- this.owner = owner;
8575
- this.template = template;
8576
- this.namespace = namespace;
8577
- var outletStateTag = (0, _validator.createTag)();
8578
- var outletState = {
8579
- outlets: {
8580
- main: undefined
8581
- },
8582
- render: {
8583
- owner: owner,
8584
- into: undefined,
8585
- outlet: TOP_LEVEL_OUTLET,
8586
- name: TOP_LEVEL_NAME,
8587
- controller: undefined,
8588
- model: undefined,
8589
- template
8590
- }
8591
- };
8592
- var ref = this.ref = (0, _reference.createComputeRef)(() => {
8593
- (0, _validator.consumeTag)(outletStateTag);
8594
- return outletState;
8595
- }, state => {
8596
- (0, _validator.dirtyTag)(outletStateTag);
8597
- outletState.outlets.main = state;
8598
- });
8599
- this.state = {
8600
- ref,
8601
- name: TOP_LEVEL_NAME,
8602
- outlet: TOP_LEVEL_OUTLET,
8603
- template,
8604
- controller: undefined,
8605
- model: undefined
8606
- };
8607
- }
8608
-
8609
- static extend(injections) {
8610
- return class extends OutletView {
8611
- static create(options) {
8612
- if (options) {
8613
- return super.create(Object.assign({}, injections, options));
8614
- } else {
8615
- return super.create(injections);
8616
- }
8617
- }
8618
-
8619
- };
8620
- }
8621
-
8622
- static reopenClass(injections) {
8623
- Object.assign(this, injections);
8624
- }
8625
-
8626
- static create(options) {
8627
- var {
8628
- environment: _environment,
8629
- application: namespace,
8630
- template: templateFactory$$1
8631
- } = options;
8632
- var owner = (0, _owner2.getOwner)(options);
8633
- (true && !(owner) && (0, _debug.assert)('OutletView is unexpectedly missing an owner', owner));
8634
- var template = templateFactory$$1(owner);
8635
- return new OutletView(_environment, owner, template, namespace);
8636
- }
8637
-
8638
- appendTo(selector) {
8639
- var target;
8640
-
8641
- if (this._environment.hasDOM) {
8642
- target = typeof selector === 'string' ? document.querySelector(selector) : selector;
8643
- } else {
8644
- target = selector;
8645
- }
8646
-
8647
- var renderer = this.owner.lookup('renderer:-dom');
8648
- (0, _runloop.schedule)('render', renderer, 'appendOutletView', this, target);
8649
- }
8650
-
8651
- rerender() {
8652
- /**/
8653
- }
8654
-
8655
- setOutletState(state) {
8656
- (0, _reference.updateRef)(this.ref, state);
8657
- }
8658
-
8659
- destroy() {
8660
- /**/
8661
- }
8662
-
8663
- }
8664
-
8665
- _exports.OutletView = OutletView;
8666
8020
 
8667
8021
  function setupApplicationRegistry(registry) {
8668
8022
  // because we are using injections we can't use instantiate false
@@ -8708,6 +8062,18 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
8708
8062
  registry.register((0, _container.privatize)`component:-default`, Component);
8709
8063
  }
8710
8064
  }
8065
+ /**
8066
+ Associate a class with a component manager (an object that is responsible for
8067
+ coordinating the lifecycle events that occurs when invoking, rendering and
8068
+ re-rendering a component).
8069
+
8070
+ @method setComponentManager
8071
+ @param {Function} factory a function to create the owner for an object
8072
+ @param {Object} obj the object to associate with the componetn manager
8073
+ @return {Object} the same object passed in
8074
+ @public
8075
+ */
8076
+
8711
8077
 
8712
8078
  function setComponentManager$1(manager, obj) {
8713
8079
  return (0, _manager2.setComponentManager)(manager, obj);
@@ -9776,7 +9142,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
9776
9142
  return true;
9777
9143
  }
9778
9144
  /**
9779
- @private
9145
+ @public
9780
9146
  @method hasListeners
9781
9147
  @static
9782
9148
  @for @ember/object/events
@@ -11503,10 +10869,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11503
10869
  function isPath(path) {
11504
10870
  return typeof path === 'string' && firstDotIndexCache.get(path) !== -1;
11505
10871
  }
11506
- /**
11507
- @module @ember/object
11508
- */
11509
-
11510
10872
 
11511
10873
  var PROXY_CONTENT = (0, _utils.symbol)('PROXY_CONTENT');
11512
10874
  _exports.PROXY_CONTENT = PROXY_CONTENT;
@@ -11536,13 +10898,13 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11536
10898
  }
11537
10899
 
11538
10900
  function _getProp(obj, keyName) {
11539
- var type = typeof obj;
11540
- var isObject$$1 = type === 'object';
11541
- var isFunction = type === 'function';
11542
- var isObjectLike = isObject$$1 || isFunction;
10901
+ if (obj == null) {
10902
+ return;
10903
+ }
10904
+
11543
10905
  var value;
11544
10906
 
11545
- if (isObjectLike) {
10907
+ if (typeof obj === 'object' || typeof obj === 'function') {
11546
10908
  if (true
11547
10909
  /* DEBUG */
11548
10910
  ) {
@@ -11551,7 +10913,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11551
10913
  value = obj[keyName];
11552
10914
  }
11553
10915
 
11554
- if (value === undefined && isObject$$1 && !(keyName in obj) && typeof obj.unknownProperty === 'function') {
10916
+ if (value === undefined && typeof obj === 'object' && !(keyName in obj) && typeof obj.unknownProperty === 'function') {
11555
10917
  value = obj.unknownProperty(keyName);
11556
10918
  }
11557
10919
 
@@ -11565,14 +10927,14 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11565
10927
  }
11566
10928
  }
11567
10929
  } else {
10930
+ // SAFETY: It should be ok to access properties on any non-nullish value
11568
10931
  value = obj[keyName];
11569
10932
  }
11570
10933
 
11571
10934
  return value;
11572
10935
  }
11573
10936
 
11574
- function _getPath(root, path) {
11575
- var obj = root;
10937
+ function _getPath(obj, path) {
11576
10938
  var parts = typeof path === 'string' ? path.split('.') : path;
11577
10939
 
11578
10940
  for (var part of parts) {
@@ -11595,12 +10957,12 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11595
10957
  _getProp({}, 1);
11596
10958
 
11597
10959
  _getProp({
11598
- unkonwnProperty() {}
10960
+ unknownProperty() {}
11599
10961
 
11600
10962
  }, 'a');
11601
10963
 
11602
10964
  _getProp({
11603
- unkonwnProperty() {}
10965
+ unknownProperty() {}
11604
10966
 
11605
10967
  }, 1);
11606
10968
 
@@ -11890,7 +11252,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11890
11252
  confusing.
11891
11253
 
11892
11254
  ```javascript
11893
- isNone(); // true
11894
11255
  isNone(null); // true
11895
11256
  isNone(undefined); // true
11896
11257
  isNone(''); // false
@@ -11925,7 +11286,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11925
11286
  to check emptiness.
11926
11287
 
11927
11288
  ```javascript
11928
- isEmpty(); // true
11929
11289
  isEmpty(null); // true
11930
11290
  isEmpty(undefined); // true
11931
11291
  isEmpty(''); // true
@@ -11950,31 +11310,21 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11950
11310
 
11951
11311
 
11952
11312
  function isEmpty(obj) {
11953
- var none = obj === null || obj === undefined;
11954
-
11955
- if (none) {
11956
- return none;
11313
+ if (obj === null || obj === undefined) {
11314
+ return true;
11957
11315
  }
11958
11316
 
11959
11317
  if (typeof obj.unknownProperty !== 'function' && typeof obj.size === 'number') {
11960
11318
  return !obj.size;
11961
11319
  }
11962
11320
 
11963
- var objectType = typeof obj;
11964
-
11965
- if (objectType === 'object') {
11321
+ if (typeof obj === 'object') {
11966
11322
  var size = get(obj, 'size');
11967
11323
 
11968
11324
  if (typeof size === 'number') {
11969
11325
  return !size;
11970
11326
  }
11971
- }
11972
11327
 
11973
- if (typeof obj.length === 'number' && objectType !== 'function') {
11974
- return !obj.length;
11975
- }
11976
-
11977
- if (objectType === 'object') {
11978
11328
  var length = get(obj, 'length');
11979
11329
 
11980
11330
  if (typeof length === 'number') {
@@ -11982,6 +11332,10 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11982
11332
  }
11983
11333
  }
11984
11334
 
11335
+ if (typeof obj.length === 'number' && typeof obj !== 'function') {
11336
+ return !obj.length;
11337
+ }
11338
+
11985
11339
  return false;
11986
11340
  }
11987
11341
  /**
@@ -11994,7 +11348,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11994
11348
  ```javascript
11995
11349
  import { isBlank } from '@ember/utils';
11996
11350
 
11997
- isBlank(); // true
11998
11351
  isBlank(null); // true
11999
11352
  isBlank(undefined); // true
12000
11353
  isBlank(''); // true
@@ -12028,7 +11381,6 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
12028
11381
  A value is present if it not `isBlank`.
12029
11382
 
12030
11383
  ```javascript
12031
- isPresent(); // false
12032
11384
  isPresent(null); // false
12033
11385
  isPresent(undefined); // false
12034
11386
  isPresent(''); // false
@@ -12555,7 +11907,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
12555
11907
  } else if (_mixins !== undefined) {
12556
11908
  mergeMixins(_mixins, meta$$1, descs, values, base, keys, keysWithSuper);
12557
11909
 
12558
- if (currentMixin._without !== undefined) {
11910
+ if (currentMixin instanceof Mixin && currentMixin._without !== undefined) {
12559
11911
  currentMixin._without.forEach(keyName => {
12560
11912
  // deleting the key means we won't process the value
12561
11913
  var index = keys.indexOf(keyName);
@@ -14390,7 +13742,7 @@ define("@ember/-internals/routing/lib/location/hash_location", ["exports", "@emb
14390
13742
  onUpdateURL(callback) {
14391
13743
  this._removeEventListener();
14392
13744
 
14393
- this._hashchangeHandler = (0, _runloop.bind)(this, function () {
13745
+ this._hashchangeHandler = (0, _runloop.bind)(this, function (_event) {
14394
13746
  var path = this.getURL();
14395
13747
 
14396
13748
  if (this.lastSetURL === path) {
@@ -14985,7 +14337,7 @@ define("@ember/-internals/routing/lib/location/util", ["exports"], function (_ex
14985
14337
  location.replace(getOrigin(location) + path);
14986
14338
  }
14987
14339
  });
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) {
14340
+ 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
14341
  "use strict";
14990
14342
 
14991
14343
  Object.defineProperty(_exports, "__esModule", {
@@ -15016,6 +14368,55 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15016
14368
  class RouterService extends _service.default.extend(_runtime.Evented) {
15017
14369
  constructor() {
15018
14370
  super(...arguments);
14371
+ /**
14372
+ You can register a listener for events emitted by this service with `.on()`:
14373
+ ```app/routes/contact-form.js
14374
+ import Route from '@ember/routing';
14375
+ import { service } from '@ember/service';
14376
+ export default class extends Route {
14377
+ @service router;
14378
+ activate() {
14379
+ this.router.on('routeWillChange', (transition) => {
14380
+ if (!transition.to.find(route => route.name === this.routeName)) {
14381
+ alert("Please save or cancel your changes.");
14382
+ transition.abort();
14383
+ }
14384
+ })
14385
+ }
14386
+ }
14387
+ ```
14388
+ @method on
14389
+ @param {String} eventName
14390
+ @param {Function} callback
14391
+ @public
14392
+ */
14393
+
14394
+ /**
14395
+ You can unregister a listener for events emitted by this service with `.off()`:
14396
+ ```app/routes/contact-form.js
14397
+ import Route from '@ember/routing';
14398
+ import { service } from '@ember/service';
14399
+ export default class extends Route {
14400
+ @service router;
14401
+ callback = (transition) => {
14402
+ if (!transition.to.find(route => route.name === this.routeName)) {
14403
+ alert("Please save or cancel your changes.");
14404
+ transition.abort();
14405
+ }
14406
+ };
14407
+ activate() {
14408
+ this.router.on('routeWillChange', this.callback);
14409
+ }
14410
+ deactivate() {
14411
+ this.router.off('routeWillChange', this.callback);
14412
+ }
14413
+ ```
14414
+ @method off
14415
+ @param {String} eventName
14416
+ @param {Function} callback
14417
+ @public
14418
+ */
14419
+
15019
14420
  /**
15020
14421
  The `routeWillChange` event is fired at the beginning of any
15021
14422
  attempted transition with a `Transition` object as the sole
@@ -15028,9 +14429,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15028
14429
  import { service } from '@ember/service';
15029
14430
  export default class extends Route {
15030
14431
  @service router;
15031
- constructor() {
15032
- super(...arguments);
15033
- this.router.on('routeWillChange', (transition) => {
14432
+ activate() {
14433
+ this.router.on('routeWillChange', (transition) => {
15034
14434
  if (!transition.to.find(route => route.name === this.routeName)) {
15035
14435
  alert("Please save or cancel your changes.");
15036
14436
  transition.abort();
@@ -15055,9 +14455,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15055
14455
  import { service } from '@ember/service';
15056
14456
  export default class extends Route {
15057
14457
  @service router;
15058
- constructor() {
15059
- super(...arguments);
15060
- this.router.on('routeDidChange', (transition) => {
14458
+ activate() {
14459
+ this.router.on('routeDidChange', (transition) => {
15061
14460
  ga.send('pageView', {
15062
14461
  current: transition.to.name,
15063
14462
  from: transition.from.name
@@ -15122,6 +14521,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15122
14521
  var owner = (0, _owner.getOwner)(this);
15123
14522
  (true && !(owner) && (0, _debug.assert)('RouterService is unexpectedly missing an owner', owner));
15124
14523
  router = owner.lookup('router:main');
14524
+ (true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTER SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
15125
14525
  return this[ROUTER] = router;
15126
14526
  }
15127
14527
 
@@ -15188,7 +14588,6 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15188
14588
 
15189
14589
  var transition = this._router._doTransition(routeName, models, queryParams, true);
15190
14590
 
15191
- transition['_keepDefaultQueryParamValues'] = true;
15192
14591
  return transition;
15193
14592
  }
15194
14593
  /**
@@ -15367,19 +14766,26 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15367
14766
  var hasQueryParams = Object.keys(queryParams).length > 0;
15368
14767
 
15369
14768
  if (hasQueryParams) {
15370
- queryParams = Object.assign({}, queryParams);
15371
-
15372
- this._router._prepareQueryParams( // UNSAFE: casting `routeName as string` here encodes the existing
14769
+ // UNSAFE: casting `routeName as string` here encodes the existing
15373
14770
  // assumption but may be wrong: `extractRouteArgs` correctly returns it
15374
14771
  // as `string | undefined`. There may be bugs if `_prepareQueryParams`
15375
14772
  // does not correctly account for `undefined` values for `routeName`.
15376
14773
  // Spoilers: under the hood this currently uses router.js APIs which
15377
14774
  // *do not* account for this being `undefined`.
15378
- routeName, models, queryParams, true
14775
+ var targetRouteName = routeName;
14776
+ queryParams = Object.assign({}, queryParams);
14777
+
14778
+ this._router._prepareQueryParams(targetRouteName, models, queryParams, true
14779
+ /* fromRouterService */
14780
+ );
14781
+
14782
+ var currentQueryParams = Object.assign({}, routerMicrolib.state.queryParams);
14783
+
14784
+ this._router._prepareQueryParams(targetRouteName, models, currentQueryParams, true
15379
14785
  /* fromRouterService */
15380
14786
  );
15381
14787
 
15382
- return (0, _utils2.shallowEqual)(queryParams, routerMicrolib.state.queryParams);
14788
+ return (0, _utils2.shallowEqual)(queryParams, currentQueryParams);
15383
14789
  }
15384
14790
 
15385
14791
  return true;
@@ -15455,7 +14861,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
15455
14861
 
15456
14862
  __decorate([(0, _computed.readOnly)('_router.currentRoute')], RouterService.prototype, "currentRoute", void 0);
15457
14863
  });
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) {
14864
+ 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
14865
  "use strict";
15460
14866
 
15461
14867
  Object.defineProperty(_exports, "__esModule", {
@@ -15489,6 +14895,7 @@ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-in
15489
14895
  var owner = (0, _owner.getOwner)(this);
15490
14896
  (true && !(owner) && (0, _debug.assert)('RoutingService is unexpectedly missing an owner', owner));
15491
14897
  router = owner.lookup('router:main');
14898
+ (true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTING SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
15492
14899
  router.setupRouter();
15493
14900
  return this[ROUTER] = router;
15494
14901
  }
@@ -15912,7 +15319,7 @@ define("@ember/-internals/routing/lib/system/engines", ["exports"], function (_e
15912
15319
  value: true
15913
15320
  });
15914
15321
  });
15915
- define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "@ember/-internals/metal", "@ember/debug"], function (_exports, _metal, _debug) {
15322
+ define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "@ember/-internals/metal", "@ember/controller", "@ember/debug"], function (_exports, _metal, _controller, _debug) {
15916
15323
  "use strict";
15917
15324
 
15918
15325
  Object.defineProperty(_exports, "__esModule", {
@@ -15959,6 +15366,7 @@ define("@ember/-internals/routing/lib/system/generate_controller", ["exports", "
15959
15366
  generateControllerFactory(owner, controllerName);
15960
15367
  var fullName = `controller:${controllerName}`;
15961
15368
  var instance = owner.lookup(fullName);
15369
+ (true && !(instance instanceof _controller.default) && (0, _debug.assert)('Expected an instance of controller', instance instanceof _controller.default));
15962
15370
 
15963
15371
  if (true
15964
15372
  /* DEBUG */
@@ -16002,7 +15410,7 @@ define("@ember/-internals/routing/lib/system/route-info", ["exports"], function
16002
15410
  value: true
16003
15411
  });
16004
15412
  });
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) {
15413
+ 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
15414
  "use strict";
16007
15415
 
16008
15416
  Object.defineProperty(_exports, "__esModule", {
@@ -16028,13 +15436,13 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16028
15436
 
16029
15437
  class Route extends _runtime.Object.extend(_runtime.ActionHandler, _runtime.Evented) {
16030
15438
  constructor(owner) {
16031
- super(...arguments);
15439
+ super(owner);
16032
15440
  this.context = {};
16033
15441
 
16034
15442
  if (owner) {
16035
15443
  var router = owner.lookup('router:main');
16036
15444
  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));
15445
+ (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
15446
  this._router = router;
16039
15447
  this._bucketCache = bucketCache;
16040
15448
  this._topLevelViewTemplate = owner.lookup('template:-outlet');
@@ -16115,7 +15523,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16115
15523
  _setRouteName(name) {
16116
15524
  this.routeName = name;
16117
15525
  var owner = (0, _owner.getOwner)(this);
16118
- (true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
15526
+ (true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected route to have EngineInstance as owner', owner instanceof _instance.default));
16119
15527
  this.fullRouteName = getEngineRouteName(owner, name);
16120
15528
  }
16121
15529
  /**
@@ -16967,6 +16375,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16967
16375
  // passed a model to skip the assertion.
16968
16376
 
16969
16377
  (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));
16378
+ (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));
16970
16379
  return controller;
16971
16380
  }
16972
16381
  /**
@@ -17031,7 +16440,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17031
16440
  modelFor(_name) {
17032
16441
  var name;
17033
16442
  var owner = (0, _owner.getOwner)(this);
17034
- (true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
16443
+ (true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected router owner to be an EngineInstance', owner instanceof _instance.default));
17035
16444
  var transition = this._router && this._router._routerMicrolib ? this._router._routerMicrolib.activeTransition : undefined; // Only change the route name when there is an active transition.
17036
16445
  // Otherwise, use the passed in route name.
17037
16446
 
@@ -17159,10 +16568,11 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17159
16568
  var hasRouterDefinedQueryParams = Object.keys(queryParameterConfiguraton).length > 0;
17160
16569
 
17161
16570
  if (controller) {
17162
- // the developer has authored a controller class in their application for
16571
+ (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
17163
16572
  // this route find its query params and normalize their object shape them
17164
16573
  // merge in the query params for the route. As a mergedProperty,
17165
16574
  // Route#queryParams is always at least `{}`
16575
+
17166
16576
  var controllerDefinedQueryParameterConfiguration = (0, _metal.get)(controller, 'queryParams') || [];
17167
16577
  var normalizedControllerQueryParameterConfiguration = (0, _utils2.normalizeControllerQueryParams)(controllerDefinedQueryParameterConfiguration);
17168
16578
  combinedQueryParameterConfiguration = mergeEachQueryParams(normalizedControllerQueryParameterConfiguration, queryParameterConfiguraton);
@@ -17326,7 +16736,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17326
16736
  var owner = (0, _owner.getOwner)(route);
17327
16737
  (true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
17328
16738
  var name, templateName, into, outlet, model;
17329
- var controller = undefined;
16739
+ var controller;
17330
16740
 
17331
16741
  if (options) {
17332
16742
  into = options.into && options.into.replace(/\//g, '.');
@@ -17359,6 +16769,8 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17359
16769
  (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));
17360
16770
  }
17361
16771
 
16772
+ (true && !(controller instanceof _controller2.default) && (0, _debug.assert)('Expected an instance of controller', controller instanceof _controller2.default));
16773
+
17362
16774
  if (model === undefined) {
17363
16775
  model = route.currentModel;
17364
16776
  } else {
@@ -17691,7 +17103,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17691
17103
  qp.serializedValue = svalue;
17692
17104
  var thisQueryParamHasDefaultValue = qp.serializedDefaultValue === svalue;
17693
17105
 
17694
- if (!thisQueryParamHasDefaultValue || transition._keepDefaultQueryParamValues) {
17106
+ if (!thisQueryParamHasDefaultValue) {
17695
17107
  finalParams.push({
17696
17108
  value: svalue,
17697
17109
  visible: true,
@@ -17727,7 +17139,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
17727
17139
  var _default = Route;
17728
17140
  _exports.default = _default;
17729
17141
  });
17730
- 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) {
17142
+ 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) {
17731
17143
  "use strict";
17732
17144
 
17733
17145
  Object.defineProperty(_exports, "__esModule", {
@@ -17805,7 +17217,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
17805
17217
 
17806
17218
  class EmberRouter extends _runtime.Object.extend(_runtime.Evented) {
17807
17219
  constructor(owner) {
17808
- super(...arguments);
17220
+ super(owner);
17809
17221
  this._didSetupRouter = false;
17810
17222
  this._initialTransitionStarted = false;
17811
17223
  this.currentURL = null;
@@ -17820,6 +17232,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
17820
17232
  this._handledErrors = new Set();
17821
17233
  this._engineInstances = Object.create(null);
17822
17234
  this._engineInfoByRoute = Object.create(null);
17235
+ this._slowTransitionTimer = null;
17823
17236
  this.currentState = null;
17824
17237
  this.targetState = null;
17825
17238
 
@@ -17827,7 +17240,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
17827
17240
 
17828
17241
  this.namespace = owner.lookup('application:main');
17829
17242
  var bucketCache = owner.lookup((0, _container.privatize)`-bucket-cache:main`);
17830
- (true && !(bucketCache !== undefined) && (0, _debug.assert)('BUG: BucketCache should always be present', bucketCache !== undefined));
17243
+ (true && !(bucketCache instanceof _routing.BucketCache) && (0, _debug.assert)('BUG: BucketCache should always be present', bucketCache instanceof _routing.BucketCache));
17831
17244
  this._bucketCache = bucketCache;
17832
17245
  var routerService = owner.lookup('service:router');
17833
17246
  (true && !(routerService !== undefined) && (0, _debug.assert)('BUG: RouterService should always be present', routerService !== undefined));
@@ -18455,11 +17868,13 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18455
17868
  var instances = this._engineInstances;
18456
17869
 
18457
17870
  for (var name in instances) {
18458
- var instance = instances[name];
18459
- (true && !(instance) && (0, _debug.assert)('has instance', instance));
17871
+ var instanceMap = instances[name];
17872
+ (true && !(instanceMap) && (0, _debug.assert)('has instanceMap', instanceMap));
18460
17873
 
18461
- for (var id in instance) {
18462
- (0, _runloop.run)(instance[id], 'destroy');
17874
+ for (var id in instanceMap) {
17875
+ var instance = instanceMap[id];
17876
+ (true && !(instance) && (0, _debug.assert)('has instance', instance));
17877
+ (0, _runloop.run)(instance, 'destroy');
18463
17878
  }
18464
17879
  }
18465
17880
  }
@@ -18672,7 +18087,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18672
18087
  }
18673
18088
  }
18674
18089
 
18675
- _doTransition(_targetRouteName, models, _queryParams, _keepDefaultQueryParamValues) {
18090
+ _doTransition(_targetRouteName, models, _queryParams, _fromRouterService) {
18676
18091
  var targetRouteName = _targetRouteName || (0, _utils.getActiveTargetName)(this._routerMicrolib);
18677
18092
 
18678
18093
  (true && !(Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)) && (0, _debug.assert)(`The route ${targetRouteName} was not found`, Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)));
@@ -18683,7 +18098,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18683
18098
 
18684
18099
  Object.assign(queryParams, _queryParams);
18685
18100
 
18686
- this._prepareQueryParams(targetRouteName, models, queryParams, Boolean(_keepDefaultQueryParamValues));
18101
+ this._prepareQueryParams(targetRouteName, models, queryParams, Boolean(_fromRouterService));
18687
18102
 
18688
18103
  var transition = this._routerMicrolib.transitionTo(targetRouteName, ...models, {
18689
18104
  queryParams
@@ -18935,7 +18350,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18935
18350
  _scheduleLoadingEvent(transition, originRoute) {
18936
18351
  this._cancelSlowTransitionTimer();
18937
18352
 
18938
- this._slowTransitionTimer = (0, _runloop.scheduleOnce)('routerTransitions', this, '_handleSlowTransition', transition, originRoute);
18353
+ this._slowTransitionTimer = (0, _runloop.scheduleOnce)('routerTransitions', this, this._handleSlowTransition, transition, originRoute);
18939
18354
  }
18940
18355
 
18941
18356
  _handleSlowTransition(transition, originRoute) {
@@ -18992,7 +18407,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18992
18407
 
18993
18408
  if (!engineInstance) {
18994
18409
  var owner = (0, _owner.getOwner)(this);
18995
- (true && !(owner) && (0, _debug.assert)('Router is unexpectedly missing an owner', owner));
18410
+ (true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected router to have EngineInstance as owner', owner instanceof _instance.default));
18996
18411
  (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}`)));
18997
18412
  engineInstance = owner.buildChildEngineInstance(name, {
18998
18413
  routable: true,
@@ -19297,16 +18712,6 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
19297
18712
  (0, _metal.set)(router, 'currentPath', path);
19298
18713
  (0, _metal.set)(router, 'currentRouteName', currentRouteName);
19299
18714
  (0, _metal.set)(router, 'currentURL', currentURL);
19300
- var owner = (0, _owner.getOwner)(router);
19301
- (true && !(owner) && (0, _debug.assert)('Router is unexpectedly missing an owner', owner));
19302
- var appController = owner.lookup('controller:application');
19303
-
19304
- if (!appController) {
19305
- // appController might not exist when top-level loading/error
19306
- // substates have been entered since ApplicationRoute hasn't
19307
- // actually been entered at that point.
19308
- return;
19309
- }
19310
18715
  }
19311
18716
 
19312
18717
  function didBeginTransition(transition, router) {
@@ -19406,7 +18811,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
19406
18811
  // Create an entry to represent our default template name,
19407
18812
  // just so other routes can target it and inherit its place
19408
18813
  // in the outlet hierarchy.
19409
- defaultParentState.outlets.main = {
18814
+ defaultParentState.outlets['main'] = {
19410
18815
  render: {
19411
18816
  name: routeName,
19412
18817
  outlet: 'main'
@@ -19670,7 +19075,7 @@ define("@ember/-internals/routing/lib/system/transition", [], function () {
19670
19075
  @type {Transition | undefined}
19671
19076
  */
19672
19077
  });
19673
- 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) {
19078
+ 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) {
19674
19079
  "use strict";
19675
19080
 
19676
19081
  Object.defineProperty(_exports, "__esModule", {
@@ -19910,7 +19315,7 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
19910
19315
  function prefixRouteNameArg(route, args) {
19911
19316
  var routeName;
19912
19317
  var owner = (0, _owner.getOwner)(route);
19913
- (true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
19318
+ (true && !(owner instanceof _instance.default) && (0, _debug.assert)('Expected route to have EngineInstance as owner', owner instanceof _instance.default));
19914
19319
  var prefix = owner.mountPoint; // only alter the routeName if it's actually referencing a route.
19915
19320
 
19916
19321
  if (owner.routable && typeof args[0] === 'string') {
@@ -20163,7 +19568,7 @@ define("@ember/-internals/runtime/index", ["exports", "@ember/-internals/runtime
20163
19568
  }
20164
19569
  });
20165
19570
  });
20166
- define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/runtime/lib/type-of", "@ember/-internals/runtime/lib/mixins/comparable"], function (_exports, _typeOf, _comparable) {
19571
+ 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) {
20167
19572
  "use strict";
20168
19573
 
20169
19574
  Object.defineProperty(_exports, "__esModule", {
@@ -20201,8 +19606,9 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
20201
19606
  // SSt `------'`
20202
19607
 
20203
19608
  function spaceship(a, b) {
20204
- var diff = a - b;
20205
- return (diff > 0) - (diff < 0);
19609
+ 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.
19610
+
19611
+ return Number(diff > 0) - Number(diff < 0);
20206
19612
  }
20207
19613
  /**
20208
19614
  @module @ember/utils
@@ -20264,11 +19670,12 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
20264
19670
  var type1 = (0, _typeOf.typeOf)(v);
20265
19671
  var type2 = (0, _typeOf.typeOf)(w);
20266
19672
 
20267
- if (type1 === 'instance' && _comparable.default.detect(v) && v.constructor.compare) {
19673
+ if (type1 === 'instance' && isComparable(v) && v.constructor.compare) {
20268
19674
  return v.constructor.compare(v, w);
20269
19675
  }
20270
19676
 
20271
- if (type2 === 'instance' && _comparable.default.detect(w) && w.constructor.compare) {
19677
+ if (type2 === 'instance' && isComparable(w) && w.constructor.compare) {
19678
+ // SAFETY: Multiplying by a negative just changes the sign
20272
19679
  return w.constructor.compare(w, v) * -1;
20273
19680
  }
20274
19681
 
@@ -20281,14 +19688,20 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
20281
19688
 
20282
19689
  switch (type1) {
20283
19690
  case 'boolean':
19691
+ (true && !(typeof v === 'boolean' && typeof w === 'boolean') && (0, _debug.assert)('both are boolean', typeof v === 'boolean' && typeof w === 'boolean'));
19692
+ return spaceship(Number(v), Number(w));
19693
+
20284
19694
  case 'number':
19695
+ (true && !(typeof v === 'number' && typeof w === 'number') && (0, _debug.assert)('both are numbers', typeof v === 'number' && typeof w === 'number'));
20285
19696
  return spaceship(v, w);
20286
19697
 
20287
19698
  case 'string':
19699
+ (true && !(typeof v === 'string' && typeof w === 'string') && (0, _debug.assert)('both are strings', typeof v === 'string' && typeof w === 'string'));
20288
19700
  return spaceship(v.localeCompare(w), 0);
20289
19701
 
20290
19702
  case 'array':
20291
19703
  {
19704
+ (true && !(Array.isArray(v) && Array.isArray(w)) && (0, _debug.assert)('both are arrays', Array.isArray(v) && Array.isArray(w)));
20292
19705
  var vLen = v.length;
20293
19706
  var wLen = w.length;
20294
19707
  var len = Math.min(vLen, wLen);
@@ -20307,19 +19720,24 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
20307
19720
  }
20308
19721
 
20309
19722
  case 'instance':
20310
- if (_comparable.default.detect(v)) {
19723
+ if (isComparable(v) && v.compare) {
20311
19724
  return v.compare(v, w);
20312
19725
  }
20313
19726
 
20314
19727
  return 0;
20315
19728
 
20316
19729
  case 'date':
19730
+ (true && !(v instanceof Date && w instanceof Date) && (0, _debug.assert)('both are dates', v instanceof Date && w instanceof Date));
20317
19731
  return spaceship(v.getTime(), w.getTime());
20318
19732
 
20319
19733
  default:
20320
19734
  return 0;
20321
19735
  }
20322
19736
  }
19737
+
19738
+ function isComparable(value) {
19739
+ return _comparable.default.detect(value);
19740
+ }
20323
19741
  });
20324
19742
  define("@ember/-internals/runtime/lib/ext/rsvp", ["exports", "rsvp", "@ember/runloop", "@ember/-internals/error-handling", "@ember/debug"], function (_exports, RSVP, _runloop, _errorHandling, _debug) {
20325
19743
  "use strict";
@@ -20353,13 +19771,17 @@ define("@ember/-internals/runtime/lib/ext/rsvp", ["exports", "rsvp", "@ember/run
20353
19771
 
20354
19772
  function errorFor(reason) {
20355
19773
  if (!reason) return;
19774
+ var withErrorThrown = reason;
20356
19775
 
20357
- if (reason.errorThrown) {
20358
- return unwrapErrorThrown(reason);
19776
+ if (withErrorThrown.errorThrown) {
19777
+ return unwrapErrorThrown(withErrorThrown);
20359
19778
  }
20360
19779
 
20361
- if (reason.name === 'UnrecognizedURLError') {
20362
- (true && !(false) && (0, _debug.assert)(`The URL '${reason.message}' did not match any routes in your application`, false));
19780
+ var withName = reason;
19781
+
19782
+ if (withName.name === 'UnrecognizedURLError') {
19783
+ (true && !(false) && (0, _debug.assert)(`The URL '${withName.message}' did not match any routes in your application`, false)); // @ts-expect-error We'll hit this if the assert is stripped
19784
+
20363
19785
  return;
20364
19786
  }
20365
19787
 
@@ -20518,7 +19940,7 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
20518
19940
  var _default = _metal.Mixin.create({
20519
19941
  /**
20520
19942
  The object whose properties will be forwarded.
20521
- @property content
19943
+ @property content
20522
19944
  @type {unknown}
20523
19945
  @default null
20524
19946
  @public
@@ -22174,7 +21596,7 @@ define("@ember/-internals/runtime/lib/mixins/array", ["exports", "@ember/-intern
22174
21596
  colors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function
22175
21597
  ```
22176
21598
  @method unshiftObjects
22177
- @param {Enumberable} objects the objects to add
21599
+ @param {Enumerable} objects the objects to add
22178
21600
  @return {EmberArray} receiver
22179
21601
  @public
22180
21602
  */
@@ -22446,13 +21868,13 @@ define("@ember/-internals/runtime/lib/mixins/comparable", ["exports", "@ember/-i
22446
21868
  var _default = _metal.Mixin.create({
22447
21869
  /**
22448
21870
  __Required.__ You must implement this method to apply this mixin.
22449
- Override to return the result of the comparison of the two parameters. The
21871
+ Override to return the result of the comparison of the two parameters. The
22450
21872
  compare method should return:
22451
- - `-1` if `a < b`
21873
+ - `-1` if `a < b`
22452
21874
  - `0` if `a == b`
22453
21875
  - `1` if `a > b`
22454
- Default implementation raises an exception.
22455
- @method compare
21876
+ Default implementation raises an exception.
21877
+ @method compare
22456
21878
  @param a {Object} the first object to compare
22457
21879
  @param b {Object} the second object to compare
22458
21880
  @return {Number} the result of the comparison
@@ -22485,7 +21907,7 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
22485
21907
  var containerProxyMixin = {
22486
21908
  /**
22487
21909
  The container stores state.
22488
- @private
21910
+ @private
22489
21911
  @property {Ember.Container} __container__
22490
21912
  */
22491
21913
  __container__: null,
@@ -22493,16 +21915,16 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
22493
21915
  /**
22494
21916
  Returns an object that can be used to provide an owner to a
22495
21917
  manually created instance.
22496
- Example:
22497
- ```
21918
+ Example:
21919
+ ```
22498
21920
  import { getOwner } from '@ember/application';
22499
- let owner = getOwner(this);
22500
- User.create(
21921
+ let owner = getOwner(this);
21922
+ User.create(
22501
21923
  owner.ownerInjection(),
22502
21924
  { username: 'rwjblue' }
22503
21925
  )
22504
21926
  ```
22505
- @public
21927
+ @public
22506
21928
  @method ownerInjection
22507
21929
  @since 2.3.0
22508
21930
  @return {Object}
@@ -22513,30 +21935,30 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
22513
21935
 
22514
21936
  /**
22515
21937
  Given a fullName return a corresponding instance.
22516
- The default behavior is for lookup to return a singleton instance.
21938
+ The default behavior is for lookup to return a singleton instance.
22517
21939
  The singleton is scoped to the container, allowing multiple containers
22518
21940
  to all have their own locally scoped singletons.
22519
- ```javascript
21941
+ ```javascript
22520
21942
  let registry = new Registry();
22521
21943
  let container = registry.container();
22522
- registry.register('api:twitter', Twitter);
22523
- let twitter = container.lookup('api:twitter');
22524
- twitter instanceof Twitter; // => true
22525
- // by default the container will return singletons
21944
+ registry.register('api:twitter', Twitter);
21945
+ let twitter = container.lookup('api:twitter');
21946
+ twitter instanceof Twitter; // => true
21947
+ // by default the container will return singletons
22526
21948
  let twitter2 = container.lookup('api:twitter');
22527
21949
  twitter2 instanceof Twitter; // => true
22528
- twitter === twitter2; //=> true
21950
+ twitter === twitter2; //=> true
22529
21951
  ```
22530
- If singletons are not wanted an optional flag can be provided at lookup.
22531
- ```javascript
21952
+ If singletons are not wanted an optional flag can be provided at lookup.
21953
+ ```javascript
22532
21954
  let registry = new Registry();
22533
21955
  let container = registry.container();
22534
- registry.register('api:twitter', Twitter);
22535
- let twitter = container.lookup('api:twitter', { singleton: false });
21956
+ registry.register('api:twitter', Twitter);
21957
+ let twitter = container.lookup('api:twitter', { singleton: false });
22536
21958
  let twitter2 = container.lookup('api:twitter', { singleton: false });
22537
- twitter === twitter2; //=> false
21959
+ twitter === twitter2; //=> false
22538
21960
  ```
22539
- @public
21961
+ @public
22540
21962
  @method lookup
22541
21963
  @param {String} fullName
22542
21964
  @param {Object} options
@@ -22561,32 +21983,32 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
22561
21983
 
22562
21984
  /**
22563
21985
  Given a fullName return a factory manager.
22564
- This method returns a manager which can be used for introspection of the
21986
+ This method returns a manager which can be used for introspection of the
22565
21987
  factory's class or for the creation of factory instances with initial
22566
21988
  properties. The manager is an object with the following properties:
22567
- * `class` - The registered or resolved class.
21989
+ * `class` - The registered or resolved class.
22568
21990
  * `create` - A function that will create an instance of the class with
22569
21991
  any dependencies injected.
22570
- For example:
22571
- ```javascript
21992
+ For example:
21993
+ ```javascript
22572
21994
  import { getOwner } from '@ember/application';
22573
- let owner = getOwner(otherInstance);
21995
+ let owner = getOwner(otherInstance);
22574
21996
  // the owner is commonly the `applicationInstance`, and can be accessed via
22575
21997
  // an instance initializer.
22576
- let factory = owner.factoryFor('service:bespoke');
22577
- factory.class;
21998
+ let factory = owner.factoryFor('service:bespoke');
21999
+ factory.class;
22578
22000
  // The registered or resolved class. For example when used with an Ember-CLI
22579
22001
  // app, this would be the default export from `app/services/bespoke.js`.
22580
- let instance = factory.create({
22002
+ let instance = factory.create({
22581
22003
  someProperty: 'an initial property value'
22582
22004
  });
22583
22005
  // Create an instance with any injections and the passed options as
22584
22006
  // initial properties.
22585
22007
  ```
22586
- Any instances created via the factory's `.create()` method *must* be destroyed
22008
+ Any instances created via the factory's `.create()` method *must* be destroyed
22587
22009
  manually by the caller of `.create()`. Typically, this is done during the creating
22588
22010
  objects own `destroy` or `willDestroy` methods.
22589
- @public
22011
+ @public
22590
22012
  @method factoryFor
22591
22013
  @param {String} fullName
22592
22014
  @param {Object} options
@@ -23339,7 +22761,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23339
22761
  /**
23340
22762
  If the proxied promise is rejected this will contain the reason
23341
22763
  provided.
23342
- @property reason
22764
+ @property reason
23343
22765
  @default null
23344
22766
  @public
23345
22767
  */
@@ -23347,7 +22769,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23347
22769
 
23348
22770
  /**
23349
22771
  Once the proxied promise has settled this will become `false`.
23350
- @property isPending
22772
+ @property isPending
23351
22773
  @default true
23352
22774
  @public
23353
22775
  */
@@ -23357,7 +22779,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23357
22779
 
23358
22780
  /**
23359
22781
  Once the proxied promise has settled this will become `true`.
23360
- @property isSettled
22782
+ @property isSettled
23361
22783
  @default false
23362
22784
  @public
23363
22785
  */
@@ -23367,7 +22789,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23367
22789
 
23368
22790
  /**
23369
22791
  Will become `true` if the proxied promise is rejected.
23370
- @property isRejected
22792
+ @property isRejected
23371
22793
  @default false
23372
22794
  @public
23373
22795
  */
@@ -23375,7 +22797,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23375
22797
 
23376
22798
  /**
23377
22799
  Will become `true` if the proxied promise is fulfilled.
23378
- @property isFulfilled
22800
+ @property isFulfilled
23379
22801
  @default false
23380
22802
  @public
23381
22803
  */
@@ -23383,17 +22805,17 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23383
22805
 
23384
22806
  /**
23385
22807
  The promise whose fulfillment value is being proxied by this object.
23386
- This property must be specified upon creation, and should not be
22808
+ This property must be specified upon creation, and should not be
23387
22809
  changed once created.
23388
- Example:
23389
- ```javascript
22810
+ Example:
22811
+ ```javascript
23390
22812
  import ObjectProxy from '@ember/object/proxy';
23391
22813
  import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
23392
- ObjectProxy.extend(PromiseProxyMixin).create({
22814
+ ObjectProxy.extend(PromiseProxyMixin).create({
23393
22815
  promise: <thenable>
23394
22816
  });
23395
22817
  ```
23396
- @property promise
22818
+ @property promise
23397
22819
  @public
23398
22820
  */
23399
22821
  promise: (0, _metal.computed)({
@@ -23409,8 +22831,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23409
22831
 
23410
22832
  /**
23411
22833
  An alias to the proxied promise's `then`.
23412
- See RSVP.Promise.then.
23413
- @method then
22834
+ See RSVP.Promise.then.
22835
+ @method then
23414
22836
  @param {Function} callback
23415
22837
  @return {RSVP.Promise}
23416
22838
  @public
@@ -23419,8 +22841,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23419
22841
 
23420
22842
  /**
23421
22843
  An alias to the proxied promise's `catch`.
23422
- See RSVP.Promise.catch.
23423
- @method catch
22844
+ See RSVP.Promise.catch.
22845
+ @method catch
23424
22846
  @param {Function} callback
23425
22847
  @return {RSVP.Promise}
23426
22848
  @since 1.3.0
@@ -23430,8 +22852,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
23430
22852
 
23431
22853
  /**
23432
22854
  An alias to the proxied promise's `finally`.
23433
- See RSVP.Promise.finally.
23434
- @method finally
22855
+ See RSVP.Promise.finally.
22856
+ @method finally
23435
22857
  @param {Function} callback
23436
22858
  @return {RSVP.Promise}
23437
22859
  @since 1.3.0
@@ -23473,62 +22895,62 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23473
22895
 
23474
22896
  /**
23475
22897
  Given a fullName return the corresponding factory.
23476
- @public
22898
+ @public
23477
22899
  @method resolveRegistration
23478
22900
  @param {String} fullName
23479
22901
  @return {Function} fullName's factory
23480
22902
  */
23481
- resolveRegistration(fullName, options) {
22903
+ resolveRegistration(fullName) {
23482
22904
  (true && !(this.__registry__.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.__registry__.isValidFullName(fullName)));
23483
- return this.__registry__.resolve(fullName, options);
22905
+ return this.__registry__.resolve(fullName);
23484
22906
  },
23485
22907
 
23486
22908
  /**
23487
22909
  Registers a factory that can be used for dependency injection (with
23488
22910
  `inject`) or for service lookup. Each factory is registered with
23489
22911
  a full name including two parts: `type:name`.
23490
- A simple example:
23491
- ```javascript
22912
+ A simple example:
22913
+ ```javascript
23492
22914
  import Application from '@ember/application';
23493
22915
  import EmberObject from '@ember/object';
23494
- let App = Application.create();
23495
- App.Orange = EmberObject.extend();
22916
+ let App = Application.create();
22917
+ App.Orange = EmberObject.extend();
23496
22918
  App.register('fruit:favorite', App.Orange);
23497
22919
  ```
23498
- Ember will resolve factories from the `App` namespace automatically.
22920
+ Ember will resolve factories from the `App` namespace automatically.
23499
22921
  For example `App.CarsController` will be discovered and returned if
23500
22922
  an application requests `controller:cars`.
23501
- An example of registering a controller with a non-standard name:
23502
- ```javascript
22923
+ An example of registering a controller with a non-standard name:
22924
+ ```javascript
23503
22925
  import Application from '@ember/application';
23504
22926
  import Controller from '@ember/controller';
23505
- let App = Application.create();
22927
+ let App = Application.create();
23506
22928
  let Session = Controller.extend();
23507
- App.register('controller:session', Session);
23508
- // The Session controller can now be treated like a normal controller,
22929
+ App.register('controller:session', Session);
22930
+ // The Session controller can now be treated like a normal controller,
23509
22931
  // despite its non-standard name.
23510
22932
  App.ApplicationController = Controller.extend({
23511
22933
  needs: ['session']
23512
22934
  });
23513
22935
  ```
23514
- Registered factories are **instantiated** by having `create`
22936
+ Registered factories are **instantiated** by having `create`
23515
22937
  called on them. Additionally they are **singletons**, each time
23516
22938
  they are looked up they return the same instance.
23517
- Some examples modifying that default behavior:
23518
- ```javascript
22939
+ Some examples modifying that default behavior:
22940
+ ```javascript
23519
22941
  import Application from '@ember/application';
23520
22942
  import EmberObject from '@ember/object';
23521
- let App = Application.create();
23522
- App.Person = EmberObject.extend();
22943
+ let App = Application.create();
22944
+ App.Person = EmberObject.extend();
23523
22945
  App.Orange = EmberObject.extend();
23524
22946
  App.Email = EmberObject.extend();
23525
22947
  App.session = EmberObject.create();
23526
- App.register('model:user', App.Person, { singleton: false });
22948
+ App.register('model:user', App.Person, { singleton: false });
23527
22949
  App.register('fruit:favorite', App.Orange);
23528
22950
  App.register('communication:main', App.Email, { singleton: false });
23529
22951
  App.register('session', App.session, { instantiate: false });
23530
22952
  ```
23531
- @method register
22953
+ @method register
23532
22954
  @param fullName {String} type:name (e.g., 'model:user')
23533
22955
  @param factory {any} (e.g., App.Person)
23534
22956
  @param options {Object} (optional) disable instantiation or singleton usage
@@ -23538,17 +22960,17 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23538
22960
 
23539
22961
  /**
23540
22962
  Unregister a factory.
23541
- ```javascript
22963
+ ```javascript
23542
22964
  import Application from '@ember/application';
23543
22965
  import EmberObject from '@ember/object';
23544
- let App = Application.create();
22966
+ let App = Application.create();
23545
22967
  let User = EmberObject.extend();
23546
22968
  App.register('model:user', User);
23547
- App.resolveRegistration('model:user').create() instanceof User //=> true
23548
- App.unregister('model:user')
22969
+ App.resolveRegistration('model:user').create() instanceof User //=> true
22970
+ App.unregister('model:user')
23549
22971
  App.resolveRegistration('model:user') === undefined //=> true
23550
22972
  ```
23551
- @public
22973
+ @public
23552
22974
  @method unregister
23553
22975
  @param {String} fullName
23554
22976
  */
@@ -23556,7 +22978,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23556
22978
 
23557
22979
  /**
23558
22980
  Check if a factory is registered.
23559
- @public
22981
+ @public
23560
22982
  @method hasRegistration
23561
22983
  @param {String} fullName
23562
22984
  @return {Boolean}
@@ -23565,7 +22987,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23565
22987
 
23566
22988
  /**
23567
22989
  Return a specific registered option for a particular factory.
23568
- @public
22990
+ @public
23569
22991
  @method registeredOption
23570
22992
  @param {String} fullName
23571
22993
  @param {String} optionName
@@ -23575,7 +22997,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23575
22997
 
23576
22998
  /**
23577
22999
  Register options for a particular factory.
23578
- @public
23000
+ @public
23579
23001
  @method registerOptions
23580
23002
  @param {String} fullName
23581
23003
  @param {Object} options
@@ -23584,7 +23006,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23584
23006
 
23585
23007
  /**
23586
23008
  Return registered options for a particular factory.
23587
- @public
23009
+ @public
23588
23010
  @method registeredOptions
23589
23011
  @param {String} fullName
23590
23012
  @return {Object} options
@@ -23593,22 +23015,22 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23593
23015
 
23594
23016
  /**
23595
23017
  Allow registering options for all factories of a type.
23596
- ```javascript
23018
+ ```javascript
23597
23019
  import Application from '@ember/application';
23598
- let App = Application.create();
23020
+ let App = Application.create();
23599
23021
  let appInstance = App.buildInstance();
23600
- // if all of type `connection` must not be singletons
23022
+ // if all of type `connection` must not be singletons
23601
23023
  appInstance.registerOptionsForType('connection', { singleton: false });
23602
- appInstance.register('connection:twitter', TwitterConnection);
23024
+ appInstance.register('connection:twitter', TwitterConnection);
23603
23025
  appInstance.register('connection:facebook', FacebookConnection);
23604
- let twitter = appInstance.lookup('connection:twitter');
23026
+ let twitter = appInstance.lookup('connection:twitter');
23605
23027
  let twitter2 = appInstance.lookup('connection:twitter');
23606
- twitter === twitter2; // => false
23607
- let facebook = appInstance.lookup('connection:facebook');
23028
+ twitter === twitter2; // => false
23029
+ let facebook = appInstance.lookup('connection:facebook');
23608
23030
  let facebook2 = appInstance.lookup('connection:facebook');
23609
- facebook === facebook2; // => false
23031
+ facebook === facebook2; // => false
23610
23032
  ```
23611
- @public
23033
+ @public
23612
23034
  @method registerOptionsForType
23613
23035
  @param {String} type
23614
23036
  @param {Object} options
@@ -23617,7 +23039,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23617
23039
 
23618
23040
  /**
23619
23041
  Return the registered options for all factories of a type.
23620
- @public
23042
+ @public
23621
23043
  @method registeredOptionsForType
23622
23044
  @param {String} type
23623
23045
  @return {Object} options
@@ -23627,41 +23049,42 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
23627
23049
  /**
23628
23050
  Define a dependency injection onto a specific factory or all factories
23629
23051
  of a type.
23630
- When Ember instantiates a controller, view, or other framework component
23052
+ When Ember instantiates a controller, view, or other framework component
23631
23053
  it can attach a dependency to that component. This is often used to
23632
23054
  provide services to a set of framework components.
23633
- An example of providing a session object to all controllers:
23634
- ```javascript
23055
+ An example of providing a session object to all controllers:
23056
+ ```javascript
23635
23057
  import { alias } from '@ember/object/computed';
23636
23058
  import Application from '@ember/application';
23637
23059
  import Controller from '@ember/controller';
23638
23060
  import EmberObject from '@ember/object';
23639
- let App = Application.create();
23061
+ let App = Application.create();
23640
23062
  let Session = EmberObject.extend({ isAuthenticated: false });
23641
- // A factory must be registered before it can be injected
23063
+ // A factory must be registered before it can be injected
23642
23064
  App.register('session:main', Session);
23643
- // Inject 'session:main' onto all factories of the type 'controller'
23065
+ // Inject 'session:main' onto all factories of the type 'controller'
23644
23066
  // with the name 'session'
23645
23067
  App.inject('controller', 'session', 'session:main');
23646
- App.IndexController = Controller.extend({
23068
+ App.IndexController = Controller.extend({
23647
23069
  isLoggedIn: alias('session.isAuthenticated')
23648
23070
  });
23649
23071
  ```
23650
- Injections can also be performed on specific factories.
23651
- ```javascript
23072
+ Injections can also be performed on specific factories.
23073
+ ```javascript
23652
23074
  App.inject(<full_name or type>, <property name>, <full_name>)
23653
23075
  App.inject('route', 'source', 'source:main')
23654
23076
  App.inject('route:application', 'email', 'model:email')
23655
23077
  ```
23656
- It is important to note that injections can only be performed on
23078
+ It is important to note that injections can only be performed on
23657
23079
  classes that are instantiated by Ember itself. Instantiating a class
23658
23080
  directly (via `create` or `new`) bypasses the dependency injection
23659
23081
  system.
23660
- @public
23082
+ @public
23661
23083
  @method inject
23662
23084
  @param factoryNameOrType {String}
23663
23085
  @param property {String}
23664
23086
  @param injectionName {String}
23087
+ @deprecated
23665
23088
  **/
23666
23089
  inject: registryAlias('injection')
23667
23090
  });
@@ -23721,9 +23144,9 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23721
23144
  /**
23722
23145
  Send an `action` with an `actionContext` to a `target`. The action, actionContext
23723
23146
  and target will be retrieved from properties of the object. For example:
23724
- ```javascript
23147
+ ```javascript
23725
23148
  import { alias } from '@ember/object/computed';
23726
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23149
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23727
23150
  target: alias('controller'),
23728
23151
  action: 'save',
23729
23152
  actionContext: alias('context'),
@@ -23733,9 +23156,9 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23733
23156
  }
23734
23157
  });
23735
23158
  ```
23736
- The `target`, `action`, and `actionContext` can be provided as properties of
23159
+ The `target`, `action`, and `actionContext` can be provided as properties of
23737
23160
  an optional object argument to `triggerAction` as well.
23738
- ```javascript
23161
+ ```javascript
23739
23162
  App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23740
23163
  click() {
23741
23164
  this.triggerAction({
@@ -23747,12 +23170,12 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23747
23170
  }
23748
23171
  });
23749
23172
  ```
23750
- The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
23173
+ The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
23751
23174
  But `target` and `action` must be specified either as properties or with the argument
23752
23175
  to `triggerAction`, or a combination:
23753
- ```javascript
23176
+ ```javascript
23754
23177
  import { alias } from '@ember/object/computed';
23755
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23178
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23756
23179
  target: alias('controller'),
23757
23180
  click() {
23758
23181
  this.triggerAction({
@@ -23762,7 +23185,7 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23762
23185
  }
23763
23186
  });
23764
23187
  ```
23765
- @method triggerAction
23188
+ @method triggerAction
23766
23189
  @param opts {Object} (optional, with the optional keys action, target and/or actionContext)
23767
23190
  @return {Boolean} true if the action was sent successfully and did not return false
23768
23191
  @private
@@ -26078,7 +25501,7 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
26078
25501
 
26079
25502
 
26080
25503
  function canInvoke(obj, methodName) {
26081
- return obj !== null && obj !== undefined && typeof obj[methodName] === 'function';
25504
+ return obj != null && typeof obj[methodName] === 'function';
26082
25505
  }
26083
25506
  /**
26084
25507
  @module @ember/utils
@@ -27520,12 +26943,14 @@ define("@ember/-internals/views/lib/system/utils", ["exports", "@ember/-internal
27520
26943
  _exports.setElementView = setElementView;
27521
26944
  _exports.setViewElement = setViewElement;
27522
26945
 
27523
- /* globals Element */
27524
-
27525
26946
  /**
27526
26947
  @module ember
27527
26948
  */
27528
26949
  function isSimpleClick(event) {
26950
+ if (!(event instanceof MouseEvent)) {
26951
+ return false;
26952
+ }
26953
+
27529
26954
  var modifier = event.shiftKey || event.metaKey || event.altKey || event.ctrlKey;
27530
26955
  var secondaryClick = event.which > 1; // IE9 may return undefined
27531
26956
 
@@ -27753,22 +27178,6 @@ define("@ember/-internals/views/lib/views/core_view", ["exports", "@ember/-inter
27753
27178
  });
27754
27179
  _exports.default = void 0;
27755
27180
 
27756
- /**
27757
- `Ember.CoreView` is an abstract class that exists to give view-like behavior
27758
- to both Ember's main view class `Component` and other classes that don't need
27759
- the full functionality of `Component`.
27760
-
27761
- Unless you have specific needs for `CoreView`, you will use `Component`
27762
- in your applications.
27763
-
27764
- @class CoreView
27765
- @namespace Ember
27766
- @extends EmberObject
27767
- @deprecated Use `Component` instead.
27768
- @uses Evented
27769
- @uses Ember.ActionHandler
27770
- @private
27771
- */
27772
27181
  var CoreView = _runtime.FrameworkObject.extend(_runtime.Evented, _runtime.ActionHandler, {
27773
27182
  isView: true,
27774
27183
  _states: _states.default,
@@ -27785,7 +27194,7 @@ define("@ember/-internals/views/lib/views/core_view", ["exports", "@ember/-inter
27785
27194
  /**
27786
27195
  If the view is currently inserted into the DOM of a parent view, this
27787
27196
  property will point to the parent of the view.
27788
- @property parentView
27197
+ @property parentView
27789
27198
  @type Ember.View
27790
27199
  @default null
27791
27200
  @private
@@ -27793,16 +27202,16 @@ define("@ember/-internals/views/lib/views/core_view", ["exports", "@ember/-inter
27793
27202
  parentView: null,
27794
27203
 
27795
27204
  instrumentDetails(hash) {
27796
- hash.object = this.toString();
27797
- hash.containerKey = this._debugContainerKey;
27798
- hash.view = this;
27205
+ hash['object'] = this.toString();
27206
+ hash['containerKey'] = this._debugContainerKey;
27207
+ hash['view'] = this;
27799
27208
  return hash;
27800
27209
  },
27801
27210
 
27802
27211
  /**
27803
27212
  Override the default event firing from `Evented` to
27804
27213
  also call methods with the given name.
27805
- @method trigger
27214
+ @method trigger
27806
27215
  @param name {String}
27807
27216
  @private
27808
27217
  */
@@ -28373,12 +27782,12 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
28373
27782
  @default auto-detected
28374
27783
  @private
28375
27784
  */
28376
- this.isInteractive = environment.hasDOM; // This default is overridable below
27785
+ this.isInteractive = Boolean(environment.hasDOM); // This default is overridable below
28377
27786
 
28378
27787
  /**
28379
27788
  @property _renderMode
28380
27789
  @type string
28381
- @default false
27790
+ @default undefined
28382
27791
  @private
28383
27792
  */
28384
27793
 
@@ -28405,7 +27814,7 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
28405
27814
  if (options.isBrowser !== undefined) {
28406
27815
  this.isBrowser = Boolean(options.isBrowser);
28407
27816
  } else {
28408
- this.isBrowser = environment.hasDOM;
27817
+ this.isBrowser = Boolean(environment.hasDOM);
28409
27818
  }
28410
27819
 
28411
27820
  if (!this.isBrowser) {
@@ -29646,7 +29055,7 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
29646
29055
  Object.defineProperty(_exports, "__esModule", {
29647
29056
  value: true
29648
29057
  });
29649
- _exports.FEATURES = _exports.EMBER_STRICT_MODE = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_NAMED_BLOCKS = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_GLIMMER_INVOKE_HELPER = _exports.EMBER_GLIMMER_HELPER_MANAGER = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_CACHED = _exports.DEFAULT_FEATURES = void 0;
29058
+ _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;
29650
29059
  _exports.isEnabled = isEnabled;
29651
29060
 
29652
29061
  /**
@@ -29662,13 +29071,9 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
29662
29071
  var DEFAULT_FEATURES = {
29663
29072
  EMBER_LIBRARIES_ISREGISTERED: null,
29664
29073
  EMBER_IMPROVED_INSTRUMENTATION: null,
29665
- EMBER_NAMED_BLOCKS: true,
29666
- EMBER_GLIMMER_HELPER_MANAGER: true,
29667
- EMBER_GLIMMER_INVOKE_HELPER: true,
29668
- EMBER_STRICT_MODE: true,
29669
- EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
29670
29074
  EMBER_ROUTING_ROUTER_SERVICE_REFRESH: true,
29671
- EMBER_CACHED: true
29075
+ EMBER_CACHED: true,
29076
+ EMBER_UNIQUE_ID_HELPER: null
29672
29077
  };
29673
29078
  /**
29674
29079
  The hash of enabled Canary features. Add to this, any canary features
@@ -29724,20 +29129,12 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
29724
29129
  _exports.EMBER_LIBRARIES_ISREGISTERED = EMBER_LIBRARIES_ISREGISTERED;
29725
29130
  var EMBER_IMPROVED_INSTRUMENTATION = featureValue(FEATURES.EMBER_IMPROVED_INSTRUMENTATION);
29726
29131
  _exports.EMBER_IMPROVED_INSTRUMENTATION = EMBER_IMPROVED_INSTRUMENTATION;
29727
- var EMBER_NAMED_BLOCKS = featureValue(FEATURES.EMBER_NAMED_BLOCKS);
29728
- _exports.EMBER_NAMED_BLOCKS = EMBER_NAMED_BLOCKS;
29729
- var EMBER_GLIMMER_HELPER_MANAGER = featureValue(FEATURES.EMBER_GLIMMER_HELPER_MANAGER);
29730
- _exports.EMBER_GLIMMER_HELPER_MANAGER = EMBER_GLIMMER_HELPER_MANAGER;
29731
- var EMBER_GLIMMER_INVOKE_HELPER = featureValue(FEATURES.EMBER_GLIMMER_INVOKE_HELPER);
29732
- _exports.EMBER_GLIMMER_INVOKE_HELPER = EMBER_GLIMMER_INVOKE_HELPER;
29733
- var EMBER_STRICT_MODE = featureValue(FEATURES.EMBER_STRICT_MODE);
29734
- _exports.EMBER_STRICT_MODE = EMBER_STRICT_MODE;
29735
- var EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = featureValue(FEATURES.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS);
29736
- _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = EMBER_DYNAMIC_HELPERS_AND_MODIFIERS;
29737
29132
  var EMBER_ROUTING_ROUTER_SERVICE_REFRESH = featureValue(FEATURES.EMBER_ROUTING_ROUTER_SERVICE_REFRESH);
29738
29133
  _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = EMBER_ROUTING_ROUTER_SERVICE_REFRESH;
29739
29134
  var EMBER_CACHED = featureValue(FEATURES.EMBER_CACHED);
29740
29135
  _exports.EMBER_CACHED = EMBER_CACHED;
29136
+ var EMBER_UNIQUE_ID_HELPER = featureValue(FEATURES.EMBER_UNIQUE_ID_HELPER);
29137
+ _exports.EMBER_UNIQUE_ID_HELPER = EMBER_UNIQUE_ID_HELPER;
29741
29138
  });
29742
29139
  define("@ember/component/helper", ["exports", "@ember/-internals/glimmer"], function (_exports, _glimmer) {
29743
29140
  "use strict";
@@ -30254,7 +29651,7 @@ define("@ember/debug/index", ["exports", "@ember/-internals/browser-environment"
30254
29651
  && !(0, _testing.isTesting)()) {
30255
29652
  if (typeof window !== 'undefined' && (_browserEnvironment.isFirefox || _browserEnvironment.isChrome) && window.addEventListener) {
30256
29653
  window.addEventListener('load', () => {
30257
- if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {
29654
+ if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset['emberExtension']) {
30258
29655
  var downloadURL;
30259
29656
 
30260
29657
  if (_browserEnvironment.isChrome) {
@@ -30295,6 +29692,8 @@ define("@ember/debug/lib/capture-render-tree", ["exports", "@glimmer/util"], fun
30295
29692
  @since 3.14.0
30296
29693
  */
30297
29694
  function captureRenderTree(app) {
29695
+ // SAFETY: Ideally we'd assert here but that causes awkward circular requires since this is also in @ember/debug.
29696
+ // This is only for debug stuff so not very risky.
30298
29697
  var renderer = (0, _util.expect)(app.lookup('renderer:-dom'), `BUG: owner is missing renderer`);
30299
29698
  return renderer.debugRenderTree.capture();
30300
29699
  }
@@ -30498,7 +29897,7 @@ define("@ember/debug/lib/handlers", ["exports"], function (_exports) {
30498
29897
  var HANDLERS = {};
30499
29898
  _exports.HANDLERS = HANDLERS;
30500
29899
 
30501
- var registerHandler = () => {};
29900
+ var registerHandler = function registerHandler(_type, _callback) {};
30502
29901
 
30503
29902
  _exports.registerHandler = registerHandler;
30504
29903
 
@@ -34689,6 +34088,19 @@ define("@ember/polyfills/lib/assign", ["exports", "@ember/debug"], function (_ex
34689
34088
  return Object.assign(target, ...rest);
34690
34089
  }
34691
34090
  });
34091
+ define("@ember/renderer/index", ["exports", "@ember/-internals/glimmer"], function (_exports, _glimmer) {
34092
+ "use strict";
34093
+
34094
+ Object.defineProperty(_exports, "__esModule", {
34095
+ value: true
34096
+ });
34097
+ Object.defineProperty(_exports, "renderSettled", {
34098
+ enumerable: true,
34099
+ get: function () {
34100
+ return _glimmer.renderSettled;
34101
+ }
34102
+ });
34103
+ });
34692
34104
  define("@ember/routing/auto-location", ["exports", "@ember/-internals/routing"], function (_exports, _routing) {
34693
34105
  "use strict";
34694
34106
 
@@ -34818,7 +34230,7 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
34818
34230
  _exports._hasScheduledTimers = _hasScheduledTimers;
34819
34231
  _exports._rsvpErrorQueue = _exports._queues = void 0;
34820
34232
  _exports.begin = begin;
34821
- _exports.bind = void 0;
34233
+ _exports.bind = bind;
34822
34234
  _exports.cancel = cancel;
34823
34235
  _exports.debounce = debounce;
34824
34236
  _exports.end = end;
@@ -34840,7 +34252,7 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
34840
34252
  currentRunLoop = current;
34841
34253
  }
34842
34254
 
34843
- function onEnd(current, next) {
34255
+ function onEnd(_current, next) {
34844
34256
  currentRunLoop = next;
34845
34257
  (0, _metal.flushAsyncObservers)();
34846
34258
  }
@@ -34883,164 +34295,25 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
34883
34295
  onErrorMethod: 'onerror',
34884
34296
  flush
34885
34297
  });
34886
- /**
34887
- @module @ember/runloop
34888
- */
34889
- // ..........................................................
34890
- // run - this is ideally the only public API the dev sees
34891
- //
34892
-
34893
- /**
34894
- Runs the passed target and method inside of a RunLoop, ensuring any
34895
- deferred actions including bindings and views updates are flushed at the
34896
- end.
34897
-
34898
- Normally you should not need to invoke this method yourself. However if
34899
- you are implementing raw event handlers when interfacing with other
34900
- libraries or plugins, you should probably wrap all of your code inside this
34901
- call.
34902
-
34903
- ```javascript
34904
- import { run } from '@ember/runloop';
34905
-
34906
- run(function() {
34907
- // code to be executed within a RunLoop
34908
- });
34909
- ```
34910
- @method run
34911
- @for @ember/runloop
34912
- @static
34913
- @param {Object} [target] target of method to call
34914
- @param {Function|String} method Method to invoke.
34915
- May be a function or a string. If you pass a string
34916
- then it will be looked up on the passed target.
34917
- @param {Object} [args*] Any additional arguments you wish to pass to the method.
34918
- @return {Object} return value from invoking the passed function.
34919
- @public
34920
- */
34921
-
34922
34298
 
34923
34299
  _exports._backburner = _backburner;
34924
34300
 
34925
34301
  function run() {
34302
+ // @ts-expect-error TS doesn't like our spread args
34926
34303
  return _backburner.run(...arguments);
34927
34304
  }
34928
- /**
34929
- If no run-loop is present, it creates a new one. If a run loop is
34930
- present it will queue itself to run on the existing run-loops action
34931
- queue.
34932
-
34933
- Please note: This is not for normal usage, and should be used sparingly.
34934
-
34935
- If invoked when not within a run loop:
34936
-
34937
- ```javascript
34938
- import { join } from '@ember/runloop';
34939
-
34940
- join(function() {
34941
- // creates a new run-loop
34942
- });
34943
- ```
34944
-
34945
- Alternatively, if called within an existing run loop:
34946
-
34947
- ```javascript
34948
- import { run, join } from '@ember/runloop';
34949
-
34950
- run(function() {
34951
- // creates a new run-loop
34952
-
34953
- join(function() {
34954
- // joins with the existing run-loop, and queues for invocation on
34955
- // the existing run-loops action queue.
34956
- });
34957
- });
34958
- ```
34959
-
34960
- @method join
34961
- @static
34962
- @for @ember/runloop
34963
- @param {Object} [target] target of method to call
34964
- @param {Function|String} method Method to invoke.
34965
- May be a function or a string. If you pass a string
34966
- then it will be looked up on the passed target.
34967
- @param {Object} [args*] Any additional arguments you wish to pass to the method.
34968
- @return {Object} Return value from invoking the passed function. Please note,
34969
- when called within an existing loop, no return value is possible.
34970
- @public
34971
- */
34972
34305
 
34306
+ function join(methodOrTarget, methodOrArg) {
34307
+ for (var _len = arguments.length, additionalArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
34308
+ additionalArgs[_key - 2] = arguments[_key];
34309
+ }
34973
34310
 
34974
- function join() {
34975
- return _backburner.join(...arguments);
34311
+ return _backburner.join(methodOrTarget, methodOrArg, ...additionalArgs);
34976
34312
  }
34977
- /**
34978
- Allows you to specify which context to call the specified function in while
34979
- adding the execution of that function to the Ember run loop. This ability
34980
- makes this method a great way to asynchronously integrate third-party libraries
34981
- into your Ember application.
34982
-
34983
- `bind` takes two main arguments, the desired context and the function to
34984
- invoke in that context. Any additional arguments will be supplied as arguments
34985
- to the function that is passed in.
34986
-
34987
- Let's use the creation of a TinyMCE component as an example. Currently,
34988
- TinyMCE provides a setup configuration option we can use to do some processing
34989
- after the TinyMCE instance is initialized but before it is actually rendered.
34990
- We can use that setup option to do some additional setup for our component.
34991
- The component itself could look something like the following:
34992
-
34993
- ```app/components/rich-text-editor.js
34994
- import Component from '@ember/component';
34995
- import { on } from '@ember/object/evented';
34996
- import { bind } from '@ember/runloop';
34997
-
34998
- export default Component.extend({
34999
- initializeTinyMCE: on('didInsertElement', function() {
35000
- tinymce.init({
35001
- selector: '#' + this.$().prop('id'),
35002
- setup: bind(this, this.setupEditor)
35003
- });
35004
- }),
35005
-
35006
- didInsertElement() {
35007
- tinymce.init({
35008
- selector: '#' + this.$().prop('id'),
35009
- setup: bind(this, this.setupEditor)
35010
- });
35011
- }
35012
-
35013
- setupEditor(editor) {
35014
- this.set('editor', editor);
35015
-
35016
- editor.on('change', function() {
35017
- console.log('content changed!');
35018
- });
35019
- }
35020
- });
35021
- ```
35022
-
35023
- In this example, we use `bind` to bind the setupEditor method to the
35024
- context of the RichTextEditor component and to have the invocation of that
35025
- method be safely handled and executed by the Ember run loop.
35026
-
35027
- @method bind
35028
- @static
35029
- @for @ember/runloop
35030
- @param {Object} [target] target of method to call
35031
- @param {Function|String} method Method to invoke.
35032
- May be a function or a string. If you pass a string
35033
- then it will be looked up on the passed target.
35034
- @param {Object} [args*] Any additional arguments you wish to pass to the method.
35035
- @return {Function} returns a new function that will always have a particular context
35036
- @since 1.4.0
35037
- @public
35038
- */
35039
34313
 
35040
-
35041
- var bind = function () {
35042
- for (var _len = arguments.length, curried = new Array(_len), _key = 0; _key < _len; _key++) {
35043
- curried[_key] = arguments[_key];
34314
+ function bind() {
34315
+ for (var _len2 = arguments.length, curried = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
34316
+ curried[_key2] = arguments[_key2];
35044
34317
  }
35045
34318
 
35046
34319
  (true && !(function (methodOrTarget, methodOrArg) {
@@ -35053,12 +34326,12 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35053
34326
  } else if (length === 1) {
35054
34327
  return typeof methodOrTarget === 'function';
35055
34328
  } else {
35056
- var type = typeof methodOrArg;
35057
- return type === 'function' || // second argument is a function
35058
- methodOrTarget !== null && type === 'string' && methodOrArg in methodOrTarget || // second argument is the name of a method in first argument
34329
+ return typeof methodOrArg === 'function' || // second argument is a function
34330
+ methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget || // second argument is the name of a method in first argument
35059
34331
  typeof methodOrTarget === 'function' //first argument is a function
35060
34332
  ;
35061
- }
34333
+ } // @ts-expect-error TS doesn't like our spread args
34334
+
35062
34335
  }(...curried)) && (0, _debug.assert)('could not find a suitable method to bind', function (methodOrTarget, methodOrArg) {
35063
34336
  var length = arguments.length;
35064
34337
 
@@ -35067,18 +34340,18 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35067
34340
  } else if (length === 1) {
35068
34341
  return typeof methodOrTarget === 'function';
35069
34342
  } else {
35070
- var type = typeof methodOrArg;
35071
- return type === 'function' || methodOrTarget !== null && type === 'string' && methodOrArg in methodOrTarget || typeof methodOrTarget === 'function';
34343
+ return typeof methodOrArg === 'function' || methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget || typeof methodOrTarget === 'function';
35072
34344
  }
35073
- }(...curried)));
34345
+ }(...curried))); // @ts-expect-error TS doesn't like our spread args
34346
+
35074
34347
  return function () {
35075
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
35076
- args[_key2] = arguments[_key2];
34348
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
34349
+ args[_key3] = arguments[_key3];
35077
34350
  }
35078
34351
 
35079
34352
  return join(...curried.concat(args));
35080
34353
  };
35081
- };
34354
+ }
35082
34355
  /**
35083
34356
  Begins a new RunLoop. Any deferred actions invoked after the begin will
35084
34357
  be buffered until you invoke a matching call to `end()`. This is
@@ -35100,8 +34373,6 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35100
34373
  */
35101
34374
 
35102
34375
 
35103
- _exports.bind = bind;
35104
-
35105
34376
  function begin() {
35106
34377
  _backburner.begin();
35107
34378
  }
@@ -35129,52 +34400,9 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35129
34400
  function end() {
35130
34401
  _backburner.end();
35131
34402
  }
35132
- /**
35133
- Adds the passed target/method and any optional arguments to the named
35134
- queue to be executed at the end of the RunLoop. If you have not already
35135
- started a RunLoop when calling this method one will be started for you
35136
- automatically.
35137
-
35138
- At the end of a RunLoop, any methods scheduled in this way will be invoked.
35139
- Methods will be invoked in an order matching the named queues defined in
35140
- the `queues` property.
35141
-
35142
- ```javascript
35143
- import { schedule } from '@ember/runloop';
35144
-
35145
- schedule('afterRender', this, function() {
35146
- // this will be executed in the 'afterRender' queue
35147
- console.log('scheduled on afterRender queue');
35148
- });
35149
-
35150
- schedule('actions', this, function() {
35151
- // this will be executed in the 'actions' queue
35152
- console.log('scheduled on actions queue');
35153
- });
35154
-
35155
- // Note the functions will be run in order based on the run queues order.
35156
- // Output would be:
35157
- // scheduled on actions queue
35158
- // scheduled on afterRender queue
35159
- ```
35160
-
35161
- @method schedule
35162
- @static
35163
- @for @ember/runloop
35164
- @param {String} queue The name of the queue to schedule against. Default queues is 'actions'
35165
- @param {Object} [target] target object to use as the context when invoking a method.
35166
- @param {String|Function} method The method to invoke. If you pass a string it
35167
- will be resolved on the target object at the time the scheduled item is
35168
- invoked allowing you to change the target function.
35169
- @param {Object} [arguments*] Optional arguments to be passed to the queued method.
35170
- @return {*} Timer information for use in canceling, see `cancel`.
35171
- @public
35172
- */
35173
34403
 
35174
-
35175
- function
35176
- /* queue, target, method */
35177
- schedule() {
34404
+ function schedule() {
34405
+ // @ts-expect-error TS doesn't like the rest args here
35178
34406
  return _backburner.schedule(...arguments);
35179
34407
  } // Used by global test teardown
35180
34408
 
@@ -35187,226 +34415,31 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35187
34415
  function _cancelTimers() {
35188
34416
  _backburner.cancelTimers();
35189
34417
  }
35190
- /**
35191
- Invokes the passed target/method and optional arguments after a specified
35192
- period of time. The last parameter of this method must always be a number
35193
- of milliseconds.
35194
-
35195
- You should use this method whenever you need to run some action after a
35196
- period of time instead of using `setTimeout()`. This method will ensure that
35197
- items that expire during the same script execution cycle all execute
35198
- together, which is often more efficient than using a real setTimeout.
35199
-
35200
- ```javascript
35201
- import { later } from '@ember/runloop';
35202
-
35203
- later(myContext, function() {
35204
- // code here will execute within a RunLoop in about 500ms with this == myContext
35205
- }, 500);
35206
- ```
35207
-
35208
- @method later
35209
- @static
35210
- @for @ember/runloop
35211
- @param {Object} [target] target of method to invoke
35212
- @param {Function|String} method The method to invoke.
35213
- If you pass a string it will be resolved on the
35214
- target at the time the method is invoked.
35215
- @param {Object} [args*] Optional arguments to pass to the timeout.
35216
- @param {Number} wait Number of milliseconds to wait.
35217
- @return {*} Timer information for use in canceling, see `cancel`.
35218
- @public
35219
- */
35220
34418
 
35221
-
35222
- function
35223
- /*target, method*/
35224
- later() {
34419
+ function later() {
35225
34420
  return _backburner.later(...arguments);
35226
34421
  }
35227
- /**
35228
- Schedule a function to run one time during the current RunLoop. This is equivalent
35229
- to calling `scheduleOnce` with the "actions" queue.
35230
-
35231
- @method once
35232
- @static
35233
- @for @ember/runloop
35234
- @param {Object} [target] The target of the method to invoke.
35235
- @param {Function|String} method The method to invoke.
35236
- If you pass a string it will be resolved on the
35237
- target at the time the method is invoked.
35238
- @param {Object} [args*] Optional arguments to pass to the timeout.
35239
- @return {Object} Timer information for use in canceling, see `cancel`.
35240
- @public
35241
- */
35242
-
35243
34422
 
35244
34423
  function once() {
35245
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
35246
- args[_key3] = arguments[_key3];
34424
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
34425
+ args[_key4] = arguments[_key4];
35247
34426
  }
35248
34427
 
35249
- args.unshift('actions');
35250
- return _backburner.scheduleOnce(...args);
34428
+ // @ts-expect-error TS doesn't like the rest args here
34429
+ return _backburner.scheduleOnce('actions', ...args);
35251
34430
  }
35252
- /**
35253
- Schedules a function to run one time in a given queue of the current RunLoop.
35254
- Calling this method with the same queue/target/method combination will have
35255
- no effect (past the initial call).
35256
-
35257
- Note that although you can pass optional arguments these will not be
35258
- considered when looking for duplicates. New arguments will replace previous
35259
- calls.
35260
-
35261
- ```javascript
35262
- import { run, scheduleOnce } from '@ember/runloop';
35263
-
35264
- function sayHi() {
35265
- console.log('hi');
35266
- }
35267
-
35268
- run(function() {
35269
- scheduleOnce('afterRender', myContext, sayHi);
35270
- scheduleOnce('afterRender', myContext, sayHi);
35271
- // sayHi will only be executed once, in the afterRender queue of the RunLoop
35272
- });
35273
- ```
35274
-
35275
- Also note that for `scheduleOnce` to prevent additional calls, you need to
35276
- pass the same function instance. The following case works as expected:
35277
-
35278
- ```javascript
35279
- function log() {
35280
- console.log('Logging only once');
35281
- }
35282
-
35283
- function scheduleIt() {
35284
- scheduleOnce('actions', myContext, log);
35285
- }
35286
-
35287
- scheduleIt();
35288
- scheduleIt();
35289
- ```
35290
-
35291
- But this other case will schedule the function multiple times:
35292
-
35293
- ```javascript
35294
- import { scheduleOnce } from '@ember/runloop';
35295
-
35296
- function scheduleIt() {
35297
- scheduleOnce('actions', myContext, function() {
35298
- console.log('Closure');
35299
- });
35300
- }
35301
-
35302
- scheduleIt();
35303
- scheduleIt();
35304
-
35305
- // "Closure" will print twice, even though we're using `scheduleOnce`,
35306
- // because the function we pass to it won't match the
35307
- // previously scheduled operation.
35308
- ```
35309
-
35310
- Available queues, and their order, can be found at `queues`
35311
-
35312
- @method scheduleOnce
35313
- @static
35314
- @for @ember/runloop
35315
- @param {String} [queue] The name of the queue to schedule against. Default queues is 'actions'.
35316
- @param {Object} [target] The target of the method to invoke.
35317
- @param {Function|String} method The method to invoke.
35318
- If you pass a string it will be resolved on the
35319
- target at the time the method is invoked.
35320
- @param {Object} [args*] Optional arguments to pass to the timeout.
35321
- @return {Object} Timer information for use in canceling, see `cancel`.
35322
- @public
35323
- */
35324
34431
 
35325
-
35326
- function
35327
- /* queue, target, method*/
35328
- scheduleOnce() {
34432
+ function scheduleOnce() {
34433
+ // @ts-expect-error TS doesn't like the rest args here
35329
34434
  return _backburner.scheduleOnce(...arguments);
35330
34435
  }
35331
- /**
35332
- Schedules an item to run from within a separate run loop, after
35333
- control has been returned to the system. This is equivalent to calling
35334
- `later` with a wait time of 1ms.
35335
-
35336
- ```javascript
35337
- import { next } from '@ember/runloop';
35338
-
35339
- next(myContext, function() {
35340
- // code to be executed in the next run loop,
35341
- // which will be scheduled after the current one
35342
- });
35343
- ```
35344
-
35345
- Multiple operations scheduled with `next` will coalesce
35346
- into the same later run loop, along with any other operations
35347
- scheduled by `later` that expire right around the same
35348
- time that `next` operations will fire.
35349
-
35350
- Note that there are often alternatives to using `next`.
35351
- For instance, if you'd like to schedule an operation to happen
35352
- after all DOM element operations have completed within the current
35353
- run loop, you can make use of the `afterRender` run loop queue (added
35354
- by the `ember-views` package, along with the preceding `render` queue
35355
- where all the DOM element operations happen).
35356
-
35357
- Example:
35358
-
35359
- ```app/components/my-component.js
35360
- import Component from '@ember/component';
35361
- import { scheduleOnce } from '@ember/runloop';
35362
-
35363
- export Component.extend({
35364
- didInsertElement() {
35365
- this._super(...arguments);
35366
- scheduleOnce('afterRender', this, 'processChildElements');
35367
- },
35368
-
35369
- processChildElements() {
35370
- // ... do something with component's child component
35371
- // elements after they've finished rendering, which
35372
- // can't be done within this component's
35373
- // `didInsertElement` hook because that gets run
35374
- // before the child elements have been added to the DOM.
35375
- }
35376
- });
35377
- ```
35378
-
35379
- One benefit of the above approach compared to using `next` is
35380
- that you will be able to perform DOM/CSS operations before unprocessed
35381
- elements are rendered to the screen, which may prevent flickering or
35382
- other artifacts caused by delaying processing until after rendering.
35383
-
35384
- The other major benefit to the above approach is that `next`
35385
- introduces an element of non-determinism, which can make things much
35386
- harder to test, due to its reliance on `setTimeout`; it's much harder
35387
- to guarantee the order of scheduled operations when they are scheduled
35388
- outside of the current run loop, i.e. with `next`.
35389
-
35390
- @method next
35391
- @static
35392
- @for @ember/runloop
35393
- @param {Object} [target] target of method to invoke
35394
- @param {Function|String} method The method to invoke.
35395
- If you pass a string it will be resolved on the
35396
- target at the time the method is invoked.
35397
- @param {Object} [args*] Optional arguments to pass to the timeout.
35398
- @return {Object} Timer information for use in canceling, see `cancel`.
35399
- @public
35400
- */
35401
-
35402
34436
 
35403
34437
  function next() {
35404
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
35405
- args[_key4] = arguments[_key4];
34438
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
34439
+ args[_key5] = arguments[_key5];
35406
34440
  }
35407
34441
 
35408
- args.push(1);
35409
- return _backburner.later(...args);
34442
+ return _backburner.later(...args, 1);
35410
34443
  }
35411
34444
  /**
35412
34445
  Cancels a scheduled item. Must be a value returned by `later()`,
@@ -35480,133 +34513,523 @@ define("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
35480
34513
  function cancel(timer) {
35481
34514
  return _backburner.cancel(timer);
35482
34515
  }
35483
- /**
35484
- Delay calling the target method until the debounce period has elapsed
35485
- with no additional debounce calls. If `debounce` is called again before
35486
- the specified time has elapsed, the timer is reset and the entire period
35487
- must pass again before the target method is called.
35488
-
35489
- This method should be used when an event may be called multiple times
35490
- but the action should only be called once when the event is done firing.
35491
- A common example is for scroll events where you only want updates to
35492
- happen once scrolling has ceased.
35493
-
35494
- ```javascript
35495
- import { debounce } from '@ember/runloop';
35496
-
35497
- function whoRan() {
35498
- console.log(this.name + ' ran.');
34516
+
34517
+ function debounce() {
34518
+ // @ts-expect-error TS doesn't like the rest args here
34519
+ return _backburner.debounce(...arguments);
34520
+ }
34521
+
34522
+ function throttle() {
34523
+ // @ts-expect-error TS doesn't like the rest args here
34524
+ return _backburner.throttle(...arguments);
34525
+ }
34526
+ });
34527
+ define("@ember/runloop/type-tests.ts/begin-end.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34528
+ "use strict";
34529
+
34530
+ (0, _expectType.expectTypeOf)((0, _runloop.begin)()).toEqualTypeOf(); // code to be executed within a RunLoop
34531
+
34532
+ (0, _expectType.expectTypeOf)((0, _runloop.end)()).toEqualTypeOf();
34533
+ });
34534
+ define("@ember/runloop/type-tests.ts/bind.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34535
+ "use strict";
34536
+
34537
+ class Foo {
34538
+ test(_foo, _bar, _baz) {
34539
+ return 1;
35499
34540
  }
35500
-
35501
- let myContext = { name: 'debounce' };
35502
-
35503
- debounce(myContext, whoRan, 150);
35504
-
35505
- // less than 150ms passes
35506
- debounce(myContext, whoRan, 150);
35507
-
35508
- // 150ms passes
35509
- // whoRan is invoked with context myContext
35510
- // console logs 'debounce ran.' one time.
35511
- ```
35512
-
35513
- Immediate allows you to run the function immediately, but debounce
35514
- other calls for this function until the wait time has elapsed. If
35515
- `debounce` is called again before the specified time has elapsed,
35516
- the timer is reset and the entire period must pass again before
35517
- the method can be called again.
35518
-
35519
- ```javascript
35520
- import { debounce } from '@ember/runloop';
35521
-
35522
- function whoRan() {
35523
- console.log(this.name + ' ran.');
34541
+
34542
+ }
34543
+
34544
+ var foo = new Foo(); // With only function
34545
+
34546
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
34547
+ return 1;
34548
+ })).toEqualTypeOf();
34549
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
34550
+ return 1;
34551
+ }, 1)).toEqualTypeOf();
34552
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
34553
+ return 1;
34554
+ }, 1, true)).toEqualTypeOf();
34555
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
34556
+ return 1;
34557
+ }, 1, true, 'baz')).toEqualTypeOf();
34558
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)((_foo, _bar, _baz) => {
34559
+ return 1;
34560
+ }, 1, true, undefined)).toEqualTypeOf();
34561
+ (0, _runloop.bind)(_foo => {
34562
+ return 1; // @ts-expect-error invalid argument
34563
+ }, 'string'); // With target and function
34564
+
34565
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
34566
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34567
+ return 1;
34568
+ })).toEqualTypeOf();
34569
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
34570
+ return 1;
34571
+ }, 1)).toEqualTypeOf();
34572
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
34573
+ return 1;
34574
+ }, 1, true)).toEqualTypeOf();
34575
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
34576
+ return 1;
34577
+ }, 1, true, 'baz')).toEqualTypeOf();
34578
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, function (_foo, _bar, _baz) {
34579
+ return 1;
34580
+ }, 1, true, undefined)).toEqualTypeOf(); // @ts-expect-error Invalid args
34581
+
34582
+ (0, _runloop.bind)(foo, function (_foo) {
34583
+ return 1;
34584
+ }, 'string'); // With function string reference
34585
+
34586
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test')).toEqualTypeOf();
34587
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1)).toEqualTypeOf();
34588
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true)).toEqualTypeOf();
34589
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true, 'baz')).toEqualTypeOf();
34590
+ (0, _expectType.expectTypeOf)((0, _runloop.bind)(foo, 'test', 1, true, undefined)).toEqualTypeOf(); // @ts-expect-error Invalid args
34591
+
34592
+ (0, _runloop.bind)(foo, 'test', 'string');
34593
+ });
34594
+ define("@ember/runloop/type-tests.ts/cancel.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34595
+ "use strict";
34596
+
34597
+ var runNext = (0, _runloop.next)(null, () => {// will not be executed
34598
+ });
34599
+ (0, _expectType.expectTypeOf)((0, _runloop.cancel)(runNext)).toEqualTypeOf();
34600
+ });
34601
+ define("@ember/runloop/type-tests.ts/debounce.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34602
+ "use strict";
34603
+
34604
+ // From Docs
34605
+ function whoRan() {// Do stuff
34606
+ }
34607
+
34608
+ var myContext = {
34609
+ name: 'debounce',
34610
+
34611
+ test(_foo, _baz) {}
34612
+
34613
+ };
34614
+ (0, _runloop.debounce)(myContext, whoRan, 150); // less than 150ms passes
34615
+
34616
+ (0, _runloop.debounce)(myContext, whoRan, 150);
34617
+ (0, _runloop.debounce)(myContext, whoRan, 150, true); // console logs 'debounce ran.' one time immediately.
34618
+ // 100ms passes
34619
+
34620
+ (0, _runloop.debounce)(myContext, whoRan, 150, true); // 150ms passes and nothing else is logged to the console and
34621
+ // the debouncee is no longer being watched
34622
+
34623
+ (0, _runloop.debounce)(myContext, whoRan, 150, true); // console logs 'debounce ran.' one time immediately.
34624
+ // 150ms passes and nothing else is logged to the console and
34625
+ // the debouncee is no longer being watched
34626
+ // Method only
34627
+
34628
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _baz) => {}, 1, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Requires wait
34629
+
34630
+ (0, _runloop.debounce)((_foo, _baz) => {}, 1, true); // @ts-expect-error Requires all args
34631
+
34632
+ (0, _runloop.debounce)((_foo, _baz) => {}, 1, 1); // Can set immediate
34633
+
34634
+ (0, _runloop.debounce)((_foo, _baz) => {}, 1, true, 1, true); // With target
34635
+
34636
+ (0, _runloop.debounce)(myContext, function (_foo, _baz) {
34637
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf(myContext);
34638
+ }, 1, true, 1, true); // With key
34639
+
34640
+ (0, _runloop.debounce)(myContext, 'test', 1, true, 1, true); // @ts-expect-error invalid key
34641
+
34642
+ (0, _runloop.debounce)(myContext, 'invalid');
34643
+
34644
+ class Foo {
34645
+ test(_foo, _bar, _baz) {
34646
+ return 1;
35524
34647
  }
35525
-
35526
- let myContext = { name: 'debounce' };
35527
-
35528
- debounce(myContext, whoRan, 150, true);
35529
-
35530
- // console logs 'debounce ran.' one time immediately.
35531
- // 100ms passes
35532
- debounce(myContext, whoRan, 150, true);
35533
-
35534
- // 150ms passes and nothing else is logged to the console and
35535
- // the debouncee is no longer being watched
35536
- debounce(myContext, whoRan, 150, true);
35537
-
35538
- // console logs 'debounce ran.' one time immediately.
35539
- // 150ms passes and nothing else is logged to the console and
35540
- // the debouncee is no longer being watched
35541
- ```
35542
-
35543
- @method debounce
35544
- @static
35545
- @for @ember/runloop
35546
- @param {Object} [target] target of method to invoke
35547
- @param {Function|String} method The method to invoke.
35548
- May be a function or a string. If you pass a string
35549
- then it will be looked up on the passed target.
35550
- @param {Object} [args*] Optional arguments to pass to the timeout.
35551
- @param {Number} wait Number of milliseconds to wait.
35552
- @param {Boolean} immediate Trigger the function on the leading instead
35553
- of the trailing edge of the wait interval. Defaults to false.
35554
- @return {Array} Timer information for use in canceling, see `cancel`.
35555
- @public
35556
- */
35557
34648
 
34649
+ }
34650
+
34651
+ var foo = new Foo(); // With only function
34652
+
34653
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _bar, _baz) => {
34654
+ return 1;
34655
+ }, 1, true, undefined, 1)).toEqualTypeOf();
34656
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)((_foo, _bar, _baz) => {
34657
+ return 1;
34658
+ }, 1, true, 'string', 1)).toEqualTypeOf();
34659
+ (0, _runloop.debounce)(_foo => {
34660
+ return 1; // @ts-expect-error invalid argument
34661
+ }, 'string'); // With target and function
34662
+
34663
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
34664
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34665
+ return 1;
34666
+ }, 1, true, undefined, 1)).toEqualTypeOf();
34667
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
34668
+ return 1;
34669
+ }, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
34670
+
34671
+ (0, _runloop.debounce)(foo, function (_foo, _bar, _baz) {
34672
+ return 1;
34673
+ }, 1, 'string', true, 1); // With function string reference
34674
+
34675
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
34676
+ (0, _expectType.expectTypeOf)((0, _runloop.debounce)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
34677
+
34678
+ (0, _runloop.debounce)(foo, 'test', 'string');
34679
+ });
34680
+ define("@ember/runloop/type-tests.ts/join.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34681
+ "use strict";
34682
+
34683
+ class Foo {
34684
+ test(_foo, _bar, _baz) {
34685
+ return 1;
34686
+ }
35558
34687
 
35559
- function debounce() {
35560
- return _backburner.debounce(...arguments);
35561
34688
  }
35562
- /**
35563
- Ensure that the target method is never called more frequently than
35564
- the specified spacing period. The target method is called immediately.
35565
-
35566
- ```javascript
35567
- import { throttle } from '@ember/runloop';
35568
-
35569
- function whoRan() {
35570
- console.log(this.name + ' ran.');
34689
+
34690
+ var foo = new Foo(); // With only function
34691
+
34692
+ (0, _expectType.expectTypeOf)((0, _runloop.join)((_foo, _bar, _baz) => {
34693
+ return 1;
34694
+ }, 1, true)).toEqualTypeOf();
34695
+ (0, _expectType.expectTypeOf)((0, _runloop.join)((_foo, _bar, _baz) => {
34696
+ return 1;
34697
+ }, 1, true, 'string')).toEqualTypeOf();
34698
+ (0, _runloop.join)(_foo => {
34699
+ return 1; // @ts-expect-error invalid argument
34700
+ }, 'string'); // With target and function
34701
+
34702
+ (0, _expectType.expectTypeOf)((0, _runloop.join)(foo, function (_foo, _bar, _baz) {
34703
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34704
+ return 1;
34705
+ }, 1, true)).toEqualTypeOf();
34706
+ (0, _expectType.expectTypeOf)((0, _runloop.join)(foo, function (_foo, _bar, _baz) {
34707
+ return 1;
34708
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34709
+
34710
+ (0, _runloop.join)(foo, function (_foo, _bar, _baz) {
34711
+ return 1;
34712
+ }, 1, 'string'); // With function string reference
34713
+
34714
+ (0, _expectType.expectTypeOf)((0, _runloop.join)(foo, 'test', 1, true)).toEqualTypeOf();
34715
+ (0, _expectType.expectTypeOf)((0, _runloop.join)(foo, 'test', 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error Invalid args
34716
+
34717
+ (0, _runloop.join)(foo, 'test', 'string');
34718
+ });
34719
+ define("@ember/runloop/type-tests.ts/later.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34720
+ "use strict";
34721
+
34722
+ class Foo {
34723
+ test(_foo, _bar, _baz) {
34724
+ return 1;
35571
34725
  }
35572
-
35573
- let myContext = { name: 'throttle' };
35574
-
35575
- throttle(myContext, whoRan, 150);
35576
- // whoRan is invoked with context myContext
35577
- // console logs 'throttle ran.'
35578
-
35579
- // 50ms passes
35580
- throttle(myContext, whoRan, 150);
35581
-
35582
- // 50ms passes
35583
- throttle(myContext, whoRan, 150);
35584
-
35585
- // 150ms passes
35586
- throttle(myContext, whoRan, 150);
35587
- // whoRan is invoked with context myContext
35588
- // console logs 'throttle ran.'
35589
- ```
35590
-
35591
- @method throttle
35592
- @static
35593
- @for @ember/runloop
35594
- @param {Object} [target] target of method to invoke
35595
- @param {Function|String} method The method to invoke.
35596
- May be a function or a string. If you pass a string
35597
- then it will be looked up on the passed target.
35598
- @param {Object} [args*] Optional arguments to pass to the timeout.
35599
- @param {Number} spacing Number of milliseconds to space out requests.
35600
- @param {Boolean} immediate Trigger the function on the leading instead
35601
- of the trailing edge of the wait interval. Defaults to true.
35602
- @return {Array} Timer information for use in canceling, see `cancel`.
35603
- @public
35604
- */
35605
34726
 
34727
+ }
34728
+
34729
+ var foo = new Foo(); // With only function
34730
+
34731
+ (0, _expectType.expectTypeOf)((0, _runloop.later)((_foo, _bar, _baz) => {
34732
+ return 1;
34733
+ }, 1, true, undefined, 1)).toEqualTypeOf();
34734
+ (0, _expectType.expectTypeOf)((0, _runloop.later)((_foo, _bar, _baz) => {
34735
+ return 1;
34736
+ }, 1, true, 'string', 1)).toEqualTypeOf();
34737
+ (0, _runloop.later)(_foo => {
34738
+ return 1; // @ts-expect-error invalid argument
34739
+ }, 'string'); // With target and function
34740
+
34741
+ (0, _expectType.expectTypeOf)((0, _runloop.later)(foo, function (_foo, _bar, _baz) {
34742
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34743
+ return 1;
34744
+ }, 1, true, undefined, 1)).toEqualTypeOf();
34745
+ (0, _expectType.expectTypeOf)((0, _runloop.later)(foo, function (_foo, _bar, _baz) {
34746
+ return 1;
34747
+ }, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
34748
+
34749
+ (0, _runloop.later)(foo, function (_foo, _bar, _baz) {
34750
+ return 1;
34751
+ }, 1, 'string', true, 1); // With function string reference
34752
+
34753
+ (0, _expectType.expectTypeOf)((0, _runloop.later)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
34754
+ (0, _expectType.expectTypeOf)((0, _runloop.later)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
34755
+
34756
+ (0, _runloop.later)(foo, 'test', 'string');
34757
+ });
34758
+ define("@ember/runloop/type-tests.ts/next.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34759
+ "use strict";
34760
+
34761
+ class Foo {
34762
+ test(_foo, _bar, _baz) {
34763
+ return 1;
34764
+ }
35606
34765
 
35607
- function throttle() {
35608
- return _backburner.throttle(...arguments);
35609
34766
  }
34767
+
34768
+ var foo = new Foo(); // With only function
34769
+
34770
+ (0, _expectType.expectTypeOf)((0, _runloop.next)((_foo, _bar, _baz) => {
34771
+ return 1;
34772
+ }, 1, true, undefined)).toEqualTypeOf();
34773
+ (0, _expectType.expectTypeOf)((0, _runloop.next)((_foo, _bar, _baz) => {
34774
+ return 1;
34775
+ }, 1, true, 'string')).toEqualTypeOf();
34776
+ (0, _runloop.next)(_foo => {
34777
+ return 1; // @ts-expect-error invalid argument
34778
+ }, 'string'); // With target and function
34779
+
34780
+ (0, _expectType.expectTypeOf)((0, _runloop.next)(foo, function (_foo, _bar, _baz) {
34781
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34782
+ return 1;
34783
+ }, 1, true)).toEqualTypeOf();
34784
+ (0, _expectType.expectTypeOf)((0, _runloop.next)(foo, function (_foo, _bar, _baz) {
34785
+ return 1;
34786
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34787
+
34788
+ (0, _runloop.next)(foo, function (_foo, _bar, _baz) {
34789
+ return 1;
34790
+ }, 1, 'string', true); // With function string reference
34791
+
34792
+ (0, _expectType.expectTypeOf)((0, _runloop.next)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
34793
+ (0, _expectType.expectTypeOf)((0, _runloop.next)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
34794
+
34795
+ (0, _runloop.next)(foo, 'test', 'string');
34796
+ });
34797
+ define("@ember/runloop/type-tests.ts/once.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34798
+ "use strict";
34799
+
34800
+ class Foo {
34801
+ test(_foo, _bar, _baz) {
34802
+ return 1;
34803
+ }
34804
+
34805
+ }
34806
+
34807
+ var foo = new Foo(); // With only function
34808
+
34809
+ (0, _expectType.expectTypeOf)((0, _runloop.once)((_foo, _bar, _baz) => {
34810
+ return 1;
34811
+ }, 1, true, undefined)).toEqualTypeOf();
34812
+ (0, _expectType.expectTypeOf)((0, _runloop.once)((_foo, _bar, _baz) => {
34813
+ return 1;
34814
+ }, 1, true, 'string')).toEqualTypeOf();
34815
+ (0, _runloop.once)(_foo => {
34816
+ return 1; // @ts-expect-error invalid argument
34817
+ }, 'string'); // With target and function
34818
+
34819
+ (0, _expectType.expectTypeOf)((0, _runloop.once)(foo, function (_foo, _bar, _baz) {
34820
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34821
+ return 1;
34822
+ }, 1, true)).toEqualTypeOf();
34823
+ (0, _expectType.expectTypeOf)((0, _runloop.once)(foo, function (_foo, _bar, _baz) {
34824
+ return 1;
34825
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34826
+
34827
+ (0, _runloop.once)(foo, function (_foo, _bar, _baz) {
34828
+ return 1;
34829
+ }, 1, 'string', true); // With function string reference
34830
+
34831
+ (0, _expectType.expectTypeOf)((0, _runloop.once)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
34832
+ (0, _expectType.expectTypeOf)((0, _runloop.once)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
34833
+
34834
+ (0, _runloop.once)(foo, 'test', 'string');
34835
+ });
34836
+ define("@ember/runloop/type-tests.ts/run.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34837
+ "use strict";
34838
+
34839
+ class Foo {
34840
+ test(_foo, _bar, _baz) {
34841
+ return 1;
34842
+ }
34843
+
34844
+ }
34845
+
34846
+ var foo = new Foo(); // With only function
34847
+
34848
+ (0, _expectType.expectTypeOf)((0, _runloop.run)((_foo, _bar, _baz) => {
34849
+ return 1;
34850
+ }, 1, true, undefined)).toEqualTypeOf();
34851
+ (0, _expectType.expectTypeOf)((0, _runloop.run)((_foo, _bar, _baz) => {
34852
+ return 1;
34853
+ }, 1, true, 'string')).toEqualTypeOf();
34854
+ (0, _runloop.run)(_foo => {
34855
+ return 1; // @ts-expect-error invalid argument
34856
+ }, 'string'); // With target and function
34857
+
34858
+ (0, _expectType.expectTypeOf)((0, _runloop.run)(foo, function (_foo, _bar, _baz) {
34859
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34860
+ return 1;
34861
+ }, 1, true)).toEqualTypeOf();
34862
+ (0, _expectType.expectTypeOf)((0, _runloop.run)(foo, function (_foo, _bar, _baz) {
34863
+ return 1;
34864
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34865
+
34866
+ (0, _runloop.run)(foo, function (_foo, _bar, _baz) {
34867
+ return 1;
34868
+ }, 1, 'string', true); // With function string reference
34869
+
34870
+ (0, _expectType.expectTypeOf)((0, _runloop.run)(foo, 'test', 1, true, 'string')).toEqualTypeOf();
34871
+ (0, _expectType.expectTypeOf)((0, _runloop.run)(foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
34872
+
34873
+ (0, _runloop.run)(foo, 'test', 'string');
34874
+ });
34875
+ define("@ember/runloop/type-tests.ts/schedule-once.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34876
+ "use strict";
34877
+
34878
+ class Foo {
34879
+ test(_foo, _bar, _baz) {
34880
+ return 1;
34881
+ }
34882
+
34883
+ }
34884
+
34885
+ var foo = new Foo(); // With only function
34886
+
34887
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', (_foo, _bar, _baz) => {
34888
+ return 1;
34889
+ }, 1, true, undefined)).toEqualTypeOf();
34890
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', (_foo, _bar, _baz) => {
34891
+ return 1;
34892
+ }, 1, true, 'string')).toEqualTypeOf();
34893
+ (0, _runloop.scheduleOnce)('my-queue', _foo => {
34894
+ return 1;
34895
+ }, // @ts-expect-error invalid argument
34896
+ 'string'); // With target and function
34897
+
34898
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
34899
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34900
+ return 1;
34901
+ }, 1, true)).toEqualTypeOf();
34902
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
34903
+ return 1;
34904
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34905
+
34906
+ (0, _runloop.scheduleOnce)('my-queue', foo, function (_foo, _bar, _baz) {
34907
+ return 1;
34908
+ }, 1, 'string', true); // With function string reference
34909
+
34910
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, 'test', 1, true, 'string')).toEqualTypeOf();
34911
+ (0, _expectType.expectTypeOf)((0, _runloop.scheduleOnce)('my-queue', foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
34912
+
34913
+ (0, _runloop.scheduleOnce)('my-queue', foo, 'test', 'string');
34914
+ });
34915
+ define("@ember/runloop/type-tests.ts/schedule.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34916
+ "use strict";
34917
+
34918
+ class Foo {
34919
+ test(_foo, _bar, _baz) {
34920
+ return 1;
34921
+ }
34922
+
34923
+ }
34924
+
34925
+ var foo = new Foo(); // With only function
34926
+
34927
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', (_foo, _bar, _baz) => {
34928
+ return 1;
34929
+ }, 1, true, undefined)).toEqualTypeOf();
34930
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', (_foo, _bar, _baz) => {
34931
+ return 1;
34932
+ }, 1, true, 'string')).toEqualTypeOf();
34933
+ (0, _runloop.schedule)('my-queue', _foo => {
34934
+ return 1;
34935
+ }, // @ts-expect-error invalid argument
34936
+ 'string'); // With target and function
34937
+
34938
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
34939
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
34940
+ return 1;
34941
+ }, 1, true)).toEqualTypeOf();
34942
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
34943
+ return 1;
34944
+ }, 1, true, 'string')).toEqualTypeOf(); // @ts-expect-error invalid args
34945
+
34946
+ (0, _runloop.schedule)('my-queue', foo, function (_foo, _bar, _baz) {
34947
+ return 1;
34948
+ }, 1, 'string', true); // With function string reference
34949
+
34950
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, 'test', 1, true, 'string')).toEqualTypeOf();
34951
+ (0, _expectType.expectTypeOf)((0, _runloop.schedule)('my-queue', foo, 'test', 1, true)).toEqualTypeOf(); // @ts-expect-error Invalid args
34952
+
34953
+ (0, _runloop.schedule)('my-queue', foo, 'test', 'string');
34954
+ });
34955
+ define("@ember/runloop/type-tests.ts/throttle.test", ["@ember/runloop", "expect-type"], function (_runloop, _expectType) {
34956
+ "use strict";
34957
+
34958
+ // From Docs
34959
+ function whoRan() {// Do stuff
34960
+ }
34961
+
34962
+ var myContext = {
34963
+ name: 'throttle',
34964
+
34965
+ test(_foo, _baz) {}
34966
+
34967
+ };
34968
+ (0, _runloop.throttle)(myContext, whoRan, 150); // less than 150ms passes
34969
+
34970
+ (0, _runloop.throttle)(myContext, whoRan, 150);
34971
+ (0, _runloop.throttle)(myContext, whoRan, 150, true); // console logs 'throttle ran.' one time immediately.
34972
+ // 100ms passes
34973
+
34974
+ (0, _runloop.throttle)(myContext, whoRan, 150, true); // 150ms passes and nothing else is logged to the console and
34975
+ // the throttlee is no longer being watched
34976
+
34977
+ (0, _runloop.throttle)(myContext, whoRan, 150, true); // console logs 'throttle ran.' one time immediately.
34978
+ // 150ms passes and nothing else is logged to the console and
34979
+ // the throttlee is no longer being watched
34980
+ // Method only
34981
+
34982
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _baz) => {}, 1, undefined, 1)).toEqualTypeOf(); // Wait is optional
34983
+
34984
+ (0, _runloop.throttle)((_foo, _baz) => {}, 1, true); // @ts-expect-error Requires all args
34985
+
34986
+ (0, _runloop.throttle)((_foo, _baz) => {}, 1, 1); // Can set immediate
34987
+
34988
+ (0, _runloop.throttle)((_foo, _baz) => {}, 1, true, 1, true); // With target
34989
+
34990
+ (0, _runloop.throttle)(myContext, function (_foo, _baz) {
34991
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf(myContext);
34992
+ }, 1, true, 1, true); // With key
34993
+
34994
+ (0, _runloop.throttle)(myContext, 'test', 1, true, 1, true); // @ts-expect-error invalid key
34995
+
34996
+ (0, _runloop.throttle)(myContext, 'invalid');
34997
+
34998
+ class Foo {
34999
+ test(_foo, _bar, _baz) {
35000
+ return 1;
35001
+ }
35002
+
35003
+ }
35004
+
35005
+ var foo = new Foo(); // With only function
35006
+
35007
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _bar, _baz) => {
35008
+ return 1;
35009
+ }, 1, true, undefined, 1)).toEqualTypeOf();
35010
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)((_foo, _bar, _baz) => {
35011
+ return 1;
35012
+ }, 1, true, 'string', 1)).toEqualTypeOf();
35013
+ (0, _runloop.throttle)(_foo => {
35014
+ return 1; // @ts-expect-error invalid argument
35015
+ }, 'string'); // With target and function
35016
+
35017
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
35018
+ (0, _expectType.expectTypeOf)(this).toEqualTypeOf();
35019
+ return 1;
35020
+ }, 1, true, undefined, 1)).toEqualTypeOf();
35021
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
35022
+ return 1;
35023
+ }, 1, true, 'string', 1)).toEqualTypeOf(); // @ts-expect-error invalid args
35024
+
35025
+ (0, _runloop.throttle)(foo, function (_foo, _bar, _baz) {
35026
+ return 1;
35027
+ }, 1, 'string', true, 1); // With function string reference
35028
+
35029
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, 'test', 1, true, 'string', 1)).toEqualTypeOf();
35030
+ (0, _expectType.expectTypeOf)((0, _runloop.throttle)(foo, 'test', 1, true, undefined, 1)).toEqualTypeOf(); // @ts-expect-error Invalid args
35031
+
35032
+ (0, _runloop.throttle)(foo, 'test', 'string');
35610
35033
  });
35611
35034
  define("@ember/service/index", ["exports", "@ember/-internals/runtime", "@ember/-internals/metal"], function (_exports, _runtime, _metal) {
35612
35035
  "use strict";
@@ -55441,20 +54864,9 @@ define("ember/index", ["exports", "require", "@ember/-internals/environment", "@
55441
54864
  Ember._get = _runtime2.get;
55442
54865
  Ember._on = _runtime2.on;
55443
54866
  Ember._fn = _runtime2.fn;
55444
-
55445
- if (true
55446
- /* EMBER_GLIMMER_HELPER_MANAGER */
55447
- ) {
55448
- Ember._helperManagerCapabilities = _manager.helperCapabilities;
55449
- Ember._setHelperManager = _manager.setHelperManager;
55450
- }
55451
-
55452
- if (true
55453
- /* EMBER_GLIMMER_INVOKE_HELPER */
55454
- ) {
55455
- Ember._invokeHelper = _runtime2.invokeHelper;
55456
- }
55457
-
54867
+ Ember._helperManagerCapabilities = _manager.helperCapabilities;
54868
+ Ember._setHelperManager = _manager.setHelperManager;
54869
+ Ember._invokeHelper = _runtime2.invokeHelper;
55458
54870
  Ember._captureRenderTree = EmberDebug.captureRenderTree;
55459
54871
 
55460
54872
  var deprecateImportFromString = function (name, message) {
@@ -55468,6 +54880,7 @@ define("ember/index", ["exports", "require", "@ember/-internals/environment", "@
55468
54880
  id: 'ember-string.htmlsafe-ishtmlsafe',
55469
54881
  for: 'ember-source',
55470
54882
  since: {
54883
+ available: '3.25',
55471
54884
  enabled: '3.25'
55472
54885
  },
55473
54886
  until: '4.0.0',
@@ -55650,7 +55063,7 @@ define("ember/version", ["exports"], function (_exports) {
55650
55063
  value: true
55651
55064
  });
55652
55065
  _exports.default = void 0;
55653
- var _default = "4.4.0-alpha.1";
55066
+ var _default = "4.4.0-alpha.4";
55654
55067
  _exports.default = _default;
55655
55068
  });
55656
55069
  define("route-recognizer", ["exports"], function (_exports) {
@@ -58216,7 +57629,7 @@ define("router_js", ["exports", "rsvp", "route-recognizer"], function (_exports,
58216
57629
  var lastArg = modelsArray[modelsArray.length - 1];
58217
57630
  var queryParams = {};
58218
57631
 
58219
- if (lastArg !== undefined && lastArg.hasOwnProperty('queryParams')) {
57632
+ if (lastArg && Object.prototype.hasOwnProperty.call(lastArg, 'queryParams')) {
58220
57633
  // We just checked this.
58221
57634
  // TODO: Use an assertion?
58222
57635
  queryParams = modelsArray.pop().queryParams;