!function(t){"function"==typeof define&&define.amd?define(["jquery","moment"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment")):t(jQuery,moment)}(function(z,G){var L=z.fullCalendar={version:"2.3.1"},d=L.views={};z.fn.fullCalendar=function(s){var o=Array.prototype.slice.call(arguments,1),l=this;return this.each(function(t,e){var n,i=z(e),r=i.data("fullCalendar");"string"==typeof s?r&&z.isFunction(r[s])&&(n=r[s].apply(r,o),t||(l=n),"destroy"===s&&i.removeData("fullCalendar")):r||(r=new L.CalendarBase(i,s),i.data("fullCalendar",r),r.render())}),l};var l=["header","buttonText","buttonIcons","themeButtonIcons"];function h(){var t,e,n,i,r,s=Array.prototype.slice.call(arguments),o={};for(t=0;t *").each(function(t,e){var n=z(e).outerWidth();it[0].clientHeight)return 1;a(t)}function a(t){t.height("").removeClass("fc-scroller")}function p(t){var e=t.css("position"),n=t.parents().filter(function(){var t=z(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&n.length?n:z(t[0].ownerDocument||document)}function v(t){var e=t.offset();return{left:e.left,right:e.left+t.outerWidth(),top:e.top,bottom:e.top+t.outerHeight()}}function e(t){var e=t.offset(),n=u(t),i=e.left+m(t,"border-left-width")+n.left,r=e.top+m(t,"border-top-width")+n.top;return{left:i,right:i+t[0].clientWidth,top:r,bottom:r+t[0].clientHeight}}function u(t){var e=t.innerWidth()-t[0].clientWidth,n={left:0,right:0,top:0,bottom:t.innerHeight()-t[0].clientHeight};return!function(){null===c&&(c=function(){var t=z("
").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),e=t.children().offset().left>t.offset().left;return t.remove(),e}());return c}()||"rtl"!=t.css("direction")?n.right=e:n.left=e,n}L.intersectionToSeg=w,L.applyAll=A,L.debounce=I,L.isInt=B,L.htmlEscape=R,L.cssToStr=F,L.proxy=Y,L.getClientRect=e,L.getContentRect=function(t){var e=t.offset(),n=e.left+m(t,"border-left-width")+m(t,"padding-left"),i=e.top+m(t,"border-top-width")+m(t,"padding-top");return{left:n,right:n+t.width(),top:i,bottom:i+t.height()}},L.getScrollbarWidths=u;var c=null;function m(t,e){return parseFloat(t.css(e))||0}function y(t){return 1==t.which&&!t.ctrlKey}function w(t,e){var n,i,r,s,o=t.start,l=t.end,a=e.start,u=e.end;if(a/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function M(t){return t.replace(/&.*?;/g,"")}function F(t){var n=[];return z.each(t,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function N(t,e){return t-e}function B(t){return t%1==0}function Y(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function I(e,n){var i,r,s,o,l=function(){var t=new Date-o;t=n[1]&&n[0]').addClass(e.className||"").css({top:0,left:0}).append(e.content).appendTo(e.parentEl),this.el.on("click",".fc-close",function(){t.hide()}),e.autoHide&&z(document).on("mousedown",this.documentMousedownProxy=Y(this,"documentMousedown"))},documentMousedown:function(t){this.el&&!z(t.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),z(document).off("mousedown",this.documentMousedownProxy)},position:function(){var t,e,n,i,r,s=this.options,o=this.el.offsetParent().offset(),l=this.el.outerWidth(),a=this.el.outerHeight(),u=z(window),c=p(this.el);i=s.top||0,r=void 0!==s.left?s.left:void 0!==s.right?s.right-l:0,e=c.is(window)||c.is(document)?(c=u,t=0):(t=(n=c.offset()).top,n.left),t+=u.scrollTop(),e+=u.scrollLeft(),!1!==s.viewportConstrain&&(i=Math.min(i,t+c.outerHeight()-a-this.margin),i=Math.max(i,t+this.margin),r=Math.min(r,e+c.outerWidth()-l-this.margin),r=Math.max(r,e+this.margin)),this.el.css({top:i-o.top,left:r-o.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),ht=ct.extend({grid:null,rowCoords:null,colCoords:null,containerEl:null,bounds:null,constructor:function(t){this.grid=t},build:function(){this.rowCoords=this.grid.computeRowCoords(),this.colCoords=this.grid.computeColCoords(),this.computeBounds()},clear:function(){this.rowCoords=null,this.colCoords=null},getCell:function(t,e){var n,i,r,s=this.rowCoords,o=s.length,l=this.colCoords,a=l.length,u=null,c=null;if(this.inBounds(t,e)){for(n=0;n=(i=s[n]).top&&e=(i=l[n]).left&&t=n.left&&t=n.top&&e=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):0=t[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.scrollStop())},scrollHandler:function(){this.scrollIntervalId||this.scrollStop()},scrollStop:function(){}}),pt=gt.extend({coordMap:null,origCell:null,cell:null,coordAdjust:null,constructor:function(t,e){gt.prototype.constructor.call(this,e),this.coordMap=t},listenStart:function(t){var e,n,i,r,s,o,l,a,u,c,d,h=this.subjectEl;gt.prototype.listenStart.apply(this,arguments),this.computeCoords(),t?(i=n={left:t.pageX,top:t.pageY},h&&(e=v(h),c=i,d=e,i={left:Math.min(Math.max(c.left,d.left),d.right),top:Math.min(Math.max(c.top,d.top),d.bottom)}),this.origCell=this.getCell(i.left,i.top),h&&this.options.subjectCenter&&(this.origCell&&(l=this.origCell,a=e,e=(u={left:Math.max(l.left,a.left),right:Math.min(l.right,a.right),top:Math.max(l.top,a.top),bottom:Math.min(l.bottom,a.bottom)}).left",constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL")},rowHtml:function(t,e){var n,i=this.getHtmlRenderer("cell",t),r="";for(e=e||0,n=0;n"+(r=this.bookendCells(r,t,e))+""},bookendCells:function(t,e,n){var i=this.getHtmlRenderer("intro",e)(n||0),r=this.getHtmlRenderer("outro",e)(n||0),s=this.isRTL?r:i,o=this.isRTL?i:r;return"string"==typeof t?s+t+o:t.prepend(s).append(o)},getHtmlRenderer:function(t,e){var n,i,r,s,o,l=this.view;return n=t+"Html",e&&(i=e+((o=t).charAt(0).toUpperCase()+o.slice(1))+"Html"),i&&(s=l[i])?r=l:i&&(s=this[i])?r=this:(s=l[n])?r=l:(s=this[n])&&(r=this),"function"==typeof s?function(){return s.apply(r,arguments)||""}:function(){return s||""}}}),wt=L.Grid=yt.extend({start:null,end:null,rowCnt:0,colCnt:0,rowData:null,colData:null,el:null,coordMap:null,elsByFill:null,externalDragStartProxy:null,colHeadFormat:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,cellDuration:null,largeUnit:null,constructor:function(){yt.apply(this,arguments),this.coordMap=new ht(this),this.elsByFill={},this.externalDragStartProxy=Y(this,"externalDragStart")},computeColHeadFormat:function(){},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){var e,n,i=this.view;this.start=t.start.clone(),this.end=t.end.clone(),this.rowData=[],this.colData=[],this.updateCells(),this.colHeadFormat=i.opt("columnFormat")||this.computeColHeadFormat(),this.eventTimeFormat=i.opt("eventTimeFormat")||i.opt("timeFormat")||this.computeEventTimeFormat(),null==(e=i.opt("displayEventTime"))&&(e=this.computeDisplayEventTime()),null==(n=i.opt("displayEventEnd"))&&(n=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=n},updateCells:function(){},rangeToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?P(t,e,this.largeUnit):_(t,e)},getCell:function(t,e){var n;return null==e&&(t="number"==typeof t?(e=t%this.colCnt,Math.floor(t/this.colCnt)):(e=t.col,t.row)),n={row:t,col:e},z.extend(n,this.getRowData(t),this.getColData(e)),z.extend(n,this.computeCellRange(n)),n},computeCellRange:function(t){var e=this.computeCellDate(t);return{start:e,end:e.clone().add(this.cellDuration)}},computeCellDate:function(t){},getRowData:function(t){return this.rowData[t]||{}},getColData:function(t){return this.colData[t]||{}},getRowEl:function(t){},getColEl:function(t){},getCellDayEl:function(t){return this.getColEl(t.col)||this.getRowEl(t.row)},computeRowCoords:function(){var t,e,n,i=[];for(t=0;t"},headHtml:function(){return'
'+this.rowHtml("head")+"
"},headCellHtml:function(t){var e=this.view,n=t.start;return''+R(n.format(this.colHeadFormat))+""},bgCellHtml:function(t){var e=this.view,n=t.start,i=this.getDayClasses(n);return i.unshift("fc-day",e.widgetContentClass),''},getDayClasses:function(t){var e=this.view,n=e.calendar.getNow().stripTime(),i=["fc-"+E[t.day()]];return 1==e.intervalDuration.as("months")&&t.month()!=e.intervalStart.month()&&i.push("fc-other-month"),t.isSame(n,"day")?i.push("fc-today",e.highlightStateClass):t *",function(t){var e=z(this).data("fc-seg");if(e&&!i.isDraggingSeg&&!i.isResizingSeg)return n.call(this,e,t)})})},triggerSegMouseover:function(t,e){this.mousedOverSeg||(this.mousedOverSeg=t,this.view.trigger("eventMouseover",t.el[0],t.event,e))},triggerSegMouseout:function(t,e){e=e||{},this.mousedOverSeg&&(t=t||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger("eventMouseout",t.el[0],t.event,e))},segDragMousedown:function(i,t){var r,s=this,o=this.view,l=o.calendar,e=i.el,a=i.event,u=new mt(i.el,{parentEl:o.el,opacity:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2});new pt(o.coordMap,{distance:5,scroll:o.opt("dragScroll"),subjectEl:e,subjectCenter:!0,listenStart:function(t){u.hide(),u.start(t)},dragStart:function(t){s.triggerSegMouseout(i,t),s.segDragStart(i,t),o.hideEvent(a)},cellOver:function(t,e,n){i.cell&&(n=i.cell),(r=s.computeEventDrop(n,t,a))&&!l.isEventRangeAllowed(r,a)&&(f(),r=null),r&&o.renderDrag(r,i)?u.hide():u.show(),e&&(r=null)},cellOut:function(){o.destroyDrag(),u.show(),r=null},cellDone:function(){g()},dragStop:function(t){u.stop(!r,function(){o.destroyDrag(),o.showEvent(a),s.segDragStop(i,t),r&&o.reportEventDrop(a,r,this.largeUnit,e,t)})},listenStop:function(){u.stop()}}).mousedown(t)},segDragStart:function(t,e){this.isDraggingSeg=!0,this.view.trigger("eventDragStart",t.el[0],t.event,e,{})},segDragStop:function(t,e){this.isDraggingSeg=!1,this.view.trigger("eventDragStop",t.el[0],t.event,e,{})},computeEventDrop:function(t,e,n){var i,r,s=this.view.calendar,o=t.start,l=e.start;return o.hasTime()===l.hasTime()?(i=this.diffDates(l,o),n.allDay&&C(i)?(r={start:n.start.clone(),end:s.getEventEnd(n),allDay:!1},s.normalizeEventRangeTimes(r)):r={start:n.start.clone(),end:n.end?n.end.clone():null,allDay:n.allDay},r.start.add(i),r.end&&r.end.add(i)):r={start:l.clone(),end:null,allDay:!l.hasTime()},r},applyDragOpacity:function(t){var n=this.view.opt("dragOpacity");null!=n&&t.each(function(t,e){e.style.opacity=n})},externalDragStart:function(t,e){var n,i,r=this.view;r.opt("droppable")&&(n=z((e?e.item:null)||t.target),i=r.opt("dropAccept"),(z.isFunction(i)?i.call(n[0],n):n.is(i))&&(this.isDraggingExternal||this.listenToExternalDrag(n,t,e)))},listenToExternalDrag:function(t,e,n){var i,r=this,s=function(t){var e,n,i,r,s=L.dataAttrPrefix;s&&(s+="-");(e=t.data(s+"event")||null)&&(e="object"==typeof e?z.extend({},e):{},null==(n=e.start)&&(n=e.time),i=e.duration,r=e.stick,delete e.start,delete e.time,delete e.duration,delete e.stick);null==n&&(n=t.data(s+"start"));null==n&&(n=t.data(s+"time"));null==i&&(i=t.data(s+"duration"));null==r&&(r=t.data(s+"stick"));return n=null!=n?G.duration(n):null,i=null!=i?G.duration(i):null,r=Boolean(r),{eventProps:e,startTime:n,duration:i,stick:r}}(t);new pt(this.coordMap,{listenStart:function(){r.isDraggingExternal=!0},cellOver:function(t){(i=r.computeExternalDrop(t,s))?r.renderDrag(i):f()},cellOut:function(){i=null,r.destroyDrag(),g()},dragStop:function(){r.destroyDrag(),g(),i&&r.view.reportExternalDrop(s,i,t,e,n)},listenStop:function(){r.isDraggingExternal=!1}}).startDrag(e)},computeExternalDrop:function(t,e){var n={start:t.start.clone(),end:null};return e.startTime&&!n.start.hasTime()&&n.start.time(e.startTime),e.duration&&(n.end=n.start.clone().add(e.duration)),this.view.calendar.isExternalDropRangeAllowed(n,e.eventProps)?n:null},renderDrag:function(t,e){},destroyDrag:function(){},segResizeMousedown:function(i,t,r){var s,o=this,l=this.view,a=l.calendar,e=i.el,u=i.event,c=a.getEventEnd(u);new pt(this.coordMap,{distance:5,scroll:l.opt("dragScroll"),subjectEl:e,dragStart:function(t){o.triggerSegMouseout(i,t),o.segResizeStart(i,t)},cellOver:function(t,e,n){(s=r?o.computeEventStartResize(n,t,u):o.computeEventEndResize(n,t,u))&&(a.isEventRangeAllowed(s,u)?s.start.isSame(u.start)&&s.end.isSame(c)&&(s=null):(f(),s=null)),s&&(l.hideEvent(u),o.renderEventResize(s,i))},cellOut:function(){s=null},cellDone:function(){o.destroyEventResize(),l.showEvent(u),g()},dragStop:function(t){o.segResizeStop(i,t),s&&l.reportEventResize(u,s,this.largeUnit,e,t)}}).mousedown(t)},segResizeStart:function(t,e){this.isResizingSeg=!0,this.view.trigger("eventResizeStart",t.el[0],t.event,e,{})},segResizeStop:function(t,e){this.isResizingSeg=!1,this.view.trigger("eventResizeStop",t.el[0],t.event,e,{})},computeEventStartResize:function(t,e,n){return this.computeEventResize("start",t,e,n)},computeEventEndResize:function(t,e,n){return this.computeEventResize("end",t,e,n)},computeEventResize:function(t,e,n,i){var r,s,o=this.view.calendar,l=this.diffDates(n[t],e[t]);return(r={start:i.start.clone(),end:o.getEventEnd(i),allDay:i.allDay}).allDay&&C(l)&&(r.allDay=!1,o.normalizeEventRangeTimes(r)),r[t].add(l),r.start.isBefore(r.end)||(s=i.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration,this.cellDuration&&this.cellDurationu&&l.push({event:a,start:u,end:n.start}),u=n.end;return u
'+this.rowHtml("day",t)+'
'+(this.numbersVisible?""+this.rowHtml("number",t)+"":"")+"
"},dayCellHtml:function(t){return this.bgCellHtml(t)},computeColHeadFormat:function(){return 1=e.length?e[e.length-1]+1:e[n]},renderDrag:function(t,e){if(this.renderHighlight(this.view.calendar.ensureVisibleEventRange(t)),e&&!e.el.closest(this.el).length)return this.renderRangeHelper(t,e),this.applyDragOpacity(this.helperEls),!0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderEventResize:function(t,e){this.renderHighlight(t),this.renderRangeHelper(t,e)},destroyEventResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(t,s){var o,l=[],e=this.eventsToSegs([t]);e=this.renderFgSegEls(e),o=this.renderSegRows(e),this.rowEls.each(function(t,e){var n,i=z(e),r=z('
');n=s&&s.row===t?s.el.position().top:i.find(".fc-content-skeleton tbody").position().top,r.css("top",n).find("table").append(o[t].tbodyEl),i.append(r),l.push(r[0])}),this.helperEls=z(l)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(t,e,n){var i,r,s,o=[];for(e=this.renderFillSegEls(t,e),i=0;i
')).find("tr"),0'),r.append(e.el.attr("colspan",l-o)),l'),this.bookendCells(r,t),i}});function Ct(t,e){var n,i;for(n=0;n=t.leftCol)return 1}function Tt(t,e){return t.leftCol-e.leftCol}Dt.mixin({rowStructs:null,destroyEvents:function(){this.destroySegPopover(),wt.prototype.destroyEvents.apply(this,arguments)},getEventSegs:function(){return wt.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(t){var e=z.grep(t,function(t){return t.event.allDay});return wt.prototype.renderBgSegs.call(this,e)},renderFgSegs:function(t){var n;return t=this.renderFgSegEls(t),n=this.rowStructs=this.renderSegRows(t),this.rowEls.each(function(t,e){z(e).find(".fc-content-skeleton > table").append(n[t].tbodyEl)}),t},destroyFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n'+R(n)+""),i=''+(R(s.title||"")||" ")+"",'
'+(this.isRTL?i+" "+d:d+" "+i)+"
"+(l?'
':"")+(a?'
':"")+""},renderSegRow:function(t,e){var n,i,r,s,o,l,a,u=this.colCnt,c=this.buildSegLevels(e),d=Math.max(1,c.length),h=z(""),f=[],g=[],p=[];function v(t){for(;r"),s.append(a)),g[n][r]=a,p[n][r]=a,r++}for(n=0;n"),f.push([]),g.push([]),p.push([]),i)for(o=0;o').append(l.el),l.leftCol!=l.rightCol?a.attr("colspan",l.rightCol-l.leftCol+1):p[n][r]=a;r<=l.rightCol;)g[n][r]=a,f[n][r]=l,r++;s.append(a)}v(u),this.bookendCells(s,"eventSkeleton"),h.append(s)}return{row:t,tbodyEl:h,cellMatrix:g,segMatrix:f,segLevels:c,segs:e}},buildSegLevels:function(t){var e,n,i,r=[];for(t.sort(bt),e=0;e td > :first-child").each(o),n.position().top+i>r)return e;return!1},limitRow:function(e,n){var i,t,r,s,o,l,a,u,c,d,h,f,g,p,v,m,y=this,w=this.rowStructs[e],E=[],S=0;function b(t){for(;S").append(m),d.append(v),E.push(v[0])),S++}if(n&&n').attr("rowspan",h),a=c[g],i=this.getCell(e,l.leftCol+g),m=this.renderMoreLink(i,[l].concat(a)),v=z("
").append(m),p.append(v),f.push(p[0]),E.push(p[0]);d.addClass("fc-limited").after(z(f)),s.push(d[0])}}b(this.colCnt),w.moreEls=z(E),w.limitedEls=z(s)}},unlimitRow:function(t){var e=this.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},renderMoreLink:function(a,u){var c=this,d=this.view;return z('').text(this.getMoreLinkText(u.length)).on("click",function(t){var e=d.opt("eventLimitClick"),n=a.start,i=z(this),r=c.getCellDayEl(a),s=c.getCellSegs(a),o=c.resliceDaySegs(s,n),l=c.resliceDaySegs(u,n);"function"==typeof e&&(e=d.trigger("eventLimitClick",null,{date:n,dayEl:r,moreEl:i,segs:o,hiddenSegs:l},t)),"popover"===e?c.showSegPopover(a,i,o):"string"==typeof e&&d.calendar.zoomTo(n,e)})},showSegPopover:function(t,e,n){var i,r,s=this,o=this.view,l=e.parent();i=1==this.rowCnt?o.el:this.rowEls.eq(t.row),r={className:"fc-more-popover",content:this.renderSegPopoverContent(t,n),parentEl:this.el,top:i.offset().top,autoHide:!0,viewportConstrain:o.opt("popoverViewportConstrain"),hide:function(){s.segPopover.destroy(),s.segPopover=null,s.popoverSegs=null}},this.isRTL?r.right=l.offset().left+l.outerWidth()+1:r.left=l.offset().left-1,this.segPopover=new dt(r),this.segPopover.show()},renderSegPopoverContent:function(t,e){var n,i=this.view,r=i.opt("theme"),s=t.start.format(i.opt("dayPopoverFormat")),o=z('
'+R(s)+'
'),l=o.find(".fc-event-container");for(e=this.renderFgSegEls(e,!0),this.popoverSegs=e,n=0;n'+this.rowHtml("slotBg")+'
'+this.slatRowHtml()+"
"},slotBgCellHtml:function(t){return this.bgCellHtml(t)},slatRowHtml:function(){for(var t,e,n,i=this.view,r=this.isRTL,s="",o=this.slotDuration.asMinutes()%15==0,l=G.duration(+this.minTime);l"+(o&&e?"":""+R(t.format(this.axisFormat))+"")+"",s+=""+(r?"":n)+''+(r?n:"")+"",l.add(this.slotDuration);return s},processOptions:function(){var t=this.view,e=t.opt("slotDuration"),n=t.opt("snapDuration");e=G.duration(e),n=n?G.duration(n):e,this.slotDuration=e,this.snapDuration=n,this.cellDuration=n,this.minTime=G.duration(t.opt("minTime")),this.maxTime=G.duration(t.opt("maxTime")),this.axisFormat=t.opt("axisFormat")||t.opt("smallTimeFormat")},computeColHeadFormat:function(){return 1').append(n).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderRangeHelper(t):this.renderHighlight(t)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderFill:function(t,e,n){var i,r,s,o,l,a,u,c,d,h;if(e.length){for(e=this.renderFillSegEls(t,e),i=this.groupSegCols(e),n=n||t.toLowerCase(),s=(r=z('
')).find("tr"),o=0;o").appendTo(s),l.length)for(u=z('
').appendTo(a),c=this.colData[o].day,d=0;ds.top&&r.top').append(this.renderSegTable(t))),t},destroyFgSegs:function(t){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(t){var e,n,i,r,s,o,l=z("
"),a=l.find("tr");for(e=this.groupSegCols(t),this.computeSegVerticals(t),r=0;r'),n=0;n").append(o))}return this.bookendCells(a,"eventSkeleton"),l},updateSegVerticals:function(){var t,e=(this.segs||[]).concat(this.businessHourSegs||[]);for(this.computeSegVerticals(e),t=0;t
'+(n?'
'+R(n)+"
":"")+(o.title?'
'+R(o.title)+"
":"")+'
'+(u?'
':"")+""},generateSegPositionCss:function(t){var e,n,i=this.view.opt("slotEventOverlap"),r=t.backwardCoord,s=t.forwardCoord,o=this.generateSegVerticalCss(t);return i&&(s=Math.min(1,r+2*(s-r))),n=this.isRTL?(e=1-s,r):(e=r,1-s),o.zIndex=t.level+1,o.left=100*e+"%",o.right=100*n+"%",i&&t.forwardPressure&&(o[this.isRTL?"marginLeft":"marginRight"]=20),o},generateSegVerticalCss:function(t){return{top:t.top,bottom:-t.bottom}},groupSegCols:function(t){var e,n=[];for(e=0;e=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return 1").prependTo(t),o=i.header=new Nt(i,n),(l=o.render())&&t.prepend(l);E(n.defaultView),n.handleWindowResize&&(d=I(C,n.windowResizeDelay),z(window).resize(d))}()},i.destroy=function(){u&&u.removeElement();o.destroy(),a.remove(),t.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),d&&z(window).unbind("resize",d)},i.refetchEvents=function(){x(),u.clearEvents(),R(),H()},i.reportEvents=function(t){y=t,T()},i.reportEventChange=function(){T()},i.rerenderEvents=T,i.changeView=E,i.select=function(t,e){t=i.moment(t),e=e?i.moment(e):t.hasTime()?t.clone().add(i.defaultTimedEventDuration):t.clone().add(i.defaultAllDayEventDuration);u.select({start:t,end:e})},i.unselect=function(){u&&u.unselect()},i.prev=function(){h=u.computePrevDate(h),E()},i.next=function(){h=u.computeNextDate(h),E()},i.prevYear=function(){h.add(-1,"years"),E()},i.nextYear=function(){h.add(1,"years"),E()},i.today=function(){h=i.getNow(),E()},i.gotoDate=function(t){h=i.moment(t),E()},i.incrementDate=function(t){h.add(G.duration(t)),E()},i.zoomTo=function(t,e){var n;e=e||"day",n=i.getViewSpec(e)||i.getUnitViewSpec(e),h=t,E(n?n.type:null)},i.getDate=function(){return h.clone()},i.getCalendar=function(){return i},i.getView=function(){return u},i.option=function(t,e){if(void 0===e)return n[t];"height"!=t&&"contentHeight"!=t&&"aspectRatio"!=t||(n[t]=e,S(!0))},i.trigger=function(t,e){if(n[t])return n[t].apply(e||p,Array.prototype.slice.call(arguments,2))};var r=k(Ot(n.lang));n.monthNames&&(r._months=n.monthNames);n.monthNamesShort&&(r._monthsShort=n.monthNamesShort);n.dayNames&&(r._weekdays=n.dayNames);n.dayNamesShort&&(r._weekdaysShort=n.dayNamesShort);if(null!=n.firstDay){var s=k(r._week);s.dow=n.firstDay,r._week=s}r._fullCalendar_weekCalc=function(t){return"function"==typeof t||"local"===t?t:"iso"===t||"ISO"===t?"ISO":void 0}(n.weekNumberCalculation),i.defaultAllDayEventDuration=G.duration(n.defaultAllDayEventDuration),i.defaultTimedEventDuration=G.duration(n.defaultTimedEventDuration),i.moment=function(){var t;return"local"===n.timezone?(t=L.moment.apply(null,arguments)).hasTime()&&t.local():t="UTC"===n.timezone?L.moment.utc.apply(null,arguments):L.moment.parseZone.apply(null,arguments),"_locale"in t?t._locale=r:t._lang=r,t},i.getIsAmbigTimezone=function(){return"local"!==n.timezone&&"UTC"!==n.timezone},i.rezoneDate=function(t){return i.moment(t.toArray())},i.getNow=function(){var t=n.now;return"function"==typeof t&&(t=t()),i.moment(t)},i.getEventEnd=function(t){return t.end?t.end.clone():i.getDefaultEventEnd(t.allDay,t.start)},i.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(i.defaultAllDayEventDuration):n.add(i.defaultTimedEventDuration),i.getIsAmbigTimezone()&&n.stripZone(),n},i.humanizeDuration=function(t){return(t.locale||t.lang).call(t,n.lang).humanize()},function(v){var w=this;w.isFetchNeeded=function(t,e){return!m||t.clone().stripZone()y.clone().stripZone()},w.fetchEvents=function(t,e){m=t,y=e,c=[];var n=++a,i=s.length;u=i;for(var r=0;r=h&&d.end<=f){s=!0;break}if(!s)return!1}for(o=w.getPeerEvents(i,t),l=0;lm){if(!1===n)return!1;if("function"==typeof n&&!n(a,i))return!1;if(i){if(!1===(u=O(a.overlap,(a.source||{}).overlap)))return!1;if("function"==typeof u&&!u(i,a))return!1}}return!0}z.each((v.events?[v.events]:[]).concat(v.eventSources||[]),function(t,e){var n=i(e);n&&s.push(n)}),w.getBusinessHoursEvents=R,w.isEventRangeAllowed=k,w.isSelectionRangeAllowed=M,w.isExternalDropRangeAllowed=function(t,e){var n;return e&&(n=H(D(z.extend({},e,t)))[0]),n?k(t,n):M(t=T(t))},w.getEventCache=function(){return c}}.call(i,n);var o,l,a,u,c,d,h,f=i.isFetchNeeded,g=i.fetchEvents,p=t[0],v={},m=0,y=[];h=null!=n.defaultDate?i.moment(n.defaultDate):i.getNow();function w(){return t.is(":visible")}function E(t){m++,u&&t&&u.type!==t&&(o.deactivateButton(u.type),x(),u.removeElement(),u=i.view=null),!u&&t&&((u=i.view=v[t]||(v[t]=i.instantiateView(t))).setElement(z("
").appendTo(a)),o.activateButton(t)),u&&(h=u.massageCurrentDate(h),u.isDisplayed&&h.isWithin(u.intervalStart,u.intervalEnd)||w()&&(x(),u.display(h),R(),o.updateTitle(u.title),i.getNow().isWithin(u.intervalStart,u.intervalEnd)?o.disableButton("today"):o.enableButton("today"),(!n.lazyFetching||f(u.start,u.end)?H:T)())),R(),m--}function S(t){return w()&&(t&&D(),m++,u.updateSize(!0),m--,1)}function b(){w()&&D()}function D(){c="number"==typeof n.contentHeight?n.contentHeight:"number"==typeof n.height?n.height-(l?l.outerHeight(!0):0):Math.round(a.width()/Math.max(n.aspectRatio,.5))}function C(t){!m&&t.target===window&&u.start&&S(!0)&&u.trigger("windowResize",p)}function T(){w()&&(x(),u.displayEvents(y),R())}function H(){g(u.start,u.end)}function x(){a.css({width:"100%",height:a.height(),overflow:"hidden"})}function R(){a.css({width:"",height:"",overflow:""})}i.getSuggestedViewHeight=function(){return void 0===c&&b(),c},i.isHeightAuto=function(){return"auto"===n.contentHeight||"auto"===n.height}},initOptions:function(t){var e,n,i,r,s,o;o={views:(r=t).views||{}},z.each(r,function(n,t){"views"!=n&&(z.isPlainObject(t)&&!/(time|duration|interval)$/i.test(n)&&-1==z.inArray(n,l)?(s=null,z.each(t,function(t,e){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(t)?(o.views[t]||(o.views[t]={}),o.views[t][n]=e):(s=s||{})[t]=e}),s&&(o[n]=s)):o[n]=t)}),e=(t=o).lang,(n=Lt[e])||(e=Gt.defaults.lang,n=Lt[e]||{}),i=O(t.isRTL,n.isRTL,Gt.defaults.isRTL)?Gt.rtlDefaults:{},this.dirDefaults=i,this.langDefaults=n,this.overrides=t,this.options=h(Gt.defaults,i,n,t),At(this.options),this.viewSpecCache={}},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(t){var e,n,i;if(-1!=z.inArray(t,S))for(e=this.header.getViewsWithButtons(),z.each(L.views,function(t){e.push(t)}),n=0;n").append(n("left")).append(n("right")).append(n("center")).append('
')},t.destroy=function(){e.remove()},t.updateTitle=function(t){e.find("h2").text(t)},t.activateButton=function(t){e.find(".fc-"+t+"-button").addClass(g+"-state-active")},t.deactivateButton=function(t){e.find(".fc-"+t+"-button").removeClass(g+"-state-active")},t.disableButton=function(t){e.find(".fc-"+t+"-button").attr("disabled","disabled").addClass(g+"-state-disabled")},t.enableButton=function(t){e.find(".fc-"+t+"-button").removeAttr("disabled").removeClass(g+"-state-disabled")},t.getViewsWithButtons=function(){return p};var g,e=z(),p=[];function n(t){var n=z('
'),e=f.header[t];return e&&z.each(e.split(" "),function(t){var e,c=z(),d=!0;z.each(this.split(","),function(t,e){var n,i,r,s,o,l,a,u;"title"==e?(c=c.add(z("

 

")),d=!1):((n=h.getViewSpec(e))?(i=function(){h.changeView(e)},p.push(e),r=n.buttonTextOverride,s=n.buttonTextDefault):h[e]&&(i=function(){h[e]()},r=(h.overrides.buttonText||{})[e],s=f.buttonText[e]),i&&(o=f.themeButtonIcons[e],l=f.buttonIcons[e],a=r?R(r):o&&f.theme?"":l&&!f.theme?"":R(s),u=z('").click(function(){u.hasClass(g+"-state-disabled")||(i(),(u.hasClass(g+"-state-active")||u.hasClass(g+"-state-disabled"))&&u.removeClass(g+"-state-hover"))}).mousedown(function(){u.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-down")}).mouseup(function(){u.removeClass(g+"-state-down")}).hover(function(){u.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-hover")},function(){u.removeClass(g+"-state-hover").removeClass(g+"-state-down")}),c=c.add(u)))}),d&&c.first().addClass(g+"-corner-left").end().last().addClass(g+"-corner-right").end(),1"),d&&e.addClass("fc-button-group"),e.append(c),n.append(e)):n.append(c)}),n}}L.lang("en",Gt.englishDefaults),L.sourceNormalizers=[];var Bt={dataType:"json",cache:!(L.sourceFetchers=[])},Yt=1;function It(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}Gt.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;n'+this.dayGrid.headHtml()+'
'},headIntroHtml:function(){if(this.weekNumbersVisible)return'"+R(this.opt("weekNumberTitle"))+""},numberIntroHtml:function(t){if(this.weekNumbersVisible)return'"+this.dayGrid.getCell(t,0).start.format("w")+""},dayIntroHtml:function(){if(this.weekNumbersVisible)return'"},introHtml:function(){if(this.weekNumbersVisible)return'"},numberCellHtml:function(t){var e,n=t.start;return this.dayNumbersVisible?((e=this.dayGrid.getDayClasses(n)).unshift("fc-day-number"),''+n.date()+""):""},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=t(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,i=this.opt("eventLimit");a(this.scrollerEl),s(this.headRowEl),this.dayGrid.destroySegPopover(),i&&"number"==typeof i&&this.dayGrid.limitRows(i),n=this.computeScrollerHeight(t),this.setGridHeight(n,e),i&&"number"!=typeof i&&this.dayGrid.limitRows(i),!e&&o(this.scrollerEl,n)&&(r(this.headRowEl,u(this.scrollerEl)),n=this.computeScrollerHeight(t),this.scrollerEl.height(n))},setGridHeight:function(t,e){e?i(this.dayGrid.rowEls):n(this.dayGrid.rowEls,t,!0)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},destroyEvents:function(){this.dayGrid.destroyEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},destroySelection:function(){this.dayGrid.destroySelection()}}),Zt=d.month=Wt.extend({computeRange:function(t){var e,n=Wt.prototype.computeRange.call(this,t);return this.isFixedWeeks()&&(e=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-e,"weeks")),n},setGridHeight:function(t,e){(e=e||"variable"===this.opt("weekMode"))&&(t*=this.rowCnt/6),n(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){var t=this.opt("weekMode");return t?"fixed"===t:this.opt("fixedWeekCount")}});Zt.duration={months:1},Zt.defaults={fixedWeekCount:!0},d.basicWeek={type:"basic",duration:{weeks:1}},d.basicDay={type:"basic",duration:{days:1}};return(d.agenda=zt.extend({timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,initialize:function(){this.timeGrid=new Ht(this),this.opt("allDaySlot")?(this.dayGrid=new Dt(this),this.coordMap=new ft([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap},setRange:function(t){zt.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},render:function(){this.el.addClass("fc-agenda-view").html(this.renderHtml()),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.coordMap.containerEl=this.scrollerEl,this.timeGrid.setElement(this.el.find(".fc-time-grid")),this.timeGrid.renderDates(),this.bottomRuleEl=z('
').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},destroy:function(){this.timeGrid.destroyDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.destroyDates(),this.dayGrid.removeElement())},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},renderHtml:function(){return'
'+this.timeGrid.headHtml()+'
'+(this.dayGrid?'

':"")+'
'},headIntroHtml:function(){var t;return this.opt("weekNumbers")?(t=this.timeGrid.getCell(0).start.format(this.opt("smallWeekFormat")),'"+R(t)+""):'"},dayIntroHtml:function(){return'"+(this.opt("allDayHtml")||R(this.opt("allDayText")))+""},slotBgIntroHtml:function(){return'"},introHtml:function(){return'"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(t){this.timeGrid.updateSize(t),zt.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=t(this.el.find(".fc-axis"))},setHeight:function(t,e){var n,i;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css("overflow",""),a(this.scrollerEl),s(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),(n=this.opt("eventLimit"))&&"number"!=typeof n&&(n=5),n&&this.dayGrid.limitRows(n)),e||(i=this.computeScrollerHeight(t),o(this.scrollerEl,i)?(r(this.noScrollRowEls,u(this.scrollerEl)),i=this.computeScrollerHeight(t),this.scrollerEl.height(i)):(this.scrollerEl.height(i).css("overflow","hidden"),this.bottomRuleEl.show()))},computeInitialScroll:function(){var t=G.duration(this.opt("scrollTime")),e=this.timeGrid.computeTimeTop(t);return(e=Math.ceil(e))&&e++,e},renderEvents:function(t){var e,n=[],i=[];for(e=0;e