!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(t,e){var n=t.fullCalendar={version:"2.5.0",internalApiVersion:1},i=n.views={};t.fn.fullCalendar=function(e){var n=Array.prototype.slice.call(arguments,1),i=this;return this.each((function(r,s){var o,a=t(s),l=a.data("fullCalendar");"string"==typeof e?l&&t.isFunction(l[e])&&(o=l[e].apply(l,n),r||(i=o),"destroy"===e&&a.removeData("fullCalendar")):l||(l=new Wt(a,e),a.data("fullCalendar",l),l.render())})),i};var r=["header","buttonText","buttonIcons","themeButtonIcons"];function s(t){return A(t,r)}function o(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function a(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function l(){t("body").addClass("fc-not-allowed")}function u(){t("body").removeClass("fc-not-allowed")}function d(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],a=[],l=[],u=0;c(e),e.each((function(n,i){var d=n===e.length-1?s:r,c=t(i).outerHeight(!0);c<d?(o.push(i),a.push(c),l.push(t(i).height())):u+=c})),i&&(n-=u,r=Math.floor(n/o.length),s=Math.floor(n-r*(o.length-1))),t(o).each((function(e,n){var i=e===o.length-1?s:r,u=a[e],d=i-(u-l[e]);u<i&&t(n).height(d)}))}function c(t){t.height("")}function h(e){var n=0;return e.find("> *").each((function(e,i){var r=t(i).outerWidth();r>n&&(n=r)})),n++,e.width(n),n}function f(t,e){return t.height(e).addClass("fc-scroller"),t[0].scrollHeight-1>t[0].clientHeight||(g(t),!1)}function g(t){t.height("").removeClass("fc-scroller")}function p(e){var n=e.css("position"),i=e.parents().filter((function(){var e=t(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==n&&i.length?i:t(e[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 m(t){var e=t.offset(),n=y(t),i=e.left+S(t,"border-left-width")+n.left,r=e.top+S(t,"border-top-width")+n.top;return{left:i,right:i+t[0].clientWidth,top:r,bottom:r+t[0].clientHeight}}function y(e){var n=e.innerWidth()-e[0].clientWidth,i={left:0,right:0,top:0,bottom:e.innerHeight()-e[0].clientHeight};return!function(){null===w&&(w=function(){var e=t("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=e.children().offset().left>e.offset().left;return e.remove(),n}());return w}()||"rtl"!=e.css("direction")?i.right=n:i.left=n,i}n.intersectRanges=z,n.applyAll=j,n.debounce=J,n.isInt=K,n.htmlEscape=q,n.cssToStr=$,n.proxy=Q,n.capitaliseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},n.getOuterRect=v,n.getClientRect=m,n.getContentRect=function(t){var e=t.offset(),n=e.left+S(t,"border-left-width")+S(t,"padding-left"),i=e.top+S(t,"border-top-width")+S(t,"padding-top");return{left:n,right:n+t.width(),top:i,bottom:i+t.height()}},n.getScrollbarWidths=y;var w=null;function S(t,e){return parseFloat(t.css(e))||0}function b(t){return 1==t.which&&!t.ctrlKey}function E(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function D(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function C(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function H(t,e){return{left:t.left-e.left,top:t.top-e.top}}function T(e){var n,i,r=[],s=[];for("string"==typeof e?s=e.split(/\s*,\s*/):"function"==typeof e?s=[e]:t.isArray(e)&&(s=e),n=0;n<s.length;n++)"string"==typeof(i=s[n])?r.push("-"==i.charAt(0)?{field:i.substring(1),order:-1}:{field:i,order:1}):"function"==typeof i&&r.push({func:i});return r}function x(t,e,n){var i,r;for(i=0;i<n.length;i++)if(r=R(t,e,n[i]))return r;return 0}function R(t,e,n){return n.func?n.func(t,e):k(t[n.field],e[n.field])*(n.order||1)}function k(e,n){return e||n?null==n?-1:null==e?1:"string"===t.type(e)||"string"===t.type(n)?String(e).localeCompare(String(n)):e-n:0}function z(t,e){var n,i,r,s,o=t.start,a=t.end,l=e.start,u=e.end;if(a>l&&o<u)return o>=l?(n=o.clone(),r=!0):(n=l.clone(),r=!1),a<=u?(i=a.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}}n.intersectRects=E,n.parseFieldSpecs=T,n.compareByFieldSpecs=x,n.compareByFieldSpec=R,n.flexibleCompare=k,n.computeIntervalUnit=P,n.divideRangeByDuration=function(t,e,n){var i;if(B(n))return(e-t)/n;if(i=n.asMonths(),Math.abs(i)>=1&&K(i))return e.diff(t,"months",!0)/i;return e.diff(t,"days",!0)/n.asDays()},n.divideDurationByDuration=V,n.multiplyDuration=function(t,n){var i;if(B(t))return e.duration(t*n);if(i=t.asMonths(),Math.abs(i)>=1&&K(i))return e.duration({months:i*n});return e.duration({days:t.asDays()*n})},n.durationHasTime=B;var M=["sun","mon","tue","wed","thu","fri","sat"],F=["year","month","week","day","hour","minute","second","millisecond"];function L(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function G(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function P(t,e){var n,i,r;for(n=0;n<F.length&&!((r=I(i=F[n],t,e))>=1&&K(r));n++);return i}function I(t,n,i){return null!=i?i.diff(n,t,!0):e.isDuration(n)?n.as(t):n.end.diff(n.start,t,!0)}function V(t,e){var n,i;return B(t)||B(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&K(n)&&Math.abs(i)>=1&&K(i)?n/i:t.asDays()/e.asDays())}function B(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function O(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}n.log=function(){var t=window.console;if(t&&t.log)return t.log.apply(t,arguments)},n.warn=function(){var t=window.console;return t&&t.warn?t.warn.apply(t,arguments):n.log.apply(n,arguments)};var _={}.hasOwnProperty;function A(t,e){var n,i,r,s,o,a,l={};if(e)for(n=0;n<e.length;n++){for(i=e[n],r=[],s=t.length-1;s>=0;s--)if("object"==typeof(o=t[s][i]))r.unshift(o);else if(void 0!==o){l[i]=o;break}r.length&&(l[i]=A(r))}for(n=t.length-1;n>=0;n--)for(i in a=t[n])i in l||(l[i]=a[i]);return l}function N(t){var e=function(){};return e.prototype=t,new e}function Y(t,e){for(var n in t)W(t,n)&&(e[n]=t[n])}function W(t,e){return _.call(t,e)}function j(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;r<e.length;r++)s=e[r].apply(n,i)||s;return s}}function Z(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}function q(t){return(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function U(t){return t.replace(/&.*?;/g,"")}function $(e){var n=[];return t.each(e,(function(t,e){null!=e&&n.push(t+":"+e)})),n.join(";")}function X(t,e){return t-e}function K(t){return t%1==0}function Q(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function J(t,e){var n,i,r,s,o=function(){var a=+new Date-s;a<e&&a>0?n=setTimeout(o,e-a):(n=null,t.apply(r,i),n||(r=i=null))};return function(){r=this,i=arguments,s=+new Date,n||(n=setTimeout(o,e))}}var tt,et,nt,it=/^\s*\d{4}-\d\d$/,rt=/^\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+)?)?)?)?)?$/,st=e.fn,ot=t.extend({},st);function at(n,i,r){var s,o,a,l,u=n[0],d=1==n.length&&"string"==typeof u;return e.isMoment(u)?ut(u,l=e.apply(null,n)):!function(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}(u)&&void 0!==u?(s=!1,o=!1,d?it.test(u)?(n=[u+="-01"],s=!0,o=!0):(a=rt.exec(u))&&(s=!a[5],o=!0):t.isArray(u)&&(o=!0),l=i||s?e.utc.apply(e,n):e.apply(null,n),s?(l._ambigTime=!0,l._ambigZone=!0):r&&(o?l._ambigZone=!0:d&&(l.utcOffset?l.utcOffset(u):l.zone(u)))):l=e.apply(null,n),l._fullCalendar=!0,l}function lt(t,i){var r,s,o=!1,a=!1,l=t.length,u=[];for(r=0;r<l;r++)s=t[r],e.isMoment(s)||(s=n.moment.parseZone(s)),o=o||s._ambigTime,a=a||s._ambigZone,u.push(s);for(r=0;r<l;r++)s=u[r],i||!o||s._ambigTime?a&&!s._ambigZone&&(u[r]=s.clone().stripZone()):u[r]=s.clone().stripTime();return u}function ut(t,e){t._ambigTime?e._ambigTime=!0:e._ambigTime&&(e._ambigTime=!1),t._ambigZone?e._ambigZone=!0:e._ambigZone&&(e._ambigZone=!1)}function dt(t,e){t.year(e[0]||0).month(e[1]||0).date(e[2]||0).hours(e[3]||0).minutes(e[4]||0).seconds(e[5]||0).milliseconds(e[6]||0)}function ct(t,e){return ot.format.call(t,e)}function ht(t,e){return ft(t,St(e))}function ft(t,e){var n,i="";for(n=0;n<e.length;n++)i+=pt(t,e[n]);return i}n.moment=function(){return at(arguments)},n.moment.utc=function(){var t=at(arguments,!0);return t.hasTime()&&t.utc(),t},n.moment.parseZone=function(){return at(arguments,!0,!0)},st.clone=function(){var t=ot.clone.apply(this,arguments);return ut(this,t),this._fullCalendar&&(t._fullCalendar=!0),t},st.week=st.weeks=function(t){var e=(this._locale||this._lang)._fullCalendar_weekCalc;return null==t&&"function"==typeof e?e(this):"ISO"===e?ot.isoWeek.apply(this,arguments):ot.week.apply(this,arguments)},st.time=function(t){if(!this._fullCalendar)return ot.time.apply(this,arguments);if(null==t)return e.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,e.isDuration(t)||e.isMoment(t)||(t=e.duration(t));var n=0;return e.isDuration(t)&&(n=24*Math.floor(t.asDays())),this.hours(n+t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds())},st.stripTime=function(){var t;return this._ambigTime||(t=this.toArray(),this.utc(),et(this,t.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},st.hasTime=function(){return!this._ambigTime},st.stripZone=function(){var t,e;return this._ambigZone||(t=this.toArray(),e=this._ambigTime,this.utc(),et(this,t),this._ambigTime=e||!1,this._ambigZone=!0),this},st.hasZone=function(){return!this._ambigZone},st.local=function(){var t=this.toArray(),e=this._ambigZone;return ot.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,e&&nt(this,t),this},st.utc=function(){return ot.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},t.each(["zone","utcOffset"],(function(t,e){ot[e]&&(st[e]=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),ot[e].apply(this,arguments)})})),st.format=function(){return this._fullCalendar&&arguments[0]?ht(this,arguments[0]):this._ambigTime?ct(this,"YYYY-MM-DD"):this._ambigZone?ct(this,"YYYY-MM-DD[T]HH:mm:ss"):ot.format.apply(this,arguments)},st.toISOString=function(){return this._ambigTime?ct(this,"YYYY-MM-DD"):this._ambigZone?ct(this,"YYYY-MM-DD[T]HH:mm:ss"):ot.toISOString.apply(this,arguments)},st.isWithin=function(t,e){var n=lt([this,t,e]);return n[0]>=n[1]&&n[0]<n[2]},st.isSame=function(t,e){var i;return this._fullCalendar?e?(i=lt([this,t],!0),ot.isSame.call(i[0],i[1],e)):(t=n.moment.parseZone(t),ot.isSame.call(this,t)&&Boolean(this._ambigTime)===Boolean(t._ambigTime)&&Boolean(this._ambigZone)===Boolean(t._ambigZone)):ot.isSame.apply(this,arguments)},t.each(["isBefore","isAfter"],(function(t,e){st[e]=function(t,n){var i;return this._fullCalendar?(i=lt([this,t]),ot[e].call(i[0],i[1],n)):ot[e].apply(this,arguments)}})),tt="_d"in e()&&"updateOffset"in e,et=tt?function(t,n){t._d.setTime(Date.UTC.apply(Date,n)),e.updateOffset(t,!1)}:dt,nt=tt?function(t,n){t._d.setTime(+new Date(n[0]||0,n[1]||0,n[2]||0,n[3]||0,n[4]||0,n[5]||0,n[6]||0)),e.updateOffset(t,!1)}:dt;var gt={t:function(t){return ct(t,"a").charAt(0)},T:function(t){return ct(t,"A").charAt(0)}};function pt(t,e){var n,i;return"string"==typeof e?e:(n=e.token)?gt[n]?gt[n](t):ct(t,n):e.maybe&&(i=ft(t,e.maybe)).match(/[1-9]/)?i:""}function vt(t,e,i,r,s){return r=r||" - ",function(t,e,n,i,r){var s,o,a,l,u=t.clone().stripZone(),d=e.clone().stripZone(),c="",h="",f="",g="",p="";for(o=0;o<n.length&&!1!==(s=yt(t,e,u,d,n[o]));o++)c+=s;for(a=n.length-1;a>o&&!1!==(s=yt(t,e,u,d,n[a]));a--)h=s+h;for(l=o;l<=a;l++)f+=pt(t,n[l]),g+=pt(e,n[l]);(f||g)&&(p=r?g+i+f:f+i+g);return c+p+h}(t=n.moment.parseZone(t),e=n.moment.parseZone(e),St(i=(t.localeData||t.lang).call(t).longDateFormat(i)||i),r,s)}n.formatRange=vt;var mt={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"};function yt(t,e,n,i,r){var s,o;return"string"==typeof r?r:!!((s=r.token)&&(o=mt[s.charAt(0)])&&n.isSame(i,o))&&ct(t,s)}var wt={};function St(t){return t in wt?wt[t]:wt[t]=bt(t)}function bt(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push(e[1]):e[2]?n.push({maybe:bt(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push(e[5]);return n}function Et(){}function Dt(t,e){var n;return W(e,"constructor")&&(n=e.constructor),"function"!=typeof n&&(n=e.constructor=function(){t.apply(this,arguments)}),n.prototype=N(t.prototype),Y(e,n.prototype),function(t,e){var n,i,r=["constructor","toString","valueOf"];for(n=0;n<r.length;n++)t[i=r[n]]!==Object.prototype[i]&&(e[i]=t[i])}(e,n.prototype),Y(t,n),n}function Ct(t,e){Y(e.prototype||e,t.prototype)}n.Class=Et,Et.extend=function(){var t,e,n=arguments.length;for(t=0;t<n;t++)e=arguments[t],t<n-1&&Ct(this,e);return Dt(this,e||{})},Et.mixin=function(t){Ct(this,t)};var Ht=n.Emitter=Et.extend({callbackHash:null,on:function(t,e){return this.getCallbacks(t).add(e),this},off:function(t,e){return this.getCallbacks(t).remove(e),this},trigger:function(t){var e=Array.prototype.slice.call(arguments,1);return this.triggerWith(t,this,e),this},triggerWith:function(t,e,n){return this.getCallbacks(t).fireWith(e,n),this},getCallbacks:function(e){var n;return this.callbackHash||(this.callbackHash={}),(n=this.callbackHash[e])||(n=this.callbackHash[e]=t.Callbacks()),n}}),Tt=Et.extend({isHidden:!0,options:null,el:null,documentMousedownProxy:null,margin:10,constructor:function(t){this.options=t||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var e=this,n=this.options;this.el=t('<div class="fc-popover"/>').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",(function(){e.hide()})),n.autoHide&&t(document).on("mousedown",this.documentMousedownProxy=Q(this,"documentMousedown"))},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),t(document).off("mousedown",this.documentMousedownProxy)},position:function(){var e,n,i,r,s,o=this.options,a=this.el.offsetParent().offset(),l=this.el.outerWidth(),u=this.el.outerHeight(),d=t(window),c=p(this.el);r=o.top||0,s=void 0!==o.left?o.left:void 0!==o.right?o.right-l:0,c.is(window)||c.is(document)?(c=d,e=0,n=0):(e=(i=c.offset()).top,n=i.left),e+=d.scrollTop(),n+=d.scrollLeft(),!1!==o.viewportConstrain&&(r=Math.min(r,e+c.outerHeight()-u-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,n+c.outerWidth()-l-this.margin),s=Math.max(s,n+this.margin)),this.el.css({top:r-a.top,left:s-a.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),xt=n.CoordCache=Et.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(e){this.els=t(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?t(e.offsetParent):null},build:function(){var t=this.forcedOffsetParentEl||this.els.eq(0).offsetParent();this.origin=t.offset(),this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},queryBoundingRect:function(){var t=p(this.els.eq(0));if(!t.is(document))return m(t)},buildElHorizontals:function(){var e=[],n=[];this.els.each((function(i,r){var s=t(r),o=s.offset().left,a=s.outerWidth();e.push(o),n.push(o+a)})),this.lefts=e,this.rights=n},buildElVerticals:function(){var e=[],n=[];this.els.each((function(i,r){var s=t(r),o=s.offset().top,a=s.outerHeight();e.push(o),n.push(o+a)})),this.tops=e,this.bottoms=n},getHorizontalIndex:function(t){var e,n=this.boundingRect,i=this.lefts,r=this.rights,s=i.length;if(!n||t>=n.left&&t<n.right)for(e=0;e<s;e++)if(t>=i[e]&&t<r[e])return e},getVerticalIndex:function(t){var e,n=this.boundingRect,i=this.tops,r=this.bottoms,s=i.length;if(!n||t>=n.top&&t<n.bottom)for(e=0;e<s;e++)if(t>=i[e]&&t<r[e])return e},getLeftOffset:function(t){return this.lefts[t]},getLeftPosition:function(t){return this.lefts[t]-this.origin.left},getRightOffset:function(t){return this.rights[t]},getRightPosition:function(t){return this.rights[t]-this.origin.left},getWidth:function(t){return this.rights[t]-this.lefts[t]},getTopOffset:function(t){return this.tops[t]},getTopPosition:function(t){return this.tops[t]-this.origin.top},getBottomOffset:function(t){return this.bottoms[t]},getBottomPosition:function(t){return this.bottoms[t]-this.origin.top},getHeight:function(t){return this.bottoms[t]-this.tops[t]}}),Rt=n.DragListener=Et.extend({options:null,isListening:!1,isDragging:!1,originX:null,originY:null,mousemoveProxy:null,mouseupProxy:null,subjectEl:null,subjectHref:null,scrollEl:null,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollHandlerProxy:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,constructor:function(t){t=t||{},this.options=t,this.subjectEl=t.subjectEl},mousedown:function(t){b(t)&&(t.preventDefault(),this.startListening(t),this.options.distance||this.startDrag(t))},startListening:function(e){var n;this.isListening||(e&&this.options.scroll&&((n=p(t(e.target))).is(window)||n.is(document)||(this.scrollEl=n,this.scrollHandlerProxy=J(Q(this,"scrollHandler"),100),this.scrollEl.on("scroll",this.scrollHandlerProxy))),t(document).on("mousemove",this.mousemoveProxy=Q(this,"mousemove")).on("mouseup",this.mouseupProxy=Q(this,"mouseup")).on("selectstart",this.preventDefault),e?(this.originX=e.pageX,this.originY=e.pageY):(this.originX=0,this.originY=0),this.isListening=!0,this.listenStart(e))},listenStart:function(t){this.trigger("listenStart",t)},mousemove:function(t){var e,n=t.pageX-this.originX,i=t.pageY-this.originY;this.isDragging||n*n+i*i>=(e=this.options.distance||1)*e&&this.startDrag(t),this.isDragging&&this.drag(n,i,t)},startDrag:function(t){this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.dragStart(t))},dragStart:function(t){var e=this.subjectEl;this.trigger("dragStart",t),(this.subjectHref=e?e.attr("href"):null)&&e.removeAttr("href")},drag:function(t,e,n){this.trigger("drag",t,e,n),this.updateScroll(n)},mouseup:function(t){this.stopListening(t)},stopDrag:function(t){this.isDragging&&(this.stopScrolling(),this.dragStop(t),this.isDragging=!1)},dragStop:function(t){var e=this;this.trigger("dragStop",t),setTimeout((function(){e.subjectHref&&e.subjectEl.attr("href",e.subjectHref)}),0)},stopListening:function(e){this.stopDrag(e),this.isListening&&(this.scrollEl&&(this.scrollEl.off("scroll",this.scrollHandlerProxy),this.scrollHandlerProxy=null),t(document).off("mousemove",this.mousemoveProxy).off("mouseup",this.mouseupProxy).off("selectstart",this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.listenStop(e))},listenStop:function(t){this.trigger("listenStop",t)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(t){t.preventDefault()},computeScrollBounds:function(){var t=this.scrollEl;this.scrollBounds=t?v(t):null},updateScroll:function(t){var e,n,i,r,s=this.scrollSensitivity,o=this.scrollBounds,a=0,l=0;o&&(e=(s-(t.pageY-o.top))/s,n=(s-(o.bottom-t.pageY))/s,i=(s-(t.pageX-o.left))/s,r=(s-(o.right-t.pageX))/s,e>=0&&e<=1?a=e*this.scrollSpeed*-1:n>=0&&n<=1&&(a=n*this.scrollSpeed),i>=0&&i<=1?l=i*this.scrollSpeed*-1:r>=0&&r<=1&&(l=r*this.scrollSpeed)),this.setScrollVel(a,l)},setScrollVel:function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(Q(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=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(){}}),kt=Rt.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){Rt.call(this,e),this.component=t},listenStart:function(t){var e,n,i,r=this.subjectEl;Rt.prototype.listenStart.apply(this,arguments),this.computeCoords(),t?(i=n={left:t.pageX,top:t.pageY},r&&(i=D(i,e=v(r))),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(e=E(this.origHit,e)||e),i=C(e)),this.coordAdjust=H(i,n)):(this.origHit=null,this.coordAdjust=null)},computeCoords:function(){this.component.prepareHits(),this.computeScrollBounds()},dragStart:function(t){var e;Rt.prototype.dragStart.apply(this,arguments),(e=this.queryHit(t.pageX,t.pageY))&&this.hitOver(e)},drag:function(t,e,n){var i;Rt.prototype.drag.apply(this,arguments),zt(i=this.queryHit(n.pageX,n.pageY),this.hit)||(this.hit&&this.hitOut(),i&&this.hitOver(i))},dragStop:function(){this.hitDone(),Rt.prototype.dragStop.apply(this,arguments)},hitOver:function(t){var e=zt(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},hitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.hitDone(),this.hit=null)},hitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},listenStop:function(){Rt.prototype.listenStop.apply(this,arguments),this.origHit=null,this.hit=null,this.component.releaseHits()},scrollStop:function(){Rt.prototype.scrollStop.apply(this,arguments),this.computeCoords()},queryHit:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)}});function zt(t,e){return!t&&!e||!(!t||!e)&&(t.component===e.component&&Mt(t,e)&&Mt(e,t))}function Mt(t,e){for(var n in t)if(!/^(component|left|right|top|bottom)$/.test(n)&&t[n]!==e[n])return!1;return!0}var Ft=Et.extend({options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,mouseY0:null,mouseX0:null,topDelta:null,leftDelta:null,mousemoveProxy:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,n){this.options=n=n||{},this.sourceEl=e,this.parentEl=n.parentEl?t(n.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.mouseY0=e.pageY,this.mouseX0=e.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),t(document).on("mousemove",this.mousemoveProxy=Q(this,"mousemove")))},stop:function(e,n){var i=this,r=this.options.revertDuration;function s(){this.isAnimating=!1,i.removeElement(),this.top0=this.left0=null,n&&n()}this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,t(document).off("mousemove",this.mousemoveProxy),e&&r&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:r,complete:s})):s())},getEl:function(){var t=this.el;return t||(this.sourceEl.width(),t=this.el=this.sourceEl.clone().css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}).appendTo(this.parentEl)),t},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(this.sourceEl.width(),t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(t){this.topDelta=t.pageY-this.mouseY0,this.leftDelta=t.pageX-this.mouseX0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),Lt=n.Grid=Et.extend({view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,externalDragStartProxy:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={},this.externalDragStartProxy=Q(this,"externalDragStart")},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){this.start=t.start.clone(),this.end=t.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var t,e,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),null==(t=n.opt("displayEventTime"))&&(t=this.computeDisplayEventTime()),null==(e=n.opt("displayEventEnd"))&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?G(t,e,this.largeUnit):L(t,e)},prepareHits:function(){},releaseHits:function(){},queryHit:function(t,e){},getHitSpan:function(t){},getHitEl:function(t){},setElement:function(e){var n=this;this.el=e,e.on("mousedown",(function(e){t(e.target).is(".fc-event-container *, .fc-more")||t(e.target).closest(".fc-popover").length||n.dayMousedown(e)})),this.bindSegHandlers(),this.bindGlobalHandlers()},removeElement:function(){this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){t(document).on("dragstart sortstart",this.externalDragStartProxy)},unbindGlobalHandlers:function(){t(document).off("dragstart sortstart",this.externalDragStartProxy)},dayMousedown:function(t){var e,n,i=this,r=this.view,s=r.opt("selectable"),o=new kt(this,{scroll:r.opt("dragScroll"),dragStart:function(){r.unselect()},hitOver:function(t,r,o){o&&(e=r?t:null,s&&((n=i.computeSelection(i.getHitSpan(o),i.getHitSpan(t)))?i.renderSelection(n):!1===n&&l()))},hitOut:function(){e=null,n=null,i.unrenderSelection(),u()},listenStop:function(t){e&&r.triggerDayClick(i.getHitSpan(e),i.getHitEl(e),t),n&&r.reportSelection(n,t),u()}});o.mousedown(t)},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?N(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),e||(n.editable=!1),n},renderHelper:function(t,e){},unrenderHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(t,e){var n=this.computeSelectionSpan(t,e);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(X),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderFill:function(t,e){},unrenderFill:function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},renderFillSegEls:function(e,n){var i,r=this,s=this[e+"SegEl"],o="",a=[];if(n.length){for(i=0;i<n.length;i++)o+=this.fillSegHtml(e,n[i]);t(o).each((function(e,i){var o=n[e],l=t(i);s&&(l=s.call(r,o,l)),l&&(l=t(l)).is(r.fillSegTag)&&(o.el=l,a.push(o))}))}return a},fillSegTag:"div",fillSegHtml:function(t,e){var n=this[t+"SegClasses"],i=this[t+"SegCss"],r=n?n.call(this,e):[],s=$(i?i.call(this,e):{});return"<"+this.fillSegTag+(r.length?' class="'+r.join(" ")+'"':"")+(s?' style="'+s+'"':"")+" />"},getDayClasses:function(t){var e=this.view,n=e.calendar.getNow().stripTime(),i=["fc-"+M[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<n?i.push("fc-past"):i.push("fc-future"),i}});function Gt(t){return Z((t.source||{}).rendering,t.rendering)}function Pt(t,e){return t.start-e.start}Lt.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var e,n,i,r=[],s=[];for(e=0;e<t.length;e++)(n=t[e],i=void 0,i=Gt(n),"background"===i||"inverse-background"===i?r:s).push(t[e]);this.segs=[].concat(this.renderBgEvents(r),this.renderFgEvents(s))},renderBgEvents:function(t){var e=this.eventsToSegs(t);return this.renderBgSegs(e)||e},renderFgEvents:function(t){var e=this.eventsToSegs(t);return this.renderFgSegs(e)||e},unrenderEvents:function(){this.triggerSegMouseout(),this.unrenderFgSegs(),this.unrenderBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(t){},unrenderFgSegs:function(){},renderFgSegEls:function(e,n){var i,r=this.view,s="",o=[];if(e.length){for(i=0;i<e.length;i++)s+=this.fgSegHtml(e[i],n);t(s).each((function(n,i){var s=e[n],a=r.resolveEventEl(s.event,t(i));a&&(a.data("fc-seg",s),s.el=a,o.push(s))}))}return o},fgSegHtml:function(t,e){},renderBgSegs:function(t){return this.renderFill("bgEvent",t)},unrenderBgSegs:function(){this.unrenderFill("bgEvent")},bgEventSegEl:function(t,e){return this.view.resolveEventEl(t.event,e)},bgEventSegClasses:function(t){var e=t.event,n=e.source||{};return["fc-bgevent"].concat(e.className,n.className||[])},bgEventSegCss:function(t){var e=this.view,n=t.event,i=n.source||{};return{"background-color":n.backgroundColor||n.color||i.backgroundColor||i.color||e.opt("eventBackgroundColor")||e.opt("eventColor")}},businessHoursSegClasses:function(t){return["fc-nonbusiness","fc-bgevent"]},bindSegHandlers:function(){var e=this,n=this.view;t.each({mouseenter:function(t,n){e.triggerSegMouseover(t,n)},mouseleave:function(t,n){e.triggerSegMouseout(t,n)},click:function(t,e){return n.trigger("eventClick",this,t.event,e)},mousedown:function(i,r){t(r.target).is(".fc-resizer")&&n.isEventResizable(i.event)?e.segResizeMousedown(i,r,t(r.target).is(".fc-start-resizer")):n.isEventDraggable(i.event)&&e.segDragMousedown(i,r)}},(function(n,i){e.el.on(n,".fc-event-container > *",(function(n){var r=t(this).data("fc-seg");if(r&&!e.isDraggingSeg&&!e.isResizingSeg)return i.call(this,r,n)}))}))},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(t,e){var n,i=this,r=this.view,s=r.calendar,o=t.el,a=t.event,d=new Ft(t.el,{parentEl:r.el,opacity:r.opt("dragOpacity"),revertDuration:r.opt("dragRevertDuration"),zIndex:2}),c=new kt(r,{distance:5,scroll:r.opt("dragScroll"),subjectEl:o,subjectCenter:!0,listenStart:function(t){d.hide(),d.start(t)},dragStart:function(e){i.triggerSegMouseout(t,e),i.segDragStart(t,e),r.hideEvent(a)},hitOver:function(e,o,u){t.hit&&(u=t.hit),(n=i.computeEventDrop(u.component.getHitSpan(u),e.component.getHitSpan(e),a))&&!s.isEventSpanAllowed(i.eventToSpan(n),a)&&(l(),n=null),n&&r.renderDrag(n,t)?d.hide():d.show(),o&&(n=null)},hitOut:function(){r.unrenderDrag(),d.show(),n=null},hitDone:function(){u()},dragStop:function(e){d.stop(!n,(function(){r.unrenderDrag(),r.showEvent(a),i.segDragStop(t,e),n&&r.reportEventDrop(a,n,this.largeUnit,o,e)}))},listenStop:function(){d.stop()}});c.mousedown(e)},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,a=e.start;return o.hasTime()===a.hasTime()?(i=this.diffDates(a,o),n.allDay&&B(i)?(r={start:n.start.clone(),end:s.getEventEnd(n),allDay:!1},s.normalizeEventTimes(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:a.clone(),end:null,allDay:!a.hasTime()},r},applyDragOpacity:function(t){var e=this.view.opt("dragOpacity");null!=e&&t.each((function(t,n){n.style.opacity=e}))},externalDragStart:function(e,n){var i,r,s=this.view;s.opt("droppable")&&(i=t((n?n.item:null)||e.target),r=s.opt("dropAccept"),(t.isFunction(r)?r.call(i[0],i):i.is(r))&&(this.isDraggingExternal||this.listenToExternalDrag(i,e,n)))},listenToExternalDrag:function(i,r,s){var o,a=this,d=function(i){var r,s,o,a,l=n.dataAttrPrefix;l&&(l+="-");(r=i.data(l+"event")||null)&&(null==(s=(r="object"==typeof r?t.extend({},r):{}).start)&&(s=r.time),o=r.duration,a=r.stick,delete r.start,delete r.time,delete r.duration,delete r.stick);null==s&&(s=i.data(l+"start"));null==s&&(s=i.data(l+"time"));null==o&&(o=i.data(l+"duration"));null==a&&(a=i.data(l+"stick"));return s=null!=s?e.duration(s):null,o=null!=o?e.duration(o):null,a=Boolean(a),{eventProps:r,startTime:s,duration:o,stick:a}}(i);new kt(this,{listenStart:function(){a.isDraggingExternal=!0},hitOver:function(t){(o=a.computeExternalDrop(t.component.getHitSpan(t),d))?a.renderDrag(o):l()},hitOut:function(){o=null,a.unrenderDrag(),u()},dragStop:function(){a.unrenderDrag(),u(),o&&a.view.reportExternalDrop(d,o,i,r,s)},listenStop:function(){a.isDraggingExternal=!1}}).startDrag(r)},computeExternalDrop:function(t,e){var n=this.view.calendar,i={start:n.applyTimezone(t.start),end:null};return e.startTime&&!i.start.hasTime()&&i.start.time(e.startTime),e.duration&&(i.end=i.start.clone().add(e.duration)),n.isExternalSpanAllowed(this.eventToSpan(i),i,e.eventProps)?i:null},renderDrag:function(t,e){},unrenderDrag:function(){},segResizeMousedown:function(t,e,n){var i,r=this,s=this.view,o=s.calendar,a=t.el,d=t.event,c=o.getEventEnd(d),h=new kt(this,{distance:5,scroll:s.opt("dragScroll"),subjectEl:a,dragStart:function(e){r.triggerSegMouseout(t,e),r.segResizeStart(t,e)},hitOver:function(e,a,u){var h=r.getHitSpan(u),f=r.getHitSpan(e);(i=n?r.computeEventStartResize(h,f,d):r.computeEventEndResize(h,f,d))&&(o.isEventSpanAllowed(r.eventToSpan(i),d)?i.start.isSame(d.start)&&i.end.isSame(c)&&(i=null):(l(),i=null)),i&&(s.hideEvent(d),r.renderEventResize(i,t))},hitOut:function(){i=null},hitDone:function(){r.unrenderEventResize(),s.showEvent(d),u()},dragStop:function(e){r.segResizeStop(t,e),i&&s.reportEventResize(d,i,this.largeUnit,a,e)}});h.mousedown(e)},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,a=this.diffDates(n[t],e[t]);return(r={start:i.start.clone(),end:o.getEventEnd(i),allDay:i.allDay}).allDay&&B(a)&&(r.allDay=!1,o.normalizeEventTimes(r)),r[t].add(a),r.start.isBefore(r.end)||(s=this.minResizeDuration||(i.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration),"start"==t?r.start=r.end.clone().subtract(s):r.end=r.start.clone().add(s)),r},renderEventResize:function(t,e){},unrenderEventResize:function(){},getEventTimeText:function(t,e,n){return null==e&&(e=this.eventTimeFormat),null==n&&(n=this.displayEventEnd),this.displayEventTime&&t.start.hasTime()?n&&t.end?this.view.formatRange(t,e):t.start.format(e):""},getSegClasses:function(t,e,n){var i=t.event,r=["fc-event",t.isStart?"fc-start":"fc-not-start",t.isEnd?"fc-end":"fc-not-end"].concat(i.className,i.source?i.source.className:[]);return e&&r.push("fc-draggable"),n&&r.push("fc-resizable"),r},getEventSkinCss:function(t){var e=this.view,n=t.source||{},i=t.color,r=n.color,s=e.opt("eventColor");return{"background-color":t.backgroundColor||i||n.backgroundColor||r||e.opt("eventBackgroundColor")||s,"border-color":t.borderColor||i||n.borderColor||r||e.opt("eventBorderColor")||s,color:t.textColor||n.textColor||e.opt("eventTextColor")}},eventToSegs:function(t){return this.eventsToSegs([t])},eventToSpan:function(t){var e=this.eventToRange(t);return this.transformEventSpan(e,t),e},eventsToSegs:function(e,n){var i=this,r=function(t){var e,n,i={};for(e=0;e<t.length;e++)(i[(n=t[e])._id]||(i[n._id]=[])).push(n);return i}(e),s=[];return t.each(r,(function(t,e){var r,o=[];for(r=0;r<e.length;r++)o.push(i.eventToRange(e[r]));if("inverse-background"===Gt(e[0]))for(o=i.invertRanges(o),r=0;r<o.length;r++)i.generateEventSegs(o[r],e[0],n,s);else for(r=0;r<o.length;r++)i.generateEventSegs(o[r],e[r],n,s)})),s},eventToRange:function(t){return{start:t.start.clone().stripZone(),end:this.view.calendar.getEventEnd(t).stripZone()}},generateEventSegs:function(t,e,n,i){var r,s;for(this.transformEventSpan(t,e),r=n?n(t):this.spanToSegs(t),s=0;s<r.length;s++)this.transformEventSeg(r[s],t,e),i.push(r[s])},transformEventSpan:function(t,e){},transformEventSeg:function(t,e,n){t.event=n,t.eventStartMS=+e.start,t.eventDurationMS=e.end-e.start},invertRanges:function(t){var e,n,i=this.view,r=i.start.clone(),s=i.end.clone(),o=[],a=r;for(t.sort(Pt),e=0;e<t.length;e++)(n=t[e]).start>a&&o.push({start:a,end:n.start}),a=n.end;return a<s&&o.push({start:a,end:s}),o},sortEventSegs:function(t){t.sort(Q(this,"compareEventSegs"))},compareEventSegs:function(t,e){return t.eventStartMS-e.eventStartMS||e.eventDurationMS-t.eventDurationMS||e.event.allDay-t.event.allDay||x(t.event,e.event,this.view.eventOrderSpecs)}}),n.dataAttrPrefix="";var It=n.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){for(var t,e,n,i=this.view,r=this.start.clone(),s=-1,o=[],a=[];r.isBefore(this.end);)i.isHiddenDay(r)?o.push(s+.5):(s++,o.push(s),a.push(r.clone())),r.add(1,"days");if(this.breakOnWeeks){for(e=a[0].day(),t=1;t<a.length&&a[t].day()!=e;t++);n=Math.ceil(a.length/t)}else n=1,t=a.length;this.dayDates=a,this.dayIndices=o,this.daysPerRow=t,this.rowCnt=n,this.updateDayTableCols()},updateDayTableCols:function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.view.opt("columnFormat")||this.computeColHeadFormat()},computeColCnt:function(){return this.daysPerRow},getCellDate:function(t,e){return this.dayDates[this.getCellDayIndex(t,e)].clone()},getCellRange:function(t,e){var n=this.getCellDate(t,e),i=n.clone().add(1,"days");return{start:n,end:i}},getCellDayIndex:function(t,e){return t*this.daysPerRow+this.getColDayIndex(e)},getColDayIndex:function(t){return this.isRTL?this.colCnt-1-t:t},getDateDayIndex:function(t){var e=this.dayIndices,n=t.diff(this.start,"days");return n<0?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(t){var e,n,i,r,s,o=this.daysPerRow,a=this.view.computeDayRange(t),l=this.getDateDayIndex(a.start),u=this.getDateDayIndex(a.end.clone().subtract(1,"days")),d=[];for(e=0;e<this.rowCnt;e++)i=(n=e*o)+o-1,r=Math.max(l,n),s=Math.min(u,i),(r=Math.ceil(r))<=(s=Math.floor(s))&&d.push({row:e,firstRowDayIndex:r-n,lastRowDayIndex:s-n,isStart:r===l,isEnd:s===u});return d},sliceRangeByDay:function(t){var e,n,i,r,s,o,a=this.daysPerRow,l=this.view.computeDayRange(t),u=this.getDateDayIndex(l.start),d=this.getDateDayIndex(l.end.clone().subtract(1,"days")),c=[];for(e=0;e<this.rowCnt;e++)for(i=(n=e*a)+a-1,r=n;r<=i;r++)s=Math.max(u,r),o=Math.min(d,r),(s=Math.ceil(s))<=(o=Math.floor(o))&&c.push({row:e,firstRowDayIndex:s-n,lastRowDayIndex:o-n,isStart:s===u,isEnd:o===d});return c},renderHeadHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},renderHeadDateCellsHtml:function(){var t,e,n=[];for(t=0;t<this.colCnt;t++)e=this.getCellDate(0,t),n.push(this.renderHeadDateCellHtml(e));return n.join("")},renderHeadDateCellHtml:function(t,e){return'<th class="fc-day-header '+this.view.widgetHeaderClass+" fc-"+M[t.day()]+'"'+(e>1?' colspan="'+e+'"':"")+">"+q(t.format(this.colHeadFormat))+"</th>"},renderBgTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+"</tr>"},renderBgIntroHtml:function(t){return this.renderIntroHtml()},renderBgCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderBgCellHtml(n));return i.join("")},renderBgCellHtml:function(t){var e=this.view,n=this.getDayClasses(t);return n.unshift("fc-day",e.widgetContentClass),'<td class="'+n.join(" ")+'" data-date="'+t.format("YYYY-MM-DD")+'"></td>'},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},Vt=n.DayGrid=Lt.extend(It,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(t){var e,n,i=this.view,r=this.rowCnt,s=this.colCnt,o="";for(e=0;e<r;e++)o+=this.renderDayRowHtml(e,t);for(this.el.html(o),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new xt({els:this.rowEls,isVertical:!0}),this.colCoordCache=new xt({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;e<r;e++)for(n=0;n<s;n++)i.trigger("dayRender",null,this.getCellDate(e,n),this.getCellEl(e,n))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var t=this.view.calendar.getBusinessHoursEvents(!0),e=this.eventsToSegs(t);this.renderFill("businessHours",e,"bgevent")},renderDayRowHtml:function(t,e){var n=["fc-row","fc-week",this.view.widgetContentClass];return e&&n.push("fc-rigid"),'<div class="'+n.join(" ")+'"><div class="fc-bg"><table>'+this.renderBgTrHtml(t)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.renderNumberTrHtml(t)+"</thead>":"")+"</table></div></div>"},renderNumberTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+"</tr>"},renderNumberIntroHtml:function(t){return this.renderIntroHtml()},renderNumberCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderNumberCellHtml(n));return i.join("")},renderNumberCellHtml:function(t){var e;return this.view.dayNumbersVisible?((e=this.getDayClasses(t)).unshift("fc-day-number"),'<td class="'+e.join(" ")+'" data-date="'+t.format()+'">'+t.date()+"</td>"):"<td/>"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(t){var e,n,i=this.sliceRangeByRow(t);for(e=0;e<i.length;e++)n=i[e],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return i},prepareHits:function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},releaseHits:function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},queryHit:function(t,e){var n=this.colCoordCache.getHorizontalIndex(t),i=this.rowCoordCache.getVerticalIndex(e);if(null!=i&&null!=n)return this.getCellHit(i,n)},getHitSpan:function(t){return this.getCellRange(t.row,t.col)},getHitEl:function(t){return this.getCellEl(t.row,t.col)},getCellHit:function(t,e){return{row:t,col:e,component:this,left:this.colCoordCache.getLeftOffset(e),right:this.colCoordCache.getRightOffset(e),top:this.rowCoordCache.getTopOffset(t),bottom:this.rowCoordCache.getBottomOffset(t)}},getCellEl:function(t,e){return this.cellEls.eq(t*this.colCnt+e)},renderDrag:function(t,e){if(this.renderHighlight(this.eventToSpan(t)),e&&!e.el.closest(this.el).length)return this.renderEventLocationHelper(t,e),this.applyDragOpacity(this.helperEls),!0},unrenderDrag:function(){this.unrenderHighlight(),this.unrenderHelper()},renderEventResize:function(t,e){this.renderHighlight(this.eventToSpan(t)),this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHighlight(),this.unrenderHelper()},renderHelper:function(e,n){var i,r=[],s=this.eventToSegs(e);s=this.renderFgSegEls(s),i=this.renderSegRows(s),this.rowEls.each((function(e,s){var o,a=t(s),l=t('<div class="fc-helper-skeleton"><table/></div>');o=n&&n.row===e?n.el.position().top:a.find(".fc-content-skeleton tbody").position().top,l.css("top",o).find("table").append(i[e].tbodyEl),a.append(l),r.push(l[0])})),this.helperEls=t(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,n,i){var r,s,o,a=[];for(n=this.renderFillSegEls(e,n),r=0;r<n.length;r++)s=n[r],o=this.renderFillRow(e,s,i),this.rowEls.eq(s.row).append(o),a.push(o[0]);return this.elsByFill[e]=t(a),n},renderFillRow:function(e,n,i){var r,s,o=this.colCnt,a=n.leftCol,l=n.rightCol+1;return i=i||e.toLowerCase(),s=(r=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>')).find("tr"),a>0&&s.append('<td colspan="'+a+'"/>'),s.append(n.el.attr("colspan",l-a)),l<o&&s.append('<td colspan="'+(o-l)+'"/>'),this.bookendCells(s),r}});function Bt(t,e){var n,i;for(n=0;n<e.length;n++)if((i=e[n]).leftCol<=t.rightCol&&i.rightCol>=t.leftCol)return!0;return!1}function Ot(t,e){return t.leftCol-e.leftCol}Vt.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),Lt.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return Lt.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,(function(t){return t.event.allDay}));return Lt.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each((function(e,i){t(i).find(".fc-content-skeleton > table").append(n[e].tbodyEl)})),e},unrenderFgSegs: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<e.length;n++)i.push(this.renderSegRow(n,e[n]));return i},fgSegHtml:function(t,e){var n,i,r=this.view,s=t.event,o=r.isEventDraggable(s),a=!e&&s.allDay&&t.isStart&&r.isEventResizableFromStart(s),l=!e&&s.allDay&&t.isEnd&&r.isEventResizableFromEnd(s),u=this.getSegClasses(t,o,a||l),d=$(this.getEventSkinCss(s)),c="";return u.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getEventTimeText(s))&&(c='<span class="fc-time">'+q(n)+"</span>"),i='<span class="fc-title">'+(q(s.title||"")||"&nbsp;")+"</span>",'<a class="'+u.join(" ")+'"'+(s.url?' href="'+q(s.url)+'"':"")+(d?' style="'+d+'"':"")+'><div class="fc-content">'+(this.isRTL?i+" "+c:c+" "+i)+"</div>"+(a?'<div class="fc-resizer fc-start-resizer" />':"")+(l?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},renderSegRow:function(e,n){var i,r,s,o,a,l,u,d=this.colCnt,c=this.buildSegLevels(n),h=Math.max(1,c.length),f=t("<tbody/>"),g=[],p=[],v=[];function m(e){for(;s<e;)(u=(v[i-1]||[])[s])?u.attr("rowspan",parseInt(u.attr("rowspan")||1,10)+1):(u=t("<td/>"),o.append(u)),p[i][s]=u,v[i][s]=u,s++}for(i=0;i<h;i++){if(r=c[i],s=0,o=t("<tr/>"),g.push([]),p.push([]),v.push([]),r)for(a=0;a<r.length;a++){for(m((l=r[a]).leftCol),u=t('<td class="fc-event-container"/>').append(l.el),l.leftCol!=l.rightCol?(u.attr("colspan",l.rightCol-l.leftCol+1),u.attr("aria-label",(l.rightCol-l.leftCol+1).toString()+"-day event")):(u.attr("aria-label","1-day event"),v[i][s]=u);s<=l.rightCol;)p[i][s]=u,g[i][s]=l,s++;o.append(u)}m(d),this.bookendCells(o),f.append(o)}return{row:e,tbodyEl:f,cellMatrix:p,segMatrix:g,segLevels:c,segs:n}},buildSegLevels:function(t){var e,n,i,r=[];for(this.sortEventSegs(t),e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&Bt(n,r[i]);i++);n.level=i,(r[i]||(r[i]=[])).push(n)}for(i=0;i<r.length;i++)r[i].sort(Ot);return r},groupSegRows:function(t){var e,n=[];for(e=0;e<this.rowCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].row].push(t[e]);return n}}),Vt.mixin({segPopover:null,popoverSegs:null,removeSegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(t){var e,n,i=this.rowStructs||[];for(e=0;e<i.length;e++)this.unlimitRow(e),!1!==(n=!!t&&("number"==typeof t?t:this.computeRowLevelLimit(e)))&&this.limitRow(e,n)},computeRowLevelLimit:function(e){var n,i,r,s=this.rowEls.eq(e).height(),o=this.rowStructs[e].tbodyEl.children();function a(e,n){r=Math.max(r,t(n).outerHeight())}for(n=0;n<o.length;n++)if(i=o.eq(n).removeClass("fc-limited"),r=0,i.find("> td > :first-child").each(a),i.position().top+r>s)return n;return!1},limitRow:function(e,n){var i,r,s,o,a,l,u,d,c,h,f,g,p,v,m,y=this,w=this.rowStructs[e],S=[],b=0;function E(i){for(;b<i;)(l=y.getCellSegs(e,b,n)).length&&(c=r[n-1][b],m=y.renderMoreLink(e,b,l),v=t("<div/>").append(m),c.append(v),S.push(v[0])),b++}if(n&&n<w.segLevels.length){for(i=w.segLevels[n-1],r=w.cellMatrix,s=w.tbodyEl.children().slice(n).addClass("fc-limited").get(),o=0;o<i.length;o++){for(E((a=i[o]).leftCol),d=[],u=0;b<=a.rightCol;)l=this.getCellSegs(e,b,n),d.push(l),u+=l.length,b++;if(u){for(h=(c=r[n-1][a.leftCol]).attr("rowspan")||1,f=[],g=0;g<d.length;g++)p=t('<td class="fc-more-cell"/>').attr("rowspan",h),l=d[g],m=this.renderMoreLink(e,a.leftCol+g,[a].concat(l)),v=t("<div/>").append(m),p.append(v),f.push(p[0]),S.push(p[0]);c.addClass("fc-limited").after(t(f)),s.push(c[0])}}E(this.colCnt),w.moreEls=t(S),w.limitedEls=t(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(e,n,i){var r=this,s=this.view;return t('<a class="fc-more"/>').text(this.getMoreLinkText(i.length)).on("click",(function(o){var a=s.opt("eventLimitClick"),l=r.getCellDate(e,n),u=t(this),d=r.getCellEl(e,n),c=r.getCellSegs(e,n),h=r.resliceDaySegs(c,l),f=r.resliceDaySegs(i,l);"function"==typeof a&&(a=s.trigger("eventLimitClick",null,{date:l,dayEl:d,moreEl:u,segs:h,hiddenSegs:f},o)),"popover"===a?r.showSegPopover(e,n,u,h):"string"==typeof a&&s.calendar.zoomTo(l,a)}))},showSegPopover:function(t,e,n,i){var r,s,o=this,a=this.view,l=n.parent();r=1==this.rowCnt?a.el:this.rowEls.eq(t),s={className:"fc-more-popover",content:this.renderSegPopoverContent(t,e,i),parentEl:this.el,top:r.offset().top,autoHide:!0,viewportConstrain:a.opt("popoverViewportConstrain"),hide:function(){o.segPopover.removeElement(),o.segPopover=null,o.popoverSegs=null}},this.isRTL?s.right=l.offset().left+l.outerWidth()+1:s.left=l.offset().left-1,this.segPopover=new Tt(s),this.segPopover.show()},renderSegPopoverContent:function(e,n,i){var r,s=this.view,o=s.opt("theme"),a=this.getCellDate(e,n).format(s.opt("dayPopoverFormat")),l=t('<div class="fc-header '+s.widgetHeaderClass+'"><span class="fc-close '+(o?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+q(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.widgetContentClass+'"><div class="fc-event-container"></div></div>'),u=l.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r<i.length;r++)this.prepareHits(),i[r].hit=this.getCellHit(e,n),this.releaseHits(),u.append(i[r].el);return l},resliceDaySegs:function(e,n){var i=t.map(e,(function(t){return t.event})),r=n.clone(),s=r.clone().add(1,"days"),o={start:r,end:s};return e=this.eventsToSegs(i,(function(t){var e=z(t,o);return e?[e]:[]})),this.sortEventSegs(e),e},getMoreLinkText:function(t){var e=this.view.opt("eventLimitText");return"function"==typeof e?e(t):"+"+t+" "+e},getCellSegs:function(t,e,n){for(var i,r=this.rowStructs[t].segMatrix,s=n||0,o=[];s<r.length;)(i=r[s][e])&&o.push(i),s++;return o}});var _t=n.TimeGrid=Lt.extend(It,{slotDuration:null,snapDuration:null,snapsPerSlot:null,minTime:null,maxTime:null,labelFormat:null,labelInterval:null,colEls:null,slatEls:null,helperEl:null,colCoordCache:null,slatCoordCache:null,businessHourSegs:null,constructor:function(){Lt.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.colEls=this.el.find(".fc-day"),this.slatEls=this.el.find(".fc-slats tr"),this.colCoordCache=new xt({els:this.colEls,isHorizontal:!0}),this.slatCoordCache=new xt({els:this.slatEls,isVertical:!0})},renderBusinessHours:function(){var t=this.view.calendar.getBusinessHoursEvents();this.businessHourSegs=this.renderFill("businessHours",this.eventsToSegs(t),"bgevent")},renderHtml:function(){return'<div class="fc-bg"><table>'+this.renderBgTrHtml(0)+'</table></div><div class="fc-slats"><table>'+this.renderSlatRowHtml()+"</table></div>"},renderSlatRowHtml:function(){for(var t,n,i,r=this.view,s=this.isRTL,o="",a=e.duration(+this.minTime);a<this.maxTime;)t=this.start.clone().time(a),n=K(V(a,this.labelInterval)),i='<td class="fc-axis fc-time '+r.widgetContentClass+'" '+r.axisStyleAttr()+">"+(n?"<span>"+q(t.format(this.labelFormat))+"</span>":"")+"</td>",o+="<tr "+(n?"":'class="fc-minor"')+">"+(s?"":i)+'<td class="'+r.widgetContentClass+'"/>'+(s?i:"")+"</tr>",a.add(this.slotDuration);return o},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),s=i.opt("snapDuration");r=e.duration(r),s=s?e.duration(s):r,this.slotDuration=r,this.snapDuration=s,this.snapsPerSlot=r/s,this.minResizeDuration=s,this.minTime=e.duration(i.opt("minTime")),this.maxTime=e.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),t.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("axisFormat")||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?e.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(t){var n,i,r;for(n=ue.length-1;n>=0;n--)if(K(r=V(i=e.duration(ue[n]),t))&&r>1)return i;return e.duration(t)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(t,e){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache,s=i.getHorizontalIndex(t),o=r.getVerticalIndex(e);if(null!=s&&null!=o){var a=r.getTopOffset(o),l=r.getHeight(o),u=(e-a)/l,d=Math.floor(u*n),c=a+d/n*l,h=a+(d+1)/n*l;return{col:s,snap:o*n+d,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:c,bottom:h}}},getHitSpan:function(t){var e,n=this.getCellDate(0,t.col),i=this.computeSnapTime(t.snap);return n.time(i),e=n.clone().add(this.snapDuration),{start:n,end:e}},getHitEl:function(t){return this.colEls.eq(t.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(t){return e.duration(this.minTime+this.snapDuration*t)},spanToSegs:function(t){var e,n=this.sliceRangeByTimes(t);for(e=0;e<n.length;e++)this.isRTL?n[e].col=this.daysPerRow-1-n[e].dayIndex:n[e].col=n[e].dayIndex;return n},sliceRangeByTimes:function(t){var e,n,i,r=[];for(n=0;n<this.daysPerRow;n++)(e=z(t,{start:(i=this.dayDates[n].clone()).clone().time(this.minTime),end:i.clone().time(this.maxTime)}))&&(e.dayIndex=n,r.push(e));return r},updateSize:function(t){this.slatCoordCache.build(),t&&this.updateSegVerticals()},computeDateTop:function(t,n){return this.computeTimeTop(e.duration(t-n.clone().stripTime()))},computeTimeTop:function(t){var e,n,i=this.slatEls.length,r=(t-this.minTime)/this.slotDuration;return r=Math.max(0,r),r=Math.min(i,r),e=Math.floor(r),n=r-(e=Math.min(e,i-1)),this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},renderDrag:function(t,e){if(e)return this.renderEventLocationHelper(t,e),this.applyDragOpacity(this.helperEl),!0;this.renderHighlight(this.eventToSpan(t))},unrenderDrag:function(){this.unrenderHelper(),this.unrenderHighlight()},renderEventResize:function(t,e){this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHelper()},renderHelper:function(e,n){var i,r,s,o,a=this.eventToSegs(e);for(a=this.renderFgSegEls(a),i=this.renderSegTable(a),r=0;r<a.length;r++)s=a[r],n&&n.col===s.col&&(o=n.el,s.el.css({left:o.css("left"),right:o.css("right"),"margin-left":o.css("margin-left"),"margin-right":o.css("margin-right")}));this.helperEl=t('<div class="fc-helper-skeleton"/>').append(i).appendTo(this.el)},unrenderHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderFill:function(e,n,i){var r,s,o,a,l,u,d,c,h,f;if(n.length){for(n=this.renderFillSegEls(e,n),r=this.groupSegCols(n),i=i||e.toLowerCase(),o=(s=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>')).find("tr"),a=0;a<r.length;a++)if(l=r[a],u=t("<td/>").appendTo(o),l.length)for(d=t('<div class="fc-'+i+'-container"/>').appendTo(u),c=this.getCellDate(0,a),h=0;h<l.length;h++)f=l[h],d.append(f.el.css({top:this.computeDateTop(f.start,c),bottom:-this.computeDateTop(f.end,c)}));this.bookendCells(o),this.el.append(s),this.elsByFill[e]=s}return n}});function At(t){var e,n,i=t.forwardSegs,r=0;if(void 0===t.forwardPressure){for(e=0;e<i.length;e++)At(n=i[e]),r=Math.max(r,1+n.forwardPressure);t.forwardPressure=r}}function Nt(t,e,n){n=n||[];for(var i=0;i<e.length;i++)r=t,s=e[i],r.bottom>s.top&&r.top<s.bottom&&n.push(e[i]);var r,s;return n}_t.mixin({eventSkeletonEl:null,renderFgSegs:function(e){return e=this.renderFgSegEls(e),this.el.append(this.eventSkeletonEl=t('<div class="fc-content-skeleton"/>').append(this.renderSegTable(e))),e},unrenderFgSegs:function(t){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(e){var n,i,r,s,o,a,l=t("<table><tr/></table>"),u=l.find("tr");for(n=this.groupSegCols(e),this.computeSegVerticals(e),s=0;s<n.length;s++){for(o=n[s],this.placeSlotSegs(o),a=t('<div class="fc-event-container"/>'),i=0;i<o.length;i++)(r=o[i]).el.css(this.generateSegPositionCss(r)),r.bottom-r.top<30&&r.el.addClass("fc-short"),a.append(r.el);u.append(t("<td/>").append(a))}return this.bookendCells(u),l},placeSlotSegs:function(t){var e,n,i;if(this.sortEventSegs(t),e=function(t){var e,n,i,r=[];for(e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&Nt(n,r[i]).length;i++);n.level=i,(r[i]||(r[i]=[])).push(n)}return r}(t),function(t){var e,n,i,r,s;for(e=0;e<t.length;e++)for(n=t[e],i=0;i<n.length;i++)for((r=n[i]).forwardSegs=[],s=e+1;s<t.length;s++)Nt(r,t[s],r.forwardSegs)}(e),n=e[0]){for(i=0;i<n.length;i++)At(n[i]);for(i=0;i<n.length;i++)this.computeSlotSegCoords(n[i],0,0)}},computeSlotSegCoords:function(t,e,n){var i,r=t.forwardSegs;if(void 0===t.forwardCoord)for(r.length?(this.sortForwardSlotSegs(r),this.computeSlotSegCoords(r[0],e+1,n),t.forwardCoord=r[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),i=0;i<r.length;i++)this.computeSlotSegCoords(r[i],0,t.forwardCoord)},updateSegVerticals:function(){var t,e=(this.segs||[]).concat(this.businessHourSegs||[]);for(this.computeSegVerticals(e),t=0;t<e.length;t++)e[t].el.css(this.generateSegVerticalCss(e[t]))},computeSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)(n=t[e]).top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},fgSegHtml:function(t,e){var n,i,r,s=this.view,o=t.event,a=s.isEventDraggable(o),l=!e&&t.isStart&&s.isEventResizableFromStart(o),u=!e&&t.isEnd&&s.isEventResizableFromEnd(o),d=this.getSegClasses(t,a,l||u),c=$(this.getEventSkinCss(o));return d.unshift("fc-time-grid-event","fc-v-event"),s.isMultiDayEvent(o)?(t.isStart||t.isEnd)&&(n=this.getEventTimeText(t),i=this.getEventTimeText(t,"LT"),r=this.getEventTimeText(t,null,!1)):(n=this.getEventTimeText(o),i=this.getEventTimeText(o,"LT"),r=this.getEventTimeText(o,null,!1)),'<a class="'+d.join(" ")+'"'+(o.url?' href="'+q(o.url)+'"':"")+(c?' style="'+c+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+q(r)+'" data-full="'+q(i)+'"><span>'+q(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+q(o.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(u?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},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))),this.isRTL?(e=1-s,n=r):(e=r,n=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.colCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].col].push(t[e]);return n},sortForwardSlotSegs:function(t){t.sort(Q(this,"compareForwardSlotSegs"))},compareForwardSlotSegs:function(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||this.compareEventSegs(t,e)}});var Yt=n.View=Et.extend({type:null,name:null,title:null,calendar:null,options:null,el:null,displaying:null,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isRTL:!1,isSelected:!1,eventOrderSpecs:null,scrollerEl:null,scrollTop:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,documentMousedownProxy:null,constructor:function(t,n,i,r){this.calendar=t,this.type=this.name=n,this.options=i,this.intervalDuration=r||e.duration(1,"day"),this.nextDayThreshold=e.duration(this.opt("nextDayThreshold")),this.initThemingProps(),this.initHiddenDays(),this.isRTL=this.opt("isRTL"),this.eventOrderSpecs=T(this.opt("eventOrder")),this.documentMousedownProxy=Q(this,"documentMousedown"),this.initialize()},initialize:function(){},opt:function(t){return this.options[t]},trigger:function(t,e){var n=this.calendar;return n.trigger.apply(n,[t,e||this].concat(Array.prototype.slice.call(arguments,2),[this]))},setDate:function(t){this.setRange(this.computeRange(t))},setRange:function(e){t.extend(this,e),this.updateTitle()},computeRange:function(t){var e,n,i=P(this.intervalDuration),r=t.clone().startOf(i),s=r.clone().add(this.intervalDuration);return/year|month|week|day/.test(i)?(r.stripTime(),s.stripTime()):(r.hasTime()||(r=this.calendar.time(0)),s.hasTime()||(s=this.calendar.time(0))),e=r.clone(),e=this.skipHiddenDays(e),n=s.clone(),{intervalUnit:i,intervalStart:r,intervalEnd:s,start:e,end:n=this.skipHiddenDays(n,-1,!0)}},computePrevDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(t,e){return this.intervalDuration.as("days")<=1&&this.isHiddenDay(t)&&(t=this.skipHiddenDays(t,e)).startOf("day"),t},updateTitle:function(){this.title=this.computeTitle()},computeTitle:function(){return this.formatRange({start:this.calendar.applyTimezone(this.intervalStart),end:this.calendar.applyTimezone(this.intervalEnd)},this.opt("titleFormat")||this.computeTitleFormat(),this.opt("titleRangeSeparator"))},computeTitleFormat:function(){return"year"==this.intervalUnit?"YYYY":"month"==this.intervalUnit?this.opt("monthYearFormat"):this.intervalDuration.as("days")>1?"ll":"LL"},formatRange:function(t,e,n){var i=t.end;return i.hasTime()||(i=i.clone().subtract(1)),vt(t.start,i,e,n,this.opt("isRTL"))},setElement:function(t){this.el=t,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.unrenderSkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(e){var n=this,i=null;return this.displaying&&(i=this.queryScroll()),this.calendar.freezeContentHeight(),this.clear().then((function(){return n.displaying=t.when(n.displayView(e)).then((function(){n.forceScroll(n.computeInitialScroll(i)),n.calendar.unfreezeContentHeight(),n.triggerRender()}))}))},clear:function(){var e=this,n=this.displaying;return n?n.then((function(){return e.displaying=null,e.clearEvents(),e.clearView()})):t.when()},redisplay:function(){if(this.isSkeletonRendered){var t=this.isEventsRendered;this.clearEvents(),this.clearView(),this.displayView(),t&&this.displayEvents()}},displayView:function(t){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),t&&this.setDate(t),this.render&&this.render(),this.renderDates(),this.updateSize(),this.renderBusinessHours()},clearView:function(){this.unselect(),this.triggerUnrender(),this.unrenderBusinessHours(),this.unrenderDates(),this.destroy&&this.destroy()},renderSkeleton:function(){},unrenderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},renderBusinessHours:function(){},unrenderBusinessHours:function(){},triggerRender:function(){this.trigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.trigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){t(document).on("mousedown",this.documentMousedownProxy)},unbindGlobalHandlers:function(){t(document).off("mousedown",this.documentMousedownProxy)},initThemingProps:function(){var t=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=t+"-widget-header",this.widgetContentClass=t+"-widget-content",this.highlightStateClass=t+"-state-highlight"},updateSize:function(t){var e;t&&(e=this.queryScroll()),this.updateHeight(t),this.updateWidth(t),t&&this.setScroll(e)},updateWidth:function(t){},updateHeight:function(t){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(t,e){},computeScrollerHeight:function(t){var e,n,i=this.scrollerEl;return(e=this.el.add(i)).css({position:"relative",left:-1}),n=this.el.outerHeight()-i.height(),e.css({position:"",left:""}),t-n},computeInitialScroll:function(t){return 0},queryScroll:function(){if(this.scrollerEl)return this.scrollerEl.scrollTop()},setScroll:function(t){if(this.scrollerEl)return this.scrollerEl.scrollTop(t)},forceScroll:function(t){var e=this;this.setScroll(t),setTimeout((function(){e.setScroll(t)}),0)},displayEvents:function(t){var e=this.queryScroll();this.clearEvents(),this.renderEvents(t),this.isEventsRendered=!0,this.setScroll(e),this.triggerEventRender()},clearEvents:function(){this.isEventsRendered&&(this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.isEventsRendered=!1)},renderEvents:function(t){},unrenderEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach((function(t){this.trigger("eventAfterRender",t.event,t.event,t.el)})),this.trigger("eventAfterAllRender")},triggerEventUnrender:function(){this.renderedEventSegEach((function(t){this.trigger("eventDestroy",t.event,t.event,t.el)}))},resolveEventEl:function(e,n){var i=this.trigger("eventRender",e,e,n);return!1===i?n=null:i&&!0!==i&&(n=t(i)),n},showEvent:function(t){this.renderedEventSegEach((function(t){t.el.css("visibility","")}),t)},hideEvent:function(t){this.renderedEventSegEach((function(t){t.el.css("visibility","hidden")}),t)},renderedEventSegEach:function(t,e){var n,i=this.getEventSegs();for(n=0;n<i.length;n++)e&&i[n].event._id!==e._id||i[n].el&&t.call(this,i[n])},getEventSegs:function(){return[]},isEventDraggable:function(t){var e=t.source||{};return Z(t.startEditable,e.startEditable,this.opt("eventStartEditable"),t.editable,e.editable,this.opt("editable"))},reportEventDrop:function(t,e,n,i,r){var s=this.calendar,o=s.mutateEvent(t,e,n);this.triggerEventDrop(t,o.dateDelta,(function(){o.undo(),s.reportEventChange()}),i,r),s.reportEventChange()},triggerEventDrop:function(t,e,n,i,r){this.trigger("eventDrop",i[0],t,e,n,r,{})},reportExternalDrop:function(e,n,i,r,s){var o,a,l=e.eventProps;l&&(o=t.extend({},l,n),a=this.calendar.renderEvent(o,e.stick)[0]),this.triggerExternalDrop(a,n,i,r,s)},triggerExternalDrop:function(t,e,n,i,r){this.trigger("drop",n[0],e.start,i,r),t&&this.trigger("eventReceive",null,t)},renderDrag:function(t,e){},unrenderDrag:function(){},isEventResizableFromStart:function(t){return this.opt("eventResizableFromStart")&&this.isEventResizable(t)},isEventResizableFromEnd:function(t){return this.isEventResizable(t)},isEventResizable:function(t){var e=t.source||{};return Z(t.durationEditable,e.durationEditable,this.opt("eventDurationEditable"),t.editable,e.editable,this.opt("editable"))},reportEventResize:function(t,e,n,i,r){var s=this.calendar,o=s.mutateEvent(t,e,n);this.triggerEventResize(t,o.durationDelta,(function(){o.undo(),s.reportEventChange()}),i,r),s.reportEventChange()},triggerEventResize:function(t,e,n,i,r){this.trigger("eventResize",i[0],t,e,n,r,{})},select:function(t,e){this.unselect(e),this.renderSelection(t),this.reportSelection(t,e)},renderSelection:function(t){},reportSelection:function(t,e){this.isSelected=!0,this.triggerSelect(t,e)},triggerSelect:function(t,e){this.trigger("select",null,this.calendar.applyTimezone(t.start),this.calendar.applyTimezone(t.end),e)},unselect:function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.trigger("unselect",null,t))},unrenderSelection:function(){},documentMousedown:function(e){var n;this.isSelected&&this.opt("unselectAuto")&&b(e)&&((n=this.opt("unselectCancel"))&&t(e.target).closest(n).length||this.unselect(e))},triggerDayClick:function(t,e,n){this.trigger("dayClick",e,this.calendar.applyTimezone(t.start),n)},initHiddenDays:function(){var e,n=this.opt("hiddenDays")||[],i=[],r=0;for(!1===this.opt("weekends")&&n.push(0,6),e=0;e<7;e++)(i[e]=-1!==t.inArray(e,n))||r++;if(!r)throw"invalid hiddenDays";this.isHiddenDayHash=i},isHiddenDay:function(t){return e.isMoment(t)&&(t=t.day()),this.isHiddenDayHash[t]},skipHiddenDays:function(t,e,n){var i=t.clone();for(e=e||1;this.isHiddenDayHash[(i.day()+(n?e:0)+7)%7];)i.add(e,"days");return i},computeDayRange:function(t){var e,n=t.start.clone().stripTime(),i=t.end,r=null;return i&&(r=i.clone().stripTime(),(e=+i.time())&&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 e.end.diff(e.start,"days")>1}}),Wt=n.Calendar=Et.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:function(i,r){var s=this;s.initOptions(r||{});var o=this.options;s.render=function(){h?D()&&(T(),C()):function(){o.theme?"ui":"fc",i.addClass("fc"),o.isRTL?i.addClass("fc-rtl"):i.addClass("fc-ltr");o.theme?i.addClass("ui-widget"):i.addClass("fc-unthemed");h=t("<div class='fc-view-container'/>").prependTo(i),d=s.header=new Kt(s,o),(c=d.render())&&i.prepend(c);C(o.defaultView),o.handleWindowResize&&(p=J(R,o.windowResizeDelay),t(window).resize(p))}()},s.destroy=function(){f&&f.removeElement();d.removeElement(),h.remove(),i.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),p&&t(window).unbind("resize",p)},s.refetchEvents=function(){M(),f.clearEvents(),F(),z()},s.reportEvents=function(t){E=t,k()},s.reportEventChange=function(){k()},s.rerenderEvents=k,s.changeView=C,s.select=function(t,e){f.select(s.buildSelectSpan.apply(s,arguments))},s.unselect=function(){f&&f.unselect()},s.prev=function(){v=f.computePrevDate(v),C()},s.next=function(){v=f.computeNextDate(v),C()},s.prevYear=function(){v.add(-1,"years"),C()},s.nextYear=function(){v.add(1,"years"),C()},s.today=function(){v=s.getNow(),C()},s.gotoDate=function(t){v=s.moment(t).stripZone(),C()},s.incrementDate=function(t){v.add(e.duration(t)),C()},s.zoomTo=function(t,e){var n;e=e||"day",n=s.getViewSpec(e)||s.getUnitViewSpec(e),v=t.clone(),C(n?n.type:null)},s.getDate=function(){return s.applyTimezone(v)},s.getCalendar=function(){return s},s.getView=function(){return f},s.option=function(t,e){if(void 0===e)return o[t];"height"!=t&&"contentHeight"!=t&&"aspectRatio"!=t||(o[t]=e,H(!0))},s.trigger=function(t,e){var n=Array.prototype.slice.call(arguments,2);if(e=e||w,this.triggerWith(t,e,n),o[t])return o[t].apply(e,n)};var a=N(Xt(o.lang));o.monthNames&&(a._months=o.monthNames);o.monthNamesShort&&(a._monthsShort=o.monthNamesShort);o.dayNames&&(a._weekdays=o.dayNames);o.dayNamesShort&&(a._weekdaysShort=o.dayNamesShort);if(null!=o.firstDay){var l=N(a._week);l.dow=o.firstDay,a._week=l}a._fullCalendar_weekCalc=(u=o.weekNumberCalculation,"function"==typeof u||"local"===u?u:"iso"===u||"ISO"===u?"ISO":void 0),s.defaultAllDayEventDuration=e.duration(o.defaultAllDayEventDuration),s.defaultTimedEventDuration=e.duration(o.defaultTimedEventDuration),s.moment=function(){var t;return"local"===o.timezone?(t=n.moment.apply(null,arguments)).hasTime()&&t.local():t="UTC"===o.timezone?n.moment.utc.apply(null,arguments):n.moment.parseZone.apply(null,arguments),"_locale"in t?t._locale=a:t._lang=a,t},s.getIsAmbigTimezone=function(){return"local"!==o.timezone&&"UTC"!==o.timezone},s.applyTimezone=function(t){if(!t.hasTime())return t.clone();var e,n=s.moment(t.toArray()),i=t.time()-n.time();return i&&(e=n.clone().add(i),t.time()-e.time()==0&&(n=e)),n},s.getNow=function(){var t=o.now;return"function"==typeof t&&(t=t()),s.moment(t).stripZone()},s.getEventEnd=function(t){return t.end?t.end.clone():s.getDefaultEventEnd(t.allDay,t.start)},s.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(s.defaultAllDayEventDuration):n.add(s.defaultTimedEventDuration),s.getIsAmbigTimezone()&&n.stripZone(),n},s.humanizeDuration=function(t){return(t.locale||t.lang).call(t,o.lang).humanize()},te.call(s,o);var u;var d,c,h,f,g,p,v,m=s.isFetchNeeded,y=s.fetchEvents,w=i[0],S={},b=0,E=[];v=null!=o.defaultDate?s.moment(o.defaultDate).stripZone():s.getNow();function D(){return i.is(":visible")}function C(e){b++,f&&e&&f.type!==e&&(d.deactivateButton(f.type),M(),f.removeElement(),f=s.view=null),!f&&e&&((f=s.view=S[e]||(S[e]=s.instantiateView(e))).setElement(t("<div class='fc-view fc-"+e+"-view' />").appendTo(h)),d.activateButton(e)),f&&(v=f.massageCurrentDate(v),f.displaying&&v.isWithin(f.intervalStart,f.intervalEnd)||D()&&(f.display(v),F(),d.updateTitle(f.title),s.getNow().isWithin(f.intervalStart,f.intervalEnd)?d.disableButton("today"):d.enableButton("today"),!o.lazyFetching||m(f.start,f.end)?z():k())),F(),b--}function H(t){if(D())return t&&x(),b++,f.updateSize(!0),b--,!0}function T(){D()&&x()}function x(){g="number"==typeof o.contentHeight?o.contentHeight:"number"==typeof o.height?o.height-(c?c.outerHeight(!0):0):Math.round(h.width()/Math.max(o.aspectRatio,.5))}function R(t){!b&&t.target===window&&f.start&&H(!0)&&f.trigger("windowResize",w)}function k(){D()&&(M(),f.displayEvents(E),F())}function z(){y(f.start,f.end)}function M(){h.css({width:"100%",height:h.height(),overflow:"hidden"})}function F(){h.css({width:"",height:"",overflow:""})}s.getSuggestedViewHeight=function(){return void 0===g&&T(),g},s.isHeightAuto=function(){return"auto"===o.contentHeight||"auto"===o.height},s.freezeContentHeight=M,s.unfreezeContentHeight=F,s.initialize()},initialize:function(){},initOptions:function(e){var n,i,o;n=(e=function(e){var n,i={views:e.views||{}};return t.each(e,(function(e,s){"views"!=e&&(t.isPlainObject(s)&&!/(time|duration|interval)$/i.test(e)&&-1==t.inArray(e,r)?(n=null,t.each(s,(function(t,r){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(t)?(i.views[t]||(i.views[t]={}),i.views[t][e]=r):(n||(n={}),n[t]=r)})),n&&(i[e]=n)):i[e]=s)})),i}(e)).lang,(i=jt[n])||(n=Wt.defaults.lang,i=jt[n]||{}),o=Z(e.isRTL,i.isRTL,Wt.defaults.isRTL)?Wt.rtlDefaults:{},this.dirDefaults=o,this.langDefaults=i,this.overrides=e,this.options=s([Wt.defaults,o,i,e]),$t(this.options),this.viewSpecCache={}},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var i,r,s;if(-1!=t.inArray(e,F))for(i=this.header.getViewsWithButtons(),t.each(n.views,(function(t){i.push(t)})),r=0;r<i.length;r++)if((s=this.getViewSpec(i[r]))&&s.singleUnit==e)return s},buildViewSpec:function(t){for(var n,r,o,a,l=this.overrides.views||{},u=[],d=[],c=[],h=t;h;)n=i[h],r=l[h],h=null,"function"==typeof n&&(n={class:n}),n&&(u.unshift(n),d.unshift(n.defaults||{}),o=o||n.duration,h=h||n.type),r&&(c.unshift(r),o=o||r.duration,h=h||r.type);return(n=A(u)).type=t,!!n.class&&(o&&(o=e.duration(o)).valueOf()&&(n.duration=o,a=P(o),1===o.as(a)&&(n.singleUnit=a,c.unshift(l[a]||{}))),n.defaults=s(d),n.overrides=s(c),this.buildViewSpecOptions(n),this.buildViewSpecButtonText(n,t),n)},buildViewSpecOptions:function(t){t.options=s([Wt.defaults,t.defaults,this.dirDefaults,this.langDefaults,this.overrides,t.overrides]),$t(t.options)},buildViewSpecButtonText:function(t,e){function n(n){var i=n.buttonText||{};return i[e]||(t.singleUnit?i[t.singleUnit]:null)}t.buttonTextOverride=n(this.overrides)||t.overrides.buttonText,t.buttonTextDefault=n(this.langDefaults)||n(this.dirDefaults)||t.defaults.buttonText||n(Wt.defaults)||(t.duration?this.humanizeDuration(t.duration):null)||e},instantiateView:function(t){var e=this.getViewSpec(t);return new e.class(this,t,e.options,e.duration)},isValidViewType:function(t){return Boolean(this.getViewSpec(t))},pushLoading:function(){this.loadingLevel++||this.trigger("loading",null,!0,this.view)},popLoading:function(){--this.loadingLevel||this.trigger("loading",null,!1,this.view)},buildSelectSpan:function(t,e){var n,i=this.moment(t).stripZone();return n=e?this.moment(e).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),{start:i,end:n}}});Wt.mixin(Ht),Wt.defaults={titleRangeSeparator:" — ",monthYearFormat:"MMMM YYYY",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",scrollTime:"06:00:00",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"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"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:200},Wt.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},Wt.rtlDefaults={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"}};var jt=n.langs={};n.datepickerLang=function(e,n,i){var r=jt[e]||(jt[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(Zt,(function(t,e){r[t]=e(i)})),t.datepicker&&(t.datepicker.regional[n]=t.datepicker.regional[e]=i,t.datepicker.regional.en=t.datepicker.regional[""],t.datepicker.setDefaults(i))},n.lang=function(e,n){var i,r;i=jt[e]||(jt[e]={}),n&&(i=jt[e]=s([i,n])),r=Xt(e),t.each(qt,(function(t,e){null==i[t]&&(i[t]=e(r,i))})),Wt.defaults.lang=e};var Zt={buttonText:function(t){return{prev:U(t.prevText),next:U(t.nextText),today:U(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},qt={dayOfMonthFormat:function(t,e){var n=t.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(t){return t.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}},Ut={smallDayDateFormat:function(t){return t.isRTL?"D dd":"dd D"},weekFormat:function(t){return t.isRTL?"w[ "+t.weekNumberTitle+"]":"["+t.weekNumberTitle+" ]w"},smallWeekFormat:function(t){return t.isRTL?"w["+t.weekNumberTitle+"]":"["+t.weekNumberTitle+"]w"}};function $t(e){t.each(Ut,(function(t,n){null==e[t]&&(e[t]=n(e))}))}function Xt(t){var n=e.localeData||e.langData;return n.call(e,t)||n.call(e,"en")}function Kt(e,n){var i=this;i.render=function(){var e=n.header;if(r=n.theme?"ui":"fc",e)return s=t("<div class='fc-toolbar'/>").append(a("left")).append(a("right")).append(a("center")).append('<div class="fc-clear"/>')},i.removeElement=function(){s.remove(),s=t()},i.updateTitle=function(t){s.find("h2").text(t)},i.activateButton=function(t){s.find(".fc-"+t+"-button").addClass(r+"-state-active").attr("aria-selected","true")},i.deactivateButton=function(t){s.find(".fc-"+t+"-button").removeClass(r+"-state-active").attr("aria-selected","false")},i.disableButton=function(t){s.find(".fc-"+t+"-button").attr("disabled","disabled").addClass(r+"-state-disabled")},i.enableButton=function(t){s.find(".fc-"+t+"-button").removeAttr("disabled").removeClass(r+"-state-disabled")},i.getViewsWithButtons=function(){return o};var r,s=t(),o=[];function a(i){var s=t('<div class="fc-'+i+'"/>'),a=n.header[i];return a&&t.each(a.split(" "),(function(i){var a,l=t(),u=!0;t.each(this.split(","),(function(i,s){var a,d,c,h,f,g,p,v,m;"title"==s?(l=l.add(t("<h2>&nbsp;</h2>")),u=!1):((a=(e.options.customButtons||{})[s])?(c=function(t){a.click&&a.click.call(m[0],t)},h="",f=a.text):(d=e.getViewSpec(s))?(c=function(){e.changeView(s)},o.push(s),h=d.buttonTextOverride,f=d.buttonTextDefault):e[s]&&(c=function(){e[s]()},h=(e.overrides.buttonText||{})[s],f=n.buttonText[s]),c&&(g=a?a.themeIcon:n.themeButtonIcons[s],p=a?a.icon:n.buttonIcons[s],v=h?q(h):g&&n.theme?"<span class='ui-icon ui-icon-"+g+"'></span>":p&&!n.theme?"<span class='fc-icon fc-icon-"+p+"'></span>":q(f),m=t('<button type="button" class="'+["fc-"+s+"-button",r+"-button",r+"-state-default"].join(" ")+'" tabindex="0">'+v+"</button>").click((function(t){m.hasClass(r+"-state-disabled")||(c(t),(m.hasClass(r+"-state-active")||m.hasClass(r+"-state-disabled"))&&m.removeClass(r+"-state-hover"))})).mousedown((function(){m.not("."+r+"-state-active").not("."+r+"-state-disabled").addClass(r+"-state-down")})).mouseup((function(){m.removeClass(r+"-state-down")})).hover((function(){m.not("."+r+"-state-active").not("."+r+"-state-disabled").addClass(r+"-state-hover")}),(function(){m.removeClass(r+"-state-hover").removeClass(r+"-state-down")})),l=l.add(m)))})),u&&l.first().addClass(r+"-corner-left").end().last().addClass(r+"-corner-right").end(),l.length>1?(a=t("<div/>"),u&&(a.addClass("fc-button-group"),l.first().hasClass("fc-month-button")&&(a.attr("role","region"),a.attr("aria-label","Month Week Day button group"))),a.append(l),s.append(a)):s.append(l)})),s}}n.lang("en",Wt.englishDefaults),n.sourceNormalizers=[],n.sourceFetchers=[];var Qt={dataType:"json",cache:!1},Jt=1;function te(i){var r=this;r.isFetchNeeded=function(t,e){return!s||t<s||e>o},r.fetchEvents=function(t,e){s=t,o=e,h=[];var n=++d,i=u.length;c=i;for(var r=0;r<i;r++)f(u[r],n)},r.addEventSource=function(t){var e=p(t);e&&(u.push(e),c++,f(e,d))},r.removeEventSource=function(e){u=t.grep(u,(function(t){return!v(t,e)})),h=t.grep(h,(function(t){return!v(t.source,e)})),a(h)},r.updateEvent=function(e){e.start=r.moment(e.start),e.end?e.end=r.moment(e.end):e.end=null;H(e,function(e){var n={};return t.each(e,(function(e,i){y(e)&&void 0!==i&&function(e){return/undefined|null|boolean|number|string/.test(t.type(e))}(i)&&(n[e]=i)})),n}(e)),a(h)},r.renderEvent=function(t,e){var n,i,r,s=S(t);if(s){for(n=C(s),i=0;i<n.length;i++)(r=n[i]).source||(e&&(l.events.push(r),r.source=l),h.push(r));return a(h),n}return[]},r.removeEvents=function(e){var n,i;null==e?e=function(){return!0}:t.isFunction(e)||(n=e+"",e=function(t){return t._id==n});for(h=t.grep(h,e,!0),i=0;i<u.length;i++)t.isArray(u[i].events)&&(u[i].events=t.grep(u[i].events,e,!0));a(h)},r.clientEvents=w,r.mutateEvent=H,r.normalizeEventDates=E,r.normalizeEventTimes=D;var s,o,a=r.reportEvents,l={events:[]},u=[l],d=0,c=0,h=[];function f(e,n){g(e,(function(i){var r,s,o,l=t.isArray(e.events);if(n==d){if(i)for(r=0;r<i.length;r++)s=i[r],(o=l?s:S(s,e))&&h.push.apply(h,C(o));--c||a(h)}}))}function g(e,a){var l,u,d=n.sourceFetchers;for(l=0;l<d.length;l++){if(!0===(u=d[l].call(r,e,s.clone(),o.clone(),i.timezone,a)))return;if("object"==typeof u)return void g(u,a)}var c=e.events;if(c)t.isFunction(c)?(r.pushLoading(),c.call(r,s.clone(),o.clone(),i.timezone,(function(t){a(t),r.popLoading()}))):t.isArray(c)?a(c):a();else if(e.url){var h,f=e.success,p=e.error,v=e.complete;h=t.isFunction(e.data)?e.data():e.data;var m=t.extend({},h||{}),y=Z(e.startParam,i.startParam),w=Z(e.endParam,i.endParam),S=Z(e.timezoneParam,i.timezoneParam);y&&(m[y]=s.format()),w&&(m[w]=o.format()),i.timezone&&"local"!=i.timezone&&(m[S]=i.timezone),r.pushLoading(),t.ajax(t.extend({},Qt,e,{data:m,success:function(e){e=e||[];var n=j(f,this,arguments);t.isArray(n)&&(e=n),a(e)},error:function(){j(p,this,arguments),a()},complete:function(){j(v,this,arguments),r.popLoading()}}))}else a()}function p(e){var i,s,o=n.sourceNormalizers;if(t.isFunction(e)||t.isArray(e)?i={events:e}:"string"==typeof e?i={url:e}:"object"==typeof e&&(i=t.extend({},e)),i){for(i.className?"string"==typeof i.className&&(i.className=i.className.split(/\s+/)):i.className=[],t.isArray(i.events)&&(i.origArray=i.events,i.events=t.map(i.events,(function(t){return S(t,i)}))),s=0;s<o.length;s++)o[s].call(r,i);return i}}function v(t,e){return t&&e&&m(t)==m(e)}function m(t){return("object"==typeof t?t.origArray||t.googleCalendarId||t.url||t.events:null)||t}function y(t){return!/^_|^(id|allDay|start|end)$/.test(t)}function w(e){return t.isFunction(e)?t.grep(h,e):null!=e?(e+="",t.grep(h,(function(t){return t._id==e}))):h}function S(n,s){var o,a,l,u={};if(i.eventDataTransform&&(n=i.eventDataTransform(n)),s&&s.eventDataTransform&&(n=s.eventDataTransform(n)),t.extend(u,n),s&&(u.source=s),u._id=n._id||(void 0===n.id?"_fc"+Jt++:n.id+""),n.className?"string"==typeof n.className?u.className=n.className.split(/\s+/):u.className=n.className:u.className=[],o=n.start||n.date,a=n.end,O(o)&&(o=e.duration(o)),O(a)&&(a=e.duration(a)),n.dow||e.isDuration(o)||e.isDuration(a))u.start=o?e.duration(o):null,u.end=a?e.duration(a):null,u._recurring=!0;else{if(o&&!(o=r.moment(o)).isValid())return!1;a&&((a=r.moment(a)).isValid()||(a=null)),void 0===(l=n.allDay)&&(l=Z(s?s.allDayDefault:void 0,i.allDayDefault)),b(o,a,l,u)}return u}function b(t,e,n,i){i.start=t,i.end=e,i.allDay=n,E(i),ee(i)}function E(t){D(t),t.end&&!t.end.isAfter(t.start)&&(t.end=null),t.end||(i.forceEventDuration?t.end=r.getDefaultEventEnd(t.allDay,t.start):t.end=null)}function D(t){null==t.allDay&&(t.allDay=!(t.start.hasTime()||t.end&&t.end.hasTime())),t.allDay?(t.start.stripTime(),t.end&&t.end.stripTime()):(t.start.hasTime()||(t.start=r.applyTimezone(t.start.time(0))),t.end&&!t.end.hasTime()&&(t.end=r.applyTimezone(t.end.time(0))))}function C(e,n,i){var r,a,l,u,d,c,h,f,g,p=[];if(n=n||s,i=i||o,e)if(e._recurring){if(a=e.dow)for(r={},l=0;l<a.length;l++)r[a[l]]=!0;for(u=n.clone().stripTime();u.isBefore(i);)r&&!r[u.day()]||(d=e.start,c=e.end,h=u.clone(),f=null,d&&(h=h.time(d)),c&&(f=u.clone().time(c)),b(h,f,!d&&!c,g=t.extend({},e)),p.push(g)),u.add(1,"days")}else p.push(e);return p}function H(n,i,s){var o,a,l,u,d,c={};function h(t,n){return s?G(t,n,s):i.allDay?(r=t,o=n,e.duration({days:r.clone().stripTime().diff(o.clone().stripTime(),"days")})):L(t,n);var r,o}return(i=i||{}).start||(i.start=n.start.clone()),void 0===i.end&&(i.end=n.end?n.end.clone():null),null==i.allDay&&(i.allDay=n.allDay),E(i),E(o={start:n._start.clone(),end:n._end?n._end.clone():r.getDefaultEventEnd(n._allDay,n._start),allDay:i.allDay}),a=null!==n._end&&null===i.end,l=h(i.start,o.start),u=i.end?h(i.end,o.end).subtract(l):null,t.each(i,(function(t,e){y(t)&&void 0!==e&&(c[t]=e)})),d=function(e,n,i,s,o,a){var l=r.getIsAmbigTimezone(),u=[];s&&!s.valueOf()&&(s=null);o&&!o.valueOf()&&(o=null);return t.each(e,(function(e,d){var c,h;c={start:d.start.clone(),end:d.end?d.end.clone():null,allDay:d.allDay},t.each(a,(function(t){c[t]=d[t]})),E(h={start:d._start,end:d._end,allDay:i}),n?h.end=null:o&&!h.end&&(h.end=r.getDefaultEventEnd(h.allDay,h.start)),s&&(h.start.add(s),h.end&&h.end.add(s)),o&&h.end.add(o),l&&!h.allDay&&(s||o)&&(h.start.stripZone(),h.end&&h.end.stripZone()),t.extend(d,a,h),ee(d),u.push((function(){t.extend(d,c),ee(d)}))})),function(){for(var t=0;t<u.length;t++)u[t]()}}(w(n._id),a,i.allDay,l,u,c),{dateDelta:l,durationDelta:u,undo:d}}function T(e){var n,s=i.businessHours,o=r.getView();return s&&(n=t.extend({},{className:"fc-nonbusiness",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},"object"==typeof s?s:{})),n?(e&&(n.start=null,n.end=null),C(S(n),o.start,o.end)):[]}function x(t,e){var n=e.source||{};return k(t,Z(e.constraint,n.constraint,i.eventConstraint),Z(e.overlap,n.overlap,i.eventOverlap),e)}function R(t){return k(t,i.selectConstraint,i.selectOverlap)}function k(t,e,n,i){var s,o,a,l,u,d;if(null!=e){for(s=function(t){if("businessHours"===t)return T();if("object"==typeof t)return C(S(t));return w(t)}(e),o=!1,l=0;l<s.length;l++)if(z(s[l],t)){o=!0;break}if(!o)return!1}for(a=r.getPeerEvents(t,i),l=0;l<a.length;l++)if(M(u=a[l],t)){if(!1===n)return!1;if("function"==typeof n&&!n(u,i))return!1;if(i){if(!1===(d=Z(u.overlap,(u.source||{}).overlap)))return!1;if("function"==typeof d&&!d(i,u))return!1}}return!0}function z(t,e){var n=t.start.clone().stripZone(),i=r.getEventEnd(t).stripZone();return e.start>=n&&e.end<=i}function M(t,e){var n=t.start.clone().stripZone(),i=r.getEventEnd(t).stripZone();return e.start<i&&e.end>n}t.each((i.events?[i.events]:[]).concat(i.eventSources||[]),(function(t,e){var n=p(e);n&&u.push(n)})),r.getBusinessHoursEvents=T,r.isEventSpanAllowed=x,r.isExternalSpanAllowed=function(e,n,i){var r,s;i&&(r=t.extend({},i,n),s=C(S(r))[0]);return s?x(e,s):R(e)},r.isSelectionSpanAllowed=R,r.getEventCache=function(){return h}}function ee(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}Wt.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;n<r.length;n++)i=r[n],e&&e._id===i._id||s.push(i);return s};var ne=n.BasicView=Yt.extend({dayGridClass:Vt,dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid()},instantiateDayGrid:function(){return new(this.dayGridClass.extend(ie))(this)},setRange:function(t){Yt.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=Yt.prototype.computeRange.call(this,t);return/year|month/.test(e.intervalUnit)&&(e.start.startOf("week"),e.start=this.skipHiddenDays(e.start),e.end.weekday()&&(e.end.add(1,"week").startOf("week"),e.end=this.skipHiddenDays(e.end,-1,!0))),e},renderDates:function(){this.dayNumbersVisible=this.dayGrid.rowCnt>1,this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scrollerEl=this.el.find(".fc-day-grid-container"),this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"><div class="fc-day-grid-container"><div class="fc-day-grid"/></div></td></tr></tbody></table>'},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=h(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,i=this.opt("eventLimit");g(this.scrollerEl),a(this.headRowEl),this.dayGrid.removeSegPopover(),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&&f(this.scrollerEl,n)&&(o(this.headRowEl,y(this.scrollerEl)),n=this.computeScrollerHeight(t),this.scrollerEl.height(n))},setGridHeight:function(t,e){e?c(this.dayGrid.rowEls):d(this.dayGrid.rowEls,t,!0)},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(t,e){return this.dayGrid.queryHit(t,e)},getHitSpan:function(t){return this.dayGrid.getHitSpan(t)},getHitEl:function(t){return this.dayGrid.getHitEl(t)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),ie={renderHeadIntroHtml:function(){var t=this.view;return t.weekNumbersVisible?'<th class="fc-week-number '+t.widgetHeaderClass+'" '+t.weekNumberStyleAttr()+"><span>"+q(t.opt("weekNumberTitle"))+"</span></th>":""},renderNumberIntroHtml:function(t){var e=this.view;return e.weekNumbersVisible?'<td class="fc-week-number" '+e.weekNumberStyleAttr()+"><span>"+this.getCellDate(t,0).format("w")+"</span></td>":""},renderBgIntroHtml:function(){var t=this.view;return t.weekNumbersVisible?'<td class="fc-week-number '+t.widgetContentClass+'" '+t.weekNumberStyleAttr()+"></td>":""},renderIntroHtml:function(){var t=this.view;return t.weekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"></td>":""}},re=n.MonthView=ne.extend({computeRange:function(t){var e,n=ne.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),d(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){var t=this.opt("weekMode");return t?"fixed"===t:this.opt("fixedWeekCount")}});i.basic={class:ne},i.basicDay={type:"basic",duration:{days:1}},i.basicWeek={type:"basic",duration:{weeks:1}},i.month={class:re,duration:{months:1},defaults:{fixedWeekCount:!0}};var se=n.AgendaView=Yt.extend({timeGridClass:_t,timeGrid:null,dayGridClass:Vt,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid())},instantiateTimeGrid:function(){return new(this.timeGridClass.extend(oe))(this)},instantiateDayGrid:function(){return new(this.dayGridClass.extend(ae))(this)},setRange:function(t){Yt.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.setElement(this.el.find(".fc-time-grid")),this.timeGrid.renderDates(),this.bottomRuleEl=t('<hr class="fc-divider '+this.widgetHeaderClass+'"/>').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 *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement())},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+'<div class="fc-time-grid-container"><div class="fc-time-grid"/></div></td></tr></tbody></table>'},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(t){this.timeGrid.updateSize(t),Yt.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=h(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",""),g(this.scrollerEl),a(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),(n=this.opt("eventLimit"))&&"number"!=typeof n&&(n=le),n&&this.dayGrid.limitRows(n)),e||(i=this.computeScrollerHeight(t),f(this.scrollerEl,i)?(o(this.noScrollRowEls,y(this.scrollerEl)),i=this.computeScrollerHeight(t),this.scrollerEl.height(i)):(this.scrollerEl.height(i).css("overflow","hidden"),this.bottomRuleEl.show()))},computeInitialScroll:function(){var t=e.duration(this.opt("scrollTime")),n=this.timeGrid.computeTimeTop(t);return(n=Math.ceil(n))&&n++,n},prepareHits:function(){this.timeGrid.prepareHits(),this.dayGrid&&this.dayGrid.prepareHits()},releaseHits:function(){this.timeGrid.releaseHits(),this.dayGrid&&this.dayGrid.releaseHits()},queryHit:function(t,e){var n=this.timeGrid.queryHit(t,e);return!n&&this.dayGrid&&(n=this.dayGrid.queryHit(t,e)),n},getHitSpan:function(t){return t.component.getHitSpan(t)},getHitEl:function(t){return t.component.getHitEl(t)},renderEvents:function(t){var e,n=[],i=[];for(e=0;e<t.length;e++)t[e].allDay?n.push(t[e]):i.push(t[e]);this.timeGrid.renderEvents(i),this.dayGrid&&this.dayGrid.renderEvents(n),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},unrenderEvents:function(){this.timeGrid.unrenderEvents(),this.dayGrid&&this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return t.start.hasTime()?this.timeGrid.renderDrag(t,e):this.dayGrid?this.dayGrid.renderDrag(t,e):void 0},unrenderDrag:function(){this.timeGrid.unrenderDrag(),this.dayGrid&&this.dayGrid.unrenderDrag()},renderSelection:function(t){t.start.hasTime()||t.end.hasTime()?this.timeGrid.renderSelection(t):this.dayGrid&&this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.timeGrid.unrenderSelection(),this.dayGrid&&this.dayGrid.unrenderSelection()}}),oe={renderHeadIntroHtml:function(){var t,e=this.view;return e.opt("weekNumbers")?(t=this.start.format(e.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+"><span>"+q(t)+"</span></th>"):'<th class="fc-axis '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},ae={renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"><span>"+(t.opt("allDayHtml")||q(t.opt("allDayText")))+"</span></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},le=5,ue=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];return i.agenda={class:se,defaults:{allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},i.agendaDay={type:"agenda",duration:{days:1}},i.agendaWeek={type:"agenda",duration:{weeks:1}},n}));
//# sourceMappingURL=fullcalendar-bundle.js.map
