info Your patient ID is located on your invoice. Patient ID Email attach_money Amount First Name Last Name Card Number MM / YY Code Address City State AL AK AZ AR CA CO CT DE FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY Zip lock Pay close var ANS_customer_id="7df8b5eb-ba27-43fb-a468-9b03b0118c46"; !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=0)}([function(t,e,n){n(1),t.exports=n(2)},function(t,e,n){"use strict";n.r(e),e.default=n.p+"pay-bundle.css"},function(t,e,n){"use strict";n.r(e); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ 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;n=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 s(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 u(){for(var t=[],e=0;e0&&T.some;((function(t){return e.adapter_.containsEventTarget(t)}))?this.resetActivationState_():(void 0!==t&&(T.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation;_(),requestAnimationFrame((function(){T=[],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,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),h=l.startPoint,_=l.endPoint;c=h.x+"px, "+h.y+"px",d=_.x+"px, "+_.y+"px"}this.adapter_.updateCssVariable(i,c),this.adapter_.updateCssVariable(r,d),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_()}),u)},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,u=a+n.top;if("touchstart"===t.type){var c=t;i=c.changedTouches[0].pageX-s,r=c.changedTouches[0].pageY-u}else{var d=t;i=d.pageX-s,r=d.pageY-u}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)}),E.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}(c),C=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 p&&!e)return p;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||(p=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,l())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,l())},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,l())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,l())},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 v(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}(d),b={ROOT:"mdc-form-field"},S={LABEL_SELECTOR:".mdc-form-field > label"},O=function(t){function e(n){var i=t.call(this,o({},e.defaultAdapter,n))||this;return i.clickHandler_=function(){return i.handleClick_()},i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return S},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}(c),L=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=O.strings.LABEL_SELECTOR;return this.root_.querySelector(t)},enumerable:!0,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new O({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}(d),x={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},R=function(t){function e(n){var i=t.call(this,o({},e.defaultAdapter,n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return x},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}(c),N=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 R({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}(d),D={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},M=function(t){function e(n){var i=t.call(this,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 D},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(D.LINE_RIPPLE_DEACTIVATING),this.adapter_.addClass(D.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter_.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter_.addClass(D.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter_.hasClass(D.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e;&&(this.adapter_.removeClass(D.LINE_RIPPLE_ACTIVE),this.adapter_.removeClass(D.LINE_RIPPLE_DEACTIVATING))},e}(c),F=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 M({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}(d),w={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},P={NOTCH_ELEMENT_PADDING:8},H={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},k=function(t){function e(n){return t.call(this,o({},e.defaultAdapter,n))||this}return r(e,t),Object.defineProperty(e,"strings",{get:function(){return w},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return H},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return P},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=P.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}(c),V=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(w.NOTCH_ELEMENT_SELECTOR);var t=this.root_.querySelector("."+R.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root_.classList.add(H.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root_.classList.add(H.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 k({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}(d),B={ROOT:"mdc-text-field-character-counter"},U={ROOT_SELECTOR:"."+B.ROOT},q=function(t){function e(n){return t.call(this,o({},e.defaultAdapter,n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return B},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return U},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setCounterValue=function(t,e){t=Math.min(t,e),this.adapter_.setContent(t+" / "+e)},e}(c),j=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 q({setContent:function(e){t.root_.textContent=e}})},e}(d),G={ARIA_CONTROLS:"aria-controls",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},X={DENSE:"mdc-text-field--dense",DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",FULLWIDTH:"mdc-text-field--fullwidth",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},K={DENSE_LABEL_SCALE:.923,LABEL_SCALE:.75},z=["pattern","min","max","required","step","minlength","maxlength"],W=["color","date","datetime-local","month","range","time","week"],Q=["mousedown","touchstart"],Y=["click","keydown"],Z=function(t){function e(n,i){void 0===i&&(i={});var r=t.call(this,o({},e.defaultAdapter,n))||this;return r.isFocused_=!1,r.receivedUserInput_=!1,r.isValid_=!0,r.useNativeValidation_=!0,r.helperText_=i.helperText,r.characterCounter_=i.characterCounter,r.leadingIcon_=i.leadingIcon,r.trailingIcon_=i.trailingIcon,r.inputFocusHandler_=function(){return r.activateFocus()},r.inputBlurHandler_=function(){return r.deactivateFocus()},r.inputInputHandler_=function(){return r.handleInput()},r.setPointerXOffset_=function(t){return r.setTransformOrigin(t)},r.textFieldInteractionHandler_=function(){return r.handleTextFieldInteraction()},r.validationAttributeChangeHandler_=function(t){return r.handleValidationAttributeChange(t)},r}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return X},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return G},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return K},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat_",{get:function(){var t=this.getNativeInput_().type;return W.indexOf(t)>=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.adapter_.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.registerInputInteractionHandler("input",this.inputInputHandler_),Q.forEach((function(e){t.adapter_.registerInputInteractionHandler(e,t.setPointerXOffset_)})),Y.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_),Q.forEach((function(e){t.adapter_.deregisterInputInteractionHandler(e,t.setPointerXOffset_)})),Y.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 z.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_.hasClass(X.DENSE)?K.DENSE_LABEL_SCALE:K.LABEL_SCALE,n=this.adapter_.getLabelWidth()*e;this.adapter_.notchOutline(n)}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.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.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.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.getNativeInput_=function(){return(this.adapter_?this.adapter_.getNativeInput():null)||{disabled:!1,maxLength:-1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(c),$={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"},J={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+$.ROOT},tt=function(t){function e(n){return t.call(this,o({},e.defaultAdapter,n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return $},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return J},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($.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass($.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass($.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass($.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(J.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass($.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass($.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(J.ROLE,"alert"):this.adapter_.removeAttr(J.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(J.ARIA_HIDDEN,"true")},e}(c),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)},Object.defineProperty(e.prototype,"foundation",{get:function(){return this.foundation_},enumerable:!0,configurable:!0}),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)},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}(d),nt={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},it={ROOT:"mdc-text-field__icon"},rt=["click","keydown"],ot=function(t){function e(n){var i=t.call(this,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 nt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return it},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"),rt.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;rt.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",nt.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}(c),at=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 ot({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(ot.strings.ICON_EVENT,{},!0)}})},e}(d),st=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 C(t,e)}),void 0===e&&(e=function(t){return new F(t)}),void 0===n&&(n=function(t){return new et(t)}),void 0===i&&(i=function(t){return new j(t)}),void 0===r&&(r=function(t){return new at(t)}),void 0===o&&(o=function(t){return new N(t)}),void 0===a&&(a=function(t){return new V(t)}),this.input_=this.root_.querySelector(G.INPUT_SELECTOR);var s=this.root_.querySelector(G.LABEL_SELECTOR);this.label_=s?o(s):null;var u=this.root_.querySelector(G.LINE_RIPPLE_SELECTOR);this.lineRipple_=u?e(u):null;var c=this.root_.querySelector(G.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=tt.strings,l=this.root_.nextElementSibling,h=l&&l.classList.contains;(X.HELPER_LINE),_=h&&l;&&l.querySelector;(d.ROOT_SELECTOR);this.helperText_=_?n(_):null;var p=q.strings,f=this.root_.querySelector(p.ROOT_SELECTOR);!f&&h;&&l;&&(f=l.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=f?i(f):null;var m=this.root_.querySelector(G.LEADING_ICON_SELECTOR);this.leadingIcon_=m?r(m):null;var E=this.root_.querySelector(G.TRAILING_ICON_SELECTOR);this.trailingIcon_=E?r(E):null,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}),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({},this.getRootAdapterMethods_(),this.getInputAdapterMethods_(),this.getLabelAdapterMethods_(),this.getLineRippleAdapterMethods_(),this.getOutlineAdapterMethods_());return new Z(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,l())},deregisterInputInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,l())}}},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(X.TEXTAREA),i=this.root_.classList.contains(X.OUTLINED);if(n||i)return null;var r=o({},C.createAdapter(this),{isSurfaceActive:function(){return _(e.input_,":active")},registerInteractionHandler:function(t,n){return e.input_.addEventListener(t,n,l())},deregisterInteractionHandler:function(t,n){return e.input_.removeEventListener(t,n,l())}});return t(this.root_,new v(r))},e}(d),ut={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},ct={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(", ")},dt={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"}(I||(I={})),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"}(y||(y={})); /** * @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 lt={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"},ht={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 ."+lt.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+lt.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+lt.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+lt.LIST_ITEM_CLASS+" a,\n ."+lt.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+lt.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},_t={UNSET_INDEX:-1},pt=["input","button","textarea","select"];var ft,mt=function(t){function e(n){var i=t.call(this,o({},e.defaultAdapter,n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=_t.UNSET_INDEX,i.focusedItemIndex_=_t.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 ht},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return lt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _t},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,u="End"===t.key||35===t.keyCode,c="Enter"===t.key||13===t.keyCode,d="Space"===t.key||32===t.keyCode;if(this.adapter_.isRootFocused())r||u?(t.preventDefault(),this.focusLastElement()):(a||s)&&(t.preventDefault(),this.focusFirstElement());else{var l=this.adapter_.getFocusedElementIndex();if(!(-1===l&&(l=n)<0)){var h;if(this.isVertical_&&a;||!this.isVertical_&&o;)this.preventDefaultEvent_(t),h=this.focusNextElement(l);else if(this.isVertical_&&r;||!this.isVertical_&&i;)this.preventDefaultEvent_(t),h=this.focusPrevElement(l);else if(s)this.preventDefaultEvent_(t),h=this.focusFirstElement();else if(u)this.preventDefaultEvent_(t),h=this.focusLastElement();else if((c||d)&&e;){var _=t.target;if(_&&"A"===_.tagName&&c;)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction;_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}},e.prototype.handleClick=function(t,e){t!==_t.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction;_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=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,lt.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,ht.ARIA_DISABLED,"false")):(this.adapter_.addClassForElementIndex(t,lt.LIST_ITEM_DISABLED_CLASS),this.adapter_.setAttributeForElementIndex(t,ht.ARIA_DISABLED,"true")))},e.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===pt.indexOf(e)&&t.preventDefault;()},e.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=lt.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=lt.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==_t.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_===_t.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,ht.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?ht.ARIA_CURRENT:ht.ARIA_SELECTED;this.selectedIndex_!==_t.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_!==_t.UNSET_INDEX&&this.adapter;_.setAttributeForElementIndex(this.selectedIndex_,ht.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,ht.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,ht.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===_t.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;_!==_t.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&&t;dt.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement;_(d),this.adapter_.setTransformOrigin(r+" "+i),this.adapter_.setPosition(d),this.adapter_.setMaxHeight(n?n+"px":"")},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=y.TOP_LEFT,e=this.measurements_,n=e.viewportDistance,i=e.anchorSize,r=e.surfaceSize,o=this.hasBit_(this.anchorCorner_,I.BOTTOM),a=o?n.top+i.height+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,s=o?n.bottom-this.anchorMargin_.bottom:n.bottom+i.height-this.anchorMargin_.top,u=r.height-a,c=r.height-s;c>0&&u;0&&m;=0&&(this.adapter_.removeAttributeFromElementAtIndex(e,Tt.ARIA_CHECKED_ATTR),this.adapter_.removeClassFromElementAtIndex(e,At.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,At.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,Tt.ARIA_CHECKED_ATTR,"true")},e.prototype.setEnabled=function(t,e){this.validatedIndex_(t),e?(this.adapter_.removeClassFromElementAtIndex(t,lt.LIST_ITEM_DISABLED_CLASS),this.adapter_.addAttributeToElementAtIndex(t,Tt.ARIA_DISABLED_ATTR,"false")):(this.adapter_.addClassToElementAtIndex(t,lt.LIST_ITEM_DISABLED_CLASS),this.adapter_.addAttributeToElementAtIndex(t,Tt.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex_=function(t){var e=this.adapter_.getMenuItemCount();if(!(t>=0&&t;=this.adapter_.getMenuItemCount())){var n=this.selectedIndex_;this.selectedIndex_=t,this.selectedIndex_===Lt.UNSET_INDEX?this.adapter_.setSelectedText(""):this.adapter_.setSelectedText(this.adapter_.getMenuItemTextAtIndex(this.selectedIndex_).trim()),n!==Lt.UNSET_INDEX&&(this.adapter_.removeClassAtIndex(n,St.SELECTED_ITEM_CLASS),this.adapter_.removeAttributeAtIndex(n,Ot.ARIA_SELECTED_ATTR)),this.selectedIndex_!==Lt.UNSET_INDEX&&(this.adapter_.addClassAtIndex(this.selectedIndex_,St.SELECTED_ITEM_CLASS),this.adapter_.setAttributeAtIndex(this.selectedIndex_,Ot.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),this.handleChange()},e.prototype.getValue=function(){var t=this.adapter_.getSelectedMenuItem();return t&&this.adapter;_.getMenuItemAttr(t,Ot.VALUE_ATTR)||""},e.prototype.getDisabled=function(){return this.disabled_},e.prototype.setDisabled=function(t){this.disabled_=t,this.disabled_?(this.adapter_.addClass(St.DISABLED),this.adapter_.closeMenu()):this.adapter_.removeClass(St.DISABLED),this.leadingIcon_&&this.leadingIcon;_.setDisabled(this.disabled_),this.adapter_.setSelectedTextAttr("tabindex",this.disabled_?"-1":"0"),this.adapter_.setSelectedTextAttr("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(St.ACTIVATED);var t=this.selectedIndex_>=0?this.selectedIndex_:0;this.adapter_.focusMenuItemAtIndex(t)}},e.prototype.handleMenuClosed=function(){this.adapter_.removeClass(St.ACTIVATED),this.isMenuOpen_=!1,this.adapter_.setSelectedTextAttr("aria-expanded","false"),this.adapter_.isSelectedTextFocused()||this.blur_()},e.prototype.handleChange=function(){this.updateLabel_(),this.adapter_.notifyChange(this.getValue()),this.adapter_.hasClass(St.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(St.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_.setSelectedTextAttr("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(St.FOCUSED)&&(e||n||i||r)&&(this.adapter_.openMenu(),this.isMenuOpen_=!0,this.adapter_.setSelectedTextAttr("aria-expanded","true"),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter_.hasOutline()){var e=this.adapter_.hasClass(St.FOCUSED);if(t){var n=Lt.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_.setSelectedTextAttr("aria-invalid",(!t).toString()),t?this.adapter_.removeClass(St.INVALID):this.adapter_.addClass(St.INVALID)},e.prototype.isValid=function(){return!(this.adapter_.hasClass(St.REQUIRED)&&!this.adapter_.hasClass(St.DISABLED))||this.selectedIndex_!==Lt.UNSET_INDEX&&(0!==this.selectedIndex_||Boolean(this.getValue()))},e.prototype.setRequired=function(t){t?this.adapter_.addClass(St.REQUIRED):this.adapter_.removeClass(St.REQUIRED),this.adapter_.setSelectedTextAttr("aria-required",t.toString())},e.prototype.getRequired=function(){return"true"===this.adapter_.getSelectedTextAttr("aria-required")},e.prototype.init=function(){var t=this.adapter_.getAnchorElement();t&&(this.adapter_.setMenuAnchorElement(t),this.adapter_.setMenuAnchorCorner(y.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(St.FOCUSED)||this.adapter_.floatLabel(t))},e.prototype.blur_=function(){this.adapter_.removeClass(St.FOCUSED),this.updateLabel_(),this.adapter_.deactivateBottomLine(),this.adapter_.hasClass(St.REQUIRED)&&(this.setValid(this.isValid()),this.helperText_&&this.helperText;_.setValidity(this.isValid()))},e}(c),Rt={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},Nt={HELPER_TEXT_PERSISTENT:"mdc-select-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg"},Dt=function(t){function e(n){return t.call(this,o({},e.defaultAdapter,n))||this}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Nt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Rt},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(Nt.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass(Nt.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass(Nt.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass(Nt.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(Rt.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass(Nt.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass(Nt.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(Rt.ROLE,"alert"):this.adapter_.removeAttr(Rt.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(Rt.ARIA_HIDDEN,"true")},e}(c),Mt=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 Dt({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}(d),Ft={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},wt=["click","keydown"],Pt=function(t){function e(n){var i=t.call(this,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 Ft},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"),wt.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;wt.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",Ft.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}(c),Ht=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 Pt({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(Pt.strings.ICON_EVENT,{},!0)}})},e}(d),kt=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 N(t)}),void 0===e&&(e=function(t){return new F(t)}),void 0===n&&(n=function(t){return new V(t)}),void 0===i&&(i=function(t){return new bt(t)}),void 0===r&&(r=function(t){return new Ht(t)}),void 0===o&&(o=function(t){return new Mt(t)}),this.selectAnchor_=this.root_.querySelector(Ot.SELECT_ANCHOR_SELECTOR),this.selectedText_=this.root_.querySelector(Ot.SELECTED_TEXT_SELECTOR),!this.selectedText_)throw new Error("MDCSelect: Missing required element: The following selector must be present: '"+Ot.SELECTED_TEXT_SELECTOR+"'");if(this.selectedText_.hasAttribute(Ot.ARIA_CONTROLS)){var a=document.getElementById(this.selectedText_.getAttribute(Ot.ARIA_CONTROLS));a&&(this.helperText_=o(a))}this.menuSetup_(i);var s=this.root_.querySelector(Ot.LABEL_SELECTOR);this.label_=s?t(s):null;var u=this.root_.querySelector(Ot.LINE_RIPPLE_SELECTOR);this.lineRipple_=u?e(u):null;var c=this.root_.querySelector(Ot.OUTLINE_SELECTOR);this.outline_=c?n(c):null;var d=this.root_.querySelector(Ot.LEADING_ICON_SELECTOR);d&&(this.leadingIcon_=r(d)),this.root_.classList.contains(St.OUTLINED)||(this.ripple_=this.createRipple_())},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleChange_=function(){return t.foundation_.handleChange()},this.handleFocus_=function(){return t.foundation_.handleFocus()},this.handleBlur_=function(){return t.foundation_.handleBlur()},this.handleClick_=function(e){t.selectedText_.focus(),t.foundation_.handleClick(t.getNormalizedXCoordinate_(e))},this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleMenuItemAction_=function(e){return t.foundation_.handleMenuItemAction(e.detail.index)},this.handleMenuOpened_=function(){return t.foundation_.handleMenuOpened()},this.handleMenuClosed_=function(){return t.foundation_.handleMenuClosed()},this.selectedText_.addEventListener("focus",this.handleFocus_),this.selectedText_.addEventListener("blur",this.handleBlur_),this.selectedText_.addEventListener("click",this.handleClick_),this.selectedText_.addEventListener("keydown",this.handleKeydown_),this.menu_.listen(ct.CLOSED_EVENT,this.handleMenuClosed_),this.menu_.listen(ct.OPENED_EVENT,this.handleMenuOpened_),this.menu_.listen(Tt.SELECTED_EVENT,this.handleMenuItemAction_),this.foundation_.init(),this.disabled=this.root_.classList.contains(St.DISABLED)},e.prototype.destroy=function(){this.selectedText_.removeEventListener("change",this.handleChange_),this.selectedText_.removeEventListener("focus",this.handleFocus_),this.selectedText_.removeEventListener("blur",this.handleBlur_),this.selectedText_.removeEventListener("keydown",this.handleKeydown_),this.selectedText_.removeEventListener("click",this.handleClick_),this.menu_.unlisten(ct.CLOSED_EVENT,this.handleMenuClosed_),this.menu_.unlisten(ct.OPENED_EVENT,this.handleMenuOpened_),this.menu_.unlisten(Tt.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({},this.getSelectAdapterMethods_(),this.getCommonAdapterMethods_(),this.getOutlineAdapterMethods_(),this.getLabelAdapterMethods_());return new xt(t,this.getFoundationMap_())},e.prototype.menuSetup_=function(t){this.menuElement_=this.root_.querySelector(Ot.MENU_SELECTOR),this.menu_=t(this.menuElement_)},e.prototype.createRipple_=function(){var t=this,e=o({},C.createAdapter({root_:this.selectAnchor_}),{registerInteractionHandler:function(e,n){return t.selectedText_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.selectedText_.removeEventListener(e,n)}});return new C(this.selectAnchor_,new v(e))},e.prototype.getSelectAdapterMethods_=function(){var t=this;return{getSelectedMenuItem:function(){return t.menuElement_.querySelector(Ot.SELECTED_ITEM_SELECTOR)},getMenuItemAttr:function(t,e){return t.getAttribute(e)},setSelectedText:function(e){return t.selectedText_.textContent=e},isSelectedTextFocused:function(){return document.activeElement===t.selectedText_},getSelectedTextAttr:function(e){return t.selectedText_.getAttribute(e)},setSelectedTextAttr:function(e,n){return t.selectedText_.setAttribute(e,n)},openMenu:function(){return t.menu_.open=!0},closeMenu:function(){return t.menu_.open=!1},getAnchorElement:function(){return t.root_.querySelector(Ot.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(e){return t.menu_.setAnchorElement(e)},setMenuAnchorCorner:function(e){return t.menu_.setAnchorCorner(e)},setMenuWrapFocus:function(e){return t.menu_.wrapFocus=e},setAttributeAtIndex:function(e,n,i){return t.menu_.items[e].setAttribute(n,i)},removeAttributeAtIndex:function(e,n){return t.menu_.items[e].removeAttribute(n)},focusMenuItemAtIndex:function(e){return t.menu_.items[e].focus()},getMenuItemCount:function(){return t.menu_.items.length},getMenuItemValues:function(){return t.menu_.items.map((function(t){return t.getAttribute(Ot.VALUE_ATTR)||""}))},getMenuItemTextAtIndex:function(e){return t.menu_.items[e].textContent},addClassAtIndex:function(e,n){return t.menu_.items[e].classList.add(n)},removeClassAtIndex:function(e,n){return t.menu_.items[e].classList.remove(n)}}},e.prototype.getCommonAdapterMethods_=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)},setRippleCenter:function(e){return t.lineRipple_&&t.lineRipple;_.setRippleCenter(e)},activateBottomLine:function(){return t.lineRipple_&&t.lineRipple;_.activate()},deactivateBottomLine:function(){return t.lineRipple_&&t.lineRipple;_.deactivate()},notifyChange:function(e){var n=t.selectedIndex;t.emit(Ot.CHANGE_EVENT,{value:e,index:n},!0)}}},e.prototype.getOutlineAdapterMethods_=function(){var t=this;return{hasOutline:function(){return Boolean(t.outline_)},notchOutline:function(e){return t.outline_&&t.outline;_.notch(e)},closeOutline:function(){return t.outline_&&t.outline;_.closeNotch()}}},e.prototype.getLabelAdapterMethods_=function(){var t=this;return{hasLabel:function(){return!!t.label_},floatLabel:function(e){return 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}(d),Vt={CLOSING:"mdc-snackbar--closing",OPEN:"mdc-snackbar--open",OPENING:"mdc-snackbar--opening"},Bt={ACTION_SELECTOR:".mdc-snackbar__action",ARIA_LIVE_LABEL_TEXT_ATTR:"data-mdc-snackbar-label-text",CLOSED_EVENT:"MDCSnackbar:closed",CLOSING_EVENT:"MDCSnackbar:closing",DISMISS_SELECTOR:".mdc-snackbar__dismiss",LABEL_SELECTOR:".mdc-snackbar__label",OPENED_EVENT:"MDCSnackbar:opened",OPENING_EVENT:"MDCSnackbar:opening",REASON_ACTION:"action",REASON_DISMISS:"dismiss",SURFACE_SELECTOR:".mdc-snackbar__surface"},Ut={DEFAULT_AUTO_DISMISS_TIMEOUT_MS:5e3,INDETERMINATE:-1,MAX_AUTO_DISMISS_TIMEOUT_MS:1e4,MIN_AUTO_DISMISS_TIMEOUT_MS:4e3,SNACKBAR_ANIMATION_CLOSE_TIME_MS:75,SNACKBAR_ANIMATION_OPEN_TIME_MS:150,ARIA_LIVE_DELAY_MS:1e3},qt=Vt.OPENING,jt=Vt.OPEN,Gt=Vt.CLOSING,Xt=Bt.REASON_ACTION,Kt=Bt.REASON_DISMISS,zt=function(t){function e(n){var i=t.call(this,o({},e.defaultAdapter,n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.autoDismissTimer_=0,i.autoDismissTimeoutMs_=Ut.DEFAULT_AUTO_DISMISS_TIMEOUT_MS,i.closeOnEscape_=!0,i}return r(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Vt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Bt},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ut},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},announce:function(){},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},removeClass:function(){}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.clearAutoDismissTimer_(),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=0,this.adapter_.removeClass(qt),this.adapter_.removeClass(jt),this.adapter_.removeClass(Gt)},e.prototype.open=function(){var t=this;this.clearAutoDismissTimer_(),this.isOpen_=!0,this.adapter_.notifyOpening(),this.adapter_.removeClass(Gt),this.adapter_.addClass(qt),this.adapter_.announce(),this.runNextAnimationFrame_((function(){t.adapter_.addClass(jt),t.animationTimer_=setTimeout((function(){var e=t.getTimeoutMs();t.handleAnimationTimerEnd_(),t.adapter_.notifyOpened(),e!==Ut.INDETERMINATE&&(t.autoDismissTimer_=setTimeout((function(){t.close(Kt)}),e))}),Ut.SNACKBAR_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,this.clearAutoDismissTimer_(),this.isOpen_=!1,this.adapter_.notifyClosing(t),this.adapter_.addClass(Vt.CLOSING),this.adapter_.removeClass(Vt.OPEN),this.adapter_.removeClass(Vt.OPENING),clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout((function(){e.handleAnimationTimerEnd_(),e.adapter_.notifyClosed(t)}),Ut.SNACKBAR_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs_},e.prototype.setTimeoutMs=function(t){var e=Ut.MIN_AUTO_DISMISS_TIMEOUT_MS,n=Ut.MAX_AUTO_DISMISS_TIMEOUT_MS;if(!(t===Ut.INDETERMINATE||t<=n&&t;>=e))throw new Error("\n timeoutMs must be an integer in the range "+e+"–"+n+"\n (or "+Ut.INDETERMINATE+" to disable), but got '"+t+"'");this.autoDismissTimeoutMs_=t},e.prototype.getCloseOnEscape=function(){return this.closeOnEscape_},e.prototype.setCloseOnEscape=function(t){this.closeOnEscape_=t},e.prototype.handleKeyDown=function(t){("Escape"===t.key||27===t.keyCode)&&this.getCloseOnEscape;()&&this.close;(Kt)},e.prototype.handleActionButtonClick=function(t){this.close(Xt)},e.prototype.handleActionIconClick=function(t){this.close(Kt)},e.prototype.clearAutoDismissTimer_=function(){clearTimeout(this.autoDismissTimer_),this.autoDismissTimer_=0},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter_.removeClass(Vt.OPENING),this.adapter_.removeClass(Vt.CLOSING)},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}(c),Wt=Ut.ARIA_LIVE_DELAY_MS,Qt=Bt.ARIA_LIVE_LABEL_TEXT_ATTR;function Yt(t,e){void 0===e&&(e=t);var n=t.getAttribute("aria-live"),i=e.textContent.trim();i&&n;&&(t.setAttribute("aria-live","off"),e.textContent="",e.innerHTML=' ',e.setAttribute(Qt,i),setTimeout((function(){t.setAttribute("aria-live",n),e.removeAttribute(Qt),e.textContent=i}),Wt))} /** * @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 Zt=Bt.SURFACE_SELECTOR,$t=Bt.LABEL_SELECTOR,Jt=Bt.ACTION_SELECTOR,te=Bt.DISMISS_SELECTOR,ee=Bt.OPENING_EVENT,ne=Bt.OPENED_EVENT,ie=Bt.CLOSING_EVENT,re=Bt.CLOSED_EVENT,oe=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(){return Yt}),this.announce_=t()},e.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl_=this.root_.querySelector(Zt),this.labelEl_=this.root_.querySelector($t),this.actionEl_=this.root_.querySelector(Jt),this.handleKeyDown_=function(e){return t.foundation_.handleKeyDown(e)},this.handleSurfaceClick_=function(e){var n=e.target;t.isActionButton_(n)?t.foundation_.handleActionButtonClick(e):t.isActionIcon_(n)&&t.foundation;_.handleActionIconClick(e)},this.registerKeyDownHandler_(this.handleKeyDown_),this.registerSurfaceClickHandler_(this.handleSurfaceClick_)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.deregisterKeyDownHandler_(this.handleKeyDown_),this.deregisterSurfaceClickHandler_(this.handleSurfaceClick_)},e.prototype.open=function(){this.foundation_.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation_.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new zt({addClass:function(e){return t.root_.classList.add(e)},announce:function(){return t.announce_(t.labelEl_)},notifyClosed:function(e){return t.emit(re,e?{reason:e}:{})},notifyClosing:function(e){return t.emit(ie,e?{reason:e}:{})},notifyOpened:function(){return t.emit(ne,{})},notifyOpening:function(){return t.emit(ee,{})},removeClass:function(e){return t.root_.classList.remove(e)}})},Object.defineProperty(e.prototype,"timeoutMs",{get:function(){return this.foundation_.getTimeoutMs()},set:function(t){this.foundation_.setTimeoutMs(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"closeOnEscape",{get:function(){return this.foundation_.getCloseOnEscape()},set:function(t){this.foundation_.setCloseOnEscape(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation_.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelText",{get:function(){return this.labelEl_.textContent},set:function(t){this.labelEl_.textContent=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonText",{get:function(){return this.actionEl_.textContent},set:function(t){this.actionEl_.textContent=t},enumerable:!0,configurable:!0}),e.prototype.registerKeyDownHandler_=function(t){this.listen("keydown",t)},e.prototype.deregisterKeyDownHandler_=function(t){this.unlisten("keydown",t)},e.prototype.registerSurfaceClickHandler_=function(t){this.surfaceEl_.addEventListener("click",t)},e.prototype.deregisterSurfaceClickHandler_=function(t){this.surfaceEl_.removeEventListener("click",t)},e.prototype.isActionButton_=function(t){return Boolean(h(t,Jt))},e.prototype.isActionIcon_=function(t){return Boolean(h(t,te))},e}(d),ae=[5,49,203,295],se=[6,17,28,37,113,315],ue=[7,8,316],ce=!1,de=(new L(document.querySelector(".mdc-form-field")),[]),le=new st(document.querySelector(".mdc-text-field.uuid"));new at(document.querySelector(".mdc-text-field.uuid")),new V(document.querySelector(".mdc-text-field.uuid > .mdc-notched-outline"));le.required=!0,le.pattern="[a-zA-Z]{3}[0-9]+",de.push(le);var he=new gt(document.querySelector(".mdc-menu-surface"));document.querySelector(".uuid > .mdc-menu-surface--anchor > .menu-surface-button").addEventListener("click",(function(t){he.open()}));var _e=new st(document.querySelector(".mdc-text-field.email"));new V(document.querySelector(".mdc-text-field.email > .mdc-notched-outline"));_e.required=!0,_e.pattern="[A-Za-z0-9\.]+@[A-Za-z0-9]+\.[A-Za-z0-9]{2,}",de.push(_e);var pe=new st(document.querySelector(".mdc-text-field.amount"));new at(document.querySelector(".mdc-text-field.amount")),new V(document.querySelector(".mdc-text-field.amount > .mdc-notched-outline"));pe.required=!0,document.querySelector(".mdc-text-field.amount > input").addEventListener("blur",(function(t){"-1"==pe.value.indexOf(".")&&""!=pe.value?pe.value=parseInt(pe.value).toFixed(2):""!=pe.value&&(pe.value=parseFloat(pe.value).toFixed(2))})),de.push(pe);var fe=new st(document.querySelector(".mdc-text-field.fName"));new V(document.querySelector(".mdc-text-field.fName > .mdc-notched-outline"));fe.required=!0,de.push(fe);var me=new st(document.querySelector(".mdc-text-field.lName"));new V(document.querySelector(".mdc-text-field.lName > .mdc-notched-outline"));me.required=!0,de.push(me);var Ee=new st(document.querySelector(".mdc-text-field.card"));new V(document.querySelector(".mdc-text-field.card > .mdc-notched-outline"));Ee.required=!0,de.push(Ee),document.querySelector(".mdc-text-field.card > input").addEventListener("blur",(function(t){(function(t){if(/[^0-9-\s]+/.test(t))return!1;for(var e=0,n=!1,i=(t=t.replace(/\D/g,"")).length-1;i>=0;--i){var r=t.charAt(i),o=parseInt(r,10);n&&(o*=2)>9&&(o-=9),e+=o,n=!n}return e%10==0})(Ee.value)||(Ee.valid=!1)}));var Ie=new st(document.querySelector(".mdc-text-field.mm"));new V(document.querySelector(".mdc-text-field.mm > .mdc-notched-outline"));Ie.required=!0,Ie.pattern="(0[1-9])|10|11|12",de.push(Ie),document.querySelector(".mdc-text-field.mm > input").addEventListener("blur",(function(t){/^[1-9]$/.test(Ie.value)&&(Ie.value="0"+Ie.value),ve(t)}));var ye=new st(document.querySelector(".mdc-text-field.yy"));new V(document.querySelector(".mdc-text-field.yy > .mdc-notched-outline"));ye.required=!0,de.push(ye),document.querySelector(".mdc-text-field.mm > input").addEventListener("input",(function(t){2==Ie.value.length&&ye.focus;()}));for(var ge=parseInt((new Date).getFullYear().toString().substr(2)),Ae=ge.toString(),Te=1;Te<11;++Te)Ae+="|"+(ge+Te).toString();ye.pattern=Ae,document.querySelector(".mdc-text-field.yy > input").addEventListener("blur",ve);var ve=function(t){if(Ie.value&&ye.value;&&parseInt;(ye.value)==ge){var e=(new Date).getMonth()+1;parseInt(Ie.value) .mdc-notched-outline"));Ce.required=!0,Ce.pattern="[0-9]{3,4}",de.push(Ce),document.querySelector(".mdc-text-field.yy > input").addEventListener("input",(function(t){2==ye.value.length&&Ce.focus;()}));var be=new st(document.querySelector(".mdc-text-field.address"));new V(document.querySelector(".mdc-text-field.address > .mdc-notched-outline"));be.required=!0,de.push(be);var Se=new st(document.querySelector(".mdc-text-field.city"));new V(document.querySelector(".mdc-text-field.city > .mdc-notched-outline"));Se.required=!0,de.push(Se);var Oe=new kt(document.querySelector(".mdc-select.state"));new V(document.querySelector(".mdc-select.state > div > .mdc-notched-outline"));Oe.required=!0,de.push(Oe);var Le=document.querySelector(".mdc-button.pay");new C(Le);Le.setAttribute("disabled","");var xe=new st(document.querySelector(".mdc-text-field.zip"));de.push(xe);new V(document.querySelector(".mdc-text-field.zip > .mdc-notched-outline"));xe.required=!0,xe.pattern="[1-9][0-9]{4}";var Re=new oe(document.querySelector(".mdc-snackbar"));setInterval((function(t){var e=!0;de.forEach((function(t){t.valid||(e=!1)})),ce&&(e=!1),e?Le.removeAttribute("disabled"):Le.setAttribute("disabled","")}),20),Le.addEventListener("click",(function(t){de.forEach((function(t){t.disabled=!0})),ce=!0;var e=document.createElement("div");e.classList.add("progress-holder");var lmop=document.createElement("p");lmop.innerText="Please do not leave this page";lmop.classList.add("wait-text", "mdc-typography");var n=document.createElement("progress");n.classList.add("circular-progress"),e.appendChild(n),e.appendChild(lmop),document.body.appendChild(e);var i=new FormData;i.append("r","payment"),i.append("uuid",le.value),i.append("fName",fe.value),i.append("lName",me.value),i.append("card",Ee.value),i.append("m",Ie.value),i.append("y",ye.value),i.append("ccv",Ce.value),i.append("addr",be.value),i.append("city",Se.value),i.append("state",Oe.value),i.append("zip",xe.value),i.append("amount",pe.value),i.append("email",_e.value),fetch("server.php",{method:"POST",body:i}).then((function(t){return t.json()})).then((function(t){if("success"!=t.status)de.forEach((function(t){t.disabled=!1})),ce=!1,e.remove(),o=t.error_message,document.querySelector(".mdc-snackbar__label").innerText="Error: "+o,Re.open(),ae.contains(t.error_code)?(pe.invalid(),pe.focus()):se.contains(t.error_code)?(Ee.invalid(),Ee.focus()):ue.contains(t.error_code)&&(Ie.invalid(),ye.invalid(),Ie.focus());else{e.remove();var n=_e.value;document.querySelector(".mdc-form-field").remove();var i=document.createElement("h1");i.classList.add("thank-you-header"),i.classList.add("mdc-typography--headline2"),i.innerText="Thank You!";var r=document.createElement("p");r.classList.add("thank-you-msg"),r.classList.add("mdc-typography--headline5"),r.innerText="Thank you for paying online. A receipt has been sent to "+n+".",document.querySelector(".mdc-layout-grid__cell.mdc-layout-grid__cell--span-4-desktop:not(.mdc-layout-grid__cell-span-0-mobile)").appendChild(i),document.querySelector(".mdc-layout-grid__cell.mdc-layout-grid__cell--span-4-desktop:not(.mdc-layout-grid__cell-span-0-mobile)").appendChild(r)}var o}))}))}]);