@material/chips
Version:
The Material Components for the Web chips component
1 lines • 97.6 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("@material/chips",[],e):"object"==typeof exports?exports.chips=e():(t.mdc=t.mdc||{},t.mdc.chips=e())}(this,function(){return n={},o.m=i=[function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MDCFoundation=void 0;var n=(Object.defineProperty(o,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),o.prototype.init=function(){},o.prototype.destroy=function(){},o);function o(t){void 0===t&&(t={}),this.adapter=t}e.MDCFoundation=n,e.default=n},function(t,e,i){"use strict";var o=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,r=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=r.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return s},r=this&&this.__spreadArray||function(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCComponent=void 0;var n=i(0),s=(a.attachTo=function(t){return new a(t,new n.MDCFoundation({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation.destroy()},a.prototype.listen=function(t,e,i){this.root.addEventListener(t,e,i)},a.prototype.unlisten=function(t,e,i){this.root.removeEventListener(t,e,i)},a.prototype.emit=function(t,e,i){var n;void 0===i&&(i=!1),"function"==typeof CustomEvent?n=new CustomEvent(t,{bubbles:i,detail:e}):(n=document.createEvent("CustomEvent")).initCustomEvent(t,i,!1,e),this.root.dispatchEvent(n)},a);function a(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];this.root=t,this.initialize.apply(this,r([],o(i))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}e.MDCComponent=s,e.default=s},function(t,e,i){"use strict";function n(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.estimateScrollWidth=e.matches=e.closest=void 0,e.closest=function(t,e){if(t.closest)return t.closest(e);for(var i=t;i;){if(n(i,e))return i;i=i.parentElement}return null},e.matches=n,e.estimateScrollWidth=function(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var i=e.cloneNode(!0);i.style.setProperty("position","absolute"),i.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(i);var n=i.scrollWidth;return document.documentElement.removeChild(i),n}},function(t,e,i){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizedEventCoords=e.supportsCssVariables=void 0,e.supportsCssVariables=function(t,e){void 0===e&&(e=!1);var i,n=t.CSS;if("boolean"==typeof s&&!e)return s;if(!(n&&"function"==typeof n.supports))return!1;var o=n.supports("--css-vars","yes"),r=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=o||r,e||(s=i),i},e.getNormalizedEventCoords=function(t,e,i){if(!t)return{x:0,y:0};var n,o,r=e.x,s=e.y,a=r+i.left,c=s+i.top;if("touchstart"===t.type){var u=t;n=u.changedTouches[0].pageX-a,o=u.changedTouches[0].pageY-c}else{var p=t;n=p.pageX-a,o=p.pageY-c}return{x:n,y:o}}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRippleFoundation=void 0;var a,c=i(0),u=i(7),p=i(3),l=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup","contextmenu"],h=[],f=(a=c.MDCFoundation,o(C,a),Object.defineProperty(C,"cssClasses",{get:function(){return u.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(C,"strings",{get:function(){return u.strings},enumerable:!1,configurable:!0}),Object.defineProperty(C,"numbers",{get:function(){return u.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(C,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),C.prototype.init=function(){var t=this,e=this.supportsPressRipple();if(this.registerRootHandlers(e),e){var i=C.cssClasses,n=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(n),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal())})}},C.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(C.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(C.cssClasses.FG_DEACTIVATION));var e=C.cssClasses,i=e.ROOT,n=e.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(i),t.adapter.removeClass(n),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},C.prototype.activate=function(t){this.activateImpl(t)},C.prototype.deactivate=function(){this.deactivateImpl()},C.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},C.prototype.setUnbounded=function(t){var e=C.cssClasses.UNBOUNDED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},C.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(C.cssClasses.BG_FOCUSED)})},C.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(C.cssClasses.BG_FOCUSED)})},C.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},C.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},C.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var n=s(l),o=n.next();!o.done;o=n.next()){var r=o.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},C.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var n=s(d),o=n.next();!o.done;o=n.next()){var r=o.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},C.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=s(l),n=i.next();!n.done;n=i.next()){var o=n.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},C.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=s(d),n=i.next();!n.done;n=i.next()){var o=n.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},C.prototype.removeCssVars=function(){var e=this,i=C.strings;Object.keys(i).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(i[t],null)})},C.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var n=this.previousActivationEvent;n&&void 0!==t&&n.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&0<h.length&&h.some(function(t){return e.adapter.containsEventTarget(t)})?this.resetActivationState():(void 0!==t&&(h.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){h=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},C.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},C.prototype.animateActivation=function(){var t=this,e=C.strings,i=e.VAR_FG_TRANSLATE_START,n=e.VAR_FG_TRANSLATE_END,o=C.cssClasses,r=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,a=C.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var p=this.getFgTranslationCoordinates(),l=p.startPoint,d=p.endPoint;c=l.x+"px, "+l.y+"px",u=d.x+"px, "+d.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(n,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(r),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},a)},C.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?p.getNormalizedEventCoords(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},C.prototype.runDeactivationUXLogicIfReady=function(){var t=this,e=C.cssClasses.FG_DEACTIVATION,i=this.activationState,n=i.hasDeactivationUXRun,o=i.isActivated;!n&&o||!this.activationAnimationHasEnded||(this.rmBoundedActivationClasses(),this.adapter.addClass(e),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(e)},u.numbers.FG_DEACTIVATION_MS))},C.prototype.rmBoundedActivationClasses=function(){var t=C.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},C.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},C.numbers.TAP_DELAY_MS)},C.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=r({},e);e.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(i)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()}))}},C.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},C.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var e=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+C.numbers.PADDING;var i=Math.floor(e*C.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},C.prototype.updateLayoutCssVars=function(){var t=C.strings,e=t.VAR_FG_SIZE,i=t.VAR_LEFT,n=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(e,this.initialSize+"px"),this.adapter.updateCssVariable(o,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(n,this.unboundedCoords.top+"px"))},C);function C(t){var e=a.call(this,r(r({},C.defaultAdapter),t))||this;return e.activationAnimationHasEnded=!1,e.activationTimer=0,e.fgDeactivationRemovalTimer=0,e.fgScale="0",e.frame={width:0,height:0},e.initialSize=0,e.layoutFrame=0,e.maxRadius=0,e.unboundedCoords={left:0,top:0},e.activationState=e.defaultActivationState(),e.activationTimerCallback=function(){e.activationAnimationHasEnded=!0,e.runDeactivationUXLogicIfReady()},e.activateHandler=function(t){e.activateImpl(t)},e.deactivateHandler=function(){e.deactivateImpl()},e.focusHandler=function(){e.handleFocus()},e.blurHandler=function(){e.handleBlur()},e.resizeHandler=function(){e.layout()},e}e.MDCRippleFoundation=f,e.default=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyPassive=void 0,e.applyPassive=function(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var i={get passive(){return!(e=!0)}},n=function(){};t.document.addEventListener("test",n,i),t.document.removeEventListener("test",n,i)}catch(t){e=!1}return e}(t)&&{passive:!0}}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&r(e,t,i);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRipple=void 0;var c,u=i(1),p=i(5),l=i(2),d=i(4),h=a(i(3)),f=(c=u.MDCComponent,o(C,c),C.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var i=new C(t);return void 0!==e.isUnbounded&&(i.unbounded=e.isUnbounded),i},C.createAdapter=function(i){return{addClass:function(t){return i.root.classList.add(t)},browserSupportsCssVars:function(){return h.supportsCssVariables(window)},computeBoundingRect:function(){return i.root.getBoundingClientRect()},containsEventTarget:function(t){return i.root.contains(t)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,p.applyPassive())},deregisterInteractionHandler:function(t,e){return i.root.removeEventListener(t,e,p.applyPassive())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return l.matches(i.root,":active")},isSurfaceDisabled:function(){return Boolean(i.disabled)},isUnbounded:function(){return Boolean(i.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,p.applyPassive())},registerInteractionHandler:function(t,e){return i.root.addEventListener(t,e,p.applyPassive())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(t){return i.root.classList.remove(t)},updateCssVariable:function(t,e){return i.root.style.setProperty(t,e)}}},Object.defineProperty(C.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),C.prototype.activate=function(){this.foundation.activate()},C.prototype.deactivate=function(){this.foundation.deactivate()},C.prototype.layout=function(){this.foundation.layout()},C.prototype.getDefaultFoundation=function(){return new d.MDCRippleFoundation(C.createAdapter(this))},C.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},C.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},C);function C(){var t=null!==c&&c.apply(this,arguments)||this;return t.disabled=!1,t}e.MDCRipple=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.numbers=e.strings=e.cssClasses=void 0,e.cssClasses={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},e.strings={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},e.numbers={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNavigationEvent=n.normalizeKey=n.KEY=void 0,n.KEY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"};var o=new Set;o.add(n.KEY.BACKSPACE),o.add(n.KEY.ENTER),o.add(n.KEY.SPACEBAR),o.add(n.KEY.PAGE_UP),o.add(n.KEY.PAGE_DOWN),o.add(n.KEY.END),o.add(n.KEY.HOME),o.add(n.KEY.ARROW_LEFT),o.add(n.KEY.ARROW_UP),o.add(n.KEY.ARROW_RIGHT),o.add(n.KEY.ARROW_DOWN),o.add(n.KEY.DELETE),o.add(n.KEY.ESCAPE),o.add(n.KEY.TAB);var i=8,r=13,s=32,a=33,c=34,u=35,p=36,l=37,d=38,h=39,f=40,C=46,y=27,A=9,v=new Map;v.set(i,n.KEY.BACKSPACE),v.set(r,n.KEY.ENTER),v.set(s,n.KEY.SPACEBAR),v.set(a,n.KEY.PAGE_UP),v.set(c,n.KEY.PAGE_DOWN),v.set(u,n.KEY.END),v.set(p,n.KEY.HOME),v.set(l,n.KEY.ARROW_LEFT),v.set(d,n.KEY.ARROW_UP),v.set(h,n.KEY.ARROW_RIGHT),v.set(f,n.KEY.ARROW_DOWN),v.set(C,n.KEY.DELETE),v.set(y,n.KEY.ESCAPE),v.set(A,n.KEY.TAB);var E=new Set;function g(t){var e=t.key;if(o.has(e))return e;var i=v.get(t.keyCode);return i||n.KEY.UNKNOWN}E.add(n.KEY.PAGE_UP),E.add(n.KEY.PAGE_DOWN),E.add(n.KEY.END),E.add(n.KEY.HOME),E.add(n.KEY.ARROW_LEFT),E.add(n.KEY.ARROW_UP),E.add(n.KEY.ARROW_RIGHT),E.add(n.KEY.ARROW_DOWN),n.normalizeKey=g,n.isNavigationEvent=function(t){return E.has(g(t))}},,,,,,,,,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrame=void 0;var n=(o.prototype.request=function(e,i){var n=this;this.cancel(e);var t=requestAnimationFrame(function(t){n.rafIDs.delete(e),i(t)});this.rafIDs.set(e,t)},o.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},o.prototype.cancelAll=function(){var i=this;this.rafIDs.forEach(function(t,e){i.cancel(e)})},o.prototype.getQueue=function(){var i=[];return this.rafIDs.forEach(function(t,e){i.push(e)}),i},o);function o(){this.rafIDs=new Map}e.AnimationFrame=n},,function(t,e,i){"use strict";var n,o,r,s,a,c;Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipActionAttributes=e.MDCChipActionFocusBehavior=e.MDCChipActionEvents=e.MDCChipActionType=e.MDCChipActionInteractionTrigger=e.MDCChipActionCssClasses=void 0,(n=e.MDCChipActionCssClasses||(e.MDCChipActionCssClasses={})).PRIMARY_ACTION="mdc-evolution-chip__action--primary",n.TRAILING_ACTION="mdc-evolution-chip__action--trailing",n.CHIP_ROOT="mdc-evolution-chip",(o=e.MDCChipActionInteractionTrigger||(e.MDCChipActionInteractionTrigger={}))[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.CLICK=1]="CLICK",o[o.BACKSPACE_KEY=2]="BACKSPACE_KEY",o[o.DELETE_KEY=3]="DELETE_KEY",o[o.SPACEBAR_KEY=4]="SPACEBAR_KEY",o[o.ENTER_KEY=5]="ENTER_KEY",(r=e.MDCChipActionType||(e.MDCChipActionType={}))[r.UNSPECIFIED=0]="UNSPECIFIED",r[r.PRIMARY=1]="PRIMARY",r[r.TRAILING=2]="TRAILING",(s=e.MDCChipActionEvents||(e.MDCChipActionEvents={})).INTERACTION="MDCChipAction:interaction",s.NAVIGATION="MDCChipAction:navigation",(a=e.MDCChipActionFocusBehavior||(e.MDCChipActionFocusBehavior={}))[a.FOCUSABLE=0]="FOCUSABLE",a[a.FOCUSABLE_AND_FOCUSED=1]="FOCUSABLE_AND_FOCUSED",a[a.NOT_FOCUSABLE=2]="NOT_FOCUSABLE",(c=e.MDCChipActionAttributes||(e.MDCChipActionAttributes={})).ARIA_DISABLED="aria-disabled",c.ARIA_HIDDEN="aria-hidden",c.ARIA_SELECTED="aria-selected",c.DATA_DELETABLE="data-mdc-deletable",c.DISABLED="disabled",c.ROLE="role",c.TAB_INDEX="tabindex"},,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";var n,o,r,s;Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipAnimation=e.MDCChipAttributes=e.MDCChipEvents=e.MDCChipCssClasses=void 0,(n=e.MDCChipCssClasses||(e.MDCChipCssClasses={})).SELECTING="mdc-evolution-chip--selecting",n.DESELECTING="mdc-evolution-chip--deselecting",n.SELECTING_WITH_PRIMARY_ICON="mdc-evolution-chip--selecting-with-primary-icon",n.DESELECTING_WITH_PRIMARY_ICON="mdc-evolution-chip--deselecting-with-primary-icon",n.DISABLED="mdc-evolution-chip--disabled",n.ENTER="mdc-evolution-chip--enter",n.EXIT="mdc-evolution-chip--exit",n.SELECTED="mdc-evolution-chip--selected",n.HIDDEN="mdc-evolution-chip--hidden",n.WITH_PRIMARY_ICON="mdc-evolution-chip--with-primary-icon",(o=e.MDCChipEvents||(e.MDCChipEvents={})).INTERACTION="MDCChip:interaction",o.NAVIGATION="MDCChip:navigation",o.ANIMATION="MDCChip:animation",(r=e.MDCChipAttributes||(e.MDCChipAttributes={})).DATA_REMOVED_ANNOUNCEMENT="data-mdc-removed-announcement",r.DATA_ADDED_ANNOUNCEMENT="data-mdc-added-announcement",(s=e.MDCChipAnimation||(e.MDCChipAnimation={})).ENTER="mdc-evolution-chip-enter",s.EXIT="mdc-evolution-chip-exit"},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.strings=e.InteractionTrigger=void 0,(n=e.InteractionTrigger||(e.InteractionTrigger={}))[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CLICK=1]="CLICK",n[n.BACKSPACE_KEY=2]="BACKSPACE_KEY",n[n.DELETE_KEY=3]="DELETE_KEY",n[n.SPACEBAR_KEY=4]="SPACEBAR_KEY",n[n.ENTER_KEY=5]="ENTER_KEY",e.strings={ARIA_HIDDEN:"aria-hidden",INTERACTION_EVENT:"MDCChipTrailingAction:interaction",NAVIGATION_EVENT:"MDCChipTrailingAction:navigation",TAB_INDEX:"tabindex"}},function(t,e,i){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),e.jumpChipKeys=e.navigationKeys=e.cssClasses=e.strings=e.EventSource=e.Direction=void 0,(n=e.Direction||(e.Direction={})).LEFT="left",n.RIGHT="right",(o=e.EventSource||(e.EventSource={})).PRIMARY="primary",o.TRAILING="trailing",o.NONE="none",e.strings={ADDED_ANNOUNCEMENT_ATTRIBUTE:"data-mdc-chip-added-announcement",ARIA_CHECKED:"aria-checked",ARROW_DOWN_KEY:"ArrowDown",ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",BACKSPACE_KEY:"Backspace",CHECKMARK_SELECTOR:".mdc-chip__checkmark",DELETE_KEY:"Delete",END_KEY:"End",ENTER_KEY:"Enter",ENTRY_ANIMATION_NAME:"mdc-chip-entry",HOME_KEY:"Home",IE_ARROW_DOWN_KEY:"Down",IE_ARROW_LEFT_KEY:"Left",IE_ARROW_RIGHT_KEY:"Right",IE_ARROW_UP_KEY:"Up",IE_DELETE_KEY:"Del",INTERACTION_EVENT:"MDCChip:interaction",LEADING_ICON_SELECTOR:".mdc-chip__icon--leading",NAVIGATION_EVENT:"MDCChip:navigation",PRIMARY_ACTION_SELECTOR:".mdc-chip__primary-action",REMOVED_ANNOUNCEMENT_ATTRIBUTE:"data-mdc-chip-removed-announcement",REMOVAL_EVENT:"MDCChip:removal",SELECTION_EVENT:"MDCChip:selection",SPACEBAR_KEY:" ",TAB_INDEX:"tabindex",TRAILING_ACTION_SELECTOR:".mdc-chip-trailing-action",TRAILING_ICON_INTERACTION_EVENT:"MDCChip:trailingIconInteraction",TRAILING_ICON_SELECTOR:".mdc-chip__icon--trailing"},e.cssClasses={CHECKMARK:"mdc-chip__checkmark",CHIP_EXIT:"mdc-chip--exit",DELETABLE:"mdc-chip--deletable",EDITABLE:"mdc-chip--editable",EDITING:"mdc-chip--editing",HIDDEN_LEADING_ICON:"mdc-chip__icon--leading-hidden",LEADING_ICON:"mdc-chip__icon--leading",PRIMARY_ACTION:"mdc-chip__primary-action",PRIMARY_ACTION_FOCUSED:"mdc-chip--primary-action-focused",SELECTED:"mdc-chip--selected",TEXT:"mdc-chip__text",TRAILING_ACTION:"mdc-chip__trailing-action",TRAILING_ICON:"mdc-chip__icon--trailing"},e.navigationKeys=new Set,e.navigationKeys.add(e.strings.ARROW_LEFT_KEY),e.navigationKeys.add(e.strings.ARROW_RIGHT_KEY),e.navigationKeys.add(e.strings.ARROW_DOWN_KEY),e.navigationKeys.add(e.strings.ARROW_UP_KEY),e.navigationKeys.add(e.strings.END_KEY),e.navigationKeys.add(e.strings.HOME_KEY),e.navigationKeys.add(e.strings.IE_ARROW_LEFT_KEY),e.navigationKeys.add(e.strings.IE_ARROW_RIGHT_KEY),e.navigationKeys.add(e.strings.IE_ARROW_DOWN_KEY),e.navigationKeys.add(e.strings.IE_ARROW_UP_KEY),e.jumpChipKeys=new Set,e.jumpChipKeys.add(e.strings.ARROW_UP_KEY),e.jumpChipKeys.add(e.strings.ARROW_DOWN_KEY),e.jumpChipKeys.add(e.strings.HOME_KEY),e.jumpChipKeys.add(e.strings.END_KEY),e.jumpChipKeys.add(e.strings.IE_ARROW_UP_KEY),e.jumpChipKeys.add(e.strings.IE_ARROW_DOWN_KEY)},,,,,,,,,,function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipActionFoundation=void 0;var s=i(0),a=i(8),c=i(19),u=new Map;u.set(a.KEY.SPACEBAR,c.MDCChipActionInteractionTrigger.SPACEBAR_KEY),u.set(a.KEY.ENTER,c.MDCChipActionInteractionTrigger.ENTER_KEY),u.set(a.KEY.DELETE,c.MDCChipActionInteractionTrigger.DELETE_KEY),u.set(a.KEY.BACKSPACE,c.MDCChipActionInteractionTrigger.BACKSPACE_KEY);var p,l=(p=s.MDCFoundation,o(d,p),Object.defineProperty(d,"defaultAdapter",{get:function(){return{emitEvent:function(){},focus:function(){},getAttribute:function(){return null},getElementID:function(){return""},removeAttribute:function(){},setAttribute:function(){}}},enumerable:!1,configurable:!0}),d.prototype.handleClick=function(){this.isDisabled()||this.emitInteraction(c.MDCChipActionInteractionTrigger.CLICK)},d.prototype.handleKeydown=function(t){var e=a.normalizeKey(t);return this.shouldNotifyInteractionFromKey(e)?(t.preventDefault(),void this.emitInteraction(this.getTriggerFromKey(e))):a.isNavigationEvent(t)?(t.preventDefault(),void this.emitNavigation(e)):void 0},d.prototype.setDisabled=function(t){this.isSelectable()?this.adapter.setAttribute(c.MDCChipActionAttributes.ARIA_DISABLED,""+t):t?this.adapter.setAttribute(c.MDCChipActionAttributes.DISABLED,"true"):this.adapter.removeAttribute(c.MDCChipActionAttributes.DISABLED)},d.prototype.isDisabled=function(){return"true"===this.adapter.getAttribute(c.MDCChipActionAttributes.ARIA_DISABLED)||null!==this.adapter.getAttribute(c.MDCChipActionAttributes.DISABLED)},d.prototype.setFocus=function(t){if(this.isFocusable())return t===c.MDCChipActionFocusBehavior.FOCUSABLE_AND_FOCUSED?(this.adapter.setAttribute(c.MDCChipActionAttributes.TAB_INDEX,"0"),void this.adapter.focus()):void(t!==c.MDCChipActionFocusBehavior.FOCUSABLE?t!==c.MDCChipActionFocusBehavior.NOT_FOCUSABLE||this.adapter.setAttribute(c.MDCChipActionAttributes.TAB_INDEX,"-1"):this.adapter.setAttribute(c.MDCChipActionAttributes.TAB_INDEX,"0"))},d.prototype.isFocusable=function(){return!this.isDisabled()&&"true"!==this.adapter.getAttribute(c.MDCChipActionAttributes.ARIA_HIDDEN)},d.prototype.setSelected=function(t){this.isSelectable()&&this.adapter.setAttribute(c.MDCChipActionAttributes.ARIA_SELECTED,""+t)},d.prototype.isSelected=function(){return"true"===this.adapter.getAttribute(c.MDCChipActionAttributes.ARIA_SELECTED)},d.prototype.emitInteraction=function(t){this.adapter.emitEvent(c.MDCChipActionEvents.INTERACTION,{actionID:this.adapter.getElementID(),source:this.actionType(),trigger:t})},d.prototype.emitNavigation=function(t){this.adapter.emitEvent(c.MDCChipActionEvents.NAVIGATION,{source:this.actionType(),key:t})},d.prototype.shouldNotifyInteractionFromKey=function(t){var e=t===a.KEY.ENTER||t===a.KEY.SPACEBAR,i=t===a.KEY.BACKSPACE||t===a.KEY.DELETE;return e||!(!i||!this.shouldEmitInteractionOnRemoveKey())},d.prototype.getTriggerFromKey=function(t){var e=u.get(t);return e||c.MDCChipActionInteractionTrigger.UNSPECIFIED},d);function d(t){return p.call(this,r(r({},d.defaultAdapter),t))||this}e.MDCChipActionFoundation=l,e.default=l},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipSetEvents=e.MDCChipSetCssClasses=e.MDCChipSetAttributes=void 0,(e.MDCChipSetAttributes||(e.MDCChipSetAttributes={})).ARIA_MULTISELECTABLE="aria-multiselectable",(e.MDCChipSetCssClasses||(e.MDCChipSetCssClasses={})).CHIP="mdc-evolution-chip",(n=e.MDCChipSetEvents||(e.MDCChipSetEvents={})).INTERACTION="MDCChipSet:interaction",n.REMOVAL="MDCChipSet:removal",n.SELECTION="MDCChipSet:selection"},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipFoundation=void 0;var s,a,c=i(0),u=i(44),p={bottom:0,height:0,left:0,right:0,top:0,width:0};(a=s=s||{})[a.SHOULD_FOCUS=0]="SHOULD_FOCUS",a[a.SHOULD_NOT_FOCUS=1]="SHOULD_NOT_FOCUS";var l,d=(l=c.MDCFoundation,o(h,l),Object.defineProperty(h,"strings",{get:function(){return u.strings},enumerable:!1,configurable:!0}),Object.defineProperty(h,"cssClasses",{get:function(){return u.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(h,"defaultAdapter",{get:function(){return{addClass:function(){},addClassToLeadingIcon:function(){},eventTargetHasClass:function(){return!1},focusPrimaryAction:function(){},focusTrailingAction:function(){},getAttribute:function(){return null},getCheckmarkBoundingClientRect:function(){return p},getComputedStyleValue:function(){return""},getRootBoundingClientRect:function(){return p},hasClass:function(){return!1},hasLeadingIcon:function(){return!1},isRTL:function(){return!1},isTrailingActionNavigable:function(){return!1},notifyEditFinish:function(){},notifyEditStart:function(){},notifyInteraction:function(){},notifyNavigation:function(){},notifyRemoval:function(){},notifySelection:function(){},notifyTrailingIconInteraction:function(){},removeClass:function(){},removeClassFromLeadingIcon:function(){},removeTrailingActionFocus:function(){},setPrimaryActionAttr:function(){},setStyleProperty:function(){}}},enumerable:!1,configurable:!0}),h.prototype.isSelected=function(){return this.adapter.hasClass(u.cssClasses.SELECTED)},h.prototype.isEditable=function(){return this.adapter.hasClass(u.cssClasses.EDITABLE)},h.prototype.isEditing=function(){return this.adapter.hasClass(u.cssClasses.EDITING)},h.prototype.setSelected=function(t){this.setSelectedImpl(t),this.notifySelection(t)},h.prototype.setSelectedFromChipSet=function(t,e){this.setSelectedImpl(t),e&&this.notifyIgnoredSelection(t)},h.prototype.getShouldRemoveOnTrailingIconClick=function(){return this.shouldRemoveOnTrailingIconClick},h.prototype.setShouldRemoveOnTrailingIconClick=function(t){this.shouldRemoveOnTrailingIconClick=t},h.prototype.setShouldFocusPrimaryActionOnClick=function(t){this.shouldFocusPrimaryActionOnClick=t},h.prototype.getDimensions=function(){function t(){return e.adapter.getRootBoundingClientRect()}var e=this;if(!this.adapter.hasLeadingIcon()){var i=e.adapter.getCheckmarkBoundingClientRect();if(i){var n=t();return{bottom:n.bottom,height:n.height,left:n.left,right:n.right,top:n.top,width:n.width+i.height}}}return t()},h.prototype.beginExit=function(){this.adapter.addClass(u.cssClasses.CHIP_EXIT)},h.prototype.handleClick=function(){this.adapter.notifyInteraction(),this.setPrimaryActionFocusable(this.getFocusBehavior())},h.prototype.handleDoubleClick=function(){this.isEditable()&&this.startEditing()},h.prototype.handleTransitionEnd=function(t){var e=this,i=this.adapter.eventTargetHasClass(t.target,u.cssClasses.CHIP_EXIT),n="width"===t.propertyName,o="opacity"===t.propertyName;if(i&&o){var r=this.adapter.getComputedStyleValue("width");requestAnimationFrame(function(){e.adapter.setStyleProperty("width",r),e.adapter.setStyleProperty("padding","0"),e.adapter.setStyleProperty("margin","0"),requestAnimationFrame(function(){e.adapter.setStyleProperty("width","0")})})}else{if(i&&n){this.removeFocus();var s=this.adapter.getAttribute(u.strings.REMOVED_ANNOUNCEMENT_ATTRIBUTE);this.adapter.notifyRemoval(s)}if(o){var a=this.adapter.eventTargetHasClass(t.target,u.cssClasses.LEADING_ICON)&&this.adapter.hasClass(u.cssClasses.SELECTED),c=this.adapter.eventTargetHasClass(t.target,u.cssClasses.CHECKMARK)&&!this.adapter.hasClass(u.cssClasses.SELECTED);a?this.adapter.addClassToLeadingIcon(u.cssClasses.HIDDEN_LEADING_ICON):c&&this.adapter.removeClassFromLeadingIcon(u.cssClasses.HIDDEN_LEADING_ICON)}}},h.prototype.handleFocusIn=function(t){this.eventFromPrimaryAction(t)&&this.adapter.addClass(u.cssClasses.PRIMARY_ACTION_FOCUSED)},h.prototype.handleFocusOut=function(t){this.eventFromPrimaryAction(t)&&(this.isEditing()&&this.finishEditing(),this.adapter.removeClass(u.cssClasses.PRIMARY_ACTION_FOCUSED))},h.prototype.handleTrailingActionInteraction=function(){this.adapter.notifyTrailingIconInteraction(),this.removeChip()},h.prototype.handleKeydown=function(t){if(!this.isEditing())return this.isEditable()&&this.shouldStartEditing(t)&&(t.preventDefault(),this.startEditing()),this.shouldNotifyInteraction(t)?(this.adapter.notifyInteraction(),void this.setPrimaryActionFocusable(this.getFocusBehavior())):this.isDeleteAction(t)?(t.preventDefault(),void this.removeChip()):void(u.navigationKeys.has(t.key)&&(t.preventDefault(),this.focusNextAction(t.key,u.EventSource.PRIMARY)));this.shouldFinishEditing(t)&&(t.preventDefault(),this.finishEditing())},h.prototype.handleTrailingActionNavigation=function(t){this.focusNextAction(t.detail.key,u.EventSource.TRAILING)},h.prototype.removeFocus=function(){this.adapter.setPrimaryActionAttr(u.strings.TAB_INDEX,"-1"),this.adapter.removeTrailingActionFocus()},h.prototype.focusPrimaryAction=function(){this.setPrimaryActionFocusable(s.SHOULD_FOCUS)},h.prototype.focusTrailingAction=function(){if(this.adapter.isTrailingActionNavigable())return this.adapter.setPrimaryActionAttr(u.strings.TAB_INDEX,"-1"),void this.adapter.focusTrailingAction();this.focusPrimaryAction()},h.prototype.setPrimaryActionFocusable=function(t){this.adapter.setPrimaryActionAttr(u.strings.TAB_INDEX,"0"),t===s.SHOULD_FOCUS&&this.adapter.focusPrimaryAction(),this.adapter.removeTrailingActionFocus()},h.prototype.getFocusBehavior=function(){return this.shouldFocusPrimaryActionOnClick?s.SHOULD_FOCUS:s.SHOULD_NOT_FOCUS},h.prototype.focusNextAction=function(t,e){var i=this.adapter.isTrailingActionNavigable(),n=this.getDirection(t);!u.jumpChipKeys.has(t)&&i?e!==u.EventSource.PRIMARY||n!==u.Direction.RIGHT?e!==u.EventSource.TRAILING||n!==u.Direction.LEFT?this.adapter.notifyNavigation(t,u.EventSource.NONE):this.focusPrimaryAction():this.focusTrailingAction():this.adapter.notifyNavigation(t,e)},h.prototype.getDirection=function(t){var e=this.adapter.isRTL(),i=t===u.strings.ARROW_LEFT_KEY||t===u.strings.IE_ARROW_LEFT_KEY,n=t===u.strings.ARROW_RIGHT_KEY||t===u.strings.IE_ARROW_RIGHT_KEY;return!e&&i||e&&n?u.Direction.LEFT:u.Direction.RIGHT},h.prototype.removeChip=function(){this.shouldRemoveOnTrailingIconClick&&this.beginExit()},h.prototype.shouldStartEditing=function(t){return this.eventFromPrimaryAction(t)&&t.key===u.strings.ENTER_KEY},h.prototype.shouldFinishEditing=function(t){return t.key===u.strings.ENTER_KEY},h.prototype.shouldNotifyInteraction=function(t){return t.key===u.strings.ENTER_KEY||t.key===u.strings.SPACEBAR_KEY},h.prototype.isDeleteAction=function(t){return this.adapter.hasClass(u.cssClasses.DELETABLE)&&(t.key===u.strings.BACKSPACE_KEY||t.key===u.strings.DELETE_KEY||t.key===u.strings.IE_DELETE_KEY)},h.prototype.setSelectedImpl=function(t){t?(this.adapter.addClass(u.cssClasses.SELECTED),this.adapter.setPrimaryActionAttr(u.strings.ARIA_CHECKED,"true")):(this.adapter.removeClass(u.cssClasses.SELECTED),this.adapter.setPrimaryActionAttr(u.strings.ARIA_CHECKED,"false"))},h.prototype.notifySelection=function(t){this.adapter.notifySelection(t,!1)},h.prototype.notifyIgnoredSelection=function(t){this.adapter.notifySelection(t,!0)},h.prototype.eventFromPrimaryAction=function(t){return this.adapter.eventTargetHasClass(t.target,u.cssClasses.PRIMARY_ACTION)},h.prototype.startEditing=function(){this.adapter.addClass(u.cssClasses.EDITING),this.adapter.notifyEditStart()},h.prototype.finishEditing=function(){this.adapter.removeClass(u.cssClasses.EDITING),this.adapter.notifyEditFinish()},h);function h(t){var e=l.call(this,r(r({},h.defaultAdapter),t))||this;return e.shouldRemoveOnTrailingIconClick=!0,e.shouldFocusPrimaryActionOnClick=!0,e}e.MDCChipFoundation=d,e.default=d},,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipAction=void 0;var s,a=i(1),c=i(2),u=i(6),p=i(4),l=i(149),d=i(19),h=i(78),f=i(79),C=(s=a.MDCComponent,o(y,s),y.attachTo=function(t){return new y(t)},Object.defineProperty(y.prototype,"ripple",{get:function(){return this.rippleInstance},enumerable:!1,configurable:!0}),y.prototype.initialize=function(t){var e=this;void 0===t&&(t=function(t,e){return new u.MDCRipple(t,e)});var i=r(r({},u.MDCRipple.createAdapter(this)),{computeBoundingRect:function(){return e.computeRippleClientRect()}});this.rippleInstance=t(this.root,new p.MDCRippleFoundation(i))},y.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown)},y.prototype.destroy=function(){this.ripple.destroy(),this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),s.prototype.destroy.call(this)},y.prototype.getDefaultFoundation=function(){var i=this,t={emitEvent:function(t,e){i.emit(t,e,!0)},focus:function(){i.rootHTML.focus()},getAttribute:function(t){return i.root.getAttribute(t)},getElementID:function(){return i.root.id},removeAttribute:function(t){i.root.removeAttribute(t)},setAttribute:function(t,e){i.root.setAttribute(t,e)}};return this.root.classList.contains(d.MDCChipActionCssClasses.TRAILING_ACTION)?new f.MDCChipTrailingActionFoundation(t):new h.MDCChipPrimaryActionFoundation(t)},y.prototype.setDisabled=function(t){this.foundation.setDisabled(t)},y.prototype.isDisabled=function(){return this.foundation.isDisabled()},y.prototype.setFocus=function(t){this.foundation.setFocus(t)},y.prototype.isFocusable=function(){return this.foundation.isFocusable()},y.prototype.setSelected=function(t){this.foundation.setSelected(t)},y.prototype.isSelected=function(){return this.foundation.isSelected()},y.prototype.isSelectable=function(){return this.foundation.isSelectable()},y.prototype.actionType=function(){return this.foundation.actionType()},y.prototype.computeRippleClientRect=function(){if(this.root.classList.contains(d.MDCChipActionCssClasses.PRIMARY_ACTION)){var t=c.closest(this.root,"."+d.MDCChipActionCssClasses.CHIP_ROOT);if(!t)return this.root.getBoundingClientRect();var e=window.getComputedStyle(t).getPropertyValue(l.GRAPHIC_SELECTED_WIDTH_STYLE_PROP);return l.computePrimaryActionRippleClientRect(t.getBoundingClientRect(),e)}return this.root.getBoundingClientRect()},y);function y(){var t=null!==s&&s.apply(this,arguments)||this;return t.rootHTML=t.root,t}e.MDCChipAction=C},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipPrimaryActionFoundation=void 0;var r,s=i(19),a=i(54),c=(r=a.MDCChipActionFoundation,o(u,r),u.prototype.isSelectable=function(){return"option"===this.adapter.getAttribute(s.MDCChipActionAttributes.ROLE)},u.prototype.actionType=function(){return s.MDCChipActionType.PRIMARY},u.prototype.shouldEmitInteractionOnRemoveKey=function(){return"true"===this.adapter.getAttribute(s.MDCChipActionAttributes.DATA_DELETABLE)},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.MDCChipPrimaryActionFoundation=c,e.default=c},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChipTrailingActionFoundation=void 0;var r,s=i(19),a=i(54),c=(r=a.MDCChipActionFoundation,o(u,r),u.prototype.isSelectable=function(){return!1},u.prototype.actionType=function(){return s.MDCChipActionType.TRAILING},u.prototype.shouldEmitInteractionOnRemoveKey=function(){return!0},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.MDCChipTrailingActionFoundation=c,e.default=c},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,r=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=r.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCChip=void 0;var r,s=i(1),u=i(77),p=i(19),l=i(81),d=(r=s.MDCComponent,o(h,r),h.attachTo=function(t){return new h(t)},h.prototype.initialize=function(t){void 0===t&&(t=function(t){return new u.MDCChipAction(t)}),this.actions=new Map;for(var e=this.root.querySelectorAll(".mdc-evolution-chip__action"),i=0;i<e.length;i++){var n=t(e[i]);this.actions.set(n.actionType(),n)}},h.prototype.initialSyncWithDOM=function(){var e=this;this.handleActionInteraction=function(t){e.foundation.handleActionInteraction(t)},this.handleActionNavigation=function(t){e.foundation.handleActionNavigation(t)},this.listen(p.MDCChipActionEvents.INTERACTION,this.handleActionInteraction),this.listen(p.MDCChipActionEvents.NAVIGATION,this.handleActionNavigation)},h.prototype.destroy=function(){this.unlisten(p.MDCChipActionEvents.INTERACTION,this.handleActionInteraction),this.unlisten(p.MDCChipActionEvents.NAVIGATION,this.handleActionNavigation),r.prototype.destroy.call(this)},h.prototype.getDefaultFoundation=function(){var s=this,t={addClass:function(t){s.root.classList.add(t)},emitEvent:function(t,e){s.emit(t,e,!0)},getActions:function(){var e,t,i=[];try{for(var n=a(s.actions),o=n.next();!o.done;o=n.next()){var r=c(o.value,1)[0];i.push(r)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return i},getAttribute:function(t){return s.root.getAttribute(t)},getElementID:function(){return s.rootHTML.id},getOffsetWidth:function(){return s.rootHTML.offsetWidth},hasClass:function(t){return s.root.classList.contains(t)},isActionSelectable:function(t){var e=s.actions.get(t);return!!e&&e.isSelectable()},isActionSelected:function(t){var e=s.actions.get(t);return!!e&&e.isSelected()},isActionFocusable:function(t){var e=s.actions.get(t);return!!e&&e.isFocusable()},isActionDisabled:function(t){var e=s.actions.get(t);return!!e&&e.isDisabled()},isRTL:function(){return"rtl"===window.getComputedStyle(s.root).getPropertyValue("direction")},removeClass:function(t){s.root.classList.remove(t)},setActionDisabled:function(t,e){var i=s.actions.get(t);i&&i.setDisabled(e)},setActionFocus:function(t,e){var i=s.actions.get(t);i&&i.setFocus(e)},setActionSelected:function(t,e){var i=s.actions.get(t);i&&i.setSelected(e)},setStyleProperty:function(t,e){s.rootHTML.style.setProperty(t,e)}};return new l.MDCChipFoundation(t)},h.prototype.remove=function(){var t=this.root.parentNode;null!==t&&t.removeChild(this.root)},h.prototype.getActions=function(){return this.foundation.getActions()},h.prototype.getElementID=function(){return this.foundation.getElementID()},h.prototype.isDisabled=function(){return this.foundation.isDisabled()},h.prototype.setDisabled=function(t){this.foundation.setDisabled(t)},h.prototype.isActionFocusable=function(t){return this.foundation.isActionFocusable(t)},h.prototype.isActionSelectable=function(t){return this.foundation.isActionSelectable(t)},h.prototype.isActionSelected=function(t){return this.foundation.i