ember-source 7.1.0-alpha.4 → 7.1.0-alpha.5

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 (481) hide show
  1. package/build-metadata.json +3 -3
  2. package/dist/dev/packages/@ember/-internals/container/index.js +4 -401
  3. package/dist/dev/packages/@ember/-internals/deprecations/index.js +1 -1
  4. package/dist/dev/packages/@ember/-internals/environment/index.js +3 -161
  5. package/dist/dev/packages/@ember/-internals/glimmer/index.js +14 -15
  6. package/dist/dev/packages/@ember/-internals/meta/lib/meta.js +0 -1
  7. package/dist/dev/packages/@ember/-internals/metal/index.js +18 -9
  8. package/dist/dev/packages/@ember/-internals/routing/index.js +1 -10
  9. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +10 -12
  10. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -10
  11. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -10
  12. package/dist/dev/packages/@ember/-internals/string/index.js +0 -1
  13. package/dist/dev/packages/@ember/-internals/utils/index.js +8 -3
  14. package/dist/dev/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -1
  15. package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -12
  16. package/dist/dev/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -11
  17. package/dist/dev/packages/@ember/-internals/views/lib/system/utils.js +1 -1
  18. package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +1 -18
  19. package/dist/dev/packages/@ember/-internals/views/lib/views/states.js +1 -1
  20. package/dist/dev/packages/@ember/application/index.js +5 -28
  21. package/dist/dev/packages/@ember/application/instance.js +3 -22
  22. package/dist/dev/packages/@ember/application/namespace.js +4 -11
  23. package/dist/dev/packages/@ember/array/index.js +7 -15
  24. package/dist/dev/packages/@ember/array/proxy.js +10 -14
  25. package/dist/dev/packages/@ember/canary-features/index.js +1 -1
  26. package/dist/dev/packages/@ember/component/helper.js +1 -14
  27. package/dist/dev/packages/@ember/component/index.js +1355 -16
  28. package/dist/dev/packages/@ember/component/template-only.js +1 -9
  29. package/dist/dev/packages/@ember/controller/index.js +3 -19
  30. package/dist/dev/packages/@ember/debug/container-debug-adapter.js +0 -19
  31. package/dist/dev/packages/@ember/debug/data-adapter.js +4 -11
  32. package/dist/dev/packages/@ember/debug/index.js +1 -1
  33. package/dist/dev/packages/@ember/debug/lib/deprecate.js +1 -1
  34. package/dist/dev/packages/@ember/engine/index.js +3 -29
  35. package/dist/dev/packages/@ember/engine/instance.js +3 -8
  36. package/dist/dev/packages/@ember/helper/index.js +169 -21
  37. package/dist/dev/packages/@ember/instrumentation/index.js +1 -1
  38. package/dist/dev/packages/@ember/modifier/index.js +2 -16
  39. package/dist/dev/packages/@ember/modifier/on.js +1 -9
  40. package/dist/dev/packages/@ember/object/-internals.js +3 -11
  41. package/dist/dev/packages/@ember/object/compat.js +3 -10
  42. package/dist/dev/packages/@ember/object/computed.js +2 -12
  43. package/dist/dev/packages/@ember/object/core.js +10 -18
  44. package/dist/dev/packages/@ember/object/evented.js +2 -12
  45. package/dist/dev/packages/@ember/object/events.js +1 -11
  46. package/dist/dev/packages/@ember/object/index.js +10 -14
  47. package/dist/dev/packages/@ember/object/internals.js +1 -1
  48. package/dist/dev/packages/@ember/object/lib/computed/computed_macros.js +6 -23
  49. package/dist/dev/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -12
  50. package/dist/dev/packages/@ember/object/mixin.js +7 -10
  51. package/dist/dev/packages/@ember/object/observable.js +8 -12
  52. package/dist/dev/packages/@ember/object/observers.js +1 -11
  53. package/dist/dev/packages/@ember/object/promise-proxy-mixin.js +3 -13
  54. package/dist/dev/packages/@ember/object/proxy.js +0 -7
  55. package/dist/dev/packages/@ember/reactive/collections.js +589 -1
  56. package/dist/dev/packages/@ember/renderer/index.js +1 -14
  57. package/dist/dev/packages/@ember/routing/-internals.js +1 -10
  58. package/dist/dev/packages/@ember/routing/index.js +614 -14
  59. package/dist/dev/packages/@ember/routing/lib/generate_controller.js +2 -11
  60. package/dist/dev/packages/@ember/routing/lib/routing-service.js +7 -17
  61. package/dist/dev/packages/@ember/routing/lib/utils.js +2 -11
  62. package/dist/dev/packages/@ember/routing/route.js +12 -23
  63. package/dist/dev/packages/@ember/routing/router-service.js +8 -17
  64. package/dist/dev/packages/@ember/routing/router.js +5 -21
  65. package/dist/dev/packages/@ember/runloop/index.js +1 -10
  66. package/dist/dev/packages/@ember/service/index.js +1 -11
  67. package/dist/dev/packages/@ember/template/index.js +1 -14
  68. package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +12 -15
  69. package/dist/dev/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -1
  70. package/dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
  71. package/dist/dev/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
  72. package/dist/dev/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +1 -3
  73. package/dist/dev/packages/@ember/template-compiler/lib/template.js +2 -10
  74. package/dist/dev/packages/@ember/template-factory/index.js +1 -8
  75. package/dist/dev/packages/@ember/utils/lib/compare.js +0 -7
  76. package/dist/dev/packages/@ember/utils/lib/is_empty.js +1 -12
  77. package/dist/dev/packages/@glimmer/manager/index.js +4 -314
  78. package/dist/dev/packages/@glimmer/node/index.js +3 -11
  79. package/dist/dev/packages/@glimmer/opcode-compiler/index.js +5 -7
  80. package/dist/dev/packages/@glimmer/program/index.js +194 -3
  81. package/dist/dev/packages/@glimmer/reference/index.js +4 -5
  82. package/dist/dev/packages/@glimmer/runtime/index.js +17 -10
  83. package/dist/dev/packages/@glimmer/tracking/index.js +2 -11
  84. package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +1 -11
  85. package/dist/dev/packages/@glimmer/util/index.js +1 -2
  86. package/dist/dev/packages/@glimmer/validator/index.js +4 -1253
  87. package/dist/dev/packages/@glimmer/vm/index.js +1 -1
  88. package/dist/dev/packages/@glimmer/wire-format/index.js +3 -65
  89. package/dist/dev/packages/ember/version.js +1 -1
  90. package/dist/dev/packages/ember-template-compiler/index.js +7 -7
  91. package/dist/dev/packages/shared-chunks/{alias-CSC0WIbj.js → alias-ZcMQckQV.js} +8 -4
  92. package/dist/dev/packages/shared-chunks/api-AYt3zE12.js +310 -0
  93. package/dist/dev/packages/shared-chunks/{api-BQMslHhq.js → api-WvJPuo9z.js} +4 -5
  94. package/dist/dev/packages/shared-chunks/{args-proxy-DgXMc9b5.js → args-proxy-BNLuRFlO.js} +2 -4
  95. package/dist/dev/packages/shared-chunks/{array-D8PfjQHi.js → array-Bh_kUjzy.js} +2 -1
  96. package/dist/dev/packages/shared-chunks/cache-B7dqAS38.js +596 -0
  97. package/dist/dev/packages/shared-chunks/{capabilities-O_xc7Yqk.js → capabilities-CZkuOqqC.js} +0 -5
  98. package/dist/dev/packages/shared-chunks/chain-tags-D6tuFUj_.js +190 -0
  99. package/dist/dev/packages/shared-chunks/{collections-D_nY_0UJ.js → collections-DPkjqeA3.js} +0 -1
  100. package/dist/dev/packages/shared-chunks/{compiler-D1leQ3Gl.js → compiler-CXB_8GdR.js} +7043 -234
  101. package/dist/dev/packages/shared-chunks/computed-CJnghmXC.js +980 -0
  102. package/dist/dev/packages/shared-chunks/container-BzzHmCNj.js +404 -0
  103. package/dist/dev/packages/shared-chunks/curly-CvC8E_4-.js +617 -0
  104. package/dist/dev/packages/shared-chunks/{fragment-Cc5k9Oy4.js → curried-BVwSNqpf.js} +5 -288
  105. package/dist/dev/packages/shared-chunks/decorator-B5Uh5NFI.js +135 -0
  106. package/dist/dev/packages/shared-chunks/element-C-QcIABg.js +109 -0
  107. package/dist/dev/packages/shared-chunks/element-builder-kHVx0F__.js +812 -0
  108. package/dist/dev/packages/shared-chunks/env-g-kaAFLN.js +161 -0
  109. package/dist/dev/packages/shared-chunks/events-6aFVjD4k.js +180 -0
  110. package/dist/dev/packages/shared-chunks/get-CpJjYeJO.js +138 -0
  111. package/dist/dev/packages/shared-chunks/get-debug-name-CSniHBsn.js +45 -0
  112. package/dist/dev/packages/shared-chunks/get_properties-CIm8IAtP.js +55 -0
  113. package/dist/dev/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
  114. package/dist/dev/packages/shared-chunks/hash-D3BENmhU.js +192 -0
  115. package/dist/dev/packages/shared-chunks/helper-DlC4YesW.js +314 -0
  116. package/dist/dev/packages/shared-chunks/index-CTxkmV78.js +2500 -0
  117. package/dist/dev/packages/shared-chunks/index-D-xTBV4B.js +220 -0
  118. package/dist/dev/packages/shared-chunks/{index-BUPd6pkm.js → index-DmGmwWPJ.js} +29 -29
  119. package/dist/dev/packages/shared-chunks/injected_property-B4T-FzZZ.js +70 -0
  120. package/dist/dev/packages/shared-chunks/intern-zquhAEIg.js +51 -0
  121. package/dist/dev/packages/shared-chunks/internal-CbQSKXEm.js +140 -0
  122. package/dist/dev/packages/shared-chunks/internal-helper-Dsl9_7H_.js +7 -0
  123. package/dist/dev/packages/shared-chunks/{neq-DujMPv1k.js → invoke-B6j6DdDz.js} +4 -32
  124. package/dist/{prod/packages/shared-chunks/is_proxy-Cr1qlMv_.js → dev/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
  125. package/dist/dev/packages/shared-chunks/libraries-CHBwbR72.js +79 -0
  126. package/dist/dev/packages/shared-chunks/mandatory-setter-BpbAMTzV.js +107 -0
  127. package/dist/dev/packages/shared-chunks/meta-BmRXesrk.js +46 -0
  128. package/dist/{prod/packages/shared-chunks/name-C68GLLO3.js → dev/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
  129. package/dist/dev/packages/shared-chunks/{namespace_search-uT8odThF.js → namespace_search-BfvzEQzN.js} +1 -2
  130. package/dist/dev/packages/shared-chunks/normalize-CKySQVU7.js +84 -0
  131. package/dist/dev/packages/shared-chunks/observers-C2DurkLG.js +199 -0
  132. package/dist/dev/packages/shared-chunks/on-D8QwT-eN.js +253 -0
  133. package/dist/dev/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +285 -0
  134. package/dist/dev/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
  135. package/dist/dev/packages/shared-chunks/or-DBU9Ge4r.js +118 -0
  136. package/dist/{prod/packages/shared-chunks/program-B7SJZ5NF.js → dev/packages/shared-chunks/program-DzAfcWFj.js} +1 -1
  137. package/dist/{prod/packages/shared-chunks/program-context-DFiwaPMR.js → dev/packages/shared-chunks/program-context-CqcQMsfa.js} +3 -3
  138. package/dist/dev/packages/shared-chunks/property_get-CIBS9umw.js +139 -0
  139. package/dist/dev/packages/shared-chunks/{property_set-DaoZXGM5.js → property_set-D3PKyisF.js} +4 -2
  140. package/dist/dev/packages/shared-chunks/props-fiqxqhAH.js +85 -0
  141. package/dist/dev/packages/shared-chunks/{reference-C3TKDRnP.js → reference-BoPB2LfI.js} +3 -4
  142. package/dist/dev/packages/shared-chunks/{registers-ylirb0dq.js → registers-DoamZwaG.js} +1 -1
  143. package/dist/{prod/packages/shared-chunks/rehydrate-builder-D3t52iGR.js → dev/packages/shared-chunks/rehydrate-builder-DdzXTaJk.js} +7 -4
  144. package/dist/dev/packages/shared-chunks/{render-DCchifOK.js → render-DDdabL30.js} +510 -15
  145. package/dist/{prod/packages/shared-chunks/serialize-builder-iXiRs1Pg.js → dev/packages/shared-chunks/serialize-builder-B3u9Wr3n.js} +2 -7
  146. package/dist/dev/packages/shared-chunks/set_properties-BghuuGJx.js +48 -0
  147. package/dist/dev/packages/shared-chunks/{setup-registry-DxchCIL2.js → setup-registry-XxD0xvgf.js} +34 -14
  148. package/dist/dev/packages/shared-chunks/spec-BXl1reqK.js +16 -0
  149. package/dist/dev/packages/shared-chunks/super-BBBjgF69.js +91 -0
  150. package/dist/dev/packages/shared-chunks/template-BRrQR6KS.js +16 -0
  151. package/dist/dev/packages/shared-chunks/template-only-Yluyu0DY.js +78 -0
  152. package/dist/dev/packages/shared-chunks/textarea-C0Us0PNJ.js +468 -0
  153. package/dist/dev/packages/shared-chunks/tracked-CKE4wnE6.js +148 -0
  154. package/dist/dev/packages/shared-chunks/tracked-data-CGnA4ytZ.js +31 -0
  155. package/dist/dev/packages/shared-chunks/transform-resolutions-h1ik8gqW.js +645 -0
  156. package/dist/dev/packages/shared-chunks/unique-id-A83bjEE-.js +32 -0
  157. package/dist/{prod/packages/shared-chunks/on-CersD7PL.js → dev/packages/shared-chunks/untouchable-this-cH6_N2LJ.js} +215 -1397
  158. package/dist/dev/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
  159. package/dist/prod/packages/@ember/-internals/container/index.js +5 -315
  160. package/dist/prod/packages/@ember/-internals/deprecations/index.js +1 -1
  161. package/dist/prod/packages/@ember/-internals/environment/index.js +3 -158
  162. package/dist/prod/packages/@ember/-internals/glimmer/index.js +14 -13
  163. package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +1 -2
  164. package/dist/prod/packages/@ember/-internals/metal/index.js +19 -13
  165. package/dist/prod/packages/@ember/-internals/routing/index.js +2 -6
  166. package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
  167. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +10 -10
  168. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +2 -6
  169. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +1 -1
  170. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -6
  171. package/dist/prod/packages/@ember/-internals/string/index.js +0 -2
  172. package/dist/prod/packages/@ember/-internals/utils/index.js +33 -30
  173. package/dist/prod/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -2
  174. package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -6
  175. package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +3 -7
  176. package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +2 -2
  177. package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +1 -14
  178. package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +1 -2
  179. package/dist/prod/packages/@ember/application/index.js +5 -24
  180. package/dist/prod/packages/@ember/application/instance.js +6 -18
  181. package/dist/prod/packages/@ember/application/namespace.js +5 -8
  182. package/dist/prod/packages/@ember/array/index.js +8 -12
  183. package/dist/prod/packages/@ember/array/proxy.js +10 -10
  184. package/dist/prod/packages/@ember/canary-features/index.js +1 -1
  185. package/dist/prod/packages/@ember/component/helper.js +1 -12
  186. package/dist/prod/packages/@ember/component/index.js +1292 -15
  187. package/dist/prod/packages/@ember/component/template-only.js +1 -6
  188. package/dist/prod/packages/@ember/controller/index.js +3 -16
  189. package/dist/prod/packages/@ember/debug/container-debug-adapter.js +1 -15
  190. package/dist/prod/packages/@ember/debug/data-adapter.js +5 -7
  191. package/dist/prod/packages/@ember/debug/index.js +1 -1
  192. package/dist/prod/packages/@ember/debug/lib/deprecate.js +1 -1
  193. package/dist/prod/packages/@ember/engine/index.js +4 -25
  194. package/dist/prod/packages/@ember/engine/instance.js +4 -9
  195. package/dist/prod/packages/@ember/helper/index.js +169 -19
  196. package/dist/prod/packages/@ember/instrumentation/index.js +1 -1
  197. package/dist/prod/packages/@ember/modifier/index.js +2 -14
  198. package/dist/prod/packages/@ember/modifier/on.js +1 -6
  199. package/dist/prod/packages/@ember/object/-internals.js +3 -6
  200. package/dist/prod/packages/@ember/object/compat.js +4 -7
  201. package/dist/prod/packages/@ember/object/computed.js +2 -8
  202. package/dist/prod/packages/@ember/object/core.js +9 -15
  203. package/dist/prod/packages/@ember/object/evented.js +2 -7
  204. package/dist/prod/packages/@ember/object/events.js +1 -6
  205. package/dist/prod/packages/@ember/object/index.js +10 -12
  206. package/dist/prod/packages/@ember/object/internals.js +3 -6
  207. package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +6 -20
  208. package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -9
  209. package/dist/prod/packages/@ember/object/mixin.js +7 -9
  210. package/dist/prod/packages/@ember/object/observable.js +8 -9
  211. package/dist/prod/packages/@ember/object/observers.js +1 -6
  212. package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +3 -9
  213. package/dist/prod/packages/@ember/object/proxy.js +0 -7
  214. package/dist/prod/packages/@ember/reactive/collections.js +589 -1
  215. package/dist/prod/packages/@ember/renderer/index.js +1 -12
  216. package/dist/prod/packages/@ember/routing/history-location.js +1 -1
  217. package/dist/prod/packages/@ember/routing/index.js +581 -12
  218. package/dist/prod/packages/@ember/routing/lib/dsl.js +1 -1
  219. package/dist/prod/packages/@ember/routing/lib/generate_controller.js +2 -6
  220. package/dist/prod/packages/@ember/routing/lib/routing-service.js +5 -14
  221. package/dist/prod/packages/@ember/routing/lib/utils.js +2 -6
  222. package/dist/prod/packages/@ember/routing/none-location.js +1 -1
  223. package/dist/prod/packages/@ember/routing/route.js +12 -21
  224. package/dist/prod/packages/@ember/routing/router-service.js +6 -14
  225. package/dist/prod/packages/@ember/routing/router.js +5 -17
  226. package/dist/prod/packages/@ember/runloop/index.js +2 -6
  227. package/dist/prod/packages/@ember/service/index.js +1 -7
  228. package/dist/prod/packages/@ember/template/index.js +1 -12
  229. package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +13 -14
  230. package/dist/prod/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -2
  231. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +1 -1
  232. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +1 -1
  233. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +1 -1
  234. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +1 -1
  235. package/dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
  236. package/dist/prod/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
  237. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +1 -1
  238. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +1 -1
  239. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +127 -4
  240. package/dist/prod/packages/@ember/template-compiler/lib/template.js +2 -7
  241. package/dist/prod/packages/@ember/template-factory/index.js +1 -5
  242. package/dist/prod/packages/@ember/utils/lib/compare.js +1 -8
  243. package/dist/prod/packages/@ember/utils/lib/is_empty.js +1 -7
  244. package/dist/prod/packages/@glimmer/manager/index.js +4 -292
  245. package/dist/prod/packages/@glimmer/node/index.js +3 -8
  246. package/dist/prod/packages/@glimmer/opcode-compiler/index.js +5 -5
  247. package/dist/prod/packages/@glimmer/program/index.js +194 -3
  248. package/dist/prod/packages/@glimmer/reference/index.js +4 -4
  249. package/dist/prod/packages/@glimmer/runtime/index.js +16 -8
  250. package/dist/prod/packages/@glimmer/tracking/index.js +2 -7
  251. package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +1 -6
  252. package/dist/prod/packages/@glimmer/util/index.js +2 -2
  253. package/dist/prod/packages/@glimmer/validator/index.js +5 -1016
  254. package/dist/prod/packages/@glimmer/vm/index.js +1 -1
  255. package/dist/prod/packages/@glimmer/wire-format/index.js +3 -65
  256. package/dist/prod/packages/ember/version.js +1 -1
  257. package/dist/prod/packages/ember-template-compiler/index.js +5 -7
  258. package/dist/prod/packages/shared-chunks/{alias-BLBQkche.js → alias-CLuFeKoV.js} +8 -6
  259. package/dist/prod/packages/shared-chunks/api-CM1trl_4.js +289 -0
  260. package/dist/prod/packages/shared-chunks/{api-B5UrgITK.js → api-zh_k31vb.js} +4 -5
  261. package/dist/prod/packages/shared-chunks/{args-proxy-Dl0A0YWI.js → args-proxy-BDXbXCF9.js} +2 -2
  262. package/dist/prod/packages/shared-chunks/{array-kVQfzrQn.js → array-DHdr4__s.js} +3 -3
  263. package/dist/prod/packages/shared-chunks/assert-CUCJBR2C.js +19 -0
  264. package/dist/prod/packages/shared-chunks/cache-BIlOoPA7.js +371 -0
  265. package/dist/prod/packages/shared-chunks/{capabilities-DXA-L0iT.js → capabilities-_5e35539.js} +0 -3
  266. package/dist/prod/packages/shared-chunks/chain-tags-BJqcuCM1.js +179 -0
  267. package/dist/prod/packages/shared-chunks/{compiler-Bbki2GT_.js → compiler-DjQtTQGk.js} +7045 -193
  268. package/dist/prod/packages/shared-chunks/{namespace_search-Dcdalhj6.js → computed-2Udcmflw.js} +109 -239
  269. package/dist/prod/packages/shared-chunks/container-D5NwW5Fd.js +316 -0
  270. package/dist/prod/packages/shared-chunks/curly-BsqvV8G0.js +546 -0
  271. package/dist/prod/packages/shared-chunks/{fragment-D7nBU9ae.js → curried-BVwSNqpf.js} +6 -303
  272. package/dist/prod/packages/shared-chunks/debug-render-tree-BLtnOSbb.js +2049 -0
  273. package/dist/prod/packages/shared-chunks/{decorator-BdDDBUd2.js → decorator-DBCISop4.js} +1 -1
  274. package/dist/prod/packages/shared-chunks/element-BjFr0tO0.js +101 -0
  275. package/dist/prod/packages/shared-chunks/{element-builder-CzXb9l1W.js → element-builder-BPjq0rxK.js} +109 -88
  276. package/dist/prod/packages/shared-chunks/env-DXxsTFkM.js +158 -0
  277. package/dist/prod/packages/shared-chunks/events-970OxD6Q.js +175 -0
  278. package/dist/prod/packages/shared-chunks/get-D5wxdTkY.js +138 -0
  279. package/dist/prod/packages/shared-chunks/get_properties-BcAC5sGx.js +55 -0
  280. package/dist/prod/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
  281. package/dist/prod/packages/shared-chunks/hash-DcUe-meU.js +192 -0
  282. package/dist/prod/packages/shared-chunks/helper-Da672z4a.js +299 -0
  283. package/dist/prod/packages/shared-chunks/{index-CjaDF9kC.js → index--2U-v2nf.js} +18 -10
  284. package/dist/prod/packages/shared-chunks/index-D-xTBV4B.js +220 -0
  285. package/dist/prod/packages/shared-chunks/index-D87qoERP.js +2322 -0
  286. package/dist/prod/packages/shared-chunks/{injected_property-CTVs5FPh.js → injected_property-D9B-fPiH.js} +3 -3
  287. package/dist/prod/packages/shared-chunks/intern-zquhAEIg.js +51 -0
  288. package/dist/prod/packages/shared-chunks/internal-DidurjJB.js +137 -0
  289. package/dist/prod/packages/shared-chunks/internal-helper-DIbr1RgC.js +7 -0
  290. package/dist/prod/packages/shared-chunks/{neq-BqdovTuC.js → invoke-Dr_CRwA_.js} +4 -24
  291. package/dist/{dev/packages/shared-chunks/is_proxy-B0smdQy8.js → prod/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
  292. package/dist/prod/packages/shared-chunks/libraries-DaXpIDYN.js +60 -0
  293. package/dist/prod/packages/shared-chunks/meta-B9mldqPL.js +36 -0
  294. package/dist/{dev/packages/shared-chunks/name-Z7dpqvzn.js → prod/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
  295. package/dist/prod/packages/shared-chunks/namespace_search-BfvzEQzN.js +134 -0
  296. package/dist/prod/packages/shared-chunks/normalize-D9jDJVGg.js +84 -0
  297. package/dist/prod/packages/shared-chunks/observers-Co4JALkS.js +199 -0
  298. package/dist/prod/packages/shared-chunks/on-C3ZQiUUD.js +228 -0
  299. package/dist/prod/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +285 -0
  300. package/dist/prod/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
  301. package/dist/prod/packages/shared-chunks/or-oTVMuHc8.js +91 -0
  302. package/dist/{dev/packages/shared-chunks/program-DfV0v8aa.js → prod/packages/shared-chunks/program-B7CWdS8W.js} +1 -2
  303. package/dist/{dev/packages/shared-chunks/program-context-sJz0oHOA.js → prod/packages/shared-chunks/program-context-CGMN-aQM.js} +3 -3
  304. package/dist/prod/packages/shared-chunks/property_get-hWJ0nGhW.js +122 -0
  305. package/dist/prod/packages/shared-chunks/{property_set-B2sZxeCw.js → property_set-Dj5-ScWk.js} +4 -5
  306. package/dist/prod/packages/shared-chunks/props-fiqxqhAH.js +85 -0
  307. package/dist/prod/packages/shared-chunks/{reference-BNqcwZWH.js → reference-BshxG6wn.js} +3 -3
  308. package/dist/prod/packages/shared-chunks/{registers-ylirb0dq.js → registers-DoamZwaG.js} +1 -1
  309. package/dist/{dev/packages/shared-chunks/rehydrate-builder-BRH0p0wA.js → prod/packages/shared-chunks/rehydrate-builder-BKg2X6Lo.js} +7 -7
  310. package/dist/prod/packages/shared-chunks/{render-D78XHdek.js → render-nx5-PsDW.js} +487 -12
  311. package/dist/{dev/packages/shared-chunks/serialize-builder-DiO7Ak9_.js → prod/packages/shared-chunks/serialize-builder-BGbC30SN.js} +2 -10
  312. package/dist/prod/packages/shared-chunks/set_properties-oPyURk67.js +48 -0
  313. package/dist/prod/packages/shared-chunks/{setup-registry-Cs-7NIJU.js → setup-registry-TiaKLj5k.js} +35 -13
  314. package/dist/prod/packages/shared-chunks/spec-BXl1reqK.js +16 -0
  315. package/dist/prod/packages/shared-chunks/super-BBBjgF69.js +91 -0
  316. package/dist/prod/packages/shared-chunks/template-BRrQR6KS.js +16 -0
  317. package/dist/prod/packages/shared-chunks/template-only-BtLl0uH0.js +78 -0
  318. package/dist/prod/packages/shared-chunks/textarea-CPKZ1c_O.js +455 -0
  319. package/dist/prod/packages/shared-chunks/{tracked-Cl5l4v8b.js → tracked-CffAABMz.js} +6 -4
  320. package/dist/prod/packages/shared-chunks/tracked-data-C83f5V5S.js +31 -0
  321. package/dist/prod/packages/shared-chunks/unique-id-CfHImDRV.js +32 -0
  322. package/dist/prod/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
  323. package/docs/data.json +1263 -1029
  324. package/package.json +1 -1
  325. package/types/stable/@ember/-internals/container/lib/registry.d.ts +1 -1
  326. package/types/stable/@ember/-internals/deprecations/index.d.ts +1 -1
  327. package/types/stable/@ember/-internals/glimmer/index.d.ts +1 -1
  328. package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +1 -1
  329. package/types/stable/@ember/-internals/glimmer/lib/component-managers/mount.d.ts +1 -1
  330. package/types/stable/@ember/-internals/glimmer/lib/component-managers/outlet.d.ts +1 -1
  331. package/types/stable/@ember/-internals/glimmer/lib/component-managers/route-template.d.ts +2 -2
  332. package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +9 -7
  333. package/types/stable/@ember/-internals/glimmer/lib/components/abstract-input.d.ts +1 -1
  334. package/types/stable/@ember/-internals/glimmer/lib/dom.d.ts +6 -2
  335. package/types/stable/@ember/-internals/glimmer/lib/environment.d.ts +1 -1
  336. package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +1 -1
  337. package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +3 -3
  338. package/types/stable/@ember/-internals/glimmer/lib/setup-registry.d.ts +1 -1
  339. package/types/stable/@ember/-internals/glimmer/lib/utils/bindings.d.ts +1 -1
  340. package/types/stable/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.d.ts +3 -2
  341. package/types/stable/@ember/-internals/glimmer/lib/utils/iterator.d.ts +1 -1
  342. package/types/stable/@ember/-internals/glimmer/lib/utils/managers.d.ts +2 -1
  343. package/types/stable/@ember/-internals/glimmer/lib/utils/serialization-first-node-helpers.d.ts +1 -1
  344. package/types/stable/@ember/-internals/glimmer/lib/utils/string.d.ts +1 -1
  345. package/types/stable/@ember/-internals/meta/lib/meta.d.ts +3 -2
  346. package/types/stable/@ember/-internals/metal/lib/cache.d.ts +1 -1
  347. package/types/stable/@ember/-internals/metal/lib/chain-tags.d.ts +3 -2
  348. package/types/stable/@ember/-internals/metal/lib/computed.d.ts +1 -1
  349. package/types/stable/@ember/-internals/metal/lib/decorator.d.ts +1 -1
  350. package/types/stable/@ember/-internals/metal/lib/deprecate_property.d.ts +1 -1
  351. package/types/stable/@ember/-internals/metal/lib/events.d.ts +1 -1
  352. package/types/stable/@ember/-internals/metal/lib/observer.d.ts +1 -1
  353. package/types/stable/@ember/-internals/metal/lib/properties.d.ts +1 -1
  354. package/types/stable/@ember/-internals/metal/lib/property_events.d.ts +1 -1
  355. package/types/stable/@ember/-internals/metal/lib/tags.d.ts +2 -1
  356. package/types/stable/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts +1 -1
  357. package/types/stable/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts +1 -1
  358. package/types/stable/@ember/-internals/utils/lib/is_proxy.d.ts +1 -1
  359. package/types/stable/@ember/-internals/utils/lib/mandatory-setter.d.ts +1 -1
  360. package/types/stable/@ember/-internals/views/lib/system/utils.d.ts +1 -1
  361. package/types/stable/@ember/-internals/views/lib/views/core_view.d.ts +2 -2
  362. package/types/stable/@ember/-internals/views/lib/views/states.d.ts +1 -1
  363. package/types/stable/@ember/application/index.d.ts +5 -4
  364. package/types/stable/@ember/application/instance.d.ts +4 -3
  365. package/types/stable/@ember/application/namespace.d.ts +1 -1
  366. package/types/stable/@ember/array/proxy.d.ts +4 -3
  367. package/types/stable/@ember/component/helper.d.ts +1 -1
  368. package/types/stable/@ember/component/index.d.ts +6 -3
  369. package/types/stable/@ember/controller/index.d.ts +2 -2
  370. package/types/stable/@ember/debug/container-debug-adapter.d.ts +1 -1
  371. package/types/stable/@ember/engine/index.d.ts +3 -3
  372. package/types/stable/@ember/engine/instance.d.ts +4 -3
  373. package/types/stable/@ember/helper/index.d.ts +177 -5
  374. package/types/stable/@ember/modifier/index.d.ts +1 -1
  375. package/types/stable/@ember/object/-internals.d.ts +2 -2
  376. package/types/stable/@ember/object/compat.d.ts +2 -2
  377. package/types/stable/@ember/object/computed.d.ts +3 -1
  378. package/types/stable/@ember/object/evented.d.ts +1 -1
  379. package/types/stable/@ember/object/events.d.ts +1 -1
  380. package/types/stable/@ember/object/index.d.ts +8 -2
  381. package/types/stable/@ember/object/lib/computed/computed_macros.d.ts +1 -1
  382. package/types/stable/@ember/object/mixin.d.ts +1 -1
  383. package/types/stable/@ember/object/observers.d.ts +1 -1
  384. package/types/stable/@ember/object/proxy.d.ts +1 -1
  385. package/types/stable/@ember/reactive/collections.d.ts +6 -6
  386. package/types/stable/@ember/renderer/index.d.ts +2 -2
  387. package/types/stable/@ember/routing/index.d.ts +1 -1
  388. package/types/stable/@ember/routing/lib/controller_for.d.ts +2 -2
  389. package/types/stable/@ember/routing/route.d.ts +2 -2
  390. package/types/stable/@ember/routing/router.d.ts +2 -2
  391. package/types/stable/@ember/service/index.d.ts +1 -1
  392. package/types/stable/@ember/template/index.d.ts +1 -1
  393. package/types/stable/@ember/template-compiler/lib/dasherize-component-name.d.ts +1 -1
  394. package/types/stable/@ember/template-compiler/lib/plugins/assert-against-attrs.d.ts +1 -1
  395. package/types/stable/@ember/template-compiler/lib/plugins/assert-against-named-outlets.d.ts +1 -1
  396. package/types/stable/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.d.ts +1 -1
  397. package/types/stable/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.d.ts +1 -1
  398. package/types/stable/@ember/template-compiler/lib/plugins/auto-import-builtins.d.ts +1 -4
  399. package/types/stable/@ember/template-compiler/lib/plugins/transform-action-syntax.d.ts +1 -1
  400. package/types/stable/@ember/template-compiler/lib/plugins/transform-each-in-into-each.d.ts +1 -1
  401. package/types/stable/@ember/template-compiler/lib/plugins/transform-each-track-array.d.ts +1 -1
  402. package/types/stable/@ember/template-compiler/lib/plugins/transform-in-element.d.ts +1 -1
  403. package/types/stable/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.d.ts +1 -1
  404. package/types/stable/@ember/template-compiler/lib/plugins/transform-resolutions.d.ts +1 -1
  405. package/types/stable/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.d.ts +1 -1
  406. package/types/stable/@ember/template-compiler/lib/plugins/utils.d.ts +1 -1
  407. package/types/stable/@ember/template-compiler/lib/system/calculate-location-display.d.ts +1 -1
  408. package/types/stable/@ember/template-compiler/lib/types.d.ts +2 -1
  409. package/types/stable/@ember/template-factory/index.d.ts +1 -1
  410. package/types/stable/@glimmer/compiler/lib/builder/builder-interface.d.ts +2 -2
  411. package/types/stable/@glimmer/compiler/lib/builder/builder.d.ts +2 -2
  412. package/types/stable/@glimmer/compiler/lib/compiler.d.ts +1 -1
  413. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/context.d.ts +2 -1
  414. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/index.d.ts +2 -1
  415. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/impl.d.ts +2 -1
  416. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/curry.d.ts +1 -1
  417. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/dynamic-vars.d.ts +1 -1
  418. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/has-block.d.ts +2 -1
  419. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/if-unless.d.ts +1 -1
  420. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/log.d.ts +1 -1
  421. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/classified.d.ts +1 -1
  422. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/component.d.ts +1 -1
  423. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/simple-element.d.ts +2 -1
  424. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/expressions.d.ts +1 -1
  425. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/statements.d.ts +1 -1
  426. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/strict-mode.d.ts +1 -1
  427. package/types/stable/@glimmer/compiler/lib/passes/2-encoding/expressions.d.ts +1 -1
  428. package/types/stable/@glimmer/compiler/lib/passes/2-encoding/mir.d.ts +3 -1
  429. package/types/stable/@glimmer/compiler/lib/shared/result.d.ts +1 -1
  430. package/types/stable/@glimmer/manager/lib/public/component.d.ts +1 -1
  431. package/types/stable/@glimmer/manager/lib/util/args-proxy.d.ts +1 -1
  432. package/types/stable/@glimmer/manager/lib/util/capabilities.d.ts +1 -1
  433. package/types/stable/@glimmer/node/lib/node-dom-helper.d.ts +1 -1
  434. package/types/stable/@glimmer/opcode-compiler/lib/opcode-builder/helpers/components.d.ts +1 -1
  435. package/types/stable/@glimmer/runtime/index.d.ts +7 -4
  436. package/types/stable/@glimmer/runtime/lib/compiled/expressions/concat.d.ts +1 -1
  437. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/-debug-strip.d.ts +4 -3
  438. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/component.d.ts +1 -1
  439. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/dom.d.ts +2 -2
  440. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/vm.d.ts +2 -2
  441. package/types/stable/@glimmer/runtime/lib/component/template-only.d.ts +1 -1
  442. package/types/stable/@glimmer/runtime/lib/curried-value.d.ts +1 -1
  443. package/types/stable/@glimmer/runtime/lib/helpers/and.d.ts +3 -0
  444. package/types/stable/@glimmer/runtime/lib/helpers/gt.d.ts +8 -0
  445. package/types/stable/@glimmer/runtime/lib/helpers/gte.d.ts +8 -0
  446. package/types/stable/@glimmer/runtime/lib/helpers/invoke.d.ts +1 -1
  447. package/types/stable/@glimmer/runtime/lib/helpers/lt.d.ts +8 -0
  448. package/types/stable/@glimmer/runtime/lib/helpers/lte.d.ts +8 -0
  449. package/types/stable/@glimmer/runtime/lib/helpers/not.d.ts +3 -0
  450. package/types/stable/@glimmer/runtime/lib/helpers/or.d.ts +3 -0
  451. package/types/stable/@glimmer/runtime/lib/opcodes.d.ts +2 -2
  452. package/types/stable/@glimmer/runtime/lib/references/class-list.d.ts +1 -1
  453. package/types/stable/@glimmer/runtime/lib/references/curry-value.d.ts +1 -1
  454. package/types/stable/@glimmer/runtime/lib/render.d.ts +1 -1
  455. package/types/stable/@glimmer/runtime/lib/scope.d.ts +1 -1
  456. package/types/stable/@glimmer/runtime/lib/vm/append.d.ts +3 -2
  457. package/types/stable/@glimmer/runtime/lib/vm/arguments.d.ts +2 -2
  458. package/types/stable/@glimmer/runtime/lib/vm/content/text.d.ts +1 -1
  459. package/types/stable/@glimmer/runtime/lib/vm/element-builder.d.ts +1 -1
  460. package/types/stable/@glimmer/runtime/lib/vm/low-level.d.ts +2 -1
  461. package/types/stable/@glimmer/runtime/lib/vm/rehydrate-builder.d.ts +1 -1
  462. package/types/stable/@glimmer/runtime/lib/vm/update.d.ts +2 -1
  463. package/types/stable/@glimmer/syntax/lib/keywords.d.ts +2 -2
  464. package/types/stable/@glimmer/tracking/index.d.ts +2 -1
  465. package/types/stable/@glimmer/tracking/primitives/cache.d.ts +1 -1
  466. package/types/stable/index.d.ts +7 -0
  467. package/dist/dev/packages/shared-chunks/constants-BbdWMvgs.js +0 -213
  468. package/dist/dev/packages/shared-chunks/dynamic-CgX8M02_.js +0 -3823
  469. package/dist/dev/packages/shared-chunks/element-builder-BpJIoi99.js +0 -404
  470. package/dist/dev/packages/shared-chunks/index-RzG0Jvjx.js +0 -6306
  471. package/dist/dev/packages/shared-chunks/mandatory-setter-DHZe7-kW.js +0 -425
  472. package/dist/dev/packages/shared-chunks/observers-Bj9qLVau.js +0 -2062
  473. package/dist/dev/packages/shared-chunks/set_properties-kVGzZL_a.js +0 -100
  474. package/dist/dev/packages/shared-chunks/transform-resolutions-D-YtZ0_g.js +0 -7458
  475. package/dist/prod/packages/shared-chunks/constants-DThhT5fu.js +0 -210
  476. package/dist/prod/packages/shared-chunks/index-r-Dz_hzt.js +0 -5931
  477. package/dist/prod/packages/shared-chunks/observers-tZ2aOzr4.js +0 -714
  478. package/dist/prod/packages/shared-chunks/set_properties-C1T46IiN.js +0 -101
  479. package/dist/prod/packages/shared-chunks/super-Cm_a_cLQ.js +0 -275
  480. package/dist/prod/packages/shared-chunks/transform-resolutions-DR4GLmR2.js +0 -6936
  481. package/dist/prod/packages/shared-chunks/{collections-GpG8lT2g.js → collections-C3Y8z_9v.js} +9 -9
@@ -1,18 +1,1295 @@
1
- import '../../@glimmer/validator/index.js';
2
- import '../../shared-chunks/reference-BNqcwZWH.js';
3
- import '../../shared-chunks/capabilities-DXA-L0iT.js';
4
- import { setComponentManager as setComponentManager$1 } from '../../@glimmer/manager/index.js';
5
- export { componentCapabilities as capabilities } from '../../@glimmer/manager/index.js';
6
1
  export { g as getComponentTemplate, s as setComponentTemplate } from '../../shared-chunks/template-Dc_cBOoX.js';
7
- import '../../shared-chunks/fragment-D7nBU9ae.js';
8
- import '../../shared-chunks/index-CjaDF9kC.js';
9
- export { I as Input, T as Textarea, C as default } from '../../shared-chunks/index-r-Dz_hzt.js';
10
- import '../-internals/container/index.js';
11
- import '../../shared-chunks/super-Cm_a_cLQ.js';
12
- import '../-internals/environment/index.js';
13
- import '../../shared-chunks/on-CersD7PL.js';
14
- import '../../shared-chunks/constants-DThhT5fu.js';
15
- import '../runloop/index.js';
2
+ import { n as nativeDescDecorator } from '../../shared-chunks/decorator-DBCISop4.js';
3
+ import { g as get } from '../../shared-chunks/property_get-hWJ0nGhW.js';
4
+ import { P as PROPERTY_DID_CHANGE } from '../../shared-chunks/computed-2Udcmflw.js';
5
+ import { getOwner } from '../-internals/owner/index.js';
6
+ import TargetActionSupport from '../-internals/runtime/lib/mixins/target_action_support.js';
7
+ import ActionSupport from '../-internals/views/lib/mixins/action_support.js';
8
+ import { getViewElement, getChildViews, addChildView } from '../-internals/views/lib/system/utils.js';
9
+ import CoreView from '../-internals/views/lib/views/core_view.js';
10
+ import { h as hasDOM } from '../../shared-chunks/has-dom-DdQORPzI.js';
11
+ import '../../shared-chunks/env-DXxsTFkM.js';
12
+ import '../object/index.js';
13
+ import { g as guidFor } from '../../shared-chunks/guid-Cbq2sNV_.js';
14
+ import { s as setInternalComponentManager } from '../../shared-chunks/api-zh_k31vb.js';
15
+ import { d as isUpdatableRef, u as updateRef } from '../../shared-chunks/reference-BshxG6wn.js';
16
+ import { n as normalizeProperty } from '../../shared-chunks/props-fiqxqhAH.js';
17
+ import { p as createTag, D as DIRTY_TAG$1 } from '../../shared-chunks/cache-BIlOoPA7.js';
18
+ import { I as IS_DISPATCHING_ATTRS, D as DIRTY_TAG, B as BOUNDS, g as getComponentCapturedArgs, C as CURLY_COMPONENT_MANAGER } from '../../shared-chunks/curly-BsqvV8G0.js';
19
+ import { a as decorateMethodV2 } from '../../shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js';
20
+ export { I as Input, T as Textarea } from '../../shared-chunks/textarea-CPKZ1c_O.js';
21
+ import { s as setComponentManager$1 } from '../../shared-chunks/api-CM1trl_4.js';
22
+ export { c as capabilities } from '../../shared-chunks/api-CM1trl_4.js';
23
+ import '../../shared-chunks/capabilities-_5e35539.js';
24
+
25
+ let lazyEventsProcessed = new WeakMap();
26
+ const EMPTY_ARRAY = Object.freeze([]);
27
+
28
+ /**
29
+ @module @ember/component
30
+ */
31
+
32
+ // A zero-runtime-overhead private symbol to use in branding the component to
33
+ // preserve its type parameter.
34
+
35
+ /**
36
+ A component is a reusable UI element that consists of a `.hbs` template and an
37
+ optional JavaScript class that defines its behavior. For example, someone
38
+ might make a `button` in the template and handle the click behavior in the
39
+ JavaScript file that shares the same name as the template.
40
+
41
+ Components are broken down into two categories:
42
+
43
+ - Components _without_ JavaScript, that are based only on a template. These
44
+ are called Template-only or TO components.
45
+ - Components _with_ JavaScript, which consist of a template and a backing
46
+ class.
47
+
48
+ Ember ships with two types of JavaScript classes for components:
49
+
50
+ 1. Glimmer components, imported from `@glimmer/component`, which are the
51
+ default component's for Ember Octane (3.15) and more recent editions.
52
+ 2. Classic components, imported from `@ember/component`, which were the
53
+ default for older editions of Ember (pre 3.15).
54
+
55
+ Below is the documentation for Classic components. If you are looking for the
56
+ API documentation for Template-only or Glimmer components, it is [available
57
+ here](/ember/release/modules/@glimmer%2Fcomponent).
58
+
59
+ ## Defining a Classic Component
60
+
61
+ If you want to customize the component in order to handle events, transform
62
+ arguments or maintain internal state, you implement a subclass of `Component`.
63
+
64
+ One example is to add computed properties to your component:
65
+
66
+ ```app/components/person-profile.js
67
+ import Component from '@ember/component';
68
+
69
+ export default class extends Component {
70
+ @computed('person.title', 'person.firstName', 'person.lastName')
71
+ get displayName() {
72
+ let { title, firstName, lastName } = this.person;
73
+
74
+ if (title) {
75
+ return `${title} ${lastName}`;
76
+ } else {
77
+ return `${firstName} ${lastName}`;
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ And then use it in the component's template:
84
+
85
+ ```app/templates/components/person-profile.hbs
86
+ <h1>{{this.displayName}}</h1>
87
+ {{yield}}
88
+ ```
89
+
90
+ ## Customizing a Classic Component's HTML Element in JavaScript
91
+
92
+ ### HTML Tag
93
+
94
+ The default HTML tag name used for a component's HTML representation is `div`.
95
+ This can be customized by setting the `tagName` property.
96
+
97
+ Consider the following component class:
98
+
99
+ ```app/components/emphasized-paragraph.js
100
+ import Component from '@ember/component';
101
+
102
+ export default class extends Component {
103
+ tagName = 'em';
104
+ }
105
+ ```
106
+
107
+ When invoked, this component would produce output that looks something like
108
+ this:
109
+
110
+ ```html
111
+ <em id="ember1" class="ember-view"></em>
112
+ ```
113
+
114
+ ### HTML `class` Attribute
115
+
116
+ The HTML `class` attribute of a component's tag can be set by providing a
117
+ `classNames` property that is set to an array of strings:
118
+
119
+ ```app/components/my-widget.js
120
+ import Component from '@ember/component';
121
+
122
+ export default class extends Component {
123
+ classNames = ['my-class', 'my-other-class'];
124
+ }
125
+ ```
126
+
127
+ Invoking this component will produce output that looks like this:
128
+
129
+ ```html
130
+ <div id="ember1" class="ember-view my-class my-other-class"></div>
131
+ ```
132
+
133
+ `class` attribute values can also be set by providing a `classNameBindings`
134
+ property set to an array of properties names for the component. The return
135
+ value of these properties will be added as part of the value for the
136
+ components's `class` attribute. These properties can be computed properties:
137
+
138
+ ```app/components/my-widget.js
139
+ import Component from '@ember/component';
140
+ import { computed } from '@ember/object';
141
+
142
+ export default class extends Component {
143
+ classNames = ['my-class', 'my-other-class'];
144
+ classNameBindings = ['propertyA', 'propertyB'];
145
+
146
+ propertyA = 'from-a';
147
+
148
+ get propertyB {
149
+ if (someLogic) { return 'from-b'; }
150
+ }
151
+ }
152
+ ```
153
+
154
+ Invoking this component will produce HTML that looks like:
155
+
156
+ ```html
157
+ <div id="ember1" class="ember-view my-class my-other-class from-a from-b"></div>
158
+ ```
159
+
160
+ Note that `classNames` and `classNameBindings` is in addition to the `class`
161
+ attribute passed with the angle bracket invocation syntax. Therefore, if this
162
+ component was invoked like so:
163
+
164
+ ```handlebars
165
+ <MyWidget class="from-invocation" />
166
+ ```
167
+
168
+ The resulting HTML will look similar to this:
169
+
170
+ ```html
171
+ <div id="ember1" class="from-invocation ember-view my-class my-other-class from-a from-b"></div>
172
+ ```
173
+
174
+ If the value of a class name binding returns a boolean the property name
175
+ itself will be used as the class name if the property is true. The class name
176
+ will not be added if the value is `false` or `undefined`.
177
+
178
+ ```app/components/my-widget.js
179
+ import Component from '@ember/component';
180
+
181
+ export default class extends Component {
182
+ classNameBindings = ['hovered'];
183
+
184
+ hovered = true;
185
+ }
186
+ ```
187
+
188
+ Invoking this component will produce HTML that looks like:
189
+
190
+ ```html
191
+ <div id="ember1" class="ember-view hovered"></div>
192
+ ```
193
+
194
+ ### Custom Class Names for Boolean Values
195
+
196
+ When using boolean class name bindings you can supply a string value other
197
+ than the property name for use as the `class` HTML attribute by appending the
198
+ preferred value after a ":" character when defining the binding:
199
+
200
+ ```app/components/my-widget.js
201
+ import Component from '@ember/component';
202
+
203
+ export default class extends Component {
204
+ classNameBindings = ['awesome:so-very-cool'];
205
+
206
+ awesome = true;
207
+ }
208
+ ```
209
+
210
+ Invoking this component will produce HTML that looks like:
211
+
212
+ ```html
213
+ <div id="ember1" class="ember-view so-very-cool"></div>
214
+ ```
215
+
216
+ Boolean value class name bindings whose property names are in a
217
+ camelCase-style format will be converted to a dasherized format:
218
+
219
+ ```app/components/my-widget.js
220
+ import Component from '@ember/component';
221
+
222
+ export default class extends Component {
223
+ classNameBindings = ['isUrgent'];
224
+
225
+ isUrgent = true;
226
+ }
227
+ ```
228
+
229
+ Invoking this component will produce HTML that looks like:
230
+
231
+ ```html
232
+ <div id="ember1" class="ember-view is-urgent"></div>
233
+ ```
234
+
235
+ Class name bindings can also refer to object values that are found by
236
+ traversing a path relative to the component itself:
237
+
238
+ ```app/components/my-widget.js
239
+ import Component from '@ember/component';
240
+ import EmberObject from '@ember/object';
241
+
242
+ export default class extends Component {
243
+ classNameBindings = ['messages.empty'];
244
+
245
+ messages = EmberObject.create({
246
+ empty: true
247
+ });
248
+ }
249
+ ```
250
+
251
+ Invoking this component will produce HTML that looks like:
252
+
253
+ ```html
254
+ <div id="ember1" class="ember-view empty"></div>
255
+ ```
256
+
257
+ If you want to add a class name for a property which evaluates to true and and
258
+ a different class name if it evaluates to false, you can pass a binding like
259
+ this:
260
+
261
+ ```app/components/my-widget.js
262
+ import Component from '@ember/component';
263
+
264
+ export default class extends Component {
265
+ classNameBindings = ['isEnabled:enabled:disabled'];
266
+
267
+ isEnabled = true;
268
+ }
269
+ ```
270
+
271
+ Invoking this component will produce HTML that looks like:
272
+
273
+ ```html
274
+ <div id="ember1" class="ember-view enabled"></div>
275
+ ```
276
+
277
+ When isEnabled is `false`, the resulting HTML representation looks like this:
278
+
279
+ ```html
280
+ <div id="ember1" class="ember-view disabled"></div>
281
+ ```
282
+
283
+ This syntax offers the convenience to add a class if a property is `false`:
284
+
285
+ ```app/components/my-widget.js
286
+ import Component from '@ember/component';
287
+
288
+ // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false
289
+ export default class extends Component {
290
+ classNameBindings = ['isEnabled::disabled'];
291
+
292
+ isEnabled = true;
293
+ }
294
+ ```
295
+
296
+ Invoking this component when the `isEnabled` property is true will produce
297
+ HTML that looks like:
298
+
299
+ ```html
300
+ <div id="ember1" class="ember-view"></div>
301
+ ```
302
+
303
+ Invoking it when the `isEnabled` property on the component is `false` will
304
+ produce HTML that looks like:
305
+
306
+ ```html
307
+ <div id="ember1" class="ember-view disabled"></div>
308
+ ```
309
+
310
+ Updates to the value of a class name binding will result in automatic update
311
+ of the HTML `class` attribute in the component's rendered HTML
312
+ representation. If the value becomes `false` or `undefined` the class name
313
+ will be removed.
314
+
315
+ Both `classNames` and `classNameBindings` are concatenated properties. See
316
+ [EmberObject](/ember/release/classes/EmberObject) documentation for more
317
+ information about concatenated properties.
318
+
319
+ ### Other HTML Attributes
320
+
321
+ The HTML attribute section of a component's tag can be set by providing an
322
+ `attributeBindings` property set to an array of property names on the
323
+ component. The return value of these properties will be used as the value of
324
+ the component's HTML associated attribute:
325
+
326
+ ```app/components/my-anchor.js
327
+ import Component from '@ember/component';
328
+
329
+ export default class extends Component {
330
+ tagName = 'a';
331
+ attributeBindings = ['href'];
332
+
333
+ href = 'http://google.com';
334
+ };
335
+ ```
336
+
337
+ Invoking this component will produce HTML that looks like:
338
+
339
+ ```html
340
+ <a id="ember1" class="ember-view" href="http://google.com"></a>
341
+ ```
342
+
343
+ One property can be mapped on to another by placing a ":" between the source
344
+ property and the destination property:
345
+
346
+ ```app/components/my-anchor.js
347
+ import Component from '@ember/component';
348
+
349
+ export default class extends Component {
350
+ tagName = 'a';
351
+ attributeBindings = ['url:href'];
352
+
353
+ url = 'http://google.com';
354
+ };
355
+ ```
356
+
357
+ Invoking this component will produce HTML that looks like:
358
+
359
+ ```html
360
+ <a id="ember1" class="ember-view" href="http://google.com"></a>
361
+ ```
362
+
363
+ HTML attributes passed with angle bracket invocations will take precedence
364
+ over those specified in `attributeBindings`. Therefore, if this component was
365
+ invoked like so:
366
+
367
+ ```handlebars
368
+ <MyAnchor href="http://bing.com" @url="http://google.com" />
369
+ ```
370
+
371
+ The resulting HTML will looks like this:
372
+
373
+ ```html
374
+ <a id="ember1" class="ember-view" href="http://bing.com"></a>
375
+ ```
376
+
377
+ Note that the `href` attribute is ultimately set to `http://bing.com`, despite
378
+ it having attribute binidng to the `url` property, which was set to
379
+ `http://google.com`.
380
+
381
+ Namespaced attributes (e.g. `xlink:href`) are supported, but have to be
382
+ mapped, since `:` is not a valid character for properties in Javascript:
383
+
384
+ ```app/components/my-use.js
385
+ import Component from '@ember/component';
386
+
387
+ export default class extends Component {
388
+ tagName = 'use';
389
+ attributeBindings = ['xlinkHref:xlink:href'];
390
+
391
+ xlinkHref = '#triangle';
392
+ };
393
+ ```
394
+
395
+ Invoking this component will produce HTML that looks like:
396
+
397
+ ```html
398
+ <use xlink:href="#triangle"></use>
399
+ ```
400
+
401
+ If the value of a property monitored by `attributeBindings` is a boolean, the
402
+ attribute will be present or absent depending on the value:
403
+
404
+ ```app/components/my-text-input.js
405
+ import Component from '@ember/component';
406
+
407
+ export default class extends Component {
408
+ tagName = 'input';
409
+ attributeBindings = ['disabled'];
410
+
411
+ disabled = false;
412
+ };
413
+ ```
414
+
415
+ Invoking this component will produce HTML that looks like:
416
+
417
+ ```html
418
+ <input id="ember1" class="ember-view" />
419
+ ```
420
+
421
+ `attributeBindings` can refer to computed properties:
422
+
423
+ ```app/components/my-text-input.js
424
+ import Component from '@ember/component';
425
+ import { computed } from '@ember/object';
426
+
427
+ export default class extends Component {
428
+ tagName = 'input';
429
+ attributeBindings = ['disabled'];
430
+
431
+ get disabled() {
432
+ if (someLogic) {
433
+ return true;
434
+ } else {
435
+ return false;
436
+ }
437
+ }
438
+ };
439
+ ```
440
+
441
+ To prevent setting an attribute altogether, use `null` or `undefined` as the
442
+ value of the property used in `attributeBindings`:
443
+
444
+ ```app/components/my-text-input.js
445
+ import Component from '@ember/component';
446
+
447
+ export default class extends Component {
448
+ tagName = 'form';
449
+ attributeBindings = ['novalidate'];
450
+ novalidate = null;
451
+ };
452
+ ```
453
+
454
+ Updates to the property of an attribute binding will result in automatic
455
+ update of the HTML attribute in the component's HTML output.
456
+
457
+ `attributeBindings` is a concatenated property. See
458
+ [EmberObject](/ember/release/classes/EmberObject) documentation for more
459
+ information about concatenated properties.
460
+
461
+ ## Layouts
462
+
463
+ The `layout` property can be used to dynamically specify a template associated
464
+ with a component class, instead of relying on Ember to link together a
465
+ component class and a template based on file names.
466
+
467
+ In general, applications should not use this feature, but it's commonly used
468
+ in addons for historical reasons.
469
+
470
+ The `layout` property should be set to the default export of a template
471
+ module, which is the name of a template file without the `.hbs` extension.
472
+
473
+ ```app/templates/components/person-profile.hbs
474
+ <h1>Person's Title</h1>
475
+ <div class='details'>{{yield}}</div>
476
+ ```
477
+
478
+ ```app/components/person-profile.js
479
+ import Component from '@ember/component';
480
+ import layout from '../templates/components/person-profile';
481
+
482
+ export default class extends Component {
483
+ layout = layout;
484
+ }
485
+ ```
486
+
487
+ If you invoke the component:
488
+
489
+ ```handlebars
490
+ <PersonProfile>
491
+ <h2>Chief Basket Weaver</h2>
492
+ <h3>Fisherman Industries</h3>
493
+ </PersonProfile>
494
+ ```
495
+
496
+ or
497
+
498
+ ```handlebars
499
+ {{#person-profile}}
500
+ <h2>Chief Basket Weaver</h2>
501
+ <h3>Fisherman Industries</h3>
502
+ {{/person-profile}}
503
+ ```
504
+
505
+ It will result in the following HTML output:
506
+
507
+ ```html
508
+ <h1>Person's Title</h1>
509
+ <div class="details">
510
+ <h2>Chief Basket Weaver</h2>
511
+ <h3>Fisherman Industries</h3>
512
+ </div>
513
+ ```
514
+
515
+ ## Handling Browser Events
516
+
517
+ There are two ways to handle user-initiated events:
518
+
519
+ ### Using the `on` modifier to capture browser events
520
+
521
+ In a component's template, you can attach an event handler to any element with the `on` modifier:
522
+
523
+ ```handlebars
524
+ <button {{on 'click' this.doSomething}} />
525
+ ```
526
+
527
+ This will call the function on your component:
528
+
529
+ ```js
530
+ import Component from '@ember/component';
531
+
532
+ export default class ExampleComponent extends Component {
533
+ doSomething = (event) => {
534
+ // `event` is the native click Event
535
+ console.log('clicked on the button');
536
+ };
537
+ }
538
+ ```
539
+
540
+ See the [Guide on Component event
541
+ handlers](https://guides.emberjs.com/release/components/component-state-and-actions/#toc_html-modifiers-and-actions)
542
+ and the [API docs for `on`](../Ember.Templates.helpers/methods/on?anchor=on)
543
+ for more details.
544
+
545
+ ### Event Handler Methods
546
+
547
+ Components can also respond to user-initiated events by implementing a method
548
+ that matches the event name. This approach is appropriate when the same event
549
+ should be handled by all instances of the same component.
550
+
551
+ An event object will be passed as the argument to the event handler method.
552
+
553
+ ```app/components/my-widget.js
554
+ import Component from '@ember/component';
555
+
556
+ export default class extends Component {
557
+ click(event) {
558
+ // `event.target` is either the component's element or one of its children
559
+ let tag = event.target.tagName.toLowerCase();
560
+ console.log('clicked on a `<${tag}>` HTML element!');
561
+ }
562
+ }
563
+ ```
564
+
565
+ In this example, whenever the user clicked anywhere inside the component, it
566
+ will log a message to the console.
567
+
568
+ It is possible to handle event types other than `click` by implementing the
569
+ following event handler methods. In addition, custom events can be registered
570
+ by using `Application.customEvents`.
571
+
572
+ Touch events:
573
+
574
+ * `touchStart`
575
+ * `touchMove`
576
+ * `touchEnd`
577
+ * `touchCancel`
578
+
579
+ Keyboard events:
580
+
581
+ * `keyDown`
582
+ * `keyUp`
583
+ * `keyPress`
584
+
585
+ Mouse events:
586
+
587
+ * `mouseDown`
588
+ * `mouseUp`
589
+ * `contextMenu`
590
+ * `click`
591
+ * `doubleClick`
592
+ * `focusIn`
593
+ * `focusOut`
594
+
595
+ Form events:
596
+
597
+ * `submit`
598
+ * `change`
599
+ * `focusIn`
600
+ * `focusOut`
601
+ * `input`
602
+
603
+ Drag and drop events:
604
+
605
+ * `dragStart`
606
+ * `drag`
607
+ * `dragEnter`
608
+ * `dragLeave`
609
+ * `dragOver`
610
+ * `dragEnd`
611
+ * `drop`
612
+
613
+ @class Component
614
+ @extends Ember.CoreView
615
+ @uses Ember.TargetActionSupport
616
+ @uses Ember.ActionSupport
617
+ @public
618
+ */
619
+ // This type param is used in the class, so must appear here.
620
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
621
+
622
+ class Component extends CoreView.extend(TargetActionSupport, ActionSupport, {
623
+ // These need to be overridable via extend/create but should still
624
+ // have a default. Defining them here is the best way to achieve that.
625
+ didReceiveAttrs() {},
626
+ didRender() {},
627
+ didUpdate() {},
628
+ didUpdateAttrs() {},
629
+ willRender() {},
630
+ willUpdate() {}
631
+ }, {
632
+ concatenatedProperties: ['attributeBindings', 'classNames', 'classNameBindings'],
633
+ classNames: EMPTY_ARRAY,
634
+ classNameBindings: EMPTY_ARRAY
635
+ }) {
636
+ isComponent = true;
637
+
638
+ // SAFETY: this has no runtime existence whatsoever; it is a "phantom type"
639
+ // here to preserve the type param.
640
+
641
+ // SAFTEY: This is set in `init`.
642
+
643
+ /**
644
+ Standard CSS class names to apply to the view's outer element. This
645
+ property automatically inherits any class names defined by the view's
646
+ superclasses as well.
647
+ @property classNames
648
+ @type Array
649
+ @default ['ember-view']
650
+ @public
651
+ */
652
+
653
+ /**
654
+ A list of properties of the view to apply as class names. If the property
655
+ is a string value, the value of that string will be applied as a class
656
+ name.
657
+ ```javascript
658
+ // Applies the 'high' class to the view element
659
+ import Component from '@ember/component';
660
+ Component.extend({
661
+ classNameBindings: ['priority'],
662
+ priority: 'high'
663
+ });
664
+ ```
665
+ If the value of the property is a Boolean, the name of that property is
666
+ added as a dasherized class name.
667
+ ```javascript
668
+ // Applies the 'is-urgent' class to the view element
669
+ import Component from '@ember/component';
670
+ Component.extend({
671
+ classNameBindings: ['isUrgent'],
672
+ isUrgent: true
673
+ });
674
+ ```
675
+ If you would prefer to use a custom value instead of the dasherized
676
+ property name, you can pass a binding like this:
677
+ ```javascript
678
+ // Applies the 'urgent' class to the view element
679
+ import Component from '@ember/component';
680
+ Component.extend({
681
+ classNameBindings: ['isUrgent:urgent'],
682
+ isUrgent: true
683
+ });
684
+ ```
685
+ If you would like to specify a class that should only be added when the
686
+ property is false, you can declare a binding like this:
687
+ ```javascript
688
+ // Applies the 'disabled' class to the view element
689
+ import Component from '@ember/component';
690
+ Component.extend({
691
+ classNameBindings: ['isEnabled::disabled'],
692
+ isEnabled: false
693
+ });
694
+ ```
695
+ This list of properties is inherited from the component's superclasses as well.
696
+ @property classNameBindings
697
+ @type Array
698
+ @default []
699
+ @public
700
+ */
701
+
702
+ init(properties) {
703
+ super.init(properties);
704
+
705
+ // Handle methods from ViewMixin.
706
+ // The native class inheritance will not work for mixins. To work around this,
707
+ // we copy the existing rerender method provided by the mixin and swap in the
708
+ // new rerender method from our class.
709
+ this._superRerender = this.rerender;
710
+ this.rerender = this._rerender;
711
+ this[IS_DISPATCHING_ATTRS] = false;
712
+ this[DIRTY_TAG] = createTag();
713
+ this[BOUNDS] = null;
714
+ const eventDispatcher = this._dispatcher;
715
+ if (eventDispatcher) {
716
+ let lazyEventsProcessedForComponentClass = lazyEventsProcessed.get(eventDispatcher);
717
+ if (!lazyEventsProcessedForComponentClass) {
718
+ lazyEventsProcessedForComponentClass = new WeakSet();
719
+ lazyEventsProcessed.set(eventDispatcher, lazyEventsProcessedForComponentClass);
720
+ }
721
+ let proto = Object.getPrototypeOf(this);
722
+ if (!lazyEventsProcessedForComponentClass.has(proto)) {
723
+ let lazyEvents = eventDispatcher.lazyEvents;
724
+ lazyEvents.forEach((mappedEventName, event) => {
725
+ if (mappedEventName !== null && typeof this[mappedEventName] === 'function') {
726
+ eventDispatcher.setupHandlerForBrowserEvent(event);
727
+ }
728
+ });
729
+ lazyEventsProcessedForComponentClass.add(proto);
730
+ }
731
+ }
732
+ if (!this.elementId && this.tagName !== '') {
733
+ this.elementId = guidFor(this);
734
+ }
735
+ }
736
+ __dispatcher;
737
+ get _dispatcher() {
738
+ if (this.__dispatcher === undefined) {
739
+ let owner = getOwner(this);
740
+ if (owner.lookup('-environment:main').isInteractive) {
741
+ let dispatcher = owner.lookup('event_dispatcher:main');
742
+ this.__dispatcher = dispatcher;
743
+ } else {
744
+ // In FastBoot we have no EventDispatcher. Set to null to not try again to look it up.
745
+ this.__dispatcher = null;
746
+ }
747
+ }
748
+ return this.__dispatcher;
749
+ }
750
+ on(name, target, method) {
751
+ this._dispatcher?.setupHandlerForEmberEvent(name);
752
+ // The `on` method here comes from the Evented mixin. Since this mixin
753
+ // is applied to the parent of this class, however, we are still able
754
+ // to use `super`.
755
+ return super.on(name, target, method);
756
+ }
757
+
758
+ // Changed to `rerender` on init
759
+ _rerender() {
760
+ DIRTY_TAG$1(this[DIRTY_TAG]);
761
+ this._superRerender();
762
+ }
763
+ [PROPERTY_DID_CHANGE](key, value) {
764
+ if (this[IS_DISPATCHING_ATTRS]) {
765
+ return;
766
+ }
767
+ let args = getComponentCapturedArgs(this);
768
+ let reference = args !== undefined ? args[key] : undefined;
769
+ if (reference !== undefined && isUpdatableRef(reference)) {
770
+ updateRef(reference, arguments.length === 2 ? value : get(this, key));
771
+ }
772
+ }
773
+ getAttr(key) {
774
+ // TODO Intimate API should be deprecated
775
+ return this.get(key);
776
+ }
777
+
778
+ /**
779
+ Normally, Ember's component model is "write-only". The component takes a
780
+ bunch of attributes that it got passed in, and uses them to render its
781
+ template.
782
+ One nice thing about this model is that if you try to set a value to the
783
+ same thing as last time, Ember (through HTMLBars) will avoid doing any
784
+ work on the DOM.
785
+ This is not just a performance optimization. If an attribute has not
786
+ changed, it is important not to clobber the element's "hidden state".
787
+ For example, if you set an input's `value` to the same value as before,
788
+ it will clobber selection state and cursor position. In other words,
789
+ setting an attribute is not **always** idempotent.
790
+ This method provides a way to read an element's attribute and also
791
+ update the last value Ember knows about at the same time. This makes
792
+ setting an attribute idempotent.
793
+ In particular, what this means is that if you get an `<input>` element's
794
+ `value` attribute and then re-render the template with the same value,
795
+ it will avoid clobbering the cursor and selection position.
796
+ Since most attribute sets are idempotent in the browser, you typically
797
+ can get away with reading attributes using jQuery, but the most reliable
798
+ way to do so is through this method.
799
+ @method readDOMAttr
800
+ @param {String} name the name of the attribute
801
+ @return String
802
+ @public
803
+ */
804
+ readDOMAttr(name) {
805
+ // TODO revisit this
806
+ let _element = getViewElement(this);
807
+ let element = _element;
808
+ let isSVG = element.namespaceURI === 'http://www.w3.org/2000/svg';
809
+ let {
810
+ type,
811
+ normalized
812
+ } = normalizeProperty(element, name);
813
+ if (isSVG || type === 'attr') {
814
+ return element.getAttribute(normalized);
815
+ }
816
+ return element[normalized];
817
+ }
818
+
819
+ // --- Declarations which support mixins ---
820
+ // We use `declare` on these properties, even though they are optional, so
821
+ // that they do not get created on the class *at all* when emitting the
822
+ // transpiled code. Otherwise, since declared class properties are equivalent
823
+ // to calling `defineProperty` in the class constructor, they would "stomp"
824
+ // the properties supplied by mixins.
825
+
826
+ /**
827
+ A list of properties of the view to apply as attributes. If the property
828
+ is a string value, the value of that string will be applied as the value
829
+ for an attribute of the property's name.
830
+ The following example creates a tag like `<div priority="high" />`.
831
+ ```app/components/my-component.js
832
+ import Component from '@ember/component';
833
+ export default Component.extend({
834
+ attributeBindings: ['priority'],
835
+ priority: 'high'
836
+ });
837
+ ```
838
+ If the value of the property is a Boolean, the attribute is treated as
839
+ an HTML Boolean attribute. It will be present if the property is `true`
840
+ and omitted if the property is `false`.
841
+ The following example creates markup like `<div visible />`.
842
+ ```app/components/my-component.js
843
+ import Component from '@ember/component';
844
+ export default Component.extend({
845
+ attributeBindings: ['visible'],
846
+ visible: true
847
+ });
848
+ ```
849
+ If you would prefer to use a custom value instead of the property name,
850
+ you can create the same markup as the last example with a binding like
851
+ this:
852
+ ```app/components/my-component.js
853
+ import Component from '@ember/component';
854
+ export default Component.extend({
855
+ attributeBindings: ['isVisible:visible'],
856
+ isVisible: true
857
+ });
858
+ ```
859
+ This list of attributes is inherited from the component's superclasses,
860
+ as well.
861
+ @property attributeBindings
862
+ @type Array
863
+ @default []
864
+ @public
865
+ */
866
+
867
+ /**
868
+ Enables components to take a list of parameters as arguments.
869
+ For example, a component that takes two parameters with the names
870
+ `name` and `age`:
871
+ ```app/components/my-component.js
872
+ import Component from '@ember/component';
873
+ export default class MyComponent extends Component {
874
+ static positionalParams = ['name', 'age'];
875
+ }
876
+ ```
877
+ It can then be invoked like this:
878
+ ```hbs
879
+ {{my-component "John" 38}}
880
+ ```
881
+ The parameters can be referred to just like named parameters:
882
+ ```hbs
883
+ Name: {{name}}, Age: {{age}}.
884
+ ```
885
+ Using a string instead of an array allows for an arbitrary number of
886
+ parameters:
887
+ ```app/components/my-component.js
888
+ import Component from '@ember/component';
889
+ export default class MyComponent extends Component {
890
+ static positionalParams = 'names';
891
+ }
892
+ ```
893
+ It can then be invoked like this:
894
+ ```hbs
895
+ {{my-component "John" "Michael" "Scott"}}
896
+ ```
897
+ The parameters can then be referred to by enumerating over the list:
898
+ ```hbs
899
+ {{#each names as |name|}}{{name}}{{/each}}
900
+ ```
901
+ @static
902
+ @public
903
+ @property positionalParams
904
+ @since 1.13.0
905
+ */ /**
906
+ Enables components to take a list of parameters as arguments.
907
+ For example, a component that takes two parameters with the names
908
+ `name` and `age`:
909
+ ```app/components/my-component.js
910
+ import Component from '@ember/component';
911
+ export default class MyComponent extends Component {
912
+ static positionalParams = ['name', 'age'];
913
+ }
914
+ ```
915
+ It can then be invoked like this:
916
+ ```hbs
917
+ {{my-component "John" 38}}
918
+ ```
919
+ The parameters can be referred to just like named parameters:
920
+ ```hbs
921
+ Name: {{name}}, Age: {{age}}.
922
+ ```
923
+ Using a string instead of an array allows for an arbitrary number of
924
+ parameters:
925
+ ```app/components/my-component.js
926
+ import Component from '@ember/component';
927
+ export default class MyComponent extends Component {
928
+ static positionalParams = 'names';
929
+ }
930
+ ```
931
+ It can then be invoked like this:
932
+ ```hbs
933
+ {{my-component "John" "Michael" "Scott"}}
934
+ ```
935
+ The parameters can then be referred to by enumerating over the list:
936
+ ```hbs
937
+ {{#each names as |name|}}{{name}}{{/each}}
938
+ ```
939
+ @static
940
+ @public
941
+ @property positionalParams
942
+ @since 1.13.0
943
+ */
944
+
945
+ /**
946
+ Layout can be used to wrap content in a component.
947
+ @property layout
948
+ @type Function
949
+ @public
950
+ */
951
+
952
+ /**
953
+ The name of the layout to lookup if no layout is provided.
954
+ By default `Component` will lookup a template with this name in
955
+ `Ember.TEMPLATES` (a shared global object).
956
+ @property layoutName
957
+ @type String
958
+ @default undefined
959
+ @private
960
+ */
961
+
962
+ /**
963
+ The WAI-ARIA role of the control represented by this view. For example, a
964
+ button may have a role of type 'button', or a pane may have a role of
965
+ type 'alertdialog'. This property is used by assistive software to help
966
+ visually challenged users navigate rich web applications.
967
+ The full list of valid WAI-ARIA roles is available at:
968
+ [https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization)
969
+ @property ariaRole
970
+ @type String
971
+ @default undefined
972
+ @public
973
+ */
974
+
975
+ /**
976
+ Array of child views. You should never edit this array directly.
977
+ @property childViews
978
+ @type Array
979
+ @default []
980
+ @private
981
+ */
982
+ // @ts-expect-error TODO: Fix these types
983
+ get childViews() {
984
+ return getChildViews(this);
985
+ }
986
+ static {
987
+ decorateMethodV2(this.prototype, "childViews", [nativeDescDecorator({
988
+ configurable: false,
989
+ enumerable: false
990
+ })]);
991
+ }
992
+ appendChild(view) {
993
+ addChildView(this, view);
994
+ }
995
+ _transitionTo(state) {
996
+ let priorState = this._currentState;
997
+ let currentState = this._currentState = this._states[state];
998
+ this._state = state;
999
+ if (priorState && priorState.exit) {
1000
+ priorState.exit(this);
1001
+ }
1002
+ if (currentState.enter) {
1003
+ currentState.enter(this);
1004
+ }
1005
+ }
1006
+
1007
+ // Begin ViewMixin
1008
+
1009
+ // ..........................................................
1010
+ // TEMPLATE SUPPORT
1011
+ //
1012
+
1013
+ /**
1014
+ Return the nearest ancestor that is an instance of the provided
1015
+ class or mixin.
1016
+ @method nearestOfType
1017
+ @param {Class,Mixin} klass Subclass of Ember.View (or Ember.View itself),
1018
+ or an instance of Mixin.
1019
+ @return Ember.View
1020
+ @deprecated use `yield` and contextual components for composition instead.
1021
+ @private
1022
+ */
1023
+ nearestOfType(klass) {
1024
+ let view = this.parentView;
1025
+ while (view) {
1026
+ if (klass.detect(view.constructor)) {
1027
+ return view;
1028
+ }
1029
+ view = view.parentView;
1030
+ }
1031
+ return;
1032
+ }
1033
+
1034
+ /**
1035
+ Return the nearest ancestor that has a given property.
1036
+ @method nearestWithProperty
1037
+ @param {String} property A property name
1038
+ @return Ember.View
1039
+ @deprecated use `yield` and contextual components for composition instead.
1040
+ @private
1041
+ */
1042
+ nearestWithProperty(property) {
1043
+ let view = this.parentView;
1044
+ while (view) {
1045
+ if (property in view) {
1046
+ return view;
1047
+ }
1048
+ view = view.parentView;
1049
+ }
1050
+ return;
1051
+ }
1052
+
1053
+ /**
1054
+ Renders the view again. This will work regardless of whether the
1055
+ view is already in the DOM or not. If the view is in the DOM, the
1056
+ rendering process will be deferred to give bindings a chance
1057
+ to synchronize.
1058
+ If children were added during the rendering process using `appendChild`,
1059
+ `rerender` will remove them, because they will be added again
1060
+ if needed by the next `render`.
1061
+ In general, if the display of your view changes, you should modify
1062
+ the DOM element directly instead of manually calling `rerender`, which can
1063
+ be slow.
1064
+ @method rerender
1065
+ @public
1066
+ */
1067
+ rerender() {
1068
+ return this._currentState.rerender(this);
1069
+ }
1070
+
1071
+ // ..........................................................
1072
+ // ELEMENT SUPPORT
1073
+ //
1074
+
1075
+ /**
1076
+ Returns the current DOM element for the view.
1077
+ @property element
1078
+ @type DOMElement
1079
+ @public
1080
+ */
1081
+ // @ts-expect-error The types are not correct here
1082
+ get element() {
1083
+ return this.renderer.getElement(this);
1084
+ }
1085
+
1086
+ /**
1087
+ Appends the view's element to the specified parent element.
1088
+ Note that this method just schedules the view to be appended; the DOM
1089
+ element will not be appended to the given element until all bindings have
1090
+ finished synchronizing.
1091
+ This is not typically a function that you will need to call directly when
1092
+ building your application. If you do need to use `appendTo`, be sure that
1093
+ the target element you are providing is associated with an `Application`
1094
+ and does not have an ancestor element that is associated with an Ember view.
1095
+ @method appendTo
1096
+ @param {String|DOMElement} A selector, element, HTML string
1097
+ @return {Ember.View} receiver
1098
+ @private
1099
+ */
1100
+ static {
1101
+ decorateMethodV2(this.prototype, "element", [nativeDescDecorator({
1102
+ configurable: false,
1103
+ enumerable: false
1104
+ })]);
1105
+ }
1106
+ appendTo(selector) {
1107
+ let target;
1108
+ if (hasDOM) {
1109
+ target = typeof selector === 'string' ? document.querySelector(selector) : selector;
1110
+ } else {
1111
+ target = selector;
1112
+ }
1113
+
1114
+ // SAFETY: SimpleElement is supposed to be a subset of Element so this _should_ be safe.
1115
+ // However, the types are more specific in some places which necessitates the `as`.
1116
+ this.renderer.appendTo(this, target);
1117
+ return this;
1118
+ }
1119
+
1120
+ /**
1121
+ Appends the view's element to the document body. If the view does
1122
+ not have an HTML representation yet
1123
+ the element will be generated automatically.
1124
+ If your application uses the `rootElement` property, you must append
1125
+ the view within that element. Rendering views outside of the `rootElement`
1126
+ is not supported.
1127
+ Note that this method just schedules the view to be appended; the DOM
1128
+ element will not be appended to the document body until all bindings have
1129
+ finished synchronizing.
1130
+ @method append
1131
+ @return {Ember.View} receiver
1132
+ @private
1133
+ */
1134
+ append() {
1135
+ return this.appendTo(document.body);
1136
+ }
1137
+
1138
+ /**
1139
+ The HTML `id` of the view's element in the DOM. You can provide this
1140
+ value yourself but it must be unique (just as in HTML):
1141
+ ```handlebars
1142
+ {{my-component elementId="a-really-cool-id"}}
1143
+ ```
1144
+ If not manually set a default value will be provided by the framework.
1145
+ Once rendered an element's `elementId` is considered immutable and you
1146
+ should never change it. If you need to compute a dynamic value for the
1147
+ `elementId`, you should do this when the component or element is being
1148
+ instantiated:
1149
+ ```app/components/my-component.js
1150
+ import Component from '@ember/component';
1151
+ export default Component.extend({
1152
+ init() {
1153
+ this._super(...arguments);
1154
+ let index = this.get('index');
1155
+ this.set('elementId', 'component-id' + index);
1156
+ }
1157
+ });
1158
+ ```
1159
+ @property elementId
1160
+ @type String
1161
+ @public
1162
+ */
1163
+
1164
+ /**
1165
+ Called when a view is going to insert an element into the DOM.
1166
+ @event willInsertElement
1167
+ @public
1168
+ */
1169
+ willInsertElement() {
1170
+ return this;
1171
+ }
1172
+
1173
+ /**
1174
+ Called when the element of the view has been inserted into the DOM.
1175
+ Override this function to do any set up that requires an element
1176
+ in the document body.
1177
+ When a view has children, didInsertElement will be called on the
1178
+ child view(s) first and on itself afterwards.
1179
+ @event didInsertElement
1180
+ @public
1181
+ */
1182
+ didInsertElement() {
1183
+ return this;
1184
+ }
1185
+
1186
+ /**
1187
+ Called when the view is about to rerender, but before anything has
1188
+ been torn down. This is a good opportunity to tear down any manual
1189
+ observers you have installed based on the DOM state
1190
+ @event willClearRender
1191
+ @public
1192
+ */
1193
+ willClearRender() {
1194
+ return this;
1195
+ }
1196
+
1197
+ /**
1198
+ You must call `destroy` on a view to destroy the view (and all of its
1199
+ child views). This will remove the view from any parent node, then make
1200
+ sure that the DOM element managed by the view can be released by the
1201
+ memory manager.
1202
+ @method destroy
1203
+ @private
1204
+ */
1205
+ destroy() {
1206
+ super.destroy();
1207
+ this._currentState.destroy(this);
1208
+ return this;
1209
+ }
1210
+
1211
+ /**
1212
+ Called when the element of the view is going to be destroyed. Override
1213
+ this function to do any teardown that requires an element, like removing
1214
+ event listeners.
1215
+ Please note: any property changes made during this event will have no
1216
+ effect on object observers.
1217
+ @event willDestroyElement
1218
+ @public
1219
+ */
1220
+ willDestroyElement() {
1221
+ return this;
1222
+ }
1223
+
1224
+ /**
1225
+ Called after the element of the view is destroyed.
1226
+ @event willDestroyElement
1227
+ @public
1228
+ */
1229
+ didDestroyElement() {
1230
+ return this;
1231
+ }
1232
+
1233
+ /**
1234
+ Called when the parentView property has changed.
1235
+ @event parentViewDidChange
1236
+ @private
1237
+ */
1238
+ parentViewDidChange() {
1239
+ return this;
1240
+ }
1241
+
1242
+ // ..........................................................
1243
+ // STANDARD RENDER PROPERTIES
1244
+ //
1245
+
1246
+ /**
1247
+ Tag name for the view's outer element. The tag name is only used when an
1248
+ element is first created. If you change the `tagName` for an element, you
1249
+ must destroy and recreate the view element.
1250
+ By default, the render buffer will use a `<div>` tag for views.
1251
+ If the tagName is `''`, the view will be tagless, with no outer element.
1252
+ Component properties that depend on the presence of an outer element, such
1253
+ as `classNameBindings` and `attributeBindings`, do not work with tagless
1254
+ components. Tagless components cannot implement methods to handle events,
1255
+ and their `element` property has a `null` value.
1256
+ @property tagName
1257
+ @type String
1258
+ @default null
1259
+ @public
1260
+ */
1261
+
1262
+ // We leave this null by default so we can tell the difference between
1263
+ // the default case and a user-specified tag.
1264
+
1265
+ // .......................................................
1266
+ // EVENT HANDLING
1267
+ //
1268
+
1269
+ /**
1270
+ Handle events from `EventDispatcher`
1271
+ @method handleEvent
1272
+ @param eventName {String}
1273
+ @param evt {Event}
1274
+ @private
1275
+ */
1276
+ handleEvent(eventName, evt) {
1277
+ return this._currentState.handleEvent(this, eventName, evt);
1278
+ }
1279
+
1280
+ // End ViewMixin
1281
+
1282
+ static isComponentFactory = true;
1283
+ static toString() {
1284
+ return '@ember/component';
1285
+ }
1286
+ }
1287
+
1288
+ // We continue to use reopenClass here so that positionalParams can be overridden with reopenClass in subclasses.
1289
+ Component.reopenClass({
1290
+ positionalParams: []
1291
+ });
1292
+ setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
16
1293
 
17
1294
  /**
18
1295
  Associate a class with a component manager (an object that is responsible for
@@ -29,4 +1306,4 @@ function setComponentManager(manager, obj) {
29
1306
  return setComponentManager$1(manager, obj);
30
1307
  }
31
1308
 
32
- export { setComponentManager };
1309
+ export { Component as default, setComponentManager };