if(function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.moment=factory()}(this,function(){"use strict";function utils_hooks__hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(callback){hookCallback=callback}function isArray(input){return"[object Array]"===Object.prototype.toString.call(input)}function isDate(input){return input instanceof Date||"[object Date]"===Object.prototype.toString.call(input)}function map(arr,fn){var i,res=[];for(i=0;i<arr.length;++i)res.push(fn(arr[i],i));return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b)hasOwnProp(b,i)&&(a[i]=b[i]);return hasOwnProp(b,"toString")&&(a.toString=b.toString),hasOwnProp(b,"valueOf")&&(a.valueOf=b.valueOf),a}function create_utc__createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function getParsingFlags(m){return null==m._pf&&(m._pf=defaultParsingFlags()),m._pf}function valid__isValid(m){if(null==m._isValid){var flags=getParsingFlags(m);m._isValid=!(isNaN(m._d.getTime())||!(flags.overflow<0)||flags.empty||flags.invalidMonth||flags.invalidWeekday||flags.nullInput||flags.invalidFormat||flags.userInvalidated),m._strict&&(m._isValid=m._isValid&&0===flags.charsLeftOver&&0===flags.unusedTokens.length&&void 0===flags.bigHour)}return m._isValid}function valid__createInvalid(flags){var m=create_utc__createUTC(NaN);return null!=flags?extend(getParsingFlags(m),flags):getParsingFlags(m).userInvalidated=!0,m}function copyConfig(to,from){var i,prop,val;if("undefined"!=typeof from._isAMomentObject&&(to._isAMomentObject=from._isAMomentObject),"undefined"!=typeof from._i&&(to._i=from._i),"undefined"!=typeof from._f&&(to._f=from._f),"undefined"!=typeof from._l&&(to._l=from._l),"undefined"!=typeof from._strict&&(to._strict=from._strict),"undefined"!=typeof from._tzm&&(to._tzm=from._tzm),"undefined"!=typeof from._isUTC&&(to._isUTC=from._isUTC),"undefined"!=typeof from._offset&&(to._offset=from._offset),"undefined"!=typeof from._pf&&(to._pf=getParsingFlags(from)),"undefined"!=typeof from._locale&&(to._locale=from._locale),momentProperties.length>0)for(i in momentProperties)prop=momentProperties[i],val=from[prop],"undefined"!=typeof val&&(to[prop]=val);return to}function Moment(config){copyConfig(this,config),this._d=new Date(null!=config._d?config._d.getTime():NaN),updateInProgress===!1&&(updateInProgress=!0,utils_hooks__hooks.updateOffset(this),updateInProgress=!1)}function isMoment(obj){return obj instanceof Moment||null!=obj&&null!=obj._isAMomentObject}function absFloor(number){return 0>number?Math.ceil(number):Math.floor(number)}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return 0!==coercedNumber&&isFinite(coercedNumber)&&(value=absFloor(coercedNumber)),value}function compareArrays(array1,array2,dontConvert){var i,len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0;for(i=0;len>i;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function Locale(){}function normalizeLocale(key){return key?key.toLowerCase().replace("_","-"):key}function chooseLocale(names){for(var j,next,locale,split,i=0;i<names.length;){for(split=normalizeLocale(names[i]).split("-"),j=split.length,next=normalizeLocale(names[i+1]),next=next?next.split("-"):null;j>0;){if(locale=loadLocale(split.slice(0,j).join("-")))return locale;if(next&&next.length>=j&&compareArrays(split,next,!0)>=j-1)break;j--}i++}return null}function loadLocale(name){var oldLocale=null;if(!locales[name]&&"undefined"!=typeof module&&module&&module.exports)try{oldLocale=globalLocale._abbr,require("./locale/"+name),locale_locales__getSetGlobalLocale(oldLocale)}catch(e){}return locales[name]}function locale_locales__getSetGlobalLocale(key,values){var data;return key&&(data="undefined"==typeof values?locale_locales__getLocale(key):defineLocale(key,values),data&&(globalLocale=data)),globalLocale._abbr}function defineLocale(name,values){return null!==values?(values.abbr=name,locales[name]=locales[name]||new Locale,locales[name].set(values),locale_locales__getSetGlobalLocale(name),locales[name]):(delete locales[name],null)}function locale_locales__getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr&&(key=key._locale._abbr),!key)return globalLocale;if(!isArray(key)){if(locale=loadLocale(key))return locale;key=[key]}return chooseLocale(key)}function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+"s"]=aliases[shorthand]=unit}function normalizeUnits(units){return"string"==typeof units?aliases[units]||aliases[units.toLowerCase()]:void 0}function normalizeObjectUnits(inputObject){var normalizedProp,prop,normalizedInput={};for(prop in inputObject)hasOwnProp(inputObject,prop)&&(normalizedProp=normalizeUnits(prop),normalizedProp&&(normalizedInput[normalizedProp]=inputObject[prop]));return normalizedInput}function makeGetSet(unit,keepTime){return function(value){return null!=value?(get_set__set(this,unit,value),utils_hooks__hooks.updateOffset(this,keepTime),this):get_set__get(this,unit)}}function get_set__get(mom,unit){return mom._d["get"+(mom._isUTC?"UTC":"")+unit]()}function get_set__set(mom,unit,value){return mom._d["set"+(mom._isUTC?"UTC":"")+unit](value)}function getSet(units,value){var unit;if("object"==typeof units)for(unit in units)this.set(unit,units[unit]);else if(units=normalizeUnits(units),"function"==typeof this[units])return this[units](value);return this}function zeroFill(number,targetLength,forceSign){var absNumber=""+Math.abs(number),zerosToFill=targetLength-absNumber.length,sign=number>=0;return(sign?forceSign?"+":"":"-")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}function addFormatToken(token,padded,ordinal,callback){var func=callback;"string"==typeof callback&&(func=function(){return this[callback]()}),token&&(formatTokenFunctions[token]=func),padded&&(formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}),ordinal&&(formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token)})}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|\]$/g,""):input.replace(/\\/g,"")}function makeFormatFunction(format){var i,length,array=format.match(formattingTokens);for(i=0,length=array.length;length>i;i++)formatTokenFunctions[array[i]]?array[i]=formatTokenFunctions[array[i]]:array[i]=removeFormattingTokens(array[i]);return function(mom){var output="";for(i=0;length>i;i++)output+=array[i]instanceof Function?array[i].call(mom,format):array[i];return output}}function formatMoment(m,format){return m.isValid()?(format=expandFormat(format,m.localeData()),formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format),formatFunctions[format](m)):m.localeData().invalidDate()}function expandFormat(format,locale){function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input}var i=5;for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format);)format=format.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format}function isFunction(sth){return"function"==typeof sth&&"[object Function]"===Object.prototype.toString.call(sth)}function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token,config){return hasOwnProp(regexes,token)?regexes[token](config._strict,config._locale):new RegExp(unescapeFormat(token))}function unescapeFormat(s){return s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function addParseToken(token,callback){var i,func=callback;for("string"==typeof token&&(token=[token]),"number"==typeof callback&&(func=function(input,array){array[callback]=toInt(input)}),i=0;i<token.length;i++)tokens[token[i]]=func}function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{},callback(input,config._w,config,token)})}function addTimeToArrayFromToken(token,input,config){null!=input&&hasOwnProp(tokens,token)&&tokens[token](input,config._a,config,token)}function daysInMonth(year,month){return new Date(Date.UTC(year,month+1,0)).getUTCDate()}function localeMonths(m){return this._months[m.month()]}function localeMonthsShort(m){return this._monthsShort[m.month()]}function localeMonthsParse(monthName,format,strict){var i,mom,regex;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;12>i;i++){if(mom=create_utc__createUTC([2e3,i]),strict&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(mom,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(mom,"").replace(".","")+"$","i")),strict||this._monthsParse[i]||(regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"MMMM"===format&&this._longMonthsParse[i].test(monthName))return i;if(strict&&"MMM"===format&&this._shortMonthsParse[i].test(monthName))return i;if(!strict&&this._monthsParse[i].test(monthName))return i}}function setMonth(mom,value){var dayOfMonth;return"string"==typeof value&&(value=mom.localeData().monthsParse(value),"number"!=typeof value)?mom:(dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value)),mom._d["set"+(mom._isUTC?"UTC":"")+"Month"](value,dayOfMonth),mom)}function getSetMonth(value){return null!=value?(setMonth(this,value),utils_hooks__hooks.updateOffset(this,!0),this):get_set__get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function checkOverflow(m){var overflow,a=m._a;return a&&-2===getParsingFlags(m).overflow&&(overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||24===a[HOUR]&&(0!==a[MINUTE]||0!==a[SECOND]||0!==a[MILLISECOND])?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(m)._overflowDayOfYear&&(YEAR>overflow||overflow>DATE)&&(overflow=DATE),getParsingFlags(m).overflow=overflow),m}function warn(msg){utils_hooks__hooks.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+msg)}function deprecate(msg,fn){var firstTime=!0;return extend(function(){return firstTime&&(warn(msg+"\n"+(new Error).stack),firstTime=!1),fn.apply(this,arguments)},fn)}function deprecateSimple(name,msg){deprecations[name]||(warn(msg),deprecations[name]=!0)}function configFromISO(config){var i,l,string=config._i,match=from_string__isoRegex.exec(string);if(match){for(getParsingFlags(config).iso=!0,i=0,l=isoDates.length;l>i;i++)if(isoDates[i][1].exec(string)){config._f=isoDates[i][0];break}for(i=0,l=isoTimes.length;l>i;i++)if(isoTimes[i][1].exec(string)){config._f+=(match[6]||" ")+isoTimes[i][0];break}string.match(matchOffset)&&(config._f+="Z"),configFromStringAndFormat(config)}else config._isValid=!1}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);return null!==matched?void(config._d=new Date(+matched[1])):(configFromISO(config),void(config._isValid===!1&&(delete config._isValid,utils_hooks__hooks.createFromInputFallback(config))))}function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);return 1970>y&&date.setFullYear(y),date}function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));return 1970>y&&date.setUTCFullYear(y),date}function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}function getIsLeapYear(){return isLeapYear(this.year())}function weekOfYear(mom,firstDayOfWeek,firstDayOfWeekOfYear){var adjustedMoment,end=firstDayOfWeekOfYear-firstDayOfWeek,daysToDayOfWeek=firstDayOfWeekOfYear-mom.day();return daysToDayOfWeek>end&&(daysToDayOfWeek-=7),end-7>daysToDayOfWeek&&(daysToDayOfWeek+=7),adjustedMoment=local__createLocal(mom).add(daysToDayOfWeek,"d"),{week:Math.ceil(adjustedMoment.dayOfYear()/7),year:adjustedMoment.year()}}function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week}function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(input){var week=this.localeData().week(this);return null==input?week:this.add(7*(input-week),"d")}function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return null==input?week:this.add(7*(input-week),"d")}function dayOfYearFromWeeks(year,week,weekday,firstDayOfWeekOfYear,firstDayOfWeek){var dayOfYear,week1Jan=6+firstDayOfWeek-firstDayOfWeekOfYear,janX=createUTCDate(year,0,1+week1Jan),d=janX.getUTCDay();return firstDayOfWeek>d&&(d+=7),weekday=null!=weekday?1*weekday:firstDayOfWeek,dayOfYear=1+week1Jan+7*(week-1)-d+weekday,{year:dayOfYear>0?year:year-1,dayOfYear:dayOfYear>0?dayOfYear:daysInYear(year-1)+dayOfYear}}function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==input?dayOfYear:this.add(input-dayOfYear,"d")}function defaults(a,b,c){return null!=a?a:null!=b?b:c}function currentDateArray(config){var now=new Date;return config._useUTC?[now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate()]:[now.getFullYear(),now.getMonth(),now.getDate()]}function configFromArray(config){var i,date,currentDate,yearToUse,input=[];if(!config._d){for(currentDate=currentDateArray(config),config._w&&null==config._a[DATE]&&null==config._a[MONTH]&&dayOfYearFromWeekInfo(config),config._dayOfYear&&(yearToUse=defaults(config._a[YEAR],currentDate[YEAR]),config._dayOfYear>daysInYear(yearToUse)&&(getParsingFlags(config)._overflowDayOfYear=!0),date=createUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;3>i&&null==config._a[i];++i)config._a[i]=input[i]=currentDate[i];for(;7>i;i++)config._a[i]=input[i]=null==config._a[i]?2===i?1:0:config._a[i];24===config._a[HOUR]&&0===config._a[MINUTE]&&0===config._a[SECOND]&&0===config._a[MILLISECOND]&&(config._nextDay=!0,config._a[HOUR]=0),config._d=(config._useUTC?createUTCDate:createDate).apply(null,input),null!=config._tzm&&config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),config._nextDay&&(config._a[HOUR]=24)}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp;w=config._w,null!=w.GG||null!=w.W||null!=w.E?(dow=1,doy=4,weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(local__createLocal(),1,4).year),week=defaults(w.W,1),weekday=defaults(w.E,1)):(dow=config._locale._week.dow,doy=config._locale._week.doy,weekYear=defaults(w.gg,config._a[YEAR],weekOfYear(local__createLocal(),dow,doy).year),week=defaults(w.w,1),null!=w.d?(weekday=w.d,dow>weekday&&++week):weekday=null!=w.e?w.e+dow:dow),temp=dayOfYearFromWeeks(weekYear,week,weekday,doy,dow),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear}function configFromStringAndFormat(config){if(config._f===utils_hooks__hooks.ISO_8601)return void configFromISO(config);config._a=[],getParsingFlags(config).empty=!0;var i,parsedInput,tokens,token,skipped,string=""+config._i,stringLength=string.length,totalParsedInputLength=0;for(tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[],i=0;i<tokens.length;i++)token=tokens[i],parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&getParsingFlags(config).unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token]?(parsedInput?getParsingFlags(config).empty=!1:getParsingFlags(config).unusedTokens.push(token),addTimeToArrayFromToken(token,parsedInput,config)):config._strict&&!parsedInput&&getParsingFlags(config).unusedTokens.push(token);getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&getParsingFlags(config).unusedInput.push(string),getParsingFlags(config).bigHour===!0&&config._a[HOUR]<=12&&config._a[HOUR]>0&&(getParsingFlags(config).bigHour=void 0),config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem),configFromArray(config),checkOverflow(config)}function meridiemFixWrap(locale,hour,meridiem){var isPm;return null==meridiem?hour:null!=locale.meridiemHour?locale.meridiemHour(hour,meridiem):null!=locale.isPM?(isPm=locale.isPM(meridiem),isPm&&12>hour&&(hour+=12),isPm||12!==hour||(hour=0),hour):hour}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(0===config._f.length)return getParsingFlags(config).invalidFormat=!0,void(config._d=new Date(NaN));for(i=0;i<config._f.length;i++)currentScore=0,tempConfig=copyConfig({},config),null!=config._useUTC&&(tempConfig._useUTC=config._useUTC),tempConfig._f=config._f[i],configFromStringAndFormat(tempConfig),valid__isValid(tempConfig)&&(currentScore+=getParsingFlags(tempConfig).charsLeftOver,currentScore+=10*getParsingFlags(tempConfig).unusedTokens.length,getParsingFlags(tempConfig).score=currentScore,(null==scoreToBeat||scoreToBeat>currentScore)&&(scoreToBeat=currentScore,bestMoment=tempConfig));extend(config,bestMoment||tempConfig)}function configFromObject(config){if(!config._d){var i=normalizeObjectUnits(config._i);config._a=[i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],configFromArray(config)}}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));return res._nextDay&&(res.add(1,"d"),res._nextDay=void 0),res}function prepareConfig(config){var input=config._i,format=config._f;return config._locale=config._locale||locale_locales__getLocale(config._l),null===input||void 0===format&&""===input?valid__createInvalid({nullInput:!0}):("string"==typeof input&&(config._i=input=config._locale.preparse(input)),isMoment(input)?new Moment(checkOverflow(input)):(isArray(format)?configFromStringAndArray(config):format?configFromStringAndFormat(config):isDate(input)?config._d=input:configFromInput(config),config))}function configFromInput(config){var input=config._i;void 0===input?config._d=new Date:isDate(input)?config._d=new Date(+input):"string"==typeof input?configFromString(config):isArray(input)?(config._a=map(input.slice(0),function(obj){return parseInt(obj,10)}),configFromArray(config)):"object"==typeof input?configFromObject(config):"number"==typeof input?config._d=new Date(input):utils_hooks__hooks.createFromInputFallback(config)}function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};return"boolean"==typeof locale&&(strict=locale,locale=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=isUTC,c._l=locale,c._i=input,c._f=format,c._strict=strict,createFromConfig(c)}function local__createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!1)}function pickBy(fn,moments){var res,i;if(1===moments.length&&isArray(moments[0])&&(moments=moments[0]),!moments.length)return local__createLocal();for(res=moments[0],i=1;i<moments.length;++i)(!moments[i].isValid()||moments[i][fn](res))&&(res=moments[i]);return res}function min(){var args=[].slice.call(arguments,0);return pickBy("isBefore",args)}function max(){var args=[].slice.call(arguments,0);return pickBy("isAfter",args)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._milliseconds=+milliseconds+1e3*seconds+6e4*minutes+36e5*hours,this._days=+days+7*weeks,this._months=+months+3*quarters+12*years,this._data={},this._locale=locale_locales__getLocale(),this._bubble()}function isDuration(obj){return obj instanceof Duration}function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset(),sign="+";return 0>offset&&(offset=-offset,sign="-"),sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~offset%60,2)})}function offsetFromString(string){var matches=(string||"").match(matchOffset)||[],chunk=matches[matches.length-1]||[],parts=(chunk+"").match(chunkOffset)||["-",0,0],minutes=+(60*parts[1])+toInt(parts[2]);return"+"===parts[0]?minutes:-minutes}function cloneWithOffset(input,model){var res,diff;return model._isUTC?(res=model.clone(),diff=(isMoment(input)||isDate(input)?+input:+local__createLocal(input))-+res,res._d.setTime(+res._d+diff),utils_hooks__hooks.updateOffset(res,!1),res):local__createLocal(input).local()}function getDateOffset(m){return 15*-Math.round(m._d.getTimezoneOffset()/15)}function getSetOffset(input,keepLocalTime){var localAdjust,offset=this._offset||0;return null!=input?("string"==typeof input&&(input=offsetFromString(input)),Math.abs(input)<16&&(input=60*input),!this._isUTC&&keepLocalTime&&(localAdjust=getDateOffset(this)),this._offset=input,this._isUTC=!0,null!=localAdjust&&this.add(localAdjust,"m"),offset!==input&&(!keepLocalTime||this._changeInProgress?add_subtract__addSubtract(this,create__createDuration(input-offset,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,utils_hooks__hooks.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?offset:getDateOffset(this)}function getSetZone(input,keepLocalTime){return null!=input?("string"!=typeof input&&(input=-input),this.utcOffset(input,keepLocalTime),this):-this.utcOffset()}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){return this._isUTC&&(this.utcOffset(0,keepLocalTime),this._isUTC=!1,keepLocalTime&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(offsetFromString(this._i)),this}function hasAlignedHourOffset(input){return input=input?local__createLocal(input).utcOffset():0,(this.utcOffset()-input)%60===0}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var c={};if(copyConfig(c,this),c=prepareConfig(c),c._a){var other=c._isUTC?create_utc__createUTC(c._a):local__createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function isLocal(){return!this._isUTC}function isUtcOffset(){return this._isUTC}function isUtc(){return this._isUTC&&0===this._offset}function create__createDuration(input,key){var sign,ret,diffRes,duration=input,match=null;return isDuration(input)?duration={ms:input._milliseconds,d:input._days,M:input._months}:"number"==typeof input?(duration={},key?duration[key]=input:duration.milliseconds=input):(match=aspNetRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(match[MILLISECOND])*sign}):(match=create__isoRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),d:parseIso(match[4],sign),h:parseIso(match[5],sign),m:parseIso(match[6],sign),s:parseIso(match[7],sign),w:parseIso(match[8],sign)}):null==duration?duration={}:"object"==typeof duration&&("from"in duration||"to"in duration)&&(diffRes=momentsDifference(local__createLocal(duration.from),local__createLocal(duration.to)),duration={},duration.ms=diffRes.milliseconds,duration.M=diffRes.months),ret=new Duration(duration),isDuration(input)&&hasOwnProp(input,"_locale")&&(ret._locale=input._locale),ret}function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};return res.months=other.month()-base.month()+12*(other.year()-base.year()),base.clone().add(res.months,"M").isAfter(other)&&--res.months,res.milliseconds=+other-+base.clone().add(res.months,"M"),res}function momentsDifference(base,other){var res;return other=cloneWithOffset(other,base),base.isBefore(other)?res=positiveMomentsDifference(base,other):(res=positiveMomentsDifference(other,base),res.milliseconds=-res.milliseconds,res.months=-res.months),res}function createAdder(direction,name){return function(val,period){var dur,tmp;return null===period||isNaN(+period)||(deprecateSimple(name,"moment()."+name+"(period, number) is deprecated. Please use moment()."+name+"(number, period)."),tmp=val,val=period,period=tmp),val="string"==typeof val?+val:val,dur=create__createDuration(val,period),add_subtract__addSubtract(this,dur,direction),this}}function add_subtract__addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=duration._days,months=duration._months;updateOffset=null==updateOffset?!0:updateOffset,milliseconds&&mom._d.setTime(+mom._d+milliseconds*isAdding),days&&get_set__set(mom,"Date",get_set__get(mom,"Date")+days*isAdding),months&&setMonth(mom,get_set__get(mom,"Month")+months*isAdding),updateOffset&&utils_hooks__hooks.updateOffset(mom,days||months)}function moment_calendar__calendar(time,formats){var now=time||local__createLocal(),sod=cloneWithOffset(now,this).startOf("day"),diff=this.diff(sod,"days",!0),format=-6>diff?"sameElse":-1>diff?"lastWeek":0>diff?"lastDay":1>diff?"sameDay":2>diff?"nextDay":7>diff?"nextWeek":"sameElse";return this.format(formats&&formats[format]||this.localeData().calendar(format,this,local__createLocal(now)))}function clone(){return new Moment(this)}function isAfter(input,units){var inputMs;return units=normalizeUnits("undefined"!=typeof units?units:"millisecond"),"millisecond"===units?(input=isMoment(input)?input:local__createLocal(input),+this>+input):(inputMs=isMoment(input)?+input:+local__createLocal(input),inputMs<+this.clone().startOf(units))}function isBefore(input,units){var inputMs;return units=normalizeUnits("undefined"!=typeof units?units:"millisecond"),"millisecond"===units?(input=isMoment(input)?input:local__createLocal(input),+input>+this):(inputMs=isMoment(input)?+input:+local__createLocal(input),+this.clone().endOf(units)<inputMs)}function isBetween(from,to,units){return this.isAfter(from,units)&&this.isBefore(to,units)}function isSame(input,units){var inputMs;return units=normalizeUnits(units||"millisecond"),"millisecond"===units?(input=isMoment(input)?input:local__createLocal(input),+this===+input):(inputMs=+local__createLocal(input),+this.clone().startOf(units)<=inputMs&&inputMs<=+this.clone().endOf(units))}function diff(input,units,asFloat){var delta,output,that=cloneWithOffset(input,this),zoneDelta=6e4*(that.utcOffset()-this.utcOffset());return units=normalizeUnits(units),"year"===units||"month"===units||"quarter"===units?(output=monthDiff(this,that),"quarter"===units?output/=3:"year"===units&&(output/=12)):(delta=this-that,output="second"===units?delta/1e3:"minute"===units?delta/6e4:"hour"===units?delta/36e5:"day"===units?(delta-zoneDelta)/864e5:"week"===units?(delta-zoneDelta)/6048e5:delta),asFloat?output:absFloor(output)}function monthDiff(a,b){var anchor2,adjust,wholeMonthDiff=12*(b.year()-a.year())+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,"months");return 0>b-anchor?(anchor2=a.clone().add(wholeMonthDiff-1,"months"),adjust=(b-anchor)/(anchor-anchor2)):(anchor2=a.clone().add(wholeMonthDiff+1,"months"),adjust=(b-anchor)/(anchor2-anchor)),-(wholeMonthDiff+adjust)}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function moment_format__toISOString(){var m=this.clone().utc();return 0<m.year()&&m.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():formatMoment(m,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):formatMoment(m,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function format(inputString){var output=formatMoment(this,inputString||utils_hooks__hooks.defaultFormat);return this.localeData().postformat(output)}function from(time,withoutSuffix){return this.isValid()?create__createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function fromNow(withoutSuffix){return this.from(local__createLocal(),withoutSuffix)}function to(time,withoutSuffix){return this.isValid()?create__createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function toNow(withoutSuffix){return this.to(local__createLocal(),withoutSuffix)}function locale(key){var newLocaleData;return void 0===key?this._locale._abbr:(newLocaleData=locale_locales__getLocale(key),null!=newLocaleData&&(this._locale=newLocaleData),this)}function localeData(){return this._locale}function startOf(units){switch(units=normalizeUnits(units)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===units&&this.weekday(0),"isoWeek"===units&&this.isoWeekday(1),"quarter"===units&&this.month(3*Math.floor(this.month()/3)),this}function endOf(units){return units=normalizeUnits(units),void 0===units||"millisecond"===units?this:this.startOf(units).add(1,"isoWeek"===units?"week":units).subtract(1,"ms")}function to_type__valueOf(){return+this._d-6e4*(this._offset||0)}function unix(){return Math.floor(+this/1e3)}function toDate(){return this._offset?new Date(+this):this._d}function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function moment_valid__isValid(){return valid__isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter)}function weeksInYear(year,dow,doy){return weekOfYear(local__createLocal([year,11,31+dow-doy]),dow,doy).week}function getSetWeekYear(input){var year=weekOfYear(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==input?year:this.add(input-year,"y")}function getSetISOWeekYear(input){var year=weekOfYear(this,1,4).year;return null==input?year:this.add(input-year,"y")}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getSetQuarter(input){return null==input?Math.ceil((this.month()+1)/3):this.month(3*(input-1)+this.month()%3)}function parseWeekday(input,locale){return"string"!=typeof input?input:isNaN(input)?(input=locale.weekdaysParse(input),"number"==typeof input?input:null):parseInt(input,10)}function localeWeekdays(m){return this._weekdays[m.day()]}function localeWeekdaysShort(m){return this._weekdaysShort[m.day()]}function localeWeekdaysMin(m){return this._weekdaysMin[m.day()]}function localeWeekdaysParse(weekdayName){var i,mom,regex;for(this._weekdaysParse=this._weekdaysParse||[],
i=0;7>i;i++)if(this._weekdaysParse[i]||(mom=local__createLocal([2e3,1]).day(i),regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),this._weekdaysParse[i].test(weekdayName))return i}function getSetDayOfWeek(input){var day=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=input?(input=parseWeekday(input,this.localeData()),this.add(input-day,"d")):day}function getSetLocaleDayOfWeek(input){var weekday=(this.day()+7-this.localeData()._week.dow)%7;return null==input?weekday:this.add(input-weekday,"d")}function getSetISODayOfWeek(input){return null==input?this.day()||7:this.day(this.day()%7?input:input-7)}function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}function matchMeridiem(isStrict,locale){return locale._meridiemParse}function localeIsPM(input){return"p"===(input+"").toLowerCase().charAt(0)}function localeMeridiem(hours,minutes,isLower){return hours>11?isLower?"pm":"PM":isLower?"am":"AM"}function parseMs(input,array){array[MILLISECOND]=toInt(1e3*("0."+input))}function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}function moment__createUnix(input){return local__createLocal(1e3*input)}function moment__createInZone(){return local__createLocal.apply(null,arguments).parseZone()}function locale_calendar__calendar(key,mom,now){var output=this._calendar[key];return"function"==typeof output?output.call(mom,now):output}function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];return format||!formatUpper?format:(this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)}),this._longDateFormat[key])}function invalidDate(){return this._invalidDate}function ordinal(number){return this._ordinal.replace("%d",number)}function preParsePostFormat(string){return string}function relative__relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return"function"==typeof output?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)}function pastFuture(diff,output){var format=this._relativeTime[diff>0?"future":"past"];return"function"==typeof format?format(output):format.replace(/%s/i,output)}function locale_set__set(config){var prop,i;for(i in config)prop=config[i],"function"==typeof prop?this[i]=prop:this["_"+i]=prop;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function lists__get(format,index,field,setter){var locale=locale_locales__getLocale(),utc=create_utc__createUTC().set(setter,index);return locale[field](utc,format)}function list(format,index,field,count,setter){if("number"==typeof format&&(index=format,format=void 0),format=format||"",null!=index)return lists__get(format,index,field,setter);var i,out=[];for(i=0;count>i;i++)out[i]=lists__get(format,i,field,setter);return out}function lists__listMonths(format,index){return list(format,index,"months",12,"month")}function lists__listMonthsShort(format,index){return list(format,index,"monthsShort",12,"month")}function lists__listWeekdays(format,index){return list(format,index,"weekdays",7,"day")}function lists__listWeekdaysShort(format,index){return list(format,index,"weekdaysShort",7,"day")}function lists__listWeekdaysMin(format,index){return list(format,index,"weekdaysMin",7,"day")}function duration_abs__abs(){var data=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),data.milliseconds=mathAbs(data.milliseconds),data.seconds=mathAbs(data.seconds),data.minutes=mathAbs(data.minutes),data.hours=mathAbs(data.hours),data.months=mathAbs(data.months),data.years=mathAbs(data.years),this}function duration_add_subtract__addSubtract(duration,input,value,direction){var other=create__createDuration(input,value);return duration._milliseconds+=direction*other._milliseconds,duration._days+=direction*other._days,duration._months+=direction*other._months,duration._bubble()}function duration_add_subtract__add(input,value){return duration_add_subtract__addSubtract(this,input,value,1)}function duration_add_subtract__subtract(input,value){return duration_add_subtract__addSubtract(this,input,value,-1)}function absCeil(number){return 0>number?Math.floor(number):Math.ceil(number)}function bubble(){var seconds,minutes,hours,years,monthsFromDays,milliseconds=this._milliseconds,days=this._days,months=this._months,data=this._data;return milliseconds>=0&&days>=0&&months>=0||0>=milliseconds&&0>=days&&0>=months||(milliseconds+=864e5*absCeil(monthsToDays(months)+days),days=0,months=0),data.milliseconds=milliseconds%1e3,seconds=absFloor(milliseconds/1e3),data.seconds=seconds%60,minutes=absFloor(seconds/60),data.minutes=minutes%60,hours=absFloor(minutes/60),data.hours=hours%24,days+=absFloor(hours/24),monthsFromDays=absFloor(daysToMonths(days)),months+=monthsFromDays,days-=absCeil(monthsToDays(monthsFromDays)),years=absFloor(months/12),months%=12,data.days=days,data.months=months,data.years=years,this}function daysToMonths(days){return 4800*days/146097}function monthsToDays(months){return 146097*months/4800}function as(units){var days,months,milliseconds=this._milliseconds;if(units=normalizeUnits(units),"month"===units||"year"===units)return days=this._days+milliseconds/864e5,months=this._months+daysToMonths(days),"month"===units?months:months/12;switch(days=this._days+Math.round(monthsToDays(this._months)),units){case"week":return days/7+milliseconds/6048e5;case"day":return days+milliseconds/864e5;case"hour":return 24*days+milliseconds/36e5;case"minute":return 1440*days+milliseconds/6e4;case"second":return 86400*days+milliseconds/1e3;case"millisecond":return Math.floor(864e5*days)+milliseconds;default:throw new Error("Unknown unit "+units)}}function duration_as__valueOf(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12)}function makeAs(alias){return function(){return this.as(alias)}}function duration_get__get(units){return units=normalizeUnits(units),this[units+"s"]()}function makeGetter(name){return function(){return this._data[name]}}function weeks(){return absFloor(this.days()/7)}function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function duration_humanize__relativeTime(posNegDuration,withoutSuffix,locale){var duration=create__createDuration(posNegDuration).abs(),seconds=round(duration.as("s")),minutes=round(duration.as("m")),hours=round(duration.as("h")),days=round(duration.as("d")),months=round(duration.as("M")),years=round(duration.as("y")),a=seconds<thresholds.s&&["s",seconds]||1===minutes&&["m"]||minutes<thresholds.m&&["mm",minutes]||1===hours&&["h"]||hours<thresholds.h&&["hh",hours]||1===days&&["d"]||days<thresholds.d&&["dd",days]||1===months&&["M"]||months<thresholds.M&&["MM",months]||1===years&&["y"]||["yy",years];return a[2]=withoutSuffix,a[3]=+posNegDuration>0,a[4]=locale,substituteTimeAgo.apply(null,a)}function duration_humanize__getSetRelativeTimeThreshold(threshold,limit){return void 0===thresholds[threshold]?!1:void 0===limit?thresholds[threshold]:(thresholds[threshold]=limit,!0)}function humanize(withSuffix){var locale=this.localeData(),output=duration_humanize__relativeTime(this,!withSuffix,locale);return withSuffix&&(output=locale.pastFuture(+this,output)),locale.postformat(output)}function iso_string__toISOString(){var minutes,hours,years,seconds=iso_string__abs(this._milliseconds)/1e3,days=iso_string__abs(this._days),months=iso_string__abs(this._months);minutes=absFloor(seconds/60),hours=absFloor(minutes/60),seconds%=60,minutes%=60,years=absFloor(months/12),months%=12;var Y=years,M=months,D=days,h=hours,m=minutes,s=seconds,total=this.asSeconds();return total?(0>total?"-":"")+"P"+(Y?Y+"Y":"")+(M?M+"M":"")+(D?D+"D":"")+(h||m||s?"T":"")+(h?h+"H":"")+(m?m+"M":"")+(s?s+"S":""):"P0D"}var hookCallback,globalLocale,momentProperties=utils_hooks__hooks.momentProperties=[],updateInProgress=!1,locales={},aliases={},formattingTokens=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={},match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,regexes={},tokens={},YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6;addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(format){return this.localeData().monthsShort(this,format)}),addFormatToken("MMMM",0,0,function(format){return this.localeData().months(this,format)}),addUnitAlias("month","M"),addRegexToken("M",match1to2),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",matchWord),addRegexToken("MMMM",matchWord),addParseToken(["M","MM"],function(input,array){array[MONTH]=toInt(input)-1}),addParseToken(["MMM","MMMM"],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);null!=month?array[MONTH]=month:getParsingFlags(config).invalidMonth=input});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),deprecations={};utils_hooks__hooks.suppressDeprecationWarnings=!1;var from_string__isoRegex=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],isoTimes=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],aspNetJsonRegex=/^\/?Date\((\-?\d+)/i;utils_hooks__hooks.createFromInputFallback=deprecate("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(config){config._d=new Date(config._i+(config._useUTC?" UTC":""))}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addUnitAlias("year","y"),addRegexToken("Y",matchSigned),addRegexToken("YY",match1to2,match2),addRegexToken("YYYY",match1to4,match4),addRegexToken("YYYYY",match1to6,match6),addRegexToken("YYYYYY",match1to6,match6),addParseToken(["YYYYY","YYYYYY"],YEAR),addParseToken("YYYY",function(input,array){array[YEAR]=2===input.length?utils_hooks__hooks.parseTwoDigitYear(input):toInt(input)}),addParseToken("YY",function(input,array){array[YEAR]=utils_hooks__hooks.parseTwoDigitYear(input)}),utils_hooks__hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!1);addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addUnitAlias("week","w"),addUnitAlias("isoWeek","W"),addRegexToken("w",match1to2),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(input,week,config,token){week[token.substr(0,1)]=toInt(input)});var defaultLocaleWeek={dow:0,doy:6};addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addUnitAlias("dayOfYear","DDD"),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(input,array,config){config._dayOfYear=toInt(input)}),utils_hooks__hooks.ISO_8601=function(){};var prototypeMin=deprecate("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var other=local__createLocal.apply(null,arguments);return this>other?this:other}),prototypeMax=deprecate("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var other=local__createLocal.apply(null,arguments);return other>this?this:other});offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchOffset),addRegexToken("ZZ",matchOffset),addParseToken(["Z","ZZ"],function(input,array,config){config._useUTC=!0,config._tzm=offsetFromString(input)});var chunkOffset=/([\+\-]|\d\d)/gi;utils_hooks__hooks.updateOffset=function(){};var aspNetRegex=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,create__isoRegex=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;create__createDuration.fn=Duration.prototype;var add_subtract__add=createAdder(1,"add"),add_subtract__subtract=createAdder(-1,"subtract");utils_hooks__hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(key){return void 0===key?this.localeData():this.locale(key)});addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addUnitAlias("weekYear","gg"),addUnitAlias("isoWeekYear","GG"),addRegexToken("G",matchSigned),addRegexToken("g",matchSigned),addRegexToken("GG",match1to2,match2),addRegexToken("gg",match1to2,match2),addRegexToken("GGGG",match1to4,match4),addRegexToken("gggg",match1to4,match4),addRegexToken("GGGGG",match1to6,match6),addRegexToken("ggggg",match1to6,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(input,week,config,token){week[token.substr(0,2)]=toInt(input)}),addWeekParseToken(["gg","GG"],function(input,week,config,token){week[token]=utils_hooks__hooks.parseTwoDigitYear(input)}),addFormatToken("Q",0,0,"quarter"),addUnitAlias("quarter","Q"),addRegexToken("Q",match1),addParseToken("Q",function(input,array){array[MONTH]=3*(toInt(input)-1)}),addFormatToken("D",["DD",2],"Do","date"),addUnitAlias("date","D"),addRegexToken("D",match1to2),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(isStrict,locale){return isStrict?locale._ordinalParse:locale._ordinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(input,array){array[DATE]=toInt(input.match(match1to2)[0],10)});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(format){return this.localeData().weekdaysMin(this,format)}),addFormatToken("ddd",0,0,function(format){return this.localeData().weekdaysShort(this,format)}),addFormatToken("dddd",0,0,function(format){return this.localeData().weekdays(this,format)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addUnitAlias("day","d"),addUnitAlias("weekday","e"),addUnitAlias("isoWeekday","E"),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",matchWord),addRegexToken("ddd",matchWord),addRegexToken("dddd",matchWord),addWeekParseToken(["dd","ddd","dddd"],function(input,week,config){var weekday=config._locale.weekdaysParse(input);null!=weekday?week.d=weekday:getParsingFlags(config).invalidWeekday=input}),addWeekParseToken(["d","e","E"],function(input,week,config,token){week[token]=toInt(input)});var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_");addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,function(){return this.hours()%12||12}),meridiem("a",!0),meridiem("A",!1),addUnitAlias("hour","h"),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2),addRegexToken("h",match1to2),addRegexToken("HH",match1to2,match2),addRegexToken("hh",match1to2,match2),addParseToken(["H","HH"],HOUR),addParseToken(["a","A"],function(input,array,config){config._isPm=config._locale.isPM(input),config._meridiem=input}),addParseToken(["h","hh"],function(input,array,config){array[HOUR]=toInt(input),getParsingFlags(config).bigHour=!0});var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);addFormatToken("m",["mm",2],0,"minute"),addUnitAlias("minute","m"),addRegexToken("m",match1to2),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addUnitAlias("second","s"),addRegexToken("s",match1to2),addRegexToken("ss",match1to2,match2),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addUnitAlias("millisecond","ms"),addRegexToken("S",match1to3,match1),addRegexToken("SS",match1to3,match2),addRegexToken("SSS",match1to3,match3);var token;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);var getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var momentPrototype__proto=Moment.prototype;momentPrototype__proto.add=add_subtract__add,momentPrototype__proto.calendar=moment_calendar__calendar,momentPrototype__proto.clone=clone,momentPrototype__proto.diff=diff,momentPrototype__proto.endOf=endOf,momentPrototype__proto.format=format,momentPrototype__proto.from=from,momentPrototype__proto.fromNow=fromNow,momentPrototype__proto.to=to,momentPrototype__proto.toNow=toNow,momentPrototype__proto.get=getSet,momentPrototype__proto.invalidAt=invalidAt,momentPrototype__proto.isAfter=isAfter,momentPrototype__proto.isBefore=isBefore,momentPrototype__proto.isBetween=isBetween,momentPrototype__proto.isSame=isSame,momentPrototype__proto.isValid=moment_valid__isValid,momentPrototype__proto.lang=lang,momentPrototype__proto.locale=locale,momentPrototype__proto.localeData=localeData,momentPrototype__proto.max=prototypeMax,momentPrototype__proto.min=prototypeMin,momentPrototype__proto.parsingFlags=parsingFlags,momentPrototype__proto.set=getSet,momentPrototype__proto.startOf=startOf,momentPrototype__proto.subtract=add_subtract__subtract,momentPrototype__proto.toArray=toArray,momentPrototype__proto.toObject=toObject,momentPrototype__proto.toDate=toDate,momentPrototype__proto.toISOString=moment_format__toISOString,momentPrototype__proto.toJSON=moment_format__toISOString,momentPrototype__proto.toString=toString,momentPrototype__proto.unix=unix,momentPrototype__proto.valueOf=to_type__valueOf,momentPrototype__proto.year=getSetYear,momentPrototype__proto.isLeapYear=getIsLeapYear,momentPrototype__proto.weekYear=getSetWeekYear,momentPrototype__proto.isoWeekYear=getSetISOWeekYear,momentPrototype__proto.quarter=momentPrototype__proto.quarters=getSetQuarter,momentPrototype__proto.month=getSetMonth,momentPrototype__proto.daysInMonth=getDaysInMonth,momentPrototype__proto.week=momentPrototype__proto.weeks=getSetWeek,momentPrototype__proto.isoWeek=momentPrototype__proto.isoWeeks=getSetISOWeek,momentPrototype__proto.weeksInYear=getWeeksInYear,momentPrototype__proto.isoWeeksInYear=getISOWeeksInYear,momentPrototype__proto.date=getSetDayOfMonth,momentPrototype__proto.day=momentPrototype__proto.days=getSetDayOfWeek,momentPrototype__proto.weekday=getSetLocaleDayOfWeek,momentPrototype__proto.isoWeekday=getSetISODayOfWeek,momentPrototype__proto.dayOfYear=getSetDayOfYear,momentPrototype__proto.hour=momentPrototype__proto.hours=getSetHour,momentPrototype__proto.minute=momentPrototype__proto.minutes=getSetMinute,momentPrototype__proto.second=momentPrototype__proto.seconds=getSetSecond,momentPrototype__proto.millisecond=momentPrototype__proto.milliseconds=getSetMillisecond,momentPrototype__proto.utcOffset=getSetOffset,momentPrototype__proto.utc=setOffsetToUTC,momentPrototype__proto.local=setOffsetToLocal,momentPrototype__proto.parseZone=setOffsetToParsedOffset,momentPrototype__proto.hasAlignedHourOffset=hasAlignedHourOffset,momentPrototype__proto.isDST=isDaylightSavingTime,momentPrototype__proto.isDSTShifted=isDaylightSavingTimeShifted,momentPrototype__proto.isLocal=isLocal,momentPrototype__proto.isUtcOffset=isUtcOffset,momentPrototype__proto.isUtc=isUtc,momentPrototype__proto.isUTC=isUtc,momentPrototype__proto.zoneAbbr=getZoneAbbr,momentPrototype__proto.zoneName=getZoneName,momentPrototype__proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth),momentPrototype__proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),momentPrototype__proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear),momentPrototype__proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",getSetZone);var momentPrototype=momentPrototype__proto,defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},defaultInvalidDate="Invalid date",defaultOrdinal="%d",defaultOrdinalParse=/\d{1,2}/,defaultRelativeTime={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"},prototype__proto=Locale.prototype;prototype__proto._calendar=defaultCalendar,prototype__proto.calendar=locale_calendar__calendar,prototype__proto._longDateFormat=defaultLongDateFormat,prototype__proto.longDateFormat=longDateFormat,prototype__proto._invalidDate=defaultInvalidDate,prototype__proto.invalidDate=invalidDate,prototype__proto._ordinal=defaultOrdinal,prototype__proto.ordinal=ordinal,prototype__proto._ordinalParse=defaultOrdinalParse,prototype__proto.preparse=preParsePostFormat,prototype__proto.postformat=preParsePostFormat,prototype__proto._relativeTime=defaultRelativeTime,prototype__proto.relativeTime=relative__relativeTime,prototype__proto.pastFuture=pastFuture,prototype__proto.set=locale_set__set,prototype__proto.months=localeMonths,prototype__proto._months=defaultLocaleMonths,prototype__proto.monthsShort=localeMonthsShort,prototype__proto._monthsShort=defaultLocaleMonthsShort,prototype__proto.monthsParse=localeMonthsParse,prototype__proto.week=localeWeek,prototype__proto._week=defaultLocaleWeek,prototype__proto.firstDayOfYear=localeFirstDayOfYear,prototype__proto.firstDayOfWeek=localeFirstDayOfWeek,prototype__proto.weekdays=localeWeekdays,prototype__proto._weekdays=defaultLocaleWeekdays,prototype__proto.weekdaysMin=localeWeekdaysMin,prototype__proto._weekdaysMin=defaultLocaleWeekdaysMin,prototype__proto.weekdaysShort=localeWeekdaysShort,prototype__proto._weekdaysShort=defaultLocaleWeekdaysShort,prototype__proto.weekdaysParse=localeWeekdaysParse,prototype__proto.isPM=localeIsPM,prototype__proto._meridiemParse=defaultLocaleMeridiemParse,prototype__proto.meridiem=localeMeridiem,locale_locales__getSetGlobalLocale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=1===toInt(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return number+output}}),utils_hooks__hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",locale_locales__getSetGlobalLocale),utils_hooks__hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",locale_locales__getLocale);var mathAbs=Math.abs,asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asYears=makeAs("y"),milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years"),round=Math.round,thresholds={s:45,m:45,h:22,d:26,M:11},iso_string__abs=Math.abs,duration_prototype__proto=Duration.prototype;duration_prototype__proto.abs=duration_abs__abs,duration_prototype__proto.add=duration_add_subtract__add,duration_prototype__proto.subtract=duration_add_subtract__subtract,duration_prototype__proto.as=as,duration_prototype__proto.asMilliseconds=asMilliseconds,duration_prototype__proto.asSeconds=asSeconds,duration_prototype__proto.asMinutes=asMinutes,duration_prototype__proto.asHours=asHours,duration_prototype__proto.asDays=asDays,duration_prototype__proto.asWeeks=asWeeks,duration_prototype__proto.asMonths=asMonths,duration_prototype__proto.asYears=asYears,duration_prototype__proto.valueOf=duration_as__valueOf,duration_prototype__proto._bubble=bubble,duration_prototype__proto.get=duration_get__get,duration_prototype__proto.milliseconds=milliseconds,duration_prototype__proto.seconds=seconds,duration_prototype__proto.minutes=minutes,duration_prototype__proto.hours=hours,duration_prototype__proto.days=days,duration_prototype__proto.weeks=weeks,duration_prototype__proto.months=months,duration_prototype__proto.years=years,duration_prototype__proto.humanize=humanize,duration_prototype__proto.toISOString=iso_string__toISOString,duration_prototype__proto.toString=iso_string__toISOString,duration_prototype__proto.toJSON=iso_string__toISOString,duration_prototype__proto.locale=locale,duration_prototype__proto.localeData=localeData,duration_prototype__proto.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",iso_string__toISOString),duration_prototype__proto.lang=lang,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",matchSigned),addRegexToken("X",matchTimestamp),addParseToken("X",function(input,array,config){config._d=new Date(1e3*parseFloat(input,10))}),addParseToken("x",function(input,array,config){config._d=new Date(toInt(input))}),utils_hooks__hooks.version="2.10.6",setHookCallback(local__createLocal),utils_hooks__hooks.fn=momentPrototype,utils_hooks__hooks.min=min,utils_hooks__hooks.max=max,utils_hooks__hooks.utc=create_utc__createUTC,utils_hooks__hooks.unix=moment__createUnix,utils_hooks__hooks.months=lists__listMonths,utils_hooks__hooks.isDate=isDate,utils_hooks__hooks.locale=locale_locales__getSetGlobalLocale,utils_hooks__hooks.invalid=valid__createInvalid,utils_hooks__hooks.duration=create__createDuration,utils_hooks__hooks.isMoment=isMoment,utils_hooks__hooks.weekdays=lists__listWeekdays,utils_hooks__hooks.parseZone=moment__createInZone,utils_hooks__hooks.localeData=locale_locales__getLocale,utils_hooks__hooks.isDuration=isDuration,utils_hooks__hooks.monthsShort=lists__listMonthsShort,utils_hooks__hooks.weekdaysMin=lists__listWeekdaysMin,utils_hooks__hooks.defineLocale=defineLocale,utils_hooks__hooks.weekdaysShort=lists__listWeekdaysShort,utils_hooks__hooks.normalizeUnits=normalizeUnits,utils_hooks__hooks.relativeTimeThreshold=duration_humanize__getSetRelativeTimeThreshold;var _moment=utils_hooks__hooks;return _moment}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function($){"use strict";var version=$.fn.jquery.split(" ")[0].split(".");if(version[0]<2&&version[1]<9||1==version[0]&&9==version[1]&&version[2]<1||version[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function($){"use strict";function transitionEnd(){var el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames)if(void 0!==el.style[name])return{end:transEndEventNames[name]};return!1}$.fn.emulateTransitionEnd=function(duration){var called=!1,$el=this;$(this).one("bsTransitionEnd",function(){called=!0});var callback=function(){called||$($el).trigger($.support.transition.end)};return setTimeout(callback,duration),this},$(function(){$.support.transition=transitionEnd(),$.support.transition&&($.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){return $(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.alert");data||$this.data("bs.alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})}var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.VERSION="3.3.6",Alert.TRANSITION_DURATION=150,Alert.prototype.close=function(e){function removeElement(){$parent.detach().trigger("closed.bs.alert").remove()}var $this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,""));var $parent=$(selector);e&&e.preventDefault(),$parent.length||($parent=$this.closest(".alert")),$parent.trigger(e=$.Event("close.bs.alert")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.one("bsTransitionEnd",removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement())};var old=$.fn.alert;$.fn.alert=Plugin,$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.bs.alert.data-api",dismiss,Alert.prototype.close)}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.button"),options="object"==typeof option&&option;data||$this.data("bs.button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})}var Button=function(element,options){this.$element=$(element),this.options=$.extend({},Button.DEFAULTS,options),this.isLoading=!1};Button.VERSION="3.3.6",Button.DEFAULTS={loadingText:"loading..."},Button.prototype.setState=function(state){var d="disabled",$el=this.$element,val=$el.is("input")?"val":"html",data=$el.data();state+="Text",null==data.resetText&&$el.data("resetText",$el[val]()),setTimeout($.proxy(function(){$el[val](null==data[state]?this.options[state]:data[state]),"loadingText"==state?(this.isLoading=!0,$el.addClass(d).attr(d,d)):this.isLoading&&(this.isLoading=!1,$el.removeClass(d).removeAttr(d))},this),0)},Button.prototype.toggle=function(){var changed=!0,$parent=this.$element.closest('[data-toggle="buttons"]');if($parent.length){var $input=this.$element.find("input");"radio"==$input.prop("type")?($input.prop("checked")&&(changed=!1),
$parent.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==$input.prop("type")&&($input.prop("checked")!==this.$element.hasClass("active")&&(changed=!1),this.$element.toggleClass("active")),$input.prop("checked",this.$element.hasClass("active")),changed&&$input.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=Plugin,$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),Plugin.call($btn,"toggle"),$(e.target).is('input[type="radio"]')||$(e.target).is('input[type="checkbox"]')||e.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){$(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.carousel"),options=$.extend({},Carousel.DEFAULTS,$this.data(),"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("bs.carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.pause().cycle()})}var Carousel=function(element,options){this.$element=$(element),this.$indicators=this.$element.find(".carousel-indicators"),this.options=options,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",$.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",$.proxy(this.pause,this)).on("mouseleave.bs.carousel",$.proxy(this.cycle,this))};Carousel.VERSION="3.3.6",Carousel.TRANSITION_DURATION=600,Carousel.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},Carousel.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},Carousel.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},Carousel.prototype.getItemIndex=function(item){return this.$items=item.parent().children(".item"),this.$items.index(item||this.$active)},Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active),willWrap="prev"==direction&&0===activeIndex||"next"==direction&&activeIndex==this.$items.length-1;if(willWrap&&!this.options.wrap)return active;var delta="prev"==direction?-1:1,itemIndex=(activeIndex+delta)%this.$items.length;return this.$items.eq(itemIndex)},Carousel.prototype.to=function(pos){var that=this,activeIndex=this.getItemIndex(this.$active=this.$element.find(".item.active"));return pos>this.$items.length-1||0>pos?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){that.to(pos)}):activeIndex==pos?this.pause().cycle():this.slide(pos>activeIndex?"next":"prev",this.$items.eq(pos))},Carousel.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition&&(this.$element.trigger($.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},Carousel.prototype.next=function(){return this.sliding?void 0:this.slide("next")},Carousel.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},Carousel.prototype.slide=function(type,next){var $active=this.$element.find(".item.active"),$next=next||this.getItemForDirection(type,$active),isCycling=this.interval,direction="next"==type?"left":"right",that=this;if($next.hasClass("active"))return this.sliding=!1;var relatedTarget=$next[0],slideEvent=$.Event("slide.bs.carousel",{relatedTarget:relatedTarget,direction:direction});if(this.$element.trigger(slideEvent),!slideEvent.isDefaultPrevented()){if(this.sliding=!0,isCycling&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]);$nextIndicator&&$nextIndicator.addClass("active")}var slidEvent=$.Event("slid.bs.carousel",{relatedTarget:relatedTarget,direction:direction});return $.support.transition&&this.$element.hasClass("slide")?($next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),$active.one("bsTransitionEnd",function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)):($active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger(slidEvent)),isCycling&&this.cycle(),this}};var old=$.fn.carousel;$.fn.carousel=Plugin,$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this};var clickHandler=function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""));if($target.hasClass("carousel")){var options=$.extend({},$target.data(),$this.data()),slideIndex=$this.attr("data-slide-to");slideIndex&&(options.interval=!1),Plugin.call($target,options),slideIndex&&$target.data("bs.carousel").to(slideIndex),e.preventDefault()}};$(document).on("click.bs.carousel.data-api","[data-slide]",clickHandler).on("click.bs.carousel.data-api","[data-slide-to]",clickHandler),$(window).on("load",function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this);Plugin.call($carousel,$carousel.data())})})}(jQuery),+function($){"use strict";function getTargetFromTrigger($trigger){var href,target=$trigger.attr("data-target")||(href=$trigger.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"");return $(target)}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.collapse"),options=$.extend({},Collapse.DEFAULTS,$this.data(),"object"==typeof option&&option);!data&&options.toggle&&/show|hide/.test(option)&&(options.toggle=!1),data||$this.data("bs.collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})}var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},Collapse.DEFAULTS,options),this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],[data-toggle="collapse"][data-target="#'+element.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};Collapse.VERSION="3.3.6",Collapse.TRANSITION_DURATION=350,Collapse.DEFAULTS={toggle:!0},Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},Collapse.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var activesData,actives=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(actives&&actives.length&&(activesData=actives.data("bs.collapse"),activesData&&activesData.transitioning))){var startEvent=$.Event("show.bs.collapse");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){actives&&actives.length&&(Plugin.call(actives,"hide"),activesData||actives.data("bs.collapse",null));var dimension=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[dimension](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var complete=function(){this.$element.removeClass("collapsing").addClass("collapse in")[dimension](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase(["scroll",dimension].join("-"));this.$element.one("bsTransitionEnd",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])}}}},Collapse.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var startEvent=$.Event("hide.bs.collapse");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var complete=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return $.support.transition?void this.$element[dimension](0).one("bsTransitionEnd",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION):complete.call(this)}}},Collapse.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element);this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()},Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass("in");$element.attr("aria-expanded",isOpen),$trigger.toggleClass("collapsed",!isOpen).attr("aria-expanded",isOpen)};var old=$.fn.collapse;$.fn.collapse=Plugin,$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var $this=$(this);$this.attr("data-target")||e.preventDefault();var $target=getTargetFromTrigger($this),data=$target.data("bs.collapse"),option=data?"toggle":$this.data();Plugin.call($target,option)})}(jQuery),+function($){"use strict";function getParent($this){var selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,""));var $parent=selector&&$(selector);return $parent&&$parent.length?$parent:$this.parent()}function clearMenus(e){e&&3===e.which||($(backdrop).remove(),$(toggle).each(function(){var $this=$(this),$parent=getParent($this),relatedTarget={relatedTarget:this};$parent.hasClass("open")&&(e&&"click"==e.type&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target)||($parent.trigger(e=$.Event("hide.bs.dropdown",relatedTarget)),e.isDefaultPrevented()||($this.attr("aria-expanded","false"),$parent.removeClass("open").trigger($.Event("hidden.bs.dropdown",relatedTarget)))))}))}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.dropdown");data||$this.data("bs.dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})}var backdrop=".dropdown-backdrop",toggle='[data-toggle="dropdown"]',Dropdown=function(element){$(element).on("click.bs.dropdown",this.toggle)};Dropdown.VERSION="3.3.6",Dropdown.prototype.toggle=function(e){var $this=$(this);if(!$this.is(".disabled, :disabled")){var $parent=getParent($this),isActive=$parent.hasClass("open");if(clearMenus(),!isActive){"ontouchstart"in document.documentElement&&!$parent.closest(".navbar-nav").length&&$(document.createElement("div")).addClass("dropdown-backdrop").insertAfter($(this)).on("click",clearMenus);var relatedTarget={relatedTarget:this};if($parent.trigger(e=$.Event("show.bs.dropdown",relatedTarget)),e.isDefaultPrevented())return;$this.trigger("focus").attr("aria-expanded","true"),$parent.toggleClass("open").trigger($.Event("shown.bs.dropdown",relatedTarget))}return!1}},Dropdown.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var $this=$(this);if(e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled")){var $parent=getParent($this),isActive=$parent.hasClass("open");if(!isActive&&27!=e.which||isActive&&27==e.which)return 27==e.which&&$parent.find(toggle).trigger("focus"),$this.trigger("click");var desc=" li:not(.disabled):visible a",$items=$parent.find(".dropdown-menu"+desc);if($items.length){var index=$items.index(e.target);38==e.which&&index>0&&index--,40==e.which&&index<$items.length-1&&index++,~index||(index=0),$items.eq(index).trigger("focus")}}}};var old=$.fn.dropdown;$.fn.dropdown=Plugin,$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on("click.bs.dropdown.data-api",clearMenus).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.bs.dropdown.data-api",toggle,Dropdown.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",Dropdown.prototype.keydown)}(jQuery),+function($){"use strict";function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this),data=$this.data("bs.modal"),options=$.extend({},Modal.DEFAULTS,$this.data(),"object"==typeof option&&option);data||$this.data("bs.modal",data=new Modal(this,options)),"string"==typeof option?data[option](_relatedTarget):options.show&&data.show(_relatedTarget)})}var Modal=function(element,options){this.options=options,this.$body=$(document.body),this.$element=$(element),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,$.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};Modal.VERSION="3.3.6",Modal.TRANSITION_DURATION=300,Modal.BACKDROP_TRANSITION_DURATION=150,Modal.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)},Modal.prototype.show=function(_relatedTarget){var that=this,e=$.Event("show.bs.modal",{relatedTarget:_relatedTarget});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',$.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){that.$element.one("mouseup.dismiss.bs.modal",function(e){$(e.target).is(that.$element)&&(that.ignoreBackdropClick=!0)})}),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(that.$body),that.$element.show().scrollTop(0),that.adjustDialog(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in"),that.enforceFocus();var e=$.Event("shown.bs.modal",{relatedTarget:_relatedTarget});transition?that.$dialog.one("bsTransitionEnd",function(){that.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger("focus").trigger(e)}))},Modal.prototype.hide=function(e){e&&e.preventDefault(),e=$.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),$(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),$.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal())},Modal.prototype.enforceFocus=function(){$(document).off("focusin.bs.modal").on("focusin.bs.modal",$.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},Modal.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",$.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},Modal.prototype.resize=function(){this.isShown?$(window).on("resize.bs.modal",$.proxy(this.handleUpdate,this)):$(window).off("resize.bs.modal")},Modal.prototype.hideModal=function(){var that=this;this.$element.hide(),this.backdrop(function(){that.$body.removeClass("modal-open"),that.resetAdjustments(),that.resetScrollbar(),that.$element.trigger("hidden.bs.modal")})},Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},Modal.prototype.backdrop=function(callback){var that=this,animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;if(this.$backdrop=$(document.createElement("div")).addClass("modal-backdrop "+animate).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",$.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!callback)return;doAnimate?this.$backdrop.one("bsTransitionEnd",callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var callbackRemove=function(){that.removeBackdrop(),callback&&callback()};$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else callback&&callback()},Modal.prototype.handleUpdate=function(){this.adjustDialog()},Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:""})},Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth;if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect();fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth,this.scrollbarWidth=this.measureScrollbar()},Modal.prototype.setScrollbar=function(){var bodyPad=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",bodyPad+this.scrollbarWidth)},Modal.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement("div");scrollDiv.className="modal-scrollbar-measure",this.$body.append(scrollDiv);var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth;return this.$body[0].removeChild(scrollDiv),scrollbarWidth};var old=$.fn.modal;$.fn.modal=Plugin,$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("bs.modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());$this.is("a")&&e.preventDefault(),$target.one("show.bs.modal",function(showEvent){showEvent.isDefaultPrevented()||$target.one("hidden.bs.modal",function(){$this.is(":visible")&&$this.trigger("focus")})}),Plugin.call($target,option,this)})}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tooltip"),options="object"==typeof option&&option;(data||!/destroy|hide/.test(option))&&(data||$this.data("bs.tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]())})}var Tooltip=function(element,options){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",element,options)};Tooltip.VERSION="3.3.6",Tooltip.TRANSITION_DURATION=150,Tooltip.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},Tooltip.prototype.init=function(type,element,options){if(this.enabled=!0,this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var triggers=this.options.trigger.split(" "),i=triggers.length;i--;){var trigger=triggers[i];if("click"==trigger)this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this));else if("manual"!=trigger){var eventIn="hover"==trigger?"mouseenter":"focusin",eventOut="hover"==trigger?"mouseleave":"focusout";this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS},Tooltip.prototype.getOptions=function(options){return options=$.extend({},this.getDefaults(),this.$element.data(),options),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},Tooltip.prototype.getDelegateOptions=function(){var options={},defaults=this.getDefaults();return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)}),options},Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);return self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),obj instanceof $.Event&&(self.inState["focusin"==obj.type?"focus":"hover"]=!0),self.tip().hasClass("in")||"in"==self.hoverState?void(self.hoverState="in"):(clearTimeout(self.timeout),self.hoverState="in",self.options.delay&&self.options.delay.show?void(self.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show)):self.show())},Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState)if(this.inState[key])return!0;return!1},Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);return self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),obj instanceof $.Event&&(self.inState["focusout"==obj.type?"focus":"hover"]=!1),self.isInStateTrue()?void 0:(clearTimeout(self.timeout),self.hoverState="out",self.options.delay&&self.options.delay.hide?void(self.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide)):self.hide())},Tooltip.prototype.show=function(){var e=$.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!inDom)return;var that=this,$tip=this.tip(),tipId=this.getUID(this.type);this.setContent(),$tip.attr("id",tipId),this.$element.attr("aria-describedby",tipId),this.options.animation&&$tip.addClass("fade");var placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,autoToken=/\s?auto?\s?/i,autoPlace=autoToken.test(placement);autoPlace&&(placement=placement.replace(autoToken,"")||"top"),$tip.detach().css({top:0,left:0,display:"block"}).addClass(placement).data("bs."+this.type,this),this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;if(autoPlace){var orgPlacement=placement,viewportDim=this.getPosition(this.$viewport);placement="bottom"==placement&&pos.bottom+actualHeight>viewportDim.bottom?"top":"top"==placement&&pos.top-actualHeight<viewportDim.top?"bottom":"right"==placement&&pos.right+actualWidth>viewportDim.width?"left":"left"==placement&&pos.left-actualWidth<viewportDim.left?"right":placement,$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight);this.applyPlacement(calculatedOffset,placement);var complete=function(){var prevHoverState=that.hoverState;that.$element.trigger("shown.bs."+that.type),that.hoverState=null,"out"==prevHoverState&&that.leave(that)};$.support.transition&&this.$tip.hasClass("fade")?$tip.one("bsTransitionEnd",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}},Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight,marginTop=parseInt($tip.css("margin-top"),10),marginLeft=parseInt($tip.css("margin-left"),10);isNaN(marginTop)&&(marginTop=0),isNaN(marginLeft)&&(marginLeft=0),offset.top+=marginTop,offset.left+=marginLeft,$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0),$tip.addClass("in");var actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;"top"==placement&&actualHeight!=height&&(offset.top=offset.top+height-actualHeight);var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight);delta.left?offset.left+=delta.left:offset.top+=delta.top;var isVertical=/top|bottom/.test(placement),arrowDelta=isVertical?2*delta.left-width+actualWidth:2*delta.top-height+actualHeight,arrowOffsetPosition=isVertical?"offsetWidth":"offsetHeight";$tip.offset(offset),this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)},Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?"left":"top",50*(1-delta/dimension)+"%").css(isVertical?"top":"left","")},Tooltip.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},Tooltip.prototype.hide=function(callback){function complete(){"in"!=that.hoverState&&$tip.detach(),that.$element.removeAttr("aria-describedby").trigger("hidden.bs."+that.type),callback&&callback()}var that=this,$tip=$(this.$tip),e=$.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:($tip.removeClass("in"),$.support.transition&&$tip.hasClass("fade")?$tip.one("bsTransitionEnd",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete(),this.hoverState=null,this)},Tooltip.prototype.fixTitle=function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").attr("title","")},Tooltip.prototype.hasContent=function(){return this.getTitle()},Tooltip.prototype.getPosition=function($element){$element=$element||this.$element;var el=$element[0],isBody="BODY"==el.tagName,elRect=el.getBoundingClientRect();null==elRect.width&&(elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top}));var elOffset=isBody?{top:0,left:0}:$element.offset(),scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()},outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null;return $.extend({},elRect,scroll,outerDims,elOffset)},Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return"bottom"==placement?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:"top"==placement?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:"left"==placement?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}},Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0};if(!this.$viewport)return delta;var viewportPadding=this.options.viewport&&this.options.viewport.padding||0,viewportDimensions=this.getPosition(this.$viewport);if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll,bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight;topEdgeOffset<viewportDimensions.top?delta.top=viewportDimensions.top-topEdgeOffset:bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height&&(delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset)}else{var leftEdgeOffset=pos.left-viewportPadding,rightEdgeOffset=pos.left+viewportPadding+actualWidth;leftEdgeOffset<viewportDimensions.left?delta.left=viewportDimensions.left-leftEdgeOffset:rightEdgeOffset>viewportDimensions.right&&(delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset)}return delta},Tooltip.prototype.getTitle=function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},Tooltip.prototype.getUID=function(prefix){do prefix+=~~(1e6*Math.random());while(document.getElementById(prefix));return prefix},Tooltip.prototype.tip=function(){if(!this.$tip&&(this.$tip=$(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},Tooltip.prototype.enable=function(){this.enabled=!0},Tooltip.prototype.disable=function(){this.enabled=!1},Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled},Tooltip.prototype.toggle=function(e){var self=this;e&&(self=$(e.currentTarget).data("bs."+this.type),self||(self=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,self))),e?(self.inState.click=!self.inState.click,self.isInStateTrue()?self.enter(self):self.leave(self)):self.tip().hasClass("in")?self.leave(self):self.enter(self)},Tooltip.prototype.destroy=function(){var that=this;clearTimeout(this.timeout),this.hide(function(){that.$element.off("."+that.type).removeData("bs."+that.type),that.$tip&&that.$tip.detach(),that.$tip=null,that.$arrow=null,that.$viewport=null})};var old=$.fn.tooltip;$.fn.tooltip=Plugin,$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.popover"),options="object"==typeof option&&option;(data||!/destroy|hide/.test(option))&&(data||$this.data("bs.popover",data=new Popover(this,options)),"string"==typeof option&&data[option]())})}var Popover=function(element,options){this.init("popover",element,options)};if(!$.fn.tooltip)throw new Error("Popover requires tooltip.js");
Popover.VERSION="3.3.6",Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype),Popover.prototype.constructor=Popover,Popover.prototype.getDefaults=function(){return Popover.DEFAULTS},Popover.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof content?"html":"append":"text"](content),$tip.removeClass("fade top bottom left right in"),$tip.find(".popover-title").html()||$tip.find(".popover-title").hide()},Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()},Popover.prototype.getContent=function(){var $e=this.$element,o=this.options;return $e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var old=$.fn.popover;$.fn.popover=Plugin,$.fn.popover.Constructor=Popover,$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(jQuery),+function($){"use strict";function ScrollSpy(element,options){this.$body=$(document.body),this.$scrollElement=$($(element).is(document.body)?window:element),this.options=$.extend({},ScrollSpy.DEFAULTS,options),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",$.proxy(this.process,this)),this.refresh(),this.process()}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.scrollspy"),options="object"==typeof option&&option;data||$this.data("bs.scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})}ScrollSpy.VERSION="3.3.6",ScrollSpy.DEFAULTS={offset:10},ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},ScrollSpy.prototype.refresh=function(){var that=this,offsetMethod="offset",offsetBase=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),$.isWindow(this.$scrollElement[0])||(offsetMethod="position",offsetBase=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data("target")||$el.attr("href"),$href=/^#./.test(href)&&$(href);return $href&&$href.length&&$href.is(":visible")&&[[$href[offsetMethod]().top+offsetBase,href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0]),that.targets.push(this[1])})},ScrollSpy.prototype.process=function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.getScrollHeight(),maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;if(this.scrollHeight!=scrollHeight&&this.refresh(),scrollTop>=maxScroll)return activeTarget!=(i=targets[targets.length-1])&&this.activate(i);if(activeTarget&&scrollTop<offsets[0])return this.activeTarget=null,this.clear();for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(void 0===offsets[i+1]||scrollTop<offsets[i+1])&&this.activate(targets[i])},ScrollSpy.prototype.activate=function(target){this.activeTarget=target,this.clear();var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]',active=$(selector).parents("li").addClass("active");active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate.bs.scrollspy")},ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var old=$.fn.scrollspy;$.fn.scrollspy=Plugin,$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on("load.bs.scrollspy.data-api",function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this);Plugin.call($spy,$spy.data())})})}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tab");data||$this.data("bs.tab",data=new Tab(this)),"string"==typeof option&&data[option]()})}var Tab=function(element){this.element=$(element)};Tab.VERSION="3.3.6",Tab.TRANSITION_DURATION=150,Tab.prototype.show=function(){var $this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.data("target");if(selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),!$this.parent("li").hasClass("active")){var $previous=$ul.find(".active:last a"),hideEvent=$.Event("hide.bs.tab",{relatedTarget:$this[0]}),showEvent=$.Event("show.bs.tab",{relatedTarget:$previous[0]});if($previous.trigger(hideEvent),$this.trigger(showEvent),!showEvent.isDefaultPrevented()&&!hideEvent.isDefaultPrevented()){var $target=$(selector);this.activate($this.closest("li"),$ul),this.activate($target,$target.parent(),function(){$previous.trigger({type:"hidden.bs.tab",relatedTarget:$this[0]}),$this.trigger({type:"shown.bs.tab",relatedTarget:$previous[0]})})}}},Tab.prototype.activate=function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),element.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu").length&&element.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&($active.length&&$active.hasClass("fade")||!!container.find("> .fade").length);$active.length&&transition?$active.one("bsTransitionEnd",next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next(),$active.removeClass("in")};var old=$.fn.tab;$.fn.tab=Plugin,$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this};var clickHandler=function(e){e.preventDefault(),Plugin.call($(this),"show")};$(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',clickHandler).on("click.bs.tab.data-api",'[data-toggle="pill"]',clickHandler)}(jQuery),+function($){"use strict";function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.affix"),options="object"==typeof option&&option;data||$this.data("bs.affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})}var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options),this.$target=$(this.options.target).on("scroll.bs.affix.data-api",$.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",$.proxy(this.checkPositionWithEventLoop,this)),this.$element=$(element),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};Affix.VERSION="3.3.6",Affix.RESET="affix affix-top affix-bottom",Affix.DEFAULTS={offset:0,target:window},Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop(),position=this.$element.offset(),targetHeight=this.$target.height();if(null!=offsetTop&&"top"==this.affixed)return offsetTop>scrollTop?"top":!1;if("bottom"==this.affixed)return null!=offsetTop?scrollTop+this.unpin<=position.top?!1:"bottom":scrollHeight-offsetBottom>=scrollTop+targetHeight?!1:"bottom";var initializing=null==this.affixed,colliderTop=initializing?scrollTop:position.top,colliderHeight=initializing?targetHeight:height;return null!=offsetTop&&offsetTop>=scrollTop?"top":null!=offsetBottom&&colliderTop+colliderHeight>=scrollHeight-offsetBottom?"bottom":!1},Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(Affix.RESET).addClass("affix");var scrollTop=this.$target.scrollTop(),position=this.$element.offset();return this.pinnedOffset=position.top-scrollTop},Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)},Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var height=this.$element.height(),offset=this.options.offset,offsetTop=offset.top,offsetBottom=offset.bottom,scrollHeight=Math.max($(document).height(),$(document.body).height());"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top(this.$element)),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom(this.$element));var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom);if(this.affixed!=affix){null!=this.unpin&&this.$element.css("top","");var affixType="affix"+(affix?"-"+affix:""),e=$.Event(affixType+".bs.affix");if(this.$element.trigger(e),e.isDefaultPrevented())return;this.affixed=affix,this.unpin="bottom"==affix?this.getPinnedOffset():null,this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace("affix","affixed")+".bs.affix")}"bottom"==affix&&this.$element.offset({top:scrollHeight-height-offsetBottom})}};var old=$.fn.affix;$.fn.affix=Plugin,$.fn.affix.Constructor=Affix,$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},null!=data.offsetBottom&&(data.offset.bottom=data.offsetBottom),null!=data.offsetTop&&(data.offset.top=data.offsetTop),Plugin.call($spy,data)})})}(jQuery),function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("angular"),function(){try{return require("interact.js")}catch(e){}}(),require("moment")):"function"==typeof define&&define.amd?define(["angular","interact","moment"],factory):"object"==typeof exports?exports.angularBootstrapCalendarModuleName=factory(require("angular"),function(){try{return require("interact.js")}catch(e){}}(),require("moment")):root.angularBootstrapCalendarModuleName=factory(root.angular,root.interact,root.moment)}(this,function(__WEBPACK_EXTERNAL_MODULE_12__,__WEBPACK_EXTERNAL_MODULE_47__,__WEBPACK_EXTERNAL_MODULE_49__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";function requireAll(r){r.keys().forEach(r)}__webpack_require__(8);var angular=__webpack_require__(12),templates={},templatesContext=__webpack_require__(13);templatesContext.keys().forEach(function(templateName){var templateNameWithoutPrefix=templateName.replace("./",""),cacheTemplateName="mwl/"+templateNameWithoutPrefix,configTemplateName=templateNameWithoutPrefix.replace(".html","");templates[configTemplateName]={cacheTemplateName:cacheTemplateName,template:templatesContext(templateName)}}),module.exports=angular.module("mwl.calendar",[]).config(["calendarConfig",function(calendarConfig){angular.forEach(templates,function(template,templateName){calendarConfig.templates[templateName]||(calendarConfig.templates[templateName]=template.cacheTemplateName)})}]).run(["$templateCache",function($templateCache){angular.forEach(templates,function(template){$templateCache.get(template.cacheTemplateName)||$templateCache.put(template.cacheTemplateName,template.template)})}]).name,requireAll(__webpack_require__(23)),requireAll(__webpack_require__(37)),requireAll(__webpack_require__(42))},,,,,,,,function(module,exports){},,,,function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_12__},function(module,exports,__webpack_require__){function webpackContext(req){return __webpack_require__(webpackContextResolve(req))}function webpackContextResolve(req){return map[req]||function(){throw new Error("Cannot find module '"+req+"'.")}()}var map={"./calendar.html":14,"./calendarDayView.html":15,"./calendarHourList.html":16,"./calendarMonthCell.html":17,"./calendarMonthCellEvents.html":18,"./calendarMonthView.html":19,"./calendarSlideBox.html":20,"./calendarWeekView.html":21,"./calendarYearView.html":22};webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=13},function(module,exports){module.exports='<div class="cal-context" ng-switch="vm.view">\n\n  <div class="alert alert-danger" ng-switch-default>The value passed to the view attribute of the calendar is not set</div>\n\n  <div class="alert alert-danger" ng-hide="vm.viewDate">The value passed to view-date attribute of the calendar is not set</div>\n\n  <mwl-calendar-year\n    events="vm.events"\n    view-date="vm.viewDate"\n    on-event-click="vm.onEventClick"\n    on-event-times-changed="vm.onEventTimesChanged"\n    on-edit-event-click="vm.onEditEventClick"\n    on-delete-event-click="vm.onDeleteEventClick"\n    on-timespan-click="vm.onTimespanClick"\n    edit-event-html="vm.editEventHtml"\n    delete-event-html="vm.deleteEventHtml"\n    cell-is-open="vm.cellIsOpen"\n    cell-modifier="vm.cellModifier"\n    ng-switch-when="year"\n  ></mwl-calendar-year>\n\n  <mwl-calendar-month\n    events="vm.events"\n    view-date="vm.viewDate"\n    on-event-click="vm.onEventClick"\n    on-event-times-changed="vm.onEventTimesChanged"\n    on-edit-event-click="vm.onEditEventClick"\n    on-delete-event-click="vm.onDeleteEventClick"\n    on-timespan-click="vm.onTimespanClick"\n    edit-event-html="vm.editEventHtml"\n    delete-event-html="vm.deleteEventHtml"\n    cell-is-open="vm.cellIsOpen"\n    cell-modifier="vm.cellModifier"\n    ng-switch-when="month"\n    ></mwl-calendar-month>\n\n  <mwl-calendar-week\n    events="vm.events"\n    view-date="vm.viewDate"\n    on-event-click="vm.onEventClick"\n    on-event-times-changed="vm.onEventTimesChanged"\n    day-view-start="vm.dayViewStart"\n    day-view-end="vm.dayViewEnd"\n    day-view-split="vm.dayViewSplit"\n    on-timespan-click="vm.onTimespanClick"\n    ng-switch-when="week"\n    ></mwl-calendar-week>\n\n  <mwl-calendar-day\n    events="vm.events"\n    view-date="vm.viewDate"\n    on-event-click="vm.onEventClick"\n    on-event-times-changed="vm.onEventTimesChanged"\n    on-timespan-click="vm.onTimespanClick"\n    day-view-start="vm.dayViewStart"\n    day-view-end="vm.dayViewEnd"\n    day-view-split="vm.dayViewSplit"\n    ng-switch-when="day"\n    ></mwl-calendar-day>\n</div>\n'},function(module,exports){module.exports='<div class="cal-day-box">\n  <div class="row-fluid clearfix cal-row-head">\n    <div class="span1 col-xs-1 cal-cell" ng-bind="vm.calendarConfig.i18nStrings.timeLabel"></div>\n    <div class="span11 col-xs-11 cal-cell" ng-bind="vm.calendarConfig.i18nStrings.eventsLabel"></div>\n  </div>\n\n  <div class="cal-day-panel clearfix" ng-style="{height: vm.dayViewHeight + \'px\'}">\n\n    <mwl-calendar-hour-list\n      day-view-start="vm.dayViewStart"\n      day-view-end="vm.dayViewEnd"\n      day-view-split="vm.dayViewSplit"\n      on-timespan-click="vm.onTimespanClick"\n      view-date="vm.viewDate">\n    </mwl-calendar-hour-list>\n\n    <div\n      class="pull-left day-event day-highlight"\n      ng-repeat="event in vm.view track by event.$id"\n      ng-class="\'dh-event-\' + event.type + \' \' + event.cssClass"\n      ng-style="{top: event.top + \'px\', left: event.left + 60 + \'px\', height: event.height + \'px\'}"\n      mwl-draggable="event.draggable === true"\n      axis="\'xy\'"\n      snap-grid="{y: 30, x: 50}"\n      on-drag="vm.eventDragged(event, y)"\n      on-drag-end="vm.eventDragComplete(event, y)"\n      mwl-resizable="event.resizable === true && event.endsAt"\n      resize-edges="{top: true, bottom: true}"\n      on-resize="vm.eventResized(event, edge, y)"\n      on-resize-end="vm.eventResizeComplete(event, edge, y)">\n\n      <span class="cal-hours">\n        <span ng-show="event.top == 0"><span ng-bind="(event.tempStartsAt || event.startsAt) | calendarDate:\'day\':true"></span>, </span>\n        <span ng-bind="(event.tempStartsAt || event.startsAt) | calendarDate:\'time\':true"></span>\n      </span>\n      <a href="javascript:;" class="event-item" ng-click="vm.onEventClick({calendarEvent: event})">\n        <span ng-bind-html="vm.$sce.trustAsHtml(event.title) | calendarTruncateEventTitle:20:event.height"></span>\n      </a>\n\n    </div>\n\n  </div>\n\n</div>\n'},function(module,exports){module.exports='<div class="cal-day-panel-hour">\n\n  <div class="cal-day-hour" ng-repeat="hour in vm.hours track by $index">\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.toDate()})">\n      <div class="span1 col-xs-1"><strong ng-bind="hour.label"></strong></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.clone().add(vm.dayViewSplit, \'minutes\').toDate()})">\n      <div class="span1 col-xs-1"></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-show="vm.dayViewSplit < 30"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.clone().add(vm.dayViewSplit * 2, \'minutes\').toDate()})">\n      <div class="span1 col-xs-1"></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-show="vm.dayViewSplit < 30"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.clone().add(vm.dayViewSplit * 3, \'minutes\').toDate()})">\n      <div class="span1 col-xs-1"></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-show="vm.dayViewSplit < 15"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.clone().add(vm.dayViewSplit * 4, \'minutes\').toDate()})">\n      <div class="span1 col-xs-1"></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n    <div\n      class="row-fluid cal-day-hour-part"\n      ng-show="vm.dayViewSplit < 15"\n      ng-click="vm.onTimespanClick({calendarDate: hour.date.clone().add(vm.dayViewSplit * 5, \'minutes\').toDate()})">\n      <div class="span1 col-xs-1"></div>\n      <div class="span11 col-xs-11"></div>\n    </div>\n\n  </div>\n\n</div>\n'},function(module,exports){module.exports='<div\n  mwl-droppable\n  on-drop="vm.handleEventDrop(dropData.event, day.date, dropData.draggedFromDate)"\n  class="cal-month-day {{ day.cssClass }}"\n  ng-class="{\n            \'cal-day-outmonth\': !day.inMonth,\n            \'cal-day-inmonth\': day.inMonth,\n            \'cal-day-weekend\': day.isWeekend,\n            \'cal-day-past\': day.isPast,\n            \'cal-day-today\': day.isToday,\n            \'cal-day-future\': day.isFuture\n          }">\n\n  <small\n    class="cal-events-num badge badge-important pull-left"\n    ng-show="day.badgeTotal > 0"\n    ng-bind="day.badgeTotal">\n  </small>\n\n  <span\n    class="pull-right"\n    data-cal-date\n    ng-click="vm.calendarCtrl.dateClicked(day.date)"\n    ng-bind="day.label">\n  </span>\n\n  <div class="cal-day-tick" ng-show="dayIndex === vm.openDayIndex && vm.view[vm.openDayIndex].events.length > 0">\n    <i class="glyphicon glyphicon-chevron-up"></i>\n    <i class="fa fa-chevron-up"></i>\n  </div>\n\n  <ng-include src="vm.calendarConfig.templates.calendarMonthCellEvents"></ng-include>\n\n  <div id="cal-week-box" ng-if="$first && rowHovered">\n    {{ vm.calendarConfig.i18nStrings.weekNumber.replace(\'{week}\', day.date.week()) }}\n  </div>\n\n</div>\n'},function(module,exports){module.exports='<div class="events-list" ng-show="day.events.length > 0">\n  <a\n    ng-repeat="event in day.events | orderBy:\'startsAt\' track by event.$id"\n    href="javascript:;"\n    ng-click="vm.onEventClick({calendarEvent: event})"\n    class="pull-left event"\n    ng-class="\'event-\' + event.type + \' \' + event.cssClass"\n    ng-mouseenter="vm.highlightEvent(event, true)"\n    ng-mouseleave="vm.highlightEvent(event, false)"\n    tooltip-append-to-body="true"\n    uib-tooltip-html="((event.startsAt | calendarDate:\'time\':true) + (vm.calendarConfig.displayEventEndTimes && event.endsAt ? \' - \' + (event.endsAt | calendarDate:\'time\':true) : \'\') + \' - \' + event.title) | calendarTrustAsHtml"\n    mwl-draggable="event.draggable === true"\n    drop-data="{event: event, draggedFromDate: day.date.toDate()}">\n  </a>\n</div>\n'},function(module,exports){module.exports='<div class="cal-row-fluid cal-row-head">\n\n  <div class="cal-cell1" ng-repeat="day in vm.weekDays track by $index" ng-bind="day"></div>\n\n</div>\n<div class="cal-month-box">\n\n  <div\n    ng-repeat="rowOffset in vm.monthOffsets track by rowOffset"\n    ng-mouseenter="rowHovered = true"\n    ng-mouseleave="rowHovered = false">\n    <div class="cal-row-fluid cal-before-eventlist">\n      <div\n        ng-repeat="day in vm.view | calendarLimitTo:7:rowOffset track by $index"\n        ng-init="dayIndex = vm.view.indexOf(day)"\n        class="cal-cell1 cal-cell {{ day.highlightClass }}"\n        ng-click="vm.dayClicked(day, false, $event)"\n        ng-class="{pointer: day.events.length > 0}">\n        <ng-include src="vm.calendarConfig.templates.calendarMonthCell"></ng-include>\n      </div>\n    </div>\n\n    <mwl-calendar-slide-box\n      is-open="vm.openRowIndex === $index && vm.view[vm.openDayIndex].events.length > 0"\n      events="vm.view[vm.openDayIndex].events"\n      on-event-click="vm.onEventClick"\n      edit-event-html="vm.editEventHtml"\n      on-edit-event-click="vm.onEditEventClick"\n      delete-event-html="vm.deleteEventHtml"\n      on-delete-event-click="vm.onDeleteEventClick">\n    </mwl-calendar-slide-box>\n\n  </div>\n\n</div>\n'},function(module,exports){module.exports='<div class="cal-slide-box" uib-collapse="vm.isCollapsed" mwl-collapse-fallback="vm.isCollapsed">\n  <div class="cal-slide-content cal-event-list">\n    <ul class="unstyled list-unstyled">\n\n      <li\n        ng-repeat="event in vm.events | orderBy:\'startsAt\' track by event.$id"\n        ng-class="event.cssClass"\n        mwl-draggable="event.draggable === true"\n        drop-data="{event: event}">\n        <span class="pull-left event" ng-class="\'event-\' + event.type"></span>\n        &nbsp;\n        <a\n          href="javascript:;"\n          class="event-item"\n          ng-click="vm.onEventClick({calendarEvent: event})">\n          <span ng-bind-html="vm.$sce.trustAsHtml(event.title)"></span>\n          (<span ng-bind="event.startsAt | calendarDate:(isMonthView ? \'time\' : \'datetime\'):true"></span><span ng-if="vm.calendarConfig.displayEventEndTimes && event.endsAt"> - <span ng-bind="event.endsAt | calendarDate:(isMonthView ? \'time\' : \'datetime\'):true"></span></span>)\n        </a>\n\n        <a\n          href="javascript:;"\n          class="event-item-edit"\n          ng-if="vm.editEventHtml && event.editable !== false"\n          ng-bind-html="vm.$sce.trustAsHtml(vm.editEventHtml)"\n          ng-click="vm.onEditEventClick({calendarEvent: event})">\n        </a>\n\n        <a\n          href="javascript:;"\n          class="event-item-delete"\n          ng-if="vm.deleteEventHtml && event.deletable !== false"\n          ng-bind-html="vm.$sce.trustAsHtml(vm.deleteEventHtml)"\n          ng-click="vm.onDeleteEventClick({calendarEvent: event})">\n        </a>\n      </li>\n\n    </ul>\n  </div>\n</div>\n'},function(module,exports){module.exports='<div class="cal-week-box" ng-class="{\'cal-day-box\': vm.showTimes}">\n  <div class="cal-row-fluid cal-row-head">\n\n    <div\n      class="cal-cell1"\n      ng-repeat="day in vm.view.days track by $index"\n      ng-class="{\n        \'cal-day-weekend\': day.isWeekend,\n        \'cal-day-past\': day.isPast,\n        \'cal-day-today\': day.isToday,\n        \'cal-day-future\': day.isFuture}"\n      mwl-element-dimensions="vm.dayColumnDimensions">\n\n      <span ng-bind="day.weekDayLabel"></span>\n      <br>\n      <small>\n        <span\n          data-cal-date\n          ng-click="vm.calendarCtrl.dateClicked(day.date)"\n          class="pointer"\n          ng-bind="day.dayLabel">\n        </span>\n      </small>\n\n    </div>\n\n  </div>\n\n  <div class="cal-day-panel clearfix" ng-style="{height: vm.showTimes ? (vm.dayViewHeight + \'px\') : \'auto\'}">\n\n    <mwl-calendar-hour-list\n      day-view-start="vm.dayViewStart"\n      day-view-end="vm.dayViewEnd"\n      day-view-split="vm.dayViewSplit"\n      view-date="vm.viewDate"\n      on-timespan-click="vm.onTimespanClick"\n      ng-if="vm.showTimes">\n    </mwl-calendar-hour-list>\n\n    <div class="row">\n      <div class="col-xs-12">\n        <div\n          class="cal-row-fluid "\n          ng-repeat="event in vm.view.events track by event.$id">\n          <div\n            ng-class="\'cal-cell\' + (vm.showTimes ? 1 : event.daySpan) + (vm.showTimes ? \'\' : \' cal-offset\' + event.dayOffset) + \' day-highlight dh-event-\' + event.type + \' \' + event.cssClass"\n            ng-style="{\n              top: vm.showTimes ? ((event.top + 2) + \'px\') : \'auto\',\n              position: vm.showTimes ? \'absolute\' : \'inherit\',\n              width: vm.showTimes ? (vm.dayColumnDimensions.width + \'px\') : \'\',\n              left: vm.showTimes ? (vm.dayColumnDimensions.width * event.dayOffset) + 15 + \'px\' : \'\'\n            }"\n            data-event-class\n            mwl-draggable="event.draggable === true"\n            axis="vm.showTimes ? \'xy\' : \'x\'"\n            snap-grid="vm.showTimes ? {x: vm.dayColumnDimensions.width, y: 30} : {x: vm.dayColumnDimensions.width}"\n            on-drag="vm.tempTimeChanged(event, y)"\n            on-drag-end="vm.weekDragged(event, x, y)"\n            mwl-resizable="event.resizable === true && event.endsAt && !vm.showTimes"\n            resize-edges="{left: true, right: true}"\n            on-resize-end="vm.weekResized(event, edge, x)">\n            <strong ng-bind="(event.tempStartsAt || event.startsAt) | calendarDate:\'time\':true" ng-show="vm.showTimes"></strong>\n            <a\n              href="javascript:;"\n              ng-click="vm.onEventClick({calendarEvent: event})"\n              class="event-item"\n              ng-bind-html="vm.$sce.trustAsHtml(event.title)"\n              uib-tooltip-html="event.title | calendarTrustAsHtml"\n              tooltip-placement="left"\n              tooltip-append-to-body="true">\n            </a>\n          </div>\n        </div>\n      </div>\n\n    </div>\n\n  </div>\n</div>\n'},function(module,exports){module.exports='<div class="cal-year-box">\n  <div ng-repeat="rowOffset in [0, 4, 8] track by rowOffset">\n    <div class="row cal-before-eventlist">\n      <div\n        class="span3 col-md-3 col-xs-6 cal-cell {{ day.cssClass }}"\n        ng-repeat="month in vm.view | calendarLimitTo:4:rowOffset track by $index"\n        ng-init="monthIndex = vm.view.indexOf(month)"\n        ng-click="vm.monthClicked(month, false, $event)"\n        ng-class="{pointer: month.events.length > 0, \'cal-day-today\': month.isToday}"\n        mwl-droppable\n        on-drop="vm.handleEventDrop(dropData.event, month.date)">\n\n        <span\n          class="pull-right"\n          data-cal-date\n          ng-click="vm.calendarCtrl.dateClicked(month.date)"\n          ng-bind="month.label">\n        </span>\n\n        <small\n          class="cal-events-num badge badge-important pull-left"\n          ng-show="month.badgeTotal > 0"\n          ng-bind="month.badgeTotal">\n        </small>\n\n        <div\n          class="cal-day-tick"\n          ng-show="monthIndex === vm.openMonthIndex && vm.view[vm.openMonthIndex].events.length > 0">\n          <i class="glyphicon glyphicon-chevron-up"></i>\n          <i class="fa fa-chevron-up"></i>\n        </div>\n\n      </div>\n    </div>\n\n    <mwl-calendar-slide-box\n      is-open="vm.openRowIndex === $index && vm.view[vm.openMonthIndex].events.length > 0"\n      events="vm.view[vm.openMonthIndex].events"\n      on-event-click="vm.onEventClick"\n      edit-event-html="vm.editEventHtml"\n      on-edit-event-click="vm.onEditEventClick"\n      delete-event-html="vm.deleteEventHtml"\n      on-delete-event-click="vm.onDeleteEventClick">\n    </mwl-calendar-slide-box>\n\n  </div>\n\n</div>\n'},function(module,exports,__webpack_require__){function webpackContext(req){return __webpack_require__(webpackContextResolve(req))}function webpackContextResolve(req){return map[req]||function(){throw new Error("Cannot find module '"+req+"'.")}()}var map={"./mwlCalendar.js":24,"./mwlCalendarDay.js":25,"./mwlCalendarHourList.js":26,"./mwlCalendarMonth.js":27,"./mwlCalendarSlideBox.js":28,"./mwlCalendarWeek.js":29,"./mwlCalendarYear.js":30,"./mwlCollapseFallback.js":31,"./mwlDateModifier.js":32,"./mwlDraggable.js":33,"./mwlDroppable.js":34,"./mwlElementDimensions.js":35,"./mwlResizable.js":36};webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=23},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarCtrl",["$scope","$log","$timeout","$attrs","$locale","moment","calendarTitle",function($scope,$log,$timeout,$attrs,$locale,moment,calendarTitle){function eventIsValid(event){return event.startsAt||$log.warn("Bootstrap calendar: ","Event is missing the startsAt field",event),angular.isDate(event.startsAt)||$log.warn("Bootstrap calendar: ","Event startsAt should be a javascript date object",event),angular.isDefined(event.endsAt)&&(angular.isDate(event.endsAt)||$log.warn("Bootstrap calendar: ","Event endsAt should be a javascript date object",event),moment(event.startsAt).isAfter(moment(event.endsAt))&&$log.warn("Bootstrap calendar: ","Event cannot start after it finishes",event)),!0}function refreshCalendar(){calendarTitle[vm.view]&&angular.isDefined($attrs.viewTitle)&&(vm.viewTitle=calendarTitle[vm.view](vm.viewDate)),vm.events=vm.events.filter(eventIsValid).map(function(event,index){return Object.defineProperty(event,"$id",{enumerable:!1,configurable:!0,value:index}),event});var currentDate=moment(vm.viewDate),shouldUpdate=!0;previousDate.clone().startOf(vm.view).isSame(currentDate.clone().startOf(vm.view))&&!previousDate.isSame(currentDate)&&vm.view===previousView&&(shouldUpdate=!1),previousDate=currentDate,previousView=vm.view,shouldUpdate&&$timeout(function(){$scope.$broadcast("calendar.refreshView")})}var vm=this;vm.events=vm.events||[],vm.changeView=function(view,newDay){vm.view=view,vm.viewDate=newDay},vm.dateClicked=function(date){var rawDate=moment(date).toDate(),nextView={year:"month",month:"day",week:"day"};vm.onViewChangeClick({calendarDate:rawDate,calendarNextView:nextView[vm.view]})!==!1&&vm.changeView(nextView[vm.view],rawDate)};var previousDate=moment(vm.viewDate),previousView=vm.view,eventsWatched=!1;$scope.$watchGroup(["vm.viewDate","vm.view","vm.cellIsOpen",function(){return moment.locale()+$locale.id}],function(){eventsWatched?refreshCalendar():(eventsWatched=!0,$scope.$watch("vm.events",refreshCalendar,!0))})}]).directive("mwlCalendar",["calendarConfig",function(calendarConfig){return{templateUrl:calendarConfig.templates.calendar,restrict:"E",
scope:{events:"=",view:"=",viewTitle:"=?",viewDate:"=",editEventHtml:"=?",deleteEventHtml:"=?",cellIsOpen:"=?",onEventClick:"&",onEventTimesChanged:"&",onEditEventClick:"&",onDeleteEventClick:"&",onTimespanClick:"&",onViewChangeClick:"&",cellModifier:"&",dayViewStart:"@",dayViewEnd:"@",dayViewSplit:"@"},controller:"MwlCalendarCtrl as vm",bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarDayCtrl",["$scope","$sce","moment","calendarHelper","calendarConfig",function($scope,$sce,moment,calendarHelper,calendarConfig){var vm=this;vm.calendarConfig=calendarConfig,vm.$sce=$sce,$scope.$on("calendar.refreshView",function(){vm.dayViewSplit=vm.dayViewSplit||30,vm.dayViewHeight=calendarHelper.getDayViewHeight(vm.dayViewStart,vm.dayViewEnd,vm.dayViewSplit),vm.view=calendarHelper.getDayView(vm.events,vm.viewDate,vm.dayViewStart,vm.dayViewEnd,vm.dayViewSplit)}),vm.eventDragComplete=function(event,minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit,newStart=moment(event.startsAt).add(minutesDiff,"minutes"),newEnd=moment(event.endsAt).add(minutesDiff,"minutes");delete event.tempStartsAt,vm.onEventTimesChanged({calendarEvent:event,calendarNewEventStart:newStart.toDate(),calendarNewEventEnd:event.endsAt?newEnd.toDate():null})},vm.eventDragged=function(event,minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit;event.tempStartsAt=moment(event.startsAt).add(minutesDiff,"minutes").toDate()},vm.eventResizeComplete=function(event,edge,minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit,start=moment(event.startsAt),end=moment(event.endsAt);"start"===edge?start.add(minutesDiff,"minutes"):end.add(minutesDiff,"minutes"),delete event.tempStartsAt,vm.onEventTimesChanged({calendarEvent:event,calendarNewEventStart:start.toDate(),calendarNewEventEnd:end.toDate()})},vm.eventResized=function(event,edge,minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit;"start"===edge&&(event.tempStartsAt=moment(event.startsAt).add(minutesDiff,"minutes").toDate())}}]).directive("mwlCalendarDay",["calendarConfig",function(calendarConfig){return{templateUrl:calendarConfig.templates.calendarDayView,restrict:"E",require:"^mwlCalendar",scope:{events:"=",viewDate:"=",onEventClick:"=",onEventTimesChanged:"=",onTimespanClick:"=",dayViewStart:"=",dayViewEnd:"=",dayViewSplit:"="},controller:"MwlCalendarDayCtrl as vm",bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarHourListCtrl",["$scope","moment","calendarConfig","calendarHelper",function($scope,moment,calendarConfig,calendarHelper){function updateDays(){dayViewStart=moment(vm.dayViewStart||"00:00","HH:mm"),dayViewEnd=moment(vm.dayViewEnd||"23:00","HH:mm"),vm.dayViewSplit=parseInt(vm.dayViewSplit),vm.hours=[];for(var dayCounter=moment(vm.viewDate).clone().hours(dayViewStart.hours()).minutes(dayViewStart.minutes()).seconds(dayViewStart.seconds()),i=0;i<=dayViewEnd.diff(dayViewStart,"hours");i++)vm.hours.push({label:calendarHelper.formatDate(dayCounter,calendarConfig.dateFormats.hour),date:dayCounter.clone()}),dayCounter.add(1,"hour")}var dayViewStart,dayViewEnd,vm=this,originalLocale=moment.locale();$scope.$on("calendar.refreshView",function(){originalLocale!==moment.locale()&&(originalLocale=moment.locale(),updateDays())}),$scope.$watchGroup(["vm.dayViewStart","vm.dayViewEnd","vm.dayViewSplit","vm.viewDate"],function(){updateDays()})}]).directive("mwlCalendarHourList",["calendarConfig",function(calendarConfig){return{restrict:"E",templateUrl:calendarConfig.templates.calendarHourList,controller:"MwlCalendarHourListCtrl as vm",scope:{viewDate:"=",dayViewStart:"=",dayViewEnd:"=",dayViewSplit:"=",onTimespanClick:"="},bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarMonthCtrl",["$scope","moment","calendarHelper","calendarConfig",function($scope,moment,calendarHelper,calendarConfig){var vm=this;vm.calendarConfig=calendarConfig,vm.openRowIndex=null,$scope.$on("calendar.refreshView",function(){vm.weekDays=calendarHelper.getWeekDayNames(),vm.view=calendarHelper.getMonthView(vm.events,vm.viewDate,vm.cellModifier);var rows=Math.floor(vm.view.length/7);vm.monthOffsets=[];for(var i=0;rows>i;i++)vm.monthOffsets.push(7*i);vm.cellIsOpen&&null===vm.openRowIndex&&(vm.openDayIndex=null,vm.view.forEach(function(day){day.inMonth&&moment(vm.viewDate).startOf("day").isSame(day.date)&&vm.dayClicked(day,!0)}))}),vm.dayClicked=function(day,dayClickedFirstRun,$event){if(dayClickedFirstRun||(vm.onTimespanClick({calendarDate:day.date.toDate(),calendarCell:day,$event:$event}),!$event||!$event.defaultPrevented)){vm.openRowIndex=null;var dayIndex=vm.view.indexOf(day);dayIndex===vm.openDayIndex?(vm.openDayIndex=null,vm.cellIsOpen=!1):(vm.openDayIndex=dayIndex,vm.openRowIndex=Math.floor(dayIndex/7),vm.cellIsOpen=!0)}},vm.highlightEvent=function(event,shouldAddClass){vm.view.forEach(function(day){if(delete day.highlightClass,shouldAddClass){var dayContainsEvent=day.events.indexOf(event)>-1;dayContainsEvent&&(day.highlightClass="day-highlight dh-event-"+event.type)}})},vm.handleEventDrop=function(event,newDayDate,draggedFromDate){var newStart=moment(event.startsAt).date(moment(newDayDate).date()).month(moment(newDayDate).month()),newEnd=calendarHelper.adjustEndDateFromStartDiff(event.startsAt,newStart,event.endsAt);vm.onEventTimesChanged({calendarEvent:event,calendarDate:newDayDate,calendarNewEventStart:newStart.toDate(),calendarNewEventEnd:newEnd?newEnd.toDate():null,calendarDraggedFromDate:draggedFromDate})}}]).directive("mwlCalendarMonth",["calendarConfig",function(calendarConfig){return{templateUrl:calendarConfig.templates.calendarMonthView,restrict:"E",require:"^mwlCalendar",scope:{events:"=",viewDate:"=",onEventClick:"=",onEditEventClick:"=",onDeleteEventClick:"=",onEventTimesChanged:"=",editEventHtml:"=",deleteEventHtml:"=",cellIsOpen:"=",onTimespanClick:"=",cellModifier:"="},controller:"MwlCalendarMonthCtrl as vm",link:function(scope,element,attrs,calendarCtrl){scope.vm.calendarCtrl=calendarCtrl},bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarSlideBoxCtrl",["$sce","$scope","$timeout","calendarConfig",function($sce,$scope,$timeout,calendarConfig){var vm=this;vm.$sce=$sce,vm.calendarConfig=calendarConfig,vm.isCollapsed=!0,$scope.$watch("vm.isOpen",function(isOpen){$timeout(function(){vm.isCollapsed=!isOpen})})}]).directive("mwlCalendarSlideBox",["calendarConfig",function(calendarConfig){return{restrict:"E",templateUrl:calendarConfig.templates.calendarSlideBox,replace:!0,controller:"MwlCalendarSlideBoxCtrl as vm",require:["^?mwlCalendarMonth","^?mwlCalendarYear"],link:function(scope,elm,attrs,ctrls){scope.isMonthView=!!ctrls[0],scope.isYearView=!!ctrls[1]},scope:{isOpen:"=",events:"=",onEventClick:"=",editEventHtml:"=",onEditEventClick:"=",deleteEventHtml:"=",onDeleteEventClick:"="},bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarWeekCtrl",["$scope","$sce","moment","calendarHelper","calendarConfig",function($scope,$sce,moment,calendarHelper,calendarConfig){var vm=this;vm.showTimes=calendarConfig.showTimesOnWeekView,vm.$sce=$sce,$scope.$on("calendar.refreshView",function(){vm.dayViewSplit=vm.dayViewSplit||30,vm.dayViewHeight=calendarHelper.getDayViewHeight(vm.dayViewStart,vm.dayViewEnd,vm.dayViewSplit),vm.showTimes?vm.view=calendarHelper.getWeekViewWithTimes(vm.events,vm.viewDate,vm.dayViewStart,vm.dayViewEnd,vm.dayViewSplit):vm.view=calendarHelper.getWeekView(vm.events,vm.viewDate)}),vm.weekDragged=function(event,daysDiff,minuteChunksMoved){var newStart=moment(event.startsAt).add(daysDiff,"days"),newEnd=moment(event.endsAt).add(daysDiff,"days");if(minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit;newStart=newStart.add(minutesDiff,"minutes"),newEnd=newEnd.add(minutesDiff,"minutes")}delete event.tempStartsAt,vm.onEventTimesChanged({calendarEvent:event,calendarNewEventStart:newStart.toDate(),calendarNewEventEnd:event.endsAt?newEnd.toDate():null})},vm.weekResized=function(event,edge,daysDiff){var start=moment(event.startsAt),end=moment(event.endsAt);"start"===edge?start.add(daysDiff,"days"):end.add(daysDiff,"days"),vm.onEventTimesChanged({calendarEvent:event,calendarNewEventStart:start.toDate(),calendarNewEventEnd:end.toDate()})},vm.tempTimeChanged=function(event,minuteChunksMoved){var minutesDiff=minuteChunksMoved*vm.dayViewSplit;event.tempStartsAt=moment(event.startsAt).add(minutesDiff,"minutes").toDate()}}]).directive("mwlCalendarWeek",["calendarConfig",function(calendarConfig){return{templateUrl:calendarConfig.templates.calendarWeekView,restrict:"E",require:"^mwlCalendar",scope:{events:"=",viewDate:"=",onEventClick:"=",onEventTimesChanged:"=",dayViewStart:"=",dayViewEnd:"=",dayViewSplit:"=",onTimespanClick:"="},controller:"MwlCalendarWeekCtrl as vm",link:function(scope,element,attrs,calendarCtrl){scope.vm.calendarCtrl=calendarCtrl},bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCalendarYearCtrl",["$scope","moment","calendarHelper",function($scope,moment,calendarHelper){var vm=this;vm.openMonthIndex=null,$scope.$on("calendar.refreshView",function(){vm.view=calendarHelper.getYearView(vm.events,vm.viewDate,vm.cellModifier),vm.cellIsOpen&&null===vm.openMonthIndex&&(vm.openMonthIndex=null,vm.view.forEach(function(month){moment(vm.viewDate).startOf("month").isSame(month.date)&&vm.monthClicked(month,!0)}))}),vm.monthClicked=function(month,monthClickedFirstRun,$event){if(monthClickedFirstRun||(vm.onTimespanClick({calendarDate:month.date.toDate(),calendarCell:month,$event:$event}),!$event||!$event.defaultPrevented)){vm.openRowIndex=null;var monthIndex=vm.view.indexOf(month);monthIndex===vm.openMonthIndex?(vm.openMonthIndex=null,vm.cellIsOpen=!1):(vm.openMonthIndex=monthIndex,vm.openRowIndex=Math.floor(monthIndex/4),vm.cellIsOpen=!0)}},vm.handleEventDrop=function(event,newMonthDate){var newStart=moment(event.startsAt).month(moment(newMonthDate).month()),newEnd=calendarHelper.adjustEndDateFromStartDiff(event.startsAt,newStart,event.endsAt);vm.onEventTimesChanged({calendarEvent:event,calendarDate:newMonthDate,calendarNewEventStart:newStart.toDate(),calendarNewEventEnd:newEnd?newEnd.toDate():null})}}]).directive("mwlCalendarYear",["calendarConfig",function(calendarConfig){return{templateUrl:calendarConfig.templates.calendarYearView,restrict:"E",require:"^mwlCalendar",scope:{events:"=",viewDate:"=",onEventClick:"=",onEventTimesChanged:"=",onEditEventClick:"=",onDeleteEventClick:"=",editEventHtml:"=",deleteEventHtml:"=",cellIsOpen:"=",onTimespanClick:"=",cellModifier:"="},controller:"MwlCalendarYearCtrl as vm",link:function(scope,element,attrs,calendarCtrl){scope.vm.calendarCtrl=calendarCtrl},bindToController:!0}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlCollapseFallbackCtrl",["$scope","$attrs","$element",function($scope,$attrs,$element){$scope.$watch($attrs.mwlCollapseFallback,function(shouldCollapse){shouldCollapse?$element.addClass("ng-hide"):$element.removeClass("ng-hide")})}]).directive("mwlCollapseFallback",["$injector",function($injector){return $injector.has("uibCollapseDirective")?{}:{restrict:"A",controller:"MwlCollapseFallbackCtrl"}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlDateModifierCtrl",["$element","$attrs","$scope","moment",function($element,$attrs,$scope,moment){function onClick(){angular.isDefined($attrs.setToToday)?vm.date=new Date:angular.isDefined($attrs.increment)?vm.date=moment(vm.date).add(1,vm.increment).toDate():angular.isDefined($attrs.decrement)&&(vm.date=moment(vm.date).subtract(1,vm.decrement).toDate()),$scope.$apply()}var vm=this;$element.bind("click",onClick),$scope.$on("$destroy",function(){$element.unbind("click",onClick)})}]).directive("mwlDateModifier",function(){return{restrict:"A",controller:"MwlDateModifierCtrl as vm",scope:{date:"=",increment:"=",decrement:"="},bindToController:!0}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlDraggableCtrl",["$element","$scope","$window","$parse","$attrs","$timeout","interact",function($element,$scope,$window,$parse,$attrs,$timeout,interact){function translateElement(elm,transformValue){return elm.css("-ms-transform",transformValue).css("-webkit-transform",transformValue).css("transform",transformValue)}function canDrag(){return $parse($attrs.mwlDraggable)($scope)}function getUnitsMoved(x,y,gridDimensions){var result={x:x,y:y};return gridDimensions&&gridDimensions.x&&(result.x/=gridDimensions.x),gridDimensions&&gridDimensions.y&&(result.y/=gridDimensions.y),result}if(interact){var snap,snapGridDimensions;$attrs.snapGrid&&(snapGridDimensions=$parse($attrs.snapGrid)($scope),snap={targets:[interact.createSnapGrid(snapGridDimensions)]}),interact($element[0]).draggable({snap:snap,onstart:function(event){canDrag()&&(angular.element(event.target).addClass("dragging-active"),event.target.dropData=$parse($attrs.dropData)($scope),event.target.style.pointerEvents="none",$attrs.onDragStart&&($parse($attrs.onDragStart)($scope),$scope.$apply()))},onmove:function(event){if(canDrag()){var elm=angular.element(event.target),x=(parseFloat(elm.attr("data-x"))||0)+(event.dx||0),y=(parseFloat(elm.attr("data-y"))||0)+(event.dy||0);switch($parse($attrs.axis)($scope)){case"x":y=0;break;case"y":x=0}"static"===$window.getComputedStyle(elm[0]).position&&elm.css("position","relative"),translateElement(elm,"translate("+x+"px, "+y+"px)").css("z-index",50).attr("data-x",x).attr("data-y",y),$attrs.onDrag&&($parse($attrs.onDrag)($scope,getUnitsMoved(x,y,snapGridDimensions)),$scope.$apply())}},onend:function(event){if(canDrag()){var elm=angular.element(event.target),x=elm.attr("data-x"),y=elm.attr("data-y");event.target.style.pointerEvents="auto",$attrs.onDragEnd&&($parse($attrs.onDragEnd)($scope,getUnitsMoved(x,y,snapGridDimensions)),$scope.$apply()),$timeout(function(){translateElement(elm,"").css("z-index","auto").removeAttr("data-x").removeAttr("data-y").removeClass("dragging-active")})}}}),$scope.$on("$destroy",function(){interact($element[0]).unset()})}}]).directive("mwlDraggable",function(){return{restrict:"A",controller:"MwlDraggableCtrl"}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlDroppableCtrl",["$element","$scope","$parse","$attrs","interact",function($element,$scope,$parse,$attrs,interact){interact&&(interact($element[0]).dropzone({ondragenter:function(event){angular.element(event.target).addClass("drop-active")},ondragleave:function(event){angular.element(event.target).removeClass("drop-active")},ondropdeactivate:function(event){angular.element(event.target).removeClass("drop-active")},ondrop:function(event){event.relatedTarget.dropData&&($parse($attrs.onDrop)($scope,{dropData:event.relatedTarget.dropData}),$scope.$apply())}}),$scope.$on("$destroy",function(){interact($element[0]).unset()}))}]).directive("mwlDroppable",function(){return{restrict:"A",controller:"MwlDroppableCtrl"}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlElementDimensionsCtrl",["$element","$scope","$parse","$attrs",function($element,$scope,$parse,$attrs){$parse($attrs.mwlElementDimensions).assign($scope,{width:$element[0].offsetWidth,height:$element[0].offsetHeight})}]).directive("mwlElementDimensions",function(){return{restrict:"A",controller:"MwlElementDimensionsCtrl"}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").controller("MwlResizableCtrl",["$element","$scope","$parse","$attrs","$timeout","interact",function($element,$scope,$parse,$attrs,$timeout,interact){function canResize(){return $parse($attrs.mwlResizable)($scope)}function getUnitsResized(edge,elm,gridDimensions){var unitsResized={};return unitsResized.edge=edge,"start"===edge?(unitsResized.x=elm.data("x"),unitsResized.y=elm.data("y")):"end"===edge&&(unitsResized.x=parseFloat(elm.css("width").replace("px",""))-originalDimensions.width,unitsResized.y=parseFloat(elm.css("height").replace("px",""))-originalDimensions.height),gridDimensions&&gridDimensions.x&&(unitsResized.x=Math.round(unitsResized.x/gridDimensions.x)),gridDimensions&&gridDimensions.y&&(unitsResized.y=Math.round(unitsResized.y/gridDimensions.y)),unitsResized}if(interact){var snap,snapGridDimensions;$attrs.snapGrid&&(snapGridDimensions=$parse($attrs.snapGrid)($scope),snap={targets:[interact.createSnapGrid(snapGridDimensions)]});var resizeEdge,originalDimensions={},originalDimensionsStyle={};interact($element[0]).resizable({edges:$parse($attrs.resizeEdges)($scope),snap:snap,onstart:function(event){if(canResize()){resizeEdge="end";var elm=angular.element(event.target);originalDimensions.height=elm[0].offsetHeight,originalDimensions.width=elm[0].offsetWidth,originalDimensionsStyle.height=elm.css("height"),originalDimensionsStyle.width=elm.css("width")}},onmove:function(event){if(canResize()){var elm=angular.element(event.target),x=parseFloat(elm.data("x")||0),y=parseFloat(elm.data("y")||0);elm.css({width:event.rect.width+"px",height:event.rect.height+"px"}),x+=event.deltaRect.left,y+=event.deltaRect.top,elm.css("transform","translate("+x+"px,"+y+"px)"),elm.data("x",x),elm.data("y",y),(0!==event.deltaRect.left||0!==event.deltaRect.top)&&(resizeEdge="start"),$attrs.onResize&&($parse($attrs.onResize)($scope,getUnitsResized(resizeEdge,elm,snapGridDimensions)),$scope.$apply())}},onend:function(event){if(canResize()){var elm=angular.element(event.target),unitsResized=getUnitsResized(resizeEdge,elm,snapGridDimensions);$timeout(function(){elm.data("x",null).data("y",null).css({transform:"",width:originalDimensionsStyle.width,height:originalDimensionsStyle.height})}),$attrs.onResizeEnd&&($parse($attrs.onResizeEnd)($scope,unitsResized),$scope.$apply())}}}),$scope.$on("$destroy",function(){interact($element[0]).unset()})}}]).directive("mwlResizable",function(){return{restrict:"A",controller:"MwlResizableCtrl"}})},function(module,exports,__webpack_require__){function webpackContext(req){return __webpack_require__(webpackContextResolve(req))}function webpackContextResolve(req){return map[req]||function(){throw new Error("Cannot find module '"+req+"'.")}()}var map={"./calendarDate.js":38,"./calendarLimitTo.js":39,"./calendarTruncateEventTitle.js":40,"./calendarTrustAsHtml.js":41};webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=37},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").filter("calendarDate",["calendarHelper","calendarConfig",function(calendarHelper,calendarConfig){function calendarDate(date,format,getFromConfig){return getFromConfig===!0&&(format=calendarConfig.dateFormats[format]),calendarHelper.formatDate(date,format)}return calendarDate.$stateful=!0,calendarDate}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").filter("calendarLimitTo",["limitToFilter",function(limitToFilter){return angular.version.minor>=4?limitToFilter:function(input,limit,begin){return limit=Math.abs(Number(limit))===1/0?Number(limit):parseInt(limit),isNaN(limit)?input:(angular.isNumber(input)&&(input=input.toString()),angular.isArray(input)||angular.isString(input)?(begin=!begin||isNaN(begin)?0:parseInt(begin),begin=0>begin&&begin>=-input.length?input.length+begin:begin,limit>=0?input.slice(begin,begin+limit):0===begin?input.slice(limit,input.length):input.slice(Math.max(0,begin+limit),begin)):input)}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").filter("calendarTruncateEventTitle",function(){return function(string,length,boxHeight){return string?string.length>=length&&string.length/20>boxHeight/30?string.substr(0,length)+"...":string:""}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").filter("calendarTrustAsHtml",["$sce",function($sce){return function(text){return $sce.trustAsHtml(text)}}])},function(module,exports,__webpack_require__){function webpackContext(req){return __webpack_require__(webpackContextResolve(req))}function webpackContextResolve(req){return map[req]||function(){throw new Error("Cannot find module '"+req+"'.")}()}var map={"./calendarConfig.js":43,"./calendarHelper.js":44,"./calendarTitle.js":45,"./interact.js":46,"./moment.js":48};webpackContext.keys=function(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=42},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").constant("calendarConfig",{allDateFormats:{angular:{date:{hour:"ha",day:"d MMM",month:"MMMM",weekDay:"EEEE",time:"HH:mm",datetime:"MMM d, h:mm a"},title:{day:"EEEE d MMMM, yyyy",week:"Week {week} of {year}",month:"MMMM yyyy",year:"yyyy"}},moment:{date:{hour:"ha",day:"D MMM",month:"MMMM",weekDay:"dddd",time:"HH:mm",datetime:"MMM D, h:mm a"},title:{day:"dddd D MMMM, YYYY",week:"Week {week} of {year}",month:"MMMM YYYY",year:"YYYY"}}},get dateFormats(){return this.allDateFormats[this.dateFormatter].date},get titleFormats(){return this.allDateFormats[this.dateFormatter].title},dateFormatter:"angular",displayEventEndTimes:!1,showTimesOnWeekView:!1,displayAllMonthEvents:!1,i18nStrings:{eventsLabel:"Events",timeLabel:"Time",weekNumber:"Week {week}"},templates:{}})},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").factory("calendarHelper",["dateFilter","moment","calendarConfig",function(dateFilter,moment,calendarConfig){function formatDate(date,format){return"angular"===calendarConfig.dateFormatter?dateFilter(moment(date).toDate(),format):"moment"===calendarConfig.dateFormatter?moment(date).format(format):void 0}function adjustEndDateFromStartDiff(oldStart,newStart,oldEnd){if(!oldEnd)return oldEnd;var diffInSeconds=moment(newStart).diff(moment(oldStart));return moment(oldEnd).add(diffInSeconds)}function getRecurringEventPeriod(eventPeriod,recursOn,containerPeriodStart){var eventStart=moment(eventPeriod.start),eventEnd=moment(eventPeriod.end),periodStart=moment(containerPeriodStart);if(angular.isDefined(recursOn)){switch(recursOn){case"year":eventStart.set({year:periodStart.year()});break;case"month":eventStart.set({year:periodStart.year(),month:periodStart.month()});break;default:throw new Error("Invalid value ("+recursOn+") given for recurs on. Can only be year or month.")}eventEnd=adjustEndDateFromStartDiff(eventPeriod.start,eventStart,eventEnd)}return{start:eventStart,end:eventEnd}}function eventIsInPeriod(event,periodStart,periodEnd){periodStart=moment(periodStart),periodEnd=moment(periodEnd);var eventPeriod=getRecurringEventPeriod({start:event.startsAt,end:event.endsAt||event.startsAt},event.recursOn,periodStart),eventStart=eventPeriod.start,eventEnd=eventPeriod.end;return eventStart.isAfter(periodStart)&&eventStart.isBefore(periodEnd)||eventEnd.isAfter(periodStart)&&eventEnd.isBefore(periodEnd)||eventStart.isBefore(periodStart)&&eventEnd.isAfter(periodEnd)||eventStart.isSame(periodStart)||eventEnd.isSame(periodEnd)}function filterEventsInPeriod(events,startPeriod,endPeriod){return events.filter(function(event){return eventIsInPeriod(event,startPeriod,endPeriod)})}function getEventsInPeriod(calendarDate,period,allEvents){var startPeriod=moment(calendarDate).startOf(period),endPeriod=moment(calendarDate).endOf(period);return filterEventsInPeriod(allEvents,startPeriod,endPeriod)}function getBadgeTotal(events){return events.filter(function(event){return event.incrementsBadgeTotal!==!1}).length}function getWeekDayNames(){for(var weekdays=[],count=0;7>count;)weekdays.push(formatDate(moment().weekday(count++),calendarConfig.dateFormats.weekDay));return weekdays}function getYearView(events,viewDate,cellModifier){for(var view=[],eventsInPeriod=getEventsInPeriod(viewDate,"year",events),month=moment(viewDate).startOf("year"),count=0;12>count;){var startPeriod=month.clone(),endPeriod=startPeriod.clone().endOf("month"),periodEvents=filterEventsInPeriod(eventsInPeriod,startPeriod,endPeriod),cell={label:formatDate(startPeriod,calendarConfig.dateFormats.month),isToday:startPeriod.isSame(moment().startOf("month")),events:periodEvents,date:startPeriod,badgeTotal:getBadgeTotal(periodEvents)};cellModifier({calendarCell:cell}),view.push(cell),month.add(1,"month"),count++}return view}function getMonthView(events,viewDate,cellModifier){var eventsInPeriod,startOfMonth=moment(viewDate).startOf("month"),day=startOfMonth.clone().startOf("week"),endOfMonthView=moment(viewDate).endOf("month").endOf("week");eventsInPeriod=calendarConfig.displayAllMonthEvents?filterEventsInPeriod(events,day,endOfMonthView):filterEventsInPeriod(events,startOfMonth,startOfMonth.clone().endOf("month"));for(var view=[],today=moment().startOf("day");day.isBefore(endOfMonthView);){var inMonth=day.month()===moment(viewDate).month(),monthEvents=[];(inMonth||calendarConfig.displayAllMonthEvents)&&(monthEvents=filterEventsInPeriod(eventsInPeriod,day,day.clone().endOf("day")));var cell={label:day.date(),date:day.clone(),inMonth:inMonth,isPast:today.isAfter(day),isToday:today.isSame(day),isFuture:today.isBefore(day),isWeekend:[0,6].indexOf(day.day())>-1,events:monthEvents,badgeTotal:getBadgeTotal(monthEvents)};cellModifier({calendarCell:cell}),view.push(cell),day.add(1,"day")}return view}function getWeekView(events,viewDate){for(var startOfWeek=moment(viewDate).startOf("week"),endOfWeek=moment(viewDate).endOf("week"),dayCounter=startOfWeek.clone(),days=[],today=moment().startOf("day");days.length<7;)days.push({weekDayLabel:formatDate(dayCounter,calendarConfig.dateFormats.weekDay),date:dayCounter.clone(),dayLabel:formatDate(dayCounter,calendarConfig.dateFormats.day),isPast:dayCounter.isBefore(today),isToday:dayCounter.isSame(today),isFuture:dayCounter.isAfter(today),isWeekend:[0,6].indexOf(dayCounter.day())>-1}),dayCounter.add(1,"day");var eventsSorted=filterEventsInPeriod(events,startOfWeek,endOfWeek).map(function(event){var offset,span,weekViewStart=moment(startOfWeek).startOf("day"),weekViewEnd=moment(endOfWeek).startOf("day"),eventPeriod=getRecurringEventPeriod({start:moment(event.startsAt).startOf("day"),end:moment(event.endsAt||event.startsAt).startOf("day")},event.recursOn,weekViewStart),eventStart=eventPeriod.start,eventEnd=eventPeriod.end;return offset=eventStart.isBefore(weekViewStart)||eventStart.isSame(weekViewStart)?0:eventStart.diff(weekViewStart,"days"),eventEnd.isAfter(weekViewEnd)&&(eventEnd=weekViewEnd),eventStart.isBefore(weekViewStart)&&(eventStart=weekViewStart),span=moment(eventEnd).diff(eventStart,"days")+1,event.daySpan=span,event.dayOffset=offset,event});return{days:days,events:eventsSorted}}function getDayView(events,viewDate,dayViewStart,dayViewEnd,dayViewSplit){var dayStartHour=moment(dayViewStart||"00:00","HH:mm").hours(),dayEndHour=moment(dayViewEnd||"23:00","HH:mm").hours(),hourHeight=60/dayViewSplit*30,calendarStart=moment(viewDate).startOf("day").add(dayStartHour,"hours"),calendarEnd=moment(viewDate).startOf("day").add(dayEndHour,"hours"),calendarHeight=(dayEndHour-dayStartHour+1)*hourHeight,hourHeightMultiplier=hourHeight/60,buckets=[],eventsInPeriod=filterEventsInPeriod(events,moment(viewDate).startOf("day").toDate(),moment(viewDate).endOf("day").toDate());return eventsInPeriod.map(function(event){if(moment(event.startsAt).isBefore(calendarStart)?event.top=0:event.top=moment(event.startsAt).startOf("minute").diff(calendarStart.startOf("minute"),"minutes")*hourHeightMultiplier-2,moment(event.endsAt||event.startsAt).isAfter(calendarEnd))event.height=calendarHeight-event.top;else{var diffStart=event.startsAt;moment(event.startsAt).isBefore(calendarStart)&&(diffStart=calendarStart.toDate()),event.endsAt?event.height=moment(event.endsAt||event.startsAt).diff(diffStart,"minutes")*hourHeightMultiplier:event.height=30}return event.top-event.height>calendarHeight&&(event.height=0),event.left=0,event}).filter(function(event){return event.height>0}).map(function(event){var cannotFitInABucket=!0;return buckets.forEach(function(bucket,bucketIndex){var canFitInThisBucket=!0;bucket.forEach(function(bucketItem){(eventIsInPeriod(event,bucketItem.startsAt,bucketItem.endsAt||bucketItem.startsAt)||eventIsInPeriod(bucketItem,event.startsAt,event.endsAt||event.startsAt))&&(canFitInThisBucket=!1)}),canFitInThisBucket&&cannotFitInABucket&&(cannotFitInABucket=!1,event.left=150*bucketIndex,buckets[bucketIndex].push(event))}),cannotFitInABucket&&(event.left=150*buckets.length,buckets.push([event])),event})}function getWeekViewWithTimes(events,viewDate,dayViewStart,dayViewEnd,dayViewSplit){var weekView=getWeekView(events,viewDate),newEvents=[];return weekView.days.forEach(function(day){var dayEvents=weekView.events.filter(function(event){return moment(event.startsAt).startOf("day").isSame(moment(day.date).startOf("day"))}),newDayEvents=getDayView(dayEvents,day.date,dayViewStart,dayViewEnd,dayViewSplit);newEvents=newEvents.concat(newDayEvents)}),weekView.events=newEvents,weekView}function getDayViewHeight(dayViewStart,dayViewEnd,dayViewSplit){var dayViewStartM=moment(dayViewStart||"00:00","HH:mm"),dayViewEndM=moment(dayViewEnd||"23:00","HH:mm"),hourHeight=60/dayViewSplit*30;return(dayViewEndM.diff(dayViewStartM,"hours")+1)*hourHeight+2}return{getWeekDayNames:getWeekDayNames,getYearView:getYearView,getMonthView:getMonthView,getWeekView:getWeekView,getDayView:getDayView,getWeekViewWithTimes:getWeekViewWithTimes,getDayViewHeight:getDayViewHeight,adjustEndDateFromStartDiff:adjustEndDateFromStartDiff,formatDate:formatDate,eventIsInPeriod:eventIsInPeriod}}])},function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(12);angular.module("mwl.calendar").factory("calendarTitle",["moment","calendarConfig","calendarHelper",function(moment,calendarConfig,calendarHelper){function day(viewDate){return calendarHelper.formatDate(viewDate,calendarConfig.titleFormats.day)}function week(viewDate){var weekTitleLabel=calendarConfig.titleFormats.week;return weekTitleLabel.replace("{week}",moment(viewDate).isoWeek()).replace("{year}",moment(viewDate).format("YYYY"))}function month(viewDate){return calendarHelper.formatDate(viewDate,calendarConfig.titleFormats.month)}function year(viewDate){return calendarHelper.formatDate(viewDate,calendarConfig.titleFormats.year)}return{day:day,week:week,month:month,year:year}}])},function(module,exports,__webpack_require__){"use strict";var interact,angular=__webpack_require__(12);try{interact=__webpack_require__(47)}catch(e){interact=null}angular.module("mwl.calendar").constant("interact",interact)},function(module,exports){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_47__){var e=new Error('Cannot find module "undefined"');throw e.code="MODULE_NOT_FOUND",e}module.exports=__WEBPACK_EXTERNAL_MODULE_47__},function(module,exports,__webpack_require__){"use strict";
var angular=__webpack_require__(12),moment=__webpack_require__(49);angular.module("mwl.calendar").constant("moment",moment)},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_49__}])});