!function(e,t,n){"use strict";!function(){t.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.interaction","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.core.animate","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.chips","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.showHide","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.truncate","material.components.virtualRepeat","material.components.whiteframe"])}(),function(){functione(e,t){if(t.has("$swipe")){varn="You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!";e.warn(n)}}functionn(e,t){e.decorator("$$rAF",["$delegate",o]),e.decorator("$q",["$delegate",i]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}functiono(e){returne.throttle=function(t){varn,o,i,r;returnfunction(){n=arguments,r=this,i=t,o||(o=!0,e(function(){i.apply(r,Array.prototype.slice.call(n)),o=!1}))}},e}functioni(e){returne.resolve||(e.resolve=e.when),e}e.$inject=["$log","$injector"],n.$inject=["$provide","$mdThemingProvider"],o.$inject=["$delegate"],i.$inject=["$delegate"],t.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(n).run(e)}(),function(){functione(e){functionn(n,o,i){functionr(e){t.isUndefined(e)&&(e=!0),o.toggleClass("md-autofocus",!!e)}vara=i.mdAutoFocus||i.mdAutofocus||i.mdSidenavFocus;r(e(a)(n)),a&&n.$watch(a,r)}return{restrict:"A",link:{pre:n}}}e.$inject=["$parse"],t.module("material.core").directive("mdAutofocus",e).directive("mdAutoFocus",e).directive("mdSidenavFocus",e)}(),function(){functione(){functione(e){vart="#"===e[0]?e.substr(1):e,n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return1===n&&(o+=o,i+=i,r+=r),"rgba("+parseInt(o,16)+","+parseInt(i,16)+","+parseInt(r,16)+",0.1)"}functiont(e){e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);vart=e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"";returnt.toUpperCase()}functionn(e){returne.replace(")",", 0.1)").replace("(","a(")}functiono(e){returne?e.replace("rgba","rgb").replace(/,[^),]+\)/,")"):"rgb(0,0,0)"}return{rgbaToHex:t,hexToRgba:e,rgbToRgba:n,rgbaToRgb:o}}t.module("material.core").factory("$mdColorUtil",e)}(),function(){functione(){functione(e){vart=a+"-"+e,i=o(t),d=i.charAt(0).toLowerCase()+i.substring(1);returnn(r,e)?e:n(r,i)?i:n(r,d)?d:e}functionn(e,n){returnt.isDefined(e.style[n])}functiono(e){returne.replace(s,function(e,t,n,o){returno?n.toUpperCase():n})}functioni(e){vart,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(tine.style)if(n=o.exec(t))returnn[0]}varr=document.createElement("div"),a=i(r),d=/webki
this.onInputEvent(e),this.isBuffering=!0,this.bufferTimeout=this.$timeout(function(){this.isBuffering=!1}.bind(this),650,!1)},n.prototype.getLastInteractionType=function(){returnthis.lastInteractionType},n.prototype.isUserInvoked=function(e){varn=t.isNumber(e)?e:15;returnthis.lastInteractionTime>=this.$mdUtil.now()-n}}(),function(){functione(){functione(e){functionn(e){returns.optionsFactory=e.options,s.methods=(e.methods||[]).concat(a),l}functiono(e,t){returnd[e]=t,l}functioni(t,n){if(n=n||{},n.methods=n.methods||[],n.options=n.options||function(){return{}},/^cancel|hide|show$/.test(t))thrownewError("Preset '"+t+"' in "+e+" is reserved!");if(n.methods.indexOf("_options")>-1)thrownewError("Method '_options' in "+e+" is reserved!");returns.presets[t]={methods:n.methods.concat(a),optionsFactory:n.options,argOption:n.argOption},l}functionr(n,o){functioni(e){returne=e||{},e._options&&(e=e._options),m.show(t.extend({},c,e))}functionr(e){returnm.destroy(e)}functiona(t,n){vari={};returni[e]=u,o.invoke(t||function(){returnn},{},i)}varl,c,m=n(),u={hide:m.hide,cancel:m.cancel,show:i,destroy:r};returnl=s.methods||[],c=a(s.optionsFactory,{}),t.forEach(d,function(e,t){u[t]=e}),t.forEach(s.presets,function(e,n){functiono(e){this._options=t.extend({},i,e)}vari=a(e.optionsFactory,{}),r=(e.methods||[]).concat(l);if(t.extend(i,{$type:n}),t.forEach(r,function(e){o.prototype[e]=function(t){returnthis._options[e]=t,this}}),e.argOption){vard="show"+n.charAt(0).toUpperCase()+n.slice(1);u[d]=function(e){vart=u[n](e);returnu.show(t)}}u[n]=function(n){returnarguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(newo)[e.argOption](n):newo(n)}}),u}r.$inject=["$$interimElement","$injector"];vara=["onHide","onShow","onRemove"],d={},s={presets:{}},l={setDefaults:n,addPreset:i,addMethod:o,$get:r};returnl.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),l}functiono(e,o,i,r,a,d,s,l,c,m,u){returnfunction(){functionp(e){e=e||{};vart=newv(e||{}),n=e.multiple?o.resolve():o.all(C);e.multiple||(n=n.then(function(){vare=y.concat(M.map(E.cancel));returno.all(e)}));vari=n.then(function(){returnt.show()["catch"](function(e){returne})["finally"](function(){C.splice(C.indexOf(i),1),M.push(t)})});returnC.push(i),t.deferred.promise["catch"](function(e){returneinstanceofError&&u(e),e}),t.deferred.promise}functionh(e,t){functioni(n){varo=n.remove(e,!1,t||{})["catch"](function(e){returne})["finally"](function(){y.splice(y.indexOf(o),1)});returnM.splice(M.indexOf(n),1),y.push(o),n.deferred.promise}returnt=t||{},t.closeAll?o.all(M.slice().reverse().map(i)):t.closeTo!==n?o.all(M.slice(t.closeTo).map(i)):i(M[M.length-1])}functionf(e,n){vari=M.pop();if(!i)returno.when(e);varr=i.remove(e,!0,n||{})["catch"](function(e){returne})["finally"](function(){y.splice(y.indexOf(r),1)});returny.push(r),i.deferred.promise["catch"](t.noop)}functiong(e){returnfunction(){vart=arguments;returnM.length?e.apply(E,t):C.length?C[0]["finally"](function(){returne.apply(E,t)}):o.when("No interim elements currently showing up.")}}functionb(e){varn=e?null:M.shift(),i=t.element(e).length&&t.element(e)[0].parentNode;if(i){varr=M.filter(function(e){returne.options.element[0]===i});r.length&&(n=r[0],M.splice(M.indexOf(n),1))}returnn?n.remove($,!1,{$destroy:!0}):o.when($)}functionv(m){functionu(){returno(function(e,t){functionn(e){y.deferred.reject(e),t(e)}m.onCompiling&&m.onCompiling(m),f(m).then(function(t){M=g(t,m),m.cleanupElement=t.cleanup,T=$(M,m,t.controller).then(e,n)})["catch"](n)})}functionp(e,n,i){functionr(e){y.deferred.resolve(e)}functiona(e){y.deferred.reject(e)}returnM?(m=t.extend(m||{},i||{}),m.cancelAutoHide&&m.cancelAutoHide(),m.element.triggerHandler("$mdInterimElementRemove"),m.$destroy===!0?C(m.element,m).then(function(){n&&a(e)||r(e)}):(o.when(T)["finally"](function(){C(m.element,m).then(function(){n?a(e):r(e)},a)}),y.deferred.promise)):o.when(!1)}functionh(e){returne=e||{},e.template
returne&&e.trim().length}).map(function(e){returne.trim()+"}"});y.forEach(function(e){k[e]=""}),d.forEach(function(e){for(vart,n=0;t=y[n];n++)if(e.indexOf(".md-"+t)>-1)returnk[t]+=e;for(n=0;t=y[n];n++)if(e.indexOf(t)>-1)returnk[t]+=e;returnk[M]+=e}),_.generateOnDemand||e.forEach(n.THEMES,function(e){h[e.name]||"default"!==n.defaultTheme()&&"default"===e.name||l(e,e.name,_.nonce)})}}functionl(e,t,n){varo=document.head,i=o?o.firstElementChild:null;h[t]||(y.forEach(function(t){for(varr=d(e,t,k[t]);r.length;){vara=r.shift();if(a){vars=document.createElement("style");s.setAttribute("md-theme-style",""),n&&s.setAttribute("nonce",n),s.appendChild(document.createTextNode(a)),o.insertBefore(s,i)}}}),h[e.name]=!0)}functionc(e,t){if(!p[(e.colors[t]||{}).name])thrownewError("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(p).join(", ")))}functionm(t){if(e.isArray(t)&&3==t.length)returnt;if(/^rgb/.test(t))returnt.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return3==t?parseFloat(e,10):parseInt(e,10)});if("#"==t.charAt(0)&&(t=t.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(t)){varn=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return1===n&&(o+=o,i+=i,r+=r),[parseInt(o,16),parseInt(i,16),parseInt(r,16)]}}functionu(t,n){returnt?(4==t.length&&(t=e.copy(t),n?t.pop():n=t.pop()),n&&("number"==typeofn||"string"==typeofn&&n.length)?"rgba("+t.join(",")+","+n+")":"rgb("+t.join(",")+")"):"rgb('0,0,0')"}t.$inject=["$mdThemingProvider"],i.$inject=["$mdTheming","$interpolate","$parse","$mdUtil","$q","$log"],a.$inject=["$mdTheming"],o.$inject=["$mdColorPalette","$$mdMetaProvider"],s.$inject=["$injector","$mdTheming"],e.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",i).directive("mdThemable",a).directive("mdThemesDisabled",r).provider("$mdTheming",o).config(t).run(s);varp,h={},f={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},g={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},b="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",v="",E=m("rgba(0,0,0,0.87)"),$=m("rgba(255,255,255,0.87)"),C=m("rgb(255,255,255)"),y=["primary","accent","warn","background"],M="primary",T={accent:{"default":"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{"default":"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},A={background:{"default":"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};y.forEach(function(e){vart={"default":"500","hue-1":"300","hue-2":"800","hue-3":"A100"};T[e]||(T[e]=t),A[e]||(A[e]=t)});varw=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],_={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null},k={}}(e.angular)}(),function(){functionn(n,o,i,r,a){vard;returnd={translate3d:function(e,t,n,o){functioni(n){returna(e,{to:n||t,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}returna(e,{from:t,to:n,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then(function(){returni})},waitTransitionEnd:function(t,n){vara=3e3;returno(function(o,d){functions(e){e&&e.target!==t[0]||(e&&i.cancel(c),t.off(r.CSS.TRANSITIONEND,s),o())}functionl(n){returnn=n||e.getComputedStyle(t[0]),"0s"==n.transitionDuration||!n.transition&&!n.transitionProperty}n=n||{},l(n.cachedTransitionStyles)&&(a=0);varc=i(s,n.timeout||a);t.on(r.CSS.TRANSITIONEND,s)})},calculateTransformValues:function(e,t){functionn(){vart=e?e.parent():null,n=t?t.parent():null;returnn?d.clientRect(n):null}varo=t.element,i=t.bounds;if(o||i){varr=o?d.clientRect(o)||n():d.copyRect(i),a=d.copyRect(e[0].getBoundingClientRect()),s=d.centerPointFor(a),l=d.centerPointFor(r);return{centerX:l.x-s.x,centerY:l.y-s.y,scaleX:Math.round(100*Math.min(.5,r.width/a.width))/100,scaleY:Math.round(100*Math.min(.5,r.height
vart=this._$mdConstant.KEY_CODE,n=this._getTabs(),o=this.getFocusedTab();if(o){vari=n.indexOf(o);switch(e.keyCode){caset.UP_ARROW:caset.LEFT_ARROW:i>0&&this._moveFocus(o,n[i-1]);break;caset.DOWN_ARROW:caset.RIGHT_ARROW:i<n.length-1&&this._moveFocus(o,n[i+1]);break;caset.SPACE:caset.ENTER:this._$timeout(function(){o.getButtonEl().click()})}}},r.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},r.prototype.getName=function(){returnthis.name},r.prototype.getButtonEl=function(){returnthis._$element[0].querySelector("._md-nav-button")},r.prototype.setSelected=function(e){this._selected=e},r.prototype.isSelected=function(){returnthis._selected},r.prototype.setFocused=function(e){this._focused=e,e&&this.getButtonEl().focus()},r.prototype.hasFocus=function(){returnthis._focused}}(),function(){functione(){return{definePreset:o,getAllPresets:i,clearPresets:r,$get:a()}}functiono(e,t){if(!e||!t)thrownewError("mdPanelProvider: The panel preset definition is malformed. The name and preset object are required.");if(b.hasOwnProperty(e))thrownewError("mdPanelProvider: The panel preset you have requested has already been defined.");deletet.id,deletet.position,deletet.animation,b[e]=t}functioni(){returnt.copy(b)}functionr(){b={}}functiona(){return["$rootElement","$rootScope","$injector","$window",function(e,t,n,o){returnnewd(b,e,t,n,o)}]}functiond(e,n,o,i,r){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:t.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:h},this._config={},this._presets=e,this._$rootElement=n,this._$rootScope=o,this._$injector=i,this._$window=r,this._$mdUtil=this._$injector.get("$mdUtil"),this._trackedPanels={},this._groups=Object.create(null),this.animation=c.animation,this.xPosition=l.xPosition,this.yPosition=l.yPosition,this.interceptorTypes=s.interceptorTypes,this.closeReasons=s.closeReasons,this.absPosition=l.absPosition}functions(e,t){this._$q=t.get("$q"),this._$mdCompiler=t.get("$mdCompiler"),this._$mdConstant=t.get("$mdConstant"),this._$mdUtil=t.get("$mdUtil"),this._$mdTheming=t.get("$mdTheming"),this._$rootScope=t.get("$rootScope"),this._$animate=t.get("$animate"),this._$mdPanel=t.get("$mdPanel"),this._$log=t.get("$log"),this._$window=t.get("$window"),this._$$rAF=t.get("$$rAF"),this.id=e.id,this.config=e,this.panelContainer,this.panelEl,this.isAttached=!1,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null,this._interceptors=Object.create(null),this._compilerCleanup=null,this._restoreCache={styles:"",classes:""}}functionl(e){this._$window=e.get("$window"),this._isRTL="rtl"===e.get("$mdUtil").bidi(),this._$mdConstant=e.get("$mdConstant"),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}functionc(e){this._$mdUtil=e.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass="",this._openDuration,this._closeDuration,this._rawDuration}functionm(e){varn=t.isString(e)?document.querySelector(e):e;returnt.element(n)}functionu(e,t){varn=getComputedStyle(e[0]||e)[t],o=n.indexOf("("),i=n.lastIndexOf(")"),r={x:0,y:0};if(o>-1&&i>-1){vara=n.substring(o+1,i).split(", ").slice(-2);r.x=parseInt(a[0]),r.y=parseInt(a[1])}returnr}functionp(e){returnt.isNumber(e)?e+"px":e}d.$inject=["presets","$rootElement","$rootScope","$injector","$window"],t.module("material.components.panel",["material.core","material.components.backdrop"]).provider("$mdPanel",e);varh=80,f="_md-panel-hidden",g=t.element('<div class="_md-panel-focus-trap" tabindex="0"></div>'),b={};d.prototype.create=function(e,n){if("string"==typeofe?e=this._getPresetByName(e):"object"!=typeofe||!t.isUndefined(n)&&n||(n=e,e={}),e=e||{},n=n||{},t.isDefined(n.id)&&this._trackedPanels[n.id]){varo=
return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:o}}e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],n.$inject=["$mdAria","$mdUtil","$mdTheming"],t.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",n)}(),function(){functiono(e,o,i,r,a,d,s,c){functionm(c,m){varu=t.element("<md-select-value><span></span></md-select-value>");u.append('<span class="md-select-icon" aria-hidden="true"></span>'),u.addClass("md-select-value"),u[0].hasAttribute("id")||u.attr("id","select_value_label_"+o.nextUid());varp=c.find("md-content");if(p.length||c.append(t.element("<md-content>").append(c.contents())),p.attr("role","presentation"),m.mdOnOpen&&(c.find("md-content").prepend(t.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),c.find("md-option").attr("ng-show","$$loadingAsyncDone")),m.name){varh=t.element('<select class="md-visually-hidden"></select>');h.attr({name:m.name,"aria-hidden":"true",tabindex:"-1"});varf=c.find("md-option");t.forEach(f,function(e){varn=t.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?n.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&n.attr("value",e.getAttribute("value")),h.append(n)}),h.append('<option ng-value="'+m.ngModel+'" selected></option>'),c.parent().append(h)}varg=o.parseAttributeBoolean(m.multiple),b=g?"multiple":"",v='<div class="md-select-menu-container" aria-hidden="true" role="presentation"><md-select-menu role="presentation" {0}>{1}</md-select-menu></div>';returnv=o.supplant(v,[b,c.html()]),c.empty().append(u),c.append(v),m.tabindex||m.$set("tabindex",0),function(c,m,u,p){functionh(){vare=m.attr("aria-label")||m.attr("placeholder");!e&&A&&A.label&&(e=A.label.text()),M=e,a.expect(m,"aria-label",e)}functionf(){I&&(O=O||I.find("md-select-menu").controller("mdSelectMenu"),w.setLabelText(O.selectedLabels()))}functionb(){if(M){vare=O.selectedLabels({mode:"aria"});m.attr("aria-label",e.length?M+": "+e:M)}}functionv(){A&&A.setHasValue(O.selectedLabels().length>0||(m[0].validity||{}).badInput)}functionE(){if(I=t.element(m[0].querySelector(".md-select-menu-container")),H=c,u.mdContainerClass){vare=I[0].getAttribute("class")+" "+u.mdContainerClass;I[0].setAttribute("class",e)}O=I.find("md-select-menu").controller("mdSelectMenu"),O.init(_,u.ngModel),m.on("$destroy",function(){I.remove()})}function$(e){if(i.isNavigationKey(e))e.preventDefault(),C(e);elseif(l(e,i)){e.preventDefault();varn=O.optNodeForKeyboardSearch(e);if(!n||n.hasAttribute("disabled"))return;varo=t.element(n).controller("mdOption");O.isMultiple||O.deselect(Object.keys(O.selected)[0]),O.select(o.hashKey,o.value),O.refreshViewValue()}}functionC(){H._mdSelectIsOpen=!0,m.attr("aria-expanded","true"),e.show({scope:H,preserveScope:!0,skipCompile:!0,element:I,target:m[0],selectCtrl:w,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!u.mdOnOpen&&(c.$eval(u.mdOnOpen)||!0)})["finally"](function(){H._mdSelectIsOpen=!1,m.focus(),m.attr("aria-expanded","false"),_.$setTouched()})}vary,M,T=!0,A=p[0],w=p[1],_=p[2],k=p[3],x=m.find("md-select-value"),N=t.isDefined(u.readonly),S=o.parseAttributeBoolean(u.mdNoAsterisk);if(S&&m.addClass("md-no-asterisk"),A){varD=A.isErrorGetter||function(){return_.$invalid&&(_.$touched||k&&k.$submitted)};if(A.input&&m.find("md-select-header").find("input")[0]!==A.input[0])thrownewError("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");A.input=m,A.label||a.expect(m,"aria-label",m.attr("placeholder")),c.$watch(D,A.setInvalid)}varI,H,O;E(),r(m),k&&t.isDefined(u.multiple)&&o.nextTick(function(){vare=_.$modelValue||_.$viewValue;e&&k.$setPristine()});varP=_.$render;_.$render=function(){P(),f(),b(),v()},u.$observe("placeholder",_.$render),A&&A.label&&u.$observe("required",
he(),ue(!1,He.Selected);break;casel.KEY_CODE.TAB:if(D(),ye.hidden||ye.loading||ye.index<0||ye.matches.length<1)return;de(ye.index);break;casel.KEY_CODE.ENTER:if(ye.hidden||ye.loading||ye.index<0||ye.matches.length<1)return;if(ne())return;t.stopPropagation(),t.preventDefault(),de(ye.index);break;casel.KEY_CODE.ESCAPE:if(t.preventDefault(),!Z())return;t.stopPropagation(),le(),e.searchText&&J("clear")&&ce(),ye.hidden=!0,J("blur")&&j(!0)}}functionW(){returnt.isNumber(e.minLength)?e.minLength:1}functionV(n){functiono(t){returnt&&e.itemText?e.itemText(Y(t)):null}returnf.when(o(n)||n).then(function(e){returne&&!t.isString(e)&&g.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e})}functionY(e){if(!e)returnn;vart={};returnye.itemName&&(t[ye.itemName]=e),t}functionK(){returne.autoselect?0:-1}functionG(e){ye.loading!=e&&(ye.loading=e),ye.hidden=X()}functionX(){return!ee()}functionQ(){return!(ye.loading&&!te())&&(!ne()&&!!xe)}functionZ(){returnJ("blur")||!ye.hidden||ye.loading||J("clear")&&e.searchText}functionJ(t){return!e.escapeOptions||e.escapeOptions.toLowerCase().indexOf(t)!==-1}functionee(){return!ye.isReadonly&&(!!Q()&&(re()&&te()||be()))}functionte(){return!!ye.matches.length}functionne(){return!!ye.scope.selectedItem}functionoe(){returnye.loading&&!ne()}functionie(){returnV(ye.matches[ye.index])}functionre(){return(e.searchText||"").length>=W()}functionae(e,t,n){Object.defineProperty(ye,e,{get:function(){returnn},set:function(e){varo=n;n=e,t(e,o)}})}functionde(t){s.nextTick(function(){V(ye.matches[t]).then(function(e){vart=Ae.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=ye.matches[t],G(!1)})},!1)}functionse(){le(),ce()}functionle(){ye.index=0,ye.matches=[]}functionce(){G(!0),e.searchText="";vart=document.createEvent("CustomEvent");t.initCustomEvent("change",!0,!0,{value:""}),Ae.input.dispatchEvent(t),Ae.input.blur(),e.searchText="",Ae.input.focus()}functionme(n){functiono(t){t&&(t=f.when(t),Ne++,G(!0),s.nextTick(function(){t.then(i)["finally"](function(){0===--Ne&&G(!1)})},!0,e))}functioni(t){we[a]=t,(n||"")===(e.searchText||"")&&Ee(t)}varr=e.$parent.$eval(Te),a=n.toLowerCase(),d=t.isArray(r),l=!!r.then;d?i(r):l&&o(r)}functionue(e,t){varn=e?"polite":"assertive",o=[];t&He.Selected&&ye.index!==-1&&o.push(ie()),t&He.Count&&o.push(f.resolve(pe())),f.all(o).then(function(e){b.announce(e.join(" "),n)})}functionpe(){switch(ye.matches.length){case0:return"There are no matches available.";case1:return"There is 1 match available.";default:return"There are "+ye.matches.length+" matches available."}}functionhe(){if(Ae.li[0]){vare=Ae.li[0].offsetHeight,t=e*ye.index,n=t+e,o=Ae.scroller.clientHeight,i=Ae.scroller.scrollTop;t<i?ge(t):n>i+o&&ge(n-o)}}functionfe(){return0!==Ne}functionge(e){Ae.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}functionbe(){vare=(ye.scope.searchText||"").length;returnye.hasNotFound&&!te()&&(!ye.loading||fe())&&e>=W()&&(xe||_e)&&!ne()}functionve(){vart=e.searchText||"",n=t.toLowerCase();!e.noCache&&we[n]?Ee(we[n]):me(t),ye.hidden=X()}functionEe(t){ye.matches=t,ye.hidden=X(),ye.loading&&G(!1),e.selectOnMatch&&$e(),$(),ue(!0,He.Count)}function$e(){vart=e.searchText,n=ye.matches,o=n[0];1===n.length&&V(o).then(function(n){varo=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&de(0)})}functionCe(t,n){h[t]&&e.$parent.$eval(h[t],n||{})}varye=this,Me=e.itemsExpr.split(/ in /i),Te=Me[1],Ae=null,we={},_e=!1,ke=[],xe=!1,Ne=0,Se=null,De=null,Ie=s.debounce(A);ae("hidden",x,!0),ye.scope=e,ye.parent=e.$parent,ye.itemName=Me[0],ye.matches=[],ye.loading=!1,ye.hidden=!0,ye.index=null,ye.id=s.nextUid(),ye.isDisabled=null,ye.isRequired=null,ye.isReadonly=null,ye.hasNotFound=!1,ye.keydown=z,ye.blur=U,ye.focus=q,ye.clear=se,ye.select=de,ye.listEnter=S,ye.listLeave=D,ye.mouseUp=I,ye.getCurrentDisplayValue=ie,ye.registerSelectedItemWatcher=R,ye.unregisterSelectedItemWatcher=F,ye.notFoundVisible=be,ye.loadingIsVisible