$((function(){function e(){-1!=breakpoint().indexOf("phone")&&$("h4.calendar").prevAll(".jump-to").length>0?$("h4.calendar").after($(".jump-to")):-1==breakpoint().indexOf("phone")&&$("h4.calendar").nextAll(".jump-to").length>0&&$("h4.calendar").before($(".jump-to"))}$(window).resize((function(){e()})),e();var a=$("#calendar").length>0;if($("#Category").change((function(){var e=$(this).val();""==e&&(e=urlPrefix),a?$("#calendar").fullCalendar("refetchEvents"):window.location.href=baseUrl+e})),$("#search-box").keydown((function(e){13==(e.charCode||e.keyCode||0)&&$("#search-go").click()})),$("#search-go").click((function(){if(a)$("#calendar").fullCalendar("refetchEvents");else{var e=$("#Category").val();""==e&&(e=urlPrefix);var n=$("#search-box").val(),r=baseUrl+e+(""!=n?"?SearchText="+encodeURIComponent(n):"");window.location.pathname+window.location.search!=r&&(window.location.href=r)}})),a){$("#calendar").fullCalendar({header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},eventSources:[{url:calendarUrl,type:"POST",data:function(){return{searchText:$("#search-box").val(),category:$("#Category").val()}},success:function(e){if(e){var a=e.length;$("#events-calendar-filter-alert").text(`${a} events found.`)}},error:function(){alert("there was an error while fetching events!")}}]}),$("#jump-month,#jump-year").change((function(){var e=$("#jump-month").val(),a=$("#jump-year").val();""==e&&(e=0),""==a&&(a=moment().year()),$("#calendar").fullCalendar("gotoDate",moment({year:a,month:e,day:1}))})),$(".fc-prev-button").attr("aria-label","Previous"),$(".fc-next-button").attr("aria-label","Next")}}));
//# sourceMappingURL=events-bundle.js.map
