/*!
 * Angular Material Design
 * https://github.com/angular/material
 * @license MIT
 * v1.1.0-rc.5-master-8dcdf82
 */
!function(e,r,o){"use strict";!function(){function e(e,o,t){function n(e,r){try{r&&e.css(u(r))}catch(o){t.error(o.message)}}function s(e){var r=c(e);return i(r)}function i(r,t){t=t||!1;var n=e.PALETTES[r.palette][r.hue];return n=t?n.contrast:n.value,o.supplant("rgba({0}, {1}, {2}, {3})",[n[0],n[1],n[2],n[3]||r.opacity])}function u(e){var o={},t=e.hasOwnProperty("color");return r.forEach(e,function(e,r){var n=c(e),a=r.indexOf("background")>-1;o[r]=i(n),a&&!t&&(o.color=i(n,!0))}),o}function l(o){return r.isDefined(e.THEMES[o.split("-")[0]])}function c(o){var t=o.split("-"),n=r.isDefined(e.THEMES[t[0]]),a=n?t.splice(0,1)[0]:e.defaultTheme();return{theme:a,palette:h(t,a),hue:m(t,a),opacity:t[2]||1}}function h(r,t){var n=r.length>1&&a.indexOf(r[1])!==-1,s=r[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(s=r[0]+"-"+r.splice(1,1)),a.indexOf(s)===-1){var i=e.THEMES[t].colors[s];if(!i)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:s}));s=i.name}return s}function m(r,t){var n=e.THEMES[t].colors;if("hue"===r[1]){var a=parseInt(r.splice(2,1)[0],10);if(a<1||a>3)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:a}));if(r[1]="hue-"+a,!(r[0]in n))throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:r[0]}));return n[r[0]].hues[r[1]]}return r[1]||n[r[0]in n?r[0]:"primary"].hues["default"]}return a=a||Object.keys(e.PALETTES),{applyThemeColors:n,getThemeColor:s,hasTheme:l}}function t(e,o,t,a){return{restrict:"A",require:["^?mdTheme"],compile:function(s,i){function u(){var e=i.mdColors,t=e.indexOf("::")>-1,a=!!t||n.test(i.mdColors);i.mdColors=e.replace("::","");var s=r.isDefined(i.mdColorsWatch);return!t&&!a&&(!s||o.parseAttributeBoolean(i.mdColorsWatch))}var l=u();return function(o,n,s,i){var u=i[0],c={},h=function(r){"string"!=typeof r&&(r=""),s.mdColors||(s.mdColors="{}");var t=a(s.mdColors)(o);return u&&Object.keys(t).forEach(function(o){var n=t[o];e.hasTheme(n)||(t[o]=(r||u.$mdTheme)+"-"+n)}),m(t),t},m=function(e){if(!r.equals(e,c)){var o=Object.keys(c);c.background&&!o.color&&o.push("color"),o.forEach(function(e){n.css(e,"")})}c=e},d=r.noop;u&&(d=u.registerChanges(function(r){e.applyThemeColors(n,h(r))})),o.$on("$destroy",function(){d()});try{l?o.$watch(h,r.bind(this,e.applyThemeColors,n),!0):e.applyThemeColors(n,h())}catch(f){t.error(f.message)}}}}}var n=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,a=o;r.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e),e.$inject=["$mdTheming","$mdUtil","$log"],t.$inject=["$mdColors","$mdUtil","$log","$parse"]}()}(window,window.angular);