/*! Material Components for the Web Copyright (c) 2018 Google Inc. License: MIT */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mdc=e():t.mdc=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=63)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCRipple",function(){return l}),n.d(e,"RippleCapableSurface",function(){return f});var a=n(1),s=(n(29),n(66)),u=n(6);n.d(e,"MDCRippleFoundation",function(){return s.a}),n.d(e,"util",function(){return u});var c=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.isUnbounded,i=void 0===r?void 0:r,o=new e(t);return void 0!==i&&(o.unbounded=i),o}},{key:"createAdapter",value:function(t){var e=u.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return u.supportsCssVariables(window)},isUnbounded:function(){return t.unbounded},isSurfaceActive:function(){return t.root_[e](":active")},isSurfaceDisabled:function(){return t.disabled},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},containsEventTarget:function(e){return t.root_.contains(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,u.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,u.applyPassive())},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,u.applyPassive())},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,u.applyPassive())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),e}(a.a),f=function t(){r(this,t)};f.prototype.root_,f.prototype.unbounded,f.prototype.disabled},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1);n.d(e,"MDCFoundation",function(){return r.a}),n.d(e,"MDCComponent",function(){return i.a})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSelectionControlState",function(){return o}),n.d(e,"MDCSelectionControl",function(){return a});var i=(n(2),function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=u;if("boolean"==typeof u&&!e)return n;if(t.CSS&&"function"==typeof t.CSS.supports){var i=t.CSS.supports("--css-vars","yes"),o=t.CSS.supports("(--css-vars: yes)")&&t.CSS.supports("color","#00000000");return n=!(!i&&!o||r(t)),e||(u=n),n}}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===c||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){return n=!0}})}catch(t){}c=n}return!!c&&{passive:!0}}function a(t){for(var e=["matches","webkitMatchesSelector","msMatchesSelector"],n="matches",r=0;r=0&&this.foundation_.handleKeydown(t,t.target.classList.contains(c.a.LIST_ITEM_CLASS),e)}},{key:"handleClickEvent_",value:function(t){var e=this.getListItemIndex_(t),n=!Object(u.matches)(t.target,c.b.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(e,n)}},{key:"initializeListType",value:function(){var t=this.root_.querySelector("."+c.a.LIST_ITEM_ACTIVATED_CLASS+",\n ."+c.a.LIST_ITEM_SELECTED_CLASS+",\n "+c.b.ARIA_CHECKED_RADIO_SELECTOR);t&&(t.classList.contains(c.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(t))}},{key:"getDefaultFoundation",value:function(){var t=this;return new s.a(l({getListItemCount:function(){return t.listElements.length},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},setAttributeForElementIndex:function(e,n,r){var i=t.listElements[e];i&&i.setAttribute(n,r)},removeAttributeForElementIndex:function(e,n){var r=t.listElements[e];r&&r.removeAttribute(n)},addClassForElementIndex:function(e,n){var r=t.listElements[e];r&&r.classList.add(n)},removeClassForElementIndex:function(e,n){var r=t.listElements[e];r&&r.classList.remove(n)},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},setTabIndexForListItemChildren:function(e,n){var r=t.listElements[e];[].slice.call(r.querySelectorAll(c.b.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",n)})},followHref:function(e){var n=t.listElements[e];n&&n.href&&n.click()},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(c.b.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(c.b.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(c.b.CHECKBOX_SELECTOR).checked},setCheckedCheckboxOrRadioAtIndex:function(e,n){var r=t.listElements[e],i=r.querySelector(c.b.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)}}))}},{key:"vertical",set:function(t){this.foundation_.setVerticalOrientation(t)}},{key:"listElements",get:function(){return[].slice.call(this.root_.querySelectorAll(c.b.ENABLED_ITEMS_SELECTOR))}},{key:"wrapFocus",set:function(t){this.foundation_.setWrapFocus(t)}},{key:"singleSelection",set:function(t){this.foundation_.setSingleSelection(t)}},{key:"selectedIndex",set:function(t){this.foundation_.setSelectedIndex(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(38),n(39)),u=Object.assign||function(t){for(var e=1;e=this.adapter_.getListItemCount()||(this.adapter_.hasCheckboxAtIndex(t)?this.setAriaAttributesForCheckbox_(t):this.adapter_.hasRadioAtIndex(t)?this.setAriaAttributesForRadio_(t):(this.setAriaAttributesForSingleSelect_(t),this.setClassNamesForSingleSelect_(t)),this.selectedIndex_>=0&&this.selectedIndex_!==t?this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1):-1===this.selectedIndex_&&0!==t&&this.adapter_.setAttributeForElementIndex(0,"tabindex",-1),this.adapter_.setAttributeForElementIndex(t,"tabindex",0),this.selectedIndex_=t)}},{key:"setAriaAttributesForCheckbox_",value:function(t){var e=this.adapter_.isCheckboxCheckedAtIndex(t)?"true":"false";this.adapter_.setAttributeForElementIndex(t,s.b.ARIA_CHECKED,e)}},{key:"setAriaAttributesForRadio_",value:function(t){this.selectedIndex_>=0&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.b.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,s.b.ARIA_CHECKED,"true")}},{key:"setAriaAttributesForSingleSelect_",value:function(t){this.selectedIndex_>=0&&this.selectedIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.b.ARIA_SELECTED,"false"),this.adapter_.setAttributeForElementIndex(t,s.b.ARIA_SELECTED,"true")}},{key:"setClassNamesForSingleSelect_",value:function(t){var e=s.a.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=s.a.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_>=0&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e)}},{key:"handleFocusIn",value:function(t,e){e>=0&&this.adapter_.setTabIndexForListItemChildren(e,0)}},{key:"handleFocusOut",value:function(t,e){e>=0&&this.adapter_.setTabIndexForListItemChildren(e,-1)}},{key:"handleKeydown",value:function(t,e,n){var r="ArrowLeft"===t.key||37===t.keyCode,i="ArrowUp"===t.key||38===t.keyCode,o="ArrowRight"===t.key||39===t.keyCode,a="ArrowDown"===t.key||40===t.keyCode,s="Home"===t.key||36===t.keyCode,u="End"===t.key||35===t.keyCode,c="Enter"===t.key||13===t.keyCode,l="Space"===t.key||32===t.keyCode,f=this.adapter_.getFocusedElementIndex();if(!(-1===f&&(f=n)<0))if(this.isVertical_&&a||!this.isVertical_&&o)this.preventDefaultEvent_(t),this.focusNextElement(f);else if(this.isVertical_&&i||!this.isVertical_&&r)this.preventDefaultEvent_(t),this.focusPrevElement(f);else if(s)this.preventDefaultEvent_(t),this.focusFirstElement();else if(u)this.preventDefaultEvent_(t),this.focusLastElement();else if((c||l)&&e){this.isSingleSelectionList_&&this.preventDefaultEvent_(t);var d=this.hasCheckboxOrRadioAtIndex_(n);d&&(this.toggleCheckboxOrRadioAtIndex_(n),this.preventDefaultEvent_(t)),(this.isSingleSelectionList_||d)&&this.setSelectedIndex(f),this.adapter_.followHref(f)}}},{key:"handleClick",value:function(t,e){-1!==t&&(e&&this.toggleCheckboxOrRadioAtIndex_(t),(this.isSingleSelectionList_||this.hasCheckboxOrRadioAtIndex_(t))&&this.setSelectedIndex(t))}},{key:"preventDefaultEvent_",value:function(t){var e=(""+t.target.tagName).toLowerCase();-1===l.indexOf(e)&&t.preventDefault()}},{key:"focusNextElement",value:function(t){var e=this.adapter_.getListItemCount(),n=t+1;if(n>=e){if(!this.wrapFocus_)return;n=0}this.adapter_.focusItemAtIndex(n)}},{key:"focusPrevElement",value:function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return;e=this.adapter_.getListItemCount()-1}this.adapter_.focusItemAtIndex(e)}},{key:"focusFirstElement",value:function(){this.adapter_.getListItemCount()>0&&this.adapter_.focusItemAtIndex(0)}},{key:"focusLastElement",value:function(){var t=this.adapter_.getListItemCount()-1;t>=0&&this.adapter_.focusItemAtIndex(t)}},{key:"toggleCheckboxOrRadioAtIndex_",value:function(t){if(this.hasCheckboxOrRadioAtIndex_(t)){var e=!0;this.adapter_.hasCheckboxAtIndex(t)&&(e=!this.adapter_.isCheckboxCheckedAtIndex(t)),this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,e)}}},{key:"hasCheckboxOrRadioAtIndex_",value:function(t){return this.adapter_.hasCheckboxAtIndex(t)||this.adapter_.hasRadioAtIndex(t)}}]),e}(a.a);e.a=f},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCLineRipple",function(){return l});var a=n(1),s=(n(42),n(107));n.d(e,"MDCLineRippleFoundation",function(){return s.a});var u=Object.assign||function(t){for(var e=1;e0&&f0&&gu.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c));for(var f in c)c.hasOwnProperty(f)&&"0"!==c[f]&&(c[f]=parseInt(c[f],10)+"px");this.adapter_.setTransformOrigin(o+" "+i),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(t){var e=this.measures_,n=e.windowScroll,r=e.viewportDistance;for(var i in t)t.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(t[i]=parseInt(t[i],10)+r[i]),this.isFixedPosition_||("top"===i?t[i]=parseInt(t[i],10)+n.y:"bottom"===i?t[i]=parseInt(t[i],10)-n.y:"left"===i?t[i]=parseInt(t[i],10)+n.x:"right"===i&&(t[i]=parseInt(t[i],10)-n.x)));return t}},{key:"open",value:function(){var t=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(e.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.quickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},u.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var t=this;this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){t.adapter_.removeClass(e.cssClasses.OPEN),t.quickOpen_?t.adapter_.notifyClose():t.closeAnimationEndTimerId_=setTimeout(function(){t.closeAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_CLOSED),t.adapter_.notifyClose()},u.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(t){return"number"==typeof t&&isFinite(t)}}]),e}(s.a)},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"e",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"a",function(){return s});/** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var r={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},i={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},o={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},a={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},s={TOP_LEFT:0,TOP_RIGHT:a.RIGHT,BOTTOM_LEFT:a.BOTTOM,BOTTOM_RIGHT:a.BOTTOM|a.RIGHT,TOP_START:a.FLIP_RTL,TOP_END:a.FLIP_RTL|a.RIGHT,BOTTOM_START:a.BOTTOM|a.FLIP_RTL,BOTTOM_END:a.BOTTOM|a.RIGHT|a.FLIP_RTL}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCNotchedOutline",function(){return d});var a=n(1),s=(n(46),n(112)),u=n(10),c=n(47);n.d(e,"MDCNotchedOutlineFoundation",function(){return s.a});var l=Object.assign||function(t){for(var e=1;e0?e+"px":"0")}}))}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(1),s=(n(49),n(119));n.d(e,"b",function(){return s.a});var u=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:function(t,e){return new s.MDCRipple(t,e)},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new u.MDCTabIndicator(t)},n=this.root_.querySelector(c.a.strings.RIPPLE_SELECTOR),r=l(s.MDCRipple.createAdapter(this),{addClass:function(t){return n.classList.add(t)},removeClass:function(t){return n.classList.remove(t)},updateCssVariable:function(t,e){return n.style.setProperty(t,e)}}),i=new s.MDCRippleFoundation(r);this.ripple_=t(this.root_,i);var o=this.root_.querySelector(c.a.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator_=e(o),this.content_=this.root_.querySelector(c.a.strings.CONTENT_SELECTOR)}},{key:"initialSyncWithDOM",value:function(){this.handleClick_=this.foundation_.handleClick.bind(this.foundation_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.unlisten("click",this.handleClick_),this.ripple_.destroy(),d(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"getDefaultFoundation",value:function(){var t=this;return new c.a({setAttr:function(e,n){return t.root_.setAttribute(e,n)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},activateIndicator:function(e){return t.tabIndicator_.activate(e)},deactivateIndicator:function(){return t.tabIndicator_.deactivate()},notifyInteracted:function(){return t.emit(c.a.strings.INTERACTED_EVENT,{tab:t},!0)},getOffsetLeft:function(){return t.root_.offsetLeft},getOffsetWidth:function(){return t.root_.offsetWidth},getContentOffsetLeft:function(){return t.content_.offsetLeft},getContentOffsetWidth:function(){return t.content_.offsetWidth},focus:function(){return t.root_.focus()}})}},{key:"activate",value:function(t){this.foundation_.activate(t)}},{key:"deactivate",value:function(){this.foundation_.deactivate()}},{key:"computeIndicatorClientRect",value:function(){return this.tabIndicator_.computeContentClientRect()}},{key:"computeDimensions",value:function(){return this.foundation_.computeDimensions()}},{key:"focus",value:function(){this.root_.focus()}},{key:"active",get:function(){return this.foundation_.isActive()}},{key:"focusOnActivate",set:function(t){this.foundation_.setFocusOnActivate(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(55),n(132)),u=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:function(t,e){return new s.MDCRipple(t,e)};this.id=this.root_.id,this.leadingIcon_=this.root_.querySelector(c.b.LEADING_ICON_SELECTOR),this.trailingIcon_=this.root_.querySelector(c.b.TRAILING_ICON_SELECTOR);var n=this.root_.querySelector(c.b.CHECKMARK_SELECTOR);if(n&&!this.leadingIcon_){var r=l(s.MDCRipple.createAdapter(this),{computeBoundingRect:function(){return{height:t.root_.getBoundingClientRect().height,width:t.root_.getBoundingClientRect().width+n.getBoundingClientRect().height}}});this.ripple_=e(this.root_,new s.MDCRippleFoundation(r))}else this.ripple_=e(this.root_)}},{key:"initialSyncWithDOM",value:function(){var t=this;this.handleInteraction_=function(e){return t.foundation_.handleInteraction(e)},this.handleTransitionEnd_=function(e){return t.foundation_.handleTransitionEnd(e)},this.handleTrailingIconInteraction_=function(e){return t.foundation_.handleTrailingIconInteraction(e)},h.forEach(function(e){t.root_.addEventListener(e,t.handleInteraction_)}),this.root_.addEventListener("transitionend",this.handleTransitionEnd_),this.trailingIcon_&&h.forEach(function(e){t.trailingIcon_.addEventListener(e,t.handleTrailingIconInteraction_)})}},{key:"destroy",value:function(){var t=this;this.ripple_.destroy(),h.forEach(function(e){t.root_.removeEventListener(e,t.handleInteraction_)}),this.root_.removeEventListener("transitionend",this.handleTransitionEnd_),this.trailingIcon_&&h.forEach(function(e){t.trailingIcon_.removeEventListener(e,t.handleTrailingIconInteraction_)}),d(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"beginExit",value:function(){this.foundation_.beginExit()}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a(l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},addClassToLeadingIcon:function(e){t.leadingIcon_&&t.leadingIcon_.classList.add(e)},removeClassFromLeadingIcon:function(e){t.leadingIcon_&&t.leadingIcon_.classList.remove(e)},eventTargetHasClass:function(t,e){return t.classList.contains(e)},notifyInteraction:function(){return t.emit(c.b.INTERACTION_EVENT,{chipId:t.id},!0)},notifySelection:function(e){return t.emit(c.b.SELECTION_EVENT,{chipId:t.id,selected:e},!0)},notifyTrailingIconInteraction:function(){return t.emit(c.b.TRAILING_ICON_INTERACTION_EVENT,{chipId:t.id},!0)},notifyRemoval:function(){return t.emit(c.b.REMOVAL_EVENT,{chipId:t.id,root:t.root_},!0)},getComputedStyleValue:function(e){return window.getComputedStyle(t.root_).getPropertyValue(e)},setStyleProperty:function(e,n){return t.root_.style.setProperty(e,n)}}))}},{key:"selected",get:function(){return this.foundation_.isSelected()},set:function(t){this.foundation_.setSelected(t)}},{key:"shouldRemoveOnTrailingIconClick",get:function(){return this.foundation_.getShouldRemoveOnTrailingIconClick()},set:function(t){this.foundation_.setShouldRemoveOnTrailingIconClick(t)}},{key:"ripple",get:function(){return this.ripple_}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(t){return new c.MDCMenuSurface(t)},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new f.MDCList(t)};this.menuSurface_=t(this.root_);var n=this.root_.querySelector(u.b.LIST_SELECTOR);n&&(this.list_=e(n),this.list_.wrapFocus=!0)}},{key:"initialSyncWithDOM",value:function(){var t=this;this.afterOpenedCallback_=function(){return t.handleAfterOpened_()},this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleClick_=function(e){return t.foundation_.handleClick(e)},this.menuSurface_.listen(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"setAnchorCorner",value:function(t){this.menuSurface_.setAnchorCorner(t)}},{key:"setAnchorMargin",value:function(t){this.menuSurface_.setAnchorMargin(t)}},{key:"getOptionByIndex",value:function(t){return t0&&t[0].focus()}},{key:"getDefaultFoundation",value:function(){var t=this;return new s.a({addClassToElementAtIndex:function(e,n){t.items[e].classList.add(n)},removeClassFromElementAtIndex:function(e,n){t.items[e].classList.remove(n)},addAttributeToElementAtIndex:function(e,n,r){t.items[e].setAttribute(n,r)},removeAttributeFromElementAtIndex:function(e,n){t.items[e].removeAttribute(n)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(){return t.open=!1},getElementIndex:function(e){return t.items.indexOf(e)},getParentElement:function(t){return t.parentElement},getSelectedElementIndex:function(e){return t.items.indexOf(e.querySelector("."+u.a.MENU_SELECTED_LIST_ITEM))},notifySelected:function(e){return t.emit(u.b.SELECTED_EVENT,{index:e.index,item:t.items[e.index]})}})}},{key:"open",get:function(){return this.menuSurface_.open},set:function(t){this.menuSurface_.open=t}},{key:"wrapFocus",get:function(){return this.list_.wrapFocus},set:function(t){this.list_.wrapFocus=t}},{key:"items",get:function(){return this.list_.listElements}},{key:"quickOpen",set:function(t){this.menuSurface_.quickOpen=t}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n0?e[0]:null,this.lastFocusableElement_=e.length>0?e[e.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(t){this.foundation_.setQuickOpen(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),document.dispatchEvent(r)}function i(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,i=[],s=e.querySelectorAll("[data-mdc-auto-init]"),u=0;t=s[u];u++){var c=t.dataset.mdcAutoInit;if(!c)throw new Error("(mdc-auto-init) Constructor name must be given.");var l=o[c];if("function"!=typeof l)throw new Error("(mdc-auto-init) Could not find constructor in registry for "+c);if(t[c])n("(mdc-auto-init) Component already initialized for "+t+". Skipping...");else{var f=l.attachTo(t);Object.defineProperty(t,c,{value:f,writable:!1,enumerable:!1,configurable:!0}),i.push(f)}}return r("MDCAutoInit:End",{}),i}e.a=i;/** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var o=Object.create(null),a=console.warn.bind(console);i.register=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;if("function"!=typeof e)throw new Error("(mdc-auto-init) Invalid Ctor value "+e+". Expected function");o[t]&&n("(mdc-auto-init) Overriding registration for "+t+" with "+e+". Was: "+o[t]),o[t]=e},i.deregister=function(t){delete o[t]},i.deregisterAll=function(){Object.keys(o).forEach(this.deregister,this)}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return!!t&&"function"==typeof t.set}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCCheckbox",function(){return v});var s=n(9),u=n(1),c=(n(4),n(68)),l=n(2),f=n(6);n.d(e,"MDCCheckboxFoundation",function(){return c.a});var d=Object.assign||function(t){for(var e=1;e0&&h.some(function(t){return e.adapter_.containsEventTarget(t)}))return void this.resetActivationState_();void 0!==t&&(h.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){h=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})}}}}},{key:"checkElementMadeActive_",value:function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()}},{key:"activate",value:function(t){this.activate_(t)}},{key:"animateActivation_",value:function(){var t=this,n=e.strings,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,a=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",l="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),d=f.startPoint,h=f.endPoint;c=d.x+"px, "+d.y+"px",l=h.x+"px, "+h.y+"px"}this.adapter_.updateCssVariable(r,c),this.adapter_.updateCssVariable(i,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},u)}},{key:"getFgTranslationCoordinates_",value:function(){var t=this.activationState_,e=t.activationEvent,n=t.wasActivatedByPointer,r=void 0;return r=n?Object(u.getNormalizedEventCoords)(e,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},r={x:r.x-this.initialSize_/2,y:r.y-this.initialSize_/2},{startPoint:r,endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}}},{key:"runDeactivationUXLogicIfReady_",value:function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,r=this.activationState_,i=r.hasDeactivationUXRun,o=r.isActivated;(i||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},s.b.FG_DEACTIVATION_MS))}},{key:"rmBoundedActivationClasses_",value:function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()}},{key:"resetActivationState_",value:function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)}},{key:"deactivate_",value:function(){var t=this,e=this.activationState_;if(e.isActivated){var n=c({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}}},{key:"deactivate",value:function(){this.deactivate_()}},{key:"animateDeactivation_",value:function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING}(),this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var t=e.strings,n=t.VAR_FG_SIZE,r=t.VAR_LEFT,i=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))}},{key:"setUnbounded",value:function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"handleFocus",value:function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})}},{key:"handleBlur",value:function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})}}]),e}(a.a);e.a=_},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o});/** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var r={ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded",BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation"},i={VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end"},o={PADDING:10,INITIAL_ORIGIN_SCALE:.6,DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,TAP_DELAY_MS:300}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(4),n(69),n(70)),u=Object.assign||function(t){for(var e=1;e0&&(clearTimeout(this.animEndLatchTimer_),this.adapter_.forceLayout(),this.adapter_.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(t,e),this.currentCheckState_=e,this.adapter_.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter_.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0))}}},{key:"determineCheckState_",value:function(){var t=s.c.TRANSITION_STATE_INDETERMINATE,e=s.c.TRANSITION_STATE_CHECKED,n=s.c.TRANSITION_STATE_UNCHECKED;return this.adapter_.isIndeterminate()?t:this.adapter_.isChecked()?e:n}},{key:"getTransitionAnimationClass_",value:function(t,n){var r=s.c.TRANSITION_STATE_INIT,i=s.c.TRANSITION_STATE_CHECKED,o=s.c.TRANSITION_STATE_UNCHECKED,a=e.cssClasses,u=a.ANIM_UNCHECKED_CHECKED,c=a.ANIM_UNCHECKED_INDETERMINATE,l=a.ANIM_CHECKED_UNCHECKED,f=a.ANIM_CHECKED_INDETERMINATE,d=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(t){case r:if(n===o)return"";case o:return n===i?u:c;case i:return n===o?l:f;default:return n===i?d:h}}},{key:"updateAriaChecked_",value:function(){this.adapter_.isIndeterminate()?this.adapter_.setNativeControlAttr(s.c.ARIA_CHECKED_ATTR,s.c.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter_.removeNativeControlAttr(s.c.ARIA_CHECKED_ATTR)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=(n(4),function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(t){return new u.a(t)};this.chipFactory_=t,this.chips=this.instantiateChips_(this.chipFactory_)}},{key:"initialSyncWithDOM",value:function(){var t=this;this.chips.forEach(function(e){e.selected&&t.foundation_.select(e.id)}),this.handleChipInteraction_=function(e){return t.foundation_.handleChipInteraction(e.detail.chipId)},this.handleChipSelection_=function(e){return t.foundation_.handleChipSelection(e.detail.chipId,e.detail.selected)},this.handleChipRemoval_=function(e){return t.foundation_.handleChipRemoval(e.detail.chipId)},this.root_.addEventListener(u.b.strings.INTERACTION_EVENT,this.handleChipInteraction_),this.root_.addEventListener(u.b.strings.SELECTION_EVENT,this.handleChipSelection_),this.root_.addEventListener(u.b.strings.REMOVAL_EVENT,this.handleChipRemoval_)}},{key:"destroy",value:function(){this.chips.forEach(function(t){t.destroy()}),this.root_.removeEventListener(u.b.strings.INTERACTION_EVENT,this.handleChipInteraction_),this.root_.removeEventListener(u.b.strings.SELECTION_EVENT,this.handleChipSelection_),this.root_.removeEventListener(u.b.strings.REMOVAL_EVENT,this.handleChipRemoval_),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"addChip",value:function(t){t.id=t.id||"mdc-chip-"+ ++d,this.chips.push(this.chipFactory_(t))}},{key:"getDefaultFoundation",value:function(){var t=this;return new s.a(c({hasClass:function(e){return t.root_.classList.contains(e)},removeChip:function(e){var n=t.findChipIndex_(e);n>=0&&(t.chips[n].destroy(),t.chips.splice(n,1))},setSelected:function(e,n){var r=t.findChipIndex_(e);r>=0&&(t.chips[r].selected=n)}}))}},{key:"instantiateChips_",value:function(t){return[].slice.call(this.root_.querySelectorAll(s.a.strings.CHIP_SELECTOR)).map(function(e){return e.id=e.id||"mdc-chip-"+ ++d,t(e)})}},{key:"findChipIndex_",value:function(t){for(var e=0;e=0?this.deselect_(t):this.select(t)}},{key:"select",value:function(t){if(!(this.selectedChipIds_.indexOf(t)>=0)){if(this.adapter_.hasClass(s.a.CHOICE)&&this.selectedChipIds_.length>0){var e=this.selectedChipIds_[0];this.selectedChipIds_.length=0,this.adapter_.setSelected(e,!1)}this.selectedChipIds_.push(t),this.adapter_.setSelected(t,!0)}}},{key:"deselect_",value:function(t){var e=this.selectedChipIds_.indexOf(t);e>=0&&(this.selectedChipIds_.splice(e,1),this.adapter_.setSelected(t,!1))}},{key:"handleChipInteraction",value:function(t){(this.adapter_.hasClass(s.a.CHOICE)||this.adapter_.hasClass(s.a.FILTER))&&this.toggleSelect_(t)}},{key:"handleChipSelection",value:function(t,e){var n=this.selectedChipIds_.indexOf(t)>=0;e&&!n?this.select(t):!e&&n&&this.deselect_(t)}},{key:"handleChipRemoval",value:function(t){this.deselect_(t),this.adapter_.removeChip(t)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});/** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var r={CHIP_SELECTOR:".mdc-chip"},i={CHOICE:"mdc-chip-set--choice",FILTER:"mdc-chip-set--filter"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCDialog",function(){return v});var a=n(3),s=n(2),u=n(76),c=n(79),l=n(14),f=n(35),d=n.n(f);n.d(e,"MDCDialogFoundation",function(){return u.a}),n.d(e,"util",function(){return c});var h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:d.a,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.container_=this.root_.querySelector(p.CONTAINER_SELECTOR),this.content_=this.root_.querySelector(p.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root_.querySelectorAll(p.BUTTON_SELECTOR)),this.defaultButton_=this.root_.querySelector(p.DEFAULT_BUTTON_SELECTOR),this.buttonRipples_=[],this.focusTrapFactory_=t,this.initialFocusEl_=e;for(var n,r=0;n=this.buttons_[r];r++)this.buttonRipples_.push(new s.MDCRipple(n))}},{key:"initialSyncWithDOM",value:function(){var t=this;this.focusTrap_=c.createFocusTrapInstance(this.container_,this.focusTrapFactory_,this.initialFocusEl_),this.handleInteraction_=this.foundation_.handleInteraction.bind(this.foundation_),this.handleDocumentKeydown_=this.foundation_.handleDocumentKeydown.bind(this.foundation_),this.layout_=this.layout.bind(this);var e=["resize","orientationchange"];this.handleOpening_=function(){e.forEach(function(e){return window.addEventListener(e,t.layout_)}),document.addEventListener("keydown",t.handleDocumentKeydown_)},this.handleClosing_=function(){e.forEach(function(e){return window.removeEventListener(e,t.layout_)}),document.removeEventListener("keydown",t.handleDocumentKeydown_)},this.listen("click",this.handleInteraction_),this.listen("keydown",this.handleInteraction_),this.listen(p.OPENING_EVENT,this.handleOpening_),this.listen(p.CLOSING_EVENT,this.handleClosing_)}},{key:"destroy",value:function(){this.unlisten("click",this.handleInteraction_),this.unlisten("keydown",this.handleInteraction_),this.unlisten(p.OPENING_EVENT,this.handleOpening_),this.unlisten(p.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach(function(t){return t.destroy()}),_(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"open",value:function(){this.foundation_.open()}},{key:"close",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.foundation_.close(t)}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},addBodyClass:function(t){return document.body.classList.add(t)},removeBodyClass:function(t){return document.body.classList.remove(t)},eventTargetMatches:function(t,e){return Object(l.matches)(t,e)},trapFocus:function(){return t.focusTrap_.activate()},releaseFocus:function(){return t.focusTrap_.deactivate()},isContentScrollable:function(){return!!t.content_&&c.isScrollable(t.content_)},areButtonsStacked:function(){return c.areTopsMisaligned(t.buttons_)},getActionFromEvent:function(t){var e=Object(l.closest)(t.target,"["+p.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(p.ACTION_ATTRIBUTE)},clickDefaultButton:function(){t.defaultButton_&&t.defaultButton_.click()},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach(function(t){return t.parentElement.appendChild(t)})},notifyOpening:function(){return t.emit(p.OPENING_EVENT,{})},notifyOpened:function(){return t.emit(p.OPENED_EVENT,{})},notifyClosing:function(e){return t.emit(p.CLOSING_EVENT,e?{action:e}:{})},notifyClosed:function(e){return t.emit(p.CLOSED_EVENT,e?{action:e}:{})}})}},{key:"isOpen",get:function(){return this.foundation_.isOpen()}},{key:"escapeKeyAction",get:function(){return this.foundation_.getEscapeKeyAction()},set:function(t){this.foundation_.setEscapeKeyAction(t)}},{key:"scrimClickAction",get:function(){return this.foundation_.getScrimClickAction()},set:function(t){this.foundation_.setScrimClickAction(t)}},{key:"autoStackButtons",get:function(){return this.foundation_.getAutoStackButtons()},set:function(t){this.foundation_.setAutoStackButtons(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(3),s=(n(77),n(78)),u=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"";this.isOpen_&&(this.isOpen_=!1,this.adapter_.notifyClosing(e),this.adapter_.addClass(s.a.CLOSING),this.adapter_.removeClass(s.a.OPEN),this.adapter_.removeBodyClass(s.a.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout(function(){t.adapter_.releaseFocus(),t.handleAnimationTimerEnd_(),t.adapter_.notifyClosed(e)},s.b.DIALOG_ANIMATION_CLOSE_TIME_MS))}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"getEscapeKeyAction",value:function(){return this.escapeKeyAction_}},{key:"setEscapeKeyAction",value:function(t){this.escapeKeyAction_=t}},{key:"getScrimClickAction",value:function(){return this.scrimClickAction_}},{key:"setScrimClickAction",value:function(t){this.scrimClickAction_=t}},{key:"getAutoStackButtons",value:function(){return this.autoStackButtons_}},{key:"setAutoStackButtons",value:function(t){this.autoStackButtons_=t}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()}},{key:"detectStackedButtons_",value:function(){this.adapter_.removeClass(s.a.STACKED);var t=this.adapter_.areButtonsStacked();t&&this.adapter_.addClass(s.a.STACKED),t!==this.areButtonsStacked_&&(this.adapter_.reverseButtons(),this.areButtonsStacked_=t)}},{key:"detectScrollableContent_",value:function(){this.adapter_.removeClass(s.a.SCROLLABLE),this.adapter_.isContentScrollable()&&this.adapter_.addClass(s.a.SCROLLABLE)}},{key:"handleInteraction",value:function(t){var e="click"===t.type,n="Enter"===t.key||13===t.keyCode;if(e&&this.adapter_.eventTargetMatches(t.target,s.c.SCRIM_SELECTOR)&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else if(e||"Space"===t.key||32===t.keyCode||n){var r=this.adapter_.getActionFromEvent(t);r?this.close(r):n&&!this.adapter_.eventTargetMatches(t.target,s.c.SUPPRESS_DEFAULT_PRESS_SELECTOR)&&this.adapter_.clickDefaultButton()}}},{key:"handleDocumentKeydown",value:function(t){"Escape"!==t.key&&27!==t.keyCode||""===this.escapeKeyAction_||this.close(this.escapeKeyAction_)}},{key:"handleAnimationTimerEnd_",value:function(){this.animationTimer_=0,this.adapter_.removeClass(s.a.OPENING),this.adapter_.removeClass(s.a.CLOSING)}},{key:"runNextAnimationFrame_",value:function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})}}]),e}(a.MDCFoundation);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:s.a)(t,{initialFocus:arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,escapeDeactivates:!1,clickOutsideDeactivates:!0})}function i(t){return t.scrollHeight>t.offsetHeight}function o(t){var e=new Set;return[].forEach.call(t,function(t){return e.add(t.offsetTop)}),e.size>1}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"createFocusTrapInstance",function(){return r}),n.d(e,"isScrollable",function(){return i}),n.d(e,"areTopsMisaligned",function(){return o});var a=n(35),s=n.n(a)},function(t,e){function n(t){function e(r,i){if(r===t.documentElement)return!1;for(var o=0,a=n.length;o0&&void 0!==arguments[0]?arguments[0]:_.a,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new c.MDCList(t)},n=this.root_.querySelector("."+l.a.cssClasses.ROOT);n&&(this.list_=e(n),this.list_.wrapFocus=!0),this.focusTrapFactory_=t}},{key:"initialSyncWithDOM",value:function(){var t=this,e=s.a.cssClasses.MODAL;if(this.root_.classList.contains(e)){var n=s.a.strings.SCRIM_SELECTOR;this.scrim_=this.root_.parentElement.querySelector(n),this.handleScrimClick_=function(){return t.foundation_.handleScrimClick()},this.scrim_.addEventListener("click",this.handleScrimClick_),this.focusTrap_=d.createFocusTrapInstance(this.root_,this.focusTrapFactory_)}this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleTransitionEnd_=function(e){return t.foundation_.handleTransitionEnd(e)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener("transitionend",this.handleTransitionEnd_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener("transitionend",this.handleTransitionEnd_),this.list_&&this.list_.destroy();var t=s.a.cssClasses.MODAL;this.root_.classList.contains(t)&&(this.scrim_.removeEventListener("click",this.handleScrimClick_),this.open=!1)}},{key:"getDefaultFoundation",value:function(){var t=this,e=p({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},elementHasClass:function(t,e){return t.classList.contains(e)},saveFocus:function(){t.previousFocus_=document.activeElement},restoreFocus:function(){var e=t.previousFocus_&&t.previousFocus_.focus;t.root_.contains(document.activeElement)&&e&&t.previousFocus_.focus()},focusActiveNavigationItem:function(){var e=t.root_.querySelector("."+l.a.cssClasses.LIST_ITEM_ACTIVATED_CLASS);e&&e.focus()},notifyClose:function(){return t.emit(f.b.CLOSE_EVENT,{},!0)},notifyOpen:function(){return t.emit(f.b.OPEN_EVENT,{},!0)},trapFocus:function(){return t.focusTrap_.activate()},releaseFocus:function(){return t.focusTrap_.deactivate()}}),n=s.a.cssClasses,r=n.DISMISSIBLE,i=n.MODAL;if(this.root_.classList.contains(r))return new s.a(e);if(this.root_.classList.contains(i))return new u.a(e);throw new Error("MDCDrawer: Failed to instantiate component. Supported variants are "+r+" and "+i+".")}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=(n(15),n(36)),s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:o.a)(t,{clickOutsideDeactivates:!0,initialFocus:!1,escapeDeactivates:!1,returnFocusOnDeactivate:!1})}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"createFocusTrapInstance",function(){return r});var i=n(40),o=n.n(i)},function(t,e){function n(t,e){e=e||{};var n=t.ownerDocument||t,i=[],o=[],a=new y(n),c=t.querySelectorAll(g);e.includeContainer&&E.call(t,g)&&(c=Array.prototype.slice.apply(c),c.unshift(t));var l,f,d;for(l=0;l label"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCGridList",function(){return c});var a=n(3),s=n(94);n.d(e,"MDCGridListFoundation",function(){return s.a});var u=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:!this.isOn();t?this.adapter_.addClass(s.a.ICON_BUTTON_ON):this.adapter_.removeClass(s.a.ICON_BUTTON_ON),this.adapter_.setAttr(s.b.ARIA_PRESSED,""+t)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:!this.on_;this.on_=t;var n=e.strings,r=n.ARIA_LABEL,i=n.ARIA_PRESSED;this.on_?this.adapter_.setAttr(i,"true"):this.adapter_.setAttr(i,"false");var o=this.on_?this.toggleOffData_:this.toggleOnData_,a=o.cssClass;a&&this.adapter_.removeClass(a);var s=this.on_?this.toggleOnData_:this.toggleOffData_,u=s.content,c=s.label,l=s.cssClass;l&&this.adapter_.addClass(l),u&&this.adapter_.setText(u),c&&this.adapter_.setAttr(r,c)}},{key:"parseJsonDataAttr_",value:function(t){var e=this.adapter_.getAttr(t);return e?JSON.parse(e):{}}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(t){this.disabled_=t;var n=e.cssClasses.DISABLED,r=e.strings.ARIA_DISABLED;this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setTabIndex(-1),this.adapter_.setAttr(r,"true"),this.adapter_.addClass(n)):(this.adapter_.setTabIndex(this.savedTabIndex_),this.adapter_.rmAttr(r),this.adapter_.removeClass(n))}},{key:"isKeyboardActivated",value:function(){return this.isHandlingKeydown_}}]),e}(s.a),d=function t(){r(this,t)};d.prototype.label,d.prototype.content,d.prototype.cssClass,e.a=f},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n=0&&(this.adapter_.removeAttributeFromElementAtIndex(n,s.b.ARIA_SELECTED_ATTR),this.adapter_.removeClassFromElementAtIndex(n,s.a.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(e,s.a.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(e,s.b.ARIA_SELECTED_ATTR,"true")}},{key:"getSelectionGroup_",value:function(t){for(var e=this.adapter_.getParentElement(t),n=this.adapter_.elementContainsClass(e,s.a.MENU_SELECTION_GROUP);!n&&!this.adapter_.elementContainsClass(e,c.a.cssClasses.ROOT);)e=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(e,s.a.MENU_SELECTION_GROUP);return n?e:null}},{key:"getListItem_",value:function(t){for(var e=this.adapter_.elementContainsClass(t,c.a.cssClasses.LIST_ITEM_CLASS);!e;){if(!(t=this.adapter_.getParentElement(t)))return null;e=this.adapter_.elementContainsClass(t,c.a.cssClasses.LIST_ITEM_CLASS)}return t}},{key:"preventDefaultEvent_",value:function(t){var e=t.target,n=(""+e.tagName).toLowerCase();-1===d.indexOf(n)&&t.preventDefault()}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];if(void 0===i||e){var n=t.document.createElement("div"),r="transform"in n.style?"transform":"webkitTransform";i=r}return i}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"getTransformPropertyName",function(){return r});/** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var i=void 0},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(46),n(47)),u=Object.assign||function(t){for(var e=1;e0&&(t+=s.b.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)}},{key:"closeNotch",value:function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.setNotchWidthProperty(0)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCRadio",function(){return d});var a=n(1),s=(n(4),n(114)),u=n(2);n.d(e,"MDCRadioFoundation",function(){return s.a});var c=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:function(t){return new s.MDCFloatingLabel(t)},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new u.MDCLineRipple(t)},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return new f.MDCNotchedOutline(t)},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(t){return new c.MDCMenu(t)},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return new _.a(t)},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(t){return new p.a(t)};this.nativeControl_=this.root_.querySelector(h.c.NATIVE_CONTROL_SELECTOR),this.selectedText_=this.root_.querySelector(h.c.SELECTED_TEXT_SELECTOR),this.selectedText_&&this.enhancedSelectSetup_(r);var a=this.root_.querySelector(h.c.LABEL_SELECTOR);a&&(this.label_=t(a));var l=this.root_.querySelector(h.c.LINE_RIPPLE_SELECTOR);l&&(this.lineRipple_=e(l));var d=this.root_.querySelector(h.c.OUTLINE_SELECTOR);d&&(this.outline_=n(d));var v=this.root_.querySelector(h.c.LEADING_ICON_SELECTOR);v&&(this.root_.classList.add(h.a.WITH_LEADING_ICON),this.leadingIcon_=i(v),this.menuElement_&&this.menuElement_.classList.add(h.a.WITH_LEADING_ICON));var y=this.nativeControl_?this.nativeControl_:this.selectedText_;if(y.hasAttribute(h.c.ARIA_CONTROLS)){var b=document.getElementById(y.getAttribute(h.c.ARIA_CONTROLS));b&&(this.helperText_=o(b))}this.root_.classList.contains(h.a.OUTLINED)||(this.ripple=this.initRipple_()),this.initialSyncRequiredState_(),this.addMutationObserverForRequired_()}},{key:"enhancedSelectSetup_",value:function(t){var e=this.root_.classList.contains(h.a.DISABLED);this.selectedText_.setAttribute("tabindex",e?"-1":"0"),this.hiddenInput_=this.root_.querySelector(h.c.HIDDEN_INPUT_SELECTOR),this.menuElement_=this.root_.querySelector(h.c.MENU_SELECTOR),this.menu_=t(this.menuElement_),this.menu_.hoistMenuToBody(),this.menu_.setAnchorElement(this.root_),this.menu_.setAnchorCorner(v.a.BOTTOM_START),this.menu_.wrapFocus=!1}},{key:"initRipple_",value:function(){var t=this.nativeControl_?this.nativeControl_:this.selectedText_,e=b(l.MDCRipple.createAdapter(this),{registerInteractionHandler:function(e,n){return t.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.removeEventListener(e,n)}}),n=new l.MDCRippleFoundation(e);return new l.MDCRipple(this.root_,n)}},{key:"initialSyncWithDOM",value:function(){var t=this;this.handleChange_=function(){return t.foundation_.handleChange(!0)},this.handleFocus_=function(){return t.foundation_.handleFocus()},this.handleBlur_=function(){return t.foundation_.handleBlur()},this.handleClick_=function(e){t.selectedText_&&t.selectedText_.focus(),t.foundation_.handleClick(t.getNormalizedXCoordinate_(e))},this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleMenuSelected_=function(e){return t.selectedIndex=e.detail.index},this.handleMenuOpened_=function(){t.selectedIndex>=0&&t.menu_.items[t.selectedIndex].focus()},this.handleMenuClosed_=function(){t.menuOpened_=!1,t.selectedText_.removeAttribute("aria-expanded"),document.activeElement!==t.selectedText_&&t.foundation_.handleBlur()};var e=this.nativeControl_?this.nativeControl_:this.selectedText_;if(e.addEventListener("change",this.handleChange_),e.addEventListener("focus",this.handleFocus_),e.addEventListener("blur",this.handleBlur_),["mousedown","touchstart"].forEach(function(n){e.addEventListener(n,t.handleClick_)}),this.menuElement_)if(this.selectedText_.addEventListener("keydown",this.handleKeydown_),this.menu_.listen(v.e.CLOSED_EVENT,this.handleMenuClosed_),this.menu_.listen(v.e.OPENED_EVENT,this.handleMenuOpened_),this.menu_.listen(y.b.SELECTED_EVENT,this.handleMenuSelected_),this.hiddenInput_&&this.hiddenInput_.value){var n=this.getEnhancedSelectAdapterMethods_();n.setValue(this.hiddenInput_.value)}else if(this.menuElement_.querySelector(h.c.SELECTED_ITEM_SELECTOR)){var r=this.getEnhancedSelectAdapterMethods_();r.setValue(r.getValue())}this.foundation_.handleChange(!1),(this.root_.classList.contains(h.a.DISABLED)||this.nativeControl_&&this.nativeControl_.disabled)&&(this.disabled=!0)}},{key:"destroy",value:function(){var t=this,n=this.nativeControl_?this.nativeControl_:this.selectedText_;n.removeEventListener("change",this.handleChange_),n.removeEventListener("focus",this.handleFocus_),n.removeEventListener("blur",this.handleBlur_),n.removeEventListener("keydown",this.handleKeydown_),["mousedown","touchstart"].forEach(function(e){n.removeEventListener(e,t.handleClick_)}),this.menu_&&(this.menu_.unlisten(v.e.CLOSED_EVENT,this.handleMenuClosed_),this.menu_.unlisten(v.e.OPENED_EVENT,this.handleMenuOpened_),this.menu_.unlisten(y.b.SELECTED_EVENT,this.handleMenuSelected_),this.menu_.destroy()),this.ripple&&this.ripple.destroy(),this.outline_&&this.outline_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.helperText_&&this.helperText_.destroy(),this.validationObserver_&&this.validationObserver_.disconnect(),E(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"getDefaultFoundation",value:function(){return new d.a(b(this.nativeControl_?this.getNativeSelectAdapterMethods_():this.getEnhancedSelectAdapterMethods_(),this.getCommonAdapterMethods_(),this.getOutlineAdapterMethods_(),this.getLabelAdapterMethods_()),this.getFoundationMap_())}},{key:"getNativeSelectAdapterMethods_",value:function(){var t=this;return{getValue:function(){return t.nativeControl_.value},setValue:function(e){return t.nativeControl_.value=e},openMenu:function(){},closeMenu:function(){},isMenuOpen:function(){return!1},setSelectedIndex:function(e){t.nativeControl_.selectedIndex=e},setDisabled:function(e){return t.nativeControl_.disabled=e},setValid:function(e){e?t.root_.classList.remove(h.a.INVALID):t.root_.classList.add(h.a.INVALID)},checkValidity:function(){return t.nativeControl_.checkValidity()}}}},{key:"getEnhancedSelectAdapterMethods_",value:function(){var t=this;return{getValue:function(){var e=t.menuElement_.querySelector(h.c.SELECTED_ITEM_SELECTOR);return e&&e.hasAttribute(h.c.ENHANCED_VALUE_ATTR)?e.getAttribute(h.c.ENHANCED_VALUE_ATTR):""},setValue:function(e){var n=t.menuElement_.querySelector("["+h.c.ENHANCED_VALUE_ATTR+'="'+e+'"]');t.setEnhancedSelectedIndex_(n?t.menu_.items.indexOf(n):-1)},openMenu:function(){t.menu_&&!t.menu_.open&&(t.menu_.open=!0,t.menuOpened_=!0,t.selectedText_.setAttribute("aria-expanded","true"))},closeMenu:function(){t.menu_&&t.menu_.open&&(t.menu_.open=!1)},isMenuOpen:function(){return t.menu_&&t.menuOpened_},setSelectedIndex:function(e){t.setEnhancedSelectedIndex_(e)},setDisabled:function(e){t.selectedText_.setAttribute("tabindex",e?"-1":"0"),t.selectedText_.setAttribute("aria-disabled",e.toString()),t.hiddenInput_&&(t.hiddenInput_.disabled=e)},checkValidity:function(){var e=t.root_.classList;return!(e.contains(h.a.REQUIRED)&&!e.contains(h.a.DISABLED))||-1!==t.selectedIndex&&(0!==t.selectedIndex||t.value)},setValid:function(e){t.selectedText_.setAttribute("aria-invalid",(!e).toString()),e?t.root_.classList.remove(h.a.INVALID):t.root_.classList.add(h.a.INVALID)}}}},{key:"getCommonAdapterMethods_",value:function(){var t=this;return{addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},setRippleCenter:function(e){return t.lineRipple_&&t.lineRipple_.setRippleCenter(e)},activateBottomLine:function(){return t.lineRipple_&&t.lineRipple_.activate()},deactivateBottomLine:function(){return t.lineRipple_&&t.lineRipple_.deactivate()},notifyChange:function(e){var n=t.selectedIndex;t.emit(h.c.CHANGE_EVENT,{value:e,index:n},!0)}}}},{key:"getOutlineAdapterMethods_",value:function(){var t=this;return{hasOutline:function(){return!!t.outline_},notchOutline:function(e){t.outline_&&t.outline_.notch(e)},closeOutline:function(){t.outline_&&t.outline_.closeNotch()}}}},{key:"getLabelAdapterMethods_",value:function(){var t=this;return{floatLabel:function(e){t.label_&&t.label_.float(e)},getLabelWidth:function(){return t.label_?t.label_.getWidth():0}}}},{key:"getNormalizedXCoordinate_",value:function(t){var e=t.target.getBoundingClientRect();return t.clientX-e.left}},{key:"getFoundationMap_",value:function(){return{leadingIcon:this.leadingIcon_?this.leadingIcon_.foundation:void 0,helperText:this.helperText_?this.helperText_.foundation:void 0}}},{key:"setEnhancedSelectedIndex_",value:function(t){var e=this.menu_.items[t];this.selectedText_.textContent=e?e.textContent.trim():"";var n=this.menuElement_.querySelector(h.c.SELECTED_ITEM_SELECTOR);n&&(n.classList.remove(h.a.SELECTED_ITEM_CLASS),n.removeAttribute(h.c.ARIA_SELECTED_ATTR)),e&&(e.classList.add(h.a.SELECTED_ITEM_CLASS),e.setAttribute(h.c.ARIA_SELECTED_ATTR,"true")),this.hiddenInput_&&(this.hiddenInput_.value=e?e.getAttribute(h.c.ENHANCED_VALUE_ATTR)||"":""),this.layout()}},{key:"initialSyncRequiredState_",value:function(){var t=this.nativeControl_?this.nativeControl_:this.selectedText_;(t.required||"true"===t.getAttribute("aria-required")||this.root_.classList.contains(h.a.REQUIRED))&&(this.nativeControl_?this.nativeControl_.required=!0:this.selectedText_.setAttribute("aria-required","true"),this.root_.classList.add(h.a.REQUIRED))}},{key:"addMutationObserverForRequired_",value:function(){var t=this,e=function(e){e.some(function(e){if(m.indexOf(e)>-1)return t.selectedText_?"true"===t.selectedText_.getAttribute("aria-required")?t.root_.classList.add(h.a.REQUIRED):t.root_.classList.remove(h.a.REQUIRED):t.nativeControl_.required?t.root_.classList.add(h.a.REQUIRED):t.root_.classList.remove(h.a.REQUIRED),!0})},n=function(t){return t.map(function(t){return t.attributeName})},r=new MutationObserver(function(t){return e(n(t))}),i=this.nativeControl_?this.nativeControl_:this.selectedText_;r.observe(i,{attributes:!0}),this.validationObserver_=r}},{key:"value",get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)}},{key:"selectedIndex",get:function(){var t=void 0;if(this.menuElement_){var e=this.menuElement_.querySelector(h.c.SELECTED_ITEM_SELECTOR);t=this.menu_.items.indexOf(e)}else t=this.nativeControl_.selectedIndex;return t},set:function(t){this.foundation_.setSelectedIndex(t)}},{key:"disabled",get:function(){return this.root_.classList.contains(h.a.DISABLED)||!!this.nativeControl_&&this.nativeControl_.disabled},set:function(t){this.foundation_.setDisabled(t)}},{key:"leadingIconAriaLabel",set:function(t){this.foundation_.setLeadingIconAriaLabel(t)}},{key:"leadingIconContent",set:function(t){this.foundation_.setLeadingIconContent(t)}},{key:"helperTextContent",set:function(t){this.foundation_.setHelperTextContent(t)}},{key:"valid",set:function(t){this.foundation_.setValid(t)},get:function(){return this.foundation_.isValid()}},{key:"required",set:function(t){this.nativeControl_?this.nativeControl_.required=t:t?this.selectedText_.setAttribute("aria-required",t.toString()):this.selectedText_.removeAttribute("aria-required")},get:function(){return this.nativeControl_?this.nativeControl_.required:"true"===this.selectedText_.getAttribute("aria-required")}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(3),s=(n(48),n(23),n(24),n(51)),u=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t)));return o.leadingIcon_=n.leadingIcon,o.helperText_=n.helperText,o}return o(e,t),c(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"numbers",get:function(){return s.b}},{key:"strings",get:function(){return s.c}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},setValue:function(){},getValue:function(){},floatLabel:function(){},getLabelWidth:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},openMenu:function(){},closeMenu:function(){},isMenuOpen:function(){},setSelectedIndex:function(){},setDisabled:function(){},setRippleCenter:function(){},notifyChange:function(){},checkValidity:function(){},setValid:function(){}}}}]),c(e,[{key:"setSelectedIndex",value:function(t){this.adapter_.setSelectedIndex(t),this.adapter_.closeMenu();this.handleChange(!0)}},{key:"setValue",value:function(t){this.adapter_.setValue(t);this.handleChange(!0)}},{key:"getValue",value:function(){return this.adapter_.getValue()}},{key:"setDisabled",value:function(t){t?this.adapter_.addClass(s.a.DISABLED):this.adapter_.removeClass(s.a.DISABLED),this.adapter_.setDisabled(t),this.adapter_.closeMenu(),this.leadingIcon_&&this.leadingIcon_.setDisabled(t)}},{key:"setHelperTextContent",value:function(t){this.helperText_&&this.helperText_.setContent(t)}},{key:"layout",value:function(){var t=this.getValue().length>0;this.notchOutline(t)}},{key:"handleChange",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.getValue(),n=e.length>0,r=this.adapter_.hasClass(s.a.REQUIRED);this.notchOutline(n),this.adapter_.hasClass(s.a.FOCUSED)||this.adapter_.floatLabel(n),t&&(this.adapter_.notifyChange(e),r&&(this.setValid(this.isValid()),this.helperText_&&this.helperText_.setValidity(this.isValid())))}},{key:"handleFocus",value:function(){this.adapter_.addClass(s.a.FOCUSED),this.adapter_.floatLabel(!0),this.notchOutline(!0),this.adapter_.activateBottomLine(),this.helperText_&&this.helperText_.showToScreenReader()}},{key:"handleBlur",value:function(){if(!this.adapter_.isMenuOpen()){this.adapter_.removeClass(s.a.FOCUSED),this.handleChange(!1),this.adapter_.deactivateBottomLine();this.adapter_.hasClass(s.a.REQUIRED)&&(this.setValid(this.isValid()),this.helperText_&&this.helperText_.setValidity(this.isValid()))}}},{key:"handleClick",value:function(t){this.adapter_.isMenuOpen()||(this.adapter_.setRippleCenter(t),this.adapter_.openMenu())}},{key:"handleKeydown",value:function(t){if(!this.adapter_.isMenuOpen()){var e="Enter"===t.key||13===t.keyCode,n="Space"===t.key||32===t.keyCode,r="ArrowUp"===t.key||38===t.keyCode,i="ArrowDown"===t.key||40===t.keyCode;this.adapter_.hasClass(s.a.FOCUSED)&&(e||n||r||i)&&(this.adapter_.openMenu(),t.preventDefault())}}},{key:"notchOutline",value:function(t){if(this.adapter_.hasOutline()){var e=this.adapter_.hasClass(s.a.FOCUSED);if(t){var n=s.b.LABEL_SCALE,r=this.adapter_.getLabelWidth()*n;this.adapter_.notchOutline(r)}else e||this.adapter_.closeOutline()}}},{key:"setLeadingIconAriaLabel",value:function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)}},{key:"setLeadingIconContent",value:function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)}},{key:"setValid",value:function(t){this.adapter_.setValid(t)}},{key:"isValid",value:function(){return this.adapter_.checkValidity()}}]),e}(a.MDCFoundation);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(49),n(120)),u=Object.assign||function(t){for(var e=1;e=this.max?(this.max=n,this.min=e):(this.min=e,this.max=n),this.step=parseFloat(this.root_.getAttribute(s.c.STEP_DATA_ATTR))||this.step,this.value=t||this.value,this.disabled=this.root_.hasAttribute(s.c.ARIA_DISABLED)&&"false"!==this.root_.getAttribute(s.c.ARIA_DISABLED),this.foundation_.setupTrackMarker()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"stepUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value+=t}},{key:"stepDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value-=t}},{key:"value",get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)}},{key:"min",get:function(){return this.foundation_.getMin()},set:function(t){this.foundation_.setMin(t)}},{key:"max",get:function(){return this.foundation_.getMax()},set:function(t){this.foundation_.setMax(t)}},{key:"step",get:function(){return this.foundation_.getStep()},set:function(t){this.foundation_.setStep(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(52),s=(n(53),n(9)),u=n(0),c=Object.assign||function(t){for(var e=1;ethis.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(a.c.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()}},{key:"getStep",value:function(){return this.step_}},{key:"setStep",value:function(t){if(t<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof t||t<1)&&(t=1),this.step_=t,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(t){this.disabled_=t,this.toggleClass_(a.a.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setAttribute(a.c.ARIA_DISABLED,"true"),this.adapter_.removeAttribute("tabindex")):(this.adapter_.removeAttribute(a.c.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter_.setAttribute("tabindex",String(this.savedTabIndex_)))}},{key:"handleDown_",value:function(t){var e=this;if(!this.disabled_){this.preventFocusState_=!0,this.setInTransit_(!this.handlingThumbTargetEvt_),this.handlingThumbTargetEvt_=!1,this.setActive_(!0);var n=function(t){e.handleMove_(t)},r=function r(){e.handleUp_(),e.adapter_.deregisterBodyInteractionHandler(d[t.type],n),_.forEach(function(t){return e.adapter_.deregisterBodyInteractionHandler(t,r)})};this.adapter_.registerBodyInteractionHandler(d[t.type],n),_.forEach(function(t){return e.adapter_.registerBodyInteractionHandler(t,r)}),this.setValueFromEvt_(t)}}},{key:"handleMove_",value:function(t){t.preventDefault(),this.setValueFromEvt_(t)}},{key:"handleUp_",value:function(){this.setActive_(!1),this.adapter_.notifyChange()}},{key:"getPageX_",value:function(t){return t.targetTouches&&t.targetTouches.length>0?t.targetTouches[0].pageX:t.pageX}},{key:"setValueFromEvt_",value:function(t){var e=this.getPageX_(t),n=this.computeValueFromPageX_(e);this.setValue_(n,!0)}},{key:"computeValueFromPageX_",value:function(t){var e=this.max_,n=this.min_,r=t-this.rect_.left,i=r/this.rect_.width;return this.adapter_.isRTL()&&(i=1-i),n+i*(e-n)}},{key:"handleKeydown_",value:function(t){var e=this.getKeyId_(t),n=this.getValueForKeyId_(e);isNaN(n)||(t.preventDefault(),this.adapter_.addClass(a.a.FOCUS),this.setValue_(n,!0),this.adapter_.notifyChange())}},{key:"getKeyId_",value:function(t){return t.key===f.ARROW_LEFT||37===t.keyCode?f.ARROW_LEFT:t.key===f.ARROW_RIGHT||39===t.keyCode?f.ARROW_RIGHT:t.key===f.ARROW_UP||38===t.keyCode?f.ARROW_UP:t.key===f.ARROW_DOWN||40===t.keyCode?f.ARROW_DOWN:t.key===f.HOME||36===t.keyCode?f.HOME:t.key===f.END||35===t.keyCode?f.END:t.key===f.PAGE_UP||33===t.keyCode?f.PAGE_UP:t.key===f.PAGE_DOWN||34===t.keyCode?f.PAGE_DOWN:""}},{key:"getValueForKeyId_",value:function(t){var e=this.max_,n=this.min_,r=this.step_,i=r||(e-n)/100;switch(this.adapter_.isRTL()&&(t===f.ARROW_LEFT||t===f.ARROW_RIGHT)&&(i=-i),t){case f.ARROW_LEFT:case f.ARROW_DOWN:return this.value_-i;case f.ARROW_RIGHT:case f.ARROW_UP:return this.value_+i;case f.HOME:return this.min_;case f.END:return this.max_;case f.PAGE_UP:return this.value_+i*a.b.PAGE_FACTOR;case f.PAGE_DOWN:return this.value_-i*a.b.PAGE_FACTOR;default:return NaN}}},{key:"handleFocus_",value:function(){this.preventFocusState_||this.adapter_.addClass(a.a.FOCUS)}},{key:"handleBlur_",value:function(){this.preventFocusState_=!1,this.adapter_.removeClass(a.a.FOCUS)}},{key:"setValue_",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t!==this.value_||n){var r=this.min_,i=this.max_,o=t===r||t===i;this.step_&&!o&&(t=this.quantize_(t)),ti&&(t=i),this.value_=t,this.adapter_.setAttribute(a.c.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),e&&(this.adapter_.notifyInput(),this.isDiscrete_&&this.adapter_.setMarkerValue(t))}}},{key:"quantize_",value:function(t){return Math.round(t/this.step_)*this.step_}},{key:"updateUIForCurrentValue_",value:function(){var t=this,e=this.max_,n=this.min_,r=this.value_,i=(r-n)/(e-n),o=i*this.rect_.width;this.adapter_.isRTL()&&(o=this.rect_.width-o);var a=Object(s.b)(window,"transform"),u=Object(s.a)(window,"transitionend");if(this.inTransit_){var c=function e(){t.setInTransit_(!1),t.adapter_.deregisterThumbContainerInteractionHandler(u,e)};this.adapter_.registerThumbContainerInteractionHandler(u,c)}this.updateUIFrame_=requestAnimationFrame(function(){t.adapter_.setThumbContainerStyleProperty(a,"translateX("+o+"px) translateX(-50%)"),t.adapter_.setTrackStyleProperty(a,"scaleX("+i+")")})}},{key:"setActive_",value:function(t){this.active_=t,this.toggleClass_(a.a.ACTIVE,this.active_)}},{key:"setInTransit_",value:function(t){this.inTransit_=t,this.toggleClass_(a.a.IN_TRANSIT,this.inTransit_)}},{key:"toggleClass_",value:function(t,e){e?this.adapter_.addClass(t):this.adapter_.removeClass(t)}}]),e}(u.a);e.a=p},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSnackbar",function(){return l});var a=n(3),s=n(126),u=n(9);n.d(e,"MDCSnackbarFoundation",function(){return s.a});var c=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(t){return new s.MDCTab(t)},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new u.MDCTabScroller(t)};this.tabFactory_=e,this.tabScrollerFactory_=n,this.tabList_=this.getTabElements_().map(function(e){return t.tabFactory_(e)});var r=this.root_.querySelector(c.a.strings.TAB_SCROLLER_SELECTOR);r&&(this.tabScroller_=this.tabScrollerFactory_(r))}},{key:"initialSyncWithDOM",value:function(){var t=this;this.handleTabInteraction_=function(e){return t.foundation_.handleTabInteraction(e)},this.handleKeyDown_=function(e){return t.foundation_.handleKeyDown(e)},this.root_.addEventListener(s.MDCTabFoundation.strings.INTERACTED_EVENT,this.handleTabInteraction_),this.root_.addEventListener("keydown",this.handleKeyDown_);for(var e=0;e1&&void 0!==arguments[1])||arguments[1];if(e&&void 0!==a)return a;var n=t.createElement("div");n.classList.add(o.a.SCROLL_TEST),t.body.appendChild(n);var r=n.offsetHeight-n.clientHeight;return t.body.removeChild(n),e&&(a=r),r}function i(t){return["msMatchesSelector","matches"].filter(function(e){return e in t}).pop()}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"computeHorizontalScrollbarHeight",function(){return r}),n.d(e,"getMatchesProperty",function(){return i});var o=n(57),a=void 0},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=n(144),u=(n(58),n(11),Object.assign||function(t){for(var e=1;er&&(u=0),u}},{key:"calculateScrollIncrement_",value:function(t,e,n,r){var i=this.adapter_.getTabDimensionsAtIndex(e),o=i.contentLeft-n-r,a=i.contentRight-n,u=a-s.a.EXTRA_SCROLL_AMOUNT,c=o+s.a.EXTRA_SCROLL_AMOUNT;return et?Math.max(c,0):Math.min(l,0)}},{key:"findAdjacentTabIndexClosestToEdge_",value:function(t,e,n,r){var i=e.rootLeft-n,o=e.rootRight-n-r,a=i+o,s=i<0||a<0,u=o>0||a>0;return s?t-1:u?t+1:-1}},{key:"findAdjacentTabIndexClosestToEdgeRTL_",value:function(t,e,n,r,i){var o=i-e.rootLeft-r-n,a=i-e.rootRight-n,s=o+a,u=o>0||s>0,c=a<0||s<0;return u?t+1:c?t-1:-1}},{key:"getKeyFromEvent_",value:function(t){return l.has(t.key)?t.key:f.get(t.keyCode)}},{key:"isActivationKey_",value:function(t){return t===s.b.SPACE_KEY||t===s.b.ENTER_KEY}},{key:"indexIsInRange_",value:function(t){return t>=0&&t0&&void 0!==arguments[0]?arguments[0]:function(t,e){return new s.MDCRipple(t,e)},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return new f.MDCLineRipple(t)},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return new d.a(t)},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(t){return new h.a(t)},i=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return new _.MDCFloatingLabel(t)},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(t){return new p.MDCNotchedOutline(t)};this.input_=this.root_.querySelector(c.e.INPUT_SELECTOR);var l=this.root_.querySelector(c.e.LABEL_SELECTOR);l&&(this.label_=o(l));var y=this.root_.querySelector(c.e.LINE_RIPPLE_SELECTOR);y&&(this.lineRipple_=e(y));var b=this.root_.querySelector(c.e.OUTLINE_SELECTOR);if(b&&(this.outline_=a(b)),this.input_.hasAttribute(c.e.ARIA_CONTROLS)){var g=document.getElementById(this.input_.getAttribute(c.e.ARIA_CONTROLS));g&&(this.helperText_=n(g))}var E=this.root_.querySelectorAll(c.e.ICON_SELECTOR);if(E.length>0&&(E.length>1?(this.leadingIcon_=r(E[0]),this.trailingIcon_=r(E[1])):this.root_.classList.contains(c.c.WITH_LEADING_ICON)?this.leadingIcon_=r(E[0]):this.trailingIcon_=r(E[0])),this.ripple=null,!this.root_.classList.contains(c.c.TEXTAREA)&&!this.root_.classList.contains(c.c.OUTLINED)){var m=Object(u.getMatchesProperty)(HTMLElement.prototype),C=v(s.MDCRipple.createAdapter(this),{isSurfaceActive:function(){return i.input_[m](":active")},registerInteractionHandler:function(t,e){return i.input_.addEventListener(t,e)},deregisterInteractionHandler:function(t,e){return i.input_.removeEventListener(t,e)}}),O=new s.MDCRippleFoundation(C);this.ripple=t(this.root_,O)}}},{key:"destroy",value:function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),b(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"initialSyncWithDom",value:function(){this.disabled=this.input_.disabled}},{key:"focus",value:function(){this.input_.focus()}},{key:"layout",value:function(){var t=this.foundation_.shouldFloat;this.foundation_.notchOutline(t)}},{key:"getDefaultFoundation",value:function(){var t=this;return new l.a(v({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},registerTextFieldInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterTextFieldInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)},registerValidationAttributeChangeHandler:function(e){var n=function(t){return t.map(function(t){return t.attributeName})},r=new MutationObserver(function(t){return e(n(t))}),i=t.root_.querySelector(c.e.INPUT_SELECTOR),o={attributes:!0};return r.observe(i,o),r},deregisterValidationAttributeChangeHandler:function(t){return t.disconnect()},isFocused:function(){return document.activeElement===t.root_.querySelector(c.e.INPUT_SELECTOR)}},this.getInputAdapterMethods_(),this.getLabelAdapterMethods_(),this.getLineRippleAdapterMethods_(),this.getOutlineAdapterMethods_()),this.getFoundationMap_())}},{key:"getLabelAdapterMethods_",value:function(){var t=this;return{shakeLabel:function(e){return t.label_.shake(e)},floatLabel:function(e){return t.label_.float(e)},hasLabel:function(){return!!t.label_},getLabelWidth:function(){return t.label_?t.label_.getWidth():0}}}},{key:"getLineRippleAdapterMethods_",value:function(){var t=this;return{activateLineRipple:function(){t.lineRipple_&&t.lineRipple_.activate()},deactivateLineRipple:function(){t.lineRipple_&&t.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(e){t.lineRipple_&&t.lineRipple_.setRippleCenter(e)}}}},{key:"getOutlineAdapterMethods_",value:function(){var t=this;return{notchOutline:function(e){return t.outline_.notch(e)},closeOutline:function(){return t.outline_.closeNotch()},hasOutline:function(){return!!t.outline_}}}},{key:"getInputAdapterMethods_",value:function(){var t=this;return{registerInputInteractionHandler:function(e,n){return t.input_.addEventListener(e,n)},deregisterInputInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n)},getNativeInput:function(){return t.input_}}}},{key:"getFoundationMap_",value:function(){return{helperText:this.helperText_?this.helperText_.foundation:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundation:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundation:void 0}}},{key:"value",get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}},{key:"valid",get:function(){return this.foundation_.isValid()},set:function(t){this.foundation_.setValid(t)}},{key:"required",get:function(){return this.input_.required},set:function(t){this.input_.required=t}},{key:"pattern",get:function(){return this.input_.pattern},set:function(t){this.input_.pattern=t}},{key:"minLength",get:function(){return this.input_.minLength},set:function(t){this.input_.minLength=t}},{key:"maxLength",get:function(){return this.input_.maxLength},set:function(t){t<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=t}},{key:"min",get:function(){return this.input_.min},set:function(t){this.input_.min=t}},{key:"max",get:function(){return this.input_.max},set:function(t){this.input_.max=t}},{key:"step",get:function(){return this.input_.step},set:function(t){this.input_.step=t}},{key:"helperTextContent",set:function(t){this.foundation_.setHelperTextContent(t)}},{key:"leadingIconAriaLabel",set:function(t){this.foundation_.setLeadingIconAriaLabel(t)}},{key:"leadingIconContent",set:function(t){this.foundation_.setLeadingIconContent(t)}},{key:"trailingIconAriaLabel",set:function(t){this.foundation_.setTrailingIconAriaLabel(t)}},{key:"trailingIconContent",set:function(t){this.foundation_.setTrailingIconContent(t)}},{key:"useNativeValidation",set:function(t){this.foundation_.setUseNativeValidation(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});/** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var r={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},i={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg"}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});/** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var r={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n(27),n(28),n(60),n(59)),u=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t)));return o.helperText_=n.helperText,o.leadingIcon_=n.leadingIcon,o.trailingIcon_=n.trailingIcon,o.isFocused_=!1,o.receivedUserInput_=!1,o.useCustomValidityChecking_=!1,o.isValid_=!0,o.useNativeValidation_=!0,o.inputFocusHandler_=function(){return o.activateFocus()},o.inputBlurHandler_=function(){return o.deactivateFocus()},o.inputInputHandler_=function(){return o.autoCompleteFocus()},o.setPointerXOffset_=function(t){return o.setTransformOrigin(t)},o.textFieldInteractionHandler_=function(){return o.handleTextFieldInteraction()},o.validationAttributeChangeHandler_=function(t){return o.handleValidationAttributeChange(t)},o.validationObserver_,o}return o(e,t),c(e,[{key:"shouldShake",get:function(){return!this.isValid()&&!this.isFocused_&&!!this.getValue()}},{key:"shouldAlwaysFloat_",get:function(){var t=this.getNativeInput_().type;return s.a.indexOf(t)>=0}},{key:"shouldFloat",get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()}}],[{key:"cssClasses",get:function(){return s.c}},{key:"strings",get:function(){return s.e}},{key:"numbers",get:function(){return s.d}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){},isFocused:function(){},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},hasLabel:function(){},getLabelWidth:function(){},hasOutline:function(){},notchOutline:function(){},closeOutline:function(){}}}}]),c(e,[{key:"init",value:function(){var t=this;this.adapter_.isFocused()?this.inputFocusHandler_():this.adapter_.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter_.floatLabel(!0)),this.adapter_.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.registerInputInteractionHandler("input",this.inputInputHandler_),["mousedown","touchstart"].forEach(function(e){t.adapter_.registerInputInteractionHandler(e,t.setPointerXOffset_)}),["click","keydown"].forEach(function(e){t.adapter_.registerTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)}),this.validationObserver_=this.adapter_.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_)}},{key:"destroy",value:function(){var t=this;this.adapter_.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.deregisterInputInteractionHandler("input",this.inputInputHandler_),["mousedown","touchstart"].forEach(function(e){t.adapter_.deregisterInputInteractionHandler(e,t.setPointerXOffset_)}),["click","keydown"].forEach(function(e){t.adapter_.deregisterTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)}),this.adapter_.deregisterValidationAttributeChangeHandler(this.validationObserver_)}},{key:"handleTextFieldInteraction",value:function(){this.adapter_.getNativeInput().disabled||(this.receivedUserInput_=!0)}},{key:"handleValidationAttributeChange",value:function(t){var e=this;t.some(function(t){if(s.b.indexOf(t)>-1)return e.styleValidity_(!0),!0})}},{key:"notchOutline",value:function(t){if(this.adapter_.hasOutline())if(t){var e=this.adapter_.hasClass(s.c.DENSE),n=e?s.d.DENSE_LABEL_SCALE:s.d.LABEL_SCALE,r=this.adapter_.getLabelWidth()*n;this.adapter_.notchOutline(r)}else this.adapter_.closeOutline()}},{key:"activateFocus",value:function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter_.activateLineRipple(),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.helperText_&&this.helperText_.showToScreenReader()}},{key:"setTransformOrigin",value:function(t){var e=void 0;e=t.touches?t.touches[0]:t;var n=e.target.getBoundingClientRect(),r=e.clientX-n.left;this.adapter_.setLineRippleTransformOrigin(r)}},{key:"autoCompleteFocus",value:function(){this.receivedUserInput_||this.activateFocus()}},{key:"deactivateFocus",value:function(){this.isFocused_=!1,this.adapter_.deactivateLineRipple();var t=this.isValid();this.styleValidity_(t),this.styleFocused_(this.isFocused_),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)}},{key:"getValue",value:function(){return this.getNativeInput_().value}},{key:"setValue",value:function(t){this.getValue()!==t&&(this.getNativeInput_().value=t);var e=this.isValid();this.styleValidity_(e),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake))}},{key:"isValid",value:function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_}},{key:"setValid",value:function(t){this.isValid_=t,this.styleValidity_(t);var e=!t&&!this.isFocused_;this.adapter_.hasLabel()&&this.adapter_.shakeLabel(e)}},{key:"setUseNativeValidation",value:function(t){this.useNativeValidation_=t}},{key:"isDisabled",value:function(){return this.getNativeInput_().disabled}},{key:"setDisabled",value:function(t){this.getNativeInput_().disabled=t,this.styleDisabled_(t)}},{key:"setHelperTextContent",value:function(t){this.helperText_&&this.helperText_.setContent(t)}},{key:"setLeadingIconAriaLabel",value:function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)}},{key:"setLeadingIconContent",value:function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)}},{key:"setTrailingIconAriaLabel",value:function(t){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(t)}},{key:"setTrailingIconContent",value:function(t){this.trailingIcon_&&this.trailingIcon_.setContent(t)}},{key:"isBadInput_",value:function(){return this.getNativeInput_().validity.badInput}},{key:"isNativeInputValid_",value:function(){return this.getNativeInput_().validity.valid}},{key:"styleValidity_",value:function(t){var n=e.cssClasses.INVALID;t?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.helperText_&&this.helperText_.setValidity(t)}},{key:"styleFocused_",value:function(t){var n=e.cssClasses.FOCUSED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"styleDisabled_",value:function(t){var n=e.cssClasses,r=n.DISABLED,i=n.INVALID;t?(this.adapter_.addClass(r),this.adapter_.removeClass(i)):this.adapter_.removeClass(r),this.leadingIcon_&&this.leadingIcon_.setDisabled(t),this.trailingIcon_&&this.trailingIcon_.setDisabled(t)}},{key:"getNativeInput_",value:function(){return this.adapter_.getNativeInput()||{value:"",disabled:!1,validity:{badInput:!1,valid:!0}}}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(1),s=(n(61),n(27));n.d(e,"b",function(){return s.a});var u=Object.assign||function(t){for(var e=1;ethis.calculations_.scrollThreshold}},{key:"initKeyRatio_",value:function(){var t=this.getRowHeight_(),e=this.adapter_.getFirstRowElementOffsetHeight()/t;this.calculations_.toolbarRatio=this.adapter_.getOffsetHeight()/t,this.calculations_.flexibleExpansionRatio=e-1,this.calculations_.maxTranslateYRatio=this.fixedLastrow_?this.calculations_.toolbarRatio-e:0,this.calculations_.scrollThresholdRatio=(this.fixedLastrow_?this.calculations_.toolbarRatio:e)-1}},{key:"getRowHeight_",value:function(){var t=e.numbers.TOOLBAR_MOBILE_BREAKPOINT;return this.adapter_.getViewportWidth()0&&void 0!==arguments[0]?arguments[0]:function(t){return s.MDCRipple.attachTo(t)};this.navIcon_=this.root_.querySelector(u.c.NAVIGATION_ICON_SELECTOR);var e=[].slice.call(this.root_.querySelectorAll(u.c.ACTION_ITEM_SELECTOR));this.navIcon_&&e.push(this.navIcon_),this.iconRipples_=e.map(function(e){var n=t(e);return n.unbounded=!0,n}),this.scrollTarget_=window}},{key:"destroy",value:function(){this.iconRipples_.forEach(function(t){return t.destroy()}),p(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"setScrollTarget",value:function(t){this.foundation_.destroyScrollHandler(),this.scrollTarget_=t,this.foundation_.initScrollHandler()}},{key:"getDefaultFoundation",value:function(){var t=this,e=h({hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setStyle:function(e,n){return t.root_.style.setProperty(e,n)},getTopAppBarHeight:function(){return t.root_.clientHeight},registerNavigationIconInteractionHandler:function(e,n){t.navIcon_&&t.navIcon_.addEventListener(e,n)},deregisterNavigationIconInteractionHandler:function(e,n){t.navIcon_&&t.navIcon_.removeEventListener(e,n)},notifyNavigationIconClicked:function(){t.emit(u.c.NAVIGATION_EVENT,{})},registerScrollHandler:function(e){return t.scrollTarget_.addEventListener("scroll",e)},deregisterScrollHandler:function(e){return t.scrollTarget_.removeEventListener("scroll",e)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getViewportScrollY:function(){return t.scrollTarget_[t.scrollTarget_===window?"pageYOffset":"scrollTop"]},getTotalActionItems:function(){return t.root_.querySelectorAll(u.c.ACTION_ITEM_SELECTOR).length}});return this.root_.classList.contains(u.a.SHORT_CLASS)?new f.a(e):this.root_.classList.contains(u.a.FIXED_CLASS)?new l.a(e):new d.a(e)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(8),s=(n(7),n(13)),u=function(){function t(t,e){for(var n=0;n0&&this.adapter_.addClass(s.a.SHORT_HAS_ACTION_ITEM_CLASS),t||(this.adapter_.registerScrollHandler(this.scrollHandler_),this.shortAppBarScrollHandler_())}},{key:"destroy",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this.adapter_.deregisterScrollHandler(this.scrollHandler_)}},{key:"shortAppBarScrollHandler_",value:function(){this.adapter_.getViewportScrollY()<=0?this.isCollapsed&&(this.adapter_.removeClass(s.a.SHORT_COLLAPSED_CLASS),this.isCollapsed=!1):this.isCollapsed||(this.adapter_.addClass(s.a.SHORT_COLLAPSED_CLASS),this.isCollapsed=!0)}}]),e}(a.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=(n(7),n(13)),s=n(8),u=function(){function t(t,e){for(var n=0;nt,r=e&&n;if(r)this.wasDocked_=!1;else{if(!this.wasDocked_)return this.wasDocked_=!0,!0;if(this.isDockedShowing_!==n)return this.isDockedShowing_=n,!0}return r}},{key:"moveTopAppBar_",value:function(){if(this.checkForUpdate_()){var t=this.currentAppBarOffsetTop_;Math.abs(t)>=this.topAppBarHeight_&&(t=-s.b.MAX_TOP_APP_BAR_HEIGHT),this.adapter_.setStyle("top",t+"px")}}},{key:"topAppBarScrollHandler_",value:function(){var t=Math.max(this.adapter_.getViewportScrollY(),0),e=t-this.lastScrollPosition_;this.lastScrollPosition_=t,this.isCurrentlyBeingResized_||(this.currentAppBarOffsetTop_-=e,this.currentAppBarOffsetTop_>0?this.currentAppBarOffsetTop_=0:Math.abs(this.currentAppBarOffsetTop_)>this.topAppBarHeight_&&(this.currentAppBarOffsetTop_=-this.topAppBarHeight_),this.moveTopAppBar_())}},{key:"topAppBarResizeHandler_",value:function(){var t=this;this.resizeThrottleId_||(this.resizeThrottleId_=setTimeout(function(){t.resizeThrottleId_=l,t.throttledResizeHandler_()},s.b.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)),this.isCurrentlyBeingResized_=!0,this.resizeDebounceId_&&clearTimeout(this.resizeDebounceId_),this.resizeDebounceId_=setTimeout(function(){t.topAppBarScrollHandler_(),t.isCurrentlyBeingResized_=!1,t.resizeDebounceId_=l},s.b.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)}},{key:"throttledResizeHandler_",value:function(){var t=this.adapter_.getTopAppBarHeight();this.topAppBarHeight_!==t&&(this.wasDocked_=!1,this.currentAppBarOffsetTop_-=this.topAppBarHeight_-t,this.topAppBarHeight_=t),this.topAppBarScrollHandler_()}}]),e}(a.a);e.a=f}])}); //# sourceMappingURL=material-components-web.min.js.map