UNPKG

176 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///mdc.toolbar.min.js","webpack:///webpack/bootstrap 74583296950ff8f5c698","webpack:///./packages/mdc-base/foundation.ts","webpack:///./packages/mdc-base/component.ts","webpack:///./packages/mdc-toolbar/foundation.ts","webpack:///./packages/mdc-toolbar/constants.ts","webpack:///./packages/mdc-toolbar/index.ts","webpack:///./packages/mdc-toolbar/component.ts","webpack:///./packages/mdc-dom/ponyfill.ts","webpack:///./packages/mdc-ripple/util.ts","webpack:///./packages/mdc-ripple/foundation.ts","webpack:///./packages/mdc-ripple/constants.ts","webpack:///./packages/mdc-ripple/component.ts"],"names":["root","factory","exports","module","define","amd","toolbar","mdc","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","default","object","property","prototype","hasOwnProperty","p","s","0","value","MDCFoundation","adapter","adapter_","init","destroy","1","__read","Symbol","iterator","r","e","ar","next","done","push","error","return","__spread","arguments","length","concat","foundation_1","MDCComponent","foundation","args","_i","root_","initialize","apply","foundation_","getDefaultFoundation","initialSyncWithDOM","attachTo","_args","Error","listen","evtType","handler","addEventListener","unlisten","removeEventListener","emit","evtData","shouldBubble","evt","CustomEvent","bubbles","detail","document","createEvent","initCustomEvent","dispatchEvent","107","__extends","_extendStatics","b","setPrototypeOf","__proto__","Array","__","constructor","create","__assign","assign","t","constants_1","MDCToolbarFoundation","_super","_this","defaultAdapter","checkRowHeightFrame_","scrollFrame_","executedLastChange_","isFixed_","isFixedLastRow_","hasFlexibleFirstRow_","useFlexDefaultBehavior_","calculations_","flexibleExpansionHeight","flexibleExpansionRatio","maxTranslateYDistance","maxTranslateYRatio","scrollThreshold","scrollThresholdRatio","toolbarHeight","toolbarRatio","toolbarRowHeight","cssClasses","strings","numbers","hasClass","addClass","removeClass","registerScrollHandler","deregisterScrollHandler","registerResizeHandler","deregisterResizeHandler","getViewportWidth","getViewportScrollY","getOffsetHeight","getFirstRowElementOffsetHeight","notifyChange","setStyle","setStyleForTitleElement","setStyleForFlexibleRowElement","setStyleForFixedAdjustElement","FIXED","FIXED_LASTROW","TOOLBAR_ROW_FLEXIBLE","FLEXIBLE_DEFAULT_BEHAVIOR","resizeHandler_","checkRowHeight_","scrollHandler_","updateToolbarStyles_","initKeyRatio_","setKeyHeights_","updateAdjustElementStyles","getFlexibleExpansionRatio_","scrollTop","Math","max","cancelAnimationFrame","requestAnimationFrame","newToolbarRowHeight","getRowHeight_","hasScrolledOutOfThreshold","scrolledOutOfThreshold_","updateToolbarFlexibleState_","updateToolbarFixedState_","updateFlexibleRowElementStyles_","firstRowMaxRatio","breakpoint","TOOLBAR_MOBILE_BREAKPOINT","TOOLBAR_ROW_MOBILE_HEIGHT","TOOLBAR_ROW_HEIGHT","FLEXIBLE_MAX","FLEXIBLE_MIN","translateDistance","min","FIXED_AT_LAST_ROW","height","updateElementStylesDefaultBehavior_","maxTitleSize","MAX_TITLE_SIZE","minTitleSize","MIN_TITLE_SIZE","currentTitleSize","108","CHANGE_EVENT","FIRST_ROW_SELECTOR","ICON_SELECTOR","TITLE_SELECTOR","173","__export","174","component_1","component_2","MDCToolbar","ripples_","fixedAdjustElement_","titleElement_","querySelector","firstRowElement","firstRowElement_","forEach","querySelectorAll","icon","ripple","MDCRipple","unbounded","set","element","className","classList","contains","add","remove","window","innerWidth","pageYOffset","offsetHeight","style","setProperty","fixedAdjustElement","2","closest","selector","el","matches","parentElement","webkitMatchesSelector","msMatchesSelector","3","detectEdgePseudoVarBug","windowObj","node","createElement","body","appendChild","computedStyle","getComputedStyle","hasPseudoVarBug","borderTopStyle","parentNode","removeChild","supportsCssVariables","forceRefresh","CSS","supportsCssVars","supportsCssVariables_","supports","explicitlySupportsCssVars","weAreFeatureDetectingSafari10plus","applyPassive","globalObj","supportsPassive_","isSupported_1","passive","getNormalizedEventCoords","pageOffset","clientRect","x","y","normalizedX","normalizedY","documentX","left","documentY","top","type","touchEvent","changedTouches","pageX","pageY","mouseEvent","4","util_1","ACTIVATION_EVENT_TYPES","POINTER_DEACTIVATION_EVENT_TYPES","activatedTargets","MDCRippleFoundation","activationAnimationHasEnded_","activationTimer_","fgDeactivationRemovalTimer_","fgScale_","frame_","width","initialSize_","layoutFrame_","maxRadius_","unboundedCoords_","activationState_","defaultActivationState_","activationTimerCallback_","runDeactivationUXLogicIfReady_","activateHandler_","activate_","deactivateHandler_","deactivate_","focusHandler_","handleFocus","blurHandler_","handleBlur","layout","browserSupportsCssVars","computeBoundingRect","right","bottom","containsEventTarget","deregisterDocumentInteractionHandler","deregisterInteractionHandler","getWindowPageOffset","isSurfaceActive","isSurfaceDisabled","isUnbounded","registerDocumentInteractionHandler","registerInteractionHandler","updateCssVariable","supportsPressRipple","supportsPressRipple_","registerRootHandlers_","_a","ROOT_1","ROOT","UNBOUNDED_1","UNBOUNDED","layoutInternal_","clearTimeout","FG_ACTIVATION","FG_DEACTIVATION","ROOT_2","UNBOUNDED_2","removeCssVars_","deregisterRootHandlers_","deregisterDeactivationHandlers_","activate","deactivate","setUnbounded","BG_FOCUSED","activationEvent","hasDeactivationUXRun","isActivated","isProgrammatic","wasActivatedByPointer","wasElementMadeActive","registerDeactivationHandlers_","rippleStrings","keys","key","indexOf","activationState","previousActivationEvent","previousActivationEvent_","some","target","resetActivationState_","checkElementMadeActive_","animateActivation_","keyCode","VAR_FG_TRANSLATE_START","VAR_FG_TRANSLATE_END","_b","DEACTIVATION_TIMEOUT_MS","translateStart","translateEnd","_c","getFgTranslationCoordinates_","startPoint","endPoint","rmBoundedActivationClasses_","setTimeout","FG_DEACTIVATION_MS","TAP_DELAY_MS","state","animateDeactivation_","maxDim","sqrt","pow","PADDING","floor","INITIAL_ORIGIN_SCALE","updateLayoutCssVars_","VAR_FG_SIZE","VAR_LEFT","VAR_TOP","VAR_FG_SCALE","round","5","6","__importStar","mod","result","k","ponyfill_1","util","disabled","opts","createAdapter","instance","getBoundingClientRect","documentElement","page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X,SAAKxY,KACrB0Y,aZgqDMlM,IY9pDN,SAAgCD,GAC1BvM,KAAW0Y,WAAUF,QAAYjM,GACjCvM,KACN2Y,iBZ+pDM1X,cACAD,kBY9pDNsL,EAAA9K,UAAQ6S,SAAR,WACMrU,KAAY2D,YAClB0Q,YAEA/H,EAAA9K,UAAU8S,WAAV,WACMtU,KAAY2D,YAClB2Q,cAEAhI,EAAA9K,UAAM6Q,OAAN,WACMrS,KAAY2D,YAClB0O,UAEA/F,EAAA9K,UAAoBoC,qBAApB,WACE,MAAO,IAAIT,GAAmB2N,oBAAUxE,EAAc6L,cACxDnY,QAEAsM,EAAA9K,UAAkBqC,mBAAlB,WACE,GAAUrE,GAAOQ,KAAsBwD,KACnCxD,MAAUuM,UAAyB,wBAAQ/M,GACjDoZ,SAQQtM,EAAA9K,UAAamX,cAArB,WACM3Y,KAAY2D,YAAa4Q,aAAQiE,QAAKxY,KAC5C0Y,cACDpM,GAjF8Bb,EAiF9BrI,aAjFY1D,GAAA4M,UAASA","file":"mdc.toolbar.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"toolbar\"] = factory();\n\telse\n\t\troot[\"mdc\"] = root[\"mdc\"] || {}, root[\"mdc\"][\"toolbar\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"toolbar\"] = factory();\n\telse\n\t\troot[\"mdc\"] = root[\"mdc\"] || {}, root[\"mdc\"][\"toolbar\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 173);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MDCFoundation = /** @class */function () {\n function MDCFoundation(adapter) {\n if (adapter === void 0) {\n adapter = {};\n }\n this.adapter_ = adapter;\n }\n Object.defineProperty(MDCFoundation, \"cssClasses\", {\n get: function get() {\n // Classes extending MDCFoundation should implement this method to return an object which exports every\n // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n return {};\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"strings\", {\n get: function get() {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n return {};\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"numbers\", {\n get: function get() {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n return {};\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"defaultAdapter\", {\n get: function get() {\n // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n // validation.\n return {};\n },\n enumerable: true,\n configurable: true\n });\n MDCFoundation.prototype.init = function () {\n // Subclasses should override this method to perform initialization routines (registering events, etc.)\n };\n MDCFoundation.prototype.destroy = function () {\n // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n };\n return MDCFoundation;\n}();\nexports.MDCFoundation = MDCFoundation;\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexports.default = MDCFoundation;\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nvar __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = { error: error };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread = this && this.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar foundation_1 = __webpack_require__(0);\nvar MDCComponent = /** @class */function () {\n function MDCComponent(root, foundation) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n this.root_ = root;\n this.initialize.apply(this, __spread(args));\n // Note that we initialize foundation here and not within the constructor's default param so that\n // this.root_ is defined and can be used within the foundation class.\n this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation;\n this.foundation_.init();\n this.initialSyncWithDOM();\n }\n MDCComponent.attachTo = function (root) {\n // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and\n // returns an instantiated component with its root set to that element. Also note that in the cases of\n // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized\n // from getDefaultFoundation().\n return new MDCComponent(root, new foundation_1.MDCFoundation({}));\n };\n /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */\n MDCComponent.prototype.initialize = function () {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n // Subclasses can override this to do any additional setup work that would be considered part of a\n // \"constructor\". Essentially, it is a hook into the parent constructor before the foundation is\n // initialized. Any additional arguments besides root and foundation will be passed in here.\n };\n MDCComponent.prototype.getDefaultFoundation = function () {\n // Subclasses must override this method to return a properly configured foundation class for the\n // component.\n throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class');\n };\n MDCComponent.prototype.initialSyncWithDOM = function () {\n // Subclasses should override this method if they need to perform work to synchronize with a host DOM\n // object. An example of this would be a form control wrapper that needs to synchronize its internal state\n // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM\n // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.\n };\n MDCComponent.prototype.destroy = function () {\n // Subclasses may implement this method to release any resources / deregister any listeners they have\n // attached. An example of this might be deregistering a resize event from the window object.\n this.foundation_.destroy();\n };\n MDCComponent.prototype.listen = function (evtType, handler) {\n this.root_.addEventListener(evtType, handler);\n };\n MDCComponent.prototype.unlisten = function (evtType, handler) {\n this.root_.removeEventListener(evtType, handler);\n };\n /**\n * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.\n */\n MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {\n if (shouldBubble === void 0) {\n shouldBubble = false;\n }\n var evt;\n if (typeof CustomEvent === 'function') {\n evt = new CustomEvent(evtType, {\n bubbles: shouldBubble,\n detail: evtData\n });\n } else {\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(evtType, shouldBubble, false, evtData);\n }\n this.root_.dispatchEvent(evt);\n };\n return MDCComponent;\n}();\nexports.MDCComponent = MDCComponent;\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexports.default = MDCComponent;\n\n/***/ }),\n\n/***/ 107:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar foundation_1 = __webpack_require__(0);\nvar constants_1 = __webpack_require__(108);\nvar MDCToolbarFoundation = /** @class */function (_super) {\n __extends(MDCToolbarFoundation, _super);\n function MDCToolbarFoundation(adapter) {\n var _this = _super.call(this, __assign({}, MDCToolbarFoundation.defaultAdapter, adapter)) || this;\n _this.checkRowHeightFrame_ = 0;\n _this.scrollFrame_ = 0;\n _this.executedLastChange_ = false;\n _this.isFixed_ = false;\n _this.isFixedLastRow_ = false;\n _this.hasFlexibleFirstRow_ = false;\n _this.useFlexDefaultBehavior_ = false;\n _this.calculations_ = {\n flexibleExpansionHeight: 0,\n flexibleExpansionRatio: 0,\n maxTranslateYDistance: 0,\n maxTranslateYRatio: 0,\n scrollThreshold: 0,\n scrollThresholdRatio: 0,\n toolbarHeight: 0,\n toolbarRatio: 0,\n toolbarRowHeight: 0\n };\n return _this;\n }\n Object.defineProperty(MDCToolbarFoundation, \"cssClasses\", {\n get: function get() {\n return constants_1.cssClasses;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCToolbarFoundation, \"strings\", {\n get: function get() {\n return constants_1.strings;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCToolbarFoundation, \"numbers\", {\n get: function get() {\n return constants_1.numbers;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCToolbarFoundation, \"defaultAdapter\", {\n get: function get() {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n hasClass: function hasClass() {\n return false;\n },\n addClass: function addClass() {\n return undefined;\n },\n removeClass: function removeClass() {\n return undefined;\n },\n registerScrollHandler: function registerScrollHandler() {\n return undefined;\n },\n deregisterScrollHandler: function deregisterScrollHandler() {\n return undefined;\n },\n registerResizeHandler: function registerResizeHandler() {\n return undefined;\n },\n deregisterResizeHandler: function deregisterResizeHandler() {\n return undefined;\n },\n getViewportWidth: function getViewportWidth() {\n return 0;\n },\n getViewportScrollY: function getViewportScrollY() {\n return 0;\n },\n getOffsetHeight: function getOffsetHeight() {\n return 0;\n },\n getFirstRowElementOffsetHeight: function getFirstRowElementOffsetHeight() {\n return 0;\n },\n notifyChange: function notifyChange() {\n return undefined;\n },\n setStyle: function setStyle() {\n return undefined;\n },\n setStyleForTitleElement: function setStyleForTitleElement() {\n return undefined;\n },\n setStyleForFlexibleRowElement: function setStyleForFlexibleRowElement() {\n return undefined;\n },\n setStyleForFixedAdjustElement: function setStyleForFixedAdjustElement() {\n return undefined;\n }\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: true,\n configurable: true\n });\n MDCToolbarFoundation.prototype.init = function () {\n var _this = this;\n this.isFixed_ = this.adapter_.hasClass(constants_1.cssClasses.FIXED);\n this.isFixedLastRow_ = this.adapter_.hasClass(constants_1.cssClasses.FIXED_LASTROW) && this.isFixed_;\n this.hasFlexibleFirstRow_ = this.adapter_.hasClass(constants_1.cssClasses.TOOLBAR_ROW_FLEXIBLE);\n if (this.hasFlexibleFirstRow_) {\n this.useFlexDefaultBehavior_ = this.adapter_.hasClass(constants_1.cssClasses.FLEXIBLE_DEFAULT_BEHAVIOR);\n }\n this.resizeHandler_ = function () {\n return _this.checkRowHeight_();\n };\n this.scrollHandler_ = function () {\n return _this.updateToolbarStyles_();\n };\n this.adapter_.registerResizeHandler(this.resizeHandler_);\n this.adapter_.registerScrollHandler(this.scrollHandler_);\n this.initKeyRatio_();\n this.setKeyHeights_();\n };\n MDCToolbarFoundation.prototype.destroy = function () {\n this.adapter_.deregisterResizeHandler(this.resizeHandler_);\n this.adapter_.deregisterScrollHandler(this.scrollHandler_);\n };\n MDCToolbarFoundation.prototype.updateAdjustElementStyles = function () {\n if (this.isFixed_) {\n this.adapter_.setStyleForFixedAdjustElement('margin-top', this.calculations_.toolbarHeight + \"px\");\n }\n };\n MDCToolbarFoundation.prototype.getFlexibleExpansionRatio_ = function (scrollTop) {\n // To prevent division by zero when there is no flexibleExpansionHeight\n var delta = 0.0001;\n return Math.max(0, 1 - scrollTop / (this.calculations_.flexibleExpansionHeight + delta));\n };\n MDCToolbarFoundation.prototype.checkRowHeight_ = function () {\n var _this = this;\n cancelAnimationFrame(this.checkRowHeightFrame_);\n this.checkRowHeightFrame_ = requestAnimationFrame(function () {\n return _this.setKeyHeights_();\n });\n };\n MDCToolbarFoundation.prototype.setKeyHeights_ = function () {\n var newToolbarRowHeight = this.getRowHeight_();\n if (newToolbarRowHeight !== this.calculations_.toolbarRowHeight) {\n this.calculations_.toolbarRowHeight = newToolbarRowHeight;\n this.calculations_.toolbarHeight = this.calculations_.toolbarRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.flexibleExpansionHeight = this.calculations_.flexibleExpansionRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.maxTranslateYDistance = this.calculations_.maxTranslateYRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.scrollThreshold = this.calculations_.scrollThresholdRatio * this.calculations_.toolbarRowHeight;\n this.updateAdjustElementStyles();\n this.updateToolbarStyles_();\n }\n };\n MDCToolbarFoundation.prototype.updateToolbarStyles_ = function () {\n var _this = this;\n cancelAnimationFrame(this.scrollFrame_);\n this.scrollFrame_ = requestAnimationFrame(function () {\n var scrollTop = _this.adapter_.getViewportScrollY();\n var hasScrolledOutOfThreshold = _this.scrolledOutOfThreshold_(scrollTop);\n if (hasScrolledOutOfThreshold && _this.executedLastChange_) {\n return;\n }\n var flexibleExpansionRatio = _this.getFlexibleExpansionRatio_(scrollTop);\n _this.updateToolbarFlexibleState_(flexibleExpansionRatio);\n if (_this.isFixedLastRow_) {\n _this.updateToolbarFixedState_(scrollTop);\n }\n if (_this.hasFlexibleFirstRow_) {\n _this.updateFlexibleRowElementStyles_(flexibleExpansionRatio);\n }\n _this.executedLastChange_ = hasScrolledOutOfThreshold;\n _this.adapter_.notifyChange({ flexibleExpansionRatio: flexibleExpansionRatio });\n });\n };\n MDCToolbarFoundation.prototype.scrolledOutOfThreshold_ = function (scrollTop) {\n return scrollTop > this.calculations_.scrollThreshold;\n };\n MDCToolbarFoundation.prototype.initKeyRatio_ = function () {\n var toolbarRowHeight = this.getRowHeight_();\n var firstRowMaxRatio = this.adapter_.getFirstRowElementOffsetHeight() / toolbarRowHeight;\n this.calculations_.toolbarRatio = this.adapter_.getOffsetHeight() / toolbarRowHeight;\n this.calculations_.flexibleExpansionRatio = firstRowMaxRatio - 1;\n this.calculations_.maxTranslateYRatio = this.isFixedLastRow_ ? this.calculations_.toolbarRatio - firstRowMaxRatio : 0;\n this.calculations_.scrollThresholdRatio = (this.isFixedLastRow_ ? this.calculations_.toolbarRatio : firstRowMaxRatio) - 1;\n };\n MDCToolbarFoundation.prototype.getRowHeight_ = function () {\n var breakpoint = constants_1.numbers.TOOLBAR_MOBILE_BREAKPOINT;\n return this.adapter_.getViewportWidth() < breakpoint ? constants_1.numbers.TOOLBAR_ROW_MOBILE_HEIGHT : constants_1.numbers.TOOLBAR_ROW_HEIGHT;\n };\n MDCToolbarFoundation.prototype.updateToolbarFlexibleState_ = function (flexibleExpansionRatio) {\n this.adapter_.removeClass(constants_1.cssClasses.FLEXIBLE_MAX);\n this.adapter_.removeClass(constants_1.cssClasses.FLEXIBLE_MIN);\n if (flexibleExpansionRatio === 1) {\n this.adapter_.addClass(constants_1.cssClasses.FLEXIBLE_MAX);\n } else if (flexibleExpansionRatio === 0) {\n this.adapter_.addClass(constants_1.cssClasses.FLEXIBLE_MIN);\n }\n };\n MDCToolbarFoundation.prototype.updateToolbarFixedState_ = function (scrollTop) {\n var translateDistance = Math.max(0, Math.min(scrollTop - this.calculations_.flexibleExpansionHeight, this.calculations_.maxTranslateYDistance));\n this.adapter_.setStyle('transform', \"translateY(\" + -translateDistance + \"px)\");\n if (translateDistance === this.calculations_.maxTranslateYDistance) {\n this.adapter_.addClass(constants_1.cssClasses.FIXED_AT_LAST_ROW);\n } else {\n this.adapter_.removeClass(constants_1.cssClasses.FIXED_AT_LAST_ROW);\n }\n };\n MDCToolbarFoundation.prototype.updateFlexibleRowElementStyles_ = function (flexibleExpansionRatio) {\n if (this.isFixed_) {\n var height = this.calculations_.flexibleExpansionHeight * flexibleExpansionRatio;\n this.adapter_.setStyleForFlexibleRowElement('height', height + this.calculations_.toolbarRowHeight + \"px\");\n }\n if (this.useFlexDefaultBehavior_) {\n this.updateElementStylesDefaultBehavior_(flexibleExpansionRatio);\n }\n };\n MDCToolbarFoundation.prototype.updateElementStylesDefaultBehavior_ = function (flexibleExpansionRatio) {\n var maxTitleSize = constants_1.numbers.MAX_TITLE_SIZE;\n var minTitleSize = constants_1.numbers.MIN_TITLE_SIZE;\n var currentTitleSize = (maxTitleSize - minTitleSize) * flexibleExpansionRatio + minTitleSize;\n this.adapter_.setStyleForTitleElement('font-size', currentTitleSize + \"rem\");\n };\n return MDCToolbarFoundation;\n}(foundation_1.MDCFoundation);\nexports.MDCToolbarFoundation = MDCToolbarFoundation;\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexports.default = MDCToolbarFoundation;\n\n/***/ }),\n\n/***/ 108:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cssClasses = {\n FIXED: 'mdc-toolbar--fixed',\n FIXED_AT_LAST_ROW: 'mdc-toolbar--fixed-at-last-row',\n FIXED_LASTROW: 'mdc-toolbar--fixed-lastrow-only',\n FLEXIBLE_DEFAULT_BEHAVIOR: 'mdc-toolbar--flexible-default-behavior',\n FLEXIBLE_MAX: 'mdc-toolbar--flexible-space-maximized',\n FLEXIBLE_MIN: 'mdc-toolbar--flexible-space-minimized',\n TOOLBAR_ROW_FLEXIBLE: 'mdc-toolbar--flexible'\n};\nexports.strings = {\n CHANGE_EVENT: 'MDCToolbar:change',\n FIRST_ROW_SELECTOR: '.mdc-toolbar__row:first-child',\n ICON_SELECTOR: '.mdc-toolbar__icon',\n TITLE_SELECTOR: '.mdc-toolbar__title'\n};\nexports.numbers = {\n MAX_TITLE_SIZE: 2.125,\n MIN_TITLE_SIZE: 1.25,\n TOOLBAR_MOBILE_BREAKPOINT: 600,\n TOOLBAR_ROW_HEIGHT: 64,\n TOOLBAR_ROW_MOBILE_HEIGHT: 56\n};\n\n/***/ }),\n\n/***/ 173:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(174));\n__export(__webpack_require__(108));\n__export(__webpack_require__(107));\n\n/***/ }),\n\n/***/ 174:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = __webpack_require__(1);\nvar component_2 = __webpack_require__(6);\nvar foundation_1 = __webpack_require__(107);\nvar strings = foundation_1.MDCToolbarFoundation.strings;\nvar MDCToolbar = /** @class */function (_super) {\n __extends(MDCToolbar, _super);\n function MDCToolbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCToolbar.attachTo = function (root) {\n return new MDCToolbar(root);\n };\n MDCToolbar.prototype.initialize = function () {\n var _this = this;\n this.ripples_ = [];\n this.fixedAdjustElement_ = null;\n this.titleElement_ = this.root_.querySelector(strings.TITLE_SELECTOR);\n var firstRowElement = this.root_.querySelector(strings.FIRST_ROW_SELECTOR);\n if (!firstRowElement) {\n throw new Error(\"MDCToolbar: Required sub-element '\" + strings.FIRST_ROW_SELECTOR + \"' is missing\");\n }\n this.firstRowElement_ = firstRowElement;\n [].forEach.call(this.root_.querySelectorAll(strings.ICON_SELECTOR), function (icon) {\n var ripple = component_2.MDCRipple.attachTo(icon);\n ripple.unbounded = true;\n _this.ripples_.push(ripple);\n });\n };\n MDCToolbar.prototype.destroy = function () {\n this.ripples_.forEach(function (ripple) {\n ripple.destroy();\n });\n _super.prototype.destroy.call(this);\n };\n Object.defineProperty(MDCToolbar.prototype, \"fixedAdjustElement\", {\n get: function get() {\n return this.fixedAdjustElement_;\n },\n set: function set(element) {\n this.fixedAdjustElement_ = element;\n this.foundation_.updateAdjustElementStyles();\n },\n enumerable: true,\n configurable: true\n });\n MDCToolbar.prototype.getDefaultFoundation = function () {\n var _this = this;\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n var adapter = {\n hasClass: function hasClass(className) {\n return _this.root_.classList.contains(className);\n },\n addClass: function addClass(className) {\n return _this.root_.classList.add(className);\n },\n removeClass: function removeClass(className) {\n return _this.root_.classList.remove(className);\n },\n registerScrollHandler: function registerScrollHandler(handler) {\n return window.addEventListener('scroll', handler);\n },\n deregisterScrollHandler: function deregisterScrollHandler(handler) {\n return window.removeEventListener('scroll', handler);\n },\n registerResizeHandler: function registerResizeHandler(handler) {\n return window.addEventListener('resize', handler);\n },\n deregisterResizeHandler: function deregisterResizeHandler(handler) {\n return window.removeEventListener('resize', handler);\n },\n getViewportWidth: function getViewportWidth() {\n return window.innerWidth;\n },\n getViewportScrollY: function getViewportScrollY() {\n return window.pageYOffset;\n },\n getOffsetHeight: function getOffsetHeight() {\n return _this.root_.offsetHeight;\n },\n getFirstRowElementOffsetHeight: function getFirstRowElementOffsetHeight() {\n return _this.firstRowElement_.offsetHeight;\n },\n notifyChange: function notifyChange(evtData) {\n return _this.emit(strings.CHANGE_EVENT, evtData);\n },\n setStyle: function setStyle(property, value) {\n return _this.root_.style.setProperty(property, value);\n },\n setStyleForTitleElement: function setStyleForTitleElement(property, value) {\n if (_this.titleElement_) {\n _this.titleElement_.style.setProperty(property, value);\n }\n },\n setStyleForFlexibleRowElement: function setStyleForFlexibleRowElement(property, value) {\n return _this.firstRowElement_.style.setProperty(property, value);\n },\n setStyleForFixedAdjustElement: function setStyleForFixedAdjustElement(property, value) {\n if (_this.fixedAdjustElement) {\n _this.fixedAdjustElement.style.setProperty(property, value);\n }\n }\n };\n // tslint:enable:object-literal-sort-keys\n return new foundation_1.MDCToolbarFoundation(adapter);\n };\n return MDCToolbar;\n}(component_1.MDCComponent);\nexports.MDCToolbar = MDCToolbar;\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\nfunction closest(element, selector) {\n if (element.closest) {\n return element.closest(selector);\n }\n var el = element;\n while (el) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentElement;\n }\n return null;\n}\nexports.closest = closest;\nfunction matches(element, selector) {\n var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector;\n return nativeMatches.call(element, selector);\n}\nexports.matches = matches;\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Stores result from supportsCssVariables to avoid redundant processing to\n * detect CSS custom variable support.\n */\nvar supportsCssVariables_;\n/**\n * Stores result from applyPassive to avoid redundant processing to detect\n * passive event listener support.\n */\nvar supportsPassive_;\nfunction detectEdgePseudoVarBug(windowObj) {\n // Detect versions of Edge with buggy var() support\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/\n var document = windowObj.document;\n var node = document.createElement('div');\n node.className = 'mdc-ripple-surface--test-edge-var-bug';\n document.body.appendChild(node);\n // The bug exists if ::before style ends up propagating to the parent element.\n // Additionally, getComputedStyle returns null in iframes with display: \"none\" in Firefox,\n // but Firefox is known to support CSS custom properties correctly.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n var computedStyle = windowObj.getComputedStyle(node);\n var hasPseudoVarBug = computedStyle !== null && computedStyle.borderTopStyle === 'solid';\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return hasPseudoVarBug;\n}\nfunction supportsCssVariables(windowObj, forceRefresh) {\n if (forceRefresh === void 0) {\n forceRefresh = false;\n }\n var CSS = windowObj.CSS;\n var supportsCssVars = supportsCssVariables_;\n if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {\n return supportsCssVariables_;\n }\n var supportsFunctionPresent = CSS && typeof CSS.supports === 'function';\n if (!supportsFunctionPresent) {\n return false;\n }\n var explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');\n // See: https://bugs.webkit.org/show_bug.cgi?id=154669\n // See: README section on Safari\n var weAreFeatureDetectingSafari10plus = CSS.supports('(--css-vars: yes)') && CSS.supports('color', '#00000000');\n if (explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus) {\n supportsCssVars = !detectEdgePseudoVarBug(windowObj);\n } else {\n supportsCssVars = false;\n }\n if (!forceRefresh) {\n supportsCssVariables_ = supportsCssVars;\n }\n return supportsCssVars;\n}\nexports.supportsCssVariables = supportsCssVariables;\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nfunction applyPassive(globalObj, forceRefresh) {\n if (globalObj === void 0) {\n globalObj = window;\n }\n if (forceRefresh === void 0) {\n forceRefresh = false;\n }\n if (supportsPassive_ === undefined || forceRefresh) {\n var isSupported_1 = false;\n try {\n globalObj.document.addEventListener('test', function () {\n return undefined;\n }, {\n get passive() {\n isSupported_1 = true;\n return isSupported_1;\n }\n });\n } catch (e) {} // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.\n supportsPassive_ = isSupported_1;\n }\n return supportsPassive_ ? { passive: true } : false;\n}\nexports.applyPassive = applyPassive;\nfunction getNormalizedEventCoords(evt, pageOffset, clientRect) {\n if (!evt) {\n return { x: 0, y: 0 };\n }\n var x = pageOffset.x,\n y = pageOffset.y;\n var documentX = x + clientRect.left;\n var documentY = y + clientRect.top;\n var normalizedX;\n var normalizedY;\n // Determine touch point relative to the ripple container.\n if (evt.type === 'touchstart') {\n var touchEvent = evt;\n normalizedX = touchEvent.changedTouches[0].pageX - documentX;\n normalizedY = touchEvent.changedTouches[0].pageY - documentY;\n } else {\n var mouseEvent = evt;\n normalizedX = mouseEvent.pageX - documentX;\n normalizedY = mouseEvent.pageY - documentY;\n }\n return { x: normalizedX, y: normalizedY };\n}\nexports.getNormalizedEventCoords = getNormalizedEventCoords;\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar foundation_1 = __webpack_require__(0);\nvar constants_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(3);\n// Activation events registered on the root element of each instance for activation\nvar ACTIVATION_EVENT_TYPES = ['touchstart', 'pointerdown', 'mousedown', 'keydown'];\n// Deactivation events registered on documentElement when a pointer-related down event occurs\nvar POINTER_DEACTIVATION_EVENT_TYPES = ['touchend', 'pointerup', 'mouseup', 'contextmenu'];\n// simultaneous nested activations\nvar activatedTargets = [];\nvar MDCRippleFoundation = /** @class */function (_super) {\n __extends(MDCRippleFoundation, _super);\n function MDCRippleFoundation(adapter) {\n var _this = _super.call(this, __assign({}, MDCRippleFoundation.defaultAdapter, adapter)) || this;\n _this.activationAnimationHasEnded_ = false;\n _this.activationTimer_ = 0;\n _this.fgDeactivationRemovalTimer_ = 0;\n _this.fgScale_ = '0';\n _this.frame_ = { width: 0, height: 0 };\n _this.initialSize_ = 0;\n _this.layoutFrame_ = 0;\n _this.maxRadius_ = 0;\n _this.unboundedCoords_ = { left: 0, top: 0 };\n _this.activationState_ = _this.defaultActivationState_();\n _this.activationTimerCallback_ = function () {\n _this.activationAnimationHasEnded_ = true;\n _this.runDeactivationUXLogicIfReady_();\n };\n _this.activateHandler_ = function (e) {\n return _this.activate_(e);\n };\n _this.deactivateHandler_ = function () {\n return _this.deactivate_();\n };\n _this.focusHandler_ = function () {\n return _this.handleFocus();\n };\n _this.blurHandler_ = function () {\n return _this.handleBlur();\n };\n _this.resizeHandler_ = function () {\n return _this.layout();\n };\n return _this;\n }\n Object.defineProperty(MDCRippleFoundation, \"cssClasses\", {\n get: function get() {\n return constants_1.cssClasses;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"strings\", {\n get: function get() {\n return constants_1.strings;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"numbers\", {\n get: function get() {\n return constants_1.numbers;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"defaultAdapter\", {\n get: function get() {\n return {\n addClass: function addClass() {\n return undefined;\n },\n browserSupportsCssVars: function browserSupportsCssVars() {\n return true;\n },\n computeBoundingRect: function computeBoundingRect() {\n return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };\n },\n containsEventTarget: function containsEventTarget() {\n return true;\n },\n deregisterDocumentInteractionHandler: function deregisterDocumentInteractionHandler() {\n return undefined;\n },\n deregisterInteractionHandler: function deregisterInteractionHandler() {\n return undefined;\n },\n deregisterResizeHandler: function deregisterResizeHandler() {\n return undefined;\n },\n getWindowPageOffset: function getWindowPageOffset() {\n return { x: 0, y: 0 };\n },\n isSurfaceActive: function isSurfaceActive() {\n return true;\n },\n isSurfaceDisabled: function isSurfaceDisabled() {\n return true;\n },\n isUnbounded: function isUnbounded() {\n return true;\n },\n registerDocumentInteractionHandler: function registerDocumentInteractionHandler() {\n return undefined;\n },\n registerInteractionHandler: function registerInteractionHandler() {\n return undefined;\n },\n registerResizeHandler: function registerResizeHandler() {\n return undefined;\n },\n removeClass: function removeClass() {\n return undefined;\n },\n updateCssVariable: function updateCssVariable() {\n return undefined;\n }\n };\n },\n enumerable: true,\n configurable: true\n });\n MDCRippleFoundation.prototype.init = function () {\n var _this = this;\n var supportsPressRipple = this.supportsPressRipple_();\n this.registerRootHandlers_(supportsPressRipple);\n if (supportsPressRipple) {\n var _a = MDCRippleFoundation.cssClasses,\n ROOT_1 = _a.ROOT,\n UNBOUNDED_1 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter_.addClass(ROOT_1);\n if (_this.adapter_.isUnbounded()) {\n _this.adapter_.addClass(UNBOUNDED_1);\n // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple\n _this.layoutInternal_();\n }\n });\n }\n };\n MDCRippleFoundation.prototype.destroy = function () {\n var _this = this;\n if (this.supportsPressRipple_()) {\n if (this.activationTimer_) {\n clearTimeout(this.activationTimer_);\n this.activationTimer_ = 0;\n this.adapter_.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);\n }\n if (this.fgDeactivationRemovalTimer_) {\n clearTimeout(this.fgDeactivationRemovalTimer_);\n this.fgDeactivationRemovalTimer_ = 0;\n this.adapter_.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);\n }\n var _a = MDCRippleFoundation.cssClasses,\n ROOT_2 = _a.ROOT,\n UNBOUNDED_2 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter_.removeClass(ROOT_2);\n _this.adapter_.removeClass(UNBOUNDED_2);\n _this.removeCssVars_();\n });\n }\n this.deregisterRootHandlers_();\n this.deregisterDeactivationHandlers_();\n };\n /**\n * @param evt Optional event containing position information.\n */\n MDCRippleFoundation.prototype.activate = function (evt) {\n this.activate_(evt);\n };\n MDCRippleFoundation.prototype.deactivate = function () {\n this.deactivate_();\n };\n MDCRippleFoundation.prototype.layout = function () {\n var _this = this;\n if (this.layoutFrame_) {\n cancelAnimationFrame(this.layoutFrame_);\n }\n this.layoutFrame_ = requestAnimationFrame(function () {\n _this.layoutInternal_();\n _this.layoutFrame_ = 0;\n });\n };\n MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {\n var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;\n if (unbounded) {\n this.adapter_.addClass(UNBOUNDED);\n } else {\n this.adapter_.removeClass(UNBOUNDED);\n }\n };\n MDCRippleFoundation.prototype.handleFocus = function () {\n var _this = this;\n requestAnimationFrame(function () {\n return _this.adapter_.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED);\n });\n };\n MDCRippleFoundation.prototype.handleBlur = function () {\n var _this = this;\n requestAnimationFrame(function () {\n return _this.adapter_.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED);\n });\n };\n /**\n * We compute this property so that we are not querying information about the client\n * until the point in time where the foundation requests it. This prevents scenarios where\n * client-side feature-detection may happen too early, such as when components are rendered on the server\n * and then initialized at mount time on the client.\n */\n MDCRippleFoundation.prototype.supportsPressRipple_ = function () {\n return this.adapter_.browserSupportsCssVars();\n };\n MDCRippleFoundation.prototype.defaultActivationState_ = function () {\n return {\n activationEvent: undefined,\n hasDeactivationUXRun: false,\n isActivated: false,\n isProgrammatic: false,\n wasActivatedByPointer: false,\n wasElementMadeActive: false\n };\n };\n /**\n * supportsPressRipple Passed from init to save a redundant function call\n */\n MDCRippleFoundation.prototype.registerRootHandlers_ = function (supportsPressRipple) {\n var _this = this;\n if (supportsPressRipple) {\n ACTIVATION_EVENT_TYPES.forEach(function (evtType) {\n _this.adapter_.registerInteractionHandler(evtType, _this.activateHandler_);\n });\n if (this.adapter_.isUnbounded()) {\n this.adapter_.registerResizeHandler(this.resizeHandler_);\n }\n }\n this.adapter_.registerInteractionHandler('focus', this.focusHandler_);\n this.adapter_.registerInteractionHandler('blur', this.blurHandler_);\n };\n MDCRippleFoundation.prototype.registerDeactivationHandlers_ = function (evt) {\n var _this = this;\n if (evt.type === 'keydown') {\n this.adapter_.registerInteractionHandler('keyup', this.deactivateHandler_);\n } else {\n POINTER_DEACTIVATION_EVENT_TYPES.forEach(function (evtType) {\n _this.adapter_.registerDocumentInteractionHandler(evtType, _this.deactivateHandler_);\n });\n }\n };\n MDCRippleFoundation.prototype.deregisterRootHandlers_ = function () {\n var _this = this;\n ACTIVATION_EVENT_TYPES.forEach(function (evtType) {\n _this.adapter_.deregisterInteractionHandler(evtType, _this.activateHandler_);\n });\n this.adapter_.deregisterInteractionHandler('focus', this.focusHandler_);\n this.adapter_.deregisterInteractionHandler('blur', this.blurHandler_);\n if (this.adapter_.isUnbounded()) {\n this.adapter_.deregisterResizeHandler(this.resizeHandler_);\n }\n };\n MDCRippleFoundation.prototype.deregisterDeactivationHandlers_ = function () {\n var _this = this;\n this.adapter_.deregisterInteractionHandler('keyup', this.deactivateHandler_);\n POINTER_DEACTIVATION_EVENT_TYPES.forEach(function (evtType) {\n _this.adapter_.deregisterDocumentInteractionHandler(evtType, _this.deactivateHandler_);\n });\n };\n MDCRippleFoundation.prototype.removeCssVars_ = function () {\n var _this = this;\n var rippleStrings = MDCRippleFoundation.strings;\n var keys = Object.keys(rippleStrings);\n keys.forEach(function (key) {\n if (key.indexOf('VAR_') === 0) {\n _this.adapter_.updateCssVariable(rippleStrings[key], null);\n }\n });\n };\n MDCRippleFoundation.prototype.activate_ = function (evt) {\n var _this = this;\n if (this.adapter_.isSurfaceDisabled()) {\n return;\n }\n var activationState = this.activationState_;\n if (activationState.isActivated) {\n return;\n }\n // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction\n var previousActivationEvent = this.previousActivationEvent_;\n var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;\n if (isSameInteraction) {\n return;\n }\n activationState.isActivated = true;\n activationState.isProgrammatic = evt === undefined;\n activationState.activationEvent = evt;\n activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');\n var hasActivatedChild = evt !== undefined && activatedTargets.length > 0 && activatedTargets.some(function (target) {\n return _this.adapter_.containsEventTarget(target);\n });\n if (hasActivatedChild) {\n // Immediately reset activation state, while preserving logic that prevents touch follow-on events\n this.resetActivationState_();\n return;\n }\n if (evt !== undefined) {\n activatedTargets.push(evt.target);\n this.registerDeactivationHandlers_(evt);\n }\n activationState.wasElementMadeActive = this.checkElementMadeActive_(evt);\n if (activationState.wasElementMadeActive) {\n this.animateActivation_();\n }\n requestAnimationFrame(function () {\n // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples\n activatedTargets = [];\n if (!activationState.wasElementMadeActive && evt !== undefined && (evt.key === ' ' || evt.keyCode === 32)) {\n // If space was pressed, try again within an rAF call to detect :active, because different UAs report\n // active states inconsistently when they're called within event handling code:\n // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741\n // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS\n // variable is set within a rAF callback for a submit button interaction (#2241).\n activationState.wasElementMadeActive = _this.checkElementMadeActive_(evt);\n if (activationState.wasElementMadeActive) {\n _this.animateActivation_();\n }\n }\n if (!activationState.wasElementMadeActive) {\n // Reset activation state immediately if element was not made active.\n _this.activationState_ = _this.defaultActivationState_();\n }\n });\n };\n MDCRippleFoundation.prototype.checkElementMadeActive_ = function (evt) {\n return evt !== undefined && evt.type === 'keydown' ? this.adapter_.isSurfaceActive() : true;\n };\n MDCRippleFoundation.prototype.animateActivation_ = function () {\n var _this = this;\n var _a = MDCRippleFoundation.strings,\n VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START,\n VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;\n var _b = MDCRippleFoundation.cssClasses,\n FG_DEACTIVATION = _b.FG_DEACTIVATION,\n FG_ACTIVATION = _b.FG_ACTIVATION;\n var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;\n this.layoutInternal_();\n var translateStart = '';\n var translateEnd = '';\n if (!this.adapter_.isUnbounded()) {\n var _c = this.getFgTranslationCoordinates_(),\n startPoint = _c.startPoint,\n endPoint = _c.endPoint;\n translateStart = startPoint.x + \"px, \" + startPoint.y + \"px\";\n translateEnd = endPoint.x + \"px, \" + endPoint.y + \"px\";\n }\n this.adapter_.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);\n this.adapter_.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);\n // Cancel any ongoing activation/deactivation animations\n clearTimeout(this.activationTimer_);\n clearTimeout(this.fgDeactivationRemovalTimer_);\n this.rmBoundedActivationClasses_();\n this.adapter_.removeClass(FG_DEACTIVATION);\n // Force layout in order to re-trigger the animation.\n this.adapter_.computeBoundingRect();\n this.adapter_.addClass(FG_ACTIVATION);\n this.activationTimer_ = setTimeout(function () {\n return _this.activationTimerCallback_();\n }, DEACTIVATION_TIMEOUT_MS);\n };\n MDCRippleFoundation.prototype.getFgTranslationCoordinates_ = function () {\n var _a = this.activationState_,\n activationEvent = _a.activationEvent,\n wasActivatedByPointer = _a.wasActivatedByPointer;\n var startPoint;\n if (wasActivatedByPointer) {\n startPoint = util_1.getNormalizedEventCoords(activationEvent, this.adapter_.getWindowPageOffset(), this.adapter_.computeBoundingRect());\n } else {\n startPoint = {\n x: this.frame_.width / 2,\n y: this.frame_.height / 2\n };\n }\n // Center the element around the start point.\n startPoint = {\n x: startPoint.x - this.initialSize_ / 2,\n y: startPoint.y - this.initialSize_ / 2\n };\n var endPoint = {\n x: this.frame_.width / 2 - this.initialSize_ / 2,\n y: this.frame_.height / 2 - this.initialSize_ / 2\n };\n return { startPoint: startPoint, endPoint: endPoint };\n };\n MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady_ = function () {\n var _this = this;\n // This method is called both when a pointing device is released, and when the activation animation ends.\n // The deactivation animation should only run after both of those occur.\n var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;\n var _a = this.activationState_,\n hasDeactivationUXRun = _a.hasDeactivationUXRun,\n isActivated = _a.isActivated;\n var activationHasEnded = hasDeactivationUXRun || !isActivated;\n if (activationHasEnded && this.activationAnimationHasEnded_) {\n this.rmBoundedActivationClasses_();\n this.adapter_.addClass(FG_DEACTIVATION);\n this.fgDeactivationRemovalTimer_ = setTimeout(function () {\n _this.adapter_.removeClass(FG_DEACTIVATION);\n }, constants_1.numbers.FG_DEACTIVATION_MS);\n }\n };\n MDCRippleFoundation.prototype.rmBoundedActivationClasses_ = function () {\n var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;\n this.adapter_.removeClass(FG_ACTIVATION);\n this.activationAnimationHasEnded_ = false;\n this.adapter_.computeBoundingRect();\n };\n MDCRippleFoundation.prototype.resetActivationState_ = function () {\n var _this = this;\n this.previousActivationEvent_ = this.activationState_.activationEvent;\n this.activationState_ = this.defaultActivationState_();\n // Touch devices may fire additional events for the same interaction within a short time.\n // Store the previous event until it's safe to assume that subsequent events are for new interactions.\n setTimeout(function () {\n return _this.previousActivationEvent_ = undefined;\n }, MDCRippleFoundation.numbers.TAP_DELAY_MS);\n };\n MDCRippleFoundation.prototype.deactivate_ = function () {\n var _this = this;\n var activationState = this.activationState_;\n // This can happen in scenarios such as when you have a keyup event that blurs the element.\n if (!activationState.isActivated) {\n return;\n }\n var state = __assign({}, activationState);\n if (activationState.isProgrammatic) {\n requestAnimationFrame(function () {\n return _this.animateDeactivation_(state);\n });\n this.resetActivationState_();\n } else {\n this.deregisterDeactivationHandlers_();\n requestAnimationFrame(function () {\n _this.activationState_.hasDeactivationUXRun = true;\n _this.animateDeactivation_(state);\n _this.resetActivationState_();\n });\n }\n };\n MDCRippleFoundation.prototype.animateDeactivation_ = function (_a) {\n var wasActivatedByPointer = _a.wasActivatedByPointer,\n wasElementMadeActive = _a.wasElementMadeActive;\n if (wasActivatedByPointer || wasElementMadeActive) {\n this.runDeactivationUXLogicIfReady_();\n }\n };\n MDCRippleFoundation.prototype.layoutInternal_ = function () {\n var _this = this;\n this.frame_ = this.adapter_.computeBoundingRect();\n var maxDim = Math.max(this.frame_.height, this.frame_.width);\n // Surface diameter is treated differently for unbounded vs. bounded ripples.\n // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately\n // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically\n // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter\n // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via\n // `overflow: hidden`.\n var getBoundedRadius = function getBoundedRadius() {\n var hypotenuse = Math.sqrt(Math.pow(_this.frame_.width, 2) + Math.pow(_this.frame_.height, 2));\n return hypotenuse + MDCRippleFoundation.numbers.PADDING;\n };\n this.maxRadius_ = this.adapter_.isUnbounded() ? maxDim : getBoundedRadius();\n // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform\n this.initialSize_ = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);\n this.fgScale_ = \"\" + this.maxRadius_ / this.initialSize_;\n this.updateLayoutCssVars_();\n };\n MDCRippleFoundation.prototype.updateLayoutCssVars_ = function () {\n var _a = MDCRippleFoundation.strings,\n VAR_FG_SIZE = _a.VAR_FG_SIZE,\n VAR_LEFT = _a.VAR_LEFT,\n VAR_TOP = _a.VAR_TOP,\n VAR_FG_SCALE = _a.VAR_FG_SCALE;\n this.adapter_.updateCssVariable(VAR_FG_SIZE, this.initialSize_ + \"px\");\n this.adapter_.updateCssVariable(VAR_FG_SCALE, this.fgScale_);\n if (this.adapter_.isUnbounded()) {\n this.unboundedCoords_ = {\n left: Math.round(this.frame_.width / 2 - this.initialSize_ / 2),\n top: Math.round(this.frame_.height / 2 - this.initialSize_ / 2)\n };\n this.adapter_.updateCssVariable(VAR_LEFT, this.unboundedCoords_.left + \"px\");\n this.adapter_.updateCssVariable(VAR_TOP, this.unboundedCoords_.top + \"px\");\n }\n };\n return MDCRippleFoundation;\n}(foundation_1.MDCFoundation);\nexports.MDCRippleFoundation = MDCRippleFoundation;\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexports.default = MDCRippleFoundation;\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cssClasses = {\n // Ripple is a special case where the \"root\" component is really a \"mixin\" of sorts,\n // given that it's an 'upgrade' to an existing component. That being said it is the root\n // CSS class that all other CSS classes derive from.\n BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',\n FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',\n ROOT: 'mdc-ripple-upgraded',\n UNBOUNDED: 'mdc-ripple-upgraded--unbounded'\n};\nexports.strings = {\n VAR_FG_SCALE: '--mdc-ripple-fg-scale',\n VAR_FG_SIZE: '--mdc-ripple-fg-size',\n VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',\n VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',\n VAR_LEFT: '--mdc-ripple-left',\n VAR_TOP: '--mdc-ripple-top'\n};\nexports.numbers = {\n DEACTIVATION_TIMEOUT_MS: 225,\n FG_DEACTIVATION_MS: 150,\n INITIAL_ORIGIN_SCALE: 0.6,\n PADDING: 10,\n TAP_DELAY_MS: 300\n};\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n }result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = __webpack_require__(1);\nvar ponyfill_1 = __webpack_require__(2);\nvar foundation_1 = __webpack_require__(4);\nvar util = __importStar(__webpack_require__(3));\nvar MDCRipple = /** @class */function (_super) {\n __extends(MDCRipple, _super);\n function MDCRipple() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.disabled = false;\n return _this;\n }\n MDCRipple.attachTo = function (root, opts) {\n if (opts === void 0) {\n opts = { isUnbounded: undefined };\n }\n var ripple = new MDCRipple(root);\n // Only override unbounded behavior if option is explicitly specified\n if (opts.isUnbounded !== undefined) {\n ripple.unbounded = opts.isUnbounded;\n }\n return ripple;\n };\n MDCRipple.createAdapter = function (instance) {\n return {\n addClass: function addClass(className) {\n return instance.root_.classList.add(className);\n },\n browserSupportsCssVars: function browserSupportsCssVars() {\n return util.supportsCssVariables(window);\n },\n computeBoundingRect: function computeBoundingRect() {\n return instance.root_.getBoundingClientRect();\n },\n containsEventTarget: function containsEventTarget(target) {\n return instance.root_.contains(target);\n },\n deregisterDocumentInteractionHandler: function deregisterDocumentInteractionHandler(evtType, handler) {\n return document.documentElement.removeEventListener(evtType, handler, util.applyPassive());\n },\n deregisterInteractionHandler: function deregisterInteractionHandler(evtType, handler) {\n return instance.root_.removeEventListener(evtType, handler, util.applyPassive());\n },\n deregisterResizeHandler: function deregisterResizeHandler(handler) {\n return window.removeEventListener('resize', handler);\n },\n getWindowPageOffset: function getWindowPageOffset() {\n return { x: window.pageXOffset, y: window.pageYOffset };\n },\n isSurfaceActive: function isSurfaceActive() {\n return ponyfill_1.matches(instance.root_, ':active');\n },\n isSurfaceDisabled: function isSurfaceDisabled() {\n return Boolean(instance.disabled);\n },\n isUnbounded: function isUnbounded() {\n return Boolean(instance.unbounded);\n },\n registerDocumentInteractionHandler: function registerDocumentInteractionHandler(evtType, handler) {\n return document.documentElement.addEventListener(evtType, handler, util.applyPassive());\n },\n registerInteractionHandler: function registerInteractionHandler(evtType, handler) {\n return instance.root_.addEventListener(evtType, handler, util.applyPassive());\n },\n registerResizeHandler: function registerResizeHandler(handler) {\n return window.addEventListener('resize', handler);\n },\n removeClass: function removeClass(className) {\n return instance.root_.classList.remove(className);\n },\n updateCssVariable: function updateCssVariable(varName, value) {\n return instance.root_.style.setProperty(varName, value);\n }\n };\n };\n Object.defineProperty(MDCRipple.prototype, \"unbounded\", {\n get: function get() {\n return Boolean(this.unbounded_);\n },\n set: function set(unbounded) {\n this.unbounded_ = Boolean(unbounded);\n this.setUnbounded_();\n },\n enumerable: true,\n configurable: true\n });\n MDCRipple.prototype.activate = function () {\n this.foundation_.activate();\n };\n MDCRipple.prototype.deactivate = function () {\n this.foundation_.deactivate();\n };\n MDCRipple.prototype.layout = function () {\n this.foundation_.layout();\n };\n MDCRipple.prototype.getDefaultFoundation = function () {\n return new foundation_1.MDCRippleFoundation(MDCRipple.createAdapter(this));\n };\n MDCRipple.prototype.initialSyncWithDOM = function () {\n var root = this.root_;\n this.unbounded = 'mdcRippleIsUnbounded' in root.dataset;\n };\n /**\n * Closure Compiler throws an access control error when directly accessing a\n * protected or private property inside a getter/setter, like unbounded above.\n * By accessing the protected property inside a method, we solve that problem.\n * That's why this function exists.\n */\n MDCRipple.prototype.setUnbounded_ = function () {\n this.foundation_.setUnbounded(Boolean(this.unbounded_));\n };\n return MDCRipple;\n}(component_1.MDCComponent);\nexports.MDCRipple = MDCRipple;\n\n/***/ })\n\n/******/ });\n});\n\n\n// WEBPACK FOOTER //\n// mdc.toolbar.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 173);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 74583296950ff8f5c698","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport class MDCFoundation<AdapterType extends {} = {}> {\n static get cssClasses(): { [key: string]: string } {\n // Classes extending MDCFoundation should implement this method to return an object which exports every\n // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n return {};\n }\n\n static get strings(): { [key: string]: string } {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n return {};\n }\n\n static get numbers(): { [key: string]: number } {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n return {};\n }\n\n static get defaultAdapter(): {} {\n // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n // validation.\n return {};\n }\n\n protected adapter_: AdapterType;\n\n constructor(adapter: AdapterType = {} as AdapterType) {\n this.adapter_ = adapter;\n }\n\n init() {\n // Subclasses should override this method to perform initialization routines (registering events, etc.)\n }\n\n destroy() {\n // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFoundation;\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-base/foundation.ts","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from './foundation';\nimport {CustomEventListener, EventType, SpecificEventListener} from './types';\n\nexport class MDCComponent<FoundationType extends MDCFoundation> {\n static attachTo(root: Element): MDCComponent<MDCFoundation<{}>> {\n // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and\n // returns an instantiated component with its root set to that element. Also note that in the cases of\n // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized\n // from getDefaultFoundation().\n return new MDCComponent(root, new MDCFoundation({}));\n }\n\n protected root_: Element;\n protected foundation_: FoundationType;\n\n constructor(\n root: Element,\n foundation?: FoundationType,\n ...args: Array<unknown>\n ) {\n this.root_ = root;\n this.initialize(...args);\n // Note that we initialize foundation here and not within the constructor's default param so that\n // this.root_ is defined and can be used within the foundation class.\n this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation;\n this.foundation_.init();\n this.initialSyncWithDOM();\n }\n\n /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */\n initialize(..._args: Array<unknown>) {\n // Subclasses can override this to do any additional setup work that would be considered part of a\n // \"constructor\". Essentially, it is a hook into the parent constructor before the foundation is\n // initialized. Any additional arguments besides root and foundation will be passed in here.\n }\n\n getDefaultFoundation(): FoundationType {\n // Subclasses must override this method to return a properly configured foundation class for the\n // component.\n throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' +\n 'foundation class');\n }\n\n initialSyncWithDOM() {\n // Subclasses should override this method if they need to perform work to synchronize with a host DOM\n // object. An example of this would be a form control wrapper that needs to synchronize its internal state\n // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM\n // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.\n }\n\n destroy() {\n // Subclasses may implement this method to release any resources / deregister any listeners they have\n // attached. An example of this might be deregistering a resize event from the window object.\n this.foundation_.destroy();\n }\n\n /**\n * Wrapper method to add an event listener to the component's root element. This is most useful when\n * listening for custom events.\n */\n listen<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;\n listen<E extends Event>(evtType: string, handler: CustomEventListener<E>): void;\n listen(evtType: string, handler: EventListener) {\n this.root_.addEventListener(evtType, handler);\n }\n\n /**\n * Wrapper method to remove an event listener to the component's root element. This is most useful when\n * unlistening for custom events.\n */\n unlisten<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;\n unlisten<E extends Event>(evtType: string, handler: CustomEventListener<E>): void;\n unlisten(evtType: string, handler: EventListener) {\n this.root_.removeEventListener(evtType, handler);\n }\n\n /**\n * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.\n */\n emit<T extends object>(evtType: string, evtData: T, shouldBubble = false) {\n let evt: CustomEvent<T>;\n if (typeof CustomEvent === 'function') {\n evt = new CustomEvent<T>(evtType, {\n bubbles: shouldBubble,\n detail: evtData,\n });\n } else {\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(evtType, shouldBubble, false, evtData);\n }\n\n this.root_.dispatchEvent(evt);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-base/component.ts","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {SpecificEventListener} from '@material/base/types';\nimport {MDCToolbarAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\n\ninterface Calculations {\n toolbarRowHeight: number;\n\n /*\n * Calculated height ratios. We use ratio to calculate corresponding heights in resize event.\n */\n\n /** The ratio of toolbar height to row height. */\n toolbarRatio: number;\n\n /** The ratio of flexible space height to row height. */\n flexibleExpansionRatio: number;\n\n /** The ratio of max toolbar move up distance to row height. */\n maxTranslateYRatio: number;\n\n /** The ratio of max scrollTop that we should listen to to row height. */\n scrollThresholdRatio: number;\n\n /*\n * Derived heights based on the above ratios.\n */\n\n toolbarHeight: number;\n\n /** Flexible row minus toolbar height (derived). */\n flexibleExpansionHeight: number;\n\n /** When toolbar only fix last row (derived). */\n maxTranslateYDistance: number;\n\n scrollThreshold: number;\n}\n\nexport class MDCToolbarFoundation extends MDCFoundation<MDCToolbarAdapter> {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get numbers() {\n return numbers;\n }\n\n static get defaultAdapter(): MDCToolbarAdapter {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n hasClass: () => false,\n addClass: () => undefined,\n removeClass: () => undefined,\n registerScrollHandler: () => undefined,\n deregisterScrollHandler: () => undefined,\n registerResizeHandler: () => undefined,\n deregisterResizeHandler: () => undefined,\n getViewportWidth: () => 0,\n getViewportScrollY: () => 0,\n getOffsetHeight: () => 0,\n getFirstRowElementOffsetHeight: () => 0,\n notifyChange: () => undefined,\n setStyle: () => undefined,\n setStyleForTitleElement: () => undefined,\n setStyleForFlexibleRowElement: () => undefined,\n setStyleForFixedAdjustElement: () => undefined,\n };\n // tslint:enable:object-literal-sort-keys\n }\n\n private checkRowHeightFrame_ = 0;\n private scrollFrame_ = 0;\n private executedLastChange_ = false;\n private isFixed_ = false;\n private isFixedLastRow_ = false;\n private hasFlexibleFirstRow_ = false;\n private useFlexDefaultBehavior_ = false;\n private calculations_: Calculations = {\n flexibleExpansionHeight: 0,\n flexibleExpansionRatio: 0,\n maxTranslateYDistance: 0,\n maxTranslateYRatio: 0,\n scrollThreshold: 0,\n scrollThresholdRatio: 0,\n toolbarHeight: 0,\n toolbarRatio: 0,\n toolbarRowHeight: 0,\n };\n\n private resizeHandler_!: SpecificEventListener<'resize'>; // assigned in init()\n private scrollHandler_!: SpecificEventListener<'scroll'>; // assigned in init()\n\n constructor(adapter?: Partial<MDCToolbarAdapter>) {\n super({...MDCToolbarFoundation.defaultAdapter, ...adapter});\n }\n\n init() {\n this.isFixed_ = this.adapter_.hasClass(cssClasses.FIXED);\n this.isFixedLastRow_ = this.adapter_.hasClass(cssClasses.FIXED_LASTROW) && this.isFixed_;\n this.hasFlexibleFirstRow_ = this.adapter_.hasClass(cssClasses.TOOLBAR_ROW_FLEXIBLE);\n\n if (this.hasFlexibleFirstRow_) {\n this.useFlexDefaultBehavior_ = this.adapter_.hasClass(cssClasses.FLEXIBLE_DEFAULT_BEHAVIOR);\n }\n\n this.resizeHandler_ = () => this.checkRowHeight_();\n this.scrollHandler_ = () => this.updateToolbarStyles_();\n\n this.adapter_.registerResizeHandler(this.resizeHandler_);\n this.adapter_.registerScrollHandler(this.scrollHandler_);\n\n this.initKeyRatio_();\n this.setKeyHeights_();\n }\n\n destroy() {\n this.adapter_.deregisterResizeHandler(this.resizeHandler_);\n this.adapter_.deregisterScrollHandler(this.scrollHandler_);\n }\n\n updateAdjustElementStyles() {\n if (this.isFixed_) {\n this.adapter_.setStyleForFixedAdjustElement('margin-top', `${this.calculations_.toolbarHeight}px`);\n }\n }\n\n private getFlexibleExpansionRatio_(scrollTop: number) {\n // To prevent division by zero when there is no flexibleExpansionHeight\n const delta = 0.0001;\n return Math.max(0, 1 - scrollTop / (this.calculations_.flexibleExpansionHeight + delta));\n }\n\n private checkRowHeight_() {\n cancelAnimationFrame(this.checkRowHeightFrame_);\n this.checkRowHeightFrame_ = requestAnimationFrame(() => this.setKeyHeights_());\n }\n\n private setKeyHeights_() {\n const newToolbarRowHeight = this.getRowHeight_();\n if (newToolbarRowHeight !== this.calculations_.toolbarRowHeight) {\n this.calculations_.toolbarRowHeight = newToolbarRowHeight;\n this.calculations_.toolbarHeight = this.calculations_.toolbarRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.flexibleExpansionHeight =\n this.calculations_.flexibleExpansionRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.maxTranslateYDistance =\n this.calculations_.maxTranslateYRatio * this.calculations_.toolbarRowHeight;\n this.calculations_.scrollThreshold =\n this.calculations_.scrollThresholdRatio * this.calculations_.toolbarRowHeight;\n this.updateAdjustElementStyles();\n this.updateToolbarStyles_();\n }\n }\n\n private updateToolbarStyles_() {\n cancelAnimationFrame(this.scrollFrame_);\n this.scrollFrame_ = requestAnimationFrame(() => {\n const scrollTop = this.adapter_.getViewportScrollY();\n const hasScrolledOutOfThreshold = this.scrolledOutOfThreshold_(scrollTop);\n\n if (hasScrolledOutOfThreshold && this.executedLastChange_) {\n return;\n }\n\n const flexibleExpansionRatio = this.getFlexibleExpansionRatio_(scrollTop);\n\n this.updateToolbarFlexibleState_(flexibleExpansionRatio);\n if (this.isFixedLastRow_) {\n this.updateToolbarFixedState_(scrollTop);\n }\n if (this.hasFlexibleFirstRow_) {\n this.updateFlexibleRowElementStyles_(flexibleExpansionRatio);\n }\n this.executedLastChange_ = hasScrolledOutOfThreshold;\n this.adapter_.notifyChange({flexibleExpansionRatio});\n });\n }\n\n private scrolledOutOfThreshold_(scrollTop: number) {\n return scrollTop > this.calculations_.scrollThreshold;\n }\n\n private initKeyRatio_() {\n const toolbarRowHeight = this.getRowHeight_();\n const firstRowMaxRatio = this.adapter_.getFirstRowElementOffsetHeight() / toolbarRowHeight;\n this.calculations_.toolbarRatio = this.adapter_.getOffsetHeight() / toolbarRowHeight;\n this.calculations_.flexibleExpansionRatio = firstRowMaxRatio - 1;\n this.calculations_.maxTranslateYRatio =\n this.isFixedLastRow_ ? this.calculations_.toolbarRatio - firstRowMaxRatio : 0;\n this.calculations_.scrollThresholdRatio =\n (this.isFixedLastRow_ ? this.calculations_.toolbarRatio : firstRowMaxRatio) - 1;\n }\n\n private getRowHeight_() {\n const breakpoint = numbers.TOOLBAR_MOBILE_BREAKPOINT;\n return this.adapter_.getViewportWidth() < breakpoint ?\n numbers.TOOLBAR_ROW_MOBILE_HEIGHT : numbers.TOOLBAR_ROW_HEIGHT;\n }\n\n private updateToolbarFlexibleState_(flexibleExpansionRatio: number) {\n this.adapter_.removeClass(cssClasses.FLEXIBLE_MAX);\n this.adapter_.removeClass(cssClasses.FLEXIBLE_MIN);\n if (flexibleExpansionRatio === 1) {\n this.adapter_.addClass(cssClasses.FLEXIBLE_MAX);\n } else if (flexibleExpansionRatio === 0) {\n this.adapter_.addClass(cssClasses.FLEXIBLE_MIN);\n }\n }\n\n private updateToolbarFixedState_(scrollTop: number) {\n const translateDistance = Math.max(0, Math.min(\n scrollTop - this.calculations_.flexibleExpansionHeight,\n this.calculations_.maxTranslateYDistance));\n this.adapter_.setStyle('transform', `translateY(${-translateDistance}px)`);\n\n if (translateDistance === this.calculations_.maxTranslateYDistance) {\n this.adapter_.addClass(cssClasses.FIXED_AT_LAST_ROW);\n } else {\n this.adapter_.removeClass(cssClasses.FIXED_AT_LAST_ROW);\n }\n }\n\n private updateFlexibleRowElementStyles_(flexibleExpansionRatio: number) {\n if (this.isFixed_) {\n const height = this.calculations_.flexibleExpansionHeight * flexibleExpansionRatio;\n this.adapter_.setStyleForFlexibleRowElement('height',\n `${height + this.calculations_.toolbarRowHeight}px`);\n }\n if (this.useFlexDefaultBehavior_) {\n this.updateElementStylesDefaultBehavior_(flexibleExpansionRatio);\n }\n }\n\n private updateElementStylesDefaultBehavior_(flexibleExpansionRatio: number) {\n const maxTitleSize = numbers.MAX_TITLE_SIZE;\n const minTitleSize = numbers.MIN_TITLE_SIZE;\n const currentTitleSize = (maxTitleSize - minTitleSize) * flexibleExpansionRatio + minTitleSize;\n\n this.adapter_.setStyleForTitleElement('font-size', `${currentTitleSize}rem`);\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCToolbarFoundation;\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-toolbar/foundation.ts","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n FIXED: 'mdc-toolbar--fixed',\n FIXED_AT_LAST_ROW: 'mdc-toolbar--fixed-at-last-row',\n FIXED_LASTROW: 'mdc-toolbar--fixed-lastrow-only',\n FLEXIBLE_DEFAULT_BEHAVIOR: 'mdc-toolbar--flexible-default-behavior',\n FLEXIBLE_MAX: 'mdc-toolbar--flexible-space-maximized',\n FLEXIBLE_MIN: 'mdc-toolbar--flexible-space-minimized',\n TOOLBAR_ROW_FLEXIBLE: 'mdc-toolbar--flexible',\n};\n\nexport const strings = {\n CHANGE_EVENT: 'MDCToolbar:change',\n FIRST_ROW_SELECTOR: '.mdc-toolbar__row:first-child',\n ICON_SELECTOR: '.mdc-toolbar__icon',\n TITLE_SELECTOR: '.mdc-toolbar__title',\n};\n\nexport const numbers = {\n MAX_TITLE_SIZE: 2.125,\n MIN_TITLE_SIZE: 1.25,\n TOOLBAR_MOBILE_BREAKPOINT: 600,\n TOOLBAR_ROW_HEIGHT: 64,\n TOOLBAR_ROW_MOBILE_HEIGHT: 56,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-toolbar/constants.ts","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport * from './adapter';\nexport * from './component';\nexport * from './constants';\nexport * from './foundation';\nexport * from './types';\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-toolbar/index.ts","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {MDCRipple} from '@material/ripple/component';\nimport {MDCToolbarAdapter} from './adapter';\nimport {MDCToolbarFoundation} from './foundation';\nimport {MDCToolbarEventDetail} from './types';\n\nconst {strings} = MDCToolbarFoundation;\n\nexport class MDCToolbar extends MDCComponent<MDCToolbarFoundation> {\n static attachTo(root: Element) {\n return new MDCToolbar(root);\n }\n\n protected root_!: HTMLElement; // assigned in MDCComponent constructor\n\n private ripples_!: MDCRipple[]; // assigned in initialize()\n private firstRowElement_!: HTMLElement; // assigned in initialize()\n private fixedAdjustElement_!: HTMLElement | null; // assigned in initialize()\n private titleElement_!: HTMLElement | null; // assigned in initialize()\n\n initialize() {\n this.ripples_ = [];\n this.fixedAdjustElement_ = null;\n this.titleElement_ = this.root_.querySelector<HTMLElement>(strings.TITLE_SELECTOR);\n const firstRowElement = this.root_.querySelector<HTMLElement>(strings.FIRST_ROW_SELECTOR);\n if (!firstRowElement) {\n throw new Error(`MDCToolbar: Required sub-element '${strings.FIRST_ROW_SELECTOR}' is missing`);\n }\n this.firstRowElement_ = firstRowElement;\n\n [].forEach.call(this.root_.querySelectorAll(strings.ICON_SELECTOR), (icon: HTMLElement) => {\n const ripple = MDCRipple.attachTo(icon);\n ripple.unbounded = true;\n this.ripples_.push(ripple);\n });\n }\n\n destroy() {\n this.ripples_.forEach((ripple) => {\n ripple.destroy();\n });\n super.destroy();\n }\n\n set fixedAdjustElement(element: HTMLElement | null) {\n this.fixedAdjustElement_ = element;\n this.foundation_.updateAdjustElementStyles();\n }\n\n get fixedAdjustElement(): HTMLElement | null {\n return this.fixedAdjustElement_;\n }\n\n getDefaultFoundation() {\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n const adapter: MDCToolbarAdapter = {\n hasClass: (className) => this.root_.classList.contains(className),\n addClass: (className) => this.root_.classList.add(className),\n removeClass: (className) => this.root_.classList.remove(className),\n registerScrollHandler: (handler) => window.addEventListener('scroll', handler),\n deregisterScrollHandler: (handler) => window.removeEventListener('scroll', handler),\n registerResizeHandler: (handler) => window.addEventListener('resize', handler),\n deregisterResizeHandler: (handler) => window.removeEventListener('resize', handler),\n getViewportWidth: () => window.innerWidth,\n getViewportScrollY: () => window.pageYOffset,\n getOffsetHeight: () => this.root_.offsetHeight,\n getFirstRowElementOffsetHeight: () => this.firstRowElement_.offsetHeight,\n notifyChange: (evtData) => this.emit<MDCToolbarEventDetail>(strings.CHANGE_EVENT, evtData),\n setStyle: (property, value) => this.root_.style.setProperty(property, value),\n setStyleForTitleElement: (property, value) => {\n if (this.titleElement_) {\n this.titleElement_.style.setProperty(property, value);\n }\n },\n setStyleForFlexibleRowElement: (property, value) => this.firstRowElement_.style.setProperty(property, value),\n setStyleForFixedAdjustElement: (property, value) => {\n if (this.fixedAdjustElement) {\n this.fixedAdjustElement.style.setProperty(property, value);\n }\n },\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCToolbarFoundation(adapter);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-toolbar/component.ts","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\n\nexport function closest(element: Element, selector: string): Element | null {\n if (element.closest) {\n return element.closest(selector);\n }\n\n let el: Element | null = element;\n while (el) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentElement;\n }\n return null;\n}\n\nexport function matches(element: Element, selector: string): boolean {\n const nativeMatches = element.matches\n || element.webkitMatchesSelector\n || element.msMatchesSelector;\n return nativeMatches.call(element, selector);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-dom/ponyfill.ts","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport {MDCRipplePoint} from './types';\n\n/**\n * Stores result from supportsCssVariables to avoid redundant processing to\n * detect CSS custom variable support.\n */\nlet supportsCssVariables_: boolean | undefined;\n\n/**\n * Stores result from applyPassive to avoid redundant processing to detect\n * passive event listener support.\n */\nlet supportsPassive_: boolean | undefined;\n\nfunction detectEdgePseudoVarBug(windowObj: Window): boolean {\n // Detect versions of Edge with buggy var() support\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/\n const document = windowObj.document;\n const node = document.createElement('div');\n node.className = 'mdc-ripple-surface--test-edge-var-bug';\n document.body.appendChild(node);\n\n // The bug exists if ::before style ends up propagating to the parent element.\n // Additionally, getComputedStyle returns null in iframes with display: \"none\" in Firefox,\n // but Firefox is known to support CSS custom properties correctly.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n const computedStyle = windowObj.getComputedStyle(node);\n const hasPseudoVarBug = computedStyle !== null && computedStyle.borderTopStyle === 'solid';\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return hasPseudoVarBug;\n}\n\nexport function supportsCssVariables(windowObj: Window, forceRefresh = false): boolean {\n const {CSS} = windowObj;\n let supportsCssVars = supportsCssVariables_;\n if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {\n return supportsCssVariables_;\n }\n\n const supportsFunctionPresent = CSS && typeof CSS.supports === 'function';\n if (!supportsFunctionPresent) {\n return false;\n }\n\n const explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');\n // See: https://bugs.webkit.org/show_bug.cgi?id=154669\n // See: README section on Safari\n const weAreFeatureDetectingSafari10plus = (\n CSS.supports('(--css-vars: yes)') &&\n CSS.supports('color', '#00000000')\n );\n\n if (explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus) {\n supportsCssVars = !detectEdgePseudoVarBug(windowObj);\n } else {\n supportsCssVars = false;\n }\n\n if (!forceRefresh) {\n supportsCssVariables_ = supportsCssVars;\n }\n return supportsCssVars;\n}\n\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nexport function applyPassive(globalObj: Window = window, forceRefresh = false):\n boolean | EventListenerOptions {\n if (supportsPassive_ === undefined || forceRefresh) {\n let isSupported = false;\n try {\n globalObj.document.addEventListener('test', () => undefined, {\n get passive() {\n isSupported = true;\n return isSupported;\n },\n });\n } catch (e) {\n } // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.\n\n supportsPassive_ = isSupported;\n }\n\n return supportsPassive_ ? {passive: true} as EventListenerOptions : false;\n}\n\nexport function getNormalizedEventCoords(evt: Event | undefined, pageOffset: MDCRipplePoint, clientRect: ClientRect):\n MDCRipplePoint {\n if (!evt) {\n return {x: 0, y: 0};\n }\n const {x, y} = pageOffset;\n const documentX = x + clientRect.left;\n const documentY = y + clientRect.top;\n\n let normalizedX;\n let normalizedY;\n // Determine touch point relative to the ripple container.\n if (evt.type === 'touchstart') {\n const touchEvent = evt as TouchEvent;\n normalizedX = touchEvent.changedTouches[0].pageX - documentX;\n normalizedY = touchEvent.changedTouches[0].pageY - documentY;\n } else {\n const mouseEvent = evt as MouseEvent;\n normalizedX = mouseEvent.pageX - documentX;\n normalizedY = mouseEvent.pageY - documentY;\n }\n\n return {x: normalizedX, y: normalizedY};\n}\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-ripple/util.ts","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCFoundation} from '@material/base/foundation';\nimport {MDCRippleAdapter} from './adapter';\nimport {cssClasses, numbers, strings} from './constants';\nimport {MDCRipplePoint} from './types';\nimport {getNormalizedEventCoords} from './util';\n\ninterface ActivationStateType {\n isActivated?: boolean;\n hasDeactivationUXRun?: boolean;\n wasActivatedByPointer?: boolean;\n wasElementMadeActive?: boolean;\n activationEvent?: Event;\n isProgrammatic?: boolean;\n}\n\ninterface FgTranslationCoordinates {\n startPoint: MDCRipplePoint;\n endPoint: MDCRipplePoint;\n}\n\ninterface Coordinates {\n left: number;\n top: number;\n}\n\ntype ActivationEventType = 'touchstart' | 'pointerdown' | 'mousedown' | 'keydown';\ntype DeactivationEventType = 'touchend' | 'pointerup' | 'mouseup' | 'contextmenu';\n\n// Activation events registered on the root element of each instance for activation\nconst ACTIVATION_EVENT_TYPES: ActivationEventType[] = [\n 'touchstart', 'pointerdown', 'mousedown', 'keydown',\n];\n\n// Deactivation events registered on documentElement when a pointer-related down event occurs\nconst POINTER_DEACTIVATION_EVENT_TYPES: DeactivationEventType[] = [\n 'touchend', 'pointerup', 'mouseup', 'contextmenu',\n];\n\n// simultaneous nested activations\nlet activatedTargets: Array<EventTarget | null> = [];\n\nexport class MDCRippleFoundation extends MDCFoundation<MDCRippleAdapter> {\n static get cssClasses() {\n return cssClasses;\n }\n\n static get strings() {\n return strings;\n }\n\n static get numbers() {\n return numbers;\n }\n\n static get defaultAdapter(): MDCRippleAdapter {\n return {\n addClass: () => undefined,\n browserSupportsCssVars: () => true,\n computeBoundingRect: () => ({top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0}),\n containsEventTarget: () => true,\n deregisterDocumentInteractionHandler: () => undefined,\n deregisterInteractionHandler: () => undefined,\n deregisterResizeHandler: () => undefined,\n getWindowPageOffset: () => ({x: 0, y: 0}),\n isSurfaceActive: () => true,\n isSurfaceDisabled: () => true,\n isUnbounded: () => true,\n registerDocumentInteractionHandler: () => undefined,\n registerInteractionHandler: () => undefined,\n registerResizeHandler: () => undefined,\n removeClass: () => undefined,\n updateCssVariable: () => undefined,\n };\n }\n\n private activationAnimationHasEnded_ = false;\n private activationState_: ActivationStateType;\n private activationTimer_ = 0;\n private fgDeactivationRemovalTimer_ = 0;\n private fgScale_ = '0';\n private frame_ = {width: 0, height: 0};\n private initialSize_ = 0;\n private layoutFrame_ = 0;\n private maxRadius_ = 0;\n private unboundedCoords_: Coordinates = {left: 0, top: 0};\n\n private readonly activationTimerCallback_: () => void;\n private readonly activateHandler_: EventHandlerNonNull;\n private readonly deactivateHandler_: EventHandlerNonNull;\n private readonly focusHandler_: EventHandlerNonNull;\n private readonly blurHandler_: EventHandlerNonNull;\n private readonly resizeHandler_: EventHandlerNonNull;\n\n private previousActivationEvent_?: Event;\n\n constructor(adapter?: Partial<MDCRippleAdapter>) {\n super({...MDCRippleFoundation.defaultAdapter, ...adapter});\n\n this.activationState_ = this.defaultActivationState_();\n\n this.activationTimerCallback_ = () => {\n this.activationAnimationHasEnded_ = true;\n this.runDeactivationUXLogicIfReady_();\n };\n this.activateHandler_ = (e) => this.activate_(e);\n this.deactivateHandler_ = () => this.deactivate_();\n this.focusHandler_ = () => this.handleFocus();\n this.blurHandler_ = () => this.handleBlur();\n this.resizeHandler_ = () => this.layout();\n }\n\n init() {\n const supportsPressRipple = this.supportsPressRipple_();\n\n this.registerRootHandlers_(supportsPressRipple);\n\n if (supportsPressRipple) {\n const {ROOT, UNBOUNDED} = MDCRippleFoundation.cssClasses;\n requestAnimationFrame(() => {\n this.adapter_.addClass(ROOT);\n if (this.adapter_.isUnbounded()) {\n this.adapter_.addClass(UNBOUNDED);\n // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple\n this.layoutInternal_();\n }\n });\n }\n }\n\n destroy() {\n if (this.supportsPressRipple_()) {\n if (this.activationTimer_) {\n clearTimeout(this.activationTimer_);\n this.activationTimer_ = 0;\n this.adapter_.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);\n }\n\n if (this.fgDeactivationRemovalTimer_) {\n clearTimeout(this.fgDeactivationRemovalTimer_);\n this.fgDeactivationRemovalTimer_ = 0;\n this.adapter_.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);\n }\n\n const {ROOT, UNBOUNDED} = MDCRippleFoundation.cssClasses;\n requestAnimationFrame(() => {\n this.adapter_.removeClass(ROOT);\n this.adapter_.removeClass(UNBOUNDED);\n this.removeCssVars_();\n });\n }\n\n this.deregisterRootHandlers_();\n this.deregisterDeactivationHandlers_();\n }\n\n /**\n * @param evt Optional event containing position information.\n */\n activate(evt?: Event): void {\n this.activate_(evt);\n }\n\n deactivate(): void {\n this.deactivate_();\n }\n\n layout(): void {\n if (this.layoutFrame_) {\n cancelAnimationFrame(this.layoutFrame_);\n }\n this.layoutFrame_ = requestAnimationFrame(() => {\n this.layoutInternal_();\n this.layoutFrame_ = 0;\n });\n }\n\n setUnbounded(unbounded: boolean): void {\n const {UNBOUNDED} = MDCRippleFoundation.cssClasses;\n if (unbounded) {\n this.adapter_.addClass(UNBOUNDED);\n } else {\n this.adapter_.removeClass(UNBOUNDED);\n }\n }\n\n handleFocus(): void {\n requestAnimationFrame(() =>\n this.adapter_.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED));\n }\n\n handleBlur(): void {\n requestAnimationFrame(() =>\n this.adapter_.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED));\n }\n\n /**\n * We compute this property so that we are not querying information about the client\n * until the point in time where the foundation requests it. This prevents scenarios where\n * client-side feature-detection may happen too early, such as when components are rendered on the server\n * and then initialized at mount time on the client.\n */\n private supportsPressRipple_(): boolean {\n return this.adapter_.browserSupportsCssVars();\n }\n\n private defaultActivationState_(): ActivationStateType {\n return {\n activationEvent: undefined,\n hasDeactivationUXRun: false,\n isActivated: false,\n isProgrammatic: false,\n wasActivatedByPointer: false,\n wasElementMadeActive: false,\n };\n }\n\n /**\n * supportsPressRipple Passed from init to save a redundant function call\n */\n private registerRootHandlers_(supportsPressRipple: boolean) {\n if (supportsPressRipple) {\n ACTIVATION_EVENT_TYPES.forEach((evtType) => {\n this.adapter_.registerInteractionHandler(evtType, this.activateHandler_);\n });\n if (this.adapter_.isUnbounded()) {\n this.adapter_.registerResizeHandler(this.resizeHandler_);\n }\n }\n\n this.adapter_.registerInteractionHandler('focus', this.focusHandler_);\n this.adapter_.registerInteractionHandler('blur', this.blurHandler_);\n }\n\n private registerDeactivationHandlers_(evt: Event) {\n if (evt.type === 'keydown') {\n this.adapter_.registerInteractionHandler('keyup', this.deactivateHandler_);\n } else {\n POINTER_DEACTIVATION_EVENT_TYPES.forEach((evtType) => {\n this.adapter_.registerDocumentInteractionHandler(evtType, this.deactivateHandler_);\n });\n }\n }\n\n private deregisterRootHandlers_() {\n ACTIVATION_EVENT_TYPES.forEach((evtType) => {\n this.adapter_.deregisterInteractionHandler(evtType, this.activateHandler_);\n });\n this.adapter_.deregisterInteractionHandler('focus', this.focusHandler_);\n this.adapter_.deregisterInteractionHandler('blur', this.blurHandler_);\n\n if (this.adapter_.isUnbounded()) {\n this.adapter_.deregisterResizeHandler(this.resizeHandler_);\n }\n }\n\n private deregisterDeactivationHandlers_() {\n this.adapter_.deregisterInteractionHandler('keyup', this.deactivateHandler_);\n POINTER_DEACTIVATION_EVENT_TYPES.forEach((evtType) => {\n this.adapter_.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler_);\n });\n }\n\n private removeCssVars_() {\n const rippleStrings = MDCRippleFoundation.strings;\n const keys = Object.keys(rippleStrings) as Array<keyof typeof rippleStrings>;\n keys.forEach((key) => {\n if (key.indexOf('VAR_') === 0) {\n this.adapter_.updateCssVariable(rippleStrings[key], null);\n }\n });\n }\n\n private activate_(evt?: Event) {\n if (this.adapter_.isSurfaceDisabled()) {\n return;\n }\n\n const activationState = this.activationState_;\n if (activationState.isActivated) {\n return;\n }\n\n // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction\n const previousActivationEvent = this.previousActivationEvent_;\n const isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;\n if (isSameInteraction) {\n return;\n }\n\n activationState.isActivated = true;\n activationState.isProgrammatic = evt === undefined;\n activationState.activationEvent = evt;\n activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (\n evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown'\n );\n\n const hasActivatedChild = evt !== undefined && activatedTargets.length > 0 && activatedTargets.some(\n (target) => this.adapter_.containsEventTarget(target));\n if (hasActivatedChild) {\n // Immediately reset activation state, while preserving logic that prevents touch follow-on events\n this.resetActivationState_();\n return;\n }\n\n if (evt !== undefined) {\n activatedTargets.push(evt.target);\n this.registerDeactivationHandlers_(evt);\n }\n\n activationState.wasElementMadeActive = this.checkElementMadeActive_(evt);\n if (activationState.wasElementMadeActive) {\n this.animateActivation_();\n }\n\n requestAnimationFrame(() => {\n // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples\n activatedTargets = [];\n\n if (!activationState.wasElementMadeActive\n && evt !== undefined\n && ((evt as KeyboardEvent).key === ' ' || (evt as KeyboardEvent).keyCode === 32)) {\n // If space was pressed, try again within an rAF call to detect :active, because different UAs report\n // active states inconsistently when they're called within event handling code:\n // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741\n // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS\n // variable is set within a rAF callback for a submit button interaction (#2241).\n activationState.wasElementMadeActive = this.checkElementMadeActive_(evt);\n if (activationState.wasElementMadeActive) {\n this.animateActivation_();\n }\n }\n\n if (!activationState.wasElementMadeActive) {\n // Reset activation state immediately if element was not made active.\n this.activationState_ = this.defaultActivationState_();\n }\n });\n }\n\n private checkElementMadeActive_(evt?: Event) {\n return (evt !== undefined && evt.type === 'keydown') ? this.adapter_.isSurfaceActive() : true;\n }\n\n private animateActivation_() {\n const {VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END} = MDCRippleFoundation.strings;\n const {FG_DEACTIVATION, FG_ACTIVATION} = MDCRippleFoundation.cssClasses;\n const {DEACTIVATION_TIMEOUT_MS} = MDCRippleFoundation.numbers;\n\n this.layoutInternal_();\n\n let translateStart = '';\n let translateEnd = '';\n\n if (!this.adapter_.isUnbounded()) {\n const {startPoint, endPoint} = this.getFgTranslationCoordinates_();\n translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n }\n\n this.adapter_.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);\n this.adapter_.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);\n // Cancel any ongoing activation/deactivation animations\n clearTimeout(this.activationTimer_);\n clearTimeout(this.fgDeactivationRemovalTimer_);\n this.rmBoundedActivationClasses_();\n this.adapter_.removeClass(FG_DEACTIVATION);\n\n // Force layout in order to re-trigger the animation.\n this.adapter_.computeBoundingRect();\n this.adapter_.addClass(FG_ACTIVATION);\n this.activationTimer_ = setTimeout(() => this.activationTimerCallback_(), DEACTIVATION_TIMEOUT_MS);\n }\n\n private getFgTranslationCoordinates_(): FgTranslationCoordinates {\n const {activationEvent, wasActivatedByPointer} = this.activationState_;\n\n let startPoint;\n if (wasActivatedByPointer) {\n startPoint = getNormalizedEventCoords(\n activationEvent,\n this.adapter_.getWindowPageOffset(),\n this.adapter_.computeBoundingRect(),\n );\n } else {\n startPoint = {\n x: this.frame_.width / 2,\n y: this.frame_.height / 2,\n };\n }\n // Center the element around the start point.\n startPoint = {\n x: startPoint.x - (this.initialSize_ / 2),\n y: startPoint.y - (this.initialSize_ / 2),\n };\n\n const endPoint = {\n x: (this.frame_.width / 2) - (this.initialSize_ / 2),\n y: (this.frame_.height / 2) - (this.initialSize_ / 2),\n };\n\n return {startPoint, endPoint};\n }\n\n private runDeactivationUXLogicIfReady_() {\n // This method is called both when a pointing device is released, and when the activation animation ends.\n // The deactivation animation should only run after both of those occur.\n const {FG_DEACTIVATION} = MDCRippleFoundation.cssClasses;\n const {hasDeactivationUXRun, isActivated} = this.activationState_;\n const activationHasEnded = hasDeactivationUXRun || !isActivated;\n\n if (activationHasEnded && this.activationAnimationHasEnded_) {\n this.rmBoundedActivationClasses_();\n this.adapter_.addClass(FG_DEACTIVATION);\n this.fgDeactivationRemovalTimer_ = setTimeout(() => {\n this.adapter_.removeClass(FG_DEACTIVATION);\n }, numbers.FG_DEACTIVATION_MS);\n }\n }\n\n private rmBoundedActivationClasses_() {\n const {FG_ACTIVATION} = MDCRippleFoundation.cssClasses;\n this.adapter_.removeClass(FG_ACTIVATION);\n this.activationAnimationHasEnded_ = false;\n this.adapter_.computeBoundingRect();\n }\n\n private resetActivationState_() {\n this.previousActivationEvent_ = this.activationState_.activationEvent;\n this.activationState_ = this.defaultActivationState_();\n // Touch devices may fire additional events for the same interaction within a short time.\n // Store the previous event until it's safe to assume that subsequent events are for new interactions.\n setTimeout(() => this.previousActivationEvent_ = undefined, MDCRippleFoundation.numbers.TAP_DELAY_MS);\n }\n\n private deactivate_(): void {\n const activationState = this.activationState_;\n // This can happen in scenarios such as when you have a keyup event that blurs the element.\n if (!activationState.isActivated) {\n return;\n }\n\n const state: ActivationStateType = {...activationState};\n\n if (activationState.isProgrammatic) {\n requestAnimationFrame(() => this.animateDeactivation_(state));\n this.resetActivationState_();\n } else {\n this.deregisterDeactivationHandlers_();\n requestAnimationFrame(() => {\n this.activationState_.hasDeactivationUXRun = true;\n this.animateDeactivation_(state);\n this.resetActivationState_();\n });\n }\n }\n\n private animateDeactivation_({wasActivatedByPointer, wasElementMadeActive}: ActivationStateType) {\n if (wasActivatedByPointer || wasElementMadeActive) {\n this.runDeactivationUXLogicIfReady_();\n }\n }\n\n private layoutInternal_() {\n this.frame_ = this.adapter_.computeBoundingRect();\n const maxDim = Math.max(this.frame_.height, this.frame_.width);\n\n // Surface diameter is treated differently for unbounded vs. bounded ripples.\n // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately\n // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically\n // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter\n // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via\n // `overflow: hidden`.\n const getBoundedRadius = () => {\n const hypotenuse = Math.sqrt(Math.pow(this.frame_.width, 2) + Math.pow(this.frame_.height, 2));\n return hypotenuse + MDCRippleFoundation.numbers.PADDING;\n };\n\n this.maxRadius_ = this.adapter_.isUnbounded() ? maxDim : getBoundedRadius();\n\n // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform\n this.initialSize_ = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);\n this.fgScale_ = `${this.maxRadius_ / this.initialSize_}`;\n\n this.updateLayoutCssVars_();\n }\n\n private updateLayoutCssVars_() {\n const {\n VAR_FG_SIZE, VAR_LEFT, VAR_TOP, VAR_FG_SCALE,\n } = MDCRippleFoundation.strings;\n\n this.adapter_.updateCssVariable(VAR_FG_SIZE, `${this.initialSize_}px`);\n this.adapter_.updateCssVariable(VAR_FG_SCALE, this.fgScale_);\n\n if (this.adapter_.isUnbounded()) {\n this.unboundedCoords_ = {\n left: Math.round((this.frame_.width / 2) - (this.initialSize_ / 2)),\n top: Math.round((this.frame_.height / 2) - (this.initialSize_ / 2)),\n };\n\n this.adapter_.updateCssVariable(VAR_LEFT, `${this.unboundedCoords_.left}px`);\n this.adapter_.updateCssVariable(VAR_TOP, `${this.unboundedCoords_.top}px`);\n }\n }\n}\n\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCRippleFoundation;\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-ripple/foundation.ts","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nexport const cssClasses = {\n // Ripple is a special case where the \"root\" component is really a \"mixin\" of sorts,\n // given that it's an 'upgrade' to an existing component. That being said it is the root\n // CSS class that all other CSS classes derive from.\n BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',\n FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',\n ROOT: 'mdc-ripple-upgraded',\n UNBOUNDED: 'mdc-ripple-upgraded--unbounded',\n};\n\nexport const strings = {\n VAR_FG_SCALE: '--mdc-ripple-fg-scale',\n VAR_FG_SIZE: '--mdc-ripple-fg-size',\n VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',\n VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',\n VAR_LEFT: '--mdc-ripple-left',\n VAR_TOP: '--mdc-ripple-top',\n};\n\nexport const numbers = {\n DEACTIVATION_TIMEOUT_MS: 225, // Corresponds to $mdc-ripple-translate-duration (i.e. activation animation duration)\n FG_DEACTIVATION_MS: 150, // Corresponds to $mdc-ripple-fade-out-duration (i.e. deactivation animation duration)\n INITIAL_ORIGIN_SCALE: 0.6,\n PADDING: 10,\n TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices\n};\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-ripple/constants.ts","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nimport {MDCComponent} from '@material/base/component';\nimport {matches} from '@material/dom/ponyfill';\nimport {MDCRippleAdapter} from './adapter';\nimport {MDCRippleFoundation} from './foundation';\nimport {MDCRippleAttachOpts, MDCRippleCapableSurface} from './types';\nimport * as util from './util';\n\nexport type MDCRippleFactory = (el: Element, foundation?: MDCRippleFoundation) => MDCRipple;\n\nexport class MDCRipple extends MDCComponent<MDCRippleFoundation> implements MDCRippleCapableSurface {\n static attachTo(root: Element, opts: MDCRippleAttachOpts = {isUnbounded: undefined}): MDCRipple {\n const ripple = new MDCRipple(root);\n // Only override unbounded behavior if option is explicitly specified\n if (opts.isUnbounded !== undefined) {\n ripple.unbounded = opts.isUnbounded;\n }\n return ripple;\n }\n\n static createAdapter(instance: MDCRippleCapableSurface): MDCRippleAdapter {\n return {\n addClass: (className) => instance.root_.classList.add(className),\n browserSupportsCssVars: () => util.supportsCssVariables(window),\n computeBoundingRect: () => instance.root_.getBoundingClientRect(),\n containsEventTarget: (target) => instance.root_.contains(target as Node),\n deregisterDocumentInteractionHandler: (evtType, handler) =>\n document.documentElement.removeEventListener(evtType, handler, util.applyPassive()),\n deregisterInteractionHandler: (evtType, handler) =>\n instance.root_.removeEventListener(evtType, handler, util.applyPassive()),\n deregisterResizeHandler: (handler) => window.removeEventListener('resize', handler),\n getWindowPageOffset: () => ({x: window.pageXOffset, y: window.pageYOffset}),\n isSurfaceActive: () => matches(instance.root_, ':active'),\n isSurfaceDisabled: () => Boolean(instance.disabled),\n isUnbounded: () => Boolean(instance.unbounded),\n registerDocumentInteractionHandler: (evtType, handler) =>\n document.documentElement.addEventListener(evtType, handler, util.applyPassive()),\n registerInteractionHandler: (evtType, handler) =>\n instance.root_.addEventListener(evtType, handler, util.applyPassive()),\n registerResizeHandler: (handler) => window.addEventListener('resize', handler),\n removeClass: (className) => instance.root_.classList.remove(className),\n updateCssVariable: (varName, value) => (instance.root_ as HTMLElement).style.setProperty(varName, value),\n };\n }\n\n // Public visibility for this property is required by MDCRippleCapableSurface.\n root_!: Element; // assigned in MDCComponent constructor\n\n disabled = false;\n\n private unbounded_?: boolean;\n\n get unbounded(): boolean {\n return Boolean(this.unbounded_);\n }\n\n set unbounded(unbounded: boolean) {\n this.unbounded_ = Boolean(unbounded);\n this.setUnbounded_();\n }\n\n activate() {\n this.foundation_.activate();\n }\n\n deactivate() {\n this.foundation_.deactivate();\n }\n\n layout() {\n this.foundation_.layout();\n }\n\n getDefaultFoundation() {\n return new MDCRippleFoundation(MDCRipple.createAdapter(this));\n }\n\n initialSyncWithDOM() {\n const root = this.root_ as HTMLElement;\n this.unbounded = 'mdcRippleIsUnbounded' in root.dataset;\n }\n\n /**\n * Closure Compiler throws an access control error when directly accessing a\n * protected or private property inside a getter/setter, like unbounded above.\n * By accessing the protected property inside a method, we solve that problem.\n * That's why this function exists.\n */\n private setUnbounded_() {\n this.foundation_.setUnbounded(Boolean(this.unbounded_));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./packages/mdc-ripple/component.ts"],"sourceRoot":""}
\No newline at end of file