@angular/material 17.1.0-next.0 → 17.1.0-next.2

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 (427) hide show
  1. package/autocomplete/_autocomplete-theme.scss +47 -14
  2. package/autocomplete/index.d.ts +14 -10
  3. package/badge/_badge-theme.scss +67 -35
  4. package/badge/index.d.ts +5 -5
  5. package/bottom-sheet/_bottom-sheet-theme.scss +51 -18
  6. package/bottom-sheet/index.d.ts +6 -6
  7. package/button/_button-theme.scss +4 -1
  8. package/button/_fab-theme.scss +65 -32
  9. package/button/_icon-button-theme.scss +89 -56
  10. package/button/index.d.ts +13 -13
  11. package/button-toggle/_button-toggle-theme.scss +66 -32
  12. package/button-toggle/index.d.ts +5 -5
  13. package/card/index.d.ts +18 -18
  14. package/checkbox/_checkbox-theme.scss +5 -10
  15. package/checkbox/index.d.ts +29 -6
  16. package/chips/_chips-theme.scss +64 -32
  17. package/chips/index.d.ts +46 -73
  18. package/core/_core-theme.scss +1 -3
  19. package/core/index.d.ts +62 -31
  20. package/core/internal-form-field/_internal-form-field-theme.scss +37 -0
  21. package/core/option/_optgroup-theme.scss +47 -16
  22. package/core/option/_option-theme.scss +54 -23
  23. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +18 -58
  24. package/core/tokens/m2/_index.scss +38 -0
  25. package/core/tokens/m2/mat/_full-pseudo-checkbox.scss +49 -0
  26. package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +43 -0
  27. package/core/tokens/m2/mdc/_form-field.scss +46 -0
  28. package/datepicker/_datepicker-theme.scss +70 -38
  29. package/datepicker/index.d.ts +88 -86
  30. package/dialog/_dialog-theme.scss +48 -17
  31. package/divider/_divider-theme.scss +49 -16
  32. package/divider/index.d.ts +4 -4
  33. package/esm2022/autocomplete/autocomplete-origin.mjs +5 -4
  34. package/esm2022/autocomplete/autocomplete-trigger.mjs +27 -11
  35. package/esm2022/autocomplete/autocomplete.mjs +6 -6
  36. package/esm2022/autocomplete/module.mjs +23 -7
  37. package/esm2022/autocomplete/public-api.mjs +3 -1
  38. package/esm2022/autocomplete/testing/autocomplete-harness.mjs +1 -1
  39. package/esm2022/badge/badge-module.mjs +6 -7
  40. package/esm2022/badge/badge.mjs +5 -4
  41. package/esm2022/badge/testing/badge-harness.mjs +1 -1
  42. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -6
  43. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +8 -7
  44. package/esm2022/bottom-sheet/bottom-sheet-ref.mjs +1 -1
  45. package/esm2022/bottom-sheet/bottom-sheet.mjs +5 -6
  46. package/esm2022/button/button-base.mjs +7 -7
  47. package/esm2022/button/button.mjs +9 -9
  48. package/esm2022/button/fab.mjs +17 -17
  49. package/esm2022/button/icon-button.mjs +9 -9
  50. package/esm2022/button/module.mjs +16 -12
  51. package/esm2022/button/testing/button-harness.mjs +1 -1
  52. package/esm2022/button-toggle/button-toggle-module.mjs +6 -7
  53. package/esm2022/button-toggle/button-toggle.mjs +10 -9
  54. package/esm2022/button-toggle/testing/button-toggle-harness.mjs +1 -1
  55. package/esm2022/card/card.mjs +57 -46
  56. package/esm2022/card/module.mjs +7 -8
  57. package/esm2022/checkbox/checkbox-required-validator.mjs +12 -4
  58. package/esm2022/checkbox/checkbox.mjs +39 -8
  59. package/esm2022/checkbox/module.mjs +17 -15
  60. package/esm2022/checkbox/testing/checkbox-harness.mjs +1 -1
  61. package/esm2022/chips/chip-action.mjs +5 -4
  62. package/esm2022/chips/chip-edit-input.mjs +5 -4
  63. package/esm2022/chips/chip-grid.mjs +39 -51
  64. package/esm2022/chips/chip-icons.mjs +13 -10
  65. package/esm2022/chips/chip-input.mjs +5 -4
  66. package/esm2022/chips/chip-listbox.mjs +5 -5
  67. package/esm2022/chips/chip-option.mjs +7 -7
  68. package/esm2022/chips/chip-row.mjs +7 -8
  69. package/esm2022/chips/chip-set.mjs +5 -5
  70. package/esm2022/chips/chip.mjs +5 -6
  71. package/esm2022/chips/module.mjs +7 -8
  72. package/esm2022/chips/testing/chip-edit-input-harness.mjs +1 -1
  73. package/esm2022/chips/testing/chip-input-harness.mjs +1 -1
  74. package/esm2022/chips/testing/chip-listbox-harness.mjs +1 -1
  75. package/esm2022/chips/testing/chip-option-harness.mjs +1 -1
  76. package/esm2022/chips/testing/chip-row-harness.mjs +1 -1
  77. package/esm2022/chips/tokens.mjs +8 -2
  78. package/esm2022/core/common-behaviors/color.mjs +1 -1
  79. package/esm2022/core/common-behaviors/common-module.mjs +5 -5
  80. package/esm2022/core/common-behaviors/error-state.mjs +50 -11
  81. package/esm2022/core/common-behaviors/index.mjs +2 -2
  82. package/esm2022/core/common-behaviors/initialized.mjs +1 -1
  83. package/esm2022/core/datetime/date-adapter.mjs +1 -1
  84. package/esm2022/core/datetime/index.mjs +9 -9
  85. package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
  86. package/esm2022/core/error/error-options.mjs +7 -7
  87. package/esm2022/core/internal-form-field/internal-form-field.mjs +29 -0
  88. package/esm2022/core/line/line.mjs +10 -10
  89. package/esm2022/core/option/index.mjs +6 -7
  90. package/esm2022/core/option/optgroup.mjs +5 -5
  91. package/esm2022/core/option/option.mjs +9 -9
  92. package/esm2022/core/private/ripple-loader.mjs +4 -4
  93. package/esm2022/core/public-api.mjs +2 -1
  94. package/esm2022/core/ripple/index.mjs +6 -7
  95. package/esm2022/core/ripple/ripple-event-manager.mjs +1 -1
  96. package/esm2022/core/ripple/ripple-renderer.mjs +1 -1
  97. package/esm2022/core/ripple/ripple.mjs +5 -4
  98. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +6 -7
  99. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
  100. package/esm2022/core/version.mjs +1 -1
  101. package/esm2022/datepicker/aria-accessible-name.mjs +1 -1
  102. package/esm2022/datepicker/calendar-body.mjs +6 -6
  103. package/esm2022/datepicker/calendar.mjs +12 -16
  104. package/esm2022/datepicker/date-range-input-parts.mjs +41 -20
  105. package/esm2022/datepicker/date-range-input.mjs +7 -7
  106. package/esm2022/datepicker/date-range-picker.mjs +5 -4
  107. package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
  108. package/esm2022/datepicker/date-selection-model.mjs +10 -10
  109. package/esm2022/datepicker/datepicker-actions.mjs +13 -11
  110. package/esm2022/datepicker/datepicker-base.mjs +23 -20
  111. package/esm2022/datepicker/datepicker-input-base.mjs +6 -5
  112. package/esm2022/datepicker/datepicker-input.mjs +5 -4
  113. package/esm2022/datepicker/datepicker-intl.mjs +4 -4
  114. package/esm2022/datepicker/datepicker-module.mjs +18 -16
  115. package/esm2022/datepicker/datepicker-toggle.mjs +10 -10
  116. package/esm2022/datepicker/datepicker.mjs +5 -4
  117. package/esm2022/datepicker/month-view.mjs +5 -6
  118. package/esm2022/datepicker/multi-year-view.mjs +5 -6
  119. package/esm2022/datepicker/testing/calendar-harness.mjs +1 -1
  120. package/esm2022/datepicker/testing/datepicker-input-harness-base.mjs +1 -1
  121. package/esm2022/datepicker/testing/datepicker-input-harness.mjs +1 -1
  122. package/esm2022/datepicker/testing/datepicker-trigger-harness-base.mjs +1 -1
  123. package/esm2022/datepicker/year-view.mjs +5 -6
  124. package/esm2022/dialog/dialog-container.mjs +7 -8
  125. package/esm2022/dialog/dialog-content-directives.mjs +13 -13
  126. package/esm2022/dialog/dialog-ref.mjs +1 -1
  127. package/esm2022/dialog/dialog.mjs +4 -4
  128. package/esm2022/dialog/module.mjs +5 -5
  129. package/esm2022/dialog/testing/dialog-opener.mjs +3 -3
  130. package/esm2022/divider/divider-module.mjs +6 -7
  131. package/esm2022/divider/divider.mjs +5 -5
  132. package/esm2022/expansion/accordion.mjs +5 -4
  133. package/esm2022/expansion/expansion-module.mjs +16 -9
  134. package/esm2022/expansion/expansion-panel-content.mjs +5 -4
  135. package/esm2022/expansion/expansion-panel-header.mjs +13 -11
  136. package/esm2022/expansion/expansion-panel.mjs +11 -11
  137. package/esm2022/expansion/testing/expansion-harness.mjs +1 -1
  138. package/esm2022/form-field/directives/error.mjs +5 -4
  139. package/esm2022/form-field/directives/floating-label.mjs +5 -4
  140. package/esm2022/form-field/directives/hint.mjs +5 -4
  141. package/esm2022/form-field/directives/label.mjs +5 -4
  142. package/esm2022/form-field/directives/line-ripple.mjs +5 -4
  143. package/esm2022/form-field/directives/notched-outline.mjs +5 -5
  144. package/esm2022/form-field/directives/prefix.mjs +5 -4
  145. package/esm2022/form-field/directives/suffix.mjs +5 -4
  146. package/esm2022/form-field/form-field-control.mjs +4 -4
  147. package/esm2022/form-field/form-field.mjs +14 -13
  148. package/esm2022/form-field/module.mjs +16 -18
  149. package/esm2022/form-field/testing/form-field-harness.mjs +1 -1
  150. package/esm2022/grid-list/grid-list-module.mjs +15 -11
  151. package/esm2022/grid-list/grid-list.mjs +5 -5
  152. package/esm2022/grid-list/grid-tile.mjs +21 -18
  153. package/esm2022/grid-list/testing/grid-list-harness.mjs +1 -1
  154. package/esm2022/grid-list/tile-coordinator.mjs +1 -1
  155. package/esm2022/grid-list/tile-styler.mjs +1 -1
  156. package/esm2022/icon/icon-module.mjs +6 -7
  157. package/esm2022/icon/icon-registry.mjs +4 -4
  158. package/esm2022/icon/icon.mjs +5 -5
  159. package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
  160. package/esm2022/icon/testing/icon-harness.mjs +1 -1
  161. package/esm2022/icon/trusted-types.mjs +1 -1
  162. package/esm2022/input/input.mjs +28 -30
  163. package/esm2022/input/module.mjs +6 -7
  164. package/esm2022/input/public-api.mjs +3 -1
  165. package/esm2022/input/testing/input-harness.mjs +1 -1
  166. package/esm2022/input/testing/native-select-harness.mjs +1 -1
  167. package/esm2022/list/action-list.mjs +5 -5
  168. package/esm2022/list/list-base.mjs +9 -7
  169. package/esm2022/list/list-item-sections.mjs +25 -19
  170. package/esm2022/list/list-module.mjs +15 -16
  171. package/esm2022/list/list-option.mjs +8 -8
  172. package/esm2022/list/list.mjs +10 -10
  173. package/esm2022/list/nav-list.mjs +5 -5
  174. package/esm2022/list/selection-list.mjs +5 -5
  175. package/esm2022/list/subheader.mjs +5 -4
  176. package/esm2022/list/testing/list-harness-base.mjs +1 -1
  177. package/esm2022/list/testing/list-item-harness-base.mjs +1 -1
  178. package/esm2022/list/testing/selection-list-harness.mjs +1 -1
  179. package/esm2022/menu/menu-content.mjs +5 -4
  180. package/esm2022/menu/menu-item.mjs +6 -6
  181. package/esm2022/menu/menu-trigger.mjs +12 -5
  182. package/esm2022/menu/menu.mjs +6 -6
  183. package/esm2022/menu/module.mjs +25 -7
  184. package/esm2022/menu/testing/menu-harness.mjs +1 -1
  185. package/esm2022/paginator/module.mjs +6 -7
  186. package/esm2022/paginator/paginator-intl.mjs +4 -4
  187. package/esm2022/paginator/paginator.mjs +10 -11
  188. package/esm2022/paginator/testing/paginator-harness.mjs +1 -1
  189. package/esm2022/progress-bar/module.mjs +6 -6
  190. package/esm2022/progress-bar/progress-bar.mjs +5 -5
  191. package/esm2022/progress-spinner/module.mjs +6 -7
  192. package/esm2022/progress-spinner/progress-spinner.mjs +6 -6
  193. package/esm2022/radio/module.mjs +6 -7
  194. package/esm2022/radio/radio.mjs +13 -9
  195. package/esm2022/radio/testing/radio-harness.mjs +1 -1
  196. package/esm2022/select/module.mjs +21 -7
  197. package/esm2022/select/public-api.mjs +5 -1
  198. package/esm2022/select/select.mjs +51 -42
  199. package/esm2022/select/testing/select-harness.mjs +1 -1
  200. package/esm2022/sidenav/drawer.mjs +13 -12
  201. package/esm2022/sidenav/sidenav-module.mjs +14 -10
  202. package/esm2022/sidenav/sidenav.mjs +13 -12
  203. package/esm2022/sidenav/testing/drawer-harness.mjs +1 -1
  204. package/esm2022/slide-toggle/module.mjs +17 -15
  205. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +12 -4
  206. package/esm2022/slide-toggle/slide-toggle.mjs +39 -8
  207. package/esm2022/slide-toggle/testing/slide-toggle-harness.mjs +1 -1
  208. package/esm2022/slider/module.mjs +19 -7
  209. package/esm2022/slider/slider-input.mjs +11 -8
  210. package/esm2022/slider/slider-thumb.mjs +5 -6
  211. package/esm2022/slider/slider.mjs +8 -8
  212. package/esm2022/slider/testing/slider-harness.mjs +1 -1
  213. package/esm2022/snack-bar/module.mjs +6 -6
  214. package/esm2022/snack-bar/simple-snack-bar.mjs +6 -8
  215. package/esm2022/snack-bar/snack-bar-container.mjs +7 -8
  216. package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
  217. package/esm2022/snack-bar/snack-bar-ref.mjs +1 -1
  218. package/esm2022/snack-bar/snack-bar.mjs +4 -4
  219. package/esm2022/snack-bar/testing/snack-bar-harness.mjs +1 -1
  220. package/esm2022/sort/sort-header-intl.mjs +4 -4
  221. package/esm2022/sort/sort-header.mjs +5 -5
  222. package/esm2022/sort/sort-module.mjs +6 -7
  223. package/esm2022/sort/sort.mjs +5 -4
  224. package/esm2022/sort/testing/sort-harness.mjs +1 -1
  225. package/esm2022/sort/testing/sort-header-harness.mjs +1 -1
  226. package/esm2022/stepper/step-content.mjs +5 -4
  227. package/esm2022/stepper/step-header.mjs +8 -8
  228. package/esm2022/stepper/step-label.mjs +5 -4
  229. package/esm2022/stepper/stepper-button.mjs +9 -7
  230. package/esm2022/stepper/stepper-icon.mjs +5 -4
  231. package/esm2022/stepper/stepper-intl.mjs +4 -4
  232. package/esm2022/stepper/stepper-module.mjs +17 -16
  233. package/esm2022/stepper/stepper.mjs +14 -16
  234. package/esm2022/stepper/testing/step-harness.mjs +1 -1
  235. package/esm2022/stepper/testing/stepper-harness.mjs +1 -1
  236. package/esm2022/table/cell.mjs +29 -22
  237. package/esm2022/table/module.mjs +7 -8
  238. package/esm2022/table/row.mjs +33 -24
  239. package/esm2022/table/table-data-source.mjs +1 -1
  240. package/esm2022/table/table.mjs +11 -11
  241. package/esm2022/table/testing/cell-harness.mjs +1 -1
  242. package/esm2022/table/testing/table-harness.mjs +1 -1
  243. package/esm2022/table/text-column.mjs +8 -6
  244. package/esm2022/tabs/ink-bar.mjs +1 -1
  245. package/esm2022/tabs/module.mjs +10 -43
  246. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  247. package/esm2022/tabs/tab-body.mjs +10 -8
  248. package/esm2022/tabs/tab-content.mjs +5 -4
  249. package/esm2022/tabs/tab-group.mjs +20 -13
  250. package/esm2022/tabs/tab-header.mjs +7 -7
  251. package/esm2022/tabs/tab-label-wrapper.mjs +5 -4
  252. package/esm2022/tabs/tab-label.mjs +5 -4
  253. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -17
  254. package/esm2022/tabs/tab.mjs +5 -5
  255. package/esm2022/tabs/testing/tab-group-harness.mjs +1 -1
  256. package/esm2022/tabs/testing/tab-nav-bar-harness.mjs +1 -1
  257. package/esm2022/toolbar/toolbar-module.mjs +6 -7
  258. package/esm2022/toolbar/toolbar.mjs +9 -8
  259. package/esm2022/tooltip/module.mjs +6 -7
  260. package/esm2022/tooltip/tooltip.mjs +18 -12
  261. package/esm2022/tree/data-source/flat-data-source.mjs +1 -1
  262. package/esm2022/tree/node.mjs +13 -10
  263. package/esm2022/tree/outlet.mjs +5 -4
  264. package/esm2022/tree/padding.mjs +5 -4
  265. package/esm2022/tree/testing/node-harness.mjs +1 -1
  266. package/esm2022/tree/testing/tree-harness.mjs +1 -1
  267. package/esm2022/tree/toggle.mjs +5 -4
  268. package/esm2022/tree/tree-module.mjs +7 -8
  269. package/esm2022/tree/tree.mjs +5 -6
  270. package/expansion/_expansion-theme.scss +56 -22
  271. package/expansion/index.d.ts +15 -15
  272. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  273. package/fesm2022/autocomplete.mjs +60 -27
  274. package/fesm2022/autocomplete.mjs.map +1 -1
  275. package/fesm2022/badge/testing.mjs.map +1 -1
  276. package/fesm2022/badge.mjs +9 -9
  277. package/fesm2022/badge.mjs.map +1 -1
  278. package/fesm2022/bottom-sheet.mjs +25 -26
  279. package/fesm2022/bottom-sheet.mjs.map +1 -1
  280. package/fesm2022/button/testing.mjs.map +1 -1
  281. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  282. package/fesm2022/button-toggle.mjs +14 -15
  283. package/fesm2022/button-toggle.mjs.map +1 -1
  284. package/fesm2022/button.mjs +53 -49
  285. package/fesm2022/button.mjs.map +1 -1
  286. package/fesm2022/card.mjs +62 -52
  287. package/fesm2022/card.mjs.map +1 -1
  288. package/fesm2022/checkbox/testing.mjs.map +1 -1
  289. package/fesm2022/checkbox.mjs +63 -22
  290. package/fesm2022/checkbox.mjs.map +1 -1
  291. package/fesm2022/chips/testing.mjs.map +1 -1
  292. package/fesm2022/chips.mjs +94 -96
  293. package/fesm2022/chips.mjs.map +1 -1
  294. package/fesm2022/core.mjs +135 -78
  295. package/fesm2022/core.mjs.map +1 -1
  296. package/fesm2022/datepicker/testing.mjs.map +1 -1
  297. package/fesm2022/datepicker.mjs +178 -146
  298. package/fesm2022/datepicker.mjs.map +1 -1
  299. package/fesm2022/dialog/testing.mjs +2 -2
  300. package/fesm2022/dialog/testing.mjs.map +1 -1
  301. package/fesm2022/dialog.mjs +25 -26
  302. package/fesm2022/dialog.mjs.map +1 -1
  303. package/fesm2022/divider.mjs +9 -10
  304. package/fesm2022/divider.mjs.map +1 -1
  305. package/fesm2022/expansion/testing.mjs.map +1 -1
  306. package/fesm2022/expansion.mjs +47 -36
  307. package/fesm2022/expansion.mjs.map +1 -1
  308. package/fesm2022/form-field/testing.mjs.map +1 -1
  309. package/fesm2022/form-field.mjs +61 -48
  310. package/fesm2022/form-field.mjs.map +1 -1
  311. package/fesm2022/grid-list/testing.mjs.map +1 -1
  312. package/fesm2022/grid-list.mjs +38 -31
  313. package/fesm2022/grid-list.mjs.map +1 -1
  314. package/fesm2022/icon/testing.mjs +7 -7
  315. package/fesm2022/icon/testing.mjs.map +1 -1
  316. package/fesm2022/icon.mjs +12 -13
  317. package/fesm2022/icon.mjs.map +1 -1
  318. package/fesm2022/input/testing.mjs.map +1 -1
  319. package/fesm2022/input.mjs +33 -35
  320. package/fesm2022/input.mjs.map +1 -1
  321. package/fesm2022/list/testing.mjs.map +1 -1
  322. package/fesm2022/list.mjs +77 -71
  323. package/fesm2022/list.mjs.map +1 -1
  324. package/fesm2022/menu/testing.mjs.map +1 -1
  325. package/fesm2022/menu.mjs +51 -27
  326. package/fesm2022/menu.mjs.map +1 -1
  327. package/fesm2022/paginator/testing.mjs.map +1 -1
  328. package/fesm2022/paginator.mjs +17 -22
  329. package/fesm2022/paginator.mjs.map +1 -1
  330. package/fesm2022/progress-bar.mjs +9 -9
  331. package/fesm2022/progress-bar.mjs.map +1 -1
  332. package/fesm2022/progress-spinner.mjs +10 -12
  333. package/fesm2022/progress-spinner.mjs.map +1 -1
  334. package/fesm2022/radio/testing.mjs.map +1 -1
  335. package/fesm2022/radio.mjs +18 -16
  336. package/fesm2022/radio.mjs.map +1 -1
  337. package/fesm2022/select/testing.mjs.map +1 -1
  338. package/fesm2022/select.mjs +72 -48
  339. package/fesm2022/select.mjs.map +1 -1
  340. package/fesm2022/sidenav/testing.mjs.map +1 -1
  341. package/fesm2022/sidenav.mjs +37 -31
  342. package/fesm2022/sidenav.mjs.map +1 -1
  343. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  344. package/fesm2022/slide-toggle.mjs +63 -23
  345. package/fesm2022/slide-toggle.mjs.map +1 -1
  346. package/fesm2022/slider/testing.mjs.map +1 -1
  347. package/fesm2022/slider.mjs +40 -26
  348. package/fesm2022/slider.mjs.map +1 -1
  349. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  350. package/fesm2022/snack-bar.mjs +32 -34
  351. package/fesm2022/snack-bar.mjs.map +1 -1
  352. package/fesm2022/sort/testing.mjs.map +1 -1
  353. package/fesm2022/sort.mjs +16 -16
  354. package/fesm2022/sort.mjs.map +1 -1
  355. package/fesm2022/stepper/testing.mjs.map +1 -1
  356. package/fesm2022/stepper.mjs +58 -55
  357. package/fesm2022/stepper.mjs.map +1 -1
  358. package/fesm2022/table/testing.mjs.map +1 -1
  359. package/fesm2022/table.mjs +81 -63
  360. package/fesm2022/table.mjs.map +1 -1
  361. package/fesm2022/tabs/testing.mjs.map +1 -1
  362. package/fesm2022/tabs.mjs +408 -424
  363. package/fesm2022/tabs.mjs.map +1 -1
  364. package/fesm2022/toolbar.mjs +13 -13
  365. package/fesm2022/toolbar.mjs.map +1 -1
  366. package/fesm2022/tooltip.mjs +22 -17
  367. package/fesm2022/tooltip.mjs.map +1 -1
  368. package/fesm2022/tree/testing.mjs.map +1 -1
  369. package/fesm2022/tree.mjs +34 -29
  370. package/fesm2022/tree.mjs.map +1 -1
  371. package/form-field/index.d.ts +33 -45
  372. package/grid-list/index.d.ts +10 -10
  373. package/icon/_icon-theme.scss +55 -23
  374. package/icon/index.d.ts +4 -4
  375. package/input/index.d.ts +33 -32
  376. package/list/index.d.ts +36 -36
  377. package/menu/_menu-theme.scss +50 -18
  378. package/menu/index.d.ts +12 -12
  379. package/package.json +2 -2
  380. package/paginator/_paginator-theme.scss +62 -29
  381. package/paginator/index.d.ts +6 -6
  382. package/prebuilt-themes/deeppurple-amber.css +1 -1
  383. package/prebuilt-themes/indigo-pink.css +1 -1
  384. package/prebuilt-themes/pink-bluegrey.css +1 -1
  385. package/prebuilt-themes/purple-green.css +1 -1
  386. package/progress-bar/index.d.ts +2 -2
  387. package/progress-spinner/index.d.ts +4 -4
  388. package/radio/_radio-theme.scss +5 -10
  389. package/radio/index.d.ts +8 -6
  390. package/schematics/ng-add/fonts/material-fonts.js +1 -1
  391. package/schematics/ng-add/fonts/material-fonts.mjs +1 -1
  392. package/schematics/ng-add/index.js +2 -2
  393. package/schematics/ng-add/index.mjs +2 -2
  394. package/schematics/ng-add/package-config.js +1 -1
  395. package/schematics/ng-add/package-config.mjs +1 -1
  396. package/schematics/ng-add/setup-project.js +1 -1
  397. package/schematics/ng-add/setup-project.mjs +1 -1
  398. package/schematics/ng-add/theming/theming.js +1 -1
  399. package/schematics/ng-add/theming/theming.mjs +1 -1
  400. package/schematics/ng-generate/address-form/index.js +1 -1
  401. package/schematics/ng-generate/address-form/index.mjs +1 -1
  402. package/schematics/ng-generate/dashboard/index.js +1 -1
  403. package/schematics/ng-generate/dashboard/index.mjs +1 -1
  404. package/schematics/ng-generate/mdc-migration/index_bundled.js +596 -361
  405. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  406. package/schematics/ng-generate/navigation/index.js +1 -1
  407. package/schematics/ng-generate/navigation/index.mjs +1 -1
  408. package/schematics/ng-generate/table/index.js +1 -1
  409. package/schematics/ng-generate/table/index.mjs +1 -1
  410. package/schematics/ng-generate/tree/index.js +1 -1
  411. package/schematics/ng-generate/tree/index.mjs +1 -1
  412. package/schematics/ng-update/index_bundled.js +41 -37
  413. package/schematics/ng-update/index_bundled.js.map +2 -2
  414. package/select/_select-theme.scss +71 -38
  415. package/select/index.d.ts +47 -35
  416. package/sidenav/_sidenav-theme.scss +49 -16
  417. package/sidenav/index.d.ts +11 -11
  418. package/slide-toggle/_slide-toggle-theme.scss +5 -4
  419. package/slide-toggle/index.d.ts +31 -7
  420. package/slider/index.d.ts +9 -9
  421. package/sort/index.d.ts +6 -6
  422. package/stepper/index.d.ts +29 -29
  423. package/table/index.d.ts +24 -24
  424. package/tabs/index.d.ts +18 -43
  425. package/toolbar/index.d.ts +5 -5
  426. package/tooltip/index.d.ts +8 -8
  427. package/tree/index.d.ts +15 -15
@@ -6396,14 +6396,14 @@ var require_scss_syntax = __commonJS({
6396
6396
  }
6397
6397
  });
6398
6398
 
6399
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
6399
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
6400
6400
  var mdc_migration_exports = {};
6401
6401
  __export(mdc_migration_exports, {
6402
6402
  default: () => mdc_migration_default
6403
6403
  });
6404
6404
  module.exports = __toCommonJS(mdc_migration_exports);
6405
6405
 
6406
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/style-migrator.js
6406
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/style-migrator.js
6407
6407
  var END_OF_SELECTOR_REGEX = "(?!-)";
6408
6408
  var MIXIN_ARGUMENTS_REGEX = "\\(((\\s|.)*)\\)";
6409
6409
  var StyleMigrator = class {
@@ -6479,7 +6479,7 @@ var StyleMigrator = class {
6479
6479
  }
6480
6480
  };
6481
6481
 
6482
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/autocomplete/autocomplete-styles.js
6482
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/autocomplete/autocomplete-styles.js
6483
6483
  var AutocompleteStylesMigrator = class extends StyleMigrator {
6484
6484
  constructor() {
6485
6485
  super(...arguments);
@@ -6503,7 +6503,7 @@ var AutocompleteStylesMigrator = class extends StyleMigrator {
6503
6503
  }
6504
6504
  };
6505
6505
 
6506
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/button/button-styles.js
6506
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/button/button-styles.js
6507
6507
  var ButtonStylesMigrator = class extends StyleMigrator {
6508
6508
  constructor() {
6509
6509
  super(...arguments);
@@ -6539,7 +6539,7 @@ var ButtonStylesMigrator = class extends StyleMigrator {
6539
6539
  }
6540
6540
  };
6541
6541
 
6542
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-styles.js
6542
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-styles.js
6543
6543
  var CardStylesMigrator = class extends StyleMigrator {
6544
6544
  constructor() {
6545
6545
  super(...arguments);
@@ -6578,7 +6578,7 @@ var CardStylesMigrator = class extends StyleMigrator {
6578
6578
  }
6579
6579
  };
6580
6580
 
6581
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migrator.js
6581
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migrator.js
6582
6582
  var TemplateMigrator = class {
6583
6583
  };
6584
6584
 
@@ -6981,6 +6981,9 @@ var _SerializerVisitor = class {
6981
6981
  visitIcuPlaceholder(ph, context) {
6982
6982
  return `<ph icu name="${ph.name}">${ph.value.visit(this)}</ph>`;
6983
6983
  }
6984
+ visitBlockPlaceholder(ph, context) {
6985
+ return `<ph block name="${ph.startName}">${ph.children.map((child) => child.visit(this)).join(", ")}</ph name="${ph.closeName}">`;
6986
+ }
6984
6987
  };
6985
6988
  var serializerVisitor$1 = new _SerializerVisitor();
6986
6989
  function serializeNodes(nodes) {
@@ -9851,6 +9854,37 @@ function getInjectFn(target) {
9851
9854
  return Identifiers.inject;
9852
9855
  }
9853
9856
  }
9857
+ var TagContentType;
9858
+ (function(TagContentType2) {
9859
+ TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
9860
+ TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
9861
+ TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
9862
+ })(TagContentType || (TagContentType = {}));
9863
+ function splitNsName(elementName) {
9864
+ if (elementName[0] != ":") {
9865
+ return [null, elementName];
9866
+ }
9867
+ const colonIndex = elementName.indexOf(":", 1);
9868
+ if (colonIndex === -1) {
9869
+ throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
9870
+ }
9871
+ return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
9872
+ }
9873
+ function isNgContainer(tagName) {
9874
+ return splitNsName(tagName)[1] === "ng-container";
9875
+ }
9876
+ function isNgContent(tagName) {
9877
+ return splitNsName(tagName)[1] === "ng-content";
9878
+ }
9879
+ function isNgTemplate(tagName) {
9880
+ return splitNsName(tagName)[1] === "ng-template";
9881
+ }
9882
+ function getNsPrefix(fullName) {
9883
+ return fullName === null ? null : splitNsName(fullName)[0];
9884
+ }
9885
+ function mergeNsAndName(prefix, localName) {
9886
+ return prefix ? `:${prefix}:${localName}` : localName;
9887
+ }
9854
9888
  var Comment$1 = class {
9855
9889
  constructor(value, sourceSpan) {
9856
9890
  this.value = value;
@@ -10008,43 +10042,47 @@ var BlockNode = class {
10008
10042
  }
10009
10043
  };
10010
10044
  var DeferredBlockPlaceholder = class extends BlockNode {
10011
- constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
10045
+ constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
10012
10046
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10013
10047
  this.children = children;
10014
10048
  this.minimumTime = minimumTime;
10049
+ this.i18n = i18n2;
10015
10050
  }
10016
10051
  visit(visitor) {
10017
10052
  return visitor.visitDeferredBlockPlaceholder(this);
10018
10053
  }
10019
10054
  };
10020
10055
  var DeferredBlockLoading = class extends BlockNode {
10021
- constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
10056
+ constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
10022
10057
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10023
10058
  this.children = children;
10024
10059
  this.afterTime = afterTime;
10025
10060
  this.minimumTime = minimumTime;
10061
+ this.i18n = i18n2;
10026
10062
  }
10027
10063
  visit(visitor) {
10028
10064
  return visitor.visitDeferredBlockLoading(this);
10029
10065
  }
10030
10066
  };
10031
10067
  var DeferredBlockError = class extends BlockNode {
10032
- constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
10068
+ constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
10033
10069
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10034
10070
  this.children = children;
10071
+ this.i18n = i18n2;
10035
10072
  }
10036
10073
  visit(visitor) {
10037
10074
  return visitor.visitDeferredBlockError(this);
10038
10075
  }
10039
10076
  };
10040
10077
  var DeferredBlock = class extends BlockNode {
10041
- constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
10078
+ constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n2) {
10042
10079
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10043
10080
  this.children = children;
10044
10081
  this.placeholder = placeholder;
10045
10082
  this.loading = loading;
10046
10083
  this.error = error2;
10047
10084
  this.mainBlockSpan = mainBlockSpan;
10085
+ this.i18n = i18n2;
10048
10086
  this.triggers = triggers;
10049
10087
  this.prefetchTriggers = prefetchTriggers;
10050
10088
  this.definedTriggers = Object.keys(triggers);
@@ -10076,17 +10114,18 @@ var SwitchBlock = class extends BlockNode {
10076
10114
  }
10077
10115
  };
10078
10116
  var SwitchBlockCase = class extends BlockNode {
10079
- constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
10117
+ constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
10080
10118
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10081
10119
  this.expression = expression;
10082
10120
  this.children = children;
10121
+ this.i18n = i18n2;
10083
10122
  }
10084
10123
  visit(visitor) {
10085
10124
  return visitor.visitSwitchBlockCase(this);
10086
10125
  }
10087
10126
  };
10088
10127
  var ForLoopBlock = class extends BlockNode {
10089
- constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan) {
10128
+ constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
10090
10129
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10091
10130
  this.item = item;
10092
10131
  this.expression = expression;
@@ -10096,15 +10135,17 @@ var ForLoopBlock = class extends BlockNode {
10096
10135
  this.children = children;
10097
10136
  this.empty = empty;
10098
10137
  this.mainBlockSpan = mainBlockSpan;
10138
+ this.i18n = i18n2;
10099
10139
  }
10100
10140
  visit(visitor) {
10101
10141
  return visitor.visitForLoopBlock(this);
10102
10142
  }
10103
10143
  };
10104
10144
  var ForLoopBlockEmpty = class extends BlockNode {
10105
- constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
10145
+ constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
10106
10146
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10107
10147
  this.children = children;
10148
+ this.i18n = i18n2;
10108
10149
  }
10109
10150
  visit(visitor) {
10110
10151
  return visitor.visitForLoopBlockEmpty(this);
@@ -10120,11 +10161,12 @@ var IfBlock = class extends BlockNode {
10120
10161
  }
10121
10162
  };
10122
10163
  var IfBlockBranch = class extends BlockNode {
10123
- constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
10164
+ constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
10124
10165
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
10125
10166
  this.expression = expression;
10126
10167
  this.children = children;
10127
10168
  this.expressionAlias = expressionAlias;
10169
+ this.i18n = i18n2;
10128
10170
  }
10129
10171
  visit(visitor) {
10130
10172
  return visitor.visitIfBlockBranch(this);
@@ -10312,6 +10354,43 @@ var IcuPlaceholder = class {
10312
10354
  return visitor.visitIcuPlaceholder(this, context);
10313
10355
  }
10314
10356
  };
10357
+ var BlockPlaceholder = class {
10358
+ constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {
10359
+ this.name = name;
10360
+ this.parameters = parameters;
10361
+ this.startName = startName;
10362
+ this.closeName = closeName;
10363
+ this.children = children;
10364
+ this.sourceSpan = sourceSpan;
10365
+ this.startSourceSpan = startSourceSpan;
10366
+ this.endSourceSpan = endSourceSpan;
10367
+ }
10368
+ visit(visitor, context) {
10369
+ return visitor.visitBlockPlaceholder(this, context);
10370
+ }
10371
+ };
10372
+ var RecurseVisitor = class {
10373
+ visitText(text2, context) {
10374
+ }
10375
+ visitContainer(container, context) {
10376
+ container.children.forEach((child) => child.visit(this));
10377
+ }
10378
+ visitIcu(icu, context) {
10379
+ Object.keys(icu.cases).forEach((k) => {
10380
+ icu.cases[k].visit(this);
10381
+ });
10382
+ }
10383
+ visitTagPlaceholder(ph, context) {
10384
+ ph.children.forEach((child) => child.visit(this));
10385
+ }
10386
+ visitPlaceholder(ph, context) {
10387
+ }
10388
+ visitIcuPlaceholder(ph, context) {
10389
+ }
10390
+ visitBlockPlaceholder(ph, context) {
10391
+ ph.children.forEach((child) => child.visit(this));
10392
+ }
10393
+ };
10315
10394
  function serializeMessage(messageNodes) {
10316
10395
  const visitor = new LocalizeMessageStringVisitor();
10317
10396
  const str = messageNodes.map((n) => n.visit(visitor)).join("");
@@ -10338,6 +10417,10 @@ var LocalizeMessageStringVisitor = class {
10338
10417
  visitIcuPlaceholder(ph) {
10339
10418
  return `{$${ph.name}}`;
10340
10419
  }
10420
+ visitBlockPlaceholder(ph) {
10421
+ const children = ph.children.map((child) => child.visit(this)).join("");
10422
+ return `{$${ph.startName}}${children}{$${ph.closeName}}`;
10423
+ }
10341
10424
  };
10342
10425
  var _Visitor$2 = class {
10343
10426
  visitTag(tag) {
@@ -10634,6 +10717,23 @@ var DefinitionMap = class {
10634
10717
  return literalMap(this.values);
10635
10718
  }
10636
10719
  };
10720
+ function createCssSelectorFromNode(node) {
10721
+ const elementName = node instanceof Element$1 ? node.name : "ng-template";
10722
+ const attributes = getAttrsForDirectiveMatching(node);
10723
+ const cssSelector = new CssSelector();
10724
+ const elementNameNoNs = splitNsName(elementName)[1];
10725
+ cssSelector.setElement(elementNameNoNs);
10726
+ Object.getOwnPropertyNames(attributes).forEach((name) => {
10727
+ const nameNoNs = splitNsName(name)[1];
10728
+ const value = attributes[name];
10729
+ cssSelector.addAttribute(nameNoNs, value);
10730
+ if (name.toLowerCase() === "class") {
10731
+ const classes = value.trim().split(/\s+/);
10732
+ classes.forEach((className) => cssSelector.addClassName(className));
10733
+ }
10734
+ });
10735
+ return cssSelector;
10736
+ }
10637
10737
  function getAttrsForDirectiveMatching(elOrTpl) {
10638
10738
  const attributesMap = {};
10639
10739
  if (elOrTpl instanceof Template && elOrTpl.tagName !== "ng-template") {
@@ -10806,6 +10906,7 @@ var InterpolationConfig = class {
10806
10906
  }
10807
10907
  };
10808
10908
  var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
10909
+ var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
10809
10910
  var $EOF = 0;
10810
10911
  var $BSPACE = 8;
10811
10912
  var $TAB = 9;
@@ -13311,8 +13412,8 @@ var OpKind;
13311
13412
  OpKind2[OpKind2["I18nEnd"] = 38] = "I18nEnd";
13312
13413
  OpKind2[OpKind2["I18nExpression"] = 39] = "I18nExpression";
13313
13414
  OpKind2[OpKind2["I18nApply"] = 40] = "I18nApply";
13314
- OpKind2[OpKind2["Icu"] = 41] = "Icu";
13315
- OpKind2[OpKind2["IcuUpdate"] = 42] = "IcuUpdate";
13415
+ OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
13416
+ OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
13316
13417
  OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
13317
13418
  })(OpKind || (OpKind = {}));
13318
13419
  var ExpressionKind;
@@ -13397,6 +13498,7 @@ var I18nParamValueFlags;
13397
13498
  I18nParamValueFlags2[I18nParamValueFlags2["TemplateTag"] = 2] = "TemplateTag";
13398
13499
  I18nParamValueFlags2[I18nParamValueFlags2["OpenTag"] = 4] = "OpenTag";
13399
13500
  I18nParamValueFlags2[I18nParamValueFlags2["CloseTag"] = 8] = "CloseTag";
13501
+ I18nParamValueFlags2[I18nParamValueFlags2["ExpressionIndex"] = 16] = "ExpressionIndex";
13400
13502
  })(I18nParamValueFlags || (I18nParamValueFlags = {}));
13401
13503
  var Namespace;
13402
13504
  (function(Namespace2) {
@@ -13420,6 +13522,11 @@ var DerivedRepeaterVarIdentity;
13420
13522
  DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
13421
13523
  DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
13422
13524
  })(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
13525
+ var I18nContextKind;
13526
+ (function(I18nContextKind2) {
13527
+ I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
13528
+ I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
13529
+ })(I18nContextKind || (I18nContextKind = {}));
13423
13530
  var ConsumesSlot = Symbol("ConsumesSlot");
13424
13531
  var DependsOnSlotContext = Symbol("DependsOnSlotContext");
13425
13532
  var ConsumesVarsTrait = Symbol("ConsumesVars");
@@ -13580,13 +13687,13 @@ function createConditionalOp(target, targetSlot, test, conditions, sourceSpan) {
13580
13687
  }, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
13581
13688
  }
13582
13689
  function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
13583
- return __spreadValues({
13690
+ return __spreadValues(__spreadValues({
13584
13691
  kind: OpKind.Repeater,
13585
13692
  target: repeaterCreate2,
13586
13693
  targetSlot,
13587
13694
  collection,
13588
13695
  sourceSpan
13589
- }, NEW_OP);
13696
+ }, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
13590
13697
  }
13591
13698
  function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
13592
13699
  return __spreadValues(__spreadValues({
@@ -13617,13 +13724,6 @@ function createI18nApplyOp(target, handle, sourceSpan) {
13617
13724
  sourceSpan
13618
13725
  }, NEW_OP);
13619
13726
  }
13620
- function createIcuUpdateOp(xref, sourceSpan) {
13621
- return __spreadValues({
13622
- kind: OpKind.IcuUpdate,
13623
- xref,
13624
- sourceSpan
13625
- }, NEW_OP);
13626
- }
13627
13727
  var _a;
13628
13728
  var _b;
13629
13729
  var _c;
@@ -14385,8 +14485,8 @@ function transformExpressionsInOp(op, transform2, flags) {
14385
14485
  case OpKind.I18nContext:
14386
14486
  case OpKind.I18nEnd:
14387
14487
  case OpKind.I18nStart:
14388
- case OpKind.Icu:
14389
- case OpKind.IcuUpdate:
14488
+ case OpKind.IcuEnd:
14489
+ case OpKind.IcuStart:
14390
14490
  case OpKind.Namespace:
14391
14491
  case OpKind.Pipe:
14392
14492
  case OpKind.Projection:
@@ -14882,20 +14982,26 @@ function createI18nEndOp(xref) {
14882
14982
  xref
14883
14983
  }, NEW_OP);
14884
14984
  }
14885
- function createIcuOp(xref, message, icu, messagePlaceholder, sourceSpan) {
14985
+ function createIcuStartOp(xref, message, messagePlaceholder, sourceSpan) {
14886
14986
  return __spreadValues({
14887
- kind: OpKind.Icu,
14987
+ kind: OpKind.IcuStart,
14888
14988
  xref,
14889
14989
  message,
14890
- icu,
14891
14990
  messagePlaceholder,
14892
14991
  context: null,
14893
14992
  sourceSpan
14894
14993
  }, NEW_OP);
14895
14994
  }
14896
- function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
14995
+ function createIcuEndOp(xref) {
14996
+ return __spreadValues({
14997
+ kind: OpKind.IcuEnd,
14998
+ xref
14999
+ }, NEW_OP);
15000
+ }
15001
+ function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
14897
15002
  return __spreadValues({
14898
15003
  kind: OpKind.I18nContext,
15004
+ contextKind,
14899
15005
  xref,
14900
15006
  i18nBlock,
14901
15007
  message,
@@ -15036,27 +15142,36 @@ function removeAnys(e) {
15036
15142
  return e;
15037
15143
  }
15038
15144
  function applyI18nExpressions(job) {
15145
+ const i18nContexts = /* @__PURE__ */ new Map();
15146
+ for (const unit of job.units) {
15147
+ for (const op of unit.create) {
15148
+ if (op.kind === OpKind.I18nContext) {
15149
+ i18nContexts.set(op.xref, op);
15150
+ }
15151
+ }
15152
+ }
15039
15153
  for (const unit of job.units) {
15040
15154
  for (const op of unit.update) {
15041
- if (op.kind === OpKind.I18nExpression && needsApplication(op)) {
15155
+ if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {
15042
15156
  OpList.insertAfter(createI18nApplyOp(op.target, op.handle, null), op);
15043
15157
  }
15044
15158
  }
15045
15159
  }
15046
15160
  }
15047
- function needsApplication(op) {
15161
+ function needsApplication(i18nContexts, op) {
15048
15162
  var _a2;
15049
15163
  if (((_a2 = op.next) == null ? void 0 : _a2.kind) !== OpKind.I18nExpression) {
15050
15164
  return true;
15051
15165
  }
15052
- if (op.next.context !== op.context) {
15166
+ const context = i18nContexts.get(op.context);
15167
+ const nextContext2 = i18nContexts.get(op.next.context);
15168
+ if (context.i18nBlock !== nextContext2.i18nBlock) {
15053
15169
  return true;
15054
15170
  }
15055
15171
  return false;
15056
15172
  }
15057
15173
  function assignI18nSlotDependencies(job) {
15058
15174
  const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
15059
- const i18nContexts = /* @__PURE__ */ new Map();
15060
15175
  let lastSlotConsumer = null;
15061
15176
  let currentI18nOp = null;
15062
15177
  for (const unit of job.units) {
@@ -15072,15 +15187,11 @@ function assignI18nSlotDependencies(job) {
15072
15187
  i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
15073
15188
  currentI18nOp = null;
15074
15189
  break;
15075
- case OpKind.I18nContext:
15076
- i18nContexts.set(op.xref, op);
15077
- break;
15078
15190
  }
15079
15191
  }
15080
15192
  for (const op of unit.update) {
15081
15193
  if (op.kind === OpKind.I18nExpression) {
15082
- const i18nContext = i18nContexts.get(op.context);
15083
- op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
15194
+ op.target = i18nLastSlotConsumers.get(op.target);
15084
15195
  }
15085
15196
  }
15086
15197
  }
@@ -15317,37 +15428,6 @@ function generateConditionalExpressions(job) {
15317
15428
  }
15318
15429
  }
15319
15430
  }
15320
- var TagContentType;
15321
- (function(TagContentType2) {
15322
- TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
15323
- TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
15324
- TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
15325
- })(TagContentType || (TagContentType = {}));
15326
- function splitNsName(elementName) {
15327
- if (elementName[0] != ":") {
15328
- return [null, elementName];
15329
- }
15330
- const colonIndex = elementName.indexOf(":", 1);
15331
- if (colonIndex === -1) {
15332
- throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
15333
- }
15334
- return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
15335
- }
15336
- function isNgContainer(tagName) {
15337
- return splitNsName(tagName)[1] === "ng-container";
15338
- }
15339
- function isNgContent(tagName) {
15340
- return splitNsName(tagName)[1] === "ng-content";
15341
- }
15342
- function isNgTemplate(tagName) {
15343
- return splitNsName(tagName)[1] === "ng-template";
15344
- }
15345
- function getNsPrefix(fullName) {
15346
- return fullName === null ? null : splitNsName(fullName)[0];
15347
- }
15348
- function mergeNsAndName(prefix, localName) {
15349
- return prefix ? `:${prefix}:${localName}` : localName;
15350
- }
15351
15431
  var BINARY_OPERATORS = /* @__PURE__ */ new Map([
15352
15432
  ["&&", BinaryOperator.And],
15353
15433
  [">", BinaryOperator.Bigger],
@@ -15555,27 +15635,31 @@ function createDeferDepsFns(job) {
15555
15635
  }
15556
15636
  }
15557
15637
  function createI18nContexts(job) {
15638
+ const rootContexts = /* @__PURE__ */ new Map();
15558
15639
  let currentI18nOp = null;
15559
15640
  let xref;
15560
15641
  for (const unit of job.units) {
15561
15642
  for (const op of unit.create) {
15562
15643
  switch (op.kind) {
15563
15644
  case OpKind.I18nStart:
15564
- xref = job.allocateXrefId();
15565
- unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
15566
- op.context = xref;
15567
15645
  currentI18nOp = op;
15646
+ if (op.xref === op.root) {
15647
+ xref = job.allocateXrefId();
15648
+ unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
15649
+ op.context = xref;
15650
+ rootContexts.set(op.xref, xref);
15651
+ }
15568
15652
  break;
15569
15653
  case OpKind.I18nEnd:
15570
15654
  currentI18nOp = null;
15571
15655
  break;
15572
- case OpKind.Icu:
15656
+ case OpKind.IcuStart:
15573
15657
  if (currentI18nOp === null) {
15574
15658
  throw Error("Unexpected ICU outside of an i18n block.");
15575
15659
  }
15576
15660
  if (op.message.id !== currentI18nOp.message.id) {
15577
15661
  xref = job.allocateXrefId();
15578
- unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
15662
+ unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
15579
15663
  op.context = xref;
15580
15664
  } else {
15581
15665
  op.context = currentI18nOp.context;
@@ -15584,47 +15668,10 @@ function createI18nContexts(job) {
15584
15668
  }
15585
15669
  }
15586
15670
  }
15587
- }
15588
- function createI18nIcuExpressions(job) {
15589
- const icus = /* @__PURE__ */ new Map();
15590
- const i18nContexts = /* @__PURE__ */ new Map();
15591
- const i18nBlocks = /* @__PURE__ */ new Map();
15592
15671
  for (const unit of job.units) {
15593
15672
  for (const op of unit.create) {
15594
- switch (op.kind) {
15595
- case OpKind.Icu:
15596
- icus.set(op.xref, op);
15597
- break;
15598
- case OpKind.I18nContext:
15599
- i18nContexts.set(op.xref, op);
15600
- break;
15601
- case OpKind.I18nStart:
15602
- i18nBlocks.set(op.xref, op);
15603
- break;
15604
- }
15605
- }
15606
- for (const op of unit.update) {
15607
- switch (op.kind) {
15608
- case OpKind.IcuUpdate:
15609
- const icuOp = icus.get(op.xref);
15610
- if ((icuOp == null ? void 0 : icuOp.icu.expressionPlaceholder) === void 0) {
15611
- throw Error("ICU should have an i18n placeholder");
15612
- }
15613
- if (icuOp.context === null) {
15614
- throw Error("ICU should have its i18n context set");
15615
- }
15616
- const i18nContext = i18nContexts.get(icuOp.context);
15617
- const i18nBlock = i18nBlocks.get(i18nContext.i18nBlock);
15618
- OpList.replace(op, createI18nExpressionOp(
15619
- i18nContext.xref,
15620
- i18nBlock.xref,
15621
- i18nBlock.handle,
15622
- new LexicalReadExpr(icuOp.icu.expression),
15623
- icuOp.icu.expressionPlaceholder,
15624
- I18nParamResolutionTime.Postproccessing,
15625
- null
15626
- ));
15627
- break;
15673
+ if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
15674
+ op.context = rootContexts.get(op.root);
15628
15675
  }
15629
15676
  }
15630
15677
  }
@@ -15905,7 +15952,7 @@ var LIST_END_MARKER = "]";
15905
15952
  var LIST_DELIMITER = "|";
15906
15953
  function extractI18nMessages(job) {
15907
15954
  const i18nContexts = /* @__PURE__ */ new Map();
15908
- const i18nBlockContexts = /* @__PURE__ */ new Set();
15955
+ const i18nBlocks = /* @__PURE__ */ new Map();
15909
15956
  for (const unit of job.units) {
15910
15957
  for (const op of unit.create) {
15911
15958
  switch (op.kind) {
@@ -15913,7 +15960,7 @@ function extractI18nMessages(job) {
15913
15960
  i18nContexts.set(op.xref, op);
15914
15961
  break;
15915
15962
  case OpKind.I18nStart:
15916
- i18nBlockContexts.add(op.context);
15963
+ i18nBlocks.set(op.xref, op);
15917
15964
  break;
15918
15965
  }
15919
15966
  }
@@ -15933,49 +15980,95 @@ function extractI18nMessages(job) {
15933
15980
  }
15934
15981
  for (const unit of job.units) {
15935
15982
  for (const op of unit.create) {
15936
- if (op.kind === OpKind.Icu) {
15937
- if (!op.context) {
15938
- throw Error("ICU op should have its context set.");
15939
- }
15940
- if (!i18nBlockContexts.has(op.context)) {
15983
+ switch (op.kind) {
15984
+ case OpKind.IcuStart:
15985
+ if (!op.context) {
15986
+ throw Error("ICU op should have its context set.");
15987
+ }
15941
15988
  const i18nContext = i18nContexts.get(op.context);
15942
- const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
15943
- unit.create.push(subMessage);
15944
- const parentMessage = i18nBlockMessages.get(i18nContext.i18nBlock);
15945
- parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
15946
- }
15947
- OpList.remove(op);
15989
+ if (i18nContext.contextKind === I18nContextKind.Icu) {
15990
+ const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
15991
+ unit.create.push(subMessage);
15992
+ const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
15993
+ const parentMessage = i18nBlockMessages.get(rootI18nId);
15994
+ parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
15995
+ }
15996
+ OpList.remove(op);
15997
+ break;
15998
+ case OpKind.IcuEnd:
15999
+ OpList.remove(op);
16000
+ break;
15948
16001
  }
15949
16002
  }
15950
16003
  }
15951
16004
  }
15952
16005
  function createI18nMessage(job, context, messagePlaceholder) {
15953
- let needsPostprocessing = context.postprocessingParams.size > 0;
15954
- for (const values of context.params.values()) {
15955
- if (values.length > 1) {
15956
- needsPostprocessing = true;
15957
- }
15958
- }
15959
- return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
16006
+ let [formattedParams, needsPostprocessing] = formatParams(context.params);
16007
+ const [formattedPostprocessingParams] = formatParams(context.postprocessingParams);
16008
+ needsPostprocessing || (needsPostprocessing = formattedPostprocessingParams.size > 0);
16009
+ return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
15960
16010
  }
15961
16011
  function formatParams(params) {
15962
- const result = /* @__PURE__ */ new Map();
15963
- for (const [placeholder, placeholderValues] of [...params].sort()) {
15964
- const serializedValues = formatParamValues(placeholderValues);
16012
+ const formattedParams = /* @__PURE__ */ new Map();
16013
+ let needsPostprocessing = false;
16014
+ for (const [placeholder, placeholderValues] of params) {
16015
+ const [serializedValues, paramNeedsPostprocessing] = formatParamValues(placeholderValues);
16016
+ needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
15965
16017
  if (serializedValues !== null) {
15966
- result.set(placeholder, literal(formatParamValues(placeholderValues)));
16018
+ formattedParams.set(placeholder, literal(serializedValues));
15967
16019
  }
15968
16020
  }
15969
- return result;
16021
+ return [formattedParams, needsPostprocessing];
15970
16022
  }
15971
16023
  function formatParamValues(values) {
15972
16024
  if (values.length === 0) {
15973
- return null;
16025
+ return [null, false];
15974
16026
  }
16027
+ collapseElementTemplatePairs(values);
15975
16028
  const serializedValues = values.map((value) => formatValue(value));
15976
- return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
16029
+ return serializedValues.length === 1 ? [serializedValues[0], false] : [`${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`, true];
16030
+ }
16031
+ function collapseElementTemplatePairs(values) {
16032
+ var _a2;
16033
+ const valueIndiciesBySubTemplateIndex = /* @__PURE__ */ new Map();
16034
+ for (let i = 0; i < values.length; i++) {
16035
+ const value = values[i];
16036
+ if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
16037
+ const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
16038
+ valueIndicies.push(i);
16039
+ valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
16040
+ }
16041
+ }
16042
+ for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
16043
+ if (valueIndicies.length > 1) {
16044
+ const elementIndex = valueIndicies.find((index2) => values[index2].flags & I18nParamValueFlags.ElementTag);
16045
+ const templateIndex = valueIndicies.find((index2) => values[index2].flags & I18nParamValueFlags.TemplateTag);
16046
+ if (elementIndex !== void 0 && templateIndex !== void 0) {
16047
+ const elementValue = values[elementIndex];
16048
+ const templateValue = values[templateIndex];
16049
+ let compundValue;
16050
+ if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
16051
+ compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
16052
+ } else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
16053
+ compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
16054
+ } else {
16055
+ compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
16056
+ }
16057
+ values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
16058
+ values.splice(templateIndex, 1, null);
16059
+ }
16060
+ }
16061
+ }
16062
+ for (let i = values.length - 1; i >= 0; i--) {
16063
+ if (values[i] === null) {
16064
+ values.splice(i, 1);
16065
+ }
16066
+ }
15977
16067
  }
15978
16068
  function formatValue(value) {
16069
+ if (value.flags === I18nParamValueFlags.None) {
16070
+ return `${value.value}`;
16071
+ }
15979
16072
  let tagMarker = "";
15980
16073
  let closeMarker = "";
15981
16074
  if (value.flags & I18nParamValueFlags.ElementTag) {
@@ -16223,6 +16316,9 @@ var IcuSerializerVisitor = class {
16223
16316
  visitPlaceholder(ph) {
16224
16317
  return this.formatPh(ph.name);
16225
16318
  }
16319
+ visitBlockPlaceholder(ph) {
16320
+ return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
16321
+ }
16226
16322
  visitIcuPlaceholder(ph, context) {
16227
16323
  return this.formatPh(ph.name);
16228
16324
  }
@@ -17560,12 +17656,12 @@ var Comment = class {
17560
17656
  return visitor.visitComment(this, context);
17561
17657
  }
17562
17658
  };
17563
- var Block = class {
17564
- constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null) {
17659
+ var Block = class extends NodeWithI18n {
17660
+ constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n2) {
17661
+ super(sourceSpan, i18n2);
17565
17662
  this.name = name;
17566
17663
  this.parameters = parameters;
17567
17664
  this.children = children;
17568
- this.sourceSpan = sourceSpan;
17569
17665
  this.nameSpan = nameSpan;
17570
17666
  this.startSourceSpan = startSourceSpan;
17571
17667
  this.endSourceSpan = endSourceSpan;
@@ -18135,6 +18231,24 @@ var PlaceholderRegistry = class {
18135
18231
  getUniquePlaceholder(name) {
18136
18232
  return this._generateUniqueName(name.toUpperCase());
18137
18233
  }
18234
+ getStartBlockPlaceholderName(name, parameters) {
18235
+ const signature = this._hashBlock(name, parameters);
18236
+ if (this._signatureToName[signature]) {
18237
+ return this._signatureToName[signature];
18238
+ }
18239
+ const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);
18240
+ this._signatureToName[signature] = placeholder;
18241
+ return placeholder;
18242
+ }
18243
+ getCloseBlockPlaceholderName(name) {
18244
+ const signature = this._hashClosingBlock(name);
18245
+ if (this._signatureToName[signature]) {
18246
+ return this._signatureToName[signature];
18247
+ }
18248
+ const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);
18249
+ this._signatureToName[signature] = placeholder;
18250
+ return placeholder;
18251
+ }
18138
18252
  _hashTag(tag, attrs, isVoid) {
18139
18253
  const start = `<${tag}`;
18140
18254
  const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join("");
@@ -18144,6 +18258,16 @@ var PlaceholderRegistry = class {
18144
18258
  _hashClosingTag(tag) {
18145
18259
  return this._hashTag(`/${tag}`, {}, false);
18146
18260
  }
18261
+ _hashBlock(name, parameters) {
18262
+ const params = parameters.length === 0 ? "" : ` (${parameters.sort().join("; ")})`;
18263
+ return `@${name}${params} {}`;
18264
+ }
18265
+ _hashClosingBlock(name) {
18266
+ return this._hashBlock(`close_${name}`, []);
18267
+ }
18268
+ _toSnakeCase(name) {
18269
+ return name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
18270
+ }
18147
18271
  _generateUniqueName(base) {
18148
18272
  const seen = this._placeHolderNameCounts.hasOwnProperty(base);
18149
18273
  if (!seen) {
@@ -18156,17 +18280,18 @@ var PlaceholderRegistry = class {
18156
18280
  }
18157
18281
  };
18158
18282
  var _expParser = new Parser$1(new Lexer());
18159
- function createI18nMessageFactory(interpolationConfig) {
18160
- const visitor = new _I18nVisitor(_expParser, interpolationConfig);
18283
+ function createI18nMessageFactory(interpolationConfig, containerBlocks) {
18284
+ const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
18161
18285
  return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
18162
18286
  }
18163
18287
  function noopVisitNodeFn(_html, i18n2) {
18164
18288
  return i18n2;
18165
18289
  }
18166
18290
  var _I18nVisitor = class {
18167
- constructor(_expressionParser, _interpolationConfig) {
18291
+ constructor(_expressionParser, _interpolationConfig, _containerBlocks) {
18168
18292
  this._expressionParser = _expressionParser;
18169
18293
  this._interpolationConfig = _interpolationConfig;
18294
+ this._containerBlocks = _containerBlocks;
18170
18295
  }
18171
18296
  toI18nMessage(nodes, meaning = "", description = "", customId = "", visitNodeFn) {
18172
18297
  const context = {
@@ -18241,11 +18366,27 @@ var _I18nVisitor = class {
18241
18366
  throw new Error("Unreachable code");
18242
18367
  }
18243
18368
  visitBlock(block, context) {
18369
+ var _a2;
18244
18370
  const children = visitAll(this, block.children, context);
18245
- const node = new Container(children, block.sourceSpan);
18371
+ if (this._containerBlocks.has(block.name)) {
18372
+ return new Container(children, block.sourceSpan);
18373
+ }
18374
+ const parameters = block.parameters.map((param) => param.expression);
18375
+ const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);
18376
+ const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);
18377
+ context.placeholderToContent[startPhName] = {
18378
+ text: block.startSourceSpan.toString(),
18379
+ sourceSpan: block.startSourceSpan
18380
+ };
18381
+ context.placeholderToContent[closePhName] = {
18382
+ text: block.endSourceSpan ? block.endSourceSpan.toString() : "}",
18383
+ sourceSpan: (_a2 = block.endSourceSpan) != null ? _a2 : block.sourceSpan
18384
+ };
18385
+ const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);
18246
18386
  return context.visitNodeFn(block, node);
18247
18387
  }
18248
18388
  visitBlockParameter(_parameter, _context) {
18389
+ throw new Error("Unreachable code");
18249
18390
  }
18250
18391
  _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {
18251
18392
  const nodes = [];
@@ -21773,16 +21914,17 @@ var setI18nRefs = (htmlNode, i18nNode) => {
21773
21914
  return i18nNode;
21774
21915
  };
21775
21916
  var I18nMetaVisitor = class {
21776
- constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {
21917
+ constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS) {
21777
21918
  this.interpolationConfig = interpolationConfig;
21778
21919
  this.keepI18nAttrs = keepI18nAttrs;
21779
21920
  this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
21921
+ this.containerBlocks = containerBlocks;
21780
21922
  this.hasI18nMeta = false;
21781
21923
  this._errors = [];
21782
21924
  }
21783
21925
  _generateI18nMessage(nodes, meta = "", visitNodeFn) {
21784
21926
  const { meaning, description, customId } = this._parseMetadata(meta);
21785
- const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig);
21927
+ const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks);
21786
21928
  const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
21787
21929
  this._setMessageId(message, meta);
21788
21930
  this._setLegacyIds(message, meta);
@@ -21955,6 +22097,9 @@ var GetMsgSerializerVisitor = class {
21955
22097
  visitPlaceholder(ph) {
21956
22098
  return this.formatPh(ph.name);
21957
22099
  }
22100
+ visitBlockPlaceholder(ph) {
22101
+ return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
22102
+ }
21958
22103
  visitIcuPlaceholder(ph, context) {
21959
22104
  return this.formatPh(ph.name);
21960
22105
  }
@@ -22001,6 +22146,12 @@ var LocalizeSerializerVisitor = class {
22001
22146
  visitPlaceholder(ph) {
22002
22147
  this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
22003
22148
  }
22149
+ visitBlockPlaceholder(ph) {
22150
+ var _a2, _b2;
22151
+ this.pieces.push(this.createPlaceholderPiece(ph.startName, (_a2 = ph.startSourceSpan) != null ? _a2 : ph.sourceSpan));
22152
+ ph.children.forEach((child) => child.visit(this));
22153
+ this.pieces.push(this.createPlaceholderPiece(ph.closeName, (_b2 = ph.endSourceSpan) != null ? _b2 : ph.sourceSpan));
22154
+ }
22004
22155
  visitIcuPlaceholder(ph) {
22005
22156
  this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));
22006
22157
  }
@@ -22080,11 +22231,13 @@ function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
22080
22231
  statements.push(...subMessageStatements);
22081
22232
  messageOp.params.set(subMessage.messagePlaceholder, subMessageVar);
22082
22233
  }
22234
+ messageOp.params = new Map([...messageOp.params.entries()].sort());
22083
22235
  assertAllParamsResolved(messageOp);
22084
22236
  const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX));
22085
22237
  const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
22086
22238
  let transformFn = void 0;
22087
22239
  if (messageOp.needsPostprocessing) {
22240
+ messageOp.postprocessingParams = new Map([...messageOp.postprocessingParams.entries()].sort());
22088
22241
  const extraTransformFnParams = [];
22089
22242
  if (messageOp.postprocessingParams.size > 0) {
22090
22243
  extraTransformFnParams.push(literalMap([...messageOp.postprocessingParams].map(([key, value]) => ({ key, value, quoted: true }))));
@@ -22122,12 +22275,14 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
22122
22275
  return variable(name);
22123
22276
  }
22124
22277
  function assertAllParamsResolved(op) {
22125
- for (const placeholder in op.message.placeholders) {
22278
+ for (let placeholder in op.message.placeholders) {
22279
+ placeholder = placeholder.trimEnd();
22126
22280
  if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
22127
22281
  throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
22128
22282
  }
22129
22283
  }
22130
- for (const placeholder in op.message.placeholderToMessage) {
22284
+ for (let placeholder in op.message.placeholderToMessage) {
22285
+ placeholder = placeholder.trimEnd();
22131
22286
  if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
22132
22287
  throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
22133
22288
  }
@@ -22137,7 +22292,9 @@ function extractI18nText(job) {
22137
22292
  var _a2;
22138
22293
  for (const unit of job.units) {
22139
22294
  let currentI18n = null;
22295
+ let currentIcu = null;
22140
22296
  const textNodeI18nBlocks = /* @__PURE__ */ new Map();
22297
+ const textNodeIcus = /* @__PURE__ */ new Map();
22141
22298
  for (const op of unit.create) {
22142
22299
  switch (op.kind) {
22143
22300
  case OpKind.I18nStart:
@@ -22149,9 +22306,19 @@ function extractI18nText(job) {
22149
22306
  case OpKind.I18nEnd:
22150
22307
  currentI18n = null;
22151
22308
  break;
22309
+ case OpKind.IcuStart:
22310
+ if (op.context === null) {
22311
+ throw Error("Icu op should have its context set.");
22312
+ }
22313
+ currentIcu = op;
22314
+ break;
22315
+ case OpKind.IcuEnd:
22316
+ currentIcu = null;
22317
+ break;
22152
22318
  case OpKind.Text:
22153
22319
  if (currentI18n !== null) {
22154
22320
  textNodeI18nBlocks.set(op.xref, currentI18n);
22321
+ textNodeIcus.set(op.xref, currentIcu);
22155
22322
  OpList.remove(op);
22156
22323
  }
22157
22324
  break;
@@ -22164,11 +22331,13 @@ function extractI18nText(job) {
22164
22331
  continue;
22165
22332
  }
22166
22333
  const i18nOp = textNodeI18nBlocks.get(op.target);
22334
+ const icuOp = textNodeIcus.get(op.target);
22335
+ const contextId = icuOp ? icuOp.context : i18nOp.context;
22336
+ const resolutionTime = icuOp ? I18nParamResolutionTime.Postproccessing : I18nParamResolutionTime.Creation;
22167
22337
  const ops = [];
22168
22338
  for (let i = 0; i < op.interpolation.expressions.length; i++) {
22169
22339
  const expr = op.interpolation.expressions[i];
22170
- const placeholder = op.i18nPlaceholders[i];
22171
- ops.push(createI18nExpressionOp(i18nOp.context, i18nOp.xref, i18nOp.handle, expr, placeholder.name, I18nParamResolutionTime.Creation, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
22340
+ ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.handle, expr, op.i18nPlaceholders[i], resolutionTime, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
22172
22341
  }
22173
22342
  OpList.replaceWithMany(op, ops);
22174
22343
  break;
@@ -22204,45 +22373,6 @@ function serializeLocalRefs(refs) {
22204
22373
  }
22205
22374
  return literalArr(constRefs);
22206
22375
  }
22207
- function mergeI18nContexts(job) {
22208
- const i18nOps = /* @__PURE__ */ new Map();
22209
- const i18nContexts = /* @__PURE__ */ new Map();
22210
- for (const unit of job.units) {
22211
- for (const op of unit.create) {
22212
- switch (op.kind) {
22213
- case OpKind.I18nStart:
22214
- if (!op.context) {
22215
- throw Error("I18n op should have its context set.");
22216
- }
22217
- i18nOps.set(op.xref, op);
22218
- break;
22219
- case OpKind.I18nContext:
22220
- i18nContexts.set(op.xref, op);
22221
- break;
22222
- }
22223
- }
22224
- }
22225
- for (const childI18nOp of i18nOps.values()) {
22226
- if (childI18nOp.xref !== childI18nOp.root) {
22227
- const childContext = i18nContexts.get(childI18nOp.context);
22228
- const rootI18nOp = i18nOps.get(childI18nOp.root);
22229
- const rootContext = i18nContexts.get(rootI18nOp.context);
22230
- mergeParams(rootContext.params, childContext.params);
22231
- mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
22232
- }
22233
- }
22234
- }
22235
- function mergeParams(to, from) {
22236
- for (const [placeholder, fromValues] of from) {
22237
- const toValues = to.get(placeholder) || [];
22238
- const flags = fromValues[0].flags;
22239
- if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
22240
- to.set(placeholder, [...fromValues, ...toValues]);
22241
- } else {
22242
- to.set(placeholder, [...toValues, ...fromValues]);
22243
- }
22244
- }
22245
- }
22246
22376
  function emitNamespaceChanges(job) {
22247
22377
  for (const unit of job.units) {
22248
22378
  let activeNamespace = Namespace.HTML;
@@ -22729,9 +22859,10 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
22729
22859
  subTemplateIndex++;
22730
22860
  wrapTemplateWithI18n(templateView, i18nBlock);
22731
22861
  }
22732
- propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
22862
+ subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
22733
22863
  }
22734
22864
  }
22865
+ return subTemplateIndex;
22735
22866
  }
22736
22867
  function wrapTemplateWithI18n(unit, parentI18n) {
22737
22868
  var _a2;
@@ -23024,8 +23155,8 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
23024
23155
  }
23025
23156
  return call(Identifiers.repeaterCreate, args, sourceSpan);
23026
23157
  }
23027
- function repeater(metadataSlot, collection, sourceSpan) {
23028
- return call(Identifiers.repeater, [literal(metadataSlot), collection], sourceSpan);
23158
+ function repeater(collection, sourceSpan) {
23159
+ return call(Identifiers.repeater, [collection], sourceSpan);
23029
23160
  }
23030
23161
  function deferWhen(prefetch, expr, sourceSpan) {
23031
23162
  return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
@@ -23581,7 +23712,7 @@ function reifyUpdateOperations(_unit, ops) {
23581
23712
  OpList.replace(op, conditional(op.targetSlot.slot, op.processed, op.contextValue, op.sourceSpan));
23582
23713
  break;
23583
23714
  case OpKind.Repeater:
23584
- OpList.replace(op, repeater(op.targetSlot.slot, op.collection, op.sourceSpan));
23715
+ OpList.replace(op, repeater(op.collection, op.sourceSpan));
23585
23716
  break;
23586
23717
  case OpKind.DeferWhen:
23587
23718
  OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
@@ -23798,55 +23929,67 @@ function resolveI18nElementPlaceholders(job) {
23798
23929
  }
23799
23930
  }
23800
23931
  }
23801
- for (const unit of job.units) {
23802
- let currentOps = null;
23803
- for (const op of unit.create) {
23804
- switch (op.kind) {
23805
- case OpKind.I18nStart:
23806
- if (!op.context) {
23807
- throw Error("Could not find i18n context for i18n op");
23932
+ resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
23933
+ }
23934
+ function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
23935
+ let currentOps = null;
23936
+ for (const op of unit.create) {
23937
+ switch (op.kind) {
23938
+ case OpKind.I18nStart:
23939
+ if (!op.context) {
23940
+ throw Error("Could not find i18n context for i18n op");
23941
+ }
23942
+ currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
23943
+ break;
23944
+ case OpKind.I18nEnd:
23945
+ currentOps = null;
23946
+ break;
23947
+ case OpKind.ElementStart:
23948
+ if (op.i18nPlaceholder !== void 0) {
23949
+ if (currentOps === null) {
23950
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
23808
23951
  }
23809
- currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
23810
- break;
23811
- case OpKind.I18nEnd:
23812
- currentOps = null;
23813
- break;
23814
- case OpKind.ElementStart:
23815
- if (op.i18nPlaceholder !== void 0) {
23816
- if (currentOps === null) {
23817
- throw Error("i18n tag placeholder should only occur inside an i18n block");
23818
- }
23819
- const { startName, closeName } = op.i18nPlaceholder;
23820
- let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
23821
- if (closeName === "") {
23822
- flags |= I18nParamValueFlags.CloseTag;
23823
- }
23824
- addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
23952
+ const { startName, closeName } = op.i18nPlaceholder;
23953
+ let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
23954
+ if (closeName === "") {
23955
+ flags |= I18nParamValueFlags.CloseTag;
23825
23956
  }
23826
- break;
23827
- case OpKind.ElementEnd:
23828
- const startOp = elements.get(op.xref);
23829
- if (startOp && startOp.i18nPlaceholder !== void 0) {
23830
- if (currentOps === null) {
23831
- throw Error("i18n tag placeholder should only occur inside an i18n block");
23832
- }
23833
- const { closeName } = startOp.i18nPlaceholder;
23834
- if (closeName !== "") {
23835
- addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
23836
- }
23957
+ addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
23958
+ }
23959
+ break;
23960
+ case OpKind.ElementEnd:
23961
+ const startOp = elements.get(op.xref);
23962
+ if (startOp && startOp.i18nPlaceholder !== void 0) {
23963
+ if (currentOps === null) {
23964
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
23837
23965
  }
23838
- break;
23839
- case OpKind.Template:
23840
- if (op.i18nPlaceholder !== void 0) {
23841
- if (currentOps === null) {
23842
- throw Error("i18n tag placeholder should only occur inside an i18n block");
23843
- }
23844
- const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
23845
- addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
23846
- addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
23966
+ const { closeName } = startOp.i18nPlaceholder;
23967
+ if (closeName !== "") {
23968
+ addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
23847
23969
  }
23848
- break;
23849
- }
23970
+ }
23971
+ break;
23972
+ case OpKind.Template:
23973
+ if (op.i18nPlaceholder !== void 0) {
23974
+ if (currentOps === null) {
23975
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
23976
+ }
23977
+ let startFlags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
23978
+ const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
23979
+ const { startName, closeName } = op.i18nPlaceholder;
23980
+ const isSelfClosing = closeName === "";
23981
+ if (isSelfClosing) {
23982
+ startFlags |= I18nParamValueFlags.CloseTag;
23983
+ }
23984
+ addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
23985
+ resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
23986
+ if (!isSelfClosing) {
23987
+ addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
23988
+ }
23989
+ } else {
23990
+ resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
23991
+ }
23992
+ break;
23850
23993
  }
23851
23994
  }
23852
23995
  }
@@ -23858,7 +24001,7 @@ function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
23858
24001
  }
23859
24002
  return i18nOp.subTemplateIndex;
23860
24003
  }
23861
- function addParam(params, placeholder, value, subTemplateIndex, flags = I18nParamValueFlags.None) {
24004
+ function addParam(params, placeholder, value, subTemplateIndex, flags) {
23862
24005
  var _a2;
23863
24006
  const values = (_a2 = params.get(placeholder)) != null ? _a2 : [];
23864
24007
  values.push({ value, subTemplateIndex, flags });
@@ -23883,18 +24026,64 @@ function resolveI18nExpressionPlaceholders(job) {
23883
24026
  for (const unit of job.units) {
23884
24027
  for (const op of unit.update) {
23885
24028
  if (op.kind === OpKind.I18nExpression) {
23886
- const index2 = expressionIndices.get(op.context) || 0;
23887
24029
  const i18nContext = i18nContexts.get(op.context);
23888
- const subTemplateIndex = subTemplateIndicies.get(i18nContext.i18nBlock);
24030
+ const index2 = expressionIndices.get(op.target) || 0;
24031
+ const subTemplateIndex = subTemplateIndicies.get(op.target);
23889
24032
  const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
23890
24033
  const values = params.get(op.i18nPlaceholder) || [];
23891
- values.push({ value: index2, subTemplateIndex, flags: I18nParamValueFlags.None });
24034
+ values.push({
24035
+ value: index2,
24036
+ subTemplateIndex,
24037
+ flags: I18nParamValueFlags.ExpressionIndex
24038
+ });
23892
24039
  params.set(op.i18nPlaceholder, values);
23893
- expressionIndices.set(op.context, index2 + 1);
24040
+ expressionIndices.set(op.target, index2 + 1);
23894
24041
  }
23895
24042
  }
23896
24043
  }
23897
24044
  }
24045
+ function resolveI18nIcuPlaceholders(job) {
24046
+ for (const unit of job.units) {
24047
+ for (const op of unit.create) {
24048
+ if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
24049
+ for (const node of op.message.nodes) {
24050
+ node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
24051
+ }
24052
+ }
24053
+ }
24054
+ }
24055
+ }
24056
+ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
24057
+ constructor(params) {
24058
+ super();
24059
+ this.params = params;
24060
+ }
24061
+ visitContainerPlaceholder(placeholder) {
24062
+ var _a2, _b2;
24063
+ if (placeholder.startName && placeholder.startSourceSpan && !this.params.has(placeholder.startName)) {
24064
+ this.params.set(placeholder.startName, [{
24065
+ value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
24066
+ subTemplateIndex: null,
24067
+ flags: I18nParamValueFlags.None
24068
+ }]);
24069
+ }
24070
+ if (placeholder.closeName && placeholder.endSourceSpan && !this.params.has(placeholder.closeName)) {
24071
+ this.params.set(placeholder.closeName, [{
24072
+ value: (_b2 = placeholder.endSourceSpan) == null ? void 0 : _b2.toString(),
24073
+ subTemplateIndex: null,
24074
+ flags: I18nParamValueFlags.None
24075
+ }]);
24076
+ }
24077
+ }
24078
+ visitTagPlaceholder(placeholder) {
24079
+ super.visitTagPlaceholder(placeholder);
24080
+ this.visitContainerPlaceholder(placeholder);
24081
+ }
24082
+ visitBlockPlaceholder(placeholder) {
24083
+ super.visitBlockPlaceholder(placeholder);
24084
+ this.visitContainerPlaceholder(placeholder);
24085
+ }
24086
+ };
23898
24087
  function resolveNames(job) {
23899
24088
  for (const unit of job.units) {
23900
24089
  processLexicalScope(unit, unit.create, null);
@@ -24588,6 +24777,7 @@ function allowConservativeInlining(decl2, target) {
24588
24777
  function wrapI18nIcus(job) {
24589
24778
  for (const unit of job.units) {
24590
24779
  let currentI18nOp = null;
24780
+ let addedI18nId = null;
24591
24781
  for (const op of unit.create) {
24592
24782
  switch (op.kind) {
24593
24783
  case OpKind.I18nStart:
@@ -24596,11 +24786,16 @@ function wrapI18nIcus(job) {
24596
24786
  case OpKind.I18nEnd:
24597
24787
  currentI18nOp = null;
24598
24788
  break;
24599
- case OpKind.Icu:
24789
+ case OpKind.IcuStart:
24600
24790
  if (currentI18nOp === null) {
24601
- const id = job.allocateXrefId();
24602
- OpList.insertBefore(createI18nStartOp(id, op.message), op);
24603
- OpList.insertAfter(createI18nEndOp(id), op);
24791
+ addedI18nId = job.allocateXrefId();
24792
+ OpList.insertBefore(createI18nStartOp(addedI18nId, op.message), op);
24793
+ }
24794
+ break;
24795
+ case OpKind.IcuEnd:
24796
+ if (addedI18nId !== null) {
24797
+ OpList.insertAfter(createI18nEndOp(addedI18nId), op);
24798
+ addedI18nId = null;
24604
24799
  }
24605
24800
  break;
24606
24801
  }
@@ -24625,7 +24820,6 @@ var phases = [
24625
24820
  { kind: CompilationJobKind.Tmpl, fn: createPipes },
24626
24821
  { kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
24627
24822
  { kind: CompilationJobKind.Tmpl, fn: extractI18nText },
24628
- { kind: CompilationJobKind.Tmpl, fn: createI18nIcuExpressions },
24629
24823
  { kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
24630
24824
  { kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
24631
24825
  { kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
@@ -24649,7 +24843,7 @@ var phases = [
24649
24843
  { kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
24650
24844
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
24651
24845
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
24652
- { kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
24846
+ { kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
24653
24847
  { kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
24654
24848
  { kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
24655
24849
  { kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
@@ -24911,7 +25105,7 @@ function ingestContent(unit, content) {
24911
25105
  function ingestText(unit, text2) {
24912
25106
  unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, text2.sourceSpan));
24913
25107
  }
24914
- function ingestBoundText(unit, text2) {
25108
+ function ingestBoundText(unit, text2, i18nPlaceholders) {
24915
25109
  var _a2;
24916
25110
  let value = text2.value;
24917
25111
  if (value instanceof ASTWithSource) {
@@ -24923,7 +25117,12 @@ function ingestBoundText(unit, text2) {
24923
25117
  if (text2.i18n !== void 0 && !(text2.i18n instanceof Container)) {
24924
25118
  throw Error(`Unhandled i18n metadata type for text interpolation: ${(_a2 = text2.i18n) == null ? void 0 : _a2.constructor.name}`);
24925
25119
  }
24926
- const i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder) : [];
25120
+ if (i18nPlaceholders === void 0) {
25121
+ i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
25122
+ }
25123
+ if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {
25124
+ throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);
25125
+ }
24927
25126
  const textXref = unit.job.allocateXrefId();
24928
25127
  unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
24929
25128
  const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
@@ -25069,13 +25268,26 @@ function ingestDeferBlock(unit, deferBlock) {
25069
25268
  unit.update.push(deferWhenOps);
25070
25269
  }
25071
25270
  function ingestIcu(unit, icu) {
25072
- var _a2;
25271
+ var _a2, _b2;
25073
25272
  if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
25074
25273
  const xref = unit.job.allocateXrefId();
25075
- unit.create.push(createIcuOp(xref, icu.i18n, icu.i18n.nodes[0], icuFromI18nMessage(icu.i18n).name, null));
25076
- unit.update.push(createIcuUpdateOp(xref, null));
25274
+ const icuNode = icu.i18n.nodes[0];
25275
+ unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
25276
+ const expressionPlaceholder = (_a2 = icuNode.expressionPlaceholder) == null ? void 0 : _a2.trimEnd();
25277
+ if (expressionPlaceholder === void 0 || icu.vars[expressionPlaceholder] === void 0) {
25278
+ throw Error("ICU should have a text binding");
25279
+ }
25280
+ ingestBoundText(unit, icu.vars[expressionPlaceholder], [expressionPlaceholder]);
25281
+ for (const [placeholder, text2] of Object.entries(icu.placeholders)) {
25282
+ if (text2 instanceof BoundText) {
25283
+ ingestBoundText(unit, text2, [placeholder]);
25284
+ } else {
25285
+ ingestText(unit, text2);
25286
+ }
25287
+ }
25288
+ unit.create.push(createIcuEndOp(xref));
25077
25289
  } else {
25078
- throw Error(`Unhandled i18n metadata type for ICU: ${(_a2 = icu.i18n) == null ? void 0 : _a2.constructor.name}`);
25290
+ throw Error(`Unhandled i18n metadata type for ICU: ${(_b2 = icu.i18n) == null ? void 0 : _b2.constructor.name}`);
25079
25291
  }
25080
25292
  }
25081
25293
  function ingestForBlock(unit, forBlock) {
@@ -26145,18 +26357,18 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
26145
26357
  const branches = [];
26146
26358
  const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);
26147
26359
  if (mainBlockParams !== null) {
26148
- branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan));
26360
+ branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));
26149
26361
  }
26150
26362
  for (const block of connectedBlocks) {
26151
26363
  if (ELSE_IF_PATTERN.test(block.name)) {
26152
26364
  const params = parseConditionalBlockParameters(block, errors, bindingParser);
26153
26365
  if (params !== null) {
26154
26366
  const children = visitAll(visitor, block.children, block.children);
26155
- branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
26367
+ branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
26156
26368
  }
26157
26369
  } else if (block.name === "else") {
26158
26370
  const children = visitAll(visitor, block.children, block.children);
26159
- branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
26371
+ branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
26160
26372
  }
26161
26373
  }
26162
26374
  const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;
@@ -26184,7 +26396,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
26184
26396
  } else if (block.parameters.length > 0) {
26185
26397
  errors.push(new ParseError(block.sourceSpan, "@empty block cannot have parameters"));
26186
26398
  } else {
26187
- empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan);
26399
+ empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);
26188
26400
  }
26189
26401
  } else {
26190
26402
  errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block "${block.name}"`));
@@ -26196,7 +26408,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
26196
26408
  } else {
26197
26409
  const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
26198
26410
  const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
26199
- node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan);
26411
+ node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);
26200
26412
  }
26201
26413
  }
26202
26414
  return { node, errors };
@@ -26216,7 +26428,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
26216
26428
  continue;
26217
26429
  }
26218
26430
  const expression = node.name === "case" ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
26219
- const ast2 = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
26431
+ const ast2 = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
26220
26432
  if (expression === null) {
26221
26433
  defaultCase = ast2;
26222
26434
  } else {
@@ -26700,7 +26912,7 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
26700
26912
  endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
26701
26913
  }
26702
26914
  const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
26703
- const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan);
26915
+ const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);
26704
26916
  return { node, errors };
26705
26917
  }
26706
26918
  function parseConnectedBlocks(connectedBlocks, errors, visitor) {
@@ -26758,7 +26970,7 @@ function parsePlaceholderBlock(ast, visitor) {
26758
26970
  throw new Error(`Unrecognized parameter in @placeholder block: "${param.expression}"`);
26759
26971
  }
26760
26972
  }
26761
- return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
26973
+ return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
26762
26974
  }
26763
26975
  function parseLoadingBlock(ast, visitor) {
26764
26976
  let afterTime = null;
@@ -26786,13 +26998,13 @@ function parseLoadingBlock(ast, visitor) {
26786
26998
  throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
26787
26999
  }
26788
27000
  }
26789
- return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
27001
+ return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
26790
27002
  }
26791
27003
  function parseErrorBlock(ast, visitor) {
26792
27004
  if (ast.parameters.length > 0) {
26793
27005
  throw new Error(`@error block cannot have parameters`);
26794
27006
  }
26795
- return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
27007
+ return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
26796
27008
  }
26797
27009
  function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
26798
27010
  const triggers = {};
@@ -27272,6 +27484,11 @@ var I18nContext = class {
27272
27484
  const content = { type, index: index2, ctx: this.id, isVoid: node.isVoid, closed };
27273
27485
  updatePlaceholderMap(this.placeholders, ph, content);
27274
27486
  }
27487
+ appendBlockPart(node, index2, closed) {
27488
+ const ph = closed ? node.closeName : node.startName;
27489
+ const content = { type: TagType.TEMPLATE, index: index2, ctx: this.id, closed };
27490
+ updatePlaceholderMap(this.placeholders, ph, content);
27491
+ }
27275
27492
  get icus() {
27276
27493
  return this._registry.icus;
27277
27494
  }
@@ -27301,6 +27518,11 @@ var I18nContext = class {
27301
27518
  this.appendTag(TagType.TEMPLATE, node, index2, true);
27302
27519
  this._unresolvedCtxCount++;
27303
27520
  }
27521
+ appendBlock(node, index2) {
27522
+ this.appendBlockPart(node, index2, false);
27523
+ this.appendBlockPart(node, index2, true);
27524
+ this._unresolvedCtxCount++;
27525
+ }
27304
27526
  appendElement(node, index2, closed) {
27305
27527
  this.appendTag(TagType.ELEMENT, node, index2, closed);
27306
27528
  }
@@ -27494,12 +27716,18 @@ var TemplateDefinitionBuilder = class {
27494
27716
  this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
27495
27717
  });
27496
27718
  }
27497
- buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2) {
27719
+ buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2, variableAliases) {
27498
27720
  this._ngContentSelectorsOffset = ngContentSelectorsOffset;
27499
27721
  if (this._namespace !== Identifiers.namespaceHTML) {
27500
27722
  this.creationInstruction(null, this._namespace);
27501
27723
  }
27502
- variables.forEach((v) => this.registerContextVariables(v));
27724
+ variables.forEach((v) => {
27725
+ const alias = variableAliases == null ? void 0 : variableAliases[v.name];
27726
+ this.registerContextVariables(v.name, v.value);
27727
+ if (alias) {
27728
+ this.registerContextVariables(alias, v.value);
27729
+ }
27730
+ });
27503
27731
  const initI18nContext = this.i18nContext || isI18nRootNode(i18n2) && !isSingleI18nIcu(i18n2) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n2);
27504
27732
  const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);
27505
27733
  if (initI18nContext) {
@@ -27554,12 +27782,12 @@ var TemplateDefinitionBuilder = class {
27554
27782
  this._constants.prepareStatements.push(...statements);
27555
27783
  return _ref;
27556
27784
  }
27557
- registerContextVariables(variable$1) {
27785
+ registerContextVariables(name, value) {
27558
27786
  const scopedName = this._bindingScope.freshReferenceName();
27559
27787
  const retrievalLevel = this.level;
27560
- const isDirect = variable$1.value === DIRECT_CONTEXT_REFERENCE;
27561
- const lhs = variable(variable$1.name + scopedName);
27562
- this._bindingScope.set(retrievalLevel, variable$1.name, (scope) => {
27788
+ const isDirect = value === DIRECT_CONTEXT_REFERENCE;
27789
+ const lhs = variable(name + scopedName);
27790
+ this._bindingScope.set(retrievalLevel, name, (scope) => {
27563
27791
  return isDirect && scope.bindingLevel === retrievalLevel && !scope.isListenerScope() ? variable(CONTEXT_NAME) : lhs;
27564
27792
  }, 1, (scope, relativeLevel) => {
27565
27793
  let rhs;
@@ -27577,7 +27805,7 @@ var TemplateDefinitionBuilder = class {
27577
27805
  rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);
27578
27806
  }
27579
27807
  return [
27580
- lhs.set(isDirect ? rhs : rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()
27808
+ lhs.set(isDirect ? rhs : rhs.prop(value || IMPLICIT_REFERENCE)).toConstDecl()
27581
27809
  ];
27582
27810
  });
27583
27811
  }
@@ -27916,16 +28144,20 @@ var TemplateDefinitionBuilder = class {
27916
28144
  this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
27917
28145
  }
27918
28146
  }
27919
- prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [], i18n2) {
28147
+ prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [], i18nMeta, variableAliases) {
27920
28148
  const index2 = this.allocateDataSlot();
27921
- if (this.i18n && i18n2) {
27922
- this.i18n.appendTemplate(i18n2, index2);
28149
+ if (this.i18n && i18nMeta) {
28150
+ if (i18nMeta instanceof BlockPlaceholder) {
28151
+ this.i18n.appendBlock(i18nMeta, index2);
28152
+ } else {
28153
+ this.i18n.appendTemplate(i18nMeta, index2);
28154
+ }
27923
28155
  }
27924
28156
  const contextName = `${this.contextName}${contextNameSuffix}_${index2}`;
27925
28157
  const name = `${contextName}_Template`;
27926
28158
  const visitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, index2, name, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this.elementLocations, this._constants);
27927
28159
  this._nestedTemplateFns.push(() => {
27928
- const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18n2);
28160
+ const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
27929
28161
  this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(name));
27930
28162
  if (visitor._ngContentReservedSlots.length) {
27931
28163
  this._ngContentReservedSlots.push(...visitor._ngContentReservedSlots);
@@ -28008,7 +28240,7 @@ var TemplateDefinitionBuilder = class {
28008
28240
  const placeholders = this.i18nBindProps(icu.placeholders);
28009
28241
  const message = icu.i18n;
28010
28242
  const transformFn = (raw) => {
28011
- const params = __spreadValues(__spreadValues({}, vars), placeholders);
28243
+ const params = Object.fromEntries(Object.entries(__spreadValues(__spreadValues({}, vars), placeholders)).sort());
28012
28244
  const formatted = formatI18nPlaceholderNamesInMap(params, false);
28013
28245
  return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
28014
28246
  };
@@ -28035,7 +28267,7 @@ var TemplateDefinitionBuilder = class {
28035
28267
  tagName = inferredData.tagName;
28036
28268
  attrsExprs = inferredData.attrsExprs;
28037
28269
  }
28038
- const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs);
28270
+ const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs, void 0, branch.i18n);
28039
28271
  const processedExpression = expression === null ? null : expression.visit(this._valueConverter);
28040
28272
  return { index: templateIndex, expression: processedExpression, alias: expressionAlias };
28041
28273
  });
@@ -28069,7 +28301,7 @@ var TemplateDefinitionBuilder = class {
28069
28301
  }
28070
28302
  visitSwitchBlock(block) {
28071
28303
  const caseData = block.cases.map((currentCase) => {
28072
- const index2 = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan);
28304
+ const index2 = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
28073
28305
  const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
28074
28306
  return { index: index2, expression };
28075
28307
  });
@@ -28097,12 +28329,12 @@ var TemplateDefinitionBuilder = class {
28097
28329
  if (!metadata) {
28098
28330
  throw new Error("Could not resolve `defer` block metadata. Block may need to be analyzed.");
28099
28331
  }
28100
- const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan);
28101
- const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan) : null;
28332
+ const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan, void 0, void 0, void 0, deferred.i18n);
28333
+ const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan, void 0, void 0, void 0, loading.i18n) : null;
28102
28334
  const loadingConsts = loading ? trimTrailingNulls([literal(loading.minimumTime), literal(loading.afterTime)]) : null;
28103
- const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan) : null;
28335
+ const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan, void 0, void 0, void 0, placeholder.i18n) : null;
28104
28336
  const placeholderConsts = placeholder && placeholder.minimumTime !== null ? literalArr([literal(placeholder.minimumTime)]) : null;
28105
- const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan) : null;
28337
+ const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan, void 0, void 0, void 0, error2.i18n) : null;
28106
28338
  const deferredIndex = this.allocateDataSlot();
28107
28339
  const depsFnName = `${this.contextName}_Defer_${deferredIndex}_DepsFn`;
28108
28340
  this.creationInstruction(deferred.sourceSpan, Identifiers.defer, trimTrailingNulls([
@@ -28211,11 +28443,14 @@ var TemplateDefinitionBuilder = class {
28211
28443
  visitForLoopBlock(block) {
28212
28444
  const blockIndex = this.allocateDataSlot();
28213
28445
  const { tagName, attrsExprs } = this.inferProjectionDataFromInsertionPoint(block);
28214
- const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count]);
28446
+ const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count], block.i18n, {
28447
+ [block.contextVariables.$index.name]: this.getLevelSpecificVariableName("$index", this.level + 1),
28448
+ [block.contextVariables.$count.name]: this.getLevelSpecificVariableName("$count", this.level + 1)
28449
+ });
28215
28450
  const { expression: trackByExpression, usesComponentInstance: trackByUsesComponentInstance } = this.createTrackByFunction(block);
28216
28451
  let emptyData = null;
28217
28452
  if (block.empty !== null) {
28218
- emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty");
28453
+ emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty", void 0, block.empty.i18n);
28219
28454
  this.allocateBindingSlots(null);
28220
28455
  }
28221
28456
  this.registerComputedLoopVariables(block, primaryData.scope);
@@ -28237,16 +28472,31 @@ var TemplateDefinitionBuilder = class {
28237
28472
  return params;
28238
28473
  });
28239
28474
  const value = block.expression.visit(this._valueConverter);
28240
- this.updateInstruction(block.sourceSpan, Identifiers.repeater, () => [literal(blockIndex), this.convertPropertyBinding(value)]);
28475
+ this.updateInstructionWithAdvance(blockIndex, block.sourceSpan, Identifiers.repeater, () => [this.convertPropertyBinding(value)]);
28241
28476
  }
28242
28477
  registerComputedLoopVariables(block, bindingScope) {
28243
- const indexLocalName = block.contextVariables.$index.name;
28244
- const countLocalName = block.contextVariables.$count.name;
28245
28478
  const level = bindingScope.bindingLevel;
28246
- bindingScope.set(level, block.contextVariables.$odd.name, (scope) => scope.get(indexLocalName).modulo(literal(2)).notIdentical(literal(0)));
28247
- bindingScope.set(level, block.contextVariables.$even.name, (scope) => scope.get(indexLocalName).modulo(literal(2)).identical(literal(0)));
28248
- bindingScope.set(level, block.contextVariables.$first.name, (scope) => scope.get(indexLocalName).identical(literal(0)));
28249
- bindingScope.set(level, block.contextVariables.$last.name, (scope) => scope.get(indexLocalName).identical(scope.get(countLocalName).minus(literal(1))));
28479
+ bindingScope.set(level, block.contextVariables.$odd.name, (scope, retrievalLevel) => {
28480
+ return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).notIdentical(literal(0));
28481
+ });
28482
+ bindingScope.set(level, block.contextVariables.$even.name, (scope, retrievalLevel) => {
28483
+ return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).identical(literal(0));
28484
+ });
28485
+ bindingScope.set(level, block.contextVariables.$first.name, (scope, retrievalLevel) => {
28486
+ return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").identical(literal(0));
28487
+ });
28488
+ bindingScope.set(level, block.contextVariables.$last.name, (scope, retrievalLevel) => {
28489
+ const index2 = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index");
28490
+ const count = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$count");
28491
+ return index2.identical(count.minus(literal(1)));
28492
+ });
28493
+ }
28494
+ getLevelSpecificVariableName(name, level) {
28495
+ return `\u0275${name}_${level}`;
28496
+ }
28497
+ getLevelSpecificForLoopVariable(block, scope, retrievalLevel, name) {
28498
+ const scopeName = scope.bindingLevel === retrievalLevel ? block.contextVariables[name].name : this.getLevelSpecificVariableName(name, retrievalLevel);
28499
+ return scope.get(scopeName);
28250
28500
  }
28251
28501
  optimizeTrackByFunction(block) {
28252
28502
  const indexLocalName = block.contextVariables.$index.name;
@@ -28656,7 +28906,7 @@ var BindingScope = class {
28656
28906
  if (value.declareLocalCallback && !value.declare) {
28657
28907
  value.declare = true;
28658
28908
  }
28659
- return typeof value.lhs === "function" ? value.lhs(this) : value.lhs;
28909
+ return typeof value.lhs === "function" ? value.lhs(this, value.retrievalLevel) : value.lhs;
28660
28910
  }
28661
28911
  current = current.parent;
28662
28912
  }
@@ -28732,7 +28982,7 @@ var BindingScope = class {
28732
28982
  const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
28733
28983
  componentValue.declare = true;
28734
28984
  this.maybeRestoreView();
28735
- const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this) : componentValue.lhs;
28985
+ const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this, componentValue.retrievalLevel) : componentValue.lhs;
28736
28986
  return name === DIRECT_CONTEXT_REFERENCE ? lhs : lhs.prop(name);
28737
28987
  }
28738
28988
  maybeRestoreView() {
@@ -28805,21 +29055,6 @@ var TrackByBindingScope = class extends BindingScope {
28805
29055
  return this.componentAccessCount;
28806
29056
  }
28807
29057
  };
28808
- function createCssSelector(elementName, attributes) {
28809
- const cssSelector = new CssSelector();
28810
- const elementNameNoNs = splitNsName(elementName)[1];
28811
- cssSelector.setElement(elementNameNoNs);
28812
- Object.getOwnPropertyNames(attributes).forEach((name) => {
28813
- const nameNoNs = splitNsName(name)[1];
28814
- const value = attributes[name];
28815
- cssSelector.addAttribute(nameNoNs, value);
28816
- if (name.toLowerCase() === "class") {
28817
- const classes = value.trim().split(/\s+/);
28818
- classes.forEach((className) => cssSelector.addClassName(className));
28819
- }
28820
- });
28821
- return cssSelector;
28822
- }
28823
29058
  function getNgProjectAsLiteral(attribute2) {
28824
29059
  const parsedR3Selector = parseSelectorToR3Selector(attribute2.value)[0];
28825
29060
  return [literal(5), asLiteral(parsedR3Selector)];
@@ -29086,6 +29321,9 @@ function addFeatures(definitionMap, meta) {
29086
29321
  break;
29087
29322
  }
29088
29323
  }
29324
+ if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
29325
+ features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
29326
+ }
29089
29327
  if (meta.usesInheritance) {
29090
29328
  features.push(importExpr(Identifiers.InheritDefinitionFeature));
29091
29329
  }
@@ -29098,9 +29336,6 @@ function addFeatures(definitionMap, meta) {
29098
29336
  if (meta.hasOwnProperty("template") && meta.isStandalone) {
29099
29337
  features.push(importExpr(Identifiers.StandaloneFeature));
29100
29338
  }
29101
- if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
29102
- features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
29103
- }
29104
29339
  if (features.length) {
29105
29340
  definitionMap.set("features", literalArr(features));
29106
29341
  }
@@ -29803,13 +30038,13 @@ var DirectiveBinder = class {
29803
30038
  template2.forEach((node) => node.visit(this));
29804
30039
  }
29805
30040
  visitElement(element2) {
29806
- this.visitElementOrTemplate(element2.name, element2);
30041
+ this.visitElementOrTemplate(element2);
29807
30042
  }
29808
30043
  visitTemplate(template2) {
29809
- this.visitElementOrTemplate("ng-template", template2);
30044
+ this.visitElementOrTemplate(template2);
29810
30045
  }
29811
- visitElementOrTemplate(elementName, node) {
29812
- const cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node));
30046
+ visitElementOrTemplate(node) {
30047
+ const cssSelector = createCssSelectorFromNode(node);
29813
30048
  const directives = [];
29814
30049
  this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));
29815
30050
  if (directives.length > 0) {
@@ -30791,7 +31026,7 @@ function publishFacade(global) {
30791
31026
  const ng = global.ng || (global.ng = {});
30792
31027
  ng.\u0275compilerFacade = new CompilerFacadeImpl();
30793
31028
  }
30794
- var VERSION = new Version("17.0.0");
31029
+ var VERSION = new Version("17.1.0-next.2");
30795
31030
  var _VisitorMode;
30796
31031
  (function(_VisitorMode2) {
30797
31032
  _VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
@@ -30827,7 +31062,7 @@ var FactoryTarget;
30827
31062
  })(FactoryTarget || (FactoryTarget = {}));
30828
31063
  publishFacade(_global);
30829
31064
 
30830
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/tree-traversal.js
31065
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/tree-traversal.js
30831
31066
  function visitElements(nodes, preorderCallback = () => {
30832
31067
  }, postorderCallback = () => {
30833
31068
  }) {
@@ -30907,7 +31142,7 @@ function replaceAt(str, offset, oldSubstr, newSubstr) {
30907
31142
  return prefix + newSubstr + suffix;
30908
31143
  }
30909
31144
 
30910
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-template.js
31145
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-template.js
30911
31146
  var CardTemplateMigrator = class extends TemplateMigrator {
30912
31147
  getUpdates(ast) {
30913
31148
  const updates = [];
@@ -30924,7 +31159,7 @@ var CardTemplateMigrator = class extends TemplateMigrator {
30924
31159
  }
30925
31160
  };
30926
31161
 
30927
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/checkbox/checkbox-styles.js
31162
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/checkbox/checkbox-styles.js
30928
31163
  var CheckboxStylesMigrator = class extends StyleMigrator {
30929
31164
  constructor() {
30930
31165
  super(...arguments);
@@ -30948,7 +31183,7 @@ var CheckboxStylesMigrator = class extends StyleMigrator {
30948
31183
  }
30949
31184
  };
30950
31185
 
30951
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-styles.js
31186
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-styles.js
30952
31187
  var ChipsStylesMigrator = class extends StyleMigrator {
30953
31188
  constructor() {
30954
31189
  super(...arguments);
@@ -30979,7 +31214,7 @@ var ChipsStylesMigrator = class extends StyleMigrator {
30979
31214
  }
30980
31215
  };
30981
31216
 
30982
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-template.js
31217
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-template.js
30983
31218
  var ChipsTemplateMigrator = class extends TemplateMigrator {
30984
31219
  constructor() {
30985
31220
  super(...arguments);
@@ -31059,7 +31294,7 @@ var ChipsTemplateMigrator = class extends TemplateMigrator {
31059
31294
  }
31060
31295
  };
31061
31296
 
31062
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/dialog/dialog-styles.js
31297
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/dialog/dialog-styles.js
31063
31298
  var DialogStylesMigrator = class extends StyleMigrator {
31064
31299
  constructor() {
31065
31300
  super(...arguments);
@@ -31089,7 +31324,7 @@ var DialogStylesMigrator = class extends StyleMigrator {
31089
31324
  }
31090
31325
  };
31091
31326
 
31092
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-styles.js
31327
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-styles.js
31093
31328
  var FormFieldStylesMigrator = class extends StyleMigrator {
31094
31329
  constructor() {
31095
31330
  super(...arguments);
@@ -31146,7 +31381,7 @@ var FormFieldStylesMigrator = class extends StyleMigrator {
31146
31381
  }
31147
31382
  };
31148
31383
 
31149
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/input/input-styles.js
31384
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/input/input-styles.js
31150
31385
  var InputStylesMigrator = class extends StyleMigrator {
31151
31386
  constructor() {
31152
31387
  super(...arguments);
@@ -31170,7 +31405,7 @@ var InputStylesMigrator = class extends StyleMigrator {
31170
31405
  }
31171
31406
  };
31172
31407
 
31173
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/list/list-styles.js
31408
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/list/list-styles.js
31174
31409
  var ListStylesMigrator = class extends StyleMigrator {
31175
31410
  constructor() {
31176
31411
  super(...arguments);
@@ -31201,7 +31436,7 @@ var ListStylesMigrator = class extends StyleMigrator {
31201
31436
  }
31202
31437
  };
31203
31438
 
31204
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/menu/menu-styles.js
31439
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/menu/menu-styles.js
31205
31440
  var MenuStylesMigrator = class extends StyleMigrator {
31206
31441
  constructor() {
31207
31442
  super(...arguments);
@@ -31234,7 +31469,7 @@ var MenuStylesMigrator = class extends StyleMigrator {
31234
31469
  }
31235
31470
  };
31236
31471
 
31237
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/paginator/paginator-styles.js
31472
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/paginator/paginator-styles.js
31238
31473
  var PaginatorStylesMigrator = class extends StyleMigrator {
31239
31474
  constructor() {
31240
31475
  super(...arguments);
@@ -31280,7 +31515,7 @@ var PaginatorStylesMigrator = class extends StyleMigrator {
31280
31515
  }
31281
31516
  };
31282
31517
 
31283
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-bar/progress-bar-styles.js
31518
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-bar/progress-bar-styles.js
31284
31519
  var ProgressBarStylesMigrator = class extends StyleMigrator {
31285
31520
  constructor() {
31286
31521
  super(...arguments);
@@ -31304,7 +31539,7 @@ var ProgressBarStylesMigrator = class extends StyleMigrator {
31304
31539
  }
31305
31540
  };
31306
31541
 
31307
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-spinner/progress-spinner-styles.js
31542
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-spinner/progress-spinner-styles.js
31308
31543
  var ProgressSpinnerStylesMigrator = class extends StyleMigrator {
31309
31544
  constructor() {
31310
31545
  super(...arguments);
@@ -31331,7 +31566,7 @@ var ProgressSpinnerStylesMigrator = class extends StyleMigrator {
31331
31566
  }
31332
31567
  };
31333
31568
 
31334
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/radio/radio-styles.js
31569
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/radio/radio-styles.js
31335
31570
  var RadioStylesMigrator = class extends StyleMigrator {
31336
31571
  constructor() {
31337
31572
  super(...arguments);
@@ -31358,7 +31593,7 @@ var RadioStylesMigrator = class extends StyleMigrator {
31358
31593
  }
31359
31594
  };
31360
31595
 
31361
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/select/select-styles.js
31596
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/select/select-styles.js
31362
31597
  var SelectStylesMigrator = class extends StyleMigrator {
31363
31598
  constructor() {
31364
31599
  super(...arguments);
@@ -31389,7 +31624,7 @@ var SelectStylesMigrator = class extends StyleMigrator {
31389
31624
  }
31390
31625
  };
31391
31626
 
31392
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slide-toggle/slide-toggle-styles.js
31627
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slide-toggle/slide-toggle-styles.js
31393
31628
  var SlideToggleStylesMigrator = class extends StyleMigrator {
31394
31629
  constructor() {
31395
31630
  super(...arguments);
@@ -31413,7 +31648,7 @@ var SlideToggleStylesMigrator = class extends StyleMigrator {
31413
31648
  }
31414
31649
  };
31415
31650
 
31416
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-styles.js
31651
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-styles.js
31417
31652
  var SliderStylesMigrator = class extends StyleMigrator {
31418
31653
  constructor() {
31419
31654
  super(...arguments);
@@ -31437,7 +31672,7 @@ var SliderStylesMigrator = class extends StyleMigrator {
31437
31672
  }
31438
31673
  };
31439
31674
 
31440
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/snack-bar/snack-bar-styles.js
31675
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/snack-bar/snack-bar-styles.js
31441
31676
  var SnackBarMigrator = class extends StyleMigrator {
31442
31677
  constructor() {
31443
31678
  super(...arguments);
@@ -31470,7 +31705,7 @@ var SnackBarMigrator = class extends StyleMigrator {
31470
31705
  }
31471
31706
  };
31472
31707
 
31473
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/table/table-styles.js
31708
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/table/table-styles.js
31474
31709
  var TableStylesMigrator = class extends StyleMigrator {
31475
31710
  constructor() {
31476
31711
  super(...arguments);
@@ -31511,7 +31746,7 @@ var TableStylesMigrator = class extends StyleMigrator {
31511
31746
  }
31512
31747
  };
31513
31748
 
31514
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tabs/tabs-styles.js
31749
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tabs/tabs-styles.js
31515
31750
  var TabsStylesMigrator = class extends StyleMigrator {
31516
31751
  constructor() {
31517
31752
  super(...arguments);
@@ -31542,7 +31777,7 @@ var TabsStylesMigrator = class extends StyleMigrator {
31542
31777
  }
31543
31778
  };
31544
31779
 
31545
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tooltip/tooltip-styles.js
31780
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tooltip/tooltip-styles.js
31546
31781
  var TooltipStylesMigrator = class extends StyleMigrator {
31547
31782
  constructor() {
31548
31783
  super(...arguments);
@@ -31576,7 +31811,7 @@ var TooltipStylesMigrator = class extends StyleMigrator {
31576
31811
  }
31577
31812
  };
31578
31813
 
31579
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/optgroup/optgroup-styles.js
31814
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/optgroup/optgroup-styles.js
31580
31815
  var OptgroupStylesMigrator = class extends StyleMigrator {
31581
31816
  constructor() {
31582
31817
  super(...arguments);
@@ -31609,7 +31844,7 @@ var OptgroupStylesMigrator = class extends StyleMigrator {
31609
31844
  }
31610
31845
  };
31611
31846
 
31612
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/option/option-styles.js
31847
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/option/option-styles.js
31613
31848
  var OptionStylesMigrator = class extends StyleMigrator {
31614
31849
  constructor() {
31615
31850
  super(...arguments);
@@ -31662,7 +31897,7 @@ var OptionStylesMigrator = class extends StyleMigrator {
31662
31897
  }
31663
31898
  };
31664
31899
 
31665
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-template.js
31900
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-template.js
31666
31901
  var FormFieldTemplateMigrator = class extends TemplateMigrator {
31667
31902
  getUpdates(ast) {
31668
31903
  const updates = [];
@@ -31679,7 +31914,7 @@ var FormFieldTemplateMigrator = class extends TemplateMigrator {
31679
31914
  }
31680
31915
  };
31681
31916
 
31682
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-template.js
31917
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-template.js
31683
31918
  var BindingType;
31684
31919
  (function(BindingType2) {
31685
31920
  BindingType2[BindingType2["INPUT"] = 0] = "INPUT";
@@ -31805,7 +32040,7 @@ var SliderTemplateMigrator = class extends TemplateMigrator {
31805
32040
  }
31806
32041
  };
31807
32042
 
31808
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/constants.js
32043
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/constants.js
31809
32044
  var mappings = [
31810
32045
  ["display-4", "headline-1"],
31811
32046
  ["display-3", "headline-2"],
@@ -31822,7 +32057,7 @@ var RENAMED_TYPOGRAPHY_LEVELS = new Map(mappings);
31822
32057
  var RENAMED_TYPOGRAPHY_CLASSES = new Map(mappings.map((m) => ["mat-" + m[0], "mat-" + m[1]]));
31823
32058
  var COMBINED_TYPOGRAPHY_LEVELS = /* @__PURE__ */ new Map([["input", "body-1"]]);
31824
32059
 
31825
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-template.js
32060
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-template.js
31826
32061
  var TypographyHierarchyTemplateMigrator = class extends TemplateMigrator {
31827
32062
  getUpdates(ast) {
31828
32063
  const updates = [];
@@ -31865,7 +32100,7 @@ var TypographyHierarchyTemplateMigrator = class extends TemplateMigrator {
31865
32100
  }
31866
32101
  };
31867
32102
 
31868
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-styles.js
32103
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-styles.js
31869
32104
  var TypographyHierarchyStylesMigrator = class extends StyleMigrator {
31870
32105
  constructor() {
31871
32106
  super();
@@ -31886,7 +32121,7 @@ var TypographyHierarchyStylesMigrator = class extends StyleMigrator {
31886
32121
  }
31887
32122
  };
31888
32123
 
31889
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/index.js
32124
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/index.js
31890
32125
  var LEGACY_MODULES = new Set([
31891
32126
  "legacy-autocomplete",
31892
32127
  "legacy-autocomplete/testing",
@@ -32040,14 +32275,14 @@ var PERMANENT_MIGRATORS = [
32040
32275
  ];
32041
32276
  var CORE_COMPONENTS = ["option", "optgroup"];
32042
32277
 
32043
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
32278
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
32044
32279
  var import_schematics4 = require("@angular/cdk/schematics");
32045
32280
 
32046
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
32281
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
32047
32282
  var import_schematics3 = require("@angular/cdk/schematics");
32048
32283
  var ts = __toESM(require("typescript"));
32049
32284
 
32050
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
32285
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
32051
32286
  var import_schematics = require("@angular/cdk/schematics");
32052
32287
  var import_path = require("path");
32053
32288
 
@@ -32090,7 +32325,7 @@ var scss_syntax_default = import_scss_syntax.default;
32090
32325
  var stringify3 = import_scss_syntax.default.stringify;
32091
32326
  var parse3 = import_scss_syntax.default.parse;
32092
32327
 
32093
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
32328
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
32094
32329
  var COMPONENTS_MIXIN_NAME = /\.([^(;]*)/;
32095
32330
  var ThemingStylesMigration = class extends import_schematics.Migration {
32096
32331
  constructor() {
@@ -32374,17 +32609,17 @@ function extractValueRange(content, colonIndex) {
32374
32609
  return start > -1 && end > -1 ? { start, end, fullEnd } : null;
32375
32610
  }
32376
32611
 
32377
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
32612
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
32378
32613
  var import_schematics2 = require("@angular/cdk/schematics");
32379
32614
 
32380
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/migration-utilities/update.js
32615
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/migration-utilities/update.js
32381
32616
  function writeUpdates(content, updates) {
32382
32617
  updates.sort((a, b) => b.offset - a.offset);
32383
32618
  updates.forEach((update) => content = update.updateFn(content));
32384
32619
  return content;
32385
32620
  }
32386
32621
 
32387
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
32622
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
32388
32623
  var TemplateMigration = class extends import_schematics2.Migration {
32389
32624
  constructor() {
32390
32625
  super(...arguments);
@@ -32412,7 +32647,7 @@ var TemplateMigration = class extends import_schematics2.Migration {
32412
32647
  }
32413
32648
  };
32414
32649
 
32415
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
32650
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
32416
32651
  var RuntimeCodeMigration = class extends import_schematics3.Migration {
32417
32652
  constructor() {
32418
32653
  super(...arguments);
@@ -32641,7 +32876,7 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
32641
32876
  }
32642
32877
  };
32643
32878
 
32644
- // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
32879
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
32645
32880
  var migrationGroups = [
32646
32881
  ["autocomplete", "form-field", "input", "option", "optgroup", "select"],
32647
32882
  ["button"],
@@ -32745,7 +32980,7 @@ ${[...componentsToMigrate].join("\n")}`);
32745
32980
  * found in the LICENSE file at https://angular.io/license
32746
32981
  */
32747
32982
  /**
32748
- * @license Angular v17.0.0
32983
+ * @license Angular v17.1.0-next.2
32749
32984
  * (c) 2010-2022 Google LLC. https://angular.io/
32750
32985
  * License: MIT
32751
32986
  */