import{j as i,bc as A,bd as J,be as T,bf as Y,bg as z,ap as B}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d610.js";import{A as I,L as P,R as V}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d65.js";import{a as p}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d64.js";import{p as N,aW as O}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d623.js";import{r as U}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6.js";import{u as k}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d633.js";import{l as L}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d621.js";import{u as $}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d627.js";import{u as y}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d619.js";import{S as D}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d636.js";import{W as g}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d618.js";import{G as w}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d663.js";import{U as j}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d662.js";import{M as F,L as _}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6131.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d68.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d67.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d66.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d69.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d62.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d63.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d645.js";var E={exports:{}};/*!
 * Evo Calendar - Simple and Modern-looking Event Calendar Plugin
 *
 * Licensed under the MIT License
 * 
 * Version: 1.1.3
 * Author: Edlyn Villegas
 * Docs: https://edlynvillegas.github.com/evo-calendar
 * Repo: https://github.com/edlynvillegas/evo-calendar
 * Issues: https://github.com/edlynvillegas/evo-calendar/issues
 * 
 */var M;function H(){return M||(M=1,function(v,c){(function(r){v.exports=r(U())})(function(r){var l=window.EvoCalendar||{};(l=function(){var e=0;return function(t,n){var a=this;if(a.defaults={theme:null,format:"mm/dd/yyyy",titleFormat:"MM yyyy",eventHeaderFormat:"MM d, yyyy",firstDayOfWeek:0,language:"en",todayHighlight:!1,sidebarDisplayDefault:!0,sidebarToggler:!0,eventDisplayDefault:!0,eventListToggler:!0,calendarEvents:null},a.options=r.extend({},a.defaults,n),a.initials={default_class:r(t)[0].classList.value,validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,dates:{en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],noEventForToday:"No event for today.. so take a rest! :)",noEventForThisDay:"No event for this day.. so take a rest! :)",previousYearText:"Previous year",nextYearText:"Next year",closeSidebarText:"Close sidebar",closeEventListText:"Close event list"},es:{days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],noEventForToday:"No hay evento para hoy.. ¡así que descanse! :)",noEventForThisDay:"Ningún evento para este día.. ¡así que descanse! :)",previousYearText:"Año anterior",nextYearText:"El próximo año",closeSidebarText:"Cerrar la barra lateral",closeEventListText:"Cerrar la lista de eventos"},de:{days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],noEventForToday:"Keine Veranstaltung für heute.. also ruhen Sie sich aus! :)",noEventForThisDay:"Keine Veranstaltung für diesen Tag.. also ruhen Sie sich aus! :)",previousYearText:"Vorheriges Jahr",nextYearText:"Nächstes Jahr",closeSidebarText:"Schließen Sie die Seitenleiste",closeEventListText:"Schließen Sie die Ereignisliste"},pt:{days:["Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],daysMin:["Do","2a","3a","4a","5a","6a","Sa"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Feb","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],noEventForToday:"Nenhum evento para hoje.. então descanse! :)",noEventForThisDay:"Nenhum evento para este dia.. então descanse! :)",previousYearText:"Ano anterior",nextYearText:"Próximo ano",closeSidebarText:"Feche a barra lateral",closeEventListText:"Feche a lista de eventos"},fr:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Di","Lu","Ma","Me","Je","Ve","Sa"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],noEventForToday:"Rien pour aujourd'hui... Belle journée :)",noEventForThisDay:"Rien pour ce jour-ci... Profite de te réposer :)",previousYearText:"Année précédente",nextYearText:"L'année prochaine",closeSidebarText:"Fermez la barre latérale",closeEventListText:"Fermer la liste des événements"},nl:{days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],daysShort:["Zon","Maan","Din","Woe","Don","Vrij","Zat"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],noEventForToday:"Geen event voor vandaag.. dus rust even uit! :)",noEventForThisDay:"Geen event voor deze dag.. dus rust even uit! :)",previousYearText:"Vorig jaar",nextYearText:"Volgend jaar",closeSidebarText:"Sluit de zijbalk",closeEventListText:"Sluit de event lijst"}}},a.initials.weekends={sun:a.initials.dates[a.options.language].daysShort[0],sat:a.initials.dates[a.options.language].daysShort[6]},a.options.calendarEvents!=null)for(var s=0;s<a.options.calendarEvents.length;s++)a.options.calendarEvents[s].id||console.log('%c Event named: "'+a.options.calendarEvents[s].name+`" doesn't have a unique ID `,"color:white;font-weight:bold;background-color:#e21d1d;"),a.isValidDate(a.options.calendarEvents[s].date)&&(a.options.calendarEvents[s].date=a.formatDate(a.options.calendarEvents[s].date,a.options.format));a.startingDay=null,a.monthLength=null,a.$current={month:isNaN(this.month)||this.month==null?new Date().getMonth():this.month,year:isNaN(this.year)||this.year==null?new Date().getFullYear():this.year,date:a.formatDate(a.initials.dates[a.defaults.language].months[new Date().getMonth()]+" "+new Date().getDate()+" "+new Date().getFullYear(),a.options.format)},a.$active={month:a.$current.month,year:a.$current.year,date:a.$current.date,event_date:a.$current.date,events:[]},a.$label={days:[],months:a.initials.dates[a.defaults.language].months,days_in_month:[31,28,31,30,31,30,31,31,30,31,30,31]},a.$markups={calendarHTML:"",mainHTML:"",sidebarHTML:"",eventHTML:""},a.$elements={calendarEl:r(t),innerEl:null,sidebarEl:null,eventEl:null,sidebarToggler:null,eventListToggler:null,activeDayEl:null,activeMonthEl:null,activeYearEl:null},a.$breakpoints={tablet:768,mobile:425},a.formatDate=r.proxy(a.formatDate,a),a.selectDate=r.proxy(a.selectDate,a),a.selectMonth=r.proxy(a.selectMonth,a),a.selectYear=r.proxy(a.selectYear,a),a.selectEvent=r.proxy(a.selectEvent,a),a.toggleSidebar=r.proxy(a.toggleSidebar,a),a.toggleEventList=r.proxy(a.toggleEventList,a),a.instanceUid=e++,a.init(!0)}}()).prototype.init=function(e){var t=this,n=r(window).width();r(t.$elements.calendarEl).hasClass("calendar-initialized")||(r(t.$elements.calendarEl).addClass("evo-calendar calendar-initialized"),n<=t.$breakpoints.tablet?r(t.$elements.calendarEl).addClass("sidebar-hide event-hide"):(t.options.sidebarDisplayDefault||r(t.$elements.calendarEl).addClass("sidebar-hide"),t.options.eventDisplayDefault||r(t.$elements.calendarEl).addClass("event-hide")),t.options.theme&&t.setTheme(t.options.theme),t.buildTheBones())},l.prototype.destroy=function(){var e=this;e.destroyEventListener(),e.$elements.calendarEl&&(e.$elements.calendarEl.removeClass("calendar-initialized"),e.$elements.calendarEl.removeClass("evo-calendar"),e.$elements.calendarEl.removeClass("sidebar-hide"),e.$elements.calendarEl.removeClass("event-hide")),e.$elements.calendarEl.empty(),e.$elements.calendarEl.attr("class",e.initials.default_class),r(e.$elements.calendarEl).trigger("destroy",[e])},l.prototype.limitTitle=function(e,t){var n=[];if(t=t===void 0?18:t,e.split(" ").join("").length>t){for(var a=e.split(" "),s=0;s<a.length;s++)a[s].length+n.join("").length<=t&&n.push(a[s]);return n.join(" ")+"..."}return e},l.prototype.stringCheck=function(e){return e.replace(/[^\w]/g,"\\$&")},l.prototype.parseFormat=function(e){if(typeof e.toValue=="function"&&typeof e.toDisplay=="function")return e;var t=e.replace(this.initials.validParts,"\0").split("\0"),n=e.match(this.initials.validParts);return t&&t.length&&n&&n.length!==0||console.log("%c Invalid date format ","color:white;font-weight:bold;background-color:#e21d1d;"),{separators:t,parts:n}},l.prototype.formatDate=function(e,t,n){var a=this;if(!e)return"";if(n=n||a.defaults.language,typeof t=="string"&&(t=a.parseFormat(t)),t.toDisplay)return t.toDisplay(e,t,n);var s=new Date(e),o={d:s.getDate(),D:a.initials.dates[n].daysShort[s.getDay()],DD:a.initials.dates[n].days[s.getDay()],m:s.getMonth()+1,M:a.initials.dates[n].monthsShort[s.getMonth()],MM:a.initials.dates[n].months[s.getMonth()],yy:s.getFullYear().toString().substring(2),yyyy:s.getFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var d=r.extend([],t.separators),u=0,h=t.parts.length;u<=h;u++)d.length&&e.push(d.shift()),e.push(o[t.parts[u]]);return e.join("")},l.prototype.getBetweenDates=function(e){for(var t=this,n=[],a=0;a<t.monthLength;a++){var s=t.formatDate(t.$label.months[t.$active.month]+" "+(a+1)+" "+t.$active.year,t.options.format);t.isBetweenDates(s,e)&&n.push(s)}return n},l.prototype.isBetweenDates=function(e,t){var n,a;return t instanceof Array?(n=new Date(t[0]),a=new Date(t[1])):(n=new Date(t),a=new Date(t)),n<=new Date(e)&&a>=new Date(e)},l.prototype.hasSameDayEventType=function(e,t){for(var n=this,a=0,s=0;s<n.options.calendarEvents.length;s++)if(n.options.calendarEvents[s].date instanceof Array)for(var o=n.getBetweenDates(n.options.calendarEvents[s].date),d=0;d<o.length;d++)e===o[d]&&t===n.options.calendarEvents[s].type&&a++;else e===n.options.calendarEvents[s].date&&t===n.options.calendarEvents[s].type&&a++;return a>0},l.prototype.setTheme=function(e){var t=this,n=t.options.theme;t.options.theme=e.toLowerCase().split(" ").join("-"),t.options.theme&&r(t.$elements.calendarEl).removeClass(n),t.options.theme!=="default"&&r(t.$elements.calendarEl).addClass(t.options.theme)},l.prototype.resize=function(){var e=this,t=!e.$elements.calendarEl.hasClass("sidebar-hide"),n=!e.$elements.calendarEl.hasClass("event-hide"),a=r(window).width();a<=e.$breakpoints.tablet&&a>e.$breakpoints.mobile?(t&&e.toggleSidebar(),n&&e.toggleEventList(),r(window).off("click.evocalendar.evo-"+e.instanceUid).on("click.evocalendar.evo-"+e.instanceUid,r.proxy(e.toggleOutside,e))):(a<=e.$breakpoints.mobile&&(t&&e.toggleSidebar(!1),n&&e.toggleEventList(!1)),r(window).off("click.evocalendar.evo-"+e.instanceUid))},l.prototype.initEventListener=function(){var e=this;r(window).off("resize.evocalendar.evo-"+e.instanceUid).on("resize.evocalendar.evo-"+e.instanceUid,r.proxy(e.resize,e)),e.options.sidebarToggler&&e.$elements.sidebarToggler.off("click.evocalendar").on("click.evocalendar",e.toggleSidebar),e.options.eventListToggler&&e.$elements.eventListToggler.off("click.evocalendar").on("click.evocalendar",e.toggleEventList),e.$elements.sidebarEl.find("[data-month-val]").off("click.evocalendar").on("click.evocalendar",e.selectMonth),e.$elements.sidebarEl.find("[data-year-val]").off("click.evocalendar").on("click.evocalendar",e.selectYear),e.$elements.eventEl.find("[data-event-index]").off("click.evocalendar").on("click.evocalendar",e.selectEvent)},l.prototype.destroyEventListener=function(){var e=this;r(window).off("resize.evocalendar.evo-"+e.instanceUid),r(window).off("click.evocalendar.evo-"+e.instanceUid),e.options.sidebarToggler&&e.$elements.sidebarToggler.off("click.evocalendar"),e.options.eventListToggler&&e.$elements.eventListToggler.off("click.evocalendar"),e.$elements.innerEl.find(".calendar-day").children().off("click.evocalendar"),e.$elements.sidebarEl.find("[data-month-val]").off("click.evocalendar"),e.$elements.sidebarEl.find("[data-year-val]").off("click.evocalendar"),e.$elements.eventEl.find("[data-event-index]").off("click.evocalendar")},l.prototype.calculateDays=function(){var e,t,n,a=this;for(a.monthLength=a.$label.days_in_month[a.$active.month],a.$active.month==1&&(a.$active.year%4==0&&a.$active.year%100!=0||a.$active.year%400==0)&&(a.monthLength=29),e=a.initials.dates[a.options.language].daysShort,t=a.options.firstDayOfWeek;a.$label.days.length<e.length;)t==e.length&&(t=0),a.$label.days.push(e[t]),t++;n=new Date(a.$active.year,a.$active.month).getDay()-t,a.startingDay=n<0?a.$label.days.length+n:n},l.prototype.buildTheBones=function(){var e=this;if(e.calculateDays(),!e.$elements.calendarEl.html()){var t;t='<div class="calendar-sidebar"><div class="calendar-year"><button class="icon-button" role="button" data-year-val="prev" title="'+e.initials.dates[e.options.language].previousYearText+'"><span class="chevron-arrow-left"></span></button>&nbsp;<p></p>&nbsp;<button class="icon-button" role="button" data-year-val="next" title="'+e.initials.dates[e.options.language].nextYearText+'"><span class="chevron-arrow-right"></span></button></div><div class="month-list"><ul class="calendar-months">';for(var n=0;n<e.$label.months.length;n++)t+='<li class="month" role="button" data-month-val="'+n+'">'+e.initials.dates[e.options.language].months[n]+"</li>";for(t+="</ul>",t+="</div></div>",t+='<div class="calendar-inner"><table class="calendar-table"><tr><th colspan="7"></th></tr><tr class="calendar-header">',n=0;n<e.$label.days.length;n++){var a="calendar-header-day";e.$label.days[n]!==e.initials.weekends.sat&&e.$label.days[n]!==e.initials.weekends.sun||(a+=" --weekend"),t+='<td class="'+a+'">'+e.$label.days[n]+"</td>"}t+="</tr></table></div>",t+='<div class="calendar-events"><div class="event-header"><p></p></div><div class="event-list"></div></div>',e.$elements.calendarEl.html(t),e.$elements.sidebarEl||(e.$elements.sidebarEl=r(e.$elements.calendarEl).find(".calendar-sidebar")),e.$elements.innerEl||(e.$elements.innerEl=r(e.$elements.calendarEl).find(".calendar-inner")),e.$elements.eventEl||(e.$elements.eventEl=r(e.$elements.calendarEl).find(".calendar-events")),e.options.sidebarToggler&&(r(e.$elements.sidebarEl).append('<span id="sidebarToggler" role="button" aria-pressed title="'+e.initials.dates[e.options.language].closeSidebarText+'"><button class="icon-button"><span class="bars"></span></button></span>'),e.$elements.sidebarToggler||(e.$elements.sidebarToggler=r(e.$elements.sidebarEl).find("span#sidebarToggler"))),e.options.eventListToggler&&(r(e.$elements.calendarEl).append('<span id="eventListToggler" role="button" aria-pressed title="'+e.initials.dates[e.options.language].closeEventListText+'"><button class="icon-button"><span class="chevron-arrow-right"></span></button></span>'),e.$elements.eventListToggler||(e.$elements.eventListToggler=r(e.$elements.calendarEl).find("span#eventListToggler")))}e.buildSidebarYear(),e.buildSidebarMonths(),e.buildCalendar(),e.buildEventList(),e.initEventListener(),e.resize()},l.prototype.buildEventList=function(){var e,t=this,n=!1;t.$active.events=[];var a=t.formatDate(t.$active.date,t.options.eventHeaderFormat,t.options.language);t.$elements.eventEl.find(".event-header > p").text(a);var s=t.$elements.eventEl.find(".event-list");if(s.children().length>0&&s.empty(),t.options.calendarEvents)for(var o=0;o<t.options.calendarEvents.length;o++)(t.isBetweenDates(t.$active.date,t.options.calendarEvents[o].date)||t.options.calendarEvents[o].everyYear&&new Date(t.$active.date).getMonth()+1+" "+new Date(t.$active.date).getDate()==new Date(t.options.calendarEvents[o].date).getMonth()+1+" "+new Date(t.options.calendarEvents[o].date).getDate())&&d(t.options.calendarEvents[o]);function d(u){n=!0,t.addEventList(u)}n||(e='<div class="event-empty">',t.$active.date===t.$current.date?e+="<p>"+t.initials.dates[t.options.language].noEventForToday+"</p>":e+="<p>"+t.initials.dates[t.options.language].noEventForThisDay+"</p>",e+="</div>"),s.append(e)},l.prototype.addEventList=function(e){var t,n=this,a=n.$elements.eventEl.find(".event-list");a.find("[data-event-index]").length===0&&a.empty(),n.$active.events.push(e),t='<div class="event-container" role="button" data-event-index="'+e.id+'">',t+='<div class="event-icon"><div class="event-bullet-'+e.type+'"',e.color&&(t+='style="background-color:'+e.color+'"'),t+='></div></div><div class="event-info"><p class="event-title">'+n.limitTitle(e.name),e.badge&&(t+="<span>"+e.badge+"</span>"),t+="</p>",e.description&&(t+='<p class="event-desc">'+e.description+"</p>"),t+="</div>",t+="</div>",a.append(t),n.$elements.eventEl.find('[data-event-index="'+e.id+'"]').off("click.evocalendar").on("click.evocalendar",n.selectEvent)},l.prototype.removeEventList=function(e){var t,n=this,a=n.$elements.eventEl.find(".event-list");a.find('[data-event-index="'+e+'"]').length!==0&&(a.find('[data-event-index="'+e+'"]').remove(),a.find("[data-event-index]").length===0&&(a.empty(),n.$active.date===n.$current.date?t+="<p>"+n.initials.dates[n.options.language].noEventForToday+"</p>":t+="<p>"+n.initials.dates[n.options.language].noEventForThisDay+"</p>",a.append(t)))},l.prototype.buildSidebarYear=function(){this.$elements.sidebarEl.find(".calendar-year > p").text(this.$active.year)},l.prototype.buildSidebarMonths=function(){var e=this;e.$elements.sidebarEl.find(".calendar-months > [data-month-val]").removeClass("active-month"),e.$elements.sidebarEl.find('.calendar-months > [data-month-val="'+e.$active.month+'"]').addClass("active-month")},l.prototype.buildCalendar=function(){var e,t,n=this;n.calculateDays(),t=n.formatDate(new Date(n.$label.months[n.$active.month]+" 1 "+n.$active.year),n.options.titleFormat,n.options.language),n.$elements.innerEl.find(".calendar-table th").text(t),n.$elements.innerEl.find(".calendar-body").remove(),e+='<tr class="calendar-body">';for(var a=1,s=0;s<9;s++){for(var o=0;o<n.$label.days.length;o++){if(a<=n.monthLength&&(s>0||o>=n.startingDay)){var d="calendar-day";n.$label.days[o]!==n.initials.weekends.sat&&n.$label.days[o]!==n.initials.weekends.sun||(d+=" --weekend"),e+='<td class="'+d+'">',e+='<div class="day" role="button" data-date-val="'+n.formatDate(n.$label.months[n.$active.month]+" "+a+" "+n.$active.year,n.options.format)+'">'+a+"</div>",a++}else e+="<td>";e+="</td>"}if(a>n.monthLength)break;e+='</tr><tr class="calendar-body">'}e+="</tr>",n.$elements.innerEl.find(".calendar-table").append(e),n.options.todayHighlight&&n.$elements.innerEl.find("[data-date-val='"+n.$current.date+"']").addClass("calendar-today"),n.$elements.innerEl.find(".calendar-day").children().off("click.evocalendar").on("click.evocalendar",n.selectDate);var u=n.$elements.innerEl.find("[data-date-val='"+n.$active.date+"']");u&&(n.$elements.innerEl.children().removeClass("calendar-active"),u.addClass("calendar-active")),n.options.calendarEvents!=null&&n.buildEventIndicator()},l.prototype.addEventIndicator=function(e){var t,n,a=this,s=e.date,o=a.stringCheck(e.type);if(s instanceof Array){if(e.everyYear)for(var d=0;d<s.length;d++)s[d]=a.formatDate(new Date(s[d]).setFullYear(a.$active.year),a.options.format);for(var u=a.getBetweenDates(s),h=0;h<u.length;h++)f(u[h])}else e.everyYear&&(s=a.formatDate(new Date(s).setFullYear(a.$active.year),a.options.format)),f(s);function f(m){(n=a.$elements.innerEl.find('[data-date-val="'+m+'"]')).find("span.event-indicator").length===0&&n.append('<span class="event-indicator"></span>'),n.find("span.event-indicator > .type-bullet > .type-"+o).length===0&&(t='<div class="type-bullet"><div ',t+='class="type-'+e.type+'"',e.color&&(t+='style="background-color:'+e.color+'"'),t+="></div></div>",n.find(".event-indicator").append(t))}},l.prototype.removeEventIndicator=function(e){var t=this,n=e.date,a=t.stringCheck(e.type);if(n instanceof Array)for(var s=t.getBetweenDates(n),o=0;o<s.length;o++)d(s[o]);else d(n);function d(u){t.$elements.innerEl.find('[data-date-val="'+u+'"] span.event-indicator').length!==0&&(t.hasSameDayEventType(u,a)||t.$elements.innerEl.find('[data-date-val="'+u+'"] span.event-indicator > .type-bullet > .type-'+a).parent().remove())}},l.prototype.buildEventIndicator=function(){var e=this;e.$elements.innerEl.find(".calendar-day > day > .event-indicator").empty();for(var t=0;t<e.options.calendarEvents.length;t++)e.addEventIndicator(e.options.calendarEvents[t])},l.prototype.selectEvent=function(e){var t=this,n=r(e.target).closest(".event-container"),a=r(n).data("eventIndex").toString(),s=t.options.calendarEvents.map(function(d){return d.id.toString()}).indexOf(a),o=t.options.calendarEvents[s];o.date instanceof Array&&(o.dates_range=t.getBetweenDates(o.date)),r(t.$elements.calendarEl).trigger("selectEvent",[t.options.calendarEvents[s]])},l.prototype.selectYear=function(e){var t,n,a=this,s=r(window).width(),o=!a.$elements.calendarEl.hasClass("sidebar-hide");typeof e=="string"||typeof e=="number"?parseInt(e).toString().length===4&&(n=parseInt(e)):(t=r(e.target).closest("[data-year-val]"),n=r(t).data("yearVal")),n=="prev"?--a.$active.year:n=="next"?++a.$active.year:typeof n=="number"&&(a.$active.year=n),s<=a.$breakpoints.mobile&&o&&a.toggleSidebar(!1),r(a.$elements.calendarEl).trigger("selectYear",[a.$active.year]),a.buildSidebarYear(),a.buildCalendar()},l.prototype.selectMonth=function(e){var t=this,n=r(window).width(),a=!t.$elements.calendarEl.hasClass("sidebar-hide");typeof e=="string"||typeof e=="number"?e>=0&&e<=t.$label.months.length&&(t.$active.month=e.toString()):t.$active.month=r(e.currentTarget).data("monthVal"),n<=t.$breakpoints.tablet&&a&&t.toggleSidebar(!1),t.buildSidebarMonths(),t.buildCalendar(),r(t.$elements.calendarEl).trigger("selectMonth",[t.initials.dates[t.options.language].months[t.$active.month],t.$active.month])},l.prototype.selectDate=function(e){var t,n,a,s,o,d=this,u=d.$active.date;typeof e=="string"||typeof e=="number"||e instanceof Date?(t=d.formatDate(new Date(e),d.options.format),n=new Date(t).getFullYear(),a=new Date(t).getMonth(),d.$active.year!==n&&d.selectYear(n),d.$active.month!==a&&d.selectMonth(a),s=d.$elements.innerEl.find("[data-date-val='"+t+"']")):t=(s=r(e.currentTarget)).data("dateVal"),o=d.$active.date===t,d.$active.date=t,d.$active.event_date=t,d.$elements.innerEl.find("[data-date-val]").removeClass("calendar-active"),s.addClass("calendar-active"),o||d.buildEventList(),r(d.$elements.calendarEl).trigger("selectDate",[d.$active.date,u])},l.prototype.getActiveDate=function(){return this.$active.date},l.prototype.getActiveEvents=function(){return this.$active.events},l.prototype.toggleOutside=function(e){var t,n,a,s=this;t=!s.$elements.calendarEl.hasClass("sidebar-hide"),n=!s.$elements.calendarEl.hasClass("event-hide"),a=e.target===s.$elements.innerEl[0],t&&a&&s.toggleSidebar(!1),n&&a&&s.toggleEventList(!1)},l.prototype.toggleSidebar=function(e){var t,n,a,s=this;a=r(window).width(),e===void 0||e.originalEvent?r(s.$elements.calendarEl).toggleClass("sidebar-hide"):e?r(s.$elements.calendarEl).removeClass("sidebar-hide"):r(s.$elements.calendarEl).addClass("sidebar-hide"),a<=s.$breakpoints.tablet&&a>s.$breakpoints.mobile&&(t=!s.$elements.calendarEl.hasClass("sidebar-hide"),n=!s.$elements.calendarEl.hasClass("event-hide"),t&&n&&s.toggleEventList())},l.prototype.toggleEventList=function(e){var t,n,a,s=this;a=r(window).width(),e===void 0||e.originalEvent?r(s.$elements.calendarEl).toggleClass("event-hide"):e?r(s.$elements.calendarEl).removeClass("event-hide"):r(s.$elements.calendarEl).addClass("event-hide"),a<=s.$breakpoints.tablet&&a>s.$breakpoints.mobile&&(n=!s.$elements.calendarEl.hasClass("event-hide"),t=!s.$elements.calendarEl.hasClass("sidebar-hide"),n&&t&&s.toggleSidebar())},l.prototype.addCalendarEvent=function(e){var t=this;function n(s){if(s.id||console.log('%c Event named: "'+s.name+`" doesn't have a unique ID `,"color:white;font-weight:bold;background-color:#e21d1d;"),s.date instanceof Array)for(var o=0;o<s.date.length;o++)d(s.date[o])&&(s.date[o]=t.formatDate(new Date(s.date[o]),t.options.format));else d(s.date)&&(s.date=t.formatDate(new Date(s.date),t.options.format));function d(u){return!!t.isValidDate(u)||(console.log('%c Event named: "'+s.name+'" has invalid date ',"color:white;font-weight:bold;background-color:#e21d1d;"),!1)}t.options.calendarEvents||(t.options.calendarEvents=[]),t.options.calendarEvents.push(s),t.addEventIndicator(s),t.$active.event_date===s.date&&t.addEventList(s)}if(e instanceof Array)for(var a=0;a<e.length;a++)n(e[a]);else typeof e=="object"&&n(e)},l.prototype.removeCalendarEvent=function(e){var t=this;function n(s){var o=t.options.calendarEvents.map(function(u){return u.id}).indexOf(s);if(o>=0){var d=t.options.calendarEvents[o];t.options.calendarEvents.splice(o,1),t.removeEventList(s),t.removeEventIndicator(d)}else console.log("%c "+s+": ID not found ","color:white;font-weight:bold;background-color:#e21d1d;")}if(e instanceof Array)for(var a=0;a<e.length;a++)n(e[a]);else n(e)},l.prototype.isValidDate=function(e){return new Date(e)&&!isNaN(new Date(e).getTime())},r.fn.evoCalendar=function(){var e,t,n=this,a=arguments[0],s=Array.prototype.slice.call(arguments,1),o=n.length;for(e=0;e<o;e++)if(typeof a=="object"||a===void 0?n[e].evoCalendar=new l(n[e],a):t=n[e].evoCalendar[a].apply(n[e].evoCalendar,s),t!==void 0)return t;return n}})}(E)),E.exports}H();function W({setShowContacts:v}){const{language:c}=y();return i.jsx("div",{className:"absolute top-[70px] right-10",children:i.jsx("button",{onClick:()=>v(r=>!r),className:"text-[var(--primaria)] lg:tooltip lg:tooltip-left","data-tip":c.voltar,children:i.jsx(A,{size:30})})})}function q({setShowContacts:v}){const{language:c}=y();return i.jsx("div",{className:"absolute top-[70px] right-10",children:i.jsx("button",{onClick:()=>v(r=>!r),className:"text-[var(--primaria)] lg:tooltip lg:tooltip-left","data-tip":c.selecionarContato,children:i.jsx(J,{size:30})})})}function R({type:v,handleFilterByType:c}){return i.jsxs("div",{className:"!flex !items-center !align-middle",children:[i.jsx("span",{onClick:r=>c(r),id:"notificacao",className:`w-7 h-7 mr-1.5 rounded-full
          text-[var(--panel-header-icon)]
          cursor-pointer pulse
          flex justify-center items-center
          ${v==="notificacao"?"bg-[var(--terciaria)]":""}
          `,children:i.jsx(D,{})}),i.jsx("span",{onClick:r=>c(r),id:"agendamento",className:`w-7 h-7 rounded-full
          text-[var(--panel-header-icon)]
          cursor-pointer pulse
          flex justify-center items-center
          ${v==="agendamento"?"bg-[var(--terciaria)]":""}
          `,children:i.jsx(T,{})})]})}function b({data:v,setData:c,hasTypeFilter:r=!1}){const{language:l}=y(),[e,t]=p.useState(""),[n,a]=p.useState(""),s=({target:h})=>{const{id:f}=h;a(m=>m===""||m!==f?(d(f),f):(d(""),""))},o=r?"title":"name",d=(h="")=>{const f=v.filter(m=>m.event.includes(h)).filter(m=>m[o].toLowerCase().includes(e.toLowerCase()));c(()=>f)},u=()=>{const h=v.filter(f=>f[o].toLowerCase().includes(e.toLowerCase()));c(()=>h)};return p.useEffect(()=>{r?d(n):u()},[e,n]),i.jsxs("div",{className:"flex justify-center gap-2 pt-2",children:[i.jsxs("div",{className:"bg-[var(--search-input-background)] flex items-center px-2 w-full rounded-lg",children:[i.jsx("span",{className:"pr-2",children:i.jsx(Y,{className:"w-4 h-4 text-[var(--panel-header-icon)]"})}),i.jsx("span",{className:"w-full",children:i.jsx("input",{type:"text",placeholder:l.search,className:"bg-[var(--search-input-background)] text-sm placeholder:!text-sm w-full p-1.5",value:e,onChange:h=>t(()=>h.target.value)})}),e.length!==0&&i.jsx("span",{className:"pulse cursor-pointer pl-1",onClick:()=>t(()=>""),children:i.jsx(z,{className:"w-5 h-5 text-[var(--panel-header-icon)]"})})]}),r&&i.jsx(R,{type:n,handleFilterByType:s})]})}function Z({notificacao:v}){const[c,r]=p.useState(""),{close:l}=L(),{notifications:e,setNotifications:t}=$(),n=async()=>{const s=await g.Contact("getProfilePictureUrl",v.userId);r(s)},a=s=>{const o=[...e];o.forEach(d=>d.id===s?d.read=!0:null),t(o),l(),g.Chat("openChatBottom",v.userId)};return p.useEffect(()=>{n()},[]),i.jsx("div",{className:"card w-[95%] bg-slate-100 text-gray-600 hover:shadow-sm mt-1.5 cursor-pointer",onClick:()=>a(v.id),children:i.jsxs("div",{className:"card-body !p-1 flex flex-col justify-center box-border mx-2",children:[i.jsxs("div",{className:"flex justify-between align-middle items-center",children:[i.jsxs("div",{className:"flex gap-1 items-center",children:[i.jsx("figure",{children:c&&c!=="undefined"?i.jsx("img",{src:c,alt:"avatar",className:"w-8 rounded-full"}):i.jsx("span",{className:"w-10 h-10",children:v.userId.length>15?i.jsx(w,{}):i.jsx(j,{})})}),i.jsx("span",{className:"truncate font-semibold text-sm ml-1 w-48",children:v.title})]}),i.jsx("span",{className:v.timeOut&&!v.read&&"text-[var(--primaria)]",children:i.jsx(D,{})})]}),i.jsx("div",{className:"flex items-center self-end",children:i.jsxs("div",{className:"flex items-center align-middle",children:[i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"rgb(79, 105, 149)",d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm1 12v-6h-2v8h7v-2h-5z"})}),i.jsx("span",{className:"font-mono text-xs center ml-1.5",children:v.time})]})})]})},v.id)}const G=(v,c,r,l,e)=>i.jsx("div",{className:"card w-[95%] bg-slate-100 text-gray-600 hover:shadow-sm mt-1.5 cursor-pointer",onClick:v,children:i.jsxs("div",{className:"card-body !p-1 flex flex-col justify-center box-border mx-2",children:[i.jsxs("div",{className:"flex justify-between align-middle items-center",children:[i.jsxs("div",{className:"flex gap-1 items-center",children:[i.jsx("figure",{children:r&&r!=="undefined"?i.jsx("img",{src:r,alt:"avatar",className:"w-8 rounded-full"}):i.jsx("span",{className:"w-10 h-10",children:l.userId.length>15?i.jsx(w,{}):i.jsx(j,{})})}),i.jsx("span",{className:"font-semibold text-sm ml-1 truncate w-48",children:c})]}),i.jsx("span",{className:"italic text-sm",children:l.recurrency})]}),i.jsxs("div",{className:"flex items-center align-middle justify-between space-x-2",children:[i.jsxs("div",{className:"flex items-center align-middle",children:[i.jsx("span",{children:i.jsx(B,{type:l.type})}),i.jsx("span",{className:"card-title flex-auto truncate text-sm ml-2 w-48",children:l.title})]}),i.jsxs("div",{className:"flex items-center align-middle space-x-2",children:[i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"rgb(79, 105, 149)",d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm1 12v-6h-2v8h7v-2h-5z"})}),i.jsx("span",{className:"font-mono text-xs center",children:l.time})]})]})]})},e);function Q({agendamento:v,key:c}){const{open:r}=N(),[l,e]=p.useState({name:"",picture:""});p.useEffect(()=>{async function s(o){const d=await g.Contact("getProfilePictureUrl",o),{name:u}=await g.Utils("getContato",o);e(h=>({...h,name:u,picture:d}))}s(v.userId)},[v]);const{name:t,picture:n}=l;return G(()=>{r(i.jsx(F,{userId:v.userId,name:t}))},t,n,v,c)}function K({events:v}){return i.jsx("div",{className:"overflow-auto mt-1 pb-1.5",style:{height:"calc(100vh - 325px)"},children:v.map((c,r)=>c.event==="agendamento"?i.jsx(Q,{agendamento:c},r):i.jsx(Z,{notificacao:c}))})}const X=v=>v.map(c=>({date:c.data,time:c.hora,type:c.tipo,userId:c.userID,title:c.titulo,recurrency:c.recorrencia,event:"agendamento"})),ee=v=>v.map(c=>({time:c.time,userId:c.user_id,title:c.title,event:"notificacao",read:c.read,timeOut:c.timeOut,id:c.id})),te=(v,c)=>v.sort((r,l)=>c.setHours(Number(r.time.substring(0,2)),Number(r.time.substring(2,2)))-c.setHours(Number(l.time.substring(0,2)),Number(l.time.substring(2,2))));function ae(v){const[c,r]=v,l=X(c),e=ee(r),t=[...l,...e];return te(t,new Date)}function ne({date:v}){const{language:c}=y(),{agendamentos:r}=k(),{notifications:l}=$(),[e,t]=p.useState([]),[n,a]=p.useState([]);return p.useEffect(()=>{const s=r.filter(u=>u.data.replace(/-/g,"/")===v),o=l.filter(u=>u.date.replace(/-/g,"/")===v),d=ae([s,o]);t(()=>d),a(()=>d)},[v]),e.length&&n.length?i.jsxs(i.Fragment,{children:[i.jsx(b,{data:e,setData:a,hasTypeFilter:!0}),i.jsx(K,{events:n})]}):i.jsxs(i.Fragment,{children:[i.jsx(b,{data:e,setData:a,hasTypeFilter:!0}),i.jsx("p",{className:"mt-2 text-sm italic",children:c.noneEvent})]})}function se({contact:v}){const{open:c}=N(),{id:r,name:l}=v,e=o=>{g.Chat("openChatBottom",o),setTimeout(()=>c(i.jsx(_,{userID:o})),200)},t=i.jsx("span",{className:"w-8",children:r.length>17?i.jsx(w,{}):i.jsx(j,{})}),[n,a]=p.useState(t),s=async()=>{const o=await g.Contact("getProfilePictureUrl",r);a(o!=="undefined"?i.jsx("img",{src:o,alt:"avatar",className:"w-8 rounded-full"}):t)};return p.useEffect(()=>{s()},[r]),i.jsx("div",{className:"card w-full !h-10 bg-slate-100 !shadow-sm text-gray-600 hover:shadow-sm",children:i.jsx("div",{className:"card-body !p-1 flex flex-col justify-center box-border mx-2",children:i.jsxs("div",{className:"flex justify-between align-middle items-center",children:[i.jsxs("div",{className:"flex gap-1 items-center",children:[i.jsx("figure",{children:n}),i.jsx("span",{className:"truncate max-w-32 font-semibold text-sm ml-1",children:l})]}),i.jsxs("div",{className:"flex items-center justify-evenly",children:[i.jsx("span",{onClick:()=>e(r),className:"mr-1 cursor-pointer",children:i.jsx(D,{size:20})}),i.jsx("span",{onClick:()=>c(i.jsx(F,{userId:r})),className:"cursor-pointer",children:i.jsx(T,{size:20})})]})]})})},r)}function re(){const[v,c]=p.useState([]),[r,l]=p.useState([]),{language:e}=y(),t=a=>({index:s,style:o})=>{const d=a[s],u={...o,top:o.top,left:o.left};return i.jsx("div",{style:u,children:i.jsx(se,{contact:d})})},n=async()=>{const a=await g.Chat("List");c(a),l(a)};return p.useEffect(()=>{n()},[]),v.length&&r.length?i.jsxs("div",{className:"w-full h-full",children:[i.jsx(b,{data:v,setData:l}),i.jsx("div",{id:"virtualized-container",style:{height:"calc(100vh - 190px)",marginTop:"10px"},children:i.jsx(I,{children:({height:a,width:s})=>i.jsx(P,{height:a,width:s,rowCount:r.length,rowHeight:44,rowRenderer:t(r)})})})]}):i.jsxs("div",{children:[i.jsx(b,{data:v,setData:l}),i.jsx("p",{className:"mt-2 italic",children:e.noneContact})]})}function ie({activeDate:v}){const[c,r]=p.useState(!1);return i.jsxs("div",{id:"eventsList",children:[c?i.jsx(re,{}):i.jsx(ne,{date:v}),c?i.jsx(W,{setShowContacts:r}):i.jsx(q,{setShowContacts:r})]})}const x=document.createElement("section");x.setAttribute("data-id","eventsContainer");x.setAttribute("id","eventsContainer");function Me(){const{agendamentos:v}=k(),{notifications:c}=$(),{idioma:r,language:l}=y(),{close:e}=L(),[t,n]=p.useState(new Date().toLocaleDateString("en-CA").replace(/-/g,"/")),a=document.createElement("span");a.setAttribute("id","close-calendar");const s=document.createElement("button");s.setAttribute("class","icon-button");const o=document.createElement("span");o.setAttribute("id","button-wrapper"),o.setAttribute("class",`hover:!text-[var(--letra)] pulse
  btn-outline btn-error btn-sm !border-[hsl(var(--er) / var(--tw-border-opacity))]
  whitespace-nowrap border border-solid`),o.title=l.closeSchedulingCentral,o.innerText=l.close,s.appendChild(o),a.appendChild(s),a.addEventListener("click",e);const d=getComputedStyle(document.documentElement).getPropertyValue("--secundaria"),u=v.map(m=>({id:m.id,name:m.titulo,description:m.mensagem,date:m.data.replace(/-/g,"/"),type:"event",color:d})),h=c.map(m=>({id:m.id,name:m.title,date:m.date.replace(/-/g,"/"),type:"event",color:d})),f=p.useRef(null);return p.useEffect(()=>{var S,C;const m=O(f.current).evoCalendar({language:r,todayHighlight:!0,calendarEvents:[...u,...h],format:"yyyy/mm/dd"});return f.current=m,m.on("selectDate",function(){n(m.evoCalendar("getActiveDate"))}),(S=document.querySelector(".event-list"))==null||S.remove(),document.querySelector(".evo-calendar").appendChild(a),(C=document.querySelector(".calendar-events"))==null||C.appendChild(x),()=>{m.evoCalendar("destroy")}},[]),i.jsxs("div",{className:"view h-[82vh] w-[82vw]",children:[i.jsx("div",{className:"evo-calendar shadow-md h-full w-full",ref:f}),V.createPortal(i.jsx(ie,{activeDate:t}),x)]})}export{Me as default};
