UNPKG

44.4 kBJavaScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE
7 */
8!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.tabs=e():(t.mdc=t.mdc||{},t.mdc.tabs=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=163)}({0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}();e.MDCFoundation=r,e.default=r},1:function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),o=function(){function t(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.root_=t,this.initialize.apply(this,i(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new a.MDCFoundation({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){void 0===n&&(n=!1);var r;"function"==typeof CustomEvent?r=new CustomEvent(t,{bubbles:n,detail:e}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)},t}();e.MDCComponent=o,e.default=o},11:function(t,e,n){"use strict";function r(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}function i(t,e){if(r(t)&&e in o){var n=t.document.createElement("div"),i=o[e],a=i.standard,s=i.prefixed;return a in n.style?a:s}return e}function a(t,e){if(r(t)&&e in s){var n=t.document.createElement("div"),i=s[e],a=i.standard,o=i.prefixed;return i.cssProperty in n.style?a:o}return e}Object.defineProperty(e,"__esModule",{value:!0});var o={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},s={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"}};e.getCorrectPropertyName=i,e.getCorrectEventName=a},163:function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(164)),r(n(165)),r(n(166))},164:function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(93)),r(n(51));var i=n(50);e.tabCssClasses=i.cssClasses,e.tabStrings=i.strings},165:function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(94)),r(n(95));var i=n(96);e.tabBarCssClasses=i.cssClasses,e.tabBarStrings=i.strings},166:function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(167)),r(n(97));var i=n(98);e.tabBarScrollerCssClasses=i.cssClasses,e.tabBarScrollerStrings=i.strings},167:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),a=n(1),o=n(94),s=n(97),c=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,"tabBar",{get:function(){return this.tabBar_},enumerable:!0,configurable:!0}),e.prototype.initialize=function(t){void 0===t&&(t=function(t){return new o.MDCTabBar(t)}),this.scrollFrame_=this.root_.querySelector(s.MDCTabBarScrollerFoundation.strings.FRAME_SELECTOR),this.tabBarEl_=this.root_.querySelector(s.MDCTabBarScrollerFoundation.strings.TABS_SELECTOR),this.forwardIndicator_=this.root_.querySelector(s.MDCTabBarScrollerFoundation.strings.INDICATOR_FORWARD_SELECTOR),this.backIndicator_=this.root_.querySelector(s.MDCTabBarScrollerFoundation.strings.INDICATOR_BACK_SELECTOR),this.tabBar_=t(this.tabBarEl_)},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)},eventTargetHasClass:function(t,e){return t.classList.contains(e)},addClassToForwardIndicator:function(e){return t.forwardIndicator_.classList.add(e)},removeClassFromForwardIndicator:function(e){return t.forwardIndicator_.classList.remove(e)},addClassToBackIndicator:function(e){return t.backIndicator_.classList.add(e)},removeClassFromBackIndicator:function(e){return t.backIndicator_.classList.remove(e)},isRTL:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},registerBackIndicatorClickHandler:function(e){return t.backIndicator_.addEventListener("click",e)},deregisterBackIndicatorClickHandler:function(e){return t.backIndicator_.removeEventListener("click",e)},registerForwardIndicatorClickHandler:function(e){return t.forwardIndicator_.addEventListener("click",e)},deregisterForwardIndicatorClickHandler:function(e){return t.forwardIndicator_.removeEventListener("click",e)},registerCapturedInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,!0)},deregisterCapturedInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,!0)},registerWindowResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterWindowResizeHandler:function(t){return window.removeEventListener("resize",t)},getNumberOfTabs:function(){return t.tabBar.tabs.length},getComputedWidthForTabAtIndex:function(e){return t.tabBar.tabs[e].computedWidth},getComputedLeftForTabAtIndex:function(e){return t.tabBar.tabs[e].computedLeft},getOffsetWidthForScrollFrame:function(){return t.scrollFrame_.offsetWidth},getScrollLeftForScrollFrame:function(){return t.scrollFrame_.scrollLeft},setScrollLeftForScrollFrame:function(e){return t.scrollFrame_.scrollLeft=e},getOffsetWidthForTabBar:function(){return t.tabBarEl_.offsetWidth},setTransformStyleForTabBar:function(e){t.tabBarEl_.style.setProperty(i.getCorrectPropertyName(window,"transform"),e)},getOffsetLeftForEventTarget:function(t){return t.offsetLeft},getOffsetWidthForEventTarget:function(t){return t.offsetWidth}};return new s.MDCTabBarScrollerFoundation(e)},e.prototype.layout=function(){this.foundation_.layout()},e}(a.MDCComponent);e.MDCTabBarScroller=c},2:function(t,e,n){"use strict";function r(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(i(n,e))return n;n=n.parentElement}return null}function i(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.closest=r,e.matches=i},3:function(t,e,n){"use strict";function r(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var r=t.getComputedStyle(n),i=null!==r&&"solid"===r.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),i}function i(t,e){void 0===e&&(e=!1);var n=t.CSS,i=s;if("boolean"==typeof s&&!e)return s;if(!n||"function"!=typeof n.supports)return!1;var a=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!a&&!o||r(t)),e||(s=i),i}function a(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===c||e){var n=!1;try{t.document.addEventListener("test",function(){},{get passive(){return n=!0}})}catch(t){}c=n}return!!c&&{passive:!0}}function o(t,e,n){if(!t)return{x:0,y:0};var r,i,a=e.x,o=e.y,s=a+n.left,c=o+n.top;if("touchstart"===t.type){var u=t;r=u.changedTouches[0].pageX-s,i=u.changedTouches[0].pageY-c}else{var d=t;r=d.pageX-s,i=d.pageY-c}return{x:r,y:i}}Object.defineProperty(e,"__esModule",{value:!0});var s,c;e.supportsCssVariables=i,e.applyPassive=a,e.getNormalizedEventCoords=o},4:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),o=n(5),s=n(3),c=["touchstart","pointerdown","mousedown","keydown"],u=["touchend","pointerup","mouseup","contextmenu"],d=[],f=function(t){function e(n){var r=t.call(this,i({},e.defaultAdapter,n))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(t){return r.activate_(t)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return o.strings},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return o.numbers},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var r=e.cssClasses,i=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(i),t.adapter_.isUnbounded()&&(t.adapter_.addClass(a),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(r),t.adapter_.removeClass(i),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(c.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)}),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):u.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;c.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),u.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var r=this.previousActivationEvent_;if(!r||void 0===t||r.type===t.type){if(n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&d.length>0&&d.some(function(t){return e.adapter_.containsEventTarget(t)}))return void this.resetActivationState_();void 0!==t&&(d.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){d=[],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,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,o=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var u="",d="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),l=f.startPoint,p=f.endPoint;u=l.x+"px, "+l.y+"px",d=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(r,u),this.adapter_.updateCssVariable(i,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(o),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 t=e.wasActivatedByPointer?s.getNormalizedEventCoords(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},t={x:t.x-this.initialSize_/2,y:t.y-this.initialSize_/2},{startPoint:t,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,r=this.activationState_,i=r.hasDeactivationUXRun,a=r.isActivated;(i||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},o.numbers.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=i({},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:function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING}(),this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,r=t.VAR_LEFT,i=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))},e}(a.MDCFoundation);e.MDCRippleFoundation=f,e.default=f},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssClasses={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},e.strings={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},e.numbers={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}},50:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssClasses={ACTIVE:"mdc-tab--active"},e.strings={SELECTED_EVENT:"MDCTab:selected"}},51:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),o=n(50),s=function(t){function e(n){var r=t.call(this,i({},e.defaultAdapter,n))||this;return r.computedWidth_=0,r.computedLeft_=0,r.isActive_=!1,r.preventDefaultOnClick_=!1,r.clickHandler_=function(t){r.preventDefaultOnClick_&&t.preventDefault(),r.adapter_.notifySelected()},r.keydownHandler_=function(t){"Enter"!==t.key&&13!==t.keyCode||r.adapter_.notifySelected()},r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return o.strings},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},getOffsetWidth:function(){return 0},getOffsetLeft:function(){return 0},notifySelected:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_),this.adapter_.registerInteractionHandler("keydown",this.keydownHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_),this.adapter_.deregisterInteractionHandler("keydown",this.keydownHandler_)},e.prototype.getComputedWidth=function(){return this.computedWidth_},e.prototype.getComputedLeft=function(){return this.computedLeft_},e.prototype.isActive=function(){return this.isActive_},e.prototype.setActive=function(t){this.isActive_=t,this.isActive_?this.adapter_.addClass(o.cssClasses.ACTIVE):this.adapter_.removeClass(o.cssClasses.ACTIVE)},e.prototype.preventsDefaultOnClick=function(){return this.preventDefaultOnClick_},e.prototype.setPreventDefaultOnClick=function(t){this.preventDefaultOnClick_=t},e.prototype.measureSelf=function(){this.computedWidth_=this.adapter_.getOffsetWidth(),this.computedLeft_=this.adapter_.getOffsetLeft()},e}(a.MDCFoundation);e.MDCTabFoundation=s,e.default=s},6:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),o=n(2),s=n(4),c=i(n(3)),u=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 r=new e(t);return void 0!==n.isUnbounded&&(r.unbounded=n.isUnbounded),r},e.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return c.supportsCssVariables(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,c.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,c.applyPassive())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return o.matches(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,c.applyPassive())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,c.applyPassive())},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 s.MDCRippleFoundation(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}(a.MDCComponent);e.MDCRipple=u},93:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=n(6),o=n(50),s=n(51),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ripple_=a.MDCRipple.attachTo(e.root_),e}return r(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"computedWidth",{get:function(){return this.foundation_.getComputedWidth()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computedLeft",{get:function(){return this.foundation_.getComputedLeft()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this.foundation_.isActive()},set:function(t){this.foundation_.setActive(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preventDefaultOnClick",{get:function(){return this.foundation_.preventsDefaultOnClick()},set:function(t){this.foundation_.setPreventDefaultOnClick(t)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.ripple_.destroy(),t.prototype.destroy.call(this)},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)},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},getOffsetWidth:function(){return t.root_.offsetWidth},getOffsetLeft:function(){return t.root_.offsetLeft},notifySelected:function(){return t.emit(s.MDCTabFoundation.strings.SELECTED_EVENT,{tab:t},!0)}};return new s.MDCTabFoundation(e)},e.prototype.initialSyncWithDOM=function(){this.isActive=this.root_.classList.contains(o.cssClasses.ACTIVE)},e.prototype.measureSelf=function(){this.foundation_.measureSelf()},e}(i.MDCComponent);e.MDCTab=c},94:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=n(93),o=n(51),s=n(95),c=s.MDCTabBarFoundation.strings,u=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,"tabs",{get:function(){return this.tabs_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeTab",{get:function(){var t=this.foundation_.getActiveTabIndex();return this.tabs[t]},set:function(t){this.setActiveTab_(t,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeTabIndex",{get:function(){return this.foundation_.getActiveTabIndex()},set:function(t){this.setActiveTabIndex_(t,!1)},enumerable:!0,configurable:!0}),e.prototype.initialize=function(t){var e=this;void 0===t&&(t=function(t){return new a.MDCTab(t)}),this.indicator_=this.root_.querySelector(c.INDICATOR_SELECTOR),this.tabs_=this.gatherTabs_(t),this.tabSelectedHandler_=function(t){var n=t.detail,r=n.tab;e.setActiveTab_(r,!0)}},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)},bindOnMDCTabSelectedEvent:function(){return t.listen(o.MDCTabFoundation.strings.SELECTED_EVENT,t.tabSelectedHandler_)},unbindOnMDCTabSelectedEvent:function(){return t.unlisten(o.MDCTabFoundation.strings.SELECTED_EVENT,t.tabSelectedHandler_)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getOffsetWidth:function(){return t.root_.offsetWidth},setStyleForIndicator:function(e,n){return t.indicator_.style.setProperty(e,n)},getOffsetWidthForIndicator:function(){return t.indicator_.offsetWidth},notifyChange:function(e){return t.emit(c.CHANGE_EVENT,e)},getNumberOfTabs:function(){return t.tabs.length},isTabActiveAtIndex:function(e){return t.tabs[e].isActive},setTabActiveAtIndex:function(e,n){t.tabs[e].isActive=n},isDefaultPreventedOnClickForTabAtIndex:function(e){return t.tabs[e].preventDefaultOnClick},setPreventDefaultOnClickForTabAtIndex:function(e,n){t.tabs[e].preventDefaultOnClick=n},measureTabAtIndex:function(e){return t.tabs[e].measureSelf()},getComputedWidthForTabAtIndex:function(e){return t.tabs[e].computedWidth},getComputedLeftForTabAtIndex:function(e){return t.tabs[e].computedLeft}};return new s.MDCTabBarFoundation(e)},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.gatherTabs_=function(t){return[].slice.call(this.root_.querySelectorAll(c.TAB_SELECTOR)).map(function(e){return t(e)})},e.prototype.setActiveTabIndex_=function(t,e){this.foundation_.switchToTabAtIndex(t,e)},e.prototype.setActiveTab_=function(t,e){var n=this.tabs.indexOf(t);if(n<0)throw new Error("Invalid tab component given as activeTab: Tab not found within this component's tab list");this.setActiveTabIndex_(n,e)},e}(i.MDCComponent);e.MDCTabBar=u},95:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=n(11),o=n(0),s=n(96),c=function(t){function e(n){var r=t.call(this,i({},e.defaultAdapter,n))||this;return r.isIndicatorShown_=!1,r.activeTabIndex_=0,r.layoutFrame_=0,r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return s.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return s.strings},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},bindOnMDCTabSelectedEvent:function(){},unbindOnMDCTabSelectedEvent:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},getOffsetWidth:function(){return 0},setStyleForIndicator:function(){},getOffsetWidthForIndicator:function(){return 0},notifyChange:function(){},getNumberOfTabs:function(){return 0},isTabActiveAtIndex:function(){return!1},setTabActiveAtIndex:function(){},isDefaultPreventedOnClickForTabAtIndex:function(){return!1},setPreventDefaultOnClickForTabAtIndex:function(){},measureTabAtIndex:function(){},getComputedWidthForTabAtIndex:function(){return 0},getComputedLeftForTabAtIndex:function(){return 0}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.resizeHandler_=function(){return t.layout()},this.adapter_.addClass(s.cssClasses.UPGRADED),this.adapter_.bindOnMDCTabSelectedEvent(),this.adapter_.registerResizeHandler(this.resizeHandler_);var e=this.findActiveTabIndex_();e>=0&&(this.activeTabIndex_=e),this.layout()},e.prototype.destroy=function(){this.adapter_.removeClass(s.cssClasses.UPGRADED),this.adapter_.unbindOnMDCTabSelectedEvent(),this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.switchToTabAtIndex=function(t,e){var n=this;if(t!==this.activeTabIndex_){if(t<0||t>=this.adapter_.getNumberOfTabs())throw new Error("Out of bounds index specified for tab: "+t);var r=this.activeTabIndex_;this.activeTabIndex_=t,requestAnimationFrame(function(){r>=0&&n.adapter_.setTabActiveAtIndex(r,!1),n.adapter_.setTabActiveAtIndex(n.activeTabIndex_,!0),n.layoutIndicator_(),e&&n.adapter_.notifyChange({activeTabIndex:n.activeTabIndex_})})}},e.prototype.getActiveTabIndex=function(){return this.findActiveTabIndex_()},e.prototype.layoutInternal_=function(){var t=this;this.forEachTabIndex_(function(e){return t.adapter_.measureTabAtIndex(e)}),this.layoutIndicator_()},e.prototype.layoutIndicator_=function(){var t=!this.isIndicatorShown_;t&&this.adapter_.setStyleForIndicator("transition","none");var e=this.adapter_.getComputedLeftForTabAtIndex(this.activeTabIndex_),n=this.adapter_.getComputedWidthForTabAtIndex(this.activeTabIndex_)/this.adapter_.getOffsetWidth(),r="translateX("+e+"px) scale("+n+", 1)";this.adapter_.setStyleForIndicator(a.getCorrectPropertyName(window,"transform"),r),t&&(this.adapter_.getOffsetWidthForIndicator(),this.adapter_.setStyleForIndicator("transition",""),this.adapter_.setStyleForIndicator("visibility","visible"),this.isIndicatorShown_=!0)},e.prototype.findActiveTabIndex_=function(){var t=this,e=-1;return this.forEachTabIndex_(function(n){if(t.adapter_.isTabActiveAtIndex(n))return e=n,!0}),e},e.prototype.forEachTabIndex_=function(t){for(var e=this.adapter_.getNumberOfTabs(),n=0;n<e&&!t(n);n++);},e}(o.MDCFoundation);e.MDCTabBarFoundation=c,e.default=c},96:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssClasses={UPGRADED:"mdc-tab-bar-upgraded"},e.strings={CHANGE_EVENT:"MDCTabBar:change",INDICATOR_SELECTOR:".mdc-tab-bar__indicator",TAB_SELECTOR:".mdc-tab"}},97:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return(t=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])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),o=n(98),s=["touchstart","mousedown","focus"],c=function(t){function e(n){var r=t.call(this,i({},e.defaultAdapter,n))||this;return r.pointerDownRecognized_=!1,r.currentTranslateOffset_=0,r.focusedTarget_=null,r.layoutFrame_=0,r.scrollFrameScrollLeft_=0,r.forwardIndicatorClickHandler_=function(t){return r.scrollForward(t)},r.backIndicatorClickHandler_=function(t){return r.scrollBack(t)},r.resizeHandler_=function(){return r.layout()},r.interactionHandler_=function(t){"touchstart"!==t.type&&"mousedown"!==t.type||(r.pointerDownRecognized_=!0),r.handlePossibleTabKeyboardFocus_(t),"focus"===t.type&&(r.pointerDownRecognized_=!1)},r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return o.strings},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},eventTargetHasClass:function(){return!1},addClassToForwardIndicator:function(){},removeClassFromForwardIndicator:function(){},addClassToBackIndicator:function(){},removeClassFromBackIndicator:function(){},isRTL:function(){return!1},registerBackIndicatorClickHandler:function(){},deregisterBackIndicatorClickHandler:function(){},registerForwardIndicatorClickHandler:function(){},deregisterForwardIndicatorClickHandler:function(){},registerCapturedInteractionHandler:function(){},deregisterCapturedInteractionHandler:function(){},registerWindowResizeHandler:function(){},deregisterWindowResizeHandler:function(){},getNumberOfTabs:function(){return 0},getComputedWidthForTabAtIndex:function(){return 0},getComputedLeftForTabAtIndex:function(){return 0},getOffsetWidthForScrollFrame:function(){return 0},getScrollLeftForScrollFrame:function(){return 0},setScrollLeftForScrollFrame:function(){},getOffsetWidthForTabBar:function(){return 0},setTransformStyleForTabBar:function(){},getOffsetLeftForEventTarget:function(){return 0},getOffsetWidthForEventTarget:function(){return 0}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.adapter_.registerBackIndicatorClickHandler(this.backIndicatorClickHandler_),this.adapter_.registerForwardIndicatorClickHandler(this.forwardIndicatorClickHandler_),this.adapter_.registerWindowResizeHandler(this.resizeHandler_),s.forEach(function(e){t.adapter_.registerCapturedInteractionHandler(e,t.interactionHandler_)}),this.layout()},e.prototype.destroy=function(){var t=this;this.adapter_.deregisterBackIndicatorClickHandler(this.backIndicatorClickHandler_),this.adapter_.deregisterForwardIndicatorClickHandler(this.forwardIndicatorClickHandler_),this.adapter_.deregisterWindowResizeHandler(this.resizeHandler_),s.forEach(function(e){t.adapter_.deregisterCapturedInteractionHandler(e,t.interactionHandler_)})},e.prototype.scrollBack=function(t){t&&t.preventDefault();for(var e=0,n=0,r=this.adapter_.getNumberOfTabs()-1;r>0;r--){var i=this.adapter_.getComputedLeftForTabAtIndex(r),a=this.adapter_.getOffsetWidthForTabBar()-i,o=i>this.currentTranslateOffset_;if(this.isRTL_()&&(o=a>this.currentTranslateOffset_),!o&&(e+=this.adapter_.getComputedWidthForTabAtIndex(r))>this.adapter_.getOffsetWidthForScrollFrame()){n=this.isRTL_()?r+1:r;break}}this.scrollToTabAtIndex(n)},e.prototype.scrollForward=function(t){t&&t.preventDefault();for(var e=this.adapter_.getOffsetWidthForScrollFrame()+this.currentTranslateOffset_,n=0,r=0;r<this.adapter_.getNumberOfTabs();r++){var i=this.adapter_.getComputedLeftForTabAtIndex(r)+this.adapter_.getComputedWidthForTabAtIndex(r),a=i>e;if(this.isRTL_()){var o=e-this.adapter_.getComputedWidthForTabAtIndex(r);a=this.adapter_.getOffsetWidthForTabBar()-i>o}if(a){n=r;break}}this.scrollToTabAtIndex(n)},e.prototype.layout=function(){var t=this;cancelAnimationFrame(this.layoutFrame_),this.scrollFrameScrollLeft_=this.adapter_.getScrollLeftForScrollFrame(),this.layoutFrame_=requestAnimationFrame(function(){return t.layout_()})},e.prototype.scrollToTabAtIndex=function(t){var e=this,n=this.adapter_.getComputedLeftForTabAtIndex(t),r=this.adapter_.getComputedWidthForTabAtIndex(t);this.currentTranslateOffset_=this.normalizeForRTL_(n,r),requestAnimationFrame(function(){return e.shiftFrame_()})},e.prototype.layout_=function(){var t=this.adapter_.getOffsetWidthForScrollFrame();this.adapter_.getOffsetWidthForTabBar()>t||(this.currentTranslateOffset_=0),this.shiftFrame_(),this.updateIndicatorEnabledStates_()},e.prototype.shiftFrame_=function(){var t=this.isRTL_()?this.currentTranslateOffset_:-this.currentTranslateOffset_;this.adapter_.setTransformStyleForTabBar("translateX("+t+"px)"),this.updateIndicatorEnabledStates_()},e.prototype.handlePossibleTabKeyboardFocus_=function(t){var e=t.target;if(this.adapter_.eventTargetHasClass(e,o.cssClasses.TAB)&&!this.pointerDownRecognized_){var n=this.isRTL_()?this.scrollFrameScrollLeft_:0;this.adapter_.setScrollLeftForScrollFrame(n),this.focusedTarget_=e;var r=this.adapter_.getOffsetWidthForScrollFrame(),i=this.adapter_.getOffsetWidthForTabBar(),a=this.adapter_.getOffsetLeftForEventTarget(this.focusedTarget_),s=a+this.adapter_.getOffsetWidthForEventTarget(this.focusedTarget_),c=s<=this.currentTranslateOffset_,u=s>this.currentTranslateOffset_+r;if(this.isRTL_()){var d=i-a;c=a>=i-this.currentTranslateOffset_,u=d>r+this.currentTranslateOffset_}u?this.scrollForward():c&&this.scrollBack(),this.pointerDownRecognized_=!1}},e.prototype.updateIndicatorEnabledStates_=function(){var t=o.cssClasses.INDICATOR_ENABLED;0===this.currentTranslateOffset_?this.adapter_.removeClassFromBackIndicator(t):this.adapter_.addClassToBackIndicator(t),this.adapter_.getOffsetWidthForTabBar()-this.currentTranslateOffset_>this.adapter_.getOffsetWidthForScrollFrame()?this.adapter_.addClassToForwardIndicator(t):this.adapter_.removeClassFromForwardIndicator(t)},e.prototype.normalizeForRTL_=function(t,e){return this.isRTL_()?this.adapter_.getOffsetWidthForTabBar()-(t+e):t},e.prototype.isRTL_=function(){return this.adapter_.isRTL()},e}(a.MDCFoundation);e.MDCTabBarScrollerFoundation=c,e.default=c},98:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssClasses={INDICATOR_BACK:"mdc-tab-bar-scroller__indicator--back",INDICATOR_ENABLED:"mdc-tab-bar-scroller__indicator--enabled",INDICATOR_FORWARD:"mdc-tab-bar-scroller__indicator--forward",TAB:"mdc-tab"},e.strings={FRAME_SELECTOR:".mdc-tab-bar-scroller__scroll-frame",INDICATOR_BACK_SELECTOR:".mdc-tab-bar-scroller__indicator--back",INDICATOR_FORWARD_SELECTOR:".mdc-tab-bar-scroller__indicator--forward",TABS_SELECTOR:".mdc-tab-bar-scroller__scroll-frame__tabs",TAB_SELECTOR:".mdc-tab"}}})});
9//# sourceMappingURL=mdc.tabs.min.js.map
\No newline at end of file