@sbh321/qcalendar
Version:
A forked version of Jeff Galbraith's fork of Quasar UI QCalendar
6 lines • 38.8 kB
JavaScript
/*!
* @subhambhandari/qcalendar v4.0.0-beta.19
* (c) 2024 Subham Bhandari <bhandarimaiya65@gmail.com>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarMonth=t(e.Vue))})(this,function(We){"use strict";const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,e=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,T=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,O=[0,31,28,31,30,31,30,31,31,30,31,30,31],E=[0,31,29,31,30,31,30,31,31,30,31,30,31],x=28,q=31,u=12,n=1,f=1,o=7,r=60,d=24,A=0,L=6e4,B=36e5,H=864e5,R=6048e5,U={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1,currentWeekday:!1},V={hour:0,minute:0};function Ne(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,s(t,2),s(a,2)].join("-")}function S(e,t,a){let n=C(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=k(n);return n=m(n,t[0],g),n=w(n),a&&(n=p(n,a,n.hasTime)),n}function M(e,t,a){let n=C(e);const r=l(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=g(n);return n=m(n,t[t.length-1],k),n=w(n),a&&(n=p(n,a,n.hasTime)),n}function F(e){const t=C(e);return t.day=f,w(t),t}function I(e){const t=C(e);return t.day=l(t.year,t.month),w(t),t}function z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=T.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function t(e){return!!a.exec(e)}function Z(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Y(e,t){return c(e)===c(t)}function P(e,t){return v(e)===v(t)}function $(e,t){return y(e)===y(t)}function Oe(e){const t=a.exec(e);return t?{date:e,time:s(parseInt(t[6],10)||0,2)+":"+s(parseInt(t[8],10)||0,2),year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:isNaN(parseInt(t[6],10))?0:parseInt(t[6],10),minute:isNaN(parseInt(t[8],10))?0:parseInt(t[8],10),weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1}:null}function Ee(e,t){let a=Oe(e);return null===a?null:(a=w(a),t&&p(a,t,a.hasTime),a)}function j(e,t=!1){const a=t?"UTC":"";return w({date:s(e[`get${a}FullYear`](),4)+"-"+s(e[`get${a}Month`]()+1,2)+"-"+s(e[`get${a}Date`](),2),time:s(e[`get${a}Hours`]()||0,2)+":"+s(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function xe(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function i(e){return 100*e.hour+e.minute}function K(e){return xe(e)+i(e)}function X(e,t,a){const n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&r<n?0:r-n}function p(e,t,a=!1){let n=xe(t),r=xe(e),o=n===r;return e.hasTime&&a&&o&&(n=i(t),r=i(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function Q(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&p(e,a,!0),e}function G(e){return e.weekday=re(e),e}function J(e){return e.doy=ae(e),e}function ee(e){return e.workweek=ne(e),e}function te(e,t,a,n,r){const o=xe(e);if(void 0!==t){const d=xe(Oe(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=xe(Oe(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=Oe(r[l][0]),c=Oe(r[l][1]);if(me(e,s,c)){e.disabled=!0;break}}else{const v=xe(Ee(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function w(e){return e.hasTime=!0,e.time=v(e),e.date=c(e),e.weekday=re(e),e.doy=ae(e),e.workweek=ne(e),e}function ae(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function ne(e){0===e.year&&(e=Ee(Ne()));const t=se(e);if(isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=(a.setDate(a.getDate()-(a.getDay()+6)%7+3),new Date(a.getFullYear(),0,4)),r=(n.setDate(n.getDate()-(n.getDay()+6)%7+3),a.getTimezoneOffset()-n.getTimezoneOffset()),o=(a.setHours(a.getHours()-r),(a-n)/R);return 1+Math.floor(o)}function re(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%u+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}function oe(e){return 1===(e%4===0^e%100===0^e%400===0)}function l(e,t){return(oe(e)?E:O)[t]}function C(e){return{...e}}function s(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function c(e){let t=s(e.year,4)+"-"+s(e.month,2);return e.hasDay&&(t+="-"+s(e.day,2)),t}function v(e){return e.hasTime?s(e.hour,2)+":"+s(e.minute,2):""}function y(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function k(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>x&&e.day>l(e.year,e.month)&&(e.day=f,++e.month,e.month>u)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<f&&(e.month--,e.month<n&&(e.year--,e.month=u),e.day=l(e.year,e.month)),e}function de(e,t=k,a=1,n=[0,1,2,3,4,5,6]){return b(e,t,a,n)}function b(e,t=k,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==k||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=k,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ue(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<o;++a){let t=1;for(let e=1;e<o;++e){const r=(a+e)%o;if(n[r])break;++t}e[a]=n[a]*t}return e}function ie(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=xe(t),c=[];let v=C(e),y=0,m=y===s;if(!(s<xe(e)))while((!m||c.length<l)&&c.length<i){if(y=xe(v),m=m||y>s&&c.length>=l,m)break;if(0===n[v.weekday]);else{const h=C(v);w(h),p(h,a),te(h,r,o,d,u),c.push(h)}v=b(v,k)}return c}function le(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=C(t);d.push(Q(i,u,o))}return d}function W(n,r){const o=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?o:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ce(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+y(t)),o}}}function se(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ce(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function h(e){return isFinite(parseInt(e,10))}function ve(e,t=!1){const a=!0===t?K:xe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ye(e,t=!1){const a=!0===t?K:xe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function me(e,t,a,n){const r=xe(e)+(!0===n?i(e):0),o=xe(t)+(!0===n?i(t):0),d=xe(a)+(!0===n?i(a):0);return r>=o&&r<=d}function he(e,t,a,n){const r=xe(e),o=xe(t),d=xe(a),u=xe(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function N(e,t){const n=C(e);let r;return pe(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=fe.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&be(n,fe[r]),w(n),n}const fe=["minute","hour","day","month"];function pe(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function we(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,ke(e)}return e}function ke(e){if(e.hour>=d||e.hour<0){const t=Math.floor(e.hour/d);e.hour-=t*d,e.day+=t,ge(e)}return e}function ge(t){D(t);let a=l(t.year,t.month);if(t.day>a){++t.month,t.month>u&&D(t);let e=t.day-a;a=l(t.year,t.month);do{e>a&&(++t.month,t.month>u&&D(t),e-=a,a=l(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&D(t),a=l(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&D(t),a=l(t.year,t.month))}while(e>a);t.day=a-e}return t}function D(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<n&&(e.month+=u,--e.year);return e}function be(e,t){switch(t){case"minute":return we(e);case"hour":return ke(e);case"day":return ge(e);case"month":return D(e)}}function De(e,t){const a=X(e,t,!0);return Math.floor(a/H)}function _e(e,t){let a=C(e),n=C(t);return a=m(a,0),n=m(n,6),Math.ceil(De(a,n)/o)}const Te={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function Se(){const r=(e,t)=>"",o={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?r:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]);return n.format(Te[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Me(t,a){const e=Object.keys(Te),n=Se();return e.map(e=>n(e,t,a))}function Fe(){const o=(e,t)=>"",d={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?o:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,d[e]||d["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),o}}}function Ie(t,a){const n=Fe();return[...Array(12).keys()].map(e=>n(e,t,a))}function Ae(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ce(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Le(e,t){return 0===t?e:e.slice(0,t)}const Be=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let He,Re;function Ue(e,a){const t={};for(const n in e){const r=e[n],o=Be("on-"+n);if(void 0===He)return void console.warn("$listeners has not been set up");if(void 0!==He.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),Re(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function Ve(e,t){return Ue(ze(e),t)}function ze(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function _(e){return Object.keys(ze(e))}function Ze(e,t){return Re=e,He=t,{getMouseEventHandlers:Ue,getDefaultMouseEventHandlers:Ve,getMouseEventName:ze,getRawMouseEvents:_}}var Ye={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const t=e.__onResizeObserver["observer"];t.unobserve(e),delete e.__onResizeObserver}}};function Pe(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=We.reactive({width:0,height:0}),o=We.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=We.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return We.withDirectives(We.h("div",{...e},[a()]),[[Ye,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const $e={modelValue:{type:String,default:Ne(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function je(r,{startDate:e,endDate:t,times:a}){const n=We.computed(()=>ue(r.weekdays)),o=We.computed(()=>Ee(e.value)),d=We.computed(()=>{if("0000-00-00"===t.value)return m(o.value);return Ee(t.value)}),u=We.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return W(r.locale,(e,t)=>a)}),i=We.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return W(r.locale,(e,t)=>t?n:a)}),l=We.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return W(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=xe(t),r=xe(Oe(e[0])),o=xe(Oe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:i}=c(n,e);return{"q-past-day":!0!==d&&!0!==i&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==i&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===i,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return S(e,r.weekdays,a.today)}function m(e){return M(e,r.weekdays,a.today)}function h(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:m,dayStyleDefault:h}}const Ke={dayHeight:{type:[Number,String],default:0,validator:h},dayMinHeight:{type:[Number,String],default:0,validator:h},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:h,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||h(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function Xe(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:u,headerColumnRef:i}){const e=We.computed(()=>parseInt(r.minWeeks,10)),l=We.computed(()=>e.value*r.weekdays.length),s=We.computed(()=>g(D(a.value))),c=We.computed(()=>b(_(d.value))),v=We.computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:u.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length);return e}),y=We.computed(()=>{return ie(s.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,l.value)}),m=We.computed(()=>{const e=o.today;const t=g(e);const a=b(e);return ie(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),h=We.computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return W(r.locale,(e,t)=>t?n:a)}),f=We.computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),p=We.computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let w=!0;const k=We.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&u.width<f.value;!0===w&&(w=!1,t("mini-mode",e));return e});function g(e){return S(e,r.weekdays,o.today)}function b(e){return M(e,r.weekdays,o.today)}function D(e){return F(e)}function _(e){return I(e)}function T(e){const t=xe(e);return t<xe(a.value)||t>xe(d.value)}return We.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:l,parsedMonthStart:s,parsedMonthEnd:c,parsedBreakpoint:f,parsedMonthLabelSize:p,days:y,todayWeek:m,isMiniMode:k,monthFormatter:h,isOutside:T}}const Qe={now:{type:String,validator:e=>""===e||t(e),default:""}};function Ge(e){const t=We.reactive({now:Ee("0000-00-00 00:00"),today:Ee("0000-00-00")}),a=We.computed(()=>e.now?Ee(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return j(new Date)}function d(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return We.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function Je(r,{parsedView:o,parsedValue:d,times:u}){const e=We.computed(()=>{const e=d.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=F(e),n=I(e),t=l(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=S(e,r.weekdays,u.today),n=M(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=de(C(n),k,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=F(e),n=I(e),w(n),t=l(a.year,a.month);break;case"resource":t=1,n=de(C(n),k,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const et=["moved"];function tt(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:m,emit:h}){function e(a=1){if(0===a)m.value=Ne();else{let e=C(l.value);const n=a>0,r=n?k:g,o=n?q:f;let t=n?a:-a;c.value=n?"next":"prev";const d=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),G(e);while(0===s.value[e.weekday])e=N(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":b(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":b(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":b(e,r,v.value,u.weekdays);break}G(e),w(e),J(e),p(e,y.now),m.value=e.date,h("moved",e)}}return{move:e}}const at=/^on[A-Z]/;function nt(e=We.getCurrentInstance()){return{emitListeners:We.computed(()=>{const t={};e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{at.test(e)&&(t[e]=!0)});return t})}}function qe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[We.h("span",e)]}function rt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return We.h("button",{...a,tabindex:r?0:-1},[n,r&&qe()])}const ot={cellWidth:[Number,String]};function dt(e){const t=We.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const ut=["change"];function it(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function lt(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const st=lt()["isKeyCode"],ct={useNavigation:Boolean};function vt(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:i,weekdaySkips:l,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",h))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",h),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function m(){let e=0;const t=setInterval(()=>{d.value[r.value]&&(d.value[r.value].focus(),50!==++e)&&document.activeElement!==d.value[r.value]||clearInterval(t)},250)}function h(e){y(e)&&st(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&st(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:T();break;case 36:_();break;case 37:k();break;case 38:p();break;case 39:g();break;case 40:w();break}}function p(e){let t=C(o.value);if("month"===u.value){if(t=N(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=N(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function w(e){let t=C(o.value);if("month"===u.value){if(t=N(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=N(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function k(e){let t=C(o.value);s.value="prev";do{t=N(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===u.value)return void(i.value=t.date);r.value=t.date}function g(e){let t=C(o.value);s.value="next";do{t=N(t,{day:1})}while(0===l.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===u.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=C(o.value);if("month"===u.value||"month-interval"===u.value){t=N(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=N(t,{day:a})}else"day"===u.value?t=N(t,{day:-1}):"week"===u.value&&(t=N(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=C(o.value);if("month"===u.value||"month-interval"===u.value){t=N(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=N(t,{day:a})}else"day"===u.value?t=N(t,{day:1}):"week"===u.value&&(t=N(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=C(o.value);"month"===u.value||"month-interval"===u.value?t=F(t):"week"===u.value&&(t=S(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=N(t,{day:-1});r.value=t.date}function T(e){let t=C(o.value);"month"===u.value||"month-interval"===u.value?t=I(t):"week"===u.value&&(t=M(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=N(t,{day:-1});r.value=t.date}return We.onBeforeUnmount(()=>{v()}),We.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:m}}var yt=We.defineComponent({name:"QCalendarMonth",directives:[Ye],props:{...$e,...Ke,...Qe,...ot,...ct},emits:["update:model-value",...ut,...et,"mini-mode",..._("-date"),..._("-day"),..._("-head-workweek"),..._("-head-day"),..._("-workweek")],setup(y,{slots:m,emit:c,expose:A}){const L=We.ref(null),B=We.ref(null),e=We.ref(null),h=We.ref(null),t=We.ref(null),v=We.ref({}),u=We.ref([]),i=We.ref([]),o=We.ref("next"),d=We.ref(y.modelValue||Ne()),l=We.ref("0000-00-00"),H=We.ref(0),s=We.ref(y.modelValue),f=We.reactive({width:0,height:0}),p=We.ref(!1),w=We.ref(!1),R=We.ref(null),U=We.ref(null),a=We.computed(()=>{return"month"}),n=We.getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=nt(n)["emitListeners"],V=dt(y)["isSticky"],{times:r,setCurrent:z,updateCurrent:g}=(We.watch(V,e=>{}),Ge(y)),{weekdaySkips:b,parsedStart:D,parsedEnd:Z,dayFormatter:Y,weekdayFormatter:P,ariaDateFormatter:$,dayStyleDefault:_,getRelativeClasses:j}=(g(),z(),je(y,{startDate:d,endDate:l,times:r})),T=We.computed(()=>{return Ee(y.modelValue,r.now)||D.value||r.today}),K=(t.value=T.value,h.value=T.value.date,We.computed(()=>{const e={};void 0!==y.dayPadding&&(e.padding=y.dayPadding);e.minWidth=O.value;e.maxWidth=O.value;e.width=O.value;return e})),X=Je(y,{parsedView:a,times:r,parsedValue:T})["renderValues"],{rootRef:S,__initCalendar:Q,__renderCalendar:G}=Pe(y,Ce,{scrollArea:L,pane:B}),{days:M,todayWeek:J,isMiniMode:F,parsedCellWidth:ee,parsedMonthLabelSize:te,isOutside:ae,monthFormatter:ne}=Xe(y,c,{weekdaySkips:b,times:r,parsedStart:D,parsedEnd:Z,size:f,headerColumnRef:e}),I=tt(y,{parsedView:a,parsedValue:T,weekdaySkips:b,direction:o,maxDays:H,times:r,emittedValue:s,emit:c})["move"],C=Ze(c,k)["getDefaultMouseEventHandlers"],re=it(c,{days:M,lastStart:R,lastEnd:U})["checkChange"],W=lt()["isKeyCode"],oe=vt(y,{rootRef:S,focusRef:h,focusValue:t,datesRef:v,days:M,parsedView:a,parsedValue:T,emittedValue:s,weekdaySkips:b,direction:o,times:r})["tryFocus"],de=We.computed(()=>{if(S.value)return!0===y.showWorkWeeks?parseInt(getComputedStyle(S.value).getPropertyValue(!0===F.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),N=We.computed(()=>{return y.weekdays.length}),O=We.computed(()=>{if(S.value){const e=f.width||S.value.getBoundingClientRect().width;if(e&&N.value)return(e-de.value)/N.value+"px"}return 100/N.value+"%"}),E=We.computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==F.value}),x=We.computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==E.value});function ue(){s.value=Ne()}function ie(e=1){I(e)}function le(e=1){I(-e)}function se({width:e,height:t}){f.width=e,f.height=t}function q(e){return e.date===s.value}function ce(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ve(){if(!0!==F.value&&0===y.dayHeight){const e=m.week;if(void 0!==e&&window)for(const t in u.value){const a=u.value[t];if(void 0!==a){const n=i.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ye(){return We.h("div",{class:"q-calendar-month__body"},[...be()])}function me(){return We.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&fe(),We.h("div",{class:"q-calendar-month__head--wrapper"},[he()])])}function he(){return We.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function fe(){const e=m["head-workweek"],t={start:D.value,end:Z.value,miniMode:F.value};return We.h("div",{class:"q-calendar-month__head--workweek",...C("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return J.value.map((e,t)=>we(e,t))}function we(t,e){const a=m["head-day"],n=M.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&q(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:F.value,droppable:p.value===t.weekday,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},u="function"===typeof y.weekdayClass?y.weekdayClass({scope:d}):{},i=!0===y.focusable&&y.focusType.includes("weekday"),l=O.value,s=y.weekdayStyle||_,c={width:l,maxWidth:l,minWidth:l,...s({scope:d})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...u,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onFocus:e=>{!0===i&&(h.value=t.date)},...C("-head-day",e=>{return{scope:d,event:e}})};return!0!==y.noAria&&(v.ariaLabel=P.value(t,!1)),We.h("div",v,[void 0===a&&ge(t,y.shortWeekdayLabel||F.value),void 0!==a&&a({scope:d}),ke(t,e),!0===i&&qe()])}function ke(t,e){const a=m["head-day-event"],n=!0!==y.noActiveDate&&q(t),r=M.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:F.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},u=O.value,i=y.weekdayStyle||_,l={width:u,maxWidth:u,minWidth:u,...i({scope:d})};return We.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:l},[void 0!==a&&a({scope:d})])}function ge(e,t){const a=P.value(e,t||y.weekdayBreakpoints[0]>0&&ee.value<=y.weekdayBreakpoints[0]);return We.h("span",{class:"q-calendar__ellipsis"},!0===F.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&ee.value<=y.weekdayBreakpoints[1]?Le(a,y.minWeekdayLabel):a)}function be(){const t=y.weekdays.length,a=[];for(let e=0;e<M.value.length;e+=t)a.push(De(M.value.slice(e,e+t),e/t));return a}function De(e,t){const a=m.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:F.value},o={},d=(o.height=y.dayHeight>0&&!0!==F.value?Ae(parseInt(y.dayHeight,10)):"auto",y.dayMinHeight>0&&!0!==F.value&&(o.minHeight=Ae(parseInt(y.dayMinHeight,10))),0===parseInt(y.dayHeight,10)&&0===parseInt(y.dayMinHeight,10));return We.h("div",{key:e[0].date,ref:e=>{i.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":d},style:o},[!0===y.showWorkWeeks?_e(e):void 0,We.h("div",{class:"q-calendar-month__week"},[We.h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>Te(e))),!0!==F.value&&void 0!==a?We.h("div",{ref:e=>{u.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function _e(e){const t=m.workweek,a=e.length>2?e[2]:e[0],n=ce(e)["timestamp"],r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:F.value};return We.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...C("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=m.day,a=y.dayStyle||_,n=ae(t),r=!0!==y.noActiveDate&&T.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&M.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:F.value,activeDate:r,hasMonth:o,droppable:w.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},u=Object.assign({...K.value},a({scope:d})),i="function"===typeof y.dayClass?y.dayClass({scope:d}):{},l={key:t.date,ref:e=>{!0===E.value&&(v.value[t.date]=e)},tabindex:!0===E.value?0:-1,class:{"q-calendar-month__day":!0,...i,...j(t,n,y.selectedDates,y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===E.value},style:u,onFocus:e=>{!0===E.value&&(h.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&W(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&W(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==F.value&&c("click-day",{scope:d,event:e})},...C("-day",e=>{return{scope:d,event:e}})},s={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",d)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",d)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",d)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",d)?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(l,s),!0!==y.noAria&&(l.ariaLabel=$.value(t)),We.h("div",l,[Se(t,n,o),We.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===E.value&&qe()])}function Se(e,t,a){let n,r;const o=[Me(e,t)],d=(!0!==F.value&&!0===a&&f.width>340&&(r=Ie(e,t)),!0!==F.value&&!0===y.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=Fe(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return We.h("div",d,o)}function Me(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=Y.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o=y.selectedDates&&y.selectedDates.length>0&&y.selectedDates.includes(a.date),d=!0!==y.noActiveDate&&q(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:F.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(a.weekday)},i={key:a.date,ref:e=>{!0===x.value&&(v.value[a.date]=e)},tabindex:!0===x.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===x.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:e=>{!0===x.value&&(h.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&W(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===x.value&&!0!==t&&!0!==a.disabled&&W(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),s.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:u,event:e})},...C("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(s.value=a.date);return{scope:u,event:e}})};return!0!==y.noAria&&(i.ariaLabel=$.value(a)),[r?r({scope:u}):rt(y,i,n?n({scope:u}):e),!0===x.value&&qe()]}}function Fe(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=m["day-of-year"],n={timestamp:e};return We.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ie(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=m["month-label"],n=ne.value(e,y.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:F.value},o={};return!0!==F.value&&void 0!==te.value&&(o.fontSize=te.value),We.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==F.value?n:void 0])}}function Ce(){const{start:e,end:t}=X.value,a=(d.value=e.date,l.value=t.date,f.width>0),n=We.withDirectives(We.h("div",{class:{"q-calendar-mini":!0===F.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==y.noHeader&&me(),!0===a&&ye()]),[[Ye,se]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return We.h(We.Transition,{name:r,appear:!0},()=>n)}}return We.watch([M],re,{deep:!0,immediate:!0}),We.watch(()=>y.modelValue,(e,t)=>{if(s.value!==e){if(!0===y.animated){const a=xe(Oe(e)),n=xe(Oe(t));o.value=a>=n?"next":"prev"}s.value=e}h.value=e}),We.watch(s,(e,t)=>{if(s.value!==y.modelValue){if(!0===y.animated){const a=xe(Oe(e)),n=xe(Oe(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),We.watch(h,e=>{e&&(t.value=Ee(e),s.value!==e)&&(s.value=e)}),We.watch(t,e=>{v.value[h.value]?v.value[h.value].focus():oe()}),We.onBeforeUpdate(()=>{v.value={};u.value=[];i.value=[];We.nextTick(()=>{ve()})}),We.onMounted(()=>{Q();ve()}),A({prev:le,next:ie,move:I,moveToToday:ue,updateCurrent:g}),()=>G()}});const mt="4.0.0-beta.19";var ht={version:mt,QCalendarMonth:yt,PARSE_REGEX:a,PARSE_DATE:e,PARSE_TIME:T,DAYS_IN_MONTH:O,DAYS_IN_MONTH_LEAP:E,DAYS_IN_MONTH_MIN:x,DAYS_IN_MONTH_MAX:q,MONTH_MAX:u,MONTH_MIN:n,DAY_MIN:f,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:d,FIRST_HOUR:A,MILLISECONDS_IN_MINUTE:L,MILLISECONDS_IN_HOUR:B,MILLISECONDS_IN_DAY:H,MILLISECONDS_IN_WEEK:R,Timestamp:U,TimeObject:V,today:Ne,getStartOfWeek:S,getEndOfWeek:M,getStartOfMonth:F,getEndOfMonth:I,parseTime:z,validateTimestamp:t,parsed:Oe,parseTimestamp:Ee,parseDate:j,getDayIdentifier:xe,getTimeIdentifier:i,getDayTimeIdentifier:K,diffTimestamp:X,updateRelative:p,updateMinutes:Q,updateWeekday:G,updateDayOfYear:J,updateWorkWeek:ee,updateDisabled:te,updateFormatted:w,getDayOfYear:ae,getWorkWeek:ne,getWeekday:re,isLeapYear:oe,daysInMonth:l,copyTimestamp:C,padNumber:s,getDate:c,getTime:v,getDateTime:y,nextDay:k,prevDay:g,moveRelativeDays:de,relativeDays:b,findWeekday:m,getWeekdaySkips:ue,createDayList:ie,createIntervalList:le,createNativeLocaleFormatter:W,makeDate:se,makeDateTime:ce,validateNumber:h,maxTimestamp:ve,minTimestamp:ye,isBetweenDates:me,isOverlappingDates:he,daysBetween:De,weeksBetween:_e,addToDate:N,compareTimestamps:Z,compareDate:Y,compareTime:P,compareDateTime:$,getWeekdayFormatter:Se,getWeekdayNames:Me,getMonthFormatter:Fe,getMonthNames:Ie,convertToUnit:Ae,indexOf:Ce,install(e){e.component(yt.name,yt)}};return ht});