From 235e3b06fa58436cd88598fdc48799fe61e160bf Mon Sep 17 00:00:00 2001 From: mrampant Date: Fri, 2 Sep 2022 11:29:23 -0400 Subject: [PATCH 1/8] - starting 4.3.0 dev --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0c8f5e24..c4ebaf4e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='NEMO', - version='4.2.0', + version='4.3.0.dev', python_requires='>=3.7', packages=find_packages(exclude=['NEMO.tests','NEMO.tests.*']), include_package_data=True, From c41f13d8c2326780ca84ec070f8d5f2f5ffb3032 Mon Sep 17 00:00:00 2001 From: mrampant Date: Fri, 2 Sep 2022 13:39:49 -0400 Subject: [PATCH 2/8] - updated style of rates table heading --- NEMO/static/nemo.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NEMO/static/nemo.css b/NEMO/static/nemo.css index 257dd4cf..c059c561 100644 --- a/NEMO/static/nemo.css +++ b/NEMO/static/nemo.css @@ -481,6 +481,17 @@ Twitter Typeahead autocomplete dropdown menu isn't chopped off. */ margin-top: 5px; } +.tool-rates .media-heading +{ + display: block; +} + +.tool-rates .media-heading +{ + font-size: medium; + font-weight: 500; +} + .tool-counters { margin-top: 5px; From a75835104847862ca50477a5f4142793325a1f7d Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 12:31:41 -0400 Subject: [PATCH 3/8] - switching to 4.2.1.dev --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c4ebaf4e..72e2c107 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='NEMO', - version='4.3.0.dev', + version='4.2.1.dev', python_requires='>=3.7', packages=find_packages(exclude=['NEMO.tests','NEMO.tests.*']), include_package_data=True, From 3321c0e481b7f3bab371f1cad23d84e8b899c7cf Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 12:32:01 -0400 Subject: [PATCH 4/8] - fixed FullCalendar flickering issue --- NEMO/static/fullcalendar/fullcalendar.js | 2 +- NEMO/static/fullcalendar/fullcalendar.min.js | 759 ++++++++++++++++++- 2 files changed, 751 insertions(+), 10 deletions(-) diff --git a/NEMO/static/fullcalendar/fullcalendar.js b/NEMO/static/fullcalendar/fullcalendar.js index cbe67697..f8e06fb2 100644 --- a/NEMO/static/fullcalendar/fullcalendar.js +++ b/NEMO/static/fullcalendar/fullcalendar.js @@ -9750,7 +9750,7 @@ function Calendar_constructor(element, overrides) { function refetchEvents() { // can be called as an API method - destroyEvents(); // so that events are cleared before user starts waiting for AJAX + // destroyEvents(); // <-- Commented out. Previous versions of FullCalendar did not have this line. It causes the calendar to visually "flash" every time events are refreshed. fetchAndRenderEvents(); } diff --git a/NEMO/static/fullcalendar/fullcalendar.min.js b/NEMO/static/fullcalendar/fullcalendar.min.js index f2738022..79e04baf 100644 --- a/NEMO/static/fullcalendar/fullcalendar.min.js +++ b/NEMO/static/fullcalendar/fullcalendar.min.js @@ -1,9 +1,750 @@ -/*! - * FullCalendar v2.7.3 - * Docs & License: http://fullcalendar.io/ - * (c) 2016 Adam Shaw - */ -!function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){function c(a){return W(a,Xa)}function d(b){var c,d={views:b.views||{}};return a.each(b,function(b,e){"views"!=b&&(a.isPlainObject(e)&&!/(time|duration|interval)$/i.test(b)&&-1==a.inArray(b,Xa)?(c=null,a.each(e,function(a,e){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(a)?(d.views[a]||(d.views[a]={}),d.views[a][b]=e):(c||(c={}),c[a]=e)}),c&&(d[b]=c)):d[b]=e)}),d}function e(a,b){b.left&&a.css({"border-left-width":1,"margin-left":b.left-1}),b.right&&a.css({"border-right-width":1,"margin-right":b.right-1})}function f(a){a.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function g(){a("body").addClass("fc-not-allowed")}function h(){a("body").removeClass("fc-not-allowed")}function i(b,c,d){var e=Math.floor(c/b.length),f=Math.floor(c-e*(b.length-1)),g=[],h=[],i=[],k=0;j(b),b.each(function(c,d){var j=c===b.length-1?f:e,l=a(d).outerHeight(!0);j>l?(g.push(d),h.push(l),i.push(a(d).height())):k+=l}),d&&(c-=k,e=Math.floor(c/g.length),f=Math.floor(c-e*(g.length-1))),a(g).each(function(b,c){var d=b===g.length-1?f:e,j=h[b],k=i[b],l=d-(j-k);d>j&&a(c).height(l)})}function j(a){a.height("")}function k(b){var c=0;return b.find("> span").each(function(b,d){var e=a(d).outerWidth();e>c&&(c=e)}),c++,b.width(c),c}function l(a,b){var c,d=a.add(b);return d.css({position:"relative",left:-1}),c=a.outerHeight()-b.outerHeight(),d.css({position:"",left:""}),c}function m(b){var c=b.css("position"),d=b.parents().filter(function(){var b=a(this);return/(auto|scroll)/.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&d.length?d:a(b[0].ownerDocument||document)}function n(a,b){var c=a.offset(),d=c.left-(b?b.left:0),e=c.top-(b?b.top:0);return{left:d,right:d+a.outerWidth(),top:e,bottom:e+a.outerHeight()}}function o(a,b){var c=a.offset(),d=q(a),e=c.left+t(a,"border-left-width")+d.left-(b?b.left:0),f=c.top+t(a,"border-top-width")+d.top-(b?b.top:0);return{left:e,right:e+a[0].clientWidth,top:f,bottom:f+a[0].clientHeight}}function p(a,b){var c=a.offset(),d=c.left+t(a,"border-left-width")+t(a,"padding-left")-(b?b.left:0),e=c.top+t(a,"border-top-width")+t(a,"padding-top")-(b?b.top:0);return{left:d,right:d+a.width(),top:e,bottom:e+a.height()}}function q(a){var b=a.innerWidth()-a[0].clientWidth,c={left:0,right:0,top:0,bottom:a.innerHeight()-a[0].clientHeight};return r()&&"rtl"==a.css("direction")?c.left=b:c.right=b,c}function r(){return null===Ya&&(Ya=s()),Ya}function s(){var b=a("
").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),c=b.children(),d=c.offset().left>b.offset().left;return b.remove(),d}function t(a,b){return parseFloat(a.css(b))||0}function u(a){return 1==a.which&&!a.ctrlKey}function v(a){if(void 0!==a.pageX)return a.pageX;var b=a.originalEvent.touches;return b?b[0].pageX:void 0}function w(a){if(void 0!==a.pageY)return a.pageY;var b=a.originalEvent.touches;return b?b[0].pageY:void 0}function x(a){return/^touch/.test(a.type)}function y(a){a.addClass("fc-unselectable").on("selectstart",z)}function z(a){a.preventDefault()}function A(a){return window.addEventListener?(window.addEventListener("scroll",a,!0),!0):!1}function B(a){return window.removeEventListener?(window.removeEventListener("scroll",a,!0),!0):!1}function C(a,b){var c={left:Math.max(a.left,b.left),right:Math.min(a.right,b.right),top:Math.max(a.top,b.top),bottom:Math.min(a.bottom,b.bottom)};return c.lefti&&j>g?(g>=i?(c=g.clone(),e=!0):(c=i.clone(),e=!1),j>=h?(d=h.clone(),f=!0):(d=j.clone(),f=!1),{start:c,end:d,isStart:e,isEnd:f}):void 0}function L(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days"),ms:a.time()-c.time()})}function M(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days")})}function N(a,c,d){return b.duration(Math.round(a.diff(c,d,!0)),d)}function O(a,b){var c,d,e;for(c=0;c<$a.length&&(d=$a[c],e=P(d,a,b),!(e>=1&&ha(e)));c++);return d}function P(a,c,d){return null!=d?d.diff(c,a,!0):b.isDuration(c)?c.as(a):c.end.diff(c.start,a,!0)}function Q(a,b,c){var d;return T(c)?(b-a)/c:(d=c.asMonths(),Math.abs(d)>=1&&ha(d)?b.diff(a,"months",!0)/d:b.diff(a,"days",!0)/c.asDays())}function R(a,b){var c,d;return T(a)||T(b)?a/b:(c=a.asMonths(),d=b.asMonths(),Math.abs(c)>=1&&ha(c)&&Math.abs(d)>=1&&ha(d)?c/d:a.asDays()/b.asDays())}function S(a,c){var d;return T(a)?b.duration(a*c):(d=a.asMonths(),Math.abs(d)>=1&&ha(d)?b.duration({months:d*c}):b.duration({days:a.asDays()*c}))}function T(a){return Boolean(a.hours()||a.minutes()||a.seconds()||a.milliseconds())}function U(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function V(a){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(a)}function W(a,b){var c,d,e,f,g,h,i={};if(b)for(c=0;c=0;f--)if(g=a[f][d],"object"==typeof g)e.unshift(g);else if(void 0!==g){i[d]=g;break}e.length&&(i[d]=W(e))}for(c=a.length-1;c>=0;c--){h=a[c];for(d in h)d in i||(i[d]=h[d])}return i}function X(a){var b=function(){};return b.prototype=a,new b}function Y(a,b){for(var c in a)$(a,c)&&(b[c]=a[c])}function Z(a,b){var c,d,e=["constructor","toString","valueOf"];for(c=0;c/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function da(a){return a.replace(/&.*?;/g,"")}function ea(b){var c=[];return a.each(b,function(a,b){null!=b&&c.push(a+":"+b)}),c.join(";")}function fa(a){return a.charAt(0).toUpperCase()+a.slice(1)}function ga(a,b){return a-b}function ha(a){return a%1===0}function ia(a,b){var c=a[b];return function(){return c.apply(a,arguments)}}function ja(a,b,c){var d,e,f,g,h,i=function(){var j=+new Date-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=+new Date;var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}}function ka(c,d,e){var f,g,h,i,j=c[0],k=1==c.length&&"string"==typeof j;return b.isMoment(j)?(i=b.apply(null,c),ma(j,i)):U(j)||void 0===j?i=b.apply(null,c):(f=!1,g=!1,k?db.test(j)?(j+="-01",c=[j],f=!0,g=!0):(h=eb.exec(j))&&(f=!h[5],g=!0):a.isArray(j)&&(g=!0),i=d||f?b.utc.apply(b,c):b.apply(null,c),f?(i._ambigTime=!0,i._ambigZone=!0):e&&(g?i._ambigZone=!0:k&&(i.utcOffset?i.utcOffset(j):i.zone(j)))),i._fullCalendar=!0,i}function la(a,c){var d,e,f=!1,g=!1,h=a.length,i=[];for(d=0;h>d;d++)e=a[d],b.isMoment(e)||(e=Va.moment.parseZone(e)),f=f||e._ambigTime,g=g||e._ambigZone,i.push(e);for(d=0;h>d;d++)e=i[d],c||!f||e._ambigTime?g&&!e._ambigZone&&(i[d]=e.clone().stripZone()):i[d]=e.clone().stripTime();return i}function ma(a,b){a._ambigTime?b._ambigTime=!0:b._ambigTime&&(b._ambigTime=!1),a._ambigZone?b._ambigZone=!0:b._ambigZone&&(b._ambigZone=!1)}function na(a,b){a.year(b[0]||0).month(b[1]||0).date(b[2]||0).hours(b[3]||0).minutes(b[4]||0).seconds(b[5]||0).milliseconds(b[6]||0)}function oa(a,b){return gb.format.call(a,b)}function pa(a,b){return qa(a,va(b))}function qa(a,b){var c,d="";for(c=0;cg&&(f=ua(a,b,j,k,c[h]),f!==!1);h--)m=f+m;for(i=g;h>=i;i++)n+=ra(a,c[i]),o+=ra(b,c[i]);return(n||o)&&(p=e?o+d+n:n+d+o),l+p+m}function ua(a,b,c,d,e){var f,g;return"string"==typeof e?e:(f=e.token)&&(g=ib[f.charAt(0)],g&&c.isSame(d,g))?oa(a,f):!1}function va(a){return a in jb?jb[a]:jb[a]=wa(a)}function wa(a){for(var b,c=[],d=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;b=d.exec(a);)b[1]?c.push(b[1]):b[2]?c.push({maybe:wa(b[2])}):b[3]?c.push({token:b[3]}):b[5]&&c.push(b[5]);return c}function xa(){}function ya(a,b){var c;return $(b,"constructor")&&(c=b.constructor),"function"!=typeof c&&(c=b.constructor=function(){a.apply(this,arguments)}),c.prototype=X(a.prototype),Y(b,c.prototype),Z(b,c.prototype),Y(a,c),c}function za(a,b){Y(b,a.prototype)}function Aa(a,b){return a||b?a&&b?a.component===b.component&&Ba(a,b)&&Ba(b,a):!1:!0}function Ba(a,b){for(var c in a)if(!/^(component|left|right|top|bottom)$/.test(c)&&a[c]!==b[c])return!1;return!0}function Ca(a){var b=Ea(a);return"background"===b||"inverse-background"===b}function Da(a){return"inverse-background"===Ea(a)}function Ea(a){return ba((a.source||{}).rendering,a.rendering)}function Fa(a){var b,c,d={};for(b=0;b=a.leftCol)return!0;return!1}function Ja(a,b){return a.leftCol-b.leftCol}function Ka(a){var b,c,d,e=[];for(b=0;bb.top&&a.top").prependTo(c),R=N.header=new Sa(N,O),S=R.render(),S&&c.prepend(S),i(O.defaultView),O.handleWindowResize&&(Y=ja(m,O.windowResizeDelay),a(window).resize(Y))}function g(){V&&V.removeElement(),R.removeElement(),T.remove(),c.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),Y&&a(window).unbind("resize",Y)}function h(){return c.is(":visible")}function i(b){ca++,V&&b&&V.type!==b&&(R.deactivateButton(V.type),H(),V.removeElement(),V=N.view=null),!V&&b&&(V=N.view=ba[b]||(ba[b]=N.instantiateView(b)),V.setElement(a("
").appendTo(T)),R.activateButton(b)),V&&(Z=V.massageCurrentDate(Z),V.displaying&&Z.isWithin(V.intervalStart,V.intervalEnd)||h()&&(V.display(Z),I(),u(),v(),q())),I(),ca--}function j(a){return h()?(a&&l(),ca++,V.updateSize(!0),ca--,!0):void 0}function k(){h()&&l()}function l(){W="number"==typeof O.contentHeight?O.contentHeight:"number"==typeof O.height?O.height-(S?S.outerHeight(!0):0):Math.round(T.width()/Math.max(O.aspectRatio,.5))}function m(a){!ca&&a.target===window&&V.start&&j(!0)&&V.trigger("windowResize",aa)}function n(){p(),r()}function o(){h()&&(H(),V.displayEvents(da),I())}function p(){H(),V.clearEvents(),I()}function q(){!O.lazyFetching||$(V.start,V.end)?r():o()}function r(){_(V.start,V.end)}function s(a){da=a,o()}function t(){o()}function u(){R.updateTitle(V.title)}function v(){var a=N.getNow();a.isWithin(V.intervalStart,V.intervalEnd)?R.disableButton("today"):R.enableButton("today")}function w(a,b){V.select(N.buildSelectSpan.apply(N,arguments))}function x(){V&&V.unselect()}function y(){Z=V.computePrevDate(Z),i()}function z(){Z=V.computeNextDate(Z),i()}function A(){Z.add(-1,"years"),i()}function B(){Z.add(1,"years"),i()}function C(){Z=N.getNow(),i()}function D(a){Z=N.moment(a).stripZone(),i()}function E(a){Z.add(b.duration(a)),i()}function F(a,b){var c;b=b||"day",c=N.getViewSpec(b)||N.getUnitViewSpec(b),Z=a.clone(),i(c?c.type:null)}function G(){return N.applyTimezone(Z)}function H(){T.css({width:"100%",height:T.height(),overflow:"hidden"})}function I(){T.css({width:"",height:"",overflow:""})}function J(){return N}function K(){return V}function L(a,b){return void 0===b?O[a]:void("height"!=a&&"contentHeight"!=a&&"aspectRatio"!=a||(O[a]=b,j(!0)))}function M(a,b){var c=Array.prototype.slice.call(arguments,2);return b=b||aa,this.triggerWith(a,b,c),O[a]?O[a].apply(b,c):void 0}var N=this;N.initOptions(d||{});var O=this.options;N.render=e,N.destroy=g,N.refetchEvents=n,N.reportEvents=s,N.reportEventChange=t,N.rerenderEvents=o,N.changeView=i,N.select=w,N.unselect=x,N.prev=y,N.next=z,N.prevYear=A,N.nextYear=B,N.today=C,N.gotoDate=D,N.incrementDate=E,N.zoomTo=F,N.getDate=G,N.getCalendar=J,N.getView=K,N.option=L,N.trigger=M;var P=X(Ra(O.lang));if(O.monthNames&&(P._months=O.monthNames),O.monthNamesShort&&(P._monthsShort=O.monthNamesShort),O.dayNames&&(P._weekdays=O.dayNames),O.dayNamesShort&&(P._weekdaysShort=O.dayNamesShort),null!=O.firstDay){var Q=X(P._week);Q.dow=O.firstDay,P._week=Q}P._fullCalendar_weekCalc=function(a){return"function"==typeof a?a:"local"===a?a:"iso"===a||"ISO"===a?"ISO":void 0}(O.weekNumberCalculation),N.defaultAllDayEventDuration=b.duration(O.defaultAllDayEventDuration),N.defaultTimedEventDuration=b.duration(O.defaultTimedEventDuration),N.moment=function(){var a;return"local"===O.timezone?(a=Va.moment.apply(null,arguments),a.hasTime()&&a.local()):a="UTC"===O.timezone?Va.moment.utc.apply(null,arguments):Va.moment.parseZone.apply(null,arguments),"_locale"in a?a._locale=P:a._lang=P,a},N.getIsAmbigTimezone=function(){return"local"!==O.timezone&&"UTC"!==O.timezone},N.applyTimezone=function(a){if(!a.hasTime())return a.clone();var b,c=N.moment(a.toArray()),d=a.time()-c.time();return d&&(b=c.clone().add(d),a.time()-b.time()===0&&(c=b)),c},N.getNow=function(){var a=O.now;return"function"==typeof a&&(a=a()),N.moment(a).stripZone()},N.getEventEnd=function(a){return a.end?a.end.clone():N.getDefaultEventEnd(a.allDay,a.start)},N.getDefaultEventEnd=function(a,b){var c=b.clone();return a?c.stripTime().add(N.defaultAllDayEventDuration):c.add(N.defaultTimedEventDuration),N.getIsAmbigTimezone()&&c.stripZone(),c},N.humanizeDuration=function(a){return(a.locale||a.lang).call(a,O.lang).humanize()},Ta.call(N,O);var R,S,T,U,V,W,Y,Z,$=N.isFetchNeeded,_=N.fetchEvents,aa=c[0],ba={},ca=0,da=[];Z=null!=O.defaultDate?N.moment(O.defaultDate).stripZone():N.getNow(),N.getSuggestedViewHeight=function(){return void 0===W&&k(),W},N.isHeightAuto=function(){return"auto"===O.contentHeight||"auto"===O.height},N.freezeContentHeight=H,N.unfreezeContentHeight=I,N.initialize()}function Qa(b){a.each(Cb,function(a,c){null==b[a]&&(b[a]=c(b))})}function Ra(a){var c=b.localeData||b.langData;return c.call(b,a)||c.call(b,"en")}function Sa(b,c){function d(){var b=c.header;return n=c.theme?"ui":"fc",b?o=a("
").append(f("left")).append(f("right")).append(f("center")).append('
'):void 0}function e(){o.remove(),o=a()}function f(d){var e=a('
'),f=c.header[d];return f&&a.each(f.split(" "),function(d){var f,g=a(),h=!0;a.each(this.split(","),function(d,e){var f,i,j,k,l,m,o,q,r,s;"title"==e?(g=g.add(a("

 

")),h=!1):((f=(b.options.customButtons||{})[e])?(j=function(a){f.click&&f.click.call(s[0],a)},k="",l=f.text):(i=b.getViewSpec(e))?(j=function(){b.changeView(e)},p.push(e),k=i.buttonTextOverride,l=i.buttonTextDefault):b[e]&&(j=function(){b[e]()},k=(b.overrides.buttonText||{})[e],l=c.buttonText[e]),j&&(m=f?f.themeIcon:c.themeButtonIcons[e],o=f?f.icon:c.buttonIcons[e],q=k?ca(k):m&&c.theme?"":o&&!c.theme?"":ca(l),r=["fc-"+e+"-button",n+"-button",n+"-state-default"],s=a('").click(function(a){s.hasClass(n+"-state-disabled")||(j(a),(s.hasClass(n+"-state-active")||s.hasClass(n+"-state-disabled"))&&s.removeClass(n+"-state-hover"))}).mousedown(function(){s.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-down")}).mouseup(function(){s.removeClass(n+"-state-down")}).hover(function(){s.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-hover")},function(){s.removeClass(n+"-state-hover").removeClass(n+"-state-down")}),g=g.add(s)))}),h&&g.first().addClass(n+"-corner-left").end().last().addClass(n+"-corner-right").end(),g.length>1?(f=a("
"),h&&f.addClass("fc-button-group"),f.append(g),e.append(f)):e.append(g)}),e}function g(a){o.find("h2").text(a)}function h(a){o.find(".fc-"+a+"-button").addClass(n+"-state-active")}function i(a){o.find(".fc-"+a+"-button").removeClass(n+"-state-active")}function j(a){o.find(".fc-"+a+"-button").attr("disabled","disabled").addClass(n+"-state-disabled")}function k(a){o.find(".fc-"+a+"-button").removeAttr("disabled").removeClass(n+"-state-disabled")}function l(){return p}var m=this;m.render=d,m.removeElement=e,m.updateTitle=g,m.activateButton=h,m.deactivateButton=i,m.disableButton=j,m.enableButton=k,m.getViewsWithButtons=l;var n,o=a(),p=[]}function Ta(c){function d(a,b){return!I||I>a||b>J}function e(a,b){I=a,J=b,S=[];var c=++Q,d=P.length;R=d;for(var e=0;d>e;e++)f(P[e],c)}function f(b,c){g(b,function(d){var e,f,g,h=a.isArray(b.events);if(c==Q){if(d)for(e=0;e=c&&b.end<=d}function G(a,b){var c=a.start.clone().stripZone(),d=H.getEventEnd(a).stripZone();return b.startc}var H=this;H.isFetchNeeded=d,H.fetchEvents=e,H.addEventSource=h,H.removeEventSource=j,H.updateEvent=m,H.renderEvent=p,H.removeEvents=q,H.clientEvents=r,H.mutateEvent=x,H.normalizeEventDates=u,H.normalizeEventTimes=v;var I,J,K=H.reportEvents,O={events:[]},P=[O],Q=0,R=0,S=[];a.each((c.events?[c.events]:[]).concat(c.eventSources||[]),function(a,b){var c=i(b);c&&P.push(c)}),H.getBusinessHoursEvents=z,H.isEventSpanAllowed=A,H.isExternalSpanAllowed=B,H.isSelectionSpanAllowed=C,H.getEventCache=function(){return S}}function Ua(a){a._allDay=a.allDay,a._start=a.start.clone(),a._end=a.end?a.end.clone():null}var Va=a.fullCalendar={version:"2.7.3",internalApiVersion:4},Wa=Va.views={};a.fn.fullCalendar=function(b){var c=Array.prototype.slice.call(arguments,1),d=this;return this.each(function(e,f){var g,h=a(f),i=h.data("fullCalendar");"string"==typeof b?i&&a.isFunction(i[b])&&(g=i[b].apply(i,c),e||(d=g),"destroy"===b&&h.removeData("fullCalendar")):i||(i=new yb(h,b),h.data("fullCalendar",i),i.render())}),d};var Xa=["header","buttonText","buttonIcons","themeButtonIcons"];Va.intersectRanges=K,Va.applyAll=aa,Va.debounce=ja,Va.isInt=ha,Va.htmlEscape=ca,Va.cssToStr=ea,Va.proxy=ia,Va.capitaliseFirstLetter=fa,Va.getOuterRect=n,Va.getClientRect=o,Va.getContentRect=p,Va.getScrollbarWidths=q;var Ya=null;Va.preventDefault=z,Va.intersectRects=C,Va.parseFieldSpecs=G,Va.compareByFieldSpecs=H,Va.compareByFieldSpec=I,Va.flexibleCompare=J,Va.computeIntervalUnit=O,Va.divideRangeByDuration=Q,Va.divideDurationByDuration=R,Va.multiplyDuration=S,Va.durationHasTime=T;var Za=["sun","mon","tue","wed","thu","fri","sat"],$a=["year","month","week","day","hour","minute","second","millisecond"];Va.log=function(){var a=window.console;return a&&a.log?a.log.apply(a,arguments):void 0},Va.warn=function(){var a=window.console;return a&&a.warn?a.warn.apply(a,arguments):Va.log.apply(Va,arguments)};var _a,ab,bb,cb={}.hasOwnProperty,db=/^\s*\d{4}-\d\d$/,eb=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,fb=b.fn,gb=a.extend({},fb);Va.moment=function(){return ka(arguments)},Va.moment.utc=function(){var a=ka(arguments,!0);return a.hasTime()&&a.utc(),a},Va.moment.parseZone=function(){return ka(arguments,!0,!0)},fb.clone=function(){var a=gb.clone.apply(this,arguments);return ma(this,a),this._fullCalendar&&(a._fullCalendar=!0),a},fb.week=fb.weeks=function(a){var b=(this._locale||this._lang)._fullCalendar_weekCalc;return null==a&&"function"==typeof b?b(this):"ISO"===b?gb.isoWeek.apply(this,arguments):gb.week.apply(this,arguments)},fb.time=function(a){if(!this._fullCalendar)return gb.time.apply(this,arguments);if(null==a)return b.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,b.isDuration(a)||b.isMoment(a)||(a=b.duration(a));var c=0;return b.isDuration(a)&&(c=24*Math.floor(a.asDays())),this.hours(c+a.hours()).minutes(a.minutes()).seconds(a.seconds()).milliseconds(a.milliseconds())},fb.stripTime=function(){var a;return this._ambigTime||(a=this.toArray(),this.utc(),ab(this,a.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},fb.hasTime=function(){return!this._ambigTime},fb.stripZone=function(){var a,b;return this._ambigZone||(a=this.toArray(),b=this._ambigTime,this.utc(),ab(this,a),this._ambigTime=b||!1,this._ambigZone=!0),this},fb.hasZone=function(){return!this._ambigZone},fb.local=function(){var a=this.toArray(),b=this._ambigZone;return gb.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,b&&bb(this,a),this},fb.utc=function(){return gb.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},a.each(["zone","utcOffset"],function(a,b){gb[b]&&(fb[b]=function(a){return null!=a&&(this._ambigTime=!1,this._ambigZone=!1),gb[b].apply(this,arguments)})}),fb.format=function(){return this._fullCalendar&&arguments[0]?pa(this,arguments[0]):this._ambigTime?oa(this,"YYYY-MM-DD"):this._ambigZone?oa(this,"YYYY-MM-DD[T]HH:mm:ss"):gb.format.apply(this,arguments)},fb.toISOString=function(){return this._ambigTime?oa(this,"YYYY-MM-DD"):this._ambigZone?oa(this,"YYYY-MM-DD[T]HH:mm:ss"):gb.toISOString.apply(this,arguments)},fb.isWithin=function(a,b){var c=la([this,a,b]);return c[0]>=c[1]&&c[0]a;a++)b=arguments[a],c-1>a&&za(this,b);return ya(this,b||{})},xa.mixin=function(a){za(this,a)};var kb=Va.EmitterMixin={on:function(b,c){var d=function(a,b){return c.apply(b.context||this,b.args||[])};return c.guid||(c.guid=a.guid++),d.guid=c.guid,a(this).on(b,d),this},off:function(b,c){return a(this).off(b,c),this},trigger:function(b){var c=Array.prototype.slice.call(arguments,1);return a(this).triggerHandler(b,{args:c}),this},triggerWith:function(b,c,d){return a(this).triggerHandler(b,{context:c,args:d}),this}},lb=Va.ListenerMixin=function(){var b=0,c={listenerId:null,listenTo:function(b,c,d){if("object"==typeof c)for(var e in c)c.hasOwnProperty(e)&&this.listenTo(b,e,c[e]);else"string"==typeof c&&b.on(c+"."+this.getListenerNamespace(),a.proxy(d,this))},stopListeningTo:function(a,b){a.off((b||"")+"."+this.getListenerNamespace())},getListenerNamespace:function(){return null==this.listenerId&&(this.listenerId=b++),"_listener"+this.listenerId}};return c}(),mb={isIgnoringMouse:!1,delayUnignoreMouse:null,initMouseIgnoring:function(a){this.delayUnignoreMouse=ja(ia(this,"unignoreMouse"),a||1e3)},tempIgnoreMouse:function(){this.isIgnoringMouse=!0,this.delayUnignoreMouse()},unignoreMouse:function(){this.isIgnoringMouse=!1; -}},nb=xa.extend(lb,{isHidden:!0,options:null,el:null,margin:10,constructor:function(a){this.options=a||{}},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 b=this,c=this.options;this.el=a('
').addClass(c.className||"").css({top:0,left:0}).append(c.content).appendTo(c.parentEl),this.el.on("click",".fc-close",function(){b.hide()}),c.autoHide&&this.listenTo(a(document),"mousedown",this.documentMousedown)},documentMousedown:function(b){this.el&&!a(b.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(a(document),"mousedown")},position:function(){var b,c,d,e,f,g=this.options,h=this.el.offsetParent().offset(),i=this.el.outerWidth(),j=this.el.outerHeight(),k=a(window),l=m(this.el);e=g.top||0,f=void 0!==g.left?g.left:void 0!==g.right?g.right-i:0,l.is(window)||l.is(document)?(l=k,b=0,c=0):(d=l.offset(),b=d.top,c=d.left),b+=k.scrollTop(),c+=k.scrollLeft(),g.viewportConstrain!==!1&&(e=Math.min(e,b+l.outerHeight()-j-this.margin),e=Math.max(e,b+this.margin),f=Math.min(f,c+l.outerWidth()-i-this.margin),f=Math.max(f,c+this.margin)),this.el.css({top:e-h.top,left:f-h.left})},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1))}}),ob=Va.CoordCache=xa.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(b){this.els=a(b.els),this.isHorizontal=b.isHorizontal,this.isVertical=b.isVertical,this.forcedOffsetParentEl=b.offsetParent?a(b.offsetParent):null},build:function(){var a=this.forcedOffsetParentEl||this.els.eq(0).offsetParent();this.origin=a.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 a=m(this.els.eq(0));return a.is(document)?void 0:o(a)},buildElHorizontals:function(){var b=[],c=[];this.els.each(function(d,e){var f=a(e),g=f.offset().left,h=f.outerWidth();b.push(g),c.push(g+h)}),this.lefts=b,this.rights=c},buildElVerticals:function(){var b=[],c=[];this.els.each(function(d,e){var f=a(e),g=f.offset().top,h=f.outerHeight();b.push(g),c.push(g+h)}),this.tops=b,this.bottoms=c},getHorizontalIndex:function(a){this.ensureBuilt();var b,c=this.boundingRect,d=this.lefts,e=this.rights,f=d.length;if(!c||a>=c.left&&ab;b++)if(a>=d[b]&&a=c.top&&ab;b++)if(a>=d[b]&&a=e*e&&this.handleDistanceSurpassed(a)),this.isDragging&&this.handleDrag(c,d,a)},handleDrag:function(a,b,c){this.trigger("drag",a,b,c),this.updateAutoScroll(c)},endDrag:function(a){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(a))},handleDragEnd:function(a){this.trigger("dragEnd",a),this.destroyHrefHack()},startDelay:function(a){var b=this;this.delay?this.delayTimeoutId=setTimeout(function(){b.handleDelayEnd(a)},this.delay):this.handleDelayEnd(a)},handleDelayEnd:function(a){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(a)},handleDistanceSurpassed:function(a){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(a)},handleTouchMove:function(a){this.isDragging&&a.preventDefault(),this.handleMove(a)},handleMouseMove:function(a){this.handleMove(a)},handleTouchScroll:function(a){this.isDragging||this.endInteraction(a,!0)},initHrefHack:function(){var a=this.subjectEl;(this.subjectHref=a?a.attr("href"):null)&&a.removeAttr("href")},destroyHrefHack:function(){var a=this.subjectEl,b=this.subjectHref;setTimeout(function(){b&&a.attr("href",b)},0)},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+a]&&this["_"+a].apply(this,Array.prototype.slice.call(arguments,1))}});pb.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var a=this.scrollEl;this.isAutoScroll=this.options.scroll&&a&&!a.is(window)&&!a.is(document),this.isAutoScroll&&this.listenTo(a,"scroll",ja(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=n(this.scrollEl))},updateAutoScroll:function(a){var b,c,d,e,f=this.scrollSensitivity,g=this.scrollBounds,h=0,i=0;g&&(b=(f-(w(a)-g.top))/f,c=(f-(g.bottom-w(a)))/f,d=(f-(v(a)-g.left))/f,e=(f-(g.right-v(a)))/f,b>=0&&1>=b?h=b*this.scrollSpeed*-1:c>=0&&1>=c&&(h=c*this.scrollSpeed),d>=0&&1>=d?i=d*this.scrollSpeed*-1:e>=0&&1>=e&&(i=e*this.scrollSpeed)),this.setScrollVel(h,i)},setScrollVel:function(a,b){this.scrollTopVel=a,this.scrollLeftVel=b,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(ia(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var a=this.scrollEl;this.scrollTopVel<0?a.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&a.scrollTop()+a[0].clientHeight>=a[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?a.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&a.scrollLeft()+a[0].clientWidth>=a[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var a=this.scrollEl,b=this.scrollIntervalMs/1e3;this.scrollTopVel&&a.scrollTop(a.scrollTop()+this.scrollTopVel*b),this.scrollLeftVel&&a.scrollLeft(a.scrollLeft()+this.scrollLeftVel*b),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var qb=pb.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(a,b){pb.call(this,b),this.component=a},handleInteractionStart:function(a){var b,c,d,e=this.subjectEl;this.computeCoords(),a?(c={left:v(a),top:w(a)},d=c,e&&(b=n(e),d=D(d,b)),this.origHit=this.queryHit(d.left,d.top),e&&this.options.subjectCenter&&(this.origHit&&(b=C(this.origHit,b)||b),d=E(b)),this.coordAdjust=F(d,c)):(this.origHit=null,this.coordAdjust=null),pb.prototype.handleInteractionStart.apply(this,arguments)},computeCoords:function(){this.component.prepareHits(),this.computeScrollBounds()},handleDragStart:function(a){var b;pb.prototype.handleDragStart.apply(this,arguments),b=this.queryHit(v(a),w(a)),b&&this.handleHitOver(b)},handleDrag:function(a,b,c){var d;pb.prototype.handleDrag.apply(this,arguments),d=this.queryHit(v(c),w(c)),Aa(d,this.hit)||(this.hit&&this.handleHitOut(),d&&this.handleHitOver(d))},handleDragEnd:function(){this.handleHitDone(),pb.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(a){var b=Aa(a,this.origHit);this.hit=a,this.trigger("hitOver",this.hit,b,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){pb.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.releaseHits()},handleScrollEnd:function(){pb.prototype.handleScrollEnd.apply(this,arguments),this.computeCoords()},queryHit:function(a,b){return this.coordAdjust&&(a+=this.coordAdjust.left,b+=this.coordAdjust.top),this.component.queryHit(a,b)}}),rb=xa.extend(lb,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(b,c){this.options=c=c||{},this.sourceEl=b,this.parentEl=c.parentEl?a(c.parentEl):b.parent()},start:function(b){this.isFollowing||(this.isFollowing=!0,this.y0=w(b),this.x0=v(b),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),x(b)?this.listenTo(a(document),"touchmove",this.handleMove):this.listenTo(a(document),"mousemove",this.handleMove))},stop:function(b,c){function d(){this.isAnimating=!1,e.removeElement(),this.top0=this.left0=null,c&&c()}var e=this,f=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(a(document)),b&&f&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:f,complete:d})):d())},getEl:function(){var a=this.el;return a||(this.sourceEl.width(),a=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").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}),a.addClass("fc-unselectable"),a.appendTo(this.parentEl)),a},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var a,b;this.getEl(),null===this.top0&&(this.sourceEl.width(),a=this.sourceEl.offset(),b=this.el.offsetParent().offset(),this.top0=a.top-b.top,this.left0=a.left-b.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(a){this.topDelta=w(a)-this.y0,this.leftDelta=v(a)-this.x0,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())}}),sb=Va.Grid=xa.extend(lb,mb,{view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayDragListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(a){this.view=a,this.isRTL=a.opt("isRTL"),this.elsByFill={},this.dayDragListener=this.buildDayDragListener(),this.initMouseIgnoring()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(a){this.start=a.start.clone(),this.end=a.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var a,b,c=this.view;this.eventTimeFormat=c.opt("eventTimeFormat")||c.opt("timeFormat")||this.computeEventTimeFormat(),a=c.opt("displayEventTime"),null==a&&(a=this.computeDisplayEventTime()),b=c.opt("displayEventEnd"),null==b&&(b=this.computeDisplayEventEnd()),this.displayEventTime=a,this.displayEventEnd=b},spanToSegs:function(a){},diffDates:function(a,b){return this.largeUnit?N(a,b,this.largeUnit):L(a,b)},prepareHits:function(){},releaseHits:function(){},queryHit:function(a,b){},getHitSpan:function(a){},getHitEl:function(a){},setElement:function(a){this.el=a,y(a),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(b,c){var d=this;this.el.on(b,function(b){return a(b.target).is(".fc-event-container *, .fc-more")||a(b.target).closest(".fc-popover").length?void 0:c.call(d,b)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(a(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(a(document))},dayMousedown:function(a){this.isIgnoringMouse||this.dayDragListener.startInteraction(a,{})},dayTouchStart:function(a){var b=this.view;(b.isSelected||b.selectedEvent)&&this.tempIgnoreMouse(),this.dayDragListener.startInteraction(a,{delay:this.view.opt("longPressDelay")})},buildDayDragListener:function(){var a,b,c=this,d=this.view,e=d.opt("selectable"),f=new qb(this,{scroll:d.opt("dragScroll"),interactionStart:function(){a=f.origHit},dragStart:function(){d.unselect()},hitOver:function(d,f,h){h&&(f||(a=null),e&&(b=c.computeSelection(c.getHitSpan(h),c.getHitSpan(d)),b?c.renderSelection(b):b===!1&&g()))},hitOut:function(){a=null,b=null,c.unrenderSelection(),h()},interactionEnd:function(e,f){f||(a&&!c.isIgnoringMouse&&d.triggerDayClick(c.getHitSpan(a),c.getHitEl(a),e),b&&d.reportSelection(b,e),h())}});return f},clearDragListeners:function(){this.dayDragListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(a,b){var c=this.fabricateHelperEvent(a,b);return this.renderHelper(c,b)},fabricateHelperEvent:function(a,b){var c=b?X(b.event):{};return c.start=a.start.clone(),c.end=a.end?a.end.clone():null,c.allDay=null,this.view.calendar.normalizeEventDates(c),c.className=(c.className||[]).concat("fc-helper"),b||(c.editable=!1),c},renderHelper:function(a,b){},unrenderHelper:function(){},renderSelection:function(a){this.renderHighlight(a)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(a,b){var c=this.computeSelectionSpan(a,b);return c&&!this.view.calendar.isSelectionSpanAllowed(c)?!1:c},computeSelectionSpan:function(a,b){var c=[a.start,a.end,b.start,b.end];return c.sort(ga),{start:c[0].clone(),end:c[3].clone()}},renderHighlight:function(a){this.renderFill("highlight",this.spanToSegs(a))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(a){},unrenderNowIndicator:function(){},renderFill:function(a,b){},unrenderFill:function(a){var b=this.elsByFill[a];b&&(b.remove(),delete this.elsByFill[a])},renderFillSegEls:function(b,c){var d,e=this,f=this[b+"SegEl"],g="",h=[];if(c.length){for(d=0;d"},getDayClasses:function(a){var b=this.view,c=b.calendar.getNow(),d=["fc-"+Za[a.day()]];return 1==b.intervalDuration.as("months")&&a.month()!=b.intervalStart.month()&&d.push("fc-other-month"),a.isSame(c,"day")?d.push("fc-today",b.highlightStateClass):c>a?d.push("fc-past"):d.push("fc-future"),d}});sb.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(a){var b,c=[],d=[];for(b=0;b *",function(b){var e=a(this).data("fc-seg");return!e||d.isDraggingSeg||d.isResizingSeg?void 0:c.call(d,e,b)})},handleSegClick:function(a,b){return this.view.trigger("eventClick",a.el[0],a.event,b)},handleSegMouseover:function(a,b){this.isIgnoringMouse||this.mousedOverSeg||(this.mousedOverSeg=a,a.el.addClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseover",a.el[0],a.event,b))},handleSegMouseout:function(a,b){b=b||{},this.mousedOverSeg&&(a=a||this.mousedOverSeg,this.mousedOverSeg=null,a.el.removeClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseout",a.el[0],a.event,b))},handleSegMousedown:function(a,b){var c=this.startSegResize(a,b,{distance:5});!c&&this.view.isEventDraggable(a.event)&&this.buildSegDragListener(a).startInteraction(b,{distance:5})},handleSegTouchStart:function(a,b){var c,d=this.view,e=a.event,f=d.isEventSelected(e),g=d.isEventDraggable(e),h=d.isEventResizable(e),i=!1;f&&h&&(i=this.startSegResize(a,b)),i||!g&&!h||(c=g?this.buildSegDragListener(a):this.buildSegSelectListener(a),c.startInteraction(b,{delay:f?0:this.view.opt("longPressDelay")})),this.tempIgnoreMouse()},handleSegTouchEnd:function(a,b){this.tempIgnoreMouse()},startSegResize:function(b,c,d){return a(c.target).is(".fc-resizer")?(this.buildSegResizeListener(b,a(c.target).is(".fc-start-resizer")).startInteraction(c,d),!0):!1},buildSegDragListener:function(a){var b,c,d,e=this,f=this.view,i=f.calendar,j=a.el,k=a.event;if(this.segDragListener)return this.segDragListener;var l=this.segDragListener=new qb(f,{scroll:f.opt("dragScroll"),subjectEl:j,subjectCenter:!0,interactionStart:function(d){b=!1,c=new rb(a.el,{additionalClass:"fc-dragging",parentEl:f.el,opacity:l.isTouch?null:f.opt("dragOpacity"),revertDuration:f.opt("dragRevertDuration"),zIndex:2}),c.hide(),c.start(d)},dragStart:function(c){l.isTouch&&!f.isEventSelected(k)&&f.selectEvent(k),b=!0,e.handleSegMouseout(a,c),e.segDragStart(a,c),f.hideEvent(k)},hitOver:function(b,h,j){var m;a.hit&&(j=a.hit),d=e.computeEventDrop(j.component.getHitSpan(j),b.component.getHitSpan(b),k),d&&!i.isEventSpanAllowed(e.eventToSpan(d),k)&&(g(),d=null),d&&(m=f.renderDrag(d,a))?(m.addClass("fc-dragging"),l.isTouch||e.applyDragOpacity(m),c.hide()):c.show(),h&&(d=null)},hitOut:function(){f.unrenderDrag(),c.show(),d=null},hitDone:function(){h()},interactionEnd:function(g){c.stop(!d,function(){b&&(f.unrenderDrag(),f.showEvent(k),e.segDragStop(a,g)),d&&f.reportEventDrop(k,d,this.largeUnit,j,g)}),e.segDragListener=null}});return l},buildSegSelectListener:function(a){var b=this,c=this.view,d=a.event;if(this.segDragListener)return this.segDragListener;var e=this.segDragListener=new pb({dragStart:function(a){e.isTouch&&!c.isEventSelected(d)&&c.selectEvent(d)},interactionEnd:function(a){b.segDragListener=null}});return e},segDragStart:function(a,b){this.isDraggingSeg=!0,this.view.trigger("eventDragStart",a.el[0],a.event,b,{})},segDragStop:function(a,b){this.isDraggingSeg=!1,this.view.trigger("eventDragStop",a.el[0],a.event,b,{})},computeEventDrop:function(a,b,c){var d,e,f=this.view.calendar,g=a.start,h=b.start;return g.hasTime()===h.hasTime()?(d=this.diffDates(h,g),c.allDay&&T(d)?(e={start:c.start.clone(),end:f.getEventEnd(c),allDay:!1},f.normalizeEventTimes(e)):e={start:c.start.clone(),end:c.end?c.end.clone():null,allDay:c.allDay},e.start.add(d),e.end&&e.end.add(d)):e={start:h.clone(),end:null,allDay:!h.hasTime()},e},applyDragOpacity:function(a){var b=this.view.opt("dragOpacity");null!=b&&a.each(function(a,c){c.style.opacity=b})},externalDragStart:function(b,c){var d,e,f=this.view;f.opt("droppable")&&(d=a((c?c.item:null)||b.target),e=f.opt("dropAccept"),(a.isFunction(e)?e.call(d[0],d):d.is(e))&&(this.isDraggingExternal||this.listenToExternalDrag(d,b,c)))},listenToExternalDrag:function(a,b,c){var d,e=this,f=this.view.calendar,i=Ha(a),j=e.externalDragListener=new qb(this,{interactionStart:function(){e.isDraggingExternal=!0},hitOver:function(a){d=e.computeExternalDrop(a.component.getHitSpan(a),i),d&&!f.isExternalSpanAllowed(e.eventToSpan(d),d,i.eventProps)&&(g(),d=null),d&&e.renderDrag(d)},hitOut:function(){d=null},hitDone:function(){h(),e.unrenderDrag()},interactionEnd:function(b){d&&e.view.reportExternalDrop(i,d,a,b,c),e.isDraggingExternal=!1,e.externalDragListener=null}});j.startDrag(b)},computeExternalDrop:function(a,b){var c=this.view.calendar,d={start:c.applyTimezone(a.start),end:null};return b.startTime&&!d.start.hasTime()&&d.start.time(b.startTime),b.duration&&(d.end=d.start.clone().add(b.duration)),d},renderDrag:function(a,b){},unrenderDrag:function(){},buildSegResizeListener:function(a,b){var c,d,e=this,f=this.view,i=f.calendar,j=a.el,k=a.event,l=i.getEventEnd(k),m=this.segResizeListener=new qb(this,{scroll:f.opt("dragScroll"),subjectEl:j,interactionStart:function(){c=!1},dragStart:function(b){c=!0,e.handleSegMouseout(a,b),e.segResizeStart(a,b)},hitOver:function(c,h,j){var m=e.getHitSpan(j),n=e.getHitSpan(c);d=b?e.computeEventStartResize(m,n,k):e.computeEventEndResize(m,n,k),d&&(i.isEventSpanAllowed(e.eventToSpan(d),k)?d.start.isSame(k.start)&&d.end.isSame(l)&&(d=null):(g(),d=null)),d&&(f.hideEvent(k),e.renderEventResize(d,a))},hitOut:function(){d=null},hitDone:function(){e.unrenderEventResize(),f.showEvent(k),h()},interactionEnd:function(b){c&&e.segResizeStop(a,b),d&&f.reportEventResize(k,d,this.largeUnit,j,b),e.segResizeListener=null}});return m},segResizeStart:function(a,b){this.isResizingSeg=!0,this.view.trigger("eventResizeStart",a.el[0],a.event,b,{})},segResizeStop:function(a,b){this.isResizingSeg=!1,this.view.trigger("eventResizeStop",a.el[0],a.event,b,{})},computeEventStartResize:function(a,b,c){return this.computeEventResize("start",a,b,c)},computeEventEndResize:function(a,b,c){return this.computeEventResize("end",a,b,c)},computeEventResize:function(a,b,c,d){var e,f,g=this.view.calendar,h=this.diffDates(c[a],b[a]);return e={start:d.start.clone(),end:g.getEventEnd(d),allDay:d.allDay},e.allDay&&T(h)&&(e.allDay=!1,g.normalizeEventTimes(e)),e[a].add(h),e.start.isBefore(e.end)||(f=this.minResizeDuration||(d.allDay?g.defaultAllDayEventDuration:g.defaultTimedEventDuration),"start"==a?e.start=e.end.clone().subtract(f):e.end=e.start.clone().add(f)),e},renderEventResize:function(a,b){},unrenderEventResize:function(){},getEventTimeText:function(a,b,c){return null==b&&(b=this.eventTimeFormat),null==c&&(c=this.displayEventEnd),this.displayEventTime&&a.start.hasTime()?c&&a.end?this.view.formatRange(a,b):a.start.format(b):""},getSegClasses:function(a,b,c){var d=this.view,e=a.event,f=["fc-event",a.isStart?"fc-start":"fc-not-start",a.isEnd?"fc-end":"fc-not-end"].concat(e.className,e.source?e.source.className:[]);return b&&f.push("fc-draggable"),c&&f.push("fc-resizable"),d.isEventSelected(e)&&f.push("fc-selected"),f},getSegSkinCss:function(a){var b=a.event,c=this.view,d=b.source||{},e=b.color,f=d.color,g=c.opt("eventColor");return{"background-color":b.backgroundColor||e||d.backgroundColor||f||c.opt("eventBackgroundColor")||g,"border-color":b.borderColor||e||d.borderColor||f||c.opt("eventBorderColor")||g,color:b.textColor||d.textColor||c.opt("eventTextColor")}},eventToSegs:function(a){return this.eventsToSegs([a])},eventToSpan:function(a){return this.eventToSpans(a)[0]},eventToSpans:function(a){var b=this.eventToRange(a);return this.eventRangeToSpans(b,a)},eventsToSegs:function(b,c){var d=this,e=Fa(b),f=[];return a.each(e,function(a,b){var e,g=[];for(e=0;eh&&g.push({start:h,end:c.start}),h=c.end;return f>h&&g.push({start:h,end:f}),g},sortEventSegs:function(a){a.sort(ia(this,"compareEventSegs"))},compareEventSegs:function(a,b){return a.eventStartMS-b.eventStartMS||b.eventDurationMS-a.eventDurationMS||b.event.allDay-a.event.allDay||H(a.event,b.event,this.view.eventOrderSpecs)}}),Va.isBgEvent=Ca,Va.dataAttrPrefix="";var tb=Va.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){for(var a,b,c,d=this.view,e=this.start.clone(),f=-1,g=[],h=[];e.isBefore(this.end);)d.isHiddenDay(e)?g.push(f+.5):(f++,g.push(f),h.push(e.clone())),e.add(1,"days");if(this.breakOnWeeks){for(b=h[0].day(),a=1;ac?b[0]-1:c>=b.length?b[b.length-1]+1:b[c]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(a){var b,c,d,e,f,g=this.daysPerRow,h=this.view.computeDayRange(a),i=this.getDateDayIndex(h.start),j=this.getDateDayIndex(h.end.clone().subtract(1,"days")),k=[];for(b=0;b=e&&k.push({row:b,firstRowDayIndex:e-c,lastRowDayIndex:f-c,isStart:e===i,isEnd:f===j});return k},sliceRangeByDay:function(a){var b,c,d,e,f,g,h=this.daysPerRow,i=this.view.computeDayRange(a),j=this.getDateDayIndex(i.start),k=this.getDateDayIndex(i.end.clone().subtract(1,"days")),l=[];for(b=0;b=e;e++)f=Math.max(j,e),g=Math.min(k,e),f=Math.ceil(f),g=Math.floor(g),g>=f&&l.push({row:b,firstRowDayIndex:f-c,lastRowDayIndex:g-c,isStart:f===j,isEnd:g===k});return l},renderHeadHtml:function(){var a=this.view;return'
'+this.renderHeadTrHtml()+"
"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return""+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},renderHeadDateCellsHtml:function(){var a,b,c=[];for(a=0;a1?' colspan="'+b+'"':"")+(c?" "+c:"")+">"+ca(a.format(this.colHeadFormat))+""},renderBgTrHtml:function(a){return""+(this.isRTL?"":this.renderBgIntroHtml(a))+this.renderBgCellsHtml(a)+(this.isRTL?this.renderBgIntroHtml(a):"")+""; -},renderBgIntroHtml:function(a){return this.renderIntroHtml()},renderBgCellsHtml:function(a){var b,c,d=[];for(b=0;b"},renderIntroHtml:function(){},bookendCells:function(a){var b=this.renderIntroHtml();b&&(this.isRTL?a.append(b):a.prepend(b))}},ub=Va.DayGrid=sb.extend(tb,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(a){var b,c,d=this.view,e=this.rowCnt,f=this.colCnt,g="";for(b=0;e>b;b++)g+=this.renderDayRowHtml(b,a);for(this.el.html(g),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new ob({els:this.rowEls,isVertical:!0}),this.colCoordCache=new ob({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),b=0;e>b;b++)for(c=0;f>c;c++)d.trigger("dayRender",null,this.getCellDate(b,c),this.getCellEl(b,c))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var a=this.view.calendar.getBusinessHoursEvents(!0),b=this.eventsToSegs(a);this.renderFill("businessHours",b,"bgevent")},renderDayRowHtml:function(a,b){var c=this.view,d=["fc-row","fc-week",c.widgetContentClass];return b&&d.push("fc-rigid"),'
'+this.renderBgTrHtml(a)+'
'+(this.numbersVisible?""+this.renderNumberTrHtml(a)+"":"")+"
"},renderNumberTrHtml:function(a){return""+(this.isRTL?"":this.renderNumberIntroHtml(a))+this.renderNumberCellsHtml(a)+(this.isRTL?this.renderNumberIntroHtml(a):"")+""},renderNumberIntroHtml:function(a){return this.renderIntroHtml()},renderNumberCellsHtml:function(a){var b,c,d=[];for(b=0;b'+a.date()+""):""},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(a){var b,c,d=this.sliceRangeByRow(a);for(b=0;b');g=c&&c.row===b?c.el.position().top:h.find(".fc-content-skeleton tbody").position().top,i.css("top",g).find("table").append(d[b].tbodyEl),h.append(i),e.push(i[0])}),this.helperEls=a(e)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(b,c,d){var e,f,g,h=[];for(c=this.renderFillSegEls(b,c),e=0;e
'),f=e.find("tr"),h>0&&f.append(''),f.append(c.el.attr("colspan",i-h)),g>i&&f.append(''),this.bookendCells(f),e}});ub.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),sb.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return sb.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(b){var c=a.grep(b,function(a){return a.event.allDay});return sb.prototype.renderBgSegs.call(this,c)},renderFgSegs:function(b){var c;return b=this.renderFgSegEls(b),c=this.rowStructs=this.renderSegRows(b),this.rowEls.each(function(b,d){a(d).find(".fc-content-skeleton > table").append(c[b].tbodyEl)}),b},unrenderFgSegs:function(){for(var a,b=this.rowStructs||[];a=b.pop();)a.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(a){var b,c,d=[];for(b=this.groupSegRows(a),c=0;c'+ca(c)+"")),d=''+(ca(f.title||"")||" ")+"",'
'+(this.isRTL?d+" "+l:l+" "+d)+"
"+(h?'
':"")+(i?'
':"")+""},renderSegRow:function(b,c){function d(b){for(;b>g;)k=(r[e-1]||[])[g],k?k.attr("rowspan",parseInt(k.attr("rowspan")||1,10)+1):(k=a(""),h.append(k)),q[e][g]=k,r[e][g]=k,g++}var e,f,g,h,i,j,k,l=this.colCnt,m=this.buildSegLevels(c),n=Math.max(1,m.length),o=a(""),p=[],q=[],r=[];for(e=0;n>e;e++){if(f=m[e],g=0,h=a(""),p.push([]),q.push([]),r.push([]),f)for(i=0;i').append(j.el),j.leftCol!=j.rightCol?k.attr("colspan",j.rightCol-j.leftCol+1):r[e][g]=k;g<=j.rightCol;)q[e][g]=k,p[e][g]=j,g++;h.append(k)}d(l),this.bookendCells(h),o.append(h)}return{row:b,tbodyEl:o,cellMatrix:q,segMatrix:p,segLevels:m,segs:c}},buildSegLevels:function(a){var b,c,d,e=[];for(this.sortEventSegs(a),b=0;b td > :first-child").each(c),e.position().top+f>h)return d;return!1},limitRow:function(b,c){function d(d){for(;d>w;)j=t.getCellSegs(b,w,c),j.length&&(m=f[c-1][w],s=t.renderMoreLink(b,w,j),r=a("
").append(s),m.append(r),v.push(r[0])),w++}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=this,u=this.rowStructs[b],v=[],w=0;if(c&&c').attr("rowspan",n),j=l[p],s=this.renderMoreLink(b,i.leftCol+p,[i].concat(j)),r=a("
").append(s),q.append(r),o.push(q[0]),v.push(q[0]);m.addClass("fc-limited").after(a(o)),g.push(m[0])}}d(this.colCnt),u.moreEls=a(v),u.limitedEls=a(g)}},unlimitRow:function(a){var b=this.rowStructs[a];b.moreEls&&(b.moreEls.remove(),b.moreEls=null),b.limitedEls&&(b.limitedEls.removeClass("fc-limited"),b.limitedEls=null)},renderMoreLink:function(b,c,d){var e=this,f=this.view;return a('').text(this.getMoreLinkText(d.length)).on("click",function(g){var h=f.opt("eventLimitClick"),i=e.getCellDate(b,c),j=a(this),k=e.getCellEl(b,c),l=e.getCellSegs(b,c),m=e.resliceDaySegs(l,i),n=e.resliceDaySegs(d,i);"function"==typeof h&&(h=f.trigger("eventLimitClick",null,{date:i,dayEl:k,moreEl:j,segs:m,hiddenSegs:n},g)),"popover"===h?e.showSegPopover(b,c,j,m):"string"==typeof h&&f.calendar.zoomTo(i,h)})},showSegPopover:function(a,b,c,d){var e,f,g=this,h=this.view,i=c.parent();e=1==this.rowCnt?h.el:this.rowEls.eq(a),f={className:"fc-more-popover",content:this.renderSegPopoverContent(a,b,d),parentEl:this.el,top:e.offset().top,autoHide:!0,viewportConstrain:h.opt("popoverViewportConstrain"),hide:function(){g.segPopover.removeElement(),g.segPopover=null,g.popoverSegs=null}},this.isRTL?f.right=i.offset().left+i.outerWidth()+1:f.left=i.offset().left-1,this.segPopover=new nb(f),this.segPopover.show()},renderSegPopoverContent:function(b,c,d){var e,f=this.view,g=f.opt("theme"),h=this.getCellDate(b,c).format(f.opt("dayPopoverFormat")),i=a('
'+ca(h)+'
'),j=i.find(".fc-event-container");for(d=this.renderFgSegEls(d,!0),this.popoverSegs=d,e=0;e'+this.renderBgTrHtml(0)+'
'+this.renderSlatRowHtml()+"
"},renderSlatRowHtml:function(){for(var a,c,d,e=this.view,f=this.isRTL,g="",h=b.duration(+this.minTime);h"+(c?""+ca(a.format(this.labelFormat))+"":"")+"",g+='"+(f?"":d)+''+(f?d:"")+"",h.add(this.slotDuration);return g},processOptions:function(){var c,d=this.view,e=d.opt("slotDuration"),f=d.opt("snapDuration");e=b.duration(e),f=f?b.duration(f):e,this.slotDuration=e,this.snapDuration=f,this.snapsPerSlot=e/f,this.minResizeDuration=f,this.minTime=b.duration(d.opt("minTime")),this.maxTime=b.duration(d.opt("maxTime")),c=d.opt("slotLabelFormat"),a.isArray(c)&&(c=c[c.length-1]),this.labelFormat=c||d.opt("axisFormat")||d.opt("smallTimeFormat"),c=d.opt("slotLabelInterval"),this.labelInterval=c?b.duration(c):this.computeLabelInterval(e)},computeLabelInterval:function(a){var c,d,e;for(c=Mb.length-1;c>=0;c--)if(d=b.duration(Mb[c]),e=R(d,a),ha(e)&&e>1)return d;return b.duration(a)},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(a,b){var c=this.snapsPerSlot,d=this.colCoordCache,e=this.slatCoordCache,f=d.getHorizontalIndex(a),g=e.getVerticalIndex(b);if(null!=f&&null!=g){var h=e.getTopOffset(g),i=e.getHeight(g),j=(b-h)/i,k=Math.floor(j*c),l=g*c+k,m=h+k/c*i,n=h+(k+1)/c*i;return{col:f,snap:l,component:this,left:d.getLeftOffset(f),right:d.getRightOffset(f),top:m,bottom:n}}},getHitSpan:function(a){var b,c=this.getCellDate(0,a.col),d=this.computeSnapTime(a.snap);return c.time(d),b=c.clone().add(this.snapDuration),{start:c,end:b}},getHitEl:function(a){return this.colEls.eq(a.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(a){return b.duration(this.minTime+this.snapDuration*a)},spanToSegs:function(a){var b,c=this.sliceRangeByTimes(a);for(b=0;b
').css("top",e).appendTo(this.colContainerEls.eq(d[c].col))[0]);d.length>0&&f.push(a('
').css("top",e).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=a(f)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(a){this.view.opt("selectHelper")?this.renderEventLocationHelper(a):this.renderHighlight(a)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(a){this.renderHighlightSegs(this.spanToSegs(a))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});vb.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 b,c,d="";for(b=0;b
';c=a('
'+d+"
"),this.colContainerEls=c.find(".fc-content-col"),this.helperContainerEls=c.find(".fc-helper-container"),this.fgContainerEls=c.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=c.find(".fc-bgevent-container"),this.highlightContainerEls=c.find(".fc-highlight-container"),this.businessContainerEls=c.find(".fc-business-container"),this.bookendCells(c.find("tr")),this.el.append(c)},renderFgSegs:function(a){return a=this.renderFgSegsIntoContainers(a,this.fgContainerEls),this.fgSegs=a,a},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(b,c){var d,e,f,g=[];for(b=this.renderFgSegsIntoContainers(b,this.helperContainerEls),d=0;d
'+(c?'
'+ca(c)+"
":"")+(g.title?'
'+ca(g.title)+"
":"")+'
'+(j?'
':"")+""},updateSegVerticals:function(a){this.computeSegVerticals(a),this.assignSegVerticals(a)},computeSegVerticals:function(a){var b,c;for(b=0;b1?"ll":"LL"},formatRange:function(a,b,c){var d=a.end;return d.hasTime()||(d=d.clone().subtract(1)),sa(a.start,d,b,c,this.opt("isRTL"))},setElement:function(a){this.el=a,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.unrenderSkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(b){var c=this,d=null;return this.displaying&&(d=this.queryScroll()),this.calendar.freezeContentHeight(),this.clear().then(function(){return c.displaying=a.when(c.displayView(b)).then(function(){c.forceScroll(c.computeInitialScroll(d)),c.calendar.unfreezeContentHeight(),c.triggerRender()})})},clear:function(){var b=this,c=this.displaying;return c?c.then(function(){return b.displaying=null,b.clearEvents(),b.clearView()}):a.when()},displayView:function(a){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),a&&this.setDate(a),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(){this.listenTo(a(document),"mousedown",this.handleDocumentMousedown),this.listenTo(a(document),"touchstart",this.processUnselect)},unbindGlobalHandlers:function(){this.stopListeningTo(a(document))},initThemingProps:function(){var a=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=a+"-widget-header",this.widgetContentClass=a+"-widget-content",this.highlightStateClass=a+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var a,c,d,e=this;this.opt("nowIndicator")&&(a=this.getNowIndicatorUnit(),a&&(c=ia(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,d=this.initialNowDate.clone().startOf(a).add(1,a)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){e.nowIndicatorTimeoutID=null,c(),d=+b.duration(1,a),d=Math.max(100,d),e.nowIndicatorIntervalID=setInterval(c,d)},d)))},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(a){},unrenderNowIndicator:function(){},updateSize:function(a){var b;a&&(b=this.queryScroll()),this.updateHeight(a),this.updateWidth(a),this.updateNowIndicator(),a&&this.setScroll(b)},updateWidth:function(a){},updateHeight:function(a){var b=this.calendar;this.setHeight(b.getSuggestedViewHeight(),b.isHeightAuto())},setHeight:function(a,b){},computeInitialScroll:function(a){return 0},queryScroll:function(){},setScroll:function(a){},forceScroll:function(a){var b=this;this.setScroll(a),setTimeout(function(){b.setScroll(a)},0)},displayEvents:function(a){var b=this.queryScroll();this.clearEvents(),this.renderEvents(a),this.isEventsRendered=!0,this.setScroll(b),this.triggerEventRender()},clearEvents:function(){var a;this.isEventsRendered&&(a=this.queryScroll(),this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.setScroll(a),this.isEventsRendered=!1)},renderEvents:function(a){},unrenderEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(a){this.trigger("eventAfterRender",a.event,a.event,a.el)}),this.trigger("eventAfterAllRender")},triggerEventUnrender:function(){this.renderedEventSegEach(function(a){this.trigger("eventDestroy",a.event,a.event,a.el)})},resolveEventEl:function(b,c){var d=this.trigger("eventRender",b,b,c);return d===!1?c=null:d&&d!==!0&&(c=a(d)),c},showEvent:function(a){this.renderedEventSegEach(function(a){a.el.css("visibility","")},a)},hideEvent:function(a){this.renderedEventSegEach(function(a){a.el.css("visibility","hidden")},a)},renderedEventSegEach:function(a,b){var c,d=this.getEventSegs();for(c=0;cb;b++)(d[b]=-1!==a.inArray(b,c))||e++;if(!e)throw"invalid hiddenDays";this.isHiddenDayHash=d},isHiddenDay:function(a){return b.isMoment(a)&&(a=a.day()),this.isHiddenDayHash[a]},skipHiddenDays:function(a,b,c){var d=a.clone();for(b=b||1;this.isHiddenDayHash[(d.day()+(c?b:0)+7)%7];)d.add(b,"days");return d},computeDayRange:function(a){var b,c=a.start.clone().stripTime(),d=a.end,e=null;return d&&(e=d.clone().stripTime(),b=+d.time(),b&&b>=this.nextDayThreshold&&e.add(1,"days")),(!d||c>=e)&&(e=c.clone().add(1,"days")),{start:c,end:e}},isMultiDayEvent:function(a){var b=this.computeDayRange(a);return b.end.diff(b.start,"days")>1}}),xb=Va.Scroller=xa.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(a){a=a||{},this.overflowX=a.overflowX||a.overflow||"auto",this.overflowY=a.overflowY||a.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=a('
')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(a){var b=this.overflowX,c=this.overflowY;a=a||this.getScrollbarWidths(),"auto"===b&&(b=a.top||a.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===c&&(c=a.left||a.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":b,"overflow-y":c})},setHeight:function(a){this.scrollEl.height(a)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(a){this.scrollEl.scrollTop(a)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return q(this.scrollEl)}}),yb=Va.Calendar=xa.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:Pa,initialize:function(){},initOptions:function(a){var b,e,f,g;a=d(a),b=a.lang,e=zb[b],e||(b=yb.defaults.lang,e=zb[b]||{}),f=ba(a.isRTL,e.isRTL,yb.defaults.isRTL),g=f?yb.rtlDefaults:{},this.dirDefaults=g,this.langDefaults=e,this.overrides=a,this.options=c([yb.defaults,g,e,a]),Qa(this.options),this.viewSpecCache={}},getViewSpec:function(a){var b=this.viewSpecCache;return b[a]||(b[a]=this.buildViewSpec(a))},getUnitViewSpec:function(b){var c,d,e;if(-1!=a.inArray(b,$a))for(c=this.header.getViewsWithButtons(),a.each(Va.views,function(a){c.push(a)}),d=0;d1,this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var b=this.scroller.el.addClass("fc-day-grid-container"),c=a('
').appendTo(b);this.el.find(".fc-body > tr > td").append(b),this.dayGrid.setElement(c),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(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderSkeletonHtml:function(){return'
'},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var a=this.opt("eventLimit");return a&&"number"!=typeof a},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=k(this.el.find(".fc-week-number")))},setHeight:function(a,b){var c,d,g=this.opt("eventLimit");this.scroller.clear(),f(this.headRowEl),this.dayGrid.removeSegPopover(),g&&"number"==typeof g&&this.dayGrid.limitRows(g),c=this.computeScrollerHeight(a),this.setGridHeight(c,b),g&&"number"!=typeof g&&this.dayGrid.limitRows(g),b||(this.scroller.setHeight(c),d=this.scroller.getScrollbarWidths(),(d.left||d.right)&&(e(this.headRowEl,d),c=this.computeScrollerHeight(a),this.scroller.setHeight(c)),this.scroller.lockOverflow(d))},computeScrollerHeight:function(a){return a-l(this.el,this.scroller.el)},setGridHeight:function(a,b){b?j(this.dayGrid.rowEls):i(this.dayGrid.rowEls,a,!0)},queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(a){this.scroller.setScrollTop(a)},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(a,b){return this.dayGrid.queryHit(a,b)},getHitSpan:function(a){return this.dayGrid.getHitSpan(a)},getHitEl:function(a){return this.dayGrid.getHitEl(a)},renderEvents:function(a){this.dayGrid.renderEvents(a),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(a,b){return this.dayGrid.renderDrag(a,b)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(a){this.dayGrid.renderSelection(a)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),Gb={renderHeadIntroHtml:function(){var a=this.view;return a.weekNumbersVisible?'"+ca(a.opt("weekNumberTitle"))+"":""},renderNumberIntroHtml:function(a){var b=this.view;return b.weekNumbersVisible?'"+this.getCellDate(a,0).format("w")+"":""},renderBgIntroHtml:function(){var a=this.view;return a.weekNumbersVisible?'":""},renderIntroHtml:function(){var a=this.view;return a.weekNumbersVisible?'":""}},Hb=Va.MonthView=Fb.extend({computeRange:function(a){var b,c=Fb.prototype.computeRange.call(this,a);return this.isFixedWeeks()&&(b=Math.ceil(c.end.diff(c.start,"weeks",!0)),c.end.add(6-b,"weeks")),c},setGridHeight:function(a,b){b=b||"variable"===this.opt("weekMode"),b&&(a*=this.rowCnt/6),i(this.dayGrid.rowEls,a,!b)},isFixedWeeks:function(){var a=this.opt("weekMode");return a?"fixed"===a:this.opt("fixedWeekCount")}});Wa.basic={"class":Fb},Wa.basicDay={type:"basic",duration:{days:1}},Wa.basicWeek={type:"basic",duration:{weeks:1}},Wa.month={"class":Hb,duration:{months:1},defaults:{fixedWeekCount:!0}};var Ib=Va.AgendaView=wb.extend({scroller:null,timeGridClass:vb,timeGrid:null,dayGridClass:ub,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new xb({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var a=this.timeGridClass.extend(Jb);return new a(this)},instantiateDayGrid:function(){var a=this.dayGridClass.extend(Kb);return new a(this)},setRange:function(a){wb.prototype.setRange.call(this,a),this.timeGrid.setRange(a),this.dayGrid&&this.dayGrid.setRange(a)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var b=this.scroller.el.addClass("fc-time-grid-container"),c=a('
').appendTo(b);this.el.find(".fc-body > tr > td").append(b),this.timeGrid.setElement(c),this.timeGrid.renderDates(),this.bottomRuleEl=a('
').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()),this.scroller.destroy()},renderSkeletonHtml:function(){return'
'+(this.dayGrid?'

':"")+"
"},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(a){this.timeGrid.renderNowIndicator(a)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(a){this.timeGrid.updateSize(a),wb.prototype.updateSize.call(this,a)},updateWidth:function(){this.axisWidth=k(this.el.find(".fc-axis"))},setHeight:function(a,b){var c,d,g;this.bottomRuleEl.hide(),this.scroller.clear(),f(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),c=this.opt("eventLimit"),c&&"number"!=typeof c&&(c=Lb),c&&this.dayGrid.limitRows(c)),b||(d=this.computeScrollerHeight(a),this.scroller.setHeight(d),g=this.scroller.getScrollbarWidths(),(g.left||g.right)&&(e(this.noScrollRowEls,g),d=this.computeScrollerHeight(a),this.scroller.setHeight(d)),this.scroller.lockOverflow(g),this.timeGrid.getTotalSlatHeight()"+ca(a)+""):'"},renderBgIntroHtml:function(){var a=this.view;return'"},renderIntroHtml:function(){var a=this.view;return'"}},Kb={renderBgIntroHtml:function(){var a=this.view;return'"+(a.opt("allDayHtml")||ca(a.opt("allDayText")))+""},renderIntroHtml:function(){var a=this.view;return'"}},Lb=5,Mb=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];return Wa.agenda={"class":Ib,defaults:{allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},Wa.agendaDay={type:"agenda",duration:{days:1}},Wa.agendaWeek={type:"agenda",duration:{weeks:1}},Va}); \ No newline at end of file +(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','moment'],factory);} +else if(typeof exports==='object'){module.exports=factory(require('jquery'),require('moment'));} +else{factory(jQuery,moment);}})(function($,moment){;;var FC=$.fullCalendar={version:"2.7.3",internalApiVersion:4};var fcViews=FC.views={};$.fn.fullCalendar=function(options){var args=Array.prototype.slice.call(arguments,1);var res=this;this.each(function(i,_element){var element=$(_element);var calendar=element.data('fullCalendar');var singleRes;if(typeof options==='string'){if(calendar&&$.isFunction(calendar[options])){singleRes=calendar[options].apply(calendar,args);if(!i){res=singleRes;} +if(options==='destroy'){element.removeData('fullCalendar');}}} +else if(!calendar){calendar=new Calendar(element,options);element.data('fullCalendar',calendar);calendar.render();}});return res;};var complexOptions=['header','buttonText','buttonIcons','themeButtonIcons'];function mergeOptions(optionObjs){return mergeProps(optionObjs,complexOptions);} +function massageOverrides(input){var overrides={views:input.views||{}};var subObj;$.each(input,function(name,val){if(name!='views'){if($.isPlainObject(val)&&!/(time|duration|interval)$/i.test(name)&&$.inArray(name,complexOptions)==-1){subObj=null;$.each(val,function(subName,subVal){if(/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(subName)){if(!overrides.views[subName]){overrides.views[subName]={};} +overrides.views[subName][name]=subVal;} +else{if(!subObj){subObj={};} +subObj[subName]=subVal;}});if(subObj){overrides[name]=subObj;}} +else{overrides[name]=val;}}});return overrides;};;FC.intersectRanges=intersectRanges;FC.applyAll=applyAll;FC.debounce=debounce;FC.isInt=isInt;FC.htmlEscape=htmlEscape;FC.cssToStr=cssToStr;FC.proxy=proxy;FC.capitaliseFirstLetter=capitaliseFirstLetter;function compensateScroll(rowEls,scrollbarWidths){if(scrollbarWidths.left){rowEls.css({'border-left-width':1,'margin-left':scrollbarWidths.left-1});} +if(scrollbarWidths.right){rowEls.css({'border-right-width':1,'margin-right':scrollbarWidths.right-1});}} +function uncompensateScroll(rowEls){rowEls.css({'margin-left':'','margin-right':'','border-left-width':'','border-right-width':''});} +function disableCursor(){$('body').addClass('fc-not-allowed');} +function enableCursor(){$('body').removeClass('fc-not-allowed');} +function distributeHeight(els,availableHeight,shouldRedistribute){var minOffset1=Math.floor(availableHeight/els.length);var minOffset2=Math.floor(availableHeight-minOffset1*(els.length-1));var flexEls=[];var flexOffsets=[];var flexHeights=[];var usedHeight=0;undistributeHeight(els);els.each(function(i,el){var minOffset=i===els.length-1?minOffset2:minOffset1;var naturalOffset=$(el).outerHeight(true);if(naturalOffset span').each(function(i,innerEl){var innerWidth=$(innerEl).outerWidth();if(innerWidth>maxInnerWidth){maxInnerWidth=innerWidth;}});maxInnerWidth++;els.width(maxInnerWidth);return maxInnerWidth;} +function subtractInnerElHeight(outerEl,innerEl){var both=outerEl.add(innerEl);var diff;both.css({position:'relative',left:-1});diff=outerEl.outerHeight()-innerEl.outerHeight();both.css({position:'',left:''});return diff;} +FC.getOuterRect=getOuterRect;FC.getClientRect=getClientRect;FC.getContentRect=getContentRect;FC.getScrollbarWidths=getScrollbarWidths;function getScrollParent(el){var position=el.css('position'),scrollParent=el.parents().filter(function(){var parent=$(this);return(/(auto|scroll)/).test(parent.css('overflow')+parent.css('overflow-y')+parent.css('overflow-x'));}).eq(0);return position==='fixed'||!scrollParent.length?$(el[0].ownerDocument||document):scrollParent;} +function getOuterRect(el,origin){var offset=el.offset();var left=offset.left-(origin?origin.left:0);var top=offset.top-(origin?origin.top:0);return{left:left,right:left+el.outerWidth(),top:top,bottom:top+el.outerHeight()};} +function getClientRect(el,origin){var offset=el.offset();var scrollbarWidths=getScrollbarWidths(el);var left=offset.left+getCssFloat(el,'border-left-width')+scrollbarWidths.left-(origin?origin.left:0);var top=offset.top+getCssFloat(el,'border-top-width')+scrollbarWidths.top-(origin?origin.top:0);return{left:left,right:left+el[0].clientWidth,top:top,bottom:top+el[0].clientHeight};} +function getContentRect(el,origin){var offset=el.offset();var left=offset.left+getCssFloat(el,'border-left-width')+getCssFloat(el,'padding-left')- +(origin?origin.left:0);var top=offset.top+getCssFloat(el,'border-top-width')+getCssFloat(el,'padding-top')- +(origin?origin.top:0);return{left:left,right:left+el.width(),top:top,bottom:top+el.height()};} +function getScrollbarWidths(el){var leftRightWidth=el.innerWidth()-el[0].clientWidth;var widths={left:0,right:0,top:0,bottom:el.innerHeight()-el[0].clientHeight};if(getIsLeftRtlScrollbars()&&el.css('direction')=='rtl'){widths.left=leftRightWidth;} +else{widths.right=leftRightWidth;} +return widths;} +var _isLeftRtlScrollbars=null;function getIsLeftRtlScrollbars(){if(_isLeftRtlScrollbars===null){_isLeftRtlScrollbars=computeIsLeftRtlScrollbars();} +return _isLeftRtlScrollbars;} +function computeIsLeftRtlScrollbars(){var el=$('
').css({position:'absolute',top:-1000,left:0,border:0,padding:0,overflow:'scroll',direction:'rtl'}).appendTo('body');var innerEl=el.children();var res=innerEl.offset().left>el.offset().left;el.remove();return res;} +function getCssFloat(el,prop){return parseFloat(el.css(prop))||0;} +FC.preventDefault=preventDefault;function isPrimaryMouseButton(ev){return ev.which==1&&!ev.ctrlKey;} +function getEvX(ev){if(ev.pageX!==undefined){return ev.pageX;} +var touches=ev.originalEvent.touches;if(touches){return touches[0].pageX;}} +function getEvY(ev){if(ev.pageY!==undefined){return ev.pageY;} +var touches=ev.originalEvent.touches;if(touches){return touches[0].pageY;}} +function getEvIsTouch(ev){return/^touch/.test(ev.type);} +function preventSelection(el){el.addClass('fc-unselectable').on('selectstart',preventDefault);} +function preventDefault(ev){ev.preventDefault();} +function bindAnyScroll(handler){if(window.addEventListener){window.addEventListener('scroll',handler,true);return true;} +return false;} +function unbindAnyScroll(handler){if(window.removeEventListener){window.removeEventListener('scroll',handler,true);return true;} +return false;} +FC.intersectRects=intersectRects;function intersectRects(rect1,rect2){var res={left:Math.max(rect1.left,rect2.left),right:Math.min(rect1.right,rect2.right),top:Math.max(rect1.top,rect2.top),bottom:Math.min(rect1.bottom,rect2.bottom)};if(res.leftconstraintStart&&subjectStart=constraintStart){segStart=subjectStart.clone();isStart=true;} +else{segStart=constraintStart.clone();isStart=false;} +if(subjectEnd<=constraintEnd){segEnd=subjectEnd.clone();isEnd=true;} +else{segEnd=constraintEnd.clone();isEnd=false;} +return{start:segStart,end:segEnd,isStart:isStart,isEnd:isEnd};}} +FC.computeIntervalUnit=computeIntervalUnit;FC.divideRangeByDuration=divideRangeByDuration;FC.divideDurationByDuration=divideDurationByDuration;FC.multiplyDuration=multiplyDuration;FC.durationHasTime=durationHasTime;var dayIDs=['sun','mon','tue','wed','thu','fri','sat'];var intervalUnits=['year','month','week','day','hour','minute','second','millisecond'];function diffDayTime(a,b){return moment.duration({days:a.clone().stripTime().diff(b.clone().stripTime(),'days'),ms:a.time()-b.time()});} +function diffDay(a,b){return moment.duration({days:a.clone().stripTime().diff(b.clone().stripTime(),'days')});} +function diffByUnit(a,b,unit){return moment.duration(Math.round(a.diff(b,unit,true)),unit);} +function computeIntervalUnit(start,end){var i,unit;var val;for(i=0;i=1&&isInt(val)){break;}} +return unit;} +function computeRangeAs(unit,start,end){if(end!=null){return end.diff(start,unit,true);} +else if(moment.isDuration(start)){return start.as(unit);} +else{return start.end.diff(start.start,unit,true);}} +function divideRangeByDuration(start,end,dur){var months;if(durationHasTime(dur)){return(end-start)/dur;} +months=dur.asMonths();if(Math.abs(months)>=1&&isInt(months)){return end.diff(start,'months',true)/months;} +return end.diff(start,'days',true)/dur.asDays();} +function divideDurationByDuration(dur1,dur2){var months1,months2;if(durationHasTime(dur1)||durationHasTime(dur2)){return dur1/dur2;} +months1=dur1.asMonths();months2=dur2.asMonths();if(Math.abs(months1)>=1&&isInt(months1)&&Math.abs(months2)>=1&&isInt(months2)){return months1/months2;} +return dur1.asDays()/dur2.asDays();} +function multiplyDuration(dur,n){var months;if(durationHasTime(dur)){return moment.duration(dur*n);} +months=dur.asMonths();if(Math.abs(months)>=1&&isInt(months)){return moment.duration({months:months*n});} +return moment.duration({days:dur.asDays()*n});} +function durationHasTime(dur){return Boolean(dur.hours()||dur.minutes()||dur.seconds()||dur.milliseconds());} +function isNativeDate(input){return Object.prototype.toString.call(input)==='[object Date]'||input instanceof Date;} +function isTimeString(str){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(str);} +FC.log=function(){var console=window.console;if(console&&console.log){return console.log.apply(console,arguments);}};FC.warn=function(){var console=window.console;if(console&&console.warn){return console.warn.apply(console,arguments);} +else{return FC.log.apply(FC,arguments);}};var hasOwnPropMethod={}.hasOwnProperty;function mergeProps(propObjs,complexProps){var dest={};var i,name;var complexObjs;var j,val;var props;if(complexProps){for(i=0;i=0;j--){val=propObjs[j][name];if(typeof val==='object'){complexObjs.unshift(val);} +else if(val!==undefined){dest[name]=val;break;}} +if(complexObjs.length){dest[name]=mergeProps(complexObjs);}}} +for(i=propObjs.length-1;i>=0;i--){props=propObjs[i];for(name in props){if(!(name in dest)){dest[name]=props[name];}}} +return dest;} +function createObject(proto){var f=function(){};f.prototype=proto;return new f();} +function copyOwnProps(src,dest){for(var name in src){if(hasOwnProp(src,name)){dest[name]=src[name];}}} +function copyNativeMethods(src,dest){var names=['constructor','toString','valueOf'];var i,name;for(i=0;i/g,'>').replace(/'/g,''').replace(/"/g,'"').replace(/\n/g,'
');} +function stripHtmlEntities(text){return text.replace(/&.*?;/g,'');} +function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val!=null){statements.push(name+':'+val);}});return statements.join(';');} +function capitaliseFirstLetter(str){return str.charAt(0).toUpperCase()+str.slice(1);} +function compareNumbers(a,b){return a-b;} +function isInt(n){return n%1===0;} +function proxy(obj,methodName){var method=obj[methodName];return function(){return method.apply(obj,arguments);};} +function debounce(func,wait,immediate){var timeout,args,context,timestamp,result;var later=function(){var last=+new Date()-timestamp;if(last=a[1]&&a[0]leftI;rightI--){chunkStr=formatSimilarChunk(date1,date2,unzonedDate1,unzonedDate2,chunks[rightI]);if(chunkStr===false){break;} +rightStr=chunkStr+rightStr;} +for(middleI=leftI;middleI<=rightI;middleI++){middleStr1+=formatDateWithChunk(date1,chunks[middleI]);middleStr2+=formatDateWithChunk(date2,chunks[middleI]);} +if(middleStr1||middleStr2){if(isRTL){middleStr=middleStr2+separator+middleStr1;} +else{middleStr=middleStr1+separator+middleStr2;}} +return leftStr+middleStr+rightStr;} +var similarUnitMap={Y:'year',M:'month',D:'day',d:'day',A:'second',a:'second',T:'second',t:'second',H:'second',h:'second',m:'second',s:'second'};function formatSimilarChunk(date1,date2,unzonedDate1,unzonedDate2,chunk){var token;var unit;if(typeof chunk==='string'){return chunk;} +else if((token=chunk.token)){unit=similarUnitMap[token.charAt(0)];if(unit&&unzonedDate1.isSame(unzonedDate2,unit)){return oldMomentFormat(date1,token);}} +return false;} +var formatStringChunkCache={};function getFormatStringChunks(formatStr){if(formatStr in formatStringChunkCache){return formatStringChunkCache[formatStr];} +return(formatStringChunkCache[formatStr]=chunkFormatString(formatStr));} +function chunkFormatString(formatStr){var chunks=[];var chunker=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;var match;while((match=chunker.exec(formatStr))){if(match[1]){chunks.push(match[1]);} +else if(match[2]){chunks.push({maybe:chunkFormatString(match[2])});} +else if(match[3]){chunks.push({token:match[3]});} +else if(match[5]){chunks.push(match[5]);}} +return chunks;};;FC.Class=Class;function Class(){} +Class.extend=function(){var len=arguments.length;var i;var members;for(i=0;i').addClass(options.className||'').css({top:0,left:0}).append(options.content).appendTo(options.parentEl);this.el.on('click','.fc-close',function(){_this.hide();});if(options.autoHide){this.listenTo($(document),'mousedown',this.documentMousedown);}},documentMousedown:function(ev){if(this.el&&!$(ev.target).closest(this.el).length){this.hide();}},removeElement:function(){this.hide();if(this.el){this.el.remove();this.el=null;} +this.stopListeningTo($(document),'mousedown');},position:function(){var options=this.options;var origin=this.el.offsetParent().offset();var width=this.el.outerWidth();var height=this.el.outerHeight();var windowEl=$(window);var viewportEl=getScrollParent(this.el);var viewportTop;var viewportLeft;var viewportOffset;var top;var left;top=options.top||0;if(options.left!==undefined){left=options.left;} +else if(options.right!==undefined){left=options.right-width;} +else{left=0;} +if(viewportEl.is(window)||viewportEl.is(document)){viewportEl=windowEl;viewportTop=0;viewportLeft=0;} +else{viewportOffset=viewportEl.offset();viewportTop=viewportOffset.top;viewportLeft=viewportOffset.left;} +viewportTop+=windowEl.scrollTop();viewportLeft+=windowEl.scrollLeft();if(options.viewportConstrain!==false){top=Math.min(top,viewportTop+viewportEl.outerHeight()-height-this.margin);top=Math.max(top,viewportTop+this.margin);left=Math.min(left,viewportLeft+viewportEl.outerWidth()-width-this.margin);left=Math.max(left,viewportLeft+this.margin);} +this.el.css({top:top-origin.top,left:left-origin.left});},trigger:function(name){if(this.options[name]){this.options[name].apply(this,Array.prototype.slice.call(arguments,1));}}});;;var CoordCache=FC.CoordCache=Class.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:false,isVertical:false,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(options){this.els=$(options.els);this.isHorizontal=options.isHorizontal;this.isVertical=options.isVertical;this.forcedOffsetParentEl=options.offsetParent?$(options.offsetParent):null;},build:function(){var offsetParentEl=this.forcedOffsetParentEl||this.els.eq(0).offsetParent();this.origin=offsetParentEl.offset();this.boundingRect=this.queryBoundingRect();if(this.isHorizontal){this.buildElHorizontals();} +if(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(){if(!this.origin){this.build();}},queryBoundingRect:function(){var scrollParentEl=getScrollParent(this.els.eq(0));if(!scrollParentEl.is(document)){return getClientRect(scrollParentEl);}},buildElHorizontals:function(){var lefts=[];var rights=[];this.els.each(function(i,node){var el=$(node);var left=el.offset().left;var width=el.outerWidth();lefts.push(left);rights.push(left+width);});this.lefts=lefts;this.rights=rights;},buildElVerticals:function(){var tops=[];var bottoms=[];this.els.each(function(i,node){var el=$(node);var top=el.offset().top;var height=el.outerHeight();tops.push(top);bottoms.push(top+height);});this.tops=tops;this.bottoms=bottoms;},getHorizontalIndex:function(leftOffset){this.ensureBuilt();var boundingRect=this.boundingRect;var lefts=this.lefts;var rights=this.rights;var len=lefts.length;var i;if(!boundingRect||(leftOffset>=boundingRect.left&&leftOffset=lefts[i]&&leftOffset=boundingRect.top&&topOffset=tops[i]&&topOffset=minDistance*minDistance){this.handleDistanceSurpassed(ev);}} +if(this.isDragging){this.handleDrag(dx,dy,ev);}},handleDrag:function(dx,dy,ev){this.trigger('drag',dx,dy,ev);this.updateAutoScroll(ev);},endDrag:function(ev){if(this.isDragging){this.isDragging=false;this.handleDragEnd(ev);}},handleDragEnd:function(ev){this.trigger('dragEnd',ev);this.destroyHrefHack();},startDelay:function(initialEv){var _this=this;if(this.delay){this.delayTimeoutId=setTimeout(function(){_this.handleDelayEnd(initialEv);},this.delay);} +else{this.handleDelayEnd(initialEv);}},handleDelayEnd:function(initialEv){this.isDelayEnded=true;if(this.isDistanceSurpassed){this.startDrag(initialEv);}},handleDistanceSurpassed:function(ev){this.isDistanceSurpassed=true;if(this.isDelayEnded){this.startDrag(ev);}},handleTouchMove:function(ev){if(this.isDragging){ev.preventDefault();} +this.handleMove(ev);},handleMouseMove:function(ev){this.handleMove(ev);},handleTouchScroll:function(ev){if(!this.isDragging){this.endInteraction(ev,true);}},initHrefHack:function(){var subjectEl=this.subjectEl;if((this.subjectHref=subjectEl?subjectEl.attr('href'):null)){subjectEl.removeAttr('href');}},destroyHrefHack:function(){var subjectEl=this.subjectEl;var subjectHref=this.subjectHref;setTimeout(function(){if(subjectHref){subjectEl.attr('href',subjectHref);}},0);},trigger:function(name){if(this.options[name]){this.options[name].apply(this,Array.prototype.slice.call(arguments,1));} +if(this['_'+name]){this['_'+name].apply(this,Array.prototype.slice.call(arguments,1));}}});;;DragListener.mixin({isAutoScroll:false,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var scrollEl=this.scrollEl;this.isAutoScroll=this.options.scroll&&scrollEl&&!scrollEl.is(window)&&!scrollEl.is(document);if(this.isAutoScroll){this.listenTo(scrollEl,'scroll',debounce(this.handleDebouncedScroll,100));}},destroyAutoScroll:function(){this.endAutoScroll();if(this.isAutoScroll){this.stopListeningTo(this.scrollEl,'scroll');}},computeScrollBounds:function(){if(this.isAutoScroll){this.scrollBounds=getOuterRect(this.scrollEl);}},updateAutoScroll:function(ev){var sensitivity=this.scrollSensitivity;var bounds=this.scrollBounds;var topCloseness,bottomCloseness;var leftCloseness,rightCloseness;var topVel=0;var leftVel=0;if(bounds){topCloseness=(sensitivity-(getEvY(ev)-bounds.top))/sensitivity;bottomCloseness=(sensitivity-(bounds.bottom-getEvY(ev)))/sensitivity;leftCloseness=(sensitivity-(getEvX(ev)-bounds.left))/sensitivity;rightCloseness=(sensitivity-(bounds.right-getEvX(ev)))/sensitivity;if(topCloseness>=0&&topCloseness<=1){topVel=topCloseness*this.scrollSpeed*-1;} +else if(bottomCloseness>=0&&bottomCloseness<=1){topVel=bottomCloseness*this.scrollSpeed;} +if(leftCloseness>=0&&leftCloseness<=1){leftVel=leftCloseness*this.scrollSpeed*-1;} +else if(rightCloseness>=0&&rightCloseness<=1){leftVel=rightCloseness*this.scrollSpeed;}} +this.setScrollVel(topVel,leftVel);},setScrollVel:function(topVel,leftVel){this.scrollTopVel=topVel;this.scrollLeftVel=leftVel;this.constrainScrollVel();if((this.scrollTopVel||this.scrollLeftVel)&&!this.scrollIntervalId){this.scrollIntervalId=setInterval(proxy(this,'scrollIntervalFunc'),this.scrollIntervalMs);}},constrainScrollVel:function(){var el=this.scrollEl;if(this.scrollTopVel<0){if(el.scrollTop()<=0){this.scrollTopVel=0;}} +else if(this.scrollTopVel>0){if(el.scrollTop()+el[0].clientHeight>=el[0].scrollHeight){this.scrollTopVel=0;}} +if(this.scrollLeftVel<0){if(el.scrollLeft()<=0){this.scrollLeftVel=0;}} +else if(this.scrollLeftVel>0){if(el.scrollLeft()+el[0].clientWidth>=el[0].scrollWidth){this.scrollLeftVel=0;}}},scrollIntervalFunc:function(){var el=this.scrollEl;var frac=this.scrollIntervalMs/1000;if(this.scrollTopVel){el.scrollTop(el.scrollTop()+this.scrollTopVel*frac);} +if(this.scrollLeftVel){el.scrollLeft(el.scrollLeft()+this.scrollLeftVel*frac);} +this.constrainScrollVel();if(!this.scrollTopVel&&!this.scrollLeftVel){this.endAutoScroll();}},endAutoScroll:function(){if(this.scrollIntervalId){clearInterval(this.scrollIntervalId);this.scrollIntervalId=null;this.handleScrollEnd();}},handleDebouncedScroll:function(){if(!this.scrollIntervalId){this.handleScrollEnd();}},handleScrollEnd:function(){}});;;var HitDragListener=DragListener.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(component,options){DragListener.call(this,options);this.component=component;},handleInteractionStart:function(ev){var subjectEl=this.subjectEl;var subjectRect;var origPoint;var point;this.computeCoords();if(ev){origPoint={left:getEvX(ev),top:getEvY(ev)};point=origPoint;if(subjectEl){subjectRect=getOuterRect(subjectEl);point=constrainPoint(point,subjectRect);} +this.origHit=this.queryHit(point.left,point.top);if(subjectEl&&this.options.subjectCenter){if(this.origHit){subjectRect=intersectRects(this.origHit,subjectRect)||subjectRect;} +point=getRectCenter(subjectRect);} +this.coordAdjust=diffPoints(point,origPoint);} +else{this.origHit=null;this.coordAdjust=null;} +DragListener.prototype.handleInteractionStart.apply(this,arguments);},computeCoords:function(){this.component.prepareHits();this.computeScrollBounds();},handleDragStart:function(ev){var hit;DragListener.prototype.handleDragStart.apply(this,arguments);hit=this.queryHit(getEvX(ev),getEvY(ev));if(hit){this.handleHitOver(hit);}},handleDrag:function(dx,dy,ev){var hit;DragListener.prototype.handleDrag.apply(this,arguments);hit=this.queryHit(getEvX(ev),getEvY(ev));if(!isHitsEqual(hit,this.hit)){if(this.hit){this.handleHitOut();} +if(hit){this.handleHitOver(hit);}}},handleDragEnd:function(){this.handleHitDone();DragListener.prototype.handleDragEnd.apply(this,arguments);},handleHitOver:function(hit){var isOrig=isHitsEqual(hit,this.origHit);this.hit=hit;this.trigger('hitOver',this.hit,isOrig,this.origHit);},handleHitOut:function(){if(this.hit){this.trigger('hitOut',this.hit);this.handleHitDone();this.hit=null;}},handleHitDone:function(){if(this.hit){this.trigger('hitDone',this.hit);}},handleInteractionEnd:function(){DragListener.prototype.handleInteractionEnd.apply(this,arguments);this.origHit=null;this.hit=null;this.component.releaseHits();},handleScrollEnd:function(){DragListener.prototype.handleScrollEnd.apply(this,arguments);this.computeCoords();},queryHit:function(left,top){if(this.coordAdjust){left+=this.coordAdjust.left;top+=this.coordAdjust.top;} +return this.component.queryHit(left,top);}});function isHitsEqual(hit0,hit1){if(!hit0&&!hit1){return true;} +if(hit0&&hit1){return hit0.component===hit1.component&&isHitPropsWithin(hit0,hit1)&&isHitPropsWithin(hit1,hit0);} +return false;} +function isHitPropsWithin(subHit,superHit){for(var propName in subHit){if(!/^(component|left|right|top|bottom)$/.test(propName)){if(subHit[propName]!==superHit[propName]){return false;}}} +return true;};;var MouseFollower=Class.extend(ListenerMixin,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:false,isHidden:false,isAnimating:false,constructor:function(sourceEl,options){this.options=options=options||{};this.sourceEl=sourceEl;this.parentEl=options.parentEl?$(options.parentEl):sourceEl.parent();},start:function(ev){if(!this.isFollowing){this.isFollowing=true;this.y0=getEvY(ev);this.x0=getEvX(ev);this.topDelta=0;this.leftDelta=0;if(!this.isHidden){this.updatePosition();} +if(getEvIsTouch(ev)){this.listenTo($(document),'touchmove',this.handleMove);} +else{this.listenTo($(document),'mousemove',this.handleMove);}}},stop:function(shouldRevert,callback){var _this=this;var revertDuration=this.options.revertDuration;function complete(){this.isAnimating=false;_this.removeElement();this.top0=this.left0=null;if(callback){callback();}} +if(this.isFollowing&&!this.isAnimating){this.isFollowing=false;this.stopListeningTo($(document));if(shouldRevert&&revertDuration&&!this.isHidden){this.isAnimating=true;this.el.animate({top:this.top0,left:this.left0},{duration:revertDuration,complete:complete});} +else{complete();}}},getEl:function(){var el=this.el;if(!el){this.sourceEl.width();el=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||'').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});el.addClass('fc-unselectable');el.appendTo(this.parentEl);} +return el;},removeElement:function(){if(this.el){this.el.remove();this.el=null;}},updatePosition:function(){var sourceOffset;var origin;this.getEl();if(this.top0===null){this.sourceEl.width();sourceOffset=this.sourceEl.offset();origin=this.el.offsetParent().offset();this.top0=sourceOffset.top-origin.top;this.left0=sourceOffset.left-origin.left;} +this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta});},handleMove:function(ev){this.topDelta=getEvY(ev)-this.y0;this.leftDelta=getEvX(ev)-this.x0;if(!this.isHidden){this.updatePosition();}},hide:function(){if(!this.isHidden){this.isHidden=true;if(this.el){this.el.hide();}}},show:function(){if(this.isHidden){this.isHidden=false;this.updatePosition();this.getEl().show();}}});;;var Grid=FC.Grid=Class.extend(ListenerMixin,MouseIgnorerMixin,{view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayDragListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(view){this.view=view;this.isRTL=view.opt('isRTL');this.elsByFill={};this.dayDragListener=this.buildDayDragListener();this.initMouseIgnoring();},computeEventTimeFormat:function(){return this.view.opt('smallTimeFormat');},computeDisplayEventTime:function(){return true;},computeDisplayEventEnd:function(){return true;},setRange:function(range){this.start=range.start.clone();this.end=range.end.clone();this.rangeUpdated();this.processRangeOptions();},rangeUpdated:function(){},processRangeOptions:function(){var view=this.view;var displayEventTime;var displayEventEnd;this.eventTimeFormat=view.opt('eventTimeFormat')||view.opt('timeFormat')||this.computeEventTimeFormat();displayEventTime=view.opt('displayEventTime');if(displayEventTime==null){displayEventTime=this.computeDisplayEventTime();} +displayEventEnd=view.opt('displayEventEnd');if(displayEventEnd==null){displayEventEnd=this.computeDisplayEventEnd();} +this.displayEventTime=displayEventTime;this.displayEventEnd=displayEventEnd;},spanToSegs:function(span){},diffDates:function(a,b){if(this.largeUnit){return diffByUnit(a,b,this.largeUnit);} +else{return diffDayTime(a,b);}},prepareHits:function(){},releaseHits:function(){},queryHit:function(leftOffset,topOffset){},getHitSpan:function(hit){},getHitEl:function(hit){},setElement:function(el){this.el=el;preventSelection(el);this.bindDayHandler('touchstart',this.dayTouchStart);this.bindDayHandler('mousedown',this.dayMousedown);this.bindSegHandlers();this.bindGlobalHandlers();},bindDayHandler:function(name,handler){var _this=this;this.el.on(name,function(ev){if(!$(ev.target).is('.fc-event-container *, .fc-more')&&!$(ev.target).closest('.fc-popover').length){return handler.call(_this,ev);}});},removeElement:function(){this.unbindGlobalHandlers();this.clearDragListeners();this.el.remove();},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo($(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart});},unbindGlobalHandlers:function(){this.stopListeningTo($(document));},dayMousedown:function(ev){if(!this.isIgnoringMouse){this.dayDragListener.startInteraction(ev,{});}},dayTouchStart:function(ev){var view=this.view;if(view.isSelected||view.selectedEvent){this.tempIgnoreMouse();} +this.dayDragListener.startInteraction(ev,{delay:this.view.opt('longPressDelay')});},buildDayDragListener:function(){var _this=this;var view=this.view;var isSelectable=view.opt('selectable');var dayClickHit;var selectionSpan;var dragListener=new HitDragListener(this,{scroll:view.opt('dragScroll'),interactionStart:function(){dayClickHit=dragListener.origHit;},dragStart:function(){view.unselect();},hitOver:function(hit,isOrig,origHit){if(origHit){if(!isOrig){dayClickHit=null;} +if(isSelectable){selectionSpan=_this.computeSelection(_this.getHitSpan(origHit),_this.getHitSpan(hit));if(selectionSpan){_this.renderSelection(selectionSpan);} +else if(selectionSpan===false){disableCursor();}}}},hitOut:function(){dayClickHit=null;selectionSpan=null;_this.unrenderSelection();enableCursor();},interactionEnd:function(ev,isCancelled){if(!isCancelled){if(dayClickHit&&!_this.isIgnoringMouse){view.triggerDayClick(_this.getHitSpan(dayClickHit),_this.getHitEl(dayClickHit),ev);} +if(selectionSpan){view.reportSelection(selectionSpan,ev);} +enableCursor();}}});return dragListener;},clearDragListeners:function(){this.dayDragListener.endInteraction();if(this.segDragListener){this.segDragListener.endInteraction();} +if(this.segResizeListener){this.segResizeListener.endInteraction();} +if(this.externalDragListener){this.externalDragListener.endInteraction();}},renderEventLocationHelper:function(eventLocation,sourceSeg){var fakeEvent=this.fabricateHelperEvent(eventLocation,sourceSeg);return this.renderHelper(fakeEvent,sourceSeg);},fabricateHelperEvent:function(eventLocation,sourceSeg){var fakeEvent=sourceSeg?createObject(sourceSeg.event):{};fakeEvent.start=eventLocation.start.clone();fakeEvent.end=eventLocation.end?eventLocation.end.clone():null;fakeEvent.allDay=null;this.view.calendar.normalizeEventDates(fakeEvent);fakeEvent.className=(fakeEvent.className||[]).concat('fc-helper');if(!sourceSeg){fakeEvent.editable=false;} +return fakeEvent;},renderHelper:function(eventLocation,sourceSeg){},unrenderHelper:function(){},renderSelection:function(span){this.renderHighlight(span);},unrenderSelection:function(){this.unrenderHighlight();},computeSelection:function(span0,span1){var span=this.computeSelectionSpan(span0,span1);if(span&&!this.view.calendar.isSelectionSpanAllowed(span)){return false;} +return span;},computeSelectionSpan:function(span0,span1){var dates=[span0.start,span0.end,span1.start,span1.end];dates.sort(compareNumbers);return{start:dates[0].clone(),end:dates[3].clone()};},renderHighlight:function(span){this.renderFill('highlight',this.spanToSegs(span));},unrenderHighlight:function(){this.unrenderFill('highlight');},highlightSegClasses:function(){return['fc-highlight'];},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(date){},unrenderNowIndicator:function(){},renderFill:function(type,segs){},unrenderFill:function(type){var el=this.elsByFill[type];if(el){el.remove();delete this.elsByFill[type];}},renderFillSegEls:function(type,segs){var _this=this;var segElMethod=this[type+'SegEl'];var html='';var renderedSegs=[];var i;if(segs.length){for(i=0;i';},getDayClasses:function(date){var view=this.view;var today=view.calendar.getNow();var classes=['fc-'+dayIDs[date.day()]];if(view.intervalDuration.as('months')==1&&date.month()!=view.intervalStart.month()){classes.push('fc-other-month');} +if(date.isSame(today,'day')){classes.push('fc-today',view.highlightStateClass);} +else if(date *',function(ev){var seg=$(this).data('fc-seg');if(seg&&!_this.isDraggingSeg&&!_this.isResizingSeg){return handler.call(_this,seg,ev);}});},handleSegClick:function(seg,ev){return this.view.trigger('eventClick',seg.el[0],seg.event,ev);},handleSegMouseover:function(seg,ev){if(!this.isIgnoringMouse&&!this.mousedOverSeg){this.mousedOverSeg=seg;seg.el.addClass('fc-allow-mouse-resize');this.view.trigger('eventMouseover',seg.el[0],seg.event,ev);}},handleSegMouseout:function(seg,ev){ev=ev||{};if(this.mousedOverSeg){seg=seg||this.mousedOverSeg;this.mousedOverSeg=null;seg.el.removeClass('fc-allow-mouse-resize');this.view.trigger('eventMouseout',seg.el[0],seg.event,ev);}},handleSegMousedown:function(seg,ev){var isResizing=this.startSegResize(seg,ev,{distance:5});if(!isResizing&&this.view.isEventDraggable(seg.event)){this.buildSegDragListener(seg).startInteraction(ev,{distance:5});}},handleSegTouchStart:function(seg,ev){var view=this.view;var event=seg.event;var isSelected=view.isEventSelected(event);var isDraggable=view.isEventDraggable(event);var isResizable=view.isEventResizable(event);var isResizing=false;var dragListener;if(isSelected&&isResizable){isResizing=this.startSegResize(seg,ev);} +if(!isResizing&&(isDraggable||isResizable)){dragListener=isDraggable?this.buildSegDragListener(seg):this.buildSegSelectListener(seg);dragListener.startInteraction(ev,{delay:isSelected?0:this.view.opt('longPressDelay')});} +this.tempIgnoreMouse();},handleSegTouchEnd:function(seg,ev){this.tempIgnoreMouse();},startSegResize:function(seg,ev,dragOptions){if($(ev.target).is('.fc-resizer')){this.buildSegResizeListener(seg,$(ev.target).is('.fc-start-resizer')).startInteraction(ev,dragOptions);return true;} +return false;},buildSegDragListener:function(seg){var _this=this;var view=this.view;var calendar=view.calendar;var el=seg.el;var event=seg.event;var isDragging;var mouseFollower;var dropLocation;if(this.segDragListener){return this.segDragListener;} +var dragListener=this.segDragListener=new HitDragListener(view,{scroll:view.opt('dragScroll'),subjectEl:el,subjectCenter:true,interactionStart:function(ev){isDragging=false;mouseFollower=new MouseFollower(seg.el,{additionalClass:'fc-dragging',parentEl:view.el,opacity:dragListener.isTouch?null:view.opt('dragOpacity'),revertDuration:view.opt('dragRevertDuration'),zIndex:2});mouseFollower.hide();mouseFollower.start(ev);},dragStart:function(ev){if(dragListener.isTouch&&!view.isEventSelected(event)){view.selectEvent(event);} +isDragging=true;_this.handleSegMouseout(seg,ev);_this.segDragStart(seg,ev);view.hideEvent(event);},hitOver:function(hit,isOrig,origHit){var dragHelperEls;if(seg.hit){origHit=seg.hit;} +dropLocation=_this.computeEventDrop(origHit.component.getHitSpan(origHit),hit.component.getHitSpan(hit),event);if(dropLocation&&!calendar.isEventSpanAllowed(_this.eventToSpan(dropLocation),event)){disableCursor();dropLocation=null;} +if(dropLocation&&(dragHelperEls=view.renderDrag(dropLocation,seg))){dragHelperEls.addClass('fc-dragging');if(!dragListener.isTouch){_this.applyDragOpacity(dragHelperEls);} +mouseFollower.hide();} +else{mouseFollower.show();} +if(isOrig){dropLocation=null;}},hitOut:function(){view.unrenderDrag();mouseFollower.show();dropLocation=null;},hitDone:function(){enableCursor();},interactionEnd:function(ev){mouseFollower.stop(!dropLocation,function(){if(isDragging){view.unrenderDrag();view.showEvent(event);_this.segDragStop(seg,ev);} +if(dropLocation){view.reportEventDrop(event,dropLocation,this.largeUnit,el,ev);}});_this.segDragListener=null;}});return dragListener;},buildSegSelectListener:function(seg){var _this=this;var view=this.view;var event=seg.event;if(this.segDragListener){return this.segDragListener;} +var dragListener=this.segDragListener=new DragListener({dragStart:function(ev){if(dragListener.isTouch&&!view.isEventSelected(event)){view.selectEvent(event);}},interactionEnd:function(ev){_this.segDragListener=null;}});return dragListener;},segDragStart:function(seg,ev){this.isDraggingSeg=true;this.view.trigger('eventDragStart',seg.el[0],seg.event,ev,{});},segDragStop:function(seg,ev){this.isDraggingSeg=false;this.view.trigger('eventDragStop',seg.el[0],seg.event,ev,{});},computeEventDrop:function(startSpan,endSpan,event){var calendar=this.view.calendar;var dragStart=startSpan.start;var dragEnd=endSpan.start;var delta;var dropLocation;if(dragStart.hasTime()===dragEnd.hasTime()){delta=this.diffDates(dragEnd,dragStart);if(event.allDay&&durationHasTime(delta)){dropLocation={start:event.start.clone(),end:calendar.getEventEnd(event),allDay:false};calendar.normalizeEventTimes(dropLocation);} +else{dropLocation={start:event.start.clone(),end:event.end?event.end.clone():null,allDay:event.allDay};} +dropLocation.start.add(delta);if(dropLocation.end){dropLocation.end.add(delta);}} +else{dropLocation={start:dragEnd.clone(),end:null,allDay:!dragEnd.hasTime()};} +return dropLocation;},applyDragOpacity:function(els){var opacity=this.view.opt('dragOpacity');if(opacity!=null){els.each(function(i,node){node.style.opacity=opacity;});}},externalDragStart:function(ev,ui){var view=this.view;var el;var accept;if(view.opt('droppable')){el=$((ui?ui.item:null)||ev.target);accept=view.opt('dropAccept');if($.isFunction(accept)?accept.call(el[0],el):el.is(accept)){if(!this.isDraggingExternal){this.listenToExternalDrag(el,ev,ui);}}}},listenToExternalDrag:function(el,ev,ui){var _this=this;var calendar=this.view.calendar;var meta=getDraggedElMeta(el);var dropLocation;var dragListener=_this.externalDragListener=new HitDragListener(this,{interactionStart:function(){_this.isDraggingExternal=true;},hitOver:function(hit){dropLocation=_this.computeExternalDrop(hit.component.getHitSpan(hit),meta);if(dropLocation&&!calendar.isExternalSpanAllowed(_this.eventToSpan(dropLocation),dropLocation,meta.eventProps)){disableCursor();dropLocation=null;} +if(dropLocation){_this.renderDrag(dropLocation);}},hitOut:function(){dropLocation=null;},hitDone:function(){enableCursor();_this.unrenderDrag();},interactionEnd:function(ev){if(dropLocation){_this.view.reportExternalDrop(meta,dropLocation,el,ev,ui);} +_this.isDraggingExternal=false;_this.externalDragListener=null;}});dragListener.startDrag(ev);},computeExternalDrop:function(span,meta){var calendar=this.view.calendar;var dropLocation={start:calendar.applyTimezone(span.start),end:null};if(meta.startTime&&!dropLocation.start.hasTime()){dropLocation.start.time(meta.startTime);} +if(meta.duration){dropLocation.end=dropLocation.start.clone().add(meta.duration);} +return dropLocation;},renderDrag:function(dropLocation,seg){},unrenderDrag:function(){},buildSegResizeListener:function(seg,isStart){var _this=this;var view=this.view;var calendar=view.calendar;var el=seg.el;var event=seg.event;var eventEnd=calendar.getEventEnd(event);var isDragging;var resizeLocation;var dragListener=this.segResizeListener=new HitDragListener(this,{scroll:view.opt('dragScroll'),subjectEl:el,interactionStart:function(){isDragging=false;},dragStart:function(ev){isDragging=true;_this.handleSegMouseout(seg,ev);_this.segResizeStart(seg,ev);},hitOver:function(hit,isOrig,origHit){var origHitSpan=_this.getHitSpan(origHit);var hitSpan=_this.getHitSpan(hit);resizeLocation=isStart?_this.computeEventStartResize(origHitSpan,hitSpan,event):_this.computeEventEndResize(origHitSpan,hitSpan,event);if(resizeLocation){if(!calendar.isEventSpanAllowed(_this.eventToSpan(resizeLocation),event)){disableCursor();resizeLocation=null;} +else if(resizeLocation.start.isSame(event.start)&&resizeLocation.end.isSame(eventEnd)){resizeLocation=null;}} +if(resizeLocation){view.hideEvent(event);_this.renderEventResize(resizeLocation,seg);}},hitOut:function(){resizeLocation=null;},hitDone:function(){_this.unrenderEventResize();view.showEvent(event);enableCursor();},interactionEnd:function(ev){if(isDragging){_this.segResizeStop(seg,ev);} +if(resizeLocation){view.reportEventResize(event,resizeLocation,this.largeUnit,el,ev);} +_this.segResizeListener=null;}});return dragListener;},segResizeStart:function(seg,ev){this.isResizingSeg=true;this.view.trigger('eventResizeStart',seg.el[0],seg.event,ev,{});},segResizeStop:function(seg,ev){this.isResizingSeg=false;this.view.trigger('eventResizeStop',seg.el[0],seg.event,ev,{});},computeEventStartResize:function(startSpan,endSpan,event){return this.computeEventResize('start',startSpan,endSpan,event);},computeEventEndResize:function(startSpan,endSpan,event){return this.computeEventResize('end',startSpan,endSpan,event);},computeEventResize:function(type,startSpan,endSpan,event){var calendar=this.view.calendar;var delta=this.diffDates(endSpan[type],startSpan[type]);var resizeLocation;var defaultDuration;resizeLocation={start:event.start.clone(),end:calendar.getEventEnd(event),allDay:event.allDay};if(resizeLocation.allDay&&durationHasTime(delta)){resizeLocation.allDay=false;calendar.normalizeEventTimes(resizeLocation);} +resizeLocation[type].add(delta);if(!resizeLocation.start.isBefore(resizeLocation.end)){defaultDuration=this.minResizeDuration||(event.allDay?calendar.defaultAllDayEventDuration:calendar.defaultTimedEventDuration);if(type=='start'){resizeLocation.start=resizeLocation.end.clone().subtract(defaultDuration);} +else{resizeLocation.end=resizeLocation.start.clone().add(defaultDuration);}} +return resizeLocation;},renderEventResize:function(range,seg){},unrenderEventResize:function(){},getEventTimeText:function(range,formatStr,displayEnd){if(formatStr==null){formatStr=this.eventTimeFormat;} +if(displayEnd==null){displayEnd=this.displayEventEnd;} +if(this.displayEventTime&&range.start.hasTime()){if(displayEnd&&range.end){return this.view.formatRange(range,formatStr);} +else{return range.start.format(formatStr);}} +return'';},getSegClasses:function(seg,isDraggable,isResizable){var view=this.view;var event=seg.event;var classes=['fc-event',seg.isStart?'fc-start':'fc-not-start',seg.isEnd?'fc-end':'fc-not-end'].concat(event.className,event.source?event.source.className:[]);if(isDraggable){classes.push('fc-draggable');} +if(isResizable){classes.push('fc-resizable');} +if(view.isEventSelected(event)){classes.push('fc-selected');} +return classes;},getSegSkinCss:function(seg){var event=seg.event;var view=this.view;var source=event.source||{};var eventColor=event.color;var sourceColor=source.color;var optionColor=view.opt('eventColor');return{'background-color':event.backgroundColor||eventColor||source.backgroundColor||sourceColor||view.opt('eventBackgroundColor')||optionColor,'border-color':event.borderColor||eventColor||source.borderColor||sourceColor||view.opt('eventBorderColor')||optionColor,color:event.textColor||source.textColor||view.opt('eventTextColor')};},eventToSegs:function(event){return this.eventsToSegs([event]);},eventToSpan:function(event){return this.eventToSpans(event)[0];},eventToSpans:function(event){var range=this.eventToRange(event);return this.eventRangeToSpans(range,event);},eventsToSegs:function(allEvents,segSliceFunc){var _this=this;var eventsById=groupEventsById(allEvents);var segs=[];$.each(eventsById,function(id,events){var ranges=[];var i;for(i=0;istart){inverseRanges.push({start:start,end:range.start});} +start=range.end;} +if(start=dayIndices.length){return dayIndices[dayIndices.length-1]+1;} +else{return dayIndices[dayOffset];}},computeColHeadFormat:function(){if(this.rowCnt>1||this.colCnt>10){return'ddd';} +else if(this.colCnt>1){return this.view.opt('dayOfMonthFormat');} +else{return'dddd';}},sliceRangeByRow:function(range){var daysPerRow=this.daysPerRow;var normalRange=this.view.computeDayRange(range);var rangeFirst=this.getDateDayIndex(normalRange.start);var rangeLast=this.getDateDayIndex(normalRange.end.clone().subtract(1,'days'));var segs=[];var row;var rowFirst,rowLast;var segFirst,segLast;for(row=0;row'+''+''+ +this.renderHeadTrHtml()+''+'
'+'
';},renderHeadIntroHtml:function(){return this.renderIntroHtml();},renderHeadTrHtml:function(){return''+''+ +(this.isRTL?'':this.renderHeadIntroHtml())+ +this.renderHeadDateCellsHtml()+ +(this.isRTL?this.renderHeadIntroHtml():'')+'';},renderHeadDateCellsHtml:function(){var htmls=[];var col,date;for(col=0;col1?' colspan="'+colspan+'"':'')+ +(otherAttrs?' '+otherAttrs:'')+'>'+ +htmlEscape(date.format(this.colHeadFormat))+'';},renderBgTrHtml:function(row){return''+''+ +(this.isRTL?'':this.renderBgIntroHtml(row))+ +this.renderBgCellsHtml(row)+ +(this.isRTL?this.renderBgIntroHtml(row):'')+'';},renderBgIntroHtml:function(row){return this.renderIntroHtml();},renderBgCellsHtml:function(row){var htmls=[];var col,date;for(col=0;col';},renderIntroHtml:function(){},bookendCells:function(trEl){var introHtml=this.renderIntroHtml();if(introHtml){if(this.isRTL){trEl.append(introHtml);} +else{trEl.prepend(introHtml);}}}};;;var DayGrid=FC.DayGrid=Grid.extend(DayTableMixin,{numbersVisible:false,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(isRigid){var view=this.view;var rowCnt=this.rowCnt;var colCnt=this.colCnt;var html='';var row;var col;for(row=0;row'+'
'+''+ +this.renderBgTrHtml(row)+'
'+'
'+'
'+''+ +(this.numbersVisible?''+ +this.renderNumberTrHtml(row)+'':'')+'
'+'
'+'
';},renderNumberTrHtml:function(row){return''+''+ +(this.isRTL?'':this.renderNumberIntroHtml(row))+ +this.renderNumberCellsHtml(row)+ +(this.isRTL?this.renderNumberIntroHtml(row):'')+'';},renderNumberIntroHtml:function(row){return this.renderIntroHtml();},renderNumberCellsHtml:function(row){var htmls=[];var col,date;for(col=0;col';} +classes=this.getDayClasses(date);classes.unshift('fc-day-number');return''+''+ +date.date()+'';},computeEventTimeFormat:function(){return this.view.opt('extraSmallTimeFormat');},computeDisplayEventEnd:function(){return this.colCnt==1;},rangeUpdated:function(){this.updateDayTable();},spanToSegs:function(span){var segs=this.sliceRangeByRow(span);var i,seg;for(i=0;i');var skeletonTop;if(sourceSeg&&sourceSeg.row===row){skeletonTop=sourceSeg.el.position().top;} +else{skeletonTop=rowEl.find('.fc-content-skeleton tbody').position().top;} +skeletonEl.css('top',skeletonTop).find('table').append(rowStructs[row].tbodyEl);rowEl.append(skeletonEl);helperNodes.push(skeletonEl[0]);});return(this.helperEls=$(helperNodes));},unrenderHelper:function(){if(this.helperEls){this.helperEls.remove();this.helperEls=null;}},fillSegTag:'td',renderFill:function(type,segs,className){var nodes=[];var i,seg;var skeletonEl;segs=this.renderFillSegEls(type,segs);for(i=0;i'+'
'+'
');trEl=skeletonEl.find('tr');if(startCol>0){trEl.append('');} +trEl.append(seg.el.attr('colspan',endCol-startCol));if(endCol');} +this.bookendCells(trEl);return skeletonEl;}});;;DayGrid.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover();Grid.prototype.unrenderEvents.apply(this,arguments);},getEventSegs:function(){return Grid.prototype.getEventSegs.call(this).concat(this.popoverSegs||[]);},renderBgSegs:function(segs){var allDaySegs=$.grep(segs,function(seg){return seg.event.allDay;});return Grid.prototype.renderBgSegs.call(this,allDaySegs);},renderFgSegs:function(segs){var rowStructs;segs=this.renderFgSegEls(segs);rowStructs=this.rowStructs=this.renderSegRows(segs);this.rowEls.each(function(i,rowNode){$(rowNode).find('.fc-content-skeleton > table').append(rowStructs[i].tbodyEl);});return segs;},unrenderFgSegs:function(){var rowStructs=this.rowStructs||[];var rowStruct;while((rowStruct=rowStructs.pop())){rowStruct.tbodyEl.remove();} +this.rowStructs=null;},renderSegRows:function(segs){var rowStructs=[];var segRows;var row;segRows=this.groupSegRows(segs);for(row=0;row'+htmlEscape(timeText)+'';}} +titleHtml=''+ +(htmlEscape(event.title||'')||' ')+'';return''+'
'+ +(this.isRTL?titleHtml+' '+timeHtml:timeHtml+' '+titleHtml)+'
'+ +(isResizableFromStart?'
':'')+ +(isResizableFromEnd?'
':'')+'';},renderSegRow:function(row,rowSegs){var colCnt=this.colCnt;var segLevels=this.buildSegLevels(rowSegs);var levelCnt=Math.max(1,segLevels.length);var tbody=$('');var segMatrix=[];var cellMatrix=[];var loneCellMatrix=[];var i,levelSegs;var col;var tr;var j,seg;var td;function emptyCellsUntil(endCol){while(col');tr.append(td);} +cellMatrix[i][col]=td;loneCellMatrix[i][col]=td;col++;}} +for(i=0;i');segMatrix.push([]);cellMatrix.push([]);loneCellMatrix.push([]);if(levelSegs){for(j=0;j').append(seg.el);if(seg.leftCol!=seg.rightCol){td.attr('colspan',seg.rightCol-seg.leftCol+1);} +else{loneCellMatrix[i][col]=td;} +while(col<=seg.rightCol){cellMatrix[i][col]=td;segMatrix[i][col]=seg;col++;} +tr.append(td);}} +emptyCellsUntil(colCnt);this.bookendCells(tr);tbody.append(tr);} +return{row:row,tbodyEl:tbody,cellMatrix:cellMatrix,segMatrix:segMatrix,segLevels:segLevels,segs:rowSegs};},buildSegLevels:function(segs){var levels=[];var i,seg;var j;this.sortEventSegs(segs);for(i=0;i=seg.leftCol){return true;}} +return false;} +function compareDaySegCols(a,b){return a.leftCol-b.leftCol;};;DayGrid.mixin({segPopover:null,popoverSegs:null,removeSegPopover:function(){if(this.segPopover){this.segPopover.hide();}},limitRows:function(levelLimit){var rowStructs=this.rowStructs||[];var row;var rowLevelLimit;for(row=0;row td > :first-child').each(iterInnerHeights);if(trEl.position().top+trHeight>rowHeight){return i;}} +return false;},limitRow:function(row,levelLimit){var _this=this;var rowStruct=this.rowStructs[row];var moreNodes=[];var col=0;var levelSegs;var cellMatrix;var limitedNodes;var i,seg;var segsBelow;var totalSegsBelow;var colSegsBelow;var td,rowspan;var segMoreNodes;var j;var moreTd,moreWrap,moreLink;function emptyCellsUntil(endCol){while(col').append(moreLink);td.append(moreWrap);moreNodes.push(moreWrap[0]);} +col++;}} +if(levelLimit&&levelLimit').attr('rowspan',rowspan);segsBelow=colSegsBelow[j];moreLink=this.renderMoreLink(row,seg.leftCol+j,[seg].concat(segsBelow));moreWrap=$('
').append(moreLink);moreTd.append(moreWrap);segMoreNodes.push(moreTd[0]);moreNodes.push(moreTd[0]);} +td.addClass('fc-limited').after($(segMoreNodes));limitedNodes.push(td[0]);}} +emptyCellsUntil(this.colCnt);rowStruct.moreEls=$(moreNodes);rowStruct.limitedEls=$(limitedNodes);}},unlimitRow:function(row){var rowStruct=this.rowStructs[row];if(rowStruct.moreEls){rowStruct.moreEls.remove();rowStruct.moreEls=null;} +if(rowStruct.limitedEls){rowStruct.limitedEls.removeClass('fc-limited');rowStruct.limitedEls=null;}},renderMoreLink:function(row,col,hiddenSegs){var _this=this;var view=this.view;return $('').text(this.getMoreLinkText(hiddenSegs.length)).on('click',function(ev){var clickOption=view.opt('eventLimitClick');var date=_this.getCellDate(row,col);var moreEl=$(this);var dayEl=_this.getCellEl(row,col);var allSegs=_this.getCellSegs(row,col);var reslicedAllSegs=_this.resliceDaySegs(allSegs,date);var reslicedHiddenSegs=_this.resliceDaySegs(hiddenSegs,date);if(typeof clickOption==='function'){clickOption=view.trigger('eventLimitClick',null,{date:date,dayEl:dayEl,moreEl:moreEl,segs:reslicedAllSegs,hiddenSegs:reslicedHiddenSegs},ev);} +if(clickOption==='popover'){_this.showSegPopover(row,col,moreEl,reslicedAllSegs);} +else if(typeof clickOption==='string'){view.calendar.zoomTo(date,clickOption);}});},showSegPopover:function(row,col,moreLink,segs){var _this=this;var view=this.view;var moreWrap=moreLink.parent();var topEl;var options;if(this.rowCnt==1){topEl=view.el;} +else{topEl=this.rowEls.eq(row);} +options={className:'fc-more-popover',content:this.renderSegPopoverContent(row,col,segs),parentEl:this.el,top:topEl.offset().top,autoHide:true,viewportConstrain:view.opt('popoverViewportConstrain'),hide:function(){_this.segPopover.removeElement();_this.segPopover=null;_this.popoverSegs=null;}};if(this.isRTL){options.right=moreWrap.offset().left+moreWrap.outerWidth()+1;} +else{options.left=moreWrap.offset().left-1;} +this.segPopover=new Popover(options);this.segPopover.show();},renderSegPopoverContent:function(row,col,segs){var view=this.view;var isTheme=view.opt('theme');var title=this.getCellDate(row,col).format(view.opt('dayPopoverFormat'));var content=$('
'+''+''+ +htmlEscape(title)+''+'
'+'
'+'
'+'
'+'
');var segContainer=content.find('.fc-event-container');var i;segs=this.renderFgSegEls(segs,true);this.popoverSegs=segs;for(i=0;i'+''+ +this.renderBgTrHtml(0)+'
'+'
'+'
'+''+ +this.renderSlatRowHtml()+'
'+'
';},renderSlatRowHtml:function(){var view=this.view;var isRTL=this.isRTL;var html='';var slotTime=moment.duration(+this.minTime);var slotDate;var isLabeled;var axisHtml;while(slotTime'+ +(isLabeled?''+ +htmlEscape(slotDate.format(this.labelFormat))+'':'')+'';html+=''+ +(!isRTL?axisHtml:'')+''+ +(isRTL?axisHtml:'')+"";slotTime.add(this.slotDuration);} +return html;},processOptions:function(){var view=this.view;var slotDuration=view.opt('slotDuration');var snapDuration=view.opt('snapDuration');var input;slotDuration=moment.duration(slotDuration);snapDuration=snapDuration?moment.duration(snapDuration):slotDuration;this.slotDuration=slotDuration;this.snapDuration=snapDuration;this.snapsPerSlot=slotDuration/snapDuration;this.minResizeDuration=snapDuration;this.minTime=moment.duration(view.opt('minTime'));this.maxTime=moment.duration(view.opt('maxTime'));input=view.opt('slotLabelFormat');if($.isArray(input)){input=input[input.length-1];} +this.labelFormat=input||view.opt('axisFormat')||view.opt('smallTimeFormat');input=view.opt('slotLabelInterval');this.labelInterval=input?moment.duration(input):this.computeLabelInterval(slotDuration);},computeLabelInterval:function(slotDuration){var i;var labelInterval;var slotsPerLabel;for(i=AGENDA_STOCK_SUB_DURATIONS.length-1;i>=0;i--){labelInterval=moment.duration(AGENDA_STOCK_SUB_DURATIONS[i]);slotsPerLabel=divideDurationByDuration(labelInterval,slotDuration);if(isInt(slotsPerLabel)&&slotsPerLabel>1){return labelInterval;}} +return moment.duration(slotDuration);},computeEventTimeFormat:function(){return this.view.opt('noMeridiemTimeFormat');},computeDisplayEventEnd:function(){return true;},prepareHits:function(){this.colCoordCache.build();this.slatCoordCache.build();},releaseHits:function(){this.colCoordCache.clear();},queryHit:function(leftOffset,topOffset){var snapsPerSlot=this.snapsPerSlot;var colCoordCache=this.colCoordCache;var slatCoordCache=this.slatCoordCache;var colIndex=colCoordCache.getHorizontalIndex(leftOffset);var slatIndex=slatCoordCache.getVerticalIndex(topOffset);if(colIndex!=null&&slatIndex!=null){var slatTop=slatCoordCache.getTopOffset(slatIndex);var slatHeight=slatCoordCache.getHeight(slatIndex);var partial=(topOffset-slatTop)/slatHeight;var localSnapIndex=Math.floor(partial*snapsPerSlot);var snapIndex=slatIndex*snapsPerSlot+localSnapIndex;var snapTop=slatTop+(localSnapIndex/snapsPerSlot)*slatHeight;var snapBottom=slatTop+((localSnapIndex+1)/snapsPerSlot)*slatHeight;return{col:colIndex,snap:snapIndex,component:this,left:colCoordCache.getLeftOffset(colIndex),right:colCoordCache.getRightOffset(colIndex),top:snapTop,bottom:snapBottom};}},getHitSpan:function(hit){var start=this.getCellDate(0,hit.col);var time=this.computeSnapTime(hit.snap);var end;start.time(time);end=start.clone().add(this.snapDuration);return{start:start,end:end};},getHitEl:function(hit){return this.colEls.eq(hit.col);},rangeUpdated:function(){this.updateDayTable();},computeSnapTime:function(snapIndex){return moment.duration(this.minTime+this.snapDuration*snapIndex);},spanToSegs:function(span){var segs=this.sliceRangeByTimes(span);var i;for(i=0;i
').css('top',top).appendTo(this.colContainerEls.eq(segs[i].col))[0]);} +if(segs.length>0){nodes.push($('
').css('top',top).appendTo(this.el.find('.fc-content-skeleton'))[0]);} +this.nowIndicatorEls=$(nodes);},unrenderNowIndicator:function(){if(this.nowIndicatorEls){this.nowIndicatorEls.remove();this.nowIndicatorEls=null;}},renderSelection:function(span){if(this.view.opt('selectHelper')){this.renderEventLocationHelper(span);} +else{this.renderHighlight(span);}},unrenderSelection:function(){this.unrenderHelper();this.unrenderHighlight();},renderHighlight:function(span){this.renderHighlightSegs(this.spanToSegs(span));},unrenderHighlight:function(){this.unrenderHighlightSegs();}});;;TimeGrid.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 cellHtml='';var i;var skeletonEl;for(i=0;i'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'';} +skeletonEl=$('
'+''+''+cellHtml+''+'
'+'
');this.colContainerEls=skeletonEl.find('.fc-content-col');this.helperContainerEls=skeletonEl.find('.fc-helper-container');this.fgContainerEls=skeletonEl.find('.fc-event-container:not(.fc-helper-container)');this.bgContainerEls=skeletonEl.find('.fc-bgevent-container');this.highlightContainerEls=skeletonEl.find('.fc-highlight-container');this.businessContainerEls=skeletonEl.find('.fc-business-container');this.bookendCells(skeletonEl.find('tr'));this.el.append(skeletonEl);},renderFgSegs:function(segs){segs=this.renderFgSegsIntoContainers(segs,this.fgContainerEls);this.fgSegs=segs;return segs;},unrenderFgSegs:function(){this.unrenderNamedSegs('fgSegs');},renderHelperSegs:function(segs,sourceSeg){var helperEls=[];var i,seg;var sourceEl;segs=this.renderFgSegsIntoContainers(segs,this.helperContainerEls);for(i=0;i'+'
'+ +(timeText?'
'+''+htmlEscape(timeText)+''+'
':'')+ +(event.title?'
'+ +htmlEscape(event.title)+'
':'')+'
'+'
'+ +(isResizableFromEnd?'
':'')+'';},updateSegVerticals:function(segs){this.computeSegVerticals(segs);this.assignSegVerticals(segs);},computeSegVerticals:function(segs){var i,seg;for(i=0;iseg2.top&&seg1.top1){return'll';} +else{return'LL';}},formatRange:function(range,formatStr,separator){var end=range.end;if(!end.hasTime()){end=end.clone().subtract(1);} +return formatRange(range.start,end,formatStr,separator,this.opt('isRTL'));},setElement:function(el){this.el=el;this.bindGlobalHandlers();},removeElement:function(){this.clear();if(this.isSkeletonRendered){this.unrenderSkeleton();this.isSkeletonRendered=false;} +this.unbindGlobalHandlers();this.el.remove();},display:function(date){var _this=this;var scrollState=null;if(this.displaying){scrollState=this.queryScroll();} +this.calendar.freezeContentHeight();return this.clear().then(function(){return(_this.displaying=$.when(_this.displayView(date)).then(function(){_this.forceScroll(_this.computeInitialScroll(scrollState));_this.calendar.unfreezeContentHeight();_this.triggerRender();}));});},clear:function(){var _this=this;var displaying=this.displaying;if(displaying){return displaying.then(function(){_this.displaying=null;_this.clearEvents();return _this.clearView();});} +else{return $.when();}},displayView:function(date){if(!this.isSkeletonRendered){this.renderSkeleton();this.isSkeletonRendered=true;} +if(date){this.setDate(date);} +if(this.render){this.render();} +this.renderDates();this.updateSize();this.renderBusinessHours();this.startNowIndicator();},clearView:function(){this.unselect();this.stopNowIndicator();this.triggerUnrender();this.unrenderBusinessHours();this.unrenderDates();if(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(){this.listenTo($(document),'mousedown',this.handleDocumentMousedown);this.listenTo($(document),'touchstart',this.processUnselect);},unbindGlobalHandlers:function(){this.stopListeningTo($(document));},initThemingProps:function(){var tm=this.opt('theme')?'ui':'fc';this.widgetHeaderClass=tm+'-widget-header';this.widgetContentClass=tm+'-widget-content';this.highlightStateClass=tm+'-state-highlight';},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var _this=this;var unit;var update;var delay;if(this.opt('nowIndicator')){unit=this.getNowIndicatorUnit();if(unit){update=proxy(this,'updateNowIndicator');this.initialNowDate=this.calendar.getNow();this.initialNowQueriedMs=+new Date();this.renderNowIndicator(this.initialNowDate);this.isNowIndicatorRendered=true;delay=this.initialNowDate.clone().startOf(unit).add(1,unit)-this.initialNowDate;this.nowIndicatorTimeoutID=setTimeout(function(){_this.nowIndicatorTimeoutID=null;update();delay=+moment.duration(1,unit);delay=Math.max(100,delay);_this.nowIndicatorIntervalID=setInterval(update,delay);},delay);}}},updateNowIndicator:function(){if(this.isNowIndicatorRendered){this.unrenderNowIndicator();this.renderNowIndicator(this.initialNowDate.clone().add(new Date()-this.initialNowQueriedMs));}},stopNowIndicator:function(){if(this.isNowIndicatorRendered){if(this.nowIndicatorTimeoutID){clearTimeout(this.nowIndicatorTimeoutID);this.nowIndicatorTimeoutID=null;} +if(this.nowIndicatorIntervalID){clearTimeout(this.nowIndicatorIntervalID);this.nowIndicatorIntervalID=null;} +this.unrenderNowIndicator();this.isNowIndicatorRendered=false;}},getNowIndicatorUnit:function(){},renderNowIndicator:function(date){},unrenderNowIndicator:function(){},updateSize:function(isResize){var scrollState;if(isResize){scrollState=this.queryScroll();} +this.updateHeight(isResize);this.updateWidth(isResize);this.updateNowIndicator();if(isResize){this.setScroll(scrollState);}},updateWidth:function(isResize){},updateHeight:function(isResize){var calendar=this.calendar;this.setHeight(calendar.getSuggestedViewHeight(),calendar.isHeightAuto());},setHeight:function(height,isAuto){},computeInitialScroll:function(previousScrollState){return 0;},queryScroll:function(){},setScroll:function(scrollState){},forceScroll:function(scrollState){var _this=this;this.setScroll(scrollState);setTimeout(function(){_this.setScroll(scrollState);},0);},displayEvents:function(events){var scrollState=this.queryScroll();this.clearEvents();this.renderEvents(events);this.isEventsRendered=true;this.setScroll(scrollState);this.triggerEventRender();},clearEvents:function(){var scrollState;if(this.isEventsRendered){scrollState=this.queryScroll();this.triggerEventUnrender();if(this.destroyEvents){this.destroyEvents();} +this.unrenderEvents();this.setScroll(scrollState);this.isEventsRendered=false;}},renderEvents:function(events){},unrenderEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(seg){this.trigger('eventAfterRender',seg.event,seg.event,seg.el);});this.trigger('eventAfterAllRender');},triggerEventUnrender:function(){this.renderedEventSegEach(function(seg){this.trigger('eventDestroy',seg.event,seg.event,seg.el);});},resolveEventEl:function(event,el){var custom=this.trigger('eventRender',event,event,el);if(custom===false){el=null;} +else if(custom&&custom!==true){el=$(custom);} +return el;},showEvent:function(event){this.renderedEventSegEach(function(seg){seg.el.css('visibility','');},event);},hideEvent:function(event){this.renderedEventSegEach(function(seg){seg.el.css('visibility','hidden');},event);},renderedEventSegEach:function(func,event){var segs=this.getEventSegs();var i;for(i=0;i=this.nextDayThreshold){endDay.add(1,'days');}} +if(!end||endDay<=startDay){endDay=startDay.clone().add(1,'days');} +return{start:startDay,end:endDay};},isMultiDayEvent:function(event){var range=this.computeDayRange(event);return range.end.diff(range.start,'days')>1;}});;;var Scroller=FC.Scroller=Class.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(options){options=options||{};this.overflowX=options.overflowX||options.overflow||'auto';this.overflowY=options.overflowY||options.overflow||'auto';},render:function(){this.el=this.renderEl();this.applyOverflow();},renderEl:function(){return(this.scrollEl=$('
'));},clear:function(){this.setHeight('auto');this.applyOverflow();},destroy:function(){this.el.remove();},applyOverflow:function(){this.scrollEl.css({'overflow-x':this.overflowX,'overflow-y':this.overflowY});},lockOverflow:function(scrollbarWidths){var overflowX=this.overflowX;var overflowY=this.overflowY;scrollbarWidths=scrollbarWidths||this.getScrollbarWidths();if(overflowX==='auto'){overflowX=(scrollbarWidths.top||scrollbarWidths.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth)?'scroll':'hidden';} +if(overflowY==='auto'){overflowY=(scrollbarWidths.left||scrollbarWidths.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight)?'scroll':'hidden';} +this.scrollEl.css({'overflow-x':overflowX,'overflow-y':overflowY});},setHeight:function(height){this.scrollEl.height(height);},getScrollTop:function(){return this.scrollEl.scrollTop();},setScrollTop:function(top){this.scrollEl.scrollTop(top);},getClientWidth:function(){return this.scrollEl[0].clientWidth;},getClientHeight:function(){return this.scrollEl[0].clientHeight;},getScrollbarWidths:function(){return getScrollbarWidths(this.scrollEl);}});;;var Calendar=FC.Calendar=Class.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:Calendar_constructor,initialize:function(){},initOptions:function(overrides){var lang,langDefaults;var isRTL,dirDefaults;overrides=massageOverrides(overrides);lang=overrides.lang;langDefaults=langOptionHash[lang];if(!langDefaults){lang=Calendar.defaults.lang;langDefaults=langOptionHash[lang]||{};} +isRTL=firstDefined(overrides.isRTL,langDefaults.isRTL,Calendar.defaults.isRTL);dirDefaults=isRTL?Calendar.rtlDefaults:{};this.dirDefaults=dirDefaults;this.langDefaults=langDefaults;this.overrides=overrides;this.options=mergeOptions([Calendar.defaults,dirDefaults,langDefaults,overrides]);populateInstanceComputableOptions(this.options);this.viewSpecCache={};},getViewSpec:function(viewType){var cache=this.viewSpecCache;return cache[viewType]||(cache[viewType]=this.buildViewSpec(viewType));},getUnitViewSpec:function(unit){var viewTypes;var i;var spec;if($.inArray(unit,intervalUnits)!=-1){viewTypes=this.header.getViewsWithButtons();$.each(FC.views,function(viewType){viewTypes.push(viewType);});for(i=0;i").prependTo(element);header=t.header=new Header(t,options);headerElement=header.render();if(headerElement){element.prepend(headerElement);} +renderView(options.defaultView);if(options.handleWindowResize){windowResizeProxy=debounce(windowResize,options.windowResizeDelay);$(window).resize(windowResizeProxy);}} +function destroy(){if(currentView){currentView.removeElement();} +header.removeElement();content.remove();element.removeClass('fc fc-ltr fc-rtl fc-unthemed ui-widget');if(windowResizeProxy){$(window).unbind('resize',windowResizeProxy);}} +function elementVisible(){return element.is(':visible');} +function renderView(viewType){ignoreWindowResize++;if(currentView&&viewType&¤tView.type!==viewType){header.deactivateButton(currentView.type);freezeContentHeight();currentView.removeElement();currentView=t.view=null;} +if(!currentView&&viewType){currentView=t.view=viewsByType[viewType]||(viewsByType[viewType]=t.instantiateView(viewType));currentView.setElement($("
").appendTo(content));header.activateButton(viewType);} +if(currentView){date=currentView.massageCurrentDate(date);if(!currentView.displaying||!date.isWithin(currentView.intervalStart,currentView.intervalEnd)){if(elementVisible()){currentView.display(date);unfreezeContentHeight();updateHeaderTitle();updateTodayButton();getAndRenderEvents();}}} +unfreezeContentHeight();ignoreWindowResize--;} +t.getSuggestedViewHeight=function(){if(suggestedViewHeight===undefined){calcSize();} +return suggestedViewHeight;};t.isHeightAuto=function(){return options.contentHeight==='auto'||options.height==='auto';};function updateSize(shouldRecalc){if(elementVisible()){if(shouldRecalc){_calcSize();} +ignoreWindowResize++;currentView.updateSize(true);ignoreWindowResize--;return true;}} +function calcSize(){if(elementVisible()){_calcSize();}} +function _calcSize(){if(typeof options.contentHeight==='number'){suggestedViewHeight=options.contentHeight;} +else if(typeof options.height==='number'){suggestedViewHeight=options.height-(headerElement?headerElement.outerHeight(true):0);} +else{suggestedViewHeight=Math.round(content.width()/Math.max(options.aspectRatio,.5));}} +function windowResize(ev){if(!ignoreWindowResize&&ev.target===window&¤tView.start){if(updateSize(true)){currentView.trigger('windowResize',_element);}}} +function refetchEvents(){fetchAndRenderEvents();} +function renderEvents(){if(elementVisible()){freezeContentHeight();currentView.displayEvents(events);unfreezeContentHeight();}} +function destroyEvents(){freezeContentHeight();currentView.clearEvents();unfreezeContentHeight();} +function getAndRenderEvents(){if(!options.lazyFetching||isFetchNeeded(currentView.start,currentView.end)){fetchAndRenderEvents();} +else{renderEvents();}} +function fetchAndRenderEvents(){fetchEvents(currentView.start,currentView.end);} +function reportEvents(_events){events=_events;renderEvents();} +function reportEventChange(){renderEvents();} +function updateHeaderTitle(){header.updateTitle(currentView.title);} +function updateTodayButton(){var now=t.getNow();if(now.isWithin(currentView.intervalStart,currentView.intervalEnd)){header.disableButton('today');} +else{header.enableButton('today');}} +function select(zonedStartInput,zonedEndInput){currentView.select(t.buildSelectSpan.apply(t,arguments));} +function unselect(){if(currentView){currentView.unselect();}} +function prev(){date=currentView.computePrevDate(date);renderView();} +function next(){date=currentView.computeNextDate(date);renderView();} +function prevYear(){date.add(-1,'years');renderView();} +function nextYear(){date.add(1,'years');renderView();} +function today(){date=t.getNow();renderView();} +function gotoDate(zonedDateInput){date=t.moment(zonedDateInput).stripZone();renderView();} +function incrementDate(delta){date.add(moment.duration(delta));renderView();} +function zoomTo(newDate,viewType){var spec;viewType=viewType||'day';spec=t.getViewSpec(viewType)||t.getUnitViewSpec(viewType);date=newDate.clone();renderView(spec?spec.type:null);} +function getDate(){return t.applyTimezone(date);} +t.freezeContentHeight=freezeContentHeight;t.unfreezeContentHeight=unfreezeContentHeight;function freezeContentHeight(){content.css({width:'100%',height:content.height(),overflow:'hidden'});} +function unfreezeContentHeight(){content.css({width:'',height:'',overflow:''});} +function getCalendar(){return t;} +function getView(){return currentView;} +function option(name,value){if(value===undefined){return options[name];} +if(name=='height'||name=='contentHeight'||name=='aspectRatio'){options[name]=value;updateSize(true);}} +function trigger(name,thisObj){var args=Array.prototype.slice.call(arguments,2);thisObj=thisObj||_element;this.triggerWith(name,thisObj,args);if(options[name]){return options[name].apply(thisObj,args);}} +t.initialize();};;Calendar.defaults={titleRangeSeparator:' \u2014 ',monthYearFormat:'MMMM YYYY',defaultTimedEventDuration:'02:00:00',defaultAllDayEventDuration:{days:1},forceEventDuration:false,nextDayThreshold:'09:00:00',defaultView:'month',aspectRatio:1.35,header:{left:'title',center:'',right:'today prev,next'},weekends:true,weekNumbers:false,weekNumberTitle:'W',weekNumberCalculation:'local',scrollTime:'06:00:00',lazyFetching:true,startParam:'start',endParam:'end',timezoneParam:'timezone',timezone:false,isRTL:false,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:'year',today:'today',month:'month',week:'week',day:'day'},buttonIcons:{prev:'left-single-arrow',next:'right-single-arrow',prevYear:'left-double-arrow',nextYear:'right-double-arrow'},theme:false,themeButtonIcons:{prev:'circle-triangle-w',next:'circle-triangle-e',prevYear:'seek-prev',nextYear:'seek-next'},dragOpacity:.75,dragRevertDuration:500,dragScroll:true,unselectAuto:true,dropAccept:'*',eventOrder:'title',eventLimit:false,eventLimitText:'more',eventLimitClick:'popover',dayPopoverFormat:'LL',handleWindowResize:true,windowResizeDelay:200,longPressDelay:1000};Calendar.englishDefaults={dayPopoverFormat:'dddd, MMMM D'};Calendar.rtlDefaults={header:{left:'next,prev today',center:'',right:'title'},buttonIcons:{prev:'right-single-arrow',next:'left-single-arrow',prevYear:'right-double-arrow',nextYear:'left-double-arrow'},themeButtonIcons:{prev:'circle-triangle-e',next:'circle-triangle-w',nextYear:'seek-prev',prevYear:'seek-next'}};;;var langOptionHash=FC.langs={};FC.datepickerLang=function(langCode,dpLangCode,dpOptions){var fcOptions=langOptionHash[langCode]||(langOptionHash[langCode]={});fcOptions.isRTL=dpOptions.isRTL;fcOptions.weekNumberTitle=dpOptions.weekHeader;$.each(dpComputableOptions,function(name,func){fcOptions[name]=func(dpOptions);});if($.datepicker){$.datepicker.regional[dpLangCode]=$.datepicker.regional[langCode]=dpOptions;$.datepicker.regional.en=$.datepicker.regional[''];$.datepicker.setDefaults(dpOptions);}};FC.lang=function(langCode,newFcOptions){var fcOptions;var momOptions;fcOptions=langOptionHash[langCode]||(langOptionHash[langCode]={});if(newFcOptions){fcOptions=langOptionHash[langCode]=mergeOptions([fcOptions,newFcOptions]);} +momOptions=getMomentLocaleData(langCode);$.each(momComputableOptions,function(name,func){if(fcOptions[name]==null){fcOptions[name]=func(momOptions,fcOptions);}});Calendar.defaults.lang=langCode;};var dpComputableOptions={buttonText:function(dpOptions){return{prev:stripHtmlEntities(dpOptions.prevText),next:stripHtmlEntities(dpOptions.nextText),today:stripHtmlEntities(dpOptions.currentText)};},monthYearFormat:function(dpOptions){return dpOptions.showMonthAfterYear?'YYYY['+dpOptions.yearSuffix+'] MMMM':'MMMM YYYY['+dpOptions.yearSuffix+']';}};var momComputableOptions={dayOfMonthFormat:function(momOptions,fcOptions){var format=momOptions.longDateFormat('l');format=format.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,'');if(fcOptions.isRTL){format+=' ddd';} +else{format='ddd '+format;} +return format;},mediumTimeFormat:function(momOptions){return momOptions.longDateFormat('LT').replace(/\s*a$/i,'a');},smallTimeFormat:function(momOptions){return momOptions.longDateFormat('LT').replace(':mm','(:mm)').replace(/(\Wmm)$/,'($1)').replace(/\s*a$/i,'a');},extraSmallTimeFormat:function(momOptions){return momOptions.longDateFormat('LT').replace(':mm','(:mm)').replace(/(\Wmm)$/,'($1)').replace(/\s*a$/i,'t');},hourFormat:function(momOptions){return momOptions.longDateFormat('LT').replace(':mm','').replace(/(\Wmm)$/,'').replace(/\s*a$/i,'a');},noMeridiemTimeFormat:function(momOptions){return momOptions.longDateFormat('LT').replace(/\s*a$/i,'');}};var instanceComputableOptions={smallDayDateFormat:function(options){return options.isRTL?'D dd':'dd D';},weekFormat:function(options){return options.isRTL?'w[ '+options.weekNumberTitle+']':'['+options.weekNumberTitle+' ]w';},smallWeekFormat:function(options){return options.isRTL?'w['+options.weekNumberTitle+']':'['+options.weekNumberTitle+']w';}};function populateInstanceComputableOptions(options){$.each(instanceComputableOptions,function(name,func){if(options[name]==null){options[name]=func(options);}});} +function getMomentLocaleData(langCode){var func=moment.localeData||moment.langData;return func.call(moment,langCode)||func.call(moment,'en');} +FC.lang('en',Calendar.englishDefaults);;;function Header(calendar,options){var t=this;t.render=render;t.removeElement=removeElement;t.updateTitle=updateTitle;t.activateButton=activateButton;t.deactivateButton=deactivateButton;t.disableButton=disableButton;t.enableButton=enableButton;t.getViewsWithButtons=getViewsWithButtons;var el=$();var viewsWithButtons=[];var tm;function render(){var sections=options.header;tm=options.theme?'ui':'fc';if(sections){el=$("
").append(renderSection('left')).append(renderSection('right')).append(renderSection('center')).append('
');return el;}} +function removeElement(){el.remove();el=$();} +function renderSection(position){var sectionEl=$('
');var buttonStr=options.header[position];if(buttonStr){$.each(buttonStr.split(' '),function(i){var groupChildren=$();var isOnlyButtons=true;var groupEl;$.each(this.split(','),function(j,buttonName){var customButtonProps;var viewSpec;var buttonClick;var overrideText;var defaultText;var themeIcon;var normalIcon;var innerHtml;var classes;var button;if(buttonName=='title'){groupChildren=groupChildren.add($('

 

'));isOnlyButtons=false;} +else{if((customButtonProps=(calendar.options.customButtons||{})[buttonName])){buttonClick=function(ev){if(customButtonProps.click){customButtonProps.click.call(button[0],ev);}};overrideText='';defaultText=customButtonProps.text;} +else if((viewSpec=calendar.getViewSpec(buttonName))){buttonClick=function(){calendar.changeView(buttonName);};viewsWithButtons.push(buttonName);overrideText=viewSpec.buttonTextOverride;defaultText=viewSpec.buttonTextDefault;} +else if(calendar[buttonName]){buttonClick=function(){calendar[buttonName]();};overrideText=(calendar.overrides.buttonText||{})[buttonName];defaultText=options.buttonText[buttonName];} +if(buttonClick){themeIcon=customButtonProps?customButtonProps.themeIcon:options.themeButtonIcons[buttonName];normalIcon=customButtonProps?customButtonProps.icon:options.buttonIcons[buttonName];if(overrideText){innerHtml=htmlEscape(overrideText);} +else if(themeIcon&&options.theme){innerHtml="";} +else if(normalIcon&&!options.theme){innerHtml="";} +else{innerHtml=htmlEscape(defaultText);} +classes=['fc-'+buttonName+'-button',tm+'-button',tm+'-state-default'];button=$('').click(function(ev){if(!button.hasClass(tm+'-state-disabled')){buttonClick(ev);if(button.hasClass(tm+'-state-active')||button.hasClass(tm+'-state-disabled')){button.removeClass(tm+'-state-hover');}}}).mousedown(function(){button.not('.'+tm+'-state-active').not('.'+tm+'-state-disabled').addClass(tm+'-state-down');}).mouseup(function(){button.removeClass(tm+'-state-down');}).hover(function(){button.not('.'+tm+'-state-active').not('.'+tm+'-state-disabled').addClass(tm+'-state-hover');},function(){button.removeClass(tm+'-state-hover').removeClass(tm+'-state-down');});groupChildren=groupChildren.add(button);}}});if(isOnlyButtons){groupChildren.first().addClass(tm+'-corner-left').end().last().addClass(tm+'-corner-right').end();} +if(groupChildren.length>1){groupEl=$('
');if(isOnlyButtons){groupEl.addClass('fc-button-group');} +groupEl.append(groupChildren);sectionEl.append(groupEl);} +else{sectionEl.append(groupChildren);}});} +return sectionEl;} +function updateTitle(text){el.find('h2').text(text);} +function activateButton(buttonName){el.find('.fc-'+buttonName+'-button').addClass(tm+'-state-active');} +function deactivateButton(buttonName){el.find('.fc-'+buttonName+'-button').removeClass(tm+'-state-active');} +function disableButton(buttonName){el.find('.fc-'+buttonName+'-button').attr('disabled','disabled').addClass(tm+'-state-disabled');} +function enableButton(buttonName){el.find('.fc-'+buttonName+'-button').removeAttr('disabled').removeClass(tm+'-state-disabled');} +function getViewsWithButtons(){return viewsWithButtons;}};;FC.sourceNormalizers=[];FC.sourceFetchers=[];var ajaxDefaults={dataType:'json',cache:false};var eventGUID=1;function EventManager(options){var t=this;t.isFetchNeeded=isFetchNeeded;t.fetchEvents=fetchEvents;t.addEventSource=addEventSource;t.removeEventSource=removeEventSource;t.updateEvent=updateEvent;t.renderEvent=renderEvent;t.removeEvents=removeEvents;t.clientEvents=clientEvents;t.mutateEvent=mutateEvent;t.normalizeEventDates=normalizeEventDates;t.normalizeEventTimes=normalizeEventTimes;var reportEvents=t.reportEvents;var stickySource={events:[]};var sources=[stickySource];var rangeStart,rangeEnd;var currentFetchID=0;var pendingSourceCnt=0;var cache=[];$.each((options.events?[options.events]:[]).concat(options.eventSources||[]),function(i,sourceInput){var source=buildEventSource(sourceInput);if(source){sources.push(source);}});function isFetchNeeded(start,end){return!rangeStart||startrangeEnd;} +function fetchEvents(start,end){rangeStart=start;rangeEnd=end;cache=[];var fetchID=++currentFetchID;var len=sources.length;pendingSourceCnt=len;for(var i=0;i=eventStart&&range.end<=eventEnd;} +function eventIntersectsRange(event,range){var eventStart=event.start.clone().stripZone();var eventEnd=t.getEventEnd(event).stripZone();return range.starteventStart;} +t.getEventCache=function(){return cache;};} +Calendar.prototype.normalizeEvent=function(event){};Calendar.prototype.getPeerEvents=function(span,event){var cache=this.getEventCache();var peerEvents=[];var i,otherEvent;for(i=0;i1;this.weekNumbersVisible=this.opt('weekNumbers');this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible;this.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());this.renderHead();this.scroller.render();var dayGridContainerEl=this.scroller.el.addClass('fc-day-grid-container');var dayGridEl=$('
').appendTo(dayGridContainerEl);this.el.find('.fc-body > tr > td').append(dayGridContainerEl);this.dayGrid.setElement(dayGridEl);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();this.scroller.destroy();},renderBusinessHours:function(){this.dayGrid.renderBusinessHours();},renderSkeletonHtml:function(){return''+''+''+''+''+''+''+''+''+''+''+''+'
';},weekNumberStyleAttr:function(){if(this.weekNumberWidth!==null){return'style="width:'+this.weekNumberWidth+'px"';} +return'';},hasRigidRows:function(){var eventLimit=this.opt('eventLimit');return eventLimit&&typeof eventLimit!=='number';},updateWidth:function(){if(this.weekNumbersVisible){this.weekNumberWidth=matchCellWidths(this.el.find('.fc-week-number'));}},setHeight:function(totalHeight,isAuto){var eventLimit=this.opt('eventLimit');var scrollerHeight;var scrollbarWidths;this.scroller.clear();uncompensateScroll(this.headRowEl);this.dayGrid.removeSegPopover();if(eventLimit&&typeof eventLimit==='number'){this.dayGrid.limitRows(eventLimit);} +scrollerHeight=this.computeScrollerHeight(totalHeight);this.setGridHeight(scrollerHeight,isAuto);if(eventLimit&&typeof eventLimit!=='number'){this.dayGrid.limitRows(eventLimit);} +if(!isAuto){this.scroller.setHeight(scrollerHeight);scrollbarWidths=this.scroller.getScrollbarWidths();if(scrollbarWidths.left||scrollbarWidths.right){compensateScroll(this.headRowEl,scrollbarWidths);scrollerHeight=this.computeScrollerHeight(totalHeight);this.scroller.setHeight(scrollerHeight);} +this.scroller.lockOverflow(scrollbarWidths);}},computeScrollerHeight:function(totalHeight){return totalHeight- +subtractInnerElHeight(this.el,this.scroller.el);},setGridHeight:function(height,isAuto){if(isAuto){undistributeHeight(this.dayGrid.rowEls);} +else{distributeHeight(this.dayGrid.rowEls,height,true);}},queryScroll:function(){return this.scroller.getScrollTop();},setScroll:function(top){this.scroller.setScrollTop(top);},prepareHits:function(){this.dayGrid.prepareHits();},releaseHits:function(){this.dayGrid.releaseHits();},queryHit:function(left,top){return this.dayGrid.queryHit(left,top);},getHitSpan:function(hit){return this.dayGrid.getHitSpan(hit);},getHitEl:function(hit){return this.dayGrid.getHitEl(hit);},renderEvents:function(events){this.dayGrid.renderEvents(events);this.updateHeight();},getEventSegs:function(){return this.dayGrid.getEventSegs();},unrenderEvents:function(){this.dayGrid.unrenderEvents();},renderDrag:function(dropLocation,seg){return this.dayGrid.renderDrag(dropLocation,seg);},unrenderDrag:function(){this.dayGrid.unrenderDrag();},renderSelection:function(span){this.dayGrid.renderSelection(span);},unrenderSelection:function(){this.dayGrid.unrenderSelection();}});var basicDayGridMethods={renderHeadIntroHtml:function(){var view=this.view;if(view.weekNumbersVisible){return''+''+''+ +htmlEscape(view.opt('weekNumberTitle'))+''+'';} +return'';},renderNumberIntroHtml:function(row){var view=this.view;if(view.weekNumbersVisible){return''+''+''+ +this.getCellDate(row,0).format('w')+''+'';} +return'';},renderBgIntroHtml:function(){var view=this.view;if(view.weekNumbersVisible){return'';} +return'';},renderIntroHtml:function(){var view=this.view;if(view.weekNumbersVisible){return'';} +return'';}};;;var MonthView=FC.MonthView=BasicView.extend({computeRange:function(date){var range=BasicView.prototype.computeRange.call(this,date);var rowCnt;if(this.isFixedWeeks()){rowCnt=Math.ceil(range.end.diff(range.start,'weeks',true));range.end.add(6-rowCnt,'weeks');} +return range;},setGridHeight:function(height,isAuto){isAuto=isAuto||this.opt('weekMode')==='variable';if(isAuto){height*=this.rowCnt/6;} +distributeHeight(this.dayGrid.rowEls,height,!isAuto);},isFixedWeeks:function(){var weekMode=this.opt('weekMode');if(weekMode){return weekMode==='fixed';} +return this.opt('fixedWeekCount');}});;;fcViews.basic={'class':BasicView};fcViews.basicDay={type:'basic',duration:{days:1}};fcViews.basicWeek={type:'basic',duration:{weeks:1}};fcViews.month={'class':MonthView,duration:{months:1},defaults:{fixedWeekCount:true}};;;var AgendaView=FC.AgendaView=View.extend({scroller:null,timeGridClass:TimeGrid,timeGrid:null,dayGridClass:DayGrid,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid();if(this.opt('allDaySlot')){this.dayGrid=this.instantiateDayGrid();} +this.scroller=new Scroller({overflowX:'hidden',overflowY:'auto'});},instantiateTimeGrid:function(){var subclass=this.timeGridClass.extend(agendaTimeGridMethods);return new subclass(this);},instantiateDayGrid:function(){var subclass=this.dayGridClass.extend(agendaDayGridMethods);return new subclass(this);},setRange:function(range){View.prototype.setRange.call(this,range);this.timeGrid.setRange(range);if(this.dayGrid){this.dayGrid.setRange(range);}},renderDates:function(){this.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());this.renderHead();this.scroller.render();var timeGridWrapEl=this.scroller.el.addClass('fc-time-grid-container');var timeGridEl=$('
').appendTo(timeGridWrapEl);this.el.find('.fc-body > tr > td').append(timeGridWrapEl);this.timeGrid.setElement(timeGridEl);this.timeGrid.renderDates();this.bottomRuleEl=$('
').appendTo(this.timeGrid.el);if(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();if(this.dayGrid){this.dayGrid.unrenderDates();this.dayGrid.removeElement();} +this.scroller.destroy();},renderSkeletonHtml:function(){return''+''+''+''+''+''+''+''+''+''+''+''+'
'+ +(this.dayGrid?'
'+'
':'')+'
';},axisStyleAttr:function(){if(this.axisWidth!==null){return'style="width:'+this.axisWidth+'px"';} +return'';},renderBusinessHours:function(){this.timeGrid.renderBusinessHours();if(this.dayGrid){this.dayGrid.renderBusinessHours();}},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours();if(this.dayGrid){this.dayGrid.unrenderBusinessHours();}},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit();},renderNowIndicator:function(date){this.timeGrid.renderNowIndicator(date);},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator();},updateSize:function(isResize){this.timeGrid.updateSize(isResize);View.prototype.updateSize.call(this,isResize);},updateWidth:function(){this.axisWidth=matchCellWidths(this.el.find('.fc-axis'));},setHeight:function(totalHeight,isAuto){var eventLimit;var scrollerHeight;var scrollbarWidths;this.bottomRuleEl.hide();this.scroller.clear();uncompensateScroll(this.noScrollRowEls);if(this.dayGrid){this.dayGrid.removeSegPopover();eventLimit=this.opt('eventLimit');if(eventLimit&&typeof eventLimit!=='number'){eventLimit=AGENDA_ALL_DAY_EVENT_LIMIT;} +if(eventLimit){this.dayGrid.limitRows(eventLimit);}} +if(!isAuto){scrollerHeight=this.computeScrollerHeight(totalHeight);this.scroller.setHeight(scrollerHeight);scrollbarWidths=this.scroller.getScrollbarWidths();if(scrollbarWidths.left||scrollbarWidths.right){compensateScroll(this.noScrollRowEls,scrollbarWidths);scrollerHeight=this.computeScrollerHeight(totalHeight);this.scroller.setHeight(scrollerHeight);} +this.scroller.lockOverflow(scrollbarWidths);if(this.timeGrid.getTotalSlatHeight()'+''+ +htmlEscape(weekText)+''+'';} +else{return'';}},renderBgIntroHtml:function(){var view=this.view;return'';},renderIntroHtml:function(){var view=this.view;return'';}};var agendaDayGridMethods={renderBgIntroHtml:function(){var view=this.view;return''+''+''+ +(view.opt('allDayHtml')||htmlEscape(view.opt('allDayText')))+''+'';},renderIntroHtml:function(){var view=this.view;return'';}};;;var AGENDA_ALL_DAY_EVENT_LIMIT=5;var AGENDA_STOCK_SUB_DURATIONS=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];fcViews.agenda={'class':AgendaView,defaults:{allDaySlot:true,allDayText:'all-day',slotDuration:'00:30:00',minTime:'00:00:00',maxTime:'24:00:00',slotEventOverlap:true}};fcViews.agendaDay={type:'agenda',duration:{days:1}};fcViews.agendaWeek={type:'agenda',duration:{weeks:1}};;;return FC;}); \ No newline at end of file From 7ba8c0b69891801dff5c70e2b3644423bb1d76a9 Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 12:48:27 -0400 Subject: [PATCH 5/8] - updated max_length on chemical documents --- NEMO/migrations/0041_version_4_2_1.py | 20 ++++++++++++++++++++ NEMO/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 NEMO/migrations/0041_version_4_2_1.py diff --git a/NEMO/migrations/0041_version_4_2_1.py b/NEMO/migrations/0041_version_4_2_1.py new file mode 100644 index 00000000..7e0b8a3e --- /dev/null +++ b/NEMO/migrations/0041_version_4_2_1.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.14 on 2022-09-06 16:26 + +from django.db import migrations, models + +import NEMO.utilities + + +class Migration(migrations.Migration): + + dependencies = [ + ('NEMO', '0040_version_4_2_0'), + ] + + operations = [ + migrations.AlterField( + model_name='chemical', + name='document', + field=models.FileField(blank=True, max_length=500, null=True, upload_to=NEMO.utilities.get_chemical_document_filename), + ), + ] diff --git a/NEMO/models.py b/NEMO/models.py index 74a2eaf8..8810655e 100644 --- a/NEMO/models.py +++ b/NEMO/models.py @@ -2398,7 +2398,7 @@ def __str__(self): class Chemical(models.Model): name = models.CharField(max_length=200) hazards = models.ManyToManyField(ChemicalHazard, blank=True, help_text="Select the hazards for this chemical.") - document = models.FileField(null=True, blank=True, upload_to=get_chemical_document_filename) + document = models.FileField(null=True, blank=True, upload_to=get_chemical_document_filename, max_length=500) url = models.CharField(null=True, blank=True, max_length=200, verbose_name='URL') keywords = models.TextField(null=True, blank=True) From 2ba86534877d7d9fb6b0a82333582c1d24eb83a2 Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 13:02:14 -0400 Subject: [PATCH 6/8] - fixed rates table preferences not being saved/applied correctly --- NEMO/rates.py | 15 +++++++++------ NEMO/views/consumables.py | 4 ++-- NEMO/views/tool_control.py | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/NEMO/rates.py b/NEMO/rates.py index 478ff59c..813ed218 100644 --- a/NEMO/rates.py +++ b/NEMO/rates.py @@ -13,12 +13,10 @@ class Rates(ABC): rates = None - expand_rates_table = False @abstractmethod - def load_rates(self): - from NEMO.views.customization import RatesCustomization - self.expand_rates_table = RatesCustomization.get("rates_expand_table", raise_exception=False) == 'enabled' + def load_rates(self, force_reload=False): + pass def get_consumable_rates(self, consumables: List[Consumable]) -> Dict[str, str]: if self.rates: @@ -36,6 +34,11 @@ def get_tool_rates(self, tools: List[Tool]) -> Dict[str, str]: def get_tool_rate(self, tool: Tool) -> str: pass + @staticmethod + def get_expand_rates_table() -> bool: + from NEMO.views.customization import RatesCustomization + return RatesCustomization.get("rates_expand_table", raise_exception=False) == 'enabled' + class NISTRates(Rates): @@ -82,8 +85,8 @@ def get_tool_rate(self, tool: Tool) -> str: return "" training_rate = self._get_rate_by_table_id_and_class(tool, self.tool_training_rate_class, self.full_cost_rate_class) training_group_rate = self._get_rate_by_table_id_and_class(tool, self.tool_training_group_rate_class, self.full_cost_rate_class) - html_rate = f'
' - html_rate += f'
Rates
' + html_rate = f'
' + html_rate += f'
Rates
' table_header = '' table_header_2 = '' diff --git a/NEMO/views/consumables.py b/NEMO/views/consumables.py index fbb7e172..c0964885 100644 --- a/NEMO/views/consumables.py +++ b/NEMO/views/consumables.py @@ -22,8 +22,8 @@ @require_http_methods(['GET', 'POST']) def consumables(request): if request.method == "GET": - from NEMO import rates - rate_dict = rates.rate_class.get_consumable_rates(Consumable.objects.all()) + from NEMO.rates import rate_class + rate_dict = rate_class.get_consumable_rates(Consumable.objects.all()) dictionary = { 'users': User.objects.filter(is_active=True), diff --git a/NEMO/views/tool_control.py b/NEMO/views/tool_control.py index 8e7d8301..eb832ccc 100644 --- a/NEMO/views/tool_control.py +++ b/NEMO/views/tool_control.py @@ -83,12 +83,12 @@ def tool_control(request, item_type="tool", tool_id=None): @require_GET def tool_status(request, tool_id): """ Gets the current status of the tool (that is, whether it is currently in use or not). """ - from NEMO import rates + from NEMO.rates import rate_class tool = get_object_or_404(Tool, id=tool_id, visible=True) dictionary = { "tool": tool, - "tool_rate": rates.rate_class.get_tool_rate(tool), + "tool_rate": rate_class.get_tool_rate(tool), "task_categories": TaskCategory.objects.filter(stage=TaskCategory.Stage.INITIAL_ASSESSMENT), "rendered_configuration_html": tool.configuration_widget(request.user), "mobile": request.device == "mobile", From 292ad114261146b039f081da6ba82c75cf8410e1 Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 13:10:37 -0400 Subject: [PATCH 7/8] - refactored identical CSS rule --- NEMO/static/nemo.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/NEMO/static/nemo.css b/NEMO/static/nemo.css index c059c561..99422c4b 100644 --- a/NEMO/static/nemo.css +++ b/NEMO/static/nemo.css @@ -484,10 +484,6 @@ Twitter Typeahead autocomplete dropdown menu isn't chopped off. */ .tool-rates .media-heading { display: block; -} - -.tool-rates .media-heading -{ font-size: medium; font-weight: 500; } From c78f2ed8e9ab87a5906ee462078175e1f3ba03d8 Mon Sep 17 00:00:00 2001 From: mrampant Date: Tue, 6 Sep 2022 13:42:55 -0400 Subject: [PATCH 8/8] - preparing for 4.2.1 release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 72e2c107..8971c815 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='NEMO', - version='4.2.1.dev', + version='4.2.1', python_requires='>=3.7', packages=find_packages(exclude=['NEMO.tests','NEMO.tests.*']), include_package_data=True,