/*! * FullCalendar v2.0.0-beta2 * Docs & License: http://arshaw.com/fullcalendar/ * (c) 2013 Adam Shaw */ (function(t){"function"==typeof define&&define.amd?define(["jquery","moment"],t):t(jQuery,moment)})(function(t,e){function n(t,e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function r(t,e){var n=e.longDateFormat("L");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?n+=" ddd":n="ddd "+n,n}function a(t){o(Me,t)}function o(e){function n(n,r){t.isPlainObject(r)&&t.isPlainObject(e[n])&&!i(n)?e[n]=o({},e[n],r):void 0!==r&&(e[n]=r)}for(var r=1;arguments.length>r;r++)t.each(arguments[r],n);return e}function i(t){return/(Time|Duration)$/.test(t)}function s(n,r){function a(t){oe?f()&&(b(),m(t)):i()}function i(){ie=te.theme?"ui":"fc",n.addClass("fc"),te.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),te.theme&&n.addClass("ui-widget"),oe=t("<div class='fc-content' />").prependTo(n),re=new l(J,te),ae=re.render(),ae&&n.prepend(ae),h(te.defaultView),te.handleWindowResize&&t(window).resize(D),v()||s()}function s(){setTimeout(function(){!se.start&&v()&&g()},0)}function d(){se&&(Q("viewDestroy",se,se,se.element),se.triggerEventDestroy()),t(window).unbind("resize",D),re.destroy(),oe.remove(),n.removeClass("fc fc-rtl ui-widget")}function f(){return n.is(":visible")}function v(){return t("body").is(":visible")}function h(t){se&&t==se.name||p(t)}function p(e){ge++,se&&(Q("viewDestroy",se,se,se.element),H(),se.triggerEventDestroy(),$(),se.element.remove(),re.deactivateButton(se.name)),re.activateButton(e),se=new Fe[e](t("<div class='fc-view fc-view-"+e+"' />").appendTo(oe),J),g(),V(),ge--}function g(t){se.start&&!t&&de.isWithin(se.intervalStart,se.intervalEnd)||f()&&m(t)}function m(t){ge++,se.start&&(Q("viewDestroy",se,se,se.element),H(),x()),$(),t&&(de=se.incrementDate(de,t)),se.render(de.clone()),w(),V(),(se.afterRender||k)(),F(),N(),Q("viewRender",se,se,se.element),ge--,M()}function y(){f()&&(H(),x(),b(),w(),S())}function b(){ce=te.contentHeight?te.contentHeight:te.height?te.height-(ae?ae.height():0)-T(oe):Math.round(oe.width()/Math.max(te.aspectRatio,.5))}function w(){void 0===ce&&b(),ge++,se.setHeight(ce),se.setWidth(oe.width()),ge--,le=n.outerWidth()}function D(){if(!ge)if(se.start){var t=++pe;setTimeout(function(){t==pe&&!ge&&f()&&le!=(le=n.outerWidth())&&(ge++,y(),se.trigger("windowResize",he),ge--)},200)}else s()}function C(){x(),z()}function E(t){x(),S(t)}function S(t){f()&&(se.renderEvents(me,t),se.trigger("eventAfterAllRender"))}function x(){se.triggerEventDestroy(),se.clearEvents(),se.clearEventData()}function M(){!te.lazyFetching||fe(se.start,se.end)?z():S()}function z(){ve(se.start,se.end)}function R(t){me=t,S()}function _(t){E(t)}function F(){re.updateTitle(se.title)}function N(){var t=J.getNow();t.isWithin(se.intervalStart,se.intervalEnd)?re.disableButton("today"):re.enableButton("today")}function Y(t,e){se.select(t,e)}function H(){se&&se.unselect()}function O(){g(-1)}function A(){g(1)}function W(){de.add("years",-1),g()}function L(){de.add("years",1),g()}function Z(){de=J.getNow(),g()}function P(t){de=J.moment(t),g()}function j(){de.add.apply(de,arguments),g()}function I(){return de.clone()}function $(){oe.css({width:"100%",height:oe.height(),overflow:"hidden"})}function V(){oe.css({width:"",height:"",overflow:""})}function X(){return J}function U(){return se}function G(t,e){return void 0===e?te[t]:(("height"==t||"contentHeight"==t||"aspectRatio"==t)&&(te[t]=e,y()),void 0)}function Q(t,e){return te[t]?te[t].apply(e||he,Array.prototype.slice.call(arguments,2)):void 0}var J=this;r=r||{};var K,te=o({},Me,r);K=te.lang in ze?ze[te.lang]:ze[Me.lang],K&&(te=o({},Me,K,r)),te.isRTL&&(te=o({},Me,Re,K||{},r)),J.options=te,J.render=a,J.destroy=d,J.refetchEvents=C,J.reportEvents=R,J.reportEventChange=_,J.rerenderEvents=E,J.changeView=h,J.select=Y,J.unselect=H,J.prev=O,J.next=A,J.prevYear=W,J.nextYear=L,J.today=Z,J.gotoDate=P,J.incrementDate=j,J.getDate=I,J.getCalendar=X,J.getView=U,J.option=G,J.trigger=Q;var ee=u(e.langData(te.lang));if(te.monthNames&&(ee._months=te.monthNames),te.monthNamesShort&&(ee._monthsShort=te.monthNamesShort),te.dayNames&&(ee._weekdays=te.dayNames),te.dayNamesShort&&(ee._weekdaysShort=te.dayNamesShort),te.firstDay){var ne=u(ee._week);ne.dow=te.firstDay,ee._week=ne}J.defaultAllDayEventDuration=e.duration(te.defaultAllDayEventDuration),J.defaultTimedEventDuration=e.duration(te.defaultTimedEventDuration),J.moment=function(){var t;return t="local"===te.timezone?_e.moment.apply(null,arguments):"UTC"===te.timezone?_e.moment.utc.apply(null,arguments):_e.moment.parseZone.apply(null,arguments),t._lang=ee,t},J.getIsAmbigTimezone=function(){return"local"!==te.timezone&&"UTC"!==te.timezone},J.rezoneDate=function(t){return J.moment(t.toArray())},J.getNow=function(){var t=te.now;return"function"==typeof t&&(t=t()),J.moment(t)},J.calculateWeekNumber=function(t){var e=te.weekNumberCalculation;return"function"==typeof e?e(t):"local"===e?t.week():"ISO"===e.toUpperCase()?t.isoWeek():void 0},J.getEventEnd=function(t){return t.end?t.end.clone():J.getDefaultEventEnd(t.allDay,t.start)},J.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(J.defaultAllDayEventDuration):n.add(J.defaultTimedEventDuration),J.getIsAmbigTimezone()&&n.stripZone(),n},J.formatRange=function(t,e,n){return"function"==typeof n&&(n=n.call(J,te,ee)),q(t,e,n,null,te.isRTL)},J.formatDate=function(t,e){return"function"==typeof e&&(e=e.call(J,te,ee)),B(t,e)},c.call(J,te);var re,ae,oe,ie,se,le,ce,de,ue,fe=J.isFetchNeeded,ve=J.fetchEvents,he=n[0],pe=0,ge=0,me=[];de=null!=te.defaultDate?J.moment(te.defaultDate):J.getNow(),te.droppable&&t(document).bind("dragstart",function(e,n){var r=e.target,a=t(r);if(!a.parents(".fc").length){var o=te.dropAccept;(t.isFunction(o)?o.call(r,a):a.is(o))&&(ue=r,se.dragStart(ue,e,n))}}).bind("dragstop",function(t,e){ue&&(se.dragStop(ue,t,e),ue=null)})}function l(e,n){function r(){f=n.theme?"ui":"fc";var e=n.header;return e?v=t("<table class='fc-header' style='width:100%'/>").append(t("<tr/>").append(o("left")).append(o("center")).append(o("right"))):void 0}function a(){v.remove()}function o(r){var a=t("<td class='fc-header-"+r+"'/>"),o=n.header[r];return o&&t.each(o.split(" "),function(r){r>0&&a.append("<span class='fc-header-space'/>");var o;t.each(this.split(","),function(r,i){if("title"==i)a.append("<span class='fc-header-title'><h2> </h2></span>"),o&&o.addClass(f+"-corner-right"),o=null;else{var s;if(e[i]?s=e[i]:Fe[i]&&(s=function(){v.removeClass(f+"-state-hover"),e.changeView(i)}),s){var l,c=z(n.themeButtonIcons,i),d=z(n.buttonIcons,i),u=z(n.buttonText,i);l=c&&n.theme?"<span class='ui-icon ui-icon-"+c+"'></span>":d&&!n.theme?"<span class='fc-icon fc-icon-"+d+"'></span>":R(u||i);var v=t("<span class='fc-button fc-button-"+i+" "+f+"-state-default'>"+l+"</span>").click(function(){v.hasClass(f+"-state-disabled")||s()}).mousedown(function(){v.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-down")}).mouseup(function(){v.removeClass(f+"-state-down")}).hover(function(){v.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-hover")},function(){v.removeClass(f+"-state-hover").removeClass(f+"-state-down")}).appendTo(a);F(v),o||v.addClass(f+"-corner-left"),o=v}}}),o&&o.addClass(f+"-corner-right")}),a}function i(t){v.find("h2").html(t)}function s(t){v.find("span.fc-button-"+t).addClass(f+"-state-active")}function l(t){v.find("span.fc-button-"+t).removeClass(f+"-state-active")}function c(t){v.find("span.fc-button-"+t).addClass(f+"-state-disabled")}function d(t){v.find("span.fc-button-"+t).removeClass(f+"-state-disabled")}var u=this;u.render=r,u.destroy=a,u.updateTitle=i,u.activateButton=s,u.deactivateButton=l,u.disableButton=c,u.enableButton=d;var f,v=t([])}function c(e){function n(t,e){return!S||t.clone().stripZone()<S.clone().stripZone()||e.clone().stripZone()>k.clone().stripZone()}function r(t,e){S=t,k=e,W=[];var n=++N,r=F.length;Y=r;for(var o=0;r>o;o++)a(F[o],n)}function a(t,e){o(t,function(n){if(e==N){if(n)for(var r=0;n.length>r;r++){var a=y(n[r],t);a&&W.push(a)}Y--,Y||z(W)}})}function o(n,r){var a,i,s=_e.sourceFetchers;for(a=0;s.length>a;a++){if(i=s[a].call(E,n,S.clone(),k.clone(),e.timezone,r),i===!0)return;if("object"==typeof i)return o(i,r),void 0}var l=n.events;if(l)t.isFunction(l)?(g(),l.call(E,S.clone(),k.clone(),e.timezone,function(t){r(t),m()})):t.isArray(l)?r(l):r();else{var c=n.url;if(c){var d,u=n.success,f=n.error,v=n.complete;d=t.isFunction(n.data)?n.data():n.data;var h=t.extend({},d||{}),p=O(n.startParam,e.startParam),y=O(n.endParam,e.endParam),b=O(n.timezoneParam,e.timezoneParam);p&&(h[p]=S.format()),y&&(h[y]=k.format()),e.timezone&&"local"!=e.timezone&&(h[b]=e.timezone),g(),t.ajax(t.extend({},Ne,n,{data:h,success:function(e){e=e||[];var n=H(u,this,arguments);t.isArray(n)&&(e=n),r(e)},error:function(){H(f,this,arguments),r()},complete:function(){H(v,this,arguments),m()}}))}else r()}}function i(t){t=s(t),t&&(Y++,a(t,N))}function s(e){return t.isFunction(e)||t.isArray(e)?e={events:e}:"string"==typeof e&&(e={url:e}),"object"==typeof e?(D(e),F.push(e),e):void 0}function l(e){F=t.grep(F,function(t){return!T(t,e)}),W=t.grep(W,function(t){return!T(t.source,e)}),z(W)}function c(t){b(t),u(t),z(W)}function u(t){var e,n,r,a;for(e=0;W.length>e;e++)if(n=W[e],n._id==t._id&&n!==t)for(r=0;P.length>r;r++)a=P[r],void 0!==t[a]&&(n[a]=t[a])}function f(t,e){var n=y(t);n&&(n.source||(e&&(_.events.push(n),n.source=_),W.push(n)),z(W))}function h(e){var n;if(e){if(!t.isFunction(e)){var r=e+"";e=function(t){return t._id==r}}for(W=t.grep(W,e,!0),n=0;F.length>n;n++)t.isArray(F[n].events)&&(F[n].events=t.grep(F[n].events,e,!0))}else for(W=[],n=0;F.length>n;n++)t.isArray(F[n].events)&&(F[n].events=[]);z(W)}function p(e){return t.isFunction(e)?t.grep(W,e):e?(e+="",t.grep(W,function(t){return t._id==e})):W}function g(){A++||x("loading",null,!0,M())}function m(){--A||x("loading",null,!1,M())}function y(n,r){var a,o,i,s,l={};return e.eventDataTransform&&(n=e.eventDataTransform(n)),r&&r.eventDataTransform&&(n=r.eventDataTransform(n)),a=E.moment(n.start||n.date),a.isValid()&&(o=null,!n.end||(o=E.moment(n.end),o.isValid()))?(i=n.allDay,void 0===i&&(s=O(r?r.allDayDefault:void 0,e.allDayDefault),i=void 0!==s?s:!(a.hasTime()||o&&o.hasTime())),i?(a.hasTime()&&a.stripTime(),o&&o.hasTime()&&o.stripTime()):(a.hasTime()||(a=E.rezoneDate(a)),o&&!o.hasTime()&&(o=E.rezoneDate(o))),t.extend(l,n),r&&(l.source=r),l._id=n._id||(void 0===n.id?"_fc"+Ye++:n.id+""),l.className=n.className?"string"==typeof n.className?n.className.split(/\s+/):n.className:[],l.allDay=i,l.start=a,l.end=o,e.forceEventDuration&&!l.end&&(l.end=R(l)),d(l),l):void 0}function b(t,e,n){var r,a,o,i=t._allDay,s=t._start,l=t._end,c=!1;return e||n||(e=t.start,n=t.end),r=t.allDay!=i?t.allDay:!(e||n).hasTime(),r&&(e&&(e=e.clone().stripTime()),n&&(n=n.clone().stripTime())),e&&(a=r?v(e,s.clone().stripTime()):v(e,s)),r!=i?c=!0:n&&(o=v(n||E.getDefaultEventEnd(r,e||s),e||s).subtract(v(l||E.getDefaultEventEnd(i,s),s))),w(p(t._id),c,r,a,o)}function w(n,r,a,o,i){var s=E.getIsAmbigTimezone(),l=[];return t.each(n,function(t,n){var c=n._allDay,u=n._start,f=n._end,v=null!=a?a:c,h=u.clone(),p=!r&&f?f.clone():null;v?(h.stripTime(),p&&p.stripTime()):(h.hasTime()||(h=E.rezoneDate(h)),p&&!p.hasTime()&&(p=E.rezoneDate(p))),p||!e.forceEventDuration&&!+i||(p=E.getDefaultEventEnd(v,h)),h.add(o),p&&p.add(o).add(i),s&&(+o&&h.stripZone(),p&&(+o||+i)&&p.stripZone()),n.allDay=v,n.start=h,n.end=p,d(n),l.push(function(){n.allDay=c,n.start=u,n.end=f,d(n)})}),function(){for(var t=0;l.length>t;t++)l[t]()}}function D(t){t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[];for(var e=_e.sourceNormalizers,n=0;e.length>n;n++)e[n].call(E,t)}function T(t,e){return t&&e&&C(t)==C(e)}function C(t){return("object"==typeof t?t.events||t.url:"")||t}var E=this;E.isFetchNeeded=n,E.fetchEvents=r,E.addEventSource=i,E.removeEventSource=l,E.updateEvent=c,E.renderEvent=f,E.removeEvents=h,E.clientEvents=p,E.mutateEvent=b;var S,k,x=E.trigger,M=E.getView,z=E.reportEvents,R=E.getEventEnd,_={events:[]},F=[_],N=0,Y=0,A=0,W=[],L=e.eventSources||[];e.events&&L.push(e.events);for(var Z=0;L.length>Z;Z++)s(L[Z]);var P=["title","url","allDay","className","editable","color","backgroundColor","borderColor","textColor"]}function d(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}function u(t){var e=function(){};return e.prototype=t,new e}function f(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function v(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function h(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function p(e,n,r){e.unbind("mouseover").mouseover(function(e){for(var a,o,i,s=e.target;s!=this;)a=s,s=s.parentNode;void 0!==(o=a._fci)&&(a._fci=void 0,i=n[o],r(i.event,i.element,i),t(e.target).trigger(e)),e.stopPropagation()})}function g(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.width(Math.max(0,n-y(a,r)))}function m(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.height(Math.max(0,n-T(a,r)))}function y(t,e){return b(t)+D(t)+(e?w(t):0)}function b(e){return(parseFloat(t.css(e[0],"paddingLeft",!0))||0)+(parseFloat(t.css(e[0],"paddingRight",!0))||0)}function w(e){return(parseFloat(t.css(e[0],"marginLeft",!0))||0)+(parseFloat(t.css(e[0],"marginRight",!0))||0)}function D(e){return(parseFloat(t.css(e[0],"borderLeftWidth",!0))||0)+(parseFloat(t.css(e[0],"borderRightWidth",!0))||0)}function T(t,e){return C(t)+S(t)+(e?E(t):0)}function C(e){return(parseFloat(t.css(e[0],"paddingTop",!0))||0)+(parseFloat(t.css(e[0],"paddingBottom",!0))||0)}function E(e){return(parseFloat(t.css(e[0],"marginTop",!0))||0)+(parseFloat(t.css(e[0],"marginBottom",!0))||0)}function S(e){return(parseFloat(t.css(e[0],"borderTopWidth",!0))||0)+(parseFloat(t.css(e[0],"borderBottomWidth",!0))||0)}function k(){}function x(t,e){return t-e}function M(t){return Math.max.apply(Math,t)}function z(t,e){if(void 0!==t[e])return t[e];for(var n,r=e.split(/(?=[A-Z])/),a=r.length-1;a>=0;a--)if(n=t[r[a].toLowerCase()],void 0!==n)return n;return t["default"]}function R(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")}function _(t){return t.replace(/&.*?;/g,"")}function F(t){t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function N(t){t.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function Y(t,e){var n=t.source||{},r=t.color,a=n.color,o=e("eventColor"),i=t.backgroundColor||r||n.backgroundColor||a||e("eventBackgroundColor")||o,s=t.borderColor||r||n.borderColor||a||e("eventBorderColor")||o,l=t.textColor||n.textColor||e("eventTextColor"),c=[];return i&&c.push("background-color:"+i),s&&c.push("border-color:"+s),l&&c.push("color:"+l),c.join(";")}function H(e,n,r){if(t.isFunction(e)&&(e=[e]),e){var a,o;for(a=0;e.length>a;a++)o=e[a].apply(n,r)||o;return o}}function O(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t]}function A(n,r,a){var o,i,s=n[0],l=1==n.length&&"string"==typeof s,c=!1,d=!1;return l?Oe.test(s)?(s+="-01",c=!0,d=!0):(o=Ae.exec(s))&&(c=!o[5],d=!0):t.isArray(s)&&(d=!0),i=r||a||c?e.utc.apply(e,n):e.apply(null,n),e.isMoment(s)&&L(s,i),c&&(i._ambigTime=!0,i._ambigZone=!0),a&&(d?i._ambigZone=!0:l?i.zone(s):(h(s)||void 0===s)&&i.local()),new W(i)}function W(t){f(this,t)}function L(t,e){t._ambigTime?e._ambigTime=!0:e._ambigTime&&delete e._ambigTime,t._ambigZone?e._ambigZone=!0:e._ambigZone&&delete e._ambigZone}function Z(t){var e,n=[],r=!1,a=!1;for(e=0;t.length>e;e++)n.push(_e.moment(t[e])),r=r||n[e]._ambigTime,a=a||n[e]._ambigZone;for(e=0;n.length>e;e++)r?n[e].stripTime():a&&n[e].stripZone();return n}function P(t,n){return e.fn.format.call(t,n)}function B(t,e){return j(t,X(e))}function j(t,e){var n,r="";for(n=0;e.length>n;n++)r+=I(t,e[n]);return r}function I(t,e){var n,r;return"string"==typeof e?e:(n=e.token)?We[n]?We[n](t):P(t,n):e.maybe&&(r=j(t,e.maybe),r.match(/[1-9]/))?r:""}function q(t,e,n,r,a){return n=t.lang().longDateFormat(n)||n,r=r||" - ",$(t,e,X(n),r,a)}function $(t,e,n,r,a){var o,i,s,l,c="",d="",u="",f="",v="";for(i=0;n.length>i&&(o=V(t,e,n[i]),o!==!1);i++)c+=o;for(s=n.length-1;s>i&&(o=V(t,e,n[s]),o!==!1);s--)d=o+d;for(l=i;s>=l;l++)u+=I(t,n[l]),f+=I(e,n[l]);return(u||f)&&(v=a?f+r+u:u+r+f),c+v+d}function V(t,e,n){var r,a;return"string"==typeof n?n:(r=n.token)&&(a=Le[r.charAt(0)],a&&t.isSame(e,a))?P(t,r):!1}function X(t){return t in Ze?Ze[t]:Ze[t]=U(t)}function U(t){for(var e,n=[],r=/\[([^\]]*)\]|\(([^\)]*)\)|((\w)\4*o?T?)|([^\w\[\(]+)/g;e=r.exec(t);)e[1]?n.push(e[1]):e[2]?n.push({maybe:U(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push(e[5]);return n}function G(t,e){function n(t,e){return t.clone().stripTime().add("months",e).startOf("month")}function r(t){a.intervalStart=t.clone().stripTime().startOf("month"),a.intervalEnd=a.intervalStart.clone().add("months",1),a.start=a.intervalStart.clone().startOf("week"),a.start=a.skipHiddenDays(a.start),a.end=a.intervalEnd.clone().add("days",(7-a.intervalEnd.weekday())%7),a.end=a.skipHiddenDays(a.end,-1,!0);var n=Math.ceil(a.end.diff(a.start,"weeks",!0));"fixed"==a.opt("weekMode")&&(a.end.add("weeks",6-n),n=6),a.title=e.formatDate(a.intervalStart,a.opt("titleFormat")),a.renderBasic(n,a.getCellsPerWeek(),!0)}var a=this;a.incrementDate=n,a.render=r,K.call(a,t,e,"month")}function Q(t,e){function n(t,e){return t.clone().stripTime().add("weeks",e).startOf("week")}function r(t){a.intervalStart=t.clone().stripTime().startOf("week"),a.intervalEnd=a.intervalStart.clone().add("weeks",1),a.start=a.skipHiddenDays(a.intervalStart),a.end=a.skipHiddenDays(a.intervalEnd,-1,!0),a.title=e.formatRange(a.start,a.end.clone().subtract(1),a.opt("titleFormat")," — "),a.renderBasic(1,a.getCellsPerWeek(),!1)}var a=this;a.incrementDate=n,a.render=r,K.call(a,t,e,"basicWeek")}function J(t,e){function n(t,e){var n=t.clone().stripTime().add("days",e);return n=a.skipHiddenDays(n,0>e?-1:1)}function r(t){a.start=a.intervalStart=t.clone().stripTime(),a.end=a.intervalEnd=a.start.clone().add("days",1),a.title=e.formatDate(a.start,a.opt("titleFormat")),a.renderBasic(1,1,!1)}var a=this;a.incrementDate=n,a.render=r,K.call(a,t,e,"basicDay")}function K(e,n,r){function a(t,e,n){U=t,G=e,Q=n,o(),W||i(),s()}function o(){re=ie("theme")?"ui":"fc",ae=ie("columnFormat"),oe=ie("weekNumbers")}function i(){I=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(e)}function s(){var n=l();H&&H.remove(),H=t(n).appendTo(e),O=H.find("thead"),A=O.find(".fc-day-header"),W=H.find("tbody"),L=W.find("tr"),Z=W.find(".fc-day"),P=L.find("td:first-child"),B=L.eq(0).find(".fc-day > div"),j=L.eq(0).find(".fc-day-content > div"),N(O.add(O.find("tr"))),N(L),L.eq(0).addClass("fc-first"),L.filter(":last").addClass("fc-last"),Z.each(function(e,n){var r=ue(Math.floor(e/G),e%G);se("dayRender",Y,r,t(n))}),h(Z)}function l(){var t="<table class='fc-border-separate' style='width:100%' cellspacing='0'>"+c()+d()+"</table>";return t}function c(){var t,e,n=re+"-widget-header",r="";for(r+="<thead><tr>",oe&&(r+="<th class='fc-week-number "+n+"'>"+R(ie("weekNumberTitle"))+"</th>"),t=0;G>t;t++)e=ue(0,t),r+="<th class='fc-day-header fc-"+He[e.day()]+" "+n+"'>"+R(he(e,ae))+"</th>";return r+="</tr></thead>"}function d(){var t,e,n,r=re+"-widget-content",a="";for(a+="<tbody>",t=0;U>t;t++){for(a+="<tr class='fc-week'>",oe&&(n=ue(t,0),a+="<td class='fc-week-number "+r+"'>"+"<div>"+R(pe(n))+"</div>"+"</td>"),e=0;G>e;e++)n=ue(t,e),a+=u(n);a+="</tr>"}return a+="</tbody>"}function u(t){var e=Y.intervalStart.month(),r=n.getNow().stripTime(),a="",o=re+"-widget-content",i=["fc-day","fc-"+He[t.day()],o];return t.month()!=e&&i.push("fc-other-month"),t.isSame(r,"day")?i.push("fc-today",re+"-state-highlight"):r>t?i.push("fc-past"):i.push("fc-future"),a+="<td class='"+i.join(" ")+"'"+" data-date='"+t.format()+"'"+">"+"<div>",Q&&(a+="<div class='fc-day-number'>"+t.date()+"</div>"),a+="<div class='fc-day-content'><div style='position:relative'> </div></div></div></td>"}function f(e){$=e;var n,r,a,o=Math.max($-O.height(),0);"variable"==ie("weekMode")?n=r=Math.floor(o/(1==U?2:6)):(n=Math.floor(o/U),r=o-n*(U-1)),P.each(function(e,o){U>e&&(a=t(o),a.find("> div").css("min-height",(e==U-1?r:n)-T(a)))})}function v(t){q=t,ee.clear(),ne.clear(),X=0,oe&&(X=O.find("th.fc-week-number").outerWidth()),V=Math.floor((q-X)/G),g(A.slice(0,-1),V)}function h(t){t.click(p).mousedown(de)}function p(e){if(!ie("selectable")){var r=n.moment(t(this).data("date"));se("dayClick",this,r,e)}}function m(t,e,n){n&&J.build();for(var r=ve(t,e),a=0;r.length>a;a++){var o=r[a];h(y(o.row,o.leftCol,o.row,o.rightCol))}}function y(t,n,r,a){var o=J.rect(t,n,r,a,e);return le(o,e)}function b(t){return t.clone().stripTime().add("days",1)}function w(t,e){m(t,e,!0)}function D(){ce()}function C(t,e){var n=fe(t),r=Z[n.row*G+n.col];se("dayClick",r,t,e)}function E(t,e){K.start(function(t){if(ce(),t){var e=ue(t),r=e.clone().add(n.defaultAllDayEventDuration);m(e,r)}},e)}function S(t,e,n){var r=K.stop();ce(),r&&se("drop",t,ue(r),e,n)}function k(t){return ee.left(t)}function x(t){return ee.right(t)}function M(t){return ne.left(t)}function z(t){return ne.right(t)}function _(t){return L.eq(t)}var Y=this;Y.renderBasic=a,Y.setHeight=f,Y.setWidth=v,Y.renderDayOverlay=m,Y.defaultSelectionEnd=b,Y.renderSelection=w,Y.clearSelection=D,Y.reportDayClick=C,Y.dragStart=E,Y.dragStop=S,Y.getHoverListener=function(){return K},Y.colLeft=k,Y.colRight=x,Y.colContentLeft=M,Y.colContentRight=z,Y.getIsCellAllDay=function(){return!0},Y.allDayRow=_,Y.getRowCnt=function(){return U},Y.getColCnt=function(){return G},Y.getColWidth=function(){return V},Y.getDaySegmentContainer=function(){return I},me.call(Y,e,n,r),Ce.call(Y),Te.call(Y),te.call(Y);var H,O,A,W,L,Z,P,B,j,I,q,$,V,X,U,G,Q,J,K,ee,ne,re,ae,oe,ie=Y.opt,se=Y.trigger,le=Y.renderOverlay,ce=Y.clearOverlays,de=Y.daySelectionMousedown,ue=Y.cellToDate,fe=Y.dateToCell,ve=Y.rangeToSegments,he=n.formatDate,pe=n.calculateWeekNumber;F(e.addClass("fc-grid")),J=new Ee(function(e,n){var r,a,o;A.each(function(e,i){r=t(i),a=r.offset().left,e&&(o[1]=a),o=[a],n[e]=o}),o[1]=a+r.outerWidth(),L.each(function(n,i){U>n&&(r=t(i),a=r.offset().top,n&&(o[1]=a),o=[a],e[n]=o)}),o[1]=a+r.outerHeight()}),K=new Se(J),ee=new xe(function(t){return B.eq(t)}),ne=new xe(function(t){return j.eq(t)})}function te(){function t(t,e){n.renderDayEvents(t,e)}function e(){n.getDaySegmentContainer().empty()}var n=this;n.renderEvents=t,n.clearEvents=e,ye.call(n)}function ee(t,e){function n(t,e){return t.clone().stripTime().add("weeks",e).startOf("week")}function r(t){a.intervalStart=t.clone().stripTime().startOf("week"),a.intervalEnd=a.intervalStart.clone().add("weeks",1),a.start=a.skipHiddenDays(a.intervalStart),a.end=a.skipHiddenDays(a.intervalEnd,-1,!0),a.title=e.formatRange(a.start,a.end.clone().subtract(1),a.opt("titleFormat")," — "),a.renderAgenda(a.getCellsPerWeek())}var a=this;a.incrementDate=n,a.render=r,oe.call(a,t,e,"agendaWeek")}function ne(t,e){function n(t,e){var n=t.clone().stripTime().add("days",e);return n=a.skipHiddenDays(n,0>e?-1:1)}function r(t){a.start=a.intervalStart=t.clone().stripTime(),a.end=a.intervalEnd=a.start.clone().add("days",1),a.title=e.formatDate(a.start,a.opt("titleFormat")),a.renderAgenda(1)}var a=this;a.incrementDate=n,a.render=r,oe.call(a,t,e,"agendaDay")}function re(t,e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function ae(t,e){return e.longDateFormat("LT").replace(/\s*a$/i,"")}function oe(n,r,a){function o(t){ke=t,i(),$?l():s()}function i(){Ne=Le("theme")?"ui":"fc",Ye=Le("isRTL"),We=Le("columnFormat"),Oe=e.duration(Le("minTime")),Ae=e.duration(Le("maxTime")),ge=e.duration(Le("slotDuration")),be=Le("snapDuration"),be=be?e.duration(be):ge}function s(){var r,a,o,i,s=Ne+"-widget-header",c=Ne+"-widget-content",d=0===ge.asMinutes()%15;for(l(),ee=t("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(n),Le("allDaySlot")?(ne=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(ee),r="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+s+" fc-agenda-axis'>"+(Le("allDayHTML")||R(Le("allDayText")))+"</th>"+"<td>"+"<div class='fc-day-content'><div style='position:relative'/></div>"+"</td>"+"<th class='"+s+" fc-agenda-gutter'> </th>"+"</tr>"+"</table>",re=t(r).appendTo(ee),ae=re.find("tr"),y(ae.find("td")),ee.append("<div class='fc-agenda-divider "+s+"'>"+"<div class='fc-agenda-divider-inner'/>"+"</div>")):ne=t([]),oe=t("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(ee),se=t("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(oe),le=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(se),r="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",a=e.duration(+Oe),Me=0;Ae>a;)o=q.start.clone().time(a),i=o.minutes(),r+="<tr class='fc-slot"+Me+" "+(i?"fc-minor":"")+"'>"+"<th class='fc-agenda-axis "+s+"'>"+(d&&i?" ":R(Ge(o,Le("axisFormat"))))+"</th>"+"<td class='"+c+"'>"+"<div style='position:relative'> </div>"+"</td>"+"</tr>",a.add(ge),Me++;r+="</tbody></table>",ce=t(r).appendTo(se),b(ce.find("td"))}function l(){var e=c();$&&$.remove(),$=t(e).appendTo(n),V=$.find("thead"),X=V.find("th").slice(1,-1),U=$.find("tbody"),G=U.find("td").slice(0,-1),Q=G.find("> div"),J=G.find(".fc-day-content > div"),K=G.eq(0),te=Q.eq(0),N(V.add(V.find("tr"))),N(U.add(U.find("tr")))}function c(){var t="<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>"+d()+u()+"</table>";return t}function d(){var t,e,n,r=Ne+"-widget-header",a="";for(a+="<thead><tr>",Le("weekNumbers")?(t=Ve(0,0),e=Qe(t),Ye?e+=Le("weekNumberTitle"):e=Le("weekNumberTitle")+e,a+="<th class='fc-agenda-axis fc-week-number "+r+"'>"+R(e)+"</th>"):a+="<th class='fc-agenda-axis "+r+"'> </th>",n=0;ke>n;n++)t=Ve(0,n),a+="<th class='fc-"+He[t.day()]+" fc-col"+n+" "+r+"'>"+R(Ge(t,We))+"</th>";return a+="<th class='fc-agenda-gutter "+r+"'> </th>"+"</tr>"+"</thead>"}function u(){var t,e,n,a,o,i=Ne+"-widget-header",s=Ne+"-widget-content",l=r.getNow().stripTime(),c="";for(c+="<tbody><tr><th class='fc-agenda-axis "+i+"'> </th>",n="",e=0;ke>e;e++)t=Ve(0,e),o=["fc-col"+e,"fc-"+He[t.day()],s],t.isSame(l,"day")?o.push(Ne+"-state-highlight","fc-today"):l>t?o.push("fc-past"):o.push("fc-future"),a="<td class='"+o.join(" ")+"'>"+"<div>"+"<div class='fc-day-content'>"+"<div style='position:relative'> </div>"+"</div>"+"</div>"+"</td>",n+=a;return c+=n,c+="<td class='fc-agenda-gutter "+s+"'> </td>"+"</tr>"+"</tbody>"}function f(t){void 0===t&&(t=fe),fe=t,Je={};var e=U.position().top,n=oe.position().top,r=Math.min(t-e,ce.height()+n+1);te.height(r-T(K)),ee.css("top",e),oe.height(r-n-1);var a=ce.find("tr:first").height()+1,o=ce.find("tr:eq(1)").height();ye=(a+o)/2,we=ge/be,De=ye/we}function v(e){ue=e,_e.clear(),Fe.clear();var n=V.find("th:first");re&&(n=n.add(re.find("th:first"))),n=n.add(ce.find("th:first")),ve=0,g(n.width("").each(function(e,n){ve=Math.max(ve,t(n).outerWidth())}),ve);var r=$.find(".fc-agenda-gutter");re&&(r=r.add(re.find("th.fc-agenda-gutter")));var a=oe[0].clientWidth;pe=oe.width()-a,pe?(g(r,pe),r.show().prev().removeClass("fc-last")):r.hide().prev().addClass("fc-last"),he=Math.floor((a-ve)/ke),g(X.slice(0,-1),he)}function h(){function t(){oe.scrollTop(n)}var n=O(e.duration(Le("scrollTime")))+1;t(),setTimeout(t,0)}function p(){h()}function y(t){t.click(w).mousedown(qe)}function b(t){t.click(w).mousedown(P)}function w(t){if(!Le("selectable")){var e=Math.min(ke-1,Math.floor((t.pageX-$.offset().left-ve)/he)),n=Ve(0,e),a=this.parentNode.className.match(/fc-slot(\d+)/);if(a){var o=parseInt(a[1]);n.add(Oe+o*ge),n=r.rezoneDate(n),Ze("dayClick",G[e],n,t)}else Ze("dayClick",G[e],n,t)}}function D(t,e,n){n&&ze.build();for(var r=Ue(t,e),a=0;r.length>a;a++){var o=r[a];y(C(o.row,o.leftCol,o.row,o.rightCol))}}function C(t,e,n,r){var a=ze.rect(t,e,n,r,ee);return Pe(a,ee)}function E(t,e){t=t.clone().stripZone(),e=e.clone().stripZone();for(var n=0;ke>n;n++){var r=Ve(0,n),a=r.clone().add("days",1),o=t>r?t:r,i=e>a?a:e;if(i>o){var s=ze.rect(0,n,0,n,se),l=H(o,r),c=H(i,r);s.top=l,s.height=c-l,b(Pe(s,se))}}}function S(t){return _e.left(t)}function k(t){return Fe.left(t)}function M(t){return _e.right(t)}function z(t){return Fe.right(t)}function _(t){return Le("allDaySlot")&&!t.row}function Y(t){var n=Ve(0,t.col),a=t.row;return Le("allDaySlot")&&a--,a>=0&&(n.time(e.duration(Oe+a*ge)),n=r.rezoneDate(n)),n}function H(t,n){return O(e.duration(t.clone().stripZone()-n.clone().stripTime()))}function O(t){if(Oe>t)return 0;if(t>=Ae)return ce.height();var e=(t-Oe)/ge,n=Math.floor(e),r=e-n,a=Je[n];void 0===a&&(a=Je[n]=ce.find("tr").eq(n).find("td div")[0].offsetTop);var o=a-1+r*ye;return o=Math.max(o,0)}function A(t){return t.hasTime()?t.clone().add(ge):t.clone().add("days",1)}function W(t,e){t.hasTime()||e.hasTime()?L(t,e):Le("allDaySlot")&&D(t,e,!0)}function L(e,n){var r=Le("selectHelper");if(ze.build(),r){var a=Xe(e).col;if(a>=0&&ke>a){var o=ze.rect(0,a,0,a,se),i=H(e,e),s=H(n,e);if(s>i){if(o.top=i,o.height=s-i,o.left+=2,o.width-=5,t.isFunction(r)){var l=r(e,n);l&&(o.position="absolute",de=t(l).css(o).appendTo(se))}else o.isStart=!0,o.isEnd=!0,de=t($e({title:"",start:e,end:n,className:["fc-select-helper"],editable:!1},o)),de.css("opacity",Le("dragOpacity"));de&&(b(de),se.append(de),g(de,o.width,!0),m(de,o.height,!0))}}}else E(e,n)}function Z(){Be(),de&&(de.remove(),de=null)}function P(e){if(1==e.which&&Le("selectable")){Ie(e);var n;Re.start(function(t,e){if(Z(),t&&t.col==e.col&&!_(t)){var r=Y(e),a=Y(t);n=[r,r.clone().add(be),a,a.clone().add(be)].sort(x),L(n[0],n[3])}else n=null},e),t(document).one("mouseup",function(t){Re.stop(),n&&(+n[0]==+n[1]&&B(n[0],t),je(n[0],n[3],t))})}}function B(t,e){Ze("dayClick",G[Xe(t).col],t,e)}function j(t,e){Re.start(function(t){if(Be(),t){var e=Y(t),n=e.clone();e.hasTime()?(n.add(r.defaultTimedEventDuration),E(e,n)):(n.add(r.defaultAllDayEventDuration),D(e,n))}},e)}function I(t,e,n){var r=Re.stop();Be(),r&&Ze("drop",t,Y(r),e,n)}var q=this;q.renderAgenda=o,q.setWidth=v,q.setHeight=f,q.afterRender=p,q.computeDateTop=H,q.getIsCellAllDay=_,q.allDayRow=function(){return ae},q.getCoordinateGrid=function(){return ze},q.getHoverListener=function(){return Re},q.colLeft=S,q.colRight=M,q.colContentLeft=k,q.colContentRight=z,q.getDaySegmentContainer=function(){return ne},q.getSlotSegmentContainer=function(){return le},q.getSlotContainer=function(){return se},q.getRowCnt=function(){return 1},q.getColCnt=function(){return ke},q.getColWidth=function(){return he},q.getSnapHeight=function(){return De},q.getSnapDuration=function(){return be},q.getSlotHeight=function(){return ye},q.getSlotDuration=function(){return ge},q.getMinTime=function(){return Oe},q.getMaxTime=function(){return Ae},q.defaultSelectionEnd=A,q.renderDayOverlay=D,q.renderSelection=W,q.clearSelection=Z,q.reportDayClick=B,q.dragStart=j,q.dragStop=I,me.call(q,n,r,a),Ce.call(q),Te.call(q),ie.call(q);var $,V,X,U,G,Q,J,K,te,ee,ne,re,ae,oe,se,le,ce,de,ue,fe,ve,he,pe,ge,ye,be,we,De,ke,Me,ze,Re,_e,Fe,Ne,Ye,Oe,Ae,We,Le=q.opt,Ze=q.trigger,Pe=q.renderOverlay,Be=q.clearOverlays,je=q.reportSelection,Ie=q.unselect,qe=q.daySelectionMousedown,$e=q.slotSegHtml,Ve=q.cellToDate,Xe=q.dateToCell,Ue=q.rangeToSegments,Ge=r.formatDate,Qe=r.calculateWeekNumber,Je={};F(n.addClass("fc-agenda")),ze=new Ee(function(e,n){function r(t){return Math.max(l,Math.min(c,t))}var a,o,i;X.each(function(e,r){a=t(r),o=a.offset().left,e&&(i[1]=o),i=[o],n[e]=i}),i[1]=o+a.outerWidth(),Le("allDaySlot")&&(a=ae,o=a.offset().top,e[0]=[o,o+a.outerHeight()]);for(var s=se.offset().top,l=oe.offset().top,c=l+oe.outerHeight(),d=0;Me*we>d;d++)e.push([r(s+De*d),r(s+De*(d+1))]) }),Re=new Se(ze),_e=new xe(function(t){return Q.eq(t)}),Fe=new xe(function(t){return J.eq(t)})}function ie(){function n(t,e){var n,r=t.length,o=[],s=[];for(n=0;r>n;n++)t[n].allDay?o.push(t[n]):s.push(t[n]);v("allDaySlot")&&(V(o,e),D()),i(a(s),e)}function r(){C().empty(),E().empty()}function a(t){var e,n,r,a,i,s=F(),l=X(),c=U(),d=[];for(n=0;s>n;n++)for(e=_(0,n),i=o(t,e.clone().time(l),e.clone().time(c)),i=se(i),r=0;i.length>r;r++)a=i[r],a.col=n,d.push(a);return d}function o(t,e,n){e=e.clone().stripZone(),n=n.clone().stripZone();var r,a,o,i,s,l,c,d,u=[],f=t.length;for(r=0;f>r;r++)a=t[r],o=a.start.clone().stripZone(),i=K(a).stripZone(),i>e&&n>o&&(e>o?(s=e.clone(),c=!1):(s=o,c=!0),i>n?(l=n.clone(),d=!1):(l=i,d=!0),u.push({event:a,start:s,end:l,isStart:c,isEnd:d}));return u.sort(ge)}function i(e,n){var r,a,o,i,c,d,u,f,g,m,b,w,D,C,S,x,R=e.length,_="",F=E(),N=v("isRTL");for(r=0;R>r;r++)a=e[r],o=a.event,i=k(a.start,a.start),c=k(a.end,a.start),d=M(a.col),u=z(a.col),f=u-d,u-=.025*f,f=u-d,g=f*(a.forwardCoord-a.backwardCoord),v("slotEventOverlap")&&(g=Math.max(2*(g-10),g)),N?(b=u-a.backwardCoord*f,m=b-g):(m=d+a.backwardCoord*f,b=m+g),m=Math.max(m,d),b=Math.min(b,u),g=b-m,a.top=i,a.left=m,a.outerWidth=g,a.outerHeight=c-i,_+=s(o,a);for(F[0].innerHTML=_,w=F.children(),r=0;R>r;r++)a=e[r],o=a.event,D=t(w[r]),C=h("eventRender",o,o,D),C===!1?D.remove():(C&&C!==!0&&(D.remove(),D=t(C).css({position:"absolute",top:a.top,left:a.left}).appendTo(F)),a.element=D,o._id===n?l(o,D,a):D[0]._fci=r,Z(o,D));for(p(F,e,l),r=0;R>r;r++)a=e[r],(D=a.element)&&(a.vsides=T(D,!0),a.hsides=y(D,!0),S=D.find(".fc-event-title"),S.length&&(a.contentTop=S[0].offsetTop));for(r=0;R>r;r++)a=e[r],(D=a.element)&&(D[0].style.width=Math.max(0,a.outerWidth-a.hsides)+"px",x=Math.max(0,a.outerHeight-a.vsides),D[0].style.height=x+"px",o=a.event,void 0!==a.contentTop&&10>x-a.contentTop&&(D.find("div.fc-event-time").text(Q(o.start,v("timeFormat"))+" - "+o.title),D.find("div.fc-event-title").remove()),h("eventAfterRender",o,o,D))}function s(t,e){var n="<",r=t.url,a=Y(t,v),o=["fc-event","fc-event-vert"];return g(t)&&o.push("fc-event-draggable"),e.isStart&&o.push("fc-event-start"),e.isEnd&&o.push("fc-event-end"),o=o.concat(t.className),t.source&&(o=o.concat(t.source.className||[])),n+=r?"a href='"+R(t.url)+"'":"div",n+=" class='"+o.join(" ")+"'"+" style="+"'"+"position:absolute;"+"top:"+e.top+"px;"+"left:"+e.left+"px;"+a+"'"+">"+"<div class='fc-event-inner'>"+"<div class='fc-event-time'>",n+=t.end?R(J(t.start,t.end,v("timeFormat"))):R(Q(t.start,v("timeFormat"))),n+="</div><div class='fc-event-title'>"+R(t.title||"")+"</div>"+"</div>"+"<div class='fc-event-bg'></div>",e.isEnd&&b(t)&&(n+="<div class='ui-resizable-handle ui-resizable-s'>=</div>"),n+="</"+(r?"a":"div")+">"}function l(t,e,n){var r=e.find("div.fc-event-time");g(t)&&d(t,e,r),n.isEnd&&b(t)&&u(t,e,r),w(t,e)}function c(t,n,r){function a(){c||(n.width(o).height("").draggable("option","grid",null),c=!0)}var o,i,s,l=r.isStart,c=!0,d=S(),u=N(),f=X(),p=W(),g=A(),y=O(),b=H();n.draggable({opacity:v("dragOpacity","month"),revertDuration:v("dragRevertDuration"),start:function(e,r){h("eventDragStart",n,t,e,r),B(t,n),o=n.width(),d.start(function(e,r){if($(),e){i=!1;var o=_(0,r.col),d=_(0,e.col);s=d.diff(o,"days"),e.row?l?c&&(n.width(u-10),m(n,G.defaultTimedEventDuration/p*g),n.draggable("option","grid",[u,1]),c=!1):i=!0:(q(t.start.clone().add("days",s),K(t).add("days",s)),a()),i=i||c&&!s}else a(),i=!0;n.draggable("option","revert",i)},e,"drag")},stop:function(r,o){if(d.stop(),$(),h("eventDragStop",n,t,r,o),i)a(),n.css("filter",""),P(t,n);else{var l,u,v=t.start.clone().add("days",s);c||(u=Math.round((n.offset().top-L().offset().top)/b),l=e.duration(f+u*y),v=G.rezoneDate(v.clone().time(l))),j(this,t,v,r,o)}}})}function d(t,e,n){function r(){$(),s&&(c?(n.hide(),e.draggable("option","grid",null),q(b,w)):(a(),n.css("display",""),e.draggable("option","grid",[C,E])))}function a(){var e;b&&(e=t.end?J(b,w,v("timeFormat")):Q(b,v("timeFormat")),n.text(e))}var o,i,s,l,c,d,u,p,g,m,y,b,w,D=f.getCoordinateGrid(),T=F(),C=N(),E=H(),S=O();e.draggable({scroll:!1,grid:[C,E],axis:1==T?"y":!1,opacity:v("dragOpacity"),revertDuration:v("dragRevertDuration"),start:function(n,r){h("eventDragStart",e,t,n,r),B(t,e),D.build(),o=e.position(),i=D.cell(n.pageX,n.pageY),s=l=!0,c=d=x(i),u=p=0,g=0,m=y=0,b=null,w=null},drag:function(n,a){var f=D.cell(n.pageX,n.pageY);if(s=!!f){if(c=x(f),u=Math.round((a.position.left-o.left)/C),u!=p){var v=_(0,i.col),h=i.col+u;h=Math.max(0,h),h=Math.min(T-1,h);var k=_(0,h);g=k.diff(v,"days")}c||(m=Math.round((a.position.top-o.top)/E))}(s!=l||c!=d||u!=p||m!=y)&&(c?(b=t.start.clone().stripTime().add("days",g),w=b.clone().add(G.defaultAllDayEventDuration)):(b=t.start.clone().add(m*S).add("days",g),w=K(t).add(m*S).add("days",g)),r(),l=s,d=c,p=u,y=m),e.draggable("option","revert",!s)},stop:function(n,a){$(),h("eventDragStop",e,t,n,a),s&&(c||g||m)?j(this,t,b,n,a):(s=!0,c=!1,u=0,g=0,m=0,r(),e.css("filter",""),e.css(o),P(t,e))}})}function u(t,e,n){var r,a,o,i=H(),s=O();e.resizable({handles:{s:".ui-resizable-handle"},grid:i,start:function(n,o){r=a=0,B(t,e),h("eventResizeStart",this,t,n,o)},resize:function(l,c){if(r=Math.round((Math.max(i,e.height())-c.originalSize.height)/i),r!=a){o=K(t).add(s*r);var d;d=r||t.end?J(t.start,o,v("timeFormat")):Q(t.start,v("timeFormat")),n.text(d),a=r}},stop:function(n,a){h("eventResizeStop",this,t,n,a),r?I(this,t,o,n,a):P(t,e)}})}var f=this;f.renderEvents=n,f.clearEvents=r,f.slotSegHtml=s,ye.call(f);var v=f.opt,h=f.trigger,g=f.isEventDraggable,b=f.isEventResizable,w=f.eventElementHandlers,D=f.setHeight,C=f.getDaySegmentContainer,E=f.getSlotSegmentContainer,S=f.getHoverListener,k=f.computeDateTop,x=f.getIsCellAllDay,M=f.colContentLeft,z=f.colContentRight,_=f.cellToDate,F=f.getColCnt,N=f.getColWidth,H=f.getSnapHeight,O=f.getSnapDuration,A=f.getSlotHeight,W=f.getSlotDuration,L=f.getSlotContainer,Z=f.reportEventElement,P=f.showEvents,B=f.hideEvents,j=f.eventDrop,I=f.eventResize,q=f.renderDayOverlay,$=f.clearOverlays,V=f.renderDayEvents,X=f.getMinTime,U=f.getMaxTime,G=f.calendar,Q=G.formatDate,J=G.formatRange,K=G.getEventEnd;f.draggableDayEvent=c}function se(t){var e,n=le(t),r=n[0];if(ce(n),r){for(e=0;r.length>e;e++)de(r[e]);for(e=0;r.length>e;e++)ue(r[e],0,0)}return fe(n)}function le(t){var e,n,r,a=[];for(e=0;t.length>e;e++){for(n=t[e],r=0;a.length>r&&ve(n,a[r]).length;r++);(a[r]||(a[r]=[])).push(n)}return a}function ce(t){var e,n,r,a,o;for(e=0;t.length>e;e++)for(n=t[e],r=0;n.length>r;r++)for(a=n[r],a.forwardSegs=[],o=e+1;t.length>o;o++)ve(a,t[o],a.forwardSegs)}function de(t){var e,n,r=t.forwardSegs,a=0;if(void 0===t.forwardPressure){for(e=0;r.length>e;e++)n=r[e],de(n),a=Math.max(a,1+n.forwardPressure);t.forwardPressure=a}}function ue(t,e,n){var r,a=t.forwardSegs;if(void 0===t.forwardCoord)for(a.length?(a.sort(pe),ue(a[0],e+1,n),t.forwardCoord=a[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),r=0;a.length>r;r++)ue(a[r],0,t.forwardCoord)}function fe(t){var e,n,r,a=[];for(e=0;t.length>e;e++)for(n=t[e],r=0;n.length>r;r++)a.push(n[r]);return a}function ve(t,e,n){n=n||[];for(var r=0;e.length>r;r++)he(t,e[r])&&n.push(e[r]);return n}function he(t,e){return t.end>e.start&&t.start<e.end}function pe(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||ge(t,e)}function ge(t,e){return t.start-e.start||e.end-e.start-(t.end-t.start)||(t.event.title||"").localeCompare(e.event.title)}function me(n,r,a){function o(e,n){var r=A[e];return t.isPlainObject(r)&&!i(e)?z(r,n||a):r}function s(t,e){return r.trigger.apply(r,[t,e||F].concat(Array.prototype.slice.call(arguments,2),[F]))}function l(t){var e=t.source||{};return O(t.startEditable,e.startEditable,o("eventStartEditable"),t.editable,e.editable,o("editable"))}function c(t){var e=t.source||{};return O(t.durationEditable,e.durationEditable,o("eventDurationEditable"),t.editable,e.editable,o("editable"))}function d(){Y={},H=[]}function u(t,e){H.push({event:t,element:e}),Y[t._id]?Y[t._id].push(e):Y[t._id]=[e]}function f(){t.each(H,function(t,e){F.trigger("eventDestroy",e.event,e.event,e.element)})}function v(t,e){e.click(function(n){return e.hasClass("ui-draggable-dragging")||e.hasClass("ui-resizable-resizing")?void 0:s("eventClick",this,t,n)}).hover(function(e){s("eventMouseover",this,t,e)},function(e){s("eventMouseout",this,t,e)})}function h(t,e){g(t,e,"show")}function p(t,e){g(t,e,"hide")}function g(t,e,n){var r,a=Y[t._id],o=a.length;for(r=0;o>r;r++)e&&a[r][0]==e[0]||a[r][n]()}function m(t,e,n,a,o){var i=r.mutateEvent(e,n,null);s("eventDrop",t,e,function(){i(),N(e._id)},a,o),N(e._id)}function y(t,e,n,a,o){var i=r.mutateEvent(e,null,n);s("eventResize",t,e,function(){i(),N(e._id)},a,o),N(e._id)}function b(t){return e.isMoment(t)&&(t=t.day()),P[t]}function w(){return L}function D(t,e,n){var r=t.clone();for(e=e||1;P[(r.day()+(n?e:0)+7)%7];)r.add("days",e);return r}function T(){var t=C.apply(null,arguments),e=E(t),n=S(e);return n}function C(t,e){var n=F.getColCnt(),r=I?-1:1,a=I?n-1:0;"object"==typeof t&&(e=t.col,t=t.row);var o=t*n+(e*r+a);return o}function E(t){var e=F.start.day();return t+=B[e],7*Math.floor(t/L)+j[(t%L+L)%L]-e}function S(t){return F.start.clone().add("days",t)}function k(t){var e=x(t),n=M(e),r=R(n);return r}function x(t){return t.clone().stripTime().diff(F.start,"days")}function M(t){var e=F.start.day();return t+=e,Math.floor(t/7)*L+B[(t%7+7)%7]-B[e]}function R(t){var e=F.getColCnt(),n=I?-1:1,r=I?e-1:0,a=Math.floor(t/e),o=(t%e+e)%e*n+r;return{row:a,col:o}}function _(t,e){var n=F.getRowCnt(),r=F.getColCnt(),a=[],o=x(t),i=x(e),s=+e.time();s&&s>=W&&i++,i=Math.max(i,o+1);for(var l=M(o),c=M(i)-1,d=0;n>d;d++){var u=d*r,f=u+r-1,v=Math.max(l,u),h=Math.min(c,f);if(h>=v){var p=R(v),g=R(h),m=[p.col,g.col].sort(),y=E(v)==o,b=E(h)+1==i;a.push({row:d,leftCol:m[0],rightCol:m[1],isStart:y,isEnd:b})}}return a}var F=this;F.element=n,F.calendar=r,F.name=a,F.opt=o,F.trigger=s,F.isEventDraggable=l,F.isEventResizable=c,F.clearEventData=d,F.reportEventElement=u,F.triggerEventDestroy=f,F.eventElementHandlers=v,F.showEvents=h,F.hideEvents=p,F.eventDrop=m,F.eventResize=y;var N=r.reportEventChange,Y={},H=[],A=r.options,W=e.duration(A.nextDayThreshold);F.isHiddenDay=b,F.skipHiddenDays=D,F.getCellsPerWeek=w,F.dateToCell=k,F.dateToDayOffset=x,F.dayOffsetToCellOffset=M,F.cellOffsetToCell=R,F.cellToDate=T,F.cellToCellOffset=C,F.cellOffsetToDayOffset=E,F.dayOffsetToDate=S,F.rangeToSegments=_;var L,Z=o("hiddenDays")||[],P=[],B=[],j=[],I=o("isRTL");(function(){o("weekends")===!1&&Z.push(0,6);for(var e=0,n=0;7>e;e++)B[e]=n,P[e]=-1!=t.inArray(e,Z),P[e]||(j[n]=e,n++);if(L=n,!L)throw"invalid hiddenDays"})()}function ye(){function e(t,e){var n=r(t,!1,!0);we(n,function(t,e){x(t.event,e)}),m(n,e),we(n,function(t,e){E("eventAfterRender",t.event,t.event,e)})}function n(t,e,n){var a=r([t],!0,!1),o=[];return we(a,function(t,r){t.row===e&&r.css("top",n),o.push(r[0])}),o}function r(e,n,r){var o,l,u=I(),f=n?t("<div/>"):u,v=a(e);return i(v),o=s(v),f[0].innerHTML=o,l=f.children(),n&&u.append(l),c(v,l),we(v,function(t,e){t.hsides=y(e,!0)}),we(v,function(t,e){e.width(Math.max(0,t.outerWidth-t.hsides))}),we(v,function(t,e){t.outerHeight=e.outerHeight(!0)}),d(v,r),v}function a(t){for(var e=[],n=0;t.length>n;n++){var r=o(t[n]);e.push.apply(e,r)}return e}function o(t){for(var e=U(t.start,ne(t)),n=0;e.length>n;n++)e[n].event=t;return e}function i(t){for(var e=C("isRTL"),n=0;t.length>n;n++){var r=t[n],a=(e?r.isEnd:r.isStart)?B:Z,o=(e?r.isStart:r.isEnd)?j:P,i=a(r.leftCol),s=o(r.rightCol);r.left=i,r.outerWidth=s-i}}function s(t){for(var e="",n=0;t.length>n;n++)e+=l(t[n]);return e}function l(t){var e="",n=C("isRTL"),r=t.event,a=r.url,o=["fc-event","fc-event-hori"];S(r)&&o.push("fc-event-draggable"),t.isStart&&o.push("fc-event-start"),t.isEnd&&o.push("fc-event-end"),o=o.concat(r.className),r.source&&(o=o.concat(r.source.className||[]));var i=Y(r,C);return e+=a?"<a href='"+R(a)+"'":"<div",e+=" class='"+o.join(" ")+"'"+" style="+"'"+"position:absolute;"+"left:"+t.left+"px;"+i+"'"+">"+"<div class='fc-event-inner'>",!r.allDay&&t.isStart&&(e+="<span class='fc-event-time'>"+R(re(r.start,C("timeFormat")))+"</span>"),e+="<span class='fc-event-title'>"+R(r.title||"")+"</span>"+"</div>",r.allDay&&t.isEnd&&k(r)&&(e+="<div class='ui-resizable-handle ui-resizable-"+(n?"w":"e")+"'>"+" "+"</div>"),e+="</"+(a?"a":"div")+">"}function c(e,n){for(var r=0;e.length>r;r++){var a=e[r],o=a.event,i=n.eq(r),s=E("eventRender",o,o,i);s===!1?i.remove():(s&&s!==!0&&(s=t(s).css({position:"absolute",left:a.left}),i.replaceWith(s),i=s),a.element=i)}}function d(t,e){var n,r=u(t),a=g(),o=[];if(e)for(n=0;a.length>n;n++)a[n].height(r[n]);for(n=0;a.length>n;n++)o.push(a[n].position().top);we(t,function(t,e){e.css("top",o[t.row]+t.top)})}function u(t){for(var e,n=A(),r=W(),a=[],o=f(t),i=0;n>i;i++){var s=o[i],l=[];for(e=0;r>e;e++)l.push(0);for(var c=0;s.length>c;c++){var d=s[c];for(d.top=M(l.slice(d.leftCol,d.rightCol+1)),e=d.leftCol;d.rightCol>=e;e++)l[e]=d.top+d.outerHeight}a.push(M(l))}return a}function f(t){var e,n,r,a=A(),o=[];for(e=0;t.length>e;e++)n=t[e],r=n.row,n.element&&(o[r]?o[r].push(n):o[r]=[n]);for(r=0;a>r;r++)o[r]=v(o[r]||[]);return o}function v(t){for(var e=[],n=h(t),r=0;n.length>r;r++)e.push.apply(e,n[r]);return e}function h(t){t.sort(De);for(var e=[],n=0;t.length>n;n++){for(var r=t[n],a=0;e.length>a&&be(r,e[a]);a++);e[a]?e[a].push(r):e[a]=[r]}return e}function g(){var t,e=A(),n=[];for(t=0;e>t;t++)n[t]=L(t).find("div.fc-day-content > div");return n}function m(t,e){var n=I();we(t,function(t,n,r){var a=t.event;a._id===e?b(a,n,t):n[0]._fci=r}),p(n,t,b)}function b(t,e,n){S(t)&&T.draggableDayEvent(t,e,n),t.allDay&&n.isEnd&&k(t)&&T.resizableDayEvent(t,e,n),z(t,e)}function w(t,e){var n,r,a=X();e.draggable({delay:50,opacity:C("dragOpacity"),revertDuration:C("dragRevertDuration"),start:function(o,i){E("eventDragStart",e,t,o,i),N(t,e),a.start(function(a,o,i,s){if(e.draggable("option","revert",!a||!i&&!s),$(),a){var l=G(o),c=G(a);n=c.diff(l,"days"),r=t.start.clone().add("days",n),q(r,ne(t).add("days",n))}else n=0},o,"drag")},stop:function(o,i){a.stop(),$(),E("eventDragStop",e,t,o,i),n?H(this,t,r,o,i):(e.css("filter",""),_(t,e))}})}function D(e,r,a){var o=C("isRTL"),i=o?"w":"e",s=r.find(".ui-resizable-"+i),l=!1;F(r),r.mousedown(function(t){t.preventDefault()}).click(function(t){l&&(t.preventDefault(),t.stopImmediatePropagation())}),s.mousedown(function(o){function s(n){E("eventResizeStop",this,e,n),t("body").css("cursor",""),f.stop(),$(),c&&O(this,e,d,n),setTimeout(function(){l=!1},0)}if(1==o.which){l=!0;var c,d,u,f=X(),v=r.css("top"),h=t.extend({},e),p=te(K(e.start));V(),t("body").css("cursor",i+"-resize").one("mouseup",s),E("eventResizeStart",this,e,o),f.start(function(r,o){if(r){var s=Q(o),l=Q(r);if(l=Math.max(l,p),c=J(l)-J(s),d=ne(e).add("days",c),c){h.end=d;var f=u;u=n(h,a.row,v),u=t(u),u.find("*").css("cursor",i+"-resize"),f&&f.remove(),N(e)}else u&&(_(e),u.remove(),u=null);$(),q(e.start,d)}},o)}})}var T=this;T.renderDayEvents=e,T.draggableDayEvent=w,T.resizableDayEvent=D;var C=T.opt,E=T.trigger,S=T.isEventDraggable,k=T.isEventResizable,x=T.reportEventElement,z=T.eventElementHandlers,_=T.showEvents,N=T.hideEvents,H=T.eventDrop,O=T.eventResize,A=T.getRowCnt,W=T.getColCnt,L=T.allDayRow,Z=T.colLeft,P=T.colRight,B=T.colContentLeft,j=T.colContentRight,I=T.getDaySegmentContainer,q=T.renderDayOverlay,$=T.clearOverlays,V=T.clearSelection,X=T.getHoverListener,U=T.rangeToSegments,G=T.cellToDate,Q=T.cellToCellOffset,J=T.cellOffsetToDayOffset,K=T.dateToDayOffset,te=T.dayOffsetToCellOffset,ee=T.calendar,ne=ee.getEventEnd,re=ee.formatDate}function be(t,e){for(var n=0;e.length>n;n++){var r=e[n];if(r.leftCol<=t.rightCol&&r.rightCol>=t.leftCol)return!0}return!1}function we(t,e){for(var n=0;t.length>n;n++){var r=t[n],a=r.element;a&&e(r,a,n)}}function De(t,e){return e.rightCol-e.leftCol-(t.rightCol-t.leftCol)||e.event.allDay-t.event.allDay||t.event.start-e.event.start||(t.event.title||"").localeCompare(e.event.title)}function Te(){function e(t,e){n(),t=i.moment(t),e=e?i.moment(e):c(t),d(t,e),r(t,e)}function n(t){f&&(f=!1,u(),l("unselect",null,t))}function r(t,e,n){f=!0,l("select",null,t,e,n)}function a(e){var a=o.cellToDate,i=o.getIsCellAllDay,l=o.getHoverListener(),c=o.reportDayClick;if(1==e.which&&s("selectable")){n(e);var f;l.start(function(t,e){u(),t&&i(t)?(f=[a(e),a(t)].sort(x),d(f[0],f[1].clone().add("days",1))):f=null},e),t(document).one("mouseup",function(t){l.stop(),f&&(+f[0]==+f[1]&&c(f[0],t),r(f[0],f[1].clone().add("days",1),t))})}}var o=this;o.select=e,o.unselect=n,o.reportSelection=r,o.daySelectionMousedown=a;var i=o.calendar,s=o.opt,l=o.trigger,c=o.defaultSelectionEnd,d=o.renderSelection,u=o.clearSelection,f=!1;s("selectable")&&s("unselectAuto")&&t(document).mousedown(function(e){var r=s("unselectCancel");r&&t(e.target).parents(r).length||n(e)})}function Ce(){function e(e,n){var r=o.shift();return r||(r=t("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>")),r[0].parentNode!=n[0]&&r.appendTo(n),a.push(r.css(e).show()),r}function n(){for(var t;t=a.shift();)o.push(t.hide().unbind())}var r=this;r.renderOverlay=e,r.clearOverlays=n;var a=[],o=[]}function Ee(t){var e,n,r=this;r.build=function(){e=[],n=[],t(e,n)},r.cell=function(t,r){var a,o=e.length,i=n.length,s=-1,l=-1;for(a=0;o>a;a++)if(r>=e[a][0]&&e[a][1]>r){s=a;break}for(a=0;i>a;a++)if(t>=n[a][0]&&n[a][1]>t){l=a;break}return s>=0&&l>=0?{row:s,col:l}:null},r.rect=function(t,r,a,o,i){var s=i.offset();return{top:e[t][0]-s.top,left:n[r][0]-s.left,width:n[o][1]-n[r][0],height:e[a][1]-e[t][0]}}}function Se(e){function n(t){ke(t);var n=e.cell(t.pageX,t.pageY);(Boolean(n)!==Boolean(i)||n&&(n.row!=i.row||n.col!=i.col))&&(n?(o||(o=n),a(n,o,n.row-o.row,n.col-o.col)):a(n,o),i=n)}var r,a,o,i,s=this;s.start=function(s,l,c){a=s,o=i=null,e.build(),n(l),r=c||"mousemove",t(document).bind(r,n)},s.stop=function(){return t(document).unbind(r,n),i}}function ke(t){void 0===t.pageX&&(t.pageX=t.originalEvent.pageX,t.pageY=t.originalEvent.pageY)}function xe(t){function e(e){return r[e]=r[e]||t(e)}var n=this,r={},a={},o={};n.left=function(t){return a[t]=void 0===a[t]?e(t).position().left:a[t]},n.right=function(t){return o[t]=void 0===o[t]?n.left(t)+e(t).width():o[t]},n.clear=function(){r={},a={},o={}}}var Me={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",titleFormat:{month:"MMMM YYYY",week:"ll",day:"LL"},columnFormat:{month:"ddd",week:r,day:"dddd"},timeFormat:{"default":n},isRTL:!1,buttonText:{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},ze={en:{columnFormat:{week:"ddd M/D"}}},Re={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"}},_e=t.fullCalendar={version:"2.0.0-beta2"},Fe=_e.views={};t.fn.fullCalendar=function(e){var n=Array.prototype.slice.call(arguments,1),r=this;return this.each(function(a,o){var i,l=t(o),c=l.data("fullCalendar");"string"==typeof e?c&&t.isFunction(c[e])&&(i=c[e].apply(c,n),a||(r=i),"destroy"===e&&l.removeData("fullCalendar")):c||(c=new s(l,e),l.data("fullCalendar",c),c.render())}),r},_e.langs=ze,_e.datepickerLang=function(e,n,r){var a=ze[e];a||(a=ze[e]={}),o(a,{isRTL:r.isRTL,weekNumberTitle:r.weekHeader,titleFormat:{month:r.showMonthAfterYear?"YYYY["+r.yearSuffix+"] MMMM":"MMMM YYYY["+r.yearSuffix+"]"},buttonText:{prev:_(r.prevText),next:_(r.nextText),today:_(r.currentText)}}),t.datepicker&&(t.datepicker.regional[n]=t.datepicker.regional[e]=r,t.datepicker.regional.en=t.datepicker.regional[""],t.datepicker.setDefaults(r))},_e.lang=function(t,e){var n;e&&(n=ze[t],n||(n=ze[t]={}),o(n,e||{})),Me.lang=t},_e.sourceNormalizers=[],_e.sourceFetchers=[];var Ne={dataType:"json",cache:!1},Ye=1;_e.applyAll=H;var He=["sun","mon","tue","wed","thu","fri","sat"],Oe=/^\s*\d{4}-\d\d$/,Ae=/^\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+)?)?)?)?)?$/;_e.moment=function(){return A(arguments)},_e.moment.utc=function(){return A(arguments,!0)},_e.moment.parseZone=function(){return A(arguments,!0,!0)},W.prototype=u(e.fn),W.prototype.clone=function(){return A([this])},W.prototype.time=function(t){return null==t?e.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}):(delete this._ambigTime,e.isDuration(t)||e.isMoment(t)||(t=e.duration(t)),this.hours(t.hours()+24*t.days()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds()))},W.prototype.stripTime=function(){var t=this.toArray();return e.fn.utc.call(this),this._ambigTime=!0,this._ambigZone=!0,this.year(t[0]).month(t[1]).date(t[2]).hours(0).minutes(0).seconds(0).milliseconds(0),this},W.prototype.hasTime=function(){return!this._ambigTime},W.prototype.stripZone=function(){var t=this.toArray();return e.fn.utc.call(this),this._ambigZone=!0,this.year(t[0]).month(t[1]).date(t[2]).hours(t[3]).minutes(t[4]).seconds(t[5]).milliseconds(t[6]),this},W.prototype.hasZone=function(){return!this._ambigZone},W.prototype.zone=function(t){return null!=t&&delete this._ambigZone,e.fn.zone.apply(this,arguments)},W.prototype.local=function(){return delete this._ambigZone,e.fn.local.apply(this,arguments)},W.prototype.utc=function(){return delete this._ambigZone,e.fn.utc.apply(this,arguments)},W.prototype.format=function(){return arguments[0]?B(this,arguments[0]):this._ambigTime?P(this,"YYYY-MM-DD"):this._ambigZone?P(this,"YYYY-MM-DD[T]HH:mm:ss"):P(this)},W.prototype.toISOString=function(){return this._ambigTime?P(this,"YYYY-MM-DD"):this._ambigZone?P(this,"YYYY-MM-DD[T]HH:mm:ss"):e.fn.toISOString.apply(this,arguments)},W.prototype.isWithin=function(t,e){var n=Z([this,t,e]);return n[0]>=n[1]&&n[0]<n[2]},t.each(["isBefore","isAfter","isSame"],function(t,n){W.prototype[n]=function(t,r){var a=Z([this,t]);return e.fn[n].call(a[0],a[1],r)}});var We={t:function(t){return P(t,"a").charAt(0)},T:function(t){return P(t,"A").charAt(0)}};_e.formatRange=q;var Le={Y:"year",M:"month",D:"day",d:"day"},Ze={};Fe.month=G,Fe.basicWeek=Q,Fe.basicDay=J,a({weekMode:"fixed"}),Fe.agendaWeek=ee,Fe.agendaDay=ne,a({allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",axisFormat:re,timeFormat:{agenda:ae},dragOpacity:{agenda:.5},minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0})});