text: (function(e,t){function n(e){var t={scope:{selectedTemplate:"=",selectedTemplateName:"=",dateStart:"=?",dateEnd:"=?",firstDayOfWeek:"=?",showTemplate:"=?",mdOnSelect:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",maxRange:"=?",onePanel:"=?",isDisabledDate:"&?",format:"=?"},template:'<div class="md-date-range-picker md-whiteframe-1dp" ng-class="{\'md-date-range-picker__one-panel\':onePanel}"><div layout="column"><div layout="row" layout-margin><div class="md-date-range-picker__calendar-wrapper"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeMonth" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeYear" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center" class="hide-gt-sm show-sm show-xs"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="!onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" ng-disabled="true" aria-hidden="true" class="md-icon-button md-button"><md-icon></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date),\'md-date-range-picker__calendar__start\':isSelectedStartDate(date),\'md-date-range-picker__calendar__end\':isSelectedEndDate(date),\'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date),\'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date})}" event-key="date1" event-param="{{$index}}"><span event-key="date1" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div><div ng-show="!onePanel" class="md-date-range-picker__calendar-wrapper hide-sm hide-xs show-gt-sm"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center" style="visibility: hidden"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeMonth2" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeYear2" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0" ng-if="!onePanel"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates2" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date), \'md-date-range-picker__calendar__start\':isSelectedStartDate(date), \'md-date-range-picker__calendar__end\':isSelectedEndDate(date), \'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date, true), \'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date}) }" event-key="date2" event-param="{{$index}}"><span event-key="date2" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div></div><div class="md-date-range-picker__templates" ng-if="showTemplate"><div ng-if="!onePanel && !maxRange" class="hide-xs hide-sm show-gt-sm" layout="row" layout-align="center center" layout-wrap><div ng-repeat="(tmpltKey,tmpltName) in selectionTemplate" class="md-button" aria-label="{{::tmpltName}}" ng-class="selectedTemplate === tmpltKey ? \'md-primary md-raised\' : \'\'" event-key="{{tmpltKey}}" ng-bind="::tmpltName" flex="20" style="padding-top: 9px;"></div><div ng-repeat="tmplt in customTemplates" class="md-button" aria-label="{{::tmplt.name}}" ng-class="selectedTemplate === tmplt.name ? \'md-primary md-raised\' : \'\'" ng-click="selectCustomRange(tmplt.name,tmplt)" ng-bind="::tmplt.name" flex="20" style="padding-top: 9px;"></div></div><div ng-if="!maxRange" ng-class="{\'hide-gt-sm\':!onePanel}" layout="column" layout-padding><md-input-container><label>{{::getLocalizationVal(\'Date Range Template\')}}</label><md-select md-container-class="md-date-range-picker__select" class="md-block" placeholder="{{::getLocalizationVal(\'Custom Date Range\')}}" ng-model="selectedTemplate"><md-option value=""></md-option><md-option ng-repeat="(tmpltKey,tmpltName) in selectionTemplate track by tmpltKey" aria-label="{{::tmpltName}}" ng-click="actionByKey(tmpltKey,null)" ng-bind="::tmpltName" value="{{tmpltKey}}"></md-option><md-option ng-repeat="tmplt in customTemplates" aria-label="{{::tmplt.name}}" ng-click="selectCustomRange(tmplt.name,tmplt)" ng-bind="::tmplt.name" value="{{::tmplt.name}}"></md-option></md-select></md-input-container></div></div></div></div>',controller:"mdDateRangePickerCtrl",link:function(t,n,r,i){t.actionByKey=function(e,n,r){switch(e){case"prev":t.handleClickPrevMonth(r),t.runIfNotInDigest();break;case"next":t.handleClickNextMonth(r),t.runIfNotInDigest();break;case"date1":t.handleClickDate(r,t.dates[n])?t.runIfNotInDigest(t.triggerChange):t.runIfNotInDigest();break;case"date2":t.handleClickDate(r,t.dates2[n])?t.runIfNotInDigest(t.triggerChange):t.runIfNotInDigest();break;case"TD":t.handleClickSelectToday(),t.runIfNotInDigest(t.triggerChange);break;case"YD":t.handleClickSelectYesterday(),t.runIfNotInDigest(t.triggerChange);break;case"TW":t.handleClickSelectThisWeek(),t.runIfNotInDigest(t.triggerChange);break;case"LW":t.handleClickSelectLastWeek(),t.runIfNotInDigest(t.triggerChange);break;case"TM":t.handleClickSelectThisMonth(),t.runIfNotInDigest(t.triggerChange);break;case"LM":t.handleClickSelectLastMonth(),t.runIfNotInDigest(t.triggerChange);break;case"TY":t.handleClickSelectThisYear(),t.runIfNotInDigest(t.triggerChange);break;case"LY":t.handleClickSelectLastYear(),t.runIfNotInDigest(t.triggerChange)}},t.runIfNotInDigest=function(e){t.$root!=null&&!t.$root.$$phase&&(t.$apply(),e&&typeof e=="function"&&e())},n.on("click",function(e){var n=e.target.getAttribute("event-key"),r=e.target.getAttribute("event-param");t.actionByKey(n,r,e)}),t.triggerChange=function(r){var i=e.getSelectedDate(t.dateStart,t.dateEnd,t.isDisabledDate,t.maxRange);t.mdOnSelect&&t.mdOnSelect({$dates:i})}}};return t}function r(e,t){function o(){var n=0,r;if(e.customTemplates!=null)for(var s=0;s<e.customTemplates.length;s++)r=e.customTemplates[s],SELECTION_TEMPLATES_CUSTOM[r.name]=r;if(e.selectedTemplate){switch(e.selectedTemplate){case"TD":e.handleClickSelectToday();break;case"YD":e.handleClickSelectYesterday();break;case"TW":e.handleClickSelectThisWeek();break;case"LW":e.handleClickSelectLastWeek();break;case"TM":e.handleClickSelectThisMonth();break;case"LM":e.handleClickSelectLastMonth();break;case"TY":e.handleClickSelectThisYear();break;case"LY":e.handleClickSelectLastYear();break;default:SELECTION_TEMPLATES_CUSTOM&&SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate]&&SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate].dateStart&&SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate].dateEnd&&(e.dateStart=SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate].dateStart,e.dateEnd=SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate].dateEnd),e.selectedTemplateName=e.selectedDateText()}e.updateActiveDate()}else e.selectedTemplate="",e.selectedTemplateName=e.selectedDateText(),e.updateActiveDate();e.$watch("selectedTemplate",function(t,n){t!==n&&e.dateStart&&!e.inCurrentMonth(e.dateStart)&&!e.inCurrentMonth(e.dateStart,!0)&&e.focusToDate(e.dateStart)}),e.$watch("dateStart",function(t,n){t!==n&&e.dateStart&&!e.inCurrentMonth(e.dateStart)&&!e.inCurrentMonth(e.dateStart,!0)&&e.focusToDate(e.dateStart)});var o=new Date(2017,0,1);e.days=[];for(n=0;n<7;n++)o.setDate(n+1+f()),e.days.push({id:n,name:a(t("date")(o,"EEE"))});var u=new Date;u.setDate(1),e.months=[];for(n=0;n<12;n++)u.setMonth(n),e.months.push({id:n,name:a(t("date")(u,"MMMM"))});var l=e.activeYear,c=0;e.years=[];for(c=l-10;c<l+10;c++)e.years.push({id:c,name:a(c)});for(var h in i)i.hasOwnProperty(h)&&(e.disableTemplates!=null&&e.disableTemplates!=""?e.disableTemplates.indexOf(h)<0&&(e.selectionTemplate[h]=i[h]):e.selectionTemplate[h]=i[h])}function u(t,n){e.dateStart=n.dateStart,e.dateEnd=n.dateEnd,e.selectedTemplate=t,e.selectedTemplateName=e.selectedDateText()}function a(t){var n=null;return e.localizationMap!=null&&e.localizationMap[t]!=null?n=e.localizationMap[t]:n=t,n}function f(){return[undefined,null,"",NaN].indexOf(e.firstDayOfWeek)!==-1?s:e.firstDayOfWeek}function l(e){var t=[],n=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+1,0),i=f(),s,o;for(s=1;s<=r.getDate();s++)t.push(new Date(e.getFullYear(),e.getMonth(),s));o=t[0].getDay(),s=0;while(o!==i)t.unshift(new Date(e.getFullYear(),e.getMonth(),s)),o=o<=0?6:o-1,s--;o=(t[t.length-1].getDay()+1)%7,s=1;while(o!==i)t.push(new Date(e.getFullYear(),e.getMonth()+1,s)),o=(o+1)%7,s++;return t}function c(e,t){if(!e||!t)return;var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return r-n}function h(e){var t=new Array(7),n=f();return t[0]="Sun",t[1]="Mon",t[2]="Tue",t[3]="Wed",t[4]="Thu",t[5]="Fri",t[6]="Sat",t[e+n%7]}function p(t,n){return n?t.getMonth()===e.activeMonth2:t.getMonth()===e.activeMonth}function d(t){if(!e.dateStart)return!0;if(c(e.dateStart,e.dateEnd)!==0)return!0;var n=c(e.dateStart,t);return e.maxRange&&Math.abs(Math.ceil(n/864e5))+1<=e.maxRange||!e.maxRange}function v(t,n){var r=!1,i=!1;if(c(e.dateStart,e.dateEnd)===0){if(c(e.dateStart,n)===0)i=!0,r=!0;else if(!e.isDisabledDate||!e.isDisabledDate({$date:n})){var s=c(e.dateStart,n);if(s>0){if(e.maxRange&&Math.abs(Math.ceil(s/864e5))+1<=e.maxRange||!e.maxRange)e.dateEnd=n,i=!0,r=!0}else if(e.maxRange&&Math.abs(Math.ceil(s/864e5))+1<=e.maxRange||!e.maxRange)e.dateStart=n,i=!0,r=!0}}else if(!e.isDisabledDate||!e.isDisabledDate({$date:n}))e.dateStart=n,e.dateEnd=n,r=!0;return r&&(e.selectedTemplate=!1,e.selectedTemplateName=e.selectedDateText()),i}function m(t){return e.dateStart&&e.dateEnd?c(e.dateStart,t)>=0&&0<=c(t,e.dateEnd):!1}function g(t){var n=new Date(e.activeYear,e.activeMonth,1),r=new Date(e.activeYear2,e.activeMonth2,1);t?(n=new Date(e.activeYear2,e.activeMonth2-1,1),e.activeYear=n.getFullYear(),e.activeMonth=n.getMonth()):(r=new Date(e.activeYear,e.activeMonth+1,1),e.activeYear2=r.getFullYear(),e.activeMonth2=r.getMonth()),e.focusToDate(n)}function y(t){var n=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth()+1,1);e.focusToDate(n)}function b(t){var n=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth()-1,1);e.focusToDate(n)}function w(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.dateStart=n,e.dateEnd=n,e.selectedTemplate="TD",e.selectedTemplateName=e.selectedDateText()}function E(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-1);e.dateStart=n,e.dateEnd=n,e.selectedTemplate="YD",e.selectedTemplateName=e.selectedDateText()}function S(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-(n.getDay()-f())),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+(6-n.getDay()+f()));e.dateStart=r,e.dateEnd=i,e.selectedTemplate="TW",e.selectedTemplateName=e.selectedDateText()}function x(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-7),r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-(n.getDay()-f())),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+(6-n.getDay()+f()));e.dateStart=r,e.dateEnd=i,e.selectedTemplate="LW",e.selectedTemplateName=e.selectedDateText()}function T(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),1),r=new Date(t.getFullYear(),t.getMonth()+1,0);e.dateStart=n,e.dateEnd=r,e.selectedTemplate="TM",e.selectedTemplateName=e.selectedDateText()}function N(){var t=new Date,n=new Date(t.getFullYear(),t.getMonth(),0),r=new Date(n.getFullYear(),n.getMonth(),1),i=new Date(n.getFullYear(),n.getMonth()+1,0);e.dateStart=r,e.dateEnd=i,e.selectedTemplate="LM",e.selectedTemplateName=e.selectedDateText()}function C(){var t=new Date,n=new Date(t.getFullYear(),0,1),r=new Date(t.getFullYear(),11,31);e.dateStart=n,e.dateEnd=r,e.selectedTemplate="TY",e.selectedTemplateName=e.selectedDateText()}function k(){var t=new Date,n=new Date(t.getFullYear()-1,0,1),r=new Date(t.getFullYear()-1,11,31);e.dateStart=n,e.dateEnd=r,e.selectedTemplate="LY",e.selectedTemplateName=e.selectedDateText()}function L(t){return c(e.dateStart,t)===0}function A(t){return c(e.dateEnd,t)===0}function O(e){return c(e,new Date)===0}function M(){return e.format&&typeof e.format=="function"?e.format(e.dateStart,e.dateEnd,e.selectedTemplate,e.selectedTemplateName):!e.dateStart||!e.dateEnd?"":e.selectedTemplate?SELECTION_TEMPLATES_CUSTOM!=null&&SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate]!=null?SELECTION_TEMPLATES_CUSTOM[e.selectedTemplate].name:i[e.selectedTemplate]:c(e.dateStart,e.dateEnd)===0?t("date")(e.dateStart,"dd MMM yyyy"):t("date")(e.dateStart,"dd"+(e.dateStart.getMonth()!==e.dateEnd.getMonth()||e.dateStart.getFullYear()!==e.dateEnd.getFullYear()?" MMM":"")+(e.dateStart.getFullYear()!==e.dateEnd.getFullYear()?" yyyy":""))+" - "+t("date")(e.dateEnd,"dd MMM yyyy")}function _(t){var n=new Date(t.getFullYear(),t.getMonth()+1,1);e.activeDate=t,e.activeMonth=t.getMonth(),e.activeYear=t.getFullYear(),e.activeDate2=n,e.activeMonth2=n.getMonth(),e.activeYear2=n.getFullYear(),e.dates=l(t),e.dates2=l(n)}var n=e,r=2,i={TD:a("Today"),YD:a("Yesterday"),TW:a("This Week"),LW:a("Last Week"),TM:a("This Month"),LM:a("Last Month"),TY:a("This Year"),LY:a("Last Year")},s=1;SELECTION_TEMPLATES_CUSTOM={},e.isMenuContainer=!1,e.days=[],e.label="Date range picker",e.dates=[],e.dates2=[],e.numberOfMonthToDisplay=2,e.today=new Date,e.dateStart&&e.dateStart.setHours(0,0,0,0),e.dateEnd&&e.dateStart.setHours(23,59,59,999),e.firstDayOfMonth=e.dateStart?new Date(e.dateStart.getFullYear(),e.dateStart.getMonth(),1):Date(e.today.getFullYear(),e.today.getMonth(),1),e.lastDayOfMonth=e.dateStart?new Date(e.dateStart.getFullYear(),e.dateStart.getMonth()+1,0):Date(e.today.getFullYear(),e.today.getMonth()+1,0),e.activeDate=e.dateStart||e.today,e.activeDate2=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth()+1,1),e.activeMonth=e.activeDate.getMonth(),e.activeYear=e.activeDate.getFullYear(),e.activeMonth2=e.activeDate2.getMonth(),e.activeYear2=e.activeDate2.getFullYear(),e.months=[],e.years=[],e.inCurrentMonth=p,e.isToday=O,e.handleClickDate=v,e.inSelectedDateRange=m,e.isSelectedStartDate=L,e.isSelectedEndDate=A,e.updateActiveDate=g,e.selectedDateText=M,e.focusToDate=_,e.handleClickNextMonth=y,e.handleClickPrevMonth=b,e.handleClickSelectToday=w,e.handleClickSelectYesterday=E,e.handleClickSelectThisWeek=S,e.handleClickSelectLastWeek=x,e.handleClickSelectThisMonth=T,e.handleClickSelectLastMonth=N,e.handleClickSelectThisYear=C,e.handleClickSelectLastYear=k,e.getLocalizationVal=a,e.selectCustomRange=u,e.isInMaxRange=d,e.selectionTemplate={},o()}function i(){return{scope:{ngModel:"=ngModel",autoConfirm:"=autoConfirm",ngDisabled:"=ngDisabled",showTemplate:"=",placeholder:"@",isDisabledDate:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",mdOnSelect:"&",onePanel:"=?",format:"=?",maxRange:"=?",firstDayOfWeek:"@"},template:['<md-menu ng-disabled="ngDisabled">','<span class="md-select-value" ng-click="!ngDisabled && (($mdMenu && $mdMenu.open) ? $mdMenu.open($event) : $mdOpenMenu($event))">',"  <span>{{ngModel.selectedTemplateName || placeholder}}</span>",'  <span class="md-select-icon" aria-hidden="true"></span>',"</span>",'<md-menu-content class="md-custom-menu-content" style="max-height: none!important; height: auto!important; padding: 0!important;">','    <span style="text-align: left; padding: 12px 20px 0 20px" disabled>{{ngModel.selectedTemplateName || placeholder}}</span>','    <md-date-range-picker first-day-of-week="firstDayOfWeek" ','     md-on-select="autoConfirm && ok($dates)" ','     date-start="ngModel.dateStart" ','     date-end="ngModel.dateEnd" ','     selected-template="ngModel.selectedTemplate" ','     show-template="showTemplate" ','     localization-map="localizationMap" ','     custom-templates="customTemplates" ','     disable-templates="{{disableTemplates}}" ','     is-disabled-date="isDisabledDate({ $date: $date })" ','     max-range="maxRange" ','     one-panel="onePanel" ','     format="format" ','     selected-template-name="ngModel.selectedTemplateName"></md-date-range-picker>','<p ng-if="!autoConfirm" layout="row" layout-align="end center">','<md-button ng-if="ngModel.showClear" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</p>","</md-menu-content>","</md-menu>"].join(""),controller:["$scope","$mdMenu",function(e,t){e.ok=function(r){e.mdOnSelect({$dates:r}),t.hide()},e.clear=function(){e.ngModel.selectedTemplateName="",e.ngModel.selectedTemplate=null,e.ngModel.dateStart=null,e.ngModel.dateEnd=null},e.getLocalizationVal=function(n){var r=null;return e.ngModel&&e.ngModel.localizationMap!=null&&e.ngModel.localizationMap[n]!=null?r=e.ngModel.localizationMap[n]:r=n,r}}]}}function s(e){function r(e,t,n,r){var i=[],s=t.getTime(),o=e,u=0,a=e.getFullYear(),f=e.getMonth(),l=e.getDate();while(o.getTime()<=s){n&&!n({$date:o})&&i.push(o),u++,o=new Date(a,f,l+u);if(u>(r||1e4))break}return i}function i(n){return e.show({locals:{mdDateRangePickerServiceModel:t.copy(n.model),mdDateRangePickerServiceConfig:t.copy(n)},controller:["$scope","mdDateRangePickerServiceModel","mdDateRangePickerServiceConfig",function(t,n,r){t.model=n||{},t.config=r||{},t.model.selectedTemplateName=t.model.selectedTemplateName||"",t.ok=function(){t.model.dateStart&&t.model.dateStart.setHours(0,0,0,0),t.model.dateEnd&&t.model.dateEnd.setHours(23,59,59,999),e.hide(t.model)},t.cancel=function(){e.cancel()},t.clear=function(){t.model.selectedTemplateName="",t.model.selectedTemplate=null,t.model.dateStart=null,t.model.dateEnd=null},t.handleOnSelect=function(e){typeof t.config.mdOnSelect=="function"&&t.config.mdOnSelect(e),t.config.autoConfirm&&t.ok()},t.getLocalizationVal=function(n){var r=null;return t.model&&t.model.localizationMap!=null&&t.model.localizationMap[n]!=null?r=t.model.localizationMap[n]:r=n,r},t.model.customTemplates&&console.warn("model.customTemplates will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({customTemplates}) instead"),t.model.localizationMap&&console.warn("model.localizationMap will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({localizationMap}) instead"),t.model.firstDayOfWeek&&console.warn("model.firstDayOfWeek will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({firstDayOfWeek}) instead"),t.model.showTemplate&&console.warn("model.showTemplate will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({showTemplate}) instead"),t.model.maxRange&&console.warn("model.maxRange will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({maxRange}) instead"),t.model.onePanel&&console.warn("model.onePanel will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({onePanel}) instead"),t.model.isDisabledDate&&console.warn("model.isDisabledDate({ $date: $date }) will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({isDisabledDate:($date)=>{}}) instead")}],template:['<md-dialog aria-label="Date Range Picker">','<md-toolbar class="md-primary" layout="row" layout-align="start center">','<md-button aria-label="Date Range Picker" class="md-icon-button" aria-hidden="true" ng-disabled="true">','<md-icon md-svg-icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik05IDExSDd2Mmgydi0yem00IDBoLTJ2Mmgydi0yem00IDBoLTJ2Mmgydi0yem0yLTdoLTFWMmgtMnYySDhWMkg2djJINWMtMS4xMSAwLTEuOTkuOS0xLjk5IDJMMyAyMGMwIDEuMS44OSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0wIDE2SDVWOWgxNHYxMXoiLz4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KPC9zdmc+"></md-icon>',"</md-button>",'<span class="md-toolbar-tools">{{model.selectedTemplateName}}</span>',"</md-toolbar>","<md-dialog-content>","<md-date-range-picker ",'date-start="model.dateStart" ','date-end="model.dateEnd" ','show-template="config.showTemplate || model.showTemplate" ','selected-template="model.selectedTemplate" ','selected-template-name="model.selectedTemplateName" ','first-day-of-week="config.firstDayOfWeek || model.firstDayOfWeek" ','localization-map="config.localizationMap || model.localizationMap" ','custom-templates="config.customTemplates || model.customTemplates" ','format="config.format" ','disable-templates="{{model.disableTemplates}}" ','md-on-select="handleOnSelect($dates)" ','is-disabled-date="config.isDisabledDate ? config.isDisabledDate($date) : model.isDisabledDate({ $date: $date })" ','max-range="config.maxRange || model.maxRange" ','one-panel="config.onePanel || model.onePanel" ',">","</md-date-range-picker>","</md-dialog-content>",'<md-dialog-actions layout="row" layout-align="end center">','<md-button ng-click="cancel()">{{getLocalizationVal("Cancel")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</md-dialog-actions>","</md-dialog>"].join(""),parent:t.element(document.body),targetEvent:n.targetEvent,clickOutsideToClose:!0,fullscreen:n.model.fullscreen})}var n=this;n.show=i,n.getSelectedDate=r}t.module("ngMaterialDateRangePicker",["ngMaterial"]).directive("mdDateRangePicker",n).directive("mdDateRange",i).controller("mdDateRangePickerCtrl",r).service("$mdDateRangePicker",s),n.$inject=["$mdDateRangePicker"],r.$inject=["$scope","$filter"],s.$inject=["$mdDialog"]})(window,angular)
  