tribe.events=tribe.events||{},tribe.events.views=tribe.events.views||{},tribe.events.views.datepickerPro={},function(e,s){"use strict";var t=e(document);s.selectors={datepickerDays:".datepicker-days",datepickerDaysRow:".datepicker-days tbody tr",datepickerDay:".day",datepickerDayNotDisabled:".day:not(.disabled)",activeClass:".active",disabledClass:".disabled",focusedClass:".focused",hoveredClass:".hovered",currentClass:".current"},s.toggleHoverClass=function(e){e.data.row.toggleClass(s.selectors.hoveredClass.className())},s.handleDisabledDayClick=function(e){e.data.row.find(s.selectors.datepickerDayNotDisabled).click()},s.bindRowEvents=function(t){var a=t.data.container.find(s.selectors.datepickerDays);t.data.container.find(s.selectors.datepickerDaysRow).each((function(t,a){var i=e(a);i.off("mouseenter mouseleave",s.toggleHoverClass).on("mouseenter mouseleave",{row:i},s.toggleHoverClass).find(s.selectors.datepickerDay).each((function(t,a){var r=e(a);r.hasClass(s.selectors.disabledClass.className())&&r.off("click",s.handleDisabledDayClick).on("click",{row:i},s.handleDisabledDayClick),r.hasClass(s.selectors.focusedClass.className())&&i.addClass(s.selectors.focusedClass.className()),r.hasClass(s.selectors.activeClass.className())&&i.addClass(s.selectors.activeClass.className()),r.hasClass(s.selectors.currentClass.className())&&i.addClass(s.selectors.currentClass.className())}))})),t.data.observer.observe(a[0],{attributes:!0,childList:!0,subtree:!0})},s.afterDeinit=function(e,t,a){e.data.container.off("afterDatepickerDeinit.tribeEvents",s.afterDeinit).off("handleMutationMonthChange.tribeEvents",s.bindRowEvents).find(s.selectors.input).off("show",s.bindRowEvents)},s.beforeInit=function(e,s,t,a){var i=[];"week"===a.slug&&[0,1,2,3,4,5,6].forEach((function(e){a.start_of_week!=e&&i.push(e)})),tribe.events.views.datepicker.options.daysOfWeekDisabled=i},s.afterInit=function(e,t,a,i){"week"===i.slug&&a.on("afterDatepickerDeinit.tribeEvents",{container:a,viewSlug:i.slug},s.afterDeinit).on("handleMutationMonthChange.tribeEvents",{container:a,observer:tribe.events.views.datepicker.observer},s.bindRowEvents).find(tribe.events.views.datepicker.selectors.input).on("show",{container:a,observer:tribe.events.views.datepicker.observer},s.bindRowEvents)},s.ready=function(){t.on("beforeDatepickerInit.tribeEvents",tribe.events.views.manager.selectors.container,s.beforeInit),t.on("afterDatepickerInit.tribeEvents",tribe.events.views.manager.selectors.container,s.afterInit)},e(s.ready)}(jQuery,tribe.events.views.datepickerPro),window.tec=window.tec||{},window.tec.eventsPro=window.tec.eventsPro||{},window.tec.eventsPro.views=window.tec.eventsPro.views||{},window.tec.eventsPro.views.datepickerPro={};