Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/menu

Package Overview
Dependencies
Maintainers
17
Versions
1689
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/menu - npm Package Compare versions

Comparing version 4.0.0-canary.0 to 4.0.0-canary.1

34

CHANGELOG.md

@@ -6,2 +6,36 @@ # Change Log

# [4.0.0-canary.1](https://github.com/material-components/material-components-web/compare/v3.1.1...v4.0.0-canary.1) (2019-09-09)
### Bug Fixes
* **menu:** recompute index before marking selection ([#5047](https://github.com/material-components/material-components-web/issues/5047)) ([90f6247](https://github.com/material-components/material-components-web/commit/90f6247))
* **menu:** Vertically center the group icon ([#4862](https://github.com/material-components/material-components-web/issues/4862)) ([c5738ed](https://github.com/material-components/material-components-web/commit/c5738ed))
### Features
* **list:** Add mixin for disabled text opacity ([#4861](https://github.com/material-components/material-components-web/issues/4861)) ([d68f8a7](https://github.com/material-components/material-components-web/commit/d68f8a7))
# [4.0.0-canary.1](https://github.com/material-components/material-components-web/compare/v3.1.1...v4.0.0-canary.1) (2019-09-09)
### Bug Fixes
* **menu:** recompute index before marking selection ([#5047](https://github.com/material-components/material-components-web/issues/5047)) ([90f6247](https://github.com/material-components/material-components-web/commit/90f6247))
* **menu:** Vertically center the group icon ([#4862](https://github.com/material-components/material-components-web/issues/4862)) ([c5738ed](https://github.com/material-components/material-components-web/commit/c5738ed))
### Features
* **list:** Add mixin for disabled text opacity ([#4861](https://github.com/material-components/material-components-web/issues/4861)) ([d68f8a7](https://github.com/material-components/material-components-web/commit/d68f8a7))
# [4.0.0-canary.0](https://github.com/material-components/material-components-web/compare/v3.1.1...v4.0.0-canary.0) (2019-09-05)

@@ -8,0 +42,0 @@

2

dist/mdc.menu.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.menu=e():(t.mdc=t.mdc||{},t.mdc.menu=e())}(this,function(){return i={},o.m=n={0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=(Object.defineProperty(o,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),o.prototype.init=function(){},o.prototype.destroy=function(){},o);function o(t){void 0===t&&(t={}),this.adapter_=t}e.MDCFoundation=i,e.default=i},1:function(t,e,n){"use strict";var i=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,s=n.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return r},o=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),r=(a.attachTo=function(t){return new a(t,new s.MDCFoundation({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation_.destroy()},a.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},a.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},a.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(i)},a);function a(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root_=t,this.initialize.apply(this,o(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}e.MDCComponent=r,e.default=r},11:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=n(8),u=["input","button","textarea","select"];var c,d=(c=r.MDCFoundation,o(l,c),Object.defineProperty(l,"strings",{get:function(){return a.strings},enumerable:!0,configurable:!0}),Object.defineProperty(l,"cssClasses",{get:function(){return a.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(l,"numbers",{get:function(){return a.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(l,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),l.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},l.prototype.setWrapFocus=function(t){this.wrapFocus_=t},l.prototype.setVerticalOrientation=function(t){this.isVertical_=t},l.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},l.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},l.prototype.getSelectedIndex=function(){return this.selectedIndex_},l.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},l.prototype.handleFocusIn=function(t,e){0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"0")},l.prototype.handleFocusOut=function(t,e){var n=this;0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout(function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()},0)},l.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,o="ArrowUp"===t.key||38===t.keyCode,s="ArrowRight"===t.key||39===t.keyCode,r="ArrowDown"===t.key||40===t.keyCode,a="Home"===t.key||36===t.keyCode,u="End"===t.key||35===t.keyCode,c="Enter"===t.key||13===t.keyCode,d="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())o||u?(t.preventDefault(),this.focusLastElement()):(r||a)&&(t.preventDefault(),this.focusFirstElement());else{var l=this.adapter_.getFocusedElementIndex();if(!(-1===l&&(l=n)<0)){var h;if(this.isVertical_&&r||!this.isVertical_&&s)this.preventDefaultEvent_(t),h=this.focusNextElement(l);else if(this.isVertical_&&o||!this.isVertical_&&i)this.preventDefaultEvent_(t),h=this.focusPrevElement(l);else if(a)this.preventDefaultEvent_(t),h=this.focusFirstElement();else if(u)this.preventDefaultEvent_(t),h=this.focusLastElement();else if((c||d)&&e){var _=t.target;if(_&&"A"===_.tagName&&c)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}},l.prototype.handleClick=function(t,e){t!==a.numbers.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},l.prototype.focusNextElement=function(t){var e=t+1;if(this.adapter_.getListItemCount()<=e){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},l.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},l.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},l.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},l.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===u.indexOf(e)&&t.preventDefault()},l.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=a.cssClasses.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.cssClasses.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},l.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===a.numbers.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,a.strings.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?a.strings.ARIA_CURRENT:a.strings.ARIA_SELECTED;this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},l.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,a.strings.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,a.strings.ARIA_CHECKED,"true"),this.selectedIndex_=t},l.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e<this.adapter_.getListItemCount();e++){var n=!1;0<=t.indexOf(e)&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,a.strings.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},l.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===a.numbers.UNSET_INDEX&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):0<=this.focusedItemIndex_&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},l.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},l.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==a.numbers.UNSET_INDEX?t=this.selectedIndex_:function(t){return t instanceof Array}(this.selectedIndex_)&&0<this.selectedIndex_.length&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),this.setTabindexAtIndex_(t)},l.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"!=typeof t)return!1;if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)},l.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return 0<=t&&t<e},l.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},l.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.adapter_.isCheckboxCheckedAtIndex(e);t&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n)),this.adapter_.setAttributeForElementIndex(e,a.strings.ARIA_CHECKED,n?"true":"false");var i=this.selectedIndex_===a.numbers.UNSET_INDEX?[]:this.selectedIndex_.slice();n?i.push(e):i=i.filter(function(t){return t!==e}),this.selectedIndex_=i},l);function l(t){var e=c.call(this,s({},l.defaultAdapter,t))||this;return e.wrapFocus_=!1,e.isVertical_=!0,e.isSingleSelectionList_=!1,e.selectedIndex_=a.numbers.UNSET_INDEX,e.focusedItemIndex_=a.numbers.UNSET_INDEX,e.useActivatedClass_=!1,e.ariaCurrentAttrValue_=null,e.isCheckboxList_=!1,e.isRadioList_=!1,e}e.MDCListFoundation=d,e.default=d},137:function(t,n,e){"use strict";function i(t){for(var e in t)n.hasOwnProperty(e)||(n[e]=t[e])}Object.defineProperty(n,"__esModule",{value:!0});var o=e(9);n.Corner=o.Corner,i(e(47)),i(e(18)),i(e(38))},14:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},l=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),I=n(9),u=(r=a.MDCFoundation,o(c,r),Object.defineProperty(c,"cssClasses",{get:function(){return I.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(c,"strings",{get:function(){return I.strings},enumerable:!0,configurable:!0}),Object.defineProperty(c,"numbers",{get:function(){return I.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(c,"Corner",{get:function(){return I.Corner},enumerable:!0,configurable:!0}),Object.defineProperty(c,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),c.prototype.init=function(){var t=c.cssClasses,e=t.ROOT,n=t.OPEN;if(!this.adapter_.hasClass(e))throw new Error(e+" class required in root element.");this.adapter_.hasClass(n)&&(this.isOpen_=!0)},c.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)},c.prototype.setAnchorCorner=function(t){this.anchorCorner_=t},c.prototype.setAnchorMargin=function(t){this.anchorMargin_.top=t.top||0,this.anchorMargin_.right=t.right||0,this.anchorMargin_.bottom=t.bottom||0,this.anchorMargin_.left=t.left||0},c.prototype.setIsHoisted=function(t){this.isHoistedElement_=t},c.prototype.setFixedPosition=function(t){this.isFixedPosition_=t},c.prototype.setAbsolutePosition=function(t,e){this.position_.x=this.isFinite_(t)?t:0,this.position_.y=this.isFinite_(e)?e:0},c.prototype.setQuickOpen=function(t){this.isQuickOpen_=t},c.prototype.isOpen=function(){return this.isOpen_},c.prototype.open=function(){var t=this;this.adapter_.saveFocus(),this.isQuickOpen_||this.adapter_.addClass(c.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(c.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.isQuickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(c.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},I.numbers.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0},c.prototype.close=function(t){var e=this;void 0===t&&(t=!1),this.isQuickOpen_||this.adapter_.addClass(c.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(c.cssClasses.OPEN),e.isQuickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(c.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},I.numbers.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,t||this.maybeRestoreFocus_()},c.prototype.handleBodyClick=function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()},c.prototype.handleKeydown=function(t){var e=t.keyCode;"Escape"!==t.key&&27!==e||this.close()},c.prototype.autoPosition_=function(){var t;this.measurements_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),i=this.hasBit_(e,I.CornerBit.BOTTOM)?"bottom":"top",o=this.hasBit_(e,I.CornerBit.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset_(e),r=this.getVerticalOriginOffset_(e),a=this.measurements_,u=a.anchorSize,c=a.surfaceSize,d=((t={})[o]=s,t[i]=r,t);u.width/c.width>I.numbers.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement_(d),this.adapter_.setTransformOrigin(o+" "+i),this.adapter_.setPosition(d),this.adapter_.setMaxHeight(n?n+"px":"")},c.prototype.getAutoLayoutMeasurements_=function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getBodyDimensions(),n=this.adapter_.getWindowDimensions(),i=this.adapter_.getWindowScroll();return{anchorSize:t=t||{top:this.position_.y,right:this.position_.x,bottom:this.position_.y,left:this.position_.x,width:0,height:0},bodySize:e,surfaceSize:this.dimensions_,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:i}},c.prototype.getOriginCorner_=function(){var t=I.Corner.TOP_LEFT,e=this.measurements_,n=e.viewportDistance,i=e.anchorSize,o=e.surfaceSize,s=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM),r=s?n.top+i.height+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,a=s?n.bottom-this.anchorMargin_.bottom:n.bottom+i.height-this.anchorMargin_.top,u=o.height-r,c=o.height-a;0<c&&u<c&&(t=this.setBit_(t,I.CornerBit.BOTTOM));var d=this.adapter_.isRtl(),l=this.hasBit_(this.anchorCorner_,I.CornerBit.FLIP_RTL),h=this.hasBit_(this.anchorCorner_,I.CornerBit.RIGHT),_=h&&!d||!h&&l&&d,f=_?n.left+i.width+this.anchorMargin_.right:n.left+this.anchorMargin_.left,p=_?n.right-this.anchorMargin_.right:n.right+i.width-this.anchorMargin_.left,m=o.width-f,E=o.width-p;return(m<0&&_&&d||h&&!_&&m<0||0<E&&m<E)&&(t=this.setBit_(t,I.CornerBit.RIGHT)),t},c.prototype.getMenuSurfaceMaxHeight_=function(t){var e=this.measurements_.viewportDistance,n=0,i=this.hasBit_(t,I.CornerBit.BOTTOM),o=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM),s=c.numbers.MARGIN_TO_EDGE;return i?(n=e.top+this.anchorMargin_.top-s,o||(n+=this.measurements_.anchorSize.height)):(n=e.bottom-this.anchorMargin_.bottom+this.measurements_.anchorSize.height-s,o&&(n-=this.measurements_.anchorSize.height)),n},c.prototype.getHorizontalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,I.CornerBit.RIGHT),i=this.hasBit_(this.anchorCorner_,I.CornerBit.RIGHT);if(n){var o=i?e.width-this.anchorMargin_.left:this.anchorMargin_.right;return this.isHoistedElement_||this.isFixedPosition_?o-(this.measurements_.viewportSize.width-this.measurements_.bodySize.width):o}return i?e.width-this.anchorMargin_.right:this.anchorMargin_.left},c.prototype.getVerticalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,I.CornerBit.BOTTOM),i=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM);return n?i?e.height-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?e.height+this.anchorMargin_.bottom:this.anchorMargin_.top},c.prototype.adjustPositionForHoistedElement_=function(t){var e,n,i=this.measurements_,o=i.windowScroll,s=i.viewportDistance,r=Object.keys(t);try{for(var a=l(r),u=a.next();!u.done;u=a.next()){var c=u.value,d=t[c]||0;d+=s[c],this.isFixedPosition_||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),t[c]=d}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}},c.prototype.maybeRestoreFocus_=function(){var t=this.adapter_.isFocused(),e=document.activeElement&&this.adapter_.isElementInContainer(document.activeElement);(t||e)&&this.adapter_.restoreFocus()},c.prototype.hasBit_=function(t,e){return Boolean(t&e)},c.prototype.setBit_=function(t,e){return t|e},c.prototype.isFinite_=function(t){return"number"==typeof t&&isFinite(t)},c);function c(t){var e=r.call(this,s({},c.defaultAdapter,t))||this;return e.isOpen_=!1,e.isQuickOpen_=!1,e.isHoistedElement_=!1,e.isFixedPosition_=!1,e.openAnimationEndTimerId_=0,e.closeAnimationEndTimerId_=0,e.animationRequestId_=0,e.anchorCorner_=I.Corner.TOP_START,e.anchorMargin_={top:0,right:0,bottom:0,left:0},e.position_={x:0,y:0},e}e.MDCMenuSurfaceFoundation=u,e.default=u},17:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s,r=n(1),a=n(2),u=n(8),c=n(11),d=(s=r.MDCComponent,o(l,s),Object.defineProperty(l.prototype,"vertical",{set:function(t){this.foundation_.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"listElements",{get:function(){return[].slice.call(this.root_.querySelectorAll("."+u.cssClasses.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"wrapFocus",{set:function(t){this.foundation_.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"singleSelection",{set:function(t){this.foundation_.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"selectedIndex",{get:function(){return this.foundation_.getSelectedIndex()},set:function(t){this.foundation_.setSelectedIndex(t)},enumerable:!0,configurable:!0}),l.attachTo=function(t){return new l(t)},l.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},l.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},l.prototype.layout=function(){var t=this.root_.getAttribute(u.strings.ARIA_ORIENTATION);this.vertical=t!==u.strings.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(t){t.setAttribute("tabindex","-1")}),[].slice.call(this.root_.querySelectorAll(u.strings.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(t){return t.setAttribute("tabindex","-1")}),this.foundation_.layout()},l.prototype.initializeListType=function(){var e=this,t=this.root_.querySelectorAll(u.strings.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root_.querySelector("\n ."+u.cssClasses.LIST_ITEM_ACTIVATED_CLASS+",\n ."+u.cssClasses.LIST_ITEM_SELECTED_CLASS+"\n "),i=this.root_.querySelector(u.strings.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var o=this.root_.querySelectorAll(u.strings.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(o,function(t){return e.listElements.indexOf(t)})}else n?(n.classList.contains(u.cssClasses.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(n)):i&&(this.selectedIndex=this.listElements.indexOf(i))},l.prototype.getDefaultFoundation=function(){var o=this,t={addClassForElementIndex:function(t,e){var n=o.listElements[t];n&&n.classList.add(e)},focusItemAtIndex:function(t){var e=o.listElements[t];e&&e.focus()},getAttributeForElementIndex:function(t,e){return o.listElements[t].getAttribute(e)},getFocusedElementIndex:function(){return o.listElements.indexOf(document.activeElement)},getListItemCount:function(){return o.listElements.length},hasCheckboxAtIndex:function(t){return!!o.listElements[t].querySelector(u.strings.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!o.listElements[t].querySelector(u.strings.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return o.listElements[t].querySelector(u.strings.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return o.root_.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===o.root_},notifyAction:function(t){o.emit(u.strings.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,e){var n=o.listElements[t];n&&n.classList.remove(e)},setAttributeForElementIndex:function(t,e,n){var i=o.listElements[t];i&&i.setAttribute(e,n)},setCheckedCheckboxOrRadioAtIndex:function(t,e){var n=o.listElements[t].querySelector(u.strings.CHECKBOX_RADIO_SELECTOR);n.checked=e;var i=document.createEvent("Event");i.initEvent("change",!0,!0),n.dispatchEvent(i)},setTabIndexForListItemChildren:function(t,e){var n=o.listElements[t];[].slice.call(n.querySelectorAll(u.strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",e)})}};return new c.MDCListFoundation(t)},l.prototype.getListItemIndex_=function(t){var e=t.target,n=a.closest(e,"."+u.cssClasses.LIST_ITEM_CLASS+", ."+u.cssClasses.ROOT);return n&&a.matches(n,"."+u.cssClasses.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},l.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusIn(t,e)},l.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusOut(t,e)},l.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation_.handleKeydown(t,n.classList.contains(u.cssClasses.LIST_ITEM_CLASS),e)},l.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!a.matches(n,u.strings.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(e,i)},l);function l(){return null!==s&&s.apply(this,arguments)||this}e.MDCList=d},18:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.cssClasses={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"};e.strings={ARIA_CHECKED_ATTR:"aria-checked",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"};var i,o;e.numbers={FOCUS_ROOT_INDEX:-1},(o=i=i||{})[o.NONE=0]="NONE",o[o.LIST_ROOT=1]="LIST_ROOT",o[o.FIRST_ITEM=2]="FIRST_ITEM",o[o.LAST_ITEM=3]="LAST_ITEM",e.DefaultFocusState=i},2:function(t,e,n){"use strict";function i(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.closest=function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(i(n,e))return n;n=n.parentElement}return null},e.matches=i},22:function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.getTransformPropertyName=function(t,e){if(void 0===e&&(e=!1),void 0===i||e){var n=t.document.createElement("div");i="transform"in n.style?"transform":"webkitTransform"}return i}},31:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(1),u=n(9),c=n(14),d=s(n(22)),l=(r=a.MDCComponent,o(h,r),h.attachTo=function(t){return new h(t)},h.prototype.initialSyncWithDOM=function(){var e=this,t=this.root_.parentElement;this.anchorElement=t&&t.classList.contains(u.cssClasses.ANCHOR)?t:null,this.root_.classList.contains(u.cssClasses.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.listen("keydown",this.handleKeydown_),this.listen(u.strings.OPENED_EVENT,this.registerBodyClickListener_),this.listen(u.strings.CLOSED_EVENT,this.deregisterBodyClickListener_)},h.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten(u.strings.OPENED_EVENT,this.registerBodyClickListener_),this.unlisten(u.strings.CLOSED_EVENT,this.deregisterBodyClickListener_),r.prototype.destroy.call(this)},h.prototype.isOpen=function(){return this.foundation_.isOpen()},h.prototype.open=function(){this.foundation_.open()},h.prototype.close=function(t){void 0===t&&(t=!1),this.foundation_.close(t)},Object.defineProperty(h.prototype,"quickOpen",{set:function(t){this.foundation_.setQuickOpen(t)},enumerable:!0,configurable:!0}),h.prototype.hoistMenuToBody=function(){document.body.appendChild(this.root_),this.setIsHoisted(!0)},h.prototype.setIsHoisted=function(t){this.foundation_.setIsHoisted(t)},h.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},h.prototype.setFixedPosition=function(t){t?this.root_.classList.add(u.cssClasses.FIXED):this.root_.classList.remove(u.cssClasses.FIXED),this.foundation_.setFixedPosition(t)},h.prototype.setAbsolutePosition=function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)},h.prototype.setAnchorCorner=function(t){this.foundation_.setAnchorCorner(t)},h.prototype.setAnchorMargin=function(t){this.foundation_.setAnchorMargin(t)},h.prototype.getDefaultFoundation=function(){var n=this,t={addClass:function(t){return n.root_.classList.add(t)},removeClass:function(t){return n.root_.classList.remove(t)},hasClass:function(t){return n.root_.classList.contains(t)},hasAnchor:function(){return!!n.anchorElement},notifyClose:function(){return n.emit(c.MDCMenuSurfaceFoundation.strings.CLOSED_EVENT,{})},notifyOpen:function(){return n.emit(c.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return n.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(n.root_).getPropertyValue("direction")},setTransformOrigin:function(t){var e=d.getTransformPropertyName(window)+"-origin";n.root_.style.setProperty(e,t)},isFocused:function(){return document.activeElement===n.root_},saveFocus:function(){n.previousFocus_=document.activeElement},restoreFocus:function(){n.root_.contains(document.activeElement)&&n.previousFocus_&&n.previousFocus_.focus&&n.previousFocus_.focus()},getInnerDimensions:function(){return{width:n.root_.offsetWidth,height:n.root_.offsetHeight}},getAnchorDimensions:function(){return n.anchorElement?n.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){n.root_.style.left="left"in t?t.left+"px":"",n.root_.style.right="right"in t?t.right+"px":"",n.root_.style.top="top"in t?t.top+"px":"",n.root_.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){n.root_.style.maxHeight=t}};return new c.MDCMenuSurfaceFoundation(t)},h);function h(){return null!==r&&r.apply(this,arguments)||this}e.MDCMenuSurface=l},38:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=n(14),c=n(18),d=(r=a.MDCFoundation,o(l,r),Object.defineProperty(l,"cssClasses",{get:function(){return c.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(l,"strings",{get:function(){return c.strings},enumerable:!0,configurable:!0}),Object.defineProperty(l,"numbers",{get:function(){return c.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(l,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),l.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()},l.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;"Tab"!==e&&9!==n||this.adapter_.closeSurface(!0)},l.prototype.handleItemAction=function(t){var e=this,n=this.adapter_.getElementIndex(t);n<0||(this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){e.adapter_.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)},u.MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION))},l.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case c.DefaultFocusState.FIRST_ITEM:this.adapter_.focusItemAtIndex(0);break;case c.DefaultFocusState.LAST_ITEM:this.adapter_.focusItemAtIndex(this.adapter_.getMenuItemCount()-1);break;case c.DefaultFocusState.NONE:break;default:this.adapter_.focusListRoot()}},l.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},l.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter_.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter_.getSelectedSiblingOfItemAtIndex(t);0<=e&&(this.adapter_.removeAttributeFromElementAtIndex(e,c.strings.ARIA_CHECKED_ATTR),this.adapter_.removeClassFromElementAtIndex(e,c.cssClasses.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,c.cssClasses.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,c.strings.ARIA_CHECKED_ATTR,"true")},l.prototype.validatedIndex_=function(t){var e=this.adapter_.getMenuItemCount();if(!(0<=t&&t<e))throw new Error("MDCMenuFoundation: No list item at specified index.")},l);function l(t){var e=r.call(this,s({},l.defaultAdapter,t))||this;return e.closeAnimationEndTimerId_=0,e.defaultFocusState_=c.DefaultFocusState.LIST_ROOT,e}e.MDCMenuFoundation=d,e.default=d},47:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s,r=n(1),a=n(2),u=n(17),c=n(11),d=n(31),l=n(14),h=n(18),_=n(38),f=(s=r.MDCComponent,o(p,s),p.attachTo=function(t){return new p(t)},p.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new d.MDCMenuSurface(t)}),void 0===e&&(e=function(t){return new u.MDCList(t)}),this.menuSurfaceFactory_=t,this.listFactory_=e},p.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root_);var t=this.root_.querySelector(h.strings.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation_.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation_.handleMenuSurfaceOpened()},this.menuSurface_.listen(l.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction_)},p.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(l.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction_),s.prototype.destroy.call(this)},Object.defineProperty(p.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(t){t?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(t){this.list_&&(this.list_.wrapFocus=t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"quickOpen",{set:function(t){this.menuSurface_.quickOpen=t},enumerable:!0,configurable:!0}),p.prototype.setDefaultFocusState=function(t){this.foundation_.setDefaultFocusState(t)},p.prototype.setAnchorCorner=function(t){this.menuSurface_.setAnchorCorner(t)},p.prototype.setAnchorMargin=function(t){this.menuSurface_.setAnchorMargin(t)},p.prototype.setSelectedIndex=function(t){this.foundation_.setSelectedIndex(t)},p.prototype.getOptionByIndex=function(t){return t<this.items.length?this.items[t]:null},p.prototype.setFixedPosition=function(t){this.menuSurface_.setFixedPosition(t)},p.prototype.hoistMenuToBody=function(){this.menuSurface_.hoistMenuToBody()},p.prototype.setIsHoisted=function(t){this.menuSurface_.setIsHoisted(t)},p.prototype.setAbsolutePosition=function(t,e){this.menuSurface_.setAbsolutePosition(t,e)},p.prototype.setAnchorElement=function(t){this.menuSurface_.anchorElement=t},p.prototype.getDefaultFoundation=function(){var i=this,t={addClassToElementAtIndex:function(t,e){i.items[t].classList.add(e)},removeClassFromElementAtIndex:function(t,e){i.items[t].classList.remove(e)},addAttributeToElementAtIndex:function(t,e,n){i.items[t].setAttribute(e,n)},removeAttributeFromElementAtIndex:function(t,e){i.items[t].removeAttribute(e)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(t){return i.menuSurface_.close(t)},getElementIndex:function(t){return i.items.indexOf(t)},notifySelected:function(t){return i.emit(h.strings.SELECTED_EVENT,{index:t.index,item:i.items[t.index]})},getMenuItemCount:function(){return i.items.length},focusItemAtIndex:function(t){return i.items[t].focus()},focusListRoot:function(){return i.root_.querySelector(h.strings.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!a.closest(i.items[t],"."+h.cssClasses.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var e=a.closest(i.items[t],"."+h.cssClasses.MENU_SELECTION_GROUP).querySelector("."+h.cssClasses.MENU_SELECTED_LIST_ITEM);return e?i.items.indexOf(e):-1}};return new _.MDCMenuFoundation(t)},p);function p(){return null!==s&&s.apply(this,arguments)||this}e.MDCMenu=f},8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},o={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHECKBOX_SELECTOR:'input[type="checkbox"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+(e.cssClasses=i).LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]:not(:disabled)'};e.strings=o;e.numbers={UNSET_INDEX:-1}},9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.cssClasses={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"};var 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"])'].join(", ")};e.strings=i;var o,s,r,a;e.numbers={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},(s=o=o||{})[s.BOTTOM=1]="BOTTOM",s[s.CENTER=2]="CENTER",s[s.RIGHT=4]="RIGHT",s[s.FLIP_RTL=8]="FLIP_RTL",e.CornerBit=o,(a=r=r||{})[a.TOP_LEFT=0]="TOP_LEFT",a[a.TOP_RIGHT=4]="TOP_RIGHT",a[a.BOTTOM_LEFT=1]="BOTTOM_LEFT",a[a.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",a[a.TOP_START=8]="TOP_START",a[a.TOP_END=12]="TOP_END",a[a.BOTTOM_START=9]="BOTTOM_START",a[a.BOTTOM_END=13]="BOTTOM_END",e.Corner=r}},o.c=i,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=137);function o(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,i});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.menu=e():(t.mdc=t.mdc||{},t.mdc.menu=e())}(this,function(){return i={},o.m=n={0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=(Object.defineProperty(o,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),o.prototype.init=function(){},o.prototype.destroy=function(){},o);function o(t){void 0===t&&(t={}),this.adapter_=t}e.MDCFoundation=i,e.default=i},1:function(t,e,n){"use strict";var i=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,s=n.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return r},o=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),r=(a.attachTo=function(t){return new a(t,new s.MDCFoundation({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation_.destroy()},a.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},a.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},a.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(i)},a);function a(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root_=t,this.initialize.apply(this,o(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}e.MDCComponent=r,e.default=r},11:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=n(8),u=["input","button","textarea","select"];var c,d=(c=r.MDCFoundation,o(l,c),Object.defineProperty(l,"strings",{get:function(){return a.strings},enumerable:!0,configurable:!0}),Object.defineProperty(l,"cssClasses",{get:function(){return a.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(l,"numbers",{get:function(){return a.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(l,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),l.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},l.prototype.setWrapFocus=function(t){this.wrapFocus_=t},l.prototype.setVerticalOrientation=function(t){this.isVertical_=t},l.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},l.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},l.prototype.getSelectedIndex=function(){return this.selectedIndex_},l.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},l.prototype.handleFocusIn=function(t,e){0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"0")},l.prototype.handleFocusOut=function(t,e){var n=this;0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout(function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()},0)},l.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,o="ArrowUp"===t.key||38===t.keyCode,s="ArrowRight"===t.key||39===t.keyCode,r="ArrowDown"===t.key||40===t.keyCode,a="Home"===t.key||36===t.keyCode,u="End"===t.key||35===t.keyCode,c="Enter"===t.key||13===t.keyCode,d="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())o||u?(t.preventDefault(),this.focusLastElement()):(r||a)&&(t.preventDefault(),this.focusFirstElement());else{var l=this.adapter_.getFocusedElementIndex();if(!(-1===l&&(l=n)<0)){var h;if(this.isVertical_&&r||!this.isVertical_&&s)this.preventDefaultEvent_(t),h=this.focusNextElement(l);else if(this.isVertical_&&o||!this.isVertical_&&i)this.preventDefaultEvent_(t),h=this.focusPrevElement(l);else if(a)this.preventDefaultEvent_(t),h=this.focusFirstElement();else if(u)this.preventDefaultEvent_(t),h=this.focusLastElement();else if((c||d)&&e){var _=t.target;if(_&&"A"===_.tagName&&c)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}},l.prototype.handleClick=function(t,e){t!==a.numbers.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},l.prototype.focusNextElement=function(t){var e=t+1;if(this.adapter_.getListItemCount()<=e){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},l.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},l.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},l.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},l.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===u.indexOf(e)&&t.preventDefault()},l.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=a.cssClasses.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.cssClasses.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},l.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===a.numbers.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,a.strings.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?a.strings.ARIA_CURRENT:a.strings.ARIA_SELECTED;this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},l.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==a.numbers.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,a.strings.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,a.strings.ARIA_CHECKED,"true"),this.selectedIndex_=t},l.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e<this.adapter_.getListItemCount();e++){var n=!1;0<=t.indexOf(e)&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,a.strings.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},l.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===a.numbers.UNSET_INDEX&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):0<=this.focusedItemIndex_&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},l.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},l.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==a.numbers.UNSET_INDEX?t=this.selectedIndex_:function(t){return t instanceof Array}(this.selectedIndex_)&&0<this.selectedIndex_.length&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),this.setTabindexAtIndex_(t)},l.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"!=typeof t)return!1;if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)},l.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return 0<=t&&t<e},l.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},l.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.adapter_.isCheckboxCheckedAtIndex(e);t&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n)),this.adapter_.setAttributeForElementIndex(e,a.strings.ARIA_CHECKED,n?"true":"false");var i=this.selectedIndex_===a.numbers.UNSET_INDEX?[]:this.selectedIndex_.slice();n?i.push(e):i=i.filter(function(t){return t!==e}),this.selectedIndex_=i},l);function l(t){var e=c.call(this,s({},l.defaultAdapter,t))||this;return e.wrapFocus_=!1,e.isVertical_=!0,e.isSingleSelectionList_=!1,e.selectedIndex_=a.numbers.UNSET_INDEX,e.focusedItemIndex_=a.numbers.UNSET_INDEX,e.useActivatedClass_=!1,e.ariaCurrentAttrValue_=null,e.isCheckboxList_=!1,e.isRadioList_=!1,e}e.MDCListFoundation=d,e.default=d},137:function(t,n,e){"use strict";function i(t){for(var e in t)n.hasOwnProperty(e)||(n[e]=t[e])}Object.defineProperty(n,"__esModule",{value:!0});var o=e(9);n.Corner=o.Corner,i(e(47)),i(e(18)),i(e(38))},14:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},l=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),I=n(9),u=(r=a.MDCFoundation,o(c,r),Object.defineProperty(c,"cssClasses",{get:function(){return I.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(c,"strings",{get:function(){return I.strings},enumerable:!0,configurable:!0}),Object.defineProperty(c,"numbers",{get:function(){return I.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(c,"Corner",{get:function(){return I.Corner},enumerable:!0,configurable:!0}),Object.defineProperty(c,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),c.prototype.init=function(){var t=c.cssClasses,e=t.ROOT,n=t.OPEN;if(!this.adapter_.hasClass(e))throw new Error(e+" class required in root element.");this.adapter_.hasClass(n)&&(this.isOpen_=!0)},c.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)},c.prototype.setAnchorCorner=function(t){this.anchorCorner_=t},c.prototype.setAnchorMargin=function(t){this.anchorMargin_.top=t.top||0,this.anchorMargin_.right=t.right||0,this.anchorMargin_.bottom=t.bottom||0,this.anchorMargin_.left=t.left||0},c.prototype.setIsHoisted=function(t){this.isHoistedElement_=t},c.prototype.setFixedPosition=function(t){this.isFixedPosition_=t},c.prototype.setAbsolutePosition=function(t,e){this.position_.x=this.isFinite_(t)?t:0,this.position_.y=this.isFinite_(e)?e:0},c.prototype.setQuickOpen=function(t){this.isQuickOpen_=t},c.prototype.isOpen=function(){return this.isOpen_},c.prototype.open=function(){var t=this;this.adapter_.saveFocus(),this.isQuickOpen_||this.adapter_.addClass(c.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(c.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.isQuickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(c.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},I.numbers.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0},c.prototype.close=function(t){var e=this;void 0===t&&(t=!1),this.isQuickOpen_||this.adapter_.addClass(c.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(c.cssClasses.OPEN),e.isQuickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(c.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},I.numbers.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,t||this.maybeRestoreFocus_()},c.prototype.handleBodyClick=function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()},c.prototype.handleKeydown=function(t){var e=t.keyCode;"Escape"!==t.key&&27!==e||this.close()},c.prototype.autoPosition_=function(){var t;this.measurements_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),i=this.hasBit_(e,I.CornerBit.BOTTOM)?"bottom":"top",o=this.hasBit_(e,I.CornerBit.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset_(e),r=this.getVerticalOriginOffset_(e),a=this.measurements_,u=a.anchorSize,c=a.surfaceSize,d=((t={})[o]=s,t[i]=r,t);u.width/c.width>I.numbers.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement_(d),this.adapter_.setTransformOrigin(o+" "+i),this.adapter_.setPosition(d),this.adapter_.setMaxHeight(n?n+"px":"")},c.prototype.getAutoLayoutMeasurements_=function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getBodyDimensions(),n=this.adapter_.getWindowDimensions(),i=this.adapter_.getWindowScroll();return{anchorSize:t=t||{top:this.position_.y,right:this.position_.x,bottom:this.position_.y,left:this.position_.x,width:0,height:0},bodySize:e,surfaceSize:this.dimensions_,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:i}},c.prototype.getOriginCorner_=function(){var t=I.Corner.TOP_LEFT,e=this.measurements_,n=e.viewportDistance,i=e.anchorSize,o=e.surfaceSize,s=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM),r=s?n.top+i.height+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,a=s?n.bottom-this.anchorMargin_.bottom:n.bottom+i.height-this.anchorMargin_.top,u=o.height-r,c=o.height-a;0<c&&u<c&&(t=this.setBit_(t,I.CornerBit.BOTTOM));var d=this.adapter_.isRtl(),l=this.hasBit_(this.anchorCorner_,I.CornerBit.FLIP_RTL),h=this.hasBit_(this.anchorCorner_,I.CornerBit.RIGHT),_=h&&!d||!h&&l&&d,f=_?n.left+i.width+this.anchorMargin_.right:n.left+this.anchorMargin_.left,p=_?n.right-this.anchorMargin_.right:n.right+i.width-this.anchorMargin_.left,m=o.width-f,E=o.width-p;return(m<0&&_&&d||h&&!_&&m<0||0<E&&m<E)&&(t=this.setBit_(t,I.CornerBit.RIGHT)),t},c.prototype.getMenuSurfaceMaxHeight_=function(t){var e=this.measurements_.viewportDistance,n=0,i=this.hasBit_(t,I.CornerBit.BOTTOM),o=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM),s=c.numbers.MARGIN_TO_EDGE;return i?(n=e.top+this.anchorMargin_.top-s,o||(n+=this.measurements_.anchorSize.height)):(n=e.bottom-this.anchorMargin_.bottom+this.measurements_.anchorSize.height-s,o&&(n-=this.measurements_.anchorSize.height)),n},c.prototype.getHorizontalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,I.CornerBit.RIGHT),i=this.hasBit_(this.anchorCorner_,I.CornerBit.RIGHT);if(n){var o=i?e.width-this.anchorMargin_.left:this.anchorMargin_.right;return this.isHoistedElement_||this.isFixedPosition_?o-(this.measurements_.viewportSize.width-this.measurements_.bodySize.width):o}return i?e.width-this.anchorMargin_.right:this.anchorMargin_.left},c.prototype.getVerticalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,I.CornerBit.BOTTOM),i=this.hasBit_(this.anchorCorner_,I.CornerBit.BOTTOM);return n?i?e.height-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?e.height+this.anchorMargin_.bottom:this.anchorMargin_.top},c.prototype.adjustPositionForHoistedElement_=function(t){var e,n,i=this.measurements_,o=i.windowScroll,s=i.viewportDistance,r=Object.keys(t);try{for(var a=l(r),u=a.next();!u.done;u=a.next()){var c=u.value,d=t[c]||0;d+=s[c],this.isFixedPosition_||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),t[c]=d}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}},c.prototype.maybeRestoreFocus_=function(){var t=this.adapter_.isFocused(),e=document.activeElement&&this.adapter_.isElementInContainer(document.activeElement);(t||e)&&this.adapter_.restoreFocus()},c.prototype.hasBit_=function(t,e){return Boolean(t&e)},c.prototype.setBit_=function(t,e){return t|e},c.prototype.isFinite_=function(t){return"number"==typeof t&&isFinite(t)},c);function c(t){var e=r.call(this,s({},c.defaultAdapter,t))||this;return e.isOpen_=!1,e.isQuickOpen_=!1,e.isHoistedElement_=!1,e.isFixedPosition_=!1,e.openAnimationEndTimerId_=0,e.closeAnimationEndTimerId_=0,e.animationRequestId_=0,e.anchorCorner_=I.Corner.TOP_START,e.anchorMargin_={top:0,right:0,bottom:0,left:0},e.position_={x:0,y:0},e}e.MDCMenuSurfaceFoundation=u,e.default=u},17:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s,r=n(1),a=n(2),u=n(8),c=n(11),d=(s=r.MDCComponent,o(l,s),Object.defineProperty(l.prototype,"vertical",{set:function(t){this.foundation_.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"listElements",{get:function(){return[].slice.call(this.root_.querySelectorAll("."+u.cssClasses.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"wrapFocus",{set:function(t){this.foundation_.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"singleSelection",{set:function(t){this.foundation_.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"selectedIndex",{get:function(){return this.foundation_.getSelectedIndex()},set:function(t){this.foundation_.setSelectedIndex(t)},enumerable:!0,configurable:!0}),l.attachTo=function(t){return new l(t)},l.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},l.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},l.prototype.layout=function(){var t=this.root_.getAttribute(u.strings.ARIA_ORIENTATION);this.vertical=t!==u.strings.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(t){t.setAttribute("tabindex","-1")}),[].slice.call(this.root_.querySelectorAll(u.strings.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(t){return t.setAttribute("tabindex","-1")}),this.foundation_.layout()},l.prototype.initializeListType=function(){var e=this,t=this.root_.querySelectorAll(u.strings.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root_.querySelector("\n ."+u.cssClasses.LIST_ITEM_ACTIVATED_CLASS+",\n ."+u.cssClasses.LIST_ITEM_SELECTED_CLASS+"\n "),i=this.root_.querySelector(u.strings.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var o=this.root_.querySelectorAll(u.strings.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(o,function(t){return e.listElements.indexOf(t)})}else n?(n.classList.contains(u.cssClasses.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(n)):i&&(this.selectedIndex=this.listElements.indexOf(i))},l.prototype.getDefaultFoundation=function(){var o=this,t={addClassForElementIndex:function(t,e){var n=o.listElements[t];n&&n.classList.add(e)},focusItemAtIndex:function(t){var e=o.listElements[t];e&&e.focus()},getAttributeForElementIndex:function(t,e){return o.listElements[t].getAttribute(e)},getFocusedElementIndex:function(){return o.listElements.indexOf(document.activeElement)},getListItemCount:function(){return o.listElements.length},hasCheckboxAtIndex:function(t){return!!o.listElements[t].querySelector(u.strings.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!o.listElements[t].querySelector(u.strings.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return o.listElements[t].querySelector(u.strings.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return o.root_.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===o.root_},notifyAction:function(t){o.emit(u.strings.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,e){var n=o.listElements[t];n&&n.classList.remove(e)},setAttributeForElementIndex:function(t,e,n){var i=o.listElements[t];i&&i.setAttribute(e,n)},setCheckedCheckboxOrRadioAtIndex:function(t,e){var n=o.listElements[t].querySelector(u.strings.CHECKBOX_RADIO_SELECTOR);n.checked=e;var i=document.createEvent("Event");i.initEvent("change",!0,!0),n.dispatchEvent(i)},setTabIndexForListItemChildren:function(t,e){var n=o.listElements[t];[].slice.call(n.querySelectorAll(u.strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",e)})}};return new c.MDCListFoundation(t)},l.prototype.getListItemIndex_=function(t){var e=t.target,n=a.closest(e,"."+u.cssClasses.LIST_ITEM_CLASS+", ."+u.cssClasses.ROOT);return n&&a.matches(n,"."+u.cssClasses.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},l.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusIn(t,e)},l.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusOut(t,e)},l.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation_.handleKeydown(t,n.classList.contains(u.cssClasses.LIST_ITEM_CLASS),e)},l.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!a.matches(n,u.strings.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(e,i)},l);function l(){return null!==s&&s.apply(this,arguments)||this}e.MDCList=d},18:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.cssClasses={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"};e.strings={ARIA_CHECKED_ATTR:"aria-checked",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"};var i,o;e.numbers={FOCUS_ROOT_INDEX:-1},(o=i=i||{})[o.NONE=0]="NONE",o[o.LIST_ROOT=1]="LIST_ROOT",o[o.FIRST_ITEM=2]="FIRST_ITEM",o[o.LAST_ITEM=3]="LAST_ITEM",e.DefaultFocusState=i},2:function(t,e,n){"use strict";function i(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.closest=function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(i(n,e))return n;n=n.parentElement}return null},e.matches=i},22:function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.getTransformPropertyName=function(t,e){if(void 0===e&&(e=!1),void 0===i||e){var n=t.document.createElement("div");i="transform"in n.style?"transform":"webkitTransform"}return i}},31:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(1),u=n(9),c=n(14),d=s(n(22)),l=(r=a.MDCComponent,o(h,r),h.attachTo=function(t){return new h(t)},h.prototype.initialSyncWithDOM=function(){var e=this,t=this.root_.parentElement;this.anchorElement=t&&t.classList.contains(u.cssClasses.ANCHOR)?t:null,this.root_.classList.contains(u.cssClasses.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.listen("keydown",this.handleKeydown_),this.listen(u.strings.OPENED_EVENT,this.registerBodyClickListener_),this.listen(u.strings.CLOSED_EVENT,this.deregisterBodyClickListener_)},h.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten(u.strings.OPENED_EVENT,this.registerBodyClickListener_),this.unlisten(u.strings.CLOSED_EVENT,this.deregisterBodyClickListener_),r.prototype.destroy.call(this)},h.prototype.isOpen=function(){return this.foundation_.isOpen()},h.prototype.open=function(){this.foundation_.open()},h.prototype.close=function(t){void 0===t&&(t=!1),this.foundation_.close(t)},Object.defineProperty(h.prototype,"quickOpen",{set:function(t){this.foundation_.setQuickOpen(t)},enumerable:!0,configurable:!0}),h.prototype.hoistMenuToBody=function(){document.body.appendChild(this.root_),this.setIsHoisted(!0)},h.prototype.setIsHoisted=function(t){this.foundation_.setIsHoisted(t)},h.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},h.prototype.setFixedPosition=function(t){t?this.root_.classList.add(u.cssClasses.FIXED):this.root_.classList.remove(u.cssClasses.FIXED),this.foundation_.setFixedPosition(t)},h.prototype.setAbsolutePosition=function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)},h.prototype.setAnchorCorner=function(t){this.foundation_.setAnchorCorner(t)},h.prototype.setAnchorMargin=function(t){this.foundation_.setAnchorMargin(t)},h.prototype.getDefaultFoundation=function(){var n=this,t={addClass:function(t){return n.root_.classList.add(t)},removeClass:function(t){return n.root_.classList.remove(t)},hasClass:function(t){return n.root_.classList.contains(t)},hasAnchor:function(){return!!n.anchorElement},notifyClose:function(){return n.emit(c.MDCMenuSurfaceFoundation.strings.CLOSED_EVENT,{})},notifyOpen:function(){return n.emit(c.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return n.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(n.root_).getPropertyValue("direction")},setTransformOrigin:function(t){var e=d.getTransformPropertyName(window)+"-origin";n.root_.style.setProperty(e,t)},isFocused:function(){return document.activeElement===n.root_},saveFocus:function(){n.previousFocus_=document.activeElement},restoreFocus:function(){n.root_.contains(document.activeElement)&&n.previousFocus_&&n.previousFocus_.focus&&n.previousFocus_.focus()},getInnerDimensions:function(){return{width:n.root_.offsetWidth,height:n.root_.offsetHeight}},getAnchorDimensions:function(){return n.anchorElement?n.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){n.root_.style.left="left"in t?t.left+"px":"",n.root_.style.right="right"in t?t.right+"px":"",n.root_.style.top="top"in t?t.top+"px":"",n.root_.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){n.root_.style.maxHeight=t}};return new c.MDCMenuSurfaceFoundation(t)},h);function h(){return null!==r&&r.apply(this,arguments)||this}e.MDCMenuSurface=l},38:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=n(14),c=n(18),d=(r=a.MDCFoundation,o(l,r),Object.defineProperty(l,"cssClasses",{get:function(){return c.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(l,"strings",{get:function(){return c.strings},enumerable:!0,configurable:!0}),Object.defineProperty(l,"numbers",{get:function(){return c.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(l,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),l.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()},l.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;"Tab"!==e&&9!==n||this.adapter_.closeSurface(!0)},l.prototype.handleItemAction=function(e){var n=this,t=this.adapter_.getElementIndex(e);t<0||(this.adapter_.notifySelected({index:t}),this.adapter_.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var t=n.adapter_.getElementIndex(e);n.adapter_.isSelectableItemAtIndex(t)&&n.setSelectedIndex(t)},u.MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION))},l.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case c.DefaultFocusState.FIRST_ITEM:this.adapter_.focusItemAtIndex(0);break;case c.DefaultFocusState.LAST_ITEM:this.adapter_.focusItemAtIndex(this.adapter_.getMenuItemCount()-1);break;case c.DefaultFocusState.NONE:break;default:this.adapter_.focusListRoot()}},l.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},l.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter_.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter_.getSelectedSiblingOfItemAtIndex(t);0<=e&&(this.adapter_.removeAttributeFromElementAtIndex(e,c.strings.ARIA_CHECKED_ATTR),this.adapter_.removeClassFromElementAtIndex(e,c.cssClasses.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,c.cssClasses.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,c.strings.ARIA_CHECKED_ATTR,"true")},l.prototype.validatedIndex_=function(t){var e=this.adapter_.getMenuItemCount();if(!(0<=t&&t<e))throw new Error("MDCMenuFoundation: No list item at specified index.")},l);function l(t){var e=r.call(this,s({},l.defaultAdapter,t))||this;return e.closeAnimationEndTimerId_=0,e.defaultFocusState_=c.DefaultFocusState.LIST_ROOT,e}e.MDCMenuFoundation=d,e.default=d},47:function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s,r=n(1),a=n(2),u=n(17),c=n(11),d=n(31),l=n(14),h=n(18),_=n(38),f=(s=r.MDCComponent,o(p,s),p.attachTo=function(t){return new p(t)},p.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new d.MDCMenuSurface(t)}),void 0===e&&(e=function(t){return new u.MDCList(t)}),this.menuSurfaceFactory_=t,this.listFactory_=e},p.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root_);var t=this.root_.querySelector(h.strings.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation_.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation_.handleMenuSurfaceOpened()},this.menuSurface_.listen(l.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction_)},p.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(l.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(c.MDCListFoundation.strings.ACTION_EVENT,this.handleItemAction_),s.prototype.destroy.call(this)},Object.defineProperty(p.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(t){t?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(t){this.list_&&(this.list_.wrapFocus=t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"quickOpen",{set:function(t){this.menuSurface_.quickOpen=t},enumerable:!0,configurable:!0}),p.prototype.setDefaultFocusState=function(t){this.foundation_.setDefaultFocusState(t)},p.prototype.setAnchorCorner=function(t){this.menuSurface_.setAnchorCorner(t)},p.prototype.setAnchorMargin=function(t){this.menuSurface_.setAnchorMargin(t)},p.prototype.setSelectedIndex=function(t){this.foundation_.setSelectedIndex(t)},p.prototype.getOptionByIndex=function(t){return t<this.items.length?this.items[t]:null},p.prototype.setFixedPosition=function(t){this.menuSurface_.setFixedPosition(t)},p.prototype.hoistMenuToBody=function(){this.menuSurface_.hoistMenuToBody()},p.prototype.setIsHoisted=function(t){this.menuSurface_.setIsHoisted(t)},p.prototype.setAbsolutePosition=function(t,e){this.menuSurface_.setAbsolutePosition(t,e)},p.prototype.setAnchorElement=function(t){this.menuSurface_.anchorElement=t},p.prototype.getDefaultFoundation=function(){var i=this,t={addClassToElementAtIndex:function(t,e){i.items[t].classList.add(e)},removeClassFromElementAtIndex:function(t,e){i.items[t].classList.remove(e)},addAttributeToElementAtIndex:function(t,e,n){i.items[t].setAttribute(e,n)},removeAttributeFromElementAtIndex:function(t,e){i.items[t].removeAttribute(e)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(t){return i.menuSurface_.close(t)},getElementIndex:function(t){return i.items.indexOf(t)},notifySelected:function(t){return i.emit(h.strings.SELECTED_EVENT,{index:t.index,item:i.items[t.index]})},getMenuItemCount:function(){return i.items.length},focusItemAtIndex:function(t){return i.items[t].focus()},focusListRoot:function(){return i.root_.querySelector(h.strings.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!a.closest(i.items[t],"."+h.cssClasses.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var e=a.closest(i.items[t],"."+h.cssClasses.MENU_SELECTION_GROUP).querySelector("."+h.cssClasses.MENU_SELECTED_LIST_ITEM);return e?i.items.indexOf(e):-1}};return new _.MDCMenuFoundation(t)},p);function p(){return null!==s&&s.apply(this,arguments)||this}e.MDCMenu=f},8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},o={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHECKBOX_SELECTOR:'input[type="checkbox"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+(e.cssClasses=i).LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]:not(:disabled)'};e.strings=o;e.numbers={UNSET_INDEX:-1}},9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.cssClasses={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"};var 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"])'].join(", ")};e.strings=i;var o,s,r,a;e.numbers={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},(s=o=o||{})[s.BOTTOM=1]="BOTTOM",s[s.CENTER=2]="CENTER",s[s.RIGHT=4]="RIGHT",s[s.FLIP_RTL=8]="FLIP_RTL",e.CornerBit=o,(a=r=r||{})[a.TOP_LEFT=0]="TOP_LEFT",a[a.TOP_RIGHT=4]="TOP_RIGHT",a[a.BOTTOM_LEFT=1]="BOTTOM_LEFT",a[a.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",a[a.TOP_START=8]="TOP_START",a[a.TOP_END=12]="TOP_END",a[a.BOTTOM_START=9]="BOTTOM_START",a[a.BOTTOM_END=13]="BOTTOM_END",e.Corner=r}},o.c=i,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=137);function o(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,i});

@@ -105,4 +105,6 @@ /**

this.closeAnimationEndTimerId_ = setTimeout(function () {
if (_this.adapter_.isSelectableItemAtIndex(index)) {
_this.setSelectedIndex(index);
// Recompute the index in case the menu contents have changed.
var recomputedIndex = _this.adapter_.getElementIndex(listItem);
if (_this.adapter_.isSelectableItemAtIndex(recomputedIndex)) {
_this.setSelectedIndex(recomputedIndex);
}

@@ -109,0 +111,0 @@ }, MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION);

{
"name": "@material/menu",
"version": "4.0.0-canary.0",
"version": "4.0.0-canary.1",
"description": "The Material Components for the web menu component",

@@ -21,12 +21,12 @@ "license": "MIT",

"dependencies": {
"@material/base": "^4.0.0-canary.0",
"@material/dom": "^4.0.0-canary.0",
"@material/feature-targeting": "^4.0.0-canary.0",
"@material/list": "^4.0.0-canary.0",
"@material/menu-surface": "^4.0.0-canary.0",
"@material/ripple": "^4.0.0-canary.0",
"@material/rtl": "^4.0.0-canary.0",
"@material/base": "^4.0.0-canary.1",
"@material/dom": "^4.0.0-canary.1",
"@material/feature-targeting": "^4.0.0-canary.1",
"@material/list": "^4.0.0-canary.1",
"@material/menu-surface": "^4.0.0-canary.1",
"@material/ripple": "^4.0.0-canary.1",
"@material/rtl": "^4.0.0-canary.1",
"tslib": "^1.9.3"
},
"gitHead": "a9e69493144f4246efe28a958126afc2fedebd60"
"gitHead": "edc72a4d7d6a61d61620fd05a80e2491e518bccf"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc