/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.2-master-a9ba340 */ !function(e,t,n){"use strict";function i(e,n,i,a,d,c){function o(o,r){function s(o,r,s,l){function u(e,t,n){s[e]&&o.$watch(s[e],function(e){n[e]&&r.attr(t,n[e])})}function m(e){var t=e.which||e.keyCode;t!==i.KEY_CODE.SPACE&&t!==i.KEY_CODE.ENTER||(e.preventDefault(),r.addClass("md-focused"),f(e))}function f(e){r[0].hasAttribute("disabled")||o.skipToggle||o.$apply(function(){var t=s.ngChecked?s.checked:!k.$viewValue;k.$setViewValue(t,e&&e.type),k.$render()})}function p(){r.toggleClass("md-checked",!!k.$viewValue&&!h)}function $(e){h=e!==!1,h&&r.attr("aria-checked","mixed"),r.toggleClass("md-indeterminate",h)}var h,b=l[0],k=l[1]||d.fakeNgModel(),v=l[2];if(b){var g=b.isErrorGetter||function(){return k.$invalid&&(k.$touched||v&&v.$submitted)};b.input=r,o.$watch(g,b.setInvalid)}a(r),r.children().on("focus",function(){r.focus()}),d.parseAttributeBoolean(s.mdIndeterminate)&&($(),o.$watch(s.mdIndeterminate,$)),s.ngChecked&&o.$watch(o.$eval.bind(o,s.ngChecked),function(e){k.$setViewValue(e),k.$render()}),u("ngDisabled","tabindex",{"true":"-1","false":s.tabindex}),n.expectWithText(r,"aria-label"),e.link.pre(o,{on:t.noop,0:{}},s,[k]),r.on("click",f).on("keypress",m).on("focus",function(){"keyboard"===c.getLastInteractionType()&&r.addClass("md-focused")}).on("blur",function(){r.removeClass("md-focused")}),k.$render=p}return r.$set("tabindex",r.tabindex||"0"),r.$set("type","checkbox"),r.$set("role",r.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:s}}return e=e[0],{restrict:"E",transclude:!0,require:["^?mdInputContainer","?ngModel","?^form"],priority:i.BEFORE_NG_ARIA,template:'
',compile:o}}i.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$mdInteraction"],t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",i)}(window,window.angular);