Файл: assets/plugins/fullcalendar-2.6.1/fullcalendar.min.js
Строк: 7034
<?php
/*!
* FullCalendar v2.6.1
* Docs & License: http://fullcalendar.io/
* (c) 2015 Adam Shaw
*/
!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){function n(t){return _(t,Yt)}function i(e){var n,i={views:e.views||{}};return t.each(e,function(e,r){"views"!=e&&(t.isPlainObject(r)&&!/(time|duration|interval)$/i.test(e)&&-1==t.inArray(e,Yt)?(n=null,t.each(r,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]=r)}),i}function r(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 s(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function o(){t("body").addClass("fc-not-allowed")}function a(){t("body").removeClass("fc-not-allowed")}function l(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],a=[],l=[],d=0;u(e),e.each(function(n,i){var u=n===e.length-1?s:r,c=t(i).outerHeight(!0);u>c?(o.push(i),a.push(c),l.push(t(i).height())):d+=c}),i&&(n-=d,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=l[e],c=i-(u-d);i>u&&t(n).height(c)})}function u(t){t.height("")}function d(e){var n=0;return e.find("> span").each(function(e,i){var r=t(i).outerWidth();r>n&&(n=r)}),n++,e.width(n),n}function c(t,e){return t.height(e).addClass("fc-scroller"),t[0].scrollHeight-1>t[0].clientHeight?!0:(h(t),!1)}function h(t){t.height("").removeClass("fc-scroller")}function f(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 g(t){var e=t.offset();return{left:e.left,right:e.left+t.outerWidth(),top:e.top,bottom:e.top+t.outerHeight()}}function p(t){var e=t.offset(),n=v(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 m(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()}}function v(t){var e=t.innerWidth()-t[0].clientWidth,n={left:0,right:0,top:0,bottom:t.innerHeight()-t[0].clientHeight};return y()&&"rtl"==t.css("direction")?n.left=e:n.right=e,n}function y(){return null===Wt&&(Wt=w()),Wt}function w(){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(),i=n.offset().left>e.offset().left;return e.remove(),i}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:!1}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++)i=s[n],"string"==typeof i?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 I(t,e){var n,i,r,s,o=t.start,a=t.end,l=e.start,u=e.end;return a>l&&u>o?(o>=l?(n=o.clone(),r=!0):(n=l.clone(),r=!1),u>=a?(i=a.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}):void 0}function G(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function M(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days")})}function N(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function F(t,e){var n,i,r;for(n=0;n<Zt.length&&(i=Zt[n],r=z(i,t,e),!(r>=1&&et(r)));n++);return i}function z(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 B(t,e,n){var i;return P(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&et(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function L(t,e){var n,i;return P(t)||P(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&et(n)&&Math.abs(i)>=1&&et(i)?n/i:t.asDays()/e.asDays())}function V(t,n){var i;return P(t)?e.duration(t*n):(i=t.asMonths(),Math.abs(i)>=1&&et(i)?e.duration({months:i*n}):e.duration({days:t.asDays()*n}))}function P(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function O(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function A(t){return/^d+:d+(?::d+.?(?:d{3})?)?$/.test(t)}function _(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(o=t[s][i],"object"==typeof o)r.unshift(o);else if(void 0!==o){l[i]=o;break}r.length&&(l[i]=_(r))}for(n=t.length-1;n>=0;n--){a=t[n];for(i in a)i in l||(l[i]=a[i])}return l}function Y(t){var e=function(){};return e.prototype=t,new e}function W(t,e){for(var n in t)Z(t,n)&&(e[n]=t[n])}function j(t,e){var n,i,r=["constructor","toString","valueOf"];for(n=0;n<r.length;n++)i=r[n],t[i]!==Object.prototype[i]&&(e[i]=t[i])}function Z(t,e){return Xt.call(t,e)}function U(e){return/undefined|null|boolean|number|string/.test(t.type(e))}function q(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 $(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}function X(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/n/g,"<br />")}function Q(t){return t.replace(/&.*?;/g,"")}function K(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function J(t){return t.charAt(0).toUpperCase()+t.slice(1)}function tt(t,e){return t-e}function et(t){return t%1===0}function nt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function it(t,e){var n,i,r,s,o=function(){var a=+new Date-s;e>a&&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))}}function rt(n,i,r){var s,o,a,l,u=n[0],d=1==n.length&&"string"==typeof u;return e.isMoment(u)?(l=e.apply(null,n),ot(u,l)):O(u)||void 0===u?l=e.apply(null,n):(s=!1,o=!1,d?Qt.test(u)?(u+="-01",n=[u],s=!0,o=!0):(a=Kt.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._fullCalendar=!0,l}function st(t,n){var i,r,s=!1,o=!1,a=t.length,l=[];for(i=0;a>i;i++)r=t[i],e.isMoment(r)||(r=Pa.moment.parseZone(r)),s=s||r._ambigTime,o=o||r._ambigZone,l.push(r);for(i=0;a>i;i++)r=l[i],n||!s||r._ambigTime?o&&!r._ambigZone&&(l[i]=r.clone().stripZone()):l[i]=r.clone().stripTime();return l}function ot(t,e){t._ambigTime?e._ambigTime=!0:e._ambigTime&&(e._ambigTime=!1),t._ambigZone?e._ambigZone=!0:e._ambigZone&&(e._ambigZone=!1)}function at(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 lt(t,e){return te.format.call(t,e)}function ut(t,e){return dt(t,pt(e))}function dt(t,e){var n,i="";for(n=0;n<e.length;n++)i+=ct(t,e[n]);return i}function ct(t,e){var n,i;return"string"==typeof e?e:(n=e.token)?ee[n]?ee[n](t):lt(t,n):e.maybe&&(i=dt(t,e.maybe),i.match(/[1-9]/))?i:""}function ht(t,e,n,i,r){var s;return t=Pa.moment.parseZone(t),e=Pa.moment.parseZone(e),s=(t.localeData||t.lang).call(t),n=s.longDateFormat(n)||n,i=i||" - ",ft(t,e,pt(n),i,r)}function ft(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&&(s=gt(t,e,u,d,n[o]),s!==!1);o++)c+=s;for(a=n.length-1;a>o&&(s=gt(t,e,u,d,n[a]),s!==!1);a--)h=s+h;for(l=o;a>=l;l++)f+=ct(t,n[l]),g+=ct(e,n[l]);return(f||g)&&(p=r?g+i+f:f+i+g),c+p+h}function gt(t,e,n,i,r){var s,o;return"string"==typeof r?r:(s=r.token)&&(o=ne[s.charAt(0)],o&&n.isSame(i,o))?lt(t,s):!1}function pt(t){return t in ie?ie[t]:ie[t]=mt(t)}function mt(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:mt(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push(e[5]);return n}function vt(){}function yt(t,e){var n;return Z(e,"constructor")&&(n=e.constructor),"function"!=typeof n&&(n=e.constructor=function(){t.apply(this,arguments)}),n.prototype=Y(t.prototype),W(e,n.prototype),j(e,n.prototype),W(t,n),n}function wt(t,e){W(e.prototype||e,t.prototype)}function St(t,e){return t||e?t&&e?t.component===e.component&&bt(t,e)&&bt(e,t):!1:!0}function bt(t,e){for(var n in t)if(!/^(component|left|right|top|bottom)$/.test(n)&&t[n]!==e[n])return!1;return!0}function Et(t){var e=Ct(t);return"background"===e||"inverse-background"===e}function Dt(t){return"inverse-background"===Ct(t)}function Ct(t){return $((t.source||{}).rendering,t.rendering)}function Ht(t){var e,n,i={};for(e=0;e<t.length;e++)n=t[e],(i[n._id]||(i[n._id]=[])).push(n);return i}function Tt(t,e){return t.start-e.start}function xt(n){var i,r,s,o,a=Pa.dataAttrPrefix;return a&&(a+="-"),i=n.data(a+"event")||null,i&&(i="object"==typeof i?t.extend({},i):{},r=i.start,null==r&&(r=i.time),s=i.duration,o=i.stick,delete i.start,delete i.time,delete i.duration,delete i.stick),null==r&&(r=n.data(a+"start")),null==r&&(r=n.data(a+"time")),null==s&&(s=n.data(a+"duration")),null==o&&(o=n.data(a+"stick")),r=null!=r?e.duration(r):null,s=null!=s?e.duration(s):null,o=Boolean(o),{eventProps:i,startTime:r,duration:s,stick:o}}function Rt(t,e){var n,i;for(n=0;n<e.length;n++)if(i=e[n],i.leftCol<=t.rightCol&&i.rightCol>=t.leftCol)return!0;return!1}function kt(t,e){return t.leftCol-e.leftCol}function It(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}function Gt(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],r.forwardSegs=[],s=e+1;s<t.length;s++)Nt(r,t[s],r.forwardSegs)}function Mt(t){var e,n,i=t.forwardSegs,r=0;if(void 0===t.forwardPressure){for(e=0;e<i.length;e++)n=i[e],Mt(n),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++)Ft(t,e[i])&&n.push(e[i]);return n}function Ft(t,e){return t.bottom>e.top&&t.top<e.bottom}function zt(n,i){function r(){X?a()&&(d(),l()):s()}function s(){Q=j.theme?"ui":"fc",n.addClass("fc"),j.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),j.theme?n.addClass("ui-widget"):n.addClass("fc-unthemed"),X=t("<div class='fc-view-container'/>").prependTo(n),q=W.header=new Vt(W,j),$=q.render(),$&&n.prepend($),l(j.defaultView),j.handleWindowResize&&(tt=it(h,j.windowResizeDelay),t(window).resize(tt))}function o(){K&&K.removeElement(),q.removeElement(),X.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),tt&&t(window).unbind("resize",tt)}function a(){return n.is(":visible")}function l(e){at++,K&&e&&K.type!==e&&(q.deactivateButton(K.type),L(),K.removeElement(),K=W.view=null),!K&&e&&(K=W.view=ot[e]||(ot[e]=W.instantiateView(e)),K.setElement(t("<div class='fc-view fc-"+e+"-view' />").appendTo(X)),q.activateButton(e)),K&&(et=K.massageCurrentDate(et),K.displaying&&et.isWithin(K.intervalStart,K.intervalEnd)||a()&&(K.display(et),V(),S(),b(),m())),V(),at--}function u(t){return a()?(t&&c(),at++,K.updateSize(!0),at--,!0):void 0}function d(){a()&&c()}function c(){J="number"==typeof j.contentHeight?j.contentHeight:"number"==typeof j.height?j.height-($?$.outerHeight(!0):0):Math.round(X.width()/Math.max(j.aspectRatio,.5))}function h(t){!at&&t.target===window&&K.start&&u(!0)&&K.trigger("windowResize",st)}function f(){p(),v()}function g(){a()&&(L(),K.displayEvents(lt),V())}function p(){L(),K.clearEvents(),V()}function m(){!j.lazyFetching||nt(K.start,K.end)?v():g()}function v(){rt(K.start,K.end)}function y(t){lt=t,g()}function w(){g()}function S(){q.updateTitle(K.title)}function b(){var t=W.getNow();t.isWithin(K.intervalStart,K.intervalEnd)?q.disableButton("today"):q.enableButton("today")}function E(t,e){K.select(W.buildSelectSpan.apply(W,arguments))}function D(){K&&K.unselect()}function C(){et=K.computePrevDate(et),l()}function H(){et=K.computeNextDate(et),l()}function T(){et.add(-1,"week"),l()}function x(){et.add(1,"week"),l()}function R(){et.add(-1,"month"),l()}function k(){et.add(1,"month"),l()}function I(){et.add(-1,"years"),l()}function G(){et.add(1,"years"),l()}function M(){et=W.getNow(),l()}function N(t){et=W.moment(t).stripZone(),l()}function F(t){et.add(e.duration(t)),l()}function z(t,e){var n;e=e||"day",n=W.getViewSpec(e)||W.getUnitViewSpec(e),et=t.clone(),l(n?n.type:null)}function B(){return W.applyTimezone(et)}function L(){X.css({width:"100%",height:X.height(),overflow:"hidden"})}function V(){X.css({width:"",height:"",overflow:""})}function P(){return W}function O(){return K}function A(t,e){return void 0===e?j[t]:void(("height"==t||"contentHeight"==t||"aspectRatio"==t)&&(j[t]=e,u(!0)))}function _(t,e){var n=Array.prototype.slice.call(arguments,2);return e=e||st,this.triggerWith(t,e,n),j[t]?j[t].apply(e,n):void 0}var W=this;W.initOptions(i||{});var j=this.options;W.render=r,W.destroy=o,W.refetchEvents=f,W.reportEvents=y,W.reportEventChange=w,W.rerenderEvents=g,W.changeView=l,W.select=E,W.unselect=D,W.prev=C,W.next=H,W.prevWeek=T,W.nextWeek=x,W.prevMonth=R,W.nextMonth=k,W.prevYear=I,W.nextYear=G,W.today=M,W.gotoDate=N,W.incrementDate=F,W.zoomTo=z,W.getDate=B,W.getCalendar=P,W.getView=O,W.option=A,W.trigger=_;var Z=Y(Lt(j.lang));if(j.monthNames&&(Z._months=j.monthNames),j.monthNamesShort&&(Z._monthsShort=j.monthNamesShort),j.dayNames&&(Z._weekdays=j.dayNames),j.dayNamesShort&&(Z._weekdaysShort=j.dayNamesShort),null!=j.firstDay){var U=Y(Z._week);U.dow=+j.firstDay,Z._week=U}Z._fullCalendar_weekCalc=function(t){return"function"==typeof t?t:"local"===t?t:"iso"===t||"ISO"===t?"ISO":void 0}(j.weekNumberCalculation),W.defaultAllDayEventDuration=e.duration(j.defaultAllDayEventDuration),W.defaultTimedEventDuration=e.duration(j.defaultTimedEventDuration),W.moment=function(){var t;return"local"===j.timezone?(t=Pa.moment.apply(null,arguments),t.hasTime()&&t.local()):t="UTC"===j.timezone?Pa.moment.utc.apply(null,arguments):Pa.moment.parseZone.apply(null,arguments),"_locale"in t?t._locale=Z:t._lang=Z,t},W.getIsAmbigTimezone=function(){return"local"!==j.timezone&&"UTC"!==j.timezone},W.applyTimezone=function(t){if(!t.hasTime())return t.clone();var e,n=W.moment(t.toArray()),i=t.time()-n.time();return i&&(e=n.clone().add(i),t.time()-e.time()===0&&(n=e)),n},W.getNow=function(){var t=j.now;return"function"==typeof t&&(t=t()),W.moment(t).stripZone()},W.getEventEnd=function(t){return t.end?t.end.clone():W.getDefaultEventEnd(t.allDay,t.start)},W.getDefaultEventEnd=function(t,n){var i=n.clone();return t?i.add(e.duration({minute:1})):i.add(W.defaultTimedEventDuration),W.getIsAmbigTimezone()&&i.stripZone(),i},W.humanizeDuration=function(t){return(t.locale||t.lang).call(t,j.lang).humanize()},Pt.call(W,j);var q,$,X,Q,K,J,tt,et,nt=W.isFetchNeeded,rt=W.fetchEvents,st=n[0],ot={},at=0,lt=[];et=null!=j.defaultDate?W.moment(j.defaultDate).stripZone():W.getNow(),W.getSuggestedViewHeight=function(){return void 0===J&&d(),J},W.isHeightAuto=function(){return"auto"===j.contentHeight||"auto"===j.height},W.freezeContentHeight=L,W.unfreezeContentHeight=V,W.initialize()}function Bt(e){t.each(we,function(t,n){null==e[t]&&(e[t]=n(e))})}function Lt(t){var n=e.localeData||e.langData;return n.call(e,t)||n.call(e,"en")}function Vt(e,n){function i(){var e=n.header;return f=n.theme?"ui":"fc",e?g=t("<div class='fc-toolbar'/>").append(s("left")).append(s("right")).append(s("center")).append('<div class="fc-clear"/>'):void 0}function r(){g.remove(),g=t()}function s(i){var r=t('<div class="fc-'+i+'"/>'),s=n.header[i];return s&&t.each(s.split(" "),function(i){var s,o=t(),a=!0;t.each(this.split(","),function(i,r){var s,l,u,d,c,h,g,m,v,y;"title"==r?(o=o.add(t("<h2> </h2>")),a=!1):((s=(e.options.customButtons||{})[r])?(u=function(t){s.click&&s.click.call(y[0],t)},d="",c=s.text):(l=e.getViewSpec(r))?(u=function(){e.changeView(r)},p.push(r),d=l.buttonTextOverride,c=l.buttonTextDefault):e[r]&&(u=function(){e[r]()},d=(e.overrides.buttonText||{})[r],c=n.buttonText[r]),u&&(h=s?s.themeIcon:n.themeButtonIcons[r],g=s?s.icon:n.buttonIcons[r],m=d?X(d):h&&n.theme?"<span class='ui-icon ui-icon-"+h+"'></span>":g&&!n.theme?"<span class='fc-icon fc-icon-"+g+"'></span>":X(c),v=["fc-"+r+"-button",f+"-button",f+"-state-default"],y=t('<button type="button" class="'+v.join(" ")+'">'+m+"</button>").click(function(t){y.hasClass(f+"-state-disabled")||(u(t),(y.hasClass(f+"-state-active")||y.hasClass(f+"-state-disabled"))&&y.removeClass(f+"-state-hover"))}).mousedown(function(){y.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-down")}).mouseup(function(){y.removeClass(f+"-state-down")}).hover(function(){y.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-hover")},function(){y.removeClass(f+"-state-hover").removeClass(f+"-state-down")}),o=o.add(y)))}),a&&o.first().addClass(f+"-corner-left").end().last().addClass(f+"-corner-right").end(),o.length>1?(s=t("<div/>"),a&&s.addClass("fc-button-group"),s.append(o),r.append(s)):r.append(o)}),r}function o(t){g.find("h2").text(t)}function a(t){g.find(".fc-"+t+"-button").addClass(f+"-state-active")}function l(t){g.find(".fc-"+t+"-button").removeClass(f+"-state-active")}function u(t){g.find(".fc-"+t+"-button").attr("disabled","disabled").addClass(f+"-state-disabled")}function d(t){g.find(".fc-"+t+"-button").removeAttr("disabled").removeClass(f+"-state-disabled")}function c(){return p}var h=this;h.render=i,h.removeElement=r,h.updateTitle=o,h.activateButton=a,h.deactivateButton=l,h.disableButton=u,h.enableButton=d,h.getViewsWithButtons=c;var f,g=t(),p=[]}function Pt(n){function i(t,e){return!L||L>t||e>V}function r(t,e){L=t,V=e,j=[];var n=++Y,i=_.length;W=i;for(var r=0;i>r;r++)s(_[r],n)}function s(e,n){o(e,function(i){var r,s,o,a=t.isArray(e.events);if(n==Y){if(i)for(r=0;r<i.length;r++)s=i[r],o=a?s:y(s,e),o&&j.push.apply(j,E(o));W--,W||P(j)}})}function o(e,i){var r,s,a=Pa.sourceFetchers;for(r=0;r<a.length;r++){if(s=a[r].call(B,e,L.clone(),V.clone(),n.timezone,i),s===!0)return;if("object"==typeof s)return void o(s,i)}var l=e.events;if(l)t.isFunction(l)?(B.pushLoading(),l.call(B,L.clone(),V.clone(),n.timezone,function(t){i(t),B.popLoading()})):t.isArray(l)?i(l):i();else{var u=e.url;if(u){var d,c=e.success,h=e.error,f=e.complete;d=t.isFunction(e.data)?e.data():e.data;var g=t.extend({},d||{}),p=$(e.startParam,n.startParam),m=$(e.endParam,n.endParam),v=$(e.timezoneParam,n.timezoneParam);p&&(g[p]=L.format()),m&&(g[m]=V.format()),n.timezone&&"local"!=n.timezone&&(g[v]=n.timezone),B.pushLoading(),t.ajax(t.extend({},Se,e,{data:g,success:function(e){e=e||[];var n=q(c,this,arguments);t.isArray(n)&&(e=n),i(e)},error:function(){q(h,this,arguments),i()},complete:function(){q(f,this,arguments),B.popLoading()}}))}else i()}}function a(t){var e=l(t);e&&(_.push(e),W++,s(e,Y))}function l(e){var n,i,r=Pa.sourceNormalizers;if(t.isFunction(e)||t.isArray(e)?n={events:e}:"string"==typeof e?n={url:e}:"object"==typeof e&&(n=t.extend({},e)),n){for(n.className?"string"==typeof n.className&&(n.className=n.className.split(/s+/)):n.className=[],t.isArray(n.events)&&(n.origArray=n.events,n.events=t.map(n.events,function(t){return y(t,n)})),i=0;i<r.length;i++)r[i].call(B,n);return n}}function u(e){_=t.grep(_,function(t){return!d(t,e)}),j=t.grep(j,function(t){return!d(t.source,e)}),P(j)}function d(t,e){return t&&e&&c(t)==c(e)}function c(t){return("object"==typeof t?t.origArray||t.googleCalendarId||t.url||t.events:null)||t}function h(t){t.start=B.moment(t.start),t.end?t.end=B.moment(t.end):t.end=null,D(t,f(t)),P(j)}function f(e){var n={};return t.each(e,function(t,e){g(t)&&void 0!==e&&U(e)&&(n[t]=e)}),n}function g(t){return!/^_|^(id|allDay|start|end)$/.test(t)}function p(t,e){var n,i,r,s=y(t);if(s){for(n=E(s),i=0;i<n.length;i++)r=n[i],r.source||(e&&(O.events.push(r),r.source=O),j.push(r));return P(j),n}return[]}function m(e){var n,i;for(null==e?e=function(){return!0}:t.isFunction(e)||(n=e+"",e=function(t){return t._id==n}),j=t.grep(j,e,!0),i=0;i<_.length;i++)t.isArray(_[i].events)&&(_[i].events=t.grep(_[i].events,e,!0));P(j)}function v(e){return t.isFunction(e)?t.grep(j,e):null!=e?(e+="",t.grep(j,function(t){return t._id==e})):j}function y(i,r){var s,o,a,l={};if(n.eventDataTransform&&(i=n.eventDataTransform(i)),r&&r.eventDataTransform&&(i=r.eventDataTransform(i)),t.extend(l,i),r&&(l.source=r),l._id=i._id||(void 0===i.id?"_fc"+be++:i.id+""),i.className?"string"==typeof i.className?l.className=i.className.split(/s+/):l.className=i.className:l.className=[],s=i.start||i.date,o=i.end,A(s)&&(s=e.duration(s)),A(o)&&(o=e.duration(o)),i.dow||e.isDuration(s)||e.isDuration(o))l.start=s?e.duration(s):null,l.end=o?e.duration(o):null,l._recurring=!0;else{if(s&&(s=B.moment(s),!s.isValid()))return!1;o&&(o=B.moment(o),o.isValid()||(o=null)),a=i.allDay,void 0===a&&(a=$(r?r.allDayDefault:void 0,n.allDayDefault)),w(s,o,a,l)}return l}function w(t,e,n,i){i.start=t,i.end=e,i.allDay=n,S(i),Ot(i)}function S(t){b(t),t.end&&!t.end.isAfter(t.start)&&(t.end=null),t.end||(n.forceEventDuration?t.end=B.getDefaultEventEnd(t.allDay,t.start):t.end=null)}function b(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=B.applyTimezone(t.start.time(0))),t.end&&!t.end.hasTime()&&(t.end=B.applyTimezone(t.end.time(0))))}function E(e,n,i){var r,s,o,a,l,u,d,c,h,f=[];if(n=n||L,i=i||V,e)if(e._recurring){if(s=e.dow)for(r={},o=0;o<s.length;o++)r[s[o]]=!0;for(a=n.clone().stripTime();a.isBefore(i);)(!r||r[a.day()])&&(l=e.start,u=e.end,d=a.clone(),c=null,l&&(d=d.time(l)),u&&(c=a.clone().time(u)),h=t.extend({},e),w(d,c,!l&&!u,h),f.push(h)),a.add(1,"days")}else f.push(e);return f}function D(e,n,i){function r(t,e){return i?N(t,e,i):n.allDay?M(t,e):G(t,e)}var s,o,a,l,u,d,c={};return n=n||{},n.start||(n.start=e.start.clone()),void 0===n.end&&(n.end=e.end?e.end.clone():null),null==n.allDay&&(n.allDay=e.allDay),S(n),s={start:e._start.clone(),end:e._end?e._end.clone():B.getDefaultEventEnd(e._allDay,e._start),allDay:n.allDay},S(s),o=null!==e._end&&null===n.end,a=r(n.start,s.start),n.end?(l=r(n.end,s.end),u=l.subtract(a)):u=null,t.each(n,function(t,e){g(t)&&void 0!==e&&(c[t]=e)}),d=C(v(e._id),o,n.allDay,a,u,c),{dateDelta:a,durationDelta:u,undo:d}}function C(e,n,i,r,s,o){var a=B.getIsAmbigTimezone(),l=[];return r&&!r.valueOf()&&(r=null),s&&!s.valueOf()&&(s=null),t.each(e,function(e,u){var d,c;d={start:u.start.clone(),end:u.end?u.end.clone():null,allDay:u.allDay},t.each(o,function(t){d[t]=u[t]}),c={start:u._start,end:u._end,allDay:i},S(c),n?c.end=null:s&&!c.end&&(c.end=B.getDefaultEventEnd(c.allDay,c.start)),r&&(c.start.add(r),c.end&&c.end.add(r)),s&&c.end.add(s),a&&!c.allDay&&(r||s)&&(c.start.stripZone(),c.end&&c.end.stripZone()),t.extend(u,o,c),Ot(u),l.push(function(){t.extend(u,d),Ot(u)})}),function(){for(var t=0;t<l.length;t++)l[t]()}}function H(e){var i,r=n.businessHours,s={className:"fc-nonbusiness",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:""},o=B.getView();return r&&(i=t.extend({},s,"object"==typeof r?r:{})),i?(e&&(i.start=null,i.end=null),E(y(i),o.start,o.end)):[]}function T(t,e){var i=e.source||{},r=$(e.constraint,i.constraint,n.eventConstraint),s=$(e.overlap,i.overlap,n.eventOverlap);return k(t,r,s,e)}function x(e,n,i){var r,s;return i&&(r=t.extend({},i,n),s=E(y(r))[0]),s?T(e,s):R(e)}function R(t){return k(t,n.selectConstraint,n.selectOverlap)}function k(t,e,n,i){var r,s,o,a,l,u;if(null!=e){for(r=I(e),s=!1,a=0;a<r.length;a++)if(F(r[a],t)){s=!0;break}if(!s)return!1}for(o=B.getPeerEvents(t,i),a=0;a<o.length;a++)if(l=o[a],z(l,t)){if(n===!1)return!1;if("function"==typeof n&&!n(l,i))return!1;if(i){if(u=$(l.overlap,(l.source||{}).overlap),u===!1)return!1;if("function"==typeof u&&!u(i,l))return!1}}return!0}function I(t){return"businessHours"===t?H():"object"==typeof t?E(y(t)):v(t)}function F(t,e){var n=t.start.clone().stripZone(),i=B.getEventEnd(t).stripZone();return e.start>=n&&e.end<=i}function z(t,e){var n=t.start.clone().stripZone(),i=B.getEventEnd(t).stripZone();return e.start<i&&e.end>n}var B=this;B.isFetchNeeded=i,B.fetchEvents=r,B.addEventSource=a,B.removeEventSource=u,B.updateEvent=h,B.renderEvent=p,B.removeEvents=m,B.clientEvents=v,B.mutateEvent=D,B.normalizeEventDates=S,B.normalizeEventTimes=b;var L,V,P=B.reportEvents,O={events:[]},_=[O],Y=0,W=0,j=[];t.each((n.events?[n.events]:[]).concat(n.eventSources||[]),function(t,e){var n=l(e);n&&_.push(n)}),B.getBusinessHoursEvents=H,B.isEventSpanAllowed=T,B.isExternalSpanAllowed=x,B.isSelectionSpanAllowed=R,B.getEventCache=function(){return j}}function Ot(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}var Pa=t.fullCalendar={version:"2.6.1",internalApiVersion:3},_t=Pa.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 pe(a,e),a.data("fullCalendar",l),l.render())}),i};var Yt=["header","buttonText","buttonIcons","themeButtonIcons"];Pa.intersectRanges=I,Pa.applyAll=q,Pa.debounce=it,Pa.isInt=et,Pa.htmlEscape=X,Pa.cssToStr=K,Pa.proxy=nt,Pa.capitaliseFirstLetter=J,Pa.getOuterRect=g,Pa.getClientRect=p,Pa.getContentRect=m,Pa.getScrollbarWidths=v;var Wt=null;Pa.intersectRects=E,Pa.parseFieldSpecs=T,Pa.compareByFieldSpecs=x,Pa.compareByFieldSpec=R,Pa.flexibleCompare=k,Pa.computeIntervalUnit=F,Pa.divideRangeByDuration=B,Pa.divideDurationByDuration=L,Pa.multiplyDuration=V,Pa.durationHasTime=P;var jt=["sun","mon","tue","wed","thu","fri","sat"],Zt=["year","month","week","day","hour","minute","second","millisecond"];Pa.log=function(){var t=window.console;return t&&t.log?t.log.apply(t,arguments):void 0},Pa.warn=function(){var t=window.console;return t&&t.warn?t.warn.apply(t,arguments):Pa.log.apply(Pa,arguments)};var Ut,qt,$t,Xt={}.hasOwnProperty,Qt=/^s*d{4}-dd$/,Kt=/^s*d{4}-(?:(dd-dd)|(Wdd$)|(Wdd-d)|(ddd))((T| )(dd(:dd(:dd(.d+)?)?)?)?)?$/,Jt=e.fn,te=t.extend({},Jt);Pa.moment=function(){return rt(arguments)},Pa.moment.utc=function(){var t=rt(arguments,!0);return t.hasTime()&&t.utc(),t},Pa.moment.parseZone=function(){return rt(arguments,!0,!0)},Jt.clone=function(){var t=te.clone.apply(this,arguments);return ot(this,t),this._fullCalendar&&(t._fullCalendar=!0),t},Jt.week=Jt.weeks=function(t){var e=(this._locale||this._lang)._fullCalendar_weekCalc;return null==t&&"function"==typeof e?e(this):"ISO"===e?te.isoWeek.apply(this,arguments):te.week.apply(this,arguments)},Jt.time=function(t){if(!this._fullCalendar)return te.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())},Jt.stripTime=function(){var t;return this._ambigTime||(t=this.toArray(),this.utc(),qt(this,t.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},Jt.hasTime=function(){return!this._ambigTime},Jt.stripZone=function(){var t,e;return this._ambigZone||(t=this.toArray(),e=this._ambigTime,this.utc(),qt(this,t),this._ambigTime=e||!1,this._ambigZone=!0),this},Jt.hasZone=function(){return!this._ambigZone},Jt.local=function(){var t=this.toArray(),e=this._ambigZone;return te.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,e&&$t(this,t),this},Jt.utc=function(){return te.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},t.each(["zone","utcOffset"],function(t,e){te[e]&&(Jt[e]=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),te[e].apply(this,arguments)})}),Jt.format=function(){return this._fullCalendar&&arguments[0]?ut(this,arguments[0]):this._ambigTime?lt(this,"YYYY-MM-DD"):this._ambigZone?lt(this,"YYYY-MM-DD[T]HH:mm:ss"):te.format.apply(this,arguments)},Jt.toISOString=function(){return this._ambigTime?lt(this,"YYYY-MM-DD"):this._ambigZone?lt(this,"YYYY-MM-DD[T]HH:mm:ss"):te.toISOString.apply(this,arguments)},Jt.isWithin=function(t,e){var n=st([this,t,e]);return n[0]>=n[1]&&n[0]<n[2]},Jt.isSame=function(t,e){var n;return this._fullCalendar?e?(n=st([this,t],!0),te.isSame.call(n[0],n[1],e)):(t=Pa.moment.parseZone(t),te.isSame.call(this,t)&&Boolean(this._ambigTime)===Boolean(t._ambigTime)&&Boolean(this._ambigZone)===Boolean(t._ambigZone)):te.isSame.apply(this,arguments)},t.each(["isBefore","isAfter"],function(t,e){Jt[e]=function(t,n){var i;return this._fullCalendar?(i=st([this,t]),te[e].call(i[0],i[1],n)):te[e].apply(this,arguments)}}),Ut="_d"in e()&&"updateOffset"in e,qt=Ut?function(t,n){t._d.setTime(Date.UTC.apply(Date,n)),e.updateOffset(t,!1)}:at,$t=Ut?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)}:at;var ee={t:function(t){return lt(t,"a").charAt(0)},T:function(t){return lt(t,"A").charAt(0)}};Pa.formatRange=ht;var ne={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"},ie={};Pa.Class=vt,vt.extend=function(){var t,e,n=arguments.length;for(t=0;n>t;t++)e=arguments[t],n-1>t&&wt(this,e);return yt(this,e||{})},vt.mixin=function(t){wt(this,t)};var re=Pa.Emitter=vt.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){var i=this.getCallbacks(t);return i.fireWith(e,n),this},getCallbacks:function(e){var n;return this.callbackHash||(this.callbackHash={}),n=this.callbackHash[e],n||(n=this.callbackHash[e]=t.Callbacks()),n}}),se=vt.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=nt(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=f(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):(i=c.offset(),e=i.top,n=i.left),e+=d.scrollTop(),n+=d.scrollLeft(),o.viewportConstrain!==!1&&(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))}}),oe=Pa.CoordCache=vt.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},ensureBuilt:function(){this.origin||this.build()},queryBoundingRect:function(){var t=f(this.els.eq(0));return t.is(document)?void 0:p(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){this.ensureBuilt();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;s>e;e++)if(t>=i[e]&&t<r[e])return e},getVerticalIndex:function(t){this.ensureBuilt();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;s>e;e++)if(t>=i[e]&&t<r[e])return e},getLeftOffset:function(t){return this.ensureBuilt(),this.lefts[t]},getLeftPosition:function(t){return this.ensureBuilt(),this.lefts[t]-this.origin.left},getRightOffset:function(t){return this.ensureBuilt(),this.rights[t]},getRightPosition:function(t){return this.ensureBuilt(),this.rights[t]-this.origin.left},getWidth:function(t){return this.ensureBuilt(),this.rights[t]-this.lefts[t]},getTopOffset:function(t){return this.ensureBuilt(),this.tops[t]},getTopPosition:function(t){return this.ensureBuilt(),this.tops[t]-this.origin.top},getBottomOffset:function(t){return this.ensureBuilt(),this.bottoms[t]},getBottomPosition:function(t){return this.ensureBuilt(),this.bottoms[t]-this.origin.top},getHeight:function(t){return this.ensureBuilt(),this.bottoms[t]-this.tops[t]}}),ae=Pa.DragListener=vt.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=f(t(e.target)),n.is(window)||n.is(document)||(this.scrollEl=n,this.scrollHandlerProxy=it(nt(this,"scrollHandler"),100),this.scrollEl.on("scroll",this.scrollHandlerProxy))),t(document).on("mousemove",this.mousemoveProxy=nt(this,"mousemove")).on("mouseup",this.mouseupProxy=nt(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,i=t.pageX-this.originX,r=t.pageY-this.originY;this.isDragging||(e=this.options.distance||1,n=i*i+r*r,n>=e*e&&this.startDrag(t)),this.isDragging&&this.drag(i,r,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?g(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&&1>=e?a=e*this.scrollSpeed*-1:n>=0&&1>=n&&(a=n*this.scrollSpeed),i>=0&&1>=i?l=i*this.scrollSpeed*-1:r>=0&&1>=r&&(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(nt(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(){}}),le=ae.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){ae.call(this,e),this.component=t},listenStart:function(t){var e,n,i,r=this.subjectEl;ae.prototype.listenStart.apply(this,arguments),this.computeCoords(),t?(n={left:t.pageX,top:t.pageY},i=n,r&&(e=g(r),i=D(i,e)),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;ae.prototype.dragStart.apply(this,arguments),e=this.queryHit(t.pageX,t.pageY),e&&this.hitOver(e)},drag:function(t,e,n){var i;ae.prototype.drag.apply(this,arguments),i=this.queryHit(n.pageX,n.pageY),St(i,this.hit)||(this.hit&&this.hitOut(),i&&this.hitOver(i))},dragStop:function(){this.hitDone(),ae.prototype.dragStop.apply(this,arguments)},hitOver:function(t){var e=St(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(){ae.prototype.listenStop.apply(this,arguments),this.origHit=null,this.hit=null,this.component.releaseHits()},scrollStop:function(){ae.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)}}),ue=vt.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=nt(this,"mousemove")))},stop:function(e,n){function i(){this.isAnimating=!1,r.removeElement(),this.top0=this.left0=null,n&&n()}var r=this,s=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,t(document).off("mousemove",this.mousemoveProxy),e&&s&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:s,complete:i})):i())},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())}}),de=Pa.Grid=vt.extend({view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,externalDragStartProxy:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:-1,largeUnit:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={},this.externalDragStartProxy=nt(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(),t=n.opt("displayEventTime"),null==t&&(t=this.computeDisplayEventTime()),e=n.opt("displayEventEnd"),null==e&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?N(t,e,this.largeUnit):G(t,e)},prepareHits:function(){},releaseHits:function(){},queryHit:function(t,e){},getHitSpan:function(t){},getHitEl:function(t){},setTimeGridElement: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.dayTimeGridMousedown(e)}),this.bindSegHandlers(),this.bindGlobalHandlers()},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"),l=new le(this,{scroll:r.opt("dragScroll"),dragStart:function(){r.unselect()},hitOver:function(t,r,a){a&&(e=r?t:null,s&&(n=i.computeSelection(i.getHitSpan(a),i.getHitSpan(t)),n?i.renderSelection(n):n===!1&&o()))},hitOut:function(){e=null,n=null,i.unrenderSelection(),a()},listenStop:function(t){e&&r.triggerDayClick(i.getHitSpan(e),i.getHitEl(e),t),n&&r.reportSelection(n,t),a()}});l.mousedown(t)},dayTimeGridMousedown:function(t){var e,n,i=this,r=this.view,s=r.opt("selectable"),l=new le(this,{scroll:r.opt("dragScroll"),dragStart:function(){r.unselect()},hitOver:function(t,r,a){a&&(e=r?t:null,s&&(n=i.computeTimeGridSelection(i.getHitSpan(a),i.getHitSpan(t)),n?i.renderSelection(n):n===!1&&o()))},hitOut:function(){e=null,n=null,i.unrenderSelection(),a()},listenStop:function(t){e&&r.triggerDayClick(i.getHitSpan(e),i.getHitEl(e),t),n&&r.reportSelection(n,t),a()}});l.mousedown(t)},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?Y(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)?!1:n},computeTimeGridSelection:function(t,e){var n=[t.start,t.end,e.start,e.end];n.sort(tt);var i={start:n[0].clone(),end:n[3].clone()};return i&&!this.view.calendar.isSelectionSpanAllowed(i)?!1:i},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(tt),{start:n[0].clone(),end:n[3].clone().subtract(1,"days")}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},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),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=K(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(),i=["fc-"+jt[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):n>t?i.push("fc-past"):i.push("fc-future"),i}});de.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var e,n=[],i=[];for(e=0;e<t.length;e++)(Et(t[e])?n:i).push(t[e]);this.segs=[].concat(this.renderBgEvents(n),this.renderFgEvents(i))},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){return{"background-color":this.getSegSkinCss(t)["background-color"]}},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");return!r||e.isDraggingSeg||e.isResizingSeg?void 0: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,l=t.el,u=t.event,d=new ue(t.el,{parentEl:r.el,opacity:r.opt("dragOpacity"),revertDuration:r.opt("dragRevertDuration"),zIndex:2}),c=new le(r,{distance:5,scroll:r.opt("dragScroll"),subjectEl:l,subjectCenter:!0,listenStart:function(t){d.hide(),d.start(t)},dragStart:function(e){i.triggerSegMouseout(t,e),i.segDragStart(t,e),r.hideEvent(u)},hitOver:function(e,a,l){t.hit&&(l=t.hit),n=i.computeEventDrop(l.component.getHitSpan(l),e.component.getHitSpan(e),u),n&&!s.isEventSpanAllowed(i.eventToSpan(n),u)&&(o(),n=null),n&&r.renderDrag(n,t)?d.hide():d.show(),a&&(n=null)},hitOut:function(){r.unrenderDrag(),d.show(),n=null},hitDone:function(){a()},dragStop:function(e){d.stop(!n,function(){r.unrenderDrag(),r.showEvent(u),i.segDragStop(t,e),n&&r.reportEventDrop(u,n,this.largeUnit,l,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&&P(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(t,e,n){var i,r=this,s=this.view.calendar,l=xt(t),u=new le(this,{listenStart:function(){r.isDraggingExternal=!0},hitOver:function(t){i=r.computeExternalDrop(t.component.getHitSpan(t),l),i&&!s.isExternalSpanAllowed(r.eventToSpan(i),i,l.eventProps)&&(o(),i=null),i&&r.renderDrag(i)},hitOut:function(){i=null},hitDone:function(){a(),r.unrenderDrag()},dragStop:function(){i&&r.view.reportExternalDrop(l,i,t,e,n)},listenStop:function(){r.isDraggingExternal=!1}});u.startDrag(e)},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)),i},renderDrag:function(t,e){},unrenderDrag:function(){},segResizeMousedown:function(t,e,n){var i,r=this,s=this.view,l=s.calendar,u=t.el,d=t.event,c=l.getEventEnd(d),h=new le(this,{distance:5,scroll:s.opt("dragScroll"),subjectEl:u,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),i&&(l.isEventSpanAllowed(r.eventToSpan(i),d)?i.start.isSame(d.start)&&i.end.isSame(c)&&(i=null):(o(),i=null)),i&&(s.hideEvent(d),r.renderEventResize(i,t))},hitOut:function(){i=null},hitDone:function(){r.unrenderEventResize(),s.showEvent(d),a()},dragStop:function(e){r.segResizeStop(t,e),i&&s.reportEventResize(d,i,this.largeUnit,u,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},r.allDay&&P(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},getSegSkinCss:function(t){var e=t.event,n=this.view,i=e.source||{},r=e.color,s=i.color,o=n.opt("eventColor");return{"background-color":e.backgroundColor||r||i.backgroundColor||s||n.opt("eventBackgroundColor")||o,"border-color":e.borderColor||r||i.borderColor||s||n.opt("eventBorderColor")||o,color:e.textColor||i.textColor||n.opt("eventTextColor")}},eventToSegs:function(t){return this.eventsToSegs([t])},eventToSpan:function(t){return this.eventToSpans(t)[0]},eventToSpans:function(t){var e=this.eventToRange(t);return this.eventRangeToSpans(e,t)},eventsToSegs:function(e,n){var i=this,r=Ht(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(Dt(e[0]))for(o=i.invertRanges(o),r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[0],n));else for(r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[r],n))}),s},eventToRange:function(t){return{start:t.start.clone().stripZone(),end:(t.end?t.end.clone():this.view.calendar.getDefaultEventEnd(null!=t.allDay?t.allDay:!t.start.hasTime(),t.start)).stripZone()}},eventRangeToSegs:function(t,e,n){var i,r=this.eventRangeToSpans(t,e),s=[];for(i=0;i<r.length;i++)s.push.apply(s,this.eventSpanToSegs(r[i],e,n));return s},eventRangeToSpans:function(e,n){return[t.extend({},e)]},eventSpanToSegs:function(t,e,n){var i,r,s=n?n(t):this.spanToSegs(t);for(i=0;i<s.length;i++)r=s[i],r.event=e,r.eventStartMS=+t.start,r.eventDurationMS=t.end-t.start;return s},invertRanges:function(t){var e,n,i=this.view,r=i.start.clone(),s=i.end.clone(),o=[],a=r;for(t.sort(Tt),e=0;e<t.length;e++)n=t[e],n.start>a&&o.push({start:a,end:n.start}),a=n.end;return s>a&&o.push({start:a,end:s}),o},sortEventSegs:function(t){t.sort(nt(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)}}),Pa.isBgEvent=Et,Pa.dataAttrPrefix="";var ce=Pa.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){var t,e,n,i=[];if(this.updateCellDates(),i=this.dayDates,this.breakOnWeeks){for(t=i[0].day(),e=1;e<i.length&&i[e].day()!=t;e++);n=Math.ceil(i.length/e)}else n=1,e=i.length;this.daysPerRow=e,this.rowCnt=n,this.updateDayTableCols()},updateCellDates:function(){for(var t=this.view,e=this.start.clone(),n=-1,i=[],r=[];e.isBefore(this.end);)t.isHiddenDay(e)?i.push(n+.5):(n++,i.push(n),r.push(e.clone())),e.add(1,"days");this.dayDates=r,this.dayIndices=i},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.colCnt+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 0>n?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},getDateWeekIndex:function(t){var e=this.dayIndices,n=t.diff(this.start,"days");return-1>n?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.colCnt,a=this.view.computeDayRange(t),l=this.getDateWeekIndex(a.start),u=this.getDateWeekIndex(a.end),d=[];for(e=0;e<this.rowCnt;e++)n=e*o,i=n+o-1,r=Math.max(l,n),s=Math.min(u,i),r=Math.ceil(r),s=Math.floor(s),s>=r&&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),c=[];for(e=0;e<this.rowCnt;e++)for(n=e*a,i=n+a-1,r=n;i>=r;r++)s=Math.max(u,r),o=Math.min(d,r),s=Math.ceil(s),o=Math.floor(o),o>=s&&c.push({row:e,firstRowDayIndex:s-n,lastRowDayIndex:o-n,isStart:s===u,isEnd:o===d});return c},renderHeadHtml:function(){var t=this.view;return'<div class="fc-row '+t.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,n){var i=this.view;return'<th class="fc-day-header '+i.widgetHeaderClass+" fc-"+jt[t.day()]+'"'+(1==this.rowCnt?' data-date="'+t.format("YYYY-MM-DD")+'"':"")+(e>1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+X(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,e){var n=this.view,i=this.getDayClasses(t);return i.unshift("fc-day",n.widgetContentClass),'<td class="'+i.join(" ")+'" data-date="'+t.format("YYYY-MM-DD")+'"'+(e?" "+e:"")+"></td>"},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},he=Pa.DayGrid=de.extend(ce,{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;r>e;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 oe({els:this.rowEls,isVertical:!0}),this.colCoordCache=new oe({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;r>e;e++)for(n=0;s>n;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=this.view,i=["fc-row","fc-week",n.widgetContentClass];return e&&i.push("fc-rigid"),'<div class="'+i.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),e.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.colCnt-1-n.lastRowDayIndex,n.rightCol=this.colCnt-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);return null!=i&&null!=n?this.getCellHit(i,n):void 0},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){return this.renderHighlight(this.eventToSpan(t)),e&&!e.el.closest(this.el).length?(this.renderEventLocationHelper(t,e),this.applyDragOpacity(this.helperEls),!0):void 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(),r=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>'),s=r.find("tr"),a>0&&s.append('<td colspan="'+a+'"/>'),s.append(n.el.attr("colspan",l-a)),o>l&&s.append('<td colspan="'+(o-l)+'"/>'),this.bookendCells(s),r}});he.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),de.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return de.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return de.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=K(this.getSegSkinCss(t)),c="";return u.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getEventTimeText(s),n&&(c='<span class="fc-time">'+X(n)+"</span>")),i='<span class="fc-title">'+(X(s.title||"")||" ")+'</span><div class="fc-description" style="display:none;">'+X(s.description||"")+"</div>",'<a class="'+u.join(" ")+'"'+(s.url?' href="'+X(s.url)+'" target="_blank"':"")+(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){function i(e){for(;e>o;)d=(v[r-1]||[])[o],d?d.attr("rowspan",parseInt(d.attr("rowspan")||1,10)+1):(d=t("<td/>"),a.append(d)),m[r][o]=d,v[r][o]=d,o++}var r,s,o,a,l,u,d,c=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),g=t("<tbody/>"),p=[],m=[],v=[];for(r=0;f>r;r++){if(s=h[r],o=0,a=t("<tr/>"),p.push([]),m.push([]),v.push([]),s)for(l=0;l<s.length;l++){for(u=s[l],i(u.leftCol),d=t('<td class="fc-event-container"/>').append(u.el),u.leftCol!=u.rightCol?d.attr("colspan",u.rightCol-u.leftCol+1):v[r][o]=d;o<=u.rightCol;)m[r][o]=d,p[r][o]=u,o++;a.append(d)}i(c),this.bookendCells(a),g.append(a)}return{row:e,tbodyEl:g,cellMatrix:m,segMatrix:p,segLevels:h,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&&Rt(n,r[i]);i++);n.level=i,(r[i]||(r[i]=[])).push(n)}for(i=0;i<r.length;i++)r[i].sort(kt);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}}),he.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),n=t?"number"==typeof t?t:this.computeRowLevelLimit(e):!1,n!==!1&&this.limitRow(e,n)},computeRowLevelLimit:function(e){function n(e,n){s=Math.max(s,t(n).outerHeight())}var i,r,s,o=this.rowEls.eq(e),a=o.height(),l=this.rowStructs[e].tbodyEl.children();for(i=0;i<l.length;i++)if(r=l.eq(i).removeClass("fc-limited"),s=0,r.find("> td > :first-child").each(n),r.position().top+s>a)return i;return!1},limitRow:function(e,n){function i(i){for(;i>E;)u=w.getCellSegs(e,E,n),u.length&&(h=s[n-1][E],y=w.renderMoreLink(e,E,u),v=t("<div/>").append(y),h.append(v),b.push(v[0])),E++}var r,s,o,a,l,u,d,c,h,f,g,p,m,v,y,w=this,S=this.rowStructs[e],b=[],E=0;if(n&&n<S.segLevels.length){for(r=S.segLevels[n-1],s=S.cellMatrix,o=S.tbodyEl.children().slice(n).addClass("fc-limited").get(),a=0;a<r.length;a++){for(l=r[a],i(l.leftCol),c=[],d=0;E<=l.rightCol;)u=this.getCellSegs(e,E,n),c.push(u),d+=u.length,E++;if(d){for(h=s[n-1][l.leftCol],f=h.attr("rowspan")||1,g=[],p=0;p<c.length;p++)m=t('<td class="fc-more-cell"/>').attr("rowspan",f),u=c[p],y=this.renderMoreLink(e,l.leftCol+p,[l].concat(u)),v=t("<div/>").append(y),m.append(v),g.push(m[0]),b.push(m[0]);h.addClass("fc-limited").after(t(g)),o.push(h[0])}}i(this.colCnt),S.moreEls=t(b),S.limitedEls=t(o)}},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 se(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">'+X(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().stripTime(),s=r.clone().add(1,"days"),o={start:r,end:s};return e=this.eventsToSegs(i,function(t){var e=I(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],i&&o.push(i),s++;return o}});var fe=Pa.TimeGrid=de.extend(ce,{slotDuration:null,snapDuration:null,snapsPerSlot:null,minTime:null,maxTime:null,labelFormat:null,labelInterval:null,colEls:null,slatEls:null,nowIndicatorEls:null,colCoordCache:null,slatCoordCache:null,constructor:function(){de.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 oe({els:this.colEls,isHorizontal:!0}),this.slatCoordCache=new oe({els:this.slatEls,isVertical:!0}),this.renderContentSkeleton()},renderHtml:function(){return'<div class="fc-bg"><table>'+this.renderBgTrHtml(0)+'</table></div><div class="fc-slats"><table>'+this.renderSlatRowHtml()+"</table></div>"},renderSlatRowHtml:function(){var t,n,i,r,s,o=this.view,a=this.isRTL,l="",u=this.slotDuration.asMinutes()%15===0,d=e.duration(+this.minTime),c=o.opt("slotLabel");if(c)for(;d<this.maxTime;){t=this.start.clone().time(d),i=this.start.clone().time(t),r=this.start.clone().time(d.add(this.slotDuration)),s=e.duration(r.diff(i)).asMinutes();var h="";i&&(h=X(i.format(this.labelFormat)),r&&(h+=X("-"+r.format(this.labelFormat)))),n='<td class="fc-axis fc-time '+o.widgetContentClass+'" '+o.axisStyleAttr()+"><span>"+X(h)+"</span></td>";var f=[];if(i.className)if("string"==typeof i.className)f.push(i.className);else if(Array.isArray(i.className)===!0)for(var g=0;g<i.className.length;g++){var p=i.className[g];"string"==typeof p&&f.push(p)}i.minor===!0?f.push("fc-minor"):f.push("fc-major"),l+='<tr data-time="'+t.format("HH:mm:ss")+'" class="'+f.join(" ")+'" style="height: '+s+'px">'+(a?"":n)+'<td class="'+o.widgetContentClass+'"/>'+(a?n:"")+"</tr>"}else for(;d<this.maxTime;)t=o.start.clone().time(d),minutes=t.minutes(),s=e.duration(this.slotDuration).asMinutes(),n='<td class="fc-axis fc-time '+o.widgetContentClass+'" '+o.axisStyleAttr()+">"+(u&&minutes?"":"<span>"+X(t.format(this.labelFormat))+"</span>")+"</td>",l+='<tr data-time="'+t.format("HH:mm:ss")+'"'+(minutes?' class="fc-minor"':"")+' style="height: '+s+'px">'+(a?"":n)+'<td class="'+o.widgetContentClass+'"/>'+(a?n:"")+"</tr>",d.add(this.slotDuration);return l},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=ke.length-1;n>=0;n--)if(i=e.duration(ke[n]),r=L(i,t),et(r)&&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=o*n+d,h=a+d/n*l,f=a+(d+1)/n*l;return{col:s,snap:c,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:h,bottom:f}}},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.colCnt-1-n[e].dayIndex:n[e].col=n[e].dayIndex;return n},sliceRangeByTimes:function(t){var e,n,i,r,s=[];for(n=0;n<this.daysPerRow;n++)i=this.dayDates[n].clone(),r={start:i.clone().time(this.minTime),end:i.clone().time(this.maxTime)},e=I(t,r),e&&(e.dayIndex=n,s.push(e));return s},updateSize:function(t){this.slatCoordCache.build(),t&&this.updateSegVerticals([].concat(this.fgSegs||[],this.bgSegs||[],this.businessSegs||[]))},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),e=Math.min(e,i-1),n=r-e,this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},renderDrag:function(t,e){if(e){this.renderEventLocationHelper(t,e);for(var n=0;n<this.helperSegs.length;n++)this.applyDragOpacity(this.helperSegs[n].el);return!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(t,e){this.renderHelperSegs(this.eventToSegs(t),e)},unrenderHelper:function(){this.unrenderHelperSegs()},renderBusinessHours:function(){var t=this.view.calendar.getBusinessHoursEvents(),e=this.eventsToSegs(t);this.renderBusinessSegs(e)},unrenderBusinessHours:function(){this.unrenderBusinessSegs()},getNowIndicatorUnit:function(){return"minute"},renderNowIndicator:function(e){var n,i=this.spanToSegs({start:e,end:e}),r=this.computeDateTop(e,e),s=[];for(n=0;n<i.length;n++)s.push(t('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&s.push(t('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=t(s)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(t){this.renderHighlightSegs(this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});fe.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var e,n,i="";for(e=0;e<this.colCnt;e++)i+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';n=t('<div class="fc-content-skeleton"><table><tr>'+i+"</tr></table></div>"),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(t){return t=this.renderFgSegsIntoContainers(t,this.fgContainerEls),this.fgSegs=t,t},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(t,e){var n,i,r;for(t=this.renderFgSegsIntoContainers(t,this.helperContainerEls),n=0;n<t.length;n++)i=t[n],e&&e.col===i.col&&(r=e.el,i.el.css({left:r.css("left"),right:r.css("right"),"margin-left":r.css("margin-left"),"margin-right":r.css("margin-right")}));this.helperSegs=t},unrenderHelperSegs:function(){this.unrenderNamedSegs("helperSegs")},renderBgSegs:function(t){return t=this.renderFillSegEls("bgEvent",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.bgContainerEls),this.bgSegs=t,t},unrenderBgSegs:function(){this.unrenderNamedSegs("bgSegs")},renderHighlightSegs:function(t){t=this.renderFillSegEls("highlight",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.highlightContainerEls),this.highlightSegs=t},unrenderHighlightSegs:function(){this.unrenderNamedSegs("highlightSegs")},renderBusinessSegs:function(t){t=this.renderFillSegEls("businessHours",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.businessContainerEls),this.businessSegs=t},unrenderBusinessSegs:function(){this.unrenderNamedSegs("businessSegs")},groupSegsByCol: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},attachSegsByCol:function(t,e){var n,i,r;for(n=0;n<this.colCnt;n++)for(i=t[n],r=0;r<i.length;r++)e.eq(n).append(i[r].el)},unrenderNamedSegs:function(t){var e,n=this[t];if(n){for(e=0;e<n.length;e++)n[e].el.remove();this[t]=null}},renderFgSegsIntoContainers:function(t,e){var n,i;for(t=this.renderFgSegEls(t),n=this.groupSegsByCol(t),i=0;i<this.colCnt;i++)this.updateFgSegCoords(n[i]);return this.attachSegsByCol(n,e),t},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=K(this.getSegSkinCss(t));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="'+X(o.url)+'"':"")+(c?' style="'+c+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+X(r)+'" data-full="'+X(i)+'"><span>'+X(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+X(o.title)+'</div><div class="fc-description" style="display:none;">'+X(o.description||"")+"</div>":"")+'</div><div class="fc-bg"/>'+(u?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},updateSegVerticals:function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},computeSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},assignSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateSegVerticalCss(n))},generateSegVerticalCss:function(t){return{top:t.top,bottom:-t.bottom}},updateFgSegCoords:function(t){this.computeSegVerticals(t),this.computeFgSegHorizontals(t),this.assignSegVerticals(t),this.assignFgSegHorizontals(t)},computeFgSegHorizontals:function(t){var e,n,i;if(this.sortEventSegs(t),e=It(t),Gt(e),n=e[0]){for(i=0;i<n.length;i++)Mt(n[i]);for(i=0;i<n.length;i++)this.computeFgSegForwardBack(n[i],0,0)}},computeFgSegForwardBack:function(t,e,n){var i,r=t.forwardSegs;if(void 0===t.forwardCoord)for(r.length?(this.sortForwardSegs(r),this.computeFgSegForwardBack(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.computeFgSegForwardBack(r[i],0,t.forwardCoord)},sortForwardSegs:function(t){t.sort(nt(this,"compareForwardSegs"))},compareForwardSegs:function(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||this.compareEventSegs(t,e)},assignFgSegHorizontals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateFgSegHorizontalCss(n)),n.bottom-n.top<30&&n.el.addClass("fc-short")},generateFgSegHorizontalCss: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}});var ge=Pa.View=vt.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,isNowIndicatorRendered:null,initialNowDate:null,initialNowQueriedMs:null,nowIndicatorTimeoutID:null,nowIndicatorIntervalID: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=nt(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=F(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(),n=this.skipHiddenDays(n,-1,!0),{intervalUnit:i,intervalStart:r,intervalEnd:s,start:e,end:n}},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),t.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)),ht(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()},displayView:function(t){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),t&&this.setDate(t),this.render&&this.render(),this.renderDates(),this.updateSize(),this.renderBusinessHours(),this.startNowIndicator()},clearView:function(){this.unselect(),this.stopNowIndicator(),this.triggerUnrender(),this.unrenderBusinessHours(),this.unrenderDates(),this.destroy&&this.destroy()},renderSkeleton:function(){},unrenderSkeleton:function(){},renderDates:function(){},unrenderDates: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"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var t,n,i,r=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit(),t&&(n=nt(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(t).add(1,t)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+e.duration(1,t),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},updateSize:function(t){var e;t&&(e=this.queryScroll()),this.updateHeight(t),this.updateWidth(t),this.updateNowIndicator(),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),e.css({position:"relative",left:-1}),n=this.el.outerHeight()-i.height(),e.css({position:"",left:""}),t-n},computeInitialScroll:function(t){return 0},queryScroll:function(){return this.scrollerEl?this.scrollerEl.scrollTop():void 0},setScroll:function(t){return this.scrollerEl?this.scrollerEl.scrollTop(t):void 0},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(){var t;this.isEventsRendered&&(t=this.queryScroll(),this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.setScroll(t),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 i===!1?n=null:i&&i!==!0&&(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 $(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),a=function(){o.undo(),s.reportEventChange()};this.triggerEventDrop(t,o.dateDelta,a,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 $(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),a=function(){o.undo(),s.reportEventChange()};this.triggerEventResize(t,o.durationDelta,a,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"),n&&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(this.opt("weekends")===!1&&n.push(0,6),e=0;7>e;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&&e>=this.nextDayThreshold&&r.add(0,"days")),(!i||n>=r)&&(r=n.clone().add(0,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1}}),pe=Pa.Calendar=vt.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:zt,initialize:function(){},initOptions:function(t){var e,r,s,o;t=i(t),e=t.lang,r=me[e],r||(e=pe.defaults.lang,r=me[e]||{}),s=$(t.isRTL,r.isRTL,pe.defaults.isRTL),o=s?pe.rtlDefaults:{},this.dirDefaults=o,this.langDefaults=r,this.overrides=t,this.options=n([pe.defaults,o,r,t]),Bt(this.options),this.viewSpecCache={}},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var n,i,r;if(-1!=t.inArray(e,Zt))for(n=this.header.getViewsWithButtons(),t.each(Pa.views,function(t){n.push(t)}),i=0;i<n.length;i++)if(r=this.getViewSpec(n[i]),r&&r.singleUnit==e)return r},buildViewSpec:function(t){for(var i,r,s,o,a=this.overrides.views||{},l=[],u=[],d=[],c=t;c;)i=_t[c],r=a[c],c=null,"function"==typeof i&&(i={"class":i}),i&&(l.unshift(i),u.unshift(i.defaults||{}),s=s||i.duration,c=c||i.type),r&&(d.unshift(r),s=s||r.duration,c=c||r.type);return i=_(l),i.type=t,i["class"]?(s&&(s=e.duration(s),s.valueOf()&&(i.duration=s,o=F(s),1===s.as(o)&&(i.singleUnit=o,d.unshift(a[o]||{})))),i.defaults=n(u),i.overrides=n(d),this.buildViewSpecOptions(i),this.buildViewSpecButtonText(i,t),i):!1},buildViewSpecOptions:function(t){t.options=n([pe.defaults,t.defaults,this.dirDefaults,this.langDefaults,this.overrides,t.overrides]),Bt(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(pe.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}}});pe.mixin(re),pe.defaults={titleRangeSeparator:" — ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"00:30:00",defaultAllDayEventDuration:{days:0},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",prevWeek:"prev week",nextWeek:"next week",prevMonth:"prev month",nextMonth:"next month",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list",agendaList:"list"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevWeek:"left-triangle",nextWeek:"right-triangle",prevMonth:"left-triangle",nextMonth:"right-triangle",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevWeek:"left-triangle",nextWeek:"right-triangle",prevMonth:"left-triangle",nextMonth:"right-triangle",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},pe.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},pe.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevWeek:"left-triangle",nextWeek:"right-triangle",prevMonth:"left-triangle",nextMonth:"right-triangle",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",prevWeek:"left-triangle",nextWeek:"right-triangle",prevMonth:"left-triangle",nextMonth:"right-triangle",nextYear:"seek-prev",prevYear:"seek-next"}};var me=Pa.langs={};Pa.datepickerLang=function(e,n,i){var r=me[e]||(me[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(ve,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))},Pa.lang=function(e,i){var r,s;r=me[e]||(me[e]={}),i&&(r=me[e]=n([r,i])),s=Lt(e),t.each(ye,function(t,e){null==r[t]&&(r[t]=e(s,r))}),pe.defaults.lang=e};var ve={buttonText:function(t){return{prev:Q(t.prevText),next:Q(t.nextText),today:Q(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},ye={dayOfMonthFormat:function(t,e){var n=t.longDateFormat("l");return n=n.replace(/^Y+[^ws]*|[^ws]*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,"")}},we={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"}};Pa.lang("en",pe.englishDefaults),Pa.sourceNormalizers=[],Pa.sourceFetchers=[];var Se={dataType:"json",cache:!1},be=1;pe.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 Ee=Pa.BasicView=ge.extend({dayGridClass:he,dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid()},instantiateDayGrid:function(){var t=this.dayGridClass.extend(De);return new t(this)},setRange:function(t){ge.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=ge.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=d(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,i=this.opt("eventLimit");h(this.scrollerEl),s(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&&c(this.scrollerEl,n)&&(r(this.headRowEl,v(this.scrollerEl)),n=this.computeScrollerHeight(t),this.scrollerEl.height(n))},setGridHeight:function(t,e){e?u(this.dayGrid.rowEls):l(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()}}),De={renderHeadIntroHtml:function(){var t=this.view;return t.weekNumbersVisible?'<th class="fc-week-number '+t.widgetHeaderClass+'" '+t.weekNumberStyleAttr()+"><span>"+X(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>":""}},Ce=Pa.MonthView=Ee.extend({computeRange:function(t){var e,n=Ee.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"),e&&(t*=this.rowCnt/6),l(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){var t=this.opt("weekMode");return t?"fixed"===t:this.opt("fixedWeekCount")}});_t.basic={"class":Ee},_t.basicDay={type:"basic",duration:{days:1}},_t.basicWeek={type:"basic",duration:{weeks:1}},_t.month={"class":Ce,duration:{months:1},defaults:{fixedWeekCount:!0}};var He=Pa.AgendaView=ge.extend({timeGridClass:fe,timeGrid:null,dayGridClass:he,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(){var t=this.timeGridClass.extend(Te);return new t(this)},instantiateDayGrid:function(){var t=this.dayGridClass.extend(xe);return new t(this)},setRange:function(t){ge.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.setTimeGridElement(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())},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"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(t){this.timeGrid.renderNowIndicator(t)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(t){this.timeGrid.updateSize(t),ge.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=d(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",""),h(this.scrollerEl),s(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=Re),n&&this.dayGrid.limitRows(n)),e||(i=this.computeScrollerHeight(t),c(this.scrollerEl,i)?(r(this.noScrollRowEls,v(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++,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=[],r=[],s=[];for(n=0;n<t.length;n++)t[n].allDay?i.push(t[n]):r.push(t[n]);e=this.timeGrid.renderEvents(r),this.dayGrid&&(s=this.dayGrid.renderEvents(i)),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()}}),Te={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>"+X(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(){var t=this.view;return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"}},xe={renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"><span>"+(t.opt("allDayHtml")||X(t.opt("allDayText")))+"</span></td>"},renderIntroHtml:function(){var t=this.view;return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"}},Re=5,ke=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];_t.agenda={"class":He,defaults:{allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},_t.agendaDay={type:"agenda",duration:{days:1}},_t.agendaWeek={type:"agenda",duration:{weeks:1}};var Ie=Pa.ListView=ge.extend({dayGridClass:he,dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid()},instantiateDayGrid:function(){var t=this.dayGridClass.extend(Ge);return new t(this)},setRange:function(t){ge.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week|day/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=ge.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.colCnt=1,this.dayGrid.rowCnt=this.dayGrid.dayDates.length,this.dayGrid.numbersVisible=!0,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("thead .fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderSkeletonHtml:function(){return this.weekNumbersVisible?'<table><thead class="fc-head"><tr><th class="fc-week-number '+this.widgetHeaderClass+'" '+this.weekNumberStyleAttr()+"><span>"+this.dayGrid.start.format(this.opt("smallWeekFormat"))+'</span></th></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>':'<table><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=d(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,i=this.opt("eventLimit");h(this.scrollerEl),s(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&&c(this.scrollerEl,n)&&(r(this.headRowEl,v(this.scrollerEl)),n=this.computeScrollerHeight(t),this.scrollerEl.height(n))},setGridHeight:function(t,e){e?u(this.dayGrid.rowEls):l(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()}}),Ge={renderHeadIntroHtml:function(){this.view;return""},renderNumberIntroHtml:function(t){this.view;return'<span class="fc-list-header-left ">'+this.getCellDate(t,0).format("dddd")+'</span> <span class="fc-list-header-right">'+this.getCellDate(t,0).format("MMM D, YYYY")+"</span>"},renderBgIntroHtml:function(t){this.view;return""},renderIntroHtml:function(){this.view;return""}};return _t.lists={"class":Ie},_t.list={type:"lists",duration:{days:7}},_t.agendaList={type:"lists",duration:{weeks:1}},Pa});
?>