(function(n,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("vue")):typeof define=="function"&&define.amd?define(["vue"],c):(n=typeof globalThis<"u"?globalThis:n||self,n.VuelCalendar=c(n.Vue))})(this,function(n){"use strict";var Ee=Object.defineProperty;var ve=(n,c,y)=>c in n?Ee(n,c,{enumerable:!0,configurable:!0,writable:!0,value:y}):n[c]=y;var a=(n,c,y)=>(ve(n,typeof c!="symbol"?c+"":c,y),y);class c{addDays(t,r){return new Date(new Date(new Date(t)).setDate(t.getDate()+r))}timeDifference(t,r){const[i,o]=this.convertToSameDate(t,r);return i.getTime()-o.getTime()}timeZero(t){return new Date(new Date(t).setHours(0,0,0))}isBiggerDate(t,r){return this.timeZero(t)>this.timeZero(r)}isLowerDate(t,r){return this.timeZero(t)o}daysDifference(t,r){const i=this.timeZero(t),o=this.timeZero(r);return Math.round((i.getTime()-o.getTime())/(1e3*3600*24))}daysDifferenceCeil(t,r){const i=this.timeZero(t),o=this.timeZero(r);return Math.ceil((i.getTime()-o.getTime())/(1e3*3600*24))}convertToSameDate(t,r){return[new Date(t),new Date(new Date(new Date(new Date(r).setFullYear(t.getFullYear())).setDate(t.getDate())).setMonth(t.getMonth()))]}isSameDate(t,r){return t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}toTimeString(t){const r=t.getHours(),i=t.getMinutes(),o=r<10?"0"+r:""+r,s=i<10?"0"+i:""+i;return o+":"+s}copyTime(t,r){let i=new Date(t),o=new Date(r);return o=new Date(o.setHours(i.getHours())),o=new Date(o.setMinutes(i.getMinutes())),o=new Date(o.setSeconds(i.getSeconds())),o}addHrMinSec(t,r,i,o){let s=new Date(t);return s=new Date(s.setHours(s.getHours()+r)),s=new Date(s.setMinutes(s.getMinutes()+i)),s=new Date(s.setSeconds(s.getSeconds()+o)),s}setTimeToDateWithTimeString(t,r){const i=new Date(t),[o,s]=r.split(":").map(Number);return new Date(i.setHours(o,s))}}class y{constructor(){a(this,"daysEnumerable",["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);a(this,"daysEnumerableFromMonday",["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);a(this,"monthsEnumerable",["January","February","March","April","May","June","July","August","September","October","November","December"]);a(this,"dateUltra",new c);a(this,"hours",Array.from({length:24},(t,r)=>`${r.toString().padStart(2,"0")}`))}getTimeFromDate(t){const r=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${r}:${i}`}convertPercentageToTime(t,r=0,i=0){const o=t*(i-r)*60/100,s=Math.floor(o/60)+r,l=Math.floor(o%60);return`${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}`}convertTimeToPercentage(t,r=0,i=24,o,s,l){const d=this.dateUltra.addDays(s,l-1);let[h,m]=t.split(":").map(Number);this.dateUltra.isSameDate(d,o)||([h,m]="00:00".split(":").map(Number));const f=Math.max((h-r)*60+m,0),u=i-r;return f/(u*60)*100}convertTimeDistanceToPercentage(t,r,i=0,o=24,s,l){const d=this.dateUltra.addDays(s,l-1),h=i*3600*1e3,f=o*3600*1e3-h,u=t.getHours()*3600*1e3,g=t.getMinutes()*60*1e3,D=t.getSeconds()*1e3,E=u+g+D,C=r.getHours()*3600*1e3,p=r.getMinutes()*60*1e3,be=r.getSeconds()*1e3,z=C+p+be;if(!this.dateUltra.isSameDate(d,r)&&!this.dateUltra.isSameDate(d,t))return 100;let v=r.getTime()-t.getTime();if(h>E&&this.dateUltra.isSameDate(d,t)&&(v-=h-E),h>z&&this.dateUltra.isSameDate(d,r)&&(v=0),this.dateUltra.isSameDate(d,r)&&!this.dateUltra.isSameDate(d,t)){let w=new Date(new Date().setHours(24+i,0,0));v=new Date(new Date(new Date(new Date(r).setDate(w.getDate())).setMonth(w.getMonth())).setFullYear(w.getFullYear())).getTime()-w.getTime(),h>z&&(v=0)}return v/f*100}getHours(t=0,r=24){return this.hours.slice(t,r)}isCurrentDay(t,r){const i=new Date,o=this.pairDateToContainer(t,r);return o.getDate()===i.getDate()&&o.getMonth()===i.getMonth()&&o.getFullYear()===i.getFullYear()}pairDateToContainer(t,r,i){const o=new Date(t);switch(o.setDate(o.getDate()+r-1),i){case"toLocaleDateString":return o.toLocaleDateString();case"getDay":return o.getDay();case"getDayEnumerable":return this.daysEnumerable[o.getDay()];default:return o}}firstDayOfMonthByDate(t){return new Date(t.getFullYear(),t.getMonth(),1)}getDayFromFirstDayByAdd(t,r){const i=this.findFirstMonday(t),o=new Date(i);return o.setDate(i.getDate()+r),o}countEventsForDay(t,r,i){const o=new Date(this.getDayFromFirstDayByAdd(t,r));return o.setHours(0,0,0,0),i.reduce((s,l)=>{const d=new Date(l.start);d.setHours(0,0,0,0);const h=new Date(l.end);return h.setHours(0,0,0,0),d.getTime()===o.getTime()||h.getTime()===o.getTime()?s+1:s},0)}addToDate(t,r){const i=new Date(t);return i.setDate(t.getDate()+r),i}getDaysDifference(t,r){if(t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()||r0&&l.push(h)}return l}}class k{constructor(t=!1){a(this,"throwErr",!1);a(this,"bodyEventUndefined",t=>`/* ------------------- */ !+VuelCalendar WARNING+! EVENT: ${t} has not been defined !!! /* --------------------* `);a(this,"bodyCustomWarn",(t,r,i,o)=>`/* ------------------- */ !+VuelCalendar WARNING+! ${t.toUpperCase()}: ${r} ${i}! ${o?o+`! `:""}/* --------------------* `);this.throwErr=t}undefinedEvent(t){return()=>{console.warn(this.bodyEventUndefined(t))}}customWarn(t,r,i,o){if(console.warn(this.bodyCustomWarn(t,r,i,o)),this.throwErr)throw new Error(t)}}class R{constructor(t,r,i,o,s,l,d,h,m,f,u,g,D,E,C){a(this,"logger",new k);a(this,"onVuelCalendarApiReady",this.logger.undefinedEvent("onVuelCalendarApiReady"));a(this,"onEventClicked",this.logger.undefinedEvent("onEventClicked"));a(this,"onDayClicked",this.logger.undefinedEvent("onDayClicked"));a(this,"onDayDblClicked",this.logger.undefinedEvent("onDayDblClicked"));a(this,"onEventDropped",this.logger.undefinedEvent("onEventDropped"));a(this,"onEventStartResized",this.logger.undefinedEvent("onEventStartResized"));a(this,"onEventEndResized",this.logger.undefinedEvent("onEventEndResized"));a(this,"api");a(this,"setNewStartDate");a(this,"setEvents");a(this,"addEvents");a(this,"setViewMode");a(this,"removeEventsByParam");a(this,"configureEventsByParam");a(this,"onVuelCalendarReadyResolve");a(this,"setStartHour");a(this,"setEndHour");a(this,"setDaysForward");a(this,"setDateRange");a(this,"setTimeRange");a(this,"setRenderer");a(this,"setTresHold");a(this,"setEventTemplate");a(this,"startDate",new Date);a(this,"endDate",new Date);a(this,"daysForward",7);a(this,"events",[]);a(this,"theme","dark");a(this,"height",600);a(this,"draggableEvents",!1);a(this,"resizableEvents",!1);a(this,"lockResize",!1);a(this,"startHour",0);a(this,"endHour",24);a(this,"renderer");a(this,"showCursorTime",!1);a(this,"throwErrors",!1);a(this,"tresHold");a(this,"plugins",[]);a(this,"ignoreSafety",!1);a(this,"toolbars",[]);a(this,"showMobileButtons",!1);a(this,"searchPhrase","");a(this,"eventTemplate");if(this.setNewStartDate=r,this.setEvents=i,this.addEvents=o,this.removeEventsByParam=s,this.configureEventsByParam=l,this.setStartHour=d,this.setViewMode=h,this.setDaysForward=m,this.setDateRange=f,this.setEndHour=u,this.setTimeRange=g,this.setRenderer=D,this.setTresHold=E,this.setEventTemplate=C,t.lockResize&&(this.lockResize=t.lockResize),t.showMobileButtons&&(this.showMobileButtons=t.showMobileButtons),t.eventTemplate&&(this.eventTemplate=t.eventTemplate),t.draggableEvents&&(this.draggableEvents=t.draggableEvents),t.tresHold&&(this.tresHold=t.tresHold),t.resizableEvents&&(this.resizableEvents=t.resizableEvents),t.ignoreSafety&&(this.ignoreSafety=t.ignoreSafety),t.toolbars&&(this.toolbars=t.toolbars),t.renderer&&(this.renderer=t.renderer),t.startHour&&(this.startHour=t.startHour),t.endHour&&(this.endHour=t.endHour),t.height&&(this.height=t.height),t.theme&&(this.theme=t.theme),t.plugins&&(this.plugins=t.plugins),t.showCursorTime&&(this.showCursorTime=t.showCursorTime),t.throwErrors&&(this.throwErrors=t.throwErrors),t.startDate){if(!(t.startDate instanceof Date)){console.error("Provided startDate must be a type of Date");return}this.startDate=t.startDate}if(t.endDate){if(!(t.endDate instanceof Date)){console.error("Provided endDate must be a type of Date");return}this.endDate=t.endDate}t.daysForward&&(typeof t.daysForward!="number"&&console.error("Provided daysForward must be a type of number"),t.daysForward<1&&(console.error("daysForward must be greater than 0"),this.daysForward=1),this.daysForward=t.daysForward),t.onVuelCalendarApiReady&&(this.onVuelCalendarApiReady=p=>{t.onVuelCalendarApiReady(p)}),t.onEventClicked&&(this.onEventClicked=p=>{t.onEventClicked(p)}),t.onEventDropped&&(this.onEventDropped=p=>{t.onEventDropped(p)}),t.onDayClicked&&(this.onDayClicked=p=>{t.onDayClicked(p)}),t.onDayDblClicked&&(this.onDayDblClicked=p=>{t.onDayDblClicked(p)}),t.onEventStartResized&&(this.onEventStartResized=p=>{t.onEventStartResized(p)}),t.onEventEndResized&&(this.onEventEndResized=p=>{t.onEventEndResized(p)}),this.events=[],this.api=new H(this.setNewStartDate,this.setEvents,this.addEvents,this.removeEventsByParam,this.configureEventsByParam,this.setStartHour,this.setViewMode,this.setDaysForward,this.setDateRange,this.setEndHour,this.setTimeRange,this.setRenderer,this.setTresHold,this.setEventTemplate),this.onVuelCalendarReadyResolve=()=>{this.onVuelCalendarApiReady(this.api)}}}class H{constructor(t,r,i,o,s,l,d,h,m,f,u,g,D,E){a(this,"setDate");a(this,"setEvents");a(this,"addEvents");a(this,"removeEventsByParam");a(this,"configureEventsByParam");a(this,"setStartHour");a(this,"setEndHour");a(this,"switchViewMode");a(this,"setDaysForward");a(this,"setDateRange");a(this,"setTimeRange");a(this,"setRenderer");a(this,"setTresHold");a(this,"setEventTemplate");this.setDate=t,this.setEvents=r,this.addEvents=i,this.removeEventsByParam=o,this.configureEventsByParam=s,this.setStartHour=l,this.switchViewMode=d,this.setDaysForward=h,this.setDateRange=m,this.setEndHour=f,this.setTimeRange=u,this.setRenderer=g,this.setTresHold=D,this.setEventTemplate=E}}const B=n.defineComponent({name:"VuelCalendarEventSingle",setup(){return{dateUltra:new c}},props:{eventTemplate:{type:Function},pushToEventSplit:{type:Function,required:!0},resizableEvents:{type:Boolean,default:!1},eventResizeHandler:{type:Object,required:!0},event:{type:Object,required:!0},draggableEvents:{type:Boolean,default:!1},eventDragHandler:{type:Object,required:!0},renderer:{type:String,default:void 0},clone:{type:Function,required:!0},loopedDay:{type:Number,required:!0},startDateConfigurable:{type:Date,required:!0},preventResize:{type:Function,required:!0}},computed:{isSameDay(){return e=>this.dateUltra.isSameDate(this.dateUltra.addDays(this.startDateConfigurable,this.loopedDay-1),e)}}}),b=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},M=["draggable"],$=["draggable"],F=["draggable"],V={key:0},A=["innerHTML"],N={key:2,style:{width:"100%",height:"100%"}};function q(e,t,r,i,o,s){return n.openBlock(),n.createElementBlock(n.Fragment,null,[e.isSameDay(e.event.start)?(n.openBlock(),n.createElementBlock("div",{key:0,style:n.normalizeStyle({position:"absolute",left:0,width:"5px",height:"100%",backgroundColor:"transparent",cursor:e.resizableEvents?"ew-resize":"inherit"}),draggable:e.resizableEvents,onDragstart:t[0]||(t[0]=n.withModifiers(l=>e.eventResizeHandler.onEventStartResizeStart(e.event,e.pushToEventSplit,e.preventResize,e.loopedDay),["stop"])),onDragend:t[1]||(t[1]=(...l)=>e.eventResizeHandler.onEventStartResizeEnd&&e.eventResizeHandler.onEventStartResizeEnd(...l))},null,44,M)):n.createCommentVNode("",!0),e.isSameDay(e.event.end)?(n.openBlock(),n.createElementBlock("div",{key:1,style:n.normalizeStyle({position:"absolute",right:0,width:"5px",height:"100%",backgroundColor:"transparent",cursor:e.resizableEvents?"ew-resize":"inherit"}),draggable:e.resizableEvents,onDragstart:t[2]||(t[2]=n.withModifiers(l=>e.eventResizeHandler.onEventEndResizeStart(e.event,e.pushToEventSplit,e.preventResize,e.loopedDay),["stop"])),onDragend:t[3]||(t[3]=(...l)=>e.eventResizeHandler.onEventEndResizeEnd&&e.eventResizeHandler.onEventEndResizeEnd(...l))},null,44,$)):n.createCommentVNode("",!0),(n.openBlock(),n.createElementBlock("div",{draggable:e.draggableEvents,style:{"user-select":"none"},onDragstart:t[4]||(t[4]=n.withModifiers(l=>e.eventDragHandler.onDragStart(l,e.event,e.clone,e.pushToEventSplit,e.preventResize,e.loopedDay),["stop"])),onDragend:t[5]||(t[5]=l=>e.eventDragHandler.onDragEnd(e.clone,e.preventResize)),key:e.event.id},[!e.renderer&&!e.eventTemplate?(n.openBlock(),n.createElementBlock("div",V,n.toDisplayString(e.event.label),1)):n.createCommentVNode("",!0),!e.renderer&&e.eventTemplate?(n.openBlock(),n.createElementBlock("div",{key:1,innerHTML:e.eventTemplate(e.event)},null,8,A)):n.createCommentVNode("",!0),e.renderer?(n.openBlock(),n.createElementBlock("div",N,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.renderer),{event:e.event},null,8,["event"]))])):n.createCommentVNode("",!0)],40,F))],64)}const L=b(B,[["render",q]]),U=n.defineComponent({components:{VuelCalendarEventSingle:L},setup(){return{dateUltra:new c}},computed:{isSameDay(){return e=>this.dateUltra.isSameDate(this.dateUltra.addDays(this.startDateConfigurable,this.loopedDay-1),e)}},props:{searchPhrase:{type:String,required:!1},eventResizeHandler:{type:Object,required:!0},eventTemplate:{type:Function},onEventClicked:{type:Function,required:!0},events:{type:Array,required:!0},helper:{type:Object,required:!0},startHourConfigurable:{type:Number,required:!0},endHourConfigurable:{type:Number,required:!0},theme:{type:Object,required:!0},renderer:{type:String,default:void 0},clone:{type:Function,required:!0},draggableEvents:{type:Boolean,default:!1},resizableEvents:{type:Boolean,default:!1},loopedDay:{type:Number,required:!0},startDateConfigurable:{type:Date,required:!0},eventDragHandler:{type:Object,required:!0},pushToEventSplit:{type:Function,required:!0},preventResize:{type:Function,required:!0}},methods:{getEventsToContainer(e){const t=new Date(this.startDateConfigurable),r=new Date(t.setDate(t.getDate()+e-1)),i=this.events??[],o=new Array;for(const s of i)s.start{var h;return n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:"vuelcalendar-event",onClick:n.withModifiers(m=>e.onEventClicked(d),["stop"]),style:n.normalizeStyle({height:e.renderer||e.eventTemplate?"unset":"20px",minHeight:"20px",marginTop:"1rem",marginLeft:`${e.getEventMarginLeft(d)}%`,width:`${e.getEventWidth(d)}%`,maxWidth:`${e.getEventWidth(d)}%`,backgroundColor:e.theme.colors.event,color:e.theme.colors.textPrimary,overflow:"hidden",borderRadius:"2px",zIndex:3,transition:"opacity 0.2s ease",position:"sticky"})},[(n.openBlock(),n.createBlock(l,{"start-date-configurable":e.startDateConfigurable,"looped-day":e.loopedDay,clone:e.clone,"event-template":e.eventTemplate,key:d.id,"prevent-resize":e.preventResize,renderer:e.renderer,"draggable-events":e.draggableEvents,"resizable-events":e.resizableEvents,"push-to-event-split":e.pushToEventSplit,"event-drag-handler":e.eventDragHandler,event:d,"event-resize-handler":e.eventResizeHandler},null,8,["start-date-configurable","looped-day","clone","event-template","prevent-resize","renderer","draggable-events","resizable-events","push-to-event-split","event-drag-handler","event","event-resize-handler"]))],12,P)),[[n.vShow,(h=d.label)==null?void 0:h.includes(e.searchPhrase??"")]])}),256)}const I=b(U,[["render",W]]),O=n.defineComponent({props:{lockResize:{type:Boolean,default:!1},showMobileButtons:{type:Boolean,default:!1},targetOnSidebar:{type:Boolean,default:!1},targetOnMonthSidebar:{type:Boolean,default:!1},theme:{type:Object,required:!0},viewMode:{type:String,required:!0},daysForwardConfigurable:{type:Number,required:!0},rowHeight:{type:Number,required:!0},monthContainer:{type:Object}},data(){return{resizer:{isResizing:!1,resizedElBottom:null,resizedEl:null}}},methods:{onResizerMouseDown(e,t=!1,r=!1){if(this.lockResize)return;this.resizer.isResizing=!0;let i=e.target.parentElement;t&&(i=document.getElementById(`vuelcalendar_day-${this.daysForwardConfigurable}`)),r&&(i=this.monthContainer),this.resizer.resizedElBottom=i.getBoundingClientRect().bottom,this.resizer.resizedEl=i,document.addEventListener("mousemove",this.onResizerMouseMove),document.addEventListener("mouseup",this.onResizerMouseUp)},onResizerMouseUp(){this.lockResize||(this.resizer.isResizing=!1,this.resizer.resizedElBottom=null,this.resizer.resizedEl=null,document.removeEventListener("mousemove",this.onResizerMouseMove),document.removeEventListener("mouseup",this.onResizerMouseUp))},onResizerMouseMove(e){if(this.lockResize||!this.resizer.isResizing)return;const t=this.resizer.resizedEl,r=t.id.split("-")[1],i=document.getElementById(`day_label-${r}`),s=e.clientY-t.getBoundingClientRect().top;if(this.viewMode==="month"&&se.handleMobileDown(l,"down"),["stop"])),style:{position:"absolute",zIndex:3,bottom:"5px",left:"5px",width:"20px",height:"20px",cursor:"pointer"}},[(n.openBlock(),n.createElementBlock("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{pointerEvents:"none"},fill:e.theme.colors.menuBg,stroke:e.theme.colors.surface,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Y,8,j))])):n.createCommentVNode("",!0),e.viewMode==="days"&&!e.targetOnSidebar&&!e.targetOnMonthSidebar&&!e.monthContainer&&e.showMobileButtons?(n.openBlock(),n.createElementBlock("div",{key:1,onClick:t[1]||(t[1]=l=>e.handleMobileDown(l,"up")),style:{position:"absolute",zIndex:3,bottom:"5px",left:"40px",width:"20px",height:"20px",cursor:"pointer"}},[(n.openBlock(),n.createElementBlock("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{pointerEvents:"none"},fill:e.theme.colors.menuBg,stroke:e.theme.colors.surface,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},G,8,Z))])):n.createCommentVNode("",!0),n.createElementVNode("div",{onMousedown:t[2]||(t[2]=n.withModifiers(l=>e.onResizerMouseDown(l,e.targetOnSidebar,e.targetOnMonthSidebar),["stop","prevent"])),style:n.normalizeStyle({width:"100%",height:(e.targetOnSidebar,"6px"),position:"absolute",bottom:0,zIndex:5,cursor:"ns-resize"})},null,36),n.createElementVNode("div",{onMousedown:t[3]||(t[3]=n.withModifiers(l=>e.onResizerMouseDown(l,e.targetOnSidebar,e.targetOnMonthSidebar),["stop","prevent"])),class:"vuelcalendar-resizer",style:n.normalizeStyle({width:"100%",height:e.targetOnSidebar?"6px":"1px",position:"absolute",bottom:0,zIndex:5,cursor:"ns-resize",backgroundColor:e.targetOnSidebar?"transparent":e.theme.colors.surface})},null,36)],64)}const S=b(O,[["render",X]]),J=n.defineComponent({name:"VuelCalendarMonthDisplay",components:{VuelCalendarResizer:S},props:{viewMode:{type:String,required:!0},height:{type:Number,required:!0},theme:{type:Object,required:!0},helper:{type:Object,required:!0},setDateFromMonthCalendar:{type:Function,required:!0},startDateConfigurable:{type:Date,required:!0},eventsConfigurable:{type:Array,required:!0},rowHeight:{type:Number,required:!0},daysForwardConfigurable:{type:Number,required:!0},setViewMode:{type:Function,required:!0}},data(){return{counted:{}}},created(){},watch:{viewMode(){switch(this.viewMode){case"month":for(let e=1;e<=35;e++)this.counted[`${e}`]=this.helper.countEventsForDay(this.startDateConfigurable,e-1,this.eventsConfigurable);break}}}}),Q={key:0,style:{width:"100%",display:"flex",position:"relative"}},K=["onClick"],x=["textContent"];function _(e,t,r,i,o,s){const l=n.resolveComponent("VuelCalendarResizer");return e.viewMode==="month"?(n.openBlock(),n.createElementBlock("section",Q,[n.createElementVNode("div",{ref:"monthContainer",class:"vuelcalendar-month-container",style:n.normalizeStyle({width:"100%",boxSizing:"border-box",height:e.height+50+"px",borderTopLeftRadius:"2px",borderTopRightRadius:"2px",borderBottomLeftRadius:"2px",borderBottomRightRadius:"2px",borderTop:"solid 1px",borderRight:"solid 2px",borderLeft:"solid 2px",borderColor:e.theme.colors.surface,overflow:"auto",position:"relative"})},[n.createElementVNode("div",{style:n.normalizeStyle({display:"grid",boxSizing:"border-box",gridTemplateColumns:"repeat(7, 1fr)",width:"100%",height:"100%",minWidth:"400px"})},[n.createElementVNode("div",{class:"vuelcalendar-month-day-upper-label-container",style:n.normalizeStyle({display:"grid",gridTemplateColumns:"repeat(7, 1fr)",width:"100%",height:"30px",background:e.theme.colors.primary,borderBottom:"solid 1px",borderColor:e.theme.colors.surface,position:"absolute",top:0,zIndex:2})},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(7,d=>n.createElementVNode("div",{key:d,class:"vuelcalendar-month-day-upper-label",style:n.normalizeStyle({display:"flex",justifyContent:"center",borderLeft:"solid 1px",borderColor:e.theme.colors.surface,fontSize:"0.8em",fontWeight:"bolder",alignItems:"center",color:e.theme.colors.textPrimary})},n.toDisplayString(e.helper.daysEnumerableFromMonday[d-1]),5)),64))],4),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(35,d=>n.createElementVNode("div",{class:"vuelcalendar-month-box",key:d,onClick:h=>e.setDateFromMonthCalendar(d-1),style:n.normalizeStyle({background:e.theme.colors.primary,borderLeft:"solid 1px",borderBottom:"solid 1px",borderColor:e.theme.colors.surface,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"relative"})},[n.createElementVNode("div",{class:n.normalizeClass(`vuelcalendar-month-events${e.counted[`${d-1}`]?"-active":""}`),style:n.normalizeStyle({backgroundColor:e.counted[`${d-1}`]?e.theme.colors.event:e.theme.colors.surface,padding:"5px",fontWeight:"bold",borderRadius:"2px",color:e.theme.colors.textPrimary,position:"relative"}),textContent:n.toDisplayString(e.counted[`${d-1}`])},null,14,x),n.createElementVNode("div",{class:"vuelcalendar-month-datelabel",style:n.normalizeStyle({position:"absolute",bottom:"5px",left:"5px",fontSize:"0.8em",color:e.theme.colors.textPrimary})},n.toDisplayString(e.helper.dateToMonthAndDayContainer(e.startDateConfigurable,d-2)),5)],12,K)),64))],4),n.createVNode(l,{theme:e.theme,"days-forward-configurable":e.daysForwardConfigurable,"view-mode":e.viewMode,"row-height":e.rowHeight},null,8,["theme","days-forward-configurable","view-mode","row-height"])],4)])):n.createCommentVNode("",!0)}const ee=b(J,[["render",_]]);class te{constructor(t){a(this,"endDateBackup");a(this,"endEvent");a(this,"startDateBackup");a(this,"startEvent");a(this,"dateUltra",new c);a(this,"logger");a(this,"continueAsync",!0);this.logger=t}onEventStartResizeStart(t,r,i,o){i(()=>{this.startDateBackup=new Date(t.start),this.startEvent=t,r(t,o)})}onEventStartResizeDayOver(t,r,i){this.continueAsync=!0;const o=this.dateUltra.setTimeToDateWithTimeString(t,r);this.onEventStartResizeGenerator(o,i)}async onEventStartResizeGenerator(t,r){if(this.continueAsync){if(r){t.getMinutes()%r===0&&(this.startEvent.start=t);return}this.startEvent.start=t}}onEventStartResizeEnd(){this.startDateBackup=void 0,this.startEvent=void 0}onEventEndResizeStart(t,r,i,o){i(()=>{this.endDateBackup=new Date(t.end),this.endEvent=t,r(t,o)})}onEventEndResizeDayOver(t,r,i){this.continueAsync=!0;const o=this.dateUltra.setTimeToDateWithTimeString(t,r);this.onEventEndResizeGenerator(o,i)}async onEventEndResizeGenerator(t,r){if(this.continueAsync){if(r){t.getMinutes()%r===0&&(this.endEvent.end=t);return}this.endEvent.end=t}}onEventEndResizeEnd(){this.endDateBackup=void 0,this.endEvent=void 0}async onEventEndResizeDrop(t,r,i){this.continueAsync=!1;const o=this.dateUltra.setTimeToDateWithTimeString(t,r),s=()=>{this.endEvent.end=this.endDateBackup};if(o{this.endEvent.end=o},decline:s})}async onEventStartResizeDrop(t,r,i){this.continueAsync=!1;const o=this.dateUltra.setTimeToDateWithTimeString(t,r),s=()=>{this.startEvent.start=this.startDateBackup};if(o>this.startEvent.end){this.logger.customWarn("resize","Event start resize","startDate must be earlier than endDate"),s();return}i({event:this.startEvent,newDateTime:o,oldDateTime:this.startDateBackup,accept:()=>{this.startEvent.start=o},decline:s})}}class re{constructor(t){a(this,"show",!1);a(this,"time","00:00");a(this,"helper");this.helper=t}move(t,r,i,o){this.show=!0,r.style.left=t.clientX>=window.innerWidth?"0px":t.clientX-100+"px",r.style.top=t.clientY+20+"px",this.time=this.helper.getTimeFromClick(t,this.helper,i,o)}out(){this.show=!1}}class ne{constructor(){a(this,"dateUltra",new c);a(this,"oldStartDateTimeBackup");a(this,"oldEndDateTimeBackup");a(this,"helper",new y)}onDragStart(t,r,i,o,s,l){const d=new Image;d.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",t.dataTransfer.setDragImage(d,0,0),s(()=>{i("append",r);const h=new Date(r.start),m=new Date(r.end);this.oldStartDateTimeBackup=h,this.oldEndDateTimeBackup=m,r.dragged=!0,o(r,l)})}onDragOver(t,r,i,o,s,l,d,h){if(!s)return;t.preventDefault(),t.stopPropagation();const m=document.getElementById(o);m&&r&&(m.style.backgroundColor=i);const f=new Date(s.start),u=this.dateUltra.setTimeToDateWithTimeString(l,d),g=u.getTime()-f.getTime();if(h){u.getMinutes()%h===0&&(s.start=u,s.end=new Date(s.end.getTime()+g));return}s.start=u,s.end=new Date(s.end.getTime()+g)}onDragLeave(t,r){const i=document.getElementById(r);i&&t&&(i.style.backgroundColor=t)}onDragEnd(t,r){r(()=>{t("remove")})}onDrop(t,r,i,o){i({clickEvent:t,event:r,newStartDateTime:r.start,newEndDateTime:r.end,oldStartDateTime:this.oldStartDateTimeBackup,oldEndDateTime:this.oldEndDateTimeBackup,accept:()=>{const s=o.find(l=>l.id===r.id);s&&(s.start=r.start,s.end=r.end)},decline:()=>{r.start=this.oldStartDateTimeBackup,r.end=this.oldEndDateTimeBackup}})}}const ie=n.defineComponent({name:"VuelCalendarMouseTime",props:{showCursorTime:{type:Boolean,default:!1},mouseTimeHandler:{type:Object,required:!0},theme:{type:Object,required:!0}}}),oe={ref:"timeOnMouse",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",position:"fixed",height:"35px",width:"100px",left:0,zIndex:6}};function se(e,t,r,i,o,s){return n.withDirectives((n.openBlock(),n.createElementBlock("div",oe,[n.createElementVNode("div",{style:n.normalizeStyle({backgroundColor:e.theme.colors.primary,paddingInline:"10px",paddingBlock:"4px",color:e.theme.colors.textPrimary,borderRadius:"4px",border:"solid 1px",borderColor:e.theme.colors.surface})},n.toDisplayString(e.mouseTimeHandler.time),5)],512)),[[n.vShow,e.mouseTimeHandler.show&&e.showCursorTime]])}const ae=b(ie,[["render",se]]),le=n.defineComponent({name:"VirtualScroller",props:{rowId:{type:String,required:!0},defaultRowHeight:{type:Number,required:!0},items:{type:Array,required:!0},day:{type:Number,required:!0}},setup(e){let t=n.ref(e.defaultRowHeight),r=n.ref(2);const i=new ResizeObserver(o=>{t.value=o[0].contentRect.height,r.value=t.value/60<4?4:t.value/60});return{helper:new y,rowHeight:t,sliceCount:r,observer:i}},created(){this.$nextTick(()=>{const e=document.getElementById(this.rowId);this.observer.observe(e)})}}),de={id:"container"};function he(e,t,r,i,o,s){return n.openBlock(),n.createElementBlock("div",de,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.items.slice(0,e.sliceCount),(l,d)=>(n.openBlock(),n.createElementBlock("div",{key:`ev-${d}`},[n.renderSlot(e.$slots,"vs",{items:l})]))),128))])}const ue=b(le,[["render",he]]),T=e=>{for(const t of e){if(t.id)continue;const r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",i=d=>{let h="";for(let m=0;m{let d=0;for(let h=0;hthis.helper.isCurrentDay(this.startDateConfigurable,e)}},data(){return{vuelCalendarApi:new R(this.vuelCalendarOptions,this.setNewStartDate,this.setEvents,this.addEvents,this.removeEventsByParam,this.configureEventsByParam,this.setStartHour,this.setViewMode,this.setDaysForward,this.setDateRange,this.setEndHour,this.setTimeRange,this.setRenderer,this.setTresHold,this.setEventTemplate),rowHeight:0,searchPhrase:"Esdad",resizer:{isResizing:!1,resizedElBottom:null,resizedEl:null},startDateConfigurable:this.vuelCalendarOptions.startDate??new Date,eventsConfigurable:[],eventsConfigurableSplit:{},rendererConfigurable:this.vuelCalendarOptions.renderer,tresHoldConfigurable:this.vuelCalendarOptions.tresHold,daysForwardConfigurable:this.vuelCalendarOptions.daysForward?this.vuelCalendarOptions.daysForward<1?1:this.vuelCalendarOptions.daysForward:1,startHourConfigurable:(this.vuelCalendarOptions.startHour??0)<1?0:this.vuelCalendarOptions.startHour??0,endHourConfigurable:(this.vuelCalendarOptions.endHour??24)>24?24:this.vuelCalendarOptions.endHour??24,eventTemplateConfigurable:this.vuelCalendarOptions.eventTemplate,viewMode:"days",dragEvent:void 0,bodyOverflowState:void 0,bgBackup:void 0}},created(){this.setDateRangeByEndDate(),this.$nextTick(()=>{const e=this.$refs.container.offsetHeight;this.rowHeight=e/this.daysForwardConfigurable,this.rowHeight<100&&(this.rowHeight=100),this.vuelCalendarApi.onVuelCalendarReadyResolve(),this.bgBackup=document.querySelector(".vuelcalendar-day").style.backgroundColor})},methods:{pushToEventsSplit(e,t){for(let r=1;r<=this.daysForwardConfigurable;r++)if(this.eventsConfigurableSplit[`${r}`].some(i=>i.includes(e)||i.some(o=>o.id===e.id))){if(!t||t===r)continue;const i=this.eventsConfigurableSplit[`${r}`].findIndex(s=>s.includes(e)||s.some(l=>l.id===e.id)),o=this.eventsConfigurableSplit[`${r}`][i].findIndex(s=>s===e||s.id===e.id);(i!==0||o!==0)&&(this.eventsConfigurableSplit[`${r}`][i]=this.eventsConfigurableSplit[`${r}`][i].filter(s=>!(s===e||s.id===e.id)),this.pushToEventsSplit(e))}else{const i=this.eventsConfigurableSplit[`${r}`][0];if(i&&i.length<5){i.unshift(e);continue}this.eventsConfigurableSplit[`${r}`].unshift([e])}},setDateRangeByEndDate(){this.vuelCalendarOptions.endDate&&this.setDateRange(this.startDateConfigurable,this.vuelCalendarOptions.endDate)},setEventTemplate(e){this.eventTemplateConfigurable=e},pushCollectionToEventsSplit(e){for(const t of e)this.pushToEventsSplit(t)},mouseTimeMove(e){if(!this.vuelCalendarOptions.showCursorTime)return;const t=this.$refs.timeOnMouseCmp;if(!t)return;const r=t.$refs.timeOnMouse;r&&this.mouseTimeHandler.move(e,r,this.startHourConfigurable,this.endHourConfigurable)},mouseTimeOut(){this.vuelCalendarOptions.showCursorTime&&this.mouseTimeHandler.out()},clone(e,t){switch(e){case"append":this.dragEvent=t;break;case"remove":this.dragEvent=void 0;break}},onDragOver(e,t){const{clickedDay:r,clickedTime:i}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable);this.preventResize(()=>{this.eventDragHandler.onDragOver(e,this.bgBackup,this.theme.colors.dragging,`vuelcalendar_day-${t}`,this.dragEvent,r,i,this.tresHoldConfigurable)})},onDragLeave(e){this.preventResize(()=>{this.eventDragHandler.onDragLeave(this.bgBackup,`vuelcalendar_day-${e}`)})},onDrop(e,t,r){if(!this.dragEvent)return;const i=document.getElementById(r);i&&t&&(i.style.backgroundColor=t),this.preventResize(()=>{this.eventDragHandler.onDrop(e,this.dragEvent,this.vuelCalendarApi.onEventDropped,this.eventsConfigurable)})},onDayClick(e,t){const{clickedDay:r,clickedTime:i,daysEvents:o}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable,this.eventsConfigurable);this.vuelCalendarApi.onDayClicked({clickEvent:e,date:this.helper.setTimeToDate(r,i),time:i,events:o})},onDayDblClick(e,t){const{clickedDay:r,clickedTime:i,daysEvents:o}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable,this.eventsConfigurable);this.vuelCalendarApi.onDayDblClicked({clickEvent:e,date:this.helper.setTimeToDate(r,i),time:i,events:o})},onEventEndResizeDragOver(e,t){if(this.dragEvent||!this.eventResizeHandler.endEvent)return;const{clickedDay:r,clickedTime:i}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable);this.preventResize(()=>{this.eventResizeHandler.onEventEndResizeDayOver(r,i,this.tresHoldConfigurable)})},onEventStartResizeDragOver(e,t){if(this.dragEvent||!this.eventResizeHandler.startEvent)return;const{clickedDay:r,clickedTime:i}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable);this.preventResize(()=>{this.eventResizeHandler.onEventStartResizeDayOver(r,i,this.tresHoldConfigurable)})},onEventStartResizeDrop(e,t){if(this.dragEvent||!this.eventResizeHandler.startEvent)return;const{clickedDay:r,clickedTime:i}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable);this.preventResize(()=>{this.eventResizeHandler.onEventStartResizeDrop(r,i,this.vuelCalendarApi.onEventStartResized)})},onEventEndResizeDrop(e,t){if(this.dragEvent||!this.eventResizeHandler.endEvent)return;const{clickedDay:r,clickedTime:i}=this.helper.getClickAndDropData(e,t,this.helper,this.startHourConfigurable,this.endHourConfigurable,this.startDateConfigurable);this.preventResize(()=>{this.eventResizeHandler.onEventEndResizeDrop(r,i,this.vuelCalendarApi.onEventEndResized)})},setViewMode(){this.viewMode=this.viewMode==="days"?"month":"days"},setNewStartDate(e){return typeof e=="string"&&(e=new Date(e)),this.preventResize(()=>this.startDateConfigurable=e),this.setEventsSplit(),new Date(e)},setRenderer(e){this.rendererConfigurable=e},setTresHold(e){this.tresHoldConfigurable=e},setDaysForward(e){if(e<1){this.logger.customWarn("args","Days forward","daysForward must be greater or equal to 1");return}if(e>62&&!this.vuelCalendarOptions.ignoreSafety){this.logger.customWarn("args","Days forward","daysForward must be lower or equal to 62");return}this.daysForwardConfigurable=e,this.rowHeight=this.height/e,this.rowHeight<100&&(this.rowHeight=100)},setDateRange(e,t){typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),this.dateUltra.isBiggerDate(e,t)&&this.logger.customWarn("args","Date range","endDate must be greater or equal to startDate");const r=this.helper.getDaysDifference(e,t);if(r>62&&!this.vuelCalendarOptions.ignoreSafety){this.logger.customWarn("args","Date range","A range between start date and end date should be shorter than 62 days");return}this.setDaysForward(r),this.setNewStartDate(e),this.setEventsSplit()},setEvents(e){return this.eventsConfigurable=n.reactive(structuredClone(n.toRaw(T(e)))),this.setEventsSplit(),e},setEventsSplit(){setTimeout(()=>{this.preventResize(()=>{for(let e=1;e<=this.daysForwardConfigurable;e++){const t=this.helper.getEventsToContainer(e,this.startDateConfigurable,this.eventsConfigurable);this.eventsConfigurableSplit[`${e}`]=[];for(let r=0;r{this.preventResize(()=>{for(let t=1;t<=this.daysForwardConfigurable;t++){const r=this.helper.getEventsToContainer(t,this.startDateConfigurable,e);this.eventsConfigurableSplit[`${t}`]||(this.eventsConfigurableSplit[`${t}`]=[]);const i=[];for(let o=0;o{for(let r=1;r<=this.daysForwardConfigurable;r++)this.eventsConfigurableSplit[`${r}`]&&(this.eventsConfigurableSplit[`${r}`]=this.eventsConfigurableSplit[`${r}`].map(i=>i.filter(o=>o[e]!==t)))},[])},removeEventsByParam(e,t){return this.eventsConfigurable=this.eventsConfigurable.filter(r=>r[e]!==t),this.removeEventsByParamSplit(e,t),[]},configureEventsByParamSplit(e,t,r){return this.preventResize(()=>{for(let i=1;i<=this.daysForwardConfigurable;i++){this.eventsConfigurableSplit[`${i}}`]||(this.eventsConfigurableSplit[`${i}}`]=[]);const o=this.eventsConfigurableSplit[`${i}`].flat().filter(s=>s[e]===t);o.forEach(s=>{Object.entries(r).forEach(l=>{s[l[0]]=l[1]})}),this.pushCollectionToEventsSplit(o)}},[{[e]:t,...r}])},configureEventsByParam(e,t,r){return this.eventsConfigurable.filter(o=>o[e]===t).forEach(o=>{Object.entries(r).forEach(s=>{o[s[0]]=s[1]})}),this.configureEventsByParamSplit(e,t,r),[]},setStartHour(e){if(e>this.endHourConfigurable||e===this.endHourConfigurable){this.logger.customWarn("args","Start hour","endHour must be greater than startHour");return}if(e>23){this.startHourConfigurable=23;return}if(e<0){this.startHourConfigurable=0;return}this.startHourConfigurable=e},setEndHour(e){if(e24){this.endHourConfigurable=24;return}if(e<0){this.endHourConfigurable=0;return}this.endHourConfigurable=e},setTimeRange(e,t){if(e>t||e===t){this.logger.customWarn("args","Time range","endHour must be greater than startHour");return}this.setStartHour(e),this.setEndHour(t)},setDateFromMonthCalendar(e){this.setNewStartDate(this.helper.getDayFromFirstDayByAdd(this.startDateConfigurable,e-1)),this.viewMode="days"},preventResize(e,t){return this.$nextTick(()=>{const r=[];for(let i=1;i{r.forEach((i,o)=>{const s=document.getElementById(i.id),l=document.getElementById(`day_label-${o+1}`);s&&(s.style.height=i.beforeHeight),l&&(l.style.height=i.beforeHeight)})})}),t}}}),me=["id"],ce={class:"week-day-label",style:{fontWeight:"bold",display:"flex",justifyContent:"center",alignItems:"center",maxWidth:"20px","writing-mode":"vertical-lr","unicode-bidi":"plaintext","text-orientation":"mixed",boxSizing:"border-box"}},pe=n.createElementVNode("span",{style:{fontSize:"0.8em",marginTop:"-3px"}}," 00 ",-1),fe=["id","onClick","onDblclick","onDragover","onDragleave","onDragend","onDrop"],ye={style:{"margin-top":"15px"}};function De(e,t,r,i,o,s){const l=n.resolveComponent("VuelCalendarMouseTime"),d=n.resolveComponent("VuelCalendarResizer"),h=n.resolveComponent("VuelCalendarEventContainer"),m=n.resolveComponent("VirtualScroller"),f=n.resolveComponent("VuelCalendarMonthDisplay");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(l,{ref:"timeOnMouseCmp",theme:e.theme,"show-cursor-time":e.vuelCalendarOptions.showCursorTime,"mouse-time-handler":e.mouseTimeHandler},null,8,["theme","show-cursor-time","mouse-time-handler"]),e.viewMode==="days"?(n.openBlock(),n.createElementBlock("div",{key:0,class:"vuelcalendar-c1-container",style:n.normalizeStyle(` display:flex; position:relative; width:100%; border-top-right-radius:'2px', borderBottomRightRadius:'2px', height:${e.height+50} +'px'; border-radius:2px`)},[n.createElementVNode("nav",{class:"vuelcalendar-left-corner",style:n.normalizeStyle({position:"relative",overflow:"hidden",background:e.theme.colors.primary,width:"40px",borderTopLeftRadius:"2px",borderBottomLeftRadius:"2px",borderTop:"solid 1px",borderLeft:"solid 1px",borderColor:e.theme.colors.surface})},[n.createElementVNode("div",{style:n.normalizeStyle({height:"50px",minHeight:"50px",maxHeight:"50px",borderBottom:"solid 1px",borderColor:e.theme.colors.surface})},null,4),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.daysForwardConfigurable,u=>(n.openBlock(),n.createElementBlock("div",{key:u,class:"vuelcalendar-day-label-container",id:`day_label-${u}`,style:n.normalizeStyle({overflow:"hidden",display:"grid",gridTemplateColumns:"1fr 1fr",color:e.theme.colors.textPrimary,whiteSpace:"nowrap",fontSize:"0.9em",boxSizing:"border-box",background:e.theme.colors.primary,width:"100%",height:e.rowHeight+"px",borderBottom:"solid 1px",borderColor:e.theme.colors.surface})},[n.createElementVNode("div",ce,n.toDisplayString(e.helper.pairDateToContainer(e.startDateConfigurable,u,"getDayEnumerable")),1),n.createElementVNode("div",{class:n.normalizeClass(`vuelcalendar-day-label${e.isCurrentDay(u)?"-current":""}`),style:n.normalizeStyle({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.isCurrentDay(u)?e.theme.colors.highlight:e.theme.colors.menuBg,"writing-mode":"vertical-lr","unicode-bidi":"plaintext","text-orientation":"mixed",maxWidth:"20px"})},n.toDisplayString(e.helper.pairDateToContainer(e.startDateConfigurable,u,"toLocaleDateString")),7)],12,me))),128)),n.createVNode(d,{theme:e.theme,"target-on-sidebar":"","lock-resize":e.vuelCalendarOptions.lockResize,"days-forward-configurable":e.daysForwardConfigurable,"view-mode":e.viewMode,"show-mobile-buttons":e.vuelCalendarOptions.showMobileButtons,"row-height":e.rowHeight},null,8,["theme","lock-resize","days-forward-configurable","view-mode","show-mobile-buttons","row-height"])],4),n.createElementVNode("div",{style:n.normalizeStyle({width:"100%",height:"100%",overflowY:"hidden",overflowX:"auto",borderTopRightRadius:"2px",borderBottomRightRadius:"2px",borderRight:"solid 2px",borderColor:e.theme.colors.surface})},[n.createElementVNode("nav",{id:"timeline",class:"vuelcalendar-timeline",style:n.normalizeStyle({height:"50px",borderBottom:"solid 1px",borderTop:"solid 1px",borderTopRightRadius:"2px",width:"100%",overflow:"hidden",minWidth:"1200px",backgroundColor:e.theme.colors.primary,borderColor:e.theme.colors.surface,display:"grid",gridTemplateColumns:`repeat(${e.endHourConfigurable-e.startHourConfigurable},1fr)`})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.helper.getHours(e.startHourConfigurable,e.endHourConfigurable),u=>(n.openBlock(),n.createElementBlock("div",{key:u,class:"hour",style:n.normalizeStyle({borderLeft:"solid 1px",borderColor:e.theme.colors.surface,display:"flex",justifyContent:"center",alignItems:"center",color:e.theme.colors.textPrimary})},[n.createElementVNode("span",null,n.toDisplayString(u),1),n.createTextVNode(),pe],4))),128))],4),n.createElementVNode("main",{ref:"container",style:n.normalizeStyle({minHeight:e.height+"px",maxHeight:"unset",width:"100%",borderBottomRightRadius:"2px",height:"100%",boxSizing:"border-box",minWidth:"1200px",overflow:"auto"})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.daysForwardConfigurable,u=>(n.openBlock(),n.createElementBlock("div",{id:`vuelcalendar_day-${u}`,class:"vuelcalendar-day",key:u,onClick:g=>e.onDayClick(g,u),onDblclick:g=>e.onDayDblClick(g,u),onDragover:n.withModifiers(g=>{e.mouseTimeMove(g),e.onDragOver(g,u),e.onEventEndResizeDragOver(g,u),e.onEventStartResizeDragOver(g,u)},["prevent","stop"]),onMousemove:t[0]||(t[0]=(...g)=>e.mouseTimeMove&&e.mouseTimeMove(...g)),onMouseout:t[1]||(t[1]=(...g)=>e.mouseTimeOut&&e.mouseTimeOut(...g)),onDragleave:n.withModifiers(g=>e.onDragLeave(u),["prevent","stop"]),onDragend:n.withModifiers(g=>e.onDragLeave(u),["prevent","stop"]),onDrop:n.withModifiers(g=>{e.onDrop(g,e.bgBackup,`vuelcalendar_day-${u}`),e.onEventStartResizeDrop(g,u),e.onEventEndResizeDrop(g,u)},["prevent","stop"]),style:n.normalizeStyle({height:`${e.rowHeight}px`,backgroundColor:e.theme.colors.primary,color:e.theme.colors.textPrimary,width:"100%",position:"relative",overflow:"hidden",boxSizing:"border-box"})},[n.createElementVNode("div",ye,[n.createVNode(m,{items:e.eventsConfigurableSplit[`${u}`]??[],day:u,"start-date-configurable":e.startDateConfigurable,rowId:`vuelcalendar_day-${u}`,"default-row-height":e.rowHeight},{vs:n.withCtx(({items:g})=>[n.createVNode(h,{theme:e.theme,"search-phrase":e.vuelCalendarOptions.searchPhrase,helper:e.helper,loopedDay:u,"event-template":e.eventTemplateConfigurable,"prevent-resize":e.preventResize,renderer:e.rendererConfigurable,events:g,clone:e.clone,"draggable-events":e.vuelCalendarOptions.draggableEvents,"resizable-events":e.vuelCalendarOptions.resizableEvents,"on-event-clicked":e.vuelCalendarApi.onEventClicked,"start-hour-configurable":e.startHourConfigurable,"end-hour-configurable":e.endHourConfigurable,"start-date-configurable":e.startDateConfigurable,"event-resize-handler":e.eventResizeHandler,"event-drag-handler":e.eventDragHandler,"push-to-event-split":e.pushToEventsSplit},null,8,["theme","search-phrase","helper","loopedDay","event-template","prevent-resize","renderer","events","clone","draggable-events","resizable-events","on-event-clicked","start-hour-configurable","end-hour-configurable","start-date-configurable","event-resize-handler","event-drag-handler","push-to-event-split"])]),_:2},1032,["items","day","start-date-configurable","rowId","default-row-height"])]),n.createElementVNode("div",{class:"vuelcalendar-hour-box-container",style:n.normalizeStyle({position:"absolute",width:"100%",top:"0",display:"grid",gridTemplateColumns:`repeat(${e.endHourConfigurable-e.startHourConfigurable},1fr)`,pointerEvents:"none",height:"100%"})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.endHourConfigurable-e.startHourConfigurable,g=>(n.openBlock(),n.createElementBlock("div",{class:"vuelcalendar-hour-box",key:g,style:n.normalizeStyle({borderLeft:"solid 1px",borderColor:e.theme.colors.surface,height:"100%"})},null,4))),128))],4),n.createVNode(d,{theme:e.theme,"lock-resize":e.vuelCalendarOptions.lockResize,"days-forward-configurable":e.daysForwardConfigurable,"view-mode":e.viewMode,"show-mobile-buttons":e.vuelCalendarOptions.showMobileButtons,"row-height":e.rowHeight},null,8,["theme","lock-resize","days-forward-configurable","view-mode","show-mobile-buttons","row-height"])],44,fe))),128))],4)],4),n.createVNode(d,{"show-mobile-buttons":e.vuelCalendarOptions.showMobileButtons,theme:e.theme,"lock-resize":e.vuelCalendarOptions.lockResize,"target-on-sidebar":"","days-forward-configurable":e.daysForwardConfigurable,"view-mode":e.viewMode,"row-height":e.rowHeight},null,8,["show-mobile-buttons","theme","lock-resize","days-forward-configurable","view-mode","row-height"])],4)):n.createCommentVNode("",!0),n.createVNode(f,{"set-view-mode":e.setViewMode,"days-forward-configurable":e.daysForwardConfigurable,"row-height":e.rowHeight,"events-configurable":e.eventsConfigurable,"start-date-configurable":e.startDateConfigurable,"set-date-from-month-calendar":e.setDateFromMonthCalendar,helper:e.helper,theme:e.theme,height:e.height,"view-mode":e.viewMode},null,8,["set-view-mode","days-forward-configurable","row-height","events-configurable","start-date-configurable","set-date-from-month-calendar","helper","theme","height","view-mode"])],64)}return b(ge,[["render",De]])});