material-components-vue
Version:
Material Design components for Vue.js
2 lines • 35.5 kB
JavaScript
/*! For license information please see drawer.min.js.LICENSE */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,(function(){return n={},t.m=e={0:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return r})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return c}));var 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 o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return(r=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)};function s(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}}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=r.next()).done;)s.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}},1:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}));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_DISABLED:"aria-disabled",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 ."+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)'},r={UNSET_INDEX:-1}},14:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i,o=n(0),r=n(3),s=n(1),a=["input","button","textarea","select"],c=(i=r.a,o.b(u,i),Object.defineProperty(u,"strings",{get:function(){return s.c},enumerable:!0,configurable:!0}),Object.defineProperty(u,"cssClasses",{get:function(){return s.a},enumerable:!0,configurable:!0}),Object.defineProperty(u,"numbers",{get:function(){return s.b},enumerable:!0,configurable:!0}),Object.defineProperty(u,"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}),u.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},u.prototype.setWrapFocus=function(t){this.wrapFocus_=t},u.prototype.setVerticalOrientation=function(t){this.isVertical_=t},u.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},u.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},u.prototype.getSelectedIndex=function(){return this.selectedIndex_},u.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},u.prototype.handleFocusIn=function(t,e){0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"0")},u.prototype.handleFocusOut=function(t,e){var n=this;0<=e&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout((function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()}),0)},u.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,o="ArrowUp"===t.key||38===t.keyCode,r="ArrowRight"===t.key||39===t.keyCode,s="ArrowDown"===t.key||40===t.keyCode,a="Home"===t.key||36===t.keyCode,c="End"===t.key||35===t.keyCode,u="Enter"===t.key||13===t.keyCode,d="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())o||c?(t.preventDefault(),this.focusLastElement()):(s||a)&&(t.preventDefault(),this.focusFirstElement());else{var l=this.adapter_.getFocusedElementIndex();if(!(-1===l&&(l=n)<0)){var f;if(this.isVertical_&&s||!this.isVertical_&&r)this.preventDefaultEvent_(t),f=this.focusNextElement(l);else if(this.isVertical_&&o||!this.isVertical_&&i)this.preventDefaultEvent_(t),f=this.focusPrevElement(l);else if(a)this.preventDefaultEvent_(t),f=this.focusFirstElement();else if(c)this.preventDefaultEvent_(t),f=this.focusLastElement();else if((u||d)&&e){var h=t.target;if(h&&"A"===h.tagName&&u)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,void 0!==f&&(this.setTabindexAtIndex_(f),this.focusedItemIndex_=f)}}},u.prototype.handleClick=function(t,e){t!==s.b.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},u.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},u.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},u.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},u.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},u.prototype.setEnabled=function(t,e){this.isIndexValid_(t)&&(e?(this.adapter_.removeClassForElementIndex(t,s.a.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,s.c.ARIA_DISABLED,"false")):(this.adapter_.addClassForElementIndex(t,s.a.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,s.c.ARIA_DISABLED,"true")))},u.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===a.indexOf(e)&&t.preventDefault()},u.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=s.a.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=s.a.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==s.b.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},u.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===s.b.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,s.c.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?s.c.ARIA_CURRENT:s.c.ARIA_SELECTED;this.selectedIndex_!==s.b.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},u.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==s.b.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.c.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,s.c.ARIA_CHECKED,"true"),this.selectedIndex_=t},u.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,s.c.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},u.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===s.b.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")},u.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},u.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==s.b.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)},u.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)},u.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return 0<=t&&t<e},u.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},u.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.adapter_.isCheckboxCheckedAtIndex(t);e&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter_.setAttributeForElementIndex(t,s.c.ARIA_CHECKED,n?"true":"false");var i=this.selectedIndex_===s.b.UNSET_INDEX?[]:this.selectedIndex_.slice();n?i.push(t):i=i.filter((function(e){return e!==t})),this.selectedIndex_=i},u);function u(t){var e=i.call(this,o.a({},u.defaultAdapter,t))||this;return e.wrapFocus_=!1,e.isVertical_=!0,e.isSingleSelectionList_=!1,e.selectedIndex_=s.b.UNSET_INDEX,e.focusedItemIndex_=s.b.UNSET_INDEX,e.useActivatedClass_=!1,e.ariaCurrentAttrValue_=null,e.isCheckboxList_=!1,e.isRadioList_=!1,e}},18:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i,o=n(0),r=n(5),s=n(8),a=n(1),c=n(14),u=(i=r.a,o.b(d,i),Object.defineProperty(d.prototype,"vertical",{set:function(t){this.foundation_.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"listElements",{get:function(){return[].slice.call(this.root_.querySelectorAll("."+a.a.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"wrapFocus",{set:function(t){this.foundation_.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"singleSelection",{set:function(t){this.foundation_.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"selectedIndex",{get:function(){return this.foundation_.getSelectedIndex()},set:function(t){this.foundation_.setSelectedIndex(t)},enumerable:!0,configurable:!0}),d.attachTo=function(t){return new d(t)},d.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()},d.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},d.prototype.layout=function(){var t=this.root_.getAttribute(a.c.ARIA_ORIENTATION);this.vertical=t!==a.c.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(a.c.FOCUSABLE_CHILD_ELEMENTS)).forEach((function(t){return t.setAttribute("tabindex","-1")})),this.foundation_.layout()},d.prototype.initializeListType=function(){var t=this,e=this.root_.querySelectorAll(a.c.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root_.querySelector("\n ."+a.a.LIST_ITEM_ACTIVATED_CLASS+",\n ."+a.a.LIST_ITEM_SELECTED_CLASS+"\n "),i=this.root_.querySelector(a.c.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var o=this.root_.querySelectorAll(a.c.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(o,(function(e){return t.listElements.indexOf(e)}))}else n?(n.classList.contains(a.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(n)):i&&(this.selectedIndex=this.listElements.indexOf(i))},d.prototype.setEnabled=function(t,e){this.foundation_.setEnabled(t,e)},d.prototype.getDefaultFoundation=function(){var t=this,e={addClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.add(n)},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},getAttributeForElementIndex:function(e,n){return t.listElements[e].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(a.c.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(a.c.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(a.c.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root_.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root_},notifyAction:function(e){t.emit(a.c.ACTION_EVENT,{index:e},!0)},removeClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.remove(n)},setAttributeForElementIndex:function(e,n,i){var o=t.listElements[e];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(e,n){var i=t.listElements[e].querySelector(a.c.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(e,n){var i=t.listElements[e];[].slice.call(i.querySelectorAll(a.c.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach((function(t){return t.setAttribute("tabindex",n)}))}};return new c.a(e)},d.prototype.getListItemIndex_=function(t){var e=t.target,n=Object(s.a)(e,"."+a.a.LIST_ITEM_CLASS+", ."+a.a.ROOT);return n&&Object(s.b)(n,"."+a.a.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},d.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusIn(t,e)},d.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation_.handleFocusOut(t,e)},d.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation_.handleKeydown(t,n.classList.contains(a.a.LIST_ITEM_CLASS),e)},d.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!Object(s.b)(n,a.c.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(e,i)},d);function d(){return null!==i&&i.apply(this,arguments)||this}},19:function(t,e,n){var i,o,r=n(25),s=n(26),a=(o=[],{activateTrap:function(t){if(0<o.length){var e=o[o.length-1];e!==t&&e.pause()}var n=o.indexOf(t);-1===n||o.splice(n,1),o.push(t)},deactivateTrap:function(t){var e=o.indexOf(t);-1!==e&&o.splice(e,1),0<o.length&&o[o.length-1].unpause()}});function c(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,o="string"==typeof t?n.querySelector(t):t,u=s({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),d={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},l={activate:function(t){if(!d.active){y(),d.active=!0,d.paused=!1,d.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:u.onActivate;return e&&e(),h(),l}},deactivate:f,pause:function(){!d.paused&&d.active&&(d.paused=!0,p())},unpause:function(){d.paused&&d.active&&(d.paused=!1,y(),h())}};return l;function f(t){if(d.active){clearTimeout(i),p(),d.active=!1,d.paused=!1,a.deactivateTrap(l);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:u.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:u.returnFocusOnDeactivate)&&c((function(){C(d.nodeFocusedBeforeActivation)})),l}}function h(){if(d.active)return a.activateTrap(l),i=c((function(){C(m())})),n.addEventListener("focusin",I,!0),n.addEventListener("mousedown",E,{capture:!0,passive:!1}),n.addEventListener("touchstart",E,{capture:!0,passive:!1}),n.addEventListener("click",b,{capture:!0,passive:!1}),n.addEventListener("keydown",v,{capture:!0,passive:!1}),l}function p(){if(d.active)return n.removeEventListener("focusin",I,!0),n.removeEventListener("mousedown",E,!0),n.removeEventListener("touchstart",E,!0),n.removeEventListener("click",b,!0),n.removeEventListener("keydown",v,!0),l}function _(t){var e=u[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function m(){var t;if(!(t=null!==_("initialFocus")?_("initialFocus"):o.contains(n.activeElement)?n.activeElement:d.firstTabbableNode||_("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function E(t){o.contains(t.target)||(u.clickOutsideDeactivates?f({returnFocus:!r.isFocusable(t.target)}):t.preventDefault())}function I(t){o.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),C(d.mostRecentlyFocusedNode||m()))}function v(t){if(!1!==u.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void f();!function(t){return"Tab"===t.key||9===t.keyCode}(t)||function(t){if(y(),t.shiftKey&&t.target===d.firstTabbableNode)return t.preventDefault(),C(d.lastTabbableNode);t.shiftKey||t.target!==d.lastTabbableNode||(t.preventDefault(),C(d.firstTabbableNode))}(t)}function b(t){u.clickOutsideDeactivates||o.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function y(){var t=r(o);d.firstTabbableNode=t[0]||m(),d.lastTabbableNode=t[t.length-1]||m()}function C(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(d.mostRecentlyFocusedNode=t)&&t.select()):C(m()))}}},2:function(t,e,n){"use strict";var i={inheritAttrs:!1},o=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],r={props:{theming:{type:String,default:""}},mounted:function(){-1<o.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}))},25:function(t,e){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],i=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function r(t,e){e=e||{};var n,r,a,c=[],l=[],f=t.querySelectorAll(i);for(e.includeContainer&&o.call(t,i)&&(f=Array.prototype.slice.apply(f)).unshift(t),n=0;n<f.length;n++)s(r=f[n])&&(0===(a=u(r))?c.push(r):l.push({documentOrder:n,tabIndex:a,node:r}));return l.sort(d).map((function(t){return t.node})).concat(c)}function s(t){return!(!a(t)||function(t){return function(t){return l(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e=function(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}(t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'));return!e||e===t}(t)}(t)||u(t)<0)}function a(t){return!(t.disabled||function(t){return l(t)&&"hidden"===t.type}(t)||function(t){return null===t.offsetParent||"hidden"===getComputedStyle(t).visibility}(t))}r.isTabbable=function(t){if(!t)throw new Error("No node provided");return!1!==o.call(t,i)&&s(t)},r.isFocusable=function(t){if(!t)throw new Error("No node provided");return!1!==o.call(t,c)&&a(t)};var c=n.concat("iframe").join(",");function u(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:t.tabIndex:e}function d(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function l(t){return"INPUT"===t.tagName}t.exports=r},26:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var o in i)n.call(i,o)&&(t[o]=i[o])}return t};var n=Object.prototype.hasOwnProperty},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));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}},33:function(t,e,n){},4:function(t,e,n){"use strict";function i(t,e,n,i,o,r,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},5:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),o=n(3),r=(s.attachTo=function(t){return new s(t,new o.a({}))},s.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},s.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},s.prototype.initialSyncWithDOM=function(){},s.prototype.destroy=function(){this.foundation_.destroy()},s.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},s.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},s.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)},s);function s(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root_=t,this.initialize.apply(this,i.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}},60:function(t,e,n){"use strict";n.r(e);var i,o=n(2),r={mixins:[o.a,o.b]},s=n(4),a=Object(s.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.$slots.default?n("div",t._g({staticClass:"mdc-drawer__content"},t.$listeners),[t._t("default")],2):t._e()}),[],!1,null,null,null).exports,c={mixins:[o.a,o.b],props:{title:{type:String,default:""},subtitle:{type:String,default:""}}},u=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.$slots.default||t.title||t.subtitle?n("div",{staticClass:"mdc-drawer__header"},[t.title?n("h3",{staticClass:"mdc-drawer__title"},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),t.subtitle?n("h6",{staticClass:"mdc-drawer__subtitle"},[t._v("\n "+t._s(t.subtitle)+"\n ")]):t._e(),t._v(" "),t._t("default")],2):t._e()}),[],!1,null,null,null).exports,d=n(0),l=n(5),f=n(18),h=n(14),p=n(19),_=n.n(p),m=n(3),E={ANIMATE:"mdc-drawer--animate",CLOSING:"mdc-drawer--closing",DISMISSIBLE:"mdc-drawer--dismissible",MODAL:"mdc-drawer--modal",OPEN:"mdc-drawer--open",OPENING:"mdc-drawer--opening",ROOT:"mdc-drawer"},I={APP_CONTENT_SELECTOR:".mdc-drawer-app-content",CLOSE_EVENT:"MDCDrawer:closed",OPEN_EVENT:"MDCDrawer:opened",SCRIM_SELECTOR:".mdc-drawer-scrim"},v=(i=m.a,d.b(b,i),Object.defineProperty(b,"strings",{get:function(){return I},enumerable:!0,configurable:!0}),Object.defineProperty(b,"cssClasses",{get:function(){return E},enumerable:!0,configurable:!0}),Object.defineProperty(b,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},elementHasClass:function(){return!1},notifyClose:function(){},notifyOpen:function(){},saveFocus:function(){},restoreFocus:function(){},focusActiveNavigationItem:function(){},trapFocus:function(){},releaseFocus:function(){}}},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){this.animationFrame_&&cancelAnimationFrame(this.animationFrame_),this.animationTimer_&&clearTimeout(this.animationTimer_)},b.prototype.open=function(){var t=this;this.isOpen()||this.isOpening()||this.isClosing()||(this.adapter_.addClass(E.OPEN),this.adapter_.addClass(E.ANIMATE),this.runNextAnimationFrame_((function(){t.adapter_.addClass(E.OPENING)})),this.adapter_.saveFocus())},b.prototype.close=function(){!this.isOpen()||this.isOpening()||this.isClosing()||this.adapter_.addClass(E.CLOSING)},b.prototype.isOpen=function(){return this.adapter_.hasClass(E.OPEN)},b.prototype.isOpening=function(){return this.adapter_.hasClass(E.OPENING)||this.adapter_.hasClass(E.ANIMATE)},b.prototype.isClosing=function(){return this.adapter_.hasClass(E.CLOSING)},b.prototype.handleKeydown=function(t){var e=t.keyCode;"Escape"!==t.key&&27!==e||this.close()},b.prototype.handleTransitionEnd=function(t){var e=E.OPENING,n=E.CLOSING,i=E.OPEN,o=E.ANIMATE,r=E.ROOT;this.isElement_(t.target)&&this.adapter_.elementHasClass(t.target,r)&&(this.isClosing()?(this.adapter_.removeClass(i),this.closed_(),this.adapter_.restoreFocus(),this.adapter_.notifyClose()):(this.adapter_.focusActiveNavigationItem(),this.opened_(),this.adapter_.notifyOpen()),this.adapter_.removeClass(o),this.adapter_.removeClass(e),this.adapter_.removeClass(n))},b.prototype.opened_=function(){},b.prototype.closed_=function(){},b.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},b.prototype.isElement_=function(t){return Boolean(t.classList)},b);function b(t){var e=i.call(this,d.a({},b.defaultAdapter,t))||this;return e.animationFrame_=0,e.animationTimer_=0,e}var y,C=(y=v,d.b(x,y),x.prototype.handleScrimClick=function(){this.close()},x.prototype.opened_=function(){this.adapter_.trapFocus()},x.prototype.closed_=function(){this.adapter_.releaseFocus()},x);function x(){return null!==y&&y.apply(this,arguments)||this}var A,S=v.cssClasses,T=v.strings,O=(A=l.a,d.b(L,A),L.attachTo=function(t){return new L(t)},Object.defineProperty(L.prototype,"open",{get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"list",{get:function(){return this.list_},enumerable:!0,configurable:!0}),L.prototype.initialize=function(t,e){void 0===t&&(t=_.a),void 0===e&&(e=function(t){return new f.a(t)});var n=this.root_.querySelector("."+h.a.cssClasses.ROOT);n&&(this.list_=e(n),this.list_.wrapFocus=!0),this.focusTrapFactory_=t},L.prototype.initialSyncWithDOM=function(){var t=this,e=S.MODAL,n=T.SCRIM_SELECTOR;this.scrim_=this.root_.parentNode.querySelector(n),this.scrim_&&this.root_.classList.contains(e)&&(this.handleScrimClick_=function(){return t.foundation_.handleScrimClick()},this.scrim_.addEventListener("click",this.handleScrimClick_),this.focusTrap_=function(t,e){return void 0===e&&(e=_.a),e(t,{clickOutsideDeactivates:!0,escapeDeactivates:!1,initialFocus:void 0,returnFocusOnDeactivate:!1})}(this.root_,this.focusTrapFactory_)),this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleTransitionEnd_=function(e){return t.foundation_.handleTransitionEnd(e)},this.listen("keydown",this.handleKeydown_),this.listen("transitionend",this.handleTransitionEnd_)},L.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("transitionend",this.handleTransitionEnd_),this.list_&&this.list_.destroy();var t=S.MODAL;this.scrim_&&this.handleScrimClick_&&this.root_.classList.contains(t)&&(this.scrim_.removeEventListener("click",this.handleScrimClick_),this.open=!1)},L.prototype.getDefaultFoundation=function(){var t=this,e={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(){return t.previousFocus_=document.activeElement},restoreFocus:function(){var e=t.previousFocus_;e&&e.focus&&t.root_.contains(document.activeElement)&&e.focus()},focusActiveNavigationItem:function(){var e=t.root_.querySelector("."+h.a.cssClasses.LIST_ITEM_ACTIVATED_CLASS);e&&e.focus()},notifyClose:function(){return t.emit(T.CLOSE_EVENT,{},!0)},notifyOpen:function(){return t.emit(T.OPEN_EVENT,{},!0)},trapFocus:function(){return t.focusTrap_.activate()},releaseFocus:function(){return t.focusTrap_.deactivate()}},n=S.DISMISSIBLE,i=S.MODAL;if(this.root_.classList.contains(n))return new v(e);if(this.root_.classList.contains(i))return new C(e);throw new Error("MDCDrawer: Failed to instantiate component. Supported variants are "+n+" and "+i+".")},L);function L(){return null!==A&&A.apply(this,arguments)||this}var g={mixins:[o.a,o.b],model:{prop:"open",event:"change"},props:{modal:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!1},open:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""}},data:function(){return{mdcDrawer:void 0,hasHeaderClass:!1}},computed:{classes:function(){return{"mdc-drawer--dismissible":this.dismissible,"mdc-drawer--modal":this.modal}},model:{get:function(){return this.open},set:function(t){this.$emit("change",t)}}},watch:{modal:function(){this.modal?this.$nextTick((function(){this.mdcDrawer=new O(this.$el)})):(this.mdcDrawer.destroy(),this.mdcDrawer=void 0)},dismissible:function(){this.dismissible?this.$nextTick((function(){this.mdcDrawer=new O(this.$el)})):(this.mdcDrawer.destroy(),this.mdcDrawer=void 0)},open:function(){this.mdcDrawer.open!==this.open&&(this.mdcDrawer.open=this.open)},"mdcDrawer.open":function(){this.model=this.mdcDrawer.open}},mounted:function(){this.$nextTick((function(){this.mdcDrawer||!this.dismissible&&!this.modal||(this.mdcDrawer=new O(this.$el))}))},provide:{mdcDrawer:void 0},beforeDestroy:function(){this.mdcDrawer&&this.mdcDrawer.destroy()},methods:{onClosed:function(){this.model&&(this.model=!1),this.$emit("closed")},onOpened:function(){this.$emit("opened")}}},w=Object(s.a)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("aside",{staticClass:"mdc-drawer",class:t.classes,on:{"MDCDrawer:closed":t.onClosed,"MDCDrawer:opened":t.onOpened}},[t.$slots.header||""!==t.title||""!==t.subtitle?n("div",{staticClass:"mdc-drawer__header"},[""!==t.title?n("h3",{staticClass:"mdc-drawer__title"},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),""!==t.subtitle?n("h6",{staticClass:"mdc-drawer__subtitle"},[t._v("\n "+t._s(t.subtitle)+"\n ")]):t._e(),t._v(" "),t._t("header")],2):t._e(),t._v(" "),t._t("default")],2)}),[],!1,null,null,null).exports,D={mixins:[o.a,o.b]},F=Object(s.a)(D,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-drawer-scrim"})}),[],!1,null,"394b6427",null).exports,k={mixins:[o.a,o.b]},N=Object(s.a)(k,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-drawer-app-content"},[this._t("default")],2)}),[],!1,null,"ca26afc8",null).exports,R={name:"DrawerList",mixins:[o.a,o.b]},M=Object(s.a)(R,(function(){var t=this.$createElement;return(this._self._c||t)("nav",{staticClass:"mdc-list"},[this._t("default")],2)}),[],!1,null,"2bd8cd3f",null).exports,j=(n(33),n(7)),P={install:function(t){t.component("m-drawer-content",a),t.component("m-drawer-header",u),t.component("m-drawer",w),t.component("m-drawer-scrim",F),t.component("m-drawer-app-content",N),t.component("m-drawer-list",M)}};e.default=P,Object(j.a)(P)},7:function(t,e,n){"use strict";function i(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",(function(){return i}))},8:function(t,e,n){"use strict";function i(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(o(n,e))return n;n=n.parentElement}return null}function o(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}))}},t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(i,o,function(t){return e[t]}.bind(null,o));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=60);function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,n}));