@angular/material 21.0.0-next.9 → 21.0.0-rc.0

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 (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +810 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"grid-list.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-base.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile-text.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-styler.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to provide a grid list to a tile and to avoid circular imports.\n * @docs-private\n */\nexport const MAT_GRID_LIST = new InjectionToken<MatGridListBase>('MAT_GRID_LIST');\n\n/**\n * Base interface for a `MatGridList`.\n * @docs-private\n */\nexport interface MatGridListBase {\n cols: number;\n gutterSize: string;\n rowHeight: number | string;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '../core';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n // Ensures that the \"rowspan\" and \"colspan\" input value is reflected in\n // the DOM. This is needed for the grid-tile harness.\n '[attr.rowspan]': 'rowspan',\n '[attr.colspan]': 'colspan',\n },\n templateUrl: 'grid-tile.html',\n styleUrl: 'grid-list.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n _gridList? = inject<MatGridListBase>(MAT_GRID_LIST, {optional: true});\n\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number {\n return this._rowspan;\n }\n set rowspan(value: NumberInput) {\n this._rowspan = Math.round(coerceNumberProperty(value));\n }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number {\n return this._colspan;\n }\n set colspan(value: NumberInput) {\n this._colspan = Math.round(coerceNumberProperty(value));\n }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'},\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'},\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'},\n})\nexport class MatGridTileFooterCssMatStyler {}\n","<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n","<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {QueryList} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/** Object that can be styled by the `TileStyler`. */\nexport interface TileStyleTarget {\n _setListStyle(style: [string, string | null] | null): void;\n _tiles: QueryList<MatGridTile>;\n}\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number, gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null {\n return null;\n }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: TileStyleTarget): void;\n}\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n constructor(public fixedRowHeight: string) {\n super();\n }\n\n override init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (\n !cssCalcAllowedValue.test(this.fixedRowHeight) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n override setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];\n }\n\n override reset(list: TileStyleTarget) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return [\n 'paddingBottom',\n calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),\n ];\n }\n\n reset(list: TileStyleTarget) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: TileStyleTarget) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {\n TileStyler,\n FitTileStyler,\n RatioTileStyler,\n FixedTileStyler,\n TileStyleTarget,\n} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrl: 'grid-list.css',\n host: {\n 'class': 'mat-grid-list',\n // Ensures that the \"cols\" input value is reflected in the DOM. This is\n // needed for the grid-list harness.\n '[attr.cols]': 'cols',\n },\n providers: [\n {\n provide: MAT_GRID_LIST,\n useExisting: MatGridList,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n private _dir = inject(Directionality, {optional: true});\n\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determining the position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number {\n return this._cols;\n }\n set cols(value: NumberInput) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string {\n return this._gutter;\n }\n set gutterSize(value: string) {\n this._gutter = `${value == null ? '' : value}`;\n }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number {\n return this._rowHeight;\n }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols=\"3\">`,\n );\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\n }\n }\n}\n","<div>\n <ng-content></ng-content>\n</div>","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatLineModule} from '../core';\nimport {MatGridList} from './grid-list';\nimport {\n MatGridAvatarCssMatStyler,\n MatGridTile,\n MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler,\n MatGridTileText,\n} from './grid-tile';\n\n// Export required to fix compiler confusion about import module paths\nexport {MatLine} from '../core';\n\n@NgModule({\n imports: [\n MatLineModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n exports: [\n BidiModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n})\nexport class MatGridListModule {}\n"],"names":[],"mappings":";;;;;;;;;AAUA;;;AAGG;AACI,MAAM,aAAa,GAAG,IAAI,cAAc,CAAkB,eAAe,CAAC;;MCyBpE,WAAW,CAAA;AACd,IAAA,QAAQ,GAAG,MAAM,CAA0B,UAAU,CAAC;IAC9D,SAAS,GAAI,MAAM,CAAkB,aAAa,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IAErE,QAAQ,GAAW,CAAC;IACpB,QAAQ,GAAW,CAAC;AAGpB,IAAA,WAAA,GAAA;;AAGA,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;;IAEtB,IAAI,OAAO,CAAC,KAAkB,EAAA;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;;;AAIzD,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;;IAEtB,IAAI,OAAO,CAAC,KAAk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AA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAnB1B,aAAa;YACb,WAAW;YACX,WAAW;YACX,eAAe;YACf,6BAA6B;YAC7B,6BAA6B;AAC7B,YAAA,yBAAyB,aAGzB,UAAU;YACV,WAAW;YACX,WAAW;YACX,eAAe;YACf,aAAa;YACb,6BAA6B;YAC7B,6BAA6B;YAC7B,yBAAyB,CAAA,EAAA,CAAA;+GAGhB,iBAAiB,EAAA,OAAA,EAAA,CAnB1B,aAAa,EASb,UAAU;YAIV,aAAa,CAAA,EAAA,CAAA;;kGAMJ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBArB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,WAAW;wBACX,WAAW;wBACX,eAAe;wBACf,6BAA6B;wBAC7B,6BAA6B;wBAC7B,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,UAAU;wBACV,WAAW;wBACX,WAAW;wBACX,eAAe;wBACf,aAAa;wBACb,6BAA6B;wBAC7B,6BAA6B;wBAC7B,yBAAyB;AAC1B,qBAAA;AACF,iBAAA;;;;;"}
1
+ {"version":3,"file":"grid-list.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-styler.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '../core';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n // Ensures that the \"rowspan\" and \"colspan\" input value is reflected in\n // the DOM. This is needed for the grid-tile harness.\n '[attr.rowspan]': 'rowspan',\n '[attr.colspan]': 'colspan',\n },\n templateUrl: 'grid-tile.html',\n styleUrl: 'grid-list.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n _gridList? = inject<MatGridListBase>(MAT_GRID_LIST, {optional: true});\n\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number {\n return this._rowspan;\n }\n set rowspan(value: NumberInput) {\n this._rowspan = Math.round(coerceNumberProperty(value));\n }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number {\n return this._colspan;\n }\n set colspan(value: NumberInput) {\n this._colspan = Math.round(coerceNumberProperty(value));\n }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'},\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'},\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'},\n})\nexport class MatGridTileFooterCssMatStyler {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {QueryList} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/** Object that can be styled by the `TileStyler`. */\nexport interface TileStyleTarget {\n _setListStyle(style: [string, string | null] | null): void;\n _tiles: QueryList<MatGridTile>;\n}\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number, gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null {\n return null;\n }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: TileStyleTarget): void;\n}\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n constructor(public fixedRowHeight: string) {\n super();\n }\n\n override init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (\n !cssCalcAllowedValue.test(this.fixedRowHeight) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n override setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];\n }\n\n override reset(list: TileStyleTarget) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return [\n 'paddingBottom',\n calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),\n ];\n }\n\n reset(list: TileStyleTarget) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: TileStyleTarget) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {\n TileStyler,\n FitTileStyler,\n RatioTileStyler,\n FixedTileStyler,\n TileStyleTarget,\n} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrl: 'grid-list.css',\n host: {\n 'class': 'mat-grid-list',\n // Ensures that the \"cols\" input value is reflected in the DOM. This is\n // needed for the grid-list harness.\n '[attr.cols]': 'cols',\n },\n providers: [\n {\n provide: MAT_GRID_LIST,\n useExisting: MatGridList,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n private _dir = inject(Directionality, {optional: true});\n\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determining the position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number {\n return this._cols;\n }\n set cols(value: NumberInput) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string {\n return this._gutter;\n }\n set gutterSize(value: string) {\n this._gutter = `${value == null ? '' : value}`;\n }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number {\n return this._rowHeight;\n }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols=\"3\">`,\n );\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatLineModule} from '../core';\nimport {MatGridList} from './grid-list';\nimport {\n MatGridAvatarCssMatStyler,\n MatGridTile,\n MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler,\n MatGridTileText,\n} from './grid-tile';\n\n// Export required to fix compiler confusion about import module paths\nexport {MatLine} from '../core';\n\n@NgModule({\n imports: [\n MatLineModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n exports: [\n BidiModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n})\nexport class MatGridListModule {}\n"],"names":["_element","inject","ElementRef","MAT_GRID_LIST","constructor","rowspan","value","colspan","_colspan","Math","round","coerceNumberProperty","nativeElement","style","property","minVersion","version","ngImport","i0","type","MatGridTile","decorators","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","template","styles","propDecorators","args","selector","encapsulation","ctorParameters","_lines","MatGridAvatarCssMatStyler","deps","target","ɵɵFactoryTarget","Directive","TileStyler","_gutterSize","_rows","getTilePosition","baseSize","offset","setStyle","tile","rowIndex","colIndex","setRowStyles","percentWidthPerTile","gutterWidthFractionPerTile","setColStyles","percentWidth","gutterWidth","baseTileWidth","getBaseTileSize","_setStyle","side","calc","getTileSize","_rowspan","tileHeight","getComputedHeight","FixedTileStyler","fixedRowHeight","init","gutterSize","tracker","cols","direction","normalizeUnits","test","ngDevMode","Error","getTileSpan","getGutterSpan","reset","list","_setListStyle","_tiles","forEach","RatioTileStyler","rowHeightRatio","_parseRatio","percentHeightPerTile","baseTileHeight","MAT_FIT_MODE","MatGridList","_cols","_rowHeight","max","_gutter","rowHeight","newValue","_setTileStyler","ngOnInit","_checkCols","_checkRowHeight","ngAfterContentChecked","_layoutTiles","Component","exportAs","host","useExisting","descendants","Input","ɵfac","ɵɵngDeclareFactory","MatGridListModule","NgModule","ɵɵngDeclareNgModule","imports","MatLineModule","MatGridTileHeaderCssMatStyler","MatGridTileFooterCssMatStyler","MatGridTileText"],"mappings":";;;;;;;;;;;;EAwCUA,QAAA,GAAAC,MAAA,CAAAC,UAAA,CAAA;oBAOR,CAAAC,aAAA,EAAA;cAEkD;GAClD,CAAA;UAWE,GAAO,CAAA;UACT,GAAA,CAAA;aACIC,GAAA;;wBAjCmD;AACrD;EAED,IAAAC,OAAAA,CAAAC,KAAA,EAAA;;;AAkDO,EAAA,IAEuCC,OAAMA,GAAA;IAGrD,OAAA,IAAA,CAAAC,QAAe;;aAGLD,CAAAD,KAAkB,EAAA;IAC5B,IAAA,CAAAE,QAAA,GAAAC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,EAAA,cAAA,EAAAK,MAAA,EAAA;EACaJ,cAAA,EAAA;IAAAoD,MAAA,EAAA,CAAA;2BAEb;AACA,MAAA,IAAA,EAAA,CAAA,WAAA,EAAA;QAAAyB,WAAA,EAAA;AAAA,OAAA;;;;;AAII,IAAA,UAAA,EAAA,CAAA;AACAC,MAAAA,IAAAA,EAAAA;;;AAoCAA,MAAAA,IAAAA,EAAAA;;;;;;AC7GO,EAAA,OAAAC,IAAA,GAAA1F,EAAA,CAAA2F,kBAAA,CAAA;IAAA9F,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAC,EAAA;AAAAC,IAAAA,IAAA,EAAA2F,iBAAA;IAAA1E,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAnB,EAAA,CAAAoB,eAAA,CAAAyE;AAAA,GAAA,CAAA;kBAlBE,CAAAC,mBAAA,CAAA;IAAAjG,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAC,EAAA;AAAAC,IAAAA,IAAA,EAAA2F,iBAAA;IAAAG,OAAA,EAAA,CAAAC,aAAA,0EAakB,+BADhB;oFAfPC,6BAAA,EACRC,6BAAS,2BACM;AAAA,GAAA,CAAA;;;;;;;;;AAOd,EAAA,CAAA,wBAAA,CAAA;EAAArG,UAAA,EAAA,QAAA;EAAAC,OAAA,EAAA,eAAA;AAAAC,EAAAA,QAAA,EAAAC,EAAA;AAAAC,EAAAA,IAAA,EAAA2F,iBAAA;EAAAzF,UAAA,EAAA,CAAA;AACDF,IAAAA,IAAA,EAAA4F,QAAA;;6BADCtB,EAAAA,WAAA;yCATOrE,WAAA,EACRiG,eAAA;;;;;;;"}
@@ -7,144 +7,165 @@ import '@angular/common/http';
7
7
  import '@angular/platform-browser';
8
8
  import 'rxjs/operators';
9
9
 
10
- /** Possible types of icons. */
11
10
  var IconType;
12
11
  (function (IconType) {
13
- IconType[IconType["SVG"] = 0] = "SVG";
14
- IconType[IconType["FONT"] = 1] = "FONT";
12
+ IconType[IconType["SVG"] = 0] = "SVG";
13
+ IconType[IconType["FONT"] = 1] = "FONT";
15
14
  })(IconType || (IconType = {}));
16
15
 
17
- /** Harness for interacting with a standard mat-icon in tests. */
18
16
  class MatIconHarness extends ComponentHarness {
19
- /** The selector for the host element of a `MatIcon` instance. */
20
- static hostSelector = '.mat-icon';
21
- /**
22
- * Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets
23
- * certain criteria.
24
- * @param options Options for filtering which icon instances are considered a match.
25
- * @return a `HarnessPredicate` configured with the given options.
26
- */
27
- static with(options = {}) {
28
- return new HarnessPredicate(MatIconHarness, options)
29
- .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type)
30
- .addOption('name', options.name, (harness, text) => HarnessPredicate.stringMatches(harness.getName(), text))
31
- .addOption('namespace', options.namespace, (harness, text) => HarnessPredicate.stringMatches(harness.getNamespace(), text));
32
- }
33
- /** Gets the type of the icon. */
34
- async getType() {
35
- const type = await (await this.host()).getAttribute('data-mat-icon-type');
36
- return type === 'svg' ? IconType.SVG : IconType.FONT;
37
- }
38
- /** Gets the name of the icon. */
39
- async getName() {
40
- const host = await this.host();
41
- const nameFromDom = await host.getAttribute('data-mat-icon-name');
42
- // If we managed to figure out the name from the attribute, use it.
43
- if (nameFromDom) {
44
- return nameFromDom;
45
- }
46
- // Some icons support defining the icon as a ligature.
47
- // As a fallback, try to extract it from the DOM text.
48
- if ((await this.getType()) === IconType.FONT) {
49
- // Other directives may add content to the icon (e.g. `MatBadge`), however only the direct
50
- // text nodes affect the name of the icon. Exclude all element descendants from the result.
51
- const text = await host.text({ exclude: '*' });
52
- // There are some internal cases where the icon name is wrapped in another node.
53
- // Fall back to extracting the entire text if we ended up excluding everything above.
54
- return text.length > 0 ? text : host.text();
55
- }
56
- return null;
57
- }
58
- /** Gets the namespace of the icon. */
59
- async getNamespace() {
60
- return (await this.host()).getAttribute('data-mat-icon-namespace');
61
- }
62
- /** Gets whether the icon is inline. */
63
- async isInline() {
64
- return (await this.host()).hasClass('mat-icon-inline');
65
- }
17
+ static hostSelector = '.mat-icon';
18
+ static with(options = {}) {
19
+ return new HarnessPredicate(MatIconHarness, options).addOption('type', options.type, async (harness, type) => (await harness.getType()) === type).addOption('name', options.name, (harness, text) => HarnessPredicate.stringMatches(harness.getName(), text)).addOption('namespace', options.namespace, (harness, text) => HarnessPredicate.stringMatches(harness.getNamespace(), text));
20
+ }
21
+ async getType() {
22
+ const type = await (await this.host()).getAttribute('data-mat-icon-type');
23
+ return type === 'svg' ? IconType.SVG : IconType.FONT;
24
+ }
25
+ async getName() {
26
+ const host = await this.host();
27
+ const nameFromDom = await host.getAttribute('data-mat-icon-name');
28
+ if (nameFromDom) {
29
+ return nameFromDom;
30
+ }
31
+ if ((await this.getType()) === IconType.FONT) {
32
+ const text = await host.text({
33
+ exclude: '*'
34
+ });
35
+ return text.length > 0 ? text : host.text();
36
+ }
37
+ return null;
38
+ }
39
+ async getNamespace() {
40
+ return (await this.host()).getAttribute('data-mat-icon-namespace');
41
+ }
42
+ async isInline() {
43
+ return (await this.host()).hasClass('mat-icon-inline');
44
+ }
66
45
  }
67
46
 
68
- /**
69
- * A null icon registry that must be imported to allow disabling of custom
70
- * icons.
71
- */
72
47
  class FakeMatIconRegistry {
73
- addSvgIcon() {
74
- return this;
75
- }
76
- addSvgIconLiteral() {
77
- return this;
78
- }
79
- addSvgIconInNamespace() {
80
- return this;
81
- }
82
- addSvgIconLiteralInNamespace() {
83
- return this;
84
- }
85
- addSvgIconSet() {
86
- return this;
87
- }
88
- addSvgIconSetLiteral() {
89
- return this;
90
- }
91
- addSvgIconSetInNamespace() {
92
- return this;
93
- }
94
- addSvgIconSetLiteralInNamespace() {
95
- return this;
96
- }
97
- registerFontClassAlias() {
98
- return this;
99
- }
100
- classNameForFontAlias(alias) {
101
- return alias;
102
- }
103
- getDefaultFontSetClass() {
104
- return ['material-icons'];
105
- }
106
- getSvgIconFromUrl() {
107
- return of(this._generateEmptySvg());
108
- }
109
- getNamedSvgIcon() {
110
- return of(this._generateEmptySvg());
111
- }
112
- setDefaultFontSetClass() {
113
- return this;
114
- }
115
- addSvgIconResolver() {
116
- return this;
117
- }
118
- ngOnDestroy() { }
119
- _generateEmptySvg() {
120
- const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
121
- emptySvg.classList.add('fake-testing-svg');
122
- // Emulate real icon characteristics from `MatIconRegistry` so size remains consistent in tests.
123
- emptySvg.setAttribute('fit', '');
124
- emptySvg.setAttribute('height', '100%');
125
- emptySvg.setAttribute('width', '100%');
126
- emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
127
- emptySvg.setAttribute('focusable', 'false');
128
- return emptySvg;
129
- }
130
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FakeMatIconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
131
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FakeMatIconRegistry });
48
+ addSvgIcon() {
49
+ return this;
50
+ }
51
+ addSvgIconLiteral() {
52
+ return this;
53
+ }
54
+ addSvgIconInNamespace() {
55
+ return this;
56
+ }
57
+ addSvgIconLiteralInNamespace() {
58
+ return this;
59
+ }
60
+ addSvgIconSet() {
61
+ return this;
62
+ }
63
+ addSvgIconSetLiteral() {
64
+ return this;
65
+ }
66
+ addSvgIconSetInNamespace() {
67
+ return this;
68
+ }
69
+ addSvgIconSetLiteralInNamespace() {
70
+ return this;
71
+ }
72
+ registerFontClassAlias() {
73
+ return this;
74
+ }
75
+ classNameForFontAlias(alias) {
76
+ return alias;
77
+ }
78
+ getDefaultFontSetClass() {
79
+ return ['material-icons'];
80
+ }
81
+ getSvgIconFromUrl() {
82
+ return of(this._generateEmptySvg());
83
+ }
84
+ getNamedSvgIcon() {
85
+ return of(this._generateEmptySvg());
86
+ }
87
+ setDefaultFontSetClass() {
88
+ return this;
89
+ }
90
+ addSvgIconResolver() {
91
+ return this;
92
+ }
93
+ ngOnDestroy() {}
94
+ _generateEmptySvg() {
95
+ const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
96
+ emptySvg.classList.add('fake-testing-svg');
97
+ emptySvg.setAttribute('fit', '');
98
+ emptySvg.setAttribute('height', '100%');
99
+ emptySvg.setAttribute('width', '100%');
100
+ emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
101
+ emptySvg.setAttribute('focusable', 'false');
102
+ return emptySvg;
103
+ }
104
+ static ɵfac = i0.ɵɵngDeclareFactory({
105
+ minVersion: "12.0.0",
106
+ version: "20.2.0-next.2",
107
+ ngImport: i0,
108
+ type: FakeMatIconRegistry,
109
+ deps: [],
110
+ target: i0.ɵɵFactoryTarget.Injectable
111
+ });
112
+ static ɵprov = i0.ɵɵngDeclareInjectable({
113
+ minVersion: "12.0.0",
114
+ version: "20.2.0-next.2",
115
+ ngImport: i0,
116
+ type: FakeMatIconRegistry
117
+ });
132
118
  }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: FakeMatIconRegistry, decorators: [{
134
- type: Injectable
135
- }] });
136
- /** Import this module in tests to install the null icon registry. */
119
+ i0.ɵɵngDeclareClassMetadata({
120
+ minVersion: "12.0.0",
121
+ version: "20.2.0-next.2",
122
+ ngImport: i0,
123
+ type: FakeMatIconRegistry,
124
+ decorators: [{
125
+ type: Injectable
126
+ }]
127
+ });
137
128
  class MatIconTestingModule {
138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
139
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconTestingModule });
140
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconTestingModule, providers: [{ provide: MatIconRegistry, useClass: FakeMatIconRegistry }] });
129
+ static ɵfac = i0.ɵɵngDeclareFactory({
130
+ minVersion: "12.0.0",
131
+ version: "20.2.0-next.2",
132
+ ngImport: i0,
133
+ type: MatIconTestingModule,
134
+ deps: [],
135
+ target: i0.ɵɵFactoryTarget.NgModule
136
+ });
137
+ static ɵmod = i0.ɵɵngDeclareNgModule({
138
+ minVersion: "14.0.0",
139
+ version: "20.2.0-next.2",
140
+ ngImport: i0,
141
+ type: MatIconTestingModule
142
+ });
143
+ static ɵinj = i0.ɵɵngDeclareInjector({
144
+ minVersion: "12.0.0",
145
+ version: "20.2.0-next.2",
146
+ ngImport: i0,
147
+ type: MatIconTestingModule,
148
+ providers: [{
149
+ provide: MatIconRegistry,
150
+ useClass: FakeMatIconRegistry
151
+ }]
152
+ });
141
153
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconTestingModule, decorators: [{
143
- type: NgModule,
144
- args: [{
145
- providers: [{ provide: MatIconRegistry, useClass: FakeMatIconRegistry }],
146
- }]
147
- }] });
154
+ i0.ɵɵngDeclareClassMetadata({
155
+ minVersion: "12.0.0",
156
+ version: "20.2.0-next.2",
157
+ ngImport: i0,
158
+ type: MatIconTestingModule,
159
+ decorators: [{
160
+ type: NgModule,
161
+ args: [{
162
+ providers: [{
163
+ provide: MatIconRegistry,
164
+ useClass: FakeMatIconRegistry
165
+ }]
166
+ }]
167
+ }]
168
+ });
148
169
 
149
170
  export { FakeMatIconRegistry, IconType, MatIconHarness, MatIconTestingModule };
150
171
  //# sourceMappingURL=icon-testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness-filters.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/fake-icon-registry.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** Possible types of icons. */\nexport enum IconType {\n SVG,\n FONT,\n}\n\n/** A set of criteria that can be used to filter a list of `MatIconHarness` instances. */\nexport interface IconHarnessFilters extends BaseHarnessFilters {\n /** Filters based on the typef of the icon. */\n type?: IconType;\n /** Filters based on the name of the icon. */\n name?: string | RegExp;\n /** Filters based on the namespace of the icon. */\n namespace?: string | null | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {IconHarnessFilters, IconType} from './icon-harness-filters';\n\n/** Harness for interacting with a standard mat-icon in tests. */\nexport class MatIconHarness extends ComponentHarness {\n /** The selector for the host element of a `MatIcon` instance. */\n static hostSelector = '.mat-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets\n * certain criteria.\n * @param options Options for filtering which icon instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: IconHarnessFilters = {}): HarnessPredicate<MatIconHarness> {\n return new HarnessPredicate(MatIconHarness, options)\n .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type)\n .addOption('name', options.name, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getName(), text),\n )\n .addOption('namespace', options.namespace, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getNamespace(), text),\n );\n }\n\n /** Gets the type of the icon. */\n async getType(): Promise<IconType> {\n const type = await (await this.host()).getAttribute('data-mat-icon-type');\n return type === 'svg' ? IconType.SVG : IconType.FONT;\n }\n\n /** Gets the name of the icon. */\n async getName(): Promise<string | null> {\n const host = await this.host();\n const nameFromDom = await host.getAttribute('data-mat-icon-name');\n\n // If we managed to figure out the name from the attribute, use it.\n if (nameFromDom) {\n return nameFromDom;\n }\n\n // Some icons support defining the icon as a ligature.\n // As a fallback, try to extract it from the DOM text.\n if ((await this.getType()) === IconType.FONT) {\n // Other directives may add content to the icon (e.g. `MatBadge`), however only the direct\n // text nodes affect the name of the icon. Exclude all element descendants from the result.\n const text = await host.text({exclude: '*'});\n\n // There are some internal cases where the icon name is wrapped in another node.\n // Fall back to extracting the entire text if we ended up excluding everything above.\n return text.length > 0 ? text : host.text();\n }\n\n return null;\n }\n\n /** Gets the namespace of the icon. */\n async getNamespace(): Promise<string | null> {\n return (await this.host()).getAttribute('data-mat-icon-namespace');\n }\n\n /** Gets whether the icon is inline. */\n async isInline(): Promise<boolean> {\n return (await this.host()).hasClass('mat-icon-inline');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, NgModule, OnDestroy} from '@angular/core';\nimport {MatIconRegistry} from '../../icon';\nimport {Observable, of as observableOf} from 'rxjs';\n\ntype PublicApi<T> = {\n [K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];\n};\n\n/**\n * A null icon registry that must be imported to allow disabling of custom\n * icons.\n */\n@Injectable()\nexport class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {\n addSvgIcon(): this {\n return this;\n }\n\n addSvgIconLiteral(): this {\n return this;\n }\n\n addSvgIconInNamespace(): this {\n return this;\n }\n\n addSvgIconLiteralInNamespace(): this {\n return this;\n }\n\n addSvgIconSet(): this {\n return this;\n }\n\n addSvgIconSetLiteral(): this {\n return this;\n }\n\n addSvgIconSetInNamespace(): this {\n return this;\n }\n\n addSvgIconSetLiteralInNamespace(): this {\n return this;\n }\n\n registerFontClassAlias(): this {\n return this;\n }\n\n classNameForFontAlias(alias: string): string {\n return alias;\n }\n\n getDefaultFontSetClass() {\n return ['material-icons'];\n }\n\n getSvgIconFromUrl(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n getNamedSvgIcon(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n setDefaultFontSetClass(): this {\n return this;\n }\n\n addSvgIconResolver(): this {\n return this;\n }\n\n ngOnDestroy() {}\n\n private _generateEmptySvg(): SVGElement {\n const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n emptySvg.classList.add('fake-testing-svg');\n // Emulate real icon characteristics from `MatIconRegistry` so size remains consistent in tests.\n emptySvg.setAttribute('fit', '');\n emptySvg.setAttribute('height', '100%');\n emptySvg.setAttribute('width', '100%');\n emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n emptySvg.setAttribute('focusable', 'false');\n return emptySvg;\n }\n}\n\n/** Import this module in tests to install the null icon registry. */\n@NgModule({\n providers: [{provide: MatIconRegistry, useClass: FakeMatIconRegistry}],\n})\nexport class MatIconTestingModule {}\n"],"names":["observableOf"],"mappings":";;;;;;;;;AAUA;IACY;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAG;AACH,IAAA,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAGnB,EAAA,CAAA,CAAA;;ACHD;AACM,MAAO,cAAe,SAAQ,gBAAgB,CAAA;;AAElD,IAAA,OAAO,YAAY,GAAG,WAAW;AAEjC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAA8B,EAAE,EAAA;AAC1C,QAAA,OAAO,IAAI,gBAAgB,CAAC,cAAc,EAAE,OAAO;aAChD,SA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,CAAC,KAAK,EAAE,EAAE,CAAC;AAChC,QAAA,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC;AACvC,QAAA,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC;AACtC,QAAA,QAAQ,CAAC,YAAY,CAAC,qBAAqB,EAAE,eAAe,CAAC;AAC7D,QAAA,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC;AAC3C,QAAA,OAAO,QAAQ;;8GAxEN,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;kHAAnB,mBAAmB,EAAA,CAAA;;kGAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;AA6ED;MAIa,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;+GAApB,oBAAoB,EAAA,CAAA;+GAApB,oBAAoB,EAAA,SAAA,EAFpB,CAAC,EAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,mBAAmB,EAAC,CAAC,EAAA,CAAA;;kGAE3D,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,mBAAmB,EAAC,CAAC;AACvE,iBAAA;;;;;"}
1
+ {"version":3,"file":"icon-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/fake-icon-registry.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {IconHarnessFilters, IconType} from './icon-harness-filters';\n\n/** Harness for interacting with a standard mat-icon in tests. */\nexport class MatIconHarness extends ComponentHarness {\n /** The selector for the host element of a `MatIcon` instance. */\n static hostSelector = '.mat-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets\n * certain criteria.\n * @param options Options for filtering which icon instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: IconHarnessFilters = {}): HarnessPredicate<MatIconHarness> {\n return new HarnessPredicate(MatIconHarness, options)\n .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type)\n .addOption('name', options.name, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getName(), text),\n )\n .addOption('namespace', options.namespace, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getNamespace(), text),\n );\n }\n\n /** Gets the type of the icon. */\n async getType(): Promise<IconType> {\n const type = await (await this.host()).getAttribute('data-mat-icon-type');\n return type === 'svg' ? IconType.SVG : IconType.FONT;\n }\n\n /** Gets the name of the icon. */\n async getName(): Promise<string | null> {\n const host = await this.host();\n const nameFromDom = await host.getAttribute('data-mat-icon-name');\n\n // If we managed to figure out the name from the attribute, use it.\n if (nameFromDom) {\n return nameFromDom;\n }\n\n // Some icons support defining the icon as a ligature.\n // As a fallback, try to extract it from the DOM text.\n if ((await this.getType()) === IconType.FONT) {\n // Other directives may add content to the icon (e.g. `MatBadge`), however only the direct\n // text nodes affect the name of the icon. Exclude all element descendants from the result.\n const text = await host.text({exclude: '*'});\n\n // There are some internal cases where the icon name is wrapped in another node.\n // Fall back to extracting the entire text if we ended up excluding everything above.\n return text.length > 0 ? text : host.text();\n }\n\n return null;\n }\n\n /** Gets the namespace of the icon. */\n async getNamespace(): Promise<string | null> {\n return (await this.host()).getAttribute('data-mat-icon-namespace');\n }\n\n /** Gets whether the icon is inline. */\n async isInline(): Promise<boolean> {\n return (await this.host()).hasClass('mat-icon-inline');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, NgModule, OnDestroy} from '@angular/core';\nimport {MatIconRegistry} from '../../icon';\nimport {Observable, of as observableOf} from 'rxjs';\n\ntype PublicApi<T> = {\n [K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];\n};\n\n/**\n * A null icon registry that must be imported to allow disabling of custom\n * icons.\n */\n@Injectable()\nexport class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {\n addSvgIcon(): this {\n return this;\n }\n\n addSvgIconLiteral(): this {\n return this;\n }\n\n addSvgIconInNamespace(): this {\n return this;\n }\n\n addSvgIconLiteralInNamespace(): this {\n return this;\n }\n\n addSvgIconSet(): this {\n return this;\n }\n\n addSvgIconSetLiteral(): this {\n return this;\n }\n\n addSvgIconSetInNamespace(): this {\n return this;\n }\n\n addSvgIconSetLiteralInNamespace(): this {\n return this;\n }\n\n registerFontClassAlias(): this {\n return this;\n }\n\n classNameForFontAlias(alias: string): string {\n return alias;\n }\n\n getDefaultFontSetClass() {\n return ['material-icons'];\n }\n\n getSvgIconFromUrl(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n getNamedSvgIcon(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n setDefaultFontSetClass(): this {\n return this;\n }\n\n addSvgIconResolver(): this {\n return this;\n }\n\n ngOnDestroy() {}\n\n private _generateEmptySvg(): SVGElement {\n const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n emptySvg.classList.add('fake-testing-svg');\n // Emulate real icon characteristics from `MatIconRegistry` so size remains consistent in tests.\n emptySvg.setAttribute('fit', '');\n emptySvg.setAttribute('height', '100%');\n emptySvg.setAttribute('width', '100%');\n emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n emptySvg.setAttribute('focusable', 'false');\n return emptySvg;\n }\n}\n\n/** Import this module in tests to install the null icon registry. */\n@NgModule({\n providers: [{provide: MatIconRegistry, useClass: FakeMatIconRegistry}],\n})\nexport class MatIconTestingModule {}\n"],"names":["getType","type","host","getAttribute","IconType","SVG","FONT","nameFromDom","text","exclude","length","FakeMatIconRegistry","addSvgIcon","addSvgIconInNamespace","addSvgIconSet","addSvgIconSetInNamespace","getDefaultFontSetClass","_generateEmptySvg","getNamedSvgIcon","observableOf","setDefaultFontSetClass","ngOnDestroy","emptySvg","setAttribute","deps","target","i0","ɵɵFactoryTarget","NgModule","MatIconTestingModule","providers","provide","MatIconRegistry","useClass"],"mappings":";;;;;;;;;;;;;;;;;qBAwBgB,GAAO,EAAA,EAAA;;;QAarBA,OAAAA,GAAA;AAEA,IAAA,MAAAC,IAAiC,GAAA,MAAA,CAAA,MAAA,IAAA,CAAAC,IAAA,EAAA,EAAAC,YAAA,CAAA,oBAAA,CAAA;WACjCF,IAAA,KAAa,KAAA,GAAAG,QAAA,CAAAC,GAAA,GAAAD,QAAA,CAAAE,IAAA;;;IAWX,MAAAJ,IAAA,GAAAA,MAAAA,IAAAA,CAAAA,IAAA,EAA0B;qBACkE,GAAA,MAAAA,IAAA,CAAAC,YAAA,CAAA,oBAAA,CAAA;AAE1F,IAAA,IAAAI,WAAA,EAAU;;AAIV;AAIJ,IAAA,IAAA,CAAA,MAAA,IAAAP,CAAAA,OAAA,EAAAI,MAAAA,QAAA,CAAAE,IAAA,EAAA;AAKA,MAAA,MAAAE,IAAA,GAAA,MAAAN,IAAA,CAAAM,IAAA,CAAA;QAAAC,OAAA,EAAA;AAAA,OAAA,CAAA;MAKA,OAAAD,IAAA,CAAAE,MAAA,GAAA,CAAA,GAAAF,IAAA,GAAAN,IAAA,CAAAM,IAAA,EAAA;;;;;;;;;;;;AClDU,MAAAG,mBAAA,CAAA;AACRC,EAAAA,UAAWA,GAAA;;AAQX;;;AAIA;uBAGWC,GAAA;IACX,OAAA,IA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