@material/chips
Advanced tools
Comparing version 0.31.0 to 0.32.0
@@ -34,6 +34,21 @@ /** | ||
* @param {string} className | ||
* @return {boolean} | ||
*/ | ||
hasClass(className) {} | ||
/** | ||
* Registers an event handler on the root element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
registerInteractionHandler(evtType, handler) {} | ||
/** | ||
* Deregisters an event handler on the root element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
deregisterInteractionHandler(evtType, handler) {} | ||
} | ||
export default MDCChipSetAdapter; |
@@ -23,2 +23,8 @@ /** | ||
export {strings}; | ||
/** @enum {string} */ | ||
const cssClasses = { | ||
CHOICE: 'mdc-chip-set--choice', | ||
FILTER: 'mdc-chip-set--filter', | ||
}; | ||
export {strings, cssClasses}; |
@@ -20,3 +20,5 @@ /** | ||
import MDCChipSetAdapter from './adapter'; | ||
import {strings} from './constants'; | ||
// eslint-disable-next-line no-unused-vars | ||
import {MDCChip, MDCChipFoundation} from '../chip/index'; | ||
import {strings, cssClasses} from './constants'; | ||
@@ -33,2 +35,7 @@ /** | ||
/** @return enum {string} */ | ||
static get cssClasses() { | ||
return cssClasses; | ||
} | ||
/** | ||
@@ -42,2 +49,4 @@ * {@see MDCChipSetAdapter} for typing information on parameters and return | ||
hasClass: () => {}, | ||
registerInteractionHandler: () => {}, | ||
deregisterInteractionHandler: () => {}, | ||
}); | ||
@@ -51,5 +60,52 @@ } | ||
super(Object.assign(MDCChipSetFoundation.defaultAdapter, adapter)); | ||
/** | ||
* The selected chips in the set. Only used for choice chip set or filter chip set. | ||
* @private {!Array<!MDCChip>} | ||
*/ | ||
this.selectedChips_ = []; | ||
/** @private {function(!Event): undefined} */ | ||
this.chipInteractionHandler_ = (evt) => this.handleChipInteraction_(evt); | ||
} | ||
init() { | ||
this.adapter_.registerInteractionHandler( | ||
MDCChipFoundation.strings.INTERACTION_EVENT, this.chipInteractionHandler_); | ||
} | ||
destroy() { | ||
this.adapter_.deregisterInteractionHandler( | ||
MDCChipFoundation.strings.INTERACTION_EVENT, this.chipInteractionHandler_); | ||
} | ||
/** | ||
* Handles a chip interaction event | ||
* @param {!Object} evt | ||
* @private | ||
*/ | ||
handleChipInteraction_(evt) { | ||
const {chip} = evt.detail; | ||
if (this.adapter_.hasClass(cssClasses.CHOICE)) { | ||
if (this.selectedChips_.length === 0) { | ||
this.selectedChips_[0] = chip; | ||
} else if (this.selectedChips_[0] !== chip) { | ||
this.selectedChips_[0].toggleSelected(); | ||
this.selectedChips_[0] = chip; | ||
} else { | ||
this.selectedChips_ = []; | ||
} | ||
chip.toggleSelected(); | ||
} else if (this.adapter_.hasClass(cssClasses.FILTER)) { | ||
const index = this.selectedChips_.indexOf(chip); | ||
if (index >= 0) { | ||
this.selectedChips_.splice(index, 1); | ||
} else { | ||
this.selectedChips_.push(chip); | ||
} | ||
chip.toggleSelected(); | ||
} | ||
} | ||
} | ||
export default MDCChipSetFoundation; |
@@ -35,3 +35,3 @@ /** | ||
/** @private {!Array<!MDCChip>} */ | ||
/** @type {!Array<!MDCChip>} */ | ||
this.chips; | ||
@@ -68,2 +68,4 @@ } | ||
hasClass: (className) => this.root_.classList.contains(className), | ||
registerInteractionHandler: (evtType, handler) => this.root_.addEventListener(evtType, handler), | ||
deregisterInteractionHandler: (evtType, handler) => this.root_.removeEventListener(evtType, handler), | ||
}))); | ||
@@ -70,0 +72,0 @@ } |
@@ -32,2 +32,21 @@ /** | ||
/** | ||
* Adds a class to the root element. | ||
* @param {string} className | ||
*/ | ||
addClass(className) {} | ||
/** | ||
* Removes a class from the root element. | ||
* @param {string} className | ||
*/ | ||
removeClass(className) {} | ||
/** | ||
* Returns true if the root element contains the given class. | ||
* @param {string} className | ||
* @return {boolean} | ||
*/ | ||
hasClass(className) {} | ||
/** | ||
* Registers an event listener on the root element for a given event. | ||
@@ -47,2 +66,16 @@ * @param {string} evtType | ||
/** | ||
* Registers an event listener on the trailing icon element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
registerTrailingIconInteractionHandler(evtType, handler) {} | ||
/** | ||
* Deregisters an event listener on the trailing icon element for a given event. | ||
* @param {string} evtType | ||
* @param {function(!Event): undefined} handler | ||
*/ | ||
deregisterTrailingIconInteractionHandler(evtType, handler) {} | ||
/** | ||
* Emits a custom "MDCChip:interaction" event denoting the chip has been | ||
@@ -52,4 +85,10 @@ * interacted with (typically on click or keydown). | ||
notifyInteraction() {} | ||
/** | ||
* Emits a custom "MDCChip:trailingIconInteraction" event denoting the trailing icon has been | ||
* interacted with (typically on click or keydown). | ||
*/ | ||
notifyTrailingIconInteraction() {} | ||
} | ||
export default MDCChipAdapter; |
@@ -21,4 +21,11 @@ /** | ||
INTERACTION_EVENT: 'MDCChip:interaction', | ||
TRAILING_ICON_INTERACTION_EVENT: 'MDCChip:trailingIconInteraction', | ||
TRAILING_ICON_SELECTOR: '.mdc-chip__icon--trailing', | ||
}; | ||
export {strings}; | ||
/** @enum {string} */ | ||
const cssClasses = { | ||
SELECTED: 'mdc-chip--selected', | ||
}; | ||
export {strings, cssClasses}; |
@@ -20,3 +20,3 @@ /** | ||
import MDCChipAdapter from './adapter'; | ||
import {strings} from './constants'; | ||
import {strings, cssClasses} from './constants'; | ||
@@ -34,2 +34,7 @@ | ||
/** @return enum {string} */ | ||
static get cssClasses() { | ||
return cssClasses; | ||
} | ||
/** | ||
@@ -42,5 +47,11 @@ * {@see MDCChipAdapter} for typing information on parameters and return | ||
return /** @type {!MDCChipAdapter} */ ({ | ||
addClass: () => {}, | ||
removeClass: () => {}, | ||
hasClass: () => {}, | ||
registerInteractionHandler: () => {}, | ||
deregisterInteractionHandler: () => {}, | ||
registerTrailingIconInteractionHandler: () => {}, | ||
deregisterTrailingIconInteractionHandler: () => {}, | ||
notifyInteraction: () => {}, | ||
notifyTrailingIconInteraction: () => {}, | ||
}); | ||
@@ -57,2 +68,4 @@ } | ||
this.interactionHandler_ = (evt) => this.handleInteraction_(evt); | ||
/** @private {function(!Event): undefined} */ | ||
this.trailingIconInteractionHandler_ = (evt) => this.handleTrailingIconInteraction_(evt); | ||
} | ||
@@ -63,3 +76,7 @@ | ||
this.adapter_.registerInteractionHandler(evtType, this.interactionHandler_); | ||
this.adapter_.registerTrailingIconInteractionHandler(evtType, this.trailingIconInteractionHandler_); | ||
}); | ||
['touchstart', 'pointerdown', 'mousedown'].forEach((evtType) => { | ||
this.adapter_.registerTrailingIconInteractionHandler(evtType, this.trailingIconInteractionHandler_); | ||
}); | ||
} | ||
@@ -70,6 +87,21 @@ | ||
this.adapter_.deregisterInteractionHandler(evtType, this.interactionHandler_); | ||
this.adapter_.deregisterTrailingIconInteractionHandler(evtType, this.trailingIconInteractionHandler_); | ||
}); | ||
['touchstart', 'pointerdown', 'mousedown'].forEach((evtType) => { | ||
this.adapter_.deregisterTrailingIconInteractionHandler(evtType, this.trailingIconInteractionHandler_); | ||
}); | ||
} | ||
/** | ||
* Toggles the selected class on the chip element. | ||
*/ | ||
toggleSelected() { | ||
if (this.adapter_.hasClass(cssClasses.SELECTED)) { | ||
this.adapter_.removeClass(cssClasses.SELECTED); | ||
} else { | ||
this.adapter_.addClass(cssClasses.SELECTED); | ||
} | ||
} | ||
/** | ||
* Handles an interaction event on the root element. | ||
@@ -83,4 +115,16 @@ * @param {!Event} evt | ||
} | ||
/** | ||
* Handles an interaction event on the trailing icon element. This is used to | ||
* prevent the ripple from activating on interaction with the trailing icon. | ||
* @param {!Event} evt | ||
*/ | ||
handleTrailingIconInteraction_(evt) { | ||
evt.stopPropagation(); | ||
if (evt.type === 'click' || evt.key === 'Enter' || evt.keyCode === 13) { | ||
this.adapter_.notifyTrailingIconInteraction(); | ||
} | ||
} | ||
} | ||
export default MDCChipFoundation; |
@@ -54,2 +54,9 @@ /** | ||
/** | ||
* Toggles selected state of the chip. | ||
*/ | ||
toggleSelected() { | ||
this.foundation_.toggleSelected(); | ||
} | ||
/** | ||
* @return {!MDCChipFoundation} | ||
@@ -59,5 +66,22 @@ */ | ||
return new MDCChipFoundation(/** @type {!MDCChipAdapter} */ (Object.assign({ | ||
addClass: (className) => this.root_.classList.add(className), | ||
removeClass: (className) => this.root_.classList.remove(className), | ||
hasClass: (className) => this.root_.classList.contains(className), | ||
registerInteractionHandler: (evtType, handler) => this.root_.addEventListener(evtType, handler), | ||
deregisterInteractionHandler: (evtType, handler) => this.root_.removeEventListener(evtType, handler), | ||
registerTrailingIconInteractionHandler: (evtType, handler) => { | ||
const trailingIconEl = this.root_.querySelector(strings.TRAILING_ICON_SELECTOR); | ||
if (trailingIconEl) { | ||
trailingIconEl.addEventListener(evtType, handler); | ||
} | ||
}, | ||
deregisterTrailingIconInteractionHandler: (evtType, handler) => { | ||
const trailingIconEl = this.root_.querySelector(strings.TRAILING_ICON_SELECTOR); | ||
if (trailingIconEl) { | ||
trailingIconEl.removeEventListener(evtType, handler); | ||
} | ||
}, | ||
notifyInteraction: () => this.emit(strings.INTERACTION_EVENT, {chip: this}, true /* shouldBubble */), | ||
notifyTrailingIconInteraction: () => this.emit( | ||
strings.TRAILING_ICON_INTERACTION_EVENT, {chip: this}, true /* shouldBubble */), | ||
}))); | ||
@@ -64,0 +88,0 @@ } |
@@ -6,3 +6,3 @@ /*! | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.chips=e():(t.mdc=t.mdc||{},t.mdc.chips=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=53)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=o},function(t,e,n){"use strict";function r(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var r=t.getComputedStyle(n),i=null!==r&&"solid"===r.borderTopStyle;return n.remove(),i}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("boolean"==typeof s&&!e)return s;if(t.CSS&&"function"==typeof t.CSS.supports){var n=t.CSS.supports("--css-vars","yes"),i=t.CSS.supports("(--css-vars: yes)")&&t.CSS.supports("color","#00000000");return s=!(!n&&!i||r(t))}}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===c||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){n=!0}})}catch(t){}c=n}return!!c&&{passive:!0}}function o(t){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(e){return e in t}).pop()}function u(t,e,n){var r=e.x,i=e.y,a=r+n.left,o=i+n.top,u=void 0,s=void 0;return"touchstart"===t.type?(u=t.changedTouches[0].pageX-a,s=t.changedTouches[0].pageY-o):(u=t.pageX-a,s=t.pageY-o),{x:u,y:s}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"supportsCssVariables",function(){return i}),n.d(e,"applyPassive",function(){return a}),n.d(e,"getMatchesProperty",function(){return o}),n.d(e,"getNormalizedEventCoords",function(){return u});/** | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.chips=e():(t.mdc=t.mdc||{},t.mdc.chips=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=57)}({0:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=a},1:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=o},17:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return p});var o=n(1),u=n(4),s=(n(29),n(59)),c=n(30);n.d(e,"b",function(){return s.a});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},p=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return s.ripple_=new u.MDCRipple(s.root_),s}return a(e,t),f(e,[{key:"destroy",value:function(){this.ripple_.destroy(),d(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"toggleSelected",value:function(){this.foundation_.toggleSelected()}},{key:"getDefaultFoundation",value:function(){var t=this;return new s.a(l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)},registerTrailingIconInteractionHandler:function(e,n){var r=t.root_.querySelector(c.b.TRAILING_ICON_SELECTOR);r&&r.addEventListener(e,n)},deregisterTrailingIconInteractionHandler:function(e,n){var r=t.root_.querySelector(c.b.TRAILING_ICON_SELECTOR);r&&r.removeEventListener(e,n)},notifyInteraction:function(){return t.emit(c.b.INTERACTION_EVENT,{chip:t},!0)},notifyTrailingIconInteraction:function(){return t.emit(c.b.TRAILING_ICON_INTERACTION_EVENT,{chip:t},!0)}}))}},{key:"ripple",get:function(){return this.ripple_}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},2:function(t,e,n){"use strict";function r(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var r=t.getComputedStyle(n),i=null!==r&&"solid"===r.borderTopStyle;return n.remove(),i}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("boolean"==typeof s&&!e)return s;if(t.CSS&&"function"==typeof t.CSS.supports){var n=t.CSS.supports("--css-vars","yes"),i=t.CSS.supports("(--css-vars: yes)")&&t.CSS.supports("color","#00000000");return s=!(!n&&!i||r(t))}}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===c||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){n=!0}})}catch(t){}c=n}return!!c&&{passive:!0}}function o(t){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(e){return e in t}).pop()}function u(t,e,n){var r=e.x,i=e.y,a=r+n.left,o=i+n.top,u=void 0,s=void 0;return"touchstart"===t.type?(u=t.changedTouches[0].pageX-a,s=t.changedTouches[0].pageY-o):(u=t.pageX-a,s=t.pageY-o),{x:u,y:s}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"supportsCssVariables",function(){return i}),n.d(e,"applyPassive",function(){return a}),n.d(e,"getMatchesProperty",function(){return o}),n.d(e,"getNormalizedEventCoords",function(){return u});/** | ||
* @license | ||
@@ -23,3 +23,3 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var s=void 0,c=void 0},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"browserSupportsCssVars",value:function(){}},{key:"isUnbounded",value:function(){}},{key:"isSurfaceActive",value:function(){}},{key:"isSurfaceDisabled",value:function(){}},{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"containsEventTarget",value:function(t){}},{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}},{key:"registerDocumentInteractionHandler",value:function(t,e){}},{key:"deregisterDocumentInteractionHandler",value:function(t,e){}},{key:"registerResizeHandler",value:function(t){}},{key:"deregisterResizeHandler",value:function(t){}},{key:"updateCssVariable",value:function(t,e){}},{key:"computeBoundingRect",value:function(){}},{key:"getWindowPageOffset",value:function(){}}])}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCRipple",function(){return l}),n.d(e,"RippleCapableSurface",function(){return f});var o=n(1),u=(n(3),n(6)),s=n(2);n.d(e,"MDCRippleFoundation",function(){return u.a}),n.d(e,"util",function(){return s});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var u=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return u.disabled=!1,u.unbounded_,u}return a(e,t),c(e,[{key:"setUnbounded_",value:function(){this.foundation_.setUnbounded(this.unbounded_)}},{key:"activate",value:function(){this.foundation_.activate()}},{key:"deactivate",value:function(){this.foundation_.deactivate()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"getDefaultFoundation",value:function(){return new u.a(e.createAdapter(this))}},{key:"initialSyncWithDOM",value:function(){this.unbounded="mdcRippleIsUnbounded"in this.root_.dataset}},{key:"unbounded",get:function(){return this.unbounded_},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()}}],[{key:"attachTo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isUnbounded,i=void 0===r?void 0:r,a=new e(t);return void 0!==i&&(a.unbounded=i),a}},{key:"createAdapter",value:function(t){var e=s.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return s.supportsCssVariables(window)},isUnbounded:function(){return t.unbounded},isSurfaceActive:function(){return t.root_[e](":active")},isSurfaceDisabled:function(){return t.disabled},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},containsEventTarget:function(e){return t.root_.contains(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,s.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,s.applyPassive())},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,s.applyPassive())},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,s.applyPassive())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),e}(o.a),f=function t(){r(this,t)};f.prototype.root_,f.prototype.unbounded,f.prototype.disabled},,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(3),n(7)),s=n(2),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup"],p=[],v=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.layoutFrame_=0,n.frame_={width:0,height:0},n.activationState_=n.defaultActivationState_(),n.initialSize_=0,n.maxRadius_=0,n.activateHandler_=function(t){return n.activate_(t)},n.deactivateHandler_=function(t){return n.deactivate_(t)},n.focusHandler_=function(){return requestAnimationFrame(function(){return n.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},n.blurHandler_=function(){return requestAnimationFrame(function(){return n.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},n.resizeHandler_=function(){return n.layout()},n.unboundedCoords_={left:0,top:0},n.fgScale_=0,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.activationAnimationHasEnded_=!1,n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.previousActivationEvent_=null,n}return a(e,t),l(e,null,[{key:"cssClasses",get:function(){return u.a}},{key:"strings",get:function(){return u.c}},{key:"numbers",get:function(){return u.b}},{key:"defaultAdapter",get:function(){return{browserSupportsCssVars:function(){},isUnbounded:function(){},isSurfaceActive:function(){},isSurfaceDisabled:function(){},addClass:function(){},removeClass:function(){},containsEventTarget:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDocumentInteractionHandler:function(){},deregisterDocumentInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},updateCssVariable:function(){},computeBoundingRect:function(){},getWindowPageOffset:function(){}}}}]),l(e,[{key:"isSupported_",value:function(){return this.adapter_.browserSupportsCssVars()}},{key:"defaultActivationState_",value:function(){return{isActivated:!1,hasDeactivationUXRun:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1,activationEvent:null,isProgrammatic:!1}}},{key:"init",value:function(){var t=this;if(this.isSupported_()){this.registerRootHandlers_();var n=e.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(r),t.adapter_.isUnbounded()&&t.adapter_.addClass(i),t.layoutInternal_()})}}},{key:"destroy",value:function(){var t=this;if(this.isSupported_()){this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_();var n=e.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(r),t.adapter_.removeClass(i),t.removeCssVars_()})}}},{key:"registerRootHandlers_",value:function(){var t=this;f.forEach(function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)}),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),this.adapter_.registerResizeHandler(this.resizeHandler_)}},{key:"registerDeactivationHandlers_",value:function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})}},{key:"deregisterRootHandlers_",value:function(){var t=this;f.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"deregisterDeactivationHandlers_",value:function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})}},{key:"removeCssVars_",value:function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})}},{key:"activate_",value:function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var r=this.previousActivationEvent_;if(!(r&&t&&r.type!==t.type)){n.isActivated=!0,n.isProgrammatic=null===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type);if(t&&p.length>0&&p.some(function(t){return e.adapter_.containsEventTarget(t)}))return void this.resetActivationState_();t&&(p.push(t.target),this.registerDeactivationHandlers_(t)),requestAnimationFrame(function(){n.wasElementMadeActive=!t||"keydown"!==t.type||e.adapter_.isSurfaceActive(),n.wasElementMadeActive?e.animateActivation_():e.activationState_=e.defaultActivationState_(),p=[]})}}}}},{key:"activate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activate_(t)}},{key:"animateActivation_",value:function(){var t=this,n=e.strings,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,o=a.FG_DEACTIVATION,u=a.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS,c="",l="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),d=f.startPoint,p=f.endPoint;c=d.x+"px, "+d.y+"px",l=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(r,c),this.adapter_.updateCssVariable(i,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(o),this.adapter_.computeBoundingRect(),this.adapter_.addClass(u),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},s)}},{key:"getFgTranslationCoordinates_",value:function(){var t=this.activationState_,e=t.activationEvent,n=t.wasActivatedByPointer,r=void 0;return r=n?Object(s.getNormalizedEventCoords)(e,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},r={x:r.x-this.initialSize_/2,y:r.y-this.initialSize_/2},{startPoint:r,endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}}},{key:"runDeactivationUXLogicIfReady_",value:function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,r=this.activationState_,i=r.hasDeactivationUXRun,a=r.isActivated;(i||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},u.b.FG_DEACTIVATION_MS))}},{key:"rmBoundedActivationClasses_",value:function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()}},{key:"resetActivationState_",value:function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=null},e.numbers.TAP_DELAY_MS)}},{key:"deactivate_",value:function(t){var e=this,n=this.activationState_;if(n.isActivated){var r=c({},n);if(n.isProgrammatic){requestAnimationFrame(function(){return e.animateDeactivation_(null,r)}),this.resetActivationState_()}else this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(t,r),e.resetActivationState_()})}}},{key:"deactivate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.deactivate_(t)}},{key:"animateDeactivation_",value:function(t,e){var n=e.wasActivatedByPointer,r=e.wasElementMadeActive;(n||r)&&this.runDeactivationUXLogicIfReady_()}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING}(),this.initialSize_=n*e.numbers.INITIAL_ORIGIN_SCALE,this.fgScale_=this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var t=e.strings,n=t.VAR_FG_SIZE,r=t.VAR_LEFT,i=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))}},{key:"setUnbounded",value:function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}}]),e}(o.a);e.a=v},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});/** | ||
var s=void 0,c=void 0},29:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"hasClass",value:function(t){}},{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}},{key:"registerTrailingIconInteractionHandler",value:function(t,e){}},{key:"deregisterTrailingIconInteractionHandler",value:function(t,e){}},{key:"notifyInteraction",value:function(){}},{key:"notifyTrailingIconInteraction",value:function(){}}])}()},3:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"browserSupportsCssVars",value:function(){}},{key:"isUnbounded",value:function(){}},{key:"isSurfaceActive",value:function(){}},{key:"isSurfaceDisabled",value:function(){}},{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"containsEventTarget",value:function(t){}},{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}},{key:"registerDocumentInteractionHandler",value:function(t,e){}},{key:"deregisterDocumentInteractionHandler",value:function(t,e){}},{key:"registerResizeHandler",value:function(t){}},{key:"deregisterResizeHandler",value:function(t){}},{key:"updateCssVariable",value:function(t,e){}},{key:"computeBoundingRect",value:function(){}},{key:"getWindowPageOffset",value:function(){}}])}()},30:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});/** | ||
* @license | ||
@@ -40,3 +40,3 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var r={ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded",BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation"},i={VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end"},a={PADDING:10,INITIAL_ORIGIN_SCALE:.6,DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,TAP_DELAY_MS:300}},,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return p});var o=n(1),u=n(4),s=(n(26),n(55)),c=n(27);n.d(e,"b",function(){return s.a});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},p=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return s.ripple_=new u.MDCRipple(s.root_),s}return a(e,t),f(e,[{key:"destroy",value:function(){this.ripple_.destroy(),d(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"getDefaultFoundation",value:function(){var t=this;return new s.a(l({registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)},notifyInteraction:function(){return t.emit(c.a.INTERACTION_EVENT,{chip:t},!0)}}))}},{key:"ripple",get:function(){return this.ripple_}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}},{key:"notifyInteraction",value:function(){}}])}()},function(t,e,n){"use strict";n.d(e,"a",function(){return r});/** | ||
var r={INTERACTION_EVENT:"MDCChip:interaction",TRAILING_ICON_INTERACTION_EVENT:"MDCChip:trailingIconInteraction",TRAILING_ICON_SELECTOR:".mdc-chip__icon--trailing"},i={SELECTED:"mdc-chip--selected"}},31:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"hasClass",value:function(t){}},{key:"registerInteractionHandler",value:function(t,e){}},{key:"deregisterInteractionHandler",value:function(t,e){}}])}()},4:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCRipple",function(){return l}),n.d(e,"RippleCapableSurface",function(){return f});var o=n(1),u=(n(3),n(5)),s=n(2);n.d(e,"MDCRippleFoundation",function(){return u.a}),n.d(e,"util",function(){return s});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var u=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return u.disabled=!1,u.unbounded_,u}return a(e,t),c(e,[{key:"setUnbounded_",value:function(){this.foundation_.setUnbounded(this.unbounded_)}},{key:"activate",value:function(){this.foundation_.activate()}},{key:"deactivate",value:function(){this.foundation_.deactivate()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"getDefaultFoundation",value:function(){return new u.a(e.createAdapter(this))}},{key:"initialSyncWithDOM",value:function(){this.unbounded="mdcRippleIsUnbounded"in this.root_.dataset}},{key:"unbounded",get:function(){return this.unbounded_},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()}}],[{key:"attachTo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isUnbounded,i=void 0===r?void 0:r,a=new e(t);return void 0!==i&&(a.unbounded=i),a}},{key:"createAdapter",value:function(t){var e=s.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return s.supportsCssVariables(window)},isUnbounded:function(){return t.unbounded},isSurfaceActive:function(){return t.root_[e](":active")},isSurfaceDisabled:function(){return t.disabled},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},containsEventTarget:function(e){return t.root_.contains(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,s.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,s.applyPassive())},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,s.applyPassive())},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,s.applyPassive())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),e}(o.a),f=function t(){r(this,t)};f.prototype.root_,f.prototype.unbounded,f.prototype.disabled},5:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(3),n(6)),s=n(2),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup"],p=[],v=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.layoutFrame_=0,n.frame_={width:0,height:0},n.activationState_=n.defaultActivationState_(),n.initialSize_=0,n.maxRadius_=0,n.activateHandler_=function(t){return n.activate_(t)},n.deactivateHandler_=function(t){return n.deactivate_(t)},n.focusHandler_=function(){return requestAnimationFrame(function(){return n.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},n.blurHandler_=function(){return requestAnimationFrame(function(){return n.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},n.resizeHandler_=function(){return n.layout()},n.unboundedCoords_={left:0,top:0},n.fgScale_=0,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.activationAnimationHasEnded_=!1,n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.previousActivationEvent_=null,n}return a(e,t),l(e,null,[{key:"cssClasses",get:function(){return u.a}},{key:"strings",get:function(){return u.c}},{key:"numbers",get:function(){return u.b}},{key:"defaultAdapter",get:function(){return{browserSupportsCssVars:function(){},isUnbounded:function(){},isSurfaceActive:function(){},isSurfaceDisabled:function(){},addClass:function(){},removeClass:function(){},containsEventTarget:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDocumentInteractionHandler:function(){},deregisterDocumentInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},updateCssVariable:function(){},computeBoundingRect:function(){},getWindowPageOffset:function(){}}}}]),l(e,[{key:"isSupported_",value:function(){return this.adapter_.browserSupportsCssVars()}},{key:"defaultActivationState_",value:function(){return{isActivated:!1,hasDeactivationUXRun:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1,activationEvent:null,isProgrammatic:!1}}},{key:"init",value:function(){var t=this;if(this.isSupported_()){this.registerRootHandlers_();var n=e.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(r),t.adapter_.isUnbounded()&&t.adapter_.addClass(i),t.layoutInternal_()})}}},{key:"destroy",value:function(){var t=this;if(this.isSupported_()){this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_();var n=e.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(r),t.adapter_.removeClass(i),t.removeCssVars_()})}}},{key:"registerRootHandlers_",value:function(){var t=this;f.forEach(function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)}),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),this.adapter_.registerResizeHandler(this.resizeHandler_)}},{key:"registerDeactivationHandlers_",value:function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})}},{key:"deregisterRootHandlers_",value:function(){var t=this;f.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"deregisterDeactivationHandlers_",value:function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})}},{key:"removeCssVars_",value:function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})}},{key:"activate_",value:function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var r=this.previousActivationEvent_;if(!(r&&t&&r.type!==t.type)){n.isActivated=!0,n.isProgrammatic=null===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type);if(t&&p.length>0&&p.some(function(t){return e.adapter_.containsEventTarget(t)}))return void this.resetActivationState_();t&&(p.push(t.target),this.registerDeactivationHandlers_(t)),requestAnimationFrame(function(){n.wasElementMadeActive=!t||"keydown"!==t.type||e.adapter_.isSurfaceActive(),n.wasElementMadeActive?e.animateActivation_():e.activationState_=e.defaultActivationState_(),p=[]})}}}}},{key:"activate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activate_(t)}},{key:"animateActivation_",value:function(){var t=this,n=e.strings,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,o=a.FG_DEACTIVATION,u=a.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS,c="",l="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),d=f.startPoint,p=f.endPoint;c=d.x+"px, "+d.y+"px",l=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(r,c),this.adapter_.updateCssVariable(i,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(o),this.adapter_.computeBoundingRect(),this.adapter_.addClass(u),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},s)}},{key:"getFgTranslationCoordinates_",value:function(){var t=this.activationState_,e=t.activationEvent,n=t.wasActivatedByPointer,r=void 0;return r=n?Object(s.getNormalizedEventCoords)(e,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},r={x:r.x-this.initialSize_/2,y:r.y-this.initialSize_/2},{startPoint:r,endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}}},{key:"runDeactivationUXLogicIfReady_",value:function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,r=this.activationState_,i=r.hasDeactivationUXRun,a=r.isActivated;(i||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},u.b.FG_DEACTIVATION_MS))}},{key:"rmBoundedActivationClasses_",value:function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()}},{key:"resetActivationState_",value:function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=null},e.numbers.TAP_DELAY_MS)}},{key:"deactivate_",value:function(t){var e=this,n=this.activationState_;if(n.isActivated){var r=c({},n);if(n.isProgrammatic){requestAnimationFrame(function(){return e.animateDeactivation_(null,r)}),this.resetActivationState_()}else this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(t,r),e.resetActivationState_()})}}},{key:"deactivate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.deactivate_(t)}},{key:"animateDeactivation_",value:function(t,e){var n=e.wasActivatedByPointer,r=e.wasElementMadeActive;(n||r)&&this.runDeactivationUXLogicIfReady_()}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING}(),this.initialSize_=n*e.numbers.INITIAL_ORIGIN_SCALE,this.fgScale_=this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var t=e.strings,n=t.VAR_FG_SIZE,r=t.VAR_LEFT,i=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))}},{key:"setUnbounded",value:function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}}]),e}(o.a);e.a=v},57:function(t,e,n){t.exports=n(58)},58:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(60);n.d(e,"MDCChipFoundation",function(){return r.b}),n.d(e,"MDCChip",function(){return r.a}),n.d(e,"MDCChipSetFoundation",function(){return i.b}),n.d(e,"MDCChipSet",function(){return i.a})},59:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(29),n(30)),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s(e.defaultAdapter,t)));return n.interactionHandler_=function(t){return n.handleInteraction_(t)},n.trailingIconInteractionHandler_=function(t){return n.handleTrailingIconInteraction_(t)},n}return a(e,t),c(e,null,[{key:"strings",get:function(){return u.b}},{key:"cssClasses",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerTrailingIconInteractionHandler:function(){},deregisterTrailingIconInteractionHandler:function(){},notifyInteraction:function(){},notifyTrailingIconInteraction:function(){}}}}]),c(e,[{key:"init",value:function(){var t=this;["click","keydown"].forEach(function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_),t.adapter_.registerTrailingIconInteractionHandler(e,t.trailingIconInteractionHandler_)}),["touchstart","pointerdown","mousedown"].forEach(function(e){t.adapter_.registerTrailingIconInteractionHandler(e,t.trailingIconInteractionHandler_)})}},{key:"destroy",value:function(){var t=this;["click","keydown"].forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_),t.adapter_.deregisterTrailingIconInteractionHandler(e,t.trailingIconInteractionHandler_)}),["touchstart","pointerdown","mousedown"].forEach(function(e){t.adapter_.deregisterTrailingIconInteractionHandler(e,t.trailingIconInteractionHandler_)})}},{key:"toggleSelected",value:function(){this.adapter_.hasClass(u.a.SELECTED)?this.adapter_.removeClass(u.a.SELECTED):this.adapter_.addClass(u.a.SELECTED)}},{key:"handleInteraction_",value:function(t){"click"!==t.type&&"Enter"!==t.key&&13!==t.keyCode||this.adapter_.notifyInteraction()}},{key:"handleTrailingIconInteraction_",value:function(t){t.stopPropagation(),"click"!==t.type&&"Enter"!==t.key&&13!==t.keyCode||this.adapter_.notifyTrailingIconInteraction()}}]),e}(o.a);e.a=l},6:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});/** | ||
* @license | ||
@@ -57,3 +57,3 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var r={INTERACTION_EVENT:"MDCChip:interaction"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){function t(){r(this,t)}i(t,[{key:"hasClass",value:function(t){}}])}()},,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(54)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(25),i=n(56);n.d(e,"MDCChipFoundation",function(){return r.b}),n.d(e,"MDCChip",function(){return r.a}),n.d(e,"MDCChipSetFoundation",function(){return i.b}),n.d(e,"MDCChipSet",function(){return i.a})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(26),n(27)),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s(e.defaultAdapter,t)));return n.interactionHandler_=function(t){return n.handleInteraction_(t)},n}return a(e,t),c(e,null,[{key:"strings",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyInteraction:function(){}}}}]),c(e,[{key:"init",value:function(){var t=this;["click","keydown"].forEach(function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)})}},{key:"destroy",value:function(){var t=this;["click","keydown"].forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_)})}},{key:"handleInteraction_",value:function(t){"click"!==t.type&&"Enter"!==t.key&&13!==t.keyCode||this.adapter_.notifyInteraction()}}]),e}(o.a);e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return f});var o=n(1),u=(n(28),n(57)),s=n(25);n.d(e,"b",function(){return u.a});var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var u=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return u.chips,u}return a(e,t),l(e,[{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return new s.a(t)};this.chips=this.instantiateChips_(t)}},{key:"destroy",value:function(){this.chips.forEach(function(t){t.destroy()})}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a(c({hasClass:function(e){return t.root_.classList.contains(e)}}))}},{key:"instantiateChips_",value:function(t){return[].slice.call(this.root_.querySelectorAll(u.a.strings.CHIP_SELECTOR)).map(function(e){return t(e)})}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(28),n(58)),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s(e.defaultAdapter,t)))}return a(e,t),c(e,null,[{key:"strings",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{hasClass:function(){}}}}]),e}(o.a);e.a=l},function(t,e,n){"use strict";n.d(e,"a",function(){return r});/** | ||
var r={ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded",BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation"},i={VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end"},a={PADDING:10,INITIAL_ORIGIN_SCALE:.6,DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,TAP_DELAY_MS:300}},60:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return f});var o=n(1),u=(n(31),n(61)),s=n(17);n.d(e,"b",function(){return u.a});var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t){function e(){var t;r(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var u=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a)));return u.chips,u}return a(e,t),l(e,[{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return new s.a(t)};this.chips=this.instantiateChips_(t)}},{key:"destroy",value:function(){this.chips.forEach(function(t){t.destroy()})}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a(c({hasClass:function(e){return t.root_.classList.contains(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)}}))}},{key:"instantiateChips_",value:function(t){return[].slice.call(this.root_.querySelectorAll(u.a.strings.CHIP_SELECTOR)).map(function(e){return t(e)})}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},61:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(0),u=(n(31),n(17)),s=n(62),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.selectedChips_=[],n.chipInteractionHandler_=function(t){return n.handleChipInteraction_(t)},n}return a(e,t),l(e,null,[{key:"strings",get:function(){return s.b}},{key:"cssClasses",get:function(){return s.a}},{key:"defaultAdapter",get:function(){return{hasClass:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}}}]),l(e,[{key:"init",value:function(){this.adapter_.registerInteractionHandler(u.b.strings.INTERACTION_EVENT,this.chipInteractionHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler(u.b.strings.INTERACTION_EVENT,this.chipInteractionHandler_)}},{key:"handleChipInteraction_",value:function(t){var e=t.detail.chip;if(this.adapter_.hasClass(s.a.CHOICE))0===this.selectedChips_.length?this.selectedChips_[0]=e:this.selectedChips_[0]!==e?(this.selectedChips_[0].toggleSelected(),this.selectedChips_[0]=e):this.selectedChips_=[],e.toggleSelected();else if(this.adapter_.hasClass(s.a.FILTER)){var n=this.selectedChips_.indexOf(e);n>=0?this.selectedChips_.splice(n,1):this.selectedChips_.push(e),e.toggleSelected()}}}]),e}(o.a);e.a=f},62:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});/** | ||
* @license | ||
@@ -74,3 +74,3 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var r={CHIP_SELECTOR:".mdc-chip"}}])}); | ||
var r={CHIP_SELECTOR:".mdc-chip"},i={CHOICE:"mdc-chip-set--choice",FILTER:"mdc-chip-set--filter"}}})}); | ||
//# sourceMappingURL=mdc.chips.min.js.map |
{ | ||
"name": "@material/chips", | ||
"description": "The Material Components for the Web chips component", | ||
"version": "0.31.0", | ||
"version": "0.32.0", | ||
"license": "Apache 2.0", | ||
@@ -20,4 +20,4 @@ "keywords": [ | ||
"@material/base": "^0.29.0", | ||
"@material/ripple": "^0.31.0" | ||
"@material/ripple": "^0.32.0" | ||
} | ||
} |
@@ -82,2 +82,4 @@ <!--docs: | ||
`mdc-chip-set` | Mandatory. Indicates the set that the chip belongs to | ||
`mdc-chip-set--choice` | Optional. Indicates that the chips in the set are choice chips, which allow a single selection from a set of options. | ||
`mdc-chip-set--filter` | Optional. Indicates that the chips in the set are filter chips, which allow multiple selection from a set of options. | ||
`mdc-chip` | Mandatory. | ||
@@ -97,2 +99,3 @@ `mdc-chip__text` | Mandatory. Indicates the text content of the chip | ||
--- | --- | ||
`mdc-chip-set-spacing($gap-size)` | Customizes the amount of space between each chip in the set | ||
`mdc-chip-corner-radius($radius)` | Customizes the corner radius for a chip | ||
@@ -102,2 +105,3 @@ `mdc-chip-fill-color-accessible($color)` | Customizes the background fill color for a chip, and updates the chip's ink and ripple color to meet accessibility standards | ||
`mdc-chip-ink-color($color)` | Customizes the text ink color for a chip, and updates the chip's ripple color to match | ||
`mdc-chip-selected-ink-color($color)` | Customizes text ink and ripple color of a chip in the _selected_ state | ||
`mdc-chip-stroke($width, $style, $color)` | Customizes the border stroke properties for a chip | ||
@@ -108,2 +112,4 @@ `mdc-chip-stroke-width($width)` | Customizes the border stroke width for a chip | ||
> _NOTE_: `mdc-chip-set-spacing` also sets the amount of space between a chip and the edge of the set it's contained in. | ||
### `MDCChip` and `MDCChipSet` | ||
@@ -119,2 +125,6 @@ | ||
Method Signature | Description | ||
--- | --- | ||
`toggleSelected() => void` | Proxies to the foundation's `toggleSelected` method | ||
Property | Value Type | Description | ||
@@ -136,5 +146,11 @@ --- | --- | --- | ||
--- | --- | ||
`addClass(className: string) => void` | Adds a class to the root element | ||
`removeClass(className: string) => void` | Removes a class from the root element | ||
`hasClass(className: string) => boolean` | Returns true if the root element contains the given class | ||
`registerInteractionHandler(evtType: string, handler: EventListener) => void` | Registers an event listener on the root element | ||
`deregisterInteractionHandler(evtType: string, handler: EventListener) => void` | Deregisters an event listener on the root element | ||
`notifyInteraction() => void` | Emits a custom event "MDCChip:interaction" denoting the chip has been interacted with, which bubbles to the parent `mdc-chip-set` element | ||
`registerTrailingIconInteractionHandler(evtType: string, handler: EventListener) => void` | Registers an event listener on the trailing icon element | ||
`deregisterTrailingIconInteractionHandler(evtType: string, handler: EventListener) => void` | Deregisters an event listener on the trailing icon element | ||
`notifyInteraction() => void` | Emits a custom event `MDCChip:interaction` denoting the chip has been interacted with, which bubbles to the parent `mdc-chip-set` element | ||
`notifyTrailingIconInteraction() => void` | Emits a custom event `MDCChip:trailingIconInteraction` denoting the chip's trailing icon has been interacted with, which bubbles to the parent `mdc-chip-set` element | ||
@@ -146,2 +162,4 @@ #### `MDCChipSetAdapter` | ||
`hasClass(className: string) => boolean` | Returns whether the chip set element has the given class | ||
`registerInteractionHandler(evtType, handler) => void` | Registers an event handler on the root element for a given event | ||
`deregisterInteractionHandler(evtType, handler) => void` | Deregisters an event handler on the root element for a given event | ||
@@ -151,5 +169,8 @@ ### Foundations: `MDCChipFoundation` and `MDCChipSetFoundation` | ||
#### `MDCChipFoundation` | ||
None yet, coming soon. | ||
Method Signature | Description | ||
--- | --- | ||
`toggleSelected() => void` | Toggles the selected class on the chip element | ||
#### `MDCChipSetFoundation` | ||
None yet, coming soon. |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
181910
20
3185
169
+ Added@material/ripple@0.32.0(transitive)
- Removed@material/ripple@0.31.0(transitive)
Updated@material/ripple@^0.32.0