(function(n){function d(n,t,i){switch(arguments.length){case 2:return null!=n?n:t;case 3:return null!=n?n:null!=t?t:i;default:throw new Error("Implement me");}}function ot(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function gt(n){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function f(n,t){var i=!0;return p(function(){return i&&(gt(n),i=!1),t.apply(this,arguments)},t)}function wr(n,t){yr[n]||(gt(t),yr[n]=!0)}function ni(n,t){return function(i){return r(n.call(this,i),t)}}function br(n,t){return function(i){return this.localeData().ordinal(n.call(this,i),t)}}function ti(){}function it(n,t){t!==!1&&li(n);ii(this,n);this._d=new Date(+n._d)}function st(n){var i=oi(n),r=i.year||0,u=i.quarter||0,f=i.month||0,e=i.week||0,o=i.day||0,s=i.hour||0,h=i.minute||0,c=i.second||0,l=i.millisecond||0;this._milliseconds=+l+1e3*c+6e4*h+36e5*s;this._days=+o+7*e;this._months=+f+3*u+12*r;this._data={};this._locale=t.localeData();this._bubble()}function p(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return t.hasOwnProperty("toString")&&(n.toString=t.toString),t.hasOwnProperty("valueOf")&&(n.valueOf=t.valueOf),n}function ii(n,t){var u,i,r;if("undefined"!=typeof t._isAMomentObject&&(n._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(n._i=t._i),"undefined"!=typeof t._f&&(n._f=t._f),"undefined"!=typeof t._l&&(n._l=t._l),"undefined"!=typeof t._strict&&(n._strict=t._strict),"undefined"!=typeof t._tzm&&(n._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(n._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(n._offset=t._offset),"undefined"!=typeof t._pf&&(n._pf=t._pf),"undefined"!=typeof t._locale&&(n._locale=t._locale),ft.length>0)for(u in ft)i=ft[u],r=t[i],"undefined"!=typeof r&&(n[i]=r);return n}function e(n){return 0>n?Math.ceil(n):Math.floor(n)}function r(n,t,i){for(var r=""+Math.abs(n),u=n>=0;r.length<t;)r="0"+r;return(u?i?"+":"":"-")+r}function ri(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function kr(n,t){var i;return t=ut(t,n),n.isBefore(t)?i=ri(n,t):(i=ri(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function ui(n,i){return function(r,u){var f,e;return null===u||isNaN(+u)||(wr(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period)."),e=r,r=u,u=e),r="string"==typeof r?+r:r,f=t.duration(r,u),fi(this,f,n),this}}function fi(n,i,r,u){var o=i._milliseconds,f=i._days,e=i._months;u=null==u?!0:u;o&&n._d.setTime(+n._d+o*r);f&&nr(n,"Date",yt(n,"Date")+f*r);e&&gi(n,yt(n,"Month")+e*r);u&&t.updateOffset(n,f||e)}function rt(n){return"[object Array]"===Object.prototype.toString.call(n)}function dr(n){return"[object Date]"===Object.prototype.toString.call(n)||n instanceof Date}function ei(n,t,r){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),f=0,u=0;e>u;u++)(r&&n[u]!==t[u]||!r&&i(n[u])!==i(t[u]))&&f++;return f+o}function s(n){if(n){var t=n.toLowerCase().replace(/(.)s$/,"$1");n=pf[n]||wf[t]||t}return n}function oi(n){var i,t,r={};for(t in n)n.hasOwnProperty(t)&&(i=s(t),i&&(r[i]=n[t]));return r}function gr(i){var r,u;if(0===i.indexOf("week"))r=7,u="day";else{if(0!==i.indexOf("month"))return;r=12;u="month"}t[i]=function(f,e){var o,s,c=t._locale[i],h=[];if("number"==typeof f&&(e=f,f=n),s=function(n){var i=t().utc().set(u,n);return c.call(t._locale,i,f||"")},null!=e)return s(e);for(o=0;r>o;o++)h.push(s(o));return h}}function i(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function ht(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function si(n,i,r){return w(t([n,11,31+i-r]),i,r).week}function hi(n){return ci(n)?366:365}function ci(n){return n%4==0&&n%100!=0||n%400==0}function li(n){var t;n._a&&-2===n._pf.overflow&&(t=n._a[l]<0||n._a[l]>11?l:n._a[o]<1||n._a[o]>ht(n._a[c],n._a[l])?o:n._a[a]<0||n._a[a]>23?a:n._a[g]<0||n._a[g]>59?g:n._a[nt]<0||n._a[nt]>59?nt:n._a[tt]<0||n._a[tt]>999?tt:-1,n._pf._overflowDayOfYear&&(c>t||t>o)&&(t=o),n._pf.overflow=t)}function ai(n){return null==n._isValid&&(n._isValid=!isNaN(n._d.getTime())&&n._pf.overflow<0&&!n._pf.empty&&!n._pf.invalidMonth&&!n._pf.nullInput&&!n._pf.invalidFormat&&!n._pf.userInvalidated,n._strict&&(n._isValid=n._isValid&&0===n._pf.charsLeftOver&&0===n._pf.unusedTokens.length)),n._isValid}function vi(n){return n?n.toLowerCase().replace("_","-"):n}function nu(n){for(var i,t,f,r,u=0;u<n.length;){for(r=vi(n[u]).split("-"),i=r.length,t=vi(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=yi(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&ei(r,t,!0)>=i-1)break;i--}u++}return null}function yi(n){var i=null;if(!k[n]&&fr)try{i=t.locale();require("./locale/"+n);t.locale(i)}catch(r){}return k[n]}function ut(n,i){return i._isUTC?t(n).zone(i._offset||0):t(n).local()}function tu(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function iu(n){for(var i=n.match(er),t=0,r=i.length;r>t;t++)i[t]=v[i[t]]?v[i[t]]:tu(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function ct(n,t){return n.isValid()?(t=pi(t,n.localeData()),dt[t]||(dt[t]=iu(t)),dt[t](n)):n.localeData().invalidDate()}function pi(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(et.lastIndex=0;i>=0&&et.test(n);)n=n.replace(et,r),et.lastIndex=0,i-=1;return n}function ru(n,t){var i=t._strict;switch(n){case"Q":return sr;case"DDDD":return cr;case"YYYY":case"GGGG":case"gggg":return i?cf:rf;case"Y":case"G":case"g":return af;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?lf:uf;case"S":if(i)return sr;case"SS":if(i)return hr;case"SSS":if(i)return cr;case"DDD":return tf;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return ef;case"a":case"A":return t._locale._meridiemParse;case"X":return sf;case"Z":case"ZZ":return wt;case"T":return of;case"SSSS":return ff;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?hr:or;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return or;case"Do":return hf;default:return new RegExp(hu(su(n.replace("\\","")),"i"))}}function wi(n){n=n||"";var r=n.match(wt)||[],f=r[r.length-1]||[],t=(f+"").match(yf)||["-",0,0],u=+(60*t[1])+i(t[2]);return"+"===t[0]?-u:u}function uu(n,r,u){var e,f=u._a;switch(n){case"Q":null!=r&&(f[l]=3*(i(r)-1));break;case"M":case"MM":null!=r&&(f[l]=i(r)-1);break;case"MMM":case"MMMM":e=u._locale.monthsParse(r);null!=e?f[l]=e:u._pf.invalidMonth=r;break;case"D":case"DD":null!=r&&(f[o]=i(r));break;case"Do":null!=r&&(f[o]=i(parseInt(r,10)));break;case"DDD":case"DDDD":null!=r&&(u._dayOfYear=i(r));break;case"YY":f[c]=t.parseTwoDigitYear(r);break;case"YYYY":case"YYYYY":case"YYYYYY":f[c]=i(r);break;case"a":case"A":u._isPm=u._locale.isPM(r);break;case"H":case"HH":case"h":case"hh":f[a]=i(r);break;case"m":case"mm":f[g]=i(r);break;case"s":case"ss":f[nt]=i(r);break;case"S":case"SS":case"SSS":case"SSSS":f[tt]=i(1e3*("0."+r));break;case"X":u._d=new Date(1e3*parseFloat(r));break;case"Z":case"ZZ":u._useUTC=!0;u._tzm=wi(r);break;case"dd":case"ddd":case"dddd":e=u._locale.weekdaysParse(r);null!=e?(u._w=u._w||{},u._w.d=e):u._pf.invalidWeekday=r;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":n=n.substr(0,1);case"gggg":case"GGGG":case"GGGGG":n=n.substr(0,2);r&&(u._w=u._w||{},u._w[n]=i(r));break;case"gg":case"GG":u._w=u._w||{};u._w[n]=t.parseTwoDigitYear(r)}}function fu(n){var i,o,f,u,r,e,s;i=n._w;null!=i.GG||null!=i.W||null!=i.E?(r=1,e=4,o=d(i.GG,n._a[c],w(t(),1,4).year),f=d(i.W,1),u=d(i.E,1)):(r=n._locale._week.dow,e=n._locale._week.doy,o=d(i.gg,n._a[c],w(t(),r,e).year),f=d(i.w,1),null!=i.d?(u=i.d,r>u&&++f):u=null!=i.e?i.e+r:r);s=bu(o,f,u,e,r);n._a[c]=s.year;n._dayOfYear=s.dayOfYear}function lt(n){var t,i,r,u,f=[];if(!n._d){for(r=ou(n),n._w&&null==n._a[o]&&null==n._a[l]&&fu(n),n._dayOfYear&&(u=d(n._a[c],r[c]),n._dayOfYear>hi(u)&&(n._pf._overflowDayOfYear=!0),i=vt(u,0,n._dayOfYear),n._a[l]=i.getUTCMonth(),n._a[o]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=f[t]=r[t];for(;7>t;t++)n._a[t]=f[t]=null==n._a[t]?2===t?1:0:n._a[t];n._d=(n._useUTC?vt:vu).apply(null,f);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()+n._tzm)}}function eu(n){var t;n._d||(t=oi(n._i),n._a=[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond],lt(n))}function ou(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function at(n){if(n._f===t.ISO_8601)return void bi(n);n._a=[];n._pf.empty=!0;for(var i,u,o,r=""+n._i,h=r.length,s=0,e=pi(n._f,n._locale).match(er)||[],f=0;f<e.length;f++)u=e[f],i=(r.match(ru(u,n))||[])[0],i&&(o=r.substr(0,r.indexOf(i)),o.length>0&&n._pf.unusedInput.push(o),r=r.slice(r.indexOf(i)+i.length),s+=i.length),v[u]?(i?n._pf.empty=!1:n._pf.unusedTokens.push(u),uu(u,i,n)):n._strict&&!i&&n._pf.unusedTokens.push(u);n._pf.charsLeftOver=h-s;r.length>0&&n._pf.unusedInput.push(r);n._isPm&&n._a[a]<12&&(n._a[a]+=12);n._isPm===!1&&12===n._a[a]&&(n._a[a]=0);lt(n);li(n)}function su(n){return n.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u})}function hu(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function cu(n){var t,f,u,r,i;if(0===n._f.length)return n._pf.invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=ii({},n),t._pf=ot(),t._f=n._f[r],at(t),ai(t)&&(i+=t._pf.charsLeftOver,i+=10*t._pf.unusedTokens.length,t._pf.score=i,(null==u||u>i)&&(u=i,f=t));p(n,f||t)}function bi(n){var t,i,r=n._i,u=vf.exec(r);if(u){for(n._pf.iso=!0,t=0,i=bt.length;i>t;t++)if(bt[t][1].exec(r)){n._f=bt[t][0]+(u[6]||" ");break}for(t=0,i=kt.length;i>t;t++)if(kt[t][1].exec(r)){n._f+=kt[t][0];break}r.match(wt)&&(n._f+="Z");at(n)}else n._isValid=!1}function lu(n){bi(n);n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n))}function au(i){var u,r=i._i;r===n?i._d=new Date:dr(r)?i._d=new Date(+r):null!==(u=du.exec(r))?i._d=new Date(+u[1]):"string"==typeof r?lu(i):rt(r)?(i._a=r.slice(0),lt(i)):"object"==typeof r?eu(i):"number"==typeof r?i._d=new Date(r):t.createFromInputFallback(i)}function vu(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function vt(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function yu(n,t){if("string"==typeof n)if(isNaN(n)){if(n=t.weekdaysParse(n),"number"!=typeof n)return null}else n=parseInt(n,10);return n}function pu(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function wu(n,i,r){var u=t.duration(n).abs(),c=b(u.as("s")),e=b(u.as("m")),o=b(u.as("h")),s=b(u.as("d")),h=b(u.as("M")),l=b(u.as("y")),f=c<y.s&&["s",c]||1===e&&["m"]||e<y.m&&["mm",e]||1===o&&["h"]||o<y.h&&["hh",o]||1===s&&["d"]||s<y.d&&["dd",s]||1===h&&["M"]||h<y.M&&["MM",h]||1===l&&["y"]||["yy",l];return f[2]=i,f[3]=+n>0,f[4]=r,pu.apply({},f)}function w(n,i,r){var f,e=r-i,u=r-n.day();return u>e&&(u-=7),e-7>u&&(u+=7),f=t(n).add(u,"d"),{week:Math.ceil(f.dayOfYear()/7),year:f.year()}}function bu(n,t,i,r,u){var o,e,f=vt(n,0,1).getUTCDay();return f=0===f?7:f,i=null!=i?i:u,o=u-f+(f>r?7:0)-(u>f?7:0),e=7*(t-1)+(i-u)+o+1,{year:e>0?n:n-1,dayOfYear:e>0?e:hi(n-1)+e}}function ki(i){var r=i._i,u=i._f;return i._locale=i._locale||t.localeData(i._l),null===r||u===n&&""===r?t.invalid({nullInput:!0}):("string"==typeof r&&(i._i=r=i._locale.preparse(r)),t.isMoment(r)?new it(r,!0):(u?rt(u)?cu(i):at(i):au(i),new it(i)))}function di(n,i){var u,r;if(1===i.length&&rt(i[0])&&(i=i[0]),!i.length)return t();for(u=i[0],r=1;r<i.length;++r)i[r][n](u)&&(u=i[r]);return u}function gi(n,t){var i;return"string"==typeof t&&(t=n.localeData().monthsParse(t),"number"!=typeof t)?n:(i=Math.min(n.date(),ht(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function yt(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function nr(n,t,i){return"Month"===t?gi(n,i):n._d["set"+(n._isUTC?"UTC":"")+t](i)}function h(n,i){return function(r){return null!=r?(nr(this,n,r),t.updateOffset(this,i),this):yt(this,n)}}function tr(n){return 400*n/146097}function ir(n){return 146097*n/400}function ku(n){t.duration.fn[n]=function(){return this._data[n]}}function rr(n){"undefined"==typeof ender&&(ur=pt.moment,pt.moment=n?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",t):t)}for(var t,ur,u,pt="undefined"!=typeof global?global:this,b=Math.round,c=0,l=1,o=2,a=3,g=4,nt=5,tt=6,k={},ft=[],fr="undefined"!=typeof module&&module.exports,du=/^\/?Date\((\-?\d+)/i,gu=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,nf=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,er=/(\[[^\[]*\])|(\\)?(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,4}|X|zz?|ZZ?|.)/g,et=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,or=/\d\d?/,tf=/\d{1,3}/,rf=/\d{1,4}/,uf=/[+\-]?\d{1,6}/,ff=/\d+/,ef=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,wt=/Z|[\+\-]\d\d:?\d\d/gi,of=/T/i,sf=/[\+\-]?\d+(\.\d{1,3})?/,hf=/\d{1,2}/,sr=/\d/,hr=/\d\d/,cr=/\d{3}/,cf=/\d{4}/,lf=/[+-]?\d{6}/,af=/[+-]?\d+/,vf=/^\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)?)?$/,bt=[["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}/]],kt=[["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/]],yf=/([\+\-]|\d\d)/gi,lr=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),pf={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},wf={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},dt={},y={s:45,m:45,h:22,d:26,M:11},ar="DDD w W M D d".split(" "),vr="M D H h m s w W".split(" "),v={M:function(){return this.month()+1},MMM:function(n){return this.localeData().monthsShort(this,n)},MMMM:function(n){return this.localeData().months(this,n)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(n){return this.localeData().weekdaysMin(this,n)},ddd:function(n){return this.localeData().weekdaysShort(this,n)},dddd:function(n){return this.localeData().weekdays(this,n)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var n=this.year(),t=n>=0?"+":"-";return t+r(Math.abs(n),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return i(this.milliseconds()/100)},SS:function(){return r(i(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+":"+r(i(n)%60,2)},ZZ:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+r(i(n)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},yr={},pr=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];ar.length;)u=ar.pop(),v[u+"o"]=br(v[u],u);for(;vr.length;)u=vr.pop(),v[u+u]=ni(v[u],2);for(v.DDDD=ni(v.DDD,3),p(ti.prototype,{set:function(n){var t;for(var i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(n){return this._months[n.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(n){return this._monthsShort[n.month()]},monthsParse:function(n){var i,r,u;for(this._monthsParse||(this._monthsParse=[]),i=0;12>i;i++)if(this._monthsParse[i]||(r=t.utc([2e3,i]),u="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(u.replace(".",""),"i")),this._monthsParse[i].test(n))return i},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(n){return this._weekdays[n.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(n){return this._weekdaysShort[n.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(n){return this._weekdaysMin[n.day()]},weekdaysParse:function(n){var i,r,u;for(this._weekdaysParse||(this._weekdaysParse=[]),i=0;7>i;i++)if(this._weekdaysParse[i]||(r=t([2e3,1]).day(i),u="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(u.replace(".",""),"i")),this._weekdaysParse[i].test(n))return i},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(n){var t=this._longDateFormat[n];return!t&&this._longDateFormat[n.toUpperCase()]&&(t=this._longDateFormat[n.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n]=t),t},isPM:function(n){return"p"===(n+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(n,t){var i=this._calendar[n];return"function"==typeof i?i.apply(t):i},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)},pastFuture:function(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(n){return this._ordinal.replace("%d",n)},_ordinal:"%d",preparse:function(n){return n},postformat:function(n){return n},week:function(n){return w(n,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._i=t,f._f=i,f._l=r,f._strict=u,f._isUTC=!1,f._pf=ot(),ki(f)},t.suppressDeprecationWarnings=!1,t.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i)}),t.min=function(){var n=[].slice.call(arguments,0);return di("isBefore",n)},t.max=function(){var n=[].slice.call(arguments,0);return di("isAfter",n)},t.utc=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._useUTC=!0,f._isUTC=!0,f._l=r,f._i=t,f._f=i,f._strict=u,f._pf=ot(),ki(f).utc()},t.unix=function(n){return t(1e3*n)},t.duration=function(n,r){var e,h,s,c,f=n,u=null;return t.isDuration(n)?f={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(f={},r?f[r]=n:f.milliseconds=n):(u=gu.exec(n))?(e="-"===u[1]?-1:1,f={y:0,d:i(u[o])*e,h:i(u[a])*e,m:i(u[g])*e,s:i(u[nt])*e,ms:i(u[tt])*e}):(u=nf.exec(n))?(e="-"===u[1]?-1:1,s=function(n){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e},f={y:s(u[2]),M:s(u[3]),d:s(u[4]),h:s(u[5]),m:s(u[6]),s:s(u[7]),w:s(u[8])}):"object"==typeof f&&("from"in f||"to"in f)&&(c=kr(t(f.from),t(f.to)),f={},f.ms=c.milliseconds,f.M=c.months),h=new st(f),t.isDuration(n)&&n.hasOwnProperty("_locale")&&(h._locale=n._locale),h},t.version="2.8.1",t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.ISO_8601=function(){},t.momentProperties=ft,t.updateOffset=function(){},t.relativeTimeThreshold=function(t,i){return y[t]===n?!1:i===n?y[t]:(y[t]=i,!0)},t.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(n,i){return t.locale(n,i)}),t.locale=function(n,i){var r;return n&&(r="undefined"!=typeof i?t.defineLocale(n,i):t.localeData(n),r&&(t.duration._locale=t._locale=r)),t._locale._abbr},t.defineLocale=function(n,i){return null!==i?(i.abbr=n,k[n]||(k[n]=new ti),k[n].set(i),t.locale(n),k[n]):(delete k[n],null)},t.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(n){return t.localeData(n)}),t.localeData=function(n){var i;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return t._locale;if(!rt(n)){if(i=yi(n))return i;n=[n]}return nu(n)},t.isMoment=function(n){return n instanceof it||null!=n&&n.hasOwnProperty("_isAMomentObject")},t.isDuration=function(n){return n instanceof st},u=pr.length-1;u>=0;--u)gr(pr[u]);t.normalizeUnits=function(n){return s(n)};t.invalid=function(n){var i=t.utc(NaN);return null!=n?p(i._pf,n):i._pf.userInvalidated=!0,i};t.parseZone=function(){return t.apply(null,arguments).parseZone()};t.parseTwoDigitYear=function(n){return i(n)+(i(n)>68?1900:2e3)};p(t.fn=it.prototype,{clone:function(){return t(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var n=t(this).utc();return 0<n.year()&&n.year()<=9999?ct(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):ct(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var n=this;return[n.year(),n.month(),n.date(),n.hours(),n.minutes(),n.seconds(),n.milliseconds()]},isValid:function(){return ai(this)},isDSTShifted:function(){return this._a?this.isValid()&&ei(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return p({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(n){return this.zone(0,n)},local:function(n){return this._isUTC&&(this.zone(0,n),this._isUTC=!1,n&&this.add(this._d.getTimezoneOffset(),"m")),this},format:function(n){var i=ct(this,n||t.defaultFormat);return this.localeData().postformat(i)},add:ui(1,"add"),subtract:ui(-1,"subtract"),diff:function(n,i,r){var u,o,f=ut(n,this),h=6e4*(this.zone()-f.zone());return i=s(i),"year"===i||"month"===i?(u=432e5*(this.daysInMonth()+f.daysInMonth()),o=12*(this.year()-f.year())+(this.month()-f.month()),o+=(this-t(this).startOf("month")-(f-t(f).startOf("month")))/u,o-=6e4*(this.zone()-t(this).startOf("month").zone()-(f.zone()-t(f).startOf("month").zone()))/u,"year"===i&&(o/=12)):(u=this-f,o="second"===i?u/1e3:"minute"===i?u/6e4:"hour"===i?u/36e5:"day"===i?(u-h)/864e5:"week"===i?(u-h)/6048e5:u),r?o:e(o)},from:function(n,i){return t.duration({to:this,from:n}).locale(this.locale()).humanize(!i)},fromNow:function(n){return this.from(t(),n)},calendar:function(n){var r=n||t(),u=ut(r,this).startOf("day"),i=this.diff(u,"days",!0),f=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(f,this))},isLeapYear:function(){return ci(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=yu(n,this.localeData()),this.add(n-t,"d")):t},month:h("Month",!0),startOf:function(n){switch(n=s(n)){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"===n?this.weekday(0):"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(n){return n=s(n),this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms")},isAfter:function(n,i){return i="undefined"!=typeof i?i:"millisecond",+this.clone().startOf(i)>+t(n).startOf(i)},isBefore:function(n,i){return i="undefined"!=typeof i?i:"millisecond",+this.clone().startOf(i)<+t(n).startOf(i)},isSame:function(n,t){return t=t||"ms",+this.clone().startOf(t)==+ut(n,this).startOf(t)},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),this>n?this:n}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),n>this?this:n}),zone:function(n,i){var r,u=this._offset||0;return null==n?this._isUTC?u:this._d.getTimezoneOffset():("string"==typeof n&&(n=wi(n)),Math.abs(n)<16&&(n=60*n),!this._isUTC&&i&&(r=this._d.getTimezoneOffset()),this._offset=n,this._isUTC=!0,null!=r&&this.subtract(r,"m"),u!==n&&(!i||this._changeInProgress?fi(this,t.duration(u-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(n){return n=n?t(n).zone():0,(this.zone()-n)%60==0},daysInMonth:function(){return ht(this.year(),this.month())},dayOfYear:function(n){var i=b((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return null==n?i:this.add(n-i,"d")},quarter:function(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)},weekYear:function(n){var t=w(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==n?t:this.add(n-t,"y")},isoWeekYear:function(n){var t=w(this,1,4).year;return null==n?t:this.add(n-t,"y")},week:function(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")},isoWeek:function(n){var t=w(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")},weekday:function(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")},isoWeekday:function(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)},isoWeeksInYear:function(){return si(this.year(),1,4)},weeksInYear:function(){var n=this.localeData()._week;return si(this.year(),n.dow,n.doy)},get:function(n){return n=s(n),this[n]()},set:function(n,t){return n=s(n),"function"==typeof this[n]&&this[n](t),this},locale:function(i){return i===n?this._locale._abbr:(this._locale=t.localeData(i),this)},lang:f("moment().lang() is deprecated. Use moment().localeData() instead.",function(i){return i===n?this.localeData():(this._locale=t.localeData(i),this)}),localeData:function(){return this._locale}});t.fn.millisecond=t.fn.milliseconds=h("Milliseconds",!1);t.fn.second=t.fn.seconds=h("Seconds",!1);t.fn.minute=t.fn.minutes=h("Minutes",!1);t.fn.hour=t.fn.hours=h("Hours",!0);t.fn.date=h("Date",!0);t.fn.dates=f("dates accessor is deprecated. Use date instead.",h("Date",!0));t.fn.year=h("FullYear",!0);t.fn.years=f("years accessor is deprecated. Use year instead.",h("FullYear",!0));t.fn.days=t.fn.day;t.fn.months=t.fn.month;t.fn.weeks=t.fn.week;t.fn.isoWeeks=t.fn.isoWeek;t.fn.quarters=t.fn.quarter;t.fn.toJSON=t.fn.toISOString;p(t.duration.fn=st.prototype,{_bubble:function(){var u,f,o,s=this._milliseconds,t=this._days,i=this._months,n=this._data,r=0;n.milliseconds=s%1e3;u=e(s/1e3);n.seconds=u%60;f=e(u/60);n.minutes=f%60;o=e(f/60);n.hours=o%24;t+=e(o/24);r=e(tr(t));t-=e(ir(r));i+=e(t/30);t%=30;r+=e(i/12);i%=12;n.days=t;n.months=i;n.years=r},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return e(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*i(this._months/12)},humanize:function(n){var t=wu(this,!n,this.localeData());return n&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(n,i){var r=t.duration(n,i);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(n,i){var r=t.duration(n,i);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(n){return n=s(n),this[n.toLowerCase()+"s"]()},as:function(n){var t,i;if(n=s(n),t=this._days+this._milliseconds/864e5,"month"===n||"year"===n)return i=this._months+12*tr(t),"month"===n?i:i/12;switch(t+=ir(this._months/12),n){case"week":return t/7;case"day":return t;case"hour":return 24*t;case"minute":return 1440*t;case"second":return 86400*t;case"millisecond":return 864e5*t;default:throw new Error("Unknown unit "+n);}},lang:t.fn.lang,locale:t.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var r=Math.abs(this.years()),u=Math.abs(this.months()),f=Math.abs(this.days()),n=Math.abs(this.hours()),t=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(r?r+"Y":"")+(u?u+"M":"")+(f?f+"D":"")+(n||t||i?"T":"")+(n?n+"H":"")+(t?t+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}});for(u in lr)lr.hasOwnProperty(u)&&ku(u.toLowerCase());t.duration.fn.asMilliseconds=function(){return this.as("ms")};t.duration.fn.asSeconds=function(){return this.as("s")};t.duration.fn.asMinutes=function(){return this.as("m")};t.duration.fn.asHours=function(){return this.as("h")};t.duration.fn.asDays=function(){return this.as("d")};t.duration.fn.asWeeks=function(){return this.as("weeks")};t.duration.fn.asMonths=function(){return this.as("M")};t.duration.fn.asYears=function(){return this.as("y")};t.locale("en",{ordinal:function(n){var t=n%10,r=1===i(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+r}});fr?module.exports=t:"function"==typeof define&&define.amd?(define("moment",function(n,i,r){return r.config&&r.config()&&r.config().noGlobal===!0&&(pt.moment=ur),t}),rr(!0)):rr()}).call(this);!function(n){"function"==typeof define&&define.amd?define(["jquery","moment"],n):n(jQuery,moment)}(function(n,t){function wi(n,t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function bi(n,t){var i=t.longDateFormat("L");return i=i.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),n.isRTL?i+=" ddd":i="ddd "+i,i}function ct(n){s(l,n)}function s(t){function r(i,r){n.isPlainObject(r)&&n.isPlainObject(t[i])&&!lt(i)?t[i]=s({},t[i],r):void 0!==r&&(t[i]=r)}for(var i=1;i<arguments.length;i++)n.each(arguments[i],r);return t}function lt(n){return/(Time|Duration)$/.test(n)}function ki(r,u){function si(n){p?d()&&(ot(),yt(n)):hi()}function hi(){ar=c.theme?"ui":"fc";r.addClass("fc");r.addClass(c.isRTL?"fc-rtl":"fc-ltr");c.theme&&r.addClass("ui-widget");p=n("<div class='fc-content' />").prependTo(r);k=new di(e,c);nt=k.render();nt&&r.prepend(nt);vt(c.defaultView);c.handleWindowResize&&n(window).resize(bt);at()||lt()}function lt(){setTimeout(function(){!f.start&&at()&&b()},0)}function ci(){f&&(g("viewDestroy",f,f,f.element),f.triggerEventDestroy());n(window).unbind("resize",bt);c.droppable&&n(document).off("dragstart",ri).off("dragstop",ui);f.selectionManagerDestroy&&f.selectionManagerDestroy();k.destroy();p.remove();r.removeClass("fc fc-ltr fc-rtl ui-widget")}function d(){return r.is(":visible")}function at(){return n("body").is(":visible")}function vt(n){f&&n==f.name||li(n)}function li(t){w++;f&&(g("viewDestroy",f,f,f.element),ft(),f.triggerEventDestroy(),ti(),f.element.remove(),k.deactivateButton(f.name));k.activateButton(t);f=new h[t](n("<div class='fc-view fc-view-"+t+"' />").appendTo(p),e);b();ii();w--}function b(n){f.start&&!n&&a.isWithin(f.intervalStart,f.intervalEnd)||d()&&yt(n)}function yt(n){w++;f.start&&(g("viewDestroy",f,f,f.element),ft(),ut());ti();n&&(a=f.incrementDate(a,n));f.render(a.clone());wt();ii();(f.afterRender||sr)();wi();bi();g("viewRender",f,f,f.element);w--;vi()}function pt(){d()&&(ft(),ut(),ot(),wt(),it())}function ot(){ct=c.contentHeight?c.contentHeight:c.height?c.height-(nt?nt.height():0)-v(p):Math.round(p.width()/Math.max(c.aspectRatio,.5))}function wt(){void 0===ct&&ot();w++;f.setHeight(ct);f.setWidth(p.width());w--;ht=r.outerWidth()}function bt(n){if(!w&&n.target===window)if(f.start){var t=++ei;setTimeout(function(){t==ei&&!w&&d()&&ht!=(ht=r.outerWidth())&&(w++,pt(),f.trigger("windowResize",fi),w--)},c.windowResizeDelay)}else lt()}function ai(){ut();ni()}function dt(n){ut();it(n)}function it(n){d()&&(f.renderEvents(oi,n),f.trigger("eventAfterAllRender"))}function ut(){f.triggerEventDestroy();f.clearEvents();f.clearEventData()}function vi(){!c.lazyFetching||vr(f.start,f.end)?ni():it()}function ni(){yr(f.start,f.end)}function yi(n){oi=n;it()}function pi(n){dt(n)}function wi(){k.updateTitle(f.title)}function bi(){var n=e.getNow();n.isWithin(f.intervalStart,f.intervalEnd)?k.disableButton("today"):k.enableButton("today")}function ki(n,t){f.select(n,t)}function ft(){f&&f.unselect()}function nr(){b(-1)}function tr(){b(1)}function ir(){a.add("years",-1);b()}function rr(){a.add("years",1);b()}function ur(){a=e.getNow();b()}function fr(n){a=e.moment(n);b()}function er(n){a.add(t.duration(n));b()}function or(){return a.clone()}function ti(){p.css({width:"100%",height:p.height(),overflow:"hidden"})}function ii(){p.css({width:"",height:"",overflow:""})}function hr(){return e}function cr(){return f}function lr(n,t){return void 0===t?c[n]:void(("height"==n||"contentHeight"==n||"aspectRatio"==n)&&(c[n]=t,pt()))}function g(n,t){if(c[n])return c[n].apply(t||fi,Array.prototype.slice.call(arguments,2))}function ri(t,i){var u=t.target,e=n(u),r;e.parents(".fc").length||(r=c.dropAccept,(n.isFunction(r)?r.call(u,e):e.is(r))&&(tt=u,f.dragStart(tt,t,i)))}function ui(n,t){tt&&(f.dragStop(tt,n,t),tt=null)}var e=this,et,c,y,st;u=u||{};c=s({},l,u);et=c.lang in o?o[c.lang]:o[l.lang];et&&(c=s({},l,et,u));c.isRTL&&(c=s({},l,ou,et||{},u));e.options=c;e.render=si;e.destroy=ci;e.refetchEvents=ai;e.reportEvents=yi;e.reportEventChange=pi;e.rerenderEvents=dt;e.changeView=vt;e.select=ki;e.unselect=ft;e.prev=nr;e.next=tr;e.prevYear=ir;e.nextYear=rr;e.today=ur;e.gotoDate=fr;e.incrementDate=er;e.getDate=or;e.getCalendar=hr;e.getView=cr;e.option=lr;e.trigger=g;y=rt(t.langData(c.lang));(c.monthNames&&(y._months=c.monthNames),c.monthNamesShort&&(y._monthsShort=c.monthNamesShort),c.dayNames&&(y._weekdays=c.dayNames),c.dayNamesShort&&(y._weekdaysShort=c.dayNamesShort),null!=c.firstDay)&&(st=rt(y._week),st.dow=c.firstDay,y._week=st);e.defaultAllDayEventDuration=t.duration(c.defaultAllDayEventDuration);e.defaultTimedEventDuration=t.duration(c.defaultTimedEventDuration);e.moment=function(){var n;return"local"===c.timezone?(n=i.moment.apply(null,arguments),n.hasTime()&&n.local()):n="UTC"===c.timezone?i.moment.utc.apply(null,arguments):i.moment.parseZone.apply(null,arguments),n._lang=y,n};e.getIsAmbigTimezone=function(){return"local"!==c.timezone&&"UTC"!==c.timezone};e.rezoneDate=function(n){return e.moment(n.toArray())};e.getNow=function(){var n=c.now;return"function"==typeof n&&(n=n()),e.moment(n)};e.calculateWeekNumber=function(n){var t=c.weekNumberCalculation;return"function"==typeof t?t(n):"local"===t?n.week():"ISO"===t.toUpperCase()?n.isoWeek():void 0};e.getEventEnd=function(n){return n.end?n.end.clone():e.getDefaultEventEnd(n.allDay,n.start)};e.getDefaultEventEnd=function(n,t){var i=t.clone();return n?i.stripTime().add(e.defaultAllDayEventDuration):i.add(e.defaultTimedEventDuration),e.getIsAmbigTimezone()&&i.stripZone(),i};e.formatRange=function(n,t,i){return"function"==typeof i&&(i=i.call(e,c,y)),gt(n,t,i,null,c.isRTL)};e.formatDate=function(n,t){return"function"==typeof t&&(t=t.call(e,c,y)),kt(n,t)};gi.call(e,c);var k,nt,p,ar,f,ht,ct,a,tt,vr=e.isFetchNeeded,yr=e.fetchEvents,fi=r[0],ei=0,w=0,oi=[];a=null!=c.defaultDate?e.moment(c.defaultDate):e.getNow();c.droppable&&n(document).on("dragstart",ri).on("dragstop",ui)}function di(t,i){function s(){u=i.theme?"ui":"fc";var t=i.header;if(t)return f=n("<table class='fc-header' style='width:100%'/>").append(n("<tr/>").append(o("left")).append(o("center")).append(o("right")))}function c(){f.remove()}function o(f){var e=n("<td class='fc-header-"+f+"'/>"),o=i.header[f];return o&&n.each(o.split(" "),function(f){f>0&&e.append("<span class='fc-header-space'/>");var o;n.each(this.split(","),function(f,s){var l,c;if("title"==s)e.append("<span class='fc-header-title'><h2>&nbsp;<\/h2><\/span>"),o&&o.addClass(u+"-corner-right"),o=null;else if(t[s]?l=t[s]:h[s]&&(l=function(){c.removeClass(u+"-state-hover");t.changeView(s)}),l){var a,v=y(i.themeButtonIcons,s),p=y(i.buttonIcons,s),k=y(i.defaultButtonText,s),b=y(i.buttonText,s);a=b?r(b):v&&i.theme?"<span class='ui-icon ui-icon-"+v+"'><\/span>":p&&!i.theme?"<span class='fc-icon fc-icon-"+p+"'><\/span>":r(k||s);c=n("<span class='fc-button fc-button-"+s+" "+u+"-state-default'>"+a+"<\/span>").click(function(){c.hasClass(u+"-state-disabled")||l()}).mousedown(function(){c.not("."+u+"-state-active").not("."+u+"-state-disabled").addClass(u+"-state-down")}).mouseup(function(){c.removeClass(u+"-state-down")}).hover(function(){c.not("."+u+"-state-active").not("."+u+"-state-disabled").addClass(u+"-state-hover")},function(){c.removeClass(u+"-state-hover").removeClass(u+"-state-down")}).appendTo(e);w(c);o||c.addClass(u+"-corner-left");o=c}});o&&o.addClass(u+"-corner-right")}),e}function l(n){f.find("h2").html(n)}function a(n){f.find("span.fc-button-"+n).addClass(u+"-state-active")}function v(n){f.find("span.fc-button-"+n).removeClass(u+"-state-active")}function p(n){f.find("span.fc-button-"+n).addClass(u+"-state-disabled")}function b(n){f.find("span.fc-button-"+n).removeClass(u+"-state-disabled")}var e=this,u,f;e.render=s;e.destroy=c;e.updateTitle=l;e.activateButton=a;e.deactivateButton=v;e.disableButton=p;e.enableButton=b;f=n([])}function gi(t){function ht(n,t){return!e||n.clone().stripZone()<e.clone().stripZone()||t.clone().stripZone()>o.clone().stripZone()}function ct(n,t){var s,r,i;for(e=n,o=t,u=[],s=++v,r=f.length,h=r,i=0;r>i;i++)w(f[i],s)}function w(t,i){b(t,function(r){var e,f,o=n.isArray(t.events);if(i==v){if(r)for(e=0;e<r.length;e++)f=r[e],o||(f=l(f,t)),f&&u.push(f);h--;h||s(u)}})}function b(u,f){for(var l,v=i.sourceFetchers,s,y,h=0;h<v.length;h++){if(l=v[h].call(r,u,e.clone(),o.clone(),t.timezone,f),l===!0)return;if("object"==typeof l)return void b(l,f)}if(s=u.events,s)n.isFunction(s)?(rt(),s.call(r,e.clone(),o.clone(),t.timezone,function(n){f(n);ut()})):n.isArray(s)?f(s):f();else if(y=u.url,y){var p,g=u.success,nt=u.error,tt=u.complete;p=n.isFunction(u.data)?u.data():u.data;var a=n.extend({},p||{}),w=c(u.startParam,t.startParam),d=c(u.endParam,t.endParam),it=c(u.timezoneParam,t.timezoneParam);w&&(a[w]=e.format());d&&(a[d]=o.format());t.timezone&&"local"!=t.timezone&&(a[it]=t.timezone);rt();n.ajax(n.extend({},vi,u,{data:a,success:function(t){t=t||[];var i=k(g,this,arguments);n.isArray(i)&&(t=i);f(t)},error:function(){k(nt,this,arguments);f()},complete:function(){k(tt,this,arguments);ut()}}))}else f()}function lt(n){var t=d(n);t&&(f.push(t),h++,w(t,v))}function d(t){var u,f,e=i.sourceNormalizers;if(n.isFunction(t)||n.isArray(t)?u={events:t}:"string"==typeof t?u={url:t}:"object"==typeof t&&(u=n.extend({},t),"string"==typeof u.className&&(u.className=u.className.split(/\s+/))),u){for(n.isArray(u.events)&&(u.events=n.map(u.events,function(n){return l(n,u)})),f=0;f<e.length;f++)e[f].call(r,u);return u}}function at(t){f=n.grep(f,function(n){return!g(n,t)});u=n.grep(u,function(n){return!g(n.source,t)});s(u)}function g(n,t){return n&&t&&nt(n)==nt(t)}function nt(n){return("object"==typeof n?n.events||n.url:"")||n}function vt(n){n.start=r.moment(n.start);n.end&&(n.end=r.moment(n.end));ft(n);yt(n);s(u)}function yt(n){for(var i,r,f,t=0;t<u.length;t++)if(i=u[t],i._id==n._id&&i!==n)for(r=0;r<y.length;r++)f=y[r],void 0!==n[f]&&(i[f]=n[f])}function pt(n,t){var i=l(n);i&&(i.source||(t&&(a.events.push(i),i.source=a),u.push(i)),s(u))}function wt(t){var r,i;for(null==t?t=function(){return!0}:n.isFunction(t)||(r=t+"",t=function(n){return n._id==r}),u=n.grep(u,t,!0),i=0;i<f.length;i++)n.isArray(f[i].events)&&(f[i].events=n.grep(f[i].events,t,!0));s(u)}function tt(t){return n.isFunction(t)?n.grep(u,t):null!=t?(t+="",n.grep(u,function(n){return n._id==t})):u}function rt(){st++||et("loading",null,!0,ot())}function ut(){--st||et("loading",null,!1,ot())}function l(i,u){var o,f,s,h,e={};return t.eventDataTransform&&(i=t.eventDataTransform(i)),u&&u.eventDataTransform&&(i=u.eventDataTransform(i)),o=r.moment(i.start||i.date),o.isValid()&&(f=null,!i.end||(f=r.moment(i.end),f.isValid()))?(s=i.allDay,void 0===s&&(h=c(u?u.allDayDefault:void 0,t.allDayDefault),s=void 0!==h?h:!(o.hasTime()||f&&f.hasTime())),s?(o.hasTime()&&o.stripTime(),f&&f.hasTime()&&f.stripTime()):(o.hasTime()||(o=r.rezoneDate(o)),f&&!f.hasTime()&&(f=r.rezoneDate(f))),n.extend(e,i),u&&(e.source=u),e._id=i._id||(void 0===i.id?"_fc"+yi++:i.id+""),e.className=i.className?"string"==typeof i.className?i.className.split(/\s+/):i.className:[],e.allDay=s,e.start=o,e.end=f,t.forceEventDuration&&!e.end&&(e.end=kt(e)),it(e),e):void 0}function ft(n,t,i){var u,e,o,h,s=n._allDay,f=n._start,l=n._end,c=!1;return t||i||(t=n.start,i=n.end),u=n.allDay!=s?n.allDay:!(t||i).hasTime(),u&&(t&&(t=t.clone().stripTime()),i&&(i=i.clone().stripTime())),t&&(e=u?p(t,f.clone().stripTime()):p(t,f)),u!=s?c=!0:i&&(o=p(i||r.getDefaultEventEnd(u,t||f),t||f).subtract(p(l||r.getDefaultEventEnd(s,f),f))),h=bt(tt(n._id),c,u,e,o),{dateDelta:e,durationDelta:o,undo:h}}function bt(i,u,f,e,o){var h=r.getIsAmbigTimezone(),s=[];return n.each(i,function(n,i){var y=i._allDay,p=i._start,a=i._end,v=null!=f?f:y,l=p.clone(),c=!u&&a?a.clone():null;v?(l.stripTime(),c&&c.stripTime()):(l.hasTime()||(l=r.rezoneDate(l)),c&&!c.hasTime()&&(c=r.rezoneDate(c)));c||!t.forceEventDuration&&!+o||(c=r.getDefaultEventEnd(v,l));l.add(e);c&&c.add(e).add(o);h&&(+e||+o)&&(l.stripZone(),c&&c.stripZone());i.allDay=v;i.start=l;i.end=c;it(i);s.push(function(){i.allDay=y;i.start=p;i.end=a;it(i)})}),function(){for(var n=0;n<s.length;n++)s[n]()}}var r=this,y;r.isFetchNeeded=ht;r.fetchEvents=ct;r.addEventSource=lt;r.removeEventSource=at;r.updateEvent=vt;r.renderEvent=pt;r.removeEvents=wt;r.clientEvents=tt;r.mutateEvent=ft;var e,o,et=r.trigger,ot=r.getView,s=r.reportEvents,kt=r.getEventEnd,a={events:[]},f=[a],v=0,h=0,st=0,u=[];n.each((t.events?[t.events]:[]).concat(t.eventSources||[]),function(n,t){var i=d(t);i&&f.push(i)});y=["title","url","allDay","className","editable","color","backgroundColor","borderColor","textColor"]}function it(n){n._allDay=n.allDay;n._start=n.start.clone();n._end=n.end?n.end.clone():null}function rt(n){var t=function(){};return t.prototype=n,new t}function nr(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])}function p(n,i){return t.duration({days:n.clone().stripTime().diff(i.clone().stripTime(),"days"),ms:n.time()-i.time()})}function tr(n){return"[object Date]"===Object.prototype.toString.call(n)||n instanceof Date}function at(t,i,r){t.unbind("mouseover").mouseover(function(t){for(var e,o,u,f=t.target;f!=this;)e=f,f=f.parentNode;void 0!==(o=e._fci)&&(e._fci=void 0,u=i[o],r(u.event,u.element,u),n(t.target).trigger(t));t.stopPropagation()})}function a(t,i,r){for(var u,f=0;f<t.length;f++)u=n(t[f]),u.width(Math.max(0,i-ut(u,r)))}function vt(t,i,r){for(var u,f=0;f<t.length;f++)u=n(t[f]),u.height(Math.max(0,i-v(u,r)))}function ut(n,t){return ir(n)+ur(n)+(t?rr(n):0)}function ir(t){return(parseFloat(n.css(t[0],"paddingLeft",!0))||0)+(parseFloat(n.css(t[0],"paddingRight",!0))||0)}function rr(t){return(parseFloat(n.css(t[0],"marginLeft",!0))||0)+(parseFloat(n.css(t[0],"marginRight",!0))||0)}function ur(t){return(parseFloat(n.css(t[0],"borderLeftWidth",!0))||0)+(parseFloat(n.css(t[0],"borderRightWidth",!0))||0)}function v(n,t){return fr(n)+or(n)+(t?er(n):0)}function fr(t){return(parseFloat(n.css(t[0],"paddingTop",!0))||0)+(parseFloat(n.css(t[0],"paddingBottom",!0))||0)}function er(t){return(parseFloat(n.css(t[0],"marginTop",!0))||0)+(parseFloat(n.css(t[0],"marginBottom",!0))||0)}function or(t){return(parseFloat(n.css(t[0],"borderTopWidth",!0))||0)+(parseFloat(n.css(t[0],"borderBottomWidth",!0))||0)}function sr(){}function yt(n,t){return n-t}function pt(n){return Math.max.apply(Math,n)}function y(n,t){if(n=n||{},void 0!==n[t])return n[t];for(var i,u=t.split(/(?=[A-Z])/),r=u.length-1;r>=0;r--)if(i=n[u[r].toLowerCase()],void 0!==i)return i;return n["default"]}function r(n){return(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function ft(n){return n.replace(/&.*?;/g,"")}function w(n){n.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function b(n){n.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function wt(n,t){var i=n.source||{},u=n.color,f=i.color,e=t("eventColor"),o=n.backgroundColor||u||i.backgroundColor||f||t("eventBackgroundColor")||e,s=n.borderColor||u||i.borderColor||f||t("eventBorderColor")||e,h=n.textColor||i.textColor||t("eventTextColor"),r=[];return o&&r.push("background-color:"+o),s&&r.push("border-color:"+s),h&&r.push("color:"+h),r.join(";")}function k(t,i,r){if(n.isFunction(t)&&(t=[t]),t){for(var f,u=0;u<t.length;u++)f=t[u].apply(i,r)||f;return f}}function c(){for(var n=0;n<arguments.length;n++)if(void 0!==arguments[n])return arguments[n]}function d(i,r,f){var h,s,c,o,e=i[0],l=1==i.length&&"string"==typeof e;return t.isMoment(e)?(o=t.apply(null,i),e._ambigTime&&(o._ambigTime=!0),e._ambigZone&&(o._ambigZone=!0)):tr(e)||void 0===e?o=t.apply(null,i):(h=!1,s=!1,l?su.test(e)?(e+="-01",i=[e],h=!0,s=!0):(c=hu.exec(e))&&(h=!c[5],s=!0):n.isArray(e)&&(s=!0),o=r?t.utc.apply(t,i):t.apply(null,i),h?(o._ambigTime=!0,o._ambigZone=!0):f&&(s?o._ambigZone=!0:l&&o.zone(e))),new u(o)}function u(n){nr(this,n)}function bt(n){for(var r=[],u=!1,f=!1,t=0;t<n.length;t++)r.push(i.moment(n[t])),u=u||r[t]._ambigTime,f=f||r[t]._ambigZone;for(t=0;t<r.length;t++)u?r[t].stripTime():f&&r[t].stripZone();return r}function f(n,i){return t.fn.format.call(n,i)}function kt(n,t){return dt(n,ti(t))}function dt(n,t){for(var r="",i=0;i<t.length;i++)r+=et(n,t[i]);return r}function et(n,t){var i,r;return"string"==typeof t?t:(i=t.token)?ht[i]?ht[i](n):f(n,i):t.maybe&&(r=dt(n,t.maybe),r.match(/[1-9]/))?r:""}function gt(n,t,r,u,f){return n=i.moment.parseZone(n),t=i.moment.parseZone(t),r=n.lang().longDateFormat(r)||r,u=u||" - ",hr(n,t,ti(r),u,f)}function hr(n,t,i,r,u){for(var f,o,s,a="",l="",h="",c="",v="",e=0;e<i.length&&(f=ni(n,t,i[e]),f!==!1);e++)a+=f;for(o=i.length-1;o>e&&(f=ni(n,t,i[o]),f!==!1);o--)l=f+l;for(s=e;o>=s;s++)h+=et(n,i[s]),c+=et(t,i[s]);return(h||c)&&(v=u?c+r+h:h+r+c),a+v+l}function ni(n,t,i){var r,u;return"string"==typeof i?i:(r=i.token)&&(u=pi[r.charAt(0)],u&&n.isSame(t,u))?f(n,r):!1}function ti(n){return n in tt?tt[n]:tt[n]=ii(n)}function ii(n){for(var t,i=[],r=/\[([^\]]*)\]|\(([^\)]*)\)|(LT|(\w)\4*o?)|([^\w\[\(]+)/g;t=r.exec(n);)t[1]?i.push(t[1]):t[2]?i.push({maybe:ii(t[2])}):t[3]?i.push({token:t[3]}):t[5]&&i.push(t[5]);return i}function cr(n,t){function r(n,t){return n.clone().stripTime().add("months",t).startOf("month")}function u(n){i.intervalStart=n.clone().stripTime().startOf("month");i.intervalEnd=i.intervalStart.clone().add("months",1);i.start=i.intervalStart.clone();i.start=i.skipHiddenDays(i.start);i.start.startOf("week");i.start=i.skipHiddenDays(i.start);i.end=i.intervalEnd.clone();i.end=i.skipHiddenDays(i.end,-1,!0);i.end.add("days",(7-i.end.weekday())%7);i.end=i.skipHiddenDays(i.end,-1,!0);var r=Math.ceil(i.end.diff(i.start,"weeks",!0));"fixed"==i.opt("weekMode")&&(i.end.add("weeks",6-r),r=6);i.title=t.formatDate(i.intervalStart,i.opt("titleFormat"));i.renderBasic(r,i.getCellsPerWeek(),!0)}var i=this;i.incrementDate=r;i.render=u;ot.call(i,n,t,"month")}function lr(n,t){function r(n,t){return n.clone().stripTime().add("weeks",t).startOf("week")}function u(n){i.intervalStart=n.clone().stripTime().startOf("week");i.intervalEnd=i.intervalStart.clone().add("weeks",1);i.start=i.skipHiddenDays(i.intervalStart);i.end=i.skipHiddenDays(i.intervalEnd,-1,!0);i.title=t.formatRange(i.start,i.end.clone().subtract(1),i.opt("titleFormat")," — ");i.renderBasic(1,i.getCellsPerWeek(),!1)}var i=this;i.incrementDate=r;i.render=u;ot.call(i,n,t,"basicWeek")}function ar(n,t){function r(n,t){var r=n.clone().stripTime().add("days",t);return i.skipHiddenDays(r,0>t?-1:1)}function u(n){i.start=i.intervalStart=n.clone().stripTime();i.end=i.intervalEnd=i.start.clone().add("days",1);i.title=t.formatDate(i.start,i.opt("titleFormat"));i.renderBasic(1,1,!1)}var i=this;i.incrementDate=r;i.render=u;ot.call(i,n,t,"basicDay")}function ot(t,i,u){function ni(n,t,i){o=n;s=t;dt=i;ti();k||ii();ri()}function ti(){p=c("theme")?"ui":"fc";gt=c("columnFormat");ft=c("weekNumbers")}function ii(){wt=n("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(t)}function ri(){var i=ui();y&&y.remove();y=n(i).appendTo(t);h=y.find("thead");st=h.find(".fc-day-header");k=y.find("tbody");e=k.find("tr");d=k.find(".fc-day");vt=e.find("td:first-child");yt=e.eq(0).find(".fc-day > div");pt=e.eq(0).find(".fc-day-content > div");b(h.add(h.find("tr")));b(e);e.eq(0).addClass("fc-first");e.filter(":last").addClass("fc-last");d.each(function(t,i){var r=l(Math.floor(t/s),t%s);et("dayRender",f,r,n(i))});at(d)}function ui(){return"<table class='fc-border-separate' style='width:100%' cellspacing='0'>"+fi()+ei()+"<\/table>"}function fi(){var n,i,u=p+"-widget-header",t="";for(t+="<thead><tr>",ft&&(t+="<th class='fc-week-number "+u+"'>"+r(c("weekNumberTitle"))+"<\/th>"),n=0;s>n;n++)i=l(0,n),t+="<th class='fc-day-header fc-"+nt[i.day()]+" "+u+"'>"+r(lr(i,gt))+"<\/th>";return t+"<\/tr><\/thead>"}function ei(){var t,i,u,f=p+"-widget-content",n="";for(n+="<tbody>",t=0;o>t;t++){for(n+="<tr class='fc-week'>",ft&&(u=l(t,0),n+="<td class='fc-week-number "+f+"'><div>"+r(ar(u))+"<\/div><\/td>"),i=0;s>i;i++)u=l(t,i),n+=si(u);n+="<\/tr>"}return n+"<\/tbody>"}function si(n){var e=f.intervalStart.month(),u=i.getNow().stripTime(),r="",o=p+"-widget-content",t=["fc-day","fc-"+nt[n.day()],o];return n.month()!=e&&t.push("fc-other-month"),n.isSame(u,"day")?t.push("fc-today",p+"-state-highlight"):t.push(u>n?"fc-past":"fc-future"),r+="<td class='"+t.join(" ")+"' data-date='"+n.format()+"'><div>",dt&&(r+="<div class='fc-day-number'>"+n.date()+"<\/div>"),r+"<div class='fc-day-content'><div style='position:relative'>&nbsp;<\/div><\/div><\/div><\/td>"}function vi(t){kt=t;var i,r,u,f=Math.max(kt-h.height(),0);"variable"==c("weekMode")?i=r=Math.floor(f/(1==o?2:6)):(i=Math.floor(f/o),r=f-i*(o-1));vt.each(function(t,f){o>t&&(u=n(f),u.find("> div").css("min-height",(t==o-1?r:i)-v(u)))})}function yi(n){bt=n;rt.clear();ut.clear();ct=0;ft&&(ct=h.find("th.fc-week-number").outerWidth());ht=Math.floor((bt-ct)/s);a(st.slice(0,-1),ht)}function at(n){n.click(pi).mousedown(sr)}function pi(t){if(!c("selectable")){var r=i.moment(n(this).data("date"));et("dayClick",this,r,t)}}function ot(n,t,i){var f,u,r;for(i&&tt.build(),f=cr(n,t),u=0;u<f.length;u++)r=f[u],at(wi(r.row,r.leftCol,r.row,r.rightCol))}function wi(n,i,r,u){var f=tt.rect(n,i,r,u,t);return or(f,t)}function bi(n){return n.clone().stripTime().add("days",1)}function ki(n,t){ot(n,t,!0)}function di(){lt()}function gi(n,t){var i=hr(n),r=d[i.row*s+i.col];et("dayClick",r,n,t)}function nr(n,t){it.start(function(n){if(lt(),n){var t=l(n),r=t.clone().add(i.defaultAllDayEventDuration);ot(t,r)}},t)}function tr(n,t,i){var r=it.stop();lt();r&&et("drop",n,l(r),t,i)}function ir(n){return rt.left(n)}function rr(n){return rt.right(n)}function ur(n){return ut.left(n)}function fr(n){return ut.right(n)}function er(n){return e.eq(n)}var f=this;f.renderBasic=ni;f.setHeight=vi;f.setWidth=yi;f.renderDayOverlay=ot;f.defaultSelectionEnd=bi;f.renderSelection=ki;f.clearSelection=di;f.reportDayClick=gi;f.dragStart=nr;f.dragStop=tr;f.getHoverListener=function(){return it};f.colLeft=ir;f.colRight=rr;f.colContentLeft=ur;f.colContentRight=fr;f.getIsCellAllDay=function(){return!0};f.allDayRow=er;f.getRowCnt=function(){return o};f.getColCnt=function(){return s};f.getColWidth=function(){return ht};f.getDaySegmentContainer=function(){return wt};oi.call(f,t,i,u);ci.call(f);hi.call(f);vr.call(f);var y,h,st,k,e,d,vt,yt,pt,wt,bt,kt,ht,ct,o,s,dt,tt,it,rt,ut,p,gt,ft,c=f.opt,et=f.trigger,or=f.renderOverlay,lt=f.clearOverlays,sr=f.daySelectionMousedown,l=f.cellToDate,hr=f.dateToCell,cr=f.rangeToSegments,lr=i.formatDate,ar=i.calculateWeekNumber;w(t.addClass("fc-grid"));tt=new li(function(t,i){var f,r,u;st.each(function(t,e){f=n(e);r=f.offset().left;t&&(u[1]=r);u=[r];i[t]=u});u[1]=r+f.outerWidth();e.each(function(i,e){o>i&&(f=n(e),r=f.offset().top,i&&(u[1]=r),u=[r],t[i]=u)});u[1]=r+f.outerHeight()});it=new ai(tt);rt=new g(function(n){return yt.eq(n)});ut=new g(function(n){return pt.eq(n)})}function vr(){function t(t,i){n.renderDayEvents(t,i)}function i(){n.getDaySegmentContainer().empty()}var n=this;n.renderEvents=t;n.clearEvents=i;si.call(n)}function yr(n,t){function r(n,t){return n.clone().stripTime().add("weeks",t).startOf("week")}function u(n){i.intervalStart=n.clone().stripTime().startOf("week");i.intervalEnd=i.intervalStart.clone().add("weeks",1);i.start=i.skipHiddenDays(i.intervalStart);i.end=i.skipHiddenDays(i.intervalEnd,-1,!0);i.title=t.formatRange(i.start,i.end.clone().subtract(1),i.opt("titleFormat")," — ");i.renderAgenda(i.getCellsPerWeek())}var i=this;i.incrementDate=r;i.render=u;ri.call(i,n,t,"agendaWeek")}function pr(n,t){function r(n,t){var r=n.clone().stripTime().add("days",t);return i.skipHiddenDays(r,0>t?-1:1)}function u(n){i.start=i.intervalStart=n.clone().stripTime();i.end=i.intervalEnd=i.start.clone().add("days",1);i.title=t.formatDate(i.start,i.opt("titleFormat"));i.renderAgenda(1)}var i=this;i.incrementDate=r;i.render=u;ri.call(i,n,t,"agendaDay")}function wr(n,t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function br(n,t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}function ri(i,u,f){function wr(n){tt=n;br();p?ki():dr()}function br(){ut=o("theme")?"ui":"fc";lr=o("isRTL");ar=o("columnFormat");ft=t.duration(o("minTime"));ii=t.duration(o("maxTime"));l=t.duration(o("slotDuration"));y=o("snapDuration");y=y?t.duration(y):l}function dr(){var u,f,a,v,s=ut+"-widget-header",y=ut+"-widget-content",p=l.asMinutes()%15==0;for(ki(),k=n("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(i),o("allDaySlot")?(vi=n("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(k),u="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+s+" fc-agenda-axis'>"+(o("allDayHTML")||r(o("allDayText")))+"<\/th><td><div class='fc-day-content'><div style='position:relative'/><\/div><\/td><th class='"+s+" fc-agenda-gutter'>&nbsp;<\/th><\/tr><\/table>",et=n(u).appendTo(k),wt=et.find("tr"),di(wt.find("td")),k.append("<div class='fc-agenda-divider "+s+"'><div class='fc-agenda-divider-inner'/><\/div>")):vi=n([]),c=n("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(k),h=n("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(c),hr=n("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(h),u="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",f=t.duration(+ft),gt=0;ii>f;)a=e.start.clone().time(f),v=a.minutes(),u+="<tr class='fc-slot"+gt+" "+(v?"fc-minor":"")+"'><th class='fc-agenda-axis "+s+"'>"+(p&&v?"&nbsp;":r(pr(a,o("axisFormat"))))+"<\/th><td class='"+y+"'><div style='position:relative'>&nbsp;<\/div><\/td><\/tr>",f.add(l),gt++;u+="<\/tbody><\/table>";d=n(u).appendTo(h);ui(d.find("td"))}function ki(){var t=gr();p&&p.remove();p=n(t).appendTo(i);lt=p.find("thead");ei=lt.find("th").slice(1,-1);at=p.find("tbody");rt=at.find("td").slice(0,-1);si=rt.find("> div");er=rt.find(".fc-day-content > div");or=rt.eq(0);sr=si.eq(0);b(lt.add(lt.find("tr")));b(at.add(at.find("tr")))}function gr(){return"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>"+nu()+tu()+"<\/table>"}function nu(){var n,t,i,f=ut+"-widget-header",u="";for(u+="<thead><tr>",o("weekNumbers")?(n=ht(0,0),t=tf(n),lr?t+=o("weekNumberTitle"):t=o("weekNumberTitle")+t,u+="<th class='fc-agenda-axis fc-week-number "+f+"'>"+r(t)+"<\/th>"):u+="<th class='fc-agenda-axis "+f+"'>&nbsp;<\/th>",i=0;tt>i;i++)n=ht(0,i),u+="<th class='fc-"+nt[n.day()]+" fc-col"+i+" "+f+"'>"+r(pr(n,ar))+"<\/th>";return u+("<th class='fc-agenda-gutter "+f+"'>&nbsp;<\/th><\/tr><\/thead>")}function tu(){var t,n,r,e,i,h=ut+"-widget-header",o=ut+"-widget-content",s=u.getNow().stripTime(),f="";for(f+="<tbody><tr><th class='fc-agenda-axis "+h+"'>&nbsp;<\/th>",r="",n=0;tt>n;n++)t=ht(0,n),i=["fc-col"+n,"fc-"+nt[t.day()],o],t.isSame(s,"day")?i.push(ut+"-state-highlight","fc-today"):i.push(s>t?"fc-past":"fc-future"),e="<td class='"+i.join(" ")+"'><div><div class='fc-day-content'><div style='position:relative'>&nbsp;<\/div><\/div><\/div><\/td>",r+=e;return f+=r,f+("<td class='fc-agenda-gutter "+o+"'>&nbsp;<\/td><\/tr><\/tbody>")}function iu(n){var u,f;void 0===n&&(n=cr);cr=n;bi={};var t=at.position().top,i=c.position().top,r=Math.min(n-t,d.height()+i+1);sr.height(r-v(or));k.css("top",t);c.height(r-i-1);u=d.find("tr:first").height()+1;f=d.find("tr:eq(1)").height();kt=(u+f)/2;pi=l/y;dt=kt/pi}function ru(t){var i,r,u;wu=t;ni.clear();ti.clear();i=lt.find("th:first");et&&(i=i.add(et.find("th:first")));i=i.add(d.find("th:first"));ot=0;a(i.width("").each(function(t,i){ot=Math.max(ot,n(i).outerWidth())}),ot);r=p.find(".fc-agenda-gutter");et&&(r=r.add(et.find("th.fc-agenda-gutter")));u=c[0].clientWidth;yi=c.width()-u;yi?(a(r,yi),r.show().prev().removeClass("fc-last")):r.hide().prev().addClass("fc-last");bt=Math.floor((u-ot)/tt);a(ei.slice(0,-1),bt)}function uu(){function n(){c.scrollTop(i)}var i=ir(t.duration(o("scrollTime")))+1;n();setTimeout(n,0)}function fu(){uu()}function di(n){n.click(gi).mousedown(du)}function ui(n){n.click(gi).mousedown(vu)}function gi(n){var f;if(!o("selectable")){var i=Math.min(tt-1,Math.floor((n.pageX-p.offset().left-ot)/bt)),t=ht(0,i),r=this.parentNode.className.match(/fc-slot(\d+)/);r?(f=parseInt(r[1],10),t.add(ft+f*l),t=u.rezoneDate(t),ri("dayClick",rt[i],t,n)):ri("dayClick",rt[i],t,n)}}function fi(n,t,i){var f,u,r;for(i&&it.build(),f=nf(n,t),u=0;u<f.length;u++)r=f[u],di(eu(r.row,r.leftCol,r.row,r.rightCol))}function eu(n,t,i,r){var u=it.rect(n,t,i,r,k);return vr(u,k)}function nr(n,t){var i;for(n=n.clone().stripZone(),t=t.clone().stripZone(),i=0;tt>i;i++){var r=ht(0,i),f=r.clone().add("days",1),e=n>r?n:r,o=t>f?f:t;if(o>e){var u=it.rect(0,i,0,i,h),s=ct(e,r),c=ct(o,r);u.top=s;u.height=c-s;ui(vr(u,h))}}}function ou(n){return ni.left(n)}function su(n){return ti.left(n)}function hu(n){return ni.right(n)}function cu(n){return ti.right(n)}function tr(n){return o("allDaySlot")&&!n.row}function pt(n){var i=ht(0,n.col),r=n.row;return o("allDaySlot")&&r--,r>=0&&(i.time(t.duration(ft+r*y)),i=u.rezoneDate(i)),i}function ct(n,i){return ir(t.duration(n.clone().stripZone()-i.clone().stripTime()))}function ir(n){var u;if(ft>n)return 0;if(n>=ii)return d.height();var r=(n-ft)/l,t=Math.floor(r),f=r-t,i=bi[t];return void 0===i&&(i=bi[t]=d.find("tr").eq(t).find("td div")[0].offsetTop),u=i-1+f*kt,Math.max(u,0)}function lu(n){return n.hasTime()?n.clone().add(l):n.clone().add("days",1)}function au(n,t){n.hasTime()||t.hasTime()?rr(n,t):o("allDaySlot")&&fi(n,t,!0)}function rr(t,i){var f=o("selectHelper"),u,c;if(it.build(),f){if(u=yr(t).col,u>=0&&tt>u){var r=it.rect(0,u,0,u,h),e=ct(t,t),l=ct(i,t);l>e&&((r.top=e,r.height=l-e,r.left+=2,r.width-=5,n.isFunction(f))?(c=f(t,i),c&&(r.position="absolute",s=n(c).css(r).appendTo(h))):(r.isStart=!0,r.isEnd=!0,s=n(gu({title:"",start:t,end:i,className:["fc-select-helper"],editable:!1},r)),s.css("opacity",o("dragOpacity"))),s&&(ui(s),h.append(s),a(s,r.width,!0),vt(s,r.height,!0)))}}else nr(t,i)}function ur(){wi();s&&(s.remove(),s=null)}function vu(t){if(1==t.which&&o("selectable")){ku(t);var i;st.start(function(n,t){if(ur(),n&&n.col==t.col&&!tr(n)){var r=pt(t),u=pt(n);i=[r,r.clone().add(y),u,u.clone().add(y)].sort(yt);rr(i[0],i[3])}else i=null},t);n(document).one("mouseup",function(n){st.stop();i&&(+i[0]==+i[1]&&fr(i[0],n),bu(i[0],i[3],n))})}}function fr(n,t){ri("dayClick",rt[yr(n).col],n,t)}function yu(n,t){st.start(function(n){if(wi(),n){var t=pt(n),i=t.clone();t.hasTime()?(i.add(u.defaultTimedEventDuration),nr(t,i)):(i.add(u.defaultAllDayEventDuration),fi(t,i))}},t)}function pu(n,t,i){var r=st.stop();wi();r&&ri("drop",n,pt(r),t,i)}var e=this;e.renderAgenda=wr;e.setWidth=ru;e.setHeight=iu;e.afterRender=fu;e.computeDateTop=ct;e.getIsCellAllDay=tr;e.allDayRow=function(){return wt};e.getCoordinateGrid=function(){return it};e.getHoverListener=function(){return st};e.colLeft=ou;e.colRight=hu;e.colContentLeft=su;e.colContentRight=cu;e.getDaySegmentContainer=function(){return vi};e.getSlotSegmentContainer=function(){return hr};e.getSlotContainer=function(){return h};e.getRowCnt=function(){return 1};e.getColCnt=function(){return tt};e.getColWidth=function(){return bt};e.getSnapHeight=function(){return dt};e.getSnapDuration=function(){return y};e.getSlotHeight=function(){return kt};e.getSlotDuration=function(){return l};e.getMinTime=function(){return ft};e.getMaxTime=function(){return ii};e.defaultSelectionEnd=lu;e.renderDayOverlay=fi;e.renderSelection=au;e.clearSelection=ur;e.reportDayClick=fr;e.dragStart=yu;e.dragStop=pu;oi.call(e,i,u,f);ci.call(e);hi.call(e);kr.call(e);var p,lt,ei,at,rt,si,er,or,sr,k,vi,et,wt,c,h,hr,d,s,wu,cr,ot,bt,yi,l,kt,y,pi,dt,tt,gt,it,st,ni,ti,ut,lr,ft,ii,ar,o=e.opt,ri=e.trigger,vr=e.renderOverlay,wi=e.clearOverlays,bu=e.reportSelection,ku=e.unselect,du=e.daySelectionMousedown,gu=e.slotSegHtml,ht=e.cellToDate,yr=e.dateToCell,nf=e.rangeToSegments,pr=u.formatDate,tf=u.calculateWeekNumber,bi={};w(i.addClass("fc-agenda"));it=new li(function(t,i){function s(n){return Math.max(a,Math.min(v,n))}var u,r,f;ei.each(function(t,e){u=n(e);r=u.offset().left;t&&(f[1]=r);f=[r];i[t]=f});f[1]=r+u.outerWidth();o("allDaySlot")&&(u=wt,r=u.offset().top,t[0]=[r,r+u.outerHeight()]);for(var l=h.offset().top,a=c.offset().top,v=a+c.outerHeight(),e=0;gt*pi>e;e++)t.push([s(l+dt*e),s(l+dt*(e+1))])});st=new ai(it);ni=new g(function(n){return si.eq(n)});ti=new g(function(n){return er.eq(n)})}function kr(){function ot(n,t){for(var e=n.length,r=[],f=[],i=0;e>i;i++)n[i].allDay?r.push(n[i]):f.push(n[i]);u("allDaySlot")&&(ci(r,t),dt());lt(ht(f),t)}function st(){gt().empty();d().empty()}function ht(n){for(var u,r,f,i,s=tt(),h=et(),c=li(),o=[],t=0;s>t;t++)for(u=e(0,t),i=ct(n,u.clone().time(h),u.clone().time(c)),i=dr(i),r=0;r<i.length;r++)f=i[r],f.col=t,o.push(f);return o}function ct(n,t,i){t=t.clone().stripZone();i=i.clone().stripZone();for(var u,f,e,o,s,c,l,a=[],v=n.length,r=0;v>r;r++)u=n[r],f=u.start.clone().stripZone(),e=h(u).stripZone(),e>t&&i>f&&(t>f?(o=t.clone(),c=!1):(o=f,c=!0),e>i?(s=i.clone(),l=!1):(s=e,l=!0),a.push({event:u,start:o,end:s,isStart:c,isEnd:l}));return a.sort(ei)}function lt(t,i){for(var r,s,it,et,b,l,a,h,c,y,ot,e,k,rt,ft,nt=t.length,st="",tt=d(),ht=u("isRTL"),o=0;nt>o;o++)r=t[o],s=r.event,it=g(r.start,r.start),et=g(r.end,r.start),b=ti(r.col),l=ii(r.col),a=l-b,l-=.025*a,a=l-b,h=a*(r.forwardCoord-r.backwardCoord),u("slotEventOverlap")&&(h=Math.max(2*(h-10),h)),ht?(y=l-r.backwardCoord*a,c=y-h):(c=b+r.backwardCoord*a,y=c+h),c=Math.max(c,b),y=Math.min(y,l),h=y-c,r.top=it,r.left=c,r.outerWidth=h,r.outerHeight=et-it,st+=p(s,r);for(tt[0].innerHTML=st,ot=tt.children(),o=0;nt>o;o++)r=t[o],s=r.event,e=n(ot[o]),k=f("eventRender",s,s,e),k===!1?e.remove():(k&&k!==!0&&(e.remove(),e=n(k).css({position:"absolute",top:r.top,left:r.left}).appendTo(tt)),r.element=e,s._id===i?w(s,e,r):e[0]._fci=o,oi(s,e));for(at(tt,t,w),o=0;nt>o;o++)r=t[o],(e=r.element)&&(r.vsides=v(e,!0),r.hsides=ut(e,!0),rt=e.find(".fc-event-title"),rt.length&&(r.contentTop=rt[0].offsetTop));for(o=0;nt>o;o++)r=t[o],(e=r.element)&&(e[0].style.width=Math.max(0,r.outerWidth-r.hsides)+"px",ft=Math.max(0,r.outerHeight-r.vsides),e[0].style.height=ft+"px",s=r.event,void 0!==r.contentTop&&ft-r.contentTop<10&&(e.find("div.fc-event-time").text(ai(s.start,u("timeFormat"))+" - "+s.title),e.find("div.fc-event-title").remove()),f("eventAfterRender",s,s,e))}function p(n,t){var e="<",o=n.url,s=wt(n,u),f=["fc-event","fc-event-vert"];return b(n)&&f.push("fc-event-draggable"),t.isStart&&f.push("fc-event-start"),t.isEnd&&f.push("fc-event-end"),f=f.concat(n.className),n.source&&(f=f.concat(n.source.className||[])),e+=o?"a href='"+r(n.url)+"'":"div",e+=" class='"+f.join(" ")+"' style='position:absolute;top:"+t.top+"px;left:"+t.left+"px;"+s+"'><div class='fc-event-inner'><div class='fc-event-time'>"+r(i.getEventTimeText(n))+"<\/div><div class='fc-event-title'>"+r(n.title||"")+"<\/div><\/div><div class='fc-event-bg'><\/div>",t.isEnd&&k(n)&&(e+="<div class='ui-resizable-handle ui-resizable-s'>=<\/div>"),e+("<\/"+(o?"a":"div")+">")}function w(n,t,i){var r=t.find("div.fc-event-time");b(n)&&pt(n,t,r);i.isEnd&&k(n)&&bt(n,t,r);kt(n,t)}function yt(n,i,r){function b(){p||(i.width(k).height("").draggable("option","grid",null),p=!0)}var k,v,w,nt=r.isStart,p=!0,d=ni(),g=it(),tt=et(),ut=ui(),ot=ri(),st=l(),ht=c();i.draggable({opacity:u("dragOpacity","month"),revertDuration:u("dragRevertDuration"),start:function(t,r){f("eventDragStart",i[0],n,t,r);y(n,i);k=i.width();d.start(function(t,r){if(s(),t){v=!1;var u=e(0,r.col),f=e(0,t.col);w=f.diff(u,"days");t.row?nt?p&&(i.width(g-10),vt(i,o.defaultTimedEventDuration/ut*ot),i.draggable("option","grid",[g,1]),p=!1):v=!0:(ft(n.start.clone().add("days",w),h(n).add("days",w)),b());v=v||p&&!w}else b(),v=!0;i.draggable("option","revert",v)},t,"drag")},stop:function(r,u){if(d.stop(),s(),f("eventDragStop",i[0],n,r,u),v)b(),i.css("filter",""),a(n,i);else{var h,c,e=n.start.clone().add("days",w);p||(c=Math.round((i.offset().top-fi().offset().top)/ht),h=t.duration(tt+c*st),e=o.rezoneDate(e.clone().time(h)));rt(i[0],n,e,r,u)}}})}function pt(n,t,r){function yt(){s();p&&(v?(r.hide(),t.draggable("option","grid",null),ft(b,g)):(bt(),r.css("display",""),t.draggable("option","grid",[at,vt])))}function bt(){b&&r.text(i.getEventTimeText(b,n.end?g:null))}var ut,et,p,st,v,ht,k,ot,d,w,ct,b,g,lt=i.getCoordinateGrid(),pt=tt(),at=it(),vt=c(),wt=l();t.draggable({scroll:!1,grid:[at,vt],axis:1==pt?"y":!1,opacity:u("dragOpacity"),revertDuration:u("dragRevertDuration"),start:function(i,r){f("eventDragStart",t[0],n,i,r);y(n,t);lt.build();ut=t.position();et=lt.cell(i.pageX,i.pageY);p=st=!0;v=ht=nt(et);k=ot=0;d=0;w=ct=0;b=null;g=null},drag:function(i,r){var f=lt.cell(i.pageX,i.pageY),s,u,c;(p=!!f)&&((v=nt(f),k=Math.round((r.position.left-ut.left)/at),k!=ot)&&(s=e(0,et.col),u=et.col+k,u=Math.max(0,u),u=Math.min(pt-1,u),c=e(0,u),d=c.diff(s,"days")),v||(w=Math.round((r.position.top-ut.top)/vt)));(p!=st||v!=ht||k!=ot||w!=ct)&&(v?(b=n.start.clone().stripTime().add("days",d),g=b.clone().add(o.defaultAllDayEventDuration)):(b=n.start.clone().add(w*wt).add("days",d),g=h(n).add(w*wt).add("days",d)),yt(),st=p,ht=v,ot=k,ct=w);t.draggable("option","revert",!p)},stop:function(i,r){s();f("eventDragStop",t[0],n,i,r);p&&(v||d||w)?rt(t[0],n,b,i,r):(p=!0,v=!1,k=0,d=0,w=0,yt(),t.css("filter",""),t.css(ut),a(n,t))}})}function bt(n,t,r){var u,e,o,s=c(),v=l();t.resizable({handles:{s:".ui-resizable-handle"},grid:s,start:function(i,r){u=e=0;y(n,t);f("eventResizeStart",t[0],n,i,r)},resize:function(f,c){if(u=Math.round((Math.max(s,t.height())-c.originalSize.height)/s),u!=e){o=h(n).add(v*u);var l;l=u?i.getEventTimeText(n.start,o):i.getEventTimeText(n);r.text(l);e=u}},stop:function(i,r){f("eventResizeStop",t[0],n,i,r);u?hi(t[0],n,o,i,r):a(n,t)}})}var i=this;i.renderEvents=ot;i.clearEvents=st;i.slotSegHtml=p;si.call(i);var u=i.opt,f=i.trigger,b=i.isEventDraggable,k=i.isEventResizable,kt=i.eventElementHandlers,dt=i.setHeight,gt=i.getDaySegmentContainer,d=i.getSlotSegmentContainer,ni=i.getHoverListener,g=i.computeDateTop,nt=i.getIsCellAllDay,ti=i.colContentLeft,ii=i.colContentRight,e=i.cellToDate,tt=i.getColCnt,it=i.getColWidth,c=i.getSnapHeight,l=i.getSnapDuration,ri=i.getSlotHeight,ui=i.getSlotDuration,fi=i.getSlotContainer,oi=i.reportEventElement,a=i.showEvents,y=i.hideEvents,rt=i.eventDrop,hi=i.eventResize,ft=i.renderDayOverlay,s=i.clearOverlays,ci=i.renderDayEvents,et=i.getMinTime,li=i.getMaxTime,o=i.calendar,ai=o.formatDate,h=o.getEventEnd;i.draggableDayEvent=yt}function dr(n){var t,r=gr(n),i=r[0];if(nu(r),i){for(t=0;t<i.length;t++)ui(i[t]);for(t=0;t<i.length;t++)st(i[t],0,0)}return tu(r)}function gr(n){for(var u,t,i=[],r=0;r<n.length;r++){for(u=n[r],t=0;t<i.length&&fi(u,i[t]).length;t++);(i[t]||(i[t]=[])).push(u)}return i}function nu(n){for(var f,i,r,u,t=0;t<n.length;t++)for(f=n[t],i=0;i<f.length;i++)for(r=f[i],r.forwardSegs=[],u=t+1;u<n.length;u++)fi(r,n[u],r.forwardSegs)}function ui(n){var t,i,u=n.forwardSegs,r=0;if(void 0===n.forwardPressure){for(t=0;t<u.length;t++)i=u[t],ui(i),r=Math.max(r,1+i.forwardPressure);n.forwardPressure=r}}function st(n,t,i){var u,r=n.forwardSegs;if(void 0===n.forwardCoord)for(r.length?(r.sort(ru),st(r[0],t+1,i),n.forwardCoord=r[0].backwardCoord):n.forwardCoord=1,n.backwardCoord=n.forwardCoord-(n.forwardCoord-i)/(t+1),u=0;u<r.length;u++)st(r[u],0,n.forwardCoord)}function tu(n){for(var r,i,u=[],t=0;t<n.length;t++)for(r=n[t],i=0;i<r.length;i++)u.push(r[i]);return u}function fi(n,t,i){i=i||[];for(var r=0;r<t.length;r++)iu(n,t[r])&&i.push(t[r]);return i}function iu(n,t){return n.end>t.start&&n.start<t.end}function ru(n,t){return t.forwardPressure-n.forwardPressure||(n.backwardCoord||0)-(t.backwardCoord||0)||ei(n,t)}function ei(n,t){return n.start-t.start||t.end-t.start-(n.end-n.start)||(n.event.title||"").localeCompare(t.event.title)}function oi(i,r,u){function e(t,i){var r=rt[t];return n.isPlainObject(r)&&!lt(t)?y(r,i||u):r}function s(n,t){return r.trigger.apply(r,[n,t||f].concat(Array.prototype.slice.call(arguments,2),[f]))}function et(n){var t=n.source||{};return c(n.startEditable,t.startEditable,e("eventStartEditable"),n.editable,t.editable,e("editable"))}function ot(n){var t=n.source||{};return c(n.durationEditable,t.durationEditable,e("eventDurationEditable"),n.editable,t.editable,e("editable"))}function st(){h={};g=[]}function ht(n,t){g.push({event:n,element:t});h[n._id]?h[n._id].push(t):h[n._id]=[t]}function ct(){n.each(g,function(n,t){f.trigger("eventDestroy",t.event,t.event,t.element)})}function at(n,t){t.click(function(i){if(!t.hasClass("ui-draggable-dragging")&&!t.hasClass("ui-resizable-resizing"))return s("eventClick",this,n,i)}).hover(function(t){s("eventMouseover",this,n,t)},function(t){s("eventMouseout",this,n,t)})}function vt(n,t){nt(n,t,"show")}function yt(n,t){nt(n,t,"hide")}function nt(n,t,i){for(var u=h[n._id],f=u.length,r=0;f>r;r++)t&&u[r][0]==t[0]||u[r][i]()}function pt(n,t,i,u,f){var e=r.mutateEvent(t,i,null);s("eventDrop",n,t,e.dateDelta,function(){e.undo();w(t._id)},u,f);w(t._id)}function wt(n,t,i,u,f){var e=r.mutateEvent(t,null,i);s("eventResize",n,t,e.durationDelta,function(){e.undo();w(t._id)},u,f);w(t._id)}function bt(n){return t.isMoment(n)&&(n=n.day()),b[n]}function kt(){return o}function dt(n,t,i){var r=n.clone();for(t=t||1;b[(r.day()+(i?t:0)+7)%7];)r.add("days",t);return r}function gt(){var n=tt.apply(null,arguments),t=l(n);return it(t)}function tt(n,t){var i=f.getColCnt(),r=d?-1:1,u=d?i-1:0;return"object"==typeof n&&(t=n.col,n=n.row),n*i+(t*r+u)}function l(n){var t=f.start.day();return n+=k[t],7*Math.floor(n/o)+ft[(n%o+o)%o]-t}function it(n){return f.start.clone().add("days",n)}function ni(n){var t=a(n),i=v(t);return p(i)}function a(n){return n.clone().stripTime().diff(f.start,"days")}function v(n){var t=f.start.day();return n+=t,Math.floor(n/7)*o+k[(n%7+7)%7]-k[t]}function p(n){var t=f.getColCnt(),i=d?-1:1,r=d?t-1:0,u=Math.floor(n/t),e=(n%t+t)%t*i+r;return{row:u,col:e}}function ti(n,t){var b=f.getRowCnt(),s=f.getColCnt(),h=[],u=a(n),i=a(t),c=+t.time();c&&c>=ii&&i++;i=Math.max(i,u+1);for(var k=v(u),d=v(i)-1,r=0;b>r;r++){var y=r*s,g=y+s-1,e=Math.max(k,y),o=Math.min(d,g);if(o>=e){var nt=p(e),tt=p(o),w=[nt.col,tt.col].sort(),it=l(e)==u,rt=l(o)+1==i;h.push({row:r,leftCol:w[0],rightCol:w[1],isStart:it,isEnd:rt})}}return h}var f=this;f.element=i;f.calendar=r;f.name=u;f.opt=e;f.trigger=s;f.isEventDraggable=et;f.isEventResizable=ot;f.clearEventData=st;f.reportEventElement=ht;f.triggerEventDestroy=ct;f.eventElementHandlers=at;f.showEvents=vt;f.hideEvents=yt;f.eventDrop=pt;f.eventResize=wt;var w=r.reportEventChange,h={},g=[],rt=r.options,ii=t.duration(rt.nextDayThreshold);f.getEventTimeText=function(n){var t,i;return 2===arguments.length?(t=arguments[0],i=arguments[1]):(t=n.start,i=n.end),i&&e("displayEventEnd")?r.formatRange(t,i,e("timeFormat")):r.formatDate(t,e("timeFormat"))};f.isHiddenDay=bt;f.skipHiddenDays=dt;f.getCellsPerWeek=kt;f.dateToCell=ni;f.dateToDayOffset=a;f.dayOffsetToCellOffset=v;f.cellOffsetToCell=p;f.cellToDate=gt;f.cellToCellOffset=tt;f.cellOffsetToDayOffset=l;f.dayOffsetToDate=it;f.rangeToSegments=ti;var o,ut=e("hiddenDays")||[],b=[],k=[],ft=[],d=e("isRTL");!function(){e("weekends")===!1&&ut.push(0,6);for(var t=0,i=0;7>t;t++)k[t]=i,b[t]=-1!=n.inArray(t,ut),b[t]||(ft[i]=t,i++);if(o=i,!o)throw"invalid hiddenDays";}()}function si(){function tt(n,t){var i=h(n,!1,!0);e(i,function(n,t){ti(n.event,t)});dt(i,t);e(i,function(n,t){u("eventAfterRender",n.event,n.event,t)})}function it(n,t,i){var u=h([n],!0,!1),r=[];return e(u,function(n,u){n.row===t&&u.css("top",i);r.push(u[0])}),r}function h(t,i,r){var o,f,s=p(),h=i?n("<div/>"):s,u=rt(t);return et(u),o=ot(u),h[0].innerHTML=o,f=h.children(),i&&s.append(f),ht(u,f),e(u,function(n,t){n.hsides=ut(t,!0)}),e(u,function(n,t){t.width(Math.max(0,n.outerWidth-n.hsides))}),e(u,function(n,t){n.outerHeight=t.outerHeight(!0)}),ct(u,r),u}function rt(n){for(var r,t=[],i=0;i<n.length;i++)r=ft(n[i]),t.push.apply(t,r);return t}function ft(n){for(var t=ai(n.start,s(n)),i=0;i<t.length;i++)t[i].event=n;return t}function et(n){for(var u=i("isRTL"),r=0;r<n.length;r++){var t=n[r],e=(u?t.isEnd:t.isStart)?hi:oi,o=(u?t.isStart:t.isEnd)?ci:si,f=e(t.leftCol),s=o(t.rightCol);t.left=f;t.outerWidth=s-f}}function ot(n){for(var i="",t=0;t<n.length;t++)i+=st(n[t]);return i}function st(n){var e="",h=i("isRTL"),u=n.event,o=u.url,f=["fc-event","fc-event-hori"],s;return l(u)&&f.push("fc-event-draggable"),n.isStart&&f.push("fc-event-start"),n.isEnd&&f.push("fc-event-end"),f=f.concat(u.className),u.source&&(f=f.concat(u.source.className||[])),s=wt(u,i),e+=o?"<a href='"+r(o)+"'":"<div",e+=" class='"+f.join(" ")+"' style='position:absolute;left:"+n.left+"px;"+s+"'><div class='fc-event-inner'>",!u.allDay&&n.isStart&&(e+="<span class='fc-event-time'>"+r(t.getEventTimeText(u))+"<\/span>"),e+="<span class='fc-event-title'>"+r(u.title||"")+"<\/span><\/div>",u.allDay&&n.isEnd&&a(u)&&(e+="<div class='ui-resizable-handle ui-resizable-"+(h?"w":"e")+"'>&nbsp;&nbsp;&nbsp;<\/div>"),e+("<\/"+(o?"a":"div")+">")}function ht(t,i){for(var f=0;f<t.length;f++){var o=t[f],s=o.event,e=i.eq(f),r=u("eventRender",s,s,e);r===!1?e.remove():(r&&r!==!0&&(r=n(r).css({position:"absolute",left:o.left}),e.replaceWith(r),e=r),o.element=e)}}function ct(n,t){var i,f=lt(n),r=kt(),u=[];if(t)for(i=0;i<r.length;i++)r[i].height(f[i]);for(i=0;i<r.length;i++)u.push(r[i].position().top);e(n,function(n,t){t.css("top",u[n.row]+n.top)})}function lt(n){for(var e,r,u,t,i,h=o(),c=fi(),s=[],l=vt(n),f=0;h>f;f++){for(e=l[f],r=[],i=0;c>i;i++)r.push(0);for(u=0;u<e.length;u++)for(t=e[u],t.top=pt(r.slice(t.leftCol,t.rightCol+1)),i=t.leftCol;i<=t.rightCol;i++)r[i]=t.top+t.outerHeight;s.push(pt(r))}return s}function vt(n){for(var r,t,f=o(),i=[],u=0;u<n.length;u++)r=n[u],t=r.row,r.element&&(i[t]?i[t].push(r):i[t]=[r]);for(t=0;f>t;t++)i[t]=yt(i[t]||[]);return i}function yt(n){for(var t=[],r=bt(n),i=0;i<r.length;i++)t.push.apply(t,r[i]);return t}function bt(n){var t,r,u,i;for(n.sort(fu),t=[],r=0;r<n.length;r++){for(u=n[r],i=0;i<t.length&&uu(u,t[i]);i++);t[i]?t[i].push(u):t[i]=[u]}return t}function kt(){for(var i=o(),t=[],n=0;i>n;n++)t[n]=ei(n).find("div.fc-day-content > div");return t}function dt(n,t){var i=p();e(n,function(n,i,r){var u=n.event;u._id===t?c(u,i,n):i[0]._fci=r});at(i,n,c)}function c(n,i,r){l(n)&&t.draggableDayEvent(n,i,r);n.allDay&&r.isEnd&&a(n)&&t.resizableDayEvent(n,i,r);ii(n,i)}function gt(n,t){var r,e,o=k();t.draggable({delay:50,opacity:i("dragOpacity"),revertDuration:i("dragRevertDuration"),start:function(i,h){u("eventDragStart",t[0],n,i,h);y(n,t);o.start(function(i,u,o,h){if(t.draggable("option","revert",!i||!o&&!h),f(),i){var c=d(u),l=d(i);r=l.diff(c,"days");e=n.start.clone().add("days",r);b(e,s(n).add("days",r))}else r=0},i,"drag")},stop:function(i,s){o.stop();f();u("eventDragStop",t[0],n,i,s);r?ri(t[0],n,e,i,s):(t.css("filter",""),v(n,t))}})}function ni(t,r,e){var c=i("isRTL"),o=c?"w":"e",l=r.find(".ui-resizable-"+o),h=!1;w(r);r.mousedown(function(n){n.preventDefault()}).click(function(n){h&&(n.preventDefault(),n.stopImmediatePropagation())});l.mousedown(function(i){function d(i){u("eventResizeStop",r[0],t,i,{});n("body").css("cursor","");p.stop();f();l&&ui(r[0],t,a,i,{});setTimeout(function(){h=!1},0)}if(1==i.which){h=!0;var l,a,c,p=k(),tt=r.css("top"),w=n.extend({},t),rt=yi(vi(t.start));li();n("body").css("cursor",o+"-resize").one("mouseup",d);u("eventResizeStart",r[0],t,i,{});p.start(function(i,r){var p,u,h;i&&(p=g(r),u=g(i),(u=Math.max(u,rt),l=nt(u)-nt(p),a=s(t).add("days",l),l)?(w.end=a,h=c,c=it(w,e.row,tt),c=n(c),c.find("*").css("cursor",o+"-resize"),h&&h.remove(),y(t)):c&&(v(t),c.remove(),c=null),f(),b(t.start,a))},i)}})}var t=this;t.renderDayEvents=tt;t.draggableDayEvent=gt;t.resizableDayEvent=ni;var i=t.opt,u=t.trigger,l=t.isEventDraggable,a=t.isEventResizable,ti=t.reportEventElement,ii=t.eventElementHandlers,v=t.showEvents,y=t.hideEvents,ri=t.eventDrop,ui=t.eventResize,o=t.getRowCnt,fi=t.getColCnt,ei=t.allDayRow,oi=t.colLeft,si=t.colRight,hi=t.colContentLeft,ci=t.colContentRight,p=t.getDaySegmentContainer,b=t.renderDayOverlay,f=t.clearOverlays,li=t.clearSelection,k=t.getHoverListener,ai=t.rangeToSegments,d=t.cellToDate,g=t.cellToCellOffset,nt=t.cellOffsetToDayOffset,vi=t.dateToDayOffset,yi=t.dayOffsetToCellOffset,pi=t.calendar,s=pi.getEventEnd}function uu(n,t){for(var r,i=0;i<t.length;i++)if(r=t[i],r.leftCol<=n.rightCol&&r.rightCol>=n.leftCol)return!0;return!1}function e(n,t){for(var r,u,i=0;i<n.length;i++)r=n[i],u=r.element,u&&t(r,u,i)}function fu(n,t){return t.rightCol-t.leftCol-(n.rightCol-n.leftCol)||t.event.allDay-n.event.allDay||n.event.start-t.event.start||(n.event.title||"").localeCompare(t.event.title)}function hi(){function e(t){var u=r("unselectCancel");u&&n(t.target).parents(u).length||i(t)}function l(n,t){i();n=o.moment(n);t=t?o.moment(t):y(n);h(n,t);u(n,t)}function i(n){f&&(f=!1,c(),s("unselect",null,n))}function u(n,t,i){f=!0;s("select",null,n,t,i)}function a(f){var o=t.cellToDate,l=t.getIsCellAllDay,s=t.getHoverListener(),a=t.reportDayClick,e;1==f.which&&r("selectable")&&(i(f),s.start(function(n,t){c();n&&l(n)?(e=[o(t),o(n)].sort(yt),h(e[0],e[1].clone().add("days",1))):e=null},f),n(document).one("mouseup",function(n){s.stop();e&&(+e[0]==+e[1]&&a(e[0],n),u(e[0],e[1].clone().add("days",1),n))}))}function v(){n(document).off("mousedown",e)}var t=this;t.select=l;t.unselect=i;t.reportSelection=u;t.daySelectionMousedown=a;t.selectionManagerDestroy=v;var o=t.calendar,r=t.opt,s=t.trigger,y=t.defaultSelectionEnd,h=t.renderSelection,c=t.clearSelection,f=!1;r("selectable")&&r("unselectAuto")&&n(document).on("mousedown",e)}function ci(){function u(r,u){var f=i.shift();return f||(f=n("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>")),f[0].parentNode!=u[0]&&f.appendTo(u),t.push(f.css(r).show()),f}function f(){for(var n;n=t.shift();)i.push(n.hide().unbind())}var r=this,t,i;r.renderOverlay=u;r.clearOverlays=f;t=[];i=[]}function li(n){var t,i,r=this;r.build=function(){t=[];i=[];n(t,i)};r.cell=function(n,r){for(var o=t.length,s=i.length,f=-1,e=-1,u=0;o>u;u++)if(r>=t[u][0]&&r<t[u][1]){f=u;break}for(u=0;s>u;u++)if(n>=i[u][0]&&n<i[u][1]){e=u;break}return f>=0&&e>=0?{row:f,col:e}:null};r.rect=function(n,r,u,f,e){var o=e.offset();return{top:t[n][0]-o.top,left:i[r][0]-o.left,width:i[f][1]-i[r][0],height:t[u][1]-t[n][0]}}}function ai(t){function u(n){eu(n);var u=t.cell(n.pageX,n.pageY);(Boolean(u)!==Boolean(r)||u&&(u.row!=r.row||u.col!=r.col))&&(u?(i||(i=u),e(u,i,u.row-i.row,u.col-i.col)):e(u,i),r=u)}var f,e,i,r,o=this;o.start=function(o,s,h){e=o;i=r=null;t.build();u(s);f=h||"mousemove";n(document).bind(f,u)};o.stop=function(){return n(document).unbind(f,u),r}}function eu(n){void 0===n.pageX&&(n.pageX=n.originalEvent.pageX,n.pageY=n.originalEvent.pageY)}function g(n){function f(t){return u[t]=u[t]||n(t)}var t=this,u={},i={},r={};t.left=function(n){return i[n]=void 0===i[n]?f(n).position().left:i[n]};t.right=function(n){return r[n]=void 0===r[n]?t.left(n)+f(n).width():r[n]};t.clear=function(){u={};i={};r={}}}var l={lang:"en",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,titleFormat:{month:"MMMM YYYY",week:"ll",day:"LL"},columnFormat:{month:"ddd",week:bi,day:"dddd"},timeFormat:{"default":wi},displayEventEnd:{month:!1,basicWeek:!1,"default":!0},isRTL:!1,defaultButtonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},unselectAuto:!0,dropAccept:"*",handleWindowResize:!0,windowResizeDelay:200},o={en:{columnFormat:{week:"ddd M/D"}}},ou={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}},i=n.fullCalendar={version:"2.0.2"},h=i.views={},vi,yi,ht,pi,tt;n.fn.fullCalendar=function(t){var r=Array.prototype.slice.call(arguments,1),i=this;return this.each(function(u,f){var s,o=n(f),e=o.data("fullCalendar");"string"==typeof t?e&&n.isFunction(e[t])&&(s=e[t].apply(e,r),u||(i=s),"destroy"===t&&o.removeData("fullCalendar")):e||(e=new ki(o,t),o.data("fullCalendar",e),e.render())}),i};i.langs=o;i.datepickerLang=function(t,i,r){var u=o[t];u||(u=o[t]={});s(u,{isRTL:r.isRTL,weekNumberTitle:r.weekHeader,titleFormat:{month:r.showMonthAfterYear?"YYYY["+r.yearSuffix+"] MMMM":"MMMM YYYY["+r.yearSuffix+"]"},defaultButtonText:{prev:ft(r.prevText),next:ft(r.nextText),today:ft(r.currentText)}});n.datepicker&&(n.datepicker.regional[i]=n.datepicker.regional[t]=r,n.datepicker.regional.en=n.datepicker.regional[""],n.datepicker.setDefaults(r))};i.lang=function(n,t){var i;t&&(i=o[n],i||(i=o[n]={}),s(i,t||{}));l.lang=n};i.sourceNormalizers=[];i.sourceFetchers=[];vi={dataType:"json",cache:!1};yi=1;i.applyAll=k;var nt=["sun","mon","tue","wed","thu","fri","sat"],su=/^\s*\d{4}-\d\d$/,hu=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/;i.moment=function(){return d(arguments)};i.moment.utc=function(){var n=d(arguments,!0);return n.hasTime()&&n.utc(),n};i.moment.parseZone=function(){return d(arguments,!0,!0)};u.prototype=rt(t.fn);u.prototype.clone=function(){return d([this])};u.prototype.time=function(n){if(null==n)return t.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});delete this._ambigTime;t.isDuration(n)||t.isMoment(n)||(n=t.duration(n));var i=0;return t.isDuration(n)&&(i=24*Math.floor(n.asDays())),this.hours(i+n.hours()).minutes(n.minutes()).seconds(n.seconds()).milliseconds(n.milliseconds())};u.prototype.stripTime=function(){var n=this.toArray();return t.fn.utc.call(this),this.year(n[0]).month(n[1]).date(n[2]).hours(0).minutes(0).seconds(0).milliseconds(0),this._ambigTime=!0,this._ambigZone=!0,this};u.prototype.hasTime=function(){return!this._ambigTime};u.prototype.stripZone=function(){var n=this.toArray(),i=this._ambigTime;return t.fn.utc.call(this),this.year(n[0]).month(n[1]).date(n[2]).hours(n[3]).minutes(n[4]).seconds(n[5]).milliseconds(n[6]),i&&(this._ambigTime=!0),this._ambigZone=!0,this};u.prototype.hasZone=function(){return!this._ambigZone};u.prototype.zone=function(n){return null!=n&&(delete this._ambigTime,delete this._ambigZone),t.fn.zone.apply(this,arguments)};u.prototype.local=function(){var n=this.toArray(),i=this._ambigZone;return delete this._ambigTime,delete this._ambigZone,t.fn.local.apply(this,arguments),i&&this.year(n[0]).month(n[1]).date(n[2]).hours(n[3]).minutes(n[4]).seconds(n[5]).milliseconds(n[6]),this};u.prototype.utc=function(){return delete this._ambigTime,delete this._ambigZone,t.fn.utc.apply(this,arguments)};u.prototype.format=function(){return arguments[0]?kt(this,arguments[0]):this._ambigTime?f(this,"YYYY-MM-DD"):this._ambigZone?f(this,"YYYY-MM-DD[T]HH:mm:ss"):f(this)};u.prototype.toISOString=function(){return this._ambigTime?f(this,"YYYY-MM-DD"):this._ambigZone?f(this,"YYYY-MM-DD[T]HH:mm:ss"):t.fn.toISOString.apply(this,arguments)};u.prototype.isWithin=function(n,t){var i=bt([this,n,t]);return i[0]>=i[1]&&i[0]<i[2]};n.each(["isBefore","isAfter","isSame"],function(n,i){u.prototype[i]=function(n,r){var u=bt([this,n]);return t.fn[i].call(u[0],u[1],r)}});ht={t:function(n){return f(n,"a").charAt(0)},T:function(n){return f(n,"A").charAt(0)}};i.formatRange=gt;pi={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"};tt={};h.month=cr;h.basicWeek=lr;h.basicDay=ar;ct({weekMode:"fixed"});h.agendaWeek=yr;h.agendaDay=pr;ct({allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",axisFormat:wr,timeFormat:{agenda:br},dragOpacity:{agenda:.5},minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0})})