')}}}function Me(t,i,a,d,n,o){var r,s=this,e=0;function l(e){"click"==e.type&&function(e){!function(e){return d.getClosest(e,"md-fab-trigger")}(e.target)||s.toggle();!function(e){return d.getClosest(e,"md-fab-actions")}(e.target)||s.close()}(e),"focusout"!=e.type||r||(r=o(function(){s.close()},100,!1)),"focusin"==e.type&&r&&(o.cancel(r),r=null)}function c(){s.currentActionIndex=-1}function m(){0r)throw"md-grid-list: Tile at position "+t+" has a colspan ("+e.col+") that exceeds the column count ("+r+")";var n=0,o=0;for(;o-n",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(e,t,n,o){t.attr("role","listitem");var r=i.watchResponsiveAttributes(["md-colspan","md-rowspan"],n,be.bind(o,o.invalidateLayout));o.invalidateTiles(),e.$on("$destroy",function(){t[0].$$mdDestroyed=!0,r(),o.invalidateLayout()}),be.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(e,t){e!==t&&o.invalidateTiles()})}}}function ke(){return{template:"",transclude:!0}}function xe(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function Ne(m,u,p,h){var f=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(r,o){var e,i,t,n=r[0].querySelectorAll(".md-secondary"),a=r;if(r[0].setAttribute("role","listitem"),o.ngClick||o.ngDblclick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)s("button");else if(!r.hasClass("md-no-proxy")){for(var d=0;d')).append(r.contents()),r.addClass("md-proxy-focus");else{a=be.element('
');var t=be.element('');if(l(r[0],t[0]),!t.attr("aria-label")){t.attr("aria-label",m.getText(r));var n=a[0].querySelector(".md-list-item-inner");n&&n.setAttribute("aria-hidden","true")}r.hasClass("md-no-focus")&&t.addClass("md-no-focus"),a.prepend(t),a.children().eq(1).append(r.contents()),r.addClass("_md-button-wrap")}r[0].setAttribute("tabindex","-1"),r.append(a)}function l(t,n,e){var o=p.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","rel","target","ng-attr-ui-sref","ui-sref-opts","download"]);e&&(o=o.concat(p.prefixer(e))),be.forEach(o,function(e){t.hasAttribute(e)&&(n.setAttribute(e,t.getAttribute(e)),t.removeAttribute(e))})}function c(e){for(var t=e.attributes,n=0;n'),be.forEach(n,function(e){!function(e,t){if(e&&!function(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"===t||"BUTTON"===t}(e)&&e.hasAttribute("ng-click")){m.expect(e,"aria-label");var n=be.element('');l(e,n[0],["ng-if","ng-hide","ng-show"]),e.setAttribute("tabindex","-1"),n.append(e),e=n[0]}e&&(!c(e)||!o.ngClick&&function(e){return-1!==f.indexOf(e.nodeName.toLowerCase())}(e))&&be.element(e).removeClass("md-secondary"),r.addClass("md-with-secondary"),t.append(e)}(e,t)}),a.append(t),function(){for(var e,t=["md-switch","md-checkbox"],n=0;n or ")},a.$mdMenu={open:this.open,close:this.close}}function De(a){var d="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0],n=a.prefixer();n.hasAttribute(t,"ng-click")||(t=t.querySelector(n.buildSelector(["ng-click","ng-mouseenter"]))||t);var o="MD-BUTTON"===t.nodeName||"BUTTON"===t.nodeName;t&&o&&!t.hasAttribute("type")&&t.setAttribute("type","button");if(!t)throw Error(d+"Expected the menu to have a trigger element.");if(2!==e.children().length)throw Error(d+"Expected two children elements. The second element must have a `md-menu-content` element.");t&&t.setAttribute("aria-haspopup","true");var r=e[0].querySelectorAll("md-menu"),i=parseInt(e[0].getAttribute("md-nest-level"),10)||0;r&&be.forEach(a.nodesToArray(r),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",i+1)});return s}};function s(e,t,n,o){var r=o[0],i=!!o[1],a=o[1],d=be.element(''),s=t.children()[1];t.addClass("_md"),s.hasAttribute("role")||s.setAttribute("role","menu"),d.append(s),t.on("$destroy",function(){d.remove()}),t.append(d),d[0].style.display="none",r.init(d,{isInMenuBar:i,mdMenuBarCtrl:a})}}function Ie(e){t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate","$log"];var w=8;return e("$mdMenu").setDefaults({methods:["target"],options:t});function t(M,e,s,C,T,o,r,i,l,c){var A=M.prefixer(),m=M.dom.animator;return{parent:"body",onShow:function(a,n,d){(function(){if(!d.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");be.extend(d,{alreadyOpen:!1,isRemoved:!1,target:be.element(d.target),parent:be.element(d.parent),menuContentEl:be.element(n[0].querySelector("md-menu-content"))})})(),d.menuContentEl[0]?e.inherit(d.menuContentEl,d.target):c.warn("$mdMenu: Menu elements should always contain a `md-menu-content` element,otherwise interactivity features will not work properly.",n);return d.cleanupResizing=function(){var e=function(t,n){return r.throttle(function(){if(!d.isRemoved){var e=h(t,n);t.css(m.toCss(e))}})}(n,d);return T.addEventListener("resize",e),T.addEventListener("orientationchange",e),function(){T.removeEventListener("resize",e),T.removeEventListener("orientationchange",e)}}(),d.hideBackdrop=function(e,t,n){if(n.nestLevel)return be.noop;n.disableParentScroll&&!M.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=M.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1;n.hasBackdrop&&(n.backdrop=M.createBackdrop(e,"md-menu-backdrop md-click-catcher"),l.enter(n.backdrop,C[0].body));return function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll()}}(a,0,d),function(){return d.parent.append(n),n[0].style.display="",o(function(e){var t=h(n,d);n.removeClass("md-leave"),i(n,{addClass:"md-active",from:m.toCss(t),to:m.toCss({transform:""})}).start().then(e)})}().then(function(e){return d.alreadyOpen=!0,d.cleanupInteraction=function(){if(!d.menuContentEl[0])return be.noop;d.menuContentEl.on("keydown",r),d.menuContentEl[0].addEventListener("click",i,!0);var e=d.menuContentEl[0].querySelector(A.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!e)for(var t=d.menuContentEl[0].children.length,n=0;n'),s='';d.html(a),d.attr("tabindex","0"),be.isDefined(e.mdPreventMenuClose)&&d.attr("md-prevent-menu-close",e.mdPreventMenuClose),o.html(""),o.append(be.element(s)),o.append(d),o.addClass("md-indent").removeClass(i),l("role","checkbox"===r?"menuitemcheckbox":"menuitemradio",d),t="ng-disabled",n=c.prefixer(t),be.forEach(n,function(e){if(o[0].hasAttribute(e)){var t=o[0].getAttribute(e);d[0].setAttribute(e,t),o[0].removeAttribute(e)}})}return function(e,t,n,o){var r=o[0],i=o[1];r.init(i)};function l(e,t,n){(n=n||o)instanceof be.element&&(n=n[0]),n.hasAttribute(e)||n.setAttribute(e,t)}}}}function Re(i,a,d,s){return{restrict:"E",transclude:!0,controller:Fe,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'
").append(l)),a.setHasPlaceholder(n.mdPlaceholder),a.input=t,a.element.addClass(h).toggleClass(f,"calendar"!==n.mdHideIcons&&"all"!==n.mdHideIcons),a.label?s||n.$observe("required",function(e){a.label.toggleClass("md-required",!!e)}):u.expect(t,"aria-label",n.mdPlaceholder),e.$watch(a.isErrorGetter||function(){return r.$invalid&&(r.$touched||d&&d.$submitted)},a.setInvalid)}else if(d)var c=e.$watch(function(){return d.$submitted},function(e){e&&(i.updateErrorState(),c())})}}}t.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$filter","$timeout"],e.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria","inputDirective"],be.module("material.components.datepicker").directive("mdDatepicker",e);var a="md-datepicker-invalid",m="md-datepicker-open",h="_md-datepicker-floating-label",f="_md-datepicker-has-calendar-icon",s="_md-datepicker-has-triangle-icon",p=/ipad|iphone|ipod|android/i;function t(e,t,n,o,r,i,a,d,s,l,c,m){this.$window=o,this.dateUtil=s,this.$mdConstant=r,this.$mdUtil=a,this.$$rAF=l,this.$mdDateLocale=d,this.$timeout=m,this.documentElement=be.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=t[0].querySelector("input"),this.ngInputElement=be.element(this.inputElement),this.inputContainer=t[0].querySelector(".md-datepicker-input-container"),this.calendarPane=t[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=t[0].querySelector(".md-datepicker-button"),this.inputMask=be.element(t[0].querySelector(".md-datepicker-input-mask-opaque")),this.$element=t,this.$attrs=n,this.$scope=e,this.date=null,this.isFocused=!1,this.isDisabled=ge,this.setDisabled(t[0].disabled||be.isString(n.disabled)),this.isCalendarOpen=!1,this.openOnFocus=n.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPaneId="md-date-pane-"+a.nextUid(),this.bodyClickHandler=be.bind(this,this.handleBodyClick),this.windowEventName=p.test(navigator.userAgent||navigator.vendor||L.opera)?"orientationchange":"resize",this.windowEventHandler=a.debounce(be.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=be.bind(this,this.handleWindowBlur),this.ngDateFilter=c("date"),this.leftMargin=20,this.topMargin=null,n.tabindex?(this.ngInputElement.attr("tabindex",n.tabindex),n.$set("tabindex",null)):n.$set("tabindex","-1"),n.$set("aria-owns",this.calendarPaneId),i(t),i(be.element(this.calendarPane));var u=this;e.$on("$destroy",function(){u.detachCalendarPane()}),n.mdIsOpen&&e.$watch("ctrl.isOpen",function(e){e?u.openCalendarPane({target:u.inputElement}):u.closeCalendarPane()}),1===be.version.major&&be.version.minor<=4&&this.$onInit()}t.prototype.$onInit=function(){this.locale=this.dateLocale?be.extend({},this.$mdDateLocale,this.dateLocale):this.$mdDateLocale,this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners()},t.prototype.configureNgModel=function(e,t,n){this.ngModelCtrl=e,this.mdInputContainer=t,this.$attrs.$set("type","date"),n[0].link.pre(this.$scope,{on:be.noop,val:be.noop,0:{}},this.$attrs,[e]);var o=this;o.ngModelCtrl.$formatters.push(function(e){var t=be.isDefined(e)?e:null;if(!(e instanceof Date)&&(t=Date.parse(e),!isNaN(t)&&be.isNumber(t)&&(e=new Date(t)),e&&!(e instanceof Date)))throw Error("The ng-model for md-datepicker must be a Date instance or a value that can be parsed into a date. Currently the model is of type: "+typeof e);return o.onExternalChange(e),e}),e.$viewChangeListeners.unshift(be.bind(this,this.updateErrorState));var r=o.$mdUtil.getModelOption(e,"updateOn");r&&this.ngInputElement.on(r,be.bind(this.$element,this.$element.triggerHandler,r))},t.prototype.attachChangeListeners=function(){var n=this;n.$scope.$on("md-calendar-change",function(e,t){n.setModelValue(t),n.onExternalChange(t),n.closeCalendarPane()}),n.ngInputElement.on("input",be.bind(n,n.resizeInputElement));var e=be.isDefined(this.debounceInterval)?this.debounceInterval:500;n.ngInputElement.on("input",n.$mdUtil.debounce(n.handleInputEvent,e,n))},t.prototype.attachInteractionListeners=function(){var t=this,n=this.$scope,o=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(e){e.altKey&&e.keyCode===o.DOWN_ARROW&&(t.openCalendarPane(e),n.$digest())}),t.openOnFocus&&(t.ngInputElement.on("focus",be.bind(t,t.openCalendarPane)),t.ngInputElement.on("click",function(e){e.stopPropagation()}),t.ngInputElement.on("pointerdown",function(e){e.target&&e.target.setPointerCapture&&e.target.setPointerCapture(e.pointerId)}),be.element(t.$window).on("blur",t.windowBlurHandler),n.$on("$destroy",function(){be.element(t.$window).off("blur",t.windowBlurHandler)})),n.$on("md-calendar-close",function(){t.closeCalendarPane()})},t.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},t.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},t.prototype.updateErrorState=function(e){var t=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(t)){if(t=this.dateUtil.createDateAtMidnight(t),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",n<=t)}if(this.dateUtil.isValidDate(this.maxDate)){var o=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",t<=o)}be.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(t)),be.isFunction(this.monthFilter)&&this.ngModelCtrl.$setValidity("filtered",this.monthFilter(t))}else this.ngModelCtrl.$setValidity("valid",null==t);var r=this.inputElement.value,i=this.locale.parseDate(r);!this.isInputValid(r,i)&&this.ngModelCtrl.$valid&&this.ngModelCtrl.$setValidity("valid",null==t),be.element(this.inputContainer).toggleClass(a,this.ngModelCtrl.$invalid&&(this.ngModelCtrl.$touched||this.ngModelCtrl.$submitted))},t.prototype.isInputValid=function(e,t){return""===e||this.dateUtil.isValidDate(t)&&this.locale.isDateComplete(e)&&this.isDateEnabled(t)},t.prototype.clearErrorState=function(){this.inputContainer.classList.remove(a),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},t.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+3},t.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.locale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t),this.isInputValid(e,t)&&(this.setModelValue(t),this.date=t),this.updateErrorState(t)},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!be.isFunction(this.dateFilter)||this.dateFilter(e))&&(!be.isFunction(this.monthFilter)||this.monthFilter(e))},t.prototype.attachCalendarPane=function(){var e=this.calendarPane,t=document.body;e.style.transform="",this.$element.addClass(m),this.mdInputContainer&&this.mdInputContainer.element.addClass(m),be.element(t).addClass("md-datepicker-is-showing");var n=this.inputContainer.getBoundingClientRect(),o=t.getBoundingClientRect();(!this.topMargin||this.topMargin<0)&&(this.topMargin=(this.inputMask.parent().prop("clientHeight")-this.ngInputElement.prop("clientHeight"))/2);var r=n.top-o.top-this.topMargin,i=n.left-o.left-this.leftMargin,a=o.top<0&&0===document.body.scrollTop?-o.top:document.body.scrollTop,d=o.left<0&&0===document.body.scrollLeft?-o.left:document.body.scrollLeft,s=a+this.$window.innerHeight,l=d+this.$window.innerWidth;if(this.inputMask.css({position:"absolute",left:this.leftMargin+"px",top:this.topMargin+"px",width:n.width-1+"px",height:n.height-2+"px"}),l