!function(a){var b;window.UIkit&&(b=a(UIkit)),"function"==typeof define&&define.amd&&define("uikit-datepicker",["uikit"],function(){return b||a(UIkit)})}(function(a){"use strict";var b,c,d=!1;return a.component("datepicker",{defaults:{mobile:!1,weekstart:1,i18n:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},format:"YYYY-MM-DD",offsettop:5,maxDate:!1,minDate:!1,pos:"auto",template:function(b,c){var d,e="";if(e+='
',e+='',e+='',a.formSelect){var f,g,h,i,j=(new Date).getFullYear(),k=[];for(d=0;d'+c.i18n.months[d]+""):k.push('");for(f=''+c.i18n.months[b.month]+'",k=[],h=b.minDate?b.minDate.year():j-50,i=b.maxDate?b.maxDate.year():j+20,d=h;d<=i;d++)d==b.year?k.push('"):k.push('");g=''+b.year+'",e+='
'+f+" "+g+"
"}else e+='
'+c.i18n.months[b.month]+" "+b.year+"
";for(e+="
",e+='',e+="",d=0;d"+b.weekdays[d]+"");for(e+="",e+="",d=0;d";for(var l=0;l'+m.day.format("D")+""}e+=""}return e+="",e+="
"}},boot:function(){a.$win.on("resize orientationchange",function(){d&&d.hide()}),a.$html.on("focus.datepicker.uikit","[data-uk-datepicker]",function(b){var c=a.$(this);c.data("datepicker")||(b.preventDefault(),a.datepicker(c,a.Utils.options(c.attr("data-uk-datepicker"))),c.trigger("focus"))}),a.$html.on("click focus","*",function(c){var e=a.$(c.target);!d||e[0]==b[0]||e.data("datepicker")||e.parents(".uk-datepicker:first").length||d.hide()})},init:function(){if(!a.support.touch||"date"!=this.element.attr("type")||this.options.mobile){var e=this;this.current=this.element.val()?c(this.element.val(),this.options.format):c(),this.on("click focus",function(){d!==e&&e.pick(this.value?this.value:e.options.minDate?e.options.minDate:"")}).on("change",function(){e.element.val()&&!c(e.element.val(),e.options.format).isValid()&&e.element.val(c().format(e.options.format))}),b||(b=a.$('
'),b.on("click",".uk-datepicker-next, .uk-datepicker-previous, [data-date]",function(b){b.stopPropagation(),b.preventDefault();var e=a.$(this);return!e.hasClass("uk-datepicker-date-disabled")&&void(e.is("[data-date]")?(d.current=c(e.data("date")),d.element.val(d.current.isValid()?d.current.format(d.options.format):null).trigger("change"),d.hide()):d.add(e.hasClass("uk-datepicker-next")?1:-1,"months"))}),b.on("change",".update-picker-month, .update-picker-year",function(){var b=a.$(this);d[b.is(".update-picker-year")?"setYear":"setMonth"](Number(b.val()))}),b.appendTo("body"))}},pick:function(e){var f=this.element.offset(),g={left:f.left,right:""};this.current=isNaN(e)?c(e,this.options.format):c(),this.initdate=this.current.format("YYYY-MM-DD"),this.update(),"right"==a.langdirection&&(g.right=window.innerWidth-(g.left+this.element.outerWidth()),g.left="");var h=f.top-this.element.outerHeight()+this.element.height()-this.options.offsettop-b.outerHeight(),i=f.top+this.element.outerHeight()+this.options.offsettop;g.top=i,"top"==this.options.pos?g.top=h:"auto"==this.options.pos&&window.innerHeight-i-b.outerHeight()<0&&h>=0&&(g.top=h),b.css(g).show(),this.trigger("show.uk.datepicker"),d=this},add:function(a,b){this.current.add(a,b),this.update()},setMonth:function(a){this.current.month(a),this.update()},setYear:function(a){this.current.year(a),this.update()},update:function(){var a=this.getRows(this.current.year(),this.current.month()),c=this.options.template(a,this.options);b.html(c),this.trigger("update.uk.datepicker")},getRows:function(a,b){var d=this.options,e=c().format("YYYY-MM-DD"),f=[31,a%4===0&&a%100!==0||a%400===0?29:28,31,30,31,30,31,31,30,31,30,31][b],g=new Date(a,b,1,12).getDay(),h={month:b,year:a,weekdays:[],days:[],maxDate:!1,minDate:!1},i=[];d.maxDate!==!1&&(h.maxDate=isNaN(d.maxDate)?c(d.maxDate,d.format):c().add(d.maxDate,"days")),d.minDate!==!1&&(h.minDate=isNaN(d.minDate)?c(d.minDate,d.format):c().add(d.minDate-1,"days")),h.weekdays=function(){for(var a=0,b=[];a<7;a++){for(var c=a+(d.weekstart||0);c>=7;)c-=7;b.push(d.i18n.weekdays[c])}return b}(),d.weekstart&&d.weekstart>0&&(g-=d.weekstart,g<0&&(g+=7));for(var j=f+g,k=j;k>7;)k-=7;j+=7-k;for(var l,m,n,o,p,q=0,r=0;ql||h.maxDate&&l>h.maxDate,p=!(q=f+g),l=c(l),n=this.initdate==l.format("YYYY-MM-DD"),o=e==l.format("YYYY-MM-DD"),i.push({selected:n,today:o,disabled:m,day:l,inmonth:p}),7===++r&&(h.days.push(i),i=[],r=0);return h},hide:function(){d&&d===this&&(b.hide(),d=!1,this.trigger("hide.uk.datepicker"))}}),c=function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return wa.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){sa.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){nb[a]||(e(b),nb[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=sa.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fa.length>0)for(c in Fa)d=Fa[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return a<0?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return ha(sa([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&a._pf.overflow===-2&&(b=a._a[ya]<0||a._a[ya]>11?ya:a._a[za]<1||a._a[za]>B(a._a[xa],a._a[ya])?za:a._a[Aa]<0||a._a[Aa]>23?Aa:a._a[Ba]<0||a._a[Ba]>59?Ba:a._a[Ca]<0||a._a[Ca]>59?Ca:a._a[Da]<0||a._a[Da]>999?Da:-1,a._pf._overflowDayOfYear&&(bza)&&(b=za),a._pf.overflow=b)}function G(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Ea[a]&&Ga)try{b=sa.locale(),require("./locale/"+a),sa.locale(b)}catch(a){}return Ea[a]}function K(a,b){return b._isUTC?sa(a).zone(b._offset||0):sa(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Ka);for(b=0,c=d.length;b=0&&La.test(a);)a=a.replace(La,c),La.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Wa;case"DDDD":return Ya;case"YYYY":case"GGGG":case"gggg":return d?Za:Oa;case"Y":case"G":case"g":return _a;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?$a:Pa;case"S":if(d)return Wa;case"SS":if(d)return Xa;case"SSS":if(d)return Ya;case"DDD":return Na;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ra;case"a":case"A":return b._locale._meridiemParse;case"X":return Ua;case"Z":case"ZZ":return Sa;case"T":return Ta;case"SSSS":return Qa;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Xa:Ma;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ma;case"Do":return Va;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Sa)||[],c=b[b.length-1]||[],d=(c+"").match(eb)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[ya]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[ya]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b),null!=d?e[ya]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[za]=A(b));break;case"Do":null!=b&&(e[za]=A(parseInt(b,10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[xa]=sa.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[xa]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"H":case"HH":case"h":case"hh":e[Aa]=A(b);break;case"m":case"mm":e[Ba]=A(b);break;case"s":case"ss":e[Ca]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Da]=A(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=sa.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[xa],ha(sa(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[xa],ha(sa(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,fD(f)&&(a._pf._overflowDayOfYear=!0),d=da(f,0,a._dayOfYear),a._a[ya]=d.getUTCMonth(),a._a[za]=d.getUTCDate()),c=0;c<3&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;c<7;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];a._d=(a._useUTC?da:ca).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(a){if(a._f===sa.ISO_8601)return void $(a);a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,i=0;for(d=O(a._f,a._locale).match(Ka)||[],b=0;b0&&a._pf.unusedInput.push(f),g=g.slice(g.indexOf(c)+c.length),i+=c.length),mb[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),R(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=h-i,g.length>0&&a._pf.unusedInput.push(g),a._isPm&&a._a[Aa]<12&&(a._a[Aa]+=12),a._isPm===!1&&12===a._a[Aa]&&(a._a[Aa]=0),T(a),F(a)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(f=0;f0,k[4]=c,fa.apply({},k)}function ha(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),fd?7:0)-(h0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function ja(b){var c=b._i,d=b._f;return b._locale=b._locale||sa.localeData(b._l),null===c||d===a&&""===c?sa.invalid({nullInput:!0}):("string"==typeof c&&(b._i=c=b._locale.preparse(c)),sa.isMoment(c)?new k(c,!0):(d?u(d)?Z(b):W(b):ba(b),new k(b)))}function ka(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return sa();for(c=b[0],d=1;d=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},nb={},ob=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];kb.length;)ta=kb.pop(),mb[ta+"o"]=i(mb[ta],ta);for(;lb.length;)ta=lb.pop(),mb[ta+ta]=h(mb[ta],2);mb.DDDD=h(mb.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;b<12;b++)if(this._monthsParse[b]||(c=sa.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;b<7;b++)if(this._weekdaysParse[b]||(c=sa([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return ha(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),sa=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),ja(g)},sa.suppressDeprecationWarnings=!1,sa.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)}),sa.min=function(){var a=[].slice.call(arguments,0);return ka("isBefore",a)},sa.max=function(){var a=[].slice.call(arguments,0);return ka("isAfter",a)},sa.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),ja(g).utc()},sa.unix=function(a){return sa(1e3*a)},sa.duration=function(a,b){var d,e,f,g,h=a,i=null;return sa.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Ia.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[za])*d,h:A(i[Aa])*d,m:A(i[Ba])*d,s:A(i[Ca])*d,ms:A(i[Da])*d}):(i=Ja.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(sa(h.from),sa(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),sa.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},sa.version=ua,sa.defaultFormat=bb,sa.ISO_8601=function(){},sa.momentProperties=Fa,sa.updateOffset=function(){},sa.relativeTimeThreshold=function(b,c){return jb[b]!==a&&(c===a?jb[b]:(jb[b]=c,!0))},sa.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return sa.locale(a,b)}),sa.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?sa.defineLocale(a,b):sa.localeData(a),c&&(sa.duration._locale=sa._locale=c)),sa._locale._abbr},sa.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ea[a]||(Ea[a]=new j),Ea[a].set(b),sa.locale(a),Ea[a]):(delete Ea[a],null)},sa.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return sa.localeData(a)}),sa.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return sa._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},sa.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},sa.isDuration=function(a){return a instanceof l};for(ta=ob.length-1;ta>=0;--ta)z(ob[ta]);sa.normalizeUnits=function(a){return x(a)},sa.invalid=function(a){var b=sa.utc(NaN);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},sa.parseZone=function(){return sa.apply(null,arguments).parseZone()},sa.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(sa.fn=k.prototype,{clone:function(){return sa(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=sa(this).utc();return 00)},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||sa.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-sa(this).startOf("month")-(g-sa(g).startOf("month")),f-=6e4*(this.zone()-sa(this).startOf("month").zone()-(g.zone()-sa(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return sa.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(sa(),a)},calendar:function(a){var b=a||sa(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()+a):+this.clone().startOf(b)>+sa(a).startOf(b)},isBefore:function(a,b){return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=sa.isMoment(a)?a:sa(a),+this<+a):+this.clone().startOf(b)<+sa(a).startOf(b)},isSame:function(a,b){return b=x(b||"millisecond"),"millisecond"===b?(a=sa.isMoment(a)?a:sa(a),+this===+a):+this.clone().startOf(b)===+K(a,this).startOf(b)},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=sa.apply(null,arguments),athis?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,sa.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,sa.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""; },parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?sa(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=va((sa(this).startOf("day")-sa(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ha(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ha(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ha(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=sa.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Use moment().localeData() instead.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),sa.fn.millisecond=sa.fn.milliseconds=oa("Milliseconds",!1),sa.fn.second=sa.fn.seconds=oa("Seconds",!1),sa.fn.minute=sa.fn.minutes=oa("Minutes",!1),sa.fn.hour=sa.fn.hours=oa("Hours",!0),sa.fn.date=oa("Date",!0),sa.fn.dates=f("dates accessor is deprecated. Use date instead.",oa("Date",!0)),sa.fn.year=oa("FullYear",!0),sa.fn.years=f("years accessor is deprecated. Use year instead.",oa("FullYear",!0)),sa.fn.days=sa.fn.day,sa.fn.months=sa.fn.month,sa.fn.weeks=sa.fn.week,sa.fn.isoWeeks=sa.fn.isoWeek,sa.fn.quarters=sa.fn.quarter,sa.fn.toJSON=sa.fn.toISOString,m(sa.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pa(e)),e-=o(qa(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=ga(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=sa.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=sa.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pa(b),"month"===a?c:c/12;switch(b=this._days+qa(this._months/12),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:sa.fn.lang,locale:sa.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),sa.duration.fn.toString=sa.duration.fn.toISOString;for(ta in fb)c(fb,ta)&&ra(ta.toLowerCase());return sa.duration.fn.asMilliseconds=function(){return this.as("ms")},sa.duration.fn.asSeconds=function(){return this.as("s")},sa.duration.fn.asMinutes=function(){return this.as("m")},sa.duration.fn.asHours=function(){return this.as("h")},sa.duration.fn.asDays=function(){return this.as("d")},sa.duration.fn.asWeeks=function(){return this.as("weeks")},sa.duration.fn.asMonths=function(){return this.as("M")},sa.duration.fn.asYears=function(){return this.as("y")},sa.locale("en",{ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),sa}.call(this),a.Utils.moment=c,a.datepicker});