/*!
 * Angular Material Design
 * https://github.com/angular/material
 * @license MIT
 * v0.11.0-master-f04f094
 */
function MdSwitch(e,t,a,n,i,r){function o(e,o){var c=d.compile(e,o);return e.addClass("md-dragging"),function(e,o,d,l){function s(t){v&&v(e)||(t.stopPropagation(),o.addClass("md-dragging"),f={width:p.prop("offsetWidth")},o.removeClass("transition"))}function m(e){if(f){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/f.width,n=l.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),p.css(a.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),f.translate=n}}function g(e){if(f){e.stopPropagation(),o.removeClass("md-dragging"),p.css(a.CSS.TRANSFORM,"");var t=l.$viewValue?f.translate>.5:f.translate<.5;t&&u(!l.$viewValue),f=null}}function u(t){e.$apply(function(){l.$setViewValue(t),l.$render()})}l=l||t.fakeNgModel();var v=null;null!=d.disabled?v=function(){return!0}:d.ngDisabled&&(v=n(d.ngDisabled));var p=angular.element(o[0].querySelector(".md-thumb-container")),h=angular.element(o[0].querySelector(".md-container"));i(function(){o.removeClass("md-dragging")}),c(e,o,d,l),v&&e.$watch(v,function(e){o.attr("tabindex",e?-1:0)}),r.register(h,"drag"),h.on("$md.dragstart",s).on("$md.drag",m).on("$md.dragend",g);var f}}var d=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:o}}goog.provide("ng.material.components.switch"),goog.require("ng.material.components.checkbox"),goog.require("ng.material.core"),angular.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",MdSwitch),MdSwitch.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture"],ng.material.components["switch"]=angular.module("material.components.switch");