/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.2-master-a9ba340 */ !function(e,n,t){"use strict";function i(e,n){function t(n){var t=n[0].querySelector(a),i=n[0].querySelector(o);return t&&n.addClass("md-icon-left"),i&&n.addClass("md-icon-right"),function(n,t){e(t)}}function i(e,t,i,r){var a=this;a.isErrorGetter=i.mdIsError&&n(i.mdIsError),a.delegateClick=function(){a.input.focus()},a.element=t,a.setFocused=function(e){t.toggleClass("md-input-focused",!!e)},a.setHasValue=function(e){t.toggleClass("md-input-has-value",!!e)},a.setHasPlaceholder=function(e){t.toggleClass("md-input-has-placeholder",!!e)},a.setInvalid=function(e){e?r.addClass(t,"md-input-invalid"):r.removeClass(t,"md-input-invalid")},e.$watch(function(){return a.label&&a.input},function(e){e&&!a.label.attr("for")&&a.label.attr("for",a.input.attr("id"))})}i.$inject=["$scope","$element","$attrs","$animate"];var r=["INPUT","TEXTAREA","SELECT","MD-SELECT"],a=r.reduce(function(e,n){return e.concat(["md-icon ~ "+n,".md-icon ~ "+n])},[]).join(","),o=r.reduce(function(e,n){return e.concat([n+" ~ md-icon",n+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:t,controller:i}}function r(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,n,t,i){!i||t.mdNoFloat||n.hasClass("md-container-ignore")||(i.label=n,e.$on("$destroy",function(){i.label=null}))}}}function a(e,t,i,r,a){function o(o,s,u,l){function d(e){return p.setHasValue(!v.$isEmpty(e)),e}function c(){p.label&&u.$observe("required",function(e){p.label.toggleClass("md-required",e&&!C)})}function m(){p.setHasValue(s.val().length>0||(s[0].validity||{}).badInput)}function f(){function i(){s.attr("rows",1).css("height","auto").addClass("md-no-flex");var e=l();if(!w){var n=s[0].style.padding||"";w=s.css("padding",0).prop("offsetHeight"),s[0].style.padding=n}if(h&&w&&(e=Math.max(e,w*h)),$&&w){var t=w*$;t-1&&v.$formatters.splice(e,1)}}function m(){function e(e){e.preventDefault(),d=!0,m=e.clientY,f=parseFloat(s.css("height"))||s.prop("offsetHeight")}function t(e){d&&(e.preventDefault(),c(),g.addClass("md-input-resized"))}function i(e){d&&s.css("height",f+e.pointer.distanceY+"px")}function r(e){d&&(d=!1,g.removeClass("md-input-resized"))}if(!u.hasOwnProperty("mdNoResize")){var l=n.element('
'),d=!1,m=null,f=0,g=p.element,v=a.register(l,"drag",{horizontal:!1});s.wrap('
').after(l),l.on("mousedown",e),g.on("$md.dragstart",t).on("$md.drag",i).on("$md.dragend",r),o.$on("$destroy",function(){l.off("mousedown",e).remove(),g.off("$md.dragstart",t).off("$md.drag",i).off("$md.dragend",r),v(),l=null,g=null,v=null})}}var f=!u.hasOwnProperty("mdNoAutogrow");if(m(),f){var h=u.hasOwnProperty("rows")?parseInt(u.rows):NaN,$=u.hasOwnProperty("maxRows")?parseInt(u.maxRows):NaN,C=o.$on("md-resize-textarea",i),w=null,y=s[0];if(r(function(){e.nextTick(i)},10,!1),s.on("input",i),g&&v.$formatters.push(d),h||s.attr("rows",1),n.element(t).on("resize",i),o.$on("$destroy",c),u.hasOwnProperty("mdDetectHidden")){var x=function(){var e=!1;return function(){var n=0===y.offsetHeight;n===!1&&e===!0&&i(),e=n}}();o.$watch(function(){return e.nextTick(x,!1),!0})}}}var p=l[0],g=!!l[1],v=l[1]||e.fakeNgModel(),h=l[2],$=n.isDefined(u.readonly),C=e.parseAttributeBoolean(u.mdNoAsterisk),w=s[0].tagName.toLowerCase();if(p){if("hidden"===u.type)return void s.attr("aria-hidden","true");if(p.input){if(p.input[0].contains(s[0]))return;throw new Error(" can only have *one* ,