@angular/material 8.2.2 → 8.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/bundles/material-core.umd.js +2 -2
  2. package/bundles/material-core.umd.js.map +1 -1
  3. package/bundles/material-core.umd.min.js +1 -1
  4. package/bundles/material-core.umd.min.js.map +1 -1
  5. package/bundles/material-datepicker.umd.js +21 -1
  6. package/bundles/material-datepicker.umd.js.map +1 -1
  7. package/bundles/material-datepicker.umd.min.js +2 -2
  8. package/bundles/material-datepicker.umd.min.js.map +1 -1
  9. package/bundles/material-dialog.umd.js +3 -3
  10. package/bundles/material-dialog.umd.js.map +1 -1
  11. package/bundles/material-dialog.umd.min.js.map +1 -1
  12. package/bundles/material-grid-list.umd.js +1 -1
  13. package/bundles/material-grid-list.umd.min.js +1 -1
  14. package/bundles/material-menu.umd.js +3 -3
  15. package/bundles/material-menu.umd.min.js +1 -1
  16. package/bundles/material-select.umd.js +5 -0
  17. package/bundles/material-select.umd.js.map +1 -1
  18. package/bundles/material-select.umd.min.js +1 -1
  19. package/bundles/material-select.umd.min.js.map +1 -1
  20. package/bundles/material-table.umd.js +3 -3
  21. package/bundles/material-table.umd.js.map +1 -1
  22. package/bundles/material-table.umd.min.js +1 -1
  23. package/bundles/material-table.umd.min.js.map +1 -1
  24. package/bundles/material-tabs.umd.js +53 -9
  25. package/bundles/material-tabs.umd.js.map +1 -1
  26. package/bundles/material-tabs.umd.min.js +2 -2
  27. package/bundles/material-tabs.umd.min.js.map +1 -1
  28. package/bundles/material.umd.js +91 -22
  29. package/bundles/material.umd.js.map +1 -1
  30. package/bundles/material.umd.min.js +18 -18
  31. package/bundles/material.umd.min.js.map +1 -1
  32. package/datepicker/typings/datepicker-intl.d.ts +2 -0
  33. package/datepicker/typings/index.metadata.json +1 -1
  34. package/dialog/typings/dialog-config.d.ts +6 -6
  35. package/esm2015/core.js +2 -2
  36. package/esm2015/core.js.map +1 -1
  37. package/esm2015/datepicker.js +14 -1
  38. package/esm2015/datepicker.js.map +1 -1
  39. package/esm2015/dialog.js +3 -3
  40. package/esm2015/dialog.js.map +1 -1
  41. package/esm2015/grid-list.js +1 -1
  42. package/esm2015/material.js +3 -3
  43. package/esm2015/menu.js +1 -1
  44. package/esm2015/select.js +5 -0
  45. package/esm2015/select.js.map +1 -1
  46. package/esm2015/table.js +3 -3
  47. package/esm2015/table.js.map +1 -1
  48. package/esm2015/tabs.js +51 -2
  49. package/esm2015/tabs.js.map +1 -1
  50. package/esm5/core.es5.js +2 -2
  51. package/esm5/core.es5.js.map +1 -1
  52. package/esm5/datepicker.es5.js +21 -1
  53. package/esm5/datepicker.es5.js.map +1 -1
  54. package/esm5/dialog.es5.js +3 -3
  55. package/esm5/dialog.es5.js.map +1 -1
  56. package/esm5/grid-list.es5.js +1 -1
  57. package/esm5/material.es5.js +3 -3
  58. package/esm5/menu.es5.js +1 -1
  59. package/esm5/select.es5.js +5 -0
  60. package/esm5/select.es5.js.map +1 -1
  61. package/esm5/table.es5.js +3 -3
  62. package/esm5/table.es5.js.map +1 -1
  63. package/esm5/tabs.es5.js +51 -7
  64. package/esm5/tabs.es5.js.map +1 -1
  65. package/grid-list/typings/index.d.ts +1 -1
  66. package/grid-list/typings/index.metadata.json +1 -1
  67. package/menu/typings/index.d.ts +2 -2
  68. package/menu/typings/index.metadata.json +1 -1
  69. package/package.json +4 -4
  70. package/tabs/typings/index.d.ts +2 -2
  71. package/tabs/typings/index.metadata.json +1 -1
  72. package/tabs/typings/paginated-tab-header.d.ts +1 -0
  73. package/tabs/typings/public-api.d.ts +1 -1
  74. package/tabs/typings/tab-body.d.ts +4 -1
  75. package/tabs/typings/tab-group.d.ts +4 -1
  76. package/tabs/typings/tab-header.d.ts +4 -1
  77. package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +4 -1
  78. package/typings/core/index.metadata.json +1 -1
  79. package/typings/datepicker/datepicker-intl.d.ts +2 -0
  80. package/typings/datepicker/index.metadata.json +1 -1
  81. package/typings/dialog/dialog-config.d.ts +6 -6
  82. package/typings/esm5/core/index.metadata.json +1 -1
  83. package/typings/esm5/datepicker/datepicker-intl.d.ts +2 -0
  84. package/typings/esm5/datepicker/index.metadata.json +1 -1
  85. package/typings/esm5/dialog/dialog-config.d.ts +6 -6
  86. package/typings/esm5/grid-list/index.d.ts +1 -1
  87. package/typings/esm5/grid-list/index.metadata.json +1 -1
  88. package/typings/esm5/menu/index.d.ts +2 -2
  89. package/typings/esm5/menu/index.metadata.json +1 -1
  90. package/typings/esm5/tabs/index.d.ts +2 -2
  91. package/typings/esm5/tabs/index.metadata.json +1 -1
  92. package/typings/esm5/tabs/paginated-tab-header.d.ts +1 -0
  93. package/typings/esm5/tabs/public-api.d.ts +1 -1
  94. package/typings/esm5/tabs/tab-body.d.ts +4 -1
  95. package/typings/esm5/tabs/tab-group.d.ts +4 -1
  96. package/typings/esm5/tabs/tab-header.d.ts +4 -1
  97. package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +4 -1
  98. package/typings/grid-list/index.d.ts +1 -1
  99. package/typings/grid-list/index.metadata.json +1 -1
  100. package/typings/menu/index.d.ts +2 -2
  101. package/typings/menu/index.metadata.json +1 -1
  102. package/typings/tabs/index.d.ts +2 -2
  103. package/typings/tabs/index.metadata.json +1 -1
  104. package/typings/tabs/paginated-tab-header.d.ts +1 -0
  105. package/typings/tabs/public-api.d.ts +1 -1
  106. package/typings/tabs/tab-body.d.ts +4 -1
  107. package/typings/tabs/tab-group.d.ts +4 -1
  108. package/typings/tabs/tab-header.d.ts +4 -1
  109. package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"material-dialog.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/material/dialog/dialog-container.ts","../../src/material/dialog/dialog.ts","../../src/material/dialog/dialog-content-directives.ts","../../src/material/dialog/dialog-config.ts","../../src/material/dialog/dialog-animations.ts","../../src/material/dialog/dialog-ref.ts","../../src/material/dialog/dialog-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\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.io/license\n */\n\nimport {\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n Optional,\n ChangeDetectorRef,\n ViewChild,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {AnimationEvent} from '@angular/animations';\nimport {matDialogAnimations} from './dialog-animations';\nimport {\n BasePortalOutlet,\n ComponentPortal,\n CdkPortalOutlet,\n TemplatePortal\n} from '@angular/cdk/portal';\nimport {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {MatDialogConfig} from './dialog-config';\n\n\n/**\n * Throws an exception for the case when a ComponentPortal is\n * attached to a DomPortalOutlet without an origin.\n * @docs-private\n */\nexport function throwMatDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * Animation is based on https://material.io/guidelines/motion/choreography.html.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-dialog-container',\n templateUrl: 'dialog-container.html',\n styleUrls: ['dialog.css'],\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [matDialogAnimations.dialogContainer],\n host: {\n 'class': 'mat-dialog-container',\n 'tabindex': '-1',\n 'aria-modal': 'true',\n '[attr.id]': '_id',\n '[attr.role]': '_config.role',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n '[@dialogContainer]': '_state',\n '(@dialogContainer.start)': '_onAnimationStart($event)',\n '(@dialogContainer.done)': '_onAnimationDone($event)',\n },\n})\nexport class MatDialogContainer extends BasePortalOutlet {\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /** State of the dialog animation. */\n _state: 'void' | 'enter' | 'exit' = 'enter';\n\n /** Emits when an animation state changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** ID of the element that should be considered as the dialog's label. */\n _ariaLabelledBy: string | null;\n\n /** ID for the container DOM element. */\n _id: string;\n\n constructor(\n private _elementRef: ElementRef,\n private _focusTrapFactory: FocusTrapFactory,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(DOCUMENT) private _document: any,\n /** The dialog configuration. */\n public _config: MatDialogConfig) {\n\n super();\n this._ariaLabelledBy = _config.ariaLabelledBy || null;\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /** Moves the focus inside the focus trap. */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If we were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty.\n if (this._config.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n } else {\n const activeElement = this._document.activeElement;\n\n // Otherwise ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n }\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeDialogWasOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n toFocus.focus();\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the dialog was opened. */\n private _savePreviouslyFocusedElement() {\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = this._document.activeElement as HTMLElement;\n\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n // Move focus onto the dialog immediately in order to prevent the user from accidentally\n // opening multiple dialogs at the same time. Needs to be async, because the element\n // may not be focusable immediately.\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n }\n }\n }\n\n /** Callback, invoked whenever an animation on the host completes. */\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'enter') {\n this._trapFocus();\n } else if (event.toState === 'exit') {\n this._restoreFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n /** Callback, invoked when an animation on the host starts. */\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n /** Starts the dialog exit animation. */\n _startExitAnimation(): void {\n this._state = 'exit';\n\n // Mark the container for check so it can react if the\n // view container is using OnPush change detection.\n this._changeDetectorRef.markForCheck();\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.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal';\nimport {Location} from '@angular/common';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n Optional,\n SkipSelf,\n TemplateRef,\n} from '@angular/core';\nimport {defer, Observable, of as observableOf, Subject} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {MatDialogConfig} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\nimport {MatDialogRef} from './dialog-ref';\n\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const MAT_DIALOG_DATA = new InjectionToken<any>('MatDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const MAT_DIALOG_DEFAULT_OPTIONS =\n new InjectionToken<MatDialogConfig>('mat-dialog-default-options');\n\n/** Injection token that determines the scroll handling while the dialog is open. */\nexport const MAT_DIALOG_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-dialog-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n\n/**\n * Service to open Material Design modal dialogs.\n */\n@Injectable()\nexport class MatDialog implements OnDestroy {\n private _openDialogsAtThisLevel: MatDialogRef<any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<MatDialogRef<any>>();\n private _ariaHiddenElements = new Map<Element, string|null>();\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): MatDialogRef<any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<MatDialogRef<any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when a dialog has been opened.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n get afterOpen(): Subject<MatDialogRef<any>> {\n return this.afterOpened;\n }\n\n get _afterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._afterAllClosed : this._afterAllClosedAtThisLevel;\n }\n\n // TODO (jelbourn): tighten the typing right-hand side of this expression.\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() => this.openDialogs.length ?\n this._afterAllClosed :\n this._afterAllClosed.pipe(startWith(undefined))) as Observable<any>;\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() private _location: Location,\n @Optional() @Inject(MAT_DIALOG_DEFAULT_OPTIONS) private _defaultOptions: MatDialogConfig,\n @Inject(MAT_DIALOG_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() @SkipSelf() private _parentDialog: MatDialog,\n private _overlayContainer: OverlayContainer) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /**\n * Opens a modal dialog containing the given component.\n * @param componentOrTemplateRef Type of the component to load into the dialog,\n * or a TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatDialogConfig<D>): MatDialogRef<T, R> {\n\n config = _applyConfigDefaults(config, this._defaultOptions || new MatDialogConfig());\n\n if (config.id && this.getDialogById(config.id)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayRef = this._createOverlay(config);\n const dialogContainer = this._attachDialogContainer(overlayRef, config);\n const dialogRef = this._attachDialogContent<T, R>(componentOrTemplateRef,\n dialogContainer,\n overlayRef,\n config);\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n\n this.openDialogs.push(dialogRef);\n dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n this._closeDialogs(this.openDialogs);\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): MatDialogRef<any> | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n\n /**\n * Creates the overlay into which the dialog will be loaded.\n * @param config The dialog configuration.\n * @returns A promise resolving to the OverlayRef for the created overlay.\n */\n private _createOverlay(config: MatDialogConfig): OverlayRef {\n const overlayConfig = this._getOverlayConfig(config);\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param dialogConfig The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig(dialogConfig: MatDialogConfig): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: dialogConfig.scrollStrategy || this._scrollStrategy(),\n panelClass: dialogConfig.panelClass,\n hasBackdrop: dialogConfig.hasBackdrop,\n direction: dialogConfig.direction,\n minWidth: dialogConfig.minWidth,\n minHeight: dialogConfig.minHeight,\n maxWidth: dialogConfig.maxWidth,\n maxHeight: dialogConfig.maxHeight,\n disposeOnNavigation: dialogConfig.closeOnNavigation\n });\n\n if (dialogConfig.backdropClass) {\n state.backdropClass = dialogConfig.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches an MatDialogContainer to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachDialogContainer(overlay: OverlayRef, config: MatDialogConfig): MatDialogContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatDialogConfig, config]\n ]));\n const containerPortal = new ComponentPortal(MatDialogContainer,\n config.viewContainerRef, injector, config.componentFactoryResolver);\n const containerRef = overlay.attach<MatDialogContainer>(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created MatDialogContainer.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogContainer Reference to the wrapping MatDialogContainer.\n * @param overlayRef Reference to the overlay in which the dialog resides.\n * @param config The dialog configuration.\n * @returns A promise resolving to the MatDialogRef that should be returned to the user.\n */\n private _attachDialogContent<T, R>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n dialogContainer: MatDialogContainer,\n overlayRef: OverlayRef,\n config: MatDialogConfig): MatDialogRef<T, R> {\n\n // Create a reference to the dialog we're creating in order to give the user a handle\n // to modify and close it.\n const dialogRef =\n new MatDialogRef<T, R>(overlayRef, dialogContainer, this._location, config.id);\n\n // When the dialog backdrop is clicked, we want to close it.\n if (config.hasBackdrop) {\n overlayRef.backdropClick().subscribe(() => {\n if (!dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n }\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n dialogContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!,\n <any>{ $implicit: config.data, dialogRef }));\n } else {\n const injector = this._createInjector<T>(config, dialogRef, dialogContainer);\n const contentRef = dialogContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, undefined, injector));\n dialogRef.componentInstance = contentRef.instance;\n }\n\n dialogRef\n .updateSize(config.width, config.height)\n .updatePosition(config.position);\n\n return dialogRef;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog.\n * @param container Dialog container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<T>(\n config: MatDialogConfig,\n dialogRef: MatDialogRef<T>,\n dialogContainer: MatDialogContainer): PortalInjector {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n\n // The MatDialogContainer is injected in the portal as the MatDialogContainer and the dialog's\n // content are created out of the same ViewContainerRef and as such, are siblings for injector\n // purposes. To allow the hierarchy that is expected, the MatDialogContainer is explicitly\n // added to the injection tokens.\n const injectionTokens = new WeakMap<any, any>([\n [MatDialogContainer, dialogContainer],\n [MAT_DIALOG_DATA, config.data],\n [MatDialogRef, dialogRef]\n ]);\n\n if (config.direction &&\n (!userInjector || !userInjector.get<Directionality | null>(Directionality, null))) {\n injectionTokens.set(Directionality, {\n value: config.direction,\n change: observableOf()\n });\n }\n\n return new PortalInjector(userInjector || this._injector, injectionTokens);\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n */\n private _removeOpenDialog(dialogRef: MatDialogRef<any>) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n this._afterAllClosed.next();\n }\n }\n }\n\n /**\n * Hides all of the content that isn't an overlay from assistive technology.\n */\n private _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n let sibling = siblings[i];\n\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n /** Closes all of the dialogs in an array. */\n private _closeDialogs(dialogs: MatDialogRef<any>[]) {\n let i = dialogs.length;\n\n while (i--) {\n // The `_openDialogs` property isn't updated after close until the rxjs subscription\n // runs on the next microtask, in addition to modifying the array as we're going\n // through it. We loop through all of them and call close without assuming that\n // they'll be removed from the list instantaneously.\n dialogs[i].close();\n }\n }\n\n}\n\n/**\n * Applies default options to the dialog config.\n * @param config Config to be modified.\n * @param defaultOptions Default options provided.\n * @returns The new configuration object.\n */\nfunction _applyConfigDefaults(\n config?: MatDialogConfig, defaultOptions?: MatDialogConfig): MatDialogConfig {\n return {...defaultOptions, ...config};\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.io/license\n */\n\nimport {\n Directive,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n ElementRef,\n} from '@angular/core';\nimport {MatDialog} from './dialog';\nimport {MatDialogRef} from './dialog-ref';\n\n/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n selector: '[mat-dialog-close], [matDialogClose]',\n exportAs: 'matDialogClose',\n host: {\n '(click)': 'dialogRef.close(dialogResult)',\n '[attr.aria-label]': 'ariaLabel || null',\n '[attr.type]': 'type',\n }\n})\nexport class MatDialogClose implements OnInit, OnChanges {\n /** Screenreader label for the button. */\n @Input('aria-label') ariaLabel: string;\n\n /** Default to \"button\" to prevents accidental form submits. */\n @Input() type: 'submit' | 'button' | 'reset' = 'button';\n\n /** Dialog close input. */\n @Input('mat-dialog-close') dialogResult: any;\n\n @Input('matDialogClose') _matDialogClose: any;\n\n constructor(\n @Optional() public dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n}\n\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\n@Directive({\n selector: '[mat-dialog-title], [matDialogTitle]',\n exportAs: 'matDialogTitle',\n host: {\n 'class': 'mat-dialog-title',\n '[id]': 'id',\n },\n})\nexport class MatDialogTitle implements OnInit {\n @Input() id = `mat-dialog-title-${dialogElementUid++}`;\n\n constructor(\n @Optional() private _dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n const container = this._dialogRef._containerInstance;\n\n if (container && !container._ariaLabelledBy) {\n container._ariaLabelledBy = this.id;\n }\n });\n }\n }\n}\n\n\n/**\n * Scrollable content container of a dialog.\n */\n@Directive({\n selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n host: {'class': 'mat-dialog-content'}\n})\nexport class MatDialogContent {}\n\n\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\n@Directive({\n selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n host: {'class': 'mat-dialog-actions'}\n})\nexport class MatDialogActions {}\n\n\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<HTMLElement>, openDialogs: MatDialogRef<any>[]) {\n let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n while (parent && !parent.classList.contains('mat-dialog-container')) {\n parent = parent.parentElement;\n }\n\n return parent ? openDialogs.find(dialog => dialog.id === parent!.id) : null;\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.io/license\n */\n\nimport {ViewContainerRef, ComponentFactoryResolver} from '@angular/core';\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\n\n/** Valid ARIA roles for a dialog element. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Possible overrides for a dialog's position. */\nexport interface DialogPosition {\n /** Override for the dialog's top position. */\n top?: string;\n\n /** Override for the dialog's bottom position. */\n bottom?: string;\n\n /** Override for the dialog's left position. */\n left?: string;\n\n /** Override for the dialog's right position. */\n right?: string;\n}\n\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nexport class MatDialogConfig<D = any> {\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Custom class for the overlay pane. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop, */\n backdropClass?: string = '';\n\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n disableClose?: boolean = false;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, pixel units are assumed. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, pixel units are assumed. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, pixel units are assumed. Defaults to 80vw */\n maxWidth?: number | string = '80vw';\n\n /** Max-height of the dialog. If a number is provided, pixel units are assumed. */\n maxHeight?: number | string;\n\n /** Position overrides. */\n position?: DialogPosition;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Aria label to assign to the dialog element */\n ariaLabel?: string | null = null;\n\n /** Whether the dialog should focus the first focusable element on open. */\n autoFocus?: boolean = true;\n\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the dialog. */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */\n componentFactoryResolver?: ComponentFactoryResolver;\n\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\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.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\nconst animationBody = [\n // Note: The `enter` animation transitions to `transform: none`, because for some reason\n // specifying the transform explicitly, causes IE both to blur the dialog content and\n // decimate the animation performance. Leaving it as `none` solves both issues.\n state('void, exit', style({opacity: 0, transform: 'scale(0.7)'})),\n state('enter', style({transform: 'none'})),\n transition('* => enter', animate('150ms cubic-bezier(0, 0, 0.2, 1)',\n style({transform: 'none', opacity: 1}))),\n transition('* => void, * => exit',\n animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({opacity: 0}))),\n];\n\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nexport const matDialogAnimations: {\n readonly dialogContainer: AnimationTriggerMetadata;\n readonly slideDialog: AnimationTriggerMetadata;\n} = {\n /** Animation that is applied on the dialog container by defalt. */\n dialogContainer: trigger('dialogContainer', animationBody),\n\n /** @deprecated @breaking-change 8.0.0 Use `matDialogAnimations.dialogContainer` instead. */\n slideDialog: trigger('slideDialog', animationBody)\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.io/license\n */\n\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {GlobalPositionStrategy, OverlayRef} from '@angular/cdk/overlay';\nimport {Location} from '@angular/common';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {DialogPosition} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\n\n\n// TODO(jelbourn): resizing\n\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n\n/** Possible states of the lifecycle of a dialog. */\nexport const enum MatDialogState {OPEN, CLOSING, CLOSED}\n\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nexport class MatDialogRef<T, R = any> {\n /** The instance of component opened into the dialog. */\n componentInstance: T;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined = this._containerInstance._config.disableClose;\n\n /** Subject for notifying the user that the dialog has finished opening. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Subject for notifying the user that the dialog has finished closing. */\n private readonly _afterClosed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the dialog has started closing. */\n private readonly _beforeClosed = new Subject<R | undefined>();\n\n /** Result to be passed to afterClosed. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: number;\n\n /** Current state of the dialog. */\n private _state = MatDialogState.OPEN;\n\n constructor(\n private _overlayRef: OverlayRef,\n public _containerInstance: MatDialogContainer,\n // @breaking-change 8.0.0 `_location` parameter to be removed.\n _location?: Location,\n readonly id: string = `mat-dialog-${uniqueId++}`) {\n\n // Pass the id along to the container.\n _containerInstance._id = id;\n\n // Emit when opening animation completes\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n ).subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._overlayRef.dispose();\n });\n\n _overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n this.componentInstance = null!;\n this._overlayRef.dispose();\n });\n\n _overlayRef.keydownEvents()\n .pipe(filter(event => {\n return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);\n }))\n .subscribe(event => {\n event.preventDefault();\n this.close();\n });\n }\n\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult?: R): void {\n this._result = dialogResult;\n\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._state = MatDialogState.CLOSED;\n this._overlayRef.detachBackdrop();\n\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n });\n\n this._containerInstance._startExitAnimation();\n this._state = MatDialogState.CLOSING;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed(): Observable<R | undefined> {\n return this._beforeClosed.asObservable();\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._overlayRef.backdropClick();\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef.keydownEvents();\n }\n\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position?: DialogPosition): this {\n let strategy = this._getPositionStrategy();\n\n if (position && (position.left || position.right)) {\n position.left ? strategy.left(position.left) : strategy.right(position.right);\n } else {\n strategy.centerHorizontally();\n }\n\n if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n } else {\n strategy.centerVertically();\n }\n\n this._overlayRef.updatePosition();\n\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string = '', height: string = ''): this {\n this._getPositionStrategy().width(width).height(height);\n this._overlayRef.updatePosition();\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this._overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this._overlayRef.removePanelClass(classes);\n return this;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n afterOpen(): Observable<void> {\n return this.afterOpened();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n * @deprecated Use `beforeClosed` instead.\n * @breaking-change 8.0.0\n */\n beforeClose(): Observable<R | undefined> {\n return this.beforeClosed();\n }\n\n /** Gets the current state of the dialog's lifecycle. */\n getState(): MatDialogState {\n return this._state;\n }\n\n /** Fetches the position strategy object from the overlay ref. */\n private _getPositionStrategy(): GlobalPositionStrategy {\n return this._overlayRef.getConfig().positionStrategy as GlobalPositionStrategy;\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.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MatDialog} from './dialog';\nimport {MatDialogContainer} from './dialog-container';\nimport {\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogTitle,\n} from './dialog-content-directives';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n PortalModule,\n MatCommonModule,\n ],\n exports: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule,\n ],\n declarations: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent,\n ],\n providers: [\n MatDialog,\n MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,\n ],\n entryComponents: [MatDialogContainer],\n})\nexport class MatDialogModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","throwMatDialogContentAlreadyAttachedError","Error","MAT_DIALOG_SCROLL_STRATEGY_FACTORY","overlay","scrollStrategies","block","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","_applyConfigDefaults","config","defaultOptions","tslib_1.__assign","getClosestDialog","element","openDialogs","parent","nativeElement","parentElement","classList","contains","find","dialog","id","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","call","apply","MatDialogConfig","role","panelClass","hasBackdrop","backdropClass","disableClose","width","height","maxWidth","data","ariaDescribedBy","ariaLabelledBy","ariaLabel","autoFocus","restoreFocus","closeOnNavigation","animationBody","state","style","opacity","transform","transition","animate","matDialogAnimations","dialogContainer","trigger","slideDialog","MatDialogContainer","_super","_elementRef","_focusTrapFactory","_changeDetectorRef","_document","_config","_this","_elementFocusedBeforeDialogWasOpened","_state","_animationStateChanged","EventEmitter","_ariaLabelledBy","tslib_1.__extends","attachComponentPortal","portal","_portalOutlet","hasAttached","_savePreviouslyFocusedElement","attachTemplatePortal","_trapFocus","_focusTrap","focusInitialElementWhenReady","activeElement","focus","_restoreFocus","toFocus","destroy","Promise","resolve","then","_onAnimationDone","event","toState","emit","_onAnimationStart","_startExitAnimation","markForCheck","type","Component","args","selector","template","styles","encapsulation","ViewEncapsulation","None","host","class","tabindex","aria-modal","[attr.id]","[attr.role]","[attr.aria-labelledby]","[attr.aria-label]","[attr.aria-describedby]","[@dialogContainer]","(@dialogContainer.start)","(@dialogContainer.done)","ChangeDetectorRef","undefined","decorators","Optional","Inject","DOCUMENT","propDecorators","uniqueId","MatDialogRef","_overlayRef","_containerInstance","_location","_afterOpened","Subject","_afterClosed","_beforeClosed","_id","pipe","filter","phaseName","take","subscribe","next","complete","clearTimeout","_closeFallbackTimeout","dispose","detachments","_result","componentInstance","keydownEvents","keyCode","ESCAPE","hasModifierKey","preventDefault","close","dialogResult","detachBackdrop","setTimeout","totalTime","afterOpened","asObservable","afterClosed","beforeClosed","backdropClick","updatePosition","position","strategy","_getPositionStrategy","left","right","centerHorizontally","top","bottom","centerVertically","updateSize","addPanelClass","classes","removePanelClass","afterOpen","beforeClose","getState","getConfig","MAT_DIALOG_DATA","InjectionToken","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","provide","deps","Overlay","useFactory","MatDialog","_overlay","_injector","_defaultOptions","scrollStrategy","_parentDialog","_overlayContainer","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","Map","afterAllClosed","defer","_afterAllClosed","startWith","_scrollStrategy","defineProperty","open","componentOrTemplateRef","getDialogById","overlayRef","_createOverlay","_attachDialogContainer","dialogRef","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","push","_removeOpenDialog","closeAll","_closeDialogs","ngOnDestroy","overlayConfig","_getOverlayConfig","dialogConfig","OverlayConfig","positionStrategy","global","direction","minWidth","minHeight","maxHeight","disposeOnNavigation","userInjector","viewContainerRef","injector","PortalInjector","WeakMap","containerPortal","ComponentPortal","componentFactoryResolver","attach","instance","TemplateRef","TemplatePortal","$implicit","_createInjector","contentRef","injectionTokens","get","Directionality","set","value","change","observableOf","index","indexOf","splice","forEach","previousValue","setAttribute","removeAttribute","clear","overlayContainer","getContainerElement","siblings","children","sibling","nodeName","hasAttribute","getAttribute","dialogs","Injectable","Injector","Location","SkipSelf","OverlayContainer","dialogElementUid","MatDialogClose","_dialog","ngOnInit","ngOnChanges","changes","proxiedChange","currentValue","Directive","exportAs","(click)","[attr.type]","ElementRef","Input","_matDialogClose","MatDialogTitle","_dialogRef","container","[id]","MatDialogContent","MatDialogActions","MatDialogModule","NgModule","imports","CommonModule","OverlayModule","PortalModule","MatCommonModule","exports","declarations","providers","entryComponents"],"mappings":";;;;;;;o9BAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICanF,QAAgBO,KACd,KAAMC,OAAM,yECOd,QAAgBC,GAAmCC,GACjD,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SAIxC,QAAgBC,GAA4CH,GAE1D,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SA8UxC,QAASE,GACLC,EAA0BC,GAC5B,MAAFC,MAAaD,EAAmBD,GC/PhC,QAASG,GAAiBC,EAAkCC,GAG1D,IAFF,GAAMC,GAA6BF,EAAQG,cAAcC,cAEhDF,IAAWA,EAAOG,UAAUC,SAAS,yBAC1CJ,EAASA,EAAOE,aAGlB,OAAOF,GAASD,EAAYM,KAAI,SAACC,GAAU,MAAAA,GAAOC,KAAO,EAAQA,KAAM,KH9H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slib/tslib.es6.js","../../src/material/dialog/dialog-container.ts","../../src/material/dialog/dialog.ts","../../src/material/dialog/dialog-content-directives.ts","../../src/material/dialog/dialog-config.ts","../../src/material/dialog/dialog-animations.ts","../../src/material/dialog/dialog-ref.ts","../../src/material/dialog/dialog-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\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.io/license\n */\n\nimport {\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n Optional,\n ChangeDetectorRef,\n ViewChild,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {AnimationEvent} from '@angular/animations';\nimport {matDialogAnimations} from './dialog-animations';\nimport {\n BasePortalOutlet,\n ComponentPortal,\n CdkPortalOutlet,\n TemplatePortal\n} from '@angular/cdk/portal';\nimport {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {MatDialogConfig} from './dialog-config';\n\n\n/**\n * Throws an exception for the case when a ComponentPortal is\n * attached to a DomPortalOutlet without an origin.\n * @docs-private\n */\nexport function throwMatDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * Animation is based on https://material.io/guidelines/motion/choreography.html.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-dialog-container',\n templateUrl: 'dialog-container.html',\n styleUrls: ['dialog.css'],\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [matDialogAnimations.dialogContainer],\n host: {\n 'class': 'mat-dialog-container',\n 'tabindex': '-1',\n 'aria-modal': 'true',\n '[attr.id]': '_id',\n '[attr.role]': '_config.role',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n '[@dialogContainer]': '_state',\n '(@dialogContainer.start)': '_onAnimationStart($event)',\n '(@dialogContainer.done)': '_onAnimationDone($event)',\n },\n})\nexport class MatDialogContainer extends BasePortalOutlet {\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /** State of the dialog animation. */\n _state: 'void' | 'enter' | 'exit' = 'enter';\n\n /** Emits when an animation state changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** ID of the element that should be considered as the dialog's label. */\n _ariaLabelledBy: string | null;\n\n /** ID for the container DOM element. */\n _id: string;\n\n constructor(\n private _elementRef: ElementRef,\n private _focusTrapFactory: FocusTrapFactory,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(DOCUMENT) private _document: any,\n /** The dialog configuration. */\n public _config: MatDialogConfig) {\n\n super();\n this._ariaLabelledBy = _config.ariaLabelledBy || null;\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /** Moves the focus inside the focus trap. */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If we were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty.\n if (this._config.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n } else {\n const activeElement = this._document.activeElement;\n\n // Otherwise ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n }\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeDialogWasOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n toFocus.focus();\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the dialog was opened. */\n private _savePreviouslyFocusedElement() {\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = this._document.activeElement as HTMLElement;\n\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n // Move focus onto the dialog immediately in order to prevent the user from accidentally\n // opening multiple dialogs at the same time. Needs to be async, because the element\n // may not be focusable immediately.\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n }\n }\n }\n\n /** Callback, invoked whenever an animation on the host completes. */\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'enter') {\n this._trapFocus();\n } else if (event.toState === 'exit') {\n this._restoreFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n /** Callback, invoked when an animation on the host starts. */\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n /** Starts the dialog exit animation. */\n _startExitAnimation(): void {\n this._state = 'exit';\n\n // Mark the container for check so it can react if the\n // view container is using OnPush change detection.\n this._changeDetectorRef.markForCheck();\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.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal';\nimport {Location} from '@angular/common';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n Optional,\n SkipSelf,\n TemplateRef,\n} from '@angular/core';\nimport {defer, Observable, of as observableOf, Subject} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {MatDialogConfig} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\nimport {MatDialogRef} from './dialog-ref';\n\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const MAT_DIALOG_DATA = new InjectionToken<any>('MatDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const MAT_DIALOG_DEFAULT_OPTIONS =\n new InjectionToken<MatDialogConfig>('mat-dialog-default-options');\n\n/** Injection token that determines the scroll handling while the dialog is open. */\nexport const MAT_DIALOG_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-dialog-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n\n/**\n * Service to open Material Design modal dialogs.\n */\n@Injectable()\nexport class MatDialog implements OnDestroy {\n private _openDialogsAtThisLevel: MatDialogRef<any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<MatDialogRef<any>>();\n private _ariaHiddenElements = new Map<Element, string|null>();\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): MatDialogRef<any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<MatDialogRef<any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when a dialog has been opened.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n get afterOpen(): Subject<MatDialogRef<any>> {\n return this.afterOpened;\n }\n\n get _afterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._afterAllClosed : this._afterAllClosedAtThisLevel;\n }\n\n // TODO (jelbourn): tighten the typing right-hand side of this expression.\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() => this.openDialogs.length ?\n this._afterAllClosed :\n this._afterAllClosed.pipe(startWith(undefined))) as Observable<any>;\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() private _location: Location,\n @Optional() @Inject(MAT_DIALOG_DEFAULT_OPTIONS) private _defaultOptions: MatDialogConfig,\n @Inject(MAT_DIALOG_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() @SkipSelf() private _parentDialog: MatDialog,\n private _overlayContainer: OverlayContainer) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /**\n * Opens a modal dialog containing the given component.\n * @param componentOrTemplateRef Type of the component to load into the dialog,\n * or a TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatDialogConfig<D>): MatDialogRef<T, R> {\n\n config = _applyConfigDefaults(config, this._defaultOptions || new MatDialogConfig());\n\n if (config.id && this.getDialogById(config.id)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayRef = this._createOverlay(config);\n const dialogContainer = this._attachDialogContainer(overlayRef, config);\n const dialogRef = this._attachDialogContent<T, R>(componentOrTemplateRef,\n dialogContainer,\n overlayRef,\n config);\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n\n this.openDialogs.push(dialogRef);\n dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n this._closeDialogs(this.openDialogs);\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): MatDialogRef<any> | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n\n /**\n * Creates the overlay into which the dialog will be loaded.\n * @param config The dialog configuration.\n * @returns A promise resolving to the OverlayRef for the created overlay.\n */\n private _createOverlay(config: MatDialogConfig): OverlayRef {\n const overlayConfig = this._getOverlayConfig(config);\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param dialogConfig The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig(dialogConfig: MatDialogConfig): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: dialogConfig.scrollStrategy || this._scrollStrategy(),\n panelClass: dialogConfig.panelClass,\n hasBackdrop: dialogConfig.hasBackdrop,\n direction: dialogConfig.direction,\n minWidth: dialogConfig.minWidth,\n minHeight: dialogConfig.minHeight,\n maxWidth: dialogConfig.maxWidth,\n maxHeight: dialogConfig.maxHeight,\n disposeOnNavigation: dialogConfig.closeOnNavigation\n });\n\n if (dialogConfig.backdropClass) {\n state.backdropClass = dialogConfig.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches an MatDialogContainer to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachDialogContainer(overlay: OverlayRef, config: MatDialogConfig): MatDialogContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatDialogConfig, config]\n ]));\n const containerPortal = new ComponentPortal(MatDialogContainer,\n config.viewContainerRef, injector, config.componentFactoryResolver);\n const containerRef = overlay.attach<MatDialogContainer>(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created MatDialogContainer.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogContainer Reference to the wrapping MatDialogContainer.\n * @param overlayRef Reference to the overlay in which the dialog resides.\n * @param config The dialog configuration.\n * @returns A promise resolving to the MatDialogRef that should be returned to the user.\n */\n private _attachDialogContent<T, R>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n dialogContainer: MatDialogContainer,\n overlayRef: OverlayRef,\n config: MatDialogConfig): MatDialogRef<T, R> {\n\n // Create a reference to the dialog we're creating in order to give the user a handle\n // to modify and close it.\n const dialogRef =\n new MatDialogRef<T, R>(overlayRef, dialogContainer, this._location, config.id);\n\n // When the dialog backdrop is clicked, we want to close it.\n if (config.hasBackdrop) {\n overlayRef.backdropClick().subscribe(() => {\n if (!dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n }\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n dialogContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!,\n <any>{ $implicit: config.data, dialogRef }));\n } else {\n const injector = this._createInjector<T>(config, dialogRef, dialogContainer);\n const contentRef = dialogContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, undefined, injector));\n dialogRef.componentInstance = contentRef.instance;\n }\n\n dialogRef\n .updateSize(config.width, config.height)\n .updatePosition(config.position);\n\n return dialogRef;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog.\n * @param container Dialog container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<T>(\n config: MatDialogConfig,\n dialogRef: MatDialogRef<T>,\n dialogContainer: MatDialogContainer): PortalInjector {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n\n // The MatDialogContainer is injected in the portal as the MatDialogContainer and the dialog's\n // content are created out of the same ViewContainerRef and as such, are siblings for injector\n // purposes. To allow the hierarchy that is expected, the MatDialogContainer is explicitly\n // added to the injection tokens.\n const injectionTokens = new WeakMap<any, any>([\n [MatDialogContainer, dialogContainer],\n [MAT_DIALOG_DATA, config.data],\n [MatDialogRef, dialogRef]\n ]);\n\n if (config.direction &&\n (!userInjector || !userInjector.get<Directionality | null>(Directionality, null))) {\n injectionTokens.set(Directionality, {\n value: config.direction,\n change: observableOf()\n });\n }\n\n return new PortalInjector(userInjector || this._injector, injectionTokens);\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n */\n private _removeOpenDialog(dialogRef: MatDialogRef<any>) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n this._afterAllClosed.next();\n }\n }\n }\n\n /**\n * Hides all of the content that isn't an overlay from assistive technology.\n */\n private _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n let sibling = siblings[i];\n\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n /** Closes all of the dialogs in an array. */\n private _closeDialogs(dialogs: MatDialogRef<any>[]) {\n let i = dialogs.length;\n\n while (i--) {\n // The `_openDialogs` property isn't updated after close until the rxjs subscription\n // runs on the next microtask, in addition to modifying the array as we're going\n // through it. We loop through all of them and call close without assuming that\n // they'll be removed from the list instantaneously.\n dialogs[i].close();\n }\n }\n\n}\n\n/**\n * Applies default options to the dialog config.\n * @param config Config to be modified.\n * @param defaultOptions Default options provided.\n * @returns The new configuration object.\n */\nfunction _applyConfigDefaults(\n config?: MatDialogConfig, defaultOptions?: MatDialogConfig): MatDialogConfig {\n return {...defaultOptions, ...config};\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.io/license\n */\n\nimport {\n Directive,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n ElementRef,\n} from '@angular/core';\nimport {MatDialog} from './dialog';\nimport {MatDialogRef} from './dialog-ref';\n\n/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n selector: '[mat-dialog-close], [matDialogClose]',\n exportAs: 'matDialogClose',\n host: {\n '(click)': 'dialogRef.close(dialogResult)',\n '[attr.aria-label]': 'ariaLabel || null',\n '[attr.type]': 'type',\n }\n})\nexport class MatDialogClose implements OnInit, OnChanges {\n /** Screenreader label for the button. */\n @Input('aria-label') ariaLabel: string;\n\n /** Default to \"button\" to prevents accidental form submits. */\n @Input() type: 'submit' | 'button' | 'reset' = 'button';\n\n /** Dialog close input. */\n @Input('mat-dialog-close') dialogResult: any;\n\n @Input('matDialogClose') _matDialogClose: any;\n\n constructor(\n @Optional() public dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n}\n\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\n@Directive({\n selector: '[mat-dialog-title], [matDialogTitle]',\n exportAs: 'matDialogTitle',\n host: {\n 'class': 'mat-dialog-title',\n '[id]': 'id',\n },\n})\nexport class MatDialogTitle implements OnInit {\n @Input() id = `mat-dialog-title-${dialogElementUid++}`;\n\n constructor(\n @Optional() private _dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n const container = this._dialogRef._containerInstance;\n\n if (container && !container._ariaLabelledBy) {\n container._ariaLabelledBy = this.id;\n }\n });\n }\n }\n}\n\n\n/**\n * Scrollable content container of a dialog.\n */\n@Directive({\n selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n host: {'class': 'mat-dialog-content'}\n})\nexport class MatDialogContent {}\n\n\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\n@Directive({\n selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n host: {'class': 'mat-dialog-actions'}\n})\nexport class MatDialogActions {}\n\n\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<HTMLElement>, openDialogs: MatDialogRef<any>[]) {\n let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n while (parent && !parent.classList.contains('mat-dialog-container')) {\n parent = parent.parentElement;\n }\n\n return parent ? openDialogs.find(dialog => dialog.id === parent!.id) : null;\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.io/license\n */\n\nimport {ViewContainerRef, ComponentFactoryResolver} from '@angular/core';\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\n\n/** Valid ARIA roles for a dialog element. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Possible overrides for a dialog's position. */\nexport interface DialogPosition {\n /** Override for the dialog's top position. */\n top?: string;\n\n /** Override for the dialog's bottom position. */\n bottom?: string;\n\n /** Override for the dialog's left position. */\n left?: string;\n\n /** Override for the dialog's right position. */\n right?: string;\n}\n\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nexport class MatDialogConfig<D = any> {\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Custom class for the overlay pane. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop. */\n backdropClass?: string = '';\n\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n disableClose?: boolean = false;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n maxWidth?: number | string = '80vw';\n\n /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n\n /** Position overrides. */\n position?: DialogPosition;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Aria label to assign to the dialog element. */\n ariaLabel?: string | null = null;\n\n /** Whether the dialog should focus the first focusable element on open. */\n autoFocus?: boolean = true;\n\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the dialog. */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */\n componentFactoryResolver?: ComponentFactoryResolver;\n\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\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.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\nconst animationBody = [\n // Note: The `enter` animation transitions to `transform: none`, because for some reason\n // specifying the transform explicitly, causes IE both to blur the dialog content and\n // decimate the animation performance. Leaving it as `none` solves both issues.\n state('void, exit', style({opacity: 0, transform: 'scale(0.7)'})),\n state('enter', style({transform: 'none'})),\n transition('* => enter', animate('150ms cubic-bezier(0, 0, 0.2, 1)',\n style({transform: 'none', opacity: 1}))),\n transition('* => void, * => exit',\n animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({opacity: 0}))),\n];\n\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nexport const matDialogAnimations: {\n readonly dialogContainer: AnimationTriggerMetadata;\n readonly slideDialog: AnimationTriggerMetadata;\n} = {\n /** Animation that is applied on the dialog container by defalt. */\n dialogContainer: trigger('dialogContainer', animationBody),\n\n /** @deprecated @breaking-change 8.0.0 Use `matDialogAnimations.dialogContainer` instead. */\n slideDialog: trigger('slideDialog', animationBody)\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.io/license\n */\n\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {GlobalPositionStrategy, OverlayRef} from '@angular/cdk/overlay';\nimport {Location} from '@angular/common';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {DialogPosition} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\n\n\n// TODO(jelbourn): resizing\n\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n\n/** Possible states of the lifecycle of a dialog. */\nexport const enum MatDialogState {OPEN, CLOSING, CLOSED}\n\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nexport class MatDialogRef<T, R = any> {\n /** The instance of component opened into the dialog. */\n componentInstance: T;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined = this._containerInstance._config.disableClose;\n\n /** Subject for notifying the user that the dialog has finished opening. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Subject for notifying the user that the dialog has finished closing. */\n private readonly _afterClosed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the dialog has started closing. */\n private readonly _beforeClosed = new Subject<R | undefined>();\n\n /** Result to be passed to afterClosed. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: number;\n\n /** Current state of the dialog. */\n private _state = MatDialogState.OPEN;\n\n constructor(\n private _overlayRef: OverlayRef,\n public _containerInstance: MatDialogContainer,\n // @breaking-change 8.0.0 `_location` parameter to be removed.\n _location?: Location,\n readonly id: string = `mat-dialog-${uniqueId++}`) {\n\n // Pass the id along to the container.\n _containerInstance._id = id;\n\n // Emit when opening animation completes\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n ).subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._overlayRef.dispose();\n });\n\n _overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n this.componentInstance = null!;\n this._overlayRef.dispose();\n });\n\n _overlayRef.keydownEvents()\n .pipe(filter(event => {\n return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);\n }))\n .subscribe(event => {\n event.preventDefault();\n this.close();\n });\n }\n\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult?: R): void {\n this._result = dialogResult;\n\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._state = MatDialogState.CLOSED;\n this._overlayRef.detachBackdrop();\n\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n });\n\n this._containerInstance._startExitAnimation();\n this._state = MatDialogState.CLOSING;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed(): Observable<R | undefined> {\n return this._beforeClosed.asObservable();\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._overlayRef.backdropClick();\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef.keydownEvents();\n }\n\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position?: DialogPosition): this {\n let strategy = this._getPositionStrategy();\n\n if (position && (position.left || position.right)) {\n position.left ? strategy.left(position.left) : strategy.right(position.right);\n } else {\n strategy.centerHorizontally();\n }\n\n if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n } else {\n strategy.centerVertically();\n }\n\n this._overlayRef.updatePosition();\n\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string = '', height: string = ''): this {\n this._getPositionStrategy().width(width).height(height);\n this._overlayRef.updatePosition();\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this._overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this._overlayRef.removePanelClass(classes);\n return this;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n afterOpen(): Observable<void> {\n return this.afterOpened();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n * @deprecated Use `beforeClosed` instead.\n * @breaking-change 8.0.0\n */\n beforeClose(): Observable<R | undefined> {\n return this.beforeClosed();\n }\n\n /** Gets the current state of the dialog's lifecycle. */\n getState(): MatDialogState {\n return this._state;\n }\n\n /** Fetches the position strategy object from the overlay ref. */\n private _getPositionStrategy(): GlobalPositionStrategy {\n return this._overlayRef.getConfig().positionStrategy as GlobalPositionStrategy;\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.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MatDialog} from './dialog';\nimport {MatDialogContainer} from './dialog-container';\nimport {\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogTitle,\n} from './dialog-content-directives';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n PortalModule,\n MatCommonModule,\n ],\n exports: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule,\n ],\n declarations: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent,\n ],\n providers: [\n MatDialog,\n MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,\n ],\n entryComponents: [MatDialogContainer],\n})\nexport class MatDialogModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","throwMatDialogContentAlreadyAttachedError","Error","MAT_DIALOG_SCROLL_STRATEGY_FACTORY","overlay","scrollStrategies","block","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","_applyConfigDefaults","config","defaultOptions","tslib_1.__assign","getClosestDialog","element","openDialogs","parent","nativeElement","parentElement","classList","contains","find","dialog","id","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","call","apply","MatDialogConfig","role","panelClass","hasBackdrop","backdropClass","disableClose","width","height","maxWidth","data","ariaDescribedBy","ariaLabelledBy","ariaLabel","autoFocus","restoreFocus","closeOnNavigation","animationBody","state","style","opacity","transform","transition","animate","matDialogAnimations","dialogContainer","trigger","slideDialog","MatDialogContainer","_super","_elementRef","_focusTrapFactory","_changeDetectorRef","_document","_config","_this","_elementFocusedBeforeDialogWasOpened","_state","_animationStateChanged","EventEmitter","_ariaLabelledBy","tslib_1.__extends","attachComponentPortal","portal","_portalOutlet","hasAttached","_savePreviouslyFocusedElement","attachTemplatePortal","_trapFocus","_focusTrap","focusInitialElementWhenReady","activeElement","focus","_restoreFocus","toFocus","destroy","Promise","resolve","then","_onAnimationDone","event","toState","emit","_onAnimationStart","_startExitAnimation","markForCheck","type","Component","args","selector","template","styles","encapsulation","ViewEncapsulation","None","host","class","tabindex","aria-modal","[attr.id]","[attr.role]","[attr.aria-labelledby]","[attr.aria-label]","[attr.aria-describedby]","[@dialogContainer]","(@dialogContainer.start)","(@dialogContainer.done)","ChangeDetectorRef","undefined","decorators","Optional","Inject","DOCUMENT","propDecorators","uniqueId","MatDialogRef","_overlayRef","_containerInstance","_location","_afterOpened","Subject","_afterClosed","_beforeClosed","_id","pipe","filter","phaseName","take","subscribe","next","complete","clearTimeout","_closeFallbackTimeout","dispose","detachments","_result","componentInstance","keydownEvents","keyCode","ESCAPE","hasModifierKey","preventDefault","close","dialogResult","detachBackdrop","setTimeout","totalTime","afterOpened","asObservable","afterClosed","beforeClosed","backdropClick","updatePosition","position","strategy","_getPositionStrategy","left","right","centerHorizontally","top","bottom","centerVertically","updateSize","addPanelClass","classes","removePanelClass","afterOpen","beforeClose","getState","getConfig","MAT_DIALOG_DATA","InjectionToken","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","provide","deps","Overlay","useFactory","MatDialog","_overlay","_injector","_defaultOptions","scrollStrategy","_parentDialog","_overlayContainer","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","Map","afterAllClosed","defer","_afterAllClosed","startWith","_scrollStrategy","defineProperty","open","componentOrTemplateRef","getDialogById","overlayRef","_createOverlay","_attachDialogContainer","dialogRef","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","push","_removeOpenDialog","closeAll","_closeDialogs","ngOnDestroy","overlayConfig","_getOverlayConfig","dialogConfig","OverlayConfig","positionStrategy","global","direction","minWidth","minHeight","maxHeight","disposeOnNavigation","userInjector","viewContainerRef","injector","PortalInjector","WeakMap","containerPortal","ComponentPortal","componentFactoryResolver","attach","instance","TemplateRef","TemplatePortal","$implicit","_createInjector","contentRef","injectionTokens","get","Directionality","set","value","change","observableOf","index","indexOf","splice","forEach","previousValue","setAttribute","removeAttribute","clear","overlayContainer","getContainerElement","siblings","children","sibling","nodeName","hasAttribute","getAttribute","dialogs","Injectable","Injector","Location","SkipSelf","OverlayContainer","dialogElementUid","MatDialogClose","_dialog","ngOnInit","ngOnChanges","changes","proxiedChange","currentValue","Directive","exportAs","(click)","[attr.type]","ElementRef","Input","_matDialogClose","MatDialogTitle","_dialogRef","container","[id]","MatDialogContent","MatDialogActions","MatDialogModule","NgModule","imports","CommonModule","OverlayModule","PortalModule","MatCommonModule","exports","declarations","providers","entryComponents"],"mappings":";;;;;;;o9BAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICanF,QAAgBO,KACd,KAAMC,OAAM,yECOd,QAAgBC,GAAmCC,GACjD,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SAIxC,QAAgBC,GAA4CH,GAE1D,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SA8UxC,QAASE,GACLC,EAA0BC,GAC5B,MAAFC,MAAaD,EAAmBD,GC/PhC,QAASG,GAAiBC,EAAkCC,GAG1D,IAFF,GAAMC,GAA6BF,EAAQG,cAAcC,cAEhDF,IAAW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,cACEvP,EACA2N,EACAc,EACAK,EACAD,GAEFW,WACErH,EACAL,GAEF2H,iBAAkBzP,OAEpB+O"}
@@ -1268,7 +1268,7 @@ exports.MatGridTileText = MatGridTileText;
1268
1268
  exports.MatGridAvatarCssMatStyler = MatGridAvatarCssMatStyler;
1269
1269
  exports.MatGridTileHeaderCssMatStyler = MatGridTileHeaderCssMatStyler;
1270
1270
  exports.MatGridTileFooterCssMatStyler = MatGridTileFooterCssMatStyler;
1271
- exports.ɵa7 = MAT_GRID_LIST;
1271
+ exports.ɵa11 = MAT_GRID_LIST;
1272
1272
 
1273
1273
  Object.defineProperty(exports, '__esModule', { value: true });
1274
1274
 
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/bidi")):"function"==typeof define&&define.amd?define("@angular/material/grid-list",["exports","@angular/core","@angular/material/core","@angular/cdk/coercion","@angular/cdk/bidi"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.gridList={}),t.ng.core,t.ng.material.core,t.ng.cdk.coercion,t.ng.cdk.bidi)}(this,function(t,e,i,r,n){"use strict";function o(t,e){function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function a(t){return"calc("+t+")"}function s(t){return t.match(/([A-Za-z%]+)$/)?t:t+"px"}var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},d=new e.InjectionToken("MAT_GRID_LIST"),h=function(){function t(t,e){this._element=t,this._gridList=e,this._rowspan=1,this._colspan=1}return Object.defineProperty(t.prototype,"rowspan",{get:function(){return this._rowspan},set:function(t){this._rowspan=Math.round(r.coerceNumberProperty(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colspan",{get:function(){return this._colspan},set:function(t){this._colspan=Math.round(r.coerceNumberProperty(t))},enumerable:!0,configurable:!0}),t.prototype._setStyle=function(t,e){this._element.nativeElement.style[t]=e},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile",exportAs:"matGridTile",host:{class:"mat-grid-tile"},template:'<figure class="mat-figure"><ng-content></ng-content></figure>',styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[d]}]}]},t.propDecorators={rowspan:[{type:e.Input}],colspan:[{type:e.Input}]},t}(),c=function(){function t(t){this._element=t}return t.prototype.ngAfterContentInit=function(){i.setLines(this._lines,this._element)},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile-header, mat-grid-tile-footer",template:'<ng-content select="[mat-grid-avatar], [matGridAvatar]"></ng-content><div class="mat-grid-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div><ng-content></ng-content>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={_lines:[{type:e.ContentChildren,args:[i.MatLine]}]},t}(),g=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-grid-avatar], [matGridAvatar]",host:{class:"mat-grid-avatar"}}]}],t}(),p=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-header",host:{class:"mat-grid-tile-header"}}]}],t}(),u=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-footer",host:{class:"mat-grid-tile-footer"}}]}],t}(),f=function(){function t(){this.columnIndex=0,this.rowIndex=0}return Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rowIndex+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowspan",{get:function(){var t=Math.max.apply(Math,this.tracker);return t>1?this.rowCount+t-1:this.rowCount},enumerable:!0,configurable:!0}),t.prototype.update=function(t,e){var i=this;this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(function(t){return i._trackTile(t)})},t.prototype._trackTile=function(t){var e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new m(this.rowIndex,e)},t.prototype._findMatchingGap=function(t){if(t>this.tracker.length)throw Error("mat-grid-list: tile with colspan "+t+' is wider than grid with cols="'+this.tracker.length+'".');var e=-1,i=-1;do{this.columnIndex+t>this.tracker.length?(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)):(e=this.tracker.indexOf(0,this.columnIndex),-1!=e?(i=this._findGapEndIndex(e),this.columnIndex=e+1):(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)))}while(i-e<t||0==i);return Math.max(e,0)},t.prototype._nextRow=function(){this.columnIndex=0,this.rowIndex++;for(var t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)},t.prototype._findGapEndIndex=function(t){for(var e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length},t.prototype._markTilePosition=function(t,e){for(var i=0;i<e.colspan;i++)this.tracker[t+i]=e.rowspan},t}(),m=function(){function t(t,e){this.row=t,this.col=e}return t}(),y=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/,_=function(){function t(){this._rows=0,this._rowspan=0}return t.prototype.init=function(t,e,i,r){this._gutterSize=s(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=i,this._direction=r},t.prototype.getBaseTileSize=function(t,e){return"("+t+"% - ("+this._gutterSize+" * "+e+"))"},t.prototype.getTilePosition=function(t,e){return 0===e?"0":a("("+t+" + "+this._gutterSize+") * "+e)},t.prototype.getTileSize=function(t,e){return"("+t+" * "+e+") + ("+(e-1)+" * "+this._gutterSize+")"},t.prototype.setStyle=function(t,e,i){var r=100/this._cols,n=(this._cols-1)/this._cols;this.setColStyles(t,i,r,n),this.setRowStyles(t,e,r,n)},t.prototype.setColStyles=function(t,e,i,r){var n=this.getBaseTileSize(i,r),o="rtl"===this._direction?"right":"left";t._setStyle(o,this.getTilePosition(n,e)),t._setStyle("width",a(this.getTileSize(n,t.colspan)))},t.prototype.getGutterSpan=function(){return this._gutterSize+" * ("+this._rowspan+" - 1)"},t.prototype.getTileSpan=function(t){return this._rowspan+" * "+this.getTileSize(t,1)},t.prototype.getComputedHeight=function(){return null},t}(),w=function(t){function e(e){var i=t.call(this)||this;return i.fixedRowHeight=e,i}return o(e,t),e.prototype.init=function(e,i,r,n){if(t.prototype.init.call(this,e,i,r,n),this.fixedRowHeight=s(this.fixedRowHeight),!y.test(this.fixedRowHeight))throw Error('Invalid value "'+this.fixedRowHeight+'" set as rowHeight.')},e.prototype.setRowStyles=function(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",a(this.getTileSize(this.fixedRowHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["height",a(this.getTileSpan(this.fixedRowHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["height",null]),t._tiles&&t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(_),x=function(t){function e(e){var i=t.call(this)||this;return i._parseRatio(e),i}return o(e,t),e.prototype.setRowStyles=function(t,e,i,r){var n=i/this.rowHeightRatio;this.baseTileHeight=this.getBaseTileSize(n,r),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("paddingTop",a(this.getTileSize(this.baseTileHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["paddingBottom",a(this.getTileSpan(this.baseTileHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(function(t){t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})},e.prototype._parseRatio=function(t){var e=t.split(":");if(2!==e.length)throw Error('mat-grid-list: invalid ratio given for row-height: "'+t+'"');this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])},e}(_),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.setRowStyles=function(t,e){var i=100/this._rowspan,r=(this._rows-1)/this._rows,n=this.getBaseTileSize(i,r);t._setStyle("top",this.getTilePosition(n,e)),t._setStyle("height",a(this.getTileSize(n,t.rowspan)))},e.prototype.reset=function(t){t._tiles&&t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(_),b=function(){function t(t,e){this._element=t,this._dir=e,this._gutter="1px"}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gutterSize",{get:function(){return this._gutter},set:function(t){this._gutter=""+(null==t?"":t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(t){var e=""+(null==t?"":t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._checkCols(),this._checkRowHeight()},t.prototype.ngAfterContentChecked=function(){this._layoutTiles()},t.prototype._checkCols=function(){if(!this.cols)throw Error('mat-grid-list: must pass in number of columns. Example: <mat-grid-list cols="3">')},t.prototype._checkRowHeight=function(){this._rowHeight||this._setTileStyler("1:1")},t.prototype._setTileStyler=function(t){this._tileStyler&&this._tileStyler.reset(this),"fit"===t?this._tileStyler=new S:t&&t.indexOf(":")>-1?this._tileStyler=new x(t):this._tileStyler=new w(t)},t.prototype._layoutTiles=function(){var t=this;this._tileCoordinator||(this._tileCoordinator=new f);var e=this._tileCoordinator,i=this._tiles.filter(function(e){return!e._gridList||e._gridList===t}),r=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,i),this._tileStyler.init(this.gutterSize,e,this.cols,r),i.forEach(function(i,r){var n=e.positions[r];t._tileStyler.setStyle(i,n.row,n.col)}),this._setListStyle(this._tileStyler.getComputedHeight())},t.prototype._setListStyle=function(t){t&&(this._element.nativeElement.style[t[0]]=t[1])},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-list",exportAs:"matGridList",template:"<div><ng-content></ng-content></div>",styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],host:{class:"mat-grid-list"},providers:[{provide:d,useExisting:t}],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_tiles:[{type:e.ContentChildren,args:[h,{descendants:!0}]}],cols:[{type:e.Input}],gutterSize:[{type:e.Input}],rowHeight:[{type:e.Input}]},t}(),v=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[i.MatLineModule,i.MatCommonModule],exports:[b,h,c,i.MatLineModule,i.MatCommonModule,p,u,g],declarations:[b,h,c,p,u,g]}]}],t}();t.MatGridListModule=v,t.MatGridList=b,t.MatGridTile=h,t.MatGridTileText=c,t.MatGridAvatarCssMatStyler=g,t.MatGridTileHeaderCssMatStyler=p,t.MatGridTileFooterCssMatStyler=u,t.ɵa7=d,Object.defineProperty(t,"__esModule",{value:!0})});
8
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/bidi")):"function"==typeof define&&define.amd?define("@angular/material/grid-list",["exports","@angular/core","@angular/material/core","@angular/cdk/coercion","@angular/cdk/bidi"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.gridList={}),t.ng.core,t.ng.material.core,t.ng.cdk.coercion,t.ng.cdk.bidi)}(this,function(t,e,i,r,n){"use strict";function o(t,e){function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function a(t){return"calc("+t+")"}function s(t){return t.match(/([A-Za-z%]+)$/)?t:t+"px"}var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},d=new e.InjectionToken("MAT_GRID_LIST"),h=function(){function t(t,e){this._element=t,this._gridList=e,this._rowspan=1,this._colspan=1}return Object.defineProperty(t.prototype,"rowspan",{get:function(){return this._rowspan},set:function(t){this._rowspan=Math.round(r.coerceNumberProperty(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colspan",{get:function(){return this._colspan},set:function(t){this._colspan=Math.round(r.coerceNumberProperty(t))},enumerable:!0,configurable:!0}),t.prototype._setStyle=function(t,e){this._element.nativeElement.style[t]=e},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile",exportAs:"matGridTile",host:{class:"mat-grid-tile"},template:'<figure class="mat-figure"><ng-content></ng-content></figure>',styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[d]}]}]},t.propDecorators={rowspan:[{type:e.Input}],colspan:[{type:e.Input}]},t}(),c=function(){function t(t){this._element=t}return t.prototype.ngAfterContentInit=function(){i.setLines(this._lines,this._element)},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile-header, mat-grid-tile-footer",template:'<ng-content select="[mat-grid-avatar], [matGridAvatar]"></ng-content><div class="mat-grid-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div><ng-content></ng-content>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={_lines:[{type:e.ContentChildren,args:[i.MatLine]}]},t}(),g=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-grid-avatar], [matGridAvatar]",host:{class:"mat-grid-avatar"}}]}],t}(),p=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-header",host:{class:"mat-grid-tile-header"}}]}],t}(),u=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-footer",host:{class:"mat-grid-tile-footer"}}]}],t}(),f=function(){function t(){this.columnIndex=0,this.rowIndex=0}return Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rowIndex+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowspan",{get:function(){var t=Math.max.apply(Math,this.tracker);return t>1?this.rowCount+t-1:this.rowCount},enumerable:!0,configurable:!0}),t.prototype.update=function(t,e){var i=this;this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(function(t){return i._trackTile(t)})},t.prototype._trackTile=function(t){var e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new m(this.rowIndex,e)},t.prototype._findMatchingGap=function(t){if(t>this.tracker.length)throw Error("mat-grid-list: tile with colspan "+t+' is wider than grid with cols="'+this.tracker.length+'".');var e=-1,i=-1;do{this.columnIndex+t>this.tracker.length?(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)):(e=this.tracker.indexOf(0,this.columnIndex),-1!=e?(i=this._findGapEndIndex(e),this.columnIndex=e+1):(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)))}while(i-e<t||0==i);return Math.max(e,0)},t.prototype._nextRow=function(){this.columnIndex=0,this.rowIndex++;for(var t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)},t.prototype._findGapEndIndex=function(t){for(var e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length},t.prototype._markTilePosition=function(t,e){for(var i=0;i<e.colspan;i++)this.tracker[t+i]=e.rowspan},t}(),m=function(){function t(t,e){this.row=t,this.col=e}return t}(),y=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/,_=function(){function t(){this._rows=0,this._rowspan=0}return t.prototype.init=function(t,e,i,r){this._gutterSize=s(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=i,this._direction=r},t.prototype.getBaseTileSize=function(t,e){return"("+t+"% - ("+this._gutterSize+" * "+e+"))"},t.prototype.getTilePosition=function(t,e){return 0===e?"0":a("("+t+" + "+this._gutterSize+") * "+e)},t.prototype.getTileSize=function(t,e){return"("+t+" * "+e+") + ("+(e-1)+" * "+this._gutterSize+")"},t.prototype.setStyle=function(t,e,i){var r=100/this._cols,n=(this._cols-1)/this._cols;this.setColStyles(t,i,r,n),this.setRowStyles(t,e,r,n)},t.prototype.setColStyles=function(t,e,i,r){var n=this.getBaseTileSize(i,r),o="rtl"===this._direction?"right":"left";t._setStyle(o,this.getTilePosition(n,e)),t._setStyle("width",a(this.getTileSize(n,t.colspan)))},t.prototype.getGutterSpan=function(){return this._gutterSize+" * ("+this._rowspan+" - 1)"},t.prototype.getTileSpan=function(t){return this._rowspan+" * "+this.getTileSize(t,1)},t.prototype.getComputedHeight=function(){return null},t}(),w=function(t){function e(e){var i=t.call(this)||this;return i.fixedRowHeight=e,i}return o(e,t),e.prototype.init=function(e,i,r,n){if(t.prototype.init.call(this,e,i,r,n),this.fixedRowHeight=s(this.fixedRowHeight),!y.test(this.fixedRowHeight))throw Error('Invalid value "'+this.fixedRowHeight+'" set as rowHeight.')},e.prototype.setRowStyles=function(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",a(this.getTileSize(this.fixedRowHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["height",a(this.getTileSpan(this.fixedRowHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["height",null]),t._tiles&&t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(_),x=function(t){function e(e){var i=t.call(this)||this;return i._parseRatio(e),i}return o(e,t),e.prototype.setRowStyles=function(t,e,i,r){var n=i/this.rowHeightRatio;this.baseTileHeight=this.getBaseTileSize(n,r),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("paddingTop",a(this.getTileSize(this.baseTileHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["paddingBottom",a(this.getTileSpan(this.baseTileHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(function(t){t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})},e.prototype._parseRatio=function(t){var e=t.split(":");if(2!==e.length)throw Error('mat-grid-list: invalid ratio given for row-height: "'+t+'"');this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])},e}(_),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.setRowStyles=function(t,e){var i=100/this._rowspan,r=(this._rows-1)/this._rows,n=this.getBaseTileSize(i,r);t._setStyle("top",this.getTilePosition(n,e)),t._setStyle("height",a(this.getTileSize(n,t.rowspan)))},e.prototype.reset=function(t){t._tiles&&t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(_),b=function(){function t(t,e){this._element=t,this._dir=e,this._gutter="1px"}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gutterSize",{get:function(){return this._gutter},set:function(t){this._gutter=""+(null==t?"":t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(t){var e=""+(null==t?"":t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._checkCols(),this._checkRowHeight()},t.prototype.ngAfterContentChecked=function(){this._layoutTiles()},t.prototype._checkCols=function(){if(!this.cols)throw Error('mat-grid-list: must pass in number of columns. Example: <mat-grid-list cols="3">')},t.prototype._checkRowHeight=function(){this._rowHeight||this._setTileStyler("1:1")},t.prototype._setTileStyler=function(t){this._tileStyler&&this._tileStyler.reset(this),"fit"===t?this._tileStyler=new S:t&&t.indexOf(":")>-1?this._tileStyler=new x(t):this._tileStyler=new w(t)},t.prototype._layoutTiles=function(){var t=this;this._tileCoordinator||(this._tileCoordinator=new f);var e=this._tileCoordinator,i=this._tiles.filter(function(e){return!e._gridList||e._gridList===t}),r=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,i),this._tileStyler.init(this.gutterSize,e,this.cols,r),i.forEach(function(i,r){var n=e.positions[r];t._tileStyler.setStyle(i,n.row,n.col)}),this._setListStyle(this._tileStyler.getComputedHeight())},t.prototype._setListStyle=function(t){t&&(this._element.nativeElement.style[t[0]]=t[1])},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-list",exportAs:"matGridList",template:"<div><ng-content></ng-content></div>",styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],host:{class:"mat-grid-list"},providers:[{provide:d,useExisting:t}],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:n.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_tiles:[{type:e.ContentChildren,args:[h,{descendants:!0}]}],cols:[{type:e.Input}],gutterSize:[{type:e.Input}],rowHeight:[{type:e.Input}]},t}(),v=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[i.MatLineModule,i.MatCommonModule],exports:[b,h,c,i.MatLineModule,i.MatCommonModule,p,u,g],declarations:[b,h,c,p,u,g]}]}],t}();t.MatGridListModule=v,t.MatGridList=b,t.MatGridTile=h,t.MatGridTileText=c,t.MatGridAvatarCssMatStyler=g,t.MatGridTileHeaderCssMatStyler=p,t.MatGridTileFooterCssMatStyler=u,t.ɵa11=d,Object.defineProperty(t,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=material-grid-list.umd.min.js.map
@@ -2070,9 +2070,9 @@ exports.matMenuAnimations = matMenuAnimations;
2070
2070
  exports.fadeInItems = fadeInItems;
2071
2071
  exports.transformMenu = transformMenu;
2072
2072
  exports.MatMenuContent = MatMenuContent;
2073
- exports.ɵa24 = MAT_MENU_DEFAULT_OPTIONS_FACTORY;
2074
- exports.ɵb24 = MAT_MENU_SCROLL_STRATEGY_FACTORY;
2075
- exports.ɵc24 = MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER;
2073
+ exports.ɵa22 = MAT_MENU_DEFAULT_OPTIONS_FACTORY;
2074
+ exports.ɵb22 = MAT_MENU_SCROLL_STRATEGY_FACTORY;
2075
+ exports.ɵc22 = MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER;
2076
2076
 
2077
2077
  Object.defineProperty(exports, '__esModule', { value: true });
2078
2078
 
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/cdk/portal"),require("@angular/common"),require("@angular/core"),require("rxjs"),require("@angular/cdk/a11y"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("@angular/cdk/bidi"),require("@angular/cdk/overlay"),require("@angular/cdk/platform")):"function"==typeof define&&define.amd?define("@angular/material/menu",["exports","@angular/animations","@angular/cdk/portal","@angular/common","@angular/core","rxjs","@angular/cdk/a11y","@angular/material/core","@angular/cdk/coercion","@angular/cdk/keycodes","rxjs/operators","@angular/cdk/bidi","@angular/cdk/overlay","@angular/cdk/platform"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.menu={}),e.ng.animations,e.ng.cdk.portal,e.ng.common,e.ng.core,e.rxjs,e.ng.cdk.a11y,e.ng.material.core,e.ng.cdk.coercion,e.ng.cdk.keycodes,e.rxjs.operators,e.ng.cdk.bidi,e.ng.cdk.overlay,e.ng.cdk.platform)}(this,function(e,t,n,i,o,r,s,a,u,c,p,l,m,h){"use strict";function d(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(){throw Error('matMenuTriggerFor: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}function g(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <mat-menu xPosition="before" #menu="matMenu"></mat-menu>')}function _(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <mat-menu yPosition="above" #menu="matMenu"></mat-menu>')}function y(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}function b(e){return function(){return e.scrollStrategies.reposition()}}var v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},M={transformMenu:t.trigger("transformMenu",[t.state("void",t.style({opacity:0,transform:"scale(0.8)"})),t.transition("void => enter",t.group([t.query(".mat-menu-content, .mat-mdc-menu-content",t.animate("100ms linear",t.style({opacity:1}))),t.animate("120ms cubic-bezier(0, 0, 0.2, 1)",t.style({transform:"scale(1)"}))])),t.transition("* => void",t.animate("100ms 25ms linear",t.style({opacity:0})))]),fadeInItems:t.trigger("fadeInItems",[t.state("showing",t.style({opacity:1})),t.transition("void => *",[t.style({opacity:0}),t.animate("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},k=M.fadeInItems,O=M.transformMenu,I=function(){function e(e,t,n,i,o,s,a){this._template=e,this._componentFactoryResolver=t,this._appRef=n,this._injector=i,this._viewContainerRef=o,this._document=s,this._changeDetectorRef=a,this._attached=new r.Subject}return e.prototype.attach=function(e){void 0===e&&(e={}),this._portal||(this._portal=new n.TemplatePortal(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new n.DomPortalOutlet(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()},e.prototype.detach=function(){this._portal.isAttached&&this._portal.detach()},e.prototype.ngOnDestroy=function(){this._outlet&&this._outlet.dispose()},e.decorators=[{type:o.Directive,args:[{selector:"ng-template[matMenuContent]"}]}],e.ctorParameters=function(){return[{type:o.TemplateRef},{type:o.ComponentFactoryResolver},{type:o.ApplicationRef},{type:o.Injector},{type:o.ViewContainerRef},{type:void 0,decorators:[{type:o.Inject,args:[i.DOCUMENT]}]},{type:o.ChangeDetectorRef}]},e}(),C=new o.InjectionToken("MAT_MENU_PANEL"),P=function(){function e(){}return e}(),E=a.mixinDisableRipple(a.mixinDisabled(P)),x=function(e){function t(t,n,i,o){var s=e.call(this)||this;return s._elementRef=t,s._focusMonitor=i,s._parentMenu=o,s.role="menuitem",s._hovered=new r.Subject,s._highlighted=!1,s._triggersSubmenu=!1,i&&i.monitor(s._elementRef,!1),o&&o.addItem&&o.addItem(s),s._document=n,s}return d(t,e),t.prototype.focus=function(e,t){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t)},t.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t.prototype._checkDisabled=function(e){this.disabled&&(e.preventDefault(),e.stopPropagation())},t.prototype._handleMouseEnter=function(){this._hovered.next(this)},t.prototype.getLabel=function(){var e=this._elementRef.nativeElement,t=this._document?this._document.TEXT_NODE:3,n="";if(e.childNodes)for(var i=e.childNodes.length,o=0;o<i;o++)e.childNodes[o].nodeType===t&&(n+=e.childNodes[o].textContent);return n.trim()},t.decorators=[{type:o.Component,args:[{selector:"[mat-menu-item]",exportAs:"matMenuItem",inputs:["disabled","disableRipple"],host:{"[attr.role]":"role",class:"mat-menu-item","[class.mat-menu-item-highlighted]":"_highlighted","[class.mat-menu-item-submenu-trigger]":"_triggersSubmenu","[attr.tabindex]":"_getTabIndex()","[attr.aria-disabled]":"disabled.toString()","[attr.disabled]":"disabled || null"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,template:'<ng-content></ng-content><div class="mat-menu-ripple" matRipple [matRippleDisabled]="disableRipple || disabled" [matRippleTrigger]="_getHostElement()"></div>'}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:void 0,decorators:[{type:o.Inject,args:[i.DOCUMENT]}]},{type:s.FocusMonitor},{type:void 0,decorators:[{type:o.Inject,args:[C]},{type:o.Optional}]}]},t.propDecorators={role:[{type:o.Input}],_checkDisabled:[{type:o.HostListener,args:["click",["$event"]]}],_handleMouseEnter:[{type:o.HostListener,args:["mouseenter"]}]},t}(E),w=new o.InjectionToken("mat-menu-default-options",{providedIn:"root",factory:y}),R=function(){function e(e,t,n){this._elementRef=e,this._ngZone=t,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.QueryList,this._tabSubscription=r.Subscription.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new r.Subject,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.EventEmitter,this.close=this.closed}return Object.defineProperty(e.prototype,"xPosition",{get:function(){return this._xPosition},set:function(e){"before"!==e&&"after"!==e&&g(),this._xPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yPosition",{get:function(){return this._yPosition},set:function(e){"above"!==e&&"below"!==e&&_(),this._yPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(e){this._overlapTrigger=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"panelClass",{set:function(e){var t=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(function(e){t._classList[e]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(function(e){t._classList[e]=!0}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.panelClass},set:function(e){this.panelClass=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setPositionClasses()},e.prototype.ngAfterContentInit=function(){var e=this;this._updateDirectDescendants(),this._keyManager=new s.FocusKeyManager(this._directDescendantItems).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return e.closed.emit("tab")})},e.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},e.prototype._hovered=function(){return this._directDescendantItems.changes.pipe(p.startWith(this._directDescendantItems),p.switchMap(function(e){return r.merge.apply(void 0,e.map(function(e){return e._hovered}))}))},e.prototype.addItem=function(e){},e.prototype.removeItem=function(e){},e.prototype._handleKeydown=function(e){var t=e.keyCode,n=this._keyManager;switch(t){case c.ESCAPE:c.hasModifierKey(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case c.LEFT_ARROW:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case c.RIGHT_ARROW:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case c.HOME:case c.END:c.hasModifierKey(e)||(t===c.HOME?n.setFirstItemActive():n.setLastItemActive(),e.preventDefault());break;default:t!==c.UP_ARROW&&t!==c.DOWN_ARROW||n.setFocusOrigin("keyboard"),n.onKeydown(e)}},e.prototype.focusFirstItem=function(e){void 0===e&&(e="program");var t=this._keyManager;if(this.lazyContent?this._ngZone.onStable.asObservable().pipe(p.take(1)).subscribe(function(){return t.setFocusOrigin(e).setFirstItemActive()}):t.setFocusOrigin(e).setFirstItemActive(),!t.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}},e.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},e.prototype.setElevation=function(e){var t="mat-elevation-z"+(4+e),n=Object.keys(this._classList).find(function(e){return e.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[t]=!0,this._previousElevation=t)},e.prototype.setPositionClasses=function(e,t){void 0===e&&(e=this.xPosition),void 0===t&&(t=this.yPosition);var n=this._classList;n["mat-menu-before"]="before"===e,n["mat-menu-after"]="after"===e,n["mat-menu-above"]="above"===t,n["mat-menu-below"]="below"===t},e.prototype._startAnimation=function(){this._panelAnimationState="enter"},e.prototype._resetAnimation=function(){this._panelAnimationState="void"},e.prototype._onAnimationDone=function(e){this._animationDone.next(e),this._isAnimating=!1},e.prototype._onAnimationStart=function(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)},e.prototype._updateDirectDescendants=function(){var e=this;this._allItems.changes.pipe(p.startWith(this._allItems)).subscribe(function(t){e._directDescendantItems.reset(t.filter(function(t){return t._parentMenu===e})),e._directDescendantItems.notifyOnChanges()})},e.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:void 0,decorators:[{type:o.Inject,args:[w]}]}]},e.propDecorators={_allItems:[{type:o.ContentChildren,args:[x,{descendants:!0}]}],backdropClass:[{type:o.Input}],xPosition:[{type:o.Input}],yPosition:[{type:o.Input}],templateRef:[{type:o.ViewChild,args:[o.TemplateRef,{static:!1}]}],items:[{type:o.ContentChildren,args:[x]}],lazyContent:[{type:o.ContentChild,args:[I,{static:!1}]}],overlapTrigger:[{type:o.Input}],hasBackdrop:[{type:o.Input}],panelClass:[{type:o.Input,args:["class"]}],classList:[{type:o.Input}],closed:[{type:o.Output}],close:[{type:o.Output}]},e}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(R),T=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return d(t,e),t.decorators=[{type:o.Component,args:[{selector:"mat-menu",template:'<ng-template><div class="mat-menu-panel" [ngClass]="_classList" (keydown)="_handleKeydown($event)" (click)="closed.emit(\'click\')" [@transformMenu]="_panelAnimationState" (@transformMenu.start)="_onAnimationStart($event)" (@transformMenu.done)="_onAnimationDone($event)" tabindex="-1" role="menu"><div class="mat-menu-content"><ng-content></ng-content></div></div></ng-template>',styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,exportAs:"matMenu",animations:[M.transformMenu,M.fadeInItems],providers:[{provide:C,useExisting:S},{provide:S,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:void 0,decorators:[{type:o.Inject,args:[w]}]}]},t}(S),D=new o.InjectionToken("mat-menu-scroll-strategy"),A={provide:D,deps:[m.Overlay],useFactory:b},j=h.normalizePassiveListenerOptions({passive:!0}),F=function(){function e(e,t,n,i,s,a,u,c){var p=this;this._overlay=e,this._element=t,this._viewContainerRef=n,this._parentMenu=s,this._menuItemInstance=a,this._dir=u,this._focusMonitor=c,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=r.Subscription.EMPTY,this._hoverSubscription=r.Subscription.EMPTY,this._menuCloseSubscription=r.Subscription.EMPTY,this._handleTouchStart=function(){return p._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new o.EventEmitter,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.EventEmitter,this.onMenuClose=this.menuClosed,t.nativeElement.addEventListener("touchstart",this._handleTouchStart,j),a&&(a._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=i}return Object.defineProperty(e.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(e){this.menu=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menu",{get:function(){return this._menu},set:function(e){var t=this;e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.asObservable().subscribe(function(e){t._destroyMenu(),"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)})))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},e.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,j),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},Object.defineProperty(e.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),e.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},e.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},e.prototype.openMenu=function(){var e=this;if(!this._menuOpen){this._checkMenu();var t=this._createOverlay(),n=t.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(function(){return e.closeMenu()}),this._initMenu(),this.menu instanceof S&&this.menu._startAnimation()}},e.prototype.closeMenu=function(){this.menu.close.emit()},e.prototype.focus=function(e,t){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)},e.prototype._destroyMenu=function(){var e=this;if(this._overlayRef&&this.menuOpen){var t=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),t instanceof S?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(p.filter(function(e){return"void"===e.toState}),p.take(1),p.takeUntil(t.lazyContent._attached)).subscribe({next:function(){return t.lazyContent.detach()},complete:function(){return e._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),t.lazyContent&&t.lazyContent.detach()),this._restoreFocus()}},e.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")},e.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var e=0,t=this.menu.parentMenu;t;)e++,t=t.parentMenu;this.menu.setElevation(e)}},e.prototype._restoreFocus=function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null},e.prototype._setIsMenuOpen=function(e){this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=e)},e.prototype._checkMenu=function(){this.menu||f()},e.prototype._createOverlay=function(){if(!this._overlayRef){var e=this._getOverlayConfig();this._subscribeToPositions(e.positionStrategy),this._overlayRef=this._overlay.create(e),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef},e.prototype._getOverlayConfig=function(){return new m.OverlayConfig({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},e.prototype._subscribeToPositions=function(e){var t=this;this.menu.setPositionClasses&&e.positionChanges.subscribe(function(e){var n="start"===e.connectionPair.overlayX?"after":"before",i="top"===e.connectionPair.overlayY?"below":"above";t.menu.setPositionClasses(n,i)})},e.prototype._setPosition=function(e){var t="before"===this.menu.xPosition?["end","start"]:["start","end"],n=t[0],i=t[1],o="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],r=o[0],s=o[1],a=[r,s],u=a[0],c=a[1],p=[n,i],l=p[0],m=p[1],h=0;this.triggersSubmenu()?(m=n="before"===this.menu.xPosition?"start":"end",i=l="end"===n?"start":"end",h="bottom"===r?8:-8):this.menu.overlapTrigger||(u="top"===r?"bottom":"top",c="top"===s?"bottom":"top"),e.withPositions([{originX:n,originY:u,overlayX:l,overlayY:r,offsetY:h},{originX:i,originY:u,overlayX:m,overlayY:r,offsetY:h},{originX:n,originY:c,overlayX:l,overlayY:s,offsetY:-h},{originX:i,originY:c,overlayX:m,overlayY:s,offsetY:-h}])},e.prototype._menuClosingActions=function(){var e=this,t=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:r.of(),o=this._parentMenu?this._parentMenu._hovered().pipe(p.filter(function(t){return t!==e._menuItemInstance}),p.filter(function(){return e._menuOpen})):r.of();return r.merge(t,i,o,n)},e.prototype._handleMousedown=function(e){s.isFakeMousedownFromScreenReader(e)||(this._openedBy=0===e.button?"mouse":null,this.triggersSubmenu()&&e.preventDefault())},e.prototype._handleKeydown=function(e){var t=e.keyCode;this.triggersSubmenu()&&(t===c.RIGHT_ARROW&&"ltr"===this.dir||t===c.LEFT_ARROW&&"rtl"===this.dir)&&this.openMenu()},e.prototype._handleClick=function(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()},e.prototype._handleHover=function(){var e=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(p.filter(function(t){return t===e._menuItemInstance&&!t.disabled}),p.delay(0,r.asapScheduler)).subscribe(function(){e._openedBy="mouse",e.menu instanceof S&&e.menu._isAnimating?e.menu._animationDone.pipe(p.take(1),p.delay(0,r.asapScheduler),p.takeUntil(e._parentMenu._hovered())).subscribe(function(){return e.openMenu()}):e.openMenu()}))},e.prototype._getPortal=function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new n.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._portal},e.decorators=[{type:o.Directive,args:[{selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",host:{class:"mat-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"menuOpen || null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"},exportAs:"matMenuTrigger"}]}],e.ctorParameters=function(){return[{type:m.Overlay},{type:o.ElementRef},{type:o.ViewContainerRef},{type:void 0,decorators:[{type:o.Inject,args:[D]}]},{type:S,decorators:[{type:o.Optional}]},{type:x,decorators:[{type:o.Optional},{type:o.Self}]},{type:l.Directionality,decorators:[{type:o.Optional}]},{type:s.FocusMonitor}]},e.propDecorators={_deprecatedMatMenuTriggerFor:[{type:o.Input,args:["mat-menu-trigger-for"]}],menu:[{type:o.Input,args:["matMenuTriggerFor"]}],menuData:[{type:o.Input,args:["matMenuTriggerData"]}],restoreFocus:[{type:o.Input,args:["matMenuTriggerRestoreFocus"]}],menuOpened:[{type:o.Output}],onMenuOpen:[{type:o.Output}],menuClosed:[{type:o.Output}],onMenuClose:[{type:o.Output}]},e}(),L=function(){function e(){}return e.decorators=[{type:o.NgModule,args:[{exports:[F,I,a.MatCommonModule],declarations:[F,I],providers:[A]}]}],e}(),N=function(){function e(){}return e.decorators=[{type:o.NgModule,args:[{imports:[i.CommonModule,a.MatCommonModule,a.MatRippleModule,m.OverlayModule,L],exports:[T,x,L],declarations:[T,x],providers:[A]}]}],e}();e.MatMenu=S,e.MAT_MENU_DEFAULT_OPTIONS=w,e._MatMenu=T,e._MatMenuBase=R,e.MatMenuItem=x,e.MatMenuTrigger=F,e.MAT_MENU_SCROLL_STRATEGY=D,e.MAT_MENU_PANEL=C,e._MatMenuDirectivesModule=L,e.MatMenuModule=N,e.matMenuAnimations=M,e.fadeInItems=k,e.transformMenu=O,e.MatMenuContent=I,e.ɵa24=y,e.ɵb24=b,e.ɵc24=A,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/cdk/portal"),require("@angular/common"),require("@angular/core"),require("rxjs"),require("@angular/cdk/a11y"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("@angular/cdk/bidi"),require("@angular/cdk/overlay"),require("@angular/cdk/platform")):"function"==typeof define&&define.amd?define("@angular/material/menu",["exports","@angular/animations","@angular/cdk/portal","@angular/common","@angular/core","rxjs","@angular/cdk/a11y","@angular/material/core","@angular/cdk/coercion","@angular/cdk/keycodes","rxjs/operators","@angular/cdk/bidi","@angular/cdk/overlay","@angular/cdk/platform"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.menu={}),e.ng.animations,e.ng.cdk.portal,e.ng.common,e.ng.core,e.rxjs,e.ng.cdk.a11y,e.ng.material.core,e.ng.cdk.coercion,e.ng.cdk.keycodes,e.rxjs.operators,e.ng.cdk.bidi,e.ng.cdk.overlay,e.ng.cdk.platform)}(this,function(e,t,n,i,o,r,s,a,u,c,p,l,m,h){"use strict";function d(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(){throw Error('matMenuTriggerFor: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}function g(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <mat-menu xPosition="before" #menu="matMenu"></mat-menu>')}function _(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <mat-menu yPosition="above" #menu="matMenu"></mat-menu>')}function y(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}function b(e){return function(){return e.scrollStrategies.reposition()}}var v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},M={transformMenu:t.trigger("transformMenu",[t.state("void",t.style({opacity:0,transform:"scale(0.8)"})),t.transition("void => enter",t.group([t.query(".mat-menu-content, .mat-mdc-menu-content",t.animate("100ms linear",t.style({opacity:1}))),t.animate("120ms cubic-bezier(0, 0, 0.2, 1)",t.style({transform:"scale(1)"}))])),t.transition("* => void",t.animate("100ms 25ms linear",t.style({opacity:0})))]),fadeInItems:t.trigger("fadeInItems",[t.state("showing",t.style({opacity:1})),t.transition("void => *",[t.style({opacity:0}),t.animate("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},k=M.fadeInItems,O=M.transformMenu,I=function(){function e(e,t,n,i,o,s,a){this._template=e,this._componentFactoryResolver=t,this._appRef=n,this._injector=i,this._viewContainerRef=o,this._document=s,this._changeDetectorRef=a,this._attached=new r.Subject}return e.prototype.attach=function(e){void 0===e&&(e={}),this._portal||(this._portal=new n.TemplatePortal(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new n.DomPortalOutlet(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()},e.prototype.detach=function(){this._portal.isAttached&&this._portal.detach()},e.prototype.ngOnDestroy=function(){this._outlet&&this._outlet.dispose()},e.decorators=[{type:o.Directive,args:[{selector:"ng-template[matMenuContent]"}]}],e.ctorParameters=function(){return[{type:o.TemplateRef},{type:o.ComponentFactoryResolver},{type:o.ApplicationRef},{type:o.Injector},{type:o.ViewContainerRef},{type:void 0,decorators:[{type:o.Inject,args:[i.DOCUMENT]}]},{type:o.ChangeDetectorRef}]},e}(),C=new o.InjectionToken("MAT_MENU_PANEL"),P=function(){function e(){}return e}(),E=a.mixinDisableRipple(a.mixinDisabled(P)),x=function(e){function t(t,n,i,o){var s=e.call(this)||this;return s._elementRef=t,s._focusMonitor=i,s._parentMenu=o,s.role="menuitem",s._hovered=new r.Subject,s._highlighted=!1,s._triggersSubmenu=!1,i&&i.monitor(s._elementRef,!1),o&&o.addItem&&o.addItem(s),s._document=n,s}return d(t,e),t.prototype.focus=function(e,t){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t)},t.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t.prototype._checkDisabled=function(e){this.disabled&&(e.preventDefault(),e.stopPropagation())},t.prototype._handleMouseEnter=function(){this._hovered.next(this)},t.prototype.getLabel=function(){var e=this._elementRef.nativeElement,t=this._document?this._document.TEXT_NODE:3,n="";if(e.childNodes)for(var i=e.childNodes.length,o=0;o<i;o++)e.childNodes[o].nodeType===t&&(n+=e.childNodes[o].textContent);return n.trim()},t.decorators=[{type:o.Component,args:[{selector:"[mat-menu-item]",exportAs:"matMenuItem",inputs:["disabled","disableRipple"],host:{"[attr.role]":"role",class:"mat-menu-item","[class.mat-menu-item-highlighted]":"_highlighted","[class.mat-menu-item-submenu-trigger]":"_triggersSubmenu","[attr.tabindex]":"_getTabIndex()","[attr.aria-disabled]":"disabled.toString()","[attr.disabled]":"disabled || null"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,template:'<ng-content></ng-content><div class="mat-menu-ripple" matRipple [matRippleDisabled]="disableRipple || disabled" [matRippleTrigger]="_getHostElement()"></div>'}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:void 0,decorators:[{type:o.Inject,args:[i.DOCUMENT]}]},{type:s.FocusMonitor},{type:void 0,decorators:[{type:o.Inject,args:[C]},{type:o.Optional}]}]},t.propDecorators={role:[{type:o.Input}],_checkDisabled:[{type:o.HostListener,args:["click",["$event"]]}],_handleMouseEnter:[{type:o.HostListener,args:["mouseenter"]}]},t}(E),w=new o.InjectionToken("mat-menu-default-options",{providedIn:"root",factory:y}),R=function(){function e(e,t,n){this._elementRef=e,this._ngZone=t,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.QueryList,this._tabSubscription=r.Subscription.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new r.Subject,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.EventEmitter,this.close=this.closed}return Object.defineProperty(e.prototype,"xPosition",{get:function(){return this._xPosition},set:function(e){"before"!==e&&"after"!==e&&g(),this._xPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yPosition",{get:function(){return this._yPosition},set:function(e){"above"!==e&&"below"!==e&&_(),this._yPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(e){this._overlapTrigger=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"panelClass",{set:function(e){var t=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(function(e){t._classList[e]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(function(e){t._classList[e]=!0}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.panelClass},set:function(e){this.panelClass=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setPositionClasses()},e.prototype.ngAfterContentInit=function(){var e=this;this._updateDirectDescendants(),this._keyManager=new s.FocusKeyManager(this._directDescendantItems).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return e.closed.emit("tab")})},e.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},e.prototype._hovered=function(){return this._directDescendantItems.changes.pipe(p.startWith(this._directDescendantItems),p.switchMap(function(e){return r.merge.apply(void 0,e.map(function(e){return e._hovered}))}))},e.prototype.addItem=function(e){},e.prototype.removeItem=function(e){},e.prototype._handleKeydown=function(e){var t=e.keyCode,n=this._keyManager;switch(t){case c.ESCAPE:c.hasModifierKey(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case c.LEFT_ARROW:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case c.RIGHT_ARROW:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case c.HOME:case c.END:c.hasModifierKey(e)||(t===c.HOME?n.setFirstItemActive():n.setLastItemActive(),e.preventDefault());break;default:t!==c.UP_ARROW&&t!==c.DOWN_ARROW||n.setFocusOrigin("keyboard"),n.onKeydown(e)}},e.prototype.focusFirstItem=function(e){void 0===e&&(e="program");var t=this._keyManager;if(this.lazyContent?this._ngZone.onStable.asObservable().pipe(p.take(1)).subscribe(function(){return t.setFocusOrigin(e).setFirstItemActive()}):t.setFocusOrigin(e).setFirstItemActive(),!t.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}},e.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},e.prototype.setElevation=function(e){var t="mat-elevation-z"+(4+e),n=Object.keys(this._classList).find(function(e){return e.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[t]=!0,this._previousElevation=t)},e.prototype.setPositionClasses=function(e,t){void 0===e&&(e=this.xPosition),void 0===t&&(t=this.yPosition);var n=this._classList;n["mat-menu-before"]="before"===e,n["mat-menu-after"]="after"===e,n["mat-menu-above"]="above"===t,n["mat-menu-below"]="below"===t},e.prototype._startAnimation=function(){this._panelAnimationState="enter"},e.prototype._resetAnimation=function(){this._panelAnimationState="void"},e.prototype._onAnimationDone=function(e){this._animationDone.next(e),this._isAnimating=!1},e.prototype._onAnimationStart=function(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)},e.prototype._updateDirectDescendants=function(){var e=this;this._allItems.changes.pipe(p.startWith(this._allItems)).subscribe(function(t){e._directDescendantItems.reset(t.filter(function(t){return t._parentMenu===e})),e._directDescendantItems.notifyOnChanges()})},e.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:void 0,decorators:[{type:o.Inject,args:[w]}]}]},e.propDecorators={_allItems:[{type:o.ContentChildren,args:[x,{descendants:!0}]}],backdropClass:[{type:o.Input}],xPosition:[{type:o.Input}],yPosition:[{type:o.Input}],templateRef:[{type:o.ViewChild,args:[o.TemplateRef,{static:!1}]}],items:[{type:o.ContentChildren,args:[x]}],lazyContent:[{type:o.ContentChild,args:[I,{static:!1}]}],overlapTrigger:[{type:o.Input}],hasBackdrop:[{type:o.Input}],panelClass:[{type:o.Input,args:["class"]}],classList:[{type:o.Input}],closed:[{type:o.Output}],close:[{type:o.Output}]},e}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(R),T=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return d(t,e),t.decorators=[{type:o.Component,args:[{selector:"mat-menu",template:'<ng-template><div class="mat-menu-panel" [ngClass]="_classList" (keydown)="_handleKeydown($event)" (click)="closed.emit(\'click\')" [@transformMenu]="_panelAnimationState" (@transformMenu.start)="_onAnimationStart($event)" (@transformMenu.done)="_onAnimationDone($event)" tabindex="-1" role="menu"><div class="mat-menu-content"><ng-content></ng-content></div></div></ng-template>',styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,exportAs:"matMenu",animations:[M.transformMenu,M.fadeInItems],providers:[{provide:C,useExisting:S},{provide:S,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:void 0,decorators:[{type:o.Inject,args:[w]}]}]},t}(S),D=new o.InjectionToken("mat-menu-scroll-strategy"),A={provide:D,deps:[m.Overlay],useFactory:b},j=h.normalizePassiveListenerOptions({passive:!0}),F=function(){function e(e,t,n,i,s,a,u,c){var p=this;this._overlay=e,this._element=t,this._viewContainerRef=n,this._parentMenu=s,this._menuItemInstance=a,this._dir=u,this._focusMonitor=c,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=r.Subscription.EMPTY,this._hoverSubscription=r.Subscription.EMPTY,this._menuCloseSubscription=r.Subscription.EMPTY,this._handleTouchStart=function(){return p._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new o.EventEmitter,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.EventEmitter,this.onMenuClose=this.menuClosed,t.nativeElement.addEventListener("touchstart",this._handleTouchStart,j),a&&(a._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=i}return Object.defineProperty(e.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(e){this.menu=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menu",{get:function(){return this._menu},set:function(e){var t=this;e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.asObservable().subscribe(function(e){t._destroyMenu(),"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)})))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},e.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,j),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},Object.defineProperty(e.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),e.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},e.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},e.prototype.openMenu=function(){var e=this;if(!this._menuOpen){this._checkMenu();var t=this._createOverlay(),n=t.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(function(){return e.closeMenu()}),this._initMenu(),this.menu instanceof S&&this.menu._startAnimation()}},e.prototype.closeMenu=function(){this.menu.close.emit()},e.prototype.focus=function(e,t){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)},e.prototype._destroyMenu=function(){var e=this;if(this._overlayRef&&this.menuOpen){var t=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),t instanceof S?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(p.filter(function(e){return"void"===e.toState}),p.take(1),p.takeUntil(t.lazyContent._attached)).subscribe({next:function(){return t.lazyContent.detach()},complete:function(){return e._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),t.lazyContent&&t.lazyContent.detach()),this._restoreFocus()}},e.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")},e.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var e=0,t=this.menu.parentMenu;t;)e++,t=t.parentMenu;this.menu.setElevation(e)}},e.prototype._restoreFocus=function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null},e.prototype._setIsMenuOpen=function(e){this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=e)},e.prototype._checkMenu=function(){this.menu||f()},e.prototype._createOverlay=function(){if(!this._overlayRef){var e=this._getOverlayConfig();this._subscribeToPositions(e.positionStrategy),this._overlayRef=this._overlay.create(e),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef},e.prototype._getOverlayConfig=function(){return new m.OverlayConfig({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},e.prototype._subscribeToPositions=function(e){var t=this;this.menu.setPositionClasses&&e.positionChanges.subscribe(function(e){var n="start"===e.connectionPair.overlayX?"after":"before",i="top"===e.connectionPair.overlayY?"below":"above";t.menu.setPositionClasses(n,i)})},e.prototype._setPosition=function(e){var t="before"===this.menu.xPosition?["end","start"]:["start","end"],n=t[0],i=t[1],o="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],r=o[0],s=o[1],a=[r,s],u=a[0],c=a[1],p=[n,i],l=p[0],m=p[1],h=0;this.triggersSubmenu()?(m=n="before"===this.menu.xPosition?"start":"end",i=l="end"===n?"start":"end",h="bottom"===r?8:-8):this.menu.overlapTrigger||(u="top"===r?"bottom":"top",c="top"===s?"bottom":"top"),e.withPositions([{originX:n,originY:u,overlayX:l,overlayY:r,offsetY:h},{originX:i,originY:u,overlayX:m,overlayY:r,offsetY:h},{originX:n,originY:c,overlayX:l,overlayY:s,offsetY:-h},{originX:i,originY:c,overlayX:m,overlayY:s,offsetY:-h}])},e.prototype._menuClosingActions=function(){var e=this,t=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:r.of(),o=this._parentMenu?this._parentMenu._hovered().pipe(p.filter(function(t){return t!==e._menuItemInstance}),p.filter(function(){return e._menuOpen})):r.of();return r.merge(t,i,o,n)},e.prototype._handleMousedown=function(e){s.isFakeMousedownFromScreenReader(e)||(this._openedBy=0===e.button?"mouse":null,this.triggersSubmenu()&&e.preventDefault())},e.prototype._handleKeydown=function(e){var t=e.keyCode;this.triggersSubmenu()&&(t===c.RIGHT_ARROW&&"ltr"===this.dir||t===c.LEFT_ARROW&&"rtl"===this.dir)&&this.openMenu()},e.prototype._handleClick=function(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()},e.prototype._handleHover=function(){var e=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(p.filter(function(t){return t===e._menuItemInstance&&!t.disabled}),p.delay(0,r.asapScheduler)).subscribe(function(){e._openedBy="mouse",e.menu instanceof S&&e.menu._isAnimating?e.menu._animationDone.pipe(p.take(1),p.delay(0,r.asapScheduler),p.takeUntil(e._parentMenu._hovered())).subscribe(function(){return e.openMenu()}):e.openMenu()}))},e.prototype._getPortal=function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new n.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._portal},e.decorators=[{type:o.Directive,args:[{selector:"[mat-menu-trigger-for], [matMenuTriggerFor]",host:{class:"mat-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"menuOpen || null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"},exportAs:"matMenuTrigger"}]}],e.ctorParameters=function(){return[{type:m.Overlay},{type:o.ElementRef},{type:o.ViewContainerRef},{type:void 0,decorators:[{type:o.Inject,args:[D]}]},{type:S,decorators:[{type:o.Optional}]},{type:x,decorators:[{type:o.Optional},{type:o.Self}]},{type:l.Directionality,decorators:[{type:o.Optional}]},{type:s.FocusMonitor}]},e.propDecorators={_deprecatedMatMenuTriggerFor:[{type:o.Input,args:["mat-menu-trigger-for"]}],menu:[{type:o.Input,args:["matMenuTriggerFor"]}],menuData:[{type:o.Input,args:["matMenuTriggerData"]}],restoreFocus:[{type:o.Input,args:["matMenuTriggerRestoreFocus"]}],menuOpened:[{type:o.Output}],onMenuOpen:[{type:o.Output}],menuClosed:[{type:o.Output}],onMenuClose:[{type:o.Output}]},e}(),L=function(){function e(){}return e.decorators=[{type:o.NgModule,args:[{exports:[F,I,a.MatCommonModule],declarations:[F,I],providers:[A]}]}],e}(),N=function(){function e(){}return e.decorators=[{type:o.NgModule,args:[{imports:[i.CommonModule,a.MatCommonModule,a.MatRippleModule,m.OverlayModule,L],exports:[T,x,L],declarations:[T,x],providers:[A]}]}],e}();e.MatMenu=S,e.MAT_MENU_DEFAULT_OPTIONS=w,e._MatMenu=T,e._MatMenuBase=R,e.MatMenuItem=x,e.MatMenuTrigger=F,e.MAT_MENU_SCROLL_STRATEGY=D,e.MAT_MENU_PANEL=C,e._MatMenuDirectivesModule=L,e.MatMenuModule=N,e.matMenuAnimations=M,e.fadeInItems=k,e.transformMenu=O,e.MatMenuContent=I,e.ɵa22=y,e.ɵb22=b,e.ɵc22=A,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=material-menu.umd.min.js.map
@@ -1235,6 +1235,11 @@ var MatSelect = /** @class */ (function (_super) {
1235
1235
  if (correspondingOption) {
1236
1236
  this._keyManager.setActiveItem(correspondingOption);
1237
1237
  }
1238
+ else if (!this.panelOpen) {
1239
+ // Otherwise reset the highlighted option. Note that we only want to do this while
1240
+ // closed, because doing it while open can shift the user's focus unnecessarily.
1241
+ this._keyManager.setActiveItem(-1);
1242
+ }
1238
1243
  }
1239
1244
  this._changeDetectorRef.markForCheck();
1240
1245
  };