!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){var i,r,o;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function o(t,e){for(var n=document.getElementsByClassName(t.resultsList.className),i=0;i'.concat(s,""):s,o++),r.push(s)}if(o===t.length)return r.join("")}else if(i.includes(t))return t=new RegExp("".concat(t),"i").exec(e),n.highlight?e.replace(t,''.concat(t,"")):e}(e,o,t))&&r?n.push({key:r,index:i,match:o,value:a}):o&&!r&&n.push({index:i,match:o,value:a}))}var a=t.data.store[i];if(t.data.key){var s,c=r(t.data.key);try{for(c.s();!(s=c.n()).done;)o(s.value)}catch(o){c.e(o)}finally{c.f()}}else o()},o=0;o=t.length&&(r=0),r<0&&(r=t.length-1),t[r].setAttribute("aria-selected","true"),t[r].classList.add("autoComplete_selected")},c=t.resultsList.navigation||function(e){var n=document.getElementById(t.resultsList.idName);if(!n)return t.inputField.removeEventListener("keydown",c);n=n.getElementsByTagName(t.resultItem.element),27===e.keyCode?(t.inputField.value="",o(t)):40===e.keyCode||9===e.keyCode?i(e,n,!0,t):38===e.keyCode||9===e.keyCode?i(e,n,!1,t):13===e.keyCode&&(e.preventDefault(),-1=a.threshold&&s.replace(/ /g,"").length)?t.dataStore().then((function(e){try{return o(t),t.start(i,r),c.call(t)}catch(e){return n(e)}}),n):(o(t),c.call(t));function c(){return e()}}))}},{key:"init",value:function(){var t,e,n,i,r=this;this.inputField="string"==typeof this.selector?document.querySelector(this.selector):this.selector(),(t=this).inputField.setAttribute("type","text"),t.inputField.setAttribute("role","combobox"),t.inputField.setAttribute("aria-haspopup",!0),t.inputField.setAttribute("aria-expanded",!1),t.inputField.setAttribute("aria-controls",t.resultsList.idName),t.inputField.setAttribute("aria-autocomplete","both"),this.placeHolder&&this.inputField.setAttribute("placeholder",this.placeHolder),this.hook=(e=function(){r.compose()},n=this.debounce,function(){var t=this,r=arguments;clearTimeout(i),i=setTimeout((function(){return e.apply(t,r)}),n)}),this.trigger.event.forEach((function(t){r.inputField.removeEventListener(t,r.hook),r.inputField.addEventListener(t,r.hook)})),s(this.inputField,null,"init")}},{key:"preInit",value:function(){var t=this,e=document;new MutationObserver((function(n,i){var o,a=e.querySelector(t.selector),c=r(n);try{for(c.s();!(o=c.n()).done;)o.value,a&&(i.disconnect(),s(a,null,"connect"),t.init())}catch(n){c.e(n)}finally{c.f()}})).observe(e,{childList:!0,subtree:!0})}},{key:"unInit",value:function(){this.inputField.removeEventListener("input",this.hook),s(this.inputField,null,"unInit")}}])&&t(c.prototype,u),l},"object"==a(e)&&void 0!==t?t.exports=o():void 0===(r="function"==typeof(i=o)?i.call(e,n,e,t):i)||(t.exports=r)},function(t,e,n){n(8),n(2),n(3),n(4),n(5),n(6),t.exports=n(7)},function(t,e,n){"use strict";n.r(e),e.default=n.p+"./bundle.css"},function(t,e,n){"use strict";n.r(e),e.default=n.p+"bundle_cnhi.css"},function(t,e,n){"use strict";n.r(e),e.default=n.p+"bundle_comau.css"},function(t,e,n){"use strict";n.r(e),e.default=n.p+"bundle_fca.css"},function(t,e,n){"use strict";n.r(e),e.default=n.p+"bundle_iveco.css"},function(t,e,n){"use strict";n.r(e),e.default=n.p+"bundle_none.css"},function(t,e,n){"use strict";n.r(e); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function l(){for(var t=[],e=0;e0&&v.some((function(t){return e.adapter_.containsEventTarget(t)}))?this.resetActivationState_():(void 0!==t&&(v.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){v=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,a=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var u="",l="";if(!this.adapter_.isUnbounded()){var d=this.getFgTranslationCoordinates_(),h=d.startPoint,p=d.endPoint;u=h.x+"px, "+h.y+"px",l=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(i,u),this.adapter_.updateCssVariable(r,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout((function(){return t.activationTimerCallback_()}),c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,r,o=e.x,a=e.y,s=o+n.left,c=a+n.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,r=u.changedTouches[0].pageY-c}else{var l=t;i=l.pageX-s,r=l.pageY-c}return{x:i,y:r}}(n,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}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){t.adapter_.removeClass(n)}),y.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return t.previousActivationEvent_=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=o({},e);e.isProgrammatic?(requestAnimationFrame((function(){return t.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()})))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=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:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING;var i=Math.floor(n*e.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_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(r,this.unboundedCoords_.top+"px"))},e}(d),S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return r(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var n,i=t.CSS;if("boolean"==typeof m&&!e)return m;if(!(i&&"function"==typeof i.supports))return!1;var r=i.supports("--css-vars","yes"),o=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=r||o,e||(m=n),n}(window)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},containsEventTarget:function(e){return t.root_.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,p())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,p())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return _(t.root_,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,p())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,p())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root_.classList.remove(e)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.foundation_.activate()},e.prototype.deactivate=function(){this.foundation_.deactivate()},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.getDefaultFoundation=function(){return new b(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root_;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},e}(h),O={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},L=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return O},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.getWidth=function(){return this.adapter_.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;t?this.adapter_.addClass(i):(this.adapter_.removeClass(i),this.adapter_.removeClass(r))},e.prototype.handleShakeAnimationEnd_=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)},e}(d),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.shake=function(t){this.foundation_.shake(t)},e.prototype.float=function(t){this.foundation_.float(t)},e.prototype.getWidth=function(){return this.foundation_.getWidth()},e.prototype.getDefaultFoundation=function(){var t=this;return new L({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getWidth:function(){return function(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}(t.root_)},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)}})},e}(h),N={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},x=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.transitionEndHandler_=function(t){return i.handleTransitionEnd(t)},i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return N},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerEventHandler("transitionend",this.transitionEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterEventHandler("transitionend",this.transitionEndHandler_)},e.prototype.activate=function(){this.adapter_.removeClass(N.LINE_RIPPLE_DEACTIVATING),this.adapter_.addClass(N.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter_.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter_.addClass(N.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter_.hasClass(N.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter_.removeClass(N.LINE_RIPPLE_ACTIVE),this.adapter_.removeClass(N.LINE_RIPPLE_DEACTIVATING))},e}(d),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.activate=function(){this.foundation_.activate()},e.prototype.deactivate=function(){this.foundation_.deactivate()},e.prototype.setRippleCenter=function(t){this.foundation_.setRippleCenter(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new x({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)},setStyle:function(e,n){return t.root_.style.setProperty(e,n)},registerEventHandler:function(e,n){return t.listen(e,n)},deregisterEventHandler:function(e,n){return t.unlisten(e,n)}})},e}(h),w={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},P={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},H={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(g||(g={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(A||(A={})); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var k={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},F={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+k.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+k.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+k.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+k.LIST_ITEM_CLASS+" a,\n ."+k.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+k.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},M={UNSET_INDEX:-1},B=["input","button","textarea","select"];var V,j=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=M.UNSET_INDEX,i.focusedItemIndex_=M.UNSET_INDEX,i.useActivatedClass_=!1,i.ariaCurrentAttrValue_=null,i.isCheckboxList_=!1,i.isRadioList_=!1,i}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return F},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return k},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return M},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),e.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},e.prototype.setWrapFocus=function(t){this.wrapFocus_=t},e.prototype.setVerticalOrientation=function(t){this.isVertical_=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex_},e.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},e.prototype.handleFocusIn=function(t,e){e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"0")},e.prototype.handleFocusOut=function(t,e){var n=this;e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout((function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()}),0)},e.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,r="ArrowUp"===t.key||38===t.keyCode,o="ArrowRight"===t.key||39===t.keyCode,a="ArrowDown"===t.key||40===t.keyCode,s="Home"===t.key||36===t.keyCode,c="End"===t.key||35===t.keyCode,u="Enter"===t.key||13===t.keyCode,l="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())r||c?(t.preventDefault(),this.focusLastElement()):(a||s)&&(t.preventDefault(),this.focusFirstElement());else{var d=this.adapter_.getFocusedElementIndex();if(!(-1===d&&(d=n)<0)){var h;if(this.isVertical_&&a||!this.isVertical_&&o)this.preventDefaultEvent_(t),h=this.focusNextElement(d);else if(this.isVertical_&&r||!this.isVertical_&&i)this.preventDefaultEvent_(t),h=this.focusPrevElement(d);else if(s)this.preventDefaultEvent_(t),h=this.focusFirstElement();else if(c)this.preventDefaultEvent_(t),h=this.focusLastElement();else if((u||l)&&e){var p=t.target;if(p&&"A"===p.tagName&&u)return;if(this.preventDefaultEvent_(t),this.adapter_.listItemAtIndexHasClass(d,k.LIST_ITEM_DISABLED_CLASS))return;this.isSelectableList_()&&this.setSelectedIndexOnAction_(d),this.adapter_.notifyAction(d)}this.focusedItemIndex_=d,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}},e.prototype.handleClick=function(t,e){t!==M.UNSET_INDEX&&(this.setTabindexAtIndex_(t),this.focusedItemIndex_=t,this.adapter_.listItemAtIndexHasClass(t,k.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t)))},e.prototype.focusNextElement=function(t){var e=t+1;if(e>=this.adapter_.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},e.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,e){this.isIndexValid_(t)&&(e?(this.adapter_.removeClassForElementIndex(t,k.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,F.ARIA_DISABLED,"false")):(this.adapter_.addClassForElementIndex(t,k.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,F.ARIA_DISABLED,"true")))},e.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===B.indexOf(e)&&t.preventDefault()},e.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=k.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=k.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==M.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},e.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===M.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,F.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?F.ARIA_CURRENT:F.ARIA_SELECTED;this.selectedIndex_!==M.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},e.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==M.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,F.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,F.ARIA_CHECKED,"true"),this.selectedIndex_=t},e.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e=0&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,F.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===M.UNSET_INDEX&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},e.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==M.UNSET_INDEX?t=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(t=this.selectedIndex_.reduce((function(t,e){return Math.min(t,e)})))),this.setTabindexAtIndex_(t)},e.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some((function(t){return e.isIndexInRange_(t)}))}if("number"==typeof t){if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)}return!1},e.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return t>=0&&tH.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement_(d),this.adapter_.setTransformOrigin(o+" "+r),this.adapter_.setPosition(d),this.adapter_.setMaxHeight(i?i+"px":""),this.hasBit_(n,g.BOTTOM)||this.adapter_.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutMeasurements_=function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getBodyDimensions(),n=this.adapter_.getWindowDimensions(),i=this.adapter_.getWindowScroll();return t||(t={top:this.position_.y,right:this.position_.x,bottom:this.position_.y,left:this.position_.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions_,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:i}},e.prototype.getOriginCorner_=function(){var t,n,i=this.originCorner_,r=this.measurements_,o=r.viewportDistance,a=r.anchorSize,s=r.surfaceSize,c=e.numbers.MARGIN_TO_EDGE;this.hasBit_(this.anchorCorner_,g.BOTTOM)?(t=o.top-c+a.height+this.anchorMargin_.bottom,n=o.bottom-c-this.anchorMargin_.bottom):(t=o.top-c+this.anchorMargin_.top,n=o.bottom-c+a.height-this.anchorMargin_.top),!(n-s.height>0)&&t>=n&&(i=this.setBit_(i,g.BOTTOM));var u,l,d=this.adapter_.isRtl(),h=this.hasBit_(this.anchorCorner_,g.FLIP_RTL),p=this.hasBit_(this.anchorCorner_,g.RIGHT),f=!1;(f=d&&h?!p:p)?(u=o.left+a.width+this.anchorMargin_.right,l=o.right-this.anchorMargin_.right):(u=o.left+this.anchorMargin_.left,l=o.right+a.width-this.anchorMargin_.left);var _=u-s.width>0,m=l-s.width>0,E=this.hasBit_(i,g.FLIP_RTL)&&this.hasBit_(i,g.RIGHT);return m&&E&&d||!_&&E?i=this.unsetBit_(i,g.RIGHT):(_&&f&&d||_&&!f&&p||!m&&u>=l)&&(i=this.setBit_(i,g.RIGHT)),i},e.prototype.getMenuSurfaceMaxHeight_=function(t){var n=this.measurements_.viewportDistance,i=0,r=this.hasBit_(t,g.BOTTOM),o=this.hasBit_(this.anchorCorner_,g.BOTTOM),a=e.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin_.top-a,o||(i+=this.measurements_.anchorSize.height)):(i=n.bottom-this.anchorMargin_.bottom+this.measurements_.anchorSize.height-a,o&&(i-=this.measurements_.anchorSize.height)),i},e.prototype.getHorizontalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,g.RIGHT),i=this.hasBit_(this.anchorCorner_,g.RIGHT);if(n){var r=i?e.width-this.anchorMargin_.left:this.anchorMargin_.right;return this.isHoistedElement_||this.isFixedPosition_?r-(this.measurements_.viewportSize.width-this.measurements_.bodySize.width):r}return i?e.width-this.anchorMargin_.right:this.anchorMargin_.left},e.prototype.getVerticalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,g.BOTTOM),i=this.hasBit_(this.anchorCorner_,g.BOTTOM);return n?i?e.height-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?e.height+this.anchorMargin_.bottom:this.anchorMargin_.top},e.prototype.adjustPositionForHoistedElement_=function(t){var e,n,i=this.measurements_,r=i.windowScroll,o=i.viewportDistance,a=Object.keys(t);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){var l=u.value,d=t[l]||0;d+=o[l],this.isFixedPosition_||("top"===l?d+=r.y:"bottom"===l?d-=r.y:"left"===l?d+=r.x:d-=r.x),t[l]=d}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus_=function(){var t=this.adapter_.isFocused(),e=document.activeElement&&this.adapter_.isElementInContainer(document.activeElement);(t||e)&&this.adapter_.restoreFocus()},e.prototype.hasBit_=function(t,e){return Boolean(t&e)},e.prototype.setBit_=function(t,e){return t|e},e.prototype.unsetBit_=function(t,e){return t^e},e.prototype.isFinite_=function(t){return"number"==typeof t&&isFinite(t)},e}(d); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var W,G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this,e=this.root_.parentElement;this.anchorElement=e&&e.classList.contains(w.ANCHOR)?e:null,this.root_.classList.contains(w.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleBodyClick_=function(e){return t.foundation_.handleBodyClick(e)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",t.handleBodyClick_,{capture:!0})},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",t.handleBodyClick_)},this.listen("keydown",this.handleKeydown_),this.listen(P.OPENED_EVENT,this.registerBodyClickListener_),this.listen(P.CLOSED_EVENT,this.deregisterBodyClickListener_)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten(P.OPENED_EVENT,this.registerBodyClickListener_),this.unlisten(P.CLOSED_EVENT,this.deregisterBodyClickListener_),t.prototype.destroy.call(this)},e.prototype.isOpen=function(){return this.foundation_.isOpen()},e.prototype.open=function(){this.foundation_.open()},e.prototype.close=function(t){void 0===t&&(t=!1),this.foundation_.close(t)},Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation_.setQuickOpen(t)},enumerable:!0,configurable:!0}),e.prototype.setIsHoisted=function(t){this.foundation_.setIsHoisted(t)},e.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},e.prototype.setFixedPosition=function(t){t?this.root_.classList.add(w.FIXED):this.root_.classList.remove(w.FIXED),this.foundation_.setFixedPosition(t)},e.prototype.setAbsolutePosition=function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)},e.prototype.setAnchorCorner=function(t){this.foundation_.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.foundation_.setAnchorMargin(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new U({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)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(U.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(U.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root_.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},setTransformOrigin:function(e){var n=function(t,e){if(void 0===e&&(e=!1),void 0===V||e){var n=t.document.createElement("div");V="transform"in n.style?"transform":"webkitTransform"}return V}(window)+"-origin";t.root_.style.setProperty(n,e)},isFocused:function(){return document.activeElement===t.root_},saveFocus:function(){t.previousFocus_=document.activeElement},restoreFocus:function(){t.root_.contains(document.activeElement)&&t.previousFocus_&&t.previousFocus_.focus&&t.previousFocus_.focus()},getInnerDimensions:function(){return{width:t.root_.offsetWidth,height:t.root_.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(e){t.root_.style.left="left"in e?e.left+"px":"",t.root_.style.right="right"in e?e.right+"px":"",t.root_.style.top="top"in e?e.top+"px":"",t.root_.style.bottom="bottom"in e?e.bottom+"px":""},setMaxHeight:function(e){t.root_.style.maxHeight=e}})},e}(h),q={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},X={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},Y={FOCUS_ROOT_INDEX:-1}; /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(W||(W={})); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var z=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=W.LIST_ROOT,i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return q},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return X},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Y},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;("Tab"===e||9===n)&&this.adapter_.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,n=this.adapter_.getElementIndex(t);n<0||(this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface(),this.closeAnimationEndTimerId_=setTimeout((function(){var n=e.adapter_.getElementIndex(t);e.adapter_.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)}),U.numbers.TRANSITION_CLOSE_DURATION))},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case W.FIRST_ITEM:this.adapter_.focusItemAtIndex(0);break;case W.LAST_ITEM:this.adapter_.focusItemAtIndex(this.adapter_.getMenuItemCount()-1);break;case W.NONE:break;default:this.adapter_.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter_.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter_.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter_.removeAttributeFromElementAtIndex(e,X.ARIA_CHECKED_ATTR),this.adapter_.removeClassFromElementAtIndex(e,q.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,q.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,X.ARIA_CHECKED_ATTR,"true")},e.prototype.setEnabled=function(t,e){this.validatedIndex_(t),e?(this.adapter_.removeClassFromElementAtIndex(t,k.LIST_ITEM_DISABLED_CLASS),this.adapter_.addAttributeToElementAtIndex(t,X.ARIA_DISABLED_ATTR,"false")):(this.adapter_.addClassToElementAtIndex(t,k.LIST_ITEM_DISABLED_CLASS),this.adapter_.addAttributeToElementAtIndex(t,X.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex_=function(t){var e=this.adapter_.getMenuItemCount();if(!(t>=0&&t0&&(t+=$.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},e}(d),et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root_.querySelector(Z.NOTCH_ELEMENT_SELECTOR);var t=this.root_.querySelector("."+L.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root_.classList.add(J.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root_.classList.add(J.NO_LABEL)},e.prototype.notch=function(t){this.foundation_.notch(t)},e.prototype.closeNotch=function(){this.foundation_.closeNotch()},e.prototype.getDefaultFoundation=function(){var t=this;return new tt({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setNotchWidthProperty:function(e){return t.notchElement_.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}})},e}(h),nt={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",SELECTED_ITEM_CLASS:"mdc-list-item--selected",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},it={ARIA_CONTROLS:"aria-controls",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_ITEM_SELECTOR:"."+nt.SELECTED_ITEM_CLASS,SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},rt={LABEL_SCALE:.75,UNSET_INDEX:-1},ot=function(t){function e(n,i){void 0===i&&(i={});var r=t.call(this,o(o({},e.defaultAdapter),n))||this;return r.selectedIndex=rt.UNSET_INDEX,r.disabled=!1,r.isMenuOpen=!1,r.leadingIcon=i.leadingIcon,r.helperText=i.helperText,r.menuItemValues=r.adapter_.getMenuItemValues(),r.setDisabled(r.adapter_.hasClass(nt.DISABLED)),r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return nt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return rt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return it},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedMenuItem:function(){return null},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},setAttributeAtIndex:function(){},removeAttributeAtIndex:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},getMenuItemAttr:function(){return""},addClassAtIndex:function(){},removeClassAtIndex:function(){}}},enumerable:!0,configurable:!0}),e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t,e){if(void 0===e&&(e=!1),!(t>=this.adapter_.getMenuItemCount())){var n=this.selectedIndex;this.selectedIndex=t,this.selectedIndex===rt.UNSET_INDEX?this.adapter_.setSelectedText(""):this.adapter_.setSelectedText(this.adapter_.getMenuItemTextAtIndex(this.selectedIndex).trim()),n!==rt.UNSET_INDEX&&(this.adapter_.removeClassAtIndex(n,nt.SELECTED_ITEM_CLASS),this.adapter_.removeAttributeAtIndex(n,it.ARIA_SELECTED_ATTR)),this.selectedIndex!==rt.UNSET_INDEX&&(this.adapter_.addClassAtIndex(this.selectedIndex,nt.SELECTED_ITEM_CLASS),this.adapter_.setAttributeAtIndex(this.selectedIndex,it.ARIA_SELECTED_ATTR,"true")),this.layout(),e&&this.adapter_.closeMenu(),this.handleChange()}},e.prototype.setValue=function(t){var e=this.menuItemValues.indexOf(t);this.setSelectedIndex(e)},e.prototype.getValue=function(){var t=this.adapter_.getSelectedMenuItem();return t&&this.adapter_.getMenuItemAttr(t,it.VALUE_ATTR)||""},e.prototype.getDisabled=function(){return this.disabled},e.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter_.addClass(nt.DISABLED),this.adapter_.closeMenu()):this.adapter_.removeClass(nt.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.adapter_.setSelectAnchorAttr("tabindex",this.disabled?"-1":"0"),this.adapter_.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.layout=function(){if(this.adapter_.hasLabel()){var t=this.getValue().length>0;this.notchOutline(t)}},e.prototype.handleMenuOpened=function(){if(0!==this.adapter_.getMenuItemValues().length){this.adapter_.addClass(nt.ACTIVATED);var t=this.selectedIndex>=0?this.selectedIndex:0;this.adapter_.focusMenuItemAtIndex(t)}},e.prototype.handleMenuClosed=function(){this.adapter_.removeClass(nt.ACTIVATED),this.isMenuOpen=!1,this.adapter_.setSelectAnchorAttr("aria-expanded","false"),this.adapter_.isSelectAnchorFocused()||this.blur()},e.prototype.handleChange=function(){this.updateLabel(),this.adapter_.notifyChange(this.getValue()),this.adapter_.hasClass(nt.REQUIRED)&&(this.setValid(this.isValid()),this.helperText&&this.helperText.setValidity(this.isValid()))},e.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},e.prototype.handleFocus=function(){this.adapter_.addClass(nt.FOCUSED),this.adapter_.hasLabel()&&(this.notchOutline(!0),this.adapter_.floatLabel(!0)),this.adapter_.activateBottomLine(),this.helperText&&this.helperText.showToScreenReader()},e.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},e.prototype.handleClick=function(t){this.isMenuOpen||(this.adapter_.setRippleCenter(t),this.adapter_.openMenu(),this.isMenuOpen=!0,this.adapter_.setSelectAnchorAttr("aria-expanded","true"))},e.prototype.handleKeydown=function(t){if(!this.isMenuOpen){var e="Enter"===t.key||13===t.keyCode,n="Space"===t.key||32===t.keyCode,i="ArrowUp"===t.key||38===t.keyCode,r="ArrowDown"===t.key||40===t.keyCode;this.adapter_.hasClass(nt.FOCUSED)&&(e||n||i||r)&&(this.adapter_.openMenu(),this.isMenuOpen=!0,this.adapter_.setSelectAnchorAttr("aria-expanded","true"),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter_.hasOutline()){var e=this.adapter_.hasClass(nt.FOCUSED);if(t){var n=rt.LABEL_SCALE,i=this.adapter_.getLabelWidth()*n;this.adapter_.notchOutline(i)}else e||this.adapter_.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setValid=function(t){this.adapter_.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?this.adapter_.removeClass(nt.INVALID):this.adapter_.addClass(nt.INVALID)},e.prototype.isValid=function(){return!(this.adapter_.hasClass(nt.REQUIRED)&&!this.adapter_.hasClass(nt.DISABLED))||this.selectedIndex!==rt.UNSET_INDEX&&(0!==this.selectedIndex||Boolean(this.getValue()))},e.prototype.setRequired=function(t){t?this.adapter_.addClass(nt.REQUIRED):this.adapter_.removeClass(nt.REQUIRED),this.adapter_.setSelectAnchorAttr("aria-required",t.toString())},e.prototype.getRequired=function(){return"true"===this.adapter_.getSelectAnchorAttr("aria-required")},e.prototype.init=function(){var t=this.adapter_.getAnchorElement();t&&(this.adapter_.setMenuAnchorElement(t),this.adapter_.setMenuAnchorCorner(A.BOTTOM_START)),this.adapter_.setMenuWrapFocus(!1);var e=this.getValue();e&&this.setValue(e),this.updateLabel()},e.prototype.updateLabel=function(){var t=this.getValue().length>0;this.adapter_.hasLabel()&&(this.notchOutline(t),this.adapter_.hasClass(nt.FOCUSED)||this.adapter_.floatLabel(t))},e.prototype.blur=function(){this.adapter_.removeClass(nt.FOCUSED),this.updateLabel(),this.adapter_.deactivateBottomLine(),this.adapter_.hasClass(nt.REQUIRED)&&(this.setValid(this.isValid()),this.helperText&&this.helperText.setValidity(this.isValid()))},e}(d),at={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},st={HELPER_TEXT_PERSISTENT:"mdc-select-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg"},ct=function(t){function e(n){return t.call(this,o(o({},e.defaultAdapter),n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return st},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return at},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.setPersistent=function(t){t?this.adapter_.addClass(st.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass(st.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass(st.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass(st.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(at.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass(st.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass(st.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(at.ROLE,"alert"):this.adapter_.removeAttr(at.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(at.ARIA_HIDDEN,"true")},e}(d),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundation",{get:function(){return this.foundation_},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new ct({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)},setAttr:function(e,n){return t.root_.setAttribute(e,n)},removeAttr:function(e){return t.root_.removeAttribute(e)},setContent:function(e){t.root_.textContent=e}})},e}(h),lt={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},dt=["click","keydown"],ht=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(t){return i.handleInteraction(t)},i}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return lt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter_.getAttr("tabindex"),dt.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;dt.forEach((function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_)}))},e.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter_.setAttr("tabindex","-1"),this.adapter_.removeAttr("role")):(this.adapter_.setAttr("tabindex",this.savedTabIndex_),this.adapter_.setAttr("role",lt.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter_.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&this.adapter_.notifyIconAction()},e}(d),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundation",{get:function(){return this.foundation_},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new ht({getAttr:function(e){return t.root_.getAttribute(e)},setAttr:function(e,n){return t.root_.setAttribute(e,n)},removeAttr:function(e){return t.root_.removeAttribute(e)},setContent:function(e){t.root_.textContent=e},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},notifyIconAction:function(){return t.emit(ht.strings.ICON_EVENT,{},!0)}})},e}(h),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e,n,i,r,o){if(void 0===t&&(t=function(t){return new R(t)}),void 0===e&&(e=function(t){return new D(t)}),void 0===n&&(n=function(t){return new et(t)}),void 0===i&&(i=function(t){return new Q(t)}),void 0===r&&(r=function(t){return new pt(t)}),void 0===o&&(o=function(t){return new ut(t)}),this.selectAnchor=this.root_.querySelector(it.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root_.querySelector(it.SELECTED_TEXT_SELECTOR),!this.selectedText)throw new Error("MDCSelect: Missing required element: The following selector must be present: '"+it.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(it.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(it.ARIA_CONTROLS));a&&(this.helperText=o(a))}this.menuSetup(i);var s=this.root_.querySelector(it.LABEL_SELECTOR);this.label=s?t(s):null;var c=this.root_.querySelector(it.LINE_RIPPLE_SELECTOR);this.lineRipple=c?e(c):null;var u=this.root_.querySelector(it.OUTLINE_SELECTOR);this.outline=u?n(u):null;var l=this.root_.querySelector(it.LEADING_ICON_SELECTOR);l&&(this.leadingIcon=r(l)),this.root_.classList.contains(nt.OUTLINED)||(this.ripple=this.createRipple())},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleChange=function(){t.foundation_.handleChange()},this.handleFocus=function(){t.foundation_.handleFocus()},this.handleBlur=function(){t.foundation_.handleBlur()},this.handleClick=function(e){t.selectAnchor.focus(),t.foundation_.handleClick(t.getNormalizedXCoordinate(e))},this.handleKeydown=function(e){t.foundation_.handleKeydown(e)},this.handleMenuItemAction=function(e){t.foundation_.handleMenuItemAction(e.detail.index)},this.handleMenuOpened=function(){t.foundation_.handleMenuOpened()},this.handleMenuClosed=function(){t.foundation_.handleMenuClosed()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(P.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(P.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(X.SELECTED_EVENT,this.handleMenuItemAction),this.foundation_.init()},e.prototype.destroy=function(){this.selectAnchor.removeEventListener("change",this.handleChange),this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(P.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(P.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(X.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation_.getSelectedIndex()},set:function(t){this.foundation_.setSelectedIndex(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation_.getDisabled()},set:function(t){this.foundation_.setDisabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation_.setLeadingIconAriaLabel(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation_.setLeadingIconContent(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation_.setHelperTextContent(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation_.isValid()},set:function(t){this.foundation_.setValid(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.foundation_.getRequired()},set:function(t){this.foundation_.setRequired(t)},enumerable:!0,configurable:!0}),e.prototype.layout=function(){this.foundation_.layout()},e.prototype.getDefaultFoundation=function(){var t=o(o(o(o({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods());return new ot(t,this.getFoundationMap())},e.prototype.menuSetup=function(t){this.menuElement=this.root_.querySelector(it.MENU_SELECTOR),this.menu=t(this.menuElement)},e.prototype.createRipple=function(){var t=this,e=o(o({},S.createAdapter({root_:this.selectAnchor})),{registerInteractionHandler:function(e,n){t.selectAnchor.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){t.selectAnchor.removeEventListener(e,n)}});return new S(this.selectAnchor,new b(e))},e.prototype.getSelectAdapterMethods=function(){var t=this;return{getSelectedMenuItem:function(){return t.menuElement.querySelector(it.SELECTED_ITEM_SELECTOR)},getMenuItemAttr:function(t,e){return t.getAttribute(e)},setSelectedText:function(e){t.selectedText.value=e},isSelectAnchorFocused:function(){return document.activeElement===t.selectAnchor},getSelectAnchorAttr:function(e){return t.selectAnchor.getAttribute(e)},setSelectAnchorAttr:function(e,n){t.selectAnchor.setAttribute(e,n)},openMenu:function(){t.menu.open=!0},closeMenu:function(){t.menu.open=!1},getAnchorElement:function(){return t.root_.querySelector(it.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(e){t.menu.setAnchorElement(e)},setMenuAnchorCorner:function(e){t.menu.setAnchorCorner(e)},setMenuWrapFocus:function(e){t.menu.wrapFocus=e},setAttributeAtIndex:function(e,n,i){t.menu.items[e].setAttribute(n,i)},removeAttributeAtIndex:function(e,n){t.menu.items[e].removeAttribute(n)},focusMenuItemAtIndex:function(e){t.menu.items[e].focus()},getMenuItemCount:function(){return t.menu.items.length},getMenuItemValues:function(){return t.menu.items.map((function(t){return t.getAttribute(it.VALUE_ATTR)||""}))},getMenuItemTextAtIndex:function(e){return t.menu.items[e].textContent},addClassAtIndex:function(e,n){t.menu.items[e].classList.add(n)},removeClassAtIndex:function(e,n){t.menu.items[e].classList.remove(n)}}},e.prototype.getCommonAdapterMethods=function(){var t=this;return{addClass:function(e){t.root_.classList.add(e)},removeClass:function(e){t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},setRippleCenter:function(e){t.lineRipple&&t.lineRipple.setRippleCenter(e)},activateBottomLine:function(){t.lineRipple&&t.lineRipple.activate()},deactivateBottomLine:function(){t.lineRipple&&t.lineRipple.deactivate()},notifyChange:function(e){var n=t.selectedIndex;t.emit(it.CHANGE_EVENT,{value:e,index:n},!0)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{hasOutline:function(){return Boolean(t.outline)},notchOutline:function(e){t.outline&&t.outline.notch(e)},closeOutline:function(){t.outline&&t.outline.closeNotch()}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{hasLabel:function(){return!!t.label},floatLabel:function(e){t.label&&t.label.float(e)},getLabelWidth:function(){return t.label?t.label.getWidth():0}}},e.prototype.getNormalizedXCoordinate=function(t){var e=t.target.getBoundingClientRect();return(this.isTouchEvent(t)?t.touches[0].clientX:t.clientX)-e.left},e.prototype.isTouchEvent=function(t){return Boolean(t.touches)},e.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundation:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundation:void 0}},e}(h),_t={ROOT:"mdc-form-field"},mt={LABEL_SELECTOR:".mdc-form-field > label"},Et=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.clickHandler_=function(){return i.handleClick_()},i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return _t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return mt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_)},e.prototype.handleClick_=function(){var t=this;this.adapter_.activateInputRipple(),requestAnimationFrame((function(){return t.adapter_.deactivateInputRipple()}))},e}(d),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"input",{get:function(){return this.input_},set:function(t){this.input_=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label_",{get:function(){var t=Et.strings.LABEL_SELECTOR;return this.root_.querySelector(t)},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new Et({activateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.activate()},deactivateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.deactivate()},deregisterInteractionHandler:function(e,n){t.label_&&t.label_.removeEventListener(e,n)},registerInteractionHandler:function(e,n){t.label_&&t.label_.addEventListener(e,n)}})},e}(h),yt={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function gt(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}function At(t,e){if(gt(t)&&e in yt){var n=t.document.createElement("div"),i=yt[e],r=i.standard,o=i.prefixed;return i.cssProperty in n.style?r:o}return e} /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */var It={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},Tt={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},vt={ANIM_END_LATCH_MS:250},bt=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.currentCheckState_=Tt.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return It},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Tt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return vt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter_.addClass(It.UPGRADED)},e.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},e.prototype.setDisabled=function(t){this.adapter_.setNativeControlDisabled(t),t?this.adapter_.addClass(It.DISABLED):this.adapter_.removeClass(It.DISABLED)},e.prototype.handleAnimationEnd=function(){var t=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout((function(){t.adapter_.removeClass(t.currentAnimationClass_),t.enableAnimationEndHandler_=!1}),vt.ANIM_END_LATCH_MS))},e.prototype.handleChange=function(){this.transitionCheckState_()},e.prototype.transitionCheckState_=function(){if(this.adapter_.hasNativeControl()){var t=this.currentCheckState_,e=this.determineCheckState_();if(t!==e){this.updateAriaChecked_();var n=It.SELECTED;e===Tt.TRANSITION_STATE_UNCHECKED?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter_.forceLayout(),this.adapter_.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(t,e),this.currentCheckState_=e,this.adapter_.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter_.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},e.prototype.determineCheckState_=function(){var t=Tt.TRANSITION_STATE_INDETERMINATE,e=Tt.TRANSITION_STATE_CHECKED,n=Tt.TRANSITION_STATE_UNCHECKED;return this.adapter_.isIndeterminate()?t:this.adapter_.isChecked()?e:n},e.prototype.getTransitionAnimationClass_=function(t,n){var i=Tt.TRANSITION_STATE_INIT,r=Tt.TRANSITION_STATE_CHECKED,o=Tt.TRANSITION_STATE_UNCHECKED,a=e.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,c=a.ANIM_UNCHECKED_INDETERMINATE,u=a.ANIM_CHECKED_UNCHECKED,l=a.ANIM_CHECKED_INDETERMINATE,d=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(t){case i:return n===o?"":n===r?d:h;case o:return n===r?s:c;case r:return n===o?u:l;default:return n===r?d:h}},e.prototype.updateAriaChecked_=function(){this.adapter_.isIndeterminate()?this.adapter_.setNativeControlAttr(Tt.ARIA_CHECKED_ATTR,Tt.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter_.removeNativeControlAttr(Tt.ARIA_CHECKED_ATTR)},e}(d),St=["checked","indeterminate"],Ot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ripple_=e.createRipple_(),e}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(t){this.nativeControl_.checked=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return this.nativeControl_.indeterminate},set:function(t){this.nativeControl_.indeterminate=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(t){this.foundation_.setDisabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.nativeControl_.value},set:function(t){this.nativeControl_.value=t},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){var t=Tt.DATA_INDETERMINATE_ATTR;this.nativeControl_.indeterminate="true"===this.nativeControl_.getAttribute(t),this.nativeControl_.removeAttribute(t)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleChange_=function(){return t.foundation_.handleChange()},this.handleAnimationEnd_=function(){return t.foundation_.handleAnimationEnd()},this.nativeControl_.addEventListener("change",this.handleChange_),this.listen(At(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},e.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(At(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new bt({addClass:function(e){return t.root_.classList.add(e)},forceLayout:function(){return t.root_.offsetWidth},hasNativeControl:function(){return!!t.nativeControl_},isAttachedToDOM:function(){return Boolean(t.root_.parentNode)},isChecked:function(){return t.checked},isIndeterminate:function(){return t.indeterminate},removeClass:function(e){t.root_.classList.remove(e)},removeNativeControlAttr:function(e){t.nativeControl_.removeAttribute(e)},setNativeControlAttr:function(e,n){t.nativeControl_.setAttribute(e,n)},setNativeControlDisabled:function(e){t.nativeControl_.disabled=e}})},e.prototype.createRipple_=function(){var t=this,e=o(o({},S.createAdapter(this)),{deregisterInteractionHandler:function(e,n){return t.nativeControl_.removeEventListener(e,n,p())},isSurfaceActive:function(){return _(t.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,n){return t.nativeControl_.addEventListener(e,n,p())}});return new S(this.root_,new b(e))},e.prototype.installPropertyChangeHooks_=function(){var t=this,e=this.nativeControl_,n=Object.getPrototypeOf(e);St.forEach((function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(Lt(r)){var o=r.get,a={configurable:r.configurable,enumerable:r.enumerable,get:o,set:function(n){r.set.call(e,n),t.foundation_.handleChange()}};Object.defineProperty(e,i,a)}}))},e.prototype.uninstallPropertyChangeHooks_=function(){var t=this.nativeControl_,e=Object.getPrototypeOf(t);St.forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Lt(i)&&Object.defineProperty(t,n,i)}))},Object.defineProperty(e.prototype,"nativeControl_",{get:function(){var t=Tt.NATIVE_CONTROL_SELECTOR,e=this.root_.querySelector(t);if(!e)throw new Error("Checkbox component requires a "+t+" element");return e},enumerable:!0,configurable:!0}),e}(h);function Lt(t){return!!t&&"function"==typeof t.set} /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */var Rt,Nt="mdc-data-table__content",xt="mdc-data-table__header-cell--sorted",Dt="mdc-data-table__header-cell--sorted-descending",wt="mdc-data-table__header-row",Pt="mdc-data-table--in-progress",Ht="mdc-data-table__row--selected",kt={ARIA_SELECTED:"aria-selected",ARIA_SORT:"aria-sort",DATA_ROW_ID_ATTR:"data-row-id",HEADER_ROW_CHECKBOX_SELECTOR:"."+"mdc-data-table__header-row-checkbox",ROW_CHECKBOX_SELECTOR:"."+"mdc-data-table__row-checkbox",ROW_SELECTED_SELECTOR:"."+Ht,ROW_SELECTOR:"."+"mdc-data-table__row"};!function(t){t.ASCENDING="ascending",t.DESCENDING="descending",t.NONE="none",t.OTHER="other"}(Rt||(Rt={}));var Ft,Mt="MDCDataTable:rowSelectionChanged",Bt="MDCDataTable:selectedAll",Vt="MDCDataTable:unselectedAll",jt=function(t){function e(n){return t.call(this,o(o({},e.defaultAdapter),n))||this}return r(e,t),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},addClassAtRowIndex:function(){},getAttributeByHeaderCellIndex:function(){return""},getHeaderCellCount:function(){return 0},getHeaderCellElements:function(){return[]},getRowCount:function(){return 0},getRowElements:function(){return[]},getRowIdAtIndex:function(){return""},getRowIndexByChildElement:function(){return 0},getSelectedRowCount:function(){return 0},getTableBodyHeight:function(){return""},getTableHeaderHeight:function(){return""},isCheckboxAtRowIndexChecked:function(){return!1},isHeaderRowCheckboxChecked:function(){return!1},isRowsSelectable:function(){return!1},notifyRowSelectionChanged:function(){},notifySelectedAll:function(){},notifySortAction:function(){},notifyUnselectedAll:function(){},registerHeaderRowCheckbox:function(){},registerRowCheckboxes:function(){},removeClass:function(){},removeClassAtRowIndex:function(){},removeClassNameByHeaderCellIndex:function(){},setAttributeAtRowIndex:function(){},setAttributeByHeaderCellIndex:function(){},setClassNameByHeaderCellIndex:function(){},setHeaderRowCheckboxChecked:function(){},setHeaderRowCheckboxIndeterminate:function(){},setProgressIndicatorStyles:function(){},setRowCheckboxCheckedAtIndex:function(){}}},enumerable:!0,configurable:!0}),e.prototype.layout=function(){this.adapter_.isRowsSelectable()&&(this.adapter_.registerHeaderRowCheckbox(),this.adapter_.registerRowCheckboxes(),this.setHeaderRowCheckboxState_())},e.prototype.layoutAsync=function(){return a(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this.adapter_.isRowsSelectable()?[4,this.adapter_.registerHeaderRowCheckbox()]:[3,3];case 1:return t.sent(),[4,this.adapter_.registerRowCheckboxes()];case 2:t.sent(),this.setHeaderRowCheckboxState_(),t.label=3;case 3:return[2]}}))}))},e.prototype.getRows=function(){return this.adapter_.getRowElements()},e.prototype.getHeaderCells=function(){return this.adapter_.getHeaderCellElements()},e.prototype.setSelectedRowIds=function(t){for(var e=0;e=0&&(i=!0),this.adapter_.setRowCheckboxCheckedAtIndex(e,i),this.selectRowAtIndex_(e,i)}this.setHeaderRowCheckboxState_()},e.prototype.getRowIds=function(){for(var t=[],e=0;e=0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.adapter_.isFocused()?this.inputFocusHandler_():this.adapter_.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter_.floatLabel(!0),this.styleFloating_(!0)),this.adapter_.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.registerInputInteractionHandler("input",this.inputInputHandler_),ae.forEach((function(e){t.adapter_.registerInputInteractionHandler(e,t.setPointerXOffset_)})),se.forEach((function(e){t.adapter_.registerTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter_.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},e.prototype.destroy=function(){var t=this;this.adapter_.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.deregisterInputInteractionHandler("input",this.inputInputHandler_),ae.forEach((function(e){t.adapter_.deregisterInputInteractionHandler(e,t.setPointerXOffset_)})),se.forEach((function(e){t.adapter_.deregisterTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.adapter_.deregisterValidationAttributeChangeHandler(this.validationObserver_)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter_.getNativeInput();t&&t.disabled||(this.receivedUserInput_=!0)},e.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return re.indexOf(t)>-1&&(e.styleValidity_(!0),!0)})),t.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter_.hasOutline())if(t){var e=this.adapter_.getLabelWidth()*ie.LABEL_SCALE;this.adapter_.notchOutline(e)}else this.adapter_.closeOutline()},e.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter_.activateLineRipple(),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.helperText_&&this.helperText_.showToScreenReader()},e.prototype.setTransformOrigin=function(t){var e=t.touches,n=e?e[0]:t,i=n.target.getBoundingClientRect(),r=n.clientX-i.left;this.adapter_.setLineRippleTransformOrigin(r)},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter_.deactivateLineRipple();var t=this.isValid();this.styleValidity_(t),this.styleFocused_(this.isFocused_),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},e.prototype.getValue=function(){return this.getNativeInput_().value},e.prototype.setValue=function(t){this.getValue()!==t&&(this.getNativeInput_().value=t),this.setCharacterCounter_(t.length);var e=this.isValid();this.styleValidity_(e),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},e.prototype.setValid=function(t){this.isValid_=t,this.styleValidity_(t);var e=!t&&!this.isFocused_&&!!this.getValue();this.adapter_.hasLabel()&&this.adapter_.shakeLabel(e)},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation_=t},e.prototype.isDisabled=function(){return this.getNativeInput_().disabled},e.prototype.setDisabled=function(t){this.getNativeInput_().disabled=t,this.styleDisabled_(t)},e.prototype.setHelperTextContent=function(t){this.helperText_&&this.helperText_.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon_&&this.trailingIcon_.setContent(t)},e.prototype.setCharacterCounter_=function(t){if(this.characterCounter_){var e=this.getNativeInput_().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(t,e)}},e.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},e.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},e.prototype.styleValidity_=function(t){var n=e.cssClasses.INVALID;t?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.helperText_&&this.helperText_.setValidity(t)},e.prototype.styleFocused_=function(t){var n=e.cssClasses.FOCUSED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.styleDisabled_=function(t){var n=e.cssClasses,i=n.DISABLED,r=n.INVALID;t?(this.adapter_.addClass(i),this.adapter_.removeClass(r)):this.adapter_.removeClass(i),this.leadingIcon_&&this.leadingIcon_.setDisabled(t),this.trailingIcon_&&this.trailingIcon_.setDisabled(t)},e.prototype.styleFloating_=function(t){var n=e.cssClasses.LABEL_FLOATING;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.getNativeInput_=function(){return(this.adapter_?this.adapter_.getNativeInput():null)||{disabled:!1,maxLength:-1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(d),ue={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},le={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+ue.ROOT},de=function(t){function e(n){return t.call(this,o(o({},e.defaultAdapter),n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ue},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return le},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.setPersistent=function(t){t?this.adapter_.addClass(ue.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass(ue.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass(ue.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass(ue.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(le.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass(ue.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass(ue.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(le.ROLE,"alert"):this.adapter_.removeAttr(le.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(le.ARIA_HIDDEN,"true")},e}(d),he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundation",{get:function(){return this.foundation_},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new de({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)},setAttr:function(e,n){return t.root_.setAttribute(e,n)},removeAttr:function(e){return t.root_.removeAttribute(e)},setContent:function(e){t.root_.textContent=e}})},e}(h),pe={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},fe={ROOT:"mdc-text-field__icon"},_e=["click","keydown"],me=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(t){return i.handleInteraction(t)},i}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return pe},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return fe},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter_.getAttr("tabindex"),_e.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;_e.forEach((function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_)}))},e.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter_.setAttr("tabindex","-1"),this.adapter_.removeAttr("role")):(this.adapter_.setAttr("tabindex",this.savedTabIndex_),this.adapter_.setAttr("role",pe.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter_.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&(t.preventDefault(),this.adapter_.notifyIconAction())},e}(d),Ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundation",{get:function(){return this.foundation_},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new me({getAttr:function(e){return t.root_.getAttribute(e)},setAttr:function(e,n){return t.root_.setAttribute(e,n)},removeAttr:function(e){return t.root_.removeAttribute(e)},setContent:function(e){t.root_.textContent=e},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},notifyIconAction:function(){return t.emit(me.strings.ICON_EVENT,{},!0)}})},e}(h),Ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e,n,i,r,o,a){void 0===t&&(t=function(t,e){return new S(t,e)}),void 0===e&&(e=function(t){return new D(t)}),void 0===n&&(n=function(t){return new he(t)}),void 0===i&&(i=function(t){return new te(t)}),void 0===r&&(r=function(t){return new Ee(t)}),void 0===o&&(o=function(t){return new R(t)}),void 0===a&&(a=function(t){return new et(t)}),this.input_=this.root_.querySelector(ee.INPUT_SELECTOR);var s=this.root_.querySelector(ee.LABEL_SELECTOR);this.label_=s?o(s):null;var c=this.root_.querySelector(ee.LINE_RIPPLE_SELECTOR);this.lineRipple_=c?e(c):null;var u=this.root_.querySelector(ee.OUTLINE_SELECTOR);this.outline_=u?a(u):null;var l=de.strings,d=this.root_.nextElementSibling,h=d&&d.classList.contains(ne.HELPER_LINE),p=h&&d&&d.querySelector(l.ROOT_SELECTOR);this.helperText_=p?n(p):null;var f=Jt.strings,_=this.root_.querySelector(f.ROOT_SELECTOR);!_&&h&&d&&(_=d.querySelector(f.ROOT_SELECTOR)),this.characterCounter_=_?i(_):null;var m=this.root_.querySelector(ee.LEADING_ICON_SELECTOR);this.leadingIcon_=m?r(m):null;var E=this.root_.querySelector(ee.TRAILING_ICON_SELECTOR);this.trailingIcon_=E?r(E):null,this.prefix_=this.root_.querySelector(ee.PREFIX_SELECTOR),this.suffix_=this.root_.querySelector(ee.SUFFIX_SELECTOR),this.ripple=this.createRipple_(t)},e.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),t.prototype.destroy.call(this)},e.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation_.isValid()},set:function(t){this.foundation_.setValid(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.input_.required},set:function(t){this.input_.required=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(t){this.input_.pattern=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(t){this.input_.minLength=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(t){t<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.input_.min},set:function(t){this.input_.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.input_.max},set:function(t){this.input_.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.input_.step},set:function(t){this.input_.step=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation_.setHelperTextContent(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation_.setLeadingIconAriaLabel(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation_.setLeadingIconContent(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation_.setTrailingIconAriaLabel(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconContent",{set:function(t){this.foundation_.setTrailingIconContent(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useNativeValidation",{set:function(t){this.foundation_.setUseNativeValidation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(t){this.prefix_&&(this.prefix_.textContent=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(t){this.suffix_&&(this.suffix_.textContent=t)},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this.input_.focus()},e.prototype.layout=function(){var t=this.foundation_.shouldFloat;this.foundation_.notchOutline(t)},e.prototype.getDefaultFoundation=function(){var t=o(o(o(o(o({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_());return new ce(t,this.getFoundationMap_())},e.prototype.getRootAdapterMethods_=function(){var t=this;return{addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},registerTextFieldInteractionHandler:function(e,n){return t.listen(e,n)},deregisterTextFieldInteractionHandler:function(e,n){return t.unlisten(e,n)},registerValidationAttributeChangeHandler:function(e){var n=new MutationObserver((function(t){return e(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return n.observe(t.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(t){return t.disconnect()}}},e.prototype.getInputAdapterMethods_=function(){var t=this;return{getNativeInput:function(){return t.input_},isFocused:function(){return document.activeElement===t.input_},registerInputInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,p())},deregisterInputInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,p())}}},e.prototype.getLabelAdapterMethods_=function(){var t=this;return{floatLabel:function(e){return t.label_&&t.label_.float(e)},getLabelWidth:function(){return t.label_?t.label_.getWidth():0},hasLabel:function(){return Boolean(t.label_)},shakeLabel:function(e){return t.label_&&t.label_.shake(e)}}},e.prototype.getLineRippleAdapterMethods_=function(){var t=this;return{activateLineRipple:function(){t.lineRipple_&&t.lineRipple_.activate()},deactivateLineRipple:function(){t.lineRipple_&&t.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(e){t.lineRipple_&&t.lineRipple_.setRippleCenter(e)}}},e.prototype.getOutlineAdapterMethods_=function(){var t=this;return{closeOutline:function(){return t.outline_&&t.outline_.closeNotch()},hasOutline:function(){return Boolean(t.outline_)},notchOutline:function(e){return t.outline_&&t.outline_.notch(e)}}},e.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundation:void 0,helperText:this.helperText_?this.helperText_.foundation:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundation:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundation:void 0}},e.prototype.createRipple_=function(t){var e=this,n=this.root_.classList.contains(ne.TEXTAREA),i=this.root_.classList.contains(ne.OUTLINED);if(n||i)return null;var r=o(o({},S.createAdapter(this)),{isSurfaceActive:function(){return _(e.input_,":active")},registerInteractionHandler:function(t,n){return e.input_.addEventListener(t,n,p())},deregisterInteractionHandler:function(t,n){return e.input_.removeEventListener(t,n,p())}});return t(this.root_,new b(r))},e}(h),ye={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},ge={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},Ae=function(t){this.adapter_=t},Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getScrollPositionRTL=function(){var t=this.adapter_.getScrollAreaScrollLeft(),e=this.calculateScrollEdges_().right;return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges_(),n=this.adapter_.getScrollAreaScrollLeft(),i=this.clampScrollValue_(e.right-t);return{finalScrollPosition:i,scrollDelta:i-n}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft(),n=this.clampScrollValue_(e-t);return{finalScrollPosition:n,scrollDelta:n-e}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges_=function(){return{left:0,right:this.adapter_.getScrollContentOffsetWidth()-this.adapter_.getScrollAreaOffsetWidth()}},e.prototype.clampScrollValue_=function(t){var e=this.calculateScrollEdges_();return Math.min(Math.max(e.left,t),e.right)},e}(Ae),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft();return Math.round(t-e)},e.prototype.scrollToRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft(),n=this.clampScrollValue_(-t);return{finalScrollPosition:n,scrollDelta:n-e}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft(),n=this.clampScrollValue_(e-t);return{finalScrollPosition:n,scrollDelta:n-e}},e.prototype.getAnimatingScrollPosition=function(t,e){return t-e},e.prototype.calculateScrollEdges_=function(){var t=this.adapter_.getScrollContentOffsetWidth();return{left:this.adapter_.getScrollAreaOffsetWidth()-t,right:0}},e.prototype.clampScrollValue_=function(t){var e=this.calculateScrollEdges_();return Math.max(Math.min(e.right,t),e.left)},e}(Ae),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft();return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft(),n=this.clampScrollValue_(t);return{finalScrollPosition:n,scrollDelta:e-n}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter_.getScrollAreaScrollLeft(),n=this.clampScrollValue_(e+t);return{finalScrollPosition:n,scrollDelta:e-n}},e.prototype.getAnimatingScrollPosition=function(t,e){return t+e},e.prototype.calculateScrollEdges_=function(){return{left:this.adapter_.getScrollContentOffsetWidth()-this.adapter_.getScrollAreaOffsetWidth(),right:0}},e.prototype.clampScrollValue_=function(t){var e=this.calculateScrollEdges_();return Math.min(Math.max(e.right,t),e.left)},e}(Ae),be=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.isAnimating_=!1,i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ye},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ge},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this.adapter_.computeHorizontalScrollbarHeight();this.adapter_.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter_.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL_())return this.computeCurrentScrollPositionRTL_();var t=this.calculateCurrentTranslateX_();return this.adapter_.getScrollAreaScrollLeft()-t},e.prototype.handleInteraction=function(){this.isAnimating_&&this.stopScrollAnimation_()},e.prototype.handleTransitionEnd=function(t){var n=t.target;this.isAnimating_&&this.adapter_.eventTargetMatchesSelector(n,e.strings.CONTENT_SELECTOR)&&(this.isAnimating_=!1,this.adapter_.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){0!==t&&this.animate_(this.getIncrementScrollOperation_(t))},e.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation_(t);0!==e.scrollDelta&&(this.stopScrollAnimation_(),this.adapter_.setScrollAreaScrollLeft(e.finalScrollPosition))}},e.prototype.scrollTo=function(t){if(this.isRTL_())return this.scrollToRTL_(t);this.scrollTo_(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance_||(this.rtlScrollerInstance_=this.rtlScrollerFactory_()),this.rtlScrollerInstance_},e.prototype.calculateCurrentTranslateX_=function(){var t=this.adapter_.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var n=u(e[1].split(","),6),i=(n[0],n[1],n[2],n[3],n[4]);n[5];return parseFloat(i)},e.prototype.clampScrollValue_=function(t){var e=this.calculateScrollEdges_();return Math.min(Math.max(e.left,t),e.right)},e.prototype.computeCurrentScrollPositionRTL_=function(){var t=this.calculateCurrentTranslateX_();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges_=function(){return{left:0,right:this.adapter_.getScrollContentOffsetWidth()-this.adapter_.getScrollAreaOffsetWidth()}},e.prototype.scrollTo_=function(t){var e=this.getScrollPosition(),n=this.clampScrollValue_(t),i=n-e;this.animate_({finalScrollPosition:n,scrollDelta:i})},e.prototype.scrollToRTL_=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate_(e)},e.prototype.getIncrementScrollOperation_=function(t){if(this.isRTL_())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),n=t+e,i=this.clampScrollValue_(n);return{finalScrollPosition:i,scrollDelta:i-e}},e.prototype.animate_=function(t){var n=this;0!==t.scrollDelta&&(this.stopScrollAnimation_(),this.adapter_.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter_.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter_.computeScrollAreaClientRect(),requestAnimationFrame((function(){n.adapter_.addClass(e.cssClasses.ANIMATING),n.adapter_.setScrollContentStyleProperty("transform","none")})),this.isAnimating_=!0)},e.prototype.stopScrollAnimation_=function(){this.isAnimating_=!1;var t=this.getAnimatingScrollPosition_();this.adapter_.removeClass(e.cssClasses.ANIMATING),this.adapter_.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter_.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition_=function(){var t=this.calculateCurrentTranslateX_(),e=this.adapter_.getScrollAreaScrollLeft();return this.isRTL_()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},e.prototype.rtlScrollerFactory_=function(){var t=this.adapter_.getScrollAreaScrollLeft();this.adapter_.setScrollAreaScrollLeft(t-1);var e=this.adapter_.getScrollAreaScrollLeft();if(e<0)return this.adapter_.setScrollAreaScrollLeft(t),new Te(this.adapter_);var n=this.adapter_.computeScrollAreaClientRect(),i=this.adapter_.computeScrollContentClientRect(),r=Math.round(i.right-n.right);return this.adapter_.setScrollAreaScrollLeft(t),r===e?new ve(this.adapter_):new Ie(this.adapter_)},e.prototype.isRTL_=function(){return"rtl"===this.adapter_.getScrollContentStyleValue("direction")},e}(d); /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var Se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area_=this.root_.querySelector(be.strings.AREA_SELECTOR),this.content_=this.root_.querySelector(be.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction_=function(){return t.foundation_.handleInteraction()},this.handleTransitionEnd_=function(e){return t.foundation_.handleTransitionEnd(e)},this.area_.addEventListener("wheel",this.handleInteraction_,p()),this.area_.addEventListener("touchstart",this.handleInteraction_,p()),this.area_.addEventListener("pointerdown",this.handleInteraction_,p()),this.area_.addEventListener("mousedown",this.handleInteraction_,p()),this.area_.addEventListener("keydown",this.handleInteraction_,p()),this.content_.addEventListener("transitionend",this.handleTransitionEnd_)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.area_.removeEventListener("wheel",this.handleInteraction_,p()),this.area_.removeEventListener("touchstart",this.handleInteraction_,p()),this.area_.removeEventListener("pointerdown",this.handleInteraction_,p()),this.area_.removeEventListener("mousedown",this.handleInteraction_,p()),this.area_.removeEventListener("keydown",this.handleInteraction_,p()),this.content_.removeEventListener("transitionend",this.handleTransitionEnd_)},e.prototype.getDefaultFoundation=function(){var t=this;return new be({eventTargetMatchesSelector:function(t,e){return _(t,e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},addScrollAreaClass:function(e){return t.area_.classList.add(e)},setScrollAreaStyleProperty:function(e,n){return t.area_.style.setProperty(e,n)},setScrollContentStyleProperty:function(e,n){return t.content_.style.setProperty(e,n)},getScrollContentStyleValue:function(e){return window.getComputedStyle(t.content_).getPropertyValue(e)},setScrollAreaScrollLeft:function(e){return t.area_.scrollLeft=e},getScrollAreaScrollLeft:function(){return t.area_.scrollLeft},getScrollContentOffsetWidth:function(){return t.content_.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area_.offsetWidth},computeScrollAreaClientRect:function(){return t.area_.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content_.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return function(t,e){if(void 0===e&&(e=!0),e&&void 0!==Ft)return Ft;var n=t.createElement("div");n.classList.add(ye.SCROLL_TEST),t.body.appendChild(n);var i=n.offsetHeight-n.clientHeight;return t.body.removeChild(n),e&&(Ft=i),i}(document)}})},e.prototype.getScrollPosition=function(){return this.foundation_.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content_.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation_.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation_.scrollTo(t)},e}(h),Oe={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},Le={CONTENT_SELECTOR:".mdc-tab-indicator__content"},Re=function(t){function e(n){return t.call(this,o(o({},e.defaultAdapter),n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Oe},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Le},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter_.computeContentClientRect()},e}(d),Ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.activate=function(){this.adapter_.addClass(Re.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter_.removeClass(Re.cssClasses.ACTIVE)},e}(Re),xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.activate=function(t){if(t){var e=this.computeContentClientRect(),n=t.width/e.width,i=t.left-e.left;this.adapter_.addClass(Re.cssClasses.NO_TRANSITION),this.adapter_.setContentStyleProperty("transform","translateX("+i+"px) scaleX("+n+")"),this.computeContentClientRect(),this.adapter_.removeClass(Re.cssClasses.NO_TRANSITION),this.adapter_.addClass(Re.cssClasses.ACTIVE),this.adapter_.setContentStyleProperty("transform","")}else this.adapter_.addClass(Re.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter_.removeClass(Re.cssClasses.ACTIVE)},e}(Re),De=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content_=this.root_.querySelector(Re.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation_.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},computeContentClientRect:function(){return t.content_.getBoundingClientRect()},setContentStyleProperty:function(e,n){return t.content_.style.setProperty(e,n)}};return this.root_.classList.contains(Re.cssClasses.FADE)?new Ne(e):new xe(e)},e.prototype.activate=function(t){this.foundation_.activate(t)},e.prototype.deactivate=function(){this.foundation_.deactivate()},e}(h),we={ACTIVE:"mdc-tab--active"},Pe={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},He=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.focusOnActivate_=!0,i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return we},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Pe},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.handleClick=function(){this.adapter_.notifyInteracted()},e.prototype.isActive=function(){return this.adapter_.hasClass(we.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate_=t},e.prototype.activate=function(t){this.adapter_.addClass(we.ACTIVE),this.adapter_.setAttr(Pe.ARIA_SELECTED,"true"),this.adapter_.setAttr(Pe.TABINDEX,"0"),this.adapter_.activateIndicator(t),this.focusOnActivate_&&this.adapter_.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter_.removeClass(we.ACTIVE),this.adapter_.setAttr(Pe.ARIA_SELECTED,"false"),this.adapter_.setAttr(Pe.TABINDEX,"-1"),this.adapter_.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter_.getOffsetWidth(),e=this.adapter_.getOffsetLeft(),n=this.adapter_.getContentOffsetWidth(),i=this.adapter_.getContentOffsetLeft();return{contentLeft:e+i,contentRight:e+i+n,rootLeft:e,rootRight:e+t}},e}(d),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t,e){return new S(t,e)}),void 0===e&&(e=function(t){return new De(t)}),this.id=this.root_.id;var n=this.root_.querySelector(He.strings.RIPPLE_SELECTOR),i=o(o({},S.createAdapter(this)),{addClass:function(t){return n.classList.add(t)},removeClass:function(t){return n.classList.remove(t)},updateCssVariable:function(t,e){return n.style.setProperty(t,e)}}),r=new b(i);this.ripple_=t(this.root_,r);var a=this.root_.querySelector(He.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator_=e(a),this.content_=this.root_.querySelector(He.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick_=function(){return t.foundation_.handleClick()},this.listen("click",this.handleClick_)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.ripple_.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new He({setAttr:function(e,n){return t.root_.setAttribute(e,n)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},activateIndicator:function(e){return t.tabIndicator_.activate(e)},deactivateIndicator:function(){return t.tabIndicator_.deactivate()},notifyInteracted:function(){return t.emit(He.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root_.offsetLeft},getOffsetWidth:function(){return t.root_.offsetWidth},getContentOffsetLeft:function(){return t.content_.offsetLeft},getContentOffsetWidth:function(){return t.content_.offsetWidth},focus:function(){return t.root_.focus()}})},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation_.isActive()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation_.setFocusOnActivate(t)},enumerable:!0,configurable:!0}),e.prototype.activate=function(t){this.foundation_.activate(t)},e.prototype.deactivate=function(){this.foundation_.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator_.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation_.computeDimensions()},e.prototype.focus=function(){this.root_.focus()},e}(h),Fe={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},Me={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},Be=new Set; /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */Be.add(Fe.ARROW_LEFT_KEY),Be.add(Fe.ARROW_RIGHT_KEY),Be.add(Fe.END_KEY),Be.add(Fe.HOME_KEY),Be.add(Fe.ENTER_KEY),Be.add(Fe.SPACE_KEY);var Ve=new Map;Ve.set(Me.ARROW_LEFT_KEYCODE,Fe.ARROW_LEFT_KEY),Ve.set(Me.ARROW_RIGHT_KEYCODE,Fe.ARROW_RIGHT_KEY),Ve.set(Me.END_KEYCODE,Fe.END_KEY),Ve.set(Me.HOME_KEYCODE,Fe.HOME_KEY),Ve.set(Me.ENTER_KEYCODE,Fe.ENTER_KEY),Ve.set(Me.SPACE_KEYCODE,Fe.SPACE_KEY);var je,Ke=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.useAutomaticActivation_=!1,i}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return Fe},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Me},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation_=t},e.prototype.activateTab=function(t){var e,n=this.adapter_.getPreviousActiveTabIndex();this.indexIsInRange_(t)&&t!==n&&(-1!==n&&(this.adapter_.deactivateTabAtIndex(n),e=this.adapter_.getTabIndicatorClientRectAtIndex(n)),this.adapter_.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter_.notifyTabActivated(t))},e.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent_(t);if(void 0!==e)if(this.isActivationKey_(e)||t.preventDefault(),this.useAutomaticActivation_){if(this.isActivationKey_(e))return;var n=this.determineTargetFromKey_(this.adapter_.getPreviousActiveTabIndex(),e);this.adapter_.setActiveTab(n),this.scrollIntoView(n)}else{var i=this.adapter_.getFocusedTabIndex();if(this.isActivationKey_(e))this.adapter_.setActiveTab(i);else{n=this.determineTargetFromKey_(i,e);this.adapter_.focusTabAtIndex(n),this.scrollIntoView(n)}}},e.prototype.handleTabInteraction=function(t){this.adapter_.setActiveTab(this.adapter_.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){if(this.indexIsInRange_(t))return 0===t?this.adapter_.scrollTo(0):t===this.adapter_.getTabListLength()-1?this.adapter_.scrollTo(this.adapter_.getScrollContentWidth()):this.isRTL_()?this.scrollIntoViewRTL_(t):void this.scrollIntoView_(t)},e.prototype.determineTargetFromKey_=function(t,e){var n=this.isRTL_(),i=this.adapter_.getTabListLength()-1,r=t;return e===Fe.END_KEY?r=i:e===Fe.ARROW_LEFT_KEY&&!n||e===Fe.ARROW_RIGHT_KEY&&n?r-=1:e===Fe.ARROW_RIGHT_KEY&&!n||e===Fe.ARROW_LEFT_KEY&&n?r+=1:r=0,r<0?r=i:r>i&&(r=0),r},e.prototype.calculateScrollIncrement_=function(t,e,n,i){var r=this.adapter_.getTabDimensionsAtIndex(e),o=r.contentLeft-n-i,a=r.contentRight-n-Me.EXTRA_SCROLL_AMOUNT,s=o+Me.EXTRA_SCROLL_AMOUNT;return et?Math.max(s,0):Math.min(c,0)},e.prototype.findAdjacentTabIndexClosestToEdge_=function(t,e,n,i){var r=e.rootLeft-n,o=e.rootRight-n-i,a=r+o;return r<0||a<0?t-1:o>0||a>0?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL_=function(t,e,n,i,r){var o=r-e.rootLeft-i-n,a=r-e.rootRight-n,s=o+a;return o>0||s>0?t+1:a<0||s<0?t-1:-1},e.prototype.getKeyFromEvent_=function(t){return Be.has(t.key)?t.key:Ve.get(t.keyCode)},e.prototype.isActivationKey_=function(t){return t===Fe.SPACE_KEY||t===Fe.ENTER_KEY},e.prototype.indexIsInRange_=function(t){return t>=0&&t=0;n&&!i?this.select(e):!n&&i&&this.deselect_(e)}},e.prototype.handleChipRemoval=function(t){var e=t.chipId,n=t.removedAnnouncement;n&&this.adapter_.announceMessage(n);var i=this.adapter_.getIndexOfChipById(e);this.deselectAndNotifyClients_(e),this.adapter_.removeChipAtIndex(i);var r=this.adapter_.getChipListCount()-1,o=Math.min(i,r);this.removeFocusFromChipsExcept_(o),this.adapter_.focusChipTrailingActionAtIndex(o)},e.prototype.handleChipNavigation=function(t){var e=t.chipId,n=t.key,i=t.source,r=this.adapter_.getChipListCount()-1,o=this.adapter_.getIndexOfChipById(e);if(-1!==o&&Ze.has(n)){var a=this.adapter_.isRTL();!a&&(n===ze.ARROW_RIGHT_KEY||n===ze.IE_ARROW_RIGHT_KEY)||a&&(n===ze.ARROW_LEFT_KEY||n===ze.IE_ARROW_LEFT_KEY)||(n===ze.ARROW_DOWN_KEY||n===ze.IE_ARROW_DOWN_KEY)?o++:n===ze.HOME_KEY?o=0:n===ze.END_KEY?o=r:o--,o<0||o>r||(this.removeFocusFromChipsExcept_(o),this.focusChipAction_(o,n,i))}},e.prototype.focusChipAction_=function(t,e,n){var i=$e.has(e);if(i&&n===Xe.PRIMARY)return this.adapter_.focusChipPrimaryActionAtIndex(t);if(i&&n===Xe.TRAILING)return this.adapter_.focusChipTrailingActionAtIndex(t);var r=this.getDirection_(e);return r===qe.LEFT?this.adapter_.focusChipTrailingActionAtIndex(t):r===qe.RIGHT?this.adapter_.focusChipPrimaryActionAtIndex(t):void 0},e.prototype.getDirection_=function(t){var e=this.adapter_.isRTL();return!e&&(t===ze.ARROW_LEFT_KEY||t===ze.IE_ARROW_LEFT_KEY)||e&&(t===ze.ARROW_RIGHT_KEY||t===ze.IE_ARROW_RIGHT_KEY)?qe.LEFT:qe.RIGHT},e.prototype.deselect_=function(t,e){void 0===e&&(e=!1);var n=this.selectedChipIds_.indexOf(t);if(n>=0){this.selectedChipIds_.splice(n,1);var i=this.adapter_.getIndexOfChipById(t);this.adapter_.selectChipAtIndex(i,!1,e)}},e.prototype.deselectAndNotifyClients_=function(t){this.deselect_(t,!0)},e.prototype.toggleSelect_=function(t){this.selectedChipIds_.indexOf(t)>=0?this.deselectAndNotifyClients_(t):this.selectAndNotifyClients_(t)},e.prototype.removeFocusFromChipsExcept_=function(t){for(var e=this.adapter_.getChipListCount(),n=0;n=0)){if(this.adapter_.hasClass(on.CHOICE)&&this.selectedChipIds_.length>0){var n=this.selectedChipIds_[0],i=this.adapter_.getIndexOfChipById(n);this.selectedChipIds_=[],this.adapter_.selectChipAtIndex(i,!1,e)}this.selectedChipIds_.push(t);var r=this.adapter_.getIndexOfChipById(t);this.adapter_.selectChipAtIndex(r,!0,e)}},e}(d),sn=tn.strings,cn=sn.INTERACTION_EVENT,un=sn.SELECTION_EVENT,ln=sn.REMOVAL_EVENT,dn=sn.NAVIGATION_EVENT,hn=an.strings.CHIP_SELECTOR,pn=0,fn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"chips",{get:function(){return this.chips_.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedChipIds",{get:function(){return this.foundation_.getSelectedChipIds()},enumerable:!0,configurable:!0}),e.prototype.initialize=function(t){void 0===t&&(t=function(t){return new nn(t)}),this.chipFactory_=t,this.chips_=this.instantiateChips_(this.chipFactory_)},e.prototype.initialSyncWithDOM=function(){var t=this;this.chips_.forEach((function(e){e.id&&e.selected&&t.foundation_.select(e.id)})),this.handleChipInteraction_=function(e){return t.foundation_.handleChipInteraction(e.detail)},this.handleChipSelection_=function(e){return t.foundation_.handleChipSelection(e.detail)},this.handleChipRemoval_=function(e){return t.foundation_.handleChipRemoval(e.detail)},this.handleChipNavigation_=function(e){return t.foundation_.handleChipNavigation(e.detail)},this.listen(cn,this.handleChipInteraction_),this.listen(un,this.handleChipSelection_),this.listen(ln,this.handleChipRemoval_),this.listen(dn,this.handleChipNavigation_)},e.prototype.destroy=function(){this.chips_.forEach((function(t){t.destroy()})),this.unlisten(cn,this.handleChipInteraction_),this.unlisten(un,this.handleChipSelection_),this.unlisten(ln,this.handleChipRemoval_),this.unlisten(dn,this.handleChipNavigation_),t.prototype.destroy.call(this)},e.prototype.addChip=function(t){t.id=t.id||"mdc-chip-"+ ++pn,this.chips_.push(this.chipFactory_(t))},e.prototype.getDefaultFoundation=function(){var t=this;return new an({announceMessage:function(t){!function(t,e){Ye.getInstance().say(t,e)}(t)},focusChipPrimaryActionAtIndex:function(e){t.chips_[e].focusPrimaryAction()},focusChipTrailingActionAtIndex:function(e){t.chips_[e].focusTrailingAction()},getChipListCount:function(){return t.chips_.length},getIndexOfChipById:function(e){return t.findChipIndex_(e)},hasClass:function(e){return t.root_.classList.contains(e)},isRTL:function(){return"rtl"===window.getComputedStyle(t.root_).getPropertyValue("direction")},removeChipAtIndex:function(e){e>=0&&e=0&&e0?this.currentAppBarOffsetTop_=0:Math.abs(this.currentAppBarOffsetTop_)>this.topAppBarHeight_&&(this.currentAppBarOffsetTop_=-this.topAppBarHeight_),this.moveTopAppBar_())},e.prototype.handleWindowResize=function(){var t=this;this.resizeThrottleId_||(this.resizeThrottleId_=setTimeout((function(){t.resizeThrottleId_=0,t.throttledResizeHandler_()}),An.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)),this.isCurrentlyBeingResized_=!0,this.resizeDebounceId_&&clearTimeout(this.resizeDebounceId_),this.resizeDebounceId_=setTimeout((function(){t.handleTargetScroll(),t.isCurrentlyBeingResized_=!1,t.resizeDebounceId_=0}),An.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)},e.prototype.checkForUpdate_=function(){var t=-this.topAppBarHeight_,e=this.currentAppBarOffsetTop_<0,n=this.currentAppBarOffsetTop_>t,i=e&&n;if(i)this.wasDocked_=!1;else{if(!this.wasDocked_)return this.wasDocked_=!0,!0;if(this.isDockedShowing_!==n)return this.isDockedShowing_=n,!0}return i},e.prototype.moveTopAppBar_=function(){if(this.checkForUpdate_()){var t=this.currentAppBarOffsetTop_;Math.abs(t)>=this.topAppBarHeight_&&(t=-An.MAX_TOP_APP_BAR_HEIGHT),this.adapter_.setStyle("top",t+"px")}},e.prototype.throttledResizeHandler_=function(){var t=this.adapter_.getTopAppBarHeight();this.topAppBarHeight_!==t&&(this.wasDocked_=!1,this.currentAppBarOffsetTop_-=this.topAppBarHeight_-t,this.topAppBarHeight_=t),this.handleTargetScroll()},e}(Tn),bn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.wasScrolled_=!1,e}return r(e,t),e.prototype.handleTargetScroll=function(){this.adapter_.getViewportScrollY()<=0?this.wasScrolled_&&(this.adapter_.removeClass(gn.FIXED_SCROLLED_CLASS),this.wasScrolled_=!1):this.wasScrolled_||(this.adapter_.addClass(gn.FIXED_SCROLLED_CLASS),this.wasScrolled_=!0)},e}(vn),Sn=function(t){function e(e){var n=t.call(this,e)||this;return n.isCollapsed_=!1,n.isAlwaysCollapsed_=!1,n}return r(e,t),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this.isCollapsed_},enumerable:!0,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this),this.adapter_.getTotalActionItems()>0&&this.adapter_.addClass(gn.SHORT_HAS_ACTION_ITEM_CLASS),this.setAlwaysCollapsed(this.adapter_.hasClass(gn.SHORT_COLLAPSED_CLASS))},e.prototype.setAlwaysCollapsed=function(t){this.isAlwaysCollapsed_=!!t,this.isAlwaysCollapsed_?this.collapse_():this.maybeCollapseBar_()},e.prototype.getAlwaysCollapsed=function(){return this.isAlwaysCollapsed_},e.prototype.handleTargetScroll=function(){this.maybeCollapseBar_()},e.prototype.maybeCollapseBar_=function(){this.isAlwaysCollapsed_||(this.adapter_.getViewportScrollY()<=0?this.isCollapsed_&&this.uncollapse_():this.isCollapsed_||this.collapse_())},e.prototype.uncollapse_=function(){this.adapter_.removeClass(gn.SHORT_COLLAPSED_CLASS),this.isCollapsed_=!1},e.prototype.collapse_=function(){this.adapter_.addClass(gn.SHORT_COLLAPSED_CLASS),this.isCollapsed_=!0},e}(Tn),On=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){void 0===t&&(t=function(t){return S.attachTo(t)}),this.navIcon_=this.root_.querySelector(In.NAVIGATION_ICON_SELECTOR);var e=[].slice.call(this.root_.querySelectorAll(In.ACTION_ITEM_SELECTOR));this.navIcon_&&e.push(this.navIcon_),this.iconRipples_=e.map((function(e){var n=t(e);return n.unbounded=!0,n})),this.scrollTarget_=window},e.prototype.initialSyncWithDOM=function(){this.handleNavigationClick_=this.foundation_.handleNavigationClick.bind(this.foundation_),this.handleWindowResize_=this.foundation_.handleWindowResize.bind(this.foundation_),this.handleTargetScroll_=this.foundation_.handleTargetScroll.bind(this.foundation_),this.scrollTarget_.addEventListener("scroll",this.handleTargetScroll_),this.navIcon_&&this.navIcon_.addEventListener("click",this.handleNavigationClick_);var t=this.root_.classList.contains(gn.FIXED_CLASS);this.root_.classList.contains(gn.SHORT_CLASS)||t||window.addEventListener("resize",this.handleWindowResize_)},e.prototype.destroy=function(){this.iconRipples_.forEach((function(t){return t.destroy()})),this.scrollTarget_.removeEventListener("scroll",this.handleTargetScroll_),this.navIcon_&&this.navIcon_.removeEventListener("click",this.handleNavigationClick_);var e=this.root_.classList.contains(gn.FIXED_CLASS);this.root_.classList.contains(gn.SHORT_CLASS)||e||window.removeEventListener("resize",this.handleWindowResize_),t.prototype.destroy.call(this)},e.prototype.setScrollTarget=function(t){this.scrollTarget_.removeEventListener("scroll",this.handleTargetScroll_),this.scrollTarget_=t,this.handleTargetScroll_=this.foundation_.handleTargetScroll.bind(this.foundation_),this.scrollTarget_.addEventListener("scroll",this.handleTargetScroll_)},e.prototype.getDefaultFoundation=function(){var t=this,e={hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setStyle:function(e,n){return t.root_.style.setProperty(e,n)},getTopAppBarHeight:function(){return t.root_.clientHeight},notifyNavigationIconClicked:function(){return t.emit(In.NAVIGATION_EVENT,{})},getViewportScrollY:function(){var e=t.scrollTarget_,n=t.scrollTarget_;return void 0!==e.pageYOffset?e.pageYOffset:n.scrollTop},getTotalActionItems:function(){return t.root_.querySelectorAll(In.ACTION_ITEM_SELECTOR).length}};return this.root_.classList.contains(gn.SHORT_CLASS)?new Sn(e):this.root_.classList.contains(gn.FIXED_CLASS)?new bn(e):new vn(e)},e}(h),Ln=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root,t),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll(".mdc-dom-focus-sentinel")).forEach((function(t){t.parentElement.removeChild(t)})),this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t,e){var n=this.createSentinel(),i=this.createSentinel();n.addEventListener("focus",(function(){e.length>0&&e[e.length-1].focus()})),i.addEventListener("focus",(function(){e.length>0&&e[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(i)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains("mdc-dom-focus-sentinel")&&!e,i=!1;if(n){var r=getComputedStyle(t);i="none"===r.display||"hidden"===r.visibility}return n&&!i}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add("mdc-dom-focus-sentinel"),t},t}(),Rn={ANIMATE:"mdc-drawer--animate",CLOSING:"mdc-drawer--closing",DISMISSIBLE:"mdc-drawer--dismissible",MODAL:"mdc-drawer--modal",OPEN:"mdc-drawer--open",OPENING:"mdc-drawer--opening",ROOT:"mdc-drawer"},Nn={APP_CONTENT_SELECTOR:".mdc-drawer-app-content",CLOSE_EVENT:"MDCDrawer:closed",OPEN_EVENT:"MDCDrawer:opened",SCRIM_SELECTOR:".mdc-drawer-scrim"},xn=function(t){function e(n){var i=t.call(this,o(o({},e.defaultAdapter),n))||this;return i.animationFrame_=0,i.animationTimer_=0,i}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return Nn},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return Rn},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},elementHasClass:function(){return!1},notifyClose:function(){},notifyOpen:function(){},saveFocus:function(){},restoreFocus:function(){},focusActiveNavigationItem:function(){},trapFocus:function(){},releaseFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.animationFrame_&&cancelAnimationFrame(this.animationFrame_),this.animationTimer_&&clearTimeout(this.animationTimer_)},e.prototype.open=function(){var t=this;this.isOpen()||this.isOpening()||this.isClosing()||(this.adapter_.addClass(Rn.OPEN),this.adapter_.addClass(Rn.ANIMATE),this.runNextAnimationFrame_((function(){t.adapter_.addClass(Rn.OPENING)})),this.adapter_.saveFocus())},e.prototype.close=function(){!this.isOpen()||this.isOpening()||this.isClosing()||this.adapter_.addClass(Rn.CLOSING)},e.prototype.isOpen=function(){return this.adapter_.hasClass(Rn.OPEN)},e.prototype.isOpening=function(){return this.adapter_.hasClass(Rn.OPENING)||this.adapter_.hasClass(Rn.ANIMATE)},e.prototype.isClosing=function(){return this.adapter_.hasClass(Rn.CLOSING)},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.handleTransitionEnd=function(t){var e=Rn.OPENING,n=Rn.CLOSING,i=Rn.OPEN,r=Rn.ANIMATE,o=Rn.ROOT;this.isElement_(t.target)&&this.adapter_.elementHasClass(t.target,o)&&(this.isClosing()?(this.adapter_.removeClass(i),this.closed_(),this.adapter_.restoreFocus(),this.adapter_.notifyClose()):(this.adapter_.focusActiveNavigationItem(),this.opened_(),this.adapter_.notifyOpen()),this.adapter_.removeClass(r),this.adapter_.removeClass(e),this.adapter_.removeClass(n))},e.prototype.opened_=function(){},e.prototype.closed_=function(){},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},e.prototype.isElement_=function(t){return Boolean(t.classList)},e}(d),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.handleScrimClick=function(){this.close()},e.prototype.opened_=function(){this.adapter_.trapFocus()},e.prototype.closed_=function(){this.adapter_.releaseFocus()},e}(xn); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var wn=xn.cssClasses,Pn=xn.strings,Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"open",{get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"list",{get:function(){return this.list_},enumerable:!0,configurable:!0}),e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new Ln(t)}),void 0===e&&(e=function(t){return new K(t)});var n=this.root_.querySelector("."+j.cssClasses.ROOT);n&&(this.list_=e(n),this.list_.wrapFocus=!0),this.focusTrapFactory_=t},e.prototype.initialSyncWithDOM=function(){var t,e=this,n=wn.MODAL,i=Pn.SCRIM_SELECTOR;this.scrim_=this.root_.parentNode.querySelector(i),this.scrim_&&this.root_.classList.contains(n)&&(this.handleScrimClick_=function(){return e.foundation_.handleScrimClick()},this.scrim_.addEventListener("click",this.handleScrimClick_),this.focusTrap_=(t=this.root_,(0,this.focusTrapFactory_)(t,{skipInitialFocus:!0}))),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleTransitionEnd_=function(t){return e.foundation_.handleTransitionEnd(t)},this.listen("keydown",this.handleKeydown_),this.listen("transitionend",this.handleTransitionEnd_)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("transitionend",this.handleTransitionEnd_),this.list_&&this.list_.destroy();var t=wn.MODAL;this.scrim_&&this.handleScrimClick_&&this.root_.classList.contains(t)&&(this.scrim_.removeEventListener("click",this.handleScrimClick_),this.open=!1)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},elementHasClass:function(t,e){return t.classList.contains(e)},saveFocus:function(){return t.previousFocus_=document.activeElement},restoreFocus:function(){var e=t.previousFocus_;e&&e.focus&&t.root_.contains(document.activeElement)&&e.focus()},focusActiveNavigationItem:function(){var e=t.root_.querySelector("."+j.cssClasses.LIST_ITEM_ACTIVATED_CLASS);e&&e.focus()},notifyClose:function(){return t.emit(Pn.CLOSE_EVENT,{},!0)},notifyOpen:function(){return t.emit(Pn.OPEN_EVENT,{},!0)},trapFocus:function(){return t.focusTrap_.trapFocus()},releaseFocus:function(){return t.focusTrap_.releaseFocus()}},n=wn.DISMISSIBLE,i=wn.MODAL;if(this.root_.classList.contains(n))return new xn(e);if(this.root_.classList.contains(i))return new Dn(e);throw new Error("MDCDrawer: Failed to instantiate component. Supported variants are "+n+" and "+i+".")},e}(h),kn={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function Fn(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}var Mn=n(0),Bn=n.n(Mn);function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jn(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function Qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0){var t=Hn.attachTo(document.querySelector(".mdc-drawer"));On.attachTo(document.getElementById("app-bar")).listen("MDCTopAppBar:nav",(function(){t.open=!t.open}))}if(document.getElementsByClassName("mdc-chip-set").length>0){var e=document.querySelector(".mdc-chip-set");new fn(e)}if(document.getElementsByClassName("mdc-data-table").length>0)new Kt(document.querySelector(".mdc-data-table"));if(document.getElementsByClassName("mdc-select__menu").length>0&&(new Q(document.querySelector(".mdc-select__menu")).open=!1),document.getElementsByClassName("fca-button").length>0)new S(document.querySelector(".fca-button"));if(document.getElementsByClassName("mdc-select").length>0)[].map.call(document.querySelectorAll(".mdc-select"),(function(t){return new ft(t)}));if(document.getElementsByClassName("mdc-button").length>0||document.getElementsByClassName("mdc-icon-button").length>0||document.getElementsByClassName("mdc-card__primary-action").length>0)[].map.call(document.querySelectorAll(".mdc-button, .mdc-icon-button, .mdc-card__primary-action"),(function(t){return new S(t)}));if(document.getElementsByClassName("mdc-form-field").length>0&&document.getElementsByClassName("mdc-checkbox").length>0){var n=new Ct(document.querySelector(".mdc-form-field")),i=new Ot(document.querySelector(".mdc-checkbox"));n.input=i}if(document.getElementsByClassName("mdc-radio").length>0&&document.getElementsByClassName("mdc-form-field").length>0){var r=new Ct(document.querySelector(".mdc-form-field"));[].map.call(document.querySelectorAll(".mdc-radio"),(function(t){r.input=new qt(t)}))}if(document.getElementsByClassName("mdc-switch").length>0)[].map.call(document.querySelectorAll(".mdc-switch"),(function(t){return new Qt(t)}));if(document.getElementsByClassName("mdc-text-field").length>0)[].map.call(document.querySelectorAll(".mdc-text-field"),(function(t){return new Ce(t)}));if(document.getElementsByClassName("container-menu").length>0&&[].map.call(document.querySelectorAll(".container-menu"),(function(t){new Q(t.querySelector(".mdc-menu")).open=!1,t.querySelector(".fca-button-menu").addEventListener("click",(function(t){var e=new Q(t.srcElement.parentElement.querySelector(".mdc-menu"));e.open=!e.open}))})),document.getElementsByClassName("mdc-tab-bar").length>0&&[].map.call(document.querySelectorAll(".mdc-tab-bar"),(function(t){new Ge(t).listen("MDCTabBar:activated",(function(t){t.srcElement.parentElement.querySelector(".content--active").classList.remove("content--active"),t.srcElement.parentElement.querySelectorAll(".content")[t.detail.index].classList.add("content--active")}))})),document.getElementsByClassName("mdc-icon-button").length>0){[].map.call(document.querySelectorAll(".mdc-icon-button"),(function(t){return new S(t)})).unbounded=!0;[].map.call(document.querySelectorAll(".mdc-icon-button"),(function(t){return new yn(t)}))}if(document.getElementsByClassName("fca-tooltip").length>0&&function(t,e,n){var i=t.querySelectorAll(".fca-tooltip");[].forEach.call(i,(function(e){var n=t.createElement("div");n.textContent=e.getAttribute("data-tooltip-text"),n.classList.add("fca-tooltip-text"),e.addEventListener("mouseover",(function(){t.body.appendChild(n)}),!1),e.addEventListener("mouseout",(function(){t.body.removeChild(n)}),!1),e.addEventListener("mousemove",(function(t){n.style.top=t.pageY+20+"px",n.style.left=t.pageX+20+"px"}),!1)}))}(document,window),function(t,e){if(Fn(t)&&e in kn){var n=t.document.createElement("div"),i=kn[e],r=i.standard,o=i.prefixed;return i.cssProperty in n.style?r:o}}(window,"animationstart"),document.getElementsByClassName("fca-accordion").length>0){var o,a=zn(document.querySelectorAll(".fca-accordion"));try{var s=function(){var t,e=o.value.querySelectorAll(".fca-accordion-panel"),n=zn(e);try{var i=function(){var n=t.value,i=n.querySelector(".fca-container-label");i.onclick=function(){var t,r=zn(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;o!==n&&o.classList.remove("fca-accordion-expanded")}}catch(t){r.e(t)}finally{r.f()}var a=i.querySelector(".change-arrow");a.innerHTML.toString().indexOf("up")>-1?(a.innerHTML="",a.innerHTML="keyboard_arrow_down"):a.innerHTML.toString().indexOf("down")>-1&&(a.innerHTML="",a.innerHTML="keyboard_arrow_up"),n.classList.toggle("fca-accordion-expanded")}};for(n.s();!(t=n.n()).done;)i()}catch(t){n.e(t)}finally{n.f()}};for(a.s();!(o=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}}document.getElementsByClassName("datePicker").length>0&&[].map.call(document.querySelectorAll(".datePicker"),(function(t){return datepicker(t,{onSelect:function(e,n){t.setAttribute("dateSelect",n),console.log(n)}})})),window.fcaGuideLinesDebug&&console.log("fcaguidelines execution end")},fcaInit();var Zn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xn(t,e)}(s,t);var e,n,i,r,o,a=(e=s,n=qn(),function(){var t,i=Yn(e);if(n){var r=Yn(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return Kn(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).value="",t.selector="autocomplete",t.createComponent=t.createComponent.bind(Un(t)),t.onChangeHandler=t.onChangeHandler.bind(Un(t)),t}return i=s,o=[{key:"observedAttributes",get:function(){return["value","list"]}}],(r=[{key:"getData",value:function(t){var e=t;return t&&(e=t.replace(/\(\)/,""),"function"==typeof window[e]?e=window[e]():(e=e.replaceAll("'","'"),e=JSON.parse(e))),e}},{key:"createComponent",value:function(){var t=this,e=this.getAttribute("name")||"autoComplete",n=this.getAttribute("label")||"";this.value=this.getAttribute("value")||this.value;var i=this.getAttribute("searchMode"),r=this.getData(this.getAttribute("list")),o=this.getAttribute("keySearch"),a=this.getAttribute("placeholder")||"Cerca...";this.selector=this.getAttribute("selector");var s=this.getAttribute("minLenght")||1,c=this.getAttribute("debounce")||125,u=this.getAttribute("maxResult")||5,l=this.getAttribute("selectionCallback"),d=this.getAttribute("resultItem"),h=this.getAttribute("noResultsItems")||"No result found for ";this.getAttribute("icon"),this.innerHTML='
\n \n
");var p=new Bn.a({name:e,data:{src:r,key:[o]},trigger:{event:["input","focus"]},placeHolder:a,selector:"#".concat(this.selector),threshold:s,debounce:c,maxResults:u,highlight:!0,searchEngine:function(e,n){var r;if(t.value=e,"strict"===i)r=new RegExp("(?:^|\\s)("+e+"w*)","i").test(n)?n:null;else{if("fullText"===i){var o=e.split(" ");return o.filter((function(t){return n.toLowerCase().indexOf(t.toLowerCase())>-1})).length==o.length?n:null}r=n.toLowerCase().indexOf(e.toLowerCase())>-1?n:null}return r},resultItem:{content:function(t,e){var n=null;"function"==typeof window[d]&&(n=window[d](t));var i=document.getElementById("no-found");i&&i.remove(),Object.keys(t).find((function(n){return t[n]===e.innerText})),e.style="display: flex; justify-content: space-between;",e.innerHTML=n||'\n '.concat(e.innerHTML,"")}},onSelection:function(e){if(t.setAttribute("value",e.selection.match),l){var n=l.replace(/\(\)/,"");"function"==typeof window[n]&&window[n](e.selection,e.results)}},noResults:function(t,e){e(p,t,t.result);var n=document.createElement("div");return n.setAttribute("class","no-found"),n.innerHTML="".concat(h,' "').concat(t.query,'"'),document.querySelector("#".concat(p.resultsList.idName)).appendChild(n)}})}},{key:"connectedCallback",value:function(){this.createComponent()}},{key:"attributeChangedCallback",value:function(t,e,n){this.createComponent(),"list"===t&&null!==e&&e!==n&&(document.getElementById(this.selector).value=" ",document.getElementById(this.selector).focus(),document.getElementById(this.selector).value=this.value)}}])&&jn(i.prototype,r),o&&jn(i,o),s}(Wn(HTMLElement));customElements.define("auto-complete",Zn)}]); //# sourceMappingURL=bundle.js.map