-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcode-code-example-module-ngfactory~code-code-tabs-module-ngfactory.9a696b109e2b883fd5a6.js.map
1 lines (1 loc) · 323 KB
/
code-code-example-module-ngfactory~code-code-tabs-module-ngfactory.9a696b109e2b883fd5a6.js.map
1
{"version":3,"sources":["webpack:///./src/app/shared/copier.service.ts","webpack:///./src/app/custom-elements/code/code.component.ngfactory.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/code.component.ts.CodeComponent.html","webpack:///./node_modules/@angular/cdk/esm5/portal.es5.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/code.component.ts","webpack:///./src/app/custom-elements/code/code.component.ts.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/code.module.ts","webpack:///./node_modules/@angular/cdk/esm5/overlay.es5.js.pre-build-optimizer.js","webpack:///./node_modules/@angular/material/esm5/snack-bar.es5.js.pre-build-optimizer.js","webpack:///./node_modules/@angular/cdk/esm5/layout.es5.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/pretty-printer.service.ts","webpack:///./node_modules/@angular/material/snack-bar/typings/index.ngfactory.js.pre-build-optimizer.js","webpack:///./node_modules/@angular/material/snack-bar/typings/index.d.ts.MatSnackBarContainer.html","webpack:///./node_modules/@angular/material/snack-bar/typings/index.d.ts.SimpleSnackBar.html"],"names":["__webpack_require__","d","__webpack_exports__","CopierService","prototype","createFake","text","isRTL","document","documentElement","getAttribute","this","fakeElem","createElement","style","fontSize","border","padding","margin","position","yPosition","window","pageYOffset","scrollTop","top","setAttribute","value","body","appendChild","select","setSelectionRange","length","removeFake","removeChild","copyText","execCommand","err","_shared_logger_service__WEBPACK_IMPORTED_MODULE_6__","RenderType_CodeComponent","_angular_core__WEBPACK_IMPORTED_MODULE_0__","encapsulation","styles","data","View_CodeComponent_1","_l","_v","en","$event","ad","component","doCopy","_ck","ariaLabel","View_CodeComponent_0","codeContainer","_angular_common__WEBPACK_IMPORTED_MODULE_1__","ngIf","hideCopy","language","CodeComponentNgFactory","_code_component__WEBPACK_IMPORTED_MODULE_2__","_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__","_pretty_printer_service__WEBPACK_IMPORTED_MODULE_4__","_shared_copier_service__WEBPACK_IMPORTED_MODULE_5__","linenums","path","region","title","codeFormatted","_angular_core__WEBPACK_IMPORTED_MODULE_1__","throwPortalAlreadyAttachedError","Error","Portal","attach","host","throwNullPortalOutletError","hasAttached","_attachedHost","detach","throwNoPortalAttachedError","Object","defineProperty","get","enumerable","configurable","setAttachedHost","ComponentPortal","_super","viewContainerRef","injector","_this","call","tslib__WEBPACK_IMPORTED_MODULE_0__","TemplatePortal","template","context","templateRef","elementRef","undefined","BasePortalOutlet","_isDisposed","_attachedPortal","portal","throwNullPortalError","throwPortalOutletAlreadyDisposedError","attachComponentPortal","attachTemplatePortal","throwUnknownPortalTypeError","_invokeDisposeFn","dispose","setDisposeFn","fn","_disposeFn","DomPortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","componentRef","componentFactory","resolveComponentFactory","createComponent","parentInjector","destroy","create","attachView","hostView","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","detectChanges","rootNodes","forEach","rootNode","index","indexOf","remove","parentNode","CdkPortal","CdkPortalOutlet","_viewContainerRef","_isInitialized","attached","set","_attachedRef","ngOnInit","ngOnDestroy","ref","emit","clear","PortalModule","PortalInjector","_parentInjector","_customTokens","token","notFoundValue","CodeComponent","snackbar","pretty","copier","logger","_code","code","trim","formatDisplayedCode","showMissingCodeMessage","_title","ngOnChanges","indent","lines","leftAlignedCode","Number","MAX_VALUE","split","line","lineIndent","search","Math","min","map","substr","join","setCodeHtml","codeText","getCodeText","formatCode","getLinenums","pipe","rxjs_operators__WEBPACK_IMPORTED_MODULE_1__","subscribe","c","src","formattedCode","nativeElement","innerHTML","textContent","log","open","duration","error","parseInt","isNaN","match","CodeModule","NoopScrollStrategy","enable","disable","OverlayConfig","config","scrollStrategy","panelClass","hasBackdrop","backdropClass","keys","filter","key","validateVerticalPosition","property","validateHorizontalPosition","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","left","_isEnabled","_document","_canBeEnabled","root","_previousScrollPosition","getViewportScrollPosition","_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__","classList","add","html","previousHtmlScrollBehavior","previousBodyScrollBehavior","scroll","contains","viewport","getViewportSize","scrollHeight","height","scrollWidth","width","getMatScrollStrategyAlreadyAttachedError","CloseScrollStrategy","_scrollDispatcher","_ngZone","_config","_scrollSubscription","_detach","_overlayRef","run","overlayRef","stream","scrolled","threshold","_initialScrollPosition","scrollPosition","abs","updatePosition","unsubscribe","isElementScrolledOutsideView","element","scrollContainers","some","containerBounds","bottom","right","isElementClippedByScrolling","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","overlayElement","getBoundingClientRect","_a","ScrollStrategyOptions","noop","close","block","reposition","ngInjectableDef","factory","_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__","_angular_common__WEBPACK_IMPORTED_MODULE_3__","providedIn","OverlayKeyboardDispatcher","_attachedOverlays","_keydownListener","event","_keydownEvents","next","_isAttached","addEventListener","push","splice","removeEventListener","OverlayContainer","_containerElement","getContainerElement","_createContainer","container","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_backdropElement","_backdropClick","rxjs__WEBPACK_IMPORTED_MODULE_5__","_attachments","_detachments","attachResult","positionStrategy","_updateStackingOrder","_updateElementSize","_updateElementDirection","onStable","asObservable","rxjs_operators__WEBPACK_IMPORTED_MODULE_7__","_togglePointerEvents","_attachBackdrop","_toggleClasses","detachBackdrop","detachmentResult","isAttached","complete","backdropClick","attachments","detachments","keydownEvents","getConfig","apply","updateSize","sizeConfig","tslib__WEBPACK_IMPORTED_MODULE_4__","setDirection","dir","direction","minWidth","minHeight","maxWidth","maxHeight","enablePointer","pointerEvents","insertBefore","requestAnimationFrame","runOutsideAngular","nextSibling","backdropToDetach","finishDetach_1","setTimeout","cssClasses","isAdd","cssClass","FlexibleConnectedPositionStrategy","_connectedTo","_platform","_isInitialRender","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","scrollables","_preferredPositions","_positionChanges","_resizeSubscription","rxjs__WEBPACK_IMPORTED_MODULE_6__","EMPTY","_offsetX","_offsetY","positionChanges","_origin","_validatePositions","hostElement","_boundingBox","change","isBrowser","_lastPosition","reapplyLastPosition","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_overlayRect","fallback","originRect","viewportRect","flexibleFits","_i","pos","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","origin","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","_b","flexibleFits_1","fit_1","score","weight","lastPosition","withScrollableContainers","withPositions","positions","withViewportMargin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","setOrigin","withDefaultOffsetX","offset","withDefaultOffsetY","x","originX","startX","_isRtl","endX","y","originY","overlayStartX","overlayX","overlayY","point","overlay","offsetX","_getOffset","offsetY","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","fit","availableHeight","availableWidth","_pushOverlayOnScreen","start","overflowRight","max","overflowBottom","overflowTop","overflowLeft","_setOverlayElementStyles","_setBoundingBoxStyles","changeEvent","connectionPair","scrollableViewProperties","_getScrollVisibility","isRtl","smallestDistanceToViewportEdge","previousHeight","previousWidth","_hasExactPosition","alignItems","justifyContent","extendStyles","_getExactOverlayY","_getExactOverlayX","transformString","transform","clientHeight","clientWidth","originBounds","overlayBounds","scrollContainerBounds","scrollable","getElementRef","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","overflows","arguments","reduce","currentValue","currentOverflow","axis","pair","dest","source","hasOwnProperty","ConnectedPositionStrategy","originPos","overlayPos","connectedTo","viewportRuler","platform","_positionStrategy","withFallbackPosition","_direction","recalculateLastPosition","withDirection","withOffsetX","withOffsetY","slice","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_leftOffset","_rightOffset","_alignItems","_justifyContent","_width","_height","centerHorizontally","centerVertically","parentStyles","marginLeft","marginTop","marginBottom","marginRight","OverlayPositionBuilder","global","flexibleConnectedTo","_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_8__","nextUniqueId","Overlay","scrollStrategies","_overlayContainer","_positionBuilder","_injector","_directionality","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","id","_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__","OverlayModule","_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_9__","MatSnackBarRef","containerInstance","_afterDismissed","rxjs__WEBPACK_IMPORTED_MODULE_0__","_afterOpened","_onAction","_dismissedByAction","onAction","dismiss","_onExit","_finishDismiss","closed","exit","clearTimeout","_durationTimeoutId","dismissWithAction","closeWithAction","_dismissAfter","_open","dismissedByAction","afterDismissed","afterOpened","_onEnter","MAT_SNACK_BAR_DATA","SimpleSnackBar","snackBarRef","action","MatSnackBarContainer","_elementRef","_changeDetectorRef","_destroyed","_animationState","_assertNotAttached","_applySnackBarClasses","onAnimationEnd","toState","fromState","startsWith","_completeExit","onEnter_1","enter","snackBarConfig","verticalPosition","onMicrotaskEmpty","rxjs_operators__WEBPACK_IMPORTED_MODULE_6__","panelClasses","Array","isArray","horizontalPosition","_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__","MAT_SNACK_BAR_DEFAULT_OPTIONS","politeness","announcementMessage","MatSnackBar","_overlay","_live","_breakpointObserver","_parentSnackBar","_defaultConfig","_snackBarRefAtThisLevel","parent","_openedSnackBarRef","openFromComponent","_attach","openFromTemplate","message","_attachSnackBarContainer","containerPortal","containerRef","instance","content","userConfig","_createOverlay","$implicit","_createInjector","contentRef","observe","_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_8__","Handset","state$$1","matches","_animateSnackBar","announce","isLeft","isRight","userInjector","injectionTokens","WeakMap","MatSnackBarModule","mediaQueryStyleNode","_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__","mediaQueriesForWebkitCompatibility","Set","MediaMatcher","_matchMedia","matchMedia","bind","noopMatchMedia","query","WEBKIT","has","head","sheet","insertRule","e","console","createEmptyStyleRule","_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__","media","addListener","removeListener","BreakpointObserver","mediaMatcher","zone","_queries","Map","_destroySubject","rxjs__WEBPACK_IMPORTED_MODULE_2__","isMatched","splitQueries","mediaQuery","_registerQuery","mql","observables","observable","rxjs__WEBPACK_IMPORTED_MODULE_3__","rxjs_operators__WEBPACK_IMPORTED_MODULE_5__","breakpointStates","state","output","rxjs__WEBPACK_IMPORTED_MODULE_4__","listener","nextMql","queries","a1","a2","concat","Breakpoints","XSmall","Small","Medium","Large","XLarge","Tablet","Web","HandsetPortrait","TabletPortrait","WebPortrait","HandsetLandscape","TabletLandscape","WebLandscape","PrettyPrinter","prettyPrintOne","getPrettyPrintOne","ppo","Promise","resolve","then","module","__esModule","assign","default","msg","rxjs_operators__WEBPACK_IMPORTED_MODULE_2__","rxjs_operators__WEBPACK_IMPORTED_MODULE_3__","_button_typings_index_ngfactory__WEBPACK_IMPORTED_MODULE_12__","RenderType_MatSnackBarContainer","animation","type","name","definitions","options","expr","timings","View_MatSnackBarContainer_1","View_MatSnackBarContainer_0","_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_7__","MatSnackBarContainerNgFactory","_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_1__","RenderType_SimpleSnackBar","opacity","View_SimpleSnackBar_1","_angular_material_button__WEBPACK_IMPORTED_MODULE_11__","_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_5__","_co","disabled","View_SimpleSnackBar_0","hasAction","SimpleSnackBar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N,EAAA,IAAAyrB,EAAA5rB,KAAA8hB,UFuC1G,SAAAgK,EAAgC5rB,GAAM,OAAOL,EAAA,GAAQ,IEvC3DK,MAAAL,EAAA,qBAAgBK,MAAAL,EAAA,6BAAA4rB,IAAA5rB,EAAA,kBAAAwP,EAAA,GAAAxP,EAAA,EAAAA,EAAA,IAAAiB,MAAA,kBAA0D,SAAAL,EAAAN,GAA1DM,EAAAN,EAAA,IAA0DA,EAAAI,UAADwrB,YAAA,SAAAtrB,EAAAN,GAAzEM,EAAAN,EAAA,IAAyEA,EAAAI,UAAzEP,KAAAqkB,WFyCA,IAAI2H,EAA0BnsB,EAAA,GAAQ,mBAAoByrB,EAAA,EADpD,SAAqCprB,GAAM,OAAOL,EAAA,GAAQ,IAAKK,MAAQL,EAAA,GAAQ,EAAG,EAAG,KAAM,KAAM,EAAG,qBAAsB,QAAS,0BAA2B,GAAI,eAAgB,IAAK,KAAM,KAAMisB,EAAuBP,IAA6B1rB,EAAA,GAAQ,EAAG,MAAO,KAAM,EAAGyrB,EAAA,GAAoBA,EAAA,EAAmBA,EAAA,GAAwB,KAAM,OAAQ,KAAM,SAAU7qB,EAAKN,GAAiCM,EAAIN,EAAI,EAAG,OAAtBqD","file":"code-code-example-module-ngfactory~code-code-tabs-module-ngfactory.9a696b109e2b883fd5a6.js","sourcesContent":["/**\n * This class is based on the code in the following projects:\n *\n * - https://github.com/zenorocha/select\n * - https://github.com/zenorocha/clipboard.js/\n *\n * Both released under MIT license - © Zeno Rocha\n */\n\n\nexport class CopierService {\n private fakeElem: HTMLTextAreaElement|null;\n\n /**\n * Creates a fake textarea element, sets its value from `text` property,\n * and makes a selection on it.\n */\n createFake(text: string) {\n const isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n\n // Create a fake element to hold the contents to copy\n this.fakeElem = document.createElement('textarea');\n\n // Prevent zooming on iOS\n this.fakeElem.style.fontSize = '12pt';\n\n // Reset box model\n this.fakeElem.style.border = '0';\n this.fakeElem.style.padding = '0';\n this.fakeElem.style.margin = '0';\n\n // Move element out of screen horizontally\n this.fakeElem.style.position = 'absolute';\n this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';\n\n // Move element to the same position vertically\n const yPosition = window.pageYOffset || document.documentElement.scrollTop;\n this.fakeElem.style.top = yPosition + 'px';\n\n this.fakeElem.setAttribute('readonly', '');\n this.fakeElem.value = text;\n\n document.body.appendChild(this.fakeElem);\n\n this.fakeElem.select();\n this.fakeElem.setSelectionRange(0, this.fakeElem.value.length);\n }\n\n removeFake() {\n if (this.fakeElem) {\n document.body.removeChild(this.fakeElem);\n this.fakeElem = null;\n }\n }\n\n copyText(text: string) {\n try {\n this.createFake(text);\n return document.execCommand('copy');\n } catch (err) {\n return false;\n } finally {\n this.removeFake();\n }\n }\n}\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes}\n * tslint:disable\n */ \nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nimport * as i2 from \"./code.component\";\nimport * as i3 from \"@angular/material/snack-bar\";\nimport * as i4 from \"./pretty-printer.service\";\nimport * as i5 from \"../../shared/copier.service\";\nimport * as i6 from \"../../shared/logger.service\";\nvar styles_CodeComponent = [];\nvar RenderType_CodeComponent = i0.ɵcrt({ encapsulation: 2, styles: styles_CodeComponent, data: {} });\nexport { RenderType_CodeComponent as RenderType_CodeComponent };\nfunction View_CodeComponent_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 4, \"button\", [[\"class\", \"material-icons copy-button no-print\"], [\"title\", \"Copy code snippet\"]], [[1, \"aria-label\", 0]], [[null, \"click\"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if ((\"click\" === en)) {\n var pd_0 = (_co.doCopy() !== false);\n ad = (pd_0 && ad);\n } return ad; }, null, null)), (_l()(), i0.ɵted(-1, null, [\"\\n \"])), (_l()(), i0.ɵeld(2, 0, null, null, 1, \"span\", [[\"aria-hidden\", \"true\"]], null, null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\"content_copy\"])), (_l()(), i0.ɵted(-1, null, [\"\\n \"]))], null, function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.ariaLabel; _ck(_v, 0, 0, currVal_0); }); }\nexport function View_CodeComponent_0(_l) { return i0.ɵvid(0, [i0.ɵqud(402653184, 1, { codeContainer: 0 }), (_l()(), i0.ɵeld(1, 0, null, null, 6, \"pre\", [], [[8, \"className\", 0]], null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\" \"])), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_CodeComponent_1)), i0.ɵdid(4, 16384, null, 0, i1.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, \"ngIf\"] }, null), (_l()(), i0.ɵted(-1, null, [\"\\n \"])), (_l()(), i0.ɵeld(6, 0, [[1, 0], [\"codeContainer\", 1]], null, 0, \"code\", [[\"class\", \"animated fadeIn\"]], null, null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\"\\n \"]))], function (_ck, _v) { var _co = _v.component; var currVal_1 = !_co.hideCopy; _ck(_v, 4, 0, currVal_1); }, function (_ck, _v) { var _co = _v.component; var currVal_0 = i0.ɵinlineInterpolate(1, \"prettyprint lang-\", _co.language, \"\"); _ck(_v, 1, 0, currVal_0); }); }\nexport function View_CodeComponent_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"aio-code\", [], null, null, null, View_CodeComponent_0, RenderType_CodeComponent)), i0.ɵdid(1, 573440, null, 0, i2.CodeComponent, [i3.MatSnackBar, i4.PrettyPrinter, i5.CopierService, i6.Logger], null, null)], null, null); }\nvar CodeComponentNgFactory = i0.ɵccf(\"aio-code\", i2.CodeComponent, View_CodeComponent_Host_0, { hideCopy: \"hideCopy\", language: \"language\", linenums: \"linenums\", path: \"path\", region: \"region\", title: \"title\" }, { codeFormatted: \"codeFormatted\" }, []);\nexport { CodeComponentNgFactory as CodeComponentNgFactory };\n","\n <pre class=\"prettyprint lang-{{language}}\">\n <button *ngIf=\"!hideCopy\" class=\"material-icons copy-button no-print\"\n title=\"Copy code snippet\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"doCopy()\">\n <span aria-hidden=\"true\">content_copy</span>\n </button>\n <code class=\"animated fadeIn\" #codeContainer></code>\n </pre>\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 { __extends } from 'tslib';\nimport { NgModule, Directive, TemplateRef, ComponentFactoryResolver, ViewContainerRef, EventEmitter, Output } from '@angular/core';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * \\@docs-private\n * @return {?}\n */\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * \\@docs-private\n * @return {?}\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * \\@docs-private\n * @return {?}\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * \\@docs-private\n * @return {?}\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * \\@docs-private\n * @return {?}\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * \\@docs-private\n * @return {?}\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n * @abstract\n * @template T\n */\nvar /**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n * @abstract\n * @template T\n */\nPortal = /** @class */ (function () {\n function Portal() {\n }\n /** Attach this portal to a host. */\n /**\n * Attach this portal to a host.\n * @param {?} host\n * @return {?}\n */\n Portal.prototype.attach = /**\n * Attach this portal to a host.\n * @param {?} host\n * @return {?}\n */\n function (host) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n this._attachedHost = host;\n return /** @type {?} */ (host.attach(this));\n };\n /** Detach this portal from its host */\n /**\n * Detach this portal from its host\n * @return {?}\n */\n Portal.prototype.detach = /**\n * Detach this portal from its host\n * @return {?}\n */\n function () {\n var /** @type {?} */ host = this._attachedHost;\n if (host == null) {\n throwNoPortalAttachedError();\n }\n else {\n this._attachedHost = null;\n host.detach();\n }\n };\n Object.defineProperty(Portal.prototype, \"isAttached\", {\n /** Whether this portal is attached to a host. */\n get: /**\n * Whether this portal is attached to a host.\n * @return {?}\n */\n function () {\n return this._attachedHost != null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n * @param {?} host\n * @return {?}\n */\n Portal.prototype.setAttachedHost = /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n * @param {?} host\n * @return {?}\n */\n function (host) {\n this._attachedHost = host;\n };\n return Portal;\n}());\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n * @template T\n */\nvar /**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n * @template T\n */\nComponentPortal = /** @class */ (function (_super) {\n __extends(ComponentPortal, _super);\n function ComponentPortal(component, viewContainerRef, injector) {\n var _this = _super.call(this) || this;\n _this.component = component;\n _this.viewContainerRef = viewContainerRef;\n _this.injector = injector;\n return _this;\n }\n return ComponentPortal;\n}(Portal));\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n * @template C\n */\nvar /**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n * @template C\n */\nTemplatePortal = /** @class */ (function (_super) {\n __extends(TemplatePortal, _super);\n function TemplatePortal(template, viewContainerRef, context) {\n var _this = _super.call(this) || this;\n _this.templateRef = template;\n _this.viewContainerRef = viewContainerRef;\n _this.context = context;\n return _this;\n }\n Object.defineProperty(TemplatePortal.prototype, \"origin\", {\n get: /**\n * @return {?}\n */\n function () {\n return this.templateRef.elementRef;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Attach the the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n /**\n * Attach the the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n * @param {?} host\n * @param {?=} context\n * @return {?}\n */\n TemplatePortal.prototype.attach = /**\n * Attach the the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n * @param {?} host\n * @param {?=} context\n * @return {?}\n */\n function (host, context) {\n if (context === void 0) { context = this.context; }\n this.context = context;\n return _super.prototype.attach.call(this, host);\n };\n /**\n * @return {?}\n */\n TemplatePortal.prototype.detach = /**\n * @return {?}\n */\n function () {\n this.context = undefined;\n return _super.prototype.detach.call(this);\n };\n return TemplatePortal;\n}(Portal));\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n * @abstract\n */\nvar /**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n * @abstract\n */\nBasePortalOutlet = /** @class */ (function () {\n function BasePortalOutlet() {\n /**\n * Whether this host has already been permanently disposed.\n */\n this._isDisposed = false;\n }\n /** Whether this host has an attached portal. */\n /**\n * Whether this host has an attached portal.\n * @return {?}\n */\n BasePortalOutlet.prototype.hasAttached = /**\n * Whether this host has an attached portal.\n * @return {?}\n */\n function () {\n return !!this._attachedPortal;\n };\n /** Attaches a portal. */\n /**\n * Attaches a portal.\n * @param {?} portal\n * @return {?}\n */\n BasePortalOutlet.prototype.attach = /**\n * Attaches a portal.\n * @param {?} portal\n * @return {?}\n */\n function (portal) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n }\n throwUnknownPortalTypeError();\n };\n /** Detaches a previously attached portal. */\n /**\n * Detaches a previously attached portal.\n * @return {?}\n */\n BasePortalOutlet.prototype.detach = /**\n * Detaches a previously attached portal.\n * @return {?}\n */\n function () {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n };\n /** Permanently dispose of this portal host. */\n /**\n * Permanently dispose of this portal host.\n * @return {?}\n */\n BasePortalOutlet.prototype.dispose = /**\n * Permanently dispose of this portal host.\n * @return {?}\n */\n function () {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n };\n /** @docs-private */\n /**\n * \\@docs-private\n * @param {?} fn\n * @return {?}\n */\n BasePortalOutlet.prototype.setDisposeFn = /**\n * \\@docs-private\n * @param {?} fn\n * @return {?}\n */\n function (fn) {\n this._disposeFn = fn;\n };\n /**\n * @return {?}\n */\n BasePortalOutlet.prototype._invokeDisposeFn = /**\n * @return {?}\n */\n function () {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n };\n return BasePortalOutlet;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nvar /**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nDomPortalOutlet = /** @class */ (function (_super) {\n __extends(DomPortalOutlet, _super);\n function DomPortalOutlet(outletElement, _componentFactoryResolver, _appRef, _defaultInjector) {\n var _this = _super.call(this) || this;\n _this.outletElement = outletElement;\n _this._componentFactoryResolver = _componentFactoryResolver;\n _this._appRef = _appRef;\n _this._defaultInjector = _defaultInjector;\n return _this;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @template T\n * @param {?} portal Portal to be attached\n * @return {?} Reference to the created component.\n */\n DomPortalOutlet.prototype.attachComponentPortal = /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @template T\n * @param {?} portal Portal to be attached\n * @return {?} Reference to the created component.\n */\n function (portal) {\n var _this = this;\n var /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);\n var /** @type {?} */ componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.parentInjector);\n this.setDisposeFn(function () { return componentRef.destroy(); });\n }\n else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(function () {\n _this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n return componentRef;\n };\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n DomPortalOutlet.prototype.attachTemplatePortal = /**\n * Attaches a template portal to the DOM as an embedded view.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n function (portal) {\n var _this = this;\n var /** @type {?} */ viewContainer = portal.viewContainerRef;\n var /** @type {?} */ viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n viewRef.detectChanges();\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(function (rootNode) { return _this.outletElement.appendChild(rootNode); });\n this.setDisposeFn((function () {\n var /** @type {?} */ index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n }));\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n };\n /**\n * Clears out a portal from the DOM.\n */\n /**\n * Clears out a portal from the DOM.\n * @return {?}\n */\n DomPortalOutlet.prototype.dispose = /**\n * Clears out a portal from the DOM.\n * @return {?}\n */\n function () {\n _super.prototype.dispose.call(this);\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n };\n /**\n * Gets the root HTMLElement for an instantiated component.\n * @param {?} componentRef\n * @return {?}\n */\n DomPortalOutlet.prototype._getComponentRootNode = /**\n * Gets the root HTMLElement for an instantiated component.\n * @param {?} componentRef\n * @return {?}\n */\n function (componentRef) {\n return /** @type {?} */ ((/** @type {?} */ (componentRef.hostView)).rootNodes[0]);\n };\n return DomPortalOutlet;\n}(BasePortalOutlet));\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nvar CdkPortal = /** @class */ (function (_super) {\n __extends(CdkPortal, _super);\n function CdkPortal(templateRef, viewContainerRef) {\n return _super.call(this, templateRef, viewContainerRef) || this;\n }\n CdkPortal.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-portal], [cdkPortal], [portal]',\n exportAs: 'cdkPortal',\n },] },\n ];\n /** @nocollapse */\n CdkPortal.ctorParameters = function () { return [\n { type: TemplateRef, },\n { type: ViewContainerRef, },\n ]; };\n return CdkPortal;\n}(TemplatePortal));\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\nvar CdkPortalOutlet = /** @class */ (function (_super) {\n __extends(CdkPortalOutlet, _super);\n function CdkPortalOutlet(_componentFactoryResolver, _viewContainerRef) {\n var _this = _super.call(this) || this;\n _this._componentFactoryResolver = _componentFactoryResolver;\n _this._viewContainerRef = _viewContainerRef;\n /**\n * Whether the portal component is initialized.\n */\n _this._isInitialized = false;\n _this.attached = new EventEmitter();\n return _this;\n }\n Object.defineProperty(CdkPortalOutlet.prototype, \"portal\", {\n /** Portal associated with the Portal outlet. */\n get: /**\n * Portal associated with the Portal outlet.\n * @return {?}\n */\n function () {\n return this._attachedPortal;\n },\n set: /**\n * @param {?} portal\n * @return {?}\n */\n function (portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n _super.prototype.detach.call(this);\n }\n if (portal) {\n _super.prototype.attach.call(this, portal);\n }\n this._attachedPortal = portal;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkPortalOutlet.prototype, \"attachedRef\", {\n /** Component or view reference that is attached to the portal. */\n get: /**\n * Component or view reference that is attached to the portal.\n * @return {?}\n */\n function () {\n return this._attachedRef;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n CdkPortalOutlet.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n this._isInitialized = true;\n };\n /**\n * @return {?}\n */\n CdkPortalOutlet.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n _super.prototype.dispose.call(this);\n this._attachedPortal = null;\n this._attachedRef = null;\n };\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @template T\n * @param {?} portal Portal to be attached to the portal outlet.\n * @return {?} Reference to the created component.\n */\n CdkPortalOutlet.prototype.attachComponentPortal = /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @template T\n * @param {?} portal Portal to be attached to the portal outlet.\n * @return {?} Reference to the created component.\n */\n function (portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n var /** @type {?} */ viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n var /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);\n var /** @type {?} */ ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.parentInjector);\n _super.prototype.setDisposeFn.call(this, function () { return ref.destroy(); });\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n };\n /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n CdkPortalOutlet.prototype.attachTemplatePortal = /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n function (portal) {\n var _this = this;\n portal.setAttachedHost(this);\n var /** @type {?} */ viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n _super.prototype.setDisposeFn.call(this, function () { return _this._viewContainerRef.clear(); });\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n };\n CdkPortalOutlet.decorators = [\n { type: Directive, args: [{\n selector: '[cdkPortalOutlet], [cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalOutlet, cdkPortalHost',\n inputs: ['portal: cdkPortalOutlet']\n },] },\n ];\n /** @nocollapse */\n CdkPortalOutlet.ctorParameters = function () { return [\n { type: ComponentFactoryResolver, },\n { type: ViewContainerRef, },\n ]; };\n CdkPortalOutlet.propDecorators = {\n \"attached\": [{ type: Output, args: ['attached',] },],\n };\n return CdkPortalOutlet;\n}(BasePortalOutlet));\nvar PortalModule = /** @class */ (function () {\n function PortalModule() {\n }\n PortalModule.decorators = [\n { type: NgModule, args: [{\n exports: [CdkPortal, CdkPortalOutlet],\n declarations: [CdkPortal, CdkPortalOutlet],\n },] },\n ];\n return PortalModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * \\@docs-private\n */\nvar /**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * \\@docs-private\n */\nPortalInjector = /** @class */ (function () {\n function PortalInjector(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n /**\n * @param {?} token\n * @param {?=} notFoundValue\n * @return {?}\n */\n PortalInjector.prototype.get = /**\n * @param {?} token\n * @param {?=} notFoundValue\n * @return {?}\n */\n function (token, notFoundValue) {\n var /** @type {?} */ value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n };\n return PortalInjector;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nexport { DomPortalOutlet as DomPortalHost, CdkPortalOutlet as PortalHostDirective, CdkPortal as TemplatePortalDirective, BasePortalOutlet as BasePortalHost, Portal, ComponentPortal, TemplatePortal, BasePortalOutlet, DomPortalOutlet, CdkPortal, CdkPortalOutlet, PortalModule, PortalInjector };\n//# sourceMappingURL=portal.es5.js.map\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';\nimport { Logger } from 'app/shared/logger.service';\nimport { PrettyPrinter } from './pretty-printer.service';\nimport { CopierService } from 'app/shared/copier.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { tap } from 'rxjs/operators';\n\n/**\n * If linenums is not set, this is the default maximum number of lines that\n * an example can display without line numbers.\n */\nconst DEFAULT_LINE_NUMS_COUNT = 10;\n\n/**\n * Formatted Code Block\n *\n * Pretty renders a code block, used in the docs and API reference by the code-example and\n * code-tabs embedded components.\n * It includes a \"copy\" button that will send the content to the clipboard when clicked\n *\n * Example usage:\n *\n * ```\n * <aio-code\n * [language]=\"ts\"\n * [linenums]=\"true\"\n * [path]=\"router/src/app/app.module.ts\"\n * [region]=\"animations-module\">\n * </aio-code>\n * ```\n *\n *\n * Renders code provided through the `updateCode` method.\n */\n@Component({\n selector: 'aio-code',\n template: `\n <pre class=\"prettyprint lang-{{language}}\">\n <button *ngIf=\"!hideCopy\" class=\"material-icons copy-button no-print\"\n title=\"Copy code snippet\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"doCopy()\">\n <span aria-hidden=\"true\">content_copy</span>\n </button>\n <code class=\"animated fadeIn\" #codeContainer></code>\n </pre>\n `\n})\nexport class CodeComponent implements OnChanges {\n ariaLabel = '';\n\n /** The code to be copied when clicking the copy button, this should not be HTML encoded */\n private codeText: string;\n\n /** Code that should be formatted with current inputs and displayed in the view. */\n set code(code: string) {\n this._code = code;\n\n if (!this._code || !this._code.trim()) {\n this.showMissingCodeMessage();\n } else {\n this.formatDisplayedCode();\n }\n }\n get code(): string { return this._code; }\n _code: string;\n\n /** Whether the copy button should be shown. */\n @Input() hideCopy: boolean;\n\n /** Language to render the code (e.g. javascript, dart, typescript). */\n @Input() language: string;\n\n /**\n * Whether to display line numbers:\n * - If false: hide\n * - If true: show\n * - If number: show but start at that number\n */\n @Input() linenums: boolean | number | string;\n\n /** Path to the source of the code. */\n @Input() path: string;\n\n /** Region of the source of the code being displayed. */\n @Input() region: string;\n\n /** Optional title to be displayed above the code. */\n @Input()\n set title(title: string) {\n this._title = title;\n this.ariaLabel = this.title ? `Copy code snippet from ${this.title}` : '';\n }\n get title(): string { return this._title; }\n private _title: string;\n\n @Output() codeFormatted = new EventEmitter<void>();\n\n /** The element in the template that will display the formatted code. */\n @ViewChild('codeContainer') codeContainer: ElementRef;\n\n constructor(\n private snackbar: MatSnackBar,\n private pretty: PrettyPrinter,\n private copier: CopierService,\n private logger: Logger) {}\n\n ngOnChanges() {\n // If some inputs have changed and there is code displayed, update the view with the latest\n // formatted code.\n if (this.code) {\n this.formatDisplayedCode();\n }\n }\n\n private formatDisplayedCode() {\n const leftAlignedCode = leftAlign(this.code);\n this.setCodeHtml(leftAlignedCode); // start with unformatted code\n this.codeText = this.getCodeText(); // store the unformatted code as text (for copying)\n\n this.pretty\n .formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))\n .pipe(tap(() => this.codeFormatted.emit()))\n .subscribe(c => this.setCodeHtml(c), err => { /* ignore failure to format */ }\n );\n }\n\n /** Sets the message showing that the code could not be found. */\n private showMissingCodeMessage() {\n const src = this.path ? this.path + (this.region ? '#' + this.region : '') : '';\n const srcMsg = src ? ` for\\n${src}` : '.';\n this.setCodeHtml(`<p class=\"code-missing\">The code sample is missing${srcMsg}</p>`);\n }\n\n /** Sets the innerHTML of the code container to the provided code string. */\n private setCodeHtml(formattedCode: string) {\n // **Security:** Code example content is provided by docs authors and as such its considered to\n // be safe for innerHTML purposes.\n this.codeContainer.nativeElement.innerHTML = formattedCode;\n }\n\n /** Gets the textContent of the displayed code element. */\n private getCodeText() {\n // `prettify` may remove newlines, e.g. when `linenums` are on. Retrieve the content of the\n // container as text, before prettifying it.\n // We take the textContent because we don't want it to be HTML encoded.\n return this.codeContainer.nativeElement.textContent;\n }\n\n /** Copies the code snippet to the user's clipboard. */\n doCopy() {\n const code = this.codeText;\n const successfullyCopied = this.copier.copyText(code);\n\n if (successfullyCopied) {\n this.logger.log('Copied code to clipboard:', code);\n this.snackbar.open('Code Copied', '', { duration: 800 });\n } else {\n this.logger.error(new Error(`ERROR copying code to clipboard: \"${code}\"`));\n this.snackbar.open('Copy failed. Please try again!', '', { duration: 800 });\n }\n }\n\n /** Gets the calculated value of linenums (boolean/number). */\n getLinenums(code: string) {\n const linenums =\n typeof this.linenums === 'boolean' ? this.linenums :\n this.linenums === 'true' ? true :\n this.linenums === 'false' ? false :\n typeof this.linenums === 'string' ? parseInt(this.linenums, 10) :\n this.linenums;\n\n // if no linenums, enable line numbers if more than one line\n return linenums == null || isNaN(linenums as number) ?\n (code.match(/\\n/g) || []).length > DEFAULT_LINE_NUMS_COUNT : linenums;\n }\n}\n\nfunction leftAlign(text: string): string {\n let indent = Number.MAX_VALUE;\n\n const lines = text.split('\\n');\n lines.forEach(line => {\n const lineIndent = line.search(/\\S/);\n if (lineIndent !== -1) {\n indent = Math.min(lineIndent, indent);\n }\n });\n\n return lines.map(line => line.substr(indent)).join('\\n').trim();\n}\n","import { ElementRef, EventEmitter, OnChanges } from '@angular/core';\nimport { Logger } from 'app/shared/logger.service';\nimport { PrettyPrinter } from './pretty-printer.service';\nimport { CopierService } from 'app/shared/copier.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { tap } from 'rxjs/operators';\n/**\n * If linenums is not set, this is the default maximum number of lines that\n * an example can display without line numbers.\n */\nvar DEFAULT_LINE_NUMS_COUNT = 10;\n/**\n * Formatted Code Block\n *\n * Pretty renders a code block, used in the docs and API reference by the code-example and\n * code-tabs embedded components.\n * It includes a \"copy\" button that will send the content to the clipboard when clicked\n *\n * Example usage:\n *\n * ```\n * <aio-code\n * [language]=\"ts\"\n * [linenums]=\"true\"\n * [path]=\"router/src/app/app.module.ts\"\n * [region]=\"animations-module\">\n * </aio-code>\n * ```\n *\n *\n * Renders code provided through the `updateCode` method.\n */\nvar CodeComponent = /** @class */ (function () {\n function CodeComponent(snackbar, pretty, copier, logger) {\n this.snackbar = snackbar;\n this.pretty = pretty;\n this.copier = copier;\n this.logger = logger;\n this.ariaLabel = '';\n this.codeFormatted = new EventEmitter();\n }\n Object.defineProperty(CodeComponent.prototype, \"code\", {\n get: function () { return this._code; },\n /** Code that should be formatted with current inputs and displayed in the view. */\n set: function (code) {\n this._code = code;\n if (!this._code || !this._code.trim()) {\n this.showMissingCodeMessage();\n }\n else {\n this.formatDisplayedCode();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CodeComponent.prototype, \"title\", {\n get: function () { return this._title; },\n /** Optional title to be displayed above the code. */\n set: function (title) {\n this._title = title;\n this.ariaLabel = this.title ? \"Copy code snippet from \" + this.title : '';\n },\n enumerable: true,\n configurable: true\n });\n CodeComponent.prototype.ngOnChanges = function () {\n // If some inputs have changed and there is code displayed, update the view with the latest\n // formatted code.\n if (this.code) {\n this.formatDisplayedCode();\n }\n };\n CodeComponent.prototype.formatDisplayedCode = function () {\n var _this = this;\n var leftAlignedCode = leftAlign(this.code);\n this.setCodeHtml(leftAlignedCode); // start with unformatted code\n this.codeText = this.getCodeText(); // store the unformatted code as text (for copying)\n this.pretty\n .formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))\n .pipe(tap(function () { return _this.codeFormatted.emit(); }))\n .subscribe(function (c) { return _this.setCodeHtml(c); }, function (err) { });\n };\n /** Sets the message showing that the code could not be found. */\n CodeComponent.prototype.showMissingCodeMessage = function () {\n var src = this.path ? this.path + (this.region ? '#' + this.region : '') : '';\n var srcMsg = src ? \" for\\n\" + src : '.';\n this.setCodeHtml(\"<p class=\\\"code-missing\\\">The code sample is missing\" + srcMsg + \"</p>\");\n };\n /** Sets the innerHTML of the code container to the provided code string. */\n CodeComponent.prototype.setCodeHtml = function (formattedCode) {\n // **Security:** Code example content is provided by docs authors and as such its considered to\n // be safe for innerHTML purposes.\n this.codeContainer.nativeElement.innerHTML = formattedCode;\n };\n /** Gets the textContent of the displayed code element. */\n CodeComponent.prototype.getCodeText = function () {\n // `prettify` may remove newlines, e.g. when `linenums` are on. Retrieve the content of the\n // container as text, before prettifying it.\n // We take the textContent because we don't want it to be HTML encoded.\n return this.codeContainer.nativeElement.textContent;\n };\n /** Copies the code snippet to the user's clipboard. */\n CodeComponent.prototype.doCopy = function () {\n var code = this.codeText;\n var successfullyCopied = this.copier.copyText(code);\n if (successfullyCopied) {\n this.logger.log('Copied code to clipboard:', code);\n this.snackbar.open('Code Copied', '', { duration: 800 });\n }\n else {\n this.logger.error(new Error(\"ERROR copying code to clipboard: \\\"\" + code + \"\\\"\"));\n this.snackbar.open('Copy failed. Please try again!', '', { duration: 800 });\n }\n };\n /** Gets the calculated value of linenums (boolean/number). */\n CodeComponent.prototype.getLinenums = function (code) {\n var linenums = typeof this.linenums === 'boolean' ? this.linenums :\n this.linenums === 'true' ? true :\n this.linenums === 'false' ? false :\n typeof this.linenums === 'string' ? parseInt(this.linenums, 10) :\n this.linenums;\n // if no linenums, enable line numbers if more than one line\n return linenums == null || isNaN(linenums) ?\n (code.match(/\\n/g) || []).length > DEFAULT_LINE_NUMS_COUNT : linenums;\n };\n return CodeComponent;\n}());\nexport { CodeComponent };\nfunction leftAlign(text) {\n var indent = Number.MAX_VALUE;\n var lines = text.split('\\n');\n lines.forEach(function (line) {\n var lineIndent = line.search(/\\S/);\n if (lineIndent !== -1) {\n indent = Math.min(lineIndent, indent);\n }\n });\n return lines.map(function (line) { return line.substr(indent); }).join('\\n').trim();\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CodeComponent } from './code.component';\nimport { MatSnackBarModule } from '@angular/material';\nimport { PrettyPrinter } from './pretty-printer.service';\nimport { CopierService } from 'app/shared/copier.service';\n\n@NgModule({\n imports: [ CommonModule, MatSnackBarModule ],\n declarations: [ CodeComponent ],\n entryComponents: [ CodeComponent ],\n exports: [ CodeComponent ],\n providers: [ PrettyPrinter, CopierService ]\n})\nexport class CodeModule { }\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 { Optional, Inject, Injectable, NgZone, NgModule, SkipSelf, ApplicationRef, ComponentFactoryResolver, Injector, Directive, ElementRef, EventEmitter, inject, InjectionToken, Input, Output, TemplateRef, ViewContainerRef, defineInjectable } from '@angular/core';\nimport { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ScrollDispatcher, ViewportRuler, ScrollDispatchModule, VIEWPORT_RULER_PROVIDER } from '@angular/cdk/scrolling';\nexport { ViewportRuler, VIEWPORT_RULER_PROVIDER, CdkScrollable, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport { __assign, __extends } from 'tslib';\nimport { Subject, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { Platform } from '@angular/cdk/platform';\nimport { Directionality, BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { ESCAPE } from '@angular/cdk/keycodes';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * Scroll strategy that doesn't do anything.\n */\nvar /**\n * Scroll strategy that doesn't do anything.\n */\nNoopScrollStrategy = /** @class */ (function () {\n function NoopScrollStrategy() {\n }\n /** Does nothing, as this scroll strategy is a no-op. */\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n NoopScrollStrategy.prototype.enable = /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n function () { };\n /** Does nothing, as this scroll strategy is a no-op. */\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n NoopScrollStrategy.prototype.disable = /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n function () { };\n /** Does nothing, as this scroll strategy is a no-op. */\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n NoopScrollStrategy.prototype.attach = /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n function () { };\n return NoopScrollStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Initial configuration used when creating an overlay.\n */\nvar /**\n * Initial configuration used when creating an overlay.\n */\nOverlayConfig = /** @class */ (function () {\n function OverlayConfig(config) {\n var _this = this;\n /**\n * Strategy to be used when handling scroll events while the overlay is open.\n */\n this.scrollStrategy = new NoopScrollStrategy();\n /**\n * Custom class to add to the overlay pane.\n */\n this.panelClass = '';\n /**\n * Whether the overlay has a backdrop.\n */\n this.hasBackdrop = false;\n /**\n * Custom class to add to the backdrop\n */\n this.backdropClass = 'cdk-overlay-dark-backdrop';\n if (config) {\n Object.keys(config)\n .filter(function (key) { return typeof config[key] !== 'undefined'; })\n .forEach(function (key) { return _this[key] = config[key]; });\n }\n }\n return OverlayConfig;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * The points of the origin element and the overlay element to connect.\n */\nvar /**\n * The points of the origin element and the overlay element to connect.\n */\nConnectionPositionPair = /** @class */ (function () {\n function ConnectionPositionPair(origin, overlay, offsetX, offsetY) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.originX = origin.originX;\n this.originY = origin.originY;\n this.overlayX = overlay.overlayX;\n this.overlayY = overlay.overlayY;\n }\n return ConnectionPositionPair;\n}());\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * \\@docs-private\n */\nvar /**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * \\@docs-private\n */\nScrollingVisibility = /** @class */ (function () {\n function ScrollingVisibility() {\n }\n return ScrollingVisibility;\n}());\n/**\n * The change event emitted by the strategy when a fallback position is used.\n */\nvar ConnectedOverlayPositionChange = /** @class */ (function () {\n function ConnectedOverlayPositionChange(connectionPair, /** @docs-private */\n scrollableViewProperties) {\n this.connectionPair = connectionPair;\n this.scrollableViewProperties = scrollableViewProperties;\n }\n /** @nocollapse */\n ConnectedOverlayPositionChange.ctorParameters = function () { return [\n { type: ConnectionPositionPair, },\n { type: ScrollingVisibility, decorators: [{ type: Optional },] },\n ]; };\n return ConnectedOverlayPositionChange;\n}());\n/**\n * Validates whether a vertical position property matches the expected values.\n * \\@docs-private\n * @param {?} property Name of the property being validated.\n * @param {?} value Value of the property being validated.\n * @return {?}\n */\nfunction validateVerticalPosition(property, value) {\n if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n throw Error(\"ConnectedPosition: Invalid \" + property + \" \\\"\" + value + \"\\\". \" +\n \"Expected \\\"top\\\", \\\"bottom\\\" or \\\"center\\\".\");\n }\n}\n/**\n * Validates whether a horizontal position property matches the expected values.\n * \\@docs-private\n * @param {?} property Name of the property being validated.\n * @param {?} value Value of the property being validated.\n * @return {?}\n */\nfunction validateHorizontalPosition(property, value) {\n if (value !== 'start' && value !== 'end' && value !== 'center') {\n throw Error(\"ConnectedPosition: Invalid \" + property + \" \\\"\" + value + \"\\\". \" +\n \"Expected \\\"start\\\", \\\"end\\\" or \\\"center\\\".\");\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nvar /**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nBlockScrollStrategy = /** @class */ (function () {\n function BlockScrollStrategy(_viewportRuler, document) {\n this._viewportRuler = _viewportRuler;\n this._previousHTMLStyles = { top: '', left: '' };\n this._isEnabled = false;\n this._document = document;\n }\n /** Attaches this scroll strategy to an overlay. */\n /**\n * Attaches this scroll strategy to an overlay.\n * @return {?}\n */\n BlockScrollStrategy.prototype.attach = /**\n * Attaches this scroll strategy to an overlay.\n * @return {?}\n */\n function () { };\n /** Blocks page-level scroll while the attached overlay is open. */\n /**\n * Blocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n BlockScrollStrategy.prototype.enable = /**\n * Blocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n function () {\n if (this._canBeEnabled()) {\n var /** @type {?} */ root = this._document.documentElement;\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n };\n /** Unblocks page-level scroll while the attached overlay is open. */\n /**\n * Unblocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n BlockScrollStrategy.prototype.disable = /**\n * Unblocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n function () {\n if (this._isEnabled) {\n var /** @type {?} */ html = this._document.documentElement;\n var /** @type {?} */ body = this._document.body;\n var /** @type {?} */ previousHtmlScrollBehavior = html.style['scrollBehavior'] || '';\n var /** @type {?} */ previousBodyScrollBehavior = body.style['scrollBehavior'] || '';\n this._isEnabled = false;\n html.style.left = this._previousHTMLStyles.left;\n html.style.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n html.style['scrollBehavior'] = body.style['scrollBehavior'] = 'auto';\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n html.style['scrollBehavior'] = previousHtmlScrollBehavior;\n body.style['scrollBehavior'] = previousBodyScrollBehavior;\n }\n };\n /**\n * @return {?}\n */\n BlockScrollStrategy.prototype._canBeEnabled = /**\n * @return {?}\n */\n function () {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n var /** @type {?} */ html = this._document.documentElement;\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n var /** @type {?} */ body = this._document.body;\n var /** @type {?} */ viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\n };\n return BlockScrollStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n * @return {?}\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n return Error(\"Scroll strategy has already been attached.\");\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nvar /**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nCloseScrollStrategy = /** @class */ (function () {\n function CloseScrollStrategy(_scrollDispatcher, _ngZone, _viewportRuler, _config) {\n var _this = this;\n this._scrollDispatcher = _scrollDispatcher;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._config = _config;\n this._scrollSubscription = null;\n /**\n * Detaches the overlay ref and disables the scroll strategy.\n */\n this._detach = function () {\n _this.disable();\n if (_this._overlayRef.hasAttached()) {\n _this._ngZone.run(function () { return _this._overlayRef.detach(); });\n }\n };\n }\n /** Attaches this scroll strategy to an overlay. */\n /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n CloseScrollStrategy.prototype.attach = /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n if (this._overlayRef) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n };\n /** Enables the closing of the attached overlay on scroll. */\n /**\n * Enables the closing of the attached overlay on scroll.\n * @return {?}\n */\n CloseScrollStrategy.prototype.enable = /**\n * Enables the closing of the attached overlay on scroll.\n * @return {?}\n */\n function () {\n var _this = this;\n if (this._scrollSubscription) {\n return;\n }\n var /** @type {?} */ stream = this._scrollDispatcher.scrolled(0);\n if (this._config && this._config.threshold && this._config.threshold > 1) {\n this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n this._scrollSubscription = stream.subscribe(function () {\n var /** @type {?} */ scrollPosition = _this._viewportRuler.getViewportScrollPosition().top;\n if (Math.abs(scrollPosition - _this._initialScrollPosition) > /** @type {?} */ ((/** @type {?} */ ((_this._config)).threshold))) {\n _this._detach();\n }\n else {\n _this._overlayRef.updatePosition();\n }\n });\n }\n else {\n this._scrollSubscription = stream.subscribe(this._detach);\n }\n };\n /** Disables the closing the attached overlay on scroll. */\n /**\n * Disables the closing the attached overlay on scroll.\n * @return {?}\n */\n CloseScrollStrategy.prototype.disable = /**\n * Disables the closing the attached overlay on scroll.\n * @return {?}\n */\n function () {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n };\n return CloseScrollStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n// TODO(jelbourn): move this to live with the rest of the scrolling code\n// TODO(jelbourn): someday replace this with IntersectionObservers\n/**\n * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.\n * \\@docs-private\n * @param {?} element Dimensions of the element (from getBoundingClientRect)\n * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @return {?} Whether the element is scrolled out of view\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n return scrollContainers.some(function (containerBounds) {\n var /** @type {?} */ outsideAbove = element.bottom < containerBounds.top;\n var /** @type {?} */ outsideBelow = element.top > containerBounds.bottom;\n var /** @type {?} */ outsideLeft = element.right < containerBounds.left;\n var /** @type {?} */ outsideRight = element.left > containerBounds.right;\n return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n });\n}\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * \\@docs-private\n * @param {?} element Dimensions of the element (from getBoundingClientRect)\n * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @return {?} Whether the element is clipped\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n return scrollContainers.some(function (scrollContainerRect) {\n var /** @type {?} */ clippedAbove = element.top < scrollContainerRect.top;\n var /** @type {?} */ clippedBelow = element.bottom > scrollContainerRect.bottom;\n var /** @type {?} */ clippedLeft = element.left < scrollContainerRect.left;\n var /** @type {?} */ clippedRight = element.right > scrollContainerRect.right;\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\n });\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nvar /**\n * Strategy that will update the element position as the user is scrolling.\n */\nRepositionScrollStrategy = /** @class */ (function () {\n function RepositionScrollStrategy(_scrollDispatcher, _viewportRuler, _ngZone, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n this._config = _config;\n this._scrollSubscription = null;\n }\n /** Attaches this scroll strategy to an overlay. */\n /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n RepositionScrollStrategy.prototype.attach = /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n if (this._overlayRef) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n };\n /** Enables repositioning of the attached overlay on scroll. */\n /**\n * Enables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n RepositionScrollStrategy.prototype.enable = /**\n * Enables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n function () {\n var _this = this;\n if (!this._scrollSubscription) {\n var /** @type {?} */ throttle = this._config ? this._config.scrollThrottle : 0;\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(function () {\n _this._overlayRef.updatePosition();\n // TODO(crisbeto): make `close` on by default once all components can handle it.\n if (_this._config && _this._config.autoClose) {\n var /** @type {?} */ overlayRect = _this._overlayRef.overlayElement.getBoundingClientRect();\n var _a = _this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;\n // TODO(crisbeto): include all ancestor scroll containers here once\n // we have a way of exposing the trigger element to the scroll strategy.\n var /** @type {?} */ parentRects = [{ width: width, height: height, bottom: height, right: width, top: 0, left: 0 }];\n if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n _this.disable();\n _this._ngZone.run(function () { return _this._overlayRef.detach(); });\n }\n }\n });\n }\n };\n /** Disables repositioning of the attached overlay on scroll. */\n /**\n * Disables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n RepositionScrollStrategy.prototype.disable = /**\n * Disables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n function () {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n };\n return RepositionScrollStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\nvar ScrollStrategyOptions = /** @class */ (function () {\n function ScrollStrategyOptions(_scrollDispatcher, _viewportRuler, _ngZone, document) {\n var _this = this;\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n /**\n * Do nothing on scroll.\n */\n this.noop = function () { return new NoopScrollStrategy(); };\n /**\n * Close the overlay as soon as the user scrolls.\n * @param config Configuration to be used inside the scroll strategy.\n */\n this.close = function (config) {\n return new CloseScrollStrategy(_this._scrollDispatcher, _this._ngZone, _this._viewportRuler, config);\n };\n /**\n * Block scrolling.\n */\n this.block = function () { return new BlockScrollStrategy(_this._viewportRuler, _this._document); };\n /**\n * Update the overlay's position on scroll.\n * @param config Configuration to be used inside the scroll strategy.\n * Allows debouncing the reposition calls.\n */\n this.reposition = function (config) {\n return new RepositionScrollStrategy(_this._scrollDispatcher, _this._viewportRuler, _this._ngZone, config);\n };\n this._document = document;\n }\n ScrollStrategyOptions.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n ScrollStrategyOptions.ctorParameters = function () { return [\n { type: ScrollDispatcher, },\n { type: ViewportRuler, },\n { type: NgZone, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n /** @nocollapse */ ScrollStrategyOptions.ngInjectableDef = defineInjectable({ factory: function ScrollStrategyOptions_Factory() { return new ScrollStrategyOptions(inject(ScrollDispatcher), inject(ViewportRuler), inject(NgZone), inject(DOCUMENT)); }, token: ScrollStrategyOptions, providedIn: \"root\" });\n return ScrollStrategyOptions;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nvar OverlayKeyboardDispatcher = /** @class */ (function () {\n function OverlayKeyboardDispatcher(document) {\n var _this = this;\n /**\n * Currently attached overlays in the order they were attached.\n */\n this._attachedOverlays = [];\n /**\n * Keyboard event listener that will be attached to the body.\n */\n this._keydownListener = function (event) {\n if (_this._attachedOverlays.length) {\n // Dispatch the keydown event to the top overlay. We want to target the most recent overlay,\n // rather than trying to match where the event came from, because some components might open\n // an overlay, but keep focus on a trigger element (e.g. for select and autocomplete).\n // Dispatch the keydown event to the top overlay. We want to target the most recent overlay,\n // rather than trying to match where the event came from, because some components might open\n // an overlay, but keep focus on a trigger element (e.g. for select and autocomplete).\n _this._attachedOverlays[_this._attachedOverlays.length - 1]._keydownEvents.next(event);\n }\n };\n this._document = document;\n }\n /**\n * @return {?}\n */\n OverlayKeyboardDispatcher.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n this._detach();\n };\n /** Add a new overlay to the list of attached overlay refs. */\n /**\n * Add a new overlay to the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n OverlayKeyboardDispatcher.prototype.add = /**\n * Add a new overlay to the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n this._document.body.addEventListener('keydown', this._keydownListener, true);\n this._isAttached = true;\n }\n this._attachedOverlays.push(overlayRef);\n };\n /** Remove an overlay from the list of attached overlay refs. */\n /**\n * Remove an overlay from the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n OverlayKeyboardDispatcher.prototype.remove = /**\n * Remove an overlay from the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n var /** @type {?} */ index = this._attachedOverlays.indexOf(overlayRef);\n if (index > -1) {\n this._attachedOverlays.splice(index, 1);\n }\n // Remove the global listener once there are no more overlays.\n if (this._attachedOverlays.length === 0) {\n this._detach();\n }\n };\n /**\n * Detaches the global keyboard event listener.\n * @return {?}\n */\n OverlayKeyboardDispatcher.prototype._detach = /**\n * Detaches the global keyboard event listener.\n * @return {?}\n */\n function () {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener, true);\n this._isAttached = false;\n }\n };\n OverlayKeyboardDispatcher.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n OverlayKeyboardDispatcher.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n /** @nocollapse */ OverlayKeyboardDispatcher.ngInjectableDef = defineInjectable({ factory: function OverlayKeyboardDispatcher_Factory() { return new OverlayKeyboardDispatcher(inject(DOCUMENT)); }, token: OverlayKeyboardDispatcher, providedIn: \"root\" });\n return OverlayKeyboardDispatcher;\n}());\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n * @param {?} dispatcher\n * @param {?} _document\n * @return {?}\n */\nfunction OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY(dispatcher, _document) {\n return dispatcher || new OverlayKeyboardDispatcher(_document);\n}\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n */\nvar /** @type {?} */ OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {\n // If there is already an OverlayKeyboardDispatcher available, use that.\n // Otherwise, provide a new one.\n provide: OverlayKeyboardDispatcher,\n deps: [\n [new Optional(), new SkipSelf(), OverlayKeyboardDispatcher],\n /** @type {?} */ (\n // Coerce to `InjectionToken` so that the `deps` match the \"shape\"\n // of the type expected by Angular\n DOCUMENT)\n ],\n useFactory: OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Container inside which all overlays will render.\n */\nvar OverlayContainer = /** @class */ (function () {\n function OverlayContainer(_document) {\n this._document = _document;\n }\n /**\n * @return {?}\n */\n OverlayContainer.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n if (this._containerElement && this._containerElement.parentNode) {\n this._containerElement.parentNode.removeChild(this._containerElement);\n }\n };\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @return {?} the container element\n */\n OverlayContainer.prototype.getContainerElement = /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @return {?} the container element\n */\n function () {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n };\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n * @return {?}\n */\n OverlayContainer.prototype._createContainer = /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n * @return {?}\n */\n function () {\n var /** @type {?} */ container = this._document.createElement('div');\n container.classList.add('cdk-overlay-container');\n this._document.body.appendChild(container);\n this._containerElement = container;\n };\n OverlayContainer.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n OverlayContainer.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n /** @nocollapse */ OverlayContainer.ngInjectableDef = defineInjectable({ factory: function OverlayContainer_Factory() { return new OverlayContainer(inject(DOCUMENT)); }, token: OverlayContainer, providedIn: \"root\" });\n return OverlayContainer;\n}());\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n * @param {?} parentContainer\n * @param {?} _document\n * @return {?}\n */\nfunction OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer, _document) {\n return parentContainer || new OverlayContainer(_document);\n}\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n */\nvar /** @type {?} */ OVERLAY_CONTAINER_PROVIDER = {\n // If there is already an OverlayContainer available, use that. Otherwise, provide a new one.\n provide: OverlayContainer,\n deps: [\n [new Optional(), new SkipSelf(), OverlayContainer],\n /** @type {?} */ (DOCUMENT // We need to use the InjectionToken somewhere to keep TS happy\n ) // We need to use the InjectionToken somewhere to keep TS happy\n ],\n useFactory: OVERLAY_CONTAINER_PROVIDER_FACTORY\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nvar /**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nOverlayRef = /** @class */ (function () {\n function OverlayRef(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document) {\n this._portalOutlet = _portalOutlet;\n this._host = _host;\n this._pane = _pane;\n this._config = _config;\n this._ngZone = _ngZone;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._document = _document;\n this._backdropElement = null;\n this._backdropClick = new Subject();\n this._attachments = new Subject();\n this._detachments = new Subject();\n /**\n * Stream of keydown events dispatched to this overlay.\n */\n this._keydownEvents = new Subject();\n if (_config.scrollStrategy) {\n _config.scrollStrategy.attach(this);\n }\n }\n Object.defineProperty(OverlayRef.prototype, \"overlayElement\", {\n /** The overlay's HTML element */\n get: /**\n * The overlay's HTML element\n * @return {?}\n */\n function () {\n return this._pane;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OverlayRef.prototype, \"backdropElement\", {\n /** The overlay's backdrop HTML element. */\n get: /**\n * The overlay's backdrop HTML element.\n * @return {?}\n */\n function () {\n return this._backdropElement;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OverlayRef.prototype, \"hostElement\", {\n /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n */\n get: /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n * @return {?}\n */\n function () {\n return this._host;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param portal Portal instance to which to attach the overlay.\n * @returns The portal attachment result.\n */\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param {?} portal Portal instance to which to attach the overlay.\n * @return {?} The portal attachment result.\n */\n OverlayRef.prototype.attach = /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param {?} portal Portal instance to which to attach the overlay.\n * @return {?} The portal attachment result.\n */\n function (portal) {\n var _this = this;\n var /** @type {?} */ attachResult = this._portalOutlet.attach(portal);\n if (this._config.positionStrategy) {\n this._config.positionStrategy.attach(this);\n }\n // Update the pane element with the given configuration.\n this._updateStackingOrder();\n this._updateElementSize();\n this._updateElementDirection();\n if (this._config.scrollStrategy) {\n this._config.scrollStrategy.enable();\n }\n // Update the position once the zone is stable so that the overlay will be fully rendered\n // before attempting to position it, as the position may depend on the size of the rendered\n // content.\n this._ngZone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(function () {\n // The overlay could've been detached before the zone has stabilized.\n if (_this.hasAttached()) {\n _this.updatePosition();\n }\n });\n // Enable pointer events for the overlay pane element.\n this._togglePointerEvents(true);\n if (this._config.hasBackdrop) {\n this._attachBackdrop();\n }\n if (this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, true);\n }\n // Only emit the `attachments` event once all other setup is done.\n this._attachments.next();\n // Track this overlay by the keyboard dispatcher\n this._keyboardDispatcher.add(this);\n return attachResult;\n };\n /**\n * Detaches an overlay from a portal.\n * @returns The portal detachment result.\n */\n /**\n * Detaches an overlay from a portal.\n * @return {?} The portal detachment result.\n */\n OverlayRef.prototype.detach = /**\n * Detaches an overlay from a portal.\n * @return {?} The portal detachment result.\n */\n function () {\n if (!this.hasAttached()) {\n return;\n }\n this.detachBackdrop();\n // When the overlay is detached, the pane element should disable pointer events.\n // This is necessary because otherwise the pane element will cover the page and disable\n // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n this._togglePointerEvents(false);\n if (this._config.positionStrategy && this._config.positionStrategy.detach) {\n this._config.positionStrategy.detach();\n }\n if (this._config.scrollStrategy) {\n this._config.scrollStrategy.disable();\n }\n var /** @type {?} */ detachmentResult = this._portalOutlet.detach();\n // Only emit after everything is detached.\n this._detachments.next();\n // Remove this overlay from keyboard dispatcher tracking\n this._keyboardDispatcher.remove(this);\n return detachmentResult;\n };\n /** Cleans up the overlay from the DOM. */\n /**\n * Cleans up the overlay from the DOM.\n * @return {?}\n */\n OverlayRef.prototype.dispose = /**\n * Cleans up the overlay from the DOM.\n * @return {?}\n */\n function () {\n var /** @type {?} */ isAttached = this.hasAttached();\n if (this._config.positionStrategy) {\n this._config.positionStrategy.dispose();\n }\n if (this._config.scrollStrategy) {\n this._config.scrollStrategy.disable();\n }\n this.detachBackdrop();\n this._keyboardDispatcher.remove(this);\n this._portalOutlet.dispose();\n this._attachments.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n if (this._host && this._host.parentNode) {\n this._host.parentNode.removeChild(this._host);\n this._host = /** @type {?} */ ((null));\n }\n this._pane = /** @type {?} */ ((null));\n if (isAttached) {\n this._detachments.next();\n }\n this._detachments.complete();\n };\n /** Whether the overlay has attached content. */\n /**\n * Whether the overlay has attached content.\n * @return {?}\n */\n OverlayRef.prototype.hasAttached = /**\n * Whether the overlay has attached content.\n * @return {?}\n */\n function () {\n return this._portalOutlet.hasAttached();\n };\n /** Gets an observable that emits when the backdrop has been clicked. */\n /**\n * Gets an observable that emits when the backdrop has been clicked.\n * @return {?}\n */\n OverlayRef.prototype.backdropClick = /**\n * Gets an observable that emits when the backdrop has been clicked.\n * @return {?}\n */\n function () {\n return this._backdropClick.asObservable();\n };\n /** Gets an observable that emits when the overlay has been attached. */\n /**\n * Gets an observable that emits when the overlay has been attached.\n * @return {?}\n */\n OverlayRef.prototype.attachments = /**\n * Gets an observable that emits when the overlay has been attached.\n * @return {?}\n */\n function () {\n return this._attachments.asObservable();\n };\n /** Gets an observable that emits when the overlay has been detached. */\n /**\n * Gets an observable that emits when the overlay has been detached.\n * @return {?}\n */\n OverlayRef.prototype.detachments = /**\n * Gets an observable that emits when the overlay has been detached.\n * @return {?}\n */\n function () {\n return this._detachments.asObservable();\n };\n /** Gets an observable of keydown events targeted to this overlay. */\n /**\n * Gets an observable of keydown events targeted to this overlay.\n * @return {?}\n */\n OverlayRef.prototype.keydownEvents = /**\n * Gets an observable of keydown events targeted to this overlay.\n * @return {?}\n */\n function () {\n return this._keydownEvents.asObservable();\n };\n /** Gets the the current overlay configuration, which is immutable. */\n /**\n * Gets the the current overlay configuration, which is immutable.\n * @return {?}\n */\n OverlayRef.prototype.getConfig = /**\n * Gets the the current overlay configuration, which is immutable.\n * @return {?}\n */\n function () {\n return this._config;\n };\n /** Updates the position of the overlay based on the position strategy. */\n /**\n * Updates the position of the overlay based on the position strategy.\n * @return {?}\n */\n OverlayRef.prototype.updatePosition = /**\n * Updates the position of the overlay based on the position strategy.\n * @return {?}\n */\n function () {\n if (this._config.positionStrategy) {\n this._config.positionStrategy.apply();\n }\n };\n /** Update the size properties of the overlay. */\n /**\n * Update the size properties of the overlay.\n * @param {?} sizeConfig\n * @return {?}\n */\n OverlayRef.prototype.updateSize = /**\n * Update the size properties of the overlay.\n * @param {?} sizeConfig\n * @return {?}\n */\n function (sizeConfig) {\n this._config = __assign({}, this._config, sizeConfig);\n this._updateElementSize();\n };\n /** Sets the LTR/RTL direction for the overlay. */\n /**\n * Sets the LTR/RTL direction for the overlay.\n * @param {?} dir\n * @return {?}\n */\n OverlayRef.prototype.setDirection = /**\n * Sets the LTR/RTL direction for the overlay.\n * @param {?} dir\n * @return {?}\n */\n function (dir) {\n this._config = __assign({}, this._config, { direction: dir });\n this._updateElementDirection();\n };\n /**\n * Updates the text direction of the overlay panel.\n * @return {?}\n */\n OverlayRef.prototype._updateElementDirection = /**\n * Updates the text direction of the overlay panel.\n * @return {?}\n */\n function () {\n this._pane.setAttribute('dir', /** @type {?} */ ((this._config.direction)));\n };\n /**\n * Updates the size of the overlay element based on the overlay config.\n * @return {?}\n */\n OverlayRef.prototype._updateElementSize = /**\n * Updates the size of the overlay element based on the overlay config.\n * @return {?}\n */\n function () {\n if (this._config.width || this._config.width === 0) {\n this._pane.style.width = coerceCssPixelValue(this._config.width);\n }\n if (this._config.height || this._config.height === 0) {\n this._pane.style.height = coerceCssPixelValue(this._config.height);\n }\n if (this._config.minWidth || this._config.minWidth === 0) {\n this._pane.style.minWidth = coerceCssPixelValue(this._config.minWidth);\n }\n if (this._config.minHeight || this._config.minHeight === 0) {\n this._pane.style.minHeight = coerceCssPixelValue(this._config.minHeight);\n }\n if (this._config.maxWidth || this._config.maxWidth === 0) {\n this._pane.style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n }\n if (this._config.maxHeight || this._config.maxHeight === 0) {\n this._pane.style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n }\n };\n /**\n * Toggles the pointer events for the overlay pane element.\n * @param {?} enablePointer\n * @return {?}\n */\n OverlayRef.prototype._togglePointerEvents = /**\n * Toggles the pointer events for the overlay pane element.\n * @param {?} enablePointer\n * @return {?}\n */\n function (enablePointer) {\n this._pane.style.pointerEvents = enablePointer ? 'auto' : 'none';\n };\n /**\n * Attaches a backdrop for this overlay.\n * @return {?}\n */\n OverlayRef.prototype._attachBackdrop = /**\n * Attaches a backdrop for this overlay.\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ showingClass = 'cdk-overlay-backdrop-showing';\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n } /** @type {?} */\n ((\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement)).insertBefore(this._backdropElement, this._host);\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', function (event) { return _this._backdropClick.next(event); });\n // Add class to fade-in the backdrop after one frame.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(function () {\n requestAnimationFrame(function () {\n if (_this._backdropElement) {\n _this._backdropElement.classList.add(showingClass);\n }\n });\n });\n }\n else {\n this._backdropElement.classList.add(showingClass);\n }\n };\n /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n * @return {?}\n */\n OverlayRef.prototype._updateStackingOrder = /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n * @return {?}\n */\n function () {\n if (this._host.nextSibling) {\n /** @type {?} */ ((this._host.parentNode)).appendChild(this._host);\n }\n };\n /** Detaches the backdrop (if any) associated with the overlay. */\n /**\n * Detaches the backdrop (if any) associated with the overlay.\n * @return {?}\n */\n OverlayRef.prototype.detachBackdrop = /**\n * Detaches the backdrop (if any) associated with the overlay.\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ backdropToDetach = this._backdropElement;\n if (backdropToDetach) {\n var /** @type {?} */ finishDetach_1 = function () {\n // It may not be attached to anything in certain cases (e.g. unit tests).\n if (backdropToDetach && backdropToDetach.parentNode) {\n backdropToDetach.parentNode.removeChild(backdropToDetach);\n }\n // It is possible that a new portal has been attached to this overlay since we started\n // removing the backdrop. If that is the case, only clear the backdrop reference if it\n // is still the same instance that we started to remove.\n if (_this._backdropElement == backdropToDetach) {\n _this._backdropElement = null;\n }\n };\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n if (this._config.backdropClass) {\n this._toggleClasses(backdropToDetach, this._config.backdropClass, false);\n }\n backdropToDetach.addEventListener('transitionend', finishDetach_1);\n // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n // In this case we make it unclickable and we try to remove it after a delay.\n backdropToDetach.style.pointerEvents = 'none';\n // Run this outside the Angular zone because there's nothing that Angular cares about.\n // If it were to run inside the Angular zone, every test that used Overlay would have to be\n // either async or fakeAsync.\n this._ngZone.runOutsideAngular(function () { return setTimeout(finishDetach_1, 500); });\n }\n };\n /**\n * Toggles a single CSS class or an array of classes on an element.\n * @param {?} element\n * @param {?} cssClasses\n * @param {?} isAdd\n * @return {?}\n */\n OverlayRef.prototype._toggleClasses = /**\n * Toggles a single CSS class or an array of classes on an element.\n * @param {?} element\n * @param {?} cssClasses\n * @param {?} isAdd\n * @return {?}\n */\n function (element, cssClasses, isAdd) {\n var /** @type {?} */ classList = element.classList;\n coerceArray(cssClasses).forEach(function (cssClass) {\n // We can't do a spread here, because IE doesn't support setting multiple classes.\n isAdd ? classList.add(cssClass) : classList.remove(cssClass);\n });\n };\n return OverlayRef;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nvar /**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nFlexibleConnectedPositionStrategy = /** @class */ (function () {\n function FlexibleConnectedPositionStrategy(_connectedTo, _viewportRuler, _document, _platform) {\n this._connectedTo = _connectedTo;\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n /**\n * Whether we're performing the very first positioning of the overlay.\n */\n this._isInitialRender = true;\n /**\n * Last size used for the bounding box. Used to avoid resizing the overlay after open.\n */\n this._lastBoundingBoxSize = { width: 0, height: 0 };\n /**\n * Whether the overlay was pushed in a previous positioning.\n */\n this._isPushed = false;\n /**\n * Whether the overlay can be pushed on-screen on the initial open.\n */\n this._canPush = true;\n /**\n * Whether the overlay can grow via flexible width/height after the initial open.\n */\n this._growAfterOpen = false;\n /**\n * Whether the overlay's width and height can be constrained to fit within the viewport.\n */\n this._hasFlexibleDimensions = true;\n /**\n * Whether the overlay position is locked.\n */\n this._positionLocked = false;\n /**\n * Amount of space that must be maintained between the overlay and the edge of the viewport.\n */\n this._viewportMargin = 0;\n /**\n * The Scrollable containers used to check scrollable view properties on position change.\n */\n this.scrollables = [];\n /**\n * Ordered list of preferred positions, from most to least desirable.\n */\n this._preferredPositions = [];\n /**\n * Subject that emits whenever the position changes.\n */\n this._positionChanges = new Subject();\n /**\n * Subscription to viewport size changes.\n */\n this._resizeSubscription = Subscription.EMPTY;\n /**\n * Default offset for the overlay along the x axis.\n */\n this._offsetX = 0;\n /**\n * Default offset for the overlay along the y axis.\n */\n this._offsetY = 0;\n /**\n * Observable sequence of position changes.\n */\n this.positionChanges = this._positionChanges.asObservable();\n this._origin = this._connectedTo.nativeElement;\n }\n Object.defineProperty(FlexibleConnectedPositionStrategy.prototype, \"positions\", {\n /** Ordered list of preferred positions, from most to least desirable. */\n get: /**\n * Ordered list of preferred positions, from most to least desirable.\n * @return {?}\n */\n function () {\n return this._preferredPositions;\n },\n enumerable: true,\n configurable: true\n });\n /** Attaches this position strategy to an overlay. */\n /**\n * Attaches this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.attach = /**\n * Attaches this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n var _this = this;\n if (this._overlayRef && overlayRef !== this._overlayRef) {\n throw Error('This position strategy is already attached to an overlay');\n }\n this._validatePositions();\n overlayRef.hostElement.classList.add('cdk-overlay-connected-position-bounding-box');\n this._overlayRef = overlayRef;\n this._boundingBox = /** @type {?} */ ((overlayRef.hostElement));\n this._pane = overlayRef.overlayElement;\n this._resizeSubscription.unsubscribe();\n this._resizeSubscription = this._viewportRuler.change().subscribe(function () { return _this.apply(); });\n };\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satifies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * @docs-private\n */\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satifies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * \\@docs-private\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.apply = /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satifies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * \\@docs-private\n * @return {?}\n */\n function () {\n // We shouldn't do anything if the strategy was disposed or we're on the server.\n if (this._isDisposed || (this._platform && !this._platform.isBrowser)) {\n return;\n }\n // If the position has been applied already (e.g. when the overlay was opened) and the\n // consumer opted into locking in the position, re-use the old position, in order to\n // prevent the overlay from jumping around.\n if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n this.reapplyLastPosition();\n return;\n }\n this._resetOverlayElementStyles();\n this._resetBoundingBoxStyles();\n // We need the bounding rects for the origin and the overlay to determine how to position\n // the overlay relative to the origin.\n // We use the viewport rect to determine whether a position would go off-screen.\n this._viewportRect = this._getNarrowedViewportRect();\n this._originRect = this._origin.getBoundingClientRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n var /** @type {?} */ originRect = this._originRect;\n var /** @type {?} */ overlayRect = this._overlayRect;\n var /** @type {?} */ viewportRect = this._viewportRect;\n // Positions where the overlay will fit with flexible dimensions.\n var /** @type {?} */ flexibleFits = [];\n // Fallback if none of the preferred positions fit within the viewport.\n var /** @type {?} */ fallback;\n // Go through each of the preferred positions looking for a good fit.\n // If a good fit is found, it will be applied immediately.\n for (var _i = 0, _a = this._preferredPositions; _i < _a.length; _i++) {\n var pos = _a[_i];\n // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n var /** @type {?} */ originPoint = this._getOriginPoint(originRect, pos);\n // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n // overlay in this position. We use the top-left corner for calculations and later translate\n // this into an appropriate (top, left, bottom, right) style.\n var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n // Calculate how well the overlay would fit into the viewport with this point.\n var /** @type {?} */ overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n // If the overlay, without any further work, fits into the viewport, use this position.\n if (overlayFit.isCompletelyWithinViewport) {\n this._isPushed = false;\n this._applyPosition(pos, originPoint);\n return;\n }\n // If the overlay has flexible dimensions, we can use this position\n // so long as there's enough space for the minimum dimensions.\n if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n // Save positions where the overlay will fit with flexible dimensions. We will use these\n // if none of the positions fit *without* flexible dimensions.\n flexibleFits.push({\n position: pos,\n origin: originPoint,\n overlayRect: overlayRect,\n boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos)\n });\n continue;\n }\n // If the current preferred position does not fit on the screen, remember the position\n // if it has more visible area on-screen than we've seen and move onto the next preferred\n // position.\n if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n fallback = { overlayFit: overlayFit, overlayPoint: overlayPoint, originPoint: originPoint, position: pos, overlayRect: overlayRect };\n }\n }\n // If there are any positions where the overlay would fit with flexible dimensions, choose the\n // one that has the greatest area available modified by the position's weight\n if (flexibleFits.length) {\n var /** @type {?} */ bestFit = null;\n var /** @type {?} */ bestScore = -1;\n for (var _b = 0, flexibleFits_1 = flexibleFits; _b < flexibleFits_1.length; _b++) {\n var fit_1 = flexibleFits_1[_b];\n var /** @type {?} */ score = fit_1.boundingBoxRect.width * fit_1.boundingBoxRect.height * (fit_1.position.weight || 1);\n if (score > bestScore) {\n bestScore = score;\n bestFit = fit_1;\n }\n }\n this._isPushed = false;\n this._applyPosition(/** @type {?} */ ((bestFit)).position, /** @type {?} */ ((bestFit)).origin);\n return;\n }\n // When none of the preferred positions fit within the viewport, take the position\n // that went off-screen the least and attempt to push it on-screen.\n if (this._canPush) {\n // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n this._isPushed = true;\n this._applyPosition(/** @type {?} */ ((fallback)).position, /** @type {?} */ ((fallback)).originPoint);\n return;\n }\n // All options for getting the overlay within the viewport have been exhausted, so go with the\n // position that went off-screen the least.\n this._applyPosition(/** @type {?} */ ((fallback)).position, /** @type {?} */ ((fallback)).originPoint);\n };\n /**\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.detach = /**\n * @return {?}\n */\n function () {\n this._resizeSubscription.unsubscribe();\n };\n /** Cleanup after the element gets destroyed. */\n /**\n * Cleanup after the element gets destroyed.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.dispose = /**\n * Cleanup after the element gets destroyed.\n * @return {?}\n */\n function () {\n if (!this._isDisposed) {\n this.detach();\n this._boundingBox = null;\n this._positionChanges.complete();\n this._isDisposed = true;\n }\n };\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.reapplyLastPosition = /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n * @return {?}\n */\n function () {\n if (!this._isDisposed && (!this._platform || this._platform.isBrowser)) {\n this._originRect = this._origin.getBoundingClientRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._viewportRect = this._getNarrowedViewportRect();\n var /** @type {?} */ lastPosition = this._lastPosition || this._preferredPositions[0];\n var /** @type {?} */ originPoint = this._getOriginPoint(this._originRect, lastPosition);\n this._applyPosition(lastPosition, originPoint);\n }\n };\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n * @param {?} scrollables\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withScrollableContainers = /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n * @param {?} scrollables\n * @return {?}\n */\n function (scrollables) {\n this.scrollables = scrollables;\n };\n /**\n * Adds a new preferred fallback position.\n * @param positions List of positions options for this overlay.\n */\n /**\n * Adds a new preferred fallback position.\n * @param {?} positions List of positions options for this overlay.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withPositions = /**\n * Adds a new preferred fallback position.\n * @param {?} positions List of positions options for this overlay.\n * @return {?}\n */\n function (positions) {\n this._preferredPositions = positions;\n // If the last calculated position object isn't part of the positions anymore, clear\n // it in order to avoid it being picked up if the consumer tries to re-apply.\n if (positions.indexOf(/** @type {?} */ ((this._lastPosition))) === -1) {\n this._lastPosition = null;\n }\n this._validatePositions();\n return this;\n };\n /**\n * Sets a minimum distance the ovelray may be positioned to the edge of the viewport.\n * @param margin Required margin between the overlay and the viewport edge in pixels.\n */\n /**\n * Sets a minimum distance the ovelray may be positioned to the edge of the viewport.\n * @param {?} margin Required margin between the overlay and the viewport edge in pixels.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withViewportMargin = /**\n * Sets a minimum distance the ovelray may be positioned to the edge of the viewport.\n * @param {?} margin Required margin between the overlay and the viewport edge in pixels.\n * @return {?}\n */\n function (margin) {\n this._viewportMargin = margin;\n return this;\n };\n /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n /**\n * Sets whether the overlay's width and height can be constrained to fit within the viewport.\n * @param {?=} flexibleDimensions\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withFlexibleDimensions = /**\n * Sets whether the overlay's width and height can be constrained to fit within the viewport.\n * @param {?=} flexibleDimensions\n * @return {?}\n */\n function (flexibleDimensions) {\n if (flexibleDimensions === void 0) { flexibleDimensions = true; }\n this._hasFlexibleDimensions = flexibleDimensions;\n return this;\n };\n /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n /**\n * Sets whether the overlay can grow after the initial open via flexible width/height.\n * @param {?=} growAfterOpen\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withGrowAfterOpen = /**\n * Sets whether the overlay can grow after the initial open via flexible width/height.\n * @param {?=} growAfterOpen\n * @return {?}\n */\n function (growAfterOpen) {\n if (growAfterOpen === void 0) { growAfterOpen = true; }\n this._growAfterOpen = growAfterOpen;\n return this;\n };\n /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n /**\n * Sets whether the overlay can be pushed on-screen if none of the provided positions fit.\n * @param {?=} canPush\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withPush = /**\n * Sets whether the overlay can be pushed on-screen if none of the provided positions fit.\n * @param {?=} canPush\n * @return {?}\n */\n function (canPush) {\n if (canPush === void 0) { canPush = true; }\n this._canPush = canPush;\n return this;\n };\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param {?=} isLocked Whether the overlay should locked in.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withLockedPosition = /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param {?=} isLocked Whether the overlay should locked in.\n * @return {?}\n */\n function (isLocked) {\n if (isLocked === void 0) { isLocked = true; }\n this._positionLocked = isLocked;\n return this;\n };\n /**\n * Sets the origin element, relative to which to position the overlay.\n * @param origin Reference to the new origin element.\n */\n /**\n * Sets the origin element, relative to which to position the overlay.\n * @param {?} origin Reference to the new origin element.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.setOrigin = /**\n * Sets the origin element, relative to which to position the overlay.\n * @param {?} origin Reference to the new origin element.\n * @return {?}\n */\n function (origin) {\n this._origin = origin.nativeElement;\n return this;\n };\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param offset New offset in the X axis.\n */\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param {?} offset New offset in the X axis.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withDefaultOffsetX = /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param {?} offset New offset in the X axis.\n * @return {?}\n */\n function (offset) {\n this._offsetX = offset;\n return this;\n };\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param offset New offset in the Y axis.\n */\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param {?} offset New offset in the Y axis.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype.withDefaultOffsetY = /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param {?} offset New offset in the Y axis.\n * @return {?}\n */\n function (offset) {\n this._offsetY = offset;\n return this;\n };\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n * @param {?} originRect\n * @param {?} pos\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getOriginPoint = /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n * @param {?} originRect\n * @param {?} pos\n * @return {?}\n */\n function (originRect, pos) {\n var /** @type {?} */ x;\n if (pos.originX == 'center') {\n // Note: when centering we should always use the `left`\n // offset, otherwise the position will be wrong in RTL.\n x = originRect.left + (originRect.width / 2);\n }\n else {\n var /** @type {?} */ startX = this._isRtl() ? originRect.right : originRect.left;\n var /** @type {?} */ endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n var /** @type {?} */ y;\n if (pos.originY == 'center') {\n y = originRect.top + (originRect.height / 2);\n }\n else {\n y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n }\n return { x: x, y: y };\n };\n /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n * @param {?} originPoint\n * @param {?} overlayRect\n * @param {?} pos\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getOverlayPoint = /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n * @param {?} originPoint\n * @param {?} overlayRect\n * @param {?} pos\n * @return {?}\n */\n function (originPoint, overlayRect, pos) {\n // Calculate the (overlayStartX, overlayStartY), the start of the\n // potential overlay position relative to the origin point.\n var /** @type {?} */ overlayStartX;\n if (pos.overlayX == 'center') {\n overlayStartX = -overlayRect.width / 2;\n }\n else if (pos.overlayX === 'start') {\n overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n }\n else {\n overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n }\n var /** @type {?} */ overlayStartY;\n if (pos.overlayY == 'center') {\n overlayStartY = -overlayRect.height / 2;\n }\n else {\n overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n }\n // The (x, y) coordinates of the overlay.\n return {\n x: originPoint.x + overlayStartX,\n y: originPoint.y + overlayStartY,\n };\n };\n /**\n * Gets how well an overlay at the given point will fit within the viewport.\n * @param {?} point\n * @param {?} overlay\n * @param {?} viewport\n * @param {?} position\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getOverlayFit = /**\n * Gets how well an overlay at the given point will fit within the viewport.\n * @param {?} point\n * @param {?} overlay\n * @param {?} viewport\n * @param {?} position\n * @return {?}\n */\n function (point, overlay, viewport, position) {\n var x = point.x, y = point.y;\n var /** @type {?} */ offsetX = this._getOffset(position, 'x');\n var /** @type {?} */ offsetY = this._getOffset(position, 'y');\n // Account for the offsets since they could push the overlay out of the viewport.\n if (offsetX) {\n x += offsetX;\n }\n if (offsetY) {\n y += offsetY;\n }\n // How much the overlay would overflow at this position, on each side.\n var /** @type {?} */ leftOverflow = 0 - x;\n var /** @type {?} */ rightOverflow = (x + overlay.width) - viewport.width;\n var /** @type {?} */ topOverflow = 0 - y;\n var /** @type {?} */ bottomOverflow = (y + overlay.height) - viewport.height;\n // Visible parts of the element on each axis.\n var /** @type {?} */ visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n var /** @type {?} */ visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n var /** @type {?} */ visibleArea = visibleWidth * visibleHeight;\n return {\n visibleArea: visibleArea,\n isCompletelyWithinViewport: (overlay.width * overlay.height) === visibleArea,\n fitsInViewportVertically: visibleHeight === overlay.height,\n fitsInViewportHorizontally: visibleWidth == overlay.width,\n };\n };\n /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param {?} fit How well the overlay fits in the viewport at some position.\n * @param {?} point The (x, y) coordinates of the overlat at some position.\n * @param {?} viewport The geometry of the viewport.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._canFitWithFlexibleDimensions = /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param {?} fit How well the overlay fits in the viewport at some position.\n * @param {?} point The (x, y) coordinates of the overlat at some position.\n * @param {?} viewport The geometry of the viewport.\n * @return {?}\n */\n function (fit, point, viewport) {\n if (this._hasFlexibleDimensions) {\n var /** @type {?} */ availableHeight = viewport.bottom - point.y;\n var /** @type {?} */ availableWidth = viewport.right - point.x;\n var /** @type {?} */ minHeight = this._overlayRef.getConfig().minHeight;\n var /** @type {?} */ minWidth = this._overlayRef.getConfig().minWidth;\n var /** @type {?} */ verticalFit = fit.fitsInViewportVertically ||\n (minHeight != null && minHeight <= availableHeight);\n var /** @type {?} */ horizontalFit = fit.fitsInViewportHorizontally ||\n (minWidth != null && minWidth <= availableWidth);\n return verticalFit && horizontalFit;\n }\n };\n /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the\n * right and bottom).\n *\n * @param {?} start The starting point from which the overlay is pushed.\n * @param {?} overlay The overlay dimensions.\n * @return {?} The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n FlexibleConnectedPositionStrategy.prototype._pushOverlayOnScreen = /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the\n * right and bottom).\n *\n * @param {?} start The starting point from which the overlay is pushed.\n * @param {?} overlay The overlay dimensions.\n * @return {?} The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n function (start, overlay) {\n var /** @type {?} */ viewport = this._viewportRect;\n // Determine how much the overlay goes outside the viewport on each side, which we'll use to\n // decide which direction to push it.\n var /** @type {?} */ overflowRight = Math.max(start.x + overlay.width - viewport.right, 0);\n var /** @type {?} */ overflowBottom = Math.max(start.y + overlay.height - viewport.bottom, 0);\n var /** @type {?} */ overflowTop = Math.max(viewport.top - start.y, 0);\n var /** @type {?} */ overflowLeft = Math.max(viewport.left - start.x, 0);\n // Amount by which to push the overlay in each direction such that it remains on-screen.\n var /** @type {?} */ pushX, /** @type {?} */ pushY = 0;\n // If the overlay fits completely within the bounds of the viewport, push it from whichever\n // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n // viewport and allow for the trailing end of the overlay to go out of bounds.\n if (overlay.width <= viewport.width) {\n pushX = overflowLeft || -overflowRight;\n }\n else {\n pushX = viewport.left - start.x;\n }\n if (overlay.height <= viewport.height) {\n pushY = overflowTop || -overflowBottom;\n }\n else {\n pushY = viewport.top - start.y;\n }\n return {\n x: start.x + pushX,\n y: start.y + pushY,\n };\n };\n /**\n * Applies a computed position to the overlay and emits a position change.\n *\n * @param {?} position The position preference\n * @param {?} originPoint The point on the origin element where the overlay is connected.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._applyPosition = /**\n * Applies a computed position to the overlay and emits a position change.\n *\n * @param {?} position The position preference\n * @param {?} originPoint The point on the origin element where the overlay is connected.\n * @return {?}\n */\n function (position, originPoint) {\n this._setOverlayElementStyles(originPoint, position);\n this._setBoundingBoxStyles(originPoint, position);\n // Save the last connected position in case the position needs to be re-calculated.\n this._lastPosition = position;\n // Notify that the position has been changed along with its change properties.\n var /** @type {?} */ scrollableViewProperties = this._getScrollVisibility();\n var /** @type {?} */ changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);\n this._positionChanges.next(changeEvent);\n this._isInitialRender = false;\n };\n /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n * @param {?} origin\n * @param {?} position\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._calculateBoundingBoxRect = /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n * @param {?} origin\n * @param {?} position\n * @return {?}\n */\n function (origin, position) {\n var /** @type {?} */ viewport = this._viewportRect;\n var /** @type {?} */ isRtl = this._isRtl();\n var /** @type {?} */ height, /** @type {?} */ top, /** @type {?} */ bottom;\n if (position.overlayY === 'top') {\n // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n top = origin.y;\n height = viewport.bottom - origin.y;\n }\n else if (position.overlayY === 'bottom') {\n // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n // the viewport margin back in, because the viewport rect is narrowed down to remove the\n // margin, whereas the `origin` position is calculated based on its `ClientRect`.\n bottom = viewport.height - origin.y + this._viewportMargin * 2;\n height = viewport.height - bottom + this._viewportMargin;\n }\n else {\n // If neither top nor bottom, it means that the overlay\n // is vertically centered on the origin point.\n var /** @type {?} */ smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y, origin.y - viewport.left);\n var /** @type {?} */ previousHeight = this._lastBoundingBoxSize.height;\n height = smallestDistanceToViewportEdge * 2;\n top = origin.y - smallestDistanceToViewportEdge;\n if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n top = origin.y - (previousHeight / 2);\n }\n }\n // The overlay is opening 'right-ward' (the content flows to the right).\n var /** @type {?} */ isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) ||\n (position.overlayX === 'end' && isRtl);\n // The overlay is opening 'left-ward' (the content flows to the left).\n var /** @type {?} */ isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) ||\n (position.overlayX === 'start' && isRtl);\n var /** @type {?} */ width, /** @type {?} */ left, /** @type {?} */ right;\n if (isBoundedByLeftViewportEdge) {\n right = viewport.right - origin.x + this._viewportMargin;\n width = origin.x - viewport.left;\n }\n else if (isBoundedByRightViewportEdge) {\n left = origin.x;\n width = viewport.right - origin.x;\n }\n else {\n // If neither start nor end, it means that the overlay\n // is horizontally centered on the origin point.\n var /** @type {?} */ smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x, origin.x - viewport.top);\n var /** @type {?} */ previousWidth = this._lastBoundingBoxSize.width;\n width = smallestDistanceToViewportEdge * 2;\n left = origin.x - smallestDistanceToViewportEdge;\n if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n left = origin.x - (previousWidth / 2);\n }\n }\n return { top: top, left: left, bottom: bottom, right: right, width: width, height: height };\n };\n /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stetches to the bounds of the viewport.\n *\n * @param {?} origin The point on the origin element where the overlay is connected.\n * @param {?} position The position preference\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._setBoundingBoxStyles = /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stetches to the bounds of the viewport.\n *\n * @param {?} origin The point on the origin element where the overlay is connected.\n * @param {?} position The position preference\n * @return {?}\n */\n function (origin, position) {\n var /** @type {?} */ boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n // when applying a new size.\n if (!this._isInitialRender && !this._growAfterOpen) {\n boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n }\n var /** @type {?} */ styles = /** @type {?} */ ({});\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = '';\n styles.width = styles.height = '100%';\n }\n else {\n var /** @type {?} */ maxHeight = this._overlayRef.getConfig().maxHeight;\n var /** @type {?} */ maxWidth = this._overlayRef.getConfig().maxWidth;\n styles.height = coerceCssPixelValue(boundingBoxRect.height);\n styles.top = coerceCssPixelValue(boundingBoxRect.top);\n styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n styles.width = coerceCssPixelValue(boundingBoxRect.width);\n styles.left = coerceCssPixelValue(boundingBoxRect.left);\n styles.right = coerceCssPixelValue(boundingBoxRect.right);\n // Push the pane content towards the proper direction.\n if (position.overlayX === 'center') {\n styles.alignItems = 'center';\n }\n else if (this._isRtl()) {\n styles.alignItems = position.overlayX === 'end' ? 'flex-start' : 'flex-end';\n }\n else {\n styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n }\n if (position.overlayY === 'center') {\n styles.justifyContent = 'center';\n }\n else {\n styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n }\n if (maxHeight) {\n styles.maxHeight = coerceCssPixelValue(maxHeight);\n }\n if (maxWidth) {\n styles.maxWidth = coerceCssPixelValue(maxWidth);\n }\n }\n this._lastBoundingBoxSize = boundingBoxRect;\n extendStyles(/** @type {?} */ ((this._boundingBox)).style, styles);\n };\n /**\n * Resets the styles for the bounding box so that a new positioning can be computed.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._resetBoundingBoxStyles = /**\n * Resets the styles for the bounding box so that a new positioning can be computed.\n * @return {?}\n */\n function () {\n extendStyles(/** @type {?} */ ((this._boundingBox)).style, /** @type {?} */ ({\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n }));\n };\n /**\n * Resets the styles for the overlay pane so that a new positioning can be computed.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._resetOverlayElementStyles = /**\n * Resets the styles for the overlay pane so that a new positioning can be computed.\n * @return {?}\n */\n function () {\n extendStyles(this._pane.style, /** @type {?} */ ({\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n }));\n };\n /**\n * Sets positioning styles to the overlay element.\n * @param {?} originPoint\n * @param {?} position\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._setOverlayElementStyles = /**\n * Sets positioning styles to the overlay element.\n * @param {?} originPoint\n * @param {?} position\n * @return {?}\n */\n function (originPoint, position) {\n var /** @type {?} */ styles = /** @type {?} */ ({});\n if (this._hasExactPosition()) {\n extendStyles(styles, this._getExactOverlayY(position, originPoint));\n extendStyles(styles, this._getExactOverlayX(position, originPoint));\n }\n else {\n styles.position = 'static';\n }\n // Use a transform to apply the offsets. We do this because the `center` positions rely on\n // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n // off the position. We also can't use margins, because they won't have an effect in some\n // cases where the element doesn't have anything to \"push off of\". Finally, this works\n // better both with flexible and non-flexible positioning.\n var /** @type {?} */ transformString = '';\n var /** @type {?} */ offsetX = this._getOffset(position, 'x');\n var /** @type {?} */ offsetY = this._getOffset(position, 'y');\n if (offsetX) {\n transformString += \"translateX(\" + offsetX + \"px) \";\n }\n if (offsetY) {\n transformString += \"translateY(\" + offsetY + \"px)\";\n }\n styles.transform = transformString.trim();\n // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxHeight) {\n styles.maxHeight = '';\n }\n if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxWidth) {\n styles.maxWidth = '';\n }\n extendStyles(this._pane.style, styles);\n };\n /**\n * Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.\n * @param {?} position\n * @param {?} originPoint\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getExactOverlayY = /**\n * Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.\n * @param {?} position\n * @param {?} originPoint\n * @return {?}\n */\n function (position, originPoint) {\n // Reset any existing styles. This is necessary in case the\n // preferred position has changed since the last `apply`.\n var /** @type {?} */ styles = /** @type {?} */ ({ top: null, bottom: null });\n var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect);\n }\n // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n // above or below the origin and the direction in which the element will expand.\n if (position.overlayY === 'bottom') {\n // When using `bottom`, we adjust the y position such that it is the distance\n // from the bottom of the viewport rather than the top.\n var /** @type {?} */ documentHeight = this._document.documentElement.clientHeight;\n styles.bottom = documentHeight - (overlayPoint.y + this._overlayRect.height) + \"px\";\n }\n else {\n styles.top = coerceCssPixelValue(overlayPoint.y);\n }\n return styles;\n };\n /**\n * Gets the exact left/right for the overlay when not using flexible sizing or when pushing.\n * @param {?} position\n * @param {?} originPoint\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getExactOverlayX = /**\n * Gets the exact left/right for the overlay when not using flexible sizing or when pushing.\n * @param {?} position\n * @param {?} originPoint\n * @return {?}\n */\n function (position, originPoint) {\n // Reset any existing styles. This is necessary in case the preferred position has\n // changed since the last `apply`.\n var /** @type {?} */ styles = /** @type {?} */ ({ left: null, right: null });\n var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect);\n }\n // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n // or \"after\" the origin, which determines the direction in which the element will expand.\n // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n // page is in RTL or LTR.\n var /** @type {?} */ horizontalStyleProperty;\n if (this._isRtl()) {\n horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n }\n else {\n horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n }\n // When we're setting `right`, we adjust the x position such that it is the distance\n // from the right edge of the viewport rather than the left edge.\n if (horizontalStyleProperty === 'right') {\n var /** @type {?} */ documentWidth = this._document.documentElement.clientWidth;\n styles.right = documentWidth - (overlayPoint.x + this._overlayRect.width) + \"px\";\n }\n else {\n styles.left = coerceCssPixelValue(overlayPoint.x);\n }\n return styles;\n };\n /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getScrollVisibility = /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n * @return {?}\n */\n function () {\n // Note: needs fresh rects since the position could've changed.\n var /** @type {?} */ originBounds = this._origin.getBoundingClientRect();\n var /** @type {?} */ overlayBounds = this._pane.getBoundingClientRect();\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n var /** @type {?} */ scrollContainerBounds = this.scrollables.map(function (scrollable) {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n };\n /**\n * Subtracts the amount that an element is overflowing on an axis from it's length.\n * @param {?} length\n * @param {...?} overflows\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._subtractOverflows = /**\n * Subtracts the amount that an element is overflowing on an axis from it's length.\n * @param {?} length\n * @param {...?} overflows\n * @return {?}\n */\n function (length) {\n var overflows = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n overflows[_i - 1] = arguments[_i];\n }\n return overflows.reduce(function (currentValue, currentOverflow) {\n return currentValue - Math.max(currentOverflow, 0);\n }, length);\n };\n /**\n * Narrows the given viewport rect by the current _viewportMargin.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getNarrowedViewportRect = /**\n * Narrows the given viewport rect by the current _viewportMargin.\n * @return {?}\n */\n function () {\n // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n // and `innerHeight` that do. This is necessary, because the overlay container uses\n // 100% `width` and `height` which don't include the scrollbar either.\n var /** @type {?} */ width = this._document.documentElement.clientWidth;\n var /** @type {?} */ height = this._document.documentElement.clientHeight;\n var /** @type {?} */ scrollPosition = this._viewportRuler.getViewportScrollPosition();\n return {\n top: scrollPosition.top + this._viewportMargin,\n left: scrollPosition.left + this._viewportMargin,\n right: scrollPosition.left + width - this._viewportMargin,\n bottom: scrollPosition.top + height - this._viewportMargin,\n width: width - (2 * this._viewportMargin),\n height: height - (2 * this._viewportMargin),\n };\n };\n /**\n * Whether the we're dealing with an RTL context\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._isRtl = /**\n * Whether the we're dealing with an RTL context\n * @return {?}\n */\n function () {\n return this._overlayRef.getConfig().direction === 'rtl';\n };\n /**\n * Determines whether the overlay uses exact or flexible positioning.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._hasExactPosition = /**\n * Determines whether the overlay uses exact or flexible positioning.\n * @return {?}\n */\n function () {\n return !this._hasFlexibleDimensions || this._isPushed;\n };\n /**\n * Retrieves the offset of a position along the x or y axis.\n * @param {?} position\n * @param {?} axis\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._getOffset = /**\n * Retrieves the offset of a position along the x or y axis.\n * @param {?} position\n * @param {?} axis\n * @return {?}\n */\n function (position, axis) {\n if (axis === 'x') {\n // We don't do something like `position['offset' + axis]` in\n // order to avoid breking minifiers that rename properties.\n return position.offsetX == null ? this._offsetX : position.offsetX;\n }\n return position.offsetY == null ? this._offsetY : position.offsetY;\n };\n /**\n * Validates that the current position match the expected values.\n * @return {?}\n */\n FlexibleConnectedPositionStrategy.prototype._validatePositions = /**\n * Validates that the current position match the expected values.\n * @return {?}\n */\n function () {\n if (!this._preferredPositions.length) {\n throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n }\n // TODO(crisbeto): remove these once Angular's template type\n // checking is advanced enough to catch these cases.\n this._preferredPositions.forEach(function (pair) {\n validateHorizontalPosition('originX', pair.originX);\n validateVerticalPosition('originY', pair.originY);\n validateHorizontalPosition('overlayX', pair.overlayX);\n validateVerticalPosition('overlayY', pair.overlayY);\n });\n };\n return FlexibleConnectedPositionStrategy;\n}());\n/**\n * Shallow-extends a stylesheet object with another stylesheet object.\n * @param {?} dest\n * @param {?} source\n * @return {?}\n */\nfunction extendStyles(dest, source) {\n for (var /** @type {?} */ key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key] = source[key];\n }\n }\n return dest;\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative to some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n * @deprecated Use `FlexibleConnectedPositionStrategy` instead.\n * \\@deletion-target 7.0.0\n */\nvar /**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative to some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n * @deprecated Use `FlexibleConnectedPositionStrategy` instead.\n * \\@deletion-target 7.0.0\n */\nConnectedPositionStrategy = /** @class */ (function () {\n function ConnectedPositionStrategy(originPos, overlayPos, connectedTo, viewportRuler, document, \n // @deletion-target 7.0.0 `platform` parameter to be made required.\n // @deletion-target 7.0.0 `platform` parameter to be made required.\n platform) {\n /**\n * Ordered list of preferred positions, from most to least desirable.\n */\n this._preferredPositions = [];\n // Since the `ConnectedPositionStrategy` is deprecated and we don't want to maintain\n // the extra logic, we create an instance of the positioning strategy that has some\n // defaults that make it behave as the old position strategy and to which we'll\n // proxy all of the API calls.\n this._positionStrategy =\n new FlexibleConnectedPositionStrategy(connectedTo, viewportRuler, document, platform)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withViewportMargin(0);\n this.withFallbackPosition(originPos, overlayPos);\n }\n Object.defineProperty(ConnectedPositionStrategy.prototype, \"_isRtl\", {\n /** Whether the we're dealing with an RTL context */\n get: /**\n * Whether the we're dealing with an RTL context\n * @return {?}\n */\n function () {\n return this._overlayRef.getConfig().direction === 'rtl';\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ConnectedPositionStrategy.prototype, \"onPositionChange\", {\n /** Emits an event when the connection point changes. */\n get: /**\n * Emits an event when the connection point changes.\n * @return {?}\n */\n function () {\n return this._positionStrategy.positionChanges;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ConnectedPositionStrategy.prototype, \"positions\", {\n /** Ordered list of preferred positions, from most to least desirable. */\n get: /**\n * Ordered list of preferred positions, from most to least desirable.\n * @return {?}\n */\n function () {\n return this._preferredPositions;\n },\n enumerable: true,\n configurable: true\n });\n /** Attach this position strategy to an overlay. */\n /**\n * Attach this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.attach = /**\n * Attach this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n this._overlayRef = overlayRef;\n this._positionStrategy.attach(overlayRef);\n if (this._direction) {\n overlayRef.setDirection(this._direction);\n this._direction = null;\n }\n };\n /** Disposes all resources used by the position strategy. */\n /**\n * Disposes all resources used by the position strategy.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.dispose = /**\n * Disposes all resources used by the position strategy.\n * @return {?}\n */\n function () {\n this._positionStrategy.dispose();\n };\n /** @docs-private */\n /**\n * \\@docs-private\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.detach = /**\n * \\@docs-private\n * @return {?}\n */\n function () {\n this._positionStrategy.detach();\n };\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin fits on-screen.\n * @docs-private\n */\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin fits on-screen.\n * \\@docs-private\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.apply = /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin fits on-screen.\n * \\@docs-private\n * @return {?}\n */\n function () {\n this._positionStrategy.apply();\n };\n /**\n * Re-positions the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n /**\n * Re-positions the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.recalculateLastPosition = /**\n * Re-positions the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n * @return {?}\n */\n function () {\n this._positionStrategy.reapplyLastPosition();\n };\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n * @param {?} scrollables\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withScrollableContainers = /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n * @param {?} scrollables\n * @return {?}\n */\n function (scrollables) {\n this._positionStrategy.withScrollableContainers(scrollables);\n };\n /**\n * Adds a new preferred fallback position.\n * @param originPos\n * @param overlayPos\n */\n /**\n * Adds a new preferred fallback position.\n * @param {?} originPos\n * @param {?} overlayPos\n * @param {?=} offsetX\n * @param {?=} offsetY\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withFallbackPosition = /**\n * Adds a new preferred fallback position.\n * @param {?} originPos\n * @param {?} overlayPos\n * @param {?=} offsetX\n * @param {?=} offsetY\n * @return {?}\n */\n function (originPos, overlayPos, offsetX, offsetY) {\n var /** @type {?} */ position = new ConnectionPositionPair(originPos, overlayPos, offsetX, offsetY);\n this._preferredPositions.push(position);\n this._positionStrategy.withPositions(this._preferredPositions);\n return this;\n };\n /**\n * Sets the layout direction so the overlay's position can be adjusted to match.\n * @param dir New layout direction.\n */\n /**\n * Sets the layout direction so the overlay's position can be adjusted to match.\n * @param {?} dir New layout direction.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withDirection = /**\n * Sets the layout direction so the overlay's position can be adjusted to match.\n * @param {?} dir New layout direction.\n * @return {?}\n */\n function (dir) {\n // Since the direction might be declared before the strategy is attached,\n // we save the value in a temporary property and we'll transfer it to the\n // overlay ref on attachment.\n if (this._overlayRef) {\n this._overlayRef.setDirection(dir);\n }\n else {\n this._direction = dir;\n }\n return this;\n };\n /**\n * Sets an offset for the overlay's connection point on the x-axis\n * @param offset New offset in the X axis.\n */\n /**\n * Sets an offset for the overlay's connection point on the x-axis\n * @param {?} offset New offset in the X axis.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withOffsetX = /**\n * Sets an offset for the overlay's connection point on the x-axis\n * @param {?} offset New offset in the X axis.\n * @return {?}\n */\n function (offset) {\n this._positionStrategy.withDefaultOffsetX(offset);\n return this;\n };\n /**\n * Sets an offset for the overlay's connection point on the y-axis\n * @param offset New offset in the Y axis.\n */\n /**\n * Sets an offset for the overlay's connection point on the y-axis\n * @param {?} offset New offset in the Y axis.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withOffsetY = /**\n * Sets an offset for the overlay's connection point on the y-axis\n * @param {?} offset New offset in the Y axis.\n * @return {?}\n */\n function (offset) {\n this._positionStrategy.withDefaultOffsetY(offset);\n return this;\n };\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param {?} isLocked Whether the overlay should locked in.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withLockedPosition = /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param {?} isLocked Whether the overlay should locked in.\n * @return {?}\n */\n function (isLocked) {\n this._positionStrategy.withLockedPosition(isLocked);\n return this;\n };\n /**\n * Overwrites the current set of positions with an array of new ones.\n * @param positions Position pairs to be set on the strategy.\n */\n /**\n * Overwrites the current set of positions with an array of new ones.\n * @param {?} positions Position pairs to be set on the strategy.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.withPositions = /**\n * Overwrites the current set of positions with an array of new ones.\n * @param {?} positions Position pairs to be set on the strategy.\n * @return {?}\n */\n function (positions) {\n this._preferredPositions = positions.slice();\n this._positionStrategy.withPositions(this._preferredPositions);\n return this;\n };\n /**\n * Sets the origin element, relative to which to position the overlay.\n * @param origin Reference to the new origin element.\n */\n /**\n * Sets the origin element, relative to which to position the overlay.\n * @param {?} origin Reference to the new origin element.\n * @return {?}\n */\n ConnectedPositionStrategy.prototype.setOrigin = /**\n * Sets the origin element, relative to which to position the overlay.\n * @param {?} origin Reference to the new origin element.\n * @return {?}\n */\n function (origin) {\n this._positionStrategy.setOrigin(origin);\n return this;\n };\n return ConnectedPositionStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nvar /**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nGlobalPositionStrategy = /** @class */ (function () {\n function GlobalPositionStrategy() {\n this._cssPosition = 'static';\n this._topOffset = '';\n this._bottomOffset = '';\n this._leftOffset = '';\n this._rightOffset = '';\n this._alignItems = '';\n this._justifyContent = '';\n this._width = '';\n this._height = '';\n }\n /**\n * @param {?} overlayRef\n * @return {?}\n */\n GlobalPositionStrategy.prototype.attach = /**\n * @param {?} overlayRef\n * @return {?}\n */\n function (overlayRef) {\n var /** @type {?} */ config = overlayRef.getConfig();\n this._overlayRef = overlayRef;\n if (this._width && !config.width) {\n overlayRef.updateSize({ width: this._width });\n }\n if (this._height && !config.height) {\n overlayRef.updateSize({ height: this._height });\n }\n overlayRef.hostElement.classList.add('cdk-global-overlay-wrapper');\n };\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param value New top offset.\n */\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param {?=} value New top offset.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.top = /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param {?=} value New top offset.\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n };\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param value New left offset.\n */\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param {?=} value New left offset.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.left = /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param {?=} value New left offset.\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n this._rightOffset = '';\n this._leftOffset = value;\n this._justifyContent = 'flex-start';\n return this;\n };\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param value New bottom offset.\n */\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param {?=} value New bottom offset.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.bottom = /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param {?=} value New bottom offset.\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n this._topOffset = '';\n this._bottomOffset = value;\n this._alignItems = 'flex-end';\n return this;\n };\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param value New right offset.\n */\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param {?=} value New right offset.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.right = /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param {?=} value New right offset.\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n this._leftOffset = '';\n this._rightOffset = value;\n this._justifyContent = 'flex-end';\n return this;\n };\n /**\n * Sets the overlay width and clears any previously set width.\n * @param value New width for the overlay\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * @deletion-target 7.0.0\n */\n /**\n * Sets the overlay width and clears any previously set width.\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * \\@deletion-target 7.0.0\n * @param {?=} value New width for the overlay\n * @return {?}\n */\n GlobalPositionStrategy.prototype.width = /**\n * Sets the overlay width and clears any previously set width.\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * \\@deletion-target 7.0.0\n * @param {?=} value New width for the overlay\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n if (this._overlayRef) {\n this._overlayRef.updateSize({ width: value });\n }\n else {\n this._width = value;\n }\n return this;\n };\n /**\n * Sets the overlay height and clears any previously set height.\n * @param value New height for the overlay\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * @deletion-target 7.0.0\n */\n /**\n * Sets the overlay height and clears any previously set height.\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * \\@deletion-target 7.0.0\n * @param {?=} value New height for the overlay\n * @return {?}\n */\n GlobalPositionStrategy.prototype.height = /**\n * Sets the overlay height and clears any previously set height.\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * \\@deletion-target 7.0.0\n * @param {?=} value New height for the overlay\n * @return {?}\n */\n function (value) {\n if (value === void 0) { value = ''; }\n if (this._overlayRef) {\n this._overlayRef.updateSize({ height: value });\n }\n else {\n this._height = value;\n }\n return this;\n };\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param offset Overlay offset from the horizontal center.\n */\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param {?=} offset Overlay offset from the horizontal center.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.centerHorizontally = /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param {?=} offset Overlay offset from the horizontal center.\n * @return {?}\n */\n function (offset) {\n if (offset === void 0) { offset = ''; }\n this.left(offset);\n this._justifyContent = 'center';\n return this;\n };\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param offset Overlay offset from the vertical center.\n */\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param {?=} offset Overlay offset from the vertical center.\n * @return {?}\n */\n GlobalPositionStrategy.prototype.centerVertically = /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param {?=} offset Overlay offset from the vertical center.\n * @return {?}\n */\n function (offset) {\n if (offset === void 0) { offset = ''; }\n this.top(offset);\n this._alignItems = 'center';\n return this;\n };\n /**\n * Apply the position to the element.\n * @docs-private\n */\n /**\n * Apply the position to the element.\n * \\@docs-private\n * @return {?}\n */\n GlobalPositionStrategy.prototype.apply = /**\n * Apply the position to the element.\n * \\@docs-private\n * @return {?}\n */\n function () {\n // Since the overlay ref applies the strategy asynchronously, it could\n // have been disposed before it ends up being applied. If that is the\n // case, we shouldn't do anything.\n if (!this._overlayRef.hasAttached()) {\n return;\n }\n var /** @type {?} */ styles = this._overlayRef.overlayElement.style;\n var /** @type {?} */ parentStyles = this._overlayRef.hostElement.style;\n var /** @type {?} */ config = this._overlayRef.getConfig();\n styles.position = this._cssPosition;\n styles.marginLeft = config.width === '100%' ? '0' : this._leftOffset;\n styles.marginTop = config.height === '100%' ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = this._rightOffset;\n parentStyles.justifyContent = config.width === '100%' ? 'flex-start' : this._justifyContent;\n parentStyles.alignItems = config.height === '100%' ? 'flex-start' : this._alignItems;\n };\n /**\n * Noop implemented as a part of the PositionStrategy interface.\n * @docs-private\n */\n /**\n * Noop implemented as a part of the PositionStrategy interface.\n * \\@docs-private\n * @return {?}\n */\n GlobalPositionStrategy.prototype.dispose = /**\n * Noop implemented as a part of the PositionStrategy interface.\n * \\@docs-private\n * @return {?}\n */\n function () { };\n return GlobalPositionStrategy;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Builder for overlay position strategy.\n */\nvar OverlayPositionBuilder = /** @class */ (function () {\n function OverlayPositionBuilder(_viewportRuler, _document, \n // @deletion-target 7.0.0 `_platform` parameter to be made required.\n _platform) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n }\n /**\n * Creates a global position strategy.\n */\n /**\n * Creates a global position strategy.\n * @return {?}\n */\n OverlayPositionBuilder.prototype.global = /**\n * Creates a global position strategy.\n * @return {?}\n */\n function () {\n return new GlobalPositionStrategy();\n };\n /**\n * Creates a relative position strategy.\n * @param elementRef\n * @param originPos\n * @param overlayPos\n * @deprecated Use `flexibleConnectedTo` instead.\n * @deletion-target 7.0.0\n */\n /**\n * Creates a relative position strategy.\n * @deprecated Use `flexibleConnectedTo` instead.\n * \\@deletion-target 7.0.0\n * @param {?} elementRef\n * @param {?} originPos\n * @param {?} overlayPos\n * @return {?}\n */\n OverlayPositionBuilder.prototype.connectedTo = /**\n * Creates a relative position strategy.\n * @deprecated Use `flexibleConnectedTo` instead.\n * \\@deletion-target 7.0.0\n * @param {?} elementRef\n * @param {?} originPos\n * @param {?} overlayPos\n * @return {?}\n */\n function (elementRef, originPos, overlayPos) {\n return new ConnectedPositionStrategy(originPos, overlayPos, elementRef, this._viewportRuler, this._document);\n };\n /**\n * Creates a flexible position strategy.\n * @param elementRef\n */\n /**\n * Creates a flexible position strategy.\n * @param {?} elementRef\n * @return {?}\n */\n OverlayPositionBuilder.prototype.flexibleConnectedTo = /**\n * Creates a flexible position strategy.\n * @param {?} elementRef\n * @return {?}\n */\n function (elementRef) {\n return new FlexibleConnectedPositionStrategy(elementRef, this._viewportRuler, this._document, this._platform);\n };\n OverlayPositionBuilder.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n OverlayPositionBuilder.ctorParameters = function () { return [\n { type: ViewportRuler, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n { type: Platform, decorators: [{ type: Optional },] },\n ]; };\n /** @nocollapse */ OverlayPositionBuilder.ngInjectableDef = defineInjectable({ factory: function OverlayPositionBuilder_Factory() { return new OverlayPositionBuilder(inject(ViewportRuler), inject(DOCUMENT), inject(Platform, 8)); }, token: OverlayPositionBuilder, providedIn: \"root\" });\n return OverlayPositionBuilder;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Next overlay unique ID.\n */\nvar /** @type {?} */ nextUniqueId = 0;\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\nvar Overlay = /** @class */ (function () {\n function Overlay(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality) {\n this.scrollStrategies = scrollStrategies;\n this._overlayContainer = _overlayContainer;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._positionBuilder = _positionBuilder;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._injector = _injector;\n this._ngZone = _ngZone;\n this._document = _document;\n this._directionality = _directionality;\n }\n /**\n * Creates an overlay.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\n /**\n * Creates an overlay.\n * @param {?=} config Configuration applied to the overlay.\n * @return {?} Reference to the created overlay.\n */\n Overlay.prototype.create = /**\n * Creates an overlay.\n * @param {?=} config Configuration applied to the overlay.\n * @return {?} Reference to the created overlay.\n */\n function (config) {\n var /** @type {?} */ host = this._createHostElement();\n var /** @type {?} */ pane = this._createPaneElement(host);\n var /** @type {?} */ portalOutlet = this._createPortalOutlet(pane);\n var /** @type {?} */ overlayConfig = new OverlayConfig(config);\n overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document);\n };\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @returns An overlay position builder.\n */\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @return {?} An overlay position builder.\n */\n Overlay.prototype.position = /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @return {?} An overlay position builder.\n */\n function () {\n return this._positionBuilder;\n };\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @param {?} host\n * @return {?} Newly-created pane element\n */\n Overlay.prototype._createPaneElement = /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @param {?} host\n * @return {?} Newly-created pane element\n */\n function (host) {\n var /** @type {?} */ pane = this._document.createElement('div');\n pane.id = \"cdk-overlay-\" + nextUniqueId++;\n pane.classList.add('cdk-overlay-pane');\n host.appendChild(pane);\n return pane;\n };\n /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @return {?} Newly-create host element.\n */\n Overlay.prototype._createHostElement = /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @return {?} Newly-create host element.\n */\n function () {\n var /** @type {?} */ host = this._document.createElement('div');\n this._overlayContainer.getContainerElement().appendChild(host);\n return host;\n };\n /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param {?} pane The DOM element to turn into a portal outlet.\n * @return {?} A portal outlet for the given DOM element.\n */\n Overlay.prototype._createPortalOutlet = /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param {?} pane The DOM element to turn into a portal outlet.\n * @return {?} A portal outlet for the given DOM element.\n */\n function (pane) {\n // We have to resolve the ApplicationRef later in order to allow people\n // to use overlay-based providers during app initialization.\n if (!this._appRef) {\n this._appRef = this._injector.get(ApplicationRef);\n }\n return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector);\n };\n Overlay.decorators = [\n { type: Injectable },\n ];\n /** @nocollapse */\n Overlay.ctorParameters = function () { return [\n { type: ScrollStrategyOptions, },\n { type: OverlayContainer, },\n { type: ComponentFactoryResolver, },\n { type: OverlayPositionBuilder, },\n { type: OverlayKeyboardDispatcher, },\n { type: Injector, },\n { type: NgZone, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n { type: Directionality, },\n ]; };\n return Overlay;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Default set of positions for the overlay. Follows the behavior of a dropdown.\n */\nvar /** @type {?} */ defaultPositionList = [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n }\n];\n/**\n * Injection token that determines the scroll handling while the connected overlay is open.\n */\nvar /** @type {?} */ CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy', {\n providedIn: 'root',\n factory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_FACTORY,\n});\n/**\n * \\@docs-private\n * @return {?}\n */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_FACTORY() {\n // Store the injected deps here because we can't use the `inject` function outside\n // this function's context (including the inner function).\n var /** @type {?} */ scrollDispatcher = inject(ScrollDispatcher);\n var /** @type {?} */ viewportRuler = inject(ViewportRuler);\n var /** @type {?} */ ngZone = inject(NgZone);\n return function (config) {\n return new RepositionScrollStrategy(scrollDispatcher, viewportRuler, ngZone, config);\n };\n}\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\nvar CdkOverlayOrigin = /** @class */ (function () {\n function CdkOverlayOrigin(elementRef) {\n this.elementRef = elementRef;\n }\n CdkOverlayOrigin.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin',\n },] },\n ];\n /** @nocollapse */\n CdkOverlayOrigin.ctorParameters = function () { return [\n { type: ElementRef, },\n ]; };\n return CdkOverlayOrigin;\n}());\n/**\n * Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.\n */\nvar CdkConnectedOverlay = /** @class */ (function () {\n // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n function CdkConnectedOverlay(_overlay, templateRef, viewContainerRef, _scrollStrategy, _dir) {\n this._overlay = _overlay;\n this._scrollStrategy = _scrollStrategy;\n this._dir = _dir;\n this._hasBackdrop = false;\n this._lockPosition = false;\n this._backdropSubscription = Subscription.EMPTY;\n /**\n * Strategy to be used when handling scroll events while the overlay is open.\n */\n this.scrollStrategy = this._scrollStrategy();\n /**\n * Whether the overlay is open.\n */\n this.open = false;\n /**\n * Event emitted when the backdrop is clicked.\n */\n this.backdropClick = new EventEmitter();\n /**\n * Event emitted when the position has changed.\n */\n this.positionChange = new EventEmitter();\n /**\n * Event emitted when the overlay has been attached.\n */\n this.attach = new EventEmitter();\n /**\n * Event emitted when the overlay has been detached.\n */\n this.detach = new EventEmitter();\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n }\n Object.defineProperty(CdkConnectedOverlay.prototype, \"offsetX\", {\n get: /**\n * The offset in pixels for the overlay connection point on the x-axis\n * @return {?}\n */\n function () { return this._offsetX; },\n set: /**\n * @param {?} offsetX\n * @return {?}\n */\n function (offsetX) {\n this._offsetX = offsetX;\n if (this._position) {\n this._setPositions(this._position);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkConnectedOverlay.prototype, \"offsetY\", {\n get: /**\n * The offset in pixels for the overlay connection point on the y-axis\n * @return {?}\n */\n function () { return this._offsetY; },\n set: /**\n * @param {?} offsetY\n * @return {?}\n */\n function (offsetY) {\n this._offsetY = offsetY;\n if (this._position) {\n this._setPositions(this._position);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkConnectedOverlay.prototype, \"hasBackdrop\", {\n get: /**\n * Whether or not the overlay should attach a backdrop.\n * @return {?}\n */\n function () { return this._hasBackdrop; },\n set: /**\n * @param {?} value\n * @return {?}\n */\n function (value) { this._hasBackdrop = coerceBooleanProperty(value); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkConnectedOverlay.prototype, \"lockPosition\", {\n get: /**\n * Whether or not the overlay should be locked when scrolling.\n * @return {?}\n */\n function () { return this._lockPosition; },\n set: /**\n * @param {?} value\n * @return {?}\n */\n function (value) { this._lockPosition = coerceBooleanProperty(value); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkConnectedOverlay.prototype, \"overlayRef\", {\n /** The associated overlay reference. */\n get: /**\n * The associated overlay reference.\n * @return {?}\n */\n function () {\n return this._overlayRef;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkConnectedOverlay.prototype, \"dir\", {\n /** The element's layout direction. */\n get: /**\n * The element's layout direction.\n * @return {?}\n */\n function () {\n return this._dir ? this._dir.value : 'ltr';\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n CdkConnectedOverlay.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n this._destroyOverlay();\n };\n /**\n * @param {?} changes\n * @return {?}\n */\n CdkConnectedOverlay.prototype.ngOnChanges = /**\n * @param {?} changes\n * @return {?}\n */\n function (changes) {\n if (this._position) {\n if (changes['positions'] || changes['_deprecatedPositions']) {\n this._position.withPositions(this.positions);\n }\n if (changes['lockPosition']) {\n this._position.withLockedPosition(this.lockPosition);\n }\n if (changes['origin'] || changes['_deprecatedOrigin']) {\n this._position.setOrigin(this.origin.elementRef);\n if (this.open) {\n this._position.apply();\n }\n }\n }\n if (changes['open'] || changes['_deprecatedOpen']) {\n this.open ? this._attachOverlay() : this._detachOverlay();\n }\n };\n /**\n * Creates an overlay\n * @return {?}\n */\n CdkConnectedOverlay.prototype._createOverlay = /**\n * Creates an overlay\n * @return {?}\n */\n function () {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n this._overlayRef = this._overlay.create(this._buildConfig());\n };\n /**\n * Builds the overlay config based on the directive's inputs\n * @return {?}\n */\n CdkConnectedOverlay.prototype._buildConfig = /**\n * Builds the overlay config based on the directive's inputs\n * @return {?}\n */\n function () {\n var /** @type {?} */ positionStrategy = this._position = this._createPositionStrategy();\n var /** @type {?} */ overlayConfig = new OverlayConfig({\n positionStrategy: positionStrategy,\n scrollStrategy: this.scrollStrategy,\n hasBackdrop: this.hasBackdrop\n });\n if (this.width || this.width === 0) {\n overlayConfig.width = this.width;\n }\n if (this.height || this.height === 0) {\n overlayConfig.height = this.height;\n }\n if (this.minWidth || this.minWidth === 0) {\n overlayConfig.minWidth = this.minWidth;\n }\n if (this.minHeight || this.minHeight === 0) {\n overlayConfig.minHeight = this.minHeight;\n }\n if (this.backdropClass) {\n overlayConfig.backdropClass = this.backdropClass;\n }\n return overlayConfig;\n };\n /**\n * Returns the position strategy of the overlay to be set on the overlay config\n * @return {?}\n */\n CdkConnectedOverlay.prototype._createPositionStrategy = /**\n * Returns the position strategy of the overlay to be set on the overlay config\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ strategy = this._overlay.position()\n .flexibleConnectedTo(this.origin.elementRef)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withGrowAfterOpen(false)\n .withLockedPosition(this.lockPosition);\n this._setPositions(strategy);\n strategy.positionChanges.subscribe(function (p) { return _this.positionChange.emit(p); });\n return strategy;\n };\n /**\n * Sets the primary and fallback positions of a positions strategy,\n * based on the current directive inputs.\n * @param {?} positionStrategy\n * @return {?}\n */\n CdkConnectedOverlay.prototype._setPositions = /**\n * Sets the primary and fallback positions of a positions strategy,\n * based on the current directive inputs.\n * @param {?} positionStrategy\n * @return {?}\n */\n function (positionStrategy) {\n var _this = this;\n var /** @type {?} */ positions = this.positions.map(function (pos) {\n return ({\n originX: pos.originX,\n originY: pos.originY,\n overlayX: pos.overlayX,\n overlayY: pos.overlayY,\n offsetX: pos.offsetX || _this.offsetX,\n offsetY: pos.offsetY || _this.offsetY\n });\n });\n positionStrategy.withPositions(positions);\n };\n /**\n * Attaches the overlay and subscribes to backdrop clicks if backdrop exists\n * @return {?}\n */\n CdkConnectedOverlay.prototype._attachOverlay = /**\n * Attaches the overlay and subscribes to backdrop clicks if backdrop exists\n * @return {?}\n */\n function () {\n var _this = this;\n if (!this._overlayRef) {\n this._createOverlay(); /** @type {?} */\n ((this._overlayRef)).keydownEvents().subscribe(function (event) {\n if (event.keyCode === ESCAPE) {\n _this._detachOverlay();\n }\n });\n }\n else {\n // Update the overlay size, in case the directive's inputs have changed\n this._overlayRef.updateSize({\n width: this.width,\n minWidth: this.minWidth,\n height: this.height,\n minHeight: this.minHeight,\n });\n }\n this._overlayRef.setDirection(this.dir);\n if (!this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._templatePortal);\n this.attach.emit();\n }\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe(function (event) {\n _this.backdropClick.emit(event);\n });\n }\n };\n /**\n * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists\n * @return {?}\n */\n CdkConnectedOverlay.prototype._detachOverlay = /**\n * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists\n * @return {?}\n */\n function () {\n if (this._overlayRef) {\n this._overlayRef.detach();\n this.detach.emit();\n }\n this._backdropSubscription.unsubscribe();\n };\n /**\n * Destroys the overlay created by this directive.\n * @return {?}\n */\n CdkConnectedOverlay.prototype._destroyOverlay = /**\n * Destroys the overlay created by this directive.\n * @return {?}\n */\n function () {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n this._backdropSubscription.unsubscribe();\n };\n CdkConnectedOverlay.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay'\n },] },\n ];\n /** @nocollapse */\n CdkConnectedOverlay.ctorParameters = function () { return [\n { type: Overlay, },\n { type: TemplateRef, },\n { type: ViewContainerRef, },\n { type: undefined, decorators: [{ type: Inject, args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,] },] },\n { type: Directionality, decorators: [{ type: Optional },] },\n ]; };\n CdkConnectedOverlay.propDecorators = {\n \"origin\": [{ type: Input, args: ['cdkConnectedOverlayOrigin',] },],\n \"positions\": [{ type: Input, args: ['cdkConnectedOverlayPositions',] },],\n \"offsetX\": [{ type: Input, args: ['cdkConnectedOverlayOffsetX',] },],\n \"offsetY\": [{ type: Input, args: ['cdkConnectedOverlayOffsetY',] },],\n \"width\": [{ type: Input, args: ['cdkConnectedOverlayWidth',] },],\n \"height\": [{ type: Input, args: ['cdkConnectedOverlayHeight',] },],\n \"minWidth\": [{ type: Input, args: ['cdkConnectedOverlayMinWidth',] },],\n \"minHeight\": [{ type: Input, args: ['cdkConnectedOverlayMinHeight',] },],\n \"backdropClass\": [{ type: Input, args: ['cdkConnectedOverlayBackdropClass',] },],\n \"scrollStrategy\": [{ type: Input, args: ['cdkConnectedOverlayScrollStrategy',] },],\n \"open\": [{ type: Input, args: ['cdkConnectedOverlayOpen',] },],\n \"hasBackdrop\": [{ type: Input, args: ['cdkConnectedOverlayHasBackdrop',] },],\n \"lockPosition\": [{ type: Input, args: ['cdkConnectedOverlayLockPosition',] },],\n \"backdropClick\": [{ type: Output },],\n \"positionChange\": [{ type: Output },],\n \"attach\": [{ type: Output },],\n \"detach\": [{ type: Output },],\n };\n return CdkConnectedOverlay;\n}());\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n * @param {?} overlay\n * @return {?}\n */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return function () { return overlay.scrollStrategies.reposition(); };\n}\n/**\n * \\@docs-private \\@deprecated \\@deletion-target 7.0.0\n */\nvar /** @type {?} */ CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar OverlayModule = /** @class */ (function () {\n function OverlayModule() {\n }\n OverlayModule.decorators = [\n { type: NgModule, args: [{\n imports: [BidiModule, PortalModule, ScrollDispatchModule],\n exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollDispatchModule],\n declarations: [CdkConnectedOverlay, CdkOverlayOrigin],\n providers: [Overlay],\n },] },\n ];\n return OverlayModule;\n}());\n/**\n * @deprecated Use `OverlayModule` instead.\n * \\@deletion-target 7.0.0\n */\nvar /** @type {?} */ OVERLAY_PROVIDERS = [\n Overlay,\n OverlayPositionBuilder,\n OVERLAY_KEYBOARD_DISPATCHER_PROVIDER,\n VIEWPORT_RULER_PROVIDER,\n OVERLAY_CONTAINER_PROVIDER,\n CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\nvar FullscreenOverlayContainer = /** @class */ (function (_super) {\n __extends(FullscreenOverlayContainer, _super);\n function FullscreenOverlayContainer(_document) {\n return _super.call(this, _document) || this;\n }\n /**\n * @return {?}\n */\n FullscreenOverlayContainer.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n _super.prototype.ngOnDestroy.call(this);\n if (this._fullScreenEventName && this._fullScreenListener) {\n this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);\n }\n };\n /**\n * @return {?}\n */\n FullscreenOverlayContainer.prototype._createContainer = /**\n * @return {?}\n */\n function () {\n var _this = this;\n _super.prototype._createContainer.call(this);\n this._adjustParentForFullscreenChange();\n this._addFullscreenChangeListener(function () { return _this._adjustParentForFullscreenChange(); });\n };\n /**\n * @return {?}\n */\n FullscreenOverlayContainer.prototype._adjustParentForFullscreenChange = /**\n * @return {?}\n */\n function () {\n if (!this._containerElement) {\n return;\n }\n var /** @type {?} */ fullscreenElement = this.getFullscreenElement();\n var /** @type {?} */ parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n };\n /**\n * @param {?} fn\n * @return {?}\n */\n FullscreenOverlayContainer.prototype._addFullscreenChangeListener = /**\n * @param {?} fn\n * @return {?}\n */\n function (fn) {\n var /** @type {?} */ eventName = this._getEventName();\n if (eventName) {\n if (this._fullScreenListener) {\n this._document.removeEventListener(eventName, this._fullScreenListener);\n }\n this._document.addEventListener(eventName, fn);\n this._fullScreenListener = fn;\n }\n };\n /**\n * @return {?}\n */\n FullscreenOverlayContainer.prototype._getEventName = /**\n * @return {?}\n */\n function () {\n if (!this._fullScreenEventName) {\n if (this._document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n }\n else if (this._document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n }\n else if ((/** @type {?} */ (this._document)).mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n }\n else if ((/** @type {?} */ (this._document)).msFullscreenEnabled) {\n this._fullScreenEventName = 'MSFullscreenChange';\n }\n }\n return this._fullScreenEventName;\n };\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n */\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n * @return {?}\n */\n FullscreenOverlayContainer.prototype.getFullscreenElement = /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n * @return {?}\n */\n function () {\n return this._document.fullscreenElement ||\n this._document.webkitFullscreenElement ||\n (/** @type {?} */ (this._document)).mozFullScreenElement ||\n (/** @type {?} */ (this._document)).msFullscreenElement ||\n null;\n };\n FullscreenOverlayContainer.decorators = [\n { type: Injectable },\n ];\n /** @nocollapse */\n FullscreenOverlayContainer.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n return FullscreenOverlayContainer;\n}(OverlayContainer));\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nexport { Overlay, OverlayContainer, CdkOverlayOrigin, CdkConnectedOverlay, FullscreenOverlayContainer, OverlayRef, OverlayKeyboardDispatcher, OverlayPositionBuilder, GlobalPositionStrategy, ConnectedPositionStrategy, FlexibleConnectedPositionStrategy, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, validateVerticalPosition, validateHorizontalPosition, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OverlayModule, OVERLAY_PROVIDERS, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER as ɵh, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY as ɵg, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_FACTORY as ɵd, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵf, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵe };\n//# sourceMappingURL=overlay.es5.js.map\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 { Subject } from 'rxjs';\nimport { InjectionToken, Component, ViewEncapsulation, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, NgZone, ViewChild, Injectable, Injector, Optional, SkipSelf, TemplateRef, NgModule } from '@angular/core';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\nimport { AnimationCurves, AnimationDurations, MatCommonModule } from '@angular/material/core';\nimport { __assign, __extends } from 'tslib';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalInjector, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n * @template T\n */\nvar /**\n * Reference to a snack bar dispatched from the snack bar service.\n * @template T\n */\nMatSnackBarRef = /** @class */ (function () {\n function MatSnackBarRef(containerInstance, _overlayRef) {\n var _this = this;\n this._overlayRef = _overlayRef;\n /**\n * Subject for notifying the user that the snack bar has been dismissed.\n */\n this._afterDismissed = new Subject();\n /**\n * Subject for notifying the user that the snack bar has opened and appeared.\n */\n this._afterOpened = new Subject();\n /**\n * Subject for notifying the user that the snack bar action was called.\n */\n this._onAction = new Subject();\n /**\n * Whether the snack bar was dismissed using the action button.\n */\n this._dismissedByAction = false;\n this.containerInstance = containerInstance;\n // Dismiss snackbar on action.\n this.onAction().subscribe(function () { return _this.dismiss(); });\n containerInstance._onExit.subscribe(function () { return _this._finishDismiss(); });\n }\n /** Dismisses the snack bar. */\n /**\n * Dismisses the snack bar.\n * @return {?}\n */\n MatSnackBarRef.prototype.dismiss = /**\n * Dismisses the snack bar.\n * @return {?}\n */\n function () {\n if (!this._afterDismissed.closed) {\n this.containerInstance.exit();\n }\n clearTimeout(this._durationTimeoutId);\n };\n /** Marks the snackbar action clicked. */\n /**\n * Marks the snackbar action clicked.\n * @return {?}\n */\n MatSnackBarRef.prototype.dismissWithAction = /**\n * Marks the snackbar action clicked.\n * @return {?}\n */\n function () {\n if (!this._onAction.closed) {\n this._dismissedByAction = true;\n this._onAction.next();\n this._onAction.complete();\n }\n };\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * @deletion-target 7.0.0\n */\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * \\@deletion-target 7.0.0\n * @return {?}\n */\n MatSnackBarRef.prototype.closeWithAction = /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * \\@deletion-target 7.0.0\n * @return {?}\n */\n function () {\n this.dismissWithAction();\n };\n /** Dismisses the snack bar after some duration */\n /**\n * Dismisses the snack bar after some duration\n * @param {?} duration\n * @return {?}\n */\n MatSnackBarRef.prototype._dismissAfter = /**\n * Dismisses the snack bar after some duration\n * @param {?} duration\n * @return {?}\n */\n function (duration) {\n var _this = this;\n this._durationTimeoutId = setTimeout(function () { return _this.dismiss(); }, duration);\n };\n /** Marks the snackbar as opened */\n /**\n * Marks the snackbar as opened\n * @return {?}\n */\n MatSnackBarRef.prototype._open = /**\n * Marks the snackbar as opened\n * @return {?}\n */\n function () {\n if (!this._afterOpened.closed) {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n };\n /**\n * Cleans up the DOM after closing.\n * @return {?}\n */\n MatSnackBarRef.prototype._finishDismiss = /**\n * Cleans up the DOM after closing.\n * @return {?}\n */\n function () {\n this._overlayRef.dispose();\n if (!this._onAction.closed) {\n this._onAction.complete();\n }\n this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });\n this._afterDismissed.complete();\n this._dismissedByAction = false;\n };\n /** Gets an observable that is notified when the snack bar is finished closing. */\n /**\n * Gets an observable that is notified when the snack bar is finished closing.\n * @return {?}\n */\n MatSnackBarRef.prototype.afterDismissed = /**\n * Gets an observable that is notified when the snack bar is finished closing.\n * @return {?}\n */\n function () {\n return this._afterDismissed.asObservable();\n };\n /** Gets an observable that is notified when the snack bar has opened and appeared. */\n /**\n * Gets an observable that is notified when the snack bar has opened and appeared.\n * @return {?}\n */\n MatSnackBarRef.prototype.afterOpened = /**\n * Gets an observable that is notified when the snack bar has opened and appeared.\n * @return {?}\n */\n function () {\n return this.containerInstance._onEnter;\n };\n /** Gets an observable that is notified when the snack bar action is called. */\n /**\n * Gets an observable that is notified when the snack bar action is called.\n * @return {?}\n */\n MatSnackBarRef.prototype.onAction = /**\n * Gets an observable that is notified when the snack bar action is called.\n * @return {?}\n */\n function () {\n return this._onAction.asObservable();\n };\n return MatSnackBarRef;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Injection token that can be used to access the data that was passed in to a snack bar.\n */\nvar /** @type {?} */ MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n * @template D\n */\nvar /**\n * Configuration used when opening a snack-bar.\n * @template D\n */\nMatSnackBarConfig = /** @class */ (function () {\n function MatSnackBarConfig() {\n /**\n * The politeness level for the MatAriaLiveAnnouncer announcement.\n */\n this.politeness = 'assertive';\n /**\n * Message to be announced by the MatAriaLiveAnnouncer\n */\n this.announcementMessage = '';\n /**\n * The length of time in milliseconds to wait before automatically dismissing the snack bar.\n */\n this.duration = 0;\n /**\n * Data being injected into the child component.\n */\n this.data = null;\n /**\n * The horizontal position to place the snack bar.\n */\n this.horizontalPosition = 'center';\n /**\n * The vertical position to place the snack bar.\n */\n this.verticalPosition = 'bottom';\n }\n return MatSnackBarConfig;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Animations used by the Material snack bar.\n */\nvar /** @type {?} */ matSnackBarAnimations = {\n /** Animation that slides the dialog in and out of view and fades the opacity. */\n contentFade: trigger('contentFade', [\n transition(':enter', [\n style({ opacity: '0' }),\n animate(AnimationDurations.COMPLEX + \" \" + AnimationCurves.STANDARD_CURVE)\n ])\n ]),\n /** Animation that shows and hides a snack bar. */\n snackBarState: trigger('state', [\n state('visible-top, visible-bottom', style({ transform: 'translateY(0%)' })),\n transition('visible-top => hidden-top, visible-bottom => hidden-bottom', animate(AnimationDurations.EXITING + \" \" + AnimationCurves.ACCELERATION_CURVE)),\n transition('void => visible-top, void => visible-bottom', animate(AnimationDurations.ENTERING + \" \" + AnimationCurves.DECELERATION_CURVE)),\n ])\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * A component used to open as the default snack bar, matching material spec.\n * This should only be used internally by the snack bar service.\n */\nvar SimpleSnackBar = /** @class */ (function () {\n function SimpleSnackBar(snackBarRef, data) {\n this.snackBarRef = snackBarRef;\n this.data = data;\n }\n /** Performs the action on the snack bar. */\n /**\n * Performs the action on the snack bar.\n * @return {?}\n */\n SimpleSnackBar.prototype.action = /**\n * Performs the action on the snack bar.\n * @return {?}\n */\n function () {\n this.snackBarRef.dismissWithAction();\n };\n Object.defineProperty(SimpleSnackBar.prototype, \"hasAction\", {\n /** If the action button should be shown. */\n get: /**\n * If the action button should be shown.\n * @return {?}\n */\n function () {\n return !!this.data.action;\n },\n enumerable: true,\n configurable: true\n });\n SimpleSnackBar.decorators = [\n { type: Component, args: [{selector: 'simple-snack-bar',\n template: \"{{data.message}}<div class=\\\"mat-simple-snackbar-action\\\" *ngIf=\\\"hasAction\\\"><button mat-button (click)=\\\"action()\\\">{{data.action}}</button></div>\",\n styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;line-height:20px;opacity:1}.mat-simple-snackbar-action{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-around;margin:-8px 0 -8px 8px}.mat-simple-snackbar-action button{flex:1;max-height:36px}[dir=rtl] .mat-simple-snackbar-action{margin-left:0;margin-right:8px}\"],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [matSnackBarAnimations.contentFade],\n host: {\n '[@contentFade]': '',\n 'class': 'mat-simple-snackbar',\n }\n },] },\n ];\n /** @nocollapse */\n SimpleSnackBar.ctorParameters = function () { return [\n { type: MatSnackBarRef, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] },] },\n ]; };\n return SimpleSnackBar;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Internal component that wraps user-provided snack bar content.\n * \\@docs-private\n */\nvar MatSnackBarContainer = /** @class */ (function (_super) {\n __extends(MatSnackBarContainer, _super);\n function MatSnackBarContainer(_ngZone, _elementRef, _changeDetectorRef) {\n var _this = _super.call(this) || this;\n _this._ngZone = _ngZone;\n _this._elementRef = _elementRef;\n _this._changeDetectorRef = _changeDetectorRef;\n /**\n * Whether the component has been destroyed.\n */\n _this._destroyed = false;\n /**\n * Subject for notifying that the snack bar has exited from view.\n */\n _this._onExit = new Subject();\n /**\n * Subject for notifying that the snack bar has finished entering the view.\n */\n _this._onEnter = new Subject();\n /**\n * The state of the snack bar animations.\n */\n _this._animationState = 'void';\n return _this;\n }\n /** Attach a component portal as content to this snack bar container. */\n /**\n * Attach a component portal as content to this snack bar container.\n * @template T\n * @param {?} portal\n * @return {?}\n */\n MatSnackBarContainer.prototype.attachComponentPortal = /**\n * Attach a component portal as content to this snack bar container.\n * @template T\n * @param {?} portal\n * @return {?}\n */\n function (portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n };\n /** Attach a template portal as content to this snack bar container. */\n /**\n * Attach a template portal as content to this snack bar container.\n * @template C\n * @param {?} portal\n * @return {?}\n */\n MatSnackBarContainer.prototype.attachTemplatePortal = /**\n * Attach a template portal as content to this snack bar container.\n * @template C\n * @param {?} portal\n * @return {?}\n */\n function (portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n };\n /** Handle end of animations, updating the state of the snackbar. */\n /**\n * Handle end of animations, updating the state of the snackbar.\n * @param {?} event\n * @return {?}\n */\n MatSnackBarContainer.prototype.onAnimationEnd = /**\n * Handle end of animations, updating the state of the snackbar.\n * @param {?} event\n * @return {?}\n */\n function (event) {\n var fromState = event.fromState, toState = event.toState;\n if ((toState === 'void' && fromState !== 'void') || toState.startsWith('hidden')) {\n this._completeExit();\n }\n if (toState.startsWith('visible')) {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n var /** @type {?} */ onEnter_1 = this._onEnter;\n this._ngZone.run(function () {\n onEnter_1.next();\n onEnter_1.complete();\n });\n }\n };\n /** Begin animation of snack bar entrance into view. */\n /**\n * Begin animation of snack bar entrance into view.\n * @return {?}\n */\n MatSnackBarContainer.prototype.enter = /**\n * Begin animation of snack bar entrance into view.\n * @return {?}\n */\n function () {\n if (!this._destroyed) {\n this._animationState = \"visible-\" + this.snackBarConfig.verticalPosition;\n this._changeDetectorRef.detectChanges();\n }\n };\n /** Begin animation of the snack bar exiting from view. */\n /**\n * Begin animation of the snack bar exiting from view.\n * @return {?}\n */\n MatSnackBarContainer.prototype.exit = /**\n * Begin animation of the snack bar exiting from view.\n * @return {?}\n */\n function () {\n this._animationState = \"hidden-\" + this.snackBarConfig.verticalPosition;\n return this._onExit;\n };\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n /**\n * Makes sure the exit callbacks have been invoked when the element is destroyed.\n * @return {?}\n */\n MatSnackBarContainer.prototype.ngOnDestroy = /**\n * Makes sure the exit callbacks have been invoked when the element is destroyed.\n * @return {?}\n */\n function () {\n this._destroyed = true;\n this._completeExit();\n };\n /**\n * Waits for the zone to settle before removing the element. Helps prevent\n * errors where we end up removing an element which is in the middle of an animation.\n * @return {?}\n */\n MatSnackBarContainer.prototype._completeExit = /**\n * Waits for the zone to settle before removing the element. Helps prevent\n * errors where we end up removing an element which is in the middle of an animation.\n * @return {?}\n */\n function () {\n var _this = this;\n this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(function () {\n _this._onExit.next();\n _this._onExit.complete();\n });\n };\n /**\n * Applies the various positioning and user-configured CSS classes to the snack bar.\n * @return {?}\n */\n MatSnackBarContainer.prototype._applySnackBarClasses = /**\n * Applies the various positioning and user-configured CSS classes to the snack bar.\n * @return {?}\n */\n function () {\n var /** @type {?} */ element = this._elementRef.nativeElement;\n var /** @type {?} */ panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(function (cssClass) { return element.classList.add(cssClass); });\n }\n else {\n element.classList.add(panelClasses);\n }\n }\n if (this.snackBarConfig.horizontalPosition === 'center') {\n element.classList.add('mat-snack-bar-center');\n }\n if (this.snackBarConfig.verticalPosition === 'top') {\n element.classList.add('mat-snack-bar-top');\n }\n };\n /**\n * Asserts that no content is already attached to the container.\n * @return {?}\n */\n MatSnackBarContainer.prototype._assertNotAttached = /**\n * Asserts that no content is already attached to the container.\n * @return {?}\n */\n function () {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n };\n MatSnackBarContainer.decorators = [\n { type: Component, args: [{selector: 'snack-bar-container',\n template: \"<ng-template cdkPortalOutlet></ng-template>\",\n styles: [\".mat-snack-bar-container{border-radius:2px;box-sizing:border-box;display:block;margin:24px;max-width:568px;min-width:288px;padding:14px 24px;transform:translateY(100%) translateY(24px)}.mat-snack-bar-container.mat-snack-bar-center{margin:0;transform:translateY(100%)}.mat-snack-bar-container.mat-snack-bar-top{transform:translateY(-100%) translateY(-24px)}.mat-snack-bar-container.mat-snack-bar-top.mat-snack-bar-center{transform:translateY(-100%)}@media screen and (-ms-high-contrast:active){.mat-snack-bar-container{border:solid 1px}}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:0;max-width:inherit;width:100%}\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [matSnackBarAnimations.snackBarState],\n host: {\n 'role': 'alert',\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)'\n },\n },] },\n ];\n /** @nocollapse */\n MatSnackBarContainer.ctorParameters = function () { return [\n { type: NgZone, },\n { type: ElementRef, },\n { type: ChangeDetectorRef, },\n ]; };\n MatSnackBarContainer.propDecorators = {\n \"_portalOutlet\": [{ type: ViewChild, args: [CdkPortalOutlet,] },],\n };\n return MatSnackBarContainer;\n}(BasePortalOutlet));\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Injection token that can be used to specify default snack bar.\n */\nvar /** @type {?} */ MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {\n providedIn: 'root',\n factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n});\n/**\n * \\@docs-private\n * @return {?}\n */\nfunction MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {\n return new MatSnackBarConfig();\n}\n/**\n * Service to dispatch Material Design snack bar messages.\n */\nvar MatSnackBar = /** @class */ (function () {\n function MatSnackBar(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {\n this._overlay = _overlay;\n this._live = _live;\n this._injector = _injector;\n this._breakpointObserver = _breakpointObserver;\n this._parentSnackBar = _parentSnackBar;\n this._defaultConfig = _defaultConfig;\n /**\n * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).\n * If there is a parent snack-bar service, all operations should delegate to that parent\n * via `_openedSnackBarRef`.\n */\n this._snackBarRefAtThisLevel = null;\n }\n Object.defineProperty(MatSnackBar.prototype, \"_openedSnackBarRef\", {\n /** Reference to the currently opened snackbar at *any* level. */\n get: /**\n * Reference to the currently opened snackbar at *any* level.\n * @return {?}\n */\n function () {\n var /** @type {?} */ parent = this._parentSnackBar;\n return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n },\n set: /**\n * @param {?} value\n * @return {?}\n */\n function (value) {\n if (this._parentSnackBar) {\n this._parentSnackBar._openedSnackBarRef = value;\n }\n else {\n this._snackBarRefAtThisLevel = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @param component Component to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @template T\n * @param {?} component Component to be instantiated.\n * @param {?=} config Extra configuration for the snack bar.\n * @return {?}\n */\n MatSnackBar.prototype.openFromComponent = /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @template T\n * @param {?} component Component to be instantiated.\n * @param {?=} config Extra configuration for the snack bar.\n * @return {?}\n */\n function (component, config) {\n return /** @type {?} */ (this._attach(component, config));\n };\n /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param template Template to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param {?} template Template to be instantiated.\n * @param {?=} config Extra configuration for the snack bar.\n * @return {?}\n */\n MatSnackBar.prototype.openFromTemplate = /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param {?} template Template to be instantiated.\n * @param {?=} config Extra configuration for the snack bar.\n * @return {?}\n */\n function (template, config) {\n return this._attach(template, config);\n };\n /**\n * Opens a snackbar with a message and an optional action.\n * @param message The message to show in the snackbar.\n * @param action The label for the snackbar action.\n * @param config Additional configuration options for the snackbar.\n */\n /**\n * Opens a snackbar with a message and an optional action.\n * @param {?} message The message to show in the snackbar.\n * @param {?=} action The label for the snackbar action.\n * @param {?=} config Additional configuration options for the snackbar.\n * @return {?}\n */\n MatSnackBar.prototype.open = /**\n * Opens a snackbar with a message and an optional action.\n * @param {?} message The message to show in the snackbar.\n * @param {?=} action The label for the snackbar action.\n * @param {?=} config Additional configuration options for the snackbar.\n * @return {?}\n */\n function (message, action, config) {\n if (action === void 0) { action = ''; }\n var /** @type {?} */ _config = __assign({}, this._defaultConfig, config);\n // Since the user doesn't have access to the component, we can\n // override the data to pass in our own message and action.\n _config.data = { message: message, action: action };\n _config.announcementMessage = message;\n return this.openFromComponent(SimpleSnackBar, _config);\n };\n /**\n * Dismisses the currently-visible snack bar.\n */\n /**\n * Dismisses the currently-visible snack bar.\n * @return {?}\n */\n MatSnackBar.prototype.dismiss = /**\n * Dismisses the currently-visible snack bar.\n * @return {?}\n */\n function () {\n if (this._openedSnackBarRef) {\n this._openedSnackBarRef.dismiss();\n }\n };\n /**\n * Attaches the snack bar container component to the overlay.\n * @param {?} overlayRef\n * @param {?} config\n * @return {?}\n */\n MatSnackBar.prototype._attachSnackBarContainer = /**\n * Attaches the snack bar container component to the overlay.\n * @param {?} overlayRef\n * @param {?} config\n * @return {?}\n */\n function (overlayRef, config) {\n var /** @type {?} */ containerPortal = new ComponentPortal(MatSnackBarContainer, config.viewContainerRef);\n var /** @type {?} */ containerRef = overlayRef.attach(containerPortal);\n containerRef.instance.snackBarConfig = config;\n return containerRef.instance;\n };\n /**\n * Places a new component or a template as the content of the snack bar container.\n * @template T\n * @param {?} content\n * @param {?=} userConfig\n * @return {?}\n */\n MatSnackBar.prototype._attach = /**\n * Places a new component or a template as the content of the snack bar container.\n * @template T\n * @param {?} content\n * @param {?=} userConfig\n * @return {?}\n */\n function (content, userConfig) {\n var /** @type {?} */ config = __assign({}, this._defaultConfig, userConfig);\n var /** @type {?} */ overlayRef = this._createOverlay(config);\n var /** @type {?} */ container = this._attachSnackBarContainer(overlayRef, config);\n var /** @type {?} */ snackBarRef = new MatSnackBarRef(container, overlayRef);\n if (content instanceof TemplateRef) {\n var /** @type {?} */ portal = new TemplatePortal(content, /** @type {?} */ ((null)), /** @type {?} */ ({\n $implicit: config.data,\n snackBarRef: snackBarRef\n }));\n snackBarRef.instance = container.attachTemplatePortal(portal);\n }\n else {\n var /** @type {?} */ injector = this._createInjector(config, snackBarRef);\n var /** @type {?} */ portal = new ComponentPortal(content, undefined, injector);\n var /** @type {?} */ contentRef = container.attachComponentPortal(portal);\n // We can't pass this via the injector, because the injector is created earlier.\n snackBarRef.instance = contentRef.instance;\n }\n // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as\n // appropriate. This class is applied to the overlay element because the overlay must expand to\n // fill the width of the screen for full width snackbars.\n this._breakpointObserver.observe(Breakpoints.Handset).pipe(takeUntil(overlayRef.detachments().pipe(take(1)))).subscribe(function (state$$1) {\n if (state$$1.matches) {\n overlayRef.overlayElement.classList.add('mat-snack-bar-handset');\n }\n else {\n overlayRef.overlayElement.classList.remove('mat-snack-bar-handset');\n }\n });\n this._animateSnackBar(snackBarRef, config);\n this._openedSnackBarRef = snackBarRef;\n return this._openedSnackBarRef;\n };\n /**\n * Animates the old snack bar out and the new one in.\n * @param {?} snackBarRef\n * @param {?} config\n * @return {?}\n */\n MatSnackBar.prototype._animateSnackBar = /**\n * Animates the old snack bar out and the new one in.\n * @param {?} snackBarRef\n * @param {?} config\n * @return {?}\n */\n function (snackBarRef, config) {\n var _this = this;\n // When the snackbar is dismissed, clear the reference to it.\n snackBarRef.afterDismissed().subscribe(function () {\n // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.\n if (_this._openedSnackBarRef == snackBarRef) {\n _this._openedSnackBarRef = null;\n }\n });\n if (this._openedSnackBarRef) {\n // If a snack bar is already in view, dismiss it and enter the\n // new snack bar after exit animation is complete.\n this._openedSnackBarRef.afterDismissed().subscribe(function () {\n snackBarRef.containerInstance.enter();\n });\n this._openedSnackBarRef.dismiss();\n }\n else {\n // If no snack bar is in view, enter the new snack bar.\n snackBarRef.containerInstance.enter();\n }\n // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.\n if (config.duration && config.duration > 0) {\n snackBarRef.afterOpened().subscribe(function () { return snackBarRef._dismissAfter(/** @type {?} */ ((config.duration))); });\n }\n if (config.announcementMessage) {\n this._live.announce(config.announcementMessage, config.politeness);\n }\n };\n /**\n * Creates a new overlay and places it in the correct location.\n * @param {?} config The user-specified snack bar config.\n * @return {?}\n */\n MatSnackBar.prototype._createOverlay = /**\n * Creates a new overlay and places it in the correct location.\n * @param {?} config The user-specified snack bar config.\n * @return {?}\n */\n function (config) {\n var /** @type {?} */ overlayConfig = new OverlayConfig();\n overlayConfig.direction = config.direction;\n var /** @type {?} */ positionStrategy = this._overlay.position().global();\n // Set horizontal position.\n var /** @type {?} */ isRtl = config.direction === 'rtl';\n var /** @type {?} */ isLeft = (config.horizontalPosition === 'left' ||\n (config.horizontalPosition === 'start' && !isRtl) ||\n (config.horizontalPosition === 'end' && isRtl));\n var /** @type {?} */ isRight = !isLeft && config.horizontalPosition !== 'center';\n if (isLeft) {\n positionStrategy.left('0');\n }\n else if (isRight) {\n positionStrategy.right('0');\n }\n else {\n positionStrategy.centerHorizontally();\n }\n // Set horizontal position.\n if (config.verticalPosition === 'top') {\n positionStrategy.top('0');\n }\n else {\n positionStrategy.bottom('0');\n }\n overlayConfig.positionStrategy = positionStrategy;\n return this._overlay.create(overlayConfig);\n };\n /**\n * Creates an injector to be used inside of a snack bar component.\n * @template T\n * @param {?} config Config that was used to create the snack bar.\n * @param {?} snackBarRef Reference to the snack bar.\n * @return {?}\n */\n MatSnackBar.prototype._createInjector = /**\n * Creates an injector to be used inside of a snack bar component.\n * @template T\n * @param {?} config Config that was used to create the snack bar.\n * @param {?} snackBarRef Reference to the snack bar.\n * @return {?}\n */\n function (config, snackBarRef) {\n var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n var /** @type {?} */ injectionTokens = new WeakMap();\n injectionTokens.set(MatSnackBarRef, snackBarRef);\n injectionTokens.set(MAT_SNACK_BAR_DATA, config.data);\n return new PortalInjector(userInjector || this._injector, injectionTokens);\n };\n MatSnackBar.decorators = [\n { type: Injectable },\n ];\n /** @nocollapse */\n MatSnackBar.ctorParameters = function () { return [\n { type: Overlay, },\n { type: LiveAnnouncer, },\n { type: Injector, },\n { type: BreakpointObserver, },\n { type: MatSnackBar, decorators: [{ type: Optional }, { type: SkipSelf },] },\n { type: MatSnackBarConfig, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DEFAULT_OPTIONS,] },] },\n ]; };\n return MatSnackBar;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar MatSnackBarModule = /** @class */ (function () {\n function MatSnackBarModule() {\n }\n MatSnackBarModule.decorators = [\n { type: NgModule, args: [{\n imports: [\n OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule,\n ],\n exports: [MatSnackBarContainer, MatCommonModule],\n declarations: [MatSnackBarContainer, SimpleSnackBar],\n entryComponents: [MatSnackBarContainer, SimpleSnackBar],\n providers: [MatSnackBar]\n },] },\n ];\n return MatSnackBarModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nexport { MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarContainer, MAT_SNACK_BAR_DATA, MatSnackBarConfig, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations };\n//# sourceMappingURL=snack-bar.es5.js.map\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 { NgModule, Injectable, NgZone, defineInjectable, inject } from '@angular/core';\nimport { Platform } from '@angular/cdk/platform';\nimport { combineLatest, fromEventPattern, Subject } from 'rxjs';\nimport { map, startWith, takeUntil } from 'rxjs/operators';\nimport { coerceArray } from '@angular/cdk/coercion';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar LayoutModule = /** @class */ (function () {\n function LayoutModule() {\n }\n LayoutModule.decorators = [\n { type: NgModule },\n ];\n return LayoutModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Global registry for all dynamically-created, injected media queries.\n */\nvar /** @type {?} */ mediaQueriesForWebkitCompatibility = new Set();\n/**\n * Style tag that holds all of the dynamically-created media queries.\n */\nvar /** @type {?} */ mediaQueryStyleNode;\n/**\n * A utility for calling matchMedia queries.\n */\nvar MediaMatcher = /** @class */ (function () {\n function MediaMatcher(platform) {\n this.platform = platform;\n this._matchMedia = this.platform.isBrowser && window.matchMedia ?\n // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window) :\n noopMatchMedia;\n }\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n * @param {?} query\n * @return {?}\n */\n MediaMatcher.prototype.matchMedia = /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n * @param {?} query\n * @return {?}\n */\n function (query) {\n if (this.platform.WEBKIT) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n };\n MediaMatcher.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n MediaMatcher.ctorParameters = function () { return [\n { type: Platform, },\n ]; };\n /** @nocollapse */ MediaMatcher.ngInjectableDef = defineInjectable({ factory: function MediaMatcher_Factory() { return new MediaMatcher(inject(Platform)); }, token: MediaMatcher, providedIn: \"root\" });\n return MediaMatcher;\n}());\n/**\n * For Webkit engines that only trigger the MediaQueryListListener when\n * there is at least one CSS selector for the respective media query.\n * @param {?} query\n * @return {?}\n */\nfunction createEmptyStyleRule(query) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n (/** @type {?} */ (mediaQueryStyleNode.sheet))\n .insertRule(\"@media \" + query + \" {.fx-query-test{ }}\", 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n }\n catch (/** @type {?} */ e) {\n console.error(e);\n }\n}\n/**\n * No-op matchMedia replacement for non-browser platforms.\n * @param {?} query\n * @return {?}\n */\nfunction noopMatchMedia(query) {\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: function () { },\n removeListener: function () { }\n };\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Utility for checking the matching state of \\@media queries.\n */\nvar BreakpointObserver = /** @class */ (function () {\n function BreakpointObserver(mediaMatcher, zone) {\n this.mediaMatcher = mediaMatcher;\n this.zone = zone;\n /**\n * A map of all media queries currently being listened for.\n */\n this._queries = new Map();\n /**\n * A subject for all other observables to takeUntil based on.\n */\n this._destroySubject = new Subject();\n }\n /** Completes the active subject, signalling to all other observables to complete. */\n /**\n * Completes the active subject, signalling to all other observables to complete.\n * @return {?}\n */\n BreakpointObserver.prototype.ngOnDestroy = /**\n * Completes the active subject, signalling to all other observables to complete.\n * @return {?}\n */\n function () {\n this._destroySubject.next();\n this._destroySubject.complete();\n };\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n /**\n * Whether one or more media queries match the current viewport size.\n * @param {?} value One or more media queries to check.\n * @return {?} Whether any of the media queries match.\n */\n BreakpointObserver.prototype.isMatched = /**\n * Whether one or more media queries match the current viewport size.\n * @param {?} value One or more media queries to check.\n * @return {?} Whether any of the media queries match.\n */\n function (value) {\n var _this = this;\n var /** @type {?} */ queries = splitQueries(coerceArray(value));\n return queries.some(function (mediaQuery) { return _this._registerQuery(mediaQuery).mql.matches; });\n };\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param {?} value One or more media queries to check.\n * @return {?} A stream of matches for the given queries.\n */\n BreakpointObserver.prototype.observe = /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param {?} value One or more media queries to check.\n * @return {?} A stream of matches for the given queries.\n */\n function (value) {\n var _this = this;\n var /** @type {?} */ queries = splitQueries(coerceArray(value));\n var /** @type {?} */ observables = queries.map(function (query) { return _this._registerQuery(query).observable; });\n return combineLatest(observables).pipe(map(function (breakpointStates) {\n return {\n matches: breakpointStates.some(function (state) { return state && state.matches; })\n };\n }));\n };\n /**\n * Registers a specific query to be listened for.\n * @param {?} query\n * @return {?}\n */\n BreakpointObserver.prototype._registerQuery = /**\n * Registers a specific query to be listened for.\n * @param {?} query\n * @return {?}\n */\n function (query) {\n var _this = this;\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return /** @type {?} */ ((this._queries.get(query)));\n }\n var /** @type {?} */ mql = this.mediaMatcher.matchMedia(query);\n // Create callback for match changes and add it is as a listener.\n var /** @type {?} */ queryObservable = fromEventPattern(\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n function (listener) {\n mql.addListener(function (e) { return _this.zone.run(function () { return listener(e); }); });\n }, function (listener) {\n mql.removeListener(function (e) { return _this.zone.run(function () { return listener(e); }); });\n })\n .pipe(takeUntil(this._destroySubject), startWith(mql), map(function (nextMql) { return ({ matches: nextMql.matches }); }));\n // Add the MediaQueryList to the set of queries.\n var /** @type {?} */ output = { observable: queryObservable, mql: mql };\n this._queries.set(query, output);\n return output;\n };\n BreakpointObserver.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n ];\n /** @nocollapse */\n BreakpointObserver.ctorParameters = function () { return [\n { type: MediaMatcher, },\n { type: NgZone, },\n ]; };\n /** @nocollapse */ BreakpointObserver.ngInjectableDef = defineInjectable({ factory: function BreakpointObserver_Factory() { return new BreakpointObserver(inject(MediaMatcher), inject(NgZone)); }, token: BreakpointObserver, providedIn: \"root\" });\n return BreakpointObserver;\n}());\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n * @param {?} queries\n * @return {?}\n */\nfunction splitQueries(queries) {\n return queries.map(function (query) { return query.split(','); })\n .reduce(function (a1, a2) { return a1.concat(a2); })\n .map(function (query) { return query.trim(); });\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nvar /** @type {?} */ Breakpoints = {\n XSmall: '(max-width: 599px)',\n Small: '(min-width: 600px) and (max-width: 959px)',\n Medium: '(min-width: 960px) and (max-width: 1279px)',\n Large: '(min-width: 1280px) and (max-width: 1919px)',\n XLarge: '(min-width: 1920px)',\n Handset: '(max-width: 599px) and (orientation: portrait), ' +\n '(max-width: 959px) and (orientation: landscape)',\n Tablet: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',\n Web: '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n HandsetPortrait: '(max-width: 599px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n HandsetLandscape: '(max-width: 959px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nexport { LayoutModule, BreakpointObserver, Breakpoints, MediaMatcher };\n//# sourceMappingURL=layout.es5.js.map\n","import { Injectable } from '@angular/core';\n\nimport { from as fromPromise, Observable } from 'rxjs';\nimport { first, map, share } from 'rxjs/operators';\n\nimport { Logger } from 'app/shared/logger.service';\n\ndeclare const System: {\n import(name: string): Promise<any>;\n};\n\ntype PrettyPrintOne = (code: string, language?: string, linenums?: number | boolean) => string;\n\n/**\n * Wrapper around the prettify.js library\n */\n@Injectable()\nexport class PrettyPrinter {\n\n private prettyPrintOne: Observable<PrettyPrintOne>;\n\n constructor(private logger: Logger) {\n this.prettyPrintOne = fromPromise(this.getPrettyPrintOne()).pipe(share());\n }\n\n private getPrettyPrintOne(): Promise<PrettyPrintOne> {\n const ppo = (window as any)['prettyPrintOne'];\n return ppo ? Promise.resolve(ppo) :\n // prettify.js is not in window global; load it with webpack loader\n System.import('assets/js/prettify.js')\n .then(\n () => (window as any)['prettyPrintOne'],\n err => {\n const msg = `Cannot get prettify.js from server: ${err.message}`;\n this.logger.error(new Error(msg));\n // return a pretty print fn that always fails.\n return () => { throw new Error(msg); };\n });\n }\n\n /**\n * Format code snippet as HTML\n * @param {string} code - the code snippet to format; should already be HTML encoded\n * @param {string} [language] - The language of the code to render (could be javascript, html, typescript, etc)\n * @param {string|number} [linenums] - Whether to display line numbers:\n * - false: don't display\n * - true: do display\n * - number: do display but start at the given number\n * @returns Observable<string> - Observable of formatted code\n */\n formatCode(code: string, language?: string, linenums?: number | boolean) {\n return this.prettyPrintOne.pipe(\n map(ppo => {\n try {\n return ppo(code, language, linenums);\n } catch (err) {\n const msg = `Could not format code that begins '${code.substr(0, 50)}...'.`;\n console.error(msg, err);\n throw new Error(msg);\n }\n }),\n first(), // complete immediately\n );\n }\n}\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes}\n * tslint:disable\n */ \nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/material/snack-bar\";\nimport * as i2 from \"@angular/cdk/overlay\";\nimport * as i3 from \"@angular/common\";\nimport * as i4 from \"@angular/cdk/bidi\";\nimport * as i5 from \"@angular/cdk/a11y\";\nimport * as i6 from \"@angular/cdk/layout\";\nimport * as i7 from \"@angular/cdk/portal\";\nimport * as i8 from \"@angular/cdk/platform\";\nimport * as i9 from \"@angular/cdk/scrolling\";\nimport * as i10 from \"@angular/material/core\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"../../button/typings/index.ngfactory\";\nvar MatSnackBarModuleNgFactory = i0.ɵcmf(i1.MatSnackBarModule, [], function (_l) { return i0.ɵmod([i0.ɵmpd(512, i0.ComponentFactoryResolver, i0.ɵCodegenComponentFactoryResolver, [[8, [MatSnackBarContainerNgFactory, SimpleSnackBarNgFactory]], [3, i0.ComponentFactoryResolver], i0.NgModuleRef]), i0.ɵmpd(4608, i2.Overlay, i2.Overlay, [i2.ScrollStrategyOptions, i2.OverlayContainer, i0.ComponentFactoryResolver, i2.OverlayPositionBuilder, i2.OverlayKeyboardDispatcher, i0.Injector, i0.NgZone, i3.DOCUMENT, i4.Directionality]), i0.ɵmpd(4608, i3.NgLocalization, i3.NgLocaleLocalization, [i0.LOCALE_ID, [2, i3.ɵangular_packages_common_common_a]]), i0.ɵmpd(4608, i1.MatSnackBar, i1.MatSnackBar, [i2.Overlay, i5.LiveAnnouncer, i0.Injector, i6.BreakpointObserver, [3, i1.MatSnackBar], i1.MAT_SNACK_BAR_DEFAULT_OPTIONS]), i0.ɵmpd(1073742336, i4.BidiModule, i4.BidiModule, []), i0.ɵmpd(1073742336, i7.PortalModule, i7.PortalModule, []), i0.ɵmpd(1073742336, i8.PlatformModule, i8.PlatformModule, []), i0.ɵmpd(1073742336, i9.ScrollDispatchModule, i9.ScrollDispatchModule, []), i0.ɵmpd(1073742336, i2.OverlayModule, i2.OverlayModule, []), i0.ɵmpd(1073742336, i3.CommonModule, i3.CommonModule, []), i0.ɵmpd(1073742336, i10.MatCommonModule, i10.MatCommonModule, [[2, i10.MATERIAL_SANITY_CHECKS]]), i0.ɵmpd(1073742336, i10.MatRippleModule, i10.MatRippleModule, []), i0.ɵmpd(1073742336, i11.MatButtonModule, i11.MatButtonModule, []), i0.ɵmpd(1073742336, i1.MatSnackBarModule, i1.MatSnackBarModule, [])]); });\nexport { MatSnackBarModuleNgFactory as MatSnackBarModuleNgFactory };\nvar styles_MatSnackBarContainer = [\".mat-snack-bar-container{border-radius:2px;box-sizing:border-box;display:block;margin:24px;max-width:568px;min-width:288px;padding:14px 24px;transform:translateY(100%) translateY(24px)}.mat-snack-bar-container.mat-snack-bar-center{margin:0;transform:translateY(100%)}.mat-snack-bar-container.mat-snack-bar-top{transform:translateY(-100%) translateY(-24px)}.mat-snack-bar-container.mat-snack-bar-top.mat-snack-bar-center{transform:translateY(-100%)}@media screen and (-ms-high-contrast:active){.mat-snack-bar-container{border:solid 1px}}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:0;max-width:inherit;width:100%}\"];\nvar RenderType_MatSnackBarContainer = i0.ɵcrt({ encapsulation: 2, styles: styles_MatSnackBarContainer, data: { \"animation\": [{ type: 7, name: \"state\", definitions: [{ type: 0, name: \"visible-top, visible-bottom\", styles: { type: 6, styles: { transform: \"translateY(0%)\" }, offset: null }, options: undefined }, { type: 1, expr: \"visible-top => hidden-top, visible-bottom => hidden-bottom\", animation: { type: 4, styles: null, timings: \"195ms cubic-bezier(0.4,0.0,1,1)\" }, options: null }, { type: 1, expr: \"void => visible-top, void => visible-bottom\", animation: { type: 4, styles: null, timings: \"225ms cubic-bezier(0.0,0.0,0.2,1)\" }, options: null }], options: {} }] } });\nexport { RenderType_MatSnackBarContainer as RenderType_MatSnackBarContainer };\nfunction View_MatSnackBarContainer_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵand(0, null, null, 0))], null, null); }\nexport function View_MatSnackBarContainer_0(_l) { return i0.ɵvid(2, [i0.ɵqud(402653184, 1, { _portalOutlet: 0 }), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_MatSnackBarContainer_1)), i0.ɵdid(2, 212992, [[1, 4]], 0, i7.CdkPortalOutlet, [i0.ComponentFactoryResolver, i0.ViewContainerRef], { portal: [0, \"portal\"] }, null)], function (_ck, _v) { var currVal_0 = \"\"; _ck(_v, 2, 0, currVal_0); }, null); }\nexport function View_MatSnackBarContainer_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"snack-bar-container\", [[\"class\", \"mat-snack-bar-container\"], [\"role\", \"alert\"]], [[40, \"@state\", 0]], [[\"component\", \"@state.done\"]], function (_v, en, $event) { var ad = true; if ((\"component:@state.done\" === en)) {\n var pd_0 = (i0.ɵnov(_v, 1).onAnimationEnd($event) !== false);\n ad = (pd_0 && ad);\n } return ad; }, View_MatSnackBarContainer_0, RenderType_MatSnackBarContainer)), i0.ɵdid(1, 180224, null, 0, i1.MatSnackBarContainer, [i0.NgZone, i0.ElementRef, i0.ChangeDetectorRef], null, null)], null, function (_ck, _v) { var currVal_0 = i0.ɵnov(_v, 1)._animationState; _ck(_v, 0, 0, currVal_0); }); }\nvar MatSnackBarContainerNgFactory = i0.ɵccf(\"snack-bar-container\", i1.MatSnackBarContainer, View_MatSnackBarContainer_Host_0, {}, {}, []);\nexport { MatSnackBarContainerNgFactory as MatSnackBarContainerNgFactory };\nvar styles_SimpleSnackBar = [\".mat-simple-snackbar{display:flex;justify-content:space-between;line-height:20px;opacity:1}.mat-simple-snackbar-action{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-around;margin:-8px 0 -8px 8px}.mat-simple-snackbar-action button{flex:1;max-height:36px}[dir=rtl] .mat-simple-snackbar-action{margin-left:0;margin-right:8px}\"];\nvar RenderType_SimpleSnackBar = i0.ɵcrt({ encapsulation: 2, styles: styles_SimpleSnackBar, data: { \"animation\": [{ type: 7, name: \"contentFade\", definitions: [{ type: 1, expr: \":enter\", animation: [{ type: 6, styles: { opacity: \"0\" }, offset: null }, { type: 4, styles: null, timings: \"375ms cubic-bezier(0.4,0.0,0.2,1)\" }], options: null }], options: {} }] } });\nexport { RenderType_SimpleSnackBar as RenderType_SimpleSnackBar };\nfunction View_SimpleSnackBar_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 3, \"div\", [[\"class\", \"mat-simple-snackbar-action\"]], null, null, null, null, null)), (_l()(), i0.ɵeld(1, 0, null, null, 2, \"button\", [[\"mat-button\", \"\"]], [[8, \"disabled\", 0]], [[null, \"click\"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if ((\"click\" === en)) {\n var pd_0 = (_co.action() !== false);\n ad = (pd_0 && ad);\n } return ad; }, i12.View_MatButton_0, i12.RenderType_MatButton)), i0.ɵdid(2, 180224, null, 0, i11.MatButton, [i0.ElementRef, i8.Platform, i5.FocusMonitor], null, null), (_l()(), i0.ɵted(3, 0, [\"\", \"\"]))], null, function (_ck, _v) { var _co = _v.component; var currVal_0 = (i0.ɵnov(_v, 2).disabled || null); _ck(_v, 1, 0, currVal_0); var currVal_1 = _co.data.action; _ck(_v, 3, 0, currVal_1); }); }\nexport function View_SimpleSnackBar_0(_l) { return i0.ɵvid(2, [(_l()(), i0.ɵted(0, null, [\"\", \"\"])), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_SimpleSnackBar_1)), i0.ɵdid(2, 16384, null, 0, i3.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, \"ngIf\"] }, null)], function (_ck, _v) { var _co = _v.component; var currVal_1 = _co.hasAction; _ck(_v, 2, 0, currVal_1); }, function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.data.message; _ck(_v, 0, 0, currVal_0); }); }\nexport function View_SimpleSnackBar_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"simple-snack-bar\", [[\"class\", \"mat-simple-snackbar\"]], [[40, \"@contentFade\", 0]], null, null, View_SimpleSnackBar_0, RenderType_SimpleSnackBar)), i0.ɵdid(1, 49152, null, 0, i1.SimpleSnackBar, [i1.MatSnackBarRef, i1.MAT_SNACK_BAR_DATA], null, null)], null, function (_ck, _v) { var currVal_0 = undefined; _ck(_v, 0, 0, currVal_0); }); }\nvar SimpleSnackBarNgFactory = i0.ɵccf(\"simple-snack-bar\", i1.SimpleSnackBar, View_SimpleSnackBar_Host_0, {}, {}, []);\nexport { SimpleSnackBarNgFactory as SimpleSnackBarNgFactory };\n","<ng-template cdkPortalOutlet></ng-template>","{{data.message}}<div class=\"mat-simple-snackbar-action\" *ngIf=\"hasAction\"><button mat-button (click)=\"action()\">{{data.action}}</button></div>"],"sourceRoot":""}