New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@quasar/quasar-ui-qcalendar

Package Overview
Dependencies
Maintainers
0
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quasar/quasar-ui-qcalendar - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

10

dist/api/QCalendarDay.json

@@ -483,6 +483,9 @@ {

"selected-dates": {
"type": "Array",
"type": [
"Array",
"Set"
],
"tsType": "StringArray",
"category": "model",
"desc": "An array of string dates in the form `YYYY-MM-DD` that will be selected. Interval-based calendars use `YYYY-MM-DD HH:mm`",
"desc": "An array, or Set, of string dates in the form `YYYY-MM-DD` that will be selected. Interval-based calendars use `YYYY-MM-DD HH:mm`",
"examples": [

@@ -499,3 +502,4 @@ ":selected-dates=\"['2019-04-01', '2019-04-02', '2019-04-03', '2019-04-04']\"",

"examples": [
":selected-start-end-dates=\"getStartEndDates\""
":selected-start-end-dates=\"getStartEndDates\"",
"selectedStartEndDates: [['2020-08-08', '2020-08-09']]"
]

@@ -502,0 +506,0 @@ },

@@ -467,6 +467,9 @@ {

"selected-dates": {
"type": "Array",
"type": [
"Array",
"Set"
],
"tsType": "StringArray",
"category": "model",
"desc": "An array of string dates in the form `YYYY-MM-DD` that will be selected. Interval-based calendars use `YYYY-MM-DD HH:mm`",
"desc": "An array, or Set, of string dates in the form `YYYY-MM-DD` that will be selected. Interval-based calendars use `YYYY-MM-DD HH:mm`",
"examples": [

@@ -483,3 +486,4 @@ ":selected-dates=\"['2019-04-01', '2019-04-02', '2019-04-03', '2019-04-04']\"",

"examples": [
":selected-start-end-dates=\"getStartEndDates\""
":selected-start-end-dates=\"getStartEndDates\"",
"selectedStartEndDates: [['2020-08-08', '2020-08-09']]"
]

@@ -486,0 +490,0 @@ },

/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===s;if(!(s<getDayIdentifier(e)))while((!y||c.length<l)&&c.length<d){if(v=getDayIdentifier(m),y=y||v>s&&c.length>=l,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}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 vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const l=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),s=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),y=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>l.value*m.value),p=vue.computed(()=>s.value*v.value),f=vue.computed(()=>s.value*y.value),h=vue.computed(()=>T(r.value)),g=vue.computed(()=>I(o.value)),D=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),_=vue.computed(()=>{return D.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),O=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientX,s=(l-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*y.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/y.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let u=o*p.value;return t&&(u<0&&(u=0),u>p.value)&&(u=p.value),u}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:O,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:L,getTimestampAtEvent:R,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarAgenda=vue.defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:v,emit:i,expose:L}){const e=vue.ref(null),R=vue.ref(null),Y=vue.ref(null),y=vue.ref(null),t=vue.ref(null),p=vue.ref({}),a=vue.ref({}),n=vue.ref({}),u=vue.ref("next"),d=vue.ref(today()),l=vue.ref("0000-00-00"),s=vue.ref(0),c=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),h=vue.ref(!1),x=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>m.view,()=>{s.value=0}),vue.computed(()=>{return"month"===m.view?"month-interval":m.view})),q=vue.getCurrentInstance();if(null===q)throw new Error("current instance is null");const P=useEmitListeners(q).emitListeners,g=useCellWidth(m).isSticky,{times:o,setCurrent:B,updateCurrent:z}=(vue.watch(g,()=>{}),useTimes(m)),{weekdaySkips:D,parsedStart:$,parsedEnd:V,dayFormatter:K,weekdayFormatter:X,ariaDateFormatter:Z,dayStyleDefault:j,getRelativeClasses:_}=(z(),B(),useCommon(m,{startDate:d,endDate:l,times:o})),T=vue.computed(()=>{return parseTimestamp(m.modelValue,o.now)||$.value||o.today}),Q=(t.value=T.value,y.value=T.value.date,useRenderValues(m,{parsedView:r,parsedValue:T,times:o})).renderValues,{rootRef:I,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=useCalendar(m,Se,{scrollArea:e,pane:R}),{days:k,parsedCellWidth:te,getScopeForSlot:w}=useInterval(m,{weekdaySkips:D,times:o,scrollArea:e,parsedStart:$,parsedEnd:V,maxDays:s,size:f,headerColumnRef:Y}),N=useMove(m,{parsedView:r,parsedValue:T,weekdaySkips:D,direction:u,maxDays:s,times:o,emittedValue:c,emit:i}).move,M=useMouse(i,P).getDefaultMouseEventHandlers,ae=useCheckChange(i,{days:k,lastStart:x,lastEnd:U}).checkChange,ne=useEvents().isKeyCode,re=useKeyboard(m,{rootRef:I,focusRef:y,focusValue:t,datesRef:p,days:k,parsedView:r,parsedValue:T,emittedValue:c,weekdaySkips:D,direction:u,times:o}).tryFocus,S=vue.computed(()=>{return k.value.length+(!0===O.value?m.leftColumnOptions.length:0)+(!0===E.value?m.rightColumnOptions.length:0)+k.value.length===1&&parseInt(m.columnCount,10)>0?parseInt(m.columnCount,10):0}),O=vue.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),E=vue.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),b=vue.computed(()=>{if(I.value){const e=f.width||I.value.getBoundingClientRect().width;if(e&&S.value)return(e-J.value)/S.value+"px"}return 100/S.value+"%"});function oe(){c.value=today()}function ue(e=1){N(e)}function ie(e=1){N(-e)}function de({width:e,height:t}){f.width=e,f.height=t}function A(e){return e.date===c.value}function C(t,a){const e=v["head-column"],n={column:t,index:a,days:k.value},r=!0===g.value?m.cellWidth:b.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:void 0,i={maxWidth:r,width:r};return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",n)?h.value=u:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",n)?h.value=u:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",n)?h.value=u:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",n)?h.value=u:h.value="")},...M("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&le(t),e&&e(n),useFocusHelper()])}function le(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=vue.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&vue.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:vue.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return vue.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:J.value+"px"}},[ce()])}function ce(){return vue.h("div",{ref:Y,class:{"q-calendar-agenda__head--days__column":!0}},[me(),ve()])}function me(){return vue.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ye()])}function ve(){const e=v["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:k.value,ref:n}})]),...pe()])}function ye(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[!0===O.value&&m.leftColumnOptions.map((e,t)=>C(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>fe(k.value[0],e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>C(e,t))]:[!0===O.value&&m.leftColumnOptions.map((e,t)=>C(e,t)),k.value.map(e=>fe(e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>C(e,t))]}function pe(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>ge(k.value[0],e))]:k.value.map(e=>ge(e))}function fe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&A(t),o=w(t,e),u=(o.activeDate=r,o.droppable=h.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===g.value?m.cellWidth:b.value),i=m.weekdayStyle||j,d={width:u,maxWidth:u,...i({scope:o})},l=(!0===g.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{p.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?h.value=t.date:h.value="")},onFocus:()=>{!0===s&&(y.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}})};return vue.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function he(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&H(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&H(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&H(e),!0!==m.noDefaultHeaderText&&W(e)])):void 0}function ge(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&A(e),r=w(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===g.value?m.cellWidth:b.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function W(e){const t=v["head-weekday-label"],a=w(e),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",n,t&&t({scope:a})||De(e,m.shortWeekdayLabel))}function De(e,t){const a=X.value(e,t||m.weekdayBreakpoints[0]>0&&te.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&te.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function H(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,_e(e))}function _e(a){const e=!0!==m.noActiveDate&&A(a),t=K.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ne(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ne(e,[13,32])&&(c.value=a.date,void 0!==P.value.onClickDate)&&i("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):useButton(m,u,n?n({scope:o}):t)}function Te(){return vue.h("div",{class:"q-calendar-agenda__body"},[Ie()])}function Ie(){return!0===g.value?vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()]):!0===m.noScroll?ke():vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return vue.h("div",{ref:R,class:"q-calendar-agenda__pane"},[we()])}function we(){const e=v["day-container"];return vue.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==m.noHeader&&se(),vue.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ne()]),e&&e({scope:{days:k.value}})])}function Ne(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[!0===O.value&&m.leftColumnOptions.map((e,t)=>F(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Me(k.value[0],0,e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>F(e,t))]:[!0===O.value&&m.leftColumnOptions.map((e,t)=>F(e,t)),k.value.map((e,t)=>Me(e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>F(e,t))]}function F(e,t){const a=v.column,n={column:e,days:k.value,index:t},r=!0===g.value?m.cellWidth:b.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",n)?h.value=u:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",n)?h.value=u:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",n)?h.value=u:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",n)?h.value=u:h.value="")},...M("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Me(e,t,a){const n=v.day,r=w(e,a),o=!0===g.value?m.cellWidth:b.value,u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),u.height=parseInt(m.dayHeight,10)>0?convertToUnit(parseInt(m.dayHeight,10)):"auto",parseInt(m.dayMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,..._(e)},style:u},[n&&n({scope:r})])}function Se(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&l.value===t.date&&s.value===a||(d.value=e.date,l.value=t.date,s.value=a),f.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==m.noHeader&&se(),!0===n&&Te()]),[[ResizeObserver$1,de]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([k],ae,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c.value=e}y.value=e}),vue.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(y,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{p.value[y.value]?p.value[y.value].focus():re()}),vue.watch(()=>m.maxDays,e=>{s.value=e}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{G()}),L({prev:ie,next:ue,move:N,moveToToday:oe,updateCurrent:z}),()=>ee()}});const version="4.0.1";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};module.exports=Plugin;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===s;if(!(s<getDayIdentifier(e)))while((!y||c.length<l)&&c.length<d){if(v=getDayIdentifier(m),y=y||v>s&&c.length>=l,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}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 vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const l=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),s=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),y=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>l.value*m.value),p=vue.computed(()=>s.value*v.value),f=vue.computed(()=>s.value*y.value),h=vue.computed(()=>T(r.value)),g=vue.computed(()=>I(o.value)),D=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),_=vue.computed(()=>{return D.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),O=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientX,s=(l-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*y.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/y.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let u=o*p.value;return t&&(u<0&&(u=0),u>p.value)&&(u=p.value),u}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:O,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:L,getTimestampAtEvent:R,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const u=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),l=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(l):r[d]=[r[d],l]:r[d]=l}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarAgenda=vue.defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:v,emit:i,expose:L}){const e=vue.ref(null),R=vue.ref(null),Y=vue.ref(null),y=vue.ref(null),t=vue.ref(null),p=vue.ref({}),a=vue.ref({}),n=vue.ref({}),u=vue.ref("next"),d=vue.ref(today()),l=vue.ref("0000-00-00"),s=vue.ref(0),c=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),h=vue.ref(!1),x=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>m.view,()=>{s.value=0}),vue.computed(()=>{return"month"===m.view?"month-interval":m.view})),q=vue.getCurrentInstance();if(null===q)throw new Error("current instance is null");const P=useEmitListeners(q).emitListeners,g=useCellWidth(m).isSticky,{times:o,setCurrent:B,updateCurrent:z}=(vue.watch(g,()=>{}),useTimes(m)),{weekdaySkips:D,parsedStart:V,parsedEnd:K,dayFormatter:X,weekdayFormatter:$,ariaDateFormatter:Z,dayStyleDefault:j,getRelativeClasses:_}=(z(),B(),useCommon(m,{startDate:d,endDate:l,times:o})),T=vue.computed(()=>{return parseTimestamp(m.modelValue,o.now)||V.value||o.today}),Q=(t.value=T.value,y.value=T.value.date,useRenderValues(m,{parsedView:r,parsedValue:T,times:o})).renderValues,{rootRef:I,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=useCalendar(m,Se,{scrollArea:e,pane:R}),{days:k,parsedCellWidth:te,getScopeForSlot:w}=useInterval(m,{weekdaySkips:D,times:o,scrollArea:e,parsedStart:V,parsedEnd:K,maxDays:s,size:f,headerColumnRef:Y}),N=useMove(m,{parsedView:r,parsedValue:T,weekdaySkips:D,direction:u,maxDays:s,times:o,emittedValue:c,emit:i}).move,M=useMouse(i,P).getDefaultMouseEventHandlers,ae=useCheckChange(i,{days:k,lastStart:x,lastEnd:U}).checkChange,ne=useEvents().isKeyCode,re=useKeyboard(m,{rootRef:I,focusRef:y,focusValue:t,datesRef:p,days:k,parsedView:r,parsedValue:T,emittedValue:c,weekdaySkips:D,direction:u,times:o}).tryFocus,S=vue.computed(()=>{return k.value.length+(!0===O.value?m.leftColumnOptions.length:0)+(!0===E.value?m.rightColumnOptions.length:0)+k.value.length===1&&parseInt(m.columnCount,10)>0?parseInt(m.columnCount,10):0}),O=vue.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),E=vue.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),b=vue.computed(()=>{if(I.value){const e=f.width||I.value.getBoundingClientRect().width;if(e&&S.value)return(e-J.value)/S.value+"px"}return 100/S.value+"%"});function oe(){c.value=today()}function ue(e=1){N(e)}function ie(e=1){N(-e)}function de({width:e,height:t}){f.width=e,f.height=t}function A(e){return e.date===c.value}function C(t,a){const e=v["head-column"],n={column:t,index:a,days:k.value},r=!0===g.value?m.cellWidth:b.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:void 0,i={maxWidth:r,width:r};return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",n)?h.value=u:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",n)?h.value=u:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",n)?h.value=u:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",n)?h.value=u:h.value="")},...M("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&le(t),e&&e(n),useFocusHelper()])}function le(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=vue.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&vue.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:vue.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return vue.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:J.value+"px"}},[ce()])}function ce(){return vue.h("div",{ref:Y,class:{"q-calendar-agenda__head--days__column":!0}},[me(),ve()])}function me(){return vue.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ye()])}function ve(){const e=v["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:k.value,ref:n}})]),...pe()])}function ye(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[!0===O.value&&m.leftColumnOptions.map((e,t)=>C(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>fe(k.value[0],e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>C(e,t))]:[!0===O.value&&m.leftColumnOptions.map((e,t)=>C(e,t)),k.value.map(e=>fe(e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>C(e,t))]}function pe(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>ge(k.value[0],e))]:k.value.map(e=>ge(e))}function fe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&A(t),o=w(t,e),u=(o.activeDate=r,o.droppable=h.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===g.value?m.cellWidth:b.value),i=m.weekdayStyle||j,d={width:u,maxWidth:u,...i({scope:o})},l=(!0===g.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{p.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?h.value=t.date:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?h.value=t.date:h.value="")},onFocus:()=>{!0===s&&(y.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}})};return vue.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function he(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&H(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&H(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&H(e),!0!==m.noDefaultHeaderText&&W(e)])):void 0}function ge(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&A(e),r=w(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===g.value?m.cellWidth:b.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function W(e){const t=v["head-weekday-label"],a=w(e),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",n,t&&t({scope:a})||De(e,m.shortWeekdayLabel))}function De(e,t){const a=$.value(e,t||m.weekdayBreakpoints[0]>0&&te.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&te.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function H(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,_e(e))}function _e(a){const e=!0!==m.noActiveDate&&A(a),t=X.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ne(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ne(e,[13,32])&&(c.value=a.date,void 0!==P.value.onClickDate)&&i("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):useButton(m,u,n?n({scope:o}):t)}function Te(){return vue.h("div",{class:"q-calendar-agenda__body"},[Ie()])}function Ie(){return!0===g.value?vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()]):!0===m.noScroll?ke():vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return vue.h("div",{ref:R,class:"q-calendar-agenda__pane"},[we()])}function we(){const e=v["day-container"];return vue.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==m.noHeader&&se(),vue.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ne()]),e&&e({scope:{days:k.value}})])}function Ne(){return 1===k.value.length&&parseInt(m.columnCount,10)>0?[!0===O.value&&m.leftColumnOptions.map((e,t)=>F(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Me(k.value[0],0,e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>F(e,t))]:[!0===O.value&&m.leftColumnOptions.map((e,t)=>F(e,t)),k.value.map((e,t)=>Me(e)),!0===E.value&&m.rightColumnOptions.map((e,t)=>F(e,t))]}function F(e,t){const a=v.column,n={column:e,days:k.value,index:t},r=!0===g.value?m.cellWidth:b.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",n)?h.value=u:h.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",n)?h.value=u:h.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",n)?h.value=u:h.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",n)?h.value=u:h.value="")},...M("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Me(e,t,a){const n=v.day,r=w(e,a),o=!0===g.value?m.cellWidth:b.value,u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),u.height=parseInt(m.dayHeight,10)>0?convertToUnit(parseInt(m.dayHeight,10)):"auto",parseInt(m.dayMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,..._(e)},style:u},[n&&n({scope:r})])}function Se(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&l.value===t.date&&s.value===a||(d.value=e.date,l.value=t.date,s.value=a),f.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==m.noHeader&&se(),!0===n&&Te()]),[[ResizeObserver$1,de]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([k],ae,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c.value=e}y.value=e}),vue.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(y,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{p.value[y.value]?p.value[y.value].focus():re()}),vue.watch(()=>m.maxDays,e=>{s.value=e}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{G()}),L({prev:ie,next:ue,move:N,moveToToday:oe,updateCurrent:z}),()=>ee()}});const version="4.0.2";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],d=[],u=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,p=y===s;if(!(s<getDayIdentifier(e)))while((!p||c.length<l)&&c.length<u){if(y=getDayIdentifier(m),p=p||y>s&&c.length>=l,p)break;if(0===n[m.weekday]);else{const v=copyTimestamp(m);updateFormatted(v),updateRelative(v,a),updateDisabled(v,r,o,i,d),c.push(v)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}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 withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),d=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=c(n,e);return{"q-past-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===u,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===i||!0===d||!0===u),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:p,dayStyleDefault:v}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getVerticalScrollPosition(n);o<=0?d!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getHorizontalScrollPosition(n);o<=0?d!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:d,headerColumnRef:u}){const l=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),s=computed(()=>parseInt(t.intervalCount,10)),y=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&u.value&&(e=u.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>l.value*m.value),v=computed(()=>s.value*y.value),f=computed(()=>s.value*p.value),h=computed(()=>T(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return D.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),O=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientX,s=(l-o.left)/p.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*y.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/y.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:v,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:O,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:L,getTimestampAtEvent:R,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),d=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};i in t?Array.isArray(t[i])?t[i].push(d):t[i]=[t[i],d]:t[i]=d}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:u,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,weekdaySkips:u,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function v(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:d,expose:R}){const e=ref(null),Y=ref(null),x=ref(null),p=ref(null),t=ref(null),v=ref({}),a=ref({}),n=ref({}),i=ref("next"),u=ref(today()),l=ref("0000-00-00"),s=ref(0),c=ref(m.modelValue),f=reactive({width:0,height:0}),g=ref(!1),U=ref(null),q=ref(null),r=(watch(()=>m.view,()=>{s.value=0}),computed(()=>{return"month"===m.view?"month-interval":m.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const B=useEmitListeners(P).emitListeners,D=useCellWidth(m).isSticky,{times:o,setCurrent:z,updateCurrent:$}=(watch(D,()=>{}),useTimes(m)),{weekdaySkips:_,parsedStart:V,parsedEnd:K,dayFormatter:X,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:Q,getRelativeClasses:T}=($(),z(),useCommon(m,{startDate:u,endDate:l,times:o})),I=computed(()=>{return parseTimestamp(m.modelValue,o.now)||V.value||o.today}),J=(t.value=I.value,p.value=I.value.date,useRenderValues(m,{parsedView:r,parsedValue:I,times:o})).renderValues,{rootRef:k,scrollWidth:G,__initCalendar:ee,__renderCalendar:te}=useCalendar(m,Oe,{scrollArea:e,pane:Y}),{days:w,parsedCellWidth:ae,getScopeForSlot:N}=useInterval(m,{weekdaySkips:_,times:o,scrollArea:e,parsedStart:V,parsedEnd:K,maxDays:s,size:f,headerColumnRef:x}),M=useMove(m,{parsedView:r,parsedValue:I,weekdaySkips:_,direction:i,maxDays:s,times:o,emittedValue:c,emit:d}).move,S=useMouse(d,B).getDefaultMouseEventHandlers,ne=useCheckChange(d,{days:w,lastStart:U,lastEnd:q}).checkChange,re=useEvents().isKeyCode,oe=useKeyboard(m,{rootRef:k,focusRef:p,focusValue:t,datesRef:v,days:w,parsedView:r,parsedValue:I,emittedValue:c,weekdaySkips:_,direction:i,times:o}).tryFocus,O=computed(()=>{return w.value.length+(!0===E.value?m.leftColumnOptions.length:0)+(!0===b.value?m.rightColumnOptions.length:0)+w.value.length===1&&parseInt(m.columnCount,10)>0?parseInt(m.columnCount,10):0}),E=computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),b=computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),A=computed(()=>{if(k.value){const e=f.width||k.value.getBoundingClientRect().width;if(e&&O.value)return(e-G.value)/O.value+"px"}return 100/O.value+"%"});function ie(){c.value=today()}function de(e=1){M(e)}function ue(e=1){M(-e)}function le({width:e,height:t}){f.width=e,f.height=t}function C(e){return e.date===c.value}function W(t,a){const e=y["head-column"],n={column:t,index:a,days:w.value},r=!0===D.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("weekday"),i=void 0!==m.columnOptionsId?t[m.columnOptionsId]:void 0,d={maxWidth:r,width:r};return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",n)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",n)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",n)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",n)?g.value=i:g.value="")},...S("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&se(t),e&&e(n),useFocusHelper()])}function se(e){const t=y["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function ce(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===D.value},style:{marginRight:G.value+"px"}},[me()])}function me(){return h("div",{ref:x,class:{"q-calendar-agenda__head--days__column":!0}},[ye(),pe()])}function ye(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ve()])}function pe(){const e=y["head-days-events"];return nextTick(()=>{if(n.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:w.value,ref:n}})]),...fe()])}function ve(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[!0===E.value&&m.leftColumnOptions.map((e,t)=>W(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>he(w.value[0],e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>W(e,t))]:[!0===E.value&&m.leftColumnOptions.map((e,t)=>W(e,t)),w.value.map(e=>he(e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>W(e,t))]}function fe(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>De(w.value[0],e))]:w.value.map(e=>De(e))}function he(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&C(t),o=N(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===D.value?m.cellWidth:A.value),d=m.weekdayStyle||Q,u={width:i,maxWidth:i,...d({scope:o})},l=(!0===D.value&&(u.minWidth=i),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{v.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,...T(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:u,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")},onFocus:()=>{!0===s&&(p.value=t.date)},...S("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function ge(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&H(e),!0!==m.noDefaultHeaderBtn&&F(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&H(e),!0!==m.noDefaultHeaderBtn&&F(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&F(e),!0!==m.noDefaultHeaderText&&H(e)])):void 0}function De(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&C(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===D.value?m.cellWidth:A.value),i={width:o,maxWidth:o};return!0===D.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...T(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function H(e){const t=y["head-weekday-label"],a=N(e),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",n,t&&t({scope:a})||_e(e,m.shortWeekdayLabel))}function _e(e,t){const a=Z.value(e,t||m.weekdayBreakpoints[0]>0&&ae.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&ae.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function F(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Te(e))}function Te(a){const e=!0!==m.noActiveDate&&C(a),t=X.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&re(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&re(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&d("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=j.value(a)),r?r({scope:o}):useButton(m,i,n?n({scope:o}):t)}function Ie(){return h("div",{class:"q-calendar-agenda__body"},[ke()])}function ke(){return!0===D.value?h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ne()]):!0===m.noScroll?we():h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()])}function we(){return h("div",{ref:Y,class:"q-calendar-agenda__pane"},[Ne()])}function Ne(){const e=y["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===D.value&&!0!==m.noHeader&&ce(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Me()]),e&&e({scope:{days:w.value}})])}function Me(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[!0===E.value&&m.leftColumnOptions.map((e,t)=>L(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Se(w.value[0],0,e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>L(e,t))]:[!0===E.value&&m.leftColumnOptions.map((e,t)=>L(e,t)),w.value.map((e,t)=>Se(e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>L(e,t))]}function L(e,t){const a=y.column,n={column:e,days:w.value,index:t},r=!0===D.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("day"),i=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",n)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",n)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",n)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",n)?g.value=i:g.value="")},...S("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=y.day,r=N(e,a),o=!0===D.value?m.cellWidth:A.value,i={width:o,maxWidth:o};return!0===D.value&&(i.minWidth=o),i.height=parseInt(m.dayHeight,10)>0?convertToUnit(parseInt(m.dayHeight,10)):"auto",parseInt(m.dayMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...T(e)},style:i},[n&&n({scope:r})])}function Oe(){const{start:e,end:t,maxDays:a}=J.value,n=(u.value===e.date&&l.value===t.date&&s.value===a||(u.value=e.date,l.value=t.date,s.value=a),f.width>0),r=withDirectives(h("div",{class:"q-calendar-agenda",key:u.value},[!0===n&&!0!==D.value&&!0!==m.noHeader&&ce(),!0===n&&Ie()]),[[ResizeObserver$1,le]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([w],ne,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c.value=e}p.value=e}),watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}d("update:model-value",e)}}),watch(p,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{v.value[p.value]?v.value[p.value].focus():oe()}),watch(()=>m.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{v.value={}}),onMounted(()=>{ee()}),R({prev:ue,next:de,move:M,moveToToday:ie,updateCurrent:$}),()=>te()}});const version="4.0.1";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};export{QCalendarAgenda,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],d=[],u=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,p=y===s;if(!(s<getDayIdentifier(e)))while((!p||c.length<l)&&c.length<u){if(y=getDayIdentifier(m),p=p||y>s&&c.length>=l,p)break;if(0===n[m.weekday]);else{const v=copyTimestamp(m);updateFormatted(v),updateRelative(v,a),updateDisabled(v,r,o,i,d),c.push(v)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}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 withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),d=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=c(n,e);return{"q-past-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===u,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===i||!0===d||!0===u),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:p,dayStyleDefault:v}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getVerticalScrollPosition(n);o<=0?d!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getHorizontalScrollPosition(n);o<=0?d!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:d,headerColumnRef:u}){const l=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),s=computed(()=>parseInt(t.intervalCount,10)),y=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&u.value&&(e=u.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>l.value*m.value),v=computed(()=>s.value*y.value),f=computed(()=>s.value*p.value),h=computed(()=>T(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return D.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),O=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientX,s=(l-o.left)/p.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*y.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/y.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:v,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:O,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:L,getTimestampAtEvent:R,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const i=t[o],d=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[d]){const u="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),l=e=>{const t=e;return(void 0===i.button||t.buttons>0&&t.button===i.button)&&(i.prevent&&t.preventDefault(),i.stop&&t.stopPropagation(),a(o,n(t,o))),i.result};u in r?Array.isArray(r[u])?r[u].push(l):r[u]=[r[u],l]:r[u]=l}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:u,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,weekdaySkips:u,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function v(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:d,expose:R}){const e=ref(null),Y=ref(null),x=ref(null),p=ref(null),t=ref(null),v=ref({}),a=ref({}),n=ref({}),i=ref("next"),u=ref(today()),l=ref("0000-00-00"),s=ref(0),c=ref(m.modelValue),f=reactive({width:0,height:0}),g=ref(!1),U=ref(null),q=ref(null),r=(watch(()=>m.view,()=>{s.value=0}),computed(()=>{return"month"===m.view?"month-interval":m.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const B=useEmitListeners(P).emitListeners,D=useCellWidth(m).isSticky,{times:o,setCurrent:z,updateCurrent:V}=(watch(D,()=>{}),useTimes(m)),{weekdaySkips:_,parsedStart:K,parsedEnd:X,dayFormatter:$,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:Q,getRelativeClasses:T}=(V(),z(),useCommon(m,{startDate:u,endDate:l,times:o})),I=computed(()=>{return parseTimestamp(m.modelValue,o.now)||K.value||o.today}),J=(t.value=I.value,p.value=I.value.date,useRenderValues(m,{parsedView:r,parsedValue:I,times:o})).renderValues,{rootRef:k,scrollWidth:G,__initCalendar:ee,__renderCalendar:te}=useCalendar(m,Oe,{scrollArea:e,pane:Y}),{days:w,parsedCellWidth:ae,getScopeForSlot:N}=useInterval(m,{weekdaySkips:_,times:o,scrollArea:e,parsedStart:K,parsedEnd:X,maxDays:s,size:f,headerColumnRef:x}),M=useMove(m,{parsedView:r,parsedValue:I,weekdaySkips:_,direction:i,maxDays:s,times:o,emittedValue:c,emit:d}).move,S=useMouse(d,B).getDefaultMouseEventHandlers,ne=useCheckChange(d,{days:w,lastStart:U,lastEnd:q}).checkChange,re=useEvents().isKeyCode,oe=useKeyboard(m,{rootRef:k,focusRef:p,focusValue:t,datesRef:v,days:w,parsedView:r,parsedValue:I,emittedValue:c,weekdaySkips:_,direction:i,times:o}).tryFocus,O=computed(()=>{return w.value.length+(!0===E.value?m.leftColumnOptions.length:0)+(!0===b.value?m.rightColumnOptions.length:0)+w.value.length===1&&parseInt(m.columnCount,10)>0?parseInt(m.columnCount,10):0}),E=computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),b=computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),A=computed(()=>{if(k.value){const e=f.width||k.value.getBoundingClientRect().width;if(e&&O.value)return(e-G.value)/O.value+"px"}return 100/O.value+"%"});function ie(){c.value=today()}function de(e=1){M(e)}function ue(e=1){M(-e)}function le({width:e,height:t}){f.width=e,f.height=t}function C(e){return e.date===c.value}function W(t,a){const e=y["head-column"],n={column:t,index:a,days:w.value},r=!0===D.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("weekday"),i=void 0!==m.columnOptionsId?t[m.columnOptionsId]:void 0,d={maxWidth:r,width:r};return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",n)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",n)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",n)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",n)?g.value=i:g.value="")},...S("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&se(t),e&&e(n),useFocusHelper()])}function se(e){const t=y["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function ce(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===D.value},style:{marginRight:G.value+"px"}},[me()])}function me(){return h("div",{ref:x,class:{"q-calendar-agenda__head--days__column":!0}},[ye(),pe()])}function ye(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ve()])}function pe(){const e=y["head-days-events"];return nextTick(()=>{if(n.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:w.value,ref:n}})]),...fe()])}function ve(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[!0===E.value&&m.leftColumnOptions.map((e,t)=>W(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>he(w.value[0],e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>W(e,t))]:[!0===E.value&&m.leftColumnOptions.map((e,t)=>W(e,t)),w.value.map(e=>he(e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>W(e,t))]}function fe(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>De(w.value[0],e))]:w.value.map(e=>De(e))}function he(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&C(t),o=N(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===D.value?m.cellWidth:A.value),d=m.weekdayStyle||Q,u={width:i,maxWidth:i,...d({scope:o})},l=(!0===D.value&&(u.minWidth=i),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{v.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,...T(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:u,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")},onFocus:()=>{!0===s&&(p.value=t.date)},...S("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function ge(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&H(e),!0!==m.noDefaultHeaderBtn&&F(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&H(e),!0!==m.noDefaultHeaderBtn&&F(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&F(e),!0!==m.noDefaultHeaderText&&H(e)])):void 0}function De(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&C(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===D.value?m.cellWidth:A.value),i={width:o,maxWidth:o};return!0===D.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...T(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function H(e){const t=y["head-weekday-label"],a=N(e),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",n,t&&t({scope:a})||_e(e,m.shortWeekdayLabel))}function _e(e,t){const a=Z.value(e,t||m.weekdayBreakpoints[0]>0&&ae.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&ae.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function F(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Te(e))}function Te(a){const e=!0!==m.noActiveDate&&C(a),t=$.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&re(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&re(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&d("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=j.value(a)),r?r({scope:o}):useButton(m,i,n?n({scope:o}):t)}function Ie(){return h("div",{class:"q-calendar-agenda__body"},[ke()])}function ke(){return!0===D.value?h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ne()]):!0===m.noScroll?we():h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()])}function we(){return h("div",{ref:Y,class:"q-calendar-agenda__pane"},[Ne()])}function Ne(){const e=y["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===D.value&&!0!==m.noHeader&&ce(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Me()]),e&&e({scope:{days:w.value}})])}function Me(){return 1===w.value.length&&parseInt(m.columnCount,10)>0?[!0===E.value&&m.leftColumnOptions.map((e,t)=>L(e,t)),Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Se(w.value[0],0,e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>L(e,t))]:[!0===E.value&&m.leftColumnOptions.map((e,t)=>L(e,t)),w.value.map((e,t)=>Se(e)),!0===b.value&&m.rightColumnOptions.map((e,t)=>L(e,t))]}function L(e,t){const a=y.column,n={column:e,days:w.value,index:t},r=!0===D.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("day"),i=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",n)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",n)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",n)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",n)?g.value=i:g.value="")},...S("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=y.day,r=N(e,a),o=!0===D.value?m.cellWidth:A.value,i={width:o,maxWidth:o};return!0===D.value&&(i.minWidth=o),i.height=parseInt(m.dayHeight,10)>0?convertToUnit(parseInt(m.dayHeight,10)):"auto",parseInt(m.dayMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...T(e)},style:i},[n&&n({scope:r})])}function Oe(){const{start:e,end:t,maxDays:a}=J.value,n=(u.value===e.date&&l.value===t.date&&s.value===a||(u.value=e.date,l.value=t.date,s.value=a),f.width>0),r=withDirectives(h("div",{class:"q-calendar-agenda",key:u.value},[!0===n&&!0!==D.value&&!0!==m.noHeader&&ce(),!0===n&&Ie()]),[[ResizeObserver$1,le]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([w],ne,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c.value=e}p.value=e}),watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}d("update:model-value",e)}}),watch(p,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{v.value[p.value]?v.value[p.value].focus():oe()}),watch(()=>m.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{v.value={}}),onMounted(()=>{ee()}),R({prev:ue,next:de,move:M,moveToToday:ie,updateCurrent:V}),()=>te()}});const version="4.0.2";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};export{QCalendarAgenda,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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.QCalendarAgenda=t(e.Vue))})(this,function(Ce){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,y=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,O=31,l=12,n=1,h=1,o=7,r=60,u=24,C=0,N=6e4,A=36e5,F=864e5,M=6048e5,E=60,W=3600,q=86400,x=604800,H={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},L={hour:0,minute:0};function t(e){return!!a.exec(e)}function Ne(e){const t=a.exec(e);return t?{date:e,time:d(parseInt(t[6],10)||0,2)+":"+d(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 R(e,t=!1){const a=t?"UTC":"";return w({date:d(e[`get${a}FullYear`](),4)+"-"+d(e[`get${a}Month`]()+1,2)+"-"+d(e[`get${a}Date`](),2),time:d(e[`get${a}Hours`]()||0,2)+":"+d(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 d(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function U(e){return 1===(e%4===0^e%100===0^e%400===0)}function i(e,t){return(U(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>i(e.year,e.month)&&(e.day=h,++e.month,e.month>l)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=l),e.day=i(e.year,e.month)),e}function Ae(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,d(t,2),d(a,2)].join("-")}function B(e){return e===Ae()}function z(e,t,a){let n=K(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=X(n,a,n.hasTime)),n}function P(e,t,a){let n=K(e);const r=i(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],p),n=w(n),a&&(n=X(n,a,n.hasTime)),n}function I(e){const t=K(e);return t.day=h,w(t),t}function S(e){const t=K(e);return t.day=i(t.year,t.month),w(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 Y(e,t){return JSON.stringify(e)===JSON.stringify(t)}function V(e,t){return c(e)===c(t)}function Z(e,t){return v(e)===v(t)}function ee(e,t){return Q(e)===Q(t)}function Fe(e,t){let a=Ne(e);return null===a?null:(a=w(a),t&&X(a,t,a.hasTime),a)}function Me(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function j(e){return Me(e)+s(e)}function te(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 X(e,t,a=!1){let n=Me(t),r=Me(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ae(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&X(e,a,!0),e}function ne(e){return e.weekday=ie(e),e}function re(e){return e.doy=le(e),e}function oe(e){return e.workweek=de(e),e}function ue(e,t,a,n,r){const o=Me(e);if(void 0!==t){const d=Me(Ne(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=Me(Ne(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=Ne(r[l][0]),c=Ne(r[l][1]);if(ge(e,s,c)){e.disabled=!0;break}}else{const v=Me(Fe(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=ie(e),e.doy=le(e),e.workweek=de(e),e}function le(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 de(e){0===e.year&&(e=Fe(Ae()));const t=fe(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)/M);return 1+Math.floor(o)}function ie(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function K(e){return{...e}}function c(e){let t=d(e.year,4)+"-"+d(e.month,2);return e.hasDay&&(t+="-"+d(e.day,2)),t}function v(e){return e.hasTime?d(e.hour,2)+":"+d(e.minute,2):""}function Q(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function se(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ce(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 ve(e,t,a,n,r,o,u=[],l=[],d=42,i=0){const s=Me(t),c=[];let v=K(e),m=0,f=m===s;if(!(s<Me(e)))while((!f||c.length<i)&&c.length<d){if(m=Me(v),f=f||m>s&&c.length>=i,f)break;if(0===n[v.weekday]);else{const y=K(v);w(y),X(y,a),ue(y,r,o,u,l),c.push(y)}v=k(v,p)}return c}function me(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,d=K(t);u.push(ae(d,l,o))}return u}function J(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(ye(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+Q(t)),o}}}function fe(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 ye(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 e(e){return isFinite(parseInt(e,10))}function he(e,t=!1){const a=!0===t?j:Me;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function pe(e,t=!1){const a=!0===t?j:Me;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ge(e,t,a,n){const r=Me(e)+(!0===n?s(e):0),o=Me(t)+(!0===n?s(t):0),u=Me(a)+(!0===n?s(a):0);return r>=o&&r<=u}function we(e,t,a,n){const r=Me(e),o=Me(t),u=Me(a),l=Me(n);return r>=u&&r<=l||o>=u&&o<=l||u>=r&&o>=l}function G(e,t){const n=K(e);let r;return De(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ke.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ie(n,ke[r]),w(n),n}const ke=["minute","hour","day","month"];function De(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function _e(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,be(e)}return e}function be(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Te(e)}return e}function Te(t){f(t);let a=i(t.year,t.month);if(t.day>a){++t.month,t.month>l&&f(t);let e=t.day-a;a=i(t.year,t.month);do{e>a&&(++t.month,t.month>l&&f(t),e-=a,a=i(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&&f(t),a=i(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=i(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<n&&(e.month+=l,--e.year);return e}function Ie(e,t){switch(t){case"minute":return _e(e);case"hour":return be(e);case"day":return Te(e);case"month":return f(e)}}function Se(e,t){const a=te(e,t,!0);return Math.floor(a/F)}function Oe(e,t){let a=K(e),n=K(t);return a=m(a,0),n=m(n,6),Math.ceil(Se(a,n)/o)}const Ee={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 We(){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(Ee[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function qe(t,a){const e=Object.keys(Ee),n=We();return e.map(e=>n(e,t,a))}function xe(){const o=(e,t)=>"",u={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,u[e]||u["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 He(t,a){const n=xe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Le={PARSE_DATETIME:a,PARSE_DATE:y,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:O,MONTH_MAX:l,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:C,MILLISECONDS_IN_MINUTE:N,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_WEEK:M,Timestamp:H,TimeObject:L,today:Ae,getStartOfWeek:z,getEndOfWeek:P,getStartOfMonth:I,getEndOfMonth:S,parseTime:$,validateTimestamp:t,parsed:Ne,parseTimestamp:Fe,parseDate:R,getDayIdentifier:Me,getTimeIdentifier:s,getDayTimeIdentifier:j,diffTimestamp:te,updateRelative:X,updateMinutes:ae,updateWeekday:ne,updateDayOfYear:re,updateWorkWeek:oe,updateDisabled:ue,updateFormatted:w,getDayOfYear:le,getWorkWeek:de,getWeekday:ie,isLeapYear:U,daysInMonth:i,copyTimestamp:K,padNumber:d,getDate:c,getTime:v,getDateTime:Q,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ce,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:J,makeDate:fe,makeDateTime:ye,validateNumber:e,isBetweenDates:ge,isOverlappingDates:we,daysBetween:Se,weeksBetween:Oe,addToDate:G,compareTimestamps:Y,compareDate:V,compareTime:Z,compareDateTime:ee,getWeekdayFormatter:We,getWeekdayNames:qe,getMonthFormatter:xe,getMonthNames:He},Le=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:O,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:C,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_MINUTE:N,MILLISECONDS_IN_WEEK:M,MINUTES_IN_HOUR:r,MONTH_MAX:l,MONTH_MIN:n,PARSE_DATE:y,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:W,SECONDS_IN_MINUTE:E,SECONDS_IN_WEEK:x,TimeObject:L,Timestamp:H,addToDate:G,compareDate:V,compareDateTime:ee,compareTime:Z,compareTimestamps:Y,copyTimestamp:K,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:J,daysBetween:Se,daysInMonth:i,default:Le,diffTimestamp:te,findWeekday:m,getDate:c,getDateTime:Q,getDayIdentifier:Me,getDayOfYear:le,getDayTimeIdentifier:j,getEndOfMonth:S,getEndOfWeek:P,getMonthFormatter:xe,getMonthNames:He,getStartOfMonth:I,getStartOfWeek:z,getTime:v,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:We,getWeekdayNames:qe,getWeekdaySkips:ce,getWorkWeek:de,isBetweenDates:ge,isLeapYear:U,isOverlappingDates:we,isToday:B,makeDate:fe,makeDateTime:ye,maxTimestamp:he,minTimestamp:pe,moveRelativeDays:se,nextDay:p,padNumber:d,parseDate:R,parseTime:$,parseTimestamp:Fe,parsed:Ne,prevDay:g,relativeDays:k,today:Ae,updateDayOfYear:re,updateDisabled:ue,updateFormatted:w,updateMinutes:ae,updateRelative:X,updateWeekday:ne,updateWorkWeek:oe,validateNumber:e,validateTimestamp:t,weeksBetween:Oe});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Be(e,t){return 0===t?e:e.slice(0,t)}var Ye={convertToUnit:Re,indexOf:Ue},Ye=Object.freeze({__proto__:null,convertToUnit:Re,default:Ye,indexOf:Ue,minCharWidth:Be}),Ve={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 Ze(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=Ce.reactive({width:0,height:0}),o=Ce.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ce.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ce.withDirectives(Ce.h("div",{...e},[a()]),[[Ve,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:d,__renderCalendar:i}}const ze={modelValue:{type:String,default:Ae(),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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function Pe(t,{startDate:e,endDate:a,times:n}){const r=Ce.computed(()=>ce(t.weekdays)),o=Ce.computed(()=>Fe(e.value)),u=Ce.computed(()=>{return"0000-00-00"===a.value?f(o.value):Fe(a.value)}),l=Ce.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return J(t.locale,()=>e)}),d=Ce.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return J(t.locale,(e,t)=>t?n:a)}),i=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return J(t.locale,()=>e)});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=Me(t),r=Me(Ne(e[0])),o=Me(Ne(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:u,lastDay:l,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return z(e,t.weekdays,n.today)}function f(e){return P(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:d,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function $e(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function je(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function Xe(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Ke(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Qe(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Xe(n);o<=0?l!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;$e(n,a),a!==r&&Qe(n,r,o-t,e)})}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Ke(n);o<=0?l!==r&&je(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Je(n,r,o-t,e)})}const Ge={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:e},dayMinHeight:{type:[Number,String],default:40,validator:e}};function et(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:l,headerColumnRef:d}){const i=Ce.computed(()=>parseInt(t.intervalStart,10)),v=Ce.computed(()=>parseInt(t.intervalMinutes,10)),s=Ce.computed(()=>parseInt(t.intervalCount,10)),m=Ce.computed(()=>parseFloat(t.intervalHeight)),f=Ce.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:l.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=Ce.computed(()=>i.value*v.value),y=Ce.computed(()=>s.value*m.value),h=Ce.computed(()=>s.value*f.value),p=Ce.computed(()=>D(r.value)),g=Ce.computed(()=>_(o.value)),w=Ce.computed(()=>{return ve(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=Ce.computed(()=>{return w.value.map(e=>me(e,i.value,v.value,s.value,a.now))});function D(e){return z(e,t.weekdays,a.today)}function _(e){return P(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(Q(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=j(t),r=j(Ne(e[0])),o=j(Ne(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const O=Ce.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return J(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return J(t.locale,()=>e)});function N(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){}function x(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientX,s=(i-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=M,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:K(e)};return a.timeStartPosX=q,a.timeDurationWidth=E,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Qe(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function M(e){return e/v.value*m.value}function E(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function Z(e){return parseInt(e,10)*v.value/f.value}function W(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function q(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:O,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:N,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:x,getTimestampAtEvent:H,getTimestampAtEventX:L,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:M,timeDurationWidth:E,heightToMinutes:V,widthToMinutes:Z,timeStartPos:W,timeStartPosX:q}}const tt={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},at={maxDays:{type:Number,default:1}},nt={now:{type:String,validator:e=>""===e||t(e),default:""}};function rt(e){const t=Ce.reactive({now:Fe("0000-00-00 00:00"),today:Fe("0000-00-00")}),a=Ce.computed(()=>e.now?Fe(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();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return R(new Date)}function u(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 l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ce.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function ot(r,{parsedView:o,parsedValue:u,times:l}){const e=Ce.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=z(e,r.weekdays,l.today),n=P(a,r.weekdays,l.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=se(K(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),w(n),t=i(a.year,a.month);break;case"resource":t=1,n=se(K(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ut=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let lt,dt;function it(e,a){const t={};for(const n in e){const r=e[n],o=ut("on-"+n);if(void 0===lt)return void console.warn("$listeners has not been set up");if(void 0!==lt.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),dt(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function st(e,t){return it(ct(e),t)}function ct(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 vt(e){return Object.keys(ct(e))}function mt(e,t){return dt=e,lt=t,{getMouseEventHandlers:it,getDefaultMouseEventHandlers:st,getMouseEventName:ct,getRawMouseEvents:vt}}const ft=["moved"];function yt(l,{parsedView:d,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Ae();else{let e=K(i.value);const n=a>0,r=n?p:g,o=n?O:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),ne(e);while(0===s.value[e.weekday])e=G(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,l.weekdays);break}ne(e),w(e),re(e),X(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const ht=/^on[A-Z]/;function pt(e=Ce.getCurrentInstance()){return{emitListeners:Ce.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{ht.test(e)&&(t[e]=!0)}),t})}}function gt(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ce.h("span",e)]}function wt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ce.h("button",{...a,tabindex:r?0:-1},[n,r&&gt()])}const kt={cellWidth:[Number,String]};function Dt(e){const t=Ce.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const _t=["change"];function bt(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 Tt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const It=Tt().isKeyCode,St={useNavigation:Boolean};function Ot(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:l,weekdaySkips:d,direction:i,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&It(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&It(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=G(e,{minute:parseInt(t.intervalMinutes)}));i.value="prev",n.value=e.date}function g(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return i.value="next",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=G(e,{minute:parseInt(t.intervalMinutes)}));i.value="next",n.value=e.date}function w(){let e=K(r.value);i.value="prev";do{e=G(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function k(){let e=K(r.value);i.value="next";do{e=G(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function D(){let e=K(r.value);if("month"===u.value||"month-interval"===u.value){e=G(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=G(e,{day:t})}else"day"===u.value?e=G(e,{day:-1}):"week"===u.value&&(e=G(e,{day:-7}));i.value="prev",n.value=e.date}function _(){let e=K(r.value);if("month"===u.value||"month-interval"===u.value){e=G(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=G(e,{day:t})}else"day"===u.value?e=G(e,{day:1}):"week"===u.value&&(e=G(e,{day:7}));i.value="next",n.value=e.date}function b(){let e=K(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=G(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=G(e,{day:-1});n.value=e.date}return Ce.onBeforeUnmount(()=>{v()}),Ce.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var Ct=Ce.defineComponent({name:"QCalendarAgenda",directives:[Ve],props:{...ze,...Ge,...tt,...at,...nt,...kt,...St},emits:["update:model-value",..._t,...ft,...vt("-date"),...vt("-head-day"),...vt("-time")],setup(v,{slots:m,emit:l,expose:x}){const e=Ce.ref(null),H=Ce.ref(null),L=Ce.ref(null),f=Ce.ref(null),t=Ce.ref(null),y=Ce.ref({}),a=Ce.ref({}),n=Ce.ref({}),u=Ce.ref("next"),d=Ce.ref(Ae()),i=Ce.ref("0000-00-00"),s=Ce.ref(0),c=Ce.ref(v.modelValue),h=Ce.reactive({width:0,height:0}),p=Ce.ref(!1),R=Ce.ref(null),U=Ce.ref(null),r=(Ce.watch(()=>v.view,()=>{s.value=0}),Ce.computed(()=>{return"month"===v.view?"month-interval":v.view})),B=Ce.getCurrentInstance();if(null===B)throw new Error("current instance is null");const Y=pt(B).emitListeners,g=Dt(v).isSticky,{times:o,setCurrent:V,updateCurrent:Z}=(Ce.watch(g,()=>{}),rt(v)),{weekdaySkips:w,parsedStart:z,parsedEnd:P,dayFormatter:$,weekdayFormatter:j,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:k}=(Z(),V(),Pe(v,{startDate:d,endDate:i,times:o})),D=Ce.computed(()=>{return Fe(v.modelValue,o.now)||z.value||o.today}),Q=(t.value=D.value,f.value=D.value.date,ot(v,{parsedView:r,parsedValue:D,times:o})).renderValues,{rootRef:_,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=Ze(v,Oe,{scrollArea:e,pane:H}),{days:b,parsedCellWidth:te,getScopeForSlot:T}=et(v,{weekdaySkips:w,times:o,scrollArea:e,parsedStart:z,parsedEnd:P,maxDays:s,size:h,headerColumnRef:L}),I=yt(v,{parsedView:r,parsedValue:D,weekdaySkips:w,direction:u,maxDays:s,times:o,emittedValue:c,emit:l}).move,S=mt(l,Y).getDefaultMouseEventHandlers,ae=bt(l,{days:b,lastStart:R,lastEnd:U}).checkChange,ne=Tt().isKeyCode,re=Ot(v,{rootRef:_,focusRef:f,focusValue:t,datesRef:y,days:b,parsedView:r,parsedValue:D,emittedValue:c,weekdaySkips:w,direction:u,times:o}).tryFocus,O=Ce.computed(()=>{return b.value.length+(!0===C.value?v.leftColumnOptions.length:0)+(!0===N.value?v.rightColumnOptions.length:0)+b.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),C=Ce.computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),N=Ce.computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),A=Ce.computed(()=>{if(_.value){const e=h.width||_.value.getBoundingClientRect().width;if(e&&O.value)return(e-J.value)/O.value+"px"}return 100/O.value+"%"});function oe(){c.value=Ae()}function ue(e=1){I(e)}function le(e=1){I(-e)}function de({width:e,height:t}){h.width=e,h.height=t}function F(e){return e.date===c.value}function M(t,a){const e=m["head-column"],n={column:t,index:a,days:b.value},r=!0===g.value?v.cellWidth:A.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?t[v.columnOptionsId]:void 0,l={maxWidth:r,width:r};return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",n)?p.value=u:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",n)?p.value=u:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",n)?p.value=u:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",n)?p.value=u:p.value="")},...S("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==v.noDefaultHeaderText&&ie(t),e&&e(n),gt()])}function ie(e){const t=m["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=Ce.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Ce.h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:Ce.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return Ce.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:J.value+"px"}},[ce()])}function ce(){return Ce.h("div",{ref:L,class:{"q-calendar-agenda__head--days__column":!0}},[ve(),me()])}function ve(){return Ce.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...fe()])}function me(){const e=m["head-days-events"];return Ce.nextTick(()=>{if(n.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),Ce.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Ce.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:b.value,ref:n}})]),...ye()])}function fe(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[!0===C.value&&v.leftColumnOptions.map((e,t)=>M(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(b.value[0],e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>M(e,t))]:[!0===C.value&&v.leftColumnOptions.map((e,t)=>M(e,t)),b.value.map(e=>he(e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>M(e,t))]}function ye(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>ge(b.value[0],e))]:b.value.map(e=>ge(e))}function he(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==v.noActiveDate&&F(t),o=T(t,e),u=(o.activeDate=r,o.droppable=p.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday),!0===g.value?v.cellWidth:A.value),l=v.weekdayStyle||K,d={width:u,maxWidth:u,...l({scope:o})},i=(!0===g.value&&(d.minWidth=u),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...i,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?p.value=t.date:p.value="")},onFocus:()=>{!0===s&&(f.value=t.date)},...S("-head-day",e=>{return{scope:o,event:e}})};return Ce.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&pe(t),void 0===a&&n&&n({scope:o}),gt()])}function pe(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&E(e),!0!==v.noDefaultHeaderBtn&&W(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&E(e),!0!==v.noDefaultHeaderBtn&&W(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&W(e),!0!==v.noDefaultHeaderText&&E(e)])):void 0}function ge(e,t){const a=m["head-day-event"],n=!0!==v.noActiveDate&&F(e),r=T(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),!0===g.value?v.cellWidth:A.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),Ce.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...k(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=m["head-weekday-label"],a=T(e),n=(a.shortWeekdayLabel=v.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ce.h("div",n,t&&t({scope:a})||we(e,v.shortWeekdayLabel))}function we(e,t){const a=j.value(e,t||v.weekdayBreakpoints[0]>0&&te.value<=v.weekdayBreakpoints[0]);return Ce.h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&te.value<=v.weekdayBreakpoints[1]?Be(a,v.minWeekdayLabel):a)}function W(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return Ce.h("div",t,ke(e))}function ke(a){const e=!0!==v.noActiveDate&&F(a),t=$.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ne(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ne(e,[13,32])&&(c.value=a.date,void 0!==Y.value.onClickDate)&&l("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=X.value(a)),r?r({scope:o}):wt(v,u,n?n({scope:o}):t)}function De(){return Ce.h("div",{class:"q-calendar-agenda__body"},[_e()])}function _e(){return!0===g.value?Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Te()]):!0===v.noScroll?be():Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[be()])}function be(){return Ce.h("div",{ref:H,class:"q-calendar-agenda__pane"},[Te()])}function Te(){const e=m["day-container"];return Ce.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==v.noHeader&&se(),Ce.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ie()]),e&&e({scope:{days:b.value}})])}function Ie(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[!0===C.value&&v.leftColumnOptions.map((e,t)=>q(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(b.value[0],0,e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>q(e,t))]:[!0===C.value&&v.leftColumnOptions.map((e,t)=>q(e,t)),b.value.map((e,t)=>Se(e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>q(e,t))]}function q(e,t){const a=m.column,n={column:e,days:b.value,index:t},r=!0===g.value?v.cellWidth:A.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?p.value=u:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?p.value=u:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?p.value=u:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?p.value=u:p.value="")},...S("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=m.day,r=T(e,a),o=!0===g.value?v.cellWidth:A.value,u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?Re(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=Re(parseInt(v.dayMinHeight,10))),Ce.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...k(e)},style:u},[n&&n({scope:r})])}function Oe(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&i.value===t.date&&s.value===a||(d.value=e.date,i.value=t.date,s.value=a),h.width>0),r=Ce.withDirectives(Ce.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==v.noHeader&&se(),!0===n&&De()]),[[Ve,de]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return Ce.h(Ce.Transition,{name:o,appear:!0},()=>r)}}return Ce.watch([b],ae,{deep:!0,immediate:!0}),Ce.watch(()=>v.modelValue,(e,t)=>{if(c.value!==e){if(!0===v.animated){const a=Me(Ne(e)),n=Me(Ne(t));u.value=a>=n?"next":"prev"}c.value=e}f.value=e}),Ce.watch(c,(e,t)=>{if(c.value!==v.modelValue){if(!0===v.animated){const a=Me(Ne(e)),n=Me(Ne(t));u.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ce.watch(f,e=>{e&&(t.value=Fe(e))}),Ce.watch(t,()=>{y.value[f.value]?y.value[f.value].focus():re()}),Ce.watch(()=>v.maxDays,e=>{s.value=e}),Ce.onBeforeUpdate(()=>{y.value={}}),Ce.onMounted(()=>{G()}),x({prev:le,next:ue,move:I,moveToToday:oe,updateCurrent:Z}),()=>ee()}});const Nt="4.0.1";Le={version:Nt,QCalendarAgenda:Ct,...Le,...Ye,install(e){e.component(Ct.name,Ct)}};return Le});
(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.QCalendarAgenda=t(e.Vue))})(this,function(Ce){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,y=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,O=31,l=12,n=1,h=1,o=7,r=60,u=24,C=0,N=6e4,A=36e5,F=864e5,M=6048e5,E=60,W=3600,q=86400,x=604800,H={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},L={hour:0,minute:0};function t(e){return!!a.exec(e)}function Ne(e){const t=a.exec(e);return t?{date:e,time:d(parseInt(t[6],10)||0,2)+":"+d(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 R(e,t=!1){const a=t?"UTC":"";return w({date:d(e[`get${a}FullYear`](),4)+"-"+d(e[`get${a}Month`]()+1,2)+"-"+d(e[`get${a}Date`](),2),time:d(e[`get${a}Hours`]()||0,2)+":"+d(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 d(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function U(e){return 1===(e%4===0^e%100===0^e%400===0)}function i(e,t){return(U(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>i(e.year,e.month)&&(e.day=h,++e.month,e.month>l)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=l),e.day=i(e.year,e.month)),e}function Ae(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,d(t,2),d(a,2)].join("-")}function B(e){return e===Ae()}function z(e,t,a){let n=K(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=X(n,a,n.hasTime)),n}function P(e,t,a){let n=K(e);const r=i(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],p),n=w(n),a&&(n=X(n,a,n.hasTime)),n}function I(e){const t=K(e);return t.day=h,w(t),t}function S(e){const t=K(e);return t.day=i(t.year,t.month),w(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 Y(e,t){return JSON.stringify(e)===JSON.stringify(t)}function V(e,t){return c(e)===c(t)}function Z(e,t){return v(e)===v(t)}function ee(e,t){return Q(e)===Q(t)}function Fe(e,t){let a=Ne(e);return null===a?null:(a=w(a),t&&X(a,t,a.hasTime),a)}function Me(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function j(e){return Me(e)+s(e)}function te(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 X(e,t,a=!1){let n=Me(t),r=Me(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ae(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&X(e,a,!0),e}function ne(e){return e.weekday=ie(e),e}function re(e){return e.doy=le(e),e}function oe(e){return e.workweek=de(e),e}function ue(e,t,a,n,r){const o=Me(e);if(void 0!==t){const d=Me(Ne(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=Me(Ne(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=Ne(r[l][0]),c=Ne(r[l][1]);if(ge(e,s,c)){e.disabled=!0;break}}else{const v=Me(Fe(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=ie(e),e.doy=le(e),e.workweek=de(e),e}function le(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 de(e){0===e.year&&(e=Fe(Ae()));const t=fe(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)/M);return 1+Math.floor(o)}function ie(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function K(e){return{...e}}function c(e){let t=d(e.year,4)+"-"+d(e.month,2);return e.hasDay&&(t+="-"+d(e.day,2)),t}function v(e){return e.hasTime?d(e.hour,2)+":"+d(e.minute,2):""}function Q(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function se(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ce(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 ve(e,t,a,n,r,o,u=[],l=[],d=42,i=0){const s=Me(t),c=[];let v=K(e),m=0,f=m===s;if(!(s<Me(e)))while((!f||c.length<i)&&c.length<d){if(m=Me(v),f=f||m>s&&c.length>=i,f)break;if(0===n[v.weekday]);else{const y=K(v);w(y),X(y,a),ue(y,r,o,u,l),c.push(y)}v=k(v,p)}return c}function me(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,d=K(t);u.push(ae(d,l,o))}return u}function J(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(ye(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+Q(t)),o}}}function fe(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 ye(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 e(e){return isFinite(parseInt(e,10))}function he(e,t=!1){const a=!0===t?j:Me;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function pe(e,t=!1){const a=!0===t?j:Me;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ge(e,t,a,n){const r=Me(e)+(!0===n?s(e):0),o=Me(t)+(!0===n?s(t):0),u=Me(a)+(!0===n?s(a):0);return r>=o&&r<=u}function we(e,t,a,n){const r=Me(e),o=Me(t),u=Me(a),l=Me(n);return r>=u&&r<=l||o>=u&&o<=l||u>=r&&o>=l}function G(e,t){const n=K(e);let r;return De(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ke.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ie(n,ke[r]),w(n),n}const ke=["minute","hour","day","month"];function De(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function _e(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,be(e)}return e}function be(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Te(e)}return e}function Te(t){f(t);let a=i(t.year,t.month);if(t.day>a){++t.month,t.month>l&&f(t);let e=t.day-a;a=i(t.year,t.month);do{e>a&&(++t.month,t.month>l&&f(t),e-=a,a=i(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&&f(t),a=i(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=i(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<n&&(e.month+=l,--e.year);return e}function Ie(e,t){switch(t){case"minute":return _e(e);case"hour":return be(e);case"day":return Te(e);case"month":return f(e)}}function Se(e,t){const a=te(e,t,!0);return Math.floor(a/F)}function Oe(e,t){let a=K(e),n=K(t);return a=m(a,0),n=m(n,6),Math.ceil(Se(a,n)/o)}const Ee={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 We(){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(Ee[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function qe(t,a){const e=Object.keys(Ee),n=We();return e.map(e=>n(e,t,a))}function xe(){const o=(e,t)=>"",u={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,u[e]||u["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 He(t,a){const n=xe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Le={PARSE_DATETIME:a,PARSE_DATE:y,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:O,MONTH_MAX:l,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:C,MILLISECONDS_IN_MINUTE:N,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_WEEK:M,Timestamp:H,TimeObject:L,today:Ae,getStartOfWeek:z,getEndOfWeek:P,getStartOfMonth:I,getEndOfMonth:S,parseTime:$,validateTimestamp:t,parsed:Ne,parseTimestamp:Fe,parseDate:R,getDayIdentifier:Me,getTimeIdentifier:s,getDayTimeIdentifier:j,diffTimestamp:te,updateRelative:X,updateMinutes:ae,updateWeekday:ne,updateDayOfYear:re,updateWorkWeek:oe,updateDisabled:ue,updateFormatted:w,getDayOfYear:le,getWorkWeek:de,getWeekday:ie,isLeapYear:U,daysInMonth:i,copyTimestamp:K,padNumber:d,getDate:c,getTime:v,getDateTime:Q,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ce,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:J,makeDate:fe,makeDateTime:ye,validateNumber:e,isBetweenDates:ge,isOverlappingDates:we,daysBetween:Se,weeksBetween:Oe,addToDate:G,compareTimestamps:Y,compareDate:V,compareTime:Z,compareDateTime:ee,getWeekdayFormatter:We,getWeekdayNames:qe,getMonthFormatter:xe,getMonthNames:He},Le=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:O,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:C,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_MINUTE:N,MILLISECONDS_IN_WEEK:M,MINUTES_IN_HOUR:r,MONTH_MAX:l,MONTH_MIN:n,PARSE_DATE:y,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:W,SECONDS_IN_MINUTE:E,SECONDS_IN_WEEK:x,TimeObject:L,Timestamp:H,addToDate:G,compareDate:V,compareDateTime:ee,compareTime:Z,compareTimestamps:Y,copyTimestamp:K,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:J,daysBetween:Se,daysInMonth:i,default:Le,diffTimestamp:te,findWeekday:m,getDate:c,getDateTime:Q,getDayIdentifier:Me,getDayOfYear:le,getDayTimeIdentifier:j,getEndOfMonth:S,getEndOfWeek:P,getMonthFormatter:xe,getMonthNames:He,getStartOfMonth:I,getStartOfWeek:z,getTime:v,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:We,getWeekdayNames:qe,getWeekdaySkips:ce,getWorkWeek:de,isBetweenDates:ge,isLeapYear:U,isOverlappingDates:we,isToday:B,makeDate:fe,makeDateTime:ye,maxTimestamp:he,minTimestamp:pe,moveRelativeDays:se,nextDay:p,padNumber:d,parseDate:R,parseTime:$,parseTimestamp:Fe,parsed:Ne,prevDay:g,relativeDays:k,today:Ae,updateDayOfYear:re,updateDisabled:ue,updateFormatted:w,updateMinutes:ae,updateRelative:X,updateWeekday:ne,updateWorkWeek:oe,validateNumber:e,validateTimestamp:t,weeksBetween:Oe});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Be(e,t){return 0===t?e:e.slice(0,t)}var Ye={convertToUnit:Re,indexOf:Ue},Ye=Object.freeze({__proto__:null,convertToUnit:Re,default:Ye,indexOf:Ue,minCharWidth:Be}),Ve={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 Ze(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=Ce.reactive({width:0,height:0}),o=Ce.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ce.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ce.withDirectives(Ce.h("div",{...e},[a()]),[[Ve,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:d,__renderCalendar:i}}const ze={modelValue:{type:String,default:Ae(),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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function Pe(t,{startDate:e,endDate:a,times:n}){const r=Ce.computed(()=>ce(t.weekdays)),o=Ce.computed(()=>Fe(e.value)),u=Ce.computed(()=>{return"0000-00-00"===a.value?f(o.value):Fe(a.value)}),l=Ce.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return J(t.locale,()=>e)}),d=Ce.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return J(t.locale,(e,t)=>t?n:a)}),i=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return J(t.locale,()=>e)});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=Me(t),r=Me(Ne(e[0])),o=Me(Ne(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:u,lastDay:l,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return z(e,t.weekdays,n.today)}function f(e){return P(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:d,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function $e(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function je(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function Xe(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Ke(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Qe(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Xe(n);o<=0?l!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;$e(n,a),a!==r&&Qe(n,r,o-t,e)})}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Ke(n);o<=0?l!==r&&je(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Je(n,r,o-t,e)})}const Ge={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:e},dayMinHeight:{type:[Number,String],default:40,validator:e}};function et(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:l,headerColumnRef:d}){const i=Ce.computed(()=>parseInt(t.intervalStart,10)),v=Ce.computed(()=>parseInt(t.intervalMinutes,10)),s=Ce.computed(()=>parseInt(t.intervalCount,10)),m=Ce.computed(()=>parseFloat(t.intervalHeight)),f=Ce.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:l.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=Ce.computed(()=>i.value*v.value),y=Ce.computed(()=>s.value*m.value),h=Ce.computed(()=>s.value*f.value),p=Ce.computed(()=>D(r.value)),g=Ce.computed(()=>_(o.value)),w=Ce.computed(()=>{return ve(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=Ce.computed(()=>{return w.value.map(e=>me(e,i.value,v.value,s.value,a.now))});function D(e){return z(e,t.weekdays,a.today)}function _(e){return P(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(Q(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=j(t),r=j(Ne(e[0])),o=j(Ne(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const O=Ce.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return J(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return J(t.locale,()=>e)});function N(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){}function x(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,i=(d&&d[0]?d[0]:l).clientX,s=(i-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&X(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=M,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:K(e)};return a.timeStartPosX=q,a.timeDurationWidth=E,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Qe(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function M(e){return e/v.value*m.value}function E(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function Z(e){return parseInt(e,10)*v.value/f.value}function W(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function q(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:O,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:N,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:x,getTimestampAtEvent:H,getTimestampAtEventX:L,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:M,timeDurationWidth:E,heightToMinutes:V,widthToMinutes:Z,timeStartPos:W,timeStartPosX:q}}const tt={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},at={maxDays:{type:Number,default:1}},nt={now:{type:String,validator:e=>""===e||t(e),default:""}};function rt(e){const t=Ce.reactive({now:Fe("0000-00-00 00:00"),today:Fe("0000-00-00")}),a=Ce.computed(()=>e.now?Fe(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();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return R(new Date)}function u(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 l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ce.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function ot(r,{parsedView:o,parsedValue:u,times:l}){const e=Ce.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=z(e,r.weekdays,l.today),n=P(a,r.weekdays,l.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=se(K(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),w(n),t=i(a.year,a.month);break;case"resource":t=1,n=se(K(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ut=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function lt(a,e,t,n){const r={};for(const o in t){const u=t[o],l=ut("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[l]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),i=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(i):r[d]=[r[d],i]:r[d]=i}}return r}function dt(e,t,a,n){return lt(e,t,it(a),n)}function it(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 st(e){return Object.keys(it(e))}function ct(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return lt(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return dt(a,n,e,t)},getMouseEventName:it,getRawMouseEvents:st}}const vt=["moved"];function mt(l,{parsedView:d,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Ae();else{let e=K(i.value);const n=a>0,r=n?p:g,o=n?O:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),ne(e);while(0===s.value[e.weekday])e=G(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,l.weekdays);break}ne(e),w(e),re(e),X(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const ft=/^on[A-Z]/;function yt(e=Ce.getCurrentInstance()){return{emitListeners:Ce.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{ft.test(e)&&(t[e]=!0)}),t})}}function ht(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ce.h("span",e)]}function pt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ce.h("button",{...a,tabindex:r?0:-1},[n,r&&ht()])}const gt={cellWidth:[Number,String]};function wt(e){const t=Ce.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const kt=["change"];function Dt(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 _t(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const bt=_t().isKeyCode,Tt={useNavigation:Boolean};function It(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:l,weekdaySkips:d,direction:i,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&bt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&bt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=G(e,{minute:parseInt(t.intervalMinutes)}));i.value="prev",n.value=e.date}function g(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return i.value="next",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=G(e,{minute:parseInt(t.intervalMinutes)}));i.value="next",n.value=e.date}function w(){let e=K(r.value);i.value="prev";do{e=G(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function k(){let e=K(r.value);i.value="next";do{e=G(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function D(){let e=K(r.value);if("month"===u.value||"month-interval"===u.value){e=G(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=G(e,{day:t})}else"day"===u.value?e=G(e,{day:-1}):"week"===u.value&&(e=G(e,{day:-7}));i.value="prev",n.value=e.date}function _(){let e=K(r.value);if("month"===u.value||"month-interval"===u.value){e=G(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=G(e,{day:t})}else"day"===u.value?e=G(e,{day:1}):"week"===u.value&&(e=G(e,{day:7}));i.value="next",n.value=e.date}function b(){let e=K(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=G(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=G(e,{day:-1});n.value=e.date}return Ce.onBeforeUnmount(()=>{v()}),Ce.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var St=Ce.defineComponent({name:"QCalendarAgenda",directives:[Ve],props:{...ze,...Ge,...tt,...at,...nt,...gt,...Tt},emits:["update:model-value",...kt,...vt,...st("-date"),...st("-head-day"),...st("-time")],setup(v,{slots:m,emit:l,expose:x}){const e=Ce.ref(null),H=Ce.ref(null),L=Ce.ref(null),f=Ce.ref(null),t=Ce.ref(null),y=Ce.ref({}),a=Ce.ref({}),n=Ce.ref({}),u=Ce.ref("next"),d=Ce.ref(Ae()),i=Ce.ref("0000-00-00"),s=Ce.ref(0),c=Ce.ref(v.modelValue),h=Ce.reactive({width:0,height:0}),p=Ce.ref(!1),R=Ce.ref(null),U=Ce.ref(null),r=(Ce.watch(()=>v.view,()=>{s.value=0}),Ce.computed(()=>{return"month"===v.view?"month-interval":v.view})),B=Ce.getCurrentInstance();if(null===B)throw new Error("current instance is null");const Y=yt(B).emitListeners,g=wt(v).isSticky,{times:o,setCurrent:V,updateCurrent:Z}=(Ce.watch(g,()=>{}),rt(v)),{weekdaySkips:w,parsedStart:z,parsedEnd:P,dayFormatter:$,weekdayFormatter:j,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:k}=(Z(),V(),Pe(v,{startDate:d,endDate:i,times:o})),D=Ce.computed(()=>{return Fe(v.modelValue,o.now)||z.value||o.today}),Q=(t.value=D.value,f.value=D.value.date,ot(v,{parsedView:r,parsedValue:D,times:o})).renderValues,{rootRef:_,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=Ze(v,Oe,{scrollArea:e,pane:H}),{days:b,parsedCellWidth:te,getScopeForSlot:T}=et(v,{weekdaySkips:w,times:o,scrollArea:e,parsedStart:z,parsedEnd:P,maxDays:s,size:h,headerColumnRef:L}),I=mt(v,{parsedView:r,parsedValue:D,weekdaySkips:w,direction:u,maxDays:s,times:o,emittedValue:c,emit:l}).move,S=ct(l,Y).getDefaultMouseEventHandlers,ae=Dt(l,{days:b,lastStart:R,lastEnd:U}).checkChange,ne=_t().isKeyCode,re=It(v,{rootRef:_,focusRef:f,focusValue:t,datesRef:y,days:b,parsedView:r,parsedValue:D,emittedValue:c,weekdaySkips:w,direction:u,times:o}).tryFocus,O=Ce.computed(()=>{return b.value.length+(!0===C.value?v.leftColumnOptions.length:0)+(!0===N.value?v.rightColumnOptions.length:0)+b.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),C=Ce.computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),N=Ce.computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),A=Ce.computed(()=>{if(_.value){const e=h.width||_.value.getBoundingClientRect().width;if(e&&O.value)return(e-J.value)/O.value+"px"}return 100/O.value+"%"});function oe(){c.value=Ae()}function ue(e=1){I(e)}function le(e=1){I(-e)}function de({width:e,height:t}){h.width=e,h.height=t}function F(e){return e.date===c.value}function M(t,a){const e=m["head-column"],n={column:t,index:a,days:b.value},r=!0===g.value?v.cellWidth:A.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?t[v.columnOptionsId]:void 0,l={maxWidth:r,width:r};return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",n)?p.value=u:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",n)?p.value=u:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",n)?p.value=u:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",n)?p.value=u:p.value="")},...S("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==v.noDefaultHeaderText&&ie(t),e&&e(n),ht()])}function ie(e){const t=m["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=Ce.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Ce.h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:Ce.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return Ce.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:J.value+"px"}},[ce()])}function ce(){return Ce.h("div",{ref:L,class:{"q-calendar-agenda__head--days__column":!0}},[ve(),me()])}function ve(){return Ce.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...fe()])}function me(){const e=m["head-days-events"];return Ce.nextTick(()=>{if(n.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),Ce.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Ce.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:b.value,ref:n}})]),...ye()])}function fe(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[!0===C.value&&v.leftColumnOptions.map((e,t)=>M(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(b.value[0],e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>M(e,t))]:[!0===C.value&&v.leftColumnOptions.map((e,t)=>M(e,t)),b.value.map(e=>he(e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>M(e,t))]}function ye(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>ge(b.value[0],e))]:b.value.map(e=>ge(e))}function he(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==v.noActiveDate&&F(t),o=T(t,e),u=(o.activeDate=r,o.droppable=p.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday),!0===g.value?v.cellWidth:A.value),l=v.weekdayStyle||K,d={width:u,maxWidth:u,...l({scope:o})},i=(!0===g.value&&(d.minWidth=u),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...i,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?p.value=t.date:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?p.value=t.date:p.value="")},onFocus:()=>{!0===s&&(f.value=t.date)},...S("-head-day",e=>{return{scope:o,event:e}})};return Ce.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&pe(t),void 0===a&&n&&n({scope:o}),ht()])}function pe(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&E(e),!0!==v.noDefaultHeaderBtn&&W(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&E(e),!0!==v.noDefaultHeaderBtn&&W(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&W(e),!0!==v.noDefaultHeaderText&&E(e)])):void 0}function ge(e,t){const a=m["head-day-event"],n=!0!==v.noActiveDate&&F(e),r=T(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),!0===g.value?v.cellWidth:A.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),Ce.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...k(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=m["head-weekday-label"],a=T(e),n=(a.shortWeekdayLabel=v.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ce.h("div",n,t&&t({scope:a})||we(e,v.shortWeekdayLabel))}function we(e,t){const a=j.value(e,t||v.weekdayBreakpoints[0]>0&&te.value<=v.weekdayBreakpoints[0]);return Ce.h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&te.value<=v.weekdayBreakpoints[1]?Be(a,v.minWeekdayLabel):a)}function W(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return Ce.h("div",t,ke(e))}function ke(a){const e=!0!==v.noActiveDate&&F(a),t=$.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ne(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ne(e,[13,32])&&(c.value=a.date,void 0!==Y.value.onClickDate)&&l("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=X.value(a)),r?r({scope:o}):pt(v,u,n?n({scope:o}):t)}function De(){return Ce.h("div",{class:"q-calendar-agenda__body"},[_e()])}function _e(){return!0===g.value?Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Te()]):!0===v.noScroll?be():Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[be()])}function be(){return Ce.h("div",{ref:H,class:"q-calendar-agenda__pane"},[Te()])}function Te(){const e=m["day-container"];return Ce.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==v.noHeader&&se(),Ce.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ie()]),e&&e({scope:{days:b.value}})])}function Ie(){return 1===b.value.length&&parseInt(v.columnCount,10)>0?[!0===C.value&&v.leftColumnOptions.map((e,t)=>q(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(b.value[0],0,e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>q(e,t))]:[!0===C.value&&v.leftColumnOptions.map((e,t)=>q(e,t)),b.value.map((e,t)=>Se(e)),!0===N.value&&v.rightColumnOptions.map((e,t)=>q(e,t))]}function q(e,t){const a=m.column,n={column:e,days:b.value,index:t},r=!0===g.value?v.cellWidth:A.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?p.value=u:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?p.value=u:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?p.value=u:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?p.value=u:p.value="")},...S("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=m.day,r=T(e,a),o=!0===g.value?v.cellWidth:A.value,u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?Re(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=Re(parseInt(v.dayMinHeight,10))),Ce.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...k(e)},style:u},[n&&n({scope:r})])}function Oe(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&i.value===t.date&&s.value===a||(d.value=e.date,i.value=t.date,s.value=a),h.width>0),r=Ce.withDirectives(Ce.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==v.noHeader&&se(),!0===n&&De()]),[[Ve,de]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return Ce.h(Ce.Transition,{name:o,appear:!0},()=>r)}}return Ce.watch([b],ae,{deep:!0,immediate:!0}),Ce.watch(()=>v.modelValue,(e,t)=>{if(c.value!==e){if(!0===v.animated){const a=Me(Ne(e)),n=Me(Ne(t));u.value=a>=n?"next":"prev"}c.value=e}f.value=e}),Ce.watch(c,(e,t)=>{if(c.value!==v.modelValue){if(!0===v.animated){const a=Me(Ne(e)),n=Me(Ne(t));u.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ce.watch(f,e=>{e&&(t.value=Fe(e))}),Ce.watch(t,()=>{y.value[f.value]?y.value[f.value].focus():re()}),Ce.watch(()=>v.maxDays,e=>{s.value=e}),Ce.onBeforeUpdate(()=>{y.value={}}),Ce.onMounted(()=>{G()}),x({prev:le,next:ue,move:I,moveToToday:oe,updateCurrent:Z}),()=>ee()}});const Ot="4.0.2";Le={version:Ot,QCalendarAgenda:St,...Le,...Ye,install(e){e.component(St.name,St)}};return Le});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],d=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===s;if(!(s<getDayIdentifier(e)))while((!y||c.length<l)&&c.length<d){if(v=getDayIdentifier(m),y=y||v>s&&c.length>=l,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,u),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=vue.reactive({width:0,height:0}),o=vue.ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}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 vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),i=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),u=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=c(n,e);return{"q-past-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===d,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:d}){const l=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),s=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),y=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=vue.computed(()=>l.value*m.value),p=vue.computed(()=>s.value*v.value),f=vue.computed(()=>s.value*y.value),h=vue.computed(()=>T(r.value)),D=vue.computed(()=>I(o.value)),g=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientX,s=(l-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=W,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=C,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*v.value}function C(e){return e/m.value*y.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/y.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*p.value;return t&&(i<0&&(i=0),i>p.value)&&(i=p.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};i in t?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:d,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:d,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:g();break;case 38:h();break;case 39:_();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:y,emit:c,expose:R}){const e=vue.ref(null),L=vue.ref(null),Y=vue.ref(null),p=vue.ref(null),t=vue.ref(null),f=vue.ref({}),a=vue.ref({}),n=vue.ref({}),i=vue.ref("next"),u=vue.ref(v.modelValue||today()),d=vue.ref("0000-00-00"),l=vue.ref(0),h=vue.ref(v.modelValue),s=vue.reactive({width:0,height:0}),D=vue.ref(!1),m=vue.ref(!1),x=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>v.view,()=>{l.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),q=vue.getCurrentInstance();if(null===q)throw new Error("current instance is null");const g=useEmitListeners(q).emitListeners,_=useCellWidth(v).isSticky,{times:T,setCurrent:P,updateCurrent:B}=useTimes(v),{weekdaySkips:o,parsedStart:I,parsedEnd:z,dayFormatter:V,weekdayFormatter:K,ariaDateFormatter:$,dayStyleDefault:X,getRelativeClasses:k}=(B(),P(),useCommon(v,{startDate:u,endDate:d,times:T})),w=vue.computed(()=>{return parseTimestamp(v.modelValue,T.now)||I.value||T.today}),Z=(t.value=w.value,p.value=w.value.date,useRenderValues(v,{parsedView:r,parsedValue:w,times:T})).renderValues,{rootRef:N,scrollWidth:j,__initCalendar:Q,__renderCalendar:J}=useCalendar(v,ze,{scrollArea:e,pane:L}),{days:M,intervals:G,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:S,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:oe,getTimestampAtEvent:ie,getScopeForSlot:E,scrollToTime:ue,heightToMinutes:de,timeDurationHeight:le,timeStartPos:se}=useInterval(v,{weekdaySkips:o,times:T,scrollArea:e,parsedStart:I,parsedEnd:z,maxDays:l,size:s,headerColumnRef:Y}),b=useMove(v,{parsedView:r,parsedValue:w,weekdaySkips:o,direction:i,maxDays:l,times:T,emittedValue:h,emit:c}).move,O=useMouse(c,g).getDefaultMouseEventHandlers,ce=useCheckChange(c,{days:M,lastStart:x,lastEnd:U}).checkChange,A=useEvents().isKeyCode,me=useKeyboard(v,{rootRef:N,focusRef:p,focusValue:t,datesRef:f,days:M,parsedView:r,parsedValue:w,emittedValue:h,weekdaySkips:o,direction:i,times:T}).tryFocus,W=vue.computed(()=>{return"day"===r.value&&parseInt(v.columnCount,10)>1?parseInt(v.columnCount,10):"day"===r.value&&v.maxDays&&v.maxDays>1?v.maxDays:M.value.length}),ve=vue.computed(()=>{return N.value?parseInt(window.getComputedStyle(N.value).getPropertyValue("--calendar-intervals-width"),10):0}),C=vue.computed(()=>{if(N.value){const e=s.width||N.value.getBoundingClientRect().width;if(e&&ve.value&&W.value)return(e-j.value-ve.value)/W.value+"px"}return 100/W.value+"%"});function ye(){h.value=today()}function pe(e=1){b(e)}function fe(e=1){b(-e)}function he({width:e,height:t}){s.width=e,s.height=t}function H(e){return e.date===h.value}function De(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===_.value},style:{marginRight:j.value+"px"}},[ge(),_e()])}function ge(){const e=y["head-intervals"],t={timestamps:M.value,days:M.value,date:v.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===_.value},...O("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function _e(){return vue.h("div",{ref:Y,class:{"q-calendar-day__head--days__column":!0}},[Te(),Ie()])}function Te(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...ke()])}function Ie(){const e=y["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===parseInt(v.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:M.value,ref:n}})]),...we()])}function ke(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ne(M.value[0],e)):M.value.map(e=>Ne(e))}function we(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(M.value[0],e)):M.value.map(e=>Se(e))}function Ne(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==v.noActiveDate&&H(t),o=E(t,e),i=(o.activeDate=r,o.droppable=D.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday),!0===_.value?v.cellWidth:C.value),u=v.weekdayStyle||X,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},l=(!0===_.value&&(d.minWidth=i),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),s=!0===v.focusable&&v.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...l,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:d,onFocus:()=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&A(e,[13,32])&&(h.value=t.date)},...O("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?D.value=t.date:D.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ae(t,e),void 0===a&&Me(t),void 0===a&&n&&n({scope:o}),void 0===a&&We(t,e),useFocusHelper()])}function Me(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&F(e),!0!==v.noDefaultHeaderBtn&&be(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&F(e),!0!==v.noDefaultHeaderBtn&&be(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&be(e),!0!==v.noDefaultHeaderText&&F(e)])):void 0}function Se(e,t){const a=y["head-day-event"],n=!0!==v.noActiveDate&&H(e),r=E(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),!0===_.value?convertToUnit(S.value):C.value),i={width:o,maxWidth:o,minWidth:o};return!0===_.value&&(i.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...k(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=y["head-weekday-label"],a=!0===v.shortWeekdayLabel,n=E(e),r=(n.shortWeekdayLabel=v.shortWeekdayLabel,n.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=K.value(e,t||v.weekdayBreakpoints[0]>0&&S.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&S.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function be(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return vue.h("div",t,Oe(e))}function Oe(a){const e=!0!==v.noActiveDate&&H(a),t=V.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&A(e,[13,32])&&(h.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:o})},...O("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(i.ariaLabel=$.value(a)),r?r({scope:o}):useButton(v,i,n?n({scope:o}):t)}function Ae(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function We(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Ce(){return vue.h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===_.value?vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==_.value&&qe(),Re()]):!0===v.noScroll?Fe():vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return vue.h("div",{ref:L,class:"q-calendar-day__pane"},[qe(),Re()])}function Re(){const e=y["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===_.value&&!0!==v.noHeader&&De(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===_.value&&qe(),...Le()]),e&&e({scope:{days:M.value}})])}function Le(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ye(M.value[0],0,e)):M.value.map((e,t)=>Ye(e,t))}function Ye(e,t,a){const n=y["day-body"],r=E(e,a),o=!0===_.value?v.cellWidth:C.value,i={width:o,maxWidth:o,minWidth:o};return!0===_.value&&(i.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...k(e)},style:i},[...xe(t,a),n&&n({scope:r})])}function xe(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=convertToUnit(v.intervalHeight),t=v.intervalStyle||re,r=y["day-interval"],o=E(a,n),i=(o.droppable=m.value===getDayTimeIdentifier(a),"function"===typeof v.intervalClass?v.intervalClass({scope:o}):{}),u=!0===v.focusable&&v.focusType.includes("interval"),d=getDateTime(a),l={key:d,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...ae(a,v.selectedDates,v.selectedStartEndDates),"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===u},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(A(e,[13,32])){const t=E(a,n);h.value=t.timestamp.date,void 0!==g.value.onClickTime&&c("click-time",{scope:t,event:e})}},...O("-time",e=>{const t=E(oe(e,a,v.timeClicksClamped,T.now),n);return{scope:t,event:e}})},s=(!0!==v.noAria&&(l.ariaLabel=te.value(a)),r?r({scope:o}):void 0);return vue.h("div",l,[s,useFocusHelper()])}function qe(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===_.value},...O("-interval",e=>{const t=ie(e,I.value,v.timeClicksClamped,T.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Pe())}function Pe(){return G.value[0].map(e=>Be(e))}function Be(e){const t=y["interval-label"],a=convertToUnit(v.intervalHeight),n=v.shortIntervalLabel,r=v.showIntervalLabel||ne,o=r(e),i=o?ee.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function ze(){const{start:e,end:t,maxDays:a}=Z.value,n=(u.value===e.date&&d.value===t.date&&l.value===a||(u.value=e.date,d.value=t.date,l.value=a),s.width>0),r=vue.withDirectives(vue.h("div",{key:u.value,class:"q-calendar-day"},[!0===n&&!0!==_.value&&!0!==v.noHeader&&De(),n&&Ce()]),[[ResizeObserver$1,he]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([M],ce,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{f.value[p.value]?f.value[p.value].focus():me()}),vue.watch(()=>v.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{f.value={},a.value={},n.value={}}),vue.onMounted(()=>{Q()}),R({prev:fe,next:pe,move:b,moveToToday:ye,updateCurrent:B,timeStartPos:se,timeDurationHeight:le,heightToMinutes:de,scrollToTime:ue}),()=>J()}});const version="4.0.1";exports.QCalendarDay=QCalendarDay,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],d=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===s;if(!(s<getDayIdentifier(e)))while((!y||c.length<l)&&c.length<d){if(v=getDayIdentifier(m),y=y||v>s&&c.length>=l,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,u),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=vue.reactive({width:0,height:0}),o=vue.ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}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 vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),i=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),u=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=c(n,e);return{"q-past-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===d,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:d}){const l=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),s=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),y=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=vue.computed(()=>l.value*m.value),p=vue.computed(()=>s.value*v.value),f=vue.computed(()=>s.value*y.value),h=vue.computed(()=>T(r.value)),D=vue.computed(()=>I(o.value)),g=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:u).clientX,s=(l-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=W,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=C,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*v.value}function C(e){return e/m.value*y.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/y.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*p.value;return t&&(i<0&&(i=0),i>p.value)&&(i=p.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const i=t[o],u=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),l=e=>{const t=e;return(void 0===i.button||t.buttons>0&&t.button===i.button)&&(i.prevent&&t.preventDefault(),i.stop&&t.stopPropagation(),a(o,n(t,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(l):r[d]=[r[d],l]:r[d]=l}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:d,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:d,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:g();break;case 38:h();break;case 39:_();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:y,emit:c,expose:R}){const e=vue.ref(null),L=vue.ref(null),Y=vue.ref(null),p=vue.ref(null),t=vue.ref(null),f=vue.ref({}),a=vue.ref({}),n=vue.ref({}),i=vue.ref("next"),u=vue.ref(v.modelValue||today()),d=vue.ref("0000-00-00"),l=vue.ref(0),h=vue.ref(v.modelValue),s=vue.reactive({width:0,height:0}),D=vue.ref(!1),m=vue.ref(!1),x=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>v.view,()=>{l.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),q=vue.getCurrentInstance();if(null===q)throw new Error("current instance is null");const g=useEmitListeners(q).emitListeners,_=useCellWidth(v).isSticky,{times:T,setCurrent:P,updateCurrent:B}=useTimes(v),{weekdaySkips:o,parsedStart:I,parsedEnd:z,dayFormatter:V,weekdayFormatter:K,ariaDateFormatter:X,dayStyleDefault:$,getRelativeClasses:k}=(B(),P(),useCommon(v,{startDate:u,endDate:d,times:T})),w=vue.computed(()=>{return parseTimestamp(v.modelValue,T.now)||I.value||T.today}),Z=(t.value=w.value,p.value=w.value.date,useRenderValues(v,{parsedView:r,parsedValue:w,times:T})).renderValues,{rootRef:N,scrollWidth:j,__initCalendar:Q,__renderCalendar:J}=useCalendar(v,ze,{scrollArea:e,pane:L}),{days:M,intervals:G,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:S,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:oe,getTimestampAtEvent:ie,getScopeForSlot:E,scrollToTime:ue,heightToMinutes:de,timeDurationHeight:le,timeStartPos:se}=useInterval(v,{weekdaySkips:o,times:T,scrollArea:e,parsedStart:I,parsedEnd:z,maxDays:l,size:s,headerColumnRef:Y}),b=useMove(v,{parsedView:r,parsedValue:w,weekdaySkips:o,direction:i,maxDays:l,times:T,emittedValue:h,emit:c}).move,O=useMouse(c,g).getDefaultMouseEventHandlers,ce=useCheckChange(c,{days:M,lastStart:x,lastEnd:U}).checkChange,A=useEvents().isKeyCode,me=useKeyboard(v,{rootRef:N,focusRef:p,focusValue:t,datesRef:f,days:M,parsedView:r,parsedValue:w,emittedValue:h,weekdaySkips:o,direction:i,times:T}).tryFocus,W=vue.computed(()=>{return"day"===r.value&&parseInt(v.columnCount,10)>1?parseInt(v.columnCount,10):"day"===r.value&&v.maxDays&&v.maxDays>1?v.maxDays:M.value.length}),ve=vue.computed(()=>{return N.value?parseInt(window.getComputedStyle(N.value).getPropertyValue("--calendar-intervals-width"),10):0}),C=vue.computed(()=>{if(N.value){const e=s.width||N.value.getBoundingClientRect().width;if(e&&ve.value&&W.value)return(e-j.value-ve.value)/W.value+"px"}return 100/W.value+"%"});function ye(){h.value=today()}function pe(e=1){b(e)}function fe(e=1){b(-e)}function he({width:e,height:t}){s.width=e,s.height=t}function H(e){return e.date===h.value}function De(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===_.value},style:{marginRight:j.value+"px"}},[ge(),_e()])}function ge(){const e=y["head-intervals"],t={timestamps:M.value,days:M.value,date:v.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===_.value},...O("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function _e(){return vue.h("div",{ref:Y,class:{"q-calendar-day__head--days__column":!0}},[Te(),Ie()])}function Te(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...ke()])}function Ie(){const e=y["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===parseInt(v.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:M.value,ref:n}})]),...we()])}function ke(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ne(M.value[0],e)):M.value.map(e=>Ne(e))}function we(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(M.value[0],e)):M.value.map(e=>Se(e))}function Ne(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==v.noActiveDate&&H(t),o=E(t,e),i=(o.activeDate=r,o.droppable=D.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday),!0===_.value?v.cellWidth:C.value),u=v.weekdayStyle||$,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},l=(!0===_.value&&(d.minWidth=i),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),s=!0===v.focusable&&v.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...l,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:d,onFocus:()=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&A(e,[13,32])&&(h.value=t.date)},...O("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?D.value=t.date:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?D.value=t.date:D.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ae(t,e),void 0===a&&Me(t),void 0===a&&n&&n({scope:o}),void 0===a&&We(t,e),useFocusHelper()])}function Me(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&F(e),!0!==v.noDefaultHeaderBtn&&be(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&F(e),!0!==v.noDefaultHeaderBtn&&be(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&be(e),!0!==v.noDefaultHeaderText&&F(e)])):void 0}function Se(e,t){const a=y["head-day-event"],n=!0!==v.noActiveDate&&H(e),r=E(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),!0===_.value?convertToUnit(S.value):C.value),i={width:o,maxWidth:o,minWidth:o};return!0===_.value&&(i.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...k(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=y["head-weekday-label"],a=!0===v.shortWeekdayLabel,n=E(e),r=(n.shortWeekdayLabel=v.shortWeekdayLabel,n.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=K.value(e,t||v.weekdayBreakpoints[0]>0&&S.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&S.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function be(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return vue.h("div",t,Oe(e))}function Oe(a){const e=!0!==v.noActiveDate&&H(a),t=V.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&A(e,[13,32])&&(h.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:o})},...O("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(i.ariaLabel=X.value(a)),r?r({scope:o}):useButton(v,i,n?n({scope:o}):t)}function Ae(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function We(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Ce(){return vue.h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===_.value?vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==_.value&&qe(),Re()]):!0===v.noScroll?Fe():vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return vue.h("div",{ref:L,class:"q-calendar-day__pane"},[qe(),Re()])}function Re(){const e=y["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===_.value&&!0!==v.noHeader&&De(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===_.value&&qe(),...Le()]),e&&e({scope:{days:M.value}})])}function Le(){return 1===M.value.length&&parseInt(v.columnCount,10)>0?Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ye(M.value[0],0,e)):M.value.map((e,t)=>Ye(e,t))}function Ye(e,t,a){const n=y["day-body"],r=E(e,a),o=!0===_.value?v.cellWidth:C.value,i={width:o,maxWidth:o,minWidth:o};return!0===_.value&&(i.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...k(e)},style:i},[...xe(t,a),n&&n({scope:r})])}function xe(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=convertToUnit(v.intervalHeight),t=v.intervalStyle||re,r=y["day-interval"],o=E(a,n),i=(o.droppable=m.value===getDayTimeIdentifier(a),"function"===typeof v.intervalClass?v.intervalClass({scope:o}):{}),u=!0===v.focusable&&v.focusType.includes("interval"),d=getDateTime(a),l={key:d,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...ae(a,Array.from(v.selectedDates),v.selectedStartEndDates),"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===u},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(A(e,[13,32])){const t=E(a,n);h.value=t.timestamp.date,void 0!==g.value.onClickTime&&c("click-time",{scope:t,event:e})}},...O("-time",e=>{const t=E(oe(e,a,v.timeClicksClamped,T.now),n);return{scope:t,event:e}})},s=(!0!==v.noAria&&(l.ariaLabel=te.value(a)),r?r({scope:o}):void 0);return vue.h("div",l,[s,useFocusHelper()])}function qe(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===_.value},...O("-interval",e=>{const t=ie(e,I.value,v.timeClicksClamped,T.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Pe())}function Pe(){return G.value[0].map(e=>Be(e))}function Be(e){const t=y["interval-label"],a=convertToUnit(v.intervalHeight),n=v.shortIntervalLabel,r=v.showIntervalLabel||ne,o=r(e),i=o?ee.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function ze(){const{start:e,end:t,maxDays:a}=Z.value,n=(u.value===e.date&&d.value===t.date&&l.value===a||(u.value=e.date,d.value=t.date,l.value=a),s.width>0),r=vue.withDirectives(vue.h("div",{key:u.value,class:"q-calendar-day"},[!0===n&&!0!==_.value&&!0!==v.noHeader&&De(),n&&Ce()]),[[ResizeObserver$1,he]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([M],ce,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{f.value[p.value]?f.value[p.value].focus():me()}),vue.watch(()=>v.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{f.value={},a.value={},n.value={}}),vue.onMounted(()=>{Q()}),R({prev:fe,next:pe,move:b,moveToToday:ye,updateCurrent:B,timeStartPos:se,timeDurationHeight:le,heightToMinutes:de,scrollToTime:ue}),()=>J()}});const version="4.0.2";exports.QCalendarDay=QCalendarDay,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],d=[],u=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,v=y===s;if(!(s<getDayIdentifier(e)))while((!v||c.length<l)&&c.length<u){if(y=getDayIdentifier(m),v=v||y>s&&c.length>=l,v)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,d),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}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 withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?v(o.value):parseTimestamp(a.value)}),d=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=c(n,e);return{"q-past-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===u,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===i||!0===d||!0===u),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getVerticalScrollPosition(n);o<=0?d!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getHorizontalScrollPosition(n);o<=0?d!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:d,headerColumnRef:u}){const l=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),s=computed(()=>parseInt(t.intervalCount,10)),y=computed(()=>parseFloat(t.intervalHeight)),v=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&u.value&&(e=u.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>l.value*m.value),p=computed(()=>s.value*y.value),f=computed(()=>s.value*v.value),h=computed(()=>T(r.value)),D=computed(()=>I(o.value)),g=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return g.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientX,s=(l-o.left)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*y.value}function W(e){return e/m.value*v.value}function B(e){return parseInt(e,10)*m.value/y.value}function z(e){return parseInt(e,10)*m.value/v.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*p.value;return t&&(i<0&&(i=0),i>p.value)&&(i=p.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:v,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),d=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};i in t?Array.isArray(t[i])?t[i].push(d):t[i]=[t[i],d]:t[i]=d}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:u,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:y,emittedValue:v,emit:p}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),v.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,weekdaySkips:u,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function v(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:g();break;case 38:h();break;case 39:_();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:v}}var QCalendarDay=defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(y,{slots:v,emit:c,expose:L}){const e=ref(null),Y=ref(null),x=ref(null),p=ref(null),t=ref(null),f=ref({}),a=ref({}),n=ref({}),i=ref("next"),d=ref(y.modelValue||today()),u=ref("0000-00-00"),l=ref(0),D=ref(y.modelValue),s=reactive({width:0,height:0}),g=ref(!1),m=ref(!1),U=ref(null),q=ref(null),r=(watch(()=>y.view,()=>{l.value=0}),computed(()=>{return"month"===y.view?"month-interval":y.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const _=useEmitListeners(P).emitListeners,T=useCellWidth(y).isSticky,{times:I,setCurrent:B,updateCurrent:z}=useTimes(y),{weekdaySkips:o,parsedStart:k,parsedEnd:V,dayFormatter:$,weekdayFormatter:K,ariaDateFormatter:X,dayStyleDefault:Z,getRelativeClasses:w}=(z(),B(),useCommon(y,{startDate:d,endDate:u,times:I})),N=computed(()=>{return parseTimestamp(y.modelValue,I.now)||k.value||I.today}),j=(t.value=N.value,p.value=N.value.date,useRenderValues(y,{parsedView:r,parsedValue:N,times:I})).renderValues,{rootRef:M,scrollWidth:Q,__initCalendar:J,__renderCalendar:G}=useCalendar(y,Ve,{scrollArea:e,pane:Y}),{days:S,intervals:ee,intervalFormatter:te,ariaDateTimeFormatter:ae,parsedCellWidth:E,getIntervalClasses:ne,showIntervalLabelDefault:re,styleDefault:oe,getTimestampAtEventInterval:ie,getTimestampAtEvent:de,getScopeForSlot:b,scrollToTime:ue,heightToMinutes:le,timeDurationHeight:se,timeStartPos:ce}=useInterval(y,{weekdaySkips:o,times:I,scrollArea:e,parsedStart:k,parsedEnd:V,maxDays:l,size:s,headerColumnRef:x}),O=useMove(y,{parsedView:r,parsedValue:N,weekdaySkips:o,direction:i,maxDays:l,times:I,emittedValue:D,emit:c}).move,A=useMouse(c,_).getDefaultMouseEventHandlers,me=useCheckChange(c,{days:S,lastStart:U,lastEnd:q}).checkChange,C=useEvents().isKeyCode,ye=useKeyboard(y,{rootRef:M,focusRef:p,focusValue:t,datesRef:f,days:S,parsedView:r,parsedValue:N,emittedValue:D,weekdaySkips:o,direction:i,times:I}).tryFocus,W=computed(()=>{return"day"===r.value&&parseInt(y.columnCount,10)>1?parseInt(y.columnCount,10):"day"===r.value&&y.maxDays&&y.maxDays>1?y.maxDays:S.value.length}),ve=computed(()=>{return M.value?parseInt(window.getComputedStyle(M.value).getPropertyValue("--calendar-intervals-width"),10):0}),H=computed(()=>{if(M.value){const e=s.width||M.value.getBoundingClientRect().width;if(e&&ve.value&&W.value)return(e-Q.value-ve.value)/W.value+"px"}return 100/W.value+"%"});function pe(){D.value=today()}function fe(e=1){O(e)}function he(e=1){O(-e)}function De({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===D.value}function ge(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===T.value},style:{marginRight:Q.value+"px"}},[_e(),Te()])}function _e(){const e=v["head-intervals"],t={timestamps:S.value,days:S.value,date:y.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===T.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function Te(){return h("div",{ref:x,class:{"q-calendar-day__head--days__column":!0}},[Ie(),ke()])}function Ie(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...we()])}function ke(){const e=v["head-days-events"];return nextTick(()=>{if(n.value&&0===parseInt(y.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Ne()])}function we(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>Me(S.value[0],e)):S.value.map(e=>Me(e))}function Ne(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>Ee(S.value[0],e)):S.value.map(e=>Ee(e))}function Me(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==y.noActiveDate&&F(t),o=b(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),!0===T.value?y.cellWidth:H.value),d=y.weekdayStyle||Z,u={width:i,maxWidth:i,minWidth:i,...d({scope:o})},l=(!0===T.value&&(u.minWidth=i),"function"===typeof y.weekdayClass?y.weekdayClass({scope:o}):{}),s=!0===y.focusable&&y.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...l,...w(t),"q-active-date":r,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===s},style:u,onFocus:()=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&C(e,[13,32])&&(D.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ce(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&We(t,e),useFocusHelper()])}function Se(e){return"stacked"===y.dateHeader?[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&Oe(e)]:"inline"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&Oe(e)])):"inverted"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderBtn&&Oe(e),!0!==y.noDefaultHeaderText&&R(e)])):void 0}function Ee(e,t){const a=v["head-day-event"],n=!0!==y.noActiveDate&&F(e),r=b(e,t),o=(r.activeDate=n,r.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(e.weekday),!0===T.value?convertToUnit(E.value):H.value),i={width:o,maxWidth:o,minWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...w(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function R(e){const t=v["head-weekday-label"],a=!0===y.shortWeekdayLabel,n=b(e),r=(n.shortWeekdayLabel=y.shortWeekdayLabel,n.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",r,t&&t({scope:n})||be(e,a))}function be(e,t){const a=K.value(e,t||y.weekdayBreakpoints[0]>0&&E.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},y.weekdayBreakpoints[1]>0&&E.value<=y.weekdayBreakpoints[1]?minCharWidth(a,y.minWeekdayLabel):a)}function Oe(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+y.dateAlign]:!0}};return h("div",t,Ae(e))}function Ae(a){const e=!0!==y.noActiveDate&&F(a),t=$.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-day__head--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__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&C(e,[13,32])&&(D.value=a.date,void 0!==_.value.onClickDate)&&c("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==y.noAria&&(i.ariaLabel=X.value(a)),r?r({scope:o}):useButton(y,i,n?n({scope:o}):t)}function Ce(e,t){const a=v["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function We(e,t){const a=v["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function He(){return h("div",{class:"q-calendar-day__body"},[Fe()])}function Fe(){return!0===T.value?h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==T.value&&Pe(),Le()]):!0===y.noScroll?Re():h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Re()])}function Re(){return h("div",{ref:Y,class:"q-calendar-day__pane"},[Pe(),Le()])}function Le(){const e=v["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===T.value&&!0!==y.noHeader&&ge(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===T.value&&Pe(),...Ye()]),e&&e({scope:{days:S.value}})])}function Ye(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>xe(S.value[0],0,e)):S.value.map((e,t)=>xe(e,t))}function xe(e,t,a){const n=v["day-body"],r=b(e,a),o=!0===T.value?y.cellWidth:H.value,i={width:o,maxWidth:o,minWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...w(e)},style:i},[...Ue(t,a),n&&n({scope:r})])}function Ue(e,t){return ee.value[e].map(e=>qe(e,t))}function qe(a,n){const e=convertToUnit(y.intervalHeight),t=y.intervalStyle||oe,r=v["day-interval"],o=b(a,n),i=(o.droppable=m.value===getDayTimeIdentifier(a),"function"===typeof y.intervalClass?y.intervalClass({scope:o}):{}),d=!0===y.focusable&&y.focusType.includes("interval"),u=getDateTime(a),l={key:u,tabindex:!0===d?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...ne(a,y.selectedDates,y.selectedStartEndDates),"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===d},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onKeydown:e=>{C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(C(e,[13,32])){const t=b(a,n);D.value=t.timestamp.date,void 0!==_.value.onClickTime&&c("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=b(ie(e,a,y.timeClicksClamped,I.now),n);return{scope:t,event:e}})},s=(!0!==y.noAria&&(l.ariaLabel=ae.value(a)),r?r({scope:o}):void 0);return h("div",l,[s,useFocusHelper()])}function Pe(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===T.value},...A("-interval",e=>{const t=de(e,k.value,y.timeClicksClamped,I.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Be())}function Be(){return ee.value[0].map(e=>ze(e))}function ze(e){const t=v["interval-label"],a=convertToUnit(y.intervalHeight),n=y.shortIntervalLabel,r=y.showIntervalLabel||re,o=r(e),i=o?te.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Ve(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&u.value===t.date&&l.value===a||(d.value=e.date,u.value=t.date,l.value=a),s.width>0),r=withDirectives(h("div",{key:d.value,class:"q-calendar-day"},[!0===n&&!0!==T.value&&!0!==y.noHeader&&ge(),n&&He()]),[[ResizeObserver$1,De]]);if(!0!==y.animated)return r;{const o="q-calendar--"+("prev"===i.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([S],me,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(D.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}D.value=e}p.value=e}),watch(D,(e,t)=>{if(D.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{f.value[p.value]?f.value[p.value].focus():ye()}),watch(()=>y.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{f.value={},a.value={},n.value={}}),onMounted(()=>{J()}),L({prev:he,next:fe,move:O,moveToToday:pe,updateCurrent:z,timeStartPos:ce,timeDurationHeight:se,heightToMinutes:le,scrollToTime:ue}),()=>G()}});const version="4.0.1";var Plugin={version:version,QCalendarDay:QCalendarDay,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarDay.name,QCalendarDay)}};export{QCalendarDay,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=getDayIdentifier(parsed(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],d=[],u=42,l=0){const s=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,v=y===s;if(!(s<getDayIdentifier(e)))while((!v||c.length<l)&&c.length<u){if(y=getDayIdentifier(m),v=v||y>s&&c.length>=l,v)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,d),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(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=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}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 withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?v(o.value):parseTimestamp(a.value)}),d=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),l=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=c(n,e);return{"q-past-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==u&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===u,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===i||!0===d||!0===u),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getVerticalScrollPosition(n);o<=0?d!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],d=getHorizontalScrollPosition(n);o<=0?d!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:d,headerColumnRef:u}){const l=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),s=computed(()=>parseInt(t.intervalCount,10)),y=computed(()=>parseFloat(t.intervalHeight)),v=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&u.value&&(e=u.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>l.value*m.value),p=computed(()=>s.value*y.value),f=computed(()=>s.value*v.value),h=computed(()=>T(r.value)),D=computed(()=>I(o.value)),g=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return g.value.map(e=>createIntervalList(e,l.value,m.value,s.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientY,s=(l-o.top)/y.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,l=(u&&u[0]?u[0]:d).clientX,s=(l-o.left)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*y.value}function W(e){return e/m.value*v.value}function B(e){return parseInt(e,10)*m.value/y.value}function z(e){return parseInt(e,10)*m.value/v.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*p.value;return t&&(i<0&&(i=0),i>p.value)&&(i=p.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:l,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:v,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:Y,getScopeForSlot:x,getScopeForSlotX:U,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const i=t[o],d=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[d]){const u="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),l=e=>{const t=e;return(void 0===i.button||t.buttons>0&&t.button===i.button)&&(i.prevent&&t.preventDefault(),i.stop&&t.stopPropagation(),a(o,n(t,o))),i.result};u in r?Array.isArray(r[u])?r[u].push(l):r[u]=[r[u],l]:r[u]=l}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:u,parsedValue:l,weekdaySkips:s,direction:c,maxDays:m,times:y,emittedValue:v,emit:p}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),v.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,weekdaySkips:u,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function v(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:g();break;case 38:h();break;case 39:_();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return l.value="next",void(d.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);l.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);l.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===i.value)return void(d.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));l.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));l.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,s.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:v}}var QCalendarDay=defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(y,{slots:v,emit:c,expose:L}){const e=ref(null),Y=ref(null),x=ref(null),p=ref(null),t=ref(null),f=ref({}),a=ref({}),n=ref({}),i=ref("next"),d=ref(y.modelValue||today()),u=ref("0000-00-00"),l=ref(0),D=ref(y.modelValue),s=reactive({width:0,height:0}),g=ref(!1),m=ref(!1),U=ref(null),q=ref(null),r=(watch(()=>y.view,()=>{l.value=0}),computed(()=>{return"month"===y.view?"month-interval":y.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const _=useEmitListeners(P).emitListeners,T=useCellWidth(y).isSticky,{times:I,setCurrent:B,updateCurrent:z}=useTimes(y),{weekdaySkips:o,parsedStart:k,parsedEnd:V,dayFormatter:K,weekdayFormatter:X,ariaDateFormatter:$,dayStyleDefault:Z,getRelativeClasses:w}=(z(),B(),useCommon(y,{startDate:d,endDate:u,times:I})),N=computed(()=>{return parseTimestamp(y.modelValue,I.now)||k.value||I.today}),j=(t.value=N.value,p.value=N.value.date,useRenderValues(y,{parsedView:r,parsedValue:N,times:I})).renderValues,{rootRef:M,scrollWidth:Q,__initCalendar:J,__renderCalendar:G}=useCalendar(y,Ve,{scrollArea:e,pane:Y}),{days:S,intervals:ee,intervalFormatter:te,ariaDateTimeFormatter:ae,parsedCellWidth:E,getIntervalClasses:ne,showIntervalLabelDefault:re,styleDefault:oe,getTimestampAtEventInterval:ie,getTimestampAtEvent:de,getScopeForSlot:b,scrollToTime:ue,heightToMinutes:le,timeDurationHeight:se,timeStartPos:ce}=useInterval(y,{weekdaySkips:o,times:I,scrollArea:e,parsedStart:k,parsedEnd:V,maxDays:l,size:s,headerColumnRef:x}),O=useMove(y,{parsedView:r,parsedValue:N,weekdaySkips:o,direction:i,maxDays:l,times:I,emittedValue:D,emit:c}).move,A=useMouse(c,_).getDefaultMouseEventHandlers,me=useCheckChange(c,{days:S,lastStart:U,lastEnd:q}).checkChange,C=useEvents().isKeyCode,ye=useKeyboard(y,{rootRef:M,focusRef:p,focusValue:t,datesRef:f,days:S,parsedView:r,parsedValue:N,emittedValue:D,weekdaySkips:o,direction:i,times:I}).tryFocus,W=computed(()=>{return"day"===r.value&&parseInt(y.columnCount,10)>1?parseInt(y.columnCount,10):"day"===r.value&&y.maxDays&&y.maxDays>1?y.maxDays:S.value.length}),ve=computed(()=>{return M.value?parseInt(window.getComputedStyle(M.value).getPropertyValue("--calendar-intervals-width"),10):0}),H=computed(()=>{if(M.value){const e=s.width||M.value.getBoundingClientRect().width;if(e&&ve.value&&W.value)return(e-Q.value-ve.value)/W.value+"px"}return 100/W.value+"%"});function pe(){D.value=today()}function fe(e=1){O(e)}function he(e=1){O(-e)}function De({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===D.value}function ge(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===T.value},style:{marginRight:Q.value+"px"}},[_e(),Te()])}function _e(){const e=v["head-intervals"],t={timestamps:S.value,days:S.value,date:y.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===T.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function Te(){return h("div",{ref:x,class:{"q-calendar-day__head--days__column":!0}},[Ie(),ke()])}function Ie(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...we()])}function ke(){const e=v["head-days-events"];return nextTick(()=>{if(n.value&&0===parseInt(y.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Ne()])}function we(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>Me(S.value[0],e)):S.value.map(e=>Me(e))}function Ne(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>Ee(S.value[0],e)):S.value.map(e=>Ee(e))}function Me(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==y.noActiveDate&&F(t),o=b(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),!0===T.value?y.cellWidth:H.value),d=y.weekdayStyle||Z,u={width:i,maxWidth:i,minWidth:i,...d({scope:o})},l=(!0===T.value&&(u.minWidth=i),"function"===typeof y.weekdayClass?y.weekdayClass({scope:o}):{}),s=!0===y.focusable&&y.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...l,...w(t),"q-active-date":r,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===s},style:u,onFocus:()=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&C(e,[13,32])&&(D.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ce(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&We(t,e),useFocusHelper()])}function Se(e){return"stacked"===y.dateHeader?[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&Oe(e)]:"inline"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&Oe(e)])):"inverted"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderBtn&&Oe(e),!0!==y.noDefaultHeaderText&&R(e)])):void 0}function Ee(e,t){const a=v["head-day-event"],n=!0!==y.noActiveDate&&F(e),r=b(e,t),o=(r.activeDate=n,r.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(e.weekday),!0===T.value?convertToUnit(E.value):H.value),i={width:o,maxWidth:o,minWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...w(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function R(e){const t=v["head-weekday-label"],a=!0===y.shortWeekdayLabel,n=b(e),r=(n.shortWeekdayLabel=y.shortWeekdayLabel,n.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",r,t&&t({scope:n})||be(e,a))}function be(e,t){const a=X.value(e,t||y.weekdayBreakpoints[0]>0&&E.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},y.weekdayBreakpoints[1]>0&&E.value<=y.weekdayBreakpoints[1]?minCharWidth(a,y.minWeekdayLabel):a)}function Oe(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+y.dateAlign]:!0}};return h("div",t,Ae(e))}function Ae(a){const e=!0!==y.noActiveDate&&F(a),t=K.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(a.weekday)},i={class:{"q-calendar-day__head--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__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&C(e,[13,32])&&(D.value=a.date,void 0!==_.value.onClickDate)&&c("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==y.noAria&&(i.ariaLabel=$.value(a)),r?r({scope:o}):useButton(y,i,n?n({scope:o}):t)}function Ce(e,t){const a=v["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function We(e,t){const a=v["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function He(){return h("div",{class:"q-calendar-day__body"},[Fe()])}function Fe(){return!0===T.value?h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==T.value&&Pe(),Le()]):!0===y.noScroll?Re():h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Re()])}function Re(){return h("div",{ref:Y,class:"q-calendar-day__pane"},[Pe(),Le()])}function Le(){const e=v["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===T.value&&!0!==y.noHeader&&ge(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===T.value&&Pe(),...Ye()]),e&&e({scope:{days:S.value}})])}function Ye(){return 1===S.value.length&&parseInt(y.columnCount,10)>0?Array.apply(null,new Array(parseInt(y.columnCount,10))).map((e,t)=>t+parseInt(y.columnIndexStart,10)).map(e=>xe(S.value[0],0,e)):S.value.map((e,t)=>xe(e,t))}function xe(e,t,a){const n=v["day-body"],r=b(e,a),o=!0===T.value?y.cellWidth:H.value,i={width:o,maxWidth:o,minWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...w(e)},style:i},[...Ue(t,a),n&&n({scope:r})])}function Ue(e,t){return ee.value[e].map(e=>qe(e,t))}function qe(a,n){const e=convertToUnit(y.intervalHeight),t=y.intervalStyle||oe,r=v["day-interval"],o=b(a,n),i=(o.droppable=m.value===getDayTimeIdentifier(a),"function"===typeof y.intervalClass?y.intervalClass({scope:o}):{}),d=!0===y.focusable&&y.focusType.includes("interval"),u=getDateTime(a),l={key:u,tabindex:!0===d?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...ne(a,Array.from(y.selectedDates),y.selectedStartEndDates),"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===d},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"interval",o)?m.value=getDayTimeIdentifier(a):m.value="")},onKeydown:e=>{C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(C(e,[13,32])){const t=b(a,n);D.value=t.timestamp.date,void 0!==_.value.onClickTime&&c("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=b(ie(e,a,y.timeClicksClamped,I.now),n);return{scope:t,event:e}})},s=(!0!==y.noAria&&(l.ariaLabel=ae.value(a)),r?r({scope:o}):void 0);return h("div",l,[s,useFocusHelper()])}function Pe(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===T.value},...A("-interval",e=>{const t=de(e,k.value,y.timeClicksClamped,I.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Be())}function Be(){return ee.value[0].map(e=>ze(e))}function ze(e){const t=v["interval-label"],a=convertToUnit(y.intervalHeight),n=y.shortIntervalLabel,r=y.showIntervalLabel||re,o=r(e),i=o?te.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Ve(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&u.value===t.date&&l.value===a||(d.value=e.date,u.value=t.date,l.value=a),s.width>0),r=withDirectives(h("div",{key:d.value,class:"q-calendar-day"},[!0===n&&!0!==T.value&&!0!==y.noHeader&&ge(),n&&He()]),[[ResizeObserver$1,De]]);if(!0!==y.animated)return r;{const o="q-calendar--"+("prev"===i.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([S],me,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(D.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}D.value=e}p.value=e}),watch(D,(e,t)=>{if(D.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{f.value[p.value]?f.value[p.value].focus():ye()}),watch(()=>y.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{f.value={},a.value={},n.value={}}),onMounted(()=>{J()}),L({prev:he,next:fe,move:O,moveToToday:pe,updateCurrent:z,timeStartPos:ce,timeDurationHeight:se,heightToMinutes:le,scrollToTime:ue}),()=>G()}});const version="4.0.2";var Plugin={version:version,QCalendarDay:QCalendarDay,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarDay.name,QCalendarDay)}};export{QCalendarDay,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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.QCalendarDay=t(e.Vue))})(this,function(Ze){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,C=31,l=12,n=1,h=1,o=7,r=60,u=24,N=0,M=6e4,A=36e5,F=864e5,E=6048e5,O=60,W=3600,q=86400,x=604800,L={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},H={hour:0,minute:0};function R(e){return!!a.exec(e)}function ze(e){const t=a.exec(e);return t?{date:e,time:i(parseInt(t[6],10)||0,2)+":"+i(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 U(e,t=!1){const a=t?"UTC":"";return g({date:i(e[`get${a}FullYear`](),4)+"-"+i(e[`get${a}Month`]()+1,2)+"-"+i(e[`get${a}Date`](),2),time:i(e[`get${a}Hours`]()||0,2)+":"+i(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 i(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function B(e){return 1===(e%4===0^e%100===0^e%400===0)}function d(e,t){return(B(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>d(e.year,e.month)&&(e.day=h,++e.month,e.month>l)&&(e.month=n,++e.year),e}function w(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=l),e.day=d(e.year,e.month)),e}function $e(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,i(t,2),i(a,2)].join("-")}function Y(e){return e===$e()}function Z(e,t,a){let n=j(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],w),n=g(n),a&&(n=$(n,a,n.hasTime)),n}function z(e,t,a){let n=j(e);const r=d(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=w(n);return n=m(n,t[t.length-1],p),n=g(n),a&&(n=$(n,a,n.hasTime)),n}function I(e){const t=j(e);return t.day=h,g(t),t}function S(e){const t=j(e);return t.day=d(t.year,t.month),g(t),t}function Q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function P(e,t){return c(e)===c(t)}function J(e,t){return v(e)===v(t)}function G(e,t){return Qe(e)===Qe(t)}function je(e,t){let a=ze(e);return null===a?null:(a=g(a),t&&$(a,t,a.hasTime),a)}function Ke(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function Xe(e){return Ke(e)+s(e)}function ee(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 $(e,t,a=!1){let n=Ke(t),r=Ke(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function te(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&$(e,a,!0),e}function ae(e){return e.weekday=ie(e),e}function ne(e){return e.doy=ue(e),e}function re(e){return e.workweek=le(e),e}function oe(e,t,a,n,r){const o=Ke(e);if(void 0!==t){const i=Ke(ze(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=Ke(ze(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=ze(r[l][0]),c=ze(r[l][1]);if(pe(e,s,c)){e.disabled=!0;break}}else{const v=Ke(je(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=v(e),e.date=c(e),e.weekday=ie(e),e.doy=ue(e),e.workweek=le(e),e}function ue(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 le(e){0===e.year&&(e=je($e()));const t=me(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)/E);return 1+Math.floor(o)}function ie(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function j(e){return{...e}}function c(e){let t=i(e.year,4)+"-"+i(e.month,2);return e.hasDay&&(t+="-"+i(e.day,2)),t}function v(e){return e.hasTime?i(e.hour,2)+":"+i(e.minute,2):""}function Qe(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function de(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function se(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 ce(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ke(t),c=[];let v=j(e),m=0,y=m===s;if(!(s<Ke(e)))while((!y||c.length<d)&&c.length<i){if(m=Ke(v),y=y||m>s&&c.length>=d,y)break;if(0===n[v.weekday]);else{const f=j(v);g(f),$(f,a),oe(f,r,o,u,l),c.push(f)}v=k(v,p)}return c}function ve(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=j(t);u.push(te(i,l,o))}return u}function K(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(ye(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+Qe(t)),o}}}function me(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 ye(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 e(e){return isFinite(parseInt(e,10))}function fe(e,t=!1){const a=!0===t?Xe:Ke;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function he(e,t=!1){const a=!0===t?Xe:Ke;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function pe(e,t,a,n){const r=Ke(e)+(!0===n?s(e):0),o=Ke(t)+(!0===n?s(t):0),u=Ke(a)+(!0===n?s(a):0);return r>=o&&r<=u}function we(e,t,a,n){const r=Ke(e),o=Ke(t),u=Ke(a),l=Ke(n);return r>=u&&r<=l||o>=u&&o<=l||u>=r&&o>=l}function X(e,t){const n=j(e);let r;return ke(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ge.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Te(n,ge[r]),g(n),n}const ge=["minute","hour","day","month"];function ke(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function De(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,_e(e)}return e}function _e(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,be(e)}return e}function be(t){y(t);let a=d(t.year,t.month);if(t.day>a){++t.month,t.month>l&&y(t);let e=t.day-a;a=d(t.year,t.month);do{e>a&&(++t.month,t.month>l&&y(t),e-=a,a=d(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&&y(t),a=d(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&y(t),a=d(t.year,t.month))}while(e>a);t.day=a-e}return t}function y(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<n&&(e.month+=l,--e.year);return e}function Te(e,t){switch(t){case"minute":return De(e);case"hour":return _e(e);case"day":return be(e);case"month":return y(e)}}function Ie(e,t){const a=ee(e,t,!0);return Math.floor(a/F)}function Se(e,t){let a=j(e),n=j(t);return a=m(a,0),n=m(n,6),Math.ceil(Ie(a,n)/o)}const Ce={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 Ne(){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(Ce[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Me(t,a){const e=Object.keys(Ce),n=Ne();return e.map(e=>n(e,t,a))}function Ae(){const o=(e,t)=>"",u={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,u[e]||u["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 Fe(t,a){const n=Ae();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ee={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:C,MONTH_MAX:l,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:N,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_WEEK:E,Timestamp:L,TimeObject:H,today:$e,getStartOfWeek:Z,getEndOfWeek:z,getStartOfMonth:I,getEndOfMonth:S,parseTime:Q,validateTimestamp:R,parsed:ze,parseTimestamp:je,parseDate:U,getDayIdentifier:Ke,getTimeIdentifier:s,getDayTimeIdentifier:Xe,diffTimestamp:ee,updateRelative:$,updateMinutes:te,updateWeekday:ae,updateDayOfYear:ne,updateWorkWeek:re,updateDisabled:oe,updateFormatted:g,getDayOfYear:ue,getWorkWeek:le,getWeekday:ie,isLeapYear:B,daysInMonth:d,copyTimestamp:j,padNumber:i,getDate:c,getTime:v,getDateTime:Qe,nextDay:p,prevDay:w,relativeDays:k,findWeekday:m,getWeekdaySkips:se,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:K,makeDate:me,makeDateTime:ye,validateNumber:e,isBetweenDates:pe,isOverlappingDates:we,daysBetween:Ie,weeksBetween:Se,addToDate:X,compareTimestamps:V,compareDate:P,compareTime:J,compareDateTime:G,getWeekdayFormatter:Ne,getWeekdayNames:Me,getMonthFormatter:Ae,getMonthNames:Fe},Ee=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:C,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:N,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:E,MINUTES_IN_HOUR:r,MONTH_MAX:l,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:W,SECONDS_IN_MINUTE:O,SECONDS_IN_WEEK:x,TimeObject:H,Timestamp:L,addToDate:X,compareDate:P,compareDateTime:G,compareTime:J,compareTimestamps:V,copyTimestamp:j,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:K,daysBetween:Ie,daysInMonth:d,default:Ee,diffTimestamp:ee,findWeekday:m,getDate:c,getDateTime:Qe,getDayIdentifier:Ke,getDayOfYear:ue,getDayTimeIdentifier:Xe,getEndOfMonth:S,getEndOfWeek:z,getMonthFormatter:Ae,getMonthNames:Fe,getStartOfMonth:I,getStartOfWeek:Z,getTime:v,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:Ne,getWeekdayNames:Me,getWeekdaySkips:se,getWorkWeek:le,isBetweenDates:pe,isLeapYear:B,isOverlappingDates:we,isToday:Y,makeDate:me,makeDateTime:ye,maxTimestamp:fe,minTimestamp:he,moveRelativeDays:de,nextDay:p,padNumber:i,parseDate:U,parseTime:Q,parseTimestamp:je,parsed:ze,prevDay:w,relativeDays:k,today:$e,updateDayOfYear:ne,updateDisabled:oe,updateFormatted:g,updateMinutes:te,updateRelative:$,updateWeekday:ae,updateWorkWeek:re,validateNumber:e,validateTimestamp:R,weeksBetween:Se});function Je(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Oe(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ge(e,t){return 0===t?e:e.slice(0,t)}var We={convertToUnit:Je,indexOf:Oe},We=Object.freeze({__proto__:null,convertToUnit:Je,default:We,indexOf:Oe,minCharWidth:Ge}),et={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 tt(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=Ze.reactive({width:0,height:0}),o=Ze.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ze.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ze.withDirectives(Ze.h("div",{...e},[a()]),[[et,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const qe={modelValue:{type:String,default:$e(),validator:e=>""===e||R(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function at(t,{startDate:e,endDate:a,times:n}){const r=Ze.computed(()=>se(t.weekdays)),o=Ze.computed(()=>je(e.value)),u=Ze.computed(()=>{return"0000-00-00"===a.value?y(o.value):je(a.value)}),l=Ze.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return K(t.locale,()=>e)}),i=Ze.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return K(t.locale,(e,t)=>t?n:a)}),d=Ze.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return K(t.locale,()=>e)});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=Ke(t),r=Ke(ze(e[0])),o=Ke(ze(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:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return Z(e,t.weekdays,n.today)}function y(e){return z(e,t.weekdays,n.today)}function f(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:f}}function xe(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function Le(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function He(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Re(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Ue(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=He(n);o<=0?l!==r&&xe(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;xe(n,a),a!==r&&Ue(n,r,o-t,e)})}function Be(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Re(n);o<=0?l!==r&&Le(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Be(n,r,o-t,e)})}const Ye={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function nt(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:l,headerColumnRef:i}){const d=Ze.computed(()=>parseInt(t.intervalStart,10)),v=Ze.computed(()=>parseInt(t.intervalMinutes,10)),s=Ze.computed(()=>parseInt(t.intervalCount,10)),m=Ze.computed(()=>parseFloat(t.intervalHeight)),y=Ze.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=Ze.computed(()=>d.value*v.value),f=Ze.computed(()=>s.value*m.value),h=Ze.computed(()=>s.value*y.value),p=Ze.computed(()=>D(r.value)),w=Ze.computed(()=>_(o.value)),g=Ze.computed(()=>{return ce(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=Ze.computed(()=>{return g.value.map(e=>ve(e,d.value,v.value,s.value,a.now))});function D(e){return Z(e,t.weekdays,a.today)}function _(e){return z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(Qe(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Xe(t),r=Xe(ze(e[0])),o=Xe(ze(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const C=Ze.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return K(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=Ze.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return K(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){}function x(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=E,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e)};return a.timeStartPosX=q,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Ue(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Be(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function O(e){return e/v.value*y.value}function V(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/y.value}function W(e,t=!0){const a=Q(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}function q(e,t=!0){const a=Q(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:f,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:w,days:g,intervals:k,intervalFormatter:C,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:M,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:x,getTimestampAtEvent:L,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:E,timeDurationWidth:O,heightToMinutes:V,widthToMinutes:P,timeStartPos:W,timeStartPosX:q}}const Ve={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Pe={maxDays:{type:Number,default:1}},rt={now:{type:String,validator:e=>""===e||R(e),default:""}};function ot(e){const t=Ze.reactive({now:je("0000-00-00 00:00"),today:je("0000-00-00")}),a=Ze.computed(()=>e.now?je(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();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ze.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function ut(r,{parsedView:o,parsedValue:u,times:l}){const e=Ze.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=Z(e,r.weekdays,l.today),n=z(a,r.weekdays,l.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=de(j(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),g(n),t=d(a.year,a.month);break;case"resource":t=1,n=de(j(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const lt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let it,dt;function st(e,a){const t={};for(const n in e){const r=e[n],o=lt("on-"+n);if(void 0===it)return void console.warn("$listeners has not been set up");if(void 0!==it.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),dt(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function ct(e,t){return st(vt(e),t)}function vt(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 f(e){return Object.keys(vt(e))}function mt(e,t){return dt=e,it=t,{getMouseEventHandlers:st,getDefaultMouseEventHandlers:ct,getMouseEventName:vt,getRawMouseEvents:f}}const yt=["moved"];function ft(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:f}){function e(a=1){if(0===a)y.value=$e();else{let e=j(d.value);const n=a>0,r=n?p:w,o=n?C:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),ae(e);while(0===s.value[e.weekday])e=X(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,l.weekdays);break}ae(e),g(e),ne(e),$(e,m.now),y.value=e.date,f("moved",e)}}return{move:e}}const ht=/^on[A-Z]/;function pt(e=Ze.getCurrentInstance()){return{emitListeners:Ze.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{ht.test(e)&&(t[e]=!0)}),t})}}function wt(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ze.h("span",e)]}function gt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ze.h("button",{...a,tabindex:r?0:-1},[n,r&&wt()])}const kt={cellWidth:[Number,String]};function Dt(e){const t=Ze.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const _t=["change"];function bt(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 Tt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const It=Tt().isKeyCode,St={useNavigation:Boolean};function Ct(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:l,weekdaySkips:i,direction:d,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",f),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function f(e){m(e)&&It(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&It(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:g();break;case 38:p();break;case 39:k();break;case 40:w();break}}function p(){let e=j(r.value);if("month"===u.value){if(e=X(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=X(e,{minute:parseInt(t.intervalMinutes)}));d.value="prev",n.value=e.date}function w(){let e=j(r.value);if("month"===u.value){if(e=X(e,{day:7}),r.value.month!==e.month)return d.value="next",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=X(e,{minute:parseInt(t.intervalMinutes)}));d.value="next",n.value=e.date}function g(){let e=j(r.value);d.value="prev";do{e=X(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function k(){let e=j(r.value);d.value="next";do{e=X(e,{day:1})}while(0===i.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function D(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=X(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=X(e,{day:t})}else"day"===u.value?e=X(e,{day:-1}):"week"===u.value&&(e=X(e,{day:-7}));d.value="prev",n.value=e.date}function _(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=X(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=X(e,{day:t})}else"day"===u.value?e=X(e,{day:1}):"week"===u.value&&(e=X(e,{day:7}));d.value="next",n.value=e.date}function b(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=Z(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=X(e,{day:-1});n.value=e.date}function T(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=X(e,{day:-1});n.value=e.date}return Ze.onBeforeUnmount(()=>{v()}),Ze.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:y}}var Nt=Ze.defineComponent({name:"QCalendarDay",directives:[et],props:{...qe,...Ye,...Ve,...Pe,...rt,...kt,...St},emits:["update:model-value",..._t,...yt,...f("-date"),...f("-interval"),...f("-head-intervals"),...f("-head-day"),...f("-time")],setup(m,{slots:y,emit:c,expose:x}){const e=Ze.ref(null),L=Ze.ref(null),H=Ze.ref(null),f=Ze.ref(null),t=Ze.ref(null),h=Ze.ref({}),a=Ze.ref({}),n=Ze.ref({}),u=Ze.ref("next"),l=Ze.ref(m.modelValue||$e()),i=Ze.ref("0000-00-00"),d=Ze.ref(0),p=Ze.ref(m.modelValue),s=Ze.reactive({width:0,height:0}),w=Ze.ref(!1),v=Ze.ref(!1),R=Ze.ref(null),U=Ze.ref(null),r=(Ze.watch(()=>m.view,()=>{d.value=0}),Ze.computed(()=>{return"month"===m.view?"month-interval":m.view})),B=Ze.getCurrentInstance();if(null===B)throw new Error("current instance is null");const g=pt(B).emitListeners,k=Dt(m).isSticky,{times:D,setCurrent:Y,updateCurrent:V}=ot(m),{weekdaySkips:o,parsedStart:_,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:j,getRelativeClasses:b}=(V(),Y(),at(m,{startDate:l,endDate:i,times:D})),T=Ze.computed(()=>{return je(m.modelValue,D.now)||_.value||D.today}),K=(t.value=T.value,f.value=T.value.date,ut(m,{parsedView:r,parsedValue:T,times:D})).renderValues,{rootRef:I,scrollWidth:X,__initCalendar:Q,__renderCalendar:J}=tt(m,Pe,{scrollArea:e,pane:L}),{days:S,intervals:G,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:C,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:oe,getTimestampAtEvent:ue,getScopeForSlot:N,scrollToTime:le,heightToMinutes:ie,timeDurationHeight:de,timeStartPos:se}=nt(m,{weekdaySkips:o,times:D,scrollArea:e,parsedStart:_,parsedEnd:P,maxDays:d,size:s,headerColumnRef:H}),M=ft(m,{parsedView:r,parsedValue:T,weekdaySkips:o,direction:u,maxDays:d,times:D,emittedValue:p,emit:c}).move,A=mt(c,g).getDefaultMouseEventHandlers,ce=bt(c,{days:S,lastStart:R,lastEnd:U}).checkChange,F=Tt().isKeyCode,ve=Ct(m,{rootRef:I,focusRef:f,focusValue:t,datesRef:h,days:S,parsedView:r,parsedValue:T,emittedValue:p,weekdaySkips:o,direction:u,times:D}).tryFocus,E=Ze.computed(()=>{return"day"===r.value&&parseInt(m.columnCount,10)>1?parseInt(m.columnCount,10):"day"===r.value&&m.maxDays&&m.maxDays>1?m.maxDays:S.value.length}),me=Ze.computed(()=>{return I.value?parseInt(window.getComputedStyle(I.value).getPropertyValue("--calendar-intervals-width"),10):0}),O=Ze.computed(()=>{if(I.value){const e=s.width||I.value.getBoundingClientRect().width;if(e&&me.value&&E.value)return(e-X.value-me.value)/E.value+"px"}return 100/E.value+"%"});function ye(){p.value=$e()}function fe(e=1){M(e)}function he(e=1){M(-e)}function pe({width:e,height:t}){s.width=e,s.height=t}function W(e){return e.date===p.value}function we(){return Ze.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:X.value+"px"}},[ge(),ke()])}function ge(){const e=y["head-intervals"],t={timestamps:S.value,days:S.value,date:m.modelValue};return Ze.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===k.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ke(){return Ze.h("div",{ref:H,class:{"q-calendar-day__head--days__column":!0}},[De(),_e()])}function De(){return Ze.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function _e(){const e=y["head-days-events"];return Ze.nextTick(()=>{if(n.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),Ze.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ze.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Te()])}function be(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ie(S.value[0],e)):S.value.map(e=>Ie(e))}function Te(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ce(S.value[0],e)):S.value.map(e=>Ce(e))}function Ie(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e),u=(o.activeDate=r,o.droppable=w.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===k.value?m.cellWidth:O.value),l=m.weekdayStyle||j,i={width:u,maxWidth:u,minWidth:u,...l({scope:o})},d=(!0===k.value&&(i.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:()=>{!0===s&&(f.value=c)},onKeydown:e=>{!0!==t.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&F(e,[13,32])&&(p.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")}};return Ze.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Fe(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ee(t,e),wt()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&Me(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ze.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&Me(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ze.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Me(e),!0!==m.noDefaultHeaderText&&q(e)])):void 0}function Ce(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===k.value?Je(C.value):O.value),u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ze.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...b(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function q(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=N(e),r=(n.shortWeekdayLabel=m.shortWeekdayLabel,n.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ze.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=z.value(e,t||m.weekdayBreakpoints[0]>0&&C.value<=m.weekdayBreakpoints[0]);return Ze.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&C.value<=m.weekdayBreakpoints[1]?Ge(a,m.minWeekdayLabel):a)}function Me(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ze.h("div",t,Ae(e))}function Ae(a){const e=!0!==m.noActiveDate&&W(a),t=Z.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&F(e,[13,32])&&(p.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=$.value(a)),r?r({scope:o}):gt(m,u,n?n({scope:o}):t)}function Fe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ze.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Ee(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ze.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Oe(){return Ze.h("div",{class:"q-calendar-day__body"},[We()])}function We(){return!0===k.value?Ze.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Be(),xe()]):!0===m.noScroll?qe():Ze.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[qe()])}function qe(){return Ze.h("div",{ref:L,class:"q-calendar-day__pane"},[Be(),xe()])}function xe(){const e=y["day-container"];return Ze.h("div",{class:"q-calendar-day__day-container"},[!0===k.value&&!0!==m.noHeader&&we(),Ze.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===k.value&&Be(),...Le()]),e&&e({scope:{days:S.value}})])}function Le(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>He(S.value[0],0,e)):S.value.map((e,t)=>He(e,t))}function He(e,t,a){const n=y["day-body"],r=N(e,a),o=!0===k.value?m.cellWidth:O.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ze.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...b(e)},style:u},[...Re(t,a),n&&n({scope:r})])}function Re(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=Je(m.intervalHeight),t=m.intervalStyle||re,r=y["day-interval"],o=N(a,n),u=(o.droppable=v.value===Xe(a),"function"===typeof m.intervalClass?m.intervalClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("interval"),i=Qe(a),d={key:i,tabindex:!0===l?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...ae(a,m.selectedDates,m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onKeydown:e=>{F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(F(e,[13,32])){const t=N(a,n);p.value=t.timestamp.date,void 0!==g.value.onClickTime&&c("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=N(oe(e,a,m.timeClicksClamped,D.now),n);return{scope:t,event:e}})},s=(!0!==m.noAria&&(d.ariaLabel=te.value(a)),r?r({scope:o}):void 0);return Ze.h("div",d,[s,wt()])}function Be(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===k.value},...A("-interval",e=>{const t=ue(e,_.value,m.timeClicksClamped,D.now);return{scope:{timestamp:t},event:e}})};return Ze.h("div",e,Ye())}function Ye(){return G.value[0].map(e=>Ve(e))}function Ve(e){const t=y["interval-label"],a=Je(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||ne,o=r(e),u=o?ee.value(e,n):void 0;return Ze.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ze.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Pe(){const{start:e,end:t,maxDays:a}=K.value,n=(l.value===e.date&&i.value===t.date&&d.value===a||(l.value=e.date,i.value=t.date,d.value=a),s.width>0),r=Ze.withDirectives(Ze.h("div",{key:l.value,class:"q-calendar-day"},[!0===n&&!0!==k.value&&!0!==m.noHeader&&we(),n&&Oe()]),[[et,pe]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ze.h(Ze.Transition,{name:o,appear:!0},()=>r)}}return Ze.watch([S],ce,{deep:!0,immediate:!0}),Ze.watch(()=>m.modelValue,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=Ke(ze(e)),n=Ke(ze(t));u.value=a>=n?"next":"prev"}p.value=e}f.value=e}),Ze.watch(p,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=Ke(ze(e)),n=Ke(ze(t));u.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ze.watch(f,e=>{e&&(t.value=je(e))}),Ze.watch(t,()=>{h.value[f.value]?h.value[f.value].focus():ve()}),Ze.watch(()=>m.maxDays,e=>{d.value=e}),Ze.onBeforeUpdate(()=>{h.value={},a.value={},n.value={}}),Ze.onMounted(()=>{Q()}),x({prev:he,next:fe,move:M,moveToToday:ye,updateCurrent:V,timeStartPos:se,timeDurationHeight:de,heightToMinutes:ie,scrollToTime:le}),()=>J()}});const Mt="4.0.1";Ee={version:Mt,QCalendarDay:Nt,...Ee,...We,install(e){e.component(Nt.name,Nt)}};return Ee});
(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.QCalendarDay=t(e.Vue))})(this,function(Ze){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,C=31,l=12,n=1,h=1,o=7,r=60,u=24,N=0,M=6e4,A=36e5,F=864e5,E=6048e5,O=60,W=3600,q=86400,x=604800,L={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},H={hour:0,minute:0};function R(e){return!!a.exec(e)}function ze(e){const t=a.exec(e);return t?{date:e,time:i(parseInt(t[6],10)||0,2)+":"+i(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 U(e,t=!1){const a=t?"UTC":"";return g({date:i(e[`get${a}FullYear`](),4)+"-"+i(e[`get${a}Month`]()+1,2)+"-"+i(e[`get${a}Date`](),2),time:i(e[`get${a}Hours`]()||0,2)+":"+i(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 i(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function B(e){return 1===(e%4===0^e%100===0^e%400===0)}function d(e,t){return(B(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>d(e.year,e.month)&&(e.day=h,++e.month,e.month>l)&&(e.month=n,++e.year),e}function w(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=l),e.day=d(e.year,e.month)),e}function $e(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,i(t,2),i(a,2)].join("-")}function Y(e){return e===$e()}function Z(e,t,a){let n=j(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],w),n=g(n),a&&(n=$(n,a,n.hasTime)),n}function z(e,t,a){let n=j(e);const r=d(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=w(n);return n=m(n,t[t.length-1],p),n=g(n),a&&(n=$(n,a,n.hasTime)),n}function I(e){const t=j(e);return t.day=h,g(t),t}function S(e){const t=j(e);return t.day=d(t.year,t.month),g(t),t}function Q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function P(e,t){return c(e)===c(t)}function J(e,t){return v(e)===v(t)}function G(e,t){return Qe(e)===Qe(t)}function je(e,t){let a=ze(e);return null===a?null:(a=g(a),t&&$(a,t,a.hasTime),a)}function Ke(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function Xe(e){return Ke(e)+s(e)}function ee(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 $(e,t,a=!1){let n=Ke(t),r=Ke(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function te(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&$(e,a,!0),e}function ae(e){return e.weekday=ie(e),e}function ne(e){return e.doy=ue(e),e}function re(e){return e.workweek=le(e),e}function oe(e,t,a,n,r){const o=Ke(e);if(void 0!==t){const i=Ke(ze(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=Ke(ze(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=ze(r[l][0]),c=ze(r[l][1]);if(pe(e,s,c)){e.disabled=!0;break}}else{const v=Ke(je(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=v(e),e.date=c(e),e.weekday=ie(e),e.doy=ue(e),e.workweek=le(e),e}function ue(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 le(e){0===e.year&&(e=je($e()));const t=me(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)/E);return 1+Math.floor(o)}function ie(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function j(e){return{...e}}function c(e){let t=i(e.year,4)+"-"+i(e.month,2);return e.hasDay&&(t+="-"+i(e.day,2)),t}function v(e){return e.hasTime?i(e.hour,2)+":"+i(e.minute,2):""}function Qe(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function de(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function se(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 ce(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ke(t),c=[];let v=j(e),m=0,y=m===s;if(!(s<Ke(e)))while((!y||c.length<d)&&c.length<i){if(m=Ke(v),y=y||m>s&&c.length>=d,y)break;if(0===n[v.weekday]);else{const f=j(v);g(f),$(f,a),oe(f,r,o,u,l),c.push(f)}v=k(v,p)}return c}function ve(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=j(t);u.push(te(i,l,o))}return u}function K(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(ye(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+Qe(t)),o}}}function me(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 ye(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 e(e){return isFinite(parseInt(e,10))}function fe(e,t=!1){const a=!0===t?Xe:Ke;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function he(e,t=!1){const a=!0===t?Xe:Ke;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function pe(e,t,a,n){const r=Ke(e)+(!0===n?s(e):0),o=Ke(t)+(!0===n?s(t):0),u=Ke(a)+(!0===n?s(a):0);return r>=o&&r<=u}function we(e,t,a,n){const r=Ke(e),o=Ke(t),u=Ke(a),l=Ke(n);return r>=u&&r<=l||o>=u&&o<=l||u>=r&&o>=l}function X(e,t){const n=j(e);let r;return ke(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ge.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Te(n,ge[r]),g(n),n}const ge=["minute","hour","day","month"];function ke(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function De(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,_e(e)}return e}function _e(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,be(e)}return e}function be(t){y(t);let a=d(t.year,t.month);if(t.day>a){++t.month,t.month>l&&y(t);let e=t.day-a;a=d(t.year,t.month);do{e>a&&(++t.month,t.month>l&&y(t),e-=a,a=d(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&&y(t),a=d(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&y(t),a=d(t.year,t.month))}while(e>a);t.day=a-e}return t}function y(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<n&&(e.month+=l,--e.year);return e}function Te(e,t){switch(t){case"minute":return De(e);case"hour":return _e(e);case"day":return be(e);case"month":return y(e)}}function Ie(e,t){const a=ee(e,t,!0);return Math.floor(a/F)}function Se(e,t){let a=j(e),n=j(t);return a=m(a,0),n=m(n,6),Math.ceil(Ie(a,n)/o)}const Ce={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 Ne(){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(Ce[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Me(t,a){const e=Object.keys(Ce),n=Ne();return e.map(e=>n(e,t,a))}function Ae(){const o=(e,t)=>"",u={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,u[e]||u["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 Fe(t,a){const n=Ae();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ee={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:C,MONTH_MAX:l,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:N,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_WEEK:E,Timestamp:L,TimeObject:H,today:$e,getStartOfWeek:Z,getEndOfWeek:z,getStartOfMonth:I,getEndOfMonth:S,parseTime:Q,validateTimestamp:R,parsed:ze,parseTimestamp:je,parseDate:U,getDayIdentifier:Ke,getTimeIdentifier:s,getDayTimeIdentifier:Xe,diffTimestamp:ee,updateRelative:$,updateMinutes:te,updateWeekday:ae,updateDayOfYear:ne,updateWorkWeek:re,updateDisabled:oe,updateFormatted:g,getDayOfYear:ue,getWorkWeek:le,getWeekday:ie,isLeapYear:B,daysInMonth:d,copyTimestamp:j,padNumber:i,getDate:c,getTime:v,getDateTime:Qe,nextDay:p,prevDay:w,relativeDays:k,findWeekday:m,getWeekdaySkips:se,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:K,makeDate:me,makeDateTime:ye,validateNumber:e,isBetweenDates:pe,isOverlappingDates:we,daysBetween:Ie,weeksBetween:Se,addToDate:X,compareTimestamps:V,compareDate:P,compareTime:J,compareDateTime:G,getWeekdayFormatter:Ne,getWeekdayNames:Me,getMonthFormatter:Ae,getMonthNames:Fe},Ee=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:C,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:N,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:F,MILLISECONDS_IN_HOUR:A,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:E,MINUTES_IN_HOUR:r,MONTH_MAX:l,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:W,SECONDS_IN_MINUTE:O,SECONDS_IN_WEEK:x,TimeObject:H,Timestamp:L,addToDate:X,compareDate:P,compareDateTime:G,compareTime:J,compareTimestamps:V,copyTimestamp:j,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:K,daysBetween:Ie,daysInMonth:d,default:Ee,diffTimestamp:ee,findWeekday:m,getDate:c,getDateTime:Qe,getDayIdentifier:Ke,getDayOfYear:ue,getDayTimeIdentifier:Xe,getEndOfMonth:S,getEndOfWeek:z,getMonthFormatter:Ae,getMonthNames:Fe,getStartOfMonth:I,getStartOfWeek:Z,getTime:v,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:Ne,getWeekdayNames:Me,getWeekdaySkips:se,getWorkWeek:le,isBetweenDates:pe,isLeapYear:B,isOverlappingDates:we,isToday:Y,makeDate:me,makeDateTime:ye,maxTimestamp:fe,minTimestamp:he,moveRelativeDays:de,nextDay:p,padNumber:i,parseDate:U,parseTime:Q,parseTimestamp:je,parsed:ze,prevDay:w,relativeDays:k,today:$e,updateDayOfYear:ne,updateDisabled:oe,updateFormatted:g,updateMinutes:te,updateRelative:$,updateWeekday:ae,updateWorkWeek:re,validateNumber:e,validateTimestamp:R,weeksBetween:Se});function Je(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Oe(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ge(e,t){return 0===t?e:e.slice(0,t)}var We={convertToUnit:Je,indexOf:Oe},We=Object.freeze({__proto__:null,convertToUnit:Je,default:We,indexOf:Oe,minCharWidth:Ge}),et={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 tt(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=Ze.reactive({width:0,height:0}),o=Ze.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ze.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ze.withDirectives(Ze.h("div",{...e},[a()]),[[et,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const qe={modelValue:{type:String,default:$e(),validator:e=>""===e||R(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function at(t,{startDate:e,endDate:a,times:n}){const r=Ze.computed(()=>se(t.weekdays)),o=Ze.computed(()=>je(e.value)),u=Ze.computed(()=>{return"0000-00-00"===a.value?y(o.value):je(a.value)}),l=Ze.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return K(t.locale,()=>e)}),i=Ze.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return K(t.locale,(e,t)=>t?n:a)}),d=Ze.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return K(t.locale,()=>e)});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=Ke(t),r=Ke(ze(e[0])),o=Ke(ze(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:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return Z(e,t.weekdays,n.today)}function y(e){return z(e,t.weekdays,n.today)}function f(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:f}}function xe(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function Le(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function He(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Re(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Ue(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=He(n);o<=0?l!==r&&xe(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;xe(n,a),a!==r&&Ue(n,r,o-t,e)})}function Be(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=Re(n);o<=0?l!==r&&Le(n,r):requestAnimationFrame(e=>{const t=e-u,a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Be(n,r,o-t,e)})}const Ye={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function nt(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:l,headerColumnRef:i}){const d=Ze.computed(()=>parseInt(t.intervalStart,10)),v=Ze.computed(()=>parseInt(t.intervalMinutes,10)),s=Ze.computed(()=>parseInt(t.intervalCount,10)),m=Ze.computed(()=>parseFloat(t.intervalHeight)),y=Ze.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=Ze.computed(()=>d.value*v.value),f=Ze.computed(()=>s.value*m.value),h=Ze.computed(()=>s.value*y.value),p=Ze.computed(()=>D(r.value)),w=Ze.computed(()=>_(o.value)),g=Ze.computed(()=>{return ce(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=Ze.computed(()=>{return g.value.map(e=>ve(e,d.value,v.value,s.value,a.now))});function D(e){return Z(e,t.weekdays,a.today)}function _(e){return z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(Qe(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Xe(t),r=Xe(ze(e[0])),o=Xe(ze(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const C=Ze.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return K(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=Ze.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return K(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){}function x(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&$(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=E,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e)};return a.timeStartPosX=q,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Ue(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Be(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function O(e){return e/v.value*y.value}function V(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/y.value}function W(e,t=!0){const a=Q(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}function q(e,t=!0){const a=Q(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:f,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:w,days:g,intervals:k,intervalFormatter:C,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:M,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:x,getTimestampAtEvent:L,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:E,timeDurationWidth:O,heightToMinutes:V,widthToMinutes:P,timeStartPos:W,timeStartPosX:q}}const Ve={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Pe={maxDays:{type:Number,default:1}},rt={now:{type:String,validator:e=>""===e||R(e),default:""}};function ot(e){const t=Ze.reactive({now:je("0000-00-00 00:00"),today:je("0000-00-00")}),a=Ze.computed(()=>e.now?je(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();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ze.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function ut(r,{parsedView:o,parsedValue:u,times:l}){const e=Ze.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=Z(e,r.weekdays,l.today),n=z(a,r.weekdays,l.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=de(j(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),g(n),t=d(a.year,a.month);break;case"resource":t=1,n=de(j(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const lt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function it(a,e,t,n){const r={};for(const o in t){const u=t[o],l=lt("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[l]){const i="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};i in r?Array.isArray(r[i])?r[i].push(d):r[i]=[r[i],d]:r[i]=d}}return r}function dt(e,t,a,n){return it(e,t,st(a),n)}function st(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 f(e){return Object.keys(st(e))}function ct(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return it(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return dt(a,n,e,t)},getMouseEventName:st,getRawMouseEvents:f}}const vt=["moved"];function mt(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:f}){function e(a=1){if(0===a)y.value=$e();else{let e=j(d.value);const n=a>0,r=n?p:w,o=n?C:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),ae(e);while(0===s.value[e.weekday])e=X(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,l.weekdays);break}ae(e),g(e),ne(e),$(e,m.now),y.value=e.date,f("moved",e)}}return{move:e}}const yt=/^on[A-Z]/;function ft(e=Ze.getCurrentInstance()){return{emitListeners:Ze.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{yt.test(e)&&(t[e]=!0)}),t})}}function ht(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ze.h("span",e)]}function pt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ze.h("button",{...a,tabindex:r?0:-1},[n,r&&ht()])}const wt={cellWidth:[Number,String]};function gt(e){const t=Ze.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const kt=["change"];function Dt(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 _t(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const bt=_t().isKeyCode,Tt={useNavigation:Boolean};function It(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:l,weekdaySkips:i,direction:d,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",f),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function f(e){m(e)&&bt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&bt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:g();break;case 38:p();break;case 39:k();break;case 40:w();break}}function p(){let e=j(r.value);if("month"===u.value){if(e=X(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=X(e,{minute:parseInt(t.intervalMinutes)}));d.value="prev",n.value=e.date}function w(){let e=j(r.value);if("month"===u.value){if(e=X(e,{day:7}),r.value.month!==e.month)return d.value="next",void(l.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=X(e,{minute:parseInt(t.intervalMinutes)}));d.value="next",n.value=e.date}function g(){let e=j(r.value);d.value="prev";do{e=X(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function k(){let e=j(r.value);d.value="next";do{e=X(e,{day:1})}while(0===i.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(l.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(l.value=e.date)}else if("day"===u.value)return void(l.value=e.date);n.value=e.date}function D(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=X(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=X(e,{day:t})}else"day"===u.value?e=X(e,{day:-1}):"week"===u.value&&(e=X(e,{day:-7}));d.value="prev",n.value=e.date}function _(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=X(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=X(e,{day:t})}else"day"===u.value?e=X(e,{day:1}):"week"===u.value&&(e=X(e,{day:7}));d.value="next",n.value=e.date}function b(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=Z(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=X(e,{day:-1});n.value=e.date}function T(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=X(e,{day:-1});n.value=e.date}return Ze.onBeforeUnmount(()=>{v()}),Ze.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:y}}var St=Ze.defineComponent({name:"QCalendarDay",directives:[et],props:{...qe,...Ye,...Ve,...Pe,...rt,...wt,...Tt},emits:["update:model-value",...kt,...vt,...f("-date"),...f("-interval"),...f("-head-intervals"),...f("-head-day"),...f("-time")],setup(m,{slots:y,emit:c,expose:x}){const e=Ze.ref(null),L=Ze.ref(null),H=Ze.ref(null),f=Ze.ref(null),t=Ze.ref(null),h=Ze.ref({}),a=Ze.ref({}),n=Ze.ref({}),u=Ze.ref("next"),l=Ze.ref(m.modelValue||$e()),i=Ze.ref("0000-00-00"),d=Ze.ref(0),p=Ze.ref(m.modelValue),s=Ze.reactive({width:0,height:0}),w=Ze.ref(!1),v=Ze.ref(!1),R=Ze.ref(null),U=Ze.ref(null),r=(Ze.watch(()=>m.view,()=>{d.value=0}),Ze.computed(()=>{return"month"===m.view?"month-interval":m.view})),B=Ze.getCurrentInstance();if(null===B)throw new Error("current instance is null");const g=ft(B).emitListeners,k=gt(m).isSticky,{times:D,setCurrent:Y,updateCurrent:V}=ot(m),{weekdaySkips:o,parsedStart:_,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:j,getRelativeClasses:b}=(V(),Y(),at(m,{startDate:l,endDate:i,times:D})),T=Ze.computed(()=>{return je(m.modelValue,D.now)||_.value||D.today}),K=(t.value=T.value,f.value=T.value.date,ut(m,{parsedView:r,parsedValue:T,times:D})).renderValues,{rootRef:I,scrollWidth:X,__initCalendar:Q,__renderCalendar:J}=tt(m,Pe,{scrollArea:e,pane:L}),{days:S,intervals:G,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:C,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:oe,getTimestampAtEvent:ue,getScopeForSlot:N,scrollToTime:le,heightToMinutes:ie,timeDurationHeight:de,timeStartPos:se}=nt(m,{weekdaySkips:o,times:D,scrollArea:e,parsedStart:_,parsedEnd:P,maxDays:d,size:s,headerColumnRef:H}),M=mt(m,{parsedView:r,parsedValue:T,weekdaySkips:o,direction:u,maxDays:d,times:D,emittedValue:p,emit:c}).move,A=ct(c,g).getDefaultMouseEventHandlers,ce=Dt(c,{days:S,lastStart:R,lastEnd:U}).checkChange,F=_t().isKeyCode,ve=It(m,{rootRef:I,focusRef:f,focusValue:t,datesRef:h,days:S,parsedView:r,parsedValue:T,emittedValue:p,weekdaySkips:o,direction:u,times:D}).tryFocus,E=Ze.computed(()=>{return"day"===r.value&&parseInt(m.columnCount,10)>1?parseInt(m.columnCount,10):"day"===r.value&&m.maxDays&&m.maxDays>1?m.maxDays:S.value.length}),me=Ze.computed(()=>{return I.value?parseInt(window.getComputedStyle(I.value).getPropertyValue("--calendar-intervals-width"),10):0}),O=Ze.computed(()=>{if(I.value){const e=s.width||I.value.getBoundingClientRect().width;if(e&&me.value&&E.value)return(e-X.value-me.value)/E.value+"px"}return 100/E.value+"%"});function ye(){p.value=$e()}function fe(e=1){M(e)}function he(e=1){M(-e)}function pe({width:e,height:t}){s.width=e,s.height=t}function W(e){return e.date===p.value}function we(){return Ze.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:X.value+"px"}},[ge(),ke()])}function ge(){const e=y["head-intervals"],t={timestamps:S.value,days:S.value,date:m.modelValue};return Ze.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===k.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ke(){return Ze.h("div",{ref:H,class:{"q-calendar-day__head--days__column":!0}},[De(),_e()])}function De(){return Ze.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function _e(){const e=y["head-days-events"];return Ze.nextTick(()=>{if(n.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),Ze.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ze.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Te()])}function be(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ie(S.value[0],e)):S.value.map(e=>Ie(e))}function Te(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ce(S.value[0],e)):S.value.map(e=>Ce(e))}function Ie(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e),u=(o.activeDate=r,o.droppable=w.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),!0===k.value?m.cellWidth:O.value),l=m.weekdayStyle||j,i={width:u,maxWidth:u,minWidth:u,...l({scope:o})},d=(!0===k.value&&(i.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:()=>{!0===s&&(f.value=c)},onKeydown:e=>{!0!==t.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&F(e,[13,32])&&(p.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")}};return Ze.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Fe(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ee(t,e),ht()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&Me(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ze.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&Me(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ze.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Me(e),!0!==m.noDefaultHeaderText&&q(e)])):void 0}function Ce(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),!0===k.value?Je(C.value):O.value),u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ze.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...b(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function q(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=N(e),r=(n.shortWeekdayLabel=m.shortWeekdayLabel,n.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(e.weekday),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ze.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=z.value(e,t||m.weekdayBreakpoints[0]>0&&C.value<=m.weekdayBreakpoints[0]);return Ze.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&C.value<=m.weekdayBreakpoints[1]?Ge(a,m.minWeekdayLabel):a)}function Me(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ze.h("div",t,Ae(e))}function Ae(a){const e=!0!==m.noActiveDate&&W(a),t=Z.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(a.weekday)},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&F(e,[13,32])&&(p.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=$.value(a)),r?r({scope:o}):pt(m,u,n?n({scope:o}):t)}function Fe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ze.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Ee(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ze.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Oe(){return Ze.h("div",{class:"q-calendar-day__body"},[We()])}function We(){return!0===k.value?Ze.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Be(),xe()]):!0===m.noScroll?qe():Ze.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[qe()])}function qe(){return Ze.h("div",{ref:L,class:"q-calendar-day__pane"},[Be(),xe()])}function xe(){const e=y["day-container"];return Ze.h("div",{class:"q-calendar-day__day-container"},[!0===k.value&&!0!==m.noHeader&&we(),Ze.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===k.value&&Be(),...Le()]),e&&e({scope:{days:S.value}})])}function Le(){return 1===S.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>He(S.value[0],0,e)):S.value.map((e,t)=>He(e,t))}function He(e,t,a){const n=y["day-body"],r=N(e,a),o=!0===k.value?m.cellWidth:O.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ze.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...b(e)},style:u},[...Re(t,a),n&&n({scope:r})])}function Re(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=Je(m.intervalHeight),t=m.intervalStyle||re,r=y["day-interval"],o=N(a,n),u=(o.droppable=v.value===Xe(a),"function"===typeof m.intervalClass?m.intervalClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("interval"),i=Qe(a),d={key:i,tabindex:!0===l?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...ae(a,Array.from(m.selectedDates),m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?v.value=Xe(a):v.value="")},onKeydown:e=>{F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(F(e,[13,32])){const t=N(a,n);p.value=t.timestamp.date,void 0!==g.value.onClickTime&&c("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=N(oe(e,a,m.timeClicksClamped,D.now),n);return{scope:t,event:e}})},s=(!0!==m.noAria&&(d.ariaLabel=te.value(a)),r?r({scope:o}):void 0);return Ze.h("div",d,[s,ht()])}function Be(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===k.value},...A("-interval",e=>{const t=ue(e,_.value,m.timeClicksClamped,D.now);return{scope:{timestamp:t},event:e}})};return Ze.h("div",e,Ye())}function Ye(){return G.value[0].map(e=>Ve(e))}function Ve(e){const t=y["interval-label"],a=Je(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||ne,o=r(e),u=o?ee.value(e,n):void 0;return Ze.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ze.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Pe(){const{start:e,end:t,maxDays:a}=K.value,n=(l.value===e.date&&i.value===t.date&&d.value===a||(l.value=e.date,i.value=t.date,d.value=a),s.width>0),r=Ze.withDirectives(Ze.h("div",{key:l.value,class:"q-calendar-day"},[!0===n&&!0!==k.value&&!0!==m.noHeader&&we(),n&&Oe()]),[[et,pe]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ze.h(Ze.Transition,{name:o,appear:!0},()=>r)}}return Ze.watch([S],ce,{deep:!0,immediate:!0}),Ze.watch(()=>m.modelValue,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=Ke(ze(e)),n=Ke(ze(t));u.value=a>=n?"next":"prev"}p.value=e}f.value=e}),Ze.watch(p,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=Ke(ze(e)),n=Ke(ze(t));u.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ze.watch(f,e=>{e&&(t.value=je(e))}),Ze.watch(t,()=>{h.value[f.value]?h.value[f.value].focus():ve()}),Ze.watch(()=>m.maxDays,e=>{d.value=e}),Ze.onBeforeUpdate(()=>{h.value={},a.value={},n.value={}}),Ze.onMounted(()=>{Q()}),x({prev:he,next:fe,move:M,moveToToday:ye,updateCurrent:V,timeStartPos:se,timeDurationHeight:de,heightToMinutes:ie,scrollToTime:le}),()=>J()}});const Ct="4.0.2";Ee={version:Ct,QCalendarDay:St,...Ee,...We,install(e){e.component(St.name,St)}};return Ee});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],u=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===l;if(!(l<getDayIdentifier(e)))while((!y||c.length<s)&&c.length<u){if(v=getDayIdentifier(m),y=y||v>l&&c.length>=s,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:u}=c(n,e);return{"q-past-day":!0!==d&&!0!==u&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==u&&!0!==i&&!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===u,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===u),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},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:validateNumber,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)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:i,headerColumnRef:u}){const e=vue.computed(()=>parseInt(r.minWeeks,10)),s=vue.computed(()=>e.value*r.weekdays.length),l=vue.computed(()=>k(w(a.value))),c=vue.computed(()=>_(T(d.value))),m=vue.computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:i.width>0&&u.value&&(e=u.value.offsetWidth/r.weekdays.length),e}),v=vue.computed(()=>{return createDayList(l.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,s.value)}),y=vue.computed(()=>{const e=o.today,t=k(e),a=_(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=vue.computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),f=vue.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)}}),h=vue.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 D=!0;const g=vue.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<f.value;return!0===D&&(D=!1,t("mini-mode",e)),e});function k(e){return getStartOfWeek(e,r.weekdays,o.today)}function _(e){return getEndOfWeek(e,r.weekdays,o.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function I(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(d.value)}return vue.watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:m,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:f,parsedMonthLabelSize:h,days:v,todayWeek:y,isMiniMode:g,monthFormatter:p,isOutside:I}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:u,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:u,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:w();break;case 35:I();break;case 36:T();break;case 37:g();break;case 38:h();break;case 39:k();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(v,{slots:y,emit:c,expose:H}){const R=vue.ref(null),Y=vue.ref(null),e=vue.ref(null),p=vue.ref(null),t=vue.ref(null),m=vue.ref({}),i=vue.ref([]),u=vue.ref([]),o=vue.ref("next"),d=vue.ref(v.modelValue||today()),s=vue.ref("0000-00-00"),x=vue.ref(0),l=vue.ref(v.modelValue),f=vue.reactive({width:0,height:0}),h=vue.ref(!1),D=vue.ref(!1),U=vue.ref(null),q=vue.ref(null),a=vue.computed(()=>{return"month"}),n=vue.getCurrentInstance();if(null===n)throw new Error("current instance is null");const g=useEmitListeners(n).emitListeners,B=useCellWidth(v).isSticky,{times:r,setCurrent:P,updateCurrent:k}=(vue.watch(B,()=>{}),useTimes(v)),{weekdaySkips:_,parsedStart:w,parsedEnd:z,dayFormatter:$,weekdayFormatter:K,ariaDateFormatter:V,dayStyleDefault:T,getRelativeClasses:Z}=(k(),P(),useCommon(v,{startDate:d,endDate:s,times:r})),I=vue.computed(()=>{return parseTimestamp(v.modelValue,r.now)||w.value||r.today}),j=(t.value=I.value,p.value=I.value.date,vue.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=W.value,e.maxWidth=W.value,e.width=W.value,e})),X=useRenderValues(v,{parsedView:a,times:r,parsedValue:I}).renderValues,{rootRef:M,__initCalendar:Q,__renderCalendar:J}=useCalendar(v,Ee,{scrollArea:R,pane:Y}),{days:N,todayWeek:G,isMiniMode:S,parsedCellWidth:ee,parsedMonthLabelSize:te,isOutside:ae,monthFormatter:ne}=useMonth(v,c,{weekdaySkips:_,times:r,parsedStart:w,parsedEnd:z,size:f,headerColumnRef:e}),b=useMove(v,{parsedView:a,parsedValue:I,weekdaySkips:_,direction:o,maxDays:x,times:r,emittedValue:l,emit:c}).move,E=useMouse(c,g).getDefaultMouseEventHandlers,re=useCheckChange(c,{days:N,lastStart:U,lastEnd:q}).checkChange,O=useEvents().isKeyCode,oe=useKeyboard(v,{rootRef:M,focusRef:p,focusValue:t,datesRef:m,days:N,parsedView:a,parsedValue:I,emittedValue:l,weekdaySkips:_,direction:o,times:r}).tryFocus,de=vue.computed(()=>{return M.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(M.value).getPropertyValue(!0===S.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),A=vue.computed(()=>{return v.weekdays.length}),W=vue.computed(()=>{if(M.value){const e=f.width||M.value.getBoundingClientRect().width;if(e&&A.value)return(e-de.value)/A.value+"px"}return 100/A.value+"%"}),C=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==S.value}),L=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==C.value});function ie(){l.value=today()}function ue(e=1){b(e)}function se(e=1){b(-e)}function le({width:e,height:t}){f.width=e,f.height=t}function F(e){return e.date===l.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 me(){if(!0!==S.value&&0===v.dayHeight){const t=y.week;if(void 0!==t&&window)for(var e in i.value){const a=i.value[e];if(void 0!==a){const n=u.value[e];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 ve(){return vue.h("div",{class:"q-calendar-month__body"},[..._e()])}function ye(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&fe(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return vue.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...he()])}function fe(){const e=y["head-workweek"],t={start:w.value,end:z.value,miniMode:S.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...E("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function he(){return G.value.map((e,t)=>De(e,t))}function De(t,e){const a=y["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==v.noActiveDate&&F(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:S.value,droppable:h.value===t.weekday,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},u=!0===v.focusable&&v.focusType.includes("weekday"),s=W.value,l=v.weekdayStyle||T,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===u?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onFocus:()=>{!0===u&&(p.value=t.date)},...E("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(m.ariaLabel=K.value(t,!1)),vue.h("div",m,[void 0===a&&ke(t,v.shortWeekdayLabel||S.value),void 0!==a&&a({scope:d}),ge(t,e),!0===u&&useFocusHelper()])}function ge(t,e){const a=y["head-day-event"],n=!0!==v.noActiveDate&&F(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:S.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i=W.value,u=v.weekdayStyle||T,s={width:i,maxWidth:i,minWidth:i,...u({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function ke(e,t){const a=K.value(e,t||v.weekdayBreakpoints[0]>0&&ee.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===S.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&ee.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function _e(){const t=v.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(we(N.value.slice(e,e+t),e/t));return a}function we(e,t){const a=y.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:S.value},o={},d=(o.height=v.dayHeight>0&&!0!==S.value?convertToUnit(parseInt(v.dayHeight,10)):"auto",v.dayMinHeight>0&&!0!==S.value&&(o.minHeight=convertToUnit(parseInt(v.dayMinHeight,10))),0===parseInt(v.dayHeight,10)&&0===parseInt(v.dayMinHeight,10));return vue.h("div",{key:e[0].date,ref:e=>{u.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":d},style:o},[!0===v.showWorkWeeks?Te(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Ie(e))),!0!==S.value&&void 0!==a?vue.h("div",{ref:e=>{i.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Te(e){const t=y.workweek,a=e.length>2?e[2]:e[0],n=ce(e).timestamp,r=Number(a.workweek).toLocaleString(v.locale),o={workweekLabel:r,week:e,miniMode:S.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...Z(!1!==n?n:a,!1)},...E("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Ie(t){const e=y.day,a=v.dayStyle||T,n=ae(t),r=!0!==v.noActiveDate&&I.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&N.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:S.value,activeDate:r,hasMonth:o,droppable:D.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i=Object.assign({...j.value},a({scope:d})),u="function"===typeof v.dayClass?v.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===C.value&&(m.value[t.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day":!0,...u,...Z(t,n,v.selectedDates,v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===C.value},style:i,onFocus:()=>{!0===C.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==g.value.onClickDay)&&!0!==S.value&&c("click-day",{scope:d,event:e})},...E("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",d)?D.value=t.date:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",d)?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",d)?D.value=t.date:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",d)?D.value=t.date:D.value="")}};return!0!==n&&Object.assign(s,l),!0!==v.noAria&&(s.ariaLabel=V.value(t)),vue.h("div",s,[Me(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===C.value&&useFocusHelper()])}function Me(e,t,a){let n,r;const o=[Ne(e,t)],d=(!0!==S.value&&!0===a&&f.width>340&&(r=be(e,t)),!0!==S.value&&!0===v.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=Se(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.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__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return vue.h("div",d,o)}function Ne(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=$.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=v.selectedDates&&v.selectedDates.length>0&&v.selectedDates.includes(a.date),d=!0!==v.noActiveDate&&F(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:S.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},u={key:a.date,ref:e=>{!0===L.value&&(m.value[a.date]=e)},tabindex:!0===L.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===L.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===L.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===L.value&&!0!==t&&!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),l.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:i,event:e})},...E("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(l.value=a.date),{scope:i,event:e}})};return!0!==v.noAria&&(u.ariaLabel=V.value(a)),[r?r({scope:i}):useButton(v,u,n?n({scope:i}):e),!0===L.value&&useFocusHelper()]}}function Se(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function be(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["month-label"],n=ne.value(e,v.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:S.value},o={};return!0!==S.value&&void 0!==te.value&&(o.fontSize=te.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==S.value?n:void 0])}}function Ee(){const{start:e,end:t}=X.value,a=(d.value=e.date,s.value=t.date,f.width>0),n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===S.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&ye(),!0===a&&ve()]),[[ResizeObserver$1,le]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([N],re,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(l.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}l.value=e}p.value=e}),vue.watch(l,(e,t)=>{if(l.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e),l.value!==e)&&(l.value=e)}),vue.watch(t,()=>{m.value[p.value]?m.value[p.value].focus():oe()}),vue.onBeforeUpdate(()=>{m.value={},i.value=[],u.value=[],vue.nextTick(()=>{me()})}),vue.onMounted(()=>{Q(),me()}),H({prev:se,next:ue,move:b,moveToToday:ie,updateCurrent:k}),()=>J()}});const version="4.0.1";exports.QCalendarMonth=QCalendarMonth,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],u=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===l;if(!(l<getDayIdentifier(e)))while((!y||c.length<s)&&c.length<u){if(v=getDayIdentifier(m),y=y||v>l&&c.length>=s,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const d=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:u}=c(n,e);return{"q-past-day":!0!==d&&!0!==u&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==u&&!0!==i&&!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===u,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===u),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},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:validateNumber,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)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:i,headerColumnRef:u}){const e=vue.computed(()=>parseInt(r.minWeeks,10)),s=vue.computed(()=>e.value*r.weekdays.length),l=vue.computed(()=>k(w(a.value))),c=vue.computed(()=>_(T(d.value))),m=vue.computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:i.width>0&&u.value&&(e=u.value.offsetWidth/r.weekdays.length),e}),v=vue.computed(()=>{return createDayList(l.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,s.value)}),y=vue.computed(()=>{const e=o.today,t=k(e),a=_(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=vue.computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),f=vue.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)}}),h=vue.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 D=!0;const g=vue.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<f.value;return!0===D&&(D=!1,t("mini-mode",e)),e});function k(e){return getStartOfWeek(e,r.weekdays,o.today)}function _(e){return getEndOfWeek(e,r.weekdays,o.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function I(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(d.value)}return vue.watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:m,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:f,parsedMonthLabelSize:h,days:v,todayWeek:y,isMiniMode:g,monthFormatter:p,isOutside:I}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:u,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:u,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:w();break;case 35:I();break;case 36:T();break;case 37:g();break;case 38:h();break;case 39:k();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(v,{slots:y,emit:c,expose:H}){const R=vue.ref(null),Y=vue.ref(null),e=vue.ref(null),p=vue.ref(null),t=vue.ref(null),m=vue.ref({}),i=vue.ref([]),u=vue.ref([]),o=vue.ref("next"),d=vue.ref(v.modelValue||today()),s=vue.ref("0000-00-00"),x=vue.ref(0),l=vue.ref(v.modelValue),f=vue.reactive({width:0,height:0}),h=vue.ref(!1),D=vue.ref(!1),U=vue.ref(null),q=vue.ref(null),a=vue.computed(()=>{return"month"}),n=vue.getCurrentInstance();if(null===n)throw new Error("current instance is null");const g=useEmitListeners(n).emitListeners,B=useCellWidth(v).isSticky,{times:r,setCurrent:P,updateCurrent:k}=(vue.watch(B,()=>{}),useTimes(v)),{weekdaySkips:_,parsedStart:w,parsedEnd:z,dayFormatter:K,weekdayFormatter:V,ariaDateFormatter:$,dayStyleDefault:T,getRelativeClasses:Z}=(k(),P(),useCommon(v,{startDate:d,endDate:s,times:r})),I=vue.computed(()=>{return parseTimestamp(v.modelValue,r.now)||w.value||r.today}),j=(t.value=I.value,p.value=I.value.date,vue.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=W.value,e.maxWidth=W.value,e.width=W.value,e})),X=useRenderValues(v,{parsedView:a,times:r,parsedValue:I}).renderValues,{rootRef:M,__initCalendar:Q,__renderCalendar:J}=useCalendar(v,Ee,{scrollArea:R,pane:Y}),{days:N,todayWeek:G,isMiniMode:S,parsedCellWidth:ee,parsedMonthLabelSize:te,isOutside:ae,monthFormatter:ne}=useMonth(v,c,{weekdaySkips:_,times:r,parsedStart:w,parsedEnd:z,size:f,headerColumnRef:e}),b=useMove(v,{parsedView:a,parsedValue:I,weekdaySkips:_,direction:o,maxDays:x,times:r,emittedValue:l,emit:c}).move,E=useMouse(c,g).getDefaultMouseEventHandlers,re=useCheckChange(c,{days:N,lastStart:U,lastEnd:q}).checkChange,O=useEvents().isKeyCode,oe=useKeyboard(v,{rootRef:M,focusRef:p,focusValue:t,datesRef:m,days:N,parsedView:a,parsedValue:I,emittedValue:l,weekdaySkips:_,direction:o,times:r}).tryFocus,de=vue.computed(()=>{return M.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(M.value).getPropertyValue(!0===S.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),A=vue.computed(()=>{return v.weekdays.length}),W=vue.computed(()=>{if(M.value){const e=f.width||M.value.getBoundingClientRect().width;if(e&&A.value)return(e-de.value)/A.value+"px"}return 100/A.value+"%"}),C=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==S.value}),L=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==C.value});function ie(){l.value=today()}function ue(e=1){b(e)}function se(e=1){b(-e)}function le({width:e,height:t}){f.width=e,f.height=t}function F(e){return e.date===l.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 me(){if(!0!==S.value&&0===v.dayHeight){const t=y.week;if(void 0!==t&&window)for(var e in i.value){const a=i.value[e];if(void 0!==a){const n=u.value[e];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 ve(){return vue.h("div",{class:"q-calendar-month__body"},[..._e()])}function ye(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&fe(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return vue.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...he()])}function fe(){const e=y["head-workweek"],t={start:w.value,end:z.value,miniMode:S.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...E("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function he(){return G.value.map((e,t)=>De(e,t))}function De(t,e){const a=y["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==v.noActiveDate&&F(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:S.value,droppable:h.value===t.weekday,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},u=!0===v.focusable&&v.focusType.includes("weekday"),s=W.value,l=v.weekdayStyle||T,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===u?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",d)?h.value=t.weekday:h.value="")},onFocus:()=>{!0===u&&(p.value=t.date)},...E("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(m.ariaLabel=V.value(t,!1)),vue.h("div",m,[void 0===a&&ke(t,v.shortWeekdayLabel||S.value),void 0!==a&&a({scope:d}),ge(t,e),!0===u&&useFocusHelper()])}function ge(t,e){const a=y["head-day-event"],n=!0!==v.noActiveDate&&F(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:S.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i=W.value,u=v.weekdayStyle||T,s={width:i,maxWidth:i,minWidth:i,...u({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function ke(e,t){const a=V.value(e,t||v.weekdayBreakpoints[0]>0&&ee.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===S.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&ee.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function _e(){const t=v.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(we(N.value.slice(e,e+t),e/t));return a}function we(e,t){const a=y.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:S.value},o={},d=(o.height=v.dayHeight>0&&!0!==S.value?convertToUnit(parseInt(v.dayHeight,10)):"auto",v.dayMinHeight>0&&!0!==S.value&&(o.minHeight=convertToUnit(parseInt(v.dayMinHeight,10))),0===parseInt(v.dayHeight,10)&&0===parseInt(v.dayMinHeight,10));return vue.h("div",{key:e[0].date,ref:e=>{u.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":d},style:o},[!0===v.showWorkWeeks?Te(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Ie(e))),!0!==S.value&&void 0!==a?vue.h("div",{ref:e=>{i.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Te(e){const t=y.workweek,a=e.length>2?e[2]:e[0],n=ce(e).timestamp,r=Number(a.workweek).toLocaleString(v.locale),o={workweekLabel:r,week:e,miniMode:S.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...Z(!1!==n?n:a,!1)},...E("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Ie(t){const e=y.day,a=v.dayStyle||T,n=ae(t),r=!0!==v.noActiveDate&&I.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&N.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:S.value,activeDate:r,hasMonth:o,droppable:D.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},i=Object.assign({...j.value},a({scope:d})),u="function"===typeof v.dayClass?v.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===C.value&&(m.value[t.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day":!0,...u,...Z(t,n,Array.from(v.selectedDates),v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===C.value},style:i,onFocus:()=>{!0===C.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==g.value.onClickDay)&&!0!==S.value&&c("click-day",{scope:d,event:e})},...E("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",d)?D.value=t.date:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",d)?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",d)?D.value=t.date:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",d)?D.value=t.date:D.value="")}};return!0!==n&&Object.assign(s,l),!0!==v.noAria&&(s.ariaLabel=$.value(t)),vue.h("div",s,[Me(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===C.value&&useFocusHelper()])}function Me(e,t,a){let n,r;const o=[Ne(e,t)],d=(!0!==S.value&&!0===a&&f.width>340&&(r=be(e,t)),!0!==S.value&&!0===v.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=Se(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.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__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return vue.h("div",d,o)}function Ne(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=K.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=v.selectedDates&&Array.from(v.selectedDates).length>0&&Array.from(v.selectedDates).includes(a.date),d=!0!==v.noActiveDate&&F(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:S.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},u={key:a.date,ref:e=>{!0===L.value&&(m.value[a.date]=e)},tabindex:!0===L.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===L.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===L.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===L.value&&!0!==t&&!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),l.value=a.date,void 0!==g.value.onClickDate)&&c("click-date",{scope:i,event:e})},...E("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(l.value=a.date),{scope:i,event:e}})};return!0!==v.noAria&&(u.ariaLabel=$.value(a)),[r?r({scope:i}):useButton(v,u,n?n({scope:i}):e),!0===L.value&&useFocusHelper()]}}function Se(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function be(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["month-label"],n=ne.value(e,v.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:S.value},o={};return!0!==S.value&&void 0!==te.value&&(o.fontSize=te.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==S.value?n:void 0])}}function Ee(){const{start:e,end:t}=X.value,a=(d.value=e.date,s.value=t.date,f.width>0),n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===S.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&ye(),!0===a&&ve()]),[[ResizeObserver$1,le]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([N],re,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(l.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}l.value=e}p.value=e}),vue.watch(l,(e,t)=>{if(l.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e),l.value!==e)&&(l.value=e)}),vue.watch(t,()=>{m.value[p.value]?m.value[p.value].focus():oe()}),vue.onBeforeUpdate(()=>{m.value={},i.value=[],u.value=[],vue.nextTick(()=>{me()})}),vue.onMounted(()=>{Q(),me()}),H({prev:se,next:ue,move:b,moveToToday:ie,updateCurrent:k}),()=>J()}});const version="4.0.2";exports.QCalendarMonth=QCalendarMonth,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const s=getDayIdentifier(parsed(t));o<=s&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],s=42,u=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,p=y===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<u)&&c.length<s){if(y=getDayIdentifier(m),p=p||y>l&&c.length>=u,p)break;if(0===n[m.weekday]);else{const v=copyTimestamp(m);updateFormatted(v),updateRelative(v,a),updateDisabled(v,r,o,d,i),c.push(v)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);d.push(updateMinutes(s,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),u=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==i&&!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===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:p,dayStyleDefault:v}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},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:validateNumber,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)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:i,headerColumnRef:s}){const e=computed(()=>parseInt(r.minWeeks,10)),u=computed(()=>e.value*r.weekdays.length),l=computed(()=>k(w(a.value))),c=computed(()=>_(T(d.value))),m=computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/r.weekdays.length),e}),y=computed(()=>{return createDayList(l.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,u.value)}),p=computed(()=>{const e=o.today,t=k(e),a=_(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),v=computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),f=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)}}),h=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 D=!0;const g=computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<f.value;return!0===D&&(D=!1,t("mini-mode",e)),e});function k(e){return getStartOfWeek(e,r.weekdays,o.today)}function _(e){return getEndOfWeek(e,r.weekdays,o.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function I(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(d.value)}return watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:m,parsedMinWeeks:e,parsedMinDays:u,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:f,parsedMonthLabelSize:h,days:y,todayWeek:p,isMiniMode:g,monthFormatter:v,isOutside:I}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:u,weekdaySkips:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:s,direction:u,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function v(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:w();break;case 35:I();break;case 36:T();break;case 37:g();break;case 38:h();break;case 39:k();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));u.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));u.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(y,{slots:p,emit:c,expose:R}){const Y=ref(null),U=ref(null),e=ref(null),v=ref(null),t=ref(null),m=ref({}),i=ref([]),s=ref([]),o=ref("next"),d=ref(y.modelValue||today()),u=ref("0000-00-00"),x=ref(0),l=ref(y.modelValue),f=reactive({width:0,height:0}),D=ref(!1),g=ref(!1),q=ref(null),B=ref(null),a=computed(()=>{return"month"}),n=getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=useEmitListeners(n).emitListeners,P=useCellWidth(y).isSticky,{times:r,setCurrent:z,updateCurrent:_}=(watch(P,()=>{}),useTimes(y)),{weekdaySkips:w,parsedStart:T,parsedEnd:$,dayFormatter:K,weekdayFormatter:V,ariaDateFormatter:Z,dayStyleDefault:I,getRelativeClasses:j}=(_(),z(),useCommon(y,{startDate:d,endDate:u,times:r})),M=computed(()=>{return parseTimestamp(y.modelValue,r.now)||T.value||r.today}),X=(t.value=M.value,v.value=M.value.date,computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=C.value,e.maxWidth=C.value,e.width=C.value,e})),Q=useRenderValues(y,{parsedView:a,times:r,parsedValue:M}).renderValues,{rootRef:N,__initCalendar:J,__renderCalendar:G}=useCalendar(y,Oe,{scrollArea:Y,pane:U}),{days:S,todayWeek:ee,isMiniMode:b,parsedCellWidth:te,parsedMonthLabelSize:ae,isOutside:ne,monthFormatter:re}=useMonth(y,c,{weekdaySkips:w,times:r,parsedStart:T,parsedEnd:$,size:f,headerColumnRef:e}),E=useMove(y,{parsedView:a,parsedValue:M,weekdaySkips:w,direction:o,maxDays:x,times:r,emittedValue:l,emit:c}).move,O=useMouse(c,k).getDefaultMouseEventHandlers,oe=useCheckChange(c,{days:S,lastStart:q,lastEnd:B}).checkChange,A=useEvents().isKeyCode,de=useKeyboard(y,{rootRef:N,focusRef:v,focusValue:t,datesRef:m,days:S,parsedView:a,parsedValue:M,emittedValue:l,weekdaySkips:w,direction:o,times:r}).tryFocus,ie=computed(()=>{return N.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(N.value).getPropertyValue(!0===b.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=computed(()=>{return y.weekdays.length}),C=computed(()=>{if(N.value){const e=f.width||N.value.getBoundingClientRect().width;if(e&&W.value)return(e-ie.value)/W.value+"px"}return 100/W.value+"%"}),L=computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==b.value}),F=computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==L.value});function se(){l.value=today()}function ue(e=1){E(e)}function le(e=1){E(-e)}function ce({width:e,height:t}){f.width=e,f.height=t}function H(e){return e.date===l.value}function me(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ye(){if(!0!==b.value&&0===y.dayHeight){const t=p.week;if(void 0!==t&&window)for(var e in i.value){const a=i.value[e];if(void 0!==a){const n=s.value[e];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 pe(){return h("div",{class:"q-calendar-month__body"},[...we()])}function ve(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&he(),h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...De()])}function he(){const e=p["head-workweek"],t={start:T.value,end:$.value,miniMode:b.value};return h("div",{class:"q-calendar-month__head--workweek",...O("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function De(){return ee.value.map((e,t)=>ge(e,t))}function ge(t,e){const a=p["head-day"],n=S.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&H(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:b.value,droppable:D.value===t.weekday,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i="function"===typeof y.weekdayClass?y.weekdayClass({scope:d}):{},s=!0===y.focusable&&y.focusType.includes("weekday"),u=C.value,l=y.weekdayStyle||I,c={width:u,maxWidth:u,minWidth:u,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===s?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onFocus:()=>{!0===s&&(v.value=t.date)},...O("-head-day",e=>{return{scope:d,event:e}})};return!0!==y.noAria&&(m.ariaLabel=V.value(t,!1)),h("div",m,[void 0===a&&_e(t,y.shortWeekdayLabel||b.value),void 0!==a&&a({scope:d}),ke(t,e),!0===s&&useFocusHelper()])}function ke(t,e){const a=p["head-day-event"],n=!0!==y.noActiveDate&&H(t),r=S.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:b.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i=C.value,s=y.weekdayStyle||I,u={width:i,maxWidth:i,minWidth:i,...s({scope:d})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:u},[void 0!==a&&a({scope:d})])}function _e(e,t){const a=V.value(e,t||y.weekdayBreakpoints[0]>0&&te.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===b.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&te.value<=y.weekdayBreakpoints[1]?minCharWidth(a,y.minWeekdayLabel):a)}function we(){const t=y.weekdays.length,a=[];for(let e=0;e<S.value.length;e+=t)a.push(Te(S.value.slice(e,e+t),e/t));return a}function Te(e,t){const a=p.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:b.value},o={},d=(o.height=y.dayHeight>0&&!0!==b.value?convertToUnit(parseInt(y.dayHeight,10)):"auto",y.dayMinHeight>0&&!0!==b.value&&(o.minHeight=convertToUnit(parseInt(y.dayMinHeight,10))),0===parseInt(y.dayHeight,10)&&0===parseInt(y.dayMinHeight,10));return h("div",{key:e[0].date,ref:e=>{s.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":d},style:o},[!0===y.showWorkWeeks?Ie(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map(e=>Me(e))),!0!==b.value&&void 0!==a?h("div",{ref:e=>{i.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Ie(e){const t=p.workweek,a=e.length>2?e[2]:e[0],n=me(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:b.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...O("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=p.day,a=y.dayStyle||I,n=ne(t),r=!0!==y.noActiveDate&&M.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&S.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:b.value,activeDate:r,hasMonth:o,droppable:g.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i=Object.assign({...X.value},a({scope:d})),s="function"===typeof y.dayClass?y.dayClass({scope:d}):{},u={key:t.date,ref:e=>{!0===L.value&&(m.value[t.date]=e)},tabindex:!0===L.value?0:-1,class:{"q-calendar-month__day":!0,...s,...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===L.value},style:i,onFocus:()=>{!0===L.value&&(v.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==b.value&&c("click-day",{scope:d,event:e})},...O("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",d)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",d)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",d)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",d)?g.value=t.date:g.value="")}};return!0!==n&&Object.assign(u,l),!0!==y.noAria&&(u.ariaLabel=Z.value(t)),h("div",u,[Ne(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===L.value&&useFocusHelper()])}function Ne(e,t,a){let n,r;const o=[Se(e,t)],d=(!0!==b.value&&!0===a&&f.width>340&&(r=Ee(e,t)),!0!==b.value&&!0===y.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=be(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 h("div",d,o)}function Se(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=K.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o=y.selectedDates&&y.selectedDates.length>0&&y.selectedDates.includes(a.date),d=!0!==y.noActiveDate&&H(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:b.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(a.weekday)},s={key:a.date,ref:e=>{!0===F.value&&(m.value[a.date]=e)},tabindex:!0===F.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===F.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===F.value&&(v.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===F.value&&!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),l.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:i,event:e})},...O("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(l.value=a.date),{scope:i,event:e}})};return!0!==y.noAria&&(s.ariaLabel=Z.value(a)),[r?r({scope:i}):useButton(y,s,n?n({scope:i}):e),!0===F.value&&useFocusHelper()]}}function be(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ee(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["month-label"],n=re.value(e,y.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:b.value},o={};return!0!==b.value&&void 0!==ae.value&&(o.fontSize=ae.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==b.value?n:void 0])}}function Oe(){const{start:e,end:t}=Q.value,a=(d.value=e.date,u.value=t.date,f.width>0),n=withDirectives(h("div",{class:{"q-calendar-mini":!0===b.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==y.noHeader&&ve(),!0===a&&pe()]),[[ResizeObserver$1,ce]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([S],oe,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(l.value!==e){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}l.value=e}v.value=e}),watch(l,(e,t)=>{if(l.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e),l.value!==e)&&(l.value=e)}),watch(t,()=>{m.value[v.value]?m.value[v.value].focus():de()}),onBeforeUpdate(()=>{m.value={},i.value=[],s.value=[],nextTick(()=>{ye()})}),onMounted(()=>{J(),ye()}),R({prev:le,next:ue,move:E,moveToToday:se,updateCurrent:_}),()=>G()}});const version="4.0.1";var Plugin={version:version,QCalendarMonth:QCalendarMonth,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};export{QCalendarMonth,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],u=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,p=y===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<u){if(y=getDayIdentifier(m),p=p||y>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const v=copyTimestamp(m);updateFormatted(v),updateRelative(v,a),updateDisabled(v,r,o,d,i),c.push(v)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const d=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:u}=c(n,e);return{"q-past-day":!0!==d&&!0!==u&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==u&&!0!==i&&!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===u,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===u),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:p,dayStyleDefault:v}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},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:validateNumber,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)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:i,headerColumnRef:u}){const e=computed(()=>parseInt(r.minWeeks,10)),s=computed(()=>e.value*r.weekdays.length),l=computed(()=>k(w(a.value))),c=computed(()=>_(T(d.value))),m=computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:i.width>0&&u.value&&(e=u.value.offsetWidth/r.weekdays.length),e}),y=computed(()=>{return createDayList(l.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,s.value)}),p=computed(()=>{const e=o.today,t=k(e),a=_(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),v=computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),f=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)}}),h=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 D=!0;const g=computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<f.value;return!0===D&&(D=!1,t("mini-mode",e)),e});function k(e){return getStartOfWeek(e,r.weekdays,o.today)}function _(e){return getEndOfWeek(e,r.weekdays,o.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function I(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(d.value)}return watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:m,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:f,parsedMonthLabelSize:h,days:y,todayWeek:p,isMiniMode:g,monthFormatter:v,isOutside:I}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:u,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:u,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function v(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:w();break;case 35:I();break;case 36:T();break;case 37:g();break;case 38:h();break;case 39:k();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(y,{slots:p,emit:c,expose:R}){const Y=ref(null),U=ref(null),e=ref(null),v=ref(null),t=ref(null),m=ref({}),i=ref([]),u=ref([]),o=ref("next"),d=ref(y.modelValue||today()),s=ref("0000-00-00"),x=ref(0),l=ref(y.modelValue),f=reactive({width:0,height:0}),D=ref(!1),g=ref(!1),q=ref(null),B=ref(null),a=computed(()=>{return"month"}),n=getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=useEmitListeners(n).emitListeners,P=useCellWidth(y).isSticky,{times:r,setCurrent:z,updateCurrent:_}=(watch(P,()=>{}),useTimes(y)),{weekdaySkips:w,parsedStart:T,parsedEnd:K,dayFormatter:V,weekdayFormatter:$,ariaDateFormatter:Z,dayStyleDefault:I,getRelativeClasses:j}=(_(),z(),useCommon(y,{startDate:d,endDate:s,times:r})),M=computed(()=>{return parseTimestamp(y.modelValue,r.now)||T.value||r.today}),X=(t.value=M.value,v.value=M.value.date,computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=C.value,e.maxWidth=C.value,e.width=C.value,e})),Q=useRenderValues(y,{parsedView:a,times:r,parsedValue:M}).renderValues,{rootRef:N,__initCalendar:J,__renderCalendar:G}=useCalendar(y,Oe,{scrollArea:Y,pane:U}),{days:S,todayWeek:ee,isMiniMode:b,parsedCellWidth:te,parsedMonthLabelSize:ae,isOutside:ne,monthFormatter:re}=useMonth(y,c,{weekdaySkips:w,times:r,parsedStart:T,parsedEnd:K,size:f,headerColumnRef:e}),E=useMove(y,{parsedView:a,parsedValue:M,weekdaySkips:w,direction:o,maxDays:x,times:r,emittedValue:l,emit:c}).move,O=useMouse(c,k).getDefaultMouseEventHandlers,oe=useCheckChange(c,{days:S,lastStart:q,lastEnd:B}).checkChange,A=useEvents().isKeyCode,de=useKeyboard(y,{rootRef:N,focusRef:v,focusValue:t,datesRef:m,days:S,parsedView:a,parsedValue:M,emittedValue:l,weekdaySkips:w,direction:o,times:r}).tryFocus,ie=computed(()=>{return N.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(N.value).getPropertyValue(!0===b.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=computed(()=>{return y.weekdays.length}),C=computed(()=>{if(N.value){const e=f.width||N.value.getBoundingClientRect().width;if(e&&W.value)return(e-ie.value)/W.value+"px"}return 100/W.value+"%"}),L=computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==b.value}),F=computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==L.value});function ue(){l.value=today()}function se(e=1){E(e)}function le(e=1){E(-e)}function ce({width:e,height:t}){f.width=e,f.height=t}function H(e){return e.date===l.value}function me(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ye(){if(!0!==b.value&&0===y.dayHeight){const t=p.week;if(void 0!==t&&window)for(var e in i.value){const a=i.value[e];if(void 0!==a){const n=u.value[e];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 pe(){return h("div",{class:"q-calendar-month__body"},[...we()])}function ve(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&he(),h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...De()])}function he(){const e=p["head-workweek"],t={start:T.value,end:K.value,miniMode:b.value};return h("div",{class:"q-calendar-month__head--workweek",...O("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function De(){return ee.value.map((e,t)=>ge(e,t))}function ge(t,e){const a=p["head-day"],n=S.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&H(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:b.value,droppable:D.value===t.weekday,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i="function"===typeof y.weekdayClass?y.weekdayClass({scope:d}):{},u=!0===y.focusable&&y.focusType.includes("weekday"),s=C.value,l=y.weekdayStyle||I,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===u?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",d)?D.value=t.weekday:D.value="")},onFocus:()=>{!0===u&&(v.value=t.date)},...O("-head-day",e=>{return{scope:d,event:e}})};return!0!==y.noAria&&(m.ariaLabel=$.value(t,!1)),h("div",m,[void 0===a&&_e(t,y.shortWeekdayLabel||b.value),void 0!==a&&a({scope:d}),ke(t,e),!0===u&&useFocusHelper()])}function ke(t,e){const a=p["head-day-event"],n=!0!==y.noActiveDate&&H(t),r=S.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:b.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i=C.value,u=y.weekdayStyle||I,s={width:i,maxWidth:i,minWidth:i,...u({scope:d})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function _e(e,t){const a=$.value(e,t||y.weekdayBreakpoints[0]>0&&te.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===b.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&te.value<=y.weekdayBreakpoints[1]?minCharWidth(a,y.minWeekdayLabel):a)}function we(){const t=y.weekdays.length,a=[];for(let e=0;e<S.value.length;e+=t)a.push(Te(S.value.slice(e,e+t),e/t));return a}function Te(e,t){const a=p.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:b.value},o={},d=(o.height=y.dayHeight>0&&!0!==b.value?convertToUnit(parseInt(y.dayHeight,10)):"auto",y.dayMinHeight>0&&!0!==b.value&&(o.minHeight=convertToUnit(parseInt(y.dayMinHeight,10))),0===parseInt(y.dayHeight,10)&&0===parseInt(y.dayMinHeight,10));return h("div",{key:e[0].date,ref:e=>{u.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":d},style:o},[!0===y.showWorkWeeks?Ie(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map(e=>Me(e))),!0!==b.value&&void 0!==a?h("div",{ref:e=>{i.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Ie(e){const t=p.workweek,a=e.length>2?e[2]:e[0],n=me(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:b.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...O("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=p.day,a=y.dayStyle||I,n=ne(t),r=!0!==y.noActiveDate&&M.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&S.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:b.value,activeDate:r,hasMonth:o,droppable:g.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday)},i=Object.assign({...X.value},a({scope:d})),u="function"===typeof y.dayClass?y.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===L.value&&(m.value[t.date]=e)},tabindex:!0===L.value?0:-1,class:{"q-calendar-month__day":!0,...u,...j(t,n,Array.from(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===L.value},style:i,onFocus:()=>{!0===L.value&&(v.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==b.value&&c("click-day",{scope:d,event:e})},...O("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",d)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",d)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",d)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",d)?g.value=t.date:g.value="")}};return!0!==n&&Object.assign(s,l),!0!==y.noAria&&(s.ariaLabel=Z.value(t)),h("div",s,[Ne(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===L.value&&useFocusHelper()])}function Ne(e,t,a){let n,r;const o=[Se(e,t)],d=(!0!==b.value&&!0===a&&f.width>340&&(r=Ee(e,t)),!0!==b.value&&!0===y.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=be(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 h("div",d,o)}function Se(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=V.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o=y.selectedDates&&Array.from(y.selectedDates).length>0&&Array.from(y.selectedDates).includes(a.date),d=!0!==y.noActiveDate&&H(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:b.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(a.weekday)},u={key:a.date,ref:e=>{!0===F.value&&(m.value[a.date]=e)},tabindex:!0===F.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===F.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===F.value&&(v.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===F.value&&!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),l.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:i,event:e})},...O("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(l.value=a.date),{scope:i,event:e}})};return!0!==y.noAria&&(u.ariaLabel=Z.value(a)),[r?r({scope:i}):useButton(y,u,n?n({scope:i}):e),!0===F.value&&useFocusHelper()]}}function be(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ee(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["month-label"],n=re.value(e,y.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:b.value},o={};return!0!==b.value&&void 0!==ae.value&&(o.fontSize=ae.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==b.value?n:void 0])}}function Oe(){const{start:e,end:t}=Q.value,a=(d.value=e.date,s.value=t.date,f.width>0),n=withDirectives(h("div",{class:{"q-calendar-mini":!0===b.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==y.noHeader&&ve(),!0===a&&pe()]),[[ResizeObserver$1,ce]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([S],oe,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(l.value!==e){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}l.value=e}v.value=e}),watch(l,(e,t)=>{if(l.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e),l.value!==e)&&(l.value=e)}),watch(t,()=>{m.value[v.value]?m.value[v.value].focus():de()}),onBeforeUpdate(()=>{m.value={},i.value=[],u.value=[],nextTick(()=>{ye()})}),onMounted(()=>{J(),ye()}),R({prev:le,next:se,move:E,moveToToday:ue,updateCurrent:_}),()=>G()}});const version="4.0.2";var Plugin={version:version,QCalendarMonth:QCalendarMonth,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};export{QCalendarMonth,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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(Ee){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}))/,F=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,C=[0,31,28,31,30,31,30,31,31,30,31,30,31],A=[0,31,29,31,30,31,30,31,31,30,31,30,31],L=28,x=31,u=12,n=1,h=1,o=7,r=60,d=24,q=0,H=6e4,R=36e5,B=864e5,U=6048e5,Y=60,V=3600,z=86400,P=604800,Z={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},j={hour:0,minute:0};function t(e){return!!a.exec(e)}function We(e){const t=a.exec(e);return t?{date:e,time:i(parseInt(t[6],10)||0,2)+":"+i(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 $(e,t=!1){const a=t?"UTC":"";return g({date:i(e[`get${a}FullYear`](),4)+"-"+i(e[`get${a}Month`]()+1,2)+"-"+i(e[`get${a}Date`](),2),time:i(e[`get${a}Hours`]()||0,2)+":"+i(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 i(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function K(e){return 1===(e%4===0^e%100===0^e%400===0)}function l(e,t){return(K(e)?A:C)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>L&&e.day>l(e.year,e.month)&&(e.day=h,++e.month,e.month>u)&&(e.month=n,++e.year),e}function w(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=u),e.day=l(e.year,e.month)),e}function Fe(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,i(t,2),i(a,2)].join("-")}function X(e){return e===Fe()}function S(e,t,a){let n=O(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=f(n,t[0],w),n=g(n),a&&(n=k(n,a,n.hasTime)),n}function M(e,t,a){let n=O(e);const r=l(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=w(n);return n=f(n,t[t.length-1],p),n=g(n),a&&(n=k(n,a,n.hasTime)),n}function I(e){const t=O(e);return t.day=h,g(t),t}function N(e){const t=O(e);return t.day=l(t.year,t.month),g(t),t}function Q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=F.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 J(e,t){return JSON.stringify(e)===JSON.stringify(t)}function G(e,t){return y(e)===y(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return m(e)===m(t)}function Ce(e,t){let a=We(e);return null===a?null:(a=g(a),t&&k(a,t,a.hasTime),a)}function Ae(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function c(e){return Ae(e)+s(e)}function ae(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 k(e,t,a=!1){let n=Ae(t),r=Ae(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&k(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=ie(e),e}function de(e){return e.workweek=le(e),e}function ue(e,t,a,n,r){const o=Ae(e);if(void 0!==t){const i=Ae(We(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ae(We(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=We(r[u][0]),c=We(r[u][1]);if(ke(e,s,c)){e.disabled=!0;break}}else{const y=Ae(Ce(r[u]+" 00:00"));if(y===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=v(e),e.date=y(e),e.weekday=se(e),e.doy=ie(e),e.workweek=le(e),e}function ie(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 le(e){0===e.year&&(e=Ce(Fe()));const t=fe(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)/U);return 1+Math.floor(o)}function se(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 O(e){return{...e}}function y(e){let t=i(e.year,4)+"-"+i(e.month,2);return e.hasDay&&(t+="-"+i(e.day,2)),t}function v(e){return e.hasTime?i(e.hour,2)+":"+i(e.minute,2):""}function m(e){return y(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return D(e,t,a,n)}function D(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function f(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ye(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 ve(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=Ae(t),c=[];let y=O(e),v=0,m=v===s;if(!(s<Ae(e)))while((!m||c.length<l)&&c.length<i){if(v=Ae(y),m=m||v>s&&c.length>=l,m)break;if(0===n[y.weekday]);else{const f=O(y);g(f),k(f,a),ue(f,r,o,d,u),c.push(f)}y=D(y,p)}return c}function me(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=O(t);d.push(ne(i,u,o))}return d}function E(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+m(t)),o}}}function fe(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 he(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 b(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?c:Ae;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function we(e,t=!1){const a=!0===t?c:Ae;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ke(e,t,a,n){const r=Ae(e)+(!0===n?s(e):0),o=Ae(t)+(!0===n?s(t):0),d=Ae(a)+(!0===n?s(a):0);return r>=o&&r<=d}function ge(e,t,a,n){const r=Ae(e),o=Ae(t),d=Ae(a),u=Ae(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function W(e,t){const n=O(e);let r;return be(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=De.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Me(n,De[r]),g(n),n}const De=["minute","hour","day","month"];function be(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function _e(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Te(e)}return e}function Te(e){if(e.hour>=d||e.hour<0){const t=Math.floor(e.hour/d);e.hour-=t*d,e.day+=t,Se(e)}return e}function Se(t){_(t);let a=l(t.year,t.month);if(t.day>a){++t.month,t.month>u&&_(t);let e=t.day-a;a=l(t.year,t.month);do{e>a&&(++t.month,t.month>u&&_(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&&_(t),a=l(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&_(t),a=l(t.year,t.month))}while(e>a);t.day=a-e}return t}function _(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 Me(e,t){switch(t){case"minute":return _e(e);case"hour":return Te(e);case"day":return Se(e);case"month":return _(e)}}function Ie(e,t){const a=ae(e,t,!0);return Math.floor(a/B)}function Ne(e,t){let a=O(e),n=O(t);return a=f(a,0),n=f(n,6),Math.ceil(Ie(a,n)/o)}const Oe={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 Le(){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(Oe[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function xe(t,a){const e=Object.keys(Oe),n=Le();return e.map(e=>n(e,t,a))}function qe(){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 He(t,a){const n=qe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Re={PARSE_DATETIME:a,PARSE_DATE:e,PARSE_TIME:F,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:A,DAYS_IN_MONTH_MIN:L,DAYS_IN_MONTH_MAX:x,MONTH_MAX:u,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:d,FIRST_HOUR:q,MILLISECONDS_IN_MINUTE:H,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_DAY:B,MILLISECONDS_IN_WEEK:U,Timestamp:Z,TimeObject:j,today:Fe,getStartOfWeek:S,getEndOfWeek:M,getStartOfMonth:I,getEndOfMonth:N,parseTime:Q,validateTimestamp:t,parsed:We,parseTimestamp:Ce,parseDate:$,getDayIdentifier:Ae,getTimeIdentifier:s,getDayTimeIdentifier:c,diffTimestamp:ae,updateRelative:k,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:de,updateDisabled:ue,updateFormatted:g,getDayOfYear:ie,getWorkWeek:le,getWeekday:se,isLeapYear:K,daysInMonth:l,copyTimestamp:O,padNumber:i,getDate:y,getTime:v,getDateTime:m,nextDay:p,prevDay:w,relativeDays:D,findWeekday:f,getWeekdaySkips:ye,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:E,makeDate:fe,makeDateTime:he,validateNumber:b,isBetweenDates:ke,isOverlappingDates:ge,daysBetween:Ie,weeksBetween:Ne,addToDate:W,compareTimestamps:J,compareDate:G,compareTime:ee,compareDateTime:te,getWeekdayFormatter:Le,getWeekdayNames:xe,getMonthFormatter:qe,getMonthNames:He},Re=Object.freeze({__proto__:null,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:A,DAYS_IN_MONTH_MAX:x,DAYS_IN_MONTH_MIN:L,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:q,HOURS_IN_DAY:d,MILLISECONDS_IN_DAY:B,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_MINUTE:H,MILLISECONDS_IN_WEEK:U,MINUTES_IN_HOUR:r,MONTH_MAX:u,MONTH_MIN:n,PARSE_DATE:e,PARSE_DATETIME:a,PARSE_TIME:F,SECONDS_IN_DAY:z,SECONDS_IN_HOUR:V,SECONDS_IN_MINUTE:Y,SECONDS_IN_WEEK:P,TimeObject:j,Timestamp:Z,addToDate:W,compareDate:G,compareDateTime:te,compareTime:ee,compareTimestamps:J,copyTimestamp:O,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:E,daysBetween:Ie,daysInMonth:l,default:Re,diffTimestamp:ae,findWeekday:f,getDate:y,getDateTime:m,getDayIdentifier:Ae,getDayOfYear:ie,getDayTimeIdentifier:c,getEndOfMonth:N,getEndOfWeek:M,getMonthFormatter:qe,getMonthNames:He,getStartOfMonth:I,getStartOfWeek:S,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:Le,getWeekdayNames:xe,getWeekdaySkips:ye,getWorkWeek:le,isBetweenDates:ke,isLeapYear:K,isOverlappingDates:ge,isToday:X,makeDate:fe,makeDateTime:he,maxTimestamp:pe,minTimestamp:we,moveRelativeDays:ce,nextDay:p,padNumber:i,parseDate:$,parseTime:Q,parseTimestamp:Ce,parsed:We,prevDay:w,relativeDays:D,today:Fe,updateDayOfYear:oe,updateDisabled:ue,updateFormatted:g,updateMinutes:ne,updateRelative:k,updateWeekday:re,updateWorkWeek:de,validateNumber:b,validateTimestamp:t,weeksBetween:Ne});function Be(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ye(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Be,indexOf:Ue},Ve=Object.freeze({__proto__:null,convertToUnit:Be,default:Ve,indexOf:Ue,minCharWidth:Ye});const ze=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let Pe,Ze;function je(e,a){const t={};for(const n in e){const r=e[n],o=ze("on-"+n);if(void 0===Pe)return void console.warn("$listeners has not been set up");if(void 0!==Pe.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),Ze(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function $e(e,t){return je(Ke(e),t)}function Ke(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 T(e){return Object.keys(Ke(e))}function Xe(e,t){return Ze=e,Pe=t,{getMouseEventHandlers:je,getDefaultMouseEventHandlers:$e,getMouseEventName:Ke,getRawMouseEvents:T}}var Qe={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 Je(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=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.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 Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Qe,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const Ge={modelValue:{type:String,default:Fe(),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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function et(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>ye(t.weekdays)),o=Ee.computed(()=>Ce(e.value)),d=Ee.computed(()=>{return"0000-00-00"===a.value?m(o.value):Ce(a.value)}),u=Ee.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return E(t.locale,()=>e)}),i=Ee.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return E(t.locale,(e,t)=>t?n:a)}),l=Ee.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return E(t.locale,()=>e)});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=Ae(t),r=Ae(We(e[0])),o=Ae(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function y(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 v(e){return S(e,t.weekdays,n.today)}function m(e){return M(e,t.weekdays,n.today)}function f(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:y,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}const tt={dayHeight:{type:[Number,String],default:0,validator:b},dayMinHeight:{type:[Number,String],default:0,validator:b},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:b,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)||b(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function at(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:u,headerColumnRef:i}){const e=Ee.computed(()=>parseInt(r.minWeeks,10)),l=Ee.computed(()=>e.value*r.weekdays.length),s=Ee.computed(()=>g(b(a.value))),c=Ee.computed(()=>D(_(d.value))),y=Ee.computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:u.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length),e}),v=Ee.computed(()=>{return ve(s.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,l.value)}),m=Ee.computed(()=>{const e=o.today,t=g(e),a=D(e);return ve(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),f=Ee.computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return E(r.locale,(e,t)=>t?n:a)}),h=Ee.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=Ee.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=Ee.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&u.width<h.value;return!0===w&&(w=!1,t("mini-mode",e)),e});function g(e){return S(e,r.weekdays,o.today)}function D(e){return M(e,r.weekdays,o.today)}function b(e){return I(e)}function _(e){return N(e)}function T(e){const t=Ae(e);return t<Ae(a.value)||t>Ae(d.value)}return Ee.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:y,parsedMinWeeks:e,parsedMinDays:l,parsedMonthStart:s,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:p,days:v,todayWeek:m,isMiniMode:k,monthFormatter:f,isOutside:T}}const nt={now:{type:String,validator:e=>""===e||t(e),default:""}};function rt(e){const t=Ee.reactive({now:Ce("0000-00-00 00:00"),today:Ce("0000-00-00")}),a=Ee.computed(()=>e.now?Ce(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 $(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 Ee.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function ot(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=N(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=ce(O(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=N(e),g(n),t=l(a.year,a.month);break;case"resource":t=1,n=ce(O(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const dt=["moved"];function ut(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:y,times:v,emittedValue:m,emit:f}){function e(a=1){if(0===a)m.value=Fe();else{let e=O(l.value);const n=a>0,r=n?p:w,o=n?x:h;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),re(e);while(0===s.value[e.weekday])e=W(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":D(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":D(e,r,y.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":D(e,r,y.value,u.weekdays);break}re(e),g(e),oe(e),k(e,v.now),m.value=e.date,f("moved",e)}}return{move:e}}const it=/^on[A-Z]/;function lt(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{it.test(e)&&(t[e]=!0)}),t})}}function st(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function ct({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&st()])}const yt={cellWidth:[Number,String]};function vt(e){const t=Ee.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const mt=["change"];function ft(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 ht(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const pt=ht().isKeyCode,wt={useNavigation:Boolean};function kt(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,weekdaySkips:i,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",f))}function y(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",f),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function m(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function f(e){v(e)&&pt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(v(e)&&pt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:b();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(){let e=O(r.value);if("month"===d.value){if(e=W(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=W(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function w(){let e=O(r.value);if("month"===d.value){if(e=W(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=W(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function k(){let e=O(r.value);l.value="prev";do{e=W(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function g(){let e=O(r.value);l.value="next";do{e=W(e,{day:1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function D(){let e=O(r.value);if("month"===d.value||"month-interval"===d.value){e=W(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=W(e,{day:t})}else"day"===d.value?e=W(e,{day:-1}):"week"===d.value&&(e=W(e,{day:-7}));l.value="prev",n.value=e.date}function b(){let e=O(r.value);if("month"===d.value||"month-interval"===d.value){e=W(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=W(e,{day:t})}else"day"===d.value?e=W(e,{day:1}):"week"===d.value&&(e=W(e,{day:7}));l.value="next",n.value=e.date}function _(){let e=O(r.value);"month"===d.value||"month-interval"===d.value?e=I(e):"week"===d.value&&(e=S(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=W(e,{day:-1});n.value=e.date}function T(){let e=O(r.value);"month"===d.value||"month-interval"===d.value?e=N(e):"week"===d.value&&(e=M(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=W(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{y()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?c:y)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:y,tryFocus:m}}var gt=Ee.defineComponent({name:"QCalendarMonth",directives:[Qe],props:{...Ge,...tt,...nt,...yt,...wt},emits:["update:model-value",...mt,...dt,"mini-mode",...T("-date"),...T("-day"),...T("-head-workweek"),...T("-head-day"),...T("-workweek")],setup(v,{slots:m,emit:c,expose:x}){const q=Ee.ref(null),H=Ee.ref(null),e=Ee.ref(null),f=Ee.ref(null),t=Ee.ref(null),y=Ee.ref({}),u=Ee.ref([]),i=Ee.ref([]),o=Ee.ref("next"),d=Ee.ref(v.modelValue||Fe()),l=Ee.ref("0000-00-00"),R=Ee.ref(0),s=Ee.ref(v.modelValue),h=Ee.reactive({width:0,height:0}),p=Ee.ref(!1),w=Ee.ref(!1),B=Ee.ref(null),U=Ee.ref(null),a=Ee.computed(()=>{return"month"}),n=Ee.getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=lt(n).emitListeners,Y=vt(v).isSticky,{times:r,setCurrent:V,updateCurrent:g}=(Ee.watch(Y,()=>{}),rt(v)),{weekdaySkips:D,parsedStart:b,parsedEnd:z,dayFormatter:P,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:_,getRelativeClasses:$}=(g(),V(),et(v,{startDate:d,endDate:l,times:r})),T=Ee.computed(()=>{return Ce(v.modelValue,r.now)||b.value||r.today}),K=(t.value=T.value,f.value=T.value.date,Ee.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=F.value,e.maxWidth=F.value,e.width=F.value,e})),X=ot(v,{parsedView:a,times:r,parsedValue:T}).renderValues,{rootRef:S,__initCalendar:Q,__renderCalendar:J}=Je(v,Oe,{scrollArea:q,pane:H}),{days:M,todayWeek:G,isMiniMode:I,parsedCellWidth:ee,parsedMonthLabelSize:te,isOutside:ae,monthFormatter:ne}=at(v,c,{weekdaySkips:D,times:r,parsedStart:b,parsedEnd:z,size:h,headerColumnRef:e}),N=ut(v,{parsedView:a,parsedValue:T,weekdaySkips:D,direction:o,maxDays:R,times:r,emittedValue:s,emit:c}).move,O=Xe(c,k).getDefaultMouseEventHandlers,re=ft(c,{days:M,lastStart:B,lastEnd:U}).checkChange,E=ht().isKeyCode,oe=kt(v,{rootRef:S,focusRef:f,focusValue:t,datesRef:y,days:M,parsedView:a,parsedValue:T,emittedValue:s,weekdaySkips:D,direction:o,times:r}).tryFocus,de=Ee.computed(()=>{return S.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(S.value).getPropertyValue(!0===I.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=Ee.computed(()=>{return v.weekdays.length}),F=Ee.computed(()=>{if(S.value){const e=h.width||S.value.getBoundingClientRect().width;if(e&&W.value)return(e-de.value)/W.value+"px"}return 100/W.value+"%"}),C=Ee.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==I.value}),A=Ee.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==C.value});function ue(){s.value=Fe()}function ie(e=1){N(e)}function le(e=1){N(-e)}function se({width:e,height:t}){h.width=e,h.height=t}function L(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 ye(){if(!0!==I.value&&0===v.dayHeight){const t=m.week;if(void 0!==t&&window)for(var e in u.value){const a=u.value[e];if(void 0!==a){const n=i.value[e];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 ve(){return Ee.h("div",{class:"q-calendar-month__body"},[...De()])}function me(){return Ee.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&he(),Ee.h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return Ee.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function he(){const e=m["head-workweek"],t={start:b.value,end:z.value,miniMode:I.value};return Ee.h("div",{class:"q-calendar-month__head--workweek",...O("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return G.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!==v.noActiveDate&&L(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:I.value,droppable:p.value===t.weekday,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},i=!0===v.focusable&&v.focusType.includes("weekday"),l=F.value,s=v.weekdayStyle||_,c={width:l,maxWidth:l,minWidth:l,...s({scope:d})},y={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__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onFocus:()=>{!0===i&&(f.value=t.date)},...O("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(y.ariaLabel=Z.value(t,!1)),Ee.h("div",y,[void 0===a&&ge(t,v.shortWeekdayLabel||I.value),void 0!==a&&a({scope:d}),ke(t,e),!0===i&&st()])}function ke(t,e){const a=m["head-day-event"],n=!0!==v.noActiveDate&&L(t),r=M.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:I.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u=F.value,i=v.weekdayStyle||_,l={width:u,maxWidth:u,minWidth:u,...i({scope:d})};return Ee.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=Z.value(e,t||v.weekdayBreakpoints[0]>0&&ee.value<=v.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},!0===I.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&ee.value<=v.weekdayBreakpoints[1]?Ye(a,v.minWeekdayLabel):a)}function De(){const t=v.weekdays.length,a=[];for(let e=0;e<M.value.length;e+=t)a.push(be(M.value.slice(e,e+t),e/t));return a}function be(e,t){const a=m.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:I.value},o={},d=(o.height=v.dayHeight>0&&!0!==I.value?Be(parseInt(v.dayHeight,10)):"auto",v.dayMinHeight>0&&!0!==I.value&&(o.minHeight=Be(parseInt(v.dayMinHeight,10))),0===parseInt(v.dayHeight,10)&&0===parseInt(v.dayMinHeight,10));return Ee.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===v.showWorkWeeks?_e(e):void 0,Ee.h("div",{class:"q-calendar-month__week"},[Ee.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Te(e))),!0!==I.value&&void 0!==a?Ee.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(v.locale),o={workweekLabel:r,week:e,miniMode:I.value};return Ee.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...$(!1!==n?n:a,!1)},...O("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=m.day,a=v.dayStyle||_,n=ae(t),r=!0!==v.noActiveDate&&T.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&M.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:I.value,activeDate:r,hasMonth:o,droppable:w.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u=Object.assign({...K.value},a({scope:d})),i="function"===typeof v.dayClass?v.dayClass({scope:d}):{},l={key:t.date,ref:e=>{!0===C.value&&(y.value[t.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day":!0,...i,...$(t,n,v.selectedDates,v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===C.value},style:u,onFocus:()=>{!0===C.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==I.value&&c("click-day",{scope:d,event:e})},...O("-day",e=>{return{scope:d,event:e}})},s={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",d)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",d)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",d)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",d)?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(l,s),!0!==v.noAria&&(l.ariaLabel=j.value(t)),Ee.h("div",l,[Se(t,n,o),Ee.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===C.value&&st()])}function Se(e,t,a){let n,r;const o=[Me(e,t)],d=(!0!==I.value&&!0===a&&h.width>340&&(r=Ne(e,t)),!0!==I.value&&!0===v.showDayOfYearLabel&&void 0===r&&h.width>300&&(n=Ie(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.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__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return Ee.h("div",d,o)}function Me(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o=v.selectedDates&&v.selectedDates.length>0&&v.selectedDates.includes(a.date),d=!0!==v.noActiveDate&&L(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:I.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},i={key:a.date,ref:e=>{!0===A.value&&(y.value[a.date]=e)},tabindex:!0===A.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===A.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===A.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===A.value&&!0!==t&&!0!==a.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),s.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:u,event:e})},...O("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(s.value=a.date),{scope:u,event:e}})};return!0!==v.noAria&&(i.ariaLabel=j.value(a)),[r?r({scope:u}):ct(v,i,n?n({scope:u}):e),!0===A.value&&st()]}}function Ie(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=m["day-of-year"],n={timestamp:e};return Ee.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=m["month-label"],n=ne.value(e,v.shortMonthLabel||h.width<500),r={monthLabel:n,timestamp:e,miniMode:I.value},o={};return!0!==I.value&&void 0!==te.value&&(o.fontSize=te.value),Ee.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==I.value?n:void 0])}}function Oe(){const{start:e,end:t}=X.value,a=(d.value=e.date,l.value=t.date,h.width>0),n=Ee.withDirectives(Ee.h("div",{class:{"q-calendar-mini":!0===I.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&me(),!0===a&&ve()]),[[Qe,se]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([M],re,{deep:!0,immediate:!0}),Ee.watch(()=>v.modelValue,(e,t)=>{if(s.value!==e){if(!0===v.animated){const a=Ae(We(e)),n=Ae(We(t));o.value=a>=n?"next":"prev"}s.value=e}f.value=e}),Ee.watch(s,(e,t)=>{if(s.value!==v.modelValue){if(!0===v.animated){const a=Ae(We(e)),n=Ae(We(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ee.watch(f,e=>{e&&(t.value=Ce(e),s.value!==e)&&(s.value=e)}),Ee.watch(t,()=>{y.value[f.value]?y.value[f.value].focus():oe()}),Ee.onBeforeUpdate(()=>{y.value={},u.value=[],i.value=[],Ee.nextTick(()=>{ye()})}),Ee.onMounted(()=>{Q(),ye()}),x({prev:le,next:ie,move:N,moveToToday:ue,updateCurrent:g}),()=>J()}});const Dt="4.0.1";Re={version:Dt,QCalendarMonth:gt,...Re,...Ve,install(e){e.component(gt.name,gt)}};return Re});
(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(Ee){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}))/,F=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,A=[0,31,28,31,30,31,30,31,31,30,31,30,31],C=[0,31,29,31,30,31,30,31,31,30,31,30,31],L=28,x=31,u=12,n=1,h=1,o=7,r=60,d=24,q=0,H=6e4,R=36e5,B=864e5,U=6048e5,Y=60,V=3600,z=86400,P=604800,Z={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},j={hour:0,minute:0};function t(e){return!!a.exec(e)}function We(e){const t=a.exec(e);return t?{date:e,time:i(parseInt(t[6],10)||0,2)+":"+i(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 $(e,t=!1){const a=t?"UTC":"";return g({date:i(e[`get${a}FullYear`](),4)+"-"+i(e[`get${a}Month`]()+1,2)+"-"+i(e[`get${a}Date`](),2),time:i(e[`get${a}Hours`]()||0,2)+":"+i(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 i(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function K(e){return 1===(e%4===0^e%100===0^e%400===0)}function l(e,t){return(K(e)?C:A)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>L&&e.day>l(e.year,e.month)&&(e.day=h,++e.month,e.month>u)&&(e.month=n,++e.year),e}function w(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=u),e.day=l(e.year,e.month)),e}function Fe(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,i(t,2),i(a,2)].join("-")}function X(e){return e===Fe()}function S(e,t,a){let n=O(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=f(n,t[0],w),n=g(n),a&&(n=k(n,a,n.hasTime)),n}function M(e,t,a){let n=O(e);const r=l(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=w(n);return n=f(n,t[t.length-1],p),n=g(n),a&&(n=k(n,a,n.hasTime)),n}function I(e){const t=O(e);return t.day=h,g(t),t}function N(e){const t=O(e);return t.day=l(t.year,t.month),g(t),t}function Q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=F.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 J(e,t){return JSON.stringify(e)===JSON.stringify(t)}function G(e,t){return y(e)===y(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return m(e)===m(t)}function Ae(e,t){let a=We(e);return null===a?null:(a=g(a),t&&k(a,t,a.hasTime),a)}function Ce(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function c(e){return Ce(e)+s(e)}function ae(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 k(e,t,a=!1){let n=Ce(t),r=Ce(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&k(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=ie(e),e}function de(e){return e.workweek=le(e),e}function ue(e,t,a,n,r){const o=Ce(e);if(void 0!==t){const i=Ce(We(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ce(We(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=We(r[u][0]),c=We(r[u][1]);if(ke(e,s,c)){e.disabled=!0;break}}else{const y=Ce(Ae(r[u]+" 00:00"));if(y===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=v(e),e.date=y(e),e.weekday=se(e),e.doy=ie(e),e.workweek=le(e),e}function ie(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 le(e){0===e.year&&(e=Ae(Fe()));const t=fe(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)/U);return 1+Math.floor(o)}function se(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 O(e){return{...e}}function y(e){let t=i(e.year,4)+"-"+i(e.month,2);return e.hasDay&&(t+="-"+i(e.day,2)),t}function v(e){return e.hasTime?i(e.hour,2)+":"+i(e.minute,2):""}function m(e){return y(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return D(e,t,a,n)}function D(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function f(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ye(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 ve(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=Ce(t),c=[];let y=O(e),v=0,m=v===s;if(!(s<Ce(e)))while((!m||c.length<l)&&c.length<i){if(v=Ce(y),m=m||v>s&&c.length>=l,m)break;if(0===n[y.weekday]);else{const f=O(y);g(f),k(f,a),ue(f,r,o,d,u),c.push(f)}y=D(y,p)}return c}function me(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=O(t);d.push(ne(i,u,o))}return d}function E(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+m(t)),o}}}function fe(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 he(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 b(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?c:Ce;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function we(e,t=!1){const a=!0===t?c:Ce;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ke(e,t,a,n){const r=Ce(e)+(!0===n?s(e):0),o=Ce(t)+(!0===n?s(t):0),d=Ce(a)+(!0===n?s(a):0);return r>=o&&r<=d}function ge(e,t,a,n){const r=Ce(e),o=Ce(t),d=Ce(a),u=Ce(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function W(e,t){const n=O(e);let r;return be(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=De.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Me(n,De[r]),g(n),n}const De=["minute","hour","day","month"];function be(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function _e(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Te(e)}return e}function Te(e){if(e.hour>=d||e.hour<0){const t=Math.floor(e.hour/d);e.hour-=t*d,e.day+=t,Se(e)}return e}function Se(t){_(t);let a=l(t.year,t.month);if(t.day>a){++t.month,t.month>u&&_(t);let e=t.day-a;a=l(t.year,t.month);do{e>a&&(++t.month,t.month>u&&_(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&&_(t),a=l(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&_(t),a=l(t.year,t.month))}while(e>a);t.day=a-e}return t}function _(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 Me(e,t){switch(t){case"minute":return _e(e);case"hour":return Te(e);case"day":return Se(e);case"month":return _(e)}}function Ie(e,t){const a=ae(e,t,!0);return Math.floor(a/B)}function Ne(e,t){let a=O(e),n=O(t);return a=f(a,0),n=f(n,6),Math.ceil(Ie(a,n)/o)}const Oe={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 Le(){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(Oe[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function xe(t,a){const e=Object.keys(Oe),n=Le();return e.map(e=>n(e,t,a))}function qe(){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 He(t,a){const n=qe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Re={PARSE_DATETIME:a,PARSE_DATE:e,PARSE_TIME:F,DAYS_IN_MONTH:A,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MIN:L,DAYS_IN_MONTH_MAX:x,MONTH_MAX:u,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:d,FIRST_HOUR:q,MILLISECONDS_IN_MINUTE:H,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_DAY:B,MILLISECONDS_IN_WEEK:U,Timestamp:Z,TimeObject:j,today:Fe,getStartOfWeek:S,getEndOfWeek:M,getStartOfMonth:I,getEndOfMonth:N,parseTime:Q,validateTimestamp:t,parsed:We,parseTimestamp:Ae,parseDate:$,getDayIdentifier:Ce,getTimeIdentifier:s,getDayTimeIdentifier:c,diffTimestamp:ae,updateRelative:k,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:de,updateDisabled:ue,updateFormatted:g,getDayOfYear:ie,getWorkWeek:le,getWeekday:se,isLeapYear:K,daysInMonth:l,copyTimestamp:O,padNumber:i,getDate:y,getTime:v,getDateTime:m,nextDay:p,prevDay:w,relativeDays:D,findWeekday:f,getWeekdaySkips:ye,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:E,makeDate:fe,makeDateTime:he,validateNumber:b,isBetweenDates:ke,isOverlappingDates:ge,daysBetween:Ie,weeksBetween:Ne,addToDate:W,compareTimestamps:J,compareDate:G,compareTime:ee,compareDateTime:te,getWeekdayFormatter:Le,getWeekdayNames:xe,getMonthFormatter:qe,getMonthNames:He},Re=Object.freeze({__proto__:null,DAYS_IN_MONTH:A,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MAX:x,DAYS_IN_MONTH_MIN:L,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:q,HOURS_IN_DAY:d,MILLISECONDS_IN_DAY:B,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_MINUTE:H,MILLISECONDS_IN_WEEK:U,MINUTES_IN_HOUR:r,MONTH_MAX:u,MONTH_MIN:n,PARSE_DATE:e,PARSE_DATETIME:a,PARSE_TIME:F,SECONDS_IN_DAY:z,SECONDS_IN_HOUR:V,SECONDS_IN_MINUTE:Y,SECONDS_IN_WEEK:P,TimeObject:j,Timestamp:Z,addToDate:W,compareDate:G,compareDateTime:te,compareTime:ee,compareTimestamps:J,copyTimestamp:O,createDayList:ve,createIntervalList:me,createNativeLocaleFormatter:E,daysBetween:Ie,daysInMonth:l,default:Re,diffTimestamp:ae,findWeekday:f,getDate:y,getDateTime:m,getDayIdentifier:Ce,getDayOfYear:ie,getDayTimeIdentifier:c,getEndOfMonth:N,getEndOfWeek:M,getMonthFormatter:qe,getMonthNames:He,getStartOfMonth:I,getStartOfWeek:S,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:Le,getWeekdayNames:xe,getWeekdaySkips:ye,getWorkWeek:le,isBetweenDates:ke,isLeapYear:K,isOverlappingDates:ge,isToday:X,makeDate:fe,makeDateTime:he,maxTimestamp:pe,minTimestamp:we,moveRelativeDays:ce,nextDay:p,padNumber:i,parseDate:$,parseTime:Q,parseTimestamp:Ae,parsed:We,prevDay:w,relativeDays:D,today:Fe,updateDayOfYear:oe,updateDisabled:ue,updateFormatted:g,updateMinutes:ne,updateRelative:k,updateWeekday:re,updateWorkWeek:de,validateNumber:b,validateTimestamp:t,weeksBetween:Ne});function Be(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ye(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Be,indexOf:Ue},Ve=Object.freeze({__proto__:null,convertToUnit:Be,default:Ve,indexOf:Ue,minCharWidth:Ye});const ze=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Pe(a,e,t,n){const r={};for(const o in t){const d=t[o],u=ze("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),l=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function Ze(e,t,a,n){return Pe(e,t,je(a),n)}function je(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 T(e){return Object.keys(je(e))}function $e(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return Pe(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return Ze(a,n,e,t)},getMouseEventName:je,getRawMouseEvents:T}}var Ke={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 Xe(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=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.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 Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Ke,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const Qe={modelValue:{type:String,default:Fe(),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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function Je(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>ye(t.weekdays)),o=Ee.computed(()=>Ae(e.value)),d=Ee.computed(()=>{return"0000-00-00"===a.value?m(o.value):Ae(a.value)}),u=Ee.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return E(t.locale,()=>e)}),i=Ee.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return E(t.locale,(e,t)=>t?n:a)}),l=Ee.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return E(t.locale,()=>e)});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=Ce(t),r=Ce(We(e[0])),o=Ce(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function y(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 v(e){return S(e,t.weekdays,n.today)}function m(e){return M(e,t.weekdays,n.today)}function f(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:y,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}const Ge={dayHeight:{type:[Number,String],default:0,validator:b},dayMinHeight:{type:[Number,String],default:0,validator:b},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:b,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)||b(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function et(r,t,{weekdaySkips:n,times:o,parsedStart:a,parsedEnd:d,size:u,headerColumnRef:i}){const e=Ee.computed(()=>parseInt(r.minWeeks,10)),l=Ee.computed(()=>e.value*r.weekdays.length),s=Ee.computed(()=>g(b(a.value))),c=Ee.computed(()=>D(_(d.value))),y=Ee.computed(()=>{let e=0;return r.cellWidth?e=r.cellWidth:u.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length),e}),v=Ee.computed(()=>{return ve(s.value,c.value,o.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,l.value)}),m=Ee.computed(()=>{const e=o.today,t=g(e),a=D(e);return ve(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),f=Ee.computed(()=>{const a={timeZone:"UTC",month:"long"},n={timeZone:"UTC",month:"short"};return E(r.locale,(e,t)=>t?n:a)}),h=Ee.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=Ee.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=Ee.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&u.width<h.value;return!0===w&&(w=!1,t("mini-mode",e)),e});function g(e){return S(e,r.weekdays,o.today)}function D(e){return M(e,r.weekdays,o.today)}function b(e){return I(e)}function _(e){return N(e)}function T(e){const t=Ce(e);return t<Ce(a.value)||t>Ce(d.value)}return Ee.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:y,parsedMinWeeks:e,parsedMinDays:l,parsedMonthStart:s,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:p,days:v,todayWeek:m,isMiniMode:k,monthFormatter:f,isOutside:T}}const tt={now:{type:String,validator:e=>""===e||t(e),default:""}};function at(e){const t=Ee.reactive({now:Ae("0000-00-00 00:00"),today:Ae("0000-00-00")}),a=Ee.computed(()=>e.now?Ae(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 $(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 Ee.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function nt(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=N(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=ce(O(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=N(e),g(n),t=l(a.year,a.month);break;case"resource":t=1,n=ce(O(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const rt=["moved"];function ot(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:y,times:v,emittedValue:m,emit:f}){function e(a=1){if(0===a)m.value=Fe();else{let e=O(l.value);const n=a>0,r=n?p:w,o=n?x:h;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),re(e);while(0===s.value[e.weekday])e=W(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":D(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":D(e,r,y.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":D(e,r,y.value,u.weekdays);break}re(e),g(e),oe(e),k(e,v.now),m.value=e.date,f("moved",e)}}return{move:e}}const dt=/^on[A-Z]/;function ut(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{dt.test(e)&&(t[e]=!0)}),t})}}function it(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function lt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&it()])}const st={cellWidth:[Number,String]};function ct(e){const t=Ee.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const yt=["change"];function vt(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 mt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const ft=mt().isKeyCode,ht={useNavigation:Boolean};function pt(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,weekdaySkips:i,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",f))}function y(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",f),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function m(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function f(e){v(e)&&ft(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(v(e)&&ft(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:b();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(){let e=O(r.value);if("month"===d.value){if(e=W(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=W(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function w(){let e=O(r.value);if("month"===d.value){if(e=W(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=W(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function k(){let e=O(r.value);l.value="prev";do{e=W(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function g(){let e=O(r.value);l.value="next";do{e=W(e,{day:1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function D(){let e=O(r.value);if("month"===d.value||"month-interval"===d.value){e=W(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=W(e,{day:t})}else"day"===d.value?e=W(e,{day:-1}):"week"===d.value&&(e=W(e,{day:-7}));l.value="prev",n.value=e.date}function b(){let e=O(r.value);if("month"===d.value||"month-interval"===d.value){e=W(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=W(e,{day:t})}else"day"===d.value?e=W(e,{day:1}):"week"===d.value&&(e=W(e,{day:7}));l.value="next",n.value=e.date}function _(){let e=O(r.value);"month"===d.value||"month-interval"===d.value?e=I(e):"week"===d.value&&(e=S(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=W(e,{day:-1});n.value=e.date}function T(){let e=O(r.value);"month"===d.value||"month-interval"===d.value?e=N(e):"week"===d.value&&(e=M(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=W(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{y()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?c:y)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:y,tryFocus:m}}var wt=Ee.defineComponent({name:"QCalendarMonth",directives:[Ke],props:{...Qe,...Ge,...tt,...st,...ht},emits:["update:model-value",...yt,...rt,"mini-mode",...T("-date"),...T("-day"),...T("-head-workweek"),...T("-head-day"),...T("-workweek")],setup(v,{slots:m,emit:c,expose:x}){const q=Ee.ref(null),H=Ee.ref(null),e=Ee.ref(null),f=Ee.ref(null),t=Ee.ref(null),y=Ee.ref({}),u=Ee.ref([]),i=Ee.ref([]),o=Ee.ref("next"),d=Ee.ref(v.modelValue||Fe()),l=Ee.ref("0000-00-00"),R=Ee.ref(0),s=Ee.ref(v.modelValue),h=Ee.reactive({width:0,height:0}),p=Ee.ref(!1),w=Ee.ref(!1),B=Ee.ref(null),U=Ee.ref(null),a=Ee.computed(()=>{return"month"}),n=Ee.getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=ut(n).emitListeners,Y=ct(v).isSticky,{times:r,setCurrent:V,updateCurrent:g}=(Ee.watch(Y,()=>{}),at(v)),{weekdaySkips:D,parsedStart:b,parsedEnd:z,dayFormatter:P,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:_,getRelativeClasses:$}=(g(),V(),Je(v,{startDate:d,endDate:l,times:r})),T=Ee.computed(()=>{return Ae(v.modelValue,r.now)||b.value||r.today}),K=(t.value=T.value,f.value=T.value.date,Ee.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=F.value,e.maxWidth=F.value,e.width=F.value,e})),X=nt(v,{parsedView:a,times:r,parsedValue:T}).renderValues,{rootRef:S,__initCalendar:Q,__renderCalendar:J}=Xe(v,Oe,{scrollArea:q,pane:H}),{days:M,todayWeek:G,isMiniMode:I,parsedCellWidth:ee,parsedMonthLabelSize:te,isOutside:ae,monthFormatter:ne}=et(v,c,{weekdaySkips:D,times:r,parsedStart:b,parsedEnd:z,size:h,headerColumnRef:e}),N=ot(v,{parsedView:a,parsedValue:T,weekdaySkips:D,direction:o,maxDays:R,times:r,emittedValue:s,emit:c}).move,O=$e(c,k).getDefaultMouseEventHandlers,re=vt(c,{days:M,lastStart:B,lastEnd:U}).checkChange,E=mt().isKeyCode,oe=pt(v,{rootRef:S,focusRef:f,focusValue:t,datesRef:y,days:M,parsedView:a,parsedValue:T,emittedValue:s,weekdaySkips:D,direction:o,times:r}).tryFocus,de=Ee.computed(()=>{return S.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(S.value).getPropertyValue(!0===I.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=Ee.computed(()=>{return v.weekdays.length}),F=Ee.computed(()=>{if(S.value){const e=h.width||S.value.getBoundingClientRect().width;if(e&&W.value)return(e-de.value)/W.value+"px"}return 100/W.value+"%"}),A=Ee.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==I.value}),C=Ee.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==A.value});function ue(){s.value=Fe()}function ie(e=1){N(e)}function le(e=1){N(-e)}function se({width:e,height:t}){h.width=e,h.height=t}function L(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 ye(){if(!0!==I.value&&0===v.dayHeight){const t=m.week;if(void 0!==t&&window)for(var e in u.value){const a=u.value[e];if(void 0!==a){const n=i.value[e];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 ve(){return Ee.h("div",{class:"q-calendar-month__body"},[...De()])}function me(){return Ee.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&he(),Ee.h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return Ee.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function he(){const e=m["head-workweek"],t={start:b.value,end:z.value,miniMode:I.value};return Ee.h("div",{class:"q-calendar-month__head--workweek",...O("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return G.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!==v.noActiveDate&&L(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:I.value,droppable:p.value===t.weekday,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},i=!0===v.focusable&&v.focusType.includes("weekday"),l=F.value,s=v.weekdayStyle||_,c={width:l,maxWidth:l,minWidth:l,...s({scope:d})},y={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__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",d)?p.value=t.weekday:p.value="")},onFocus:()=>{!0===i&&(f.value=t.date)},...O("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(y.ariaLabel=Z.value(t,!1)),Ee.h("div",y,[void 0===a&&ge(t,v.shortWeekdayLabel||I.value),void 0!==a&&a({scope:d}),ke(t,e),!0===i&&it()])}function ke(t,e){const a=m["head-day-event"],n=!0!==v.noActiveDate&&L(t),r=M.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:I.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u=F.value,i=v.weekdayStyle||_,l={width:u,maxWidth:u,minWidth:u,...i({scope:d})};return Ee.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=Z.value(e,t||v.weekdayBreakpoints[0]>0&&ee.value<=v.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},!0===I.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&ee.value<=v.weekdayBreakpoints[1]?Ye(a,v.minWeekdayLabel):a)}function De(){const t=v.weekdays.length,a=[];for(let e=0;e<M.value.length;e+=t)a.push(be(M.value.slice(e,e+t),e/t));return a}function be(e,t){const a=m.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:I.value},o={},d=(o.height=v.dayHeight>0&&!0!==I.value?Be(parseInt(v.dayHeight,10)):"auto",v.dayMinHeight>0&&!0!==I.value&&(o.minHeight=Be(parseInt(v.dayMinHeight,10))),0===parseInt(v.dayHeight,10)&&0===parseInt(v.dayMinHeight,10));return Ee.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===v.showWorkWeeks?_e(e):void 0,Ee.h("div",{class:"q-calendar-month__week"},[Ee.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Te(e))),!0!==I.value&&void 0!==a?Ee.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(v.locale),o={workweekLabel:r,week:e,miniMode:I.value};return Ee.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...$(!1!==n?n:a,!1)},...O("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=m.day,a=v.dayStyle||_,n=ae(t),r=!0!==v.noActiveDate&&T.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&M.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:I.value,activeDate:r,hasMonth:o,droppable:w.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(t.weekday)},u=Object.assign({...K.value},a({scope:d})),i="function"===typeof v.dayClass?v.dayClass({scope:d}):{},l={key:t.date,ref:e=>{!0===A.value&&(y.value[t.date]=e)},tabindex:!0===A.value?0:-1,class:{"q-calendar-month__day":!0,...i,...$(t,n,Array.from(v.selectedDates),v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===A.value},style:u,onFocus:()=>{!0===A.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==I.value&&c("click-day",{scope:d,event:e})},...O("-day",e=>{return{scope:d,event:e}})},s={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",d)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",d)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",d)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",d)?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(l,s),!0!==v.noAria&&(l.ariaLabel=j.value(t)),Ee.h("div",l,[Se(t,n,o),Ee.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===A.value&&it()])}function Se(e,t,a){let n,r;const o=[Me(e,t)],d=(!0!==I.value&&!0===a&&h.width>340&&(r=Ne(e,t)),!0!==I.value&&!0===v.showDayOfYearLabel&&void 0===r&&h.width>300&&(n=Ie(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.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__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return Ee.h("div",d,o)}function Me(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o=v.selectedDates&&Array.from(v.selectedDates).length>0&&Array.from(v.selectedDates).includes(a.date),d=!0!==v.noActiveDate&&L(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:I.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(a.weekday)},i={key:a.date,ref:e=>{!0===C.value&&(y.value[a.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===C.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===C.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===C.value&&!0!==t&&!0!==a.disabled&&E(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),s.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:u,event:e})},...O("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(s.value=a.date),{scope:u,event:e}})};return!0!==v.noAria&&(i.ariaLabel=j.value(a)),[r?r({scope:u}):lt(v,i,n?n({scope:u}):e),!0===C.value&&it()]}}function Ie(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=m["day-of-year"],n={timestamp:e};return Ee.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=m["month-label"],n=ne.value(e,v.shortMonthLabel||h.width<500),r={monthLabel:n,timestamp:e,miniMode:I.value},o={};return!0!==I.value&&void 0!==te.value&&(o.fontSize=te.value),Ee.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==I.value?n:void 0])}}function Oe(){const{start:e,end:t}=X.value,a=(d.value=e.date,l.value=t.date,h.width>0),n=Ee.withDirectives(Ee.h("div",{class:{"q-calendar-mini":!0===I.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&me(),!0===a&&ve()]),[[Ke,se]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([M],re,{deep:!0,immediate:!0}),Ee.watch(()=>v.modelValue,(e,t)=>{if(s.value!==e){if(!0===v.animated){const a=Ce(We(e)),n=Ce(We(t));o.value=a>=n?"next":"prev"}s.value=e}f.value=e}),Ee.watch(s,(e,t)=>{if(s.value!==v.modelValue){if(!0===v.animated){const a=Ce(We(e)),n=Ce(We(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ee.watch(f,e=>{e&&(t.value=Ae(e),s.value!==e)&&(s.value=e)}),Ee.watch(t,()=>{y.value[f.value]?y.value[f.value].focus():oe()}),Ee.onBeforeUpdate(()=>{y.value={},u.value=[],i.value=[],Ee.nextTick(()=>{ye()})}),Ee.onMounted(()=>{Q(),ye()}),x({prev:le,next:ie,move:N,moveToToday:ue,updateCurrent:g}),()=>J()}});const kt="4.0.2";Re={version:kt,QCalendarMonth:wt,...Re,...Ve,install(e){e.component(wt.name,wt)}};return Re});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const s=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),l=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),p=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>s.value*m.value),y=vue.computed(()=>l.value*v.value),f=vue.computed(()=>l.value*p.value),h=vue.computed(()=>_(r.value)),D=vue.computed(()=>I(o.value)),g=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function _(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function N(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function k(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function w(e,t=[],a=[]){const n=N(t,e),{firstDay:r,lastDay:o,betweenDays:u}=k(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function O(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t){const a={timestamp:e};return a.timeStartPos=C,a.timeDurationHeight=F,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=H,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function z(e){return parseInt(e,10)*m.value/v.value}function B(e){return parseInt(e,10)*m.value/p.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:N,checkIntervals:k,getIntervalClasses:w,getResourceClasses:M,showIntervalLabelDefault:O,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:U,getScopeForSlot:Y,getScopeForSlotX:x,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:z,widthToMinutes:B,timeStartPos:C,timeStartPosX:H}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:I();break;case 35:k();break;case 36:N();break;case 37:g();break;case 38:h();break;case 39:T();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function N(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),L=vue.ref(null),U=vue.ref(null),t=vue.ref(null),y=vue.ref(null),a=vue.ref(null),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(today()),d=vue.ref("0000-00-00"),s=vue.ref(0),r=vue.ref(v.modelValue),l=vue.reactive({width:0,height:0}),D=vue.ref(!1),g=vue.ref(!1),T=vue.ref(!1),Y=vue.ref(null),x=vue.ref(null),n=(vue.watch(()=>v.view,()=>{s.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),_=vue.computed(()=>{return parseInt(v.cellWidth,10)}),o=vue.getCurrentInstance();if(null===o)throw new Error("current instance is null");const I=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:N}=useTimes(v),{weekdaySkips:k,parsedStart:w,parsedEnd:P,dayStyleDefault:M}=(N(),q(),useCommon(v,{startDate:i,endDate:d,times:c})),S=vue.computed(()=>{return parseTimestamp(v.modelValue,c.now)||w.value||c.today}),z=(a.value=S.value,y.value=S.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:S})).renderValues,{rootRef:B,__initCalendar:K,__renderCalendar:X}=useCalendar(v,Te,{scrollArea:e,pane:L}),{days:E,intervals:O,intervalFormatter:V,styleDefault:$,scrollToTimeX:Z,timeDurationWidth:b,timeStartPosX:j,widthToMinutes:Q}=useInterval(v,{weekdaySkips:k,times:c,scrollArea:e,parsedStart:w,parsedEnd:P,maxDays:s,size:l,headerColumnRef:t}),A=useMove(v,{parsedView:n,parsedValue:S,weekdaySkips:k,direction:u,maxDays:s,times:c,emittedValue:r,emit:m}).move,F=useMouse(m,I).getDefaultMouseEventHandlers,J=useCheckChange(m,{days:E,lastStart:Y,lastEnd:x}).checkChange,G=useEvents().isKeyCode,ee=useKeyboard(v,{rootRef:B,focusRef:y,focusValue:a,datesRef:f,days:E,parsedView:n,parsedValue:S,emittedValue:r,weekdaySkips:k,direction:u,times:c}).tryFocus,W=vue.computed(()=>{const e=parseInt(v.resourceHeight,10);return 0===e?"auto":e}),C=vue.computed(()=>{return parseInt(v.resourceMinHeight,10)}),H=vue.computed(()=>{return parseInt(v.intervalHeaderHeight,10)});function te(){r.value=today()}function ae(e=1){A(e)}function ne(e=1){A(-e)}function re({width:e,height:t}){l.width=e,l.height=t}function oe(e){return e.date===r.value}function ue(){const e={height:convertToUnit(H.value)};return vue.h("div",{ref:U,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[ie(),de()])}function ie(){const e=p["head-resources"],t=convertToUnit(H.value),a={timestamps:O,date:v.modelValue,resources:v.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...F("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function de(){return vue.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[O.value.map(e=>e.map((e,t)=>se(e,t)))])}function se(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&oe(e),r=convertToUnit(_.value),o=convertToUnit(H.value),u=v.shortIntervalLabel,i=V.value(e,u),d={timestamp:e,index:t,label:i},s=(d.droppable=D.value===i,v.intervalStyle||M),l={width:r,maxWidth:r,minWidth:r,height:o,...s({scope:d})},c="function"===typeof v.intervalClass?v.intervalClass({scope:d}):{},m=!0===v.focusable&&v.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",d)?D.value=i:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",d)?D.value=i:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",d)?D.value=i:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",d)?D.value=i:D.value="")},onFocus:()=>{!0===m&&(y.value=i)},...F("-interval",e=>{return{scope:d,event:e}})},[a?a({scope:d}):i,useFocusHelper()])}function le(){return vue.h("div",{class:"q-calendar-resource__body"},[ce()])}function ce(){return vue.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ve()])}function me(){return vue.h("div",{},"No resources have been defined")}function ve(){return vue.h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===v.modelResources&&me(),void 0!==v.modelResources&&pe()])}function pe(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,ye())}function ye(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return fe(e,t,a,void 0!==e.children?e.expanded:n)})}function fe(e,t,a=0,n=!0){const r={},o=(r.height="auto"===W.value?W.value:convertToUnit(W.value),C.value>0&&(r.minHeight=convertToUnit(C.value)),vue.h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[he(e,t,a,n),De(e,t)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ye(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function he(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value?convertToUnit(W.value):"auto",C.value>0&&(o.minHeight=convertToUnit(C.value)),v.resourceStyle||$),i=t[v.resourceLabel],d=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:O,resourceIndex:e,indentLevel:a,label:i},l=t[v.resourceKey],c=(s.droppable=g.value===l,"function"===typeof v.resourceClass?v.resourceClass({scope:s}):{});return vue.h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{h.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",s)?g.value=l:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",s)?g.value=l:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",s)?g.value=l:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",s)?g.value=l:g.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==I.value.onClickResource&&m("click-resource",{scope:s,event:e})},...F("-resource",e=>{return{scope:s,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:s})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):i]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:O,resourceIndex:a,timeStartPosX:j,timeDurationWidth:b};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[O.value.map(e=>e.map(e=>ge(t,e,a))),e&&e({scope:n})])}function ge(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&oe(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[v.resourceKey],i=e.time+"-"+u,d=(o.droppable=T.value===i,!0===v.focusable&&v.focusType.includes("time")),s=v.intervalStyle||M,l=convertToUnit(_.value),c={width:l,maxWidth:l,minWidth:l,...s({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value>0?convertToUnit(W.value):"auto",C.value>0&&(c.minHeight=convertToUnit(C.value)),vue.h("div",{key:i,ref:e=>{f.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",o)?T.value=i:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",o)?T.value=i:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",o)?T.value=i:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",o)?T.value=i:T.value="")},onFocus:()=>{!0===d&&(y.value=i)},...F("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function Te(){const{start:e,end:t,maxDays:a}=z.value,n=(i.value===e.date&&d.value===t.date&&s.value===a||(i.value=e.date,d.value=t.date,s.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&le()]),[[ResizeObserver$1,re]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([E],J,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),vue.watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{f.value[y.value]?f.value[y.value].focus():ee()}),vue.onBeforeUpdate(()=>{f.value={},h.value={}}),vue.onMounted(()=>{K()}),R({prev:ne,next:ae,move:A,moveToToday:te,updateCurrent:N,timeStartPosX:j,timeDurationWidth:b,widthToMinutes:Q,scrollToTimeX:Z}),()=>X()}});const version="4.0.1";exports.QCalendarResource=QCalendarResource,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const s=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),l=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),p=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>s.value*m.value),y=vue.computed(()=>l.value*v.value),f=vue.computed(()=>l.value*p.value),h=vue.computed(()=>_(r.value)),D=vue.computed(()=>I(o.value)),g=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function _(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function N(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function k(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function w(e,t=[],a=[]){const n=N(t,e),{firstDay:r,lastDay:o,betweenDays:u}=k(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function O(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t){const a={timestamp:e};return a.timeStartPos=C,a.timeDurationHeight=F,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=H,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function z(e){return parseInt(e,10)*m.value/v.value}function B(e){return parseInt(e,10)*m.value/p.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:D,days:g,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:N,checkIntervals:k,getIntervalClasses:w,getResourceClasses:M,showIntervalLabelDefault:O,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:U,getScopeForSlot:Y,getScopeForSlotX:x,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:z,widthToMinutes:B,timeStartPos:C,timeStartPosX:H}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const u=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:I();break;case 35:k();break;case 36:N();break;case 37:g();break;case 38:h();break;case 39:T();break;case 40:D();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function N(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),L=vue.ref(null),U=vue.ref(null),t=vue.ref(null),y=vue.ref(null),a=vue.ref(null),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(today()),d=vue.ref("0000-00-00"),s=vue.ref(0),r=vue.ref(v.modelValue),l=vue.reactive({width:0,height:0}),D=vue.ref(!1),g=vue.ref(!1),T=vue.ref(!1),Y=vue.ref(null),x=vue.ref(null),n=(vue.watch(()=>v.view,()=>{s.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),_=vue.computed(()=>{return parseInt(v.cellWidth,10)}),o=vue.getCurrentInstance();if(null===o)throw new Error("current instance is null");const I=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:N}=useTimes(v),{weekdaySkips:k,parsedStart:w,parsedEnd:P,dayStyleDefault:M}=(N(),q(),useCommon(v,{startDate:i,endDate:d,times:c})),S=vue.computed(()=>{return parseTimestamp(v.modelValue,c.now)||w.value||c.today}),z=(a.value=S.value,y.value=S.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:S})).renderValues,{rootRef:B,__initCalendar:K,__renderCalendar:X}=useCalendar(v,Te,{scrollArea:e,pane:L}),{days:E,intervals:O,intervalFormatter:V,styleDefault:Z,scrollToTimeX:$,timeDurationWidth:b,timeStartPosX:j,widthToMinutes:Q}=useInterval(v,{weekdaySkips:k,times:c,scrollArea:e,parsedStart:w,parsedEnd:P,maxDays:s,size:l,headerColumnRef:t}),A=useMove(v,{parsedView:n,parsedValue:S,weekdaySkips:k,direction:u,maxDays:s,times:c,emittedValue:r,emit:m}).move,F=useMouse(m,I).getDefaultMouseEventHandlers,J=useCheckChange(m,{days:E,lastStart:Y,lastEnd:x}).checkChange,G=useEvents().isKeyCode,ee=useKeyboard(v,{rootRef:B,focusRef:y,focusValue:a,datesRef:f,days:E,parsedView:n,parsedValue:S,emittedValue:r,weekdaySkips:k,direction:u,times:c}).tryFocus,W=vue.computed(()=>{const e=parseInt(v.resourceHeight,10);return 0===e?"auto":e}),C=vue.computed(()=>{return parseInt(v.resourceMinHeight,10)}),H=vue.computed(()=>{return parseInt(v.intervalHeaderHeight,10)});function te(){r.value=today()}function ae(e=1){A(e)}function ne(e=1){A(-e)}function re({width:e,height:t}){l.width=e,l.height=t}function oe(e){return e.date===r.value}function ue(){const e={height:convertToUnit(H.value)};return vue.h("div",{ref:U,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[ie(),de()])}function ie(){const e=p["head-resources"],t=convertToUnit(H.value),a={timestamps:O,date:v.modelValue,resources:v.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...F("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function de(){return vue.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[O.value.map(e=>e.map((e,t)=>se(e,t)))])}function se(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&oe(e),r=convertToUnit(_.value),o=convertToUnit(H.value),u=v.shortIntervalLabel,i=V.value(e,u),d={timestamp:e,index:t,label:i},s=(d.droppable=D.value===i,v.intervalStyle||M),l={width:r,maxWidth:r,minWidth:r,height:o,...s({scope:d})},c="function"===typeof v.intervalClass?v.intervalClass({scope:d}):{},m=!0===v.focusable&&v.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",d)?D.value=i:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",d)?D.value=i:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",d)?D.value=i:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",d)?D.value=i:D.value="")},onFocus:()=>{!0===m&&(y.value=i)},...F("-interval",e=>{return{scope:d,event:e}})},[a?a({scope:d}):i,useFocusHelper()])}function le(){return vue.h("div",{class:"q-calendar-resource__body"},[ce()])}function ce(){return vue.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ve()])}function me(){return vue.h("div",{},"No resources have been defined")}function ve(){return vue.h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===v.modelResources&&me(),void 0!==v.modelResources&&pe()])}function pe(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,ye())}function ye(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return fe(e,t,a,void 0!==e.children?e.expanded:n)})}function fe(e,t,a=0,n=!0){const r={},o=(r.height="auto"===W.value?W.value:convertToUnit(W.value),C.value>0&&(r.minHeight=convertToUnit(C.value)),vue.h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[he(e,t,a,n),De(e,t)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ye(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function he(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value?convertToUnit(W.value):"auto",C.value>0&&(o.minHeight=convertToUnit(C.value)),v.resourceStyle||Z),i=t[v.resourceLabel],d=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:O,resourceIndex:e,indentLevel:a,label:i},l=t[v.resourceKey],c=(s.droppable=g.value===l,"function"===typeof v.resourceClass?v.resourceClass({scope:s}):{});return vue.h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{h.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",s)?g.value=l:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",s)?g.value=l:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",s)?g.value=l:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",s)?g.value=l:g.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==I.value.onClickResource&&m("click-resource",{scope:s,event:e})},...F("-resource",e=>{return{scope:s,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:s})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):i]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:O,resourceIndex:a,timeStartPosX:j,timeDurationWidth:b};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[O.value.map(e=>e.map(e=>ge(t,e,a))),e&&e({scope:n})])}function ge(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&oe(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[v.resourceKey],i=e.time+"-"+u,d=(o.droppable=T.value===i,!0===v.focusable&&v.focusType.includes("time")),s=v.intervalStyle||M,l=convertToUnit(_.value),c={width:l,maxWidth:l,minWidth:l,...s({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value>0?convertToUnit(W.value):"auto",C.value>0&&(c.minHeight=convertToUnit(C.value)),vue.h("div",{key:i,ref:e=>{f.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",o)?T.value=i:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",o)?T.value=i:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",o)?T.value=i:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",o)?T.value=i:T.value="")},onFocus:()=>{!0===d&&(y.value=i)},...F("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function Te(){const{start:e,end:t,maxDays:a}=z.value,n=(i.value===e.date&&d.value===t.date&&s.value===a||(i.value=e.date,d.value=t.date,s.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&le()]),[[ResizeObserver$1,re]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([E],J,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),vue.watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{f.value[y.value]?f.value[y.value].focus():ee()}),vue.onBeforeUpdate(()=>{f.value={},h.value={}}),vue.onMounted(()=>{K()}),R({prev:ne,next:ae,move:A,moveToToday:te,updateCurrent:N,timeStartPosX:j,timeDurationWidth:b,widthToMinutes:Q,scrollToTimeX:$}),()=>X()}});const version="4.0.2";exports.QCalendarResource=QCalendarResource,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const s=getDayIdentifier(parsed(t));o<=s&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=getDayIdentifier(parsed(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],s=42,d=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<d)&&c.length<s){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=d,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,i,u),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,s=copyTimestamp(t);i.push(updateMinutes(s,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:s,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),u=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),d=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:i,lastDay:u,betweenDays:s}=c(n,e);return{"q-past-day":!0!==i&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===s,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===s),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:s,ariaDateFormatter:d,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:s}){const d=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),l=computed(()=>parseInt(t.intervalCount,10)),v=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&s.value&&(e=s.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>d.value*m.value),y=computed(()=>l.value*v.value),f=computed(()=>l.value*p.value),h=computed(()=>_(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),T=computed(()=>{return D.value.map(e=>createIntervalList(e,d.value,m.value,l.value,a.now))});function _(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function N(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function k(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function w(e,t=[],a=[]){const n=N(t,e),{firstDay:r,lastDay:o,betweenDays:i}=k(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function O(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function H(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientX,l=(d-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=R,a.timeDurationWidth=F,void 0!==t&&(a.index=t),a}function P(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function q(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function F(e){return e/m.value*p.value}function z(e){return parseInt(e,10)*m.value/v.value}function B(e){return parseInt(e,10)*m.value/p.value}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:N,checkIntervals:k,getIntervalClasses:w,getResourceClasses:M,showIntervalLabelDefault:O,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:H,getTimestampAtEvent:L,getTimestampAtEventX:U,getScopeForSlot:Y,getScopeForSlotX:x,scrollToTime:P,scrollToTimeX:q,timeDurationHeight:C,timeDurationWidth:F,heightToMinutes:z,widthToMinutes:B,timeStartPos:W,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};i in t?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:d,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:s,direction:d,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:I();break;case 35:k();break;case 36:N();break;case 37:D();break;case 38:h();break;case 39:T();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));d.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));d.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(0===s.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(0===s.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));d.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));d.value="next",n.value=e.date}function N(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:L}){const e=ref(null),U=ref(null),Y=ref(null),t=ref(null),y=ref(null),a=ref(null),f=ref({}),g=ref({}),i=ref("next"),u=ref(today()),s=ref("0000-00-00"),d=ref(0),r=ref(v.modelValue),l=reactive({width:0,height:0}),D=ref(!1),T=ref(!1),_=ref(!1),x=ref(null),P=ref(null),n=(watch(()=>v.view,()=>{d.value=0}),computed(()=>{return"month"===v.view?"month-interval":v.view})),I=computed(()=>{return parseInt(v.cellWidth,10)}),o=getCurrentInstance();if(null===o)throw new Error("current instance is null");const N=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:k}=useTimes(v),{weekdaySkips:w,parsedStart:M,parsedEnd:z,dayStyleDefault:S}=(k(),q(),useCommon(v,{startDate:u,endDate:s,times:c})),E=computed(()=>{return parseTimestamp(v.modelValue,c.now)||M.value||c.today}),B=(a.value=E.value,y.value=E.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:E})).renderValues,{rootRef:K,__initCalendar:X,__renderCalendar:$}=useCalendar(v,_e,{scrollArea:e,pane:U}),{days:O,intervals:b,intervalFormatter:V,styleDefault:Z,scrollToTimeX:j,timeDurationWidth:A,timeStartPosX:Q,widthToMinutes:J}=useInterval(v,{weekdaySkips:w,times:c,scrollArea:e,parsedStart:M,parsedEnd:z,maxDays:d,size:l,headerColumnRef:t}),C=useMove(v,{parsedView:n,parsedValue:E,weekdaySkips:w,direction:i,maxDays:d,times:c,emittedValue:r,emit:m}).move,F=useMouse(m,N).getDefaultMouseEventHandlers,G=useCheckChange(m,{days:O,lastStart:x,lastEnd:P}).checkChange,ee=useEvents().isKeyCode,te=useKeyboard(v,{rootRef:K,focusRef:y,focusValue:a,datesRef:f,days:O,parsedView:n,parsedValue:E,emittedValue:r,weekdaySkips:w,direction:i,times:c}).tryFocus,W=computed(()=>{const e=parseInt(v.resourceHeight,10);return 0===e?"auto":e}),R=computed(()=>{return parseInt(v.resourceMinHeight,10)}),H=computed(()=>{return parseInt(v.intervalHeaderHeight,10)});function ae(){r.value=today()}function ne(e=1){C(e)}function re(e=1){C(-e)}function oe({width:e,height:t}){l.width=e,l.height=t}function ie(e){return e.date===r.value}function ue(){const e={height:convertToUnit(H.value)};return h("div",{ref:Y,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[se(),de()])}function se(){const e=p["head-resources"],t=convertToUnit(H.value),a={timestamps:b,date:v.modelValue,resources:v.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...F("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function de(){return h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[b.value.map(e=>e.map((e,t)=>le(e,t)))])}function le(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&ie(e),r=convertToUnit(I.value),o=convertToUnit(H.value),i=v.shortIntervalLabel,u=V.value(e,i),s={timestamp:e,index:t,label:u},d=(s.droppable=D.value===u,v.intervalStyle||S),l={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:s})},c="function"===typeof v.intervalClass?v.intervalClass({scope:s}):{},m=!0===v.focusable&&v.focusType.includes("interval");return h("div",{key:u,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",s)?D.value=u:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",s)?D.value=u:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",s)?D.value=u:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",s)?D.value=u:D.value="")},onFocus:()=>{!0===m&&(y.value=u)},...F("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):u,useFocusHelper()])}function ce(){return h("div",{class:"q-calendar-resource__body"},[me()])}function me(){return h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function ve(){return h("div",{},"No resources have been defined")}function pe(){return h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===v.modelResources&&ve(),void 0!==v.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,fe())}function fe(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={},o=(r.height="auto"===W.value?W.value:convertToUnit(W.value),R.value>0&&(r.minHeight=convertToUnit(R.value)),h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,a,n),De(e,t)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[fe(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ge(t,e,a=0,n=!0){const r=p["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value?convertToUnit(W.value):"auto",R.value>0&&(o.minHeight=convertToUnit(R.value)),v.resourceStyle||Z),u=t[v.resourceLabel],s=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:b,resourceIndex:e,indentLevel:a,label:u},l=t[v.resourceKey],c=(d.droppable=T.value===l,"function"===typeof v.resourceClass?v.resourceClass({scope:d}):{});return h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{g.value[t[v.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:{...o,...i({scope:d})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",d)?T.value=l:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",d)?T.value=l:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",d)?T.value=l:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",d)?T.value=l:T.value="")},onKeydown:e=>{ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{ee(e,[13,32])&&void 0!==N.value.onClickResource&&m("click-resource",{scope:d,event:e})},...F("-resource",e=>{return{scope:d,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:d})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):u]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:b,resourceIndex:a,timeStartPosX:Q,timeDurationWidth:A};return h("div",{class:"q-calendar-resource__resource--intervals"},[b.value.map(e=>e.map(e=>Te(t,e,a))),e&&e({scope:n})])}function Te(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&ie(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},i=t[v.resourceKey],u=e.time+"-"+i,s=(o.droppable=_.value===u,!0===v.focusable&&v.focusType.includes("time")),d=v.intervalStyle||S,l=convertToUnit(I.value),c={width:l,maxWidth:l,minWidth:l,...d({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value>0?convertToUnit(W.value):"auto",R.value>0&&(c.minHeight=convertToUnit(R.value)),h("div",{key:u,ref:e=>{f.value[t[v.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",o)?_.value=u:_.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",o)?_.value=u:_.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",o)?_.value=u:_.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",o)?_.value=u:_.value="")},onFocus:()=>{!0===s&&(y.value=u)},...F("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function _e(){const{start:e,end:t,maxDays:a}=B.value,n=(u.value===e.date&&s.value===t.date&&d.value===a||(u.value=e.date,s.value=t.date,d.value=a),l.width>0),r=withDirectives(h("div",{class:"q-calendar-resource",key:u.value},[!0===n&&ce()]),[[ResizeObserver$1,oe]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([O],G,{deep:!0,immediate:!0}),watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}r.value=e}y.value=e}),watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[y.value]?f.value[y.value].focus():te()}),onBeforeUpdate(()=>{f.value={},g.value={}}),onMounted(()=>{X()}),L({prev:re,next:ne,move:C,moveToToday:ae,updateCurrent:k,timeStartPosX:Q,timeDurationWidth:A,widthToMinutes:J,scrollToTimeX:j}),()=>$()}});const version="4.0.1";var Plugin={version:version,QCalendarResource:QCalendarResource,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarResource.name,QCalendarResource)}};export{QCalendarResource,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,i,u),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),u=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:i,lastDay:u,betweenDays:d}=c(n,e);return{"q-past-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===d,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:d}){const s=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),l=computed(()=>parseInt(t.intervalCount,10)),v=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>s.value*m.value),y=computed(()=>l.value*v.value),f=computed(()=>l.value*p.value),h=computed(()=>_(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),T=computed(()=>{return D.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function _(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function N(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function k(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function w(e,t=[],a=[]){const n=N(t,e),{firstDay:r,lastDay:o,betweenDays:i}=k(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function O(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function b(e){}function A(e){}function H(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function Y(e,t){const a={timestamp:e};return a.timeStartPos=W,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=R,a.timeDurationWidth=F,void 0!==t&&(a.index=t),a}function P(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function q(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function F(e){return e/m.value*p.value}function z(e){return parseInt(e,10)*m.value/v.value}function B(e){return parseInt(e,10)*m.value/p.value}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:N,checkIntervals:k,getIntervalClasses:w,getResourceClasses:M,showIntervalLabelDefault:O,showResourceLabelDefault:b,styleDefault:A,getTimestampAtEventInterval:H,getTimestampAtEvent:L,getTimestampAtEventX:U,getScopeForSlot:Y,getScopeForSlotX:x,scrollToTime:P,scrollToTimeX:q,timeDurationHeight:C,timeDurationWidth:F,heightToMinutes:z,widthToMinutes:B,timeStartPos:W,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const i=t[o],u=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{const t=e;return(void 0===i.button||t.buttons>0&&t.button===i.button)&&(i.prevent&&t.preventDefault(),i.stop&&t.stopPropagation(),a(o,n(t,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:I();break;case 35:k();break;case 36:N();break;case 37:D();break;case 38:h();break;case 39:T();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function N(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:L}){const e=ref(null),U=ref(null),Y=ref(null),t=ref(null),y=ref(null),a=ref(null),f=ref({}),g=ref({}),i=ref("next"),u=ref(today()),d=ref("0000-00-00"),s=ref(0),r=ref(v.modelValue),l=reactive({width:0,height:0}),D=ref(!1),T=ref(!1),_=ref(!1),x=ref(null),P=ref(null),n=(watch(()=>v.view,()=>{s.value=0}),computed(()=>{return"month"===v.view?"month-interval":v.view})),I=computed(()=>{return parseInt(v.cellWidth,10)}),o=getCurrentInstance();if(null===o)throw new Error("current instance is null");const N=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:k}=useTimes(v),{weekdaySkips:w,parsedStart:M,parsedEnd:z,dayStyleDefault:S}=(k(),q(),useCommon(v,{startDate:u,endDate:d,times:c})),E=computed(()=>{return parseTimestamp(v.modelValue,c.now)||M.value||c.today}),B=(a.value=E.value,y.value=E.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:E})).renderValues,{rootRef:K,__initCalendar:X,__renderCalendar:V}=useCalendar(v,_e,{scrollArea:e,pane:U}),{days:O,intervals:b,intervalFormatter:$,styleDefault:Z,scrollToTimeX:j,timeDurationWidth:A,timeStartPosX:Q,widthToMinutes:J}=useInterval(v,{weekdaySkips:w,times:c,scrollArea:e,parsedStart:M,parsedEnd:z,maxDays:s,size:l,headerColumnRef:t}),C=useMove(v,{parsedView:n,parsedValue:E,weekdaySkips:w,direction:i,maxDays:s,times:c,emittedValue:r,emit:m}).move,F=useMouse(m,N).getDefaultMouseEventHandlers,G=useCheckChange(m,{days:O,lastStart:x,lastEnd:P}).checkChange,ee=useEvents().isKeyCode,te=useKeyboard(v,{rootRef:K,focusRef:y,focusValue:a,datesRef:f,days:O,parsedView:n,parsedValue:E,emittedValue:r,weekdaySkips:w,direction:i,times:c}).tryFocus,W=computed(()=>{const e=parseInt(v.resourceHeight,10);return 0===e?"auto":e}),R=computed(()=>{return parseInt(v.resourceMinHeight,10)}),H=computed(()=>{return parseInt(v.intervalHeaderHeight,10)});function ae(){r.value=today()}function ne(e=1){C(e)}function re(e=1){C(-e)}function oe({width:e,height:t}){l.width=e,l.height=t}function ie(e){return e.date===r.value}function ue(){const e={height:convertToUnit(H.value)};return h("div",{ref:Y,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[de(),se()])}function de(){const e=p["head-resources"],t=convertToUnit(H.value),a={timestamps:b,date:v.modelValue,resources:v.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...F("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function se(){return h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[b.value.map(e=>e.map((e,t)=>le(e,t)))])}function le(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&ie(e),r=convertToUnit(I.value),o=convertToUnit(H.value),i=v.shortIntervalLabel,u=$.value(e,i),d={timestamp:e,index:t,label:u},s=(d.droppable=D.value===u,v.intervalStyle||S),l={width:r,maxWidth:r,minWidth:r,height:o,...s({scope:d})},c="function"===typeof v.intervalClass?v.intervalClass({scope:d}):{},m=!0===v.focusable&&v.focusType.includes("interval");return h("div",{key:u,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",d)?D.value=u:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",d)?D.value=u:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",d)?D.value=u:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",d)?D.value=u:D.value="")},onFocus:()=>{!0===m&&(y.value=u)},...F("-interval",e=>{return{scope:d,event:e}})},[a?a({scope:d}):u,useFocusHelper()])}function ce(){return h("div",{class:"q-calendar-resource__body"},[me()])}function me(){return h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function ve(){return h("div",{},"No resources have been defined")}function pe(){return h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===v.modelResources&&ve(),void 0!==v.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,fe())}function fe(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={},o=(r.height="auto"===W.value?W.value:convertToUnit(W.value),R.value>0&&(r.minHeight=convertToUnit(R.value)),h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,a,n),De(e,t)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[fe(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ge(t,e,a=0,n=!0){const r=p["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value?convertToUnit(W.value):"auto",R.value>0&&(o.minHeight=convertToUnit(R.value)),v.resourceStyle||Z),u=t[v.resourceLabel],d=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:b,resourceIndex:e,indentLevel:a,label:u},l=t[v.resourceKey],c=(s.droppable=T.value===l,"function"===typeof v.resourceClass?v.resourceClass({scope:s}):{});return h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{g.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:{...o,...i({scope:s})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",s)?T.value=l:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",s)?T.value=l:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",s)?T.value=l:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",s)?T.value=l:T.value="")},onKeydown:e=>{ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{ee(e,[13,32])&&void 0!==N.value.onClickResource&&m("click-resource",{scope:s,event:e})},...F("-resource",e=>{return{scope:s,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:s})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):u]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:b,resourceIndex:a,timeStartPosX:Q,timeDurationWidth:A};return h("div",{class:"q-calendar-resource__resource--intervals"},[b.value.map(e=>e.map(e=>Te(t,e,a))),e&&e({scope:n})])}function Te(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&ie(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},i=t[v.resourceKey],u=e.time+"-"+i,d=(o.droppable=_.value===u,!0===v.focusable&&v.focusType.includes("time")),s=v.intervalStyle||S,l=convertToUnit(I.value),c={width:l,maxWidth:l,minWidth:l,...s({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):W.value>0?convertToUnit(W.value):"auto",R.value>0&&(c.minHeight=convertToUnit(R.value)),h("div",{key:u,ref:e=>{f.value[t[v.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===d},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",o)?_.value=u:_.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",o)?_.value=u:_.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",o)?_.value=u:_.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",o)?_.value=u:_.value="")},onFocus:()=>{!0===d&&(y.value=u)},...F("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function _e(){const{start:e,end:t,maxDays:a}=B.value,n=(u.value===e.date&&d.value===t.date&&s.value===a||(u.value=e.date,d.value=t.date,s.value=a),l.width>0),r=withDirectives(h("div",{class:"q-calendar-resource",key:u.value},[!0===n&&ce()]),[[ResizeObserver$1,oe]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([O],G,{deep:!0,immediate:!0}),watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}r.value=e}y.value=e}),watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[y.value]?f.value[y.value].focus():te()}),onBeforeUpdate(()=>{f.value={},g.value={}}),onMounted(()=>{X()}),L({prev:re,next:ne,move:C,moveToToday:ae,updateCurrent:k,timeStartPosX:Q,timeDurationWidth:A,widthToMinutes:J,scrollToTimeX:j}),()=>V()}});const version="4.0.2";var Plugin={version:version,QCalendarResource:QCalendarResource,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarResource.name,QCalendarResource)}};export{QCalendarResource,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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.QCalendarResource=t(e.Vue))})(this,function(De){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,N=31,i=12,n=1,h=1,o=7,r=60,u=24,F=0,M=6e4,C=36e5,O=864e5,E=6048e5,A=60,x=3600,W=86400,q=604800,L={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},R={hour:0,minute:0};function H(e){return!!a.exec(e)}function _e(e){const t=a.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 U(e,t=!1){const a=t?"UTC":"";return w({date:l(e[`get${a}FullYear`](),4)+"-"+l(e[`get${a}Month`]()+1,2)+"-"+l(e[`get${a}Date`](),2),time:l(e[`get${a}Hours`]()||0,2)+":"+l(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 l(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function Y(e){return 1===(e%4===0^e%100===0^e%400===0)}function d(e,t){return(Y(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>d(e.year,e.month)&&(e.day=h,++e.month,e.month>i)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=i),e.day=d(e.year,e.month)),e}function be(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,l(t,2),l(a,2)].join("-")}function B(e){return e===be()}function P(e,t,a){let n=$(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=K(n,a,n.hasTime)),n}function z(e,t,a){let n=$(e);const r=d(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],p),n=w(n),a&&(n=K(n,a,n.hasTime)),n}function S(e){const t=$(e);return t.day=h,w(t),t}function I(e){const t=$(e);return t.day=d(t.year,t.month),w(t),t}function G(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Z(e,t){return c(e)===c(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return j(e)===j(t)}function Te(e,t){let a=_e(e);return null===a?null:(a=w(a),t&&K(a,t,a.hasTime),a)}function Se(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function X(e){return Se(e)+s(e)}function ae(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 K(e,t,a=!1){let n=Se(t),r=Se(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&K(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=le(e),e}function ue(e){return e.workweek=de(e),e}function ie(e,t,a,n,r){const o=Se(e);if(void 0!==t){const l=Se(_e(t));o<=l&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=Se(_e(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=_e(r[i][0]),c=_e(r[i][1]);if(we(e,s,c)){e.disabled=!0;break}}else{const v=Se(Te(r[i]+" 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=se(e),e.doy=le(e),e.workweek=de(e),e}function le(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 de(e){0===e.year&&(e=Te(be()));const t=ye(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)/E);return 1+Math.floor(o)}function se(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%i+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function $(e){return{...e}}function c(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function v(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function j(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ve(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 me(e,t,a,n,r,o,u=[],i=[],l=42,d=0){const s=Se(t),c=[];let v=$(e),m=0,f=m===s;if(!(s<Se(e)))while((!f||c.length<d)&&c.length<l){if(m=Se(v),f=f||m>s&&c.length>=d,f)break;if(0===n[v.weekday]);else{const y=$(v);w(y),K(y,a),ie(y,r,o,u,i),c.push(y)}v=k(v,p)}return c}function fe(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=$(t);u.push(ne(l,i,o))}return u}function Q(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+j(t)),o}}}function ye(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 he(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 e(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?X:Se;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ge(e,t=!1){const a=!0===t?X:Se;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function we(e,t,a,n){const r=Se(e)+(!0===n?s(e):0),o=Se(t)+(!0===n?s(t):0),u=Se(a)+(!0===n?s(a):0);return r>=o&&r<=u}function ke(e,t,a,n){const r=Se(e),o=Se(t),u=Se(a),i=Se(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function J(e,t){const n=$(e);let r;return Fe(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Ne.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ee(n,Ne[r]),w(n),n}const Ne=["minute","hour","day","month"];function Fe(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Me(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Ce(e)}return e}function Ce(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Oe(e)}return e}function Oe(t){f(t);let a=d(t.year,t.month);if(t.day>a){++t.month,t.month>i&&f(t);let e=t.day-a;a=d(t.year,t.month);do{e>a&&(++t.month,t.month>i&&f(t),e-=a,a=d(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&&f(t),a=d(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=d(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>i){const t=Math.floor(e.month/i);e.month=e.month%i,e.year+=t}else e.month<n&&(e.month+=i,--e.year);return e}function Ee(e,t){switch(t){case"minute":return Me(e);case"hour":return Ce(e);case"day":return Oe(e);case"month":return f(e)}}function Ae(e,t){const a=ae(e,t,!0);return Math.floor(a/O)}function xe(e,t){let a=$(e),n=$(t);return a=m(a,0),n=m(n,6),Math.ceil(Ae(a,n)/o)}const We={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 qe(){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(We[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Le(t,a){const e=Object.keys(We),n=qe();return e.map(e=>n(e,t,a))}function Re(){const o=(e,t)=>"",u={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,u[e]||u["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 He(t,a){const n=Re();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ue={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:N,MONTH_MAX:i,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:F,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:C,MILLISECONDS_IN_DAY:O,MILLISECONDS_IN_WEEK:E,Timestamp:L,TimeObject:R,today:be,getStartOfWeek:P,getEndOfWeek:z,getStartOfMonth:S,getEndOfMonth:I,parseTime:G,validateTimestamp:H,parsed:_e,parseTimestamp:Te,parseDate:U,getDayIdentifier:Se,getTimeIdentifier:s,getDayTimeIdentifier:X,diffTimestamp:ae,updateRelative:K,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:ue,updateDisabled:ie,updateFormatted:w,getDayOfYear:le,getWorkWeek:de,getWeekday:se,isLeapYear:Y,daysInMonth:d,copyTimestamp:$,padNumber:l,getDate:c,getTime:v,getDateTime:j,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ve,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,makeDate:ye,makeDateTime:he,validateNumber:e,isBetweenDates:we,isOverlappingDates:ke,daysBetween:Ae,weeksBetween:xe,addToDate:J,compareTimestamps:V,compareDate:Z,compareTime:ee,compareDateTime:te,getWeekdayFormatter:qe,getWeekdayNames:Le,getMonthFormatter:Re,getMonthNames:He},Ue=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:F,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:O,MILLISECONDS_IN_HOUR:C,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:E,MINUTES_IN_HOUR:r,MONTH_MAX:i,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:W,SECONDS_IN_HOUR:x,SECONDS_IN_MINUTE:A,SECONDS_IN_WEEK:q,TimeObject:R,Timestamp:L,addToDate:J,compareDate:Z,compareDateTime:te,compareTime:ee,compareTimestamps:V,copyTimestamp:$,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,daysBetween:Ae,daysInMonth:d,default:Ue,diffTimestamp:ae,findWeekday:m,getDate:c,getDateTime:j,getDayIdentifier:Se,getDayOfYear:le,getDayTimeIdentifier:X,getEndOfMonth:I,getEndOfWeek:z,getMonthFormatter:Re,getMonthNames:He,getStartOfMonth:S,getStartOfWeek:P,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:qe,getWeekdayNames:Le,getWeekdaySkips:ve,getWorkWeek:de,isBetweenDates:we,isLeapYear:Y,isOverlappingDates:ke,isToday:B,makeDate:ye,makeDateTime:he,maxTimestamp:pe,minTimestamp:ge,moveRelativeDays:ce,nextDay:p,padNumber:l,parseDate:U,parseTime:G,parseTimestamp:Te,parsed:_e,prevDay:g,relativeDays:k,today:be,updateDayOfYear:oe,updateDisabled:ie,updateFormatted:w,updateMinutes:ne,updateRelative:K,updateWeekday:re,updateWorkWeek:ue,validateNumber:e,validateTimestamp:H,weeksBetween:xe});function Ie(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Be(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Ie,indexOf:Ye},Ve=Object.freeze({__proto__:null,convertToUnit:Ie,default:Ve,indexOf:Ye,minCharWidth:Be}),Ze={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=De.reactive({width:0,height:0}),o=De.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=De.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return De.withDirectives(De.h("div",{...e},[a()]),[[Ze,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const ze={modelValue:{type:String,default:be(),validator:e=>""===e||H(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function Xe(t,{startDate:e,endDate:a,times:n}){const r=De.computed(()=>ve(t.weekdays)),o=De.computed(()=>Te(e.value)),u=De.computed(()=>{return"0000-00-00"===a.value?f(o.value):Te(a.value)}),i=De.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return Q(t.locale,()=>e)}),l=De.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return Q(t.locale,(e,t)=>t?n:a)}),d=De.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return Q(t.locale,()=>e)});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=Se(t),r=Se(_e(e[0])),o=Se(_e(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:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return P(e,t.weekdays,n.today)}function f(e){return z(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function Ke(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function $e(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function je(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Qe(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=je(n);o<=0?i!==r&&Ke(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;Ke(n,a),a!==r&&Je(n,r,o-t,e)})}function Ge(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=Qe(n);o<=0?i!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Ge(n,r,o-t,e)})}const et={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},tt={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:e},noSticky:Boolean};function at(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:l}){const d=De.computed(()=>parseInt(t.intervalStart,10)),v=De.computed(()=>parseInt(t.intervalMinutes,10)),s=De.computed(()=>parseInt(t.intervalCount,10)),m=De.computed(()=>parseFloat(t.intervalHeight)),f=De.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=De.computed(()=>d.value*v.value),y=De.computed(()=>s.value*m.value),h=De.computed(()=>s.value*f.value),p=De.computed(()=>D(r.value)),g=De.computed(()=>_(o.value)),w=De.computed(()=>{return me(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=De.computed(()=>{return w.value.map(e=>fe(e,d.value,v.value,s.value,a.now))});function D(e){return P(e,t.weekdays,a.today)}function _(e){return z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(j(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=X(t),r=X(_e(e[0])),o=X(_e(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function S(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const N=De.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return Q(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),F=De.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function O(e){}function q(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function H(e,t){const a={timestamp:e};return a.timeStartPos=x,a.timeDurationHeight=E,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:$(e)};return a.timeStartPosX=W,a.timeDurationWidth=A,void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=x(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Ge(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function A(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function Z(e){return parseInt(e,10)*v.value/f.value}function x(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function W(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:N,ariaDateTimeFormatter:F,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:S,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:C,styleDefault:O,getTimestampAtEventInterval:q,getTimestampAtEvent:L,getTimestampAtEventX:R,getScopeForSlot:H,getScopeForSlotX:U,scrollToTime:Y,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:A,heightToMinutes:V,widthToMinutes:Z,timeStartPos:x,timeStartPosX:W}}const nt={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},rt={maxDays:{type:Number,default:1}},ot={now:{type:String,validator:e=>""===e||H(e),default:""}};function ut(e){const t=De.reactive({now:Te("0000-00-00 00:00"),today:Te("0000-00-00")}),a=De.computed(()=>e.now?Te(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return De.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function it(r,{parsedView:o,parsedValue:u,times:i}){const e=De.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=S(e),n=I(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,i.today),n=z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ce($(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=I(e),w(n),t=d(a.year,a.month);break;case"resource":t=1,n=ce($(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const lt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let dt,st;function ct(e,a){const t={};for(const n in e){const r=e[n],o=lt("on-"+n);if(void 0===dt)return void console.warn("$listeners has not been set up");if(void 0!==dt.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),st(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function vt(e,t){return ct(mt(e),t)}function mt(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 y(e){return Object.keys(mt(e))}function ft(e,t){return st=e,dt=t,{getMouseEventHandlers:ct,getDefaultMouseEventHandlers:vt,getMouseEventName:mt,getRawMouseEvents:y}}const yt=["moved"];function ht(i,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=be();else{let e=$(d.value);const n=a>0,r=n?p:g,o=n?N:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),re(e);while(0===s.value[e.weekday])e=J(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,i.weekdays);break}re(e),w(e),oe(e),K(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const pt=/^on[A-Z]/;function gt(e=De.getCurrentInstance()){return{emitListeners:De.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{pt.test(e)&&(t[e]=!0)}),t})}}function wt(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[De.h("span",e)]}const kt=["change"];function Dt(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 _t(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const bt=_t().isKeyCode,Tt={useNavigation:Boolean};function St(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:l,direction:d,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&bt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&bt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=$(r.value);if("month"===u.value){if(e=J(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));d.value="prev",n.value=e.date}function g(){let e=$(r.value);if("month"===u.value){if(e=J(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));d.value="next",n.value=e.date}function w(){let e=$(r.value);d.value="prev";do{e=J(e,{day:-1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function k(){let e=$(r.value);d.value="next";do{e=J(e,{day:1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function D(){let e=$(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:-1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:-1}):"week"===u.value&&(e=J(e,{day:-7}));d.value="prev",n.value=e.date}function _(){let e=$(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:1}):"week"===u.value&&(e=J(e,{day:7}));d.value="next",n.value=e.date}function b(){let e=$(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}function T(){let e=$(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}return De.onBeforeUnmount(()=>{v()}),De.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var It=De.defineComponent({name:"QCalendarResource",props:{...ze,...tt,...et,...nt,...rt,...ot,...Tt},emits:["update:model-value","update:model-resources","resource-expanded",...kt,...yt,...y("-date"),...y("-interval"),...y("-head-day"),...y("-time"),...y("-head-resources"),...y("-resource")],setup(m,{slots:f,emit:v,expose:q}){const e=De.ref(null),L=De.ref(null),R=De.ref(null),t=De.ref(null),y=De.ref(null),a=De.ref(null),h=De.ref({}),p=De.ref({}),u=De.ref("next"),i=De.ref(be()),l=De.ref("0000-00-00"),d=De.ref(0),r=De.ref(m.modelValue),s=De.reactive({width:0,height:0}),g=De.ref(!1),w=De.ref(!1),k=De.ref(!1),H=De.ref(null),U=De.ref(null),n=(De.watch(()=>m.view,()=>{d.value=0}),De.computed(()=>{return"month"===m.view?"month-interval":m.view})),D=De.computed(()=>{return parseInt(m.cellWidth,10)}),o=De.getCurrentInstance();if(null===o)throw new Error("current instance is null");const _=gt(o).emitListeners,{times:c,setCurrent:Y,updateCurrent:b}=ut(m),{weekdaySkips:T,parsedStart:S,parsedEnd:B,dayStyleDefault:I}=(b(),Y(),Xe(m,{startDate:i,endDate:l,times:c})),N=De.computed(()=>{return Te(m.modelValue,c.now)||S.value||c.today}),V=(a.value=N.value,y.value=N.value.date,it(m,{parsedView:n,times:c,parsedValue:N})).renderValues,{rootRef:Z,__initCalendar:P,__renderCalendar:z}=Pe(m,ke,{scrollArea:e,pane:L}),{days:F,intervals:M,intervalFormatter:X,styleDefault:K,scrollToTimeX:$,timeDurationWidth:C,timeStartPosX:j,widthToMinutes:Q}=at(m,{weekdaySkips:T,times:c,scrollArea:e,parsedStart:S,parsedEnd:B,maxDays:d,size:s,headerColumnRef:t}),O=ht(m,{parsedView:n,parsedValue:N,weekdaySkips:T,direction:u,maxDays:d,times:c,emittedValue:r,emit:v}).move,E=ft(v,_).getDefaultMouseEventHandlers,J=Dt(v,{days:F,lastStart:H,lastEnd:U}).checkChange,G=_t().isKeyCode,ee=St(m,{rootRef:Z,focusRef:y,focusValue:a,datesRef:h,days:F,parsedView:n,parsedValue:N,emittedValue:r,weekdaySkips:T,direction:u,times:c}).tryFocus,A=De.computed(()=>{const e=parseInt(m.resourceHeight,10);return 0===e?"auto":e}),x=De.computed(()=>{return parseInt(m.resourceMinHeight,10)}),W=De.computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function te(){r.value=be()}function ae(e=1){O(e)}function ne(e=1){O(-e)}function re({width:e,height:t}){s.width=e,s.height=t}function oe(e){return e.date===r.value}function ue(){const e={height:Ie(W.value)};return De.h("div",{ref:R,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[ie(),le()])}function ie(){const e=f["head-resources"],t=Ie(W.value),a={timestamps:M,date:m.modelValue,resources:m.modelResources};return De.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...E("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function le(){return De.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[M.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const a=f["interval-label"],n=!0!==m.noActiveDate&&oe(e),r=Ie(D.value),o=Ie(W.value),u=m.shortIntervalLabel,i=X.value(e,u),l={timestamp:e,index:t,label:i},d=(l.droppable=g.value===i,m.intervalStyle||I),s={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:l})},c="function"===typeof m.intervalClass?m.intervalClass({scope:l}):{},v=!0===m.focusable&&m.focusType.includes("interval");return De.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:s,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",l)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",l)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",l)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",l)?g.value=i:g.value="")},onFocus:()=>{!0===v&&(y.value=i)},...E("-interval",e=>{return{scope:l,event:e}})},[a?a({scope:l}):i,wt()])}function se(){return De.h("div",{class:"q-calendar-resource__body"},[ce()])}function ce(){return De.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function ve(){return De.h("div",{},"No resources have been defined")}function me(){return De.h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===m.modelResources&&ve(),void 0!==m.modelResources&&fe()])}function fe(){const e={class:"q-calendar-resource__resources--body"};return De.h("div",e,ye())}function ye(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={},o=(r.height="auto"===A.value?A.value:Ie(A.value),x.value>0&&(r.minHeight=Ie(x.value)),De.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[pe(e,t,a,n),ge(e,t)]));return void 0!==e.children?[o,De.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ye(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function pe(t,e,a=0,n=!0){const r=f["resource-label"],o={},u=(o.height=void 0!==t.height?Ie(parseInt(t.height,10)):A.value?Ie(A.value):"auto",x.value>0&&(o.minHeight=Ie(x.value)),m.resourceStyle||K),i=t[m.resourceLabel],l=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:M,resourceIndex:e,indentLevel:a,label:i},s=t[m.resourceKey],c=(d.droppable=w.value===s,"function"===typeof m.resourceClass?m.resourceClass({scope:d}):{});return De.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{p.value[t[m.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",d)?w.value=s:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",d)?w.value=s:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",d)?w.value=s:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",d)?w.value=s:w.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==_.value.onClickResource&&v("click-resource",{scope:d,event:e})},...E("-resource",e=>{return{scope:d,event:e}})},[[De.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,v("resource-expanded",{expanded:t.expanded,scope:d})}}),De.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):i]),wt()]])}function ge(t,a){const e=f["resource-intervals"],n={resource:t,timestamps:M,resourceIndex:a,timeStartPosX:j,timeDurationWidth:C};return De.h("div",{class:"q-calendar-resource__resource--intervals"},[M.value.map(e=>e.map(e=>we(t,e,a))),e&&e({scope:n})])}function we(t,e,a){const n=f["resource-interval"],r=!0!==m.noActiveDate&&oe(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u,l=(o.droppable=k.value===i,!0===m.focusable&&m.focusType.includes("time")),d=m.intervalStyle||I,s=Ie(D.value),c={width:s,maxWidth:s,minWidth:s,...d({scope:o})};return c.height=void 0!==t.height?Ie(parseInt(t.height,10)):A.value>0?Ie(A.value):"auto",x.value>0&&(c.minHeight=Ie(x.value)),De.h("div",{key:i,ref:e=>{h.value[t[m.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?k.value=i:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?k.value=i:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?k.value=i:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?k.value=i:k.value="")},onFocus:()=>{!0===l&&(y.value=i)},...E("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),wt()])}function ke(){const{start:e,end:t,maxDays:a}=V.value,n=(i.value===e.date&&l.value===t.date&&d.value===a||(i.value=e.date,l.value=t.date,d.value=a),s.width>0),r=De.withDirectives(De.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&se()]),[[Ze,re]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return De.h(De.Transition,{name:o,appear:!0},()=>r)}}return De.watch([F],J,{deep:!0,immediate:!0}),De.watch(()=>m.modelValue,(e,t)=>{if(r.value!==e){if(!0===m.animated){const a=Se(_e(e)),n=Se(_e(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),De.watch(r,(e,t)=>{if(r.value!==m.modelValue){if(!0===m.animated){const a=Se(_e(e)),n=Se(_e(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),De.watch(y,e=>{e&&(a.value=Te(e))}),De.watch(a,()=>{h.value[y.value]?h.value[y.value].focus():ee()}),De.onBeforeUpdate(()=>{h.value={},p.value={}}),De.onMounted(()=>{P()}),q({prev:ne,next:ae,move:O,moveToToday:te,updateCurrent:b,timeStartPosX:j,timeDurationWidth:C,widthToMinutes:Q,scrollToTimeX:$}),()=>z()}});const Nt="4.0.1";Ue={version:Nt,QCalendarResource:It,...Ue,...Ve,install(e){e.component(It.name,It)}};return Ue});
(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.QCalendarResource=t(e.Vue))})(this,function(De){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,D=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,_=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,N=31,i=12,n=1,h=1,o=7,r=60,u=24,F=0,M=6e4,C=36e5,O=864e5,E=6048e5,A=60,x=3600,W=86400,q=604800,L={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},R={hour:0,minute:0};function H(e){return!!a.exec(e)}function _e(e){const t=a.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 U(e,t=!1){const a=t?"UTC":"";return w({date:l(e[`get${a}FullYear`](),4)+"-"+l(e[`get${a}Month`]()+1,2)+"-"+l(e[`get${a}Date`](),2),time:l(e[`get${a}Hours`]()||0,2)+":"+l(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 l(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function Y(e){return 1===(e%4===0^e%100===0^e%400===0)}function d(e,t){return(Y(e)?b:_)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>d(e.year,e.month)&&(e.day=h,++e.month,e.month>i)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=i),e.day=d(e.year,e.month)),e}function be(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,l(t,2),l(a,2)].join("-")}function B(e){return e===be()}function P(e,t,a){let n=$(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=K(n,a,n.hasTime)),n}function z(e,t,a){let n=$(e);const r=d(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],p),n=w(n),a&&(n=K(n,a,n.hasTime)),n}function S(e){const t=$(e);return t.day=h,w(t),t}function I(e){const t=$(e);return t.day=d(t.year,t.month),w(t),t}function G(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=D.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Z(e,t){return c(e)===c(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return j(e)===j(t)}function Te(e,t){let a=_e(e);return null===a?null:(a=w(a),t&&K(a,t,a.hasTime),a)}function Se(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function X(e){return Se(e)+s(e)}function ae(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 K(e,t,a=!1){let n=Se(t),r=Se(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&K(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=le(e),e}function ue(e){return e.workweek=de(e),e}function ie(e,t,a,n,r){const o=Se(e);if(void 0!==t){const l=Se(_e(t));o<=l&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=Se(_e(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=_e(r[i][0]),c=_e(r[i][1]);if(we(e,s,c)){e.disabled=!0;break}}else{const v=Se(Te(r[i]+" 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=se(e),e.doy=le(e),e.workweek=de(e),e}function le(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 de(e){0===e.year&&(e=Te(be()));const t=ye(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)/E);return 1+Math.floor(o)}function se(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%i+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function $(e){return{...e}}function c(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function v(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function j(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ve(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 me(e,t,a,n,r,o,u=[],i=[],l=42,d=0){const s=Se(t),c=[];let v=$(e),m=0,f=m===s;if(!(s<Se(e)))while((!f||c.length<d)&&c.length<l){if(m=Se(v),f=f||m>s&&c.length>=d,f)break;if(0===n[v.weekday]);else{const y=$(v);w(y),K(y,a),ie(y,r,o,u,i),c.push(y)}v=k(v,p)}return c}function fe(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=$(t);u.push(ne(l,i,o))}return u}function Q(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+j(t)),o}}}function ye(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 he(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 e(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?X:Se;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ge(e,t=!1){const a=!0===t?X:Se;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function we(e,t,a,n){const r=Se(e)+(!0===n?s(e):0),o=Se(t)+(!0===n?s(t):0),u=Se(a)+(!0===n?s(a):0);return r>=o&&r<=u}function ke(e,t,a,n){const r=Se(e),o=Se(t),u=Se(a),i=Se(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function J(e,t){const n=$(e);let r;return Fe(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Ne.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ee(n,Ne[r]),w(n),n}const Ne=["minute","hour","day","month"];function Fe(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Me(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Ce(e)}return e}function Ce(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Oe(e)}return e}function Oe(t){f(t);let a=d(t.year,t.month);if(t.day>a){++t.month,t.month>i&&f(t);let e=t.day-a;a=d(t.year,t.month);do{e>a&&(++t.month,t.month>i&&f(t),e-=a,a=d(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&&f(t),a=d(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=d(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>i){const t=Math.floor(e.month/i);e.month=e.month%i,e.year+=t}else e.month<n&&(e.month+=i,--e.year);return e}function Ee(e,t){switch(t){case"minute":return Me(e);case"hour":return Ce(e);case"day":return Oe(e);case"month":return f(e)}}function Ae(e,t){const a=ae(e,t,!0);return Math.floor(a/O)}function xe(e,t){let a=$(e),n=$(t);return a=m(a,0),n=m(n,6),Math.ceil(Ae(a,n)/o)}const We={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 qe(){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(We[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Le(t,a){const e=Object.keys(We),n=qe();return e.map(e=>n(e,t,a))}function Re(){const o=(e,t)=>"",u={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,u[e]||u["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 He(t,a){const n=Re();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ue={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:D,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:N,MONTH_MAX:i,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:F,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:C,MILLISECONDS_IN_DAY:O,MILLISECONDS_IN_WEEK:E,Timestamp:L,TimeObject:R,today:be,getStartOfWeek:P,getEndOfWeek:z,getStartOfMonth:S,getEndOfMonth:I,parseTime:G,validateTimestamp:H,parsed:_e,parseTimestamp:Te,parseDate:U,getDayIdentifier:Se,getTimeIdentifier:s,getDayTimeIdentifier:X,diffTimestamp:ae,updateRelative:K,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:ue,updateDisabled:ie,updateFormatted:w,getDayOfYear:le,getWorkWeek:de,getWeekday:se,isLeapYear:Y,daysInMonth:d,copyTimestamp:$,padNumber:l,getDate:c,getTime:v,getDateTime:j,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ve,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,makeDate:ye,makeDateTime:he,validateNumber:e,isBetweenDates:we,isOverlappingDates:ke,daysBetween:Ae,weeksBetween:xe,addToDate:J,compareTimestamps:V,compareDate:Z,compareTime:ee,compareDateTime:te,getWeekdayFormatter:qe,getWeekdayNames:Le,getMonthFormatter:Re,getMonthNames:He},Ue=Object.freeze({__proto__:null,DAYS_IN_MONTH:_,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:F,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:O,MILLISECONDS_IN_HOUR:C,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:E,MINUTES_IN_HOUR:r,MONTH_MAX:i,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:D,SECONDS_IN_DAY:W,SECONDS_IN_HOUR:x,SECONDS_IN_MINUTE:A,SECONDS_IN_WEEK:q,TimeObject:R,Timestamp:L,addToDate:J,compareDate:Z,compareDateTime:te,compareTime:ee,compareTimestamps:V,copyTimestamp:$,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,daysBetween:Ae,daysInMonth:d,default:Ue,diffTimestamp:ae,findWeekday:m,getDate:c,getDateTime:j,getDayIdentifier:Se,getDayOfYear:le,getDayTimeIdentifier:X,getEndOfMonth:I,getEndOfWeek:z,getMonthFormatter:Re,getMonthNames:He,getStartOfMonth:S,getStartOfWeek:P,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:qe,getWeekdayNames:Le,getWeekdaySkips:ve,getWorkWeek:de,isBetweenDates:we,isLeapYear:Y,isOverlappingDates:ke,isToday:B,makeDate:ye,makeDateTime:he,maxTimestamp:pe,minTimestamp:ge,moveRelativeDays:ce,nextDay:p,padNumber:l,parseDate:U,parseTime:G,parseTimestamp:Te,parsed:_e,prevDay:g,relativeDays:k,today:be,updateDayOfYear:oe,updateDisabled:ie,updateFormatted:w,updateMinutes:ne,updateRelative:K,updateWeekday:re,updateWorkWeek:ue,validateNumber:e,validateTimestamp:H,weeksBetween:xe});function Ie(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Be(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Ie,indexOf:Ye},Ve=Object.freeze({__proto__:null,convertToUnit:Ie,default:Ve,indexOf:Ye,minCharWidth:Be}),Ze={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=De.reactive({width:0,height:0}),o=De.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=De.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return De.withDirectives(De.h("div",{...e},[a()]),[[Ze,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const ze={modelValue:{type:String,default:be(),validator:e=>""===e||H(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function Xe(t,{startDate:e,endDate:a,times:n}){const r=De.computed(()=>ve(t.weekdays)),o=De.computed(()=>Te(e.value)),u=De.computed(()=>{return"0000-00-00"===a.value?f(o.value):Te(a.value)}),i=De.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return Q(t.locale,()=>e)}),l=De.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return Q(t.locale,(e,t)=>t?n:a)}),d=De.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return Q(t.locale,()=>e)});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=Se(t),r=Se(_e(e[0])),o=Se(_e(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:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return P(e,t.weekdays,n.today)}function f(e){return z(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function Ke(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function $e(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function je(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Qe(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=je(n);o<=0?i!==r&&Ke(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;Ke(n,a),a!==r&&Je(n,r,o-t,e)})}function Ge(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=Qe(n);o<=0?i!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Ge(n,r,o-t,e)})}const et={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},tt={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:e},noSticky:Boolean};function at(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:l}){const d=De.computed(()=>parseInt(t.intervalStart,10)),v=De.computed(()=>parseInt(t.intervalMinutes,10)),s=De.computed(()=>parseInt(t.intervalCount,10)),m=De.computed(()=>parseFloat(t.intervalHeight)),f=De.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=De.computed(()=>d.value*v.value),y=De.computed(()=>s.value*m.value),h=De.computed(()=>s.value*f.value),p=De.computed(()=>D(r.value)),g=De.computed(()=>_(o.value)),w=De.computed(()=>{return me(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=De.computed(()=>{return w.value.map(e=>fe(e,d.value,v.value,s.value,a.now))});function D(e){return P(e,t.weekdays,a.today)}function _(e){return z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(j(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=X(t),r=X(_e(e[0])),o=X(_e(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function S(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const N=De.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return Q(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),F=De.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function O(e){}function q(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function R(e,t,a=!1,n=void 0){let r=$(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&K(r,n,!0),r}function H(e,t){const a={timestamp:e};return a.timeStartPos=x,a.timeDurationHeight=E,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:$(e)};return a.timeStartPosX=W,a.timeDurationWidth=A,void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=x(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(Ge(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function A(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function Z(e){return parseInt(e,10)*v.value/f.value}function x(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function W(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:N,ariaDateTimeFormatter:F,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:S,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:C,styleDefault:O,getTimestampAtEventInterval:q,getTimestampAtEvent:L,getTimestampAtEventX:R,getScopeForSlot:H,getScopeForSlotX:U,scrollToTime:Y,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:A,heightToMinutes:V,widthToMinutes:Z,timeStartPos:x,timeStartPosX:W}}const nt={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},rt={maxDays:{type:Number,default:1}},ot={now:{type:String,validator:e=>""===e||H(e),default:""}};function ut(e){const t=De.reactive({now:Te("0000-00-00 00:00"),today:Te("0000-00-00")}),a=De.computed(()=>e.now?Te(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return De.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function it(r,{parsedView:o,parsedValue:u,times:i}){const e=De.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=S(e),n=I(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,i.today),n=z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ce($(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=I(e),w(n),t=d(a.year,a.month);break;case"resource":t=1,n=ce($(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const lt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function dt(a,e,t,n){const r={};for(const o in t){const u=t[o],i=lt("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(d):r[l]=[r[l],d]:r[l]=d}}return r}function st(e,t,a,n){return dt(e,t,ct(a),n)}function ct(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 y(e){return Object.keys(ct(e))}function vt(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return dt(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return st(a,n,e,t)},getMouseEventName:ct,getRawMouseEvents:y}}const mt=["moved"];function ft(i,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=be();else{let e=$(d.value);const n=a>0,r=n?p:g,o=n?N:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),re(e);while(0===s.value[e.weekday])e=J(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,i.weekdays);break}re(e),w(e),oe(e),K(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const yt=/^on[A-Z]/;function ht(e=De.getCurrentInstance()){return{emitListeners:De.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{yt.test(e)&&(t[e]=!0)}),t})}}function pt(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[De.h("span",e)]}const gt=["change"];function wt(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 kt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const Dt=kt().isKeyCode,_t={useNavigation:Boolean};function bt(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:l,direction:d,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&Dt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&Dt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=$(r.value);if("month"===u.value){if(e=J(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));d.value="prev",n.value=e.date}function g(){let e=$(r.value);if("month"===u.value){if(e=J(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));d.value="next",n.value=e.date}function w(){let e=$(r.value);d.value="prev";do{e=J(e,{day:-1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function k(){let e=$(r.value);d.value="next";do{e=J(e,{day:1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function D(){let e=$(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:-1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:-1}):"week"===u.value&&(e=J(e,{day:-7}));d.value="prev",n.value=e.date}function _(){let e=$(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:1}):"week"===u.value&&(e=J(e,{day:7}));d.value="next",n.value=e.date}function b(){let e=$(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}function T(){let e=$(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=z(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}return De.onBeforeUnmount(()=>{v()}),De.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var Tt=De.defineComponent({name:"QCalendarResource",props:{...ze,...tt,...et,...nt,...rt,...ot,..._t},emits:["update:model-value","update:model-resources","resource-expanded",...gt,...mt,...y("-date"),...y("-interval"),...y("-head-day"),...y("-time"),...y("-head-resources"),...y("-resource")],setup(m,{slots:f,emit:v,expose:q}){const e=De.ref(null),L=De.ref(null),R=De.ref(null),t=De.ref(null),y=De.ref(null),a=De.ref(null),h=De.ref({}),p=De.ref({}),u=De.ref("next"),i=De.ref(be()),l=De.ref("0000-00-00"),d=De.ref(0),r=De.ref(m.modelValue),s=De.reactive({width:0,height:0}),g=De.ref(!1),w=De.ref(!1),k=De.ref(!1),H=De.ref(null),U=De.ref(null),n=(De.watch(()=>m.view,()=>{d.value=0}),De.computed(()=>{return"month"===m.view?"month-interval":m.view})),D=De.computed(()=>{return parseInt(m.cellWidth,10)}),o=De.getCurrentInstance();if(null===o)throw new Error("current instance is null");const _=ht(o).emitListeners,{times:c,setCurrent:Y,updateCurrent:b}=ut(m),{weekdaySkips:T,parsedStart:S,parsedEnd:B,dayStyleDefault:I}=(b(),Y(),Xe(m,{startDate:i,endDate:l,times:c})),N=De.computed(()=>{return Te(m.modelValue,c.now)||S.value||c.today}),V=(a.value=N.value,y.value=N.value.date,it(m,{parsedView:n,times:c,parsedValue:N})).renderValues,{rootRef:Z,__initCalendar:P,__renderCalendar:z}=Pe(m,ke,{scrollArea:e,pane:L}),{days:F,intervals:M,intervalFormatter:X,styleDefault:K,scrollToTimeX:$,timeDurationWidth:C,timeStartPosX:j,widthToMinutes:Q}=at(m,{weekdaySkips:T,times:c,scrollArea:e,parsedStart:S,parsedEnd:B,maxDays:d,size:s,headerColumnRef:t}),O=ft(m,{parsedView:n,parsedValue:N,weekdaySkips:T,direction:u,maxDays:d,times:c,emittedValue:r,emit:v}).move,E=vt(v,_).getDefaultMouseEventHandlers,J=wt(v,{days:F,lastStart:H,lastEnd:U}).checkChange,G=kt().isKeyCode,ee=bt(m,{rootRef:Z,focusRef:y,focusValue:a,datesRef:h,days:F,parsedView:n,parsedValue:N,emittedValue:r,weekdaySkips:T,direction:u,times:c}).tryFocus,A=De.computed(()=>{const e=parseInt(m.resourceHeight,10);return 0===e?"auto":e}),x=De.computed(()=>{return parseInt(m.resourceMinHeight,10)}),W=De.computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function te(){r.value=be()}function ae(e=1){O(e)}function ne(e=1){O(-e)}function re({width:e,height:t}){s.width=e,s.height=t}function oe(e){return e.date===r.value}function ue(){const e={height:Ie(W.value)};return De.h("div",{ref:R,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[ie(),le()])}function ie(){const e=f["head-resources"],t=Ie(W.value),a={timestamps:M,date:m.modelValue,resources:m.modelResources};return De.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...E("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function le(){return De.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[M.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const a=f["interval-label"],n=!0!==m.noActiveDate&&oe(e),r=Ie(D.value),o=Ie(W.value),u=m.shortIntervalLabel,i=X.value(e,u),l={timestamp:e,index:t,label:i},d=(l.droppable=g.value===i,m.intervalStyle||I),s={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:l})},c="function"===typeof m.intervalClass?m.intervalClass({scope:l}):{},v=!0===m.focusable&&m.focusType.includes("interval");return De.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:s,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",l)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",l)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",l)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",l)?g.value=i:g.value="")},onFocus:()=>{!0===v&&(y.value=i)},...E("-interval",e=>{return{scope:l,event:e}})},[a?a({scope:l}):i,pt()])}function se(){return De.h("div",{class:"q-calendar-resource__body"},[ce()])}function ce(){return De.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function ve(){return De.h("div",{},"No resources have been defined")}function me(){return De.h("div",{class:"q-calendar-resource__day--container"},[ue(),void 0===m.modelResources&&ve(),void 0!==m.modelResources&&fe()])}function fe(){const e={class:"q-calendar-resource__resources--body"};return De.h("div",e,ye())}function ye(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={},o=(r.height="auto"===A.value?A.value:Ie(A.value),x.value>0&&(r.minHeight=Ie(x.value)),De.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[pe(e,t,a,n),ge(e,t)]));return void 0!==e.children?[o,De.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ye(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function pe(t,e,a=0,n=!0){const r=f["resource-label"],o={},u=(o.height=void 0!==t.height?Ie(parseInt(t.height,10)):A.value?Ie(A.value):"auto",x.value>0&&(o.minHeight=Ie(x.value)),m.resourceStyle||K),i=t[m.resourceLabel],l=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:M,resourceIndex:e,indentLevel:a,label:i},s=t[m.resourceKey],c=(d.droppable=w.value===s,"function"===typeof m.resourceClass?m.resourceClass({scope:d}):{});return De.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{p.value[t[m.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",d)?w.value=s:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",d)?w.value=s:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",d)?w.value=s:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",d)?w.value=s:w.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==_.value.onClickResource&&v("click-resource",{scope:d,event:e})},...E("-resource",e=>{return{scope:d,event:e}})},[[De.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,v("resource-expanded",{expanded:t.expanded,scope:d})}}),De.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):i]),pt()]])}function ge(t,a){const e=f["resource-intervals"],n={resource:t,timestamps:M,resourceIndex:a,timeStartPosX:j,timeDurationWidth:C};return De.h("div",{class:"q-calendar-resource__resource--intervals"},[M.value.map(e=>e.map(e=>we(t,e,a))),e&&e({scope:n})])}function we(t,e,a){const n=f["resource-interval"],r=!0!==m.noActiveDate&&oe(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u,l=(o.droppable=k.value===i,!0===m.focusable&&m.focusType.includes("time")),d=m.intervalStyle||I,s=Ie(D.value),c={width:s,maxWidth:s,minWidth:s,...d({scope:o})};return c.height=void 0!==t.height?Ie(parseInt(t.height,10)):A.value>0?Ie(A.value):"auto",x.value>0&&(c.minHeight=Ie(x.value)),De.h("div",{key:i,ref:e=>{h.value[t[m.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?k.value=i:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?k.value=i:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?k.value=i:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?k.value=i:k.value="")},onFocus:()=>{!0===l&&(y.value=i)},...E("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),pt()])}function ke(){const{start:e,end:t,maxDays:a}=V.value,n=(i.value===e.date&&l.value===t.date&&d.value===a||(i.value=e.date,l.value=t.date,d.value=a),s.width>0),r=De.withDirectives(De.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&se()]),[[Ze,re]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return De.h(De.Transition,{name:o,appear:!0},()=>r)}}return De.watch([F],J,{deep:!0,immediate:!0}),De.watch(()=>m.modelValue,(e,t)=>{if(r.value!==e){if(!0===m.animated){const a=Se(_e(e)),n=Se(_e(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),De.watch(r,(e,t)=>{if(r.value!==m.modelValue){if(!0===m.animated){const a=Se(_e(e)),n=Se(_e(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),De.watch(y,e=>{e&&(a.value=Te(e))}),De.watch(a,()=>{h.value[y.value]?h.value[y.value].focus():ee()}),De.onBeforeUpdate(()=>{h.value={},p.value={}}),De.onMounted(()=>{P()}),q({prev:ne,next:ae,move:O,moveToToday:te,updateCurrent:b,timeStartPosX:j,timeDurationWidth:C,widthToMinutes:Q,scrollToTimeX:$}),()=>z()}});const St="4.0.2";Ue={version:St,QCalendarResource:Tt,...Ue,...Ve,install(e){e.component(Tt.name,Tt)}};return Ue});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const s=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),l=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),p=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>s.value*m.value),y=vue.computed(()=>l.value*v.value),f=vue.computed(()=>l.value*p.value),h=vue.computed(()=>T(r.value)),g=vue.computed(()=>I(o.value)),D=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),_=vue.computed(()=>{return D.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:h,emit:g,expose:R}){const e=vue.ref(null),L=vue.ref(null),x=vue.ref(null),v=vue.ref(null),t=vue.ref(null),p=vue.ref({}),U=vue.ref({}),a=vue.ref({}),n=vue.ref({}),i=vue.ref("next"),d=vue.ref(f.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),D=vue.ref(f.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(!1),_=vue.ref(!1),Y=vue.ref(null),q=vue.ref(null),r=(vue.watch(()=>f.view,()=>{l.value=0}),vue.computed(()=>{return"month"===f.view?"month-interval":f.view})),P=vue.getCurrentInstance();if(null===P)throw new Error("current instance is null");const T=useEmitListeners(P).emitListeners,I=useCellWidth(f).isSticky,{times:o,setCurrent:B,updateCurrent:z}=useTimes(f),{weekdaySkips:u,parsedStart:K,parsedEnd:V,dayFormatter:$,weekdayFormatter:X,ariaDateFormatter:Z,dayStyleDefault:j,getRelativeClasses:k}=(z(),B(),useCommon(f,{startDate:d,endDate:s,times:o})),w=vue.computed(()=>{return parseTimestamp(f.modelValue,o.now)||K.value||o.today}),Q=(t.value=w.value,v.value=w.value.date,useRenderValues(f,{parsedView:r,parsedValue:w,times:o})).renderValues,{rootRef:m,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=useCalendar(f,Fe,{scrollArea:e,pane:L}),{days:N,parsedCellWidth:M,styleDefault:te}=useInterval(f,{weekdaySkips:u,times:o,scrollArea:e,parsedStart:K,parsedEnd:V,maxDays:l,size:c,headerColumnRef:x}),S=useMove(f,{parsedView:r,parsedValue:w,weekdaySkips:u,direction:i,maxDays:l,times:o,emittedValue:D,emit:g}).move,E=useMouse(g,T).getDefaultMouseEventHandlers,ae=useCheckChange(g,{days:N,lastStart:Y,lastEnd:q}).checkChange,b=useEvents().isKeyCode,ne=useKeyboard(f,{rootRef:m,focusRef:v,focusValue:t,datesRef:p,days:N,parsedView:r,parsedValue:w,emittedValue:D,weekdaySkips:u,direction:i,times:o}).tryFocus,O=vue.computed(()=>{return"day"===r.value&&parseInt(f.columnCount,10)>1?parseInt(f.columnCount,10):"day"===r.value&&f.maxDays&&f.maxDays>1?f.maxDays:N.value.length}),re=vue.computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),A=vue.computed(()=>{const e=parseInt(f.resourceHeight,10);return 0===e?"auto":e}),oe=vue.computed(()=>{return parseInt(f.resourceMinHeight,10)}),C=vue.computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&re.value&&O.value)return(e-J.value-re.value)/O.value+"px"}return 100/O.value+"%"});function ue(){D.value=today()}function ie(e=1){S(e)}function de(e=1){S(-e)}function se({width:e,height:t}){c.width=e,c.height=t}function W(e){return e.date===D.value}function le(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:J.value+"px"}},[ce(),me()])}function ce(){const e=h["head-resources"],t={days:N.value,timestamps:N.value,date:f.modelValue,resources:f.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===I.value},...E("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function me(){return vue.h("div",{ref:x,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),pe()])}function ve(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=h["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:N.value,days:N.value,ref:n}})]),...fe()])}function ye(){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>he(N.value[0],e)):N.value.map(e=>he(e))}function fe(){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>De(N.value[0],e)):N.value.map(e=>De(e))}function he(t,e){const a=h["head-day"],n=h["head-date"],r=!0!==f.noActiveDate&&W(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(t.weekday)},u=(void 0!==e&&(o.columnIndex=e),!0===I.value?convertToUnit(M.value):C.value),i=f.weekdayStyle||j,d={width:u,maxWidth:u,minWidth:u,...i({scope:o})},s=(!0===I.value&&(d.minWidth=u),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&b(e,[13,32])&&(D.value=t.date)},...E("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ie(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&ke(t,e),useFocusHelper()])}function ge(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&H(e),!0!==f.noDefaultHeaderBtn&&F(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&H(e),!0!==f.noDefaultHeaderBtn&&F(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&F(e),!0!==f.noDefaultHeaderText&&H(e)])):void 0}function De(e,t){const a=h["head-day-event"],n=!0!==f.noActiveDate&&W(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===I.value?convertToUnit(M.value):C.value),u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...k(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function H(e){const t=h["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||_e(e,a))}function _e(e,t){const a=X.value(e,t||f.weekdayBreakpoints[0]>0&&M.value<=f.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&M.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function F(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==f.noActiveDate&&W(a),t=$.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&b(e,[13,32])&&(D.value=a.date,void 0!==T.value.onClickDate)&&g("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):useButton(f,u,n?n({scope:o}):t)}function Ie(e,t){const a=h["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function ke(e,t){const a=h["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function we(){return vue.h("div",{class:"q-calendar-scheduler__body"},[Ne()])}function Ne(){return!0===I.value?vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==I.value&&Ae(),Se()]):!0===f.noScroll?Me():vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Me()])}function Me(){return vue.h("div",{ref:L,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===I.value&&!0!==f.noHeader&&le(),Ee()])}function Ee(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return be(e,t,a,void 0!==e.children?e.expanded:n)})}function be(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):A.value?convertToUnit(A.value):"auto",oe.value>0&&(r.minHeight=convertToUnit(oe.value)),vue.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Oe(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ee(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Oe(t,e,a=0,n=!0){const r=h["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):A.value?convertToUnit(A.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),f.resourceStyle||te),i=t[f.resourceLabel],d=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:N.value,days:N.value,resourceIndex:e,indentLevel:a,label:i},l=t[f.resourceKey],c=(s.droppable=_.value===l,"function"===typeof f.resourceClass?f.resourceClass({scope:s}):{});return vue.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{U.value[t[f.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===I.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?_.value=l:_.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?_.value=l:_.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?_.value=l:_.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?_.value=l:_.value="")},onKeydown:e=>{b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{b(e,[13,32])&&void 0!==T.value.onClickResource&&g("click-resource",{scope:s,event:e})},...E("-resource",e=>{return{scope:s,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:s})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):i]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=h["resource-days"],o=!0===I.value?convertToUnit(M.value):C.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:N.value,days:N.value},i={},d=(i.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:i});return vue.h("div",d,[...Ce(e,t,a,n),r&&r({scope:u})])}function Ce(t,a,n=0,r=!0){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>We(N.value[0],e,t,a,n,r)):N.value.map(e=>We(e,void 0,t,a,n,r))}function We(e,t,a,n,r=0,o=!0){const u=h.day,i=f.dayStyle||j,d=!0!==f.noActiveDate&&w.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=_.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===I.value?convertToUnit(M.value):C.value,v={width:m,maxWidth:m,...i({scope:c})},p=(v.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(v.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...k(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?_.value=s:_.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?_.value=s:_.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?_.value=s:_.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?_.value=s:_.value="")},onKeydown:e=>{b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{b(e,[13,32])&&(D.value=c.timestamp.date,void 0!==T.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...E("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function He(){return vue.h("div",{},"No resources have been defined")}function Fe(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==I.value&&!0!==f.noHeader&&le(),!0===n&&!0===r&&we(),!1===r&&He()]),[[ResizeObserver$1,se]]);if(!0!==f.animated)return o;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>o)}}return vue.watch([N],ae,{deep:!0,immediate:!0}),vue.watch(()=>f.modelValue,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}D.value=e}v.value=e}),vue.watch(D,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(v,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{p.value[v.value]?p.value[v.value].focus():ne()}),vue.watch(()=>f.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={},a.value={},n.value={},U.value={}}),vue.onMounted(()=>{G()}),R({prev:de,next:ie,move:S,moveToToday:ue,updateCurrent:z}),()=>ee()}});const version="4.0.1";exports.QCalendarScheduler=QCalendarScheduler,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",u={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,u[e]||u["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u,a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:i,headerColumnRef:d}){const s=vue.computed(()=>parseInt(t.intervalStart,10)),m=vue.computed(()=>parseInt(t.intervalMinutes,10)),l=vue.computed(()=>parseInt(t.intervalCount,10)),v=vue.computed(()=>parseFloat(t.intervalHeight)),p=vue.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:i.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=vue.computed(()=>s.value*m.value),y=vue.computed(()=>l.value*v.value),f=vue.computed(()=>l.value*p.value),h=vue.computed(()=>T(r.value)),g=vue.computed(()=>I(o.value)),D=vue.computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),_=vue.computed(()=>{return D.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const u=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===u.value)return void(i.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:-1}):"week"===u.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===u.value||"month-interval"===u.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===u.value?e=addToDate(e,{day:1}):"week"===u.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getStartOfMonth(e):"week"===u.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===u.value||"month-interval"===u.value?e=getEndOfMonth(e):"week"===u.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:h,emit:g,expose:R}){const e=vue.ref(null),L=vue.ref(null),x=vue.ref(null),v=vue.ref(null),t=vue.ref(null),p=vue.ref({}),U=vue.ref({}),a=vue.ref({}),n=vue.ref({}),i=vue.ref("next"),d=vue.ref(f.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),D=vue.ref(f.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(!1),_=vue.ref(!1),Y=vue.ref(null),q=vue.ref(null),r=(vue.watch(()=>f.view,()=>{l.value=0}),vue.computed(()=>{return"month"===f.view?"month-interval":f.view})),P=vue.getCurrentInstance();if(null===P)throw new Error("current instance is null");const T=useEmitListeners(P).emitListeners,I=useCellWidth(f).isSticky,{times:o,setCurrent:B,updateCurrent:z}=useTimes(f),{weekdaySkips:u,parsedStart:K,parsedEnd:V,dayFormatter:X,weekdayFormatter:$,ariaDateFormatter:Z,dayStyleDefault:j,getRelativeClasses:k}=(z(),B(),useCommon(f,{startDate:d,endDate:s,times:o})),w=vue.computed(()=>{return parseTimestamp(f.modelValue,o.now)||K.value||o.today}),Q=(t.value=w.value,v.value=w.value.date,useRenderValues(f,{parsedView:r,parsedValue:w,times:o})).renderValues,{rootRef:m,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=useCalendar(f,Fe,{scrollArea:e,pane:L}),{days:N,parsedCellWidth:M,styleDefault:te}=useInterval(f,{weekdaySkips:u,times:o,scrollArea:e,parsedStart:K,parsedEnd:V,maxDays:l,size:c,headerColumnRef:x}),S=useMove(f,{parsedView:r,parsedValue:w,weekdaySkips:u,direction:i,maxDays:l,times:o,emittedValue:D,emit:g}).move,E=useMouse(g,T).getDefaultMouseEventHandlers,ae=useCheckChange(g,{days:N,lastStart:Y,lastEnd:q}).checkChange,b=useEvents().isKeyCode,ne=useKeyboard(f,{rootRef:m,focusRef:v,focusValue:t,datesRef:p,days:N,parsedView:r,parsedValue:w,emittedValue:D,weekdaySkips:u,direction:i,times:o}).tryFocus,O=vue.computed(()=>{return"day"===r.value&&parseInt(f.columnCount,10)>1?parseInt(f.columnCount,10):"day"===r.value&&f.maxDays&&f.maxDays>1?f.maxDays:N.value.length}),re=vue.computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),A=vue.computed(()=>{const e=parseInt(f.resourceHeight,10);return 0===e?"auto":e}),oe=vue.computed(()=>{return parseInt(f.resourceMinHeight,10)}),C=vue.computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&re.value&&O.value)return(e-J.value-re.value)/O.value+"px"}return 100/O.value+"%"});function ue(){D.value=today()}function ie(e=1){S(e)}function de(e=1){S(-e)}function se({width:e,height:t}){c.width=e,c.height=t}function W(e){return e.date===D.value}function le(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:J.value+"px"}},[ce(),me()])}function ce(){const e=h["head-resources"],t={days:N.value,timestamps:N.value,date:f.modelValue,resources:f.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===I.value},...E("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function me(){return vue.h("div",{ref:x,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),pe()])}function ve(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=h["head-days-events"];return vue.nextTick(()=>{if(n.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:N.value,days:N.value,ref:n}})]),...fe()])}function ye(){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>he(N.value[0],e)):N.value.map(e=>he(e))}function fe(){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>De(N.value[0],e)):N.value.map(e=>De(e))}function he(t,e){const a=h["head-day"],n=h["head-date"],r=!0!==f.noActiveDate&&W(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(t.weekday)},u=(void 0!==e&&(o.columnIndex=e),!0===I.value?convertToUnit(M.value):C.value),i=f.weekdayStyle||j,d={width:u,maxWidth:u,minWidth:u,...i({scope:o})},s=(!0===I.value&&(d.minWidth=u),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&b(e,[13,32])&&(D.value=t.date)},...E("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&Ie(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&ke(t,e),useFocusHelper()])}function ge(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&H(e),!0!==f.noDefaultHeaderBtn&&F(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&H(e),!0!==f.noDefaultHeaderBtn&&F(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&F(e),!0!==f.noDefaultHeaderText&&H(e)])):void 0}function De(e,t){const a=h["head-day-event"],n=!0!==f.noActiveDate&&W(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===I.value?convertToUnit(M.value):C.value),u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...k(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function H(e){const t=h["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||_e(e,a))}function _e(e,t){const a=$.value(e,t||f.weekdayBreakpoints[0]>0&&M.value<=f.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&M.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function F(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==f.noActiveDate&&W(a),t=X.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&b(e,[13,32])&&(D.value=a.date,void 0!==T.value.onClickDate)&&g("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):useButton(f,u,n?n({scope:o}):t)}function Ie(e,t){const a=h["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function ke(e,t){const a=h["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function we(){return vue.h("div",{class:"q-calendar-scheduler__body"},[Ne()])}function Ne(){return!0===I.value?vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==I.value&&Ae(),Se()]):!0===f.noScroll?Me():vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Me()])}function Me(){return vue.h("div",{ref:L,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===I.value&&!0!==f.noHeader&&le(),Ee()])}function Ee(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return be(e,t,a,void 0!==e.children?e.expanded:n)})}function be(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):A.value?convertToUnit(A.value):"auto",oe.value>0&&(r.minHeight=convertToUnit(oe.value)),vue.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Oe(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ee(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Oe(t,e,a=0,n=!0){const r=h["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):A.value?convertToUnit(A.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),f.resourceStyle||te),i=t[f.resourceLabel],d=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:N.value,days:N.value,resourceIndex:e,indentLevel:a,label:i},l=t[f.resourceKey],c=(s.droppable=_.value===l,"function"===typeof f.resourceClass?f.resourceClass({scope:s}):{});return vue.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{U.value[t[f.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===I.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?_.value=l:_.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?_.value=l:_.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?_.value=l:_.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?_.value=l:_.value="")},onKeydown:e=>{b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{b(e,[13,32])&&void 0!==T.value.onClickResource&&g("click-resource",{scope:s,event:e})},...E("-resource",e=>{return{scope:s,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:s})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):i]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=h["resource-days"],o=!0===I.value?convertToUnit(M.value):C.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:N.value,days:N.value},i={},d=(i.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:i});return vue.h("div",d,[...Ce(e,t,a,n),r&&r({scope:u})])}function Ce(t,a,n=0,r=!0){return 1===N.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>We(N.value[0],e,t,a,n,r)):N.value.map(e=>We(e,void 0,t,a,n,r))}function We(e,t,a,n,r=0,o=!0){const u=h.day,i=f.dayStyle||j,d=!0!==f.noActiveDate&&w.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=_.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===I.value?convertToUnit(M.value):C.value,v={width:m,maxWidth:m,...i({scope:c})},p=(v.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(v.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...k(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?_.value=s:_.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?_.value=s:_.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?_.value=s:_.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?_.value=s:_.value="")},onKeydown:e=>{b(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{b(e,[13,32])&&(D.value=c.timestamp.date,void 0!==T.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...E("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function He(){return vue.h("div",{},"No resources have been defined")}function Fe(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==I.value&&!0!==f.noHeader&&le(),!0===n&&!0===r&&we(),!1===r&&He()]),[[ResizeObserver$1,se]]);if(!0!==f.animated)return o;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>o)}}return vue.watch([N],ae,{deep:!0,immediate:!0}),vue.watch(()=>f.modelValue,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}D.value=e}v.value=e}),vue.watch(D,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(v,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{p.value[v.value]?p.value[v.value].focus():ne()}),vue.watch(()=>f.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={},a.value={},n.value={},U.value={}}),vue.onMounted(()=>{G()}),R({prev:de,next:ie,move:S,moveToToday:ue,updateCurrent:z}),()=>ee()}});const version="4.0.2";exports.QCalendarScheduler=QCalendarScheduler,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,i,u),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),u=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:i,lastDay:u,betweenDays:d}=c(n,e);return{"q-past-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===d,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:d}){const s=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),l=computed(()=>parseInt(t.intervalCount,10)),v=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>s.value*m.value),y=computed(()=>l.value*v.value),f=computed(()=>l.value*p.value),h=computed(()=>T(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return D.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};i in t?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:D,expose:L}){const e=ref(null),x=ref(null),U=ref(null),v=ref(null),t=ref(null),p=ref({}),Y=ref({}),a=ref({}),n=ref({}),u=ref("next"),d=ref(f.modelValue||today()),s=ref("0000-00-00"),l=ref(0),_=ref(f.modelValue),c=reactive({width:0,height:0}),y=ref(!1),T=ref(!1),q=ref(null),P=ref(null),r=(watch(()=>f.view,()=>{l.value=0}),computed(()=>{return"month"===f.view?"month-interval":f.view})),B=getCurrentInstance();if(null===B)throw new Error("current instance is null");const I=useEmitListeners(B).emitListeners,k=useCellWidth(f).isSticky,{times:o,setCurrent:z,updateCurrent:K}=useTimes(f),{weekdaySkips:i,parsedStart:V,parsedEnd:$,dayFormatter:X,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:Q,getRelativeClasses:w}=(K(),z(),useCommon(f,{startDate:d,endDate:s,times:o})),N=computed(()=>{return parseTimestamp(f.modelValue,o.now)||V.value||o.today}),J=(t.value=N.value,v.value=N.value.date,useRenderValues(f,{parsedView:r,parsedValue:N,times:o})).renderValues,{rootRef:m,scrollWidth:G,__initCalendar:ee,__renderCalendar:te}=useCalendar(f,Re,{scrollArea:e,pane:x}),{days:M,parsedCellWidth:S,styleDefault:ae}=useInterval(f,{weekdaySkips:i,times:o,scrollArea:e,parsedStart:V,parsedEnd:$,maxDays:l,size:c,headerColumnRef:U}),E=useMove(f,{parsedView:r,parsedValue:N,weekdaySkips:i,direction:u,maxDays:l,times:o,emittedValue:_,emit:D}).move,b=useMouse(D,I).getDefaultMouseEventHandlers,ne=useCheckChange(D,{days:M,lastStart:q,lastEnd:P}).checkChange,O=useEvents().isKeyCode,re=useKeyboard(f,{rootRef:m,focusRef:v,focusValue:t,datesRef:p,days:M,parsedView:r,parsedValue:N,emittedValue:_,weekdaySkips:i,direction:u,times:o}).tryFocus,A=computed(()=>{return"day"===r.value&&parseInt(f.columnCount,10)>1?parseInt(f.columnCount,10):"day"===r.value&&f.maxDays&&f.maxDays>1?f.maxDays:M.value.length}),oe=computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),C=computed(()=>{const e=parseInt(f.resourceHeight,10);return 0===e?"auto":e}),ie=computed(()=>{return parseInt(f.resourceMinHeight,10)}),W=computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&oe.value&&A.value)return(e-G.value-oe.value)/A.value+"px"}return 100/A.value+"%"});function ue(){_.value=today()}function de(e=1){E(e)}function se(e=1){E(-e)}function le({width:e,height:t}){c.width=e,c.height=t}function H(e){return e.date===_.value}function ce(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:G.value+"px"}},[me(),ve()])}function me(){const e=g["head-resources"],t={days:M.value,timestamps:M.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===k.value},...b("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return h("div",{ref:U,class:{"q-calendar-scheduler__head--days__column":!0}},[pe(),ye()])}function pe(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...fe()])}function ye(){const e=g["head-days-events"];return nextTick(()=>{if(n.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:M.value,days:M.value,ref:n}})]),...he()])}function fe(){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>ge(M.value[0],e)):M.value.map(e=>ge(e))}function he(){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>_e(M.value[0],e)):M.value.map(e=>_e(e))}function ge(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&H(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(t.weekday)},i=(void 0!==e&&(o.columnIndex=e),!0===k.value?convertToUnit(S.value):W.value),u=f.weekdayStyle||Q,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===k.value&&(d.minWidth=i),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...w(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(_.value=t.date)},...b("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&De(t),void 0===a&&n&&n({scope:o}),void 0===a&&we(t,e),useFocusHelper()])}function De(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&F(e),!0!==f.noDefaultHeaderBtn&&R(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&F(e),!0!==f.noDefaultHeaderBtn&&R(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&R(e),!0!==f.noDefaultHeaderText&&F(e)])):void 0}function _e(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&H(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===k.value?convertToUnit(S.value):W.value),i={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...w(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Te(e,a))}function Te(e,t){const a=Z.value(e,t||f.weekdayBreakpoints[0]>0&&S.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&S.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function R(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,Ie(e))}function Ie(a){const e=!0!==f.noActiveDate&&H(a),t=X.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(_.value=a.date,void 0!==I.value.onClickDate)&&D("click-date",{scope:o})},...b("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(_.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(i.ariaLabel=j.value(a)),r?r({scope:o}):useButton(f,i,n?n({scope:o}):t)}function ke(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function we(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Ne(){return h("div",{class:"q-calendar-scheduler__body"},[Me()])}function Me(){return!0===k.value?h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Ce(),Ee()]):!0===f.noScroll?Se():h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return h("div",{ref:x,class:"q-calendar-scheduler__pane"},[Ee()])}function Ee(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===k.value&&!0!==f.noHeader&&ce(),be()])}function be(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return Oe(e,t,a,void 0!==e.children?e.expanded:n)})}function Oe(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):C.value?convertToUnit(C.value):"auto",ie.value>0&&(r.minHeight=convertToUnit(ie.value)),h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ae(e,t,a,n),Ce(e,t,a,n)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[be(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ae(t,e,a=0,n=!0){const r=g["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):C.value?convertToUnit(C.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),f.resourceStyle||ae),u=t[f.resourceLabel],d=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:M.value,days:M.value,resourceIndex:e,indentLevel:a,label:u},l=t[f.resourceKey],c=(s.droppable=T.value===l,"function"===typeof f.resourceClass?f.resourceClass({scope:s}):{});return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{Y.value[t[f.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===k.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===d},style:{...o,...i({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?T.value=l:T.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?T.value=l:T.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?T.value=l:T.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?T.value=l:T.value="")},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{O(e,[13,32])&&void 0!==I.value.onClickResource&&D("click-resource",{scope:s,event:e})},...b("-resource",e=>{return{scope:s,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,D("resource-expanded",{expanded:t.expanded,scope:s})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):u]),useFocusHelper()]])}function Ce(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===k.value?convertToUnit(S.value):W.value,i={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:M.value,days:M.value},u={},d=(u.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:u});return h("div",d,[...We(e,t,a,n),r&&r({scope:i})])}function We(t,a,n=0,r=!0){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>He(M.value[0],e,t,a,n,r)):M.value.map(e=>He(e,void 0,t,a,n,r))}function He(e,t,a,n,r=0,o=!0){const i=g.day,u=f.dayStyle||Q,d=!0!==f.noActiveDate&&N.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=T.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===k.value?convertToUnit(S.value):W.value,v={width:m,maxWidth:m,...u({scope:c})},p=(v.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(v.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...w(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?T.value=s:T.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?T.value=s:T.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?T.value=s:T.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?T.value=s:T.value="")},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{O(e,[13,32])&&(_.value=c.timestamp.date,void 0!==I.value.onClickResource)&&D("click-resource",{scope:c,event:e})},...b("-day-resource",e=>{return{scope:c,event:e}})},[i&&i({scope:c}),useFocusHelper()])}function Fe(){return h("div",{},"No resources have been defined")}function Re(){const{start:e,end:t,maxDays:a}=J.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=withDirectives(h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==k.value&&!0!==f.noHeader&&ce(),!0===n&&!0===r&&Ne(),!1===r&&Fe()]),[[ResizeObserver$1,le]]);if(!0!==f.animated)return o;{const i="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:i,appear:!0},()=>o)}}return watch([M],ne,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}_.value=e}v.value=e}),watch(_,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}D("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{p.value[v.value]?p.value[v.value].focus():re()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{p.value={},a.value={},n.value={},Y.value={}}),onMounted(()=>{ee()}),L({prev:se,next:de,move:E,moveToToday:ue,updateCurrent:K}),()=>te()}});const version="4.0.1";var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};export{QCalendarScheduler,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],d=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,p=v===l;if(!(l<getDayIdentifier(e)))while((!p||c.length<s)&&c.length<d){if(v=getDayIdentifier(m),p=p||v>l&&c.length>=s,p)break;if(0===n[m.weekday]);else{const y=copyTimestamp(m);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,i,u),c.push(y)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const o=(e,t)=>"",i={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,i[e]||i["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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?p(o.value):parseTimestamp(a.value)}),u=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),d=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:i,lastDay:u,betweenDays:d}=c(n,e);return{"q-past-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==d&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===d,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===d),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function scrollToHorizontal(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a),a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i,a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:i,size:u,headerColumnRef:d}){const s=computed(()=>parseInt(t.intervalStart,10)),m=computed(()=>parseInt(t.intervalMinutes,10)),l=computed(()=>parseInt(t.intervalCount,10)),v=computed(()=>parseFloat(t.intervalHeight)),p=computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:u.width>0&&d.value&&(e=d.value.offsetWidth/(t.columnCount>1?t.columnCount:i.value)),e}),c=computed(()=>s.value*m.value),y=computed(()=>l.value*v.value),f=computed(()=>l.value*p.value),h=computed(()=>T(r.value)),g=computed(()=>I(o.value)),D=computed(()=>{return createDayList(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,i.value)}),_=computed(()=>{return D.value.map(e=>createIntervalList(e,s.value,m.value,l.value,a.now))});function T(e){return getStartOfWeek(e,t.weekdays,a.today)}function I(e){return getEndOfWeek(e,t.weekdays,a.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function N(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),E=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(t.locale,()=>e)});function b(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){}function R(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function U(e,t){const a={timestamp:e};return a.timeStartPos=H,a.timeDurationHeight=C,void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=F,a.timeDurationWidth=W,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=H(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return parseInt(e,10)*m.value/v.value}function z(e){return parseInt(e,10)*m.value/p.value}function H(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*m.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value)&&(i=f.value),i}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:D,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:E,arrayHasDateTime:k,checkIntervals:w,getIntervalClasses:N,getResourceClasses:M,showIntervalLabelDefault:b,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:R,getTimestampAtEvent:L,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:z,timeStartPos:H,timeStartPosX:F}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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 watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const i=t[o],u=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{const t=e;return(void 0===i.button||t.buttons>0&&t.button===i.button)&&(i.prevent&&t.preventDefault(),i.stop&&t.stopPropagation(),a(o,n(t,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:d,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=l.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,weekdaySkips:d,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function p(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:T();break;case 34:I();break;case 35:w();break;case 36:k();break;case 37:D();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(u.value=e.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function _(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===d.value[e.weekday]);if("month"===i.value||"month-interval"===i.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===i.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===i.value)return void(u.value=e.date);n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:-1}):"week"===i.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function I(){let e=copyTimestamp(r.value);if("month"===i.value||"month-interval"===i.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===d.value[e.weekday])e=addToDate(e,{day:t})}else"day"===i.value?e=addToDate(e,{day:1}):"week"===i.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getStartOfMonth(e):"week"===i.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===i.value||"month-interval"===i.value?e=getEndOfMonth(e):"week"===i.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===d.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:p}}var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:D,expose:L}){const e=ref(null),x=ref(null),U=ref(null),v=ref(null),t=ref(null),p=ref({}),Y=ref({}),a=ref({}),n=ref({}),u=ref("next"),d=ref(f.modelValue||today()),s=ref("0000-00-00"),l=ref(0),_=ref(f.modelValue),c=reactive({width:0,height:0}),y=ref(!1),T=ref(!1),q=ref(null),P=ref(null),r=(watch(()=>f.view,()=>{l.value=0}),computed(()=>{return"month"===f.view?"month-interval":f.view})),B=getCurrentInstance();if(null===B)throw new Error("current instance is null");const I=useEmitListeners(B).emitListeners,k=useCellWidth(f).isSticky,{times:o,setCurrent:z,updateCurrent:K}=useTimes(f),{weekdaySkips:i,parsedStart:V,parsedEnd:X,dayFormatter:$,weekdayFormatter:Z,ariaDateFormatter:j,dayStyleDefault:Q,getRelativeClasses:w}=(K(),z(),useCommon(f,{startDate:d,endDate:s,times:o})),N=computed(()=>{return parseTimestamp(f.modelValue,o.now)||V.value||o.today}),J=(t.value=N.value,v.value=N.value.date,useRenderValues(f,{parsedView:r,parsedValue:N,times:o})).renderValues,{rootRef:m,scrollWidth:G,__initCalendar:ee,__renderCalendar:te}=useCalendar(f,Re,{scrollArea:e,pane:x}),{days:M,parsedCellWidth:S,styleDefault:ae}=useInterval(f,{weekdaySkips:i,times:o,scrollArea:e,parsedStart:V,parsedEnd:X,maxDays:l,size:c,headerColumnRef:U}),E=useMove(f,{parsedView:r,parsedValue:N,weekdaySkips:i,direction:u,maxDays:l,times:o,emittedValue:_,emit:D}).move,b=useMouse(D,I).getDefaultMouseEventHandlers,ne=useCheckChange(D,{days:M,lastStart:q,lastEnd:P}).checkChange,O=useEvents().isKeyCode,re=useKeyboard(f,{rootRef:m,focusRef:v,focusValue:t,datesRef:p,days:M,parsedView:r,parsedValue:N,emittedValue:_,weekdaySkips:i,direction:u,times:o}).tryFocus,A=computed(()=>{return"day"===r.value&&parseInt(f.columnCount,10)>1?parseInt(f.columnCount,10):"day"===r.value&&f.maxDays&&f.maxDays>1?f.maxDays:M.value.length}),oe=computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),C=computed(()=>{const e=parseInt(f.resourceHeight,10);return 0===e?"auto":e}),ie=computed(()=>{return parseInt(f.resourceMinHeight,10)}),W=computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&oe.value&&A.value)return(e-G.value-oe.value)/A.value+"px"}return 100/A.value+"%"});function ue(){_.value=today()}function de(e=1){E(e)}function se(e=1){E(-e)}function le({width:e,height:t}){c.width=e,c.height=t}function H(e){return e.date===_.value}function ce(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:G.value+"px"}},[me(),ve()])}function me(){const e=g["head-resources"],t={days:M.value,timestamps:M.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===k.value},...b("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return h("div",{ref:U,class:{"q-calendar-scheduler__head--days__column":!0}},[pe(),ye()])}function pe(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...fe()])}function ye(){const e=g["head-days-events"];return nextTick(()=>{if(n.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:M.value,days:M.value,ref:n}})]),...he()])}function fe(){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>ge(M.value[0],e)):M.value.map(e=>ge(e))}function he(){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>_e(M.value[0],e)):M.value.map(e=>_e(e))}function ge(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&H(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(t.weekday)},i=(void 0!==e&&(o.columnIndex=e),!0===k.value?convertToUnit(S.value):W.value),u=f.weekdayStyle||Q,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===k.value&&(d.minWidth=i),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...w(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(_.value=t.date)},...b("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&De(t),void 0===a&&n&&n({scope:o}),void 0===a&&we(t,e),useFocusHelper()])}function De(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&F(e),!0!==f.noDefaultHeaderBtn&&R(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&F(e),!0!==f.noDefaultHeaderBtn&&R(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&R(e),!0!==f.noDefaultHeaderText&&F(e)])):void 0}function _e(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&H(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===k.value?convertToUnit(S.value):W.value),i={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...w(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Te(e,a))}function Te(e,t){const a=Z.value(e,t||f.weekdayBreakpoints[0]>0&&S.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&S.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function R(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,Ie(e))}function Ie(a){const e=!0!==f.noActiveDate&&H(a),t=$.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(_.value=a.date,void 0!==I.value.onClickDate)&&D("click-date",{scope:o})},...b("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(_.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(i.ariaLabel=j.value(a)),r?r({scope:o}):useButton(f,i,n?n({scope:o}):t)}function ke(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function we(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Ne(){return h("div",{class:"q-calendar-scheduler__body"},[Me()])}function Me(){return!0===k.value?h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Ce(),Ee()]):!0===f.noScroll?Se():h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return h("div",{ref:x,class:"q-calendar-scheduler__pane"},[Ee()])}function Ee(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===k.value&&!0!==f.noHeader&&ce(),be()])}function be(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return Oe(e,t,a,void 0!==e.children?e.expanded:n)})}function Oe(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):C.value?convertToUnit(C.value):"auto",ie.value>0&&(r.minHeight=convertToUnit(ie.value)),h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ae(e,t,a,n),Ce(e,t,a,n)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[be(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ae(t,e,a=0,n=!0){const r=g["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):C.value?convertToUnit(C.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),f.resourceStyle||ae),u=t[f.resourceLabel],d=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:M.value,days:M.value,resourceIndex:e,indentLevel:a,label:u},l=t[f.resourceKey],c=(s.droppable=T.value===l,"function"===typeof f.resourceClass?f.resourceClass({scope:s}):{});return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{Y.value[t[f.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===k.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===d},style:{...o,...i({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?T.value=l:T.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?T.value=l:T.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?T.value=l:T.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?T.value=l:T.value="")},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{O(e,[13,32])&&void 0!==I.value.onClickResource&&D("click-resource",{scope:s,event:e})},...b("-resource",e=>{return{scope:s,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,D("resource-expanded",{expanded:t.expanded,scope:s})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):u]),useFocusHelper()]])}function Ce(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===k.value?convertToUnit(S.value):W.value,i={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:M.value,days:M.value},u={},d=(u.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:u});return h("div",d,[...We(e,t,a,n),r&&r({scope:i})])}function We(t,a,n=0,r=!0){return 1===M.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>He(M.value[0],e,t,a,n,r)):M.value.map(e=>He(e,void 0,t,a,n,r))}function He(e,t,a,n,r=0,o=!0){const i=g.day,u=f.dayStyle||Q,d=!0!==f.noActiveDate&&N.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=T.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===k.value?convertToUnit(S.value):W.value,v={width:m,maxWidth:m,...u({scope:c})},p=(v.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(v.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...w(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?T.value=s:T.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?T.value=s:T.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?T.value=s:T.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?T.value=s:T.value="")},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{O(e,[13,32])&&(_.value=c.timestamp.date,void 0!==I.value.onClickResource)&&D("click-resource",{scope:c,event:e})},...b("-day-resource",e=>{return{scope:c,event:e}})},[i&&i({scope:c}),useFocusHelper()])}function Fe(){return h("div",{},"No resources have been defined")}function Re(){const{start:e,end:t,maxDays:a}=J.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=withDirectives(h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==k.value&&!0!==f.noHeader&&ce(),!0===n&&!0===r&&Ne(),!1===r&&Fe()]),[[ResizeObserver$1,le]]);if(!0!==f.animated)return o;{const i="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:i,appear:!0},()=>o)}}return watch([M],ne,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}_.value=e}v.value=e}),watch(_,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}D("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{p.value[v.value]?p.value[v.value].focus():re()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{p.value={},a.value={},n.value={},Y.value={}}),onMounted(()=>{ee()}),L({prev:se,next:de,move:E,moveToToday:ue,updateCurrent:K}),()=>te()}});const version="4.0.2";var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};export{QCalendarScheduler,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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.QCalendarScheduler=t(e.Vue))})(this,function(We){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,_=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,D=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,N=31,d=12,n=1,h=1,o=7,r=60,u=24,C=0,M=6e4,F=36e5,A=864e5,x=6048e5,O=60,E=3600,q=86400,W=604800,H={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},L={hour:0,minute:0};function R(e){return!!a.exec(e)}function He(e){const t=a.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 U(e,t=!1){const a=t?"UTC":"";return w({date:l(e[`get${a}FullYear`](),4)+"-"+l(e[`get${a}Month`]()+1,2)+"-"+l(e[`get${a}Date`](),2),time:l(e[`get${a}Hours`]()||0,2)+":"+l(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 l(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function B(e){return 1===(e%4===0^e%100===0^e%400===0)}function i(e,t){return(B(e)?b:D)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>i(e.year,e.month)&&(e.day=h,++e.month,e.month>d)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=d),e.day=i(e.year,e.month)),e}function Le(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,l(t,2),l(a,2)].join("-")}function Y(e){return e===Le()}function P(e,t,a){let n=j(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=$(n,a,n.hasTime)),n}function Z(e,t,a){let n=j(e);const r=i(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],p),n=w(n),a&&(n=$(n,a,n.hasTime)),n}function I(e){const t=j(e);return t.day=h,w(t),t}function S(e){const t=j(e);return t.day=i(t.year,t.month),w(t),t}function G(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=_.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function K(e,t){return c(e)===c(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return X(e)===X(t)}function Re(e,t){let a=He(e);return null===a?null:(a=w(a),t&&$(a,t,a.hasTime),a)}function Ue(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function z(e){return Ue(e)+s(e)}function ae(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 $(e,t,a=!1){let n=Ue(t),r=Ue(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&$(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=le(e),e}function ue(e){return e.workweek=ie(e),e}function de(e,t,a,n,r){const o=Ue(e);if(void 0!==t){const l=Ue(He(t));o<=l&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=Ue(He(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=He(r[d][0]),c=He(r[d][1]);if(we(e,s,c)){e.disabled=!0;break}}else{const v=Ue(Re(r[d]+" 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=se(e),e.doy=le(e),e.workweek=ie(e),e}function le(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 ie(e){0===e.year&&(e=Re(Le()));const t=ye(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)/x);return 1+Math.floor(o)}function se(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%d+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function j(e){return{...e}}function c(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function v(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function X(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ve(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 me(e,t,a,n,r,o,u=[],d=[],l=42,i=0){const s=Ue(t),c=[];let v=j(e),m=0,f=m===s;if(!(s<Ue(e)))while((!f||c.length<i)&&c.length<l){if(m=Ue(v),f=f||m>s&&c.length>=i,f)break;if(0===n[v.weekday]);else{const y=j(v);w(y),$(y,a),de(y,r,o,u,d),c.push(y)}v=k(v,p)}return c}function fe(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const d=(a+e)*n,l=j(t);u.push(ne(l,d,o))}return u}function Q(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),o}}}function ye(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 he(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 e(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?z:Ue;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ge(e,t=!1){const a=!0===t?z:Ue;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function we(e,t,a,n){const r=Ue(e)+(!0===n?s(e):0),o=Ue(t)+(!0===n?s(t):0),u=Ue(a)+(!0===n?s(a):0);return r>=o&&r<=u}function ke(e,t,a,n){const r=Ue(e),o=Ue(t),u=Ue(a),d=Ue(n);return r>=u&&r<=d||o>=u&&o<=d||u>=r&&o>=d}function J(e,t){const n=j(e);let r;return De(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=_e.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Se(n,_e[r]),w(n),n}const _e=["minute","hour","day","month"];function De(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function be(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Te(e)}return e}function Te(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Ie(e)}return e}function Ie(t){f(t);let a=i(t.year,t.month);if(t.day>a){++t.month,t.month>d&&f(t);let e=t.day-a;a=i(t.year,t.month);do{e>a&&(++t.month,t.month>d&&f(t),e-=a,a=i(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&&f(t),a=i(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=i(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>d){const t=Math.floor(e.month/d);e.month=e.month%d,e.year+=t}else e.month<n&&(e.month+=d,--e.year);return e}function Se(e,t){switch(t){case"minute":return be(e);case"hour":return Te(e);case"day":return Ie(e);case"month":return f(e)}}function Ne(e,t){const a=ae(e,t,!0);return Math.floor(a/A)}function Ce(e,t){let a=j(e),n=j(t);return a=m(a,0),n=m(n,6),Math.ceil(Ne(a,n)/o)}const Me={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 Fe(){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(Me[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Ae(t,a){const e=Object.keys(Me),n=Fe();return e.map(e=>n(e,t,a))}function xe(){const o=(e,t)=>"",u={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,u[e]||u["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 Oe(t,a){const n=xe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ee={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:_,DAYS_IN_MONTH:D,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:N,MONTH_MAX:d,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:C,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:F,MILLISECONDS_IN_DAY:A,MILLISECONDS_IN_WEEK:x,Timestamp:H,TimeObject:L,today:Le,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:I,getEndOfMonth:S,parseTime:G,validateTimestamp:R,parsed:He,parseTimestamp:Re,parseDate:U,getDayIdentifier:Ue,getTimeIdentifier:s,getDayTimeIdentifier:z,diffTimestamp:ae,updateRelative:$,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:ue,updateDisabled:de,updateFormatted:w,getDayOfYear:le,getWorkWeek:ie,getWeekday:se,isLeapYear:B,daysInMonth:i,copyTimestamp:j,padNumber:l,getDate:c,getTime:v,getDateTime:X,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ve,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,makeDate:ye,makeDateTime:he,validateNumber:e,isBetweenDates:we,isOverlappingDates:ke,daysBetween:Ne,weeksBetween:Ce,addToDate:J,compareTimestamps:V,compareDate:K,compareTime:ee,compareDateTime:te,getWeekdayFormatter:Fe,getWeekdayNames:Ae,getMonthFormatter:xe,getMonthNames:Oe},Ee=Object.freeze({__proto__:null,DAYS_IN_MONTH:D,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:C,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:A,MILLISECONDS_IN_HOUR:F,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:x,MINUTES_IN_HOUR:r,MONTH_MAX:d,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:_,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:E,SECONDS_IN_MINUTE:O,SECONDS_IN_WEEK:W,TimeObject:L,Timestamp:H,addToDate:J,compareDate:K,compareDateTime:te,compareTime:ee,compareTimestamps:V,copyTimestamp:j,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,daysBetween:Ne,daysInMonth:i,default:Ee,diffTimestamp:ae,findWeekday:m,getDate:c,getDateTime:X,getDayIdentifier:Ue,getDayOfYear:le,getDayTimeIdentifier:z,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:xe,getMonthNames:Oe,getStartOfMonth:I,getStartOfWeek:P,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:Fe,getWeekdayNames:Ae,getWeekdaySkips:ve,getWorkWeek:ie,isBetweenDates:we,isLeapYear:B,isOverlappingDates:ke,isToday:Y,makeDate:ye,makeDateTime:he,maxTimestamp:pe,minTimestamp:ge,moveRelativeDays:ce,nextDay:p,padNumber:l,parseDate:U,parseTime:G,parseTimestamp:Re,parsed:He,prevDay:g,relativeDays:k,today:Le,updateDayOfYear:oe,updateDisabled:de,updateFormatted:w,updateMinutes:ne,updateRelative:$,updateWeekday:re,updateWorkWeek:ue,validateNumber:e,validateTimestamp:R,weeksBetween:Ce});function Be(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function qe(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ye(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Be,indexOf:qe},Ve=Object.freeze({__proto__:null,convertToUnit:Be,default:Ve,indexOf:qe,minCharWidth:Ye}),Ke={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 u({width:e,height:t}){r.width=e,r.height=t}const d=We.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function i(){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()]),[[Ke,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:l,__renderCalendar:i}}const Ze={modelValue:{type:String,default:Le(),validator:e=>""===e||R(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;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function ze(t,{startDate:e,endDate:a,times:n}){const r=We.computed(()=>ve(t.weekdays)),o=We.computed(()=>Re(e.value)),u=We.computed(()=>{return"0000-00-00"===a.value?f(o.value):Re(a.value)}),d=We.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return Q(t.locale,()=>e)}),l=We.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return Q(t.locale,(e,t)=>t?n:a)}),i=We.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return Q(t.locale,()=>e)});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=Ue(t),r=Ue(He(e[0])),o=Ue(He(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:u,lastDay:d,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===u||!0===d||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return P(e,t.weekdays,n.today)}function f(e){return Z(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:d,weekdayFormatter:l,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function $e(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function je(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function Xe(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Qe(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],d=Xe(n);o<=0?d!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=d+(r-d)/Math.max(t,o)*t;$e(n,a),a!==r&&Je(n,r,o-t,e)})}function Ge(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],d=Qe(n);o<=0?d!==r&&je(n,r):requestAnimationFrame(e=>{const t=e-u,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Ge(n,r,o-t,e)})}const et={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function tt(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:d,headerColumnRef:l}){const i=We.computed(()=>parseInt(t.intervalStart,10)),v=We.computed(()=>parseInt(t.intervalMinutes,10)),s=We.computed(()=>parseInt(t.intervalCount,10)),m=We.computed(()=>parseFloat(t.intervalHeight)),f=We.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&l.value&&(e=l.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=We.computed(()=>i.value*v.value),y=We.computed(()=>s.value*m.value),h=We.computed(()=>s.value*f.value),p=We.computed(()=>_(r.value)),g=We.computed(()=>D(o.value)),w=We.computed(()=>{return me(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=We.computed(()=>{return w.value.map(e=>fe(e,i.value,v.value,s.value,a.now))});function _(e){return P(e,t.weekdays,a.today)}function D(e){return Z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=z(t),r=z(He(e[0])),o=z(He(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const N=We.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return Q(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=We.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function A(e){}function W(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientX,s=(i-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=E,a.timeDurationHeight=x,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e)};return a.timeStartPosX=q,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=E(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Ge(n.value,a,t),!0)}function x(e){return e/v.value*m.value}function O(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function K(e){return parseInt(e,10)*v.value/f.value}function E(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function q(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:N,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:M,showResourceLabelDefault:F,styleDefault:A,getTimestampAtEventInterval:W,getTimestampAtEvent:H,getTimestampAtEventX:L,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:x,timeDurationWidth:O,heightToMinutes:V,widthToMinutes:K,timeStartPos:E,timeStartPosX:q}}const at={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},nt={maxDays:{type:Number,default:1}},rt={now:{type:String,validator:e=>""===e||R(e),default:""}};function ot(e){const t=We.reactive({now:Re("0000-00-00 00:00"),today:Re("0000-00-00")}),a=We.computed(()=>e.now?Re(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();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 d(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:u,updateTime:d}}function ut(r,{parsedView:o,parsedValue:u,times:d}){const e=We.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,d.today),n=Z(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ce(j(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),w(n),t=i(a.year,a.month);break;case"resource":t=1,n=ce(j(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const dt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let lt,it;function st(e,a){const t={};for(const n in e){const r=e[n],o=dt("on-"+n);if(void 0===lt)return void console.warn("$listeners has not been set up");if(void 0!==lt.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),d=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),it(n,a(t,n))),r.result};u in t?Array.isArray(t[u])?t[u].push(d):t[u]=[t[u],d]:t[u]=d}}return t}function ct(e,t){return st(vt(e),t)}function vt(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 y(e){return Object.keys(vt(e))}function mt(e,t){return it=e,lt=t,{getMouseEventHandlers:st,getDefaultMouseEventHandlers:ct,getMouseEventName:vt,getRawMouseEvents:y}}const ft=["moved"];function yt(d,{parsedView:l,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Le();else{let e=j(i.value);const n=a>0,r=n?p:g,o=n?N:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),re(e);while(0===s.value[e.weekday])e=J(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,d.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,d.weekdays);break}re(e),w(e),oe(e),$(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const ht=/^on[A-Z]/;function pt(e=We.getCurrentInstance()){return{emitListeners:We.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{ht.test(e)&&(t[e]=!0)}),t})}}function gt(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[We.h("span",e)]}function wt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return We.h("button",{...a,tabindex:r?0:-1},[n,r&&gt()])}const kt={cellWidth:[Number,String]};function _t(e){const t=We.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const Dt=["change"];function bt(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 Tt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const It=Tt().isKeyCode,St={useNavigation:Boolean};function Nt(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:d,weekdaySkips:l,direction:i,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&It(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&It(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:D();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=j(r.value);if("month"===u.value){if(e=J(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(d.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));i.value="prev",n.value=e.date}function g(){let e=j(r.value);if("month"===u.value){if(e=J(e,{day:7}),r.value.month!==e.month)return i.value="next",void(d.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));i.value="next",n.value=e.date}function w(){let e=j(r.value);i.value="prev";do{e=J(e,{day:-1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===u.value)return void(d.value=e.date);n.value=e.date}function k(){let e=j(r.value);i.value="next";do{e=J(e,{day:1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===u.value)return void(d.value=e.date);n.value=e.date}function _(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:-1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:-1}):"week"===u.value&&(e=J(e,{day:-7}));i.value="prev",n.value=e.date}function D(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:1}):"week"===u.value&&(e=J(e,{day:7}));i.value="next",n.value=e.date}function b(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}function T(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=Z(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}return We.onBeforeUnmount(()=>{v()}),We.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var Ct=We.defineComponent({name:"QCalendarScheduler",directives:[Ke],props:{...Ze,...et,...at,...nt,...rt,...kt,...St},emits:["update:model-value","update:model-resources","resource-expanded",...Dt,...ft,...y("-date"),...y("-day-resource"),...y("-head-resources"),...y("-head-day"),...y("-resource")],setup(h,{slots:p,emit:g,expose:W}){const e=We.ref(null),H=We.ref(null),L=We.ref(null),m=We.ref(null),t=We.ref(null),f=We.ref({}),R=We.ref({}),a=We.ref({}),n=We.ref({}),d=We.ref("next"),l=We.ref(h.modelValue||Le()),i=We.ref("0000-00-00"),s=We.ref(0),w=We.ref(h.modelValue),c=We.reactive({width:0,height:0}),y=We.ref(!1),k=We.ref(!1),U=We.ref(null),B=We.ref(null),r=(We.watch(()=>h.view,()=>{s.value=0}),We.computed(()=>{return"month"===h.view?"month-interval":h.view})),Y=We.getCurrentInstance();if(null===Y)throw new Error("current instance is null");const _=pt(Y).emitListeners,D=_t(h).isSticky,{times:o,setCurrent:V,updateCurrent:K}=ot(h),{weekdaySkips:u,parsedStart:P,parsedEnd:Z,dayFormatter:z,weekdayFormatter:$,ariaDateFormatter:j,dayStyleDefault:X,getRelativeClasses:b}=(K(),V(),ze(h,{startDate:l,endDate:i,times:o})),T=We.computed(()=>{return Re(h.modelValue,o.now)||P.value||o.today}),Q=(t.value=T.value,m.value=T.value.date,ut(h,{parsedView:r,parsedValue:T,times:o})).renderValues,{rootRef:v,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=Pe(h,qe,{scrollArea:e,pane:H}),{days:I,parsedCellWidth:S,styleDefault:te}=tt(h,{weekdaySkips:u,times:o,scrollArea:e,parsedStart:P,parsedEnd:Z,maxDays:s,size:c,headerColumnRef:L}),N=yt(h,{parsedView:r,parsedValue:T,weekdaySkips:u,direction:d,maxDays:s,times:o,emittedValue:w,emit:g}).move,C=mt(g,_).getDefaultMouseEventHandlers,ae=bt(g,{days:I,lastStart:U,lastEnd:B}).checkChange,M=Tt().isKeyCode,ne=Nt(h,{rootRef:v,focusRef:m,focusValue:t,datesRef:f,days:I,parsedView:r,parsedValue:T,emittedValue:w,weekdaySkips:u,direction:d,times:o}).tryFocus,F=We.computed(()=>{return"day"===r.value&&parseInt(h.columnCount,10)>1?parseInt(h.columnCount,10):"day"===r.value&&h.maxDays&&h.maxDays>1?h.maxDays:I.value.length}),re=We.computed(()=>{return v.value?parseInt(window.getComputedStyle(v.value).getPropertyValue("--calendar-resources-width"),10):0}),A=We.computed(()=>{const e=parseInt(h.resourceHeight,10);return 0===e?"auto":e}),oe=We.computed(()=>{return parseInt(h.resourceMinHeight,10)}),x=We.computed(()=>{if(v.value){const e=c.width||v.value.getBoundingClientRect().width;if(e&&re.value&&F.value)return(e-J.value-re.value)/F.value+"px"}return 100/F.value+"%"});function ue(){w.value=Le()}function de(e=1){N(e)}function le(e=1){N(-e)}function ie({width:e,height:t}){c.width=e,c.height=t}function O(e){return e.date===w.value}function se(){return We.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===D.value},style:{marginRight:J.value+"px"}},[ce(),ve()])}function ce(){const e=p["head-resources"],t={days:I.value,timestamps:I.value,date:h.modelValue,resources:h.modelResources};return We.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===D.value},...C("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return We.h("div",{ref:L,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),fe()])}function me(){return We.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function fe(){const e=p["head-days-events"];return We.nextTick(()=>{if(n.value&&0===parseInt(h.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),We.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&We.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:I.value,days:I.value,ref:n}})]),...he()])}function ye(){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>pe(I.value[0],e)):I.value.map(e=>pe(e))}function he(){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>we(I.value[0],e)):I.value.map(e=>we(e))}function pe(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==h.noActiveDate&&O(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(t.weekday)},u=(void 0!==e&&(o.columnIndex=e),!0===D.value?Be(S.value):x.value),d=h.weekdayStyle||X,l={width:u,maxWidth:u,minWidth:u,...d({scope:o})},i=(!0===D.value&&(l.minWidth=u),"function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{}),s=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__head--day":!0,...i,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:()=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&M(e,[13,32])&&(w.value=t.date)},...C("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return We.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&be(t,e),gt()])}function ge(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText&&E(e),!0!==h.noDefaultHeaderBtn&&q(e)]:"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&E(e),!0!==h.noDefaultHeaderBtn&&q(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&q(e),!0!==h.noDefaultHeaderText&&E(e)])):void 0}function we(e,t){const a=p["head-day-event"],n=!0!==h.noActiveDate&&O(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===D.value?Be(S.value):x.value),u={width:o,maxWidth:o,minWidth:o};return!0===D.value&&(u.minWidth=o),We.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...b(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=p["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return We.h("div",r,t&&t({scope:n})||ke(e,a))}function ke(e,t){const a=$.value(e,t||h.weekdayBreakpoints[0]>0&&S.value<=h.weekdayBreakpoints[0]);return We.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&S.value<=h.weekdayBreakpoints[1]?Ye(a,h.minWeekdayLabel):a)}function q(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return We.h("div",t,_e(e))}function _e(a){const e=!0!==h.noActiveDate&&O(a),t=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&M(e,[13,32])&&(w.value=a.date,void 0!==_.value.onClickDate)&&g("click-date",{scope:o})},...C("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=j.value(a)),r?r({scope:o}):wt(h,u,n?n({scope:o}):t)}function De(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return We.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function be(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return We.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Te(){return We.h("div",{class:"q-calendar-scheduler__body"},[Ie()])}function Ie(){return!0===D.value?We.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==D.value&&Ae(),Ne()]):!0===h.noScroll?Se():We.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return We.h("div",{ref:H,class:"q-calendar-scheduler__pane"},[Ne()])}function Ne(){return We.h("div",{class:"q-calendar-scheduler__day--container"},[!0===D.value&&!0!==h.noHeader&&se(),Ce()])}function Ce(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Me(e,t,a,void 0!==e.children?e.expanded:n)})}function Me(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?Be(parseInt(e.height,10)):A.value?Be(A.value):"auto",oe.value>0&&(r.minHeight=Be(oe.value)),We.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,We.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ce(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?Be(parseInt(t.height,10)):A.value?Be(A.value):"auto",parseInt(h.resourceMinHeight,10)>0&&(o.minHeight=Be(parseInt(h.resourceMinHeight,10))),h.resourceStyle||te),d=t[h.resourceLabel],l=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,i={resource:t,timestamps:I.value,days:I.value,resourceIndex:e,indentLevel:a,label:d},s=t[h.resourceKey],c=(i.droppable=k.value===s,"function"===typeof h.resourceClass?h.resourceClass({scope:i}):{});return We.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{R.value[t[h.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===D.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:i})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",i)?k.value=s:k.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",i)?k.value=s:k.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",i)?k.value=s:k.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",i)?k.value=s:k.value="")},onKeydown:e=>{M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{M(e,[13,32])&&void 0!==_.value.onClickResource&&g("click-resource",{scope:i,event:e})},...C("-resource",e=>{return{scope:i,event:e}})},[[We.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:i})}}),We.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:i}):d]),gt()]])}function Ae(e,t,a=0,n=!0){const r=p["resource-days"],o=!0===D.value?Be(S.value):x.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:I.value,days:I.value},d={},l=(d.height=parseInt(h.resourceHeight,10)>0?Be(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(d.minHeight=Be(parseInt(h.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:d});return We.h("div",l,[...xe(e,t,a,n),r&&r({scope:u})])}function xe(t,a,n=0,r=!0){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>Oe(I.value[0],e,t,a,n,r)):I.value.map(e=>Oe(e,void 0,t,a,n,r))}function Oe(e,t,a,n,r=0,o=!0){const u=p.day,d=h.dayStyle||X,l=!0!==h.noActiveDate&&T.value.date===e.date,i=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),s=k.value===i,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:l,droppable:s},v=!0===D.value?Be(S.value):x.value,m={width:v,maxWidth:v,...d({scope:c})},f=(m.height=parseInt(h.resourceHeight,10)>0?Be(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(m.minHeight=Be(parseInt(h.resourceMinHeight,10))),"function"===typeof h.dayClass?h.dayClass({scope:c}):{}),y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return We.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,...b(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",c)?k.value=i:k.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",c)?k.value=i:k.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",c)?k.value=i:k.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",c)?k.value=i:k.value="")},onKeydown:e=>{M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{M(e,[13,32])&&(w.value=c.timestamp.date,void 0!==_.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...C("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),gt()])}function Ee(){return We.h("div",{},"No resources have been defined")}function qe(){const{start:e,end:t,maxDays:a}=Q.value,n=(l.value===e.date&&i.value===t.date&&s.value===a||(l.value=e.date,i.value=t.date,s.value=a),c.width>0),r=h.modelResources&&h.modelResources.length>0,o=We.withDirectives(We.h("div",{key:l.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==D.value&&!0!==h.noHeader&&se(),!0===n&&!0===r&&Te(),!1===r&&Ee()]),[[Ke,ie]]);if(!0!==h.animated)return o;{const u="q-calendar--"+("prev"===d.value?h.transitionPrev:h.transitionNext);return We.h(We.Transition,{name:u,appear:!0},()=>o)}}return We.watch([I],ae,{deep:!0,immediate:!0}),We.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Ue(He(e)),n=Ue(He(t));d.value=a>=n?"next":"prev"}w.value=e}m.value=e}),We.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Ue(He(e)),n=Ue(He(t));d.value=a>=n?"next":"prev"}g("update:model-value",e)}}),We.watch(m,e=>{e&&(t.value=Re(e))}),We.watch(t,()=>{f.value[m.value]?f.value[m.value].focus():ne()}),We.watch(()=>h.maxDays,e=>{s.value=e}),We.onBeforeUpdate(()=>{f.value={},a.value={},n.value={},R.value={}}),We.onMounted(()=>{G()}),W({prev:le,next:de,move:N,moveToToday:ue,updateCurrent:K}),()=>ee()}});const Mt="4.0.1";Ee={version:Mt,QCalendarScheduler:Ct,...Ee,...Ve,install(e){e.component(Ct.name,Ct)}};return Ee});
(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.QCalendarScheduler=t(e.Vue))})(this,function(We){const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,_=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,D=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],T=28,N=31,d=12,n=1,h=1,o=7,r=60,u=24,C=0,M=6e4,F=36e5,A=864e5,x=6048e5,O=60,E=3600,q=86400,W=604800,H={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},L={hour:0,minute:0};function R(e){return!!a.exec(e)}function He(e){const t=a.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 U(e,t=!1){const a=t?"UTC":"";return w({date:l(e[`get${a}FullYear`](),4)+"-"+l(e[`get${a}Month`]()+1,2)+"-"+l(e[`get${a}Date`](),2),time:l(e[`get${a}Hours`]()||0,2)+":"+l(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 l(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function B(e){return 1===(e%4===0^e%100===0^e%400===0)}function i(e,t){return(B(e)?b:D)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%o,e.day>T&&e.day>i(e.year,e.month)&&(e.day=h,++e.month,e.month>d)&&(e.month=n,++e.year),e}function g(e){return e.day--,e.weekday=(e.weekday+6)%o,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=d),e.day=i(e.year,e.month)),e}function Le(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,l(t,2),l(a,2)].join("-")}function Y(e){return e===Le()}function P(e,t,a){let n=j(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],g),n=w(n),a&&(n=$(n,a,n.hasTime)),n}function Z(e,t,a){let n=j(e);const r=i(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],p),n=w(n),a&&(n=$(n,a,n.hasTime)),n}function I(e){const t=j(e);return t.day=h,w(t),t}function S(e){const t=j(e);return t.day=i(t.year,t.month),w(t),t}function G(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=_.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 V(e,t){return JSON.stringify(e)===JSON.stringify(t)}function K(e,t){return c(e)===c(t)}function ee(e,t){return v(e)===v(t)}function te(e,t){return X(e)===X(t)}function Re(e,t){let a=He(e);return null===a?null:(a=w(a),t&&$(a,t,a.hasTime),a)}function Ue(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function z(e){return Ue(e)+s(e)}function ae(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 $(e,t,a=!1){let n=Ue(t),r=Ue(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function ne(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=v(e),a&&$(e,a,!0),e}function re(e){return e.weekday=se(e),e}function oe(e){return e.doy=le(e),e}function ue(e){return e.workweek=ie(e),e}function de(e,t,a,n,r){const o=Ue(e);if(void 0!==t){const l=Ue(He(t));o<=l&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=Ue(He(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=He(r[d][0]),c=He(r[d][1]);if(we(e,s,c)){e.disabled=!0;break}}else{const v=Ue(Re(r[d]+" 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=se(e),e.doy=le(e),e.workweek=ie(e),e}function le(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 ie(e){0===e.year&&(e=Re(Le()));const t=ye(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)/x);return 1+Math.floor(o)}function se(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%d+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function j(e){return{...e}}function c(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function v(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function X(e){return c(e)+" "+(e.hasTime?v(e):"00:00")}function ce(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return k(e,t,a,n)}function k(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function ve(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 me(e,t,a,n,r,o,u=[],d=[],l=42,i=0){const s=Ue(t),c=[];let v=j(e),m=0,f=m===s;if(!(s<Ue(e)))while((!f||c.length<i)&&c.length<l){if(m=Ue(v),f=f||m>s&&c.length>=i,f)break;if(0===n[v.weekday]);else{const y=j(v);w(y),$(y,a),de(y,r,o,u,d),c.push(y)}v=k(v,p)}return c}function fe(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const d=(a+e)*n,l=j(t);u.push(ne(l,d,o))}return u}function Q(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(he(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),o}}}function ye(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 he(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 e(e){return isFinite(parseInt(e,10))}function pe(e,t=!1){const a=!0===t?z:Ue;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ge(e,t=!1){const a=!0===t?z:Ue;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function we(e,t,a,n){const r=Ue(e)+(!0===n?s(e):0),o=Ue(t)+(!0===n?s(t):0),u=Ue(a)+(!0===n?s(a):0);return r>=o&&r<=u}function ke(e,t,a,n){const r=Ue(e),o=Ue(t),u=Ue(a),d=Ue(n);return r>=u&&r<=d||o>=u&&o<=d||u>=r&&o>=d}function J(e,t){const n=j(e);let r;return De(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=_e.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Se(n,_e[r]),w(n),n}const _e=["minute","hour","day","month"];function De(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function be(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,Te(e)}return e}function Te(e){if(e.hour>=u||e.hour<0){const t=Math.floor(e.hour/u);e.hour-=t*u,e.day+=t,Ie(e)}return e}function Ie(t){f(t);let a=i(t.year,t.month);if(t.day>a){++t.month,t.month>d&&f(t);let e=t.day-a;a=i(t.year,t.month);do{e>a&&(++t.month,t.month>d&&f(t),e-=a,a=i(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&&f(t),a=i(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&f(t),a=i(t.year,t.month))}while(e>a);t.day=a-e}return t}function f(e){if(e.month>d){const t=Math.floor(e.month/d);e.month=e.month%d,e.year+=t}else e.month<n&&(e.month+=d,--e.year);return e}function Se(e,t){switch(t){case"minute":return be(e);case"hour":return Te(e);case"day":return Ie(e);case"month":return f(e)}}function Ne(e,t){const a=ae(e,t,!0);return Math.floor(a/A)}function Ce(e,t){let a=j(e),n=j(t);return a=m(a,0),n=m(n,6),Math.ceil(Ne(a,n)/o)}const Me={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 Fe(){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(Me[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function Ae(t,a){const e=Object.keys(Me),n=Fe();return e.map(e=>n(e,t,a))}function xe(){const o=(e,t)=>"",u={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,u[e]||u["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 Oe(t,a){const n=xe();return[...Array(12).keys()].map(e=>n(e,t,a))}var Ee={PARSE_DATETIME:a,PARSE_DATE:t,PARSE_TIME:_,DAYS_IN_MONTH:D,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:N,MONTH_MAX:d,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:o,MINUTES_IN_HOUR:r,HOURS_IN_DAY:u,FIRST_HOUR:C,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_HOUR:F,MILLISECONDS_IN_DAY:A,MILLISECONDS_IN_WEEK:x,Timestamp:H,TimeObject:L,today:Le,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:I,getEndOfMonth:S,parseTime:G,validateTimestamp:R,parsed:He,parseTimestamp:Re,parseDate:U,getDayIdentifier:Ue,getTimeIdentifier:s,getDayTimeIdentifier:z,diffTimestamp:ae,updateRelative:$,updateMinutes:ne,updateWeekday:re,updateDayOfYear:oe,updateWorkWeek:ue,updateDisabled:de,updateFormatted:w,getDayOfYear:le,getWorkWeek:ie,getWeekday:se,isLeapYear:B,daysInMonth:i,copyTimestamp:j,padNumber:l,getDate:c,getTime:v,getDateTime:X,nextDay:p,prevDay:g,relativeDays:k,findWeekday:m,getWeekdaySkips:ve,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,makeDate:ye,makeDateTime:he,validateNumber:e,isBetweenDates:we,isOverlappingDates:ke,daysBetween:Ne,weeksBetween:Ce,addToDate:J,compareTimestamps:V,compareDate:K,compareTime:ee,compareDateTime:te,getWeekdayFormatter:Fe,getWeekdayNames:Ae,getMonthFormatter:xe,getMonthNames:Oe},Ee=Object.freeze({__proto__:null,DAYS_IN_MONTH:D,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:T,DAYS_IN_WEEK:o,DAY_MIN:h,FIRST_HOUR:C,HOURS_IN_DAY:u,MILLISECONDS_IN_DAY:A,MILLISECONDS_IN_HOUR:F,MILLISECONDS_IN_MINUTE:M,MILLISECONDS_IN_WEEK:x,MINUTES_IN_HOUR:r,MONTH_MAX:d,MONTH_MIN:n,PARSE_DATE:t,PARSE_DATETIME:a,PARSE_TIME:_,SECONDS_IN_DAY:q,SECONDS_IN_HOUR:E,SECONDS_IN_MINUTE:O,SECONDS_IN_WEEK:W,TimeObject:L,Timestamp:H,addToDate:J,compareDate:K,compareDateTime:te,compareTime:ee,compareTimestamps:V,copyTimestamp:j,createDayList:me,createIntervalList:fe,createNativeLocaleFormatter:Q,daysBetween:Ne,daysInMonth:i,default:Ee,diffTimestamp:ae,findWeekday:m,getDate:c,getDateTime:X,getDayIdentifier:Ue,getDayOfYear:le,getDayTimeIdentifier:z,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:xe,getMonthNames:Oe,getStartOfMonth:I,getStartOfWeek:P,getTime:v,getTimeIdentifier:s,getWeekday:se,getWeekdayFormatter:Fe,getWeekdayNames:Ae,getWeekdaySkips:ve,getWorkWeek:ie,isBetweenDates:we,isLeapYear:B,isOverlappingDates:ke,isToday:Y,makeDate:ye,makeDateTime:he,maxTimestamp:pe,minTimestamp:ge,moveRelativeDays:ce,nextDay:p,padNumber:l,parseDate:U,parseTime:G,parseTimestamp:Re,parsed:He,prevDay:g,relativeDays:k,today:Le,updateDayOfYear:oe,updateDisabled:de,updateFormatted:w,updateMinutes:ne,updateRelative:$,updateWeekday:re,updateWorkWeek:ue,validateNumber:e,validateTimestamp:R,weeksBetween:Ce});function Be(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function qe(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ye(e,t){return 0===t?e:e.slice(0,t)}var Ve={convertToUnit:Be,indexOf:qe},Ve=Object.freeze({__proto__:null,convertToUnit:Be,default:Ve,indexOf:qe,minCharWidth:Ye}),Ke={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 u({width:e,height:t}){r.width=e,r.height=t}const d=We.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function i(){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()]),[[Ke,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:l,__renderCalendar:i}}const Ze={modelValue:{type:String,default:Le(),validator:e=>""===e||R(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,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)}),t}}};function ze(t,{startDate:e,endDate:a,times:n}){const r=We.computed(()=>ve(t.weekdays)),o=We.computed(()=>Re(e.value)),u=We.computed(()=>{return"0000-00-00"===a.value?f(o.value):Re(a.value)}),d=We.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return Q(t.locale,()=>e)}),l=We.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return Q(t.locale,(e,t)=>t?n:a)}),i=We.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return Q(t.locale,()=>e)});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=Ue(t),r=Ue(He(e[0])),o=Ue(He(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:u,lastDay:d,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===u||!0===d||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return P(e,t.weekdays,n.today)}function f(e){return Z(e,t.weekdays,n.today)}function y(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:u,dayFormatter:d,weekdayFormatter:l,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:f,dayStyleDefault:y}}function $e(e,t){e===window?window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):e.scrollTop=t}function je(e,t){e===window?window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0):e.scrollLeft=t}function Xe(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Qe(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Je(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],d=Xe(n);o<=0?d!==r&&$e(n,r):requestAnimationFrame(e=>{const t=e-u,a=d+(r-d)/Math.max(t,o)*t;$e(n,a),a!==r&&Je(n,r,o-t,e)})}function Ge(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],d=Qe(n);o<=0?d!==r&&je(n,r):requestAnimationFrame(e=>{const t=e-u,a=d+(r-d)/Math.max(t,o)*t;setHorizontalScroll(n,a),a!==r&&Ge(n,r,o-t,e)})}const et={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function tt(t,{weekdaySkips:e,times:a,scrollArea:n,parsedStart:r,parsedEnd:o,maxDays:u,size:d,headerColumnRef:l}){const i=We.computed(()=>parseInt(t.intervalStart,10)),v=We.computed(()=>parseInt(t.intervalMinutes,10)),s=We.computed(()=>parseInt(t.intervalCount,10)),m=We.computed(()=>parseFloat(t.intervalHeight)),f=We.computed(()=>{let e=0;return t.cellWidth?e=t.cellWidth:d.width>0&&l.value&&(e=l.value.offsetWidth/(t.columnCount>1?t.columnCount:u.value)),e}),c=We.computed(()=>i.value*v.value),y=We.computed(()=>s.value*m.value),h=We.computed(()=>s.value*f.value),p=We.computed(()=>_(r.value)),g=We.computed(()=>D(o.value)),w=We.computed(()=>{return me(r.value,o.value,a.today,e.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,u.value)}),k=We.computed(()=>{return w.value.map(e=>fe(e,i.value,v.value,s.value,a.now))});function _(e){return P(e,t.weekdays,a.today)}function D(e){return Z(e,t.weekdays,a.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=z(t),r=z(He(e[0])),o=z(He(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const N=We.computed(()=>{const a={timeZone:"UTC",hour12:!t.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!t.hour24Format,hour:"numeric"};return Q(t.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=We.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(t.locale,()=>e)});function M(e){const t=k.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function A(e){}function W(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function H(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientY,s=(i-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function L(e,t,a=!1,n=void 0){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,l=u.changedTouches||u.touches,i=(l&&l[0]?l[0]:d).clientX,s=(i-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&$(r,n,!0),r}function R(e,t){const a={timestamp:e};return a.timeStartPos=E,a.timeDurationHeight=x,void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e)};return a.timeStartPosX=q,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=E(e);return!(!1===a||!n.value)&&(Je(n.value,a,t),!0)}function Y(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(Ge(n.value,a,t),!0)}function x(e){return e/v.value*m.value}function O(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/m.value}function K(e){return parseInt(e,10)*v.value/f.value}function E(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}function q(e,t=!0){const a=G(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value)&&(u=h.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:k,intervalFormatter:N,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:S,showIntervalLabelDefault:M,showResourceLabelDefault:F,styleDefault:A,getTimestampAtEventInterval:W,getTimestampAtEvent:H,getTimestampAtEventX:L,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:B,scrollToTimeX:Y,timeDurationHeight:x,timeDurationWidth:O,heightToMinutes:V,widthToMinutes:K,timeStartPos:E,timeStartPosX:q}}const at={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},nt={maxDays:{type:Number,default:1}},rt={now:{type:String,validator:e=>""===e||R(e),default:""}};function ot(e){const t=We.reactive({now:Re("0000-00-00 00:00"),today:Re("0000-00-00")}),a=We.computed(()=>e.now?Re(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();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return U(new Date)}function u(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 d(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:u,updateTime:d}}function ut(r,{parsedView:o,parsedValue:u,times:d}){const e=We.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=I(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,d.today),n=Z(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ce(j(n),p,t>1?t-1:t,r.weekdays),w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=I(e),n=S(e),w(n),t=i(a.year,a.month);break;case"resource":t=1,n=ce(j(n),p,t,r.weekdays),w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const dt=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function lt(a,e,t,n){const r={};for(const o in t){const u=t[o],d=dt("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[d]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),i=e=>{const t=e;return(void 0===u.button||t.buttons>0&&t.button===u.button)&&(u.prevent&&t.preventDefault(),u.stop&&t.stopPropagation(),a(o,n(t,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(i):r[l]=[r[l],i]:r[l]=i}}return r}function it(e,t,a,n){return lt(e,t,st(a),n)}function st(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 y(e){return Object.keys(st(e))}function ct(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return lt(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return it(a,n,e,t)},getMouseEventName:st,getRawMouseEvents:y}}const vt=["moved"];function mt(d,{parsedView:l,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Le();else{let e=j(i.value);const n=a>0,r=n?p:g,o=n?N:h;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),re(e);while(0===s.value[e.weekday])e=J(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":k(e,r,u,d.weekdays);break;case"day":case"scheduler":case"agenda":k(e,r,v.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":k(e,r,v.value,d.weekdays);break}re(e),w(e),oe(e),$(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const ft=/^on[A-Z]/;function yt(e=We.getCurrentInstance()){return{emitListeners:We.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{ft.test(e)&&(t[e]=!0)}),t})}}function ht(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[We.h("span",e)]}function pt({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return We.h("button",{...a,tabindex:r?0:-1},[n,r&&ht()])}const gt={cellWidth:[Number,String]};function wt(e){const t=We.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const kt=["change"];function _t(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 Dt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const bt=Dt().isKeyCode,Tt={useNavigation:Boolean};function It(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:d,weekdaySkips:l,direction:i,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function y(e){m(e)&&bt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&bt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:D();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:k();break;case 40:g();break}}function p(){let e=j(r.value);if("month"===u.value){if(e=J(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(d.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));i.value="prev",n.value=e.date}function g(){let e=j(r.value);if("month"===u.value){if(e=J(e,{day:7}),r.value.month!==e.month)return i.value="next",void(d.value=e.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(e=J(e,{minute:parseInt(t.intervalMinutes)}));i.value="next",n.value=e.date}function w(){let e=j(r.value);i.value="prev";do{e=J(e,{day:-1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===u.value){if(e.weekday>r.value.weekday)return void(d.value=e.date)}else if("day"===u.value)return void(d.value=e.date);n.value=e.date}function k(){let e=j(r.value);i.value="next";do{e=J(e,{day:1})}while(0===l.value[e.weekday]);if("month"===u.value||"month-interval"===u.value){if(r.value.month!==e.month)return void(d.value=e.date)}else if("week"===u.value){if(e.weekday<r.value.weekday)return void(d.value=e.date)}else if("day"===u.value)return void(d.value=e.date);n.value=e.date}function _(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:-1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:-1}):"week"===u.value&&(e=J(e,{day:-7}));i.value="prev",n.value=e.date}function D(){let e=j(r.value);if("month"===u.value||"month-interval"===u.value){e=J(e,{month:1});const t=e.day<=15?1:-1;while(0===l.value[e.weekday])e=J(e,{day:t})}else"day"===u.value?e=J(e,{day:1}):"week"===u.value&&(e=J(e,{day:7}));i.value="next",n.value=e.date}function b(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=I(e):"week"===u.value&&(e=P(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}function T(){let e=j(r.value);"month"===u.value||"month-interval"===u.value?e=S(e):"week"===u.value&&(e=Z(e,t.weekdays,s.today));while(0===l.value[e.weekday])e=J(e,{day:-1});n.value=e.date}return We.onBeforeUnmount(()=>{v()}),We.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var St=We.defineComponent({name:"QCalendarScheduler",directives:[Ke],props:{...Ze,...et,...at,...nt,...rt,...gt,...Tt},emits:["update:model-value","update:model-resources","resource-expanded",...kt,...vt,...y("-date"),...y("-day-resource"),...y("-head-resources"),...y("-head-day"),...y("-resource")],setup(h,{slots:p,emit:g,expose:W}){const e=We.ref(null),H=We.ref(null),L=We.ref(null),m=We.ref(null),t=We.ref(null),f=We.ref({}),R=We.ref({}),a=We.ref({}),n=We.ref({}),d=We.ref("next"),l=We.ref(h.modelValue||Le()),i=We.ref("0000-00-00"),s=We.ref(0),w=We.ref(h.modelValue),c=We.reactive({width:0,height:0}),y=We.ref(!1),k=We.ref(!1),U=We.ref(null),B=We.ref(null),r=(We.watch(()=>h.view,()=>{s.value=0}),We.computed(()=>{return"month"===h.view?"month-interval":h.view})),Y=We.getCurrentInstance();if(null===Y)throw new Error("current instance is null");const _=yt(Y).emitListeners,D=wt(h).isSticky,{times:o,setCurrent:V,updateCurrent:K}=ot(h),{weekdaySkips:u,parsedStart:P,parsedEnd:Z,dayFormatter:z,weekdayFormatter:$,ariaDateFormatter:j,dayStyleDefault:X,getRelativeClasses:b}=(K(),V(),ze(h,{startDate:l,endDate:i,times:o})),T=We.computed(()=>{return Re(h.modelValue,o.now)||P.value||o.today}),Q=(t.value=T.value,m.value=T.value.date,ut(h,{parsedView:r,parsedValue:T,times:o})).renderValues,{rootRef:v,scrollWidth:J,__initCalendar:G,__renderCalendar:ee}=Pe(h,qe,{scrollArea:e,pane:H}),{days:I,parsedCellWidth:S,styleDefault:te}=tt(h,{weekdaySkips:u,times:o,scrollArea:e,parsedStart:P,parsedEnd:Z,maxDays:s,size:c,headerColumnRef:L}),N=mt(h,{parsedView:r,parsedValue:T,weekdaySkips:u,direction:d,maxDays:s,times:o,emittedValue:w,emit:g}).move,C=ct(g,_).getDefaultMouseEventHandlers,ae=_t(g,{days:I,lastStart:U,lastEnd:B}).checkChange,M=Dt().isKeyCode,ne=It(h,{rootRef:v,focusRef:m,focusValue:t,datesRef:f,days:I,parsedView:r,parsedValue:T,emittedValue:w,weekdaySkips:u,direction:d,times:o}).tryFocus,F=We.computed(()=>{return"day"===r.value&&parseInt(h.columnCount,10)>1?parseInt(h.columnCount,10):"day"===r.value&&h.maxDays&&h.maxDays>1?h.maxDays:I.value.length}),re=We.computed(()=>{return v.value?parseInt(window.getComputedStyle(v.value).getPropertyValue("--calendar-resources-width"),10):0}),A=We.computed(()=>{const e=parseInt(h.resourceHeight,10);return 0===e?"auto":e}),oe=We.computed(()=>{return parseInt(h.resourceMinHeight,10)}),x=We.computed(()=>{if(v.value){const e=c.width||v.value.getBoundingClientRect().width;if(e&&re.value&&F.value)return(e-J.value-re.value)/F.value+"px"}return 100/F.value+"%"});function ue(){w.value=Le()}function de(e=1){N(e)}function le(e=1){N(-e)}function ie({width:e,height:t}){c.width=e,c.height=t}function O(e){return e.date===w.value}function se(){return We.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===D.value},style:{marginRight:J.value+"px"}},[ce(),ve()])}function ce(){const e=p["head-resources"],t={days:I.value,timestamps:I.value,date:h.modelValue,resources:h.modelResources};return We.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===D.value},...C("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return We.h("div",{ref:L,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),fe()])}function me(){return We.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function fe(){const e=p["head-days-events"];return We.nextTick(()=>{if(n.value&&0===parseInt(h.columnCount,10)&&window)try{const e=window.getComputedStyle(n.value);a.value.parentElement.style.height=e.height,a.value.style.height=e.height}catch{}}),We.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&We.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:I.value,days:I.value,ref:n}})]),...he()])}function ye(){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>pe(I.value[0],e)):I.value.map(e=>pe(e))}function he(){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>we(I.value[0],e)):I.value.map(e=>we(e))}function pe(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==h.noActiveDate&&O(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(t.weekday)},u=(void 0!==e&&(o.columnIndex=e),!0===D.value?Be(S.value):x.value),d=h.weekdayStyle||X,l={width:u,maxWidth:u,minWidth:u,...d({scope:o})},i=(!0===D.value&&(l.minWidth=u),"function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{}),s=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__head--day":!0,...i,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:()=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&M(e,[13,32])&&(w.value=t.date)},...C("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return We.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&be(t,e),ht()])}function ge(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText&&E(e),!0!==h.noDefaultHeaderBtn&&q(e)]:"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&E(e),!0!==h.noDefaultHeaderBtn&&q(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&q(e),!0!==h.noDefaultHeaderText&&E(e)])):void 0}function we(e,t){const a=p["head-day-event"],n=!0!==h.noActiveDate&&O(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(e.weekday)},o=(void 0!==t&&(r.columnIndex=t),!0===D.value?Be(S.value):x.value),u={width:o,maxWidth:o,minWidth:o};return!0===D.value&&(u.minWidth=o),We.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...b(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=p["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return We.h("div",r,t&&t({scope:n})||ke(e,a))}function ke(e,t){const a=$.value(e,t||h.weekdayBreakpoints[0]>0&&S.value<=h.weekdayBreakpoints[0]);return We.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&S.value<=h.weekdayBreakpoints[1]?Ye(a,h.minWeekdayLabel):a)}function q(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return We.h("div",t,_e(e))}function _e(a){const e=!0!==h.noActiveDate&&O(a),t=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&M(e,[13,32])&&(w.value=a.date,void 0!==_.value.onClickDate)&&g("click-date",{scope:o})},...C("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=j.value(a)),r?r({scope:o}):pt(h,u,n?n({scope:o}):t)}function De(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return We.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function be(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return We.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Te(){return We.h("div",{class:"q-calendar-scheduler__body"},[Ie()])}function Ie(){return!0===D.value?We.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==D.value&&Ae(),Ne()]):!0===h.noScroll?Se():We.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return We.h("div",{ref:H,class:"q-calendar-scheduler__pane"},[Ne()])}function Ne(){return We.h("div",{class:"q-calendar-scheduler__day--container"},[!0===D.value&&!0!==h.noHeader&&se(),Ce()])}function Ce(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Me(e,t,a,void 0!==e.children?e.expanded:n)})}function Me(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?Be(parseInt(e.height,10)):A.value?Be(A.value):"auto",oe.value>0&&(r.minHeight=Be(oe.value)),We.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,We.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ce(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?Be(parseInt(t.height,10)):A.value?Be(A.value):"auto",parseInt(h.resourceMinHeight,10)>0&&(o.minHeight=Be(parseInt(h.resourceMinHeight,10))),h.resourceStyle||te),d=t[h.resourceLabel],l=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,i={resource:t,timestamps:I.value,days:I.value,resourceIndex:e,indentLevel:a,label:d},s=t[h.resourceKey],c=(i.droppable=k.value===s,"function"===typeof h.resourceClass?h.resourceClass({scope:i}):{});return We.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{R.value[t[h.resourceKey]]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===D.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:i})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",i)?k.value=s:k.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",i)?k.value=s:k.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",i)?k.value=s:k.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",i)?k.value=s:k.value="")},onKeydown:e=>{M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{M(e,[13,32])&&void 0!==_.value.onClickResource&&g("click-resource",{scope:i,event:e})},...C("-resource",e=>{return{scope:i,event:e}})},[[We.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:i})}}),We.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:i}):d]),ht()]])}function Ae(e,t,a=0,n=!0){const r=p["resource-days"],o=!0===D.value?Be(S.value):x.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:I.value,days:I.value},d={},l=(d.height=parseInt(h.resourceHeight,10)>0?Be(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(d.minHeight=Be(parseInt(h.resourceMinHeight,10))),{class:"q-calendar-scheduler__resource--days",style:d});return We.h("div",l,[...xe(e,t,a,n),r&&r({scope:u})])}function xe(t,a,n=0,r=!0){return 1===I.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>Oe(I.value[0],e,t,a,n,r)):I.value.map(e=>Oe(e,void 0,t,a,n,r))}function Oe(e,t,a,n,r=0,o=!0){const u=p.day,d=h.dayStyle||X,l=!0!==h.noActiveDate&&T.value.date===e.date,i=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),s=k.value===i,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:l,droppable:s},v=!0===D.value?Be(S.value):x.value,m={width:v,maxWidth:v,...d({scope:c})},f=(m.height=parseInt(h.resourceHeight,10)>0?Be(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(m.minHeight=Be(parseInt(h.resourceMinHeight,10))),"function"===typeof h.dayClass?h.dayClass({scope:c}):{}),y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return We.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,...b(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",c)?k.value=i:k.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",c)?k.value=i:k.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",c)?k.value=i:k.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",c)?k.value=i:k.value="")},onKeydown:e=>{M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{M(e,[13,32])&&(w.value=c.timestamp.date,void 0!==_.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...C("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),ht()])}function Ee(){return We.h("div",{},"No resources have been defined")}function qe(){const{start:e,end:t,maxDays:a}=Q.value,n=(l.value===e.date&&i.value===t.date&&s.value===a||(l.value=e.date,i.value=t.date,s.value=a),c.width>0),r=h.modelResources&&h.modelResources.length>0,o=We.withDirectives(We.h("div",{key:l.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==D.value&&!0!==h.noHeader&&se(),!0===n&&!0===r&&Te(),!1===r&&Ee()]),[[Ke,ie]]);if(!0!==h.animated)return o;{const u="q-calendar--"+("prev"===d.value?h.transitionPrev:h.transitionNext);return We.h(We.Transition,{name:u,appear:!0},()=>o)}}return We.watch([I],ae,{deep:!0,immediate:!0}),We.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Ue(He(e)),n=Ue(He(t));d.value=a>=n?"next":"prev"}w.value=e}m.value=e}),We.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Ue(He(e)),n=Ue(He(t));d.value=a>=n?"next":"prev"}g("update:model-value",e)}}),We.watch(m,e=>{e&&(t.value=Re(e))}),We.watch(t,()=>{f.value[m.value]?f.value[m.value].focus():ne()}),We.watch(()=>h.maxDays,e=>{s.value=e}),We.onBeforeUpdate(()=>{f.value={},a.value={},n.value={},R.value={}}),We.onMounted(()=>{G()}),W({prev:le,next:de,move:N,moveToToday:ue,updateCurrent:K}),()=>ee()}});const Nt="4.0.2";Ee={version:Nt,QCalendarScheduler:St,...Ee,...Ve,install(e){e.component(St.name,St)}};return Ee});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],u=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===l;if(!(l<getDayIdentifier(e)))while((!y||c.length<s)&&c.length<u){if(v=getDayIdentifier(m),y=y||v>l&&c.length>=s,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:u}=c(n,e);return{"q-past-day":!0!==d&&!0!==u&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==u&&!0!==i&&!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===u,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===u),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=vue.computed(()=>{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=vue.computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}),d=vue.computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:u,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:u,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:g();break;case 34:T();break;case 35:w();break;case 36:I();break;case 37:D();break;case 38:h();break;case 39:k();break;case 40:_();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:s,expose:R}){const e=vue.ref(null),L=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),i=vue.ref("0000-00-00"),t=vue.ref(0),v=vue.ref(c.modelValue),y=vue.ref(null),a=vue.ref(null),p=vue.ref({}),u=vue.reactive({width:0,height:0}),f=vue.ref(!1),x=vue.ref(null),Y=vue.ref(null),n=(vue.watch(()=>c.view,()=>{t.value=0}),vue.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=vue.getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:h,setCurrent:U,updateCurrent:_}=useTimes(c),{weekdaySkips:D,parsedStart:q,dayFormatter:B,weekdayFormatter:P,ariaDateFormatter:z,dayStyleDefault:k,getRelativeClasses:g}=(_(),U(),useCommon(c,{startDate:d,endDate:i,times:h})),T=vue.computed(()=>{return parseTimestamp(c.modelValue,h.now)||q.value||h.today}),V=(a.value=T.value,y.value=T.value.date,useRenderValues(c,{parsedView:n,times:h,parsedValue:T})).renderValues,{rootRef:K,__initCalendar:$,__renderCalendar:X}=useCalendar(c,Ae,{scrollArea:e,pane:L}),{days:I,parsedStartDate:w,parsedEndDate:N}=useTask(c,s,{weekdaySkips:D,times:h}),M=useMove(c,{parsedView:n,parsedValue:T,weekdaySkips:D,direction:o,maxDays:t,times:h,emittedValue:v,emit:s}).move,E=useMouse(s,l).getDefaultMouseEventHandlers,Z=useCheckChange(s,{days:I,lastStart:x,lastEnd:Y}).checkChange,S=useEvents().isKeyCode,j=useKeyboard(c,{rootRef:K,focusRef:y,focusValue:a,datesRef:p,days:I,parsedView:n,parsedValue:T,emittedValue:v,weekdaySkips:D,direction:o,times:h}).tryFocus,O=vue.ref(!0),b=vue.computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),A=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==A.value}),W=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),J=vue.computed(()=>{return parseInt(c.dayHeight,10)}),G=vue.computed(()=>{return parseInt(c.dayMinHeight,10)});function ee(){v.value=today()}function te(e=1){M(e)}function ae(e=1){M(-e)}function ne({width:e,height:t}){u.width=e,u.height=t}function C(e){return e.date===v.value}function re(e,t,a){const n=m.day,r=c.dayStyle||k,o=!0!==c.noActiveDate&&T.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},i=convertToUnit(b.value),u={width:i,minWidth:i,maxWidth:i,...r({scope:d})},s="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return vue.h("div",{tabindex:!0===A.value?0:-1,class:{"q-calendar-task__task--day":!0,...s,...g(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:u,onFocus:()=>{A.value},...E("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function oe(t,a){return I.value.map(e=>re(e,t,a))}function de(e,t){const a=m.days,n={timestamps:I.value,days:I.value,task:e,taskIndex:t,cellWidth:b.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[oe(e,t),a&&a({scope:n})])}function ie(t,e,a=0,n=!0){const r=m.task,o={start:w.value,end:N.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},u=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===O.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:i},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,s("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):J.value>0?convertToUnit(J.value):"auto",o=G.value>0?convertToUnit(G.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[ie(e,t,a,n),de(e,t)]));return void 0!==e.children?[i,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[se(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function se(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)})}function le(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===O.value}},[se()])}function ce(e,t){const a=m["footer-task"],n={start:w.value,end:N.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===O.value},style:o},[a&&a({scope:n})])}function me(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(b.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...i,...g(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:d},[n&&n({scope:r})])}function ve(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[I.value.map(e=>me(e,t,a))])}function ye(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ve(e,t)]})})}function pe(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===O.value}},ye())}function fe(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Se(),le(),pe()])}function he(){const e=m["head-tasks"],t={start:w.value,end:N.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===O.value},style:n},[e&&e({scope:t})])}function _e(e,t){const a=m["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:w.value,end:N.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===O.value},style:r},[a&&a({scope:o})])}function F(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&C(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||De(e,c.shortWeekdayLabel))}function De(e,t){const a=P.value(e,t||c.weekdayBreakpoints[0]>0&&b.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&b.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function H(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,ke(e))}function ke(a){const e=!0!==c.noActiveDate&&C(a),t=B.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&S(e,[13,32])&&(v.value=a.date,void 0!==l.value.onClickDate)&&s("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(v.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=z.value(a)),r?r({scope:o}):useButton(c,i,n?n({scope:o}):t)}function ge(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&H(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&H(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&H(e),!0!==c.noDefaultHeaderText&&F(e)])):void 0}function Te(e,t,a){const n=m["title-day"],r=convertToUnit(b.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:b.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},u=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...i,...g(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:o},[n&&n({scope:d}),useFocusHelper()])}function Ie(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&C(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||k,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(b.value),u={width:i,minWidth:i,maxWidth:i,...o({scope:r})},s=t.date,l={key:s,ref:e=>{p.value[s]=e},tabindex:!0===W.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...g(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{!0===W.value&&(y.value=s)},onKeydown:e=>{!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&S(e,[13,32])&&(v.value=t.date)},...E("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ge(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function we(){return I.value.map(e=>Ie(e))}function Ne(t,a){return I.value.map(e=>Te(e,t,a))}function Me(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[...we()])}function Ee(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...Ne(e,t)])}function Se(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===O.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[he(),Me()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[_e(e,t),Ee(e,t)]))])}function Oe(){return vue.h("div",{class:"q-calendar-task__body"},[be()])}function be(){return vue.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function Ae(){const{start:e,end:t}=V.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Oe()]),[[ResizeObserver$1,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([I],Z,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(v.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}v.value=e}y.value=e}),vue.watch(v,(e,t)=>{if(v.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}s("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value[y.value]?p.value[y.value].focus():j()}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{$()}),R({prev:ae,next:te,move:M,moveToToday:ee,updateCurrent:_}),()=>X()}});const version="4.0.1";exports.QCalendarTask=QCalendarTask,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],u=42,s=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),v=0,y=v===l;if(!(l<getDayIdentifier(e)))while((!y||c.length<s)&&c.length<u){if(v=getDayIdentifier(m),y=y||v>l&&c.length>=s,y)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const d=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>getWeekdaySkips(t.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{return"0000-00-00"===a.value?y(o.value):parseTimestamp(a.value)}),i=vue.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),u=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:u}=c(n,e);return{"q-past-day":!0!==d&&!0!==u&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==u&&!0!==i&&!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===u,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===u),"q-disabled-day disabled":!0===e.disabled}}function v(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:v,endOfWeek:y,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Set,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=vue.computed(()=>{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=vue.computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}),d=vue.computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:u,parsedValue:s,weekdaySkips:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(u.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:u,direction:s,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function v(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function y(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:g();break;case 34:T();break;case 35:w();break;case 36:I();break;case 37:D();break;case 38:h();break;case 39:k();break;case 40:_();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="prev",n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));s.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(0===u.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));s.value="prev",n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===u.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));s.value="next",n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===u.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{m()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:y}}var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:s,expose:R}){const e=vue.ref(null),L=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),i=vue.ref("0000-00-00"),t=vue.ref(0),v=vue.ref(c.modelValue),y=vue.ref(null),a=vue.ref(null),p=vue.ref({}),u=vue.reactive({width:0,height:0}),f=vue.ref(!1),x=vue.ref(null),Y=vue.ref(null),n=(vue.watch(()=>c.view,()=>{t.value=0}),vue.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=vue.getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:h,setCurrent:U,updateCurrent:_}=useTimes(c),{weekdaySkips:D,parsedStart:q,dayFormatter:B,weekdayFormatter:P,ariaDateFormatter:z,dayStyleDefault:k,getRelativeClasses:g}=(_(),U(),useCommon(c,{startDate:d,endDate:i,times:h})),T=vue.computed(()=>{return parseTimestamp(c.modelValue,h.now)||q.value||h.today}),V=(a.value=T.value,y.value=T.value.date,useRenderValues(c,{parsedView:n,times:h,parsedValue:T})).renderValues,{rootRef:K,__initCalendar:$,__renderCalendar:X}=useCalendar(c,Ae,{scrollArea:e,pane:L}),{days:I,parsedStartDate:w,parsedEndDate:N}=useTask(c,s,{weekdaySkips:D,times:h}),M=useMove(c,{parsedView:n,parsedValue:T,weekdaySkips:D,direction:o,maxDays:t,times:h,emittedValue:v,emit:s}).move,E=useMouse(s,l).getDefaultMouseEventHandlers,Z=useCheckChange(s,{days:I,lastStart:x,lastEnd:Y}).checkChange,S=useEvents().isKeyCode,j=useKeyboard(c,{rootRef:K,focusRef:y,focusValue:a,datesRef:p,days:I,parsedView:n,parsedValue:T,emittedValue:v,weekdaySkips:D,direction:o,times:h}).tryFocus,O=vue.ref(!0),b=vue.computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),A=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==A.value}),W=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),J=vue.computed(()=>{return parseInt(c.dayHeight,10)}),G=vue.computed(()=>{return parseInt(c.dayMinHeight,10)});function ee(){v.value=today()}function te(e=1){M(e)}function ae(e=1){M(-e)}function ne({width:e,height:t}){u.width=e,u.height=t}function C(e){return e.date===v.value}function re(e,t,a){const n=m.day,r=c.dayStyle||k,o=!0!==c.noActiveDate&&T.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},i=convertToUnit(b.value),u={width:i,minWidth:i,maxWidth:i,...r({scope:d})},s="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return vue.h("div",{tabindex:!0===A.value?0:-1,class:{"q-calendar-task__task--day":!0,...s,...g(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:u,onFocus:()=>{A.value},...E("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function oe(t,a){return I.value.map(e=>re(e,t,a))}function de(e,t){const a=m.days,n={timestamps:I.value,days:I.value,task:e,taskIndex:t,cellWidth:b.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[oe(e,t),a&&a({scope:n})])}function ie(t,e,a=0,n=!0){const r=m.task,o={start:w.value,end:N.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},u=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===O.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:i},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,s("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):J.value>0?convertToUnit(J.value):"auto",o=G.value>0?convertToUnit(G.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[ie(e,t,a,n),de(e,t)]));return void 0!==e.children?[i,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[se(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function se(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)})}function le(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===O.value}},[se()])}function ce(e,t){const a=m["footer-task"],n={start:w.value,end:N.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===O.value},style:o},[a&&a({scope:n})])}function me(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(b.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...i,...g(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:d},[n&&n({scope:r})])}function ve(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[I.value.map(e=>me(e,t,a))])}function ye(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ve(e,t)]})})}function pe(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===O.value}},ye())}function fe(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Se(),le(),pe()])}function he(){const e=m["head-tasks"],t={start:w.value,end:N.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===O.value},style:n},[e&&e({scope:t})])}function _e(e,t){const a=m["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:w.value,end:N.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===O.value},style:r},[a&&a({scope:o})])}function F(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&C(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||De(e,c.shortWeekdayLabel))}function De(e,t){const a=P.value(e,t||c.weekdayBreakpoints[0]>0&&b.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&b.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function H(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,ke(e))}function ke(a){const e=!0!==c.noActiveDate&&C(a),t=B.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&S(e,[13,32])&&(v.value=a.date,void 0!==l.value.onClickDate)&&s("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(v.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=z.value(a)),r?r({scope:o}):useButton(c,i,n?n({scope:o}):t)}function ge(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&H(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&H(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&H(e),!0!==c.noDefaultHeaderText&&F(e)])):void 0}function Te(e,t,a){const n=m["title-day"],r=convertToUnit(b.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:b.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},u=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...i,...g(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:o},[n&&n({scope:d}),useFocusHelper()])}function Ie(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&C(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||k,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(b.value),u={width:i,minWidth:i,maxWidth:i,...o({scope:r})},s=t.date,l={key:s,ref:e=>{p.value[s]=e},tabindex:!0===W.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...g(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{!0===W.value&&(y.value=s)},onKeydown:e=>{!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&S(e,[13,32])&&(v.value=t.date)},...E("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ge(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function we(){return I.value.map(e=>Ie(e))}function Ne(t,a){return I.value.map(e=>Te(e,t,a))}function Me(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[...we()])}function Ee(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...Ne(e,t)])}function Se(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===O.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[he(),Me()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[_e(e,t),Ee(e,t)]))])}function Oe(){return vue.h("div",{class:"q-calendar-task__body"},[be()])}function be(){return vue.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function Ae(){const{start:e,end:t}=V.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Oe()]),[[ResizeObserver$1,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([I],Z,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(v.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}v.value=e}y.value=e}),vue.watch(v,(e,t)=>{if(v.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}s("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value[y.value]?p.value[y.value].focus():j()}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{$()}),R({prev:ae,next:te,move:M,moveToToday:ee,updateCurrent:_}),()=>X()}});const version="4.0.2";exports.QCalendarTask=QCalendarTask,exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const s=getDayIdentifier(parsed(t));o<=s&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],s=42,u=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,v=y===l;if(!(l<getDayIdentifier(e)))while((!v||c.length<u)&&c.length<s){if(y=getDayIdentifier(m),v=v||y>l&&c.length>=u,v)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);d.push(updateMinutes(s,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?v(o.value):parseTimestamp(a.value)}),i=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),u=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==i&&!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===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:v,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=computed(()=>{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}),d=computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:u,weekdaySkips:l,direction:c,maxDays:m,times:y,emittedValue:v,emit:p}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),v.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:s,direction:u,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function v(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:g();break;case 34:T();break;case 35:w();break;case 36:I();break;case 37:D();break;case 38:h();break;case 39:k();break;case 40:_();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="prev",n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));u.value="prev",n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));u.value="next",n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:v}}var QCalendarTask=defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:u,expose:L}){const e=ref(null),U=ref(null),o=ref("next"),d=ref(c.modelValue||today()),i=ref("0000-00-00"),t=ref(0),y=ref(c.modelValue),v=ref(null),a=ref(null),p=ref({}),s=reactive({width:0,height:0}),f=ref(!1),x=ref(null),Y=ref(null),n=(watch(()=>c.view,()=>{t.value=0}),computed(()=>{return"month"===c.view?"month-interval":c.view})),r=getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:_,setCurrent:q,updateCurrent:D}=useTimes(c),{weekdaySkips:k,parsedStart:B,dayFormatter:P,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:g,getRelativeClasses:T}=(D(),q(),useCommon(c,{startDate:d,endDate:i,times:_})),I=computed(()=>{return parseTimestamp(c.modelValue,_.now)||B.value||_.today}),V=(a.value=I.value,v.value=I.value.date,useRenderValues(c,{parsedView:n,times:_,parsedValue:I})).renderValues,{rootRef:K,__initCalendar:X,__renderCalendar:Z}=useCalendar(c,We,{scrollArea:e,pane:U}),{days:w,parsedStartDate:N,parsedEndDate:M}=useTask(c,u,{weekdaySkips:k,times:_}),E=useMove(c,{parsedView:n,parsedValue:I,weekdaySkips:k,direction:o,maxDays:t,times:_,emittedValue:y,emit:u}).move,S=useMouse(u,l).getDefaultMouseEventHandlers,j=useCheckChange(u,{days:w,lastStart:x,lastEnd:Y}).checkChange,O=useEvents().isKeyCode,Q=useKeyboard(c,{rootRef:K,focusRef:v,focusValue:a,datesRef:p,days:w,parsedView:n,parsedValue:I,emittedValue:y,weekdaySkips:k,direction:o,times:_}).tryFocus,b=ref(!0),A=computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),W=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),J=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==W.value}),C=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),G=computed(()=>{return parseInt(c.dayHeight,10)}),ee=computed(()=>{return parseInt(c.dayMinHeight,10)});function te(){y.value=today()}function ae(e=1){E(e)}function ne(e=1){E(-e)}function re({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===y.value}function oe(e,t,a){const n=m.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&I.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...r({scope:d})},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return h("div",{tabindex:!0===W.value?0:-1,class:{"q-calendar-task__task--day":!0,...u,...T(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:s,onFocus:()=>{W.value},...S("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function de(t,a){return w.value.map(e=>oe(e,t,a))}function ie(e,t){const a=m.days,n={timestamps:w.value,days:w.value,task:e,taskIndex:t,cellWidth:A.value};return h("div",{class:"q-calendar-task__task--days-row"},[de(e,t),a&&a({scope:n})])}function se(t,e,a=0,n=!0){const r=m.task,o={start:N.value,end:M.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},s=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===b.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:i},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,u("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):G.value>0?convertToUnit(G.value):"auto",o=ee.value>0?convertToUnit(ee.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[se(e,t,a,n),ie(e,t)]));return void 0!==e.children?[i,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[le(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function le(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)})}function ce(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===b.value}},[le()])}function me(e,t){const a=m["footer-task"],n={start:N.value,end:M.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===b.value},style:o},[a&&a({scope:n})])}function ye(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(A.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...i,...T(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:d},[n&&n({scope:r})])}function ve(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[w.value.map(e=>ye(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[me(e,t),ve(e,t)]})})}function fe(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===b.value}},pe())}function he(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Oe(),ce(),fe()])}function _e(){const e=m["head-tasks"],t={start:N.value,end:M.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===b.value},style:n},[e&&e({scope:t})])}function De(e,t){const a=m["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:N.value,end:M.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===b.value},style:r},[a&&a({scope:o})])}function H(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=z.value(e,t||c.weekdayBreakpoints[0]>0&&A.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&A.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function R(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&F(a),t=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===J.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===J.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(y.value=a.date,void 0!==l.value.onClickDate)&&u("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=$.value(a)),r?r({scope:o}):useButton(c,i,n?n({scope:o}):t)}function Te(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&H(e),!0!==c.noDefaultHeaderBtn&&R(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&H(e),!0!==c.noDefaultHeaderBtn&&R(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&R(e),!0!==c.noDefaultHeaderText&&H(e)])):void 0}function Ie(e,t,a){const n=m["title-day"],r=convertToUnit(A.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:A.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},s=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...i,...T(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:o},[n&&n({scope:d}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...o({scope:r})},u=t.date,l={key:u,ref:e=>{p.value[u]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...T(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:s,onFocus:()=>{!0===C.value&&(v.value=u)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(y.value=t.date)},...S("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&Te(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Ne(){return w.value.map(e=>we(e))}function Me(t,a){return w.value.map(e=>Ie(e,t,a))}function Ee(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Ne()])}function Se(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...Me(e,t)])}function Oe(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===b.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[_e(),Ee()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[De(e,t),Se(e,t)]))])}function be(){return h("div",{class:"q-calendar-task__body"},[Ae()])}function Ae(){return h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function We(){const{start:e,end:t}=V.value,a=(d.value=e.date,i.value=t.date,s.width>0),n=withDirectives(h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&be()]),[[ResizeObserver$1,re]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([w],j,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}v.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(v,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{p.value[v.value]?p.value[v.value].focus():Q()}),onBeforeUpdate(()=>{p.value={}}),onMounted(()=>{X()}),L({prev:ne,next:ae,move:E,moveToToday:te,updateCurrent:D}),()=>Z()}});const version="4.0.1";var Plugin={version:version,QCalendarTask:QCalendarTask,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarTask.name,QCalendarTask)}};export{QCalendarTask,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const s=getDayIdentifier(parsed(t));o<=s&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const m=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(m===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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)/MILLISECONDS_IN_WEEK);return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+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 copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],s=42,u=0){const l=getDayIdentifier(t),c=[];let m=copyTimestamp(e),y=0,v=y===l;if(!(l<getDayIdentifier(e)))while((!v||c.length<u)&&c.length<s){if(y=getDayIdentifier(m),v=v||y>l&&c.length>=u,v)break;if(0===n[m.weekday]);else{const p=copyTimestamp(m);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p)}m=relativeDays(m,nextDay)}return c}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);d.push(updateMinutes(s,i,o))}return d}function createNativeLocaleFormatter(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(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),o}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){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(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){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 getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(a,e,t,n){const r={};for(const o in t){const d=t[o],i=toCamelCase("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[i]){const s="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),u=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};s in r?Array.isArray(r[s])?r[s].push(u):r[s]=[r[s],u]:r[s]=u}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(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 getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return getMouseEventHandlers(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return getDefaultMouseEventHandlers(a,n,e,t)},getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={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 useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>getWeekdaySkips(t.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?v(o.value):parseTimestamp(a.value)}),i=computed(()=>{const e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(t.locale,()=>e)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(t.locale,(e,t)=>t?n:a)}),u=computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(t.locale,()=>e)});function l(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=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function m(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==i&&!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===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:m,startOfWeek:y,endOfWeek:v,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Set,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=computed(()=>{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}),d=computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(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),i(e,t.now),d(e,t.today)}function o(){return parseDate(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 i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:u,weekdaySkips:l,direction:c,maxDays:m,times:y,emittedValue:v,emit:p}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,m.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),v.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(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 useEvents(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEvents().isKeyCode,useNavigationProps={useNavigation:Boolean};function useKeyboard(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,weekdaySkips:s,direction:u,times:l}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function m(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function v(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:g();break;case 34:T();break;case 35:w();break;case 36:I();break;case 37:D();break;case 38:h();break;case 39:k();break;case 40:_();break}}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="prev",n.value=e.date}function _(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=addToDate(e,{minute:parseInt(t.intervalMinutes)}));u.value="next",n.value=e.date}function D(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function k(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(0===s.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(i.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(i.value=e.date)}else if("day"===d.value)return void(i.value=e.date);n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:-1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:-1}):"week"===d.value&&(e=addToDate(e,{day:-7}));u.value="prev",n.value=e.date}function T(){let e=copyTimestamp(r.value);if("month"===d.value||"month-interval"===d.value){e=addToDate(e,{month:1});const t=e.day<=15?1:-1;while(0===s.value[e.weekday])e=addToDate(e,{day:t})}else"day"===d.value?e=addToDate(e,{day:1}):"week"===d.value&&(e=addToDate(e,{day:7}));u.value="next",n.value=e.date}function I(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getStartOfMonth(e):"week"===d.value&&(e=getStartOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);"month"===d.value||"month-interval"===d.value?e=getEndOfMonth(e):"week"===d.value&&(e=getEndOfWeek(e,t.weekdays,l.today));while(0===s.value[e.weekday])e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{m()}),watch(()=>t.useNavigation,e=>{(!0===e?c:m)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:m,tryFocus:v}}var QCalendarTask=defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:u,expose:L}){const e=ref(null),U=ref(null),o=ref("next"),d=ref(c.modelValue||today()),i=ref("0000-00-00"),t=ref(0),y=ref(c.modelValue),v=ref(null),a=ref(null),p=ref({}),s=reactive({width:0,height:0}),f=ref(!1),x=ref(null),Y=ref(null),n=(watch(()=>c.view,()=>{t.value=0}),computed(()=>{return"month"===c.view?"month-interval":c.view})),r=getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:_,setCurrent:q,updateCurrent:D}=useTimes(c),{weekdaySkips:k,parsedStart:B,dayFormatter:P,weekdayFormatter:z,ariaDateFormatter:V,dayStyleDefault:g,getRelativeClasses:T}=(D(),q(),useCommon(c,{startDate:d,endDate:i,times:_})),I=computed(()=>{return parseTimestamp(c.modelValue,_.now)||B.value||_.today}),K=(a.value=I.value,v.value=I.value.date,useRenderValues(c,{parsedView:n,times:_,parsedValue:I})).renderValues,{rootRef:$,__initCalendar:X,__renderCalendar:Z}=useCalendar(c,We,{scrollArea:e,pane:U}),{days:w,parsedStartDate:N,parsedEndDate:M}=useTask(c,u,{weekdaySkips:k,times:_}),E=useMove(c,{parsedView:n,parsedValue:I,weekdaySkips:k,direction:o,maxDays:t,times:_,emittedValue:y,emit:u}).move,S=useMouse(u,l).getDefaultMouseEventHandlers,j=useCheckChange(u,{days:w,lastStart:x,lastEnd:Y}).checkChange,O=useEvents().isKeyCode,Q=useKeyboard(c,{rootRef:$,focusRef:v,focusValue:a,datesRef:p,days:w,parsedView:n,parsedValue:I,emittedValue:y,weekdaySkips:k,direction:o,times:_}).tryFocus,b=ref(!0),A=computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),W=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),J=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==W.value}),C=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),G=computed(()=>{return parseInt(c.dayHeight,10)}),ee=computed(()=>{return parseInt(c.dayMinHeight,10)});function te(){y.value=today()}function ae(e=1){E(e)}function ne(e=1){E(-e)}function re({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===y.value}function oe(e,t,a){const n=m.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&I.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...r({scope:d})},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return h("div",{tabindex:!0===W.value?0:-1,class:{"q-calendar-task__task--day":!0,...u,...T(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:s,onFocus:()=>{W.value},...S("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function de(t,a){return w.value.map(e=>oe(e,t,a))}function ie(e,t){const a=m.days,n={timestamps:w.value,days:w.value,task:e,taskIndex:t,cellWidth:A.value};return h("div",{class:"q-calendar-task__task--days-row"},[de(e,t),a&&a({scope:n})])}function se(t,e,a=0,n=!0){const r=m.task,o={start:N.value,end:M.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},s=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===b.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:i},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,u("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):G.value>0?convertToUnit(G.value):"auto",o=ee.value>0?convertToUnit(ee.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[se(e,t,a,n),ie(e,t)]));return void 0!==e.children?[i,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[le(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function le(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)})}function ce(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===b.value}},[le()])}function me(e,t){const a=m["footer-task"],n={start:N.value,end:M.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===b.value},style:o},[a&&a({scope:n})])}function ye(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(A.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...i,...T(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:d},[n&&n({scope:r})])}function ve(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[w.value.map(e=>ye(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[me(e,t),ve(e,t)]})})}function fe(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===b.value}},pe())}function he(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Oe(),ce(),fe()])}function _e(){const e=m["head-tasks"],t={start:N.value,end:M.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===b.value},style:n},[e&&e({scope:t})])}function De(e,t){const a=m["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:N.value,end:M.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===b.value},style:r},[a&&a({scope:o})])}function H(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=z.value(e,t||c.weekdayBreakpoints[0]>0&&A.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&A.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function R(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&F(a),t=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===J.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===J.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(y.value=a.date,void 0!==l.value.onClickDate)&&u("click-date",{scope:o})},...S("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=V.value(a)),r?r({scope:o}):useButton(c,i,n?n({scope:o}):t)}function Te(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&H(e),!0!==c.noDefaultHeaderBtn&&R(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&H(e),!0!==c.noDefaultHeaderBtn&&R(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&R(e),!0!==c.noDefaultHeaderText&&H(e)])):void 0}function Ie(e,t,a){const n=m["title-day"],r=convertToUnit(A.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:A.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},s=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...i,...T(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:o},[n&&n({scope:d}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...o({scope:r})},u=t.date,l={key:u,ref:e=>{p.value[u]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...T(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:s,onFocus:()=>{!0===C.value&&(v.value=u)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(y.value=t.date)},...S("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&Te(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Ne(){return w.value.map(e=>we(e))}function Me(t,a){return w.value.map(e=>Ie(e,t,a))}function Ee(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Ne()])}function Se(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...Me(e,t)])}function Oe(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===b.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[_e(),Ee()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[De(e,t),Se(e,t)]))])}function be(){return h("div",{class:"q-calendar-task__body"},[Ae()])}function Ae(){return h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function We(){const{start:e,end:t}=K.value,a=(d.value=e.date,i.value=t.date,s.width>0),n=withDirectives(h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&be()]),[[ResizeObserver$1,re]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([w],j,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}v.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(v,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{p.value[v.value]?p.value[v.value].focus():Q()}),onBeforeUpdate(()=>{p.value={}}),onMounted(()=>{X()}),L({prev:ne,next:ae,move:E,moveToToday:te,updateCurrent:D}),()=>Z()}});const version="4.0.2";var Plugin={version:version,QCalendarTask:QCalendarTask,...Timestamp$2,...helpers$1,install(e){e.component(QCalendarTask.name,QCalendarTask)}};export{QCalendarTask,Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* 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.QCalendarTask=t(e.Vue))})(this,function(Ee){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?)|)/,C=[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],M=28,F=31,u=12,n=1,h=1,i=7,r=60,o=24,W=0,x=6e4,R=36e5,H=864e5,L=6048e5,B=60,U=3600,V=86400,Y=604800,Z={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},$={hour:0,minute:0};function t(e){return!!a.exec(e)}function Me(e){const t=a.exec(e);return t?{date:e,time:d(parseInt(t[6],10)||0,2)+":"+d(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 j(e,t=!1){const a=t?"UTC":"";return g({date:d(e[`get${a}FullYear`](),4)+"-"+d(e[`get${a}Month`]()+1,2)+"-"+d(e[`get${a}Date`](),2),time:d(e[`get${a}Hours`]()||0,2)+":"+d(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 d(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function z(e){return 1===(e%4===0^e%100===0^e%400===0)}function l(e,t){return(z(e)?E:C)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>M&&e.day>l(e.year,e.month)&&(e.day=h,++e.month,e.month>u)&&(e.month=n,++e.year),e}function k(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=u),e.day=l(e.year,e.month)),e}function Fe(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,d(t,2),d(a,2)].join("-")}function P(e){return e===Fe()}function I(e,t,a){let n=A(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],k),n=g(n),a&&(n=w(n,a,n.hasTime)),n}function S(e,t,a){let n=A(e);const r=l(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=k(n);return n=m(n,t[t.length-1],p),n=g(n),a&&(n=w(n,a,n.hasTime)),n}function N(e){const t=A(e);return t.day=h,g(t),t}function O(e){const t=A(e);return t.day=l(t.year,t.month),g(t),t}function K(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 Q(e,t){return JSON.stringify(e)===JSON.stringify(t)}function X(e,t){return v(e)===v(t)}function J(e,t){return y(e)===y(t)}function G(e,t){return f(e)===f(t)}function We(e,t){let a=Me(e);return null===a?null:(a=g(a),t&&w(a,t,a.hasTime),a)}function xe(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function c(e){return xe(e)+s(e)}function ee(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 w(e,t,a=!1){let n=xe(t),r=xe(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function te(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=y(e),a&&w(e,a,!0),e}function ae(e){return e.weekday=ie(e),e}function ne(e){return e.doy=de(e),e}function re(e){return e.workweek=ue(e),e}function oe(e,t,a,n,r){const o=xe(e);if(void 0!==t){const i=xe(Me(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=xe(Me(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=Me(r[u][0]),c=Me(r[u][1]);if(ke(e,s,c)){e.disabled=!0;break}}else{const v=xe(We(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=y(e),e.date=v(e),e.weekday=ie(e),e.doy=de(e),e.workweek=ue(e),e}function de(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 ue(e){0===e.year&&(e=We(Fe()));const t=ye(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)/L);return 1+Math.floor(o)}function ie(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 A(e){return{...e}}function v(e){let t=d(e.year,4)+"-"+d(e.month,2);return e.hasDay&&(t+="-"+d(e.day,2)),t}function y(e){return e.hasTime?d(e.hour,2)+":"+d(e.minute,2):""}function f(e){return v(e)+" "+(e.hasTime?y(e):"00:00")}function le(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return _(e,t,a,n)}function _(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function se(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<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function ce(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=xe(t),c=[];let v=A(e),y=0,f=y===s;if(!(s<xe(e)))while((!f||c.length<l)&&c.length<i){if(y=xe(v),f=f||y>s&&c.length>=l,f)break;if(0===n[v.weekday]);else{const m=A(v);g(m),w(m,a),oe(m,r,o,d,u),c.push(m)}v=_(v,p)}return c}function ve(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=A(t);d.push(te(i,u,o))}return d}function D(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(fe(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+f(t)),o}}}function ye(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 fe(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 me(e){return isFinite(parseInt(e,10))}function he(e,t=!1){const a=!0===t?c:xe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function pe(e,t=!1){const a=!0===t?c:xe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ke(e,t,a,n){const r=xe(e)+(!0===n?s(e):0),o=xe(t)+(!0===n?s(t):0),d=xe(a)+(!0===n?s(a):0);return r>=o&&r<=d}function we(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 q(e,t){const n=A(e);let r;return _e(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ge.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ie(n,ge[r]),g(n),n}const ge=["minute","hour","day","month"];function _e(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function De(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,be(e)}return e}function be(e){if(e.hour>=o||e.hour<0){const t=Math.floor(e.hour/o);e.hour-=t*o,e.day+=t,Te(e)}return e}function Te(t){b(t);let a=l(t.year,t.month);if(t.day>a){++t.month,t.month>u&&b(t);let e=t.day-a;a=l(t.year,t.month);do{e>a&&(++t.month,t.month>u&&b(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&&b(t),a=l(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&b(t),a=l(t.year,t.month))}while(e>a);t.day=a-e}return t}function b(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 Ie(e,t){switch(t){case"minute":return De(e);case"hour":return be(e);case"day":return Te(e);case"month":return b(e)}}function Se(e,t){const a=ee(e,t,!0);return Math.floor(a/H)}function Ne(e,t){let a=A(e),n=A(t);return a=m(a,0),n=m(n,6),Math.ceil(Se(a,n)/i)}const Oe={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 Ae(){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(Oe[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function qe(t,a){const e=Object.keys(Oe),n=Ae();return e.map(e=>n(e,t,a))}function Ce(){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 Le(t,a){const n=Ce();return[...Array(12).keys()].map(e=>n(e,t,a))}var Be={PARSE_DATETIME:a,PARSE_DATE:e,PARSE_TIME:T,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:E,DAYS_IN_MONTH_MIN:M,DAYS_IN_MONTH_MAX:F,MONTH_MAX:u,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:i,MINUTES_IN_HOUR:r,HOURS_IN_DAY:o,FIRST_HOUR:W,MILLISECONDS_IN_MINUTE:x,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_DAY:H,MILLISECONDS_IN_WEEK:L,Timestamp:Z,TimeObject:$,today:Fe,getStartOfWeek:I,getEndOfWeek:S,getStartOfMonth:N,getEndOfMonth:O,parseTime:K,validateTimestamp:t,parsed:Me,parseTimestamp:We,parseDate:j,getDayIdentifier:xe,getTimeIdentifier:s,getDayTimeIdentifier:c,diffTimestamp:ee,updateRelative:w,updateMinutes:te,updateWeekday:ae,updateDayOfYear:ne,updateWorkWeek:re,updateDisabled:oe,updateFormatted:g,getDayOfYear:de,getWorkWeek:ue,getWeekday:ie,isLeapYear:z,daysInMonth:l,copyTimestamp:A,padNumber:d,getDate:v,getTime:y,getDateTime:f,nextDay:p,prevDay:k,relativeDays:_,findWeekday:m,getWeekdaySkips:se,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:D,makeDate:ye,makeDateTime:fe,validateNumber:me,isBetweenDates:ke,isOverlappingDates:we,daysBetween:Se,weeksBetween:Ne,addToDate:q,compareTimestamps:Q,compareDate:X,compareTime:J,compareDateTime:G,getWeekdayFormatter:Ae,getWeekdayNames:qe,getMonthFormatter:Ce,getMonthNames:Le},Be=Object.freeze({__proto__:null,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:E,DAYS_IN_MONTH_MAX:F,DAYS_IN_MONTH_MIN:M,DAYS_IN_WEEK:i,DAY_MIN:h,FIRST_HOUR:W,HOURS_IN_DAY:o,MILLISECONDS_IN_DAY:H,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_MINUTE:x,MILLISECONDS_IN_WEEK:L,MINUTES_IN_HOUR:r,MONTH_MAX:u,MONTH_MIN:n,PARSE_DATE:e,PARSE_DATETIME:a,PARSE_TIME:T,SECONDS_IN_DAY:V,SECONDS_IN_HOUR:U,SECONDS_IN_MINUTE:B,SECONDS_IN_WEEK:Y,TimeObject:$,Timestamp:Z,addToDate:q,compareDate:X,compareDateTime:G,compareTime:J,compareTimestamps:Q,copyTimestamp:A,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:D,daysBetween:Se,daysInMonth:l,default:Be,diffTimestamp:ee,findWeekday:m,getDate:v,getDateTime:f,getDayIdentifier:xe,getDayOfYear:de,getDayTimeIdentifier:c,getEndOfMonth:O,getEndOfWeek:S,getMonthFormatter:Ce,getMonthNames:Le,getStartOfMonth:N,getStartOfWeek:I,getTime:y,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:Ae,getWeekdayNames:qe,getWeekdaySkips:se,getWorkWeek:ue,isBetweenDates:ke,isLeapYear:z,isOverlappingDates:we,isToday:P,makeDate:ye,makeDateTime:fe,maxTimestamp:he,minTimestamp:pe,moveRelativeDays:le,nextDay:p,padNumber:d,parseDate:j,parseTime:K,parseTimestamp:We,parsed:Me,prevDay:k,relativeDays:_,today:Fe,updateDayOfYear:ne,updateDisabled:oe,updateFormatted:g,updateMinutes:te,updateRelative:w,updateWeekday:ae,updateWorkWeek:re,validateNumber:me,validateTimestamp:t,weeksBetween:Ne});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ve(e,t){return 0===t?e:e.slice(0,t)}var Ye={convertToUnit:Re,indexOf:Ue},Ye=Object.freeze({__proto__:null,convertToUnit:Re,default:Ye,indexOf:Ue,minCharWidth:Ve});const Ze=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $e,je;function ze(e,a){const t={};for(const n in e){const r=e[n],o=Ze("on-"+n);if(void 0===$e)return void console.warn("$listeners has not been set up");if(void 0!==$e.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;return(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),je(n,a(t,n))),r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function Pe(e,t){return ze(Ke(e),t)}function Ke(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 Qe(e){return Object.keys(Ke(e))}function Xe(e,t){return je=e,$e=t,{getMouseEventHandlers:ze,getDefaultMouseEventHandlers:Pe,getMouseEventName:Ke,getRawMouseEvents:Qe}}var Je={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 Ge(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=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.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 Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Je,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}function et(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>se(t.weekdays)),o=Ee.computed(()=>We(e.value)),d=Ee.computed(()=>{return"0000-00-00"===a.value?f(o.value):We(a.value)}),u=Ee.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return D(t.locale,()=>e)}),i=Ee.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return D(t.locale,(e,t)=>t?n:a)}),l=Ee.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return D(t.locale,()=>e)});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(Me(e[0])),o=xe(Me(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 I(e,t.weekdays,n.today)}function f(e){return S(e,t.weekdays,n.today)}function m(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:f,dayStyleDefault:m}}String,Fe(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const tt={modelValue:{type:String,default:Fe(),validator:e=>""===e||t(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>me(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>me(e)&&e>0}};function at(t,e,{weekdaySkips:a,times:n}){const r=Ee.computed(()=>{if("day"===t.view)return We(t.modelValue);if("week"===t.view)return I(We(t.modelValue),t.weekdays,n.today);if("month"===t.view)return N(We(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=Ee.computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=A(r.value);return e=q(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return S(We(t.modelValue),t.weekdays,n.today);{let e=A(r.value);return e=q(e,{day:(t.viewCount-1)*i}),S(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return O(We(t.modelValue),t.weekdays,n.today);{let e=A(r.value);return e=q(e,{month:t.viewCount}),O(e,t.weekdays,n.today)}}),d=Ee.computed(()=>{return ce(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const nt={now:{type:String,validator:e=>""===e||t(e),default:""}};function rt(e){const t=Ee.reactive({now:We("0000-00-00 00:00"),today:We("0000-00-00")}),a=Ee.computed(()=>e.now?We(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 Ee.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function ot(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=N(e),n=O(e),t=l(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=I(e,r.weekdays,u.today),n=S(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=le(A(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=N(e),n=O(e),g(n),t=l(a.year,a.month);break;case"resource":t=1,n=le(A(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const dt=["moved"];function ut(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:f,emit:m}){function e(a=1){if(0===a)f.value=Fe();else{let e=A(l.value);const n=a>0,r=n?p:k,o=n?F:h;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),ae(e);while(0===s.value[e.weekday])e=q(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":_(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":_(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":_(e,r,v.value,u.weekdays);break}ae(e),g(e),ne(e),w(e,y.now),f.value=e.date,m("moved",e)}}return{move:e}}const it=/^on[A-Z]/;function lt(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{it.test(e)&&(t[e]=!0)}),t})}}function He(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function st({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&He()])}const ct=["change"];function vt(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 yt(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const ft=yt().isKeyCode,mt={useNavigation:Boolean};function ht(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,weekdaySkips:i,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",m),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function m(e){y(e)&&ft(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(y(e)&&ft(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:D();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:g();break;case 40:k();break}}function p(){let e=A(r.value);if("month"===d.value){if(e=q(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=q(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function k(){let e=A(r.value);if("month"===d.value){if(e=q(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=q(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function w(){let e=A(r.value);l.value="prev";do{e=q(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function g(){let e=A(r.value);l.value="next";do{e=q(e,{day:1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function _(){let e=A(r.value);if("month"===d.value||"month-interval"===d.value){e=q(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=q(e,{day:t})}else"day"===d.value?e=q(e,{day:-1}):"week"===d.value&&(e=q(e,{day:-7}));l.value="prev",n.value=e.date}function D(){let e=A(r.value);if("month"===d.value||"month-interval"===d.value){e=q(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=q(e,{day:t})}else"day"===d.value?e=q(e,{day:1}):"week"===d.value&&(e=q(e,{day:7}));l.value="next",n.value=e.date}function b(){let e=A(r.value);"month"===d.value||"month-interval"===d.value?e=N(e):"week"===d.value&&(e=I(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=q(e,{day:-1});n.value=e.date}function T(){let e=A(r.value);"month"===d.value||"month-interval"===d.value?e=O(e):"week"===d.value&&(e=S(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=q(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{v()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var pt=Ee.defineComponent({name:"QCalendarTask",directives:[Je],props:{...nt,...mt,...tt},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...ct,...dt,...Qe("-date"),...Qe("-day"),...Qe("-head-day")],setup(c,{slots:v,emit:l,expose:x}){const e=Ee.ref(null),R=Ee.ref(null),o=Ee.ref("next"),d=Ee.ref(c.modelValue||Fe()),u=Ee.ref("0000-00-00"),t=Ee.ref(0),y=Ee.ref(c.modelValue),f=Ee.ref(null),a=Ee.ref(null),m=Ee.ref({}),i=Ee.reactive({width:0,height:0}),h=Ee.ref(!1),H=Ee.ref(null),L=Ee.ref(null),n=(Ee.watch(()=>c.view,()=>{t.value=0}),Ee.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=Ee.getCurrentInstance();if(null===r)throw new Error("current instance is null");const s=lt(r).emitListeners,{times:p,setCurrent:B,updateCurrent:k}=rt(c),{weekdaySkips:w,parsedStart:U,dayFormatter:V,weekdayFormatter:Y,ariaDateFormatter:Z,dayStyleDefault:g,getRelativeClasses:_}=(k(),B(),et(c,{startDate:d,endDate:u,times:p})),D=Ee.computed(()=>{return We(c.modelValue,p.now)||U.value||p.today}),$=(a.value=D.value,f.value=D.value.date,ot(c,{parsedView:n,times:p,parsedValue:D})).renderValues,{rootRef:j,__initCalendar:z,__renderCalendar:P}=Ge(c,Ce,{scrollArea:e,pane:R}),{days:b,parsedStartDate:T,parsedEndDate:I}=at(c,l,{weekdaySkips:w,times:p}),S=ut(c,{parsedView:n,parsedValue:D,weekdaySkips:w,direction:o,maxDays:t,times:p,emittedValue:y,emit:l}).move,N=Xe(l,s).getDefaultMouseEventHandlers,K=vt(l,{days:b,lastStart:H,lastEnd:L}).checkChange,O=yt().isKeyCode,Q=ht(c,{rootRef:j,focusRef:f,focusValue:a,datesRef:m,days:b,parsedView:n,parsedValue:D,emittedValue:y,weekdaySkips:w,direction:o,times:p}).tryFocus,A=Ee.ref(!0),q=Ee.computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),C=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),X=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==C.value}),E=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),J=Ee.computed(()=>{return parseInt(c.dayHeight,10)}),G=Ee.computed(()=>{return parseInt(c.dayMinHeight,10)});function ee(){y.value=Fe()}function te(e=1){S(e)}function ae(e=1){S(-e)}function ne({width:e,height:t}){i.width=e,i.height=t}function M(e){return e.date===y.value}function re(e,t,a){const n=v.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&D.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=Re(q.value),i={width:u,minWidth:u,maxWidth:u,...r({scope:d})},l="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return Ee.h("div",{tabindex:!0===C.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,..._(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:i,onFocus:()=>{C.value},...N("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),He()])}function oe(t,a){return b.value.map(e=>re(e,t,a))}function de(e,t){const a=v.days,n={timestamps:b.value,days:b.value,task:e,taskIndex:t,cellWidth:q.value};return Ee.h("div",{class:"q-calendar-task__task--days-row"},[oe(e,t),a&&a({scope:n})])}function ue(t,e,a=0,n=!0){const r=v.task,o={start:T.value,end:I.value,task:t,taskIndex:e,expanded:n},d=Re(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return Ee.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===A.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:u},[Ee.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[Ee.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,l("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),He()])}function ie(e,t,a=0,n=!0){const r=void 0!==e.height?Re(parseInt(e.height,10)):J.value>0?Re(J.value):"auto",o=G.value>0?Re(G.value):void 0,d={height:r},u=(void 0!==o&&(d.minHeight=o),Ee.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[ue(e,t,a,n),de(e,t)]));return void 0!==e.children?[u,Ee.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[le(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function le(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ie(e,t,a,void 0!==e.children?e.expanded:n)})}function se(){return Ee.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===A.value}},[le()])}function ce(e,t){const a=v["footer-task"],n={start:T.value,end:I.value,footer:e,index:t},r=Re(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return Ee.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===A.value},style:o},[a&&a({scope:n})])}function ve(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=Re(q.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return Ee.h("div",{class:{"q-calendar-task__footer--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:d},[n&&n({scope:r})])}function ye(t,a){return Ee.h("div",{class:"q-calendar-task__footer--day-wrapper"},[b.value.map(e=>ve(e,t,a))])}function fe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return Ee.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ye(e,t)]})})}function me(){return Ee.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===A.value}},fe())}function he(){return Ee.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Oe(),se(),me()])}function pe(){const e=v["head-tasks"],t={start:T.value,end:I.value},a=Re(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return Ee.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===A.value},style:n},[e&&e({scope:t})])}function ke(e,t){const a=v["title-task"],n=Re(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:T.value,end:I.value,cellWidth:n,title:e,index:t};return Ee.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===A.value},style:r},[a&&a({scope:o})])}function F(e){const t=v["head-weekday-label"],a=!0!==c.noActiveDate&&M(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ee.h("div",r,t&&t({scope:n})||we(e,c.shortWeekdayLabel))}function we(e,t){const a=Y.value(e,t||c.weekdayBreakpoints[0]>0&&q.value<=c.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&q.value<=c.weekdayBreakpoints[1]?Ve(a,c.minWeekdayLabel):a)}function W(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return Ee.h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&M(a),t=V.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===X.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===X.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(y.value=a.date,void 0!==s.value.onClickDate)&&l("click-date",{scope:o})},...N("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):st(c,u,n?n({scope:o}):t)}function _e(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&W(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&W(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&W(e),!0!==c.noDefaultHeaderText&&F(e)])):void 0}function De(e,t,a){const n=v["title-day"],r=Re(q.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:q.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return Ee.h("div",{class:{"q-calendar-task__title--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),He()])}function be(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&M(t),r={timestamp:t,activeDate:n,droppable:h.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Re(q.value),i={width:u,minWidth:u,maxWidth:u,...o({scope:r})},l=t.date,s={key:l,ref:e=>{m.value[l]=e},tabindex:!0===E.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:i,onFocus:()=>{!0===E.value&&(f.value=l)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(y.value=t.date)},...N("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?h.value=t.date:h.value="")}};return Ee.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&_e(t),void 0===e&&a&&a({scope:r}),He()])}function Te(){return b.value.map(e=>be(e))}function Ie(t,a){return b.value.map(e=>De(e,t,a))}function Se(){return Ee.h("div",{class:{"q-calendar-task__head--days":!0}},[...Te()])}function Ne(e,t){return Ee.h("div",{class:{"q-calendar-task__title--days":!0}},[...Ie(e,t)])}function Oe(){return Ee.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===A.value},style:{}},[Ee.h("div",{style:{position:"relative",display:"flex"}},[pe(),Se()]),c.modelTitle.map((e,t)=>Ee.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[ke(e,t),Ne(e,t)]))])}function Ae(){return Ee.h("div",{class:"q-calendar-task__body"},[qe()])}function qe(){return Ee.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function Ce(){const{start:e,end:t}=$.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ee.withDirectives(Ee.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ae()]),[[Je,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([b],K,{deep:!0,immediate:!0}),Ee.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=xe(Me(e)),n=xe(Me(t));o.value=a>=n?"next":"prev"}y.value=e}f.value=e}),Ee.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=xe(Me(e)),n=xe(Me(t));o.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ee.watch(f,e=>{e&&(a.value=We(e))}),Ee.watch(a,()=>{m.value[f.value]?m.value[f.value].focus():Q()}),Ee.onBeforeUpdate(()=>{m.value={}}),Ee.onMounted(()=>{z()}),x({prev:ae,next:te,move:S,moveToToday:ee,updateCurrent:k}),()=>P()}});const kt="4.0.1";Be={version:kt,QCalendarTask:pt,...Be,...Ye,install(e){e.component(pt.name,pt)}};return Be});
(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.QCalendarTask=t(e.Vue))})(this,function(Ee){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?)|)/,C=[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],M=28,F=31,u=12,n=1,h=1,i=7,r=60,o=24,W=0,x=6e4,R=36e5,H=864e5,L=6048e5,B=60,U=3600,V=86400,Y=604800,Z={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},$={hour:0,minute:0};function t(e){return!!a.exec(e)}function Me(e){const t=a.exec(e);return t?{date:e,time:d(parseInt(t[6],10)||0,2)+":"+d(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 j(e,t=!1){const a=t?"UTC":"";return g({date:d(e[`get${a}FullYear`](),4)+"-"+d(e[`get${a}Month`]()+1,2)+"-"+d(e[`get${a}Date`](),2),time:d(e[`get${a}Hours`]()||0,2)+":"+d(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 d(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function z(e){return 1===(e%4===0^e%100===0^e%400===0)}function l(e,t){return(z(e)?E:C)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>M&&e.day>l(e.year,e.month)&&(e.day=h,++e.month,e.month>u)&&(e.month=n,++e.year),e}function k(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<h&&(e.month--,e.month<n&&(e.year--,e.month=u),e.day=l(e.year,e.month)),e}function Fe(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,d(t,2),d(a,2)].join("-")}function P(e){return e===Fe()}function I(e,t,a){let n=A(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=p(n);return n=m(n,t[0],k),n=g(n),a&&(n=w(n,a,n.hasTime)),n}function S(e,t,a){let n=A(e);const r=l(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=k(n);return n=m(n,t[t.length-1],p),n=g(n),a&&(n=w(n,a,n.hasTime)),n}function N(e){const t=A(e);return t.day=h,g(t),t}function O(e){const t=A(e);return t.day=l(t.year,t.month),g(t),t}function K(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 Q(e,t){return JSON.stringify(e)===JSON.stringify(t)}function X(e,t){return v(e)===v(t)}function J(e,t){return y(e)===y(t)}function G(e,t){return f(e)===f(t)}function We(e,t){let a=Me(e);return null===a?null:(a=g(a),t&&w(a,t,a.hasTime),a)}function xe(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function s(e){return 100*e.hour+e.minute}function c(e){return xe(e)+s(e)}function ee(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 w(e,t,a=!1){let n=xe(t),r=xe(e),o=n===r;return e.hasTime&&a&&o&&(n=s(t),r=s(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function te(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/r),e.minute=t%r,e.time=y(e),a&&w(e,a,!0),e}function ae(e){return e.weekday=ie(e),e}function ne(e){return e.doy=de(e),e}function re(e){return e.workweek=ue(e),e}function oe(e,t,a,n,r){const o=xe(e);if(void 0!==t){const i=xe(Me(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=xe(Me(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length){const s=Me(r[u][0]),c=Me(r[u][1]);if(ke(e,s,c)){e.disabled=!0;break}}else{const v=xe(We(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function g(e){return e.hasTime=!0,e.time=y(e),e.date=v(e),e.weekday=ie(e),e.doy=de(e),e.workweek=ue(e),e}function de(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 ue(e){0===e.year&&(e=We(Fe()));const t=ye(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)/L);return 1+Math.floor(o)}function ie(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 A(e){return{...e}}function v(e){let t=d(e.year,4)+"-"+d(e.month,2);return e.hasDay&&(t+="-"+d(e.day,2)),t}function y(e){return e.hasTime?d(e.hour,2)+":"+d(e.minute,2):""}function f(e){return v(e)+" "+(e.hasTime?y(e):"00:00")}function le(e,t=p,a=1,n=[0,1,2,3,4,5,6]){return _(e,t,a,n)}function _(e,t=p,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==p||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function m(e,t,a=p,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function se(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<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function ce(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=xe(t),c=[];let v=A(e),y=0,f=y===s;if(!(s<xe(e)))while((!f||c.length<l)&&c.length<i){if(y=xe(v),f=f||y>s&&c.length>=l,f)break;if(0===n[v.weekday]);else{const m=A(v);g(m),w(m,a),oe(m,r,o,d,u),c.push(m)}v=_(v,p)}return c}function ve(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=A(t);d.push(te(i,u,o))}return d}function D(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(fe(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+f(t)),o}}}function ye(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 fe(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 me(e){return isFinite(parseInt(e,10))}function he(e,t=!1){const a=!0===t?c:xe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function pe(e,t=!1){const a=!0===t?c:xe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ke(e,t,a,n){const r=xe(e)+(!0===n?s(e):0),o=xe(t)+(!0===n?s(t):0),d=xe(a)+(!0===n?s(a):0);return r>=o&&r<=d}function we(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 q(e,t){const n=A(e);let r;return _e(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=ge.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&Ie(n,ge[r]),g(n),n}const ge=["minute","hour","day","month"];function _e(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function De(e){if(e.minute>=r||e.minute<0){const t=Math.floor(e.minute/r);e.minute-=t*r,e.hour+=t,be(e)}return e}function be(e){if(e.hour>=o||e.hour<0){const t=Math.floor(e.hour/o);e.hour-=t*o,e.day+=t,Te(e)}return e}function Te(t){b(t);let a=l(t.year,t.month);if(t.day>a){++t.month,t.month>u&&b(t);let e=t.day-a;a=l(t.year,t.month);do{e>a&&(++t.month,t.month>u&&b(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&&b(t),a=l(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&b(t),a=l(t.year,t.month))}while(e>a);t.day=a-e}return t}function b(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 Ie(e,t){switch(t){case"minute":return De(e);case"hour":return be(e);case"day":return Te(e);case"month":return b(e)}}function Se(e,t){const a=ee(e,t,!0);return Math.floor(a/H)}function Ne(e,t){let a=A(e),n=A(t);return a=m(a,0),n=m(n,6),Math.ceil(Se(a,n)/i)}const Oe={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 Ae(){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(Oe[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function qe(t,a){const e=Object.keys(Oe),n=Ae();return e.map(e=>n(e,t,a))}function Ce(){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 Le(t,a){const n=Ce();return[...Array(12).keys()].map(e=>n(e,t,a))}var Be={PARSE_DATETIME:a,PARSE_DATE:e,PARSE_TIME:T,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:E,DAYS_IN_MONTH_MIN:M,DAYS_IN_MONTH_MAX:F,MONTH_MAX:u,MONTH_MIN:n,DAY_MIN:h,DAYS_IN_WEEK:i,MINUTES_IN_HOUR:r,HOURS_IN_DAY:o,FIRST_HOUR:W,MILLISECONDS_IN_MINUTE:x,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_DAY:H,MILLISECONDS_IN_WEEK:L,Timestamp:Z,TimeObject:$,today:Fe,getStartOfWeek:I,getEndOfWeek:S,getStartOfMonth:N,getEndOfMonth:O,parseTime:K,validateTimestamp:t,parsed:Me,parseTimestamp:We,parseDate:j,getDayIdentifier:xe,getTimeIdentifier:s,getDayTimeIdentifier:c,diffTimestamp:ee,updateRelative:w,updateMinutes:te,updateWeekday:ae,updateDayOfYear:ne,updateWorkWeek:re,updateDisabled:oe,updateFormatted:g,getDayOfYear:de,getWorkWeek:ue,getWeekday:ie,isLeapYear:z,daysInMonth:l,copyTimestamp:A,padNumber:d,getDate:v,getTime:y,getDateTime:f,nextDay:p,prevDay:k,relativeDays:_,findWeekday:m,getWeekdaySkips:se,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:D,makeDate:ye,makeDateTime:fe,validateNumber:me,isBetweenDates:ke,isOverlappingDates:we,daysBetween:Se,weeksBetween:Ne,addToDate:q,compareTimestamps:Q,compareDate:X,compareTime:J,compareDateTime:G,getWeekdayFormatter:Ae,getWeekdayNames:qe,getMonthFormatter:Ce,getMonthNames:Le},Be=Object.freeze({__proto__:null,DAYS_IN_MONTH:C,DAYS_IN_MONTH_LEAP:E,DAYS_IN_MONTH_MAX:F,DAYS_IN_MONTH_MIN:M,DAYS_IN_WEEK:i,DAY_MIN:h,FIRST_HOUR:W,HOURS_IN_DAY:o,MILLISECONDS_IN_DAY:H,MILLISECONDS_IN_HOUR:R,MILLISECONDS_IN_MINUTE:x,MILLISECONDS_IN_WEEK:L,MINUTES_IN_HOUR:r,MONTH_MAX:u,MONTH_MIN:n,PARSE_DATE:e,PARSE_DATETIME:a,PARSE_TIME:T,SECONDS_IN_DAY:V,SECONDS_IN_HOUR:U,SECONDS_IN_MINUTE:B,SECONDS_IN_WEEK:Y,TimeObject:$,Timestamp:Z,addToDate:q,compareDate:X,compareDateTime:G,compareTime:J,compareTimestamps:Q,copyTimestamp:A,createDayList:ce,createIntervalList:ve,createNativeLocaleFormatter:D,daysBetween:Se,daysInMonth:l,default:Be,diffTimestamp:ee,findWeekday:m,getDate:v,getDateTime:f,getDayIdentifier:xe,getDayOfYear:de,getDayTimeIdentifier:c,getEndOfMonth:O,getEndOfWeek:S,getMonthFormatter:Ce,getMonthNames:Le,getStartOfMonth:N,getStartOfWeek:I,getTime:y,getTimeIdentifier:s,getWeekday:ie,getWeekdayFormatter:Ae,getWeekdayNames:qe,getWeekdaySkips:se,getWorkWeek:ue,isBetweenDates:ke,isLeapYear:z,isOverlappingDates:we,isToday:P,makeDate:ye,makeDateTime:fe,maxTimestamp:he,minTimestamp:pe,moveRelativeDays:le,nextDay:p,padNumber:d,parseDate:j,parseTime:K,parseTimestamp:We,parsed:Me,prevDay:k,relativeDays:_,today:Fe,updateDayOfYear:ne,updateDisabled:oe,updateFormatted:g,updateMinutes:te,updateRelative:w,updateWeekday:ae,updateWorkWeek:re,validateNumber:me,validateTimestamp:t,weeksBetween:Ne});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function Ue(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ve(e,t){return 0===t?e:e.slice(0,t)}var Ye={convertToUnit:Re,indexOf:Ue},Ye=Object.freeze({__proto__:null,convertToUnit:Re,default:Ye,indexOf:Ue,minCharWidth:Ve});const Ze=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function $e(a,e,t,n){const r={};for(const o in t){const d=t[o],u=Ze("on-"+o);if(void 0===e)return void console.warn("$listeners has not been set up");if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),l=e=>{const t=e;return(void 0===d.button||t.buttons>0&&t.button===d.button)&&(d.prevent&&t.preventDefault(),d.stop&&t.stopPropagation(),a(o,n(t,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function je(e,t,a,n){return $e(e,t,ze(a),n)}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 Pe(e){return Object.keys(ze(e))}function Ke(e,t){const a=e,n=t;return{getMouseEventHandlers:(e,t)=>{return $e(a,n,e,t)},getDefaultMouseEventHandlers:(e,t)=>{return je(a,n,e,t)},getMouseEventName:ze,getRawMouseEvents:Pe}}var Qe={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 Xe(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=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.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 Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Qe,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}function Je(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>se(t.weekdays)),o=Ee.computed(()=>We(e.value)),d=Ee.computed(()=>{return"0000-00-00"===a.value?f(o.value):We(a.value)}),u=Ee.computed(()=>{const e={timeZone:"UTC",day:"numeric"};return D(t.locale,()=>e)}),i=Ee.computed(()=>{const a={timeZone:"UTC",weekday:"long"},n={timeZone:"UTC",weekday:"short"};return D(t.locale,(e,t)=>t?n:a)}),l=Ee.computed(()=>{const e={timeZone:"UTC",dateStyle:"full"};return D(t.locale,()=>e)});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(Me(e[0])),o=xe(Me(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 I(e,t.weekdays,n.today)}function f(e){return S(e,t.weekdays,n.today)}function m(){}return{weekdaySkips:r,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:f,dayStyleDefault:m}}String,Fe(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Set,Array,Boolean,Boolean,Array;const Ge={modelValue:{type:String,default:Fe(),validator:e=>""===e||t(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].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)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>me(e)&&e>0},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,shortWeekdayLabel:Boolean,noHeader:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},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:()=>[]},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;return e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)}),t}},taskWidth:{type:Number,default:200,validator:e=>me(e)&&e>0}};function et(t,e,{weekdaySkips:a,times:n}){const r=Ee.computed(()=>{if("day"===t.view)return We(t.modelValue);if("week"===t.view)return I(We(t.modelValue),t.weekdays,n.today);if("month"===t.view)return N(We(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),o=Ee.computed(()=>{if("day"===t.view){if(1===t.viewCount)return r.value;let e=A(r.value);return e=q(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return S(We(t.modelValue),t.weekdays,n.today);{let e=A(r.value);return e=q(e,{day:(t.viewCount-1)*i}),S(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return O(We(t.modelValue),t.weekdays,n.today);{let e=A(r.value);return e=q(e,{month:t.viewCount}),O(e,t.weekdays,n.today)}}),d=Ee.computed(()=>{return ce(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const tt={now:{type:String,validator:e=>""===e||t(e),default:""}};function at(e){const t=Ee.reactive({now:We("0000-00-00 00:00"),today:We("0000-00-00")}),a=Ee.computed(()=>e.now?We(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 Ee.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function nt(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=N(e),n=O(e),t=l(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=I(e,r.weekdays,u.today),n=S(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=le(A(n),p,t>1?t-1:t,r.weekdays),g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=N(e),n=O(e),g(n),t=l(a.year,a.month);break;case"resource":t=1,n=le(A(n),p,t,r.weekdays),g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const rt=["moved"];function ot(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:f,emit:m}){function e(a=1){if(0===a)f.value=Fe();else{let e=A(l.value);const n=a>0,r=n?p:k,o=n?F:h;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),ae(e);while(0===s.value[e.weekday])e=q(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":_(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":_(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":_(e,r,v.value,u.weekdays);break}ae(e),g(e),ne(e),w(e,y.now),f.value=e.date,m("moved",e)}}return{move:e}}const dt=/^on[A-Z]/;function ut(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e.vnode&&e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{dt.test(e)&&(t[e]=!0)}),t})}}function He(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function it({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&He()])}const lt=["change"];function st(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 ct(){function e(e,t){return[].concat(t).includes(e.keyCode)}return{isKeyCode:e}}const vt=ct().isKeyCode,yt={useNavigation:Boolean};function ft(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,weekdaySkips:i,direction:l,times:s}){let e=!1;function c(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",m),e=!1)}function y(e){if(void 0!==e&&document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function f(){let e=0;const t=window.setInterval(()=>{o.value[n.value]&&(o.value[n.value].focus(),50!==++e)&&document.activeElement!==o.value[n.value]||window.clearInterval(t)},250)}function m(e){y(e)&&vt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(y(e)&&vt(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:_();break;case 34:D();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:p();break;case 39:g();break;case 40:k();break}}function p(){let e=A(r.value);if("month"===d.value){if(e=q(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=q(e,{minute:parseInt(t.intervalMinutes)}));l.value="prev",n.value=e.date}function k(){let e=A(r.value);if("month"===d.value){if(e=q(e,{day:7}),r.value.month!==e.month)return l.value="next",void(u.value=e.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(e=q(e,{minute:parseInt(t.intervalMinutes)}));l.value="next",n.value=e.date}function w(){let e=A(r.value);l.value="prev";do{e=q(e,{day:-1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday>r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function g(){let e=A(r.value);l.value="next";do{e=q(e,{day:1})}while(0===i.value[e.weekday]);if("month"===d.value||"month-interval"===d.value){if(r.value.month!==e.month)return void(u.value=e.date)}else if("week"===d.value){if(e.weekday<r.value.weekday)return void(u.value=e.date)}else if("day"===d.value)return void(u.value=e.date);n.value=e.date}function _(){let e=A(r.value);if("month"===d.value||"month-interval"===d.value){e=q(e,{month:-1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=q(e,{day:t})}else"day"===d.value?e=q(e,{day:-1}):"week"===d.value&&(e=q(e,{day:-7}));l.value="prev",n.value=e.date}function D(){let e=A(r.value);if("month"===d.value||"month-interval"===d.value){e=q(e,{month:1});const t=e.day<=15?1:-1;while(0===i.value[e.weekday])e=q(e,{day:t})}else"day"===d.value?e=q(e,{day:1}):"week"===d.value&&(e=q(e,{day:7}));l.value="next",n.value=e.date}function b(){let e=A(r.value);"month"===d.value||"month-interval"===d.value?e=N(e):"week"===d.value&&(e=I(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=q(e,{day:-1});n.value=e.date}function T(){let e=A(r.value);"month"===d.value||"month-interval"===d.value?e=O(e):"week"===d.value&&(e=S(e,t.weekdays,s.today));while(0===i.value[e.weekday])e=q(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{v()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?c:v)()}),!0===t.useNavigation&&c(),{startNavigation:c,endNavigation:v,tryFocus:f}}var mt=Ee.defineComponent({name:"QCalendarTask",directives:[Qe],props:{...tt,...yt,...Ge},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...lt,...rt,...Pe("-date"),...Pe("-day"),...Pe("-head-day")],setup(c,{slots:v,emit:l,expose:x}){const e=Ee.ref(null),R=Ee.ref(null),o=Ee.ref("next"),d=Ee.ref(c.modelValue||Fe()),u=Ee.ref("0000-00-00"),t=Ee.ref(0),y=Ee.ref(c.modelValue),f=Ee.ref(null),a=Ee.ref(null),m=Ee.ref({}),i=Ee.reactive({width:0,height:0}),h=Ee.ref(!1),H=Ee.ref(null),L=Ee.ref(null),n=(Ee.watch(()=>c.view,()=>{t.value=0}),Ee.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=Ee.getCurrentInstance();if(null===r)throw new Error("current instance is null");const s=ut(r).emitListeners,{times:p,setCurrent:B,updateCurrent:k}=at(c),{weekdaySkips:w,parsedStart:U,dayFormatter:V,weekdayFormatter:Y,ariaDateFormatter:Z,dayStyleDefault:g,getRelativeClasses:_}=(k(),B(),Je(c,{startDate:d,endDate:u,times:p})),D=Ee.computed(()=>{return We(c.modelValue,p.now)||U.value||p.today}),$=(a.value=D.value,f.value=D.value.date,nt(c,{parsedView:n,times:p,parsedValue:D})).renderValues,{rootRef:j,__initCalendar:z,__renderCalendar:P}=Xe(c,Ce,{scrollArea:e,pane:R}),{days:b,parsedStartDate:T,parsedEndDate:I}=et(c,l,{weekdaySkips:w,times:p}),S=ot(c,{parsedView:n,parsedValue:D,weekdaySkips:w,direction:o,maxDays:t,times:p,emittedValue:y,emit:l}).move,N=Ke(l,s).getDefaultMouseEventHandlers,K=st(l,{days:b,lastStart:H,lastEnd:L}).checkChange,O=ct().isKeyCode,Q=ft(c,{rootRef:j,focusRef:f,focusValue:a,datesRef:m,days:b,parsedView:n,parsedValue:D,emittedValue:y,weekdaySkips:w,direction:o,times:p}).tryFocus,A=Ee.ref(!0),q=Ee.computed(()=>{return void 0!==c.cellWidth?parseInt(c.cellWidth,10):150}),C=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),X=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==C.value}),E=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),J=Ee.computed(()=>{return parseInt(c.dayHeight,10)}),G=Ee.computed(()=>{return parseInt(c.dayMinHeight,10)});function ee(){y.value=Fe()}function te(e=1){S(e)}function ae(e=1){S(-e)}function ne({width:e,height:t}){i.width=e,i.height=t}function M(e){return e.date===y.value}function re(e,t,a){const n=v.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&D.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=Re(q.value),i={width:u,minWidth:u,maxWidth:u,...r({scope:d})},l="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return Ee.h("div",{tabindex:!0===C.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,..._(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:i,onFocus:()=>{C.value},...N("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),He()])}function oe(t,a){return b.value.map(e=>re(e,t,a))}function de(e,t){const a=v.days,n={timestamps:b.value,days:b.value,task:e,taskIndex:t,cellWidth:q.value};return Ee.h("div",{class:"q-calendar-task__task--days-row"},[oe(e,t),a&&a({scope:n})])}function ue(t,e,a=0,n=!0){const r=v.task,o={start:T.value,end:I.value,task:t,taskIndex:e,expanded:n},d=Re(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return Ee.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===A.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:u},[Ee.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[Ee.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,l("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),He()])}function ie(e,t,a=0,n=!0){const r=void 0!==e.height?Re(parseInt(e.height,10)):J.value>0?Re(J.value):"auto",o=G.value>0?Re(G.value):void 0,d={height:r},u=(void 0!==o&&(d.minHeight=o),Ee.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[ue(e,t,a,n),de(e,t)]));return void 0!==e.children?[u,Ee.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[le(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function le(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ie(e,t,a,void 0!==e.children?e.expanded:n)})}function se(){return Ee.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===A.value}},[le()])}function ce(e,t){const a=v["footer-task"],n={start:T.value,end:I.value,footer:e,index:t},r=Re(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return Ee.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===A.value},style:o},[a&&a({scope:n})])}function ve(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=Re(q.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return Ee.h("div",{class:{"q-calendar-task__footer--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:d},[n&&n({scope:r})])}function ye(t,a){return Ee.h("div",{class:"q-calendar-task__footer--day-wrapper"},[b.value.map(e=>ve(e,t,a))])}function fe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return Ee.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ye(e,t)]})})}function me(){return Ee.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===A.value}},fe())}function he(){return Ee.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Oe(),se(),me()])}function pe(){const e=v["head-tasks"],t={start:T.value,end:I.value},a=Re(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return Ee.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===A.value},style:n},[e&&e({scope:t})])}function ke(e,t){const a=v["title-task"],n=Re(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:T.value,end:I.value,cellWidth:n,title:e,index:t};return Ee.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===A.value},style:r},[a&&a({scope:o})])}function F(e){const t=v["head-weekday-label"],a=!0!==c.noActiveDate&&M(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(e.weekday)},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ee.h("div",r,t&&t({scope:n})||we(e,c.shortWeekdayLabel))}function we(e,t){const a=Y.value(e,t||c.weekdayBreakpoints[0]>0&&q.value<=c.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&q.value<=c.weekdayBreakpoints[1]?Ve(a,c.minWeekdayLabel):a)}function W(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return Ee.h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&M(a),t=V.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===X.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===X.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(y.value=a.date,void 0!==s.value.onClickDate)&&l("click-date",{scope:o})},...N("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=Z.value(a)),r?r({scope:o}):it(c,u,n?n({scope:o}):t)}function _e(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&W(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&F(e),!0!==c.noDefaultHeaderBtn&&W(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&W(e),!0!==c.noDefaultHeaderText&&F(e)])):void 0}function De(e,t,a){const n=v["title-day"],r=Re(q.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:q.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return Ee.h("div",{class:{"q-calendar-task__title--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),He()])}function be(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&M(t),r={timestamp:t,activeDate:n,droppable:h.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(t.weekday)},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Re(q.value),i={width:u,minWidth:u,maxWidth:u,...o({scope:r})},l=t.date,s={key:l,ref:e=>{m.value[l]=e},tabindex:!0===E.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:i,onFocus:()=>{!0===E.value&&(f.value=l)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(y.value=t.date)},...N("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?h.value=t.date:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?h.value=t.date:h.value="")}};return Ee.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&_e(t),void 0===e&&a&&a({scope:r}),He()])}function Te(){return b.value.map(e=>be(e))}function Ie(t,a){return b.value.map(e=>De(e,t,a))}function Se(){return Ee.h("div",{class:{"q-calendar-task__head--days":!0}},[...Te()])}function Ne(e,t){return Ee.h("div",{class:{"q-calendar-task__title--days":!0}},[...Ie(e,t)])}function Oe(){return Ee.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===A.value},style:{}},[Ee.h("div",{style:{position:"relative",display:"flex"}},[pe(),Se()]),c.modelTitle.map((e,t)=>Ee.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[ke(e,t),Ne(e,t)]))])}function Ae(){return Ee.h("div",{class:"q-calendar-task__body"},[qe()])}function qe(){return Ee.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function Ce(){const{start:e,end:t}=$.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ee.withDirectives(Ee.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ae()]),[[Qe,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([b],K,{deep:!0,immediate:!0}),Ee.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=xe(Me(e)),n=xe(Me(t));o.value=a>=n?"next":"prev"}y.value=e}f.value=e}),Ee.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=xe(Me(e)),n=xe(Me(t));o.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ee.watch(f,e=>{e&&(a.value=We(e))}),Ee.watch(a,()=>{m.value[f.value]?m.value[f.value].focus():Q()}),Ee.onBeforeUpdate(()=>{m.value={}}),Ee.onMounted(()=>{z()}),x({prev:ae,next:te,move:S,moveToToday:ee,updateCurrent:k}),()=>P()}});const ht="4.0.2";Be={version:ht,QCalendarTask:mt,...Be,...Ye,install(e){e.component(mt.name,mt)}};return Be});
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>

@@ -9,3 +9,3 @@ * Released under the MIT License.

const version = '4.0.1';
const version = '4.0.2';

@@ -12,0 +12,0 @@ /* global Intl console */

/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
const version="4.0.1",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const i=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));i<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n)if(n[o]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(Array.isArray(r[m])&&2===r[m].length){const u=parsed(r[m][0]),D=parsed(r[m][1]);if(isBetweenDates(e,u,D)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[m]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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()),i=(a.setHours(a.getHours()-r),(a-n)/MILLISECONDS_IN_WEEK);return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],m=[],d=42,s=0){const u=getDayIdentifier(t),D=[];let y=copyTimestamp(e),_=0,I=_===u;if(!(u<getDayIdentifier(e)))while((!I||D.length<s)&&D.length<d){if(_=getDayIdentifier(y),I=I||_>u&&D.length>=s,I)break;if(0===n[y.weekday]);else{const T=copyTimestamp(y);updateFormatted(T),updateRelative(T,a),updateDisabled(T,r,i,o,m),D.push(T)}y=relativeDays(y,nextDay)}return D}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const m=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(n,r){const i=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),i}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(n);return r>=o&&r<=m||i>=o&&i<=m||o>=r&&i>=m}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){const r=(e,t)=>"",i={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,i[e]||i["long"]);return n.format(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const i=(e,t)=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["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),i}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
const version="4.0.2",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const i=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));i<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n)if(n[o]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(Array.isArray(r[m])&&2===r[m].length){const u=parsed(r[m][0]),D=parsed(r[m][1]);if(isBetweenDates(e,u,D)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[m]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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()),i=(a.setHours(a.getHours()-r),(a-n)/MILLISECONDS_IN_WEEK);return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],m=[],d=42,s=0){const u=getDayIdentifier(t),D=[];let y=copyTimestamp(e),_=0,I=_===u;if(!(u<getDayIdentifier(e)))while((!I||D.length<s)&&D.length<d){if(_=getDayIdentifier(y),I=I||_>u&&D.length>=s,I)break;if(0===n[y.weekday]);else{const T=copyTimestamp(y);updateFormatted(T),updateRelative(T,a),updateDisabled(T,r,i,o,m),D.push(T)}y=relativeDays(y,nextDay)}return D}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const m=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(n,r){const i=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),i}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(n);return r>=o&&r<=m||i>=o&&i<=m||o>=r&&i>=m}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){const r=(e,t)=>"",i={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,i[e]||i["long"]);return n.format(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const i=(e,t)=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["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),i}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});exports.Timestamp=Timestamp$2,exports.helpers=helpers$1,exports.version=version;
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>

@@ -7,3 +7,3 @@ * Released under the MIT License.

const version = '4.0.1';
const version = '4.0.2';

@@ -10,0 +10,0 @@ /* global Intl console */

/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
const version="4.0.1",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const i=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));i<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n)if(n[o]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(Array.isArray(r[m])&&2===r[m].length){const u=parsed(r[m][0]),D=parsed(r[m][1]);if(isBetweenDates(e,u,D)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[m]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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()),i=(a.setHours(a.getHours()-r),(a-n)/MILLISECONDS_IN_WEEK);return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],m=[],d=42,s=0){const u=getDayIdentifier(t),D=[];let y=copyTimestamp(e),_=0,I=_===u;if(!(u<getDayIdentifier(e)))while((!I||D.length<s)&&D.length<d){if(_=getDayIdentifier(y),I=I||_>u&&D.length>=s,I)break;if(0===n[y.weekday]);else{const T=copyTimestamp(y);updateFormatted(T),updateRelative(T,a),updateDisabled(T,r,i,o,m),D.push(T)}y=relativeDays(y,nextDay)}return D}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const m=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(n,r){const i=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),i}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(n);return r>=o&&r<=m||i>=o&&i<=m||o>=r&&i>=m}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){const r=(e,t)=>"",i={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,i[e]||i["long"]);return n.format(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const i=(e,t)=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["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),i}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),Plugin={version:version,...Timestamp$2,...helpers$1};export{Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
const version="4.0.2",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,SECONDS_IN_MINUTE=60,SECONDS_IN_HOUR=3600,SECONDS_IN_DAY=86400,SECONDS_IN_WEEK=604800,Timestamp={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},TimeObject={hour:0,minute:0};function validateTimestamp(e){return!!PARSE_DATETIME.exec(e)}function parsed(e){const t=PARSE_DATETIME.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(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 parseDate(e,t=!1){const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(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 padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return 1===(e%4===0^e%100===0^e%400===0)}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX)&&(e.month=MONTH_MIN,++e.year),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.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 compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,e.currentWeekday=e.weekday===t.weekday,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,n,r){const i=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));i<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n)if(n[o]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(Array.isArray(r[m])&&2===r[m].length){const u=parsed(r[m][0]),D=parsed(r[m][1]);if(isBetweenDates(e,u,D)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[m]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!0,e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(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 getWorkWeek(e){0===e.year&&(e=parseTimestamp(today()));const t=makeDate(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()),i=(a.setHours(a.getHours()-r),(a-n)/MILLISECONDS_IN_WEEK);return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}function copyTimestamp(e){return{...e}}function getDate(e){let t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+" "+(e.hasTime?getTime(e):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(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<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],m=[],d=42,s=0){const u=getDayIdentifier(t),D=[];let y=copyTimestamp(e),_=0,I=_===u;if(!(u<getDayIdentifier(e)))while((!I||D.length<s)&&D.length<d){if(_=getDayIdentifier(y),I=I||_>u&&D.length>=s,I)break;if(0===n[y.weekday]);else{const T=copyTimestamp(y);updateFormatted(T),updateRelative(T,a),updateDisabled(T,r,i,o,m),D.push(T)}y=relativeDays(y,nextDay)}return D}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const m=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(n,r){const i=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),i}}}function makeDate(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 makeDateTime(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 validateNumber(e){return isFinite(parseInt(e,10))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(n);return r>=o&&r<=m||i>=o&&i<=m||o>=r&&i>=m}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(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&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}const weekdayDateMap={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 getWeekdayFormatter(){const r=(e,t)=>"",i={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,i[e]||i["long"]);return n.format(weekdayDateMap[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),r}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>n(e,t,a))}function getMonthFormatter(){const i=(e,t)=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?i:e;function e(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["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),i}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp$1={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$2=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,SECONDS_IN_DAY:SECONDS_IN_DAY,SECONDS_IN_HOUR:SECONDS_IN_HOUR,SECONDS_IN_MINUTE:SECONDS_IN_MINUTE,SECONDS_IN_WEEK:SECONDS_IN_WEEK,TimeObject:TimeObject,Timestamp:Timestamp,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp$1,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWeekdaySkips:getWeekdaySkips,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),Plugin={version:version,...Timestamp$2,...helpers$1};export{Timestamp$2 as Timestamp,Plugin as default,helpers$1 as helpers,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>

@@ -13,3 +13,3 @@ * Released under the MIT License.

const version = '4.0.1';
const version = '4.0.2';

@@ -16,0 +16,0 @@ /* global Intl console */

/*!
* @quasar/quasar-ui-qcalendar v4.0.1
* @quasar/quasar-ui-qcalendar v4.0.2
* (c) 2025 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define(t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.Timestamp=t())})(this,function(){const e="4.0.1",n=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,L=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,r=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,H=31,u=12,i=1,d=1,s=7,m=60,c=24,R=0,$=6e4,j=36e5,f=864e5,y=6048e5,x=60,Z=3600,P=86400,B=604800,K={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},z={hour:0,minute:0};function X(e){return!!n.exec(e)}function h(e){const t=n.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 J(e,t=!1){const n=t?"UTC":"";return O({date:l(e[`get${n}FullYear`](),4)+"-"+l(e[`get${n}Month`]()+1,2)+"-"+l(e[`get${n}Date`](),2),time:l(e[`get${n}Hours`]()||0,2)+":"+l(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function l(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function D(e){return 1===(e%4===0^e%100===0^e%400===0)}function T(e,t){return(D(e)?o:a)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%s,e.day>t&&e.day>T(e.year,e.month)&&(e.day=d,++e.month,e.month>u)&&(e.month=i,++e.year),e}function I(e){return e.day--,e.weekday=(e.weekday+6)%s,e.day<d&&(e.month--,e.month<i&&(e.year--,e.month=u),e.day=T(e.year,e.month)),e}function g(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),r=e.getFullYear();return[r,l(t,2),l(n,2)].join("-")}function q(e){return e===g()}function G(e,t,n){let r=A(e);if(1===r.day||0===r.weekday)while(!t.includes(r.weekday))r=p(r);return r=C(r,t[0],I),r=O(r),n&&(r=M(r,n,r.hasTime)),r}function Q(e,t,n){let r=A(e);const a=T(r.year,r.month);if(a===r.day||6===r.weekday)while(!t.includes(r.weekday))r=I(r);return r=C(r,t[t.length-1],p),r=O(r),n&&(r=M(r,n,r.hasTime)),r}function V(e){const t=A(e);return t.day=d,O(t),t}function ee(e){const t=A(e);return t.day=T(t.year,t.month),O(t),t}function te(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=r.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[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 ne(e,t){return JSON.stringify(e)===JSON.stringify(t)}function re(e,t){return v(e)===v(t)}function ae(e,t){return W(e)===W(t)}function oe(e,t){return U(e)===U(t)}function N(e,t){let n=h(e);return null===n?null:(n=O(n),t&&M(n,t,n.hasTime),n)}function _(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function k(e){return 100*e.hour+e.minute}function w(e){return _(e)+k(e)}function ie(e,t,n){const r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),a=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===n&&a<r?0:a-r}function M(e,t,n=!1){let r=_(t),a=_(e),o=r===a;return e.hasTime&&n&&o&&(r=k(t),a=k(e),o=r===a),e.past=a<r,e.current=o,e.future=a>r,e.currentWeekday=e.weekday===t.weekday,e}function ue(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/m),e.minute=t%m,e.time=W(e),n&&M(e,n,!0),e}function de(e){return e.weekday=b(e),e}function se(e){return e.doy=S(e),e}function me(e){return e.workweek=E(e),e}function ce(e,t,n,r,a){const o=_(e);if(void 0!==t){const d=_(h(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const s=_(h(n));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(r[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(var u in a)if(Array.isArray(a[u])&&2===a[u].length){const m=h(a[u][0]),c=h(a[u][1]);if(_e(e,m,c)){e.disabled=!0;break}}else{const f=_(N(a[u]+" 00:00"));if(f===o){e.disabled=!0;break}}return e}function O(e){return e.hasTime=!0,e.time=W(e),e.date=v(e),e.weekday=b(e),e.doy=S(e),e.workweek=E(e),e}function S(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 E(e){0===e.year&&(e=N(g()));const t=Te(e);if(isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=(n.setDate(n.getDate()-(n.getDay()+6)%7+3),new Date(n.getFullYear(),0,4)),a=(r.setDate(r.getDate()-(r.getDay()+6)%7+3),n.getTimezoneOffset()-r.getTimezoneOffset()),o=(n.setHours(n.getHours()-a),(n-r)/y);return 1+Math.floor(o)}function b(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%u+1,o=n(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*o+i+n(i/4)+n(o/4))%7+7)%7}return t}function A(e){return{...e}}function v(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function W(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function U(e){return v(e)+" "+(e.hasTime?W(e):"00:00")}function fe(e,t=p,n=1,r=[0,1,2,3,4,5,6]){return Y(e,t,n,r)}function Y(e,t=p,n=1,r=[0,1,2,3,4,5,6]){r.includes(e.weekday)||0!==e.weekday||t!==p||++n;while(--n>=0)e=t(e),r.length<7&&!r.includes(e.weekday)&&++n;return e}function C(e,t,n=p,r=6){while(e.weekday!==t&&--r>=0)e=n(e);return e}function ye(t){const e=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)r[t[e]]=1;for(let n=0;n<s;++n){let t=1;for(let e=1;e<s;++e){const a=(n+e)%s;if(r[a])break;++t}e[n]=r[n]*t}return e}function he(e,t,n,r,a,o,i=[],u=[],d=42,s=0){const m=_(t),c=[];let f=A(e),y=0,h=y===m;if(!(m<_(e)))while((!h||c.length<s)&&c.length<d){if(y=_(f),h=h||y>m&&c.length>=s,h)break;if(0===r[f.weekday]);else{const l=A(f);O(l),M(l,n),ce(l,a,o,i,u),c.push(l)}f=Y(f,p)}return c}function le(t,n,r,a,o){const i=[];for(let e=0;e<a;++e){const u=(n+e)*r,d=A(t);i.push(ue(d,u,o))}return i}function De(r,a){const o=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?o:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(pe(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+U(t)),o}}}function Te(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 pe(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 Ie(e){return isFinite(parseInt(e,10))}function ge(e,t=!1){const n=!0===t?w:_;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function Ne(e,t=!1){const n=!0===t?w:_;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function _e(e,t,n,r){const a=_(e)+(!0===r?k(e):0),o=_(t)+(!0===r?k(t):0),i=_(n)+(!0===r?k(n):0);return a>=o&&a<=i}function ke(e,t,n,r){const a=_(e),o=_(t),i=_(n),u=_(r);return a>=i&&a<=u||o>=i&&o<=u||i>=a&&o>=u}function we(e,t){const r=A(e);let a;return Oe(t,(e,t)=>{if(void 0!==r[t]){r[t]+=parseInt(e,10);const n=Me.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&Ae(r,Me[a]),O(r),r}const Me=["minute","hour","day","month"];function Oe(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function Se(e){if(e.minute>=m||e.minute<0){const t=Math.floor(e.minute/m);e.minute-=t*m,e.hour+=t,Ee(e)}return e}function Ee(e){if(e.hour>=c||e.hour<0){const t=Math.floor(e.hour/c);e.hour-=t*c,e.day+=t,be(e)}return e}function be(t){F(t);let n=T(t.year,t.month);if(t.day>n){++t.month,t.month>u&&F(t);let e=t.day-n;n=T(t.year,t.month);do{e>n&&(++t.month,t.month>u&&F(t),e-=n,n=T(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&F(t),n=T(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&F(t),n=T(t.year,t.month))}while(e>n);t.day=n-e}return t}function F(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<i&&(e.month+=u,--e.year);return e}function Ae(e,t){switch(t){case"minute":return Se(e);case"hour":return Ee(e);case"day":return be(e);case"month":return F(e)}}function ve(e,t){const n=ie(e,t,!0);return Math.floor(n/f)}function We(e,t){let n=A(e),r=A(t);return n=C(n,0),r=C(r,6),Math.ceil(ve(n,r)/s)}const Ue={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 Ye(){const a=(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?a:e;function e(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]);return r.format(Ue[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),a}}}function Ce(t,n){const e=Object.keys(Ue),r=Ye();return e.map(e=>r(e,t,n))}function Fe(){const o=(e,t)=>"",i={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,n){try{const r=new Intl.DateTimeFormat(n||void 0,i[e]||i["long"]),a=new Date;return a.setDate(1),a.setMonth(t),r.format(a)}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),o}}}function Le(t,n){const r=Fe();return[...Array(12).keys()].map(e=>r(e,t,n))}var He={PARSE_DATETIME:n,PARSE_DATE:L,PARSE_TIME:r,DAYS_IN_MONTH:a,DAYS_IN_MONTH_LEAP:o,DAYS_IN_MONTH_MIN:t,DAYS_IN_MONTH_MAX:H,MONTH_MAX:u,MONTH_MIN:i,DAY_MIN:d,DAYS_IN_WEEK:s,MINUTES_IN_HOUR:m,HOURS_IN_DAY:c,FIRST_HOUR:R,MILLISECONDS_IN_MINUTE:$,MILLISECONDS_IN_HOUR:j,MILLISECONDS_IN_DAY:f,MILLISECONDS_IN_WEEK:y,Timestamp:K,TimeObject:z,today:g,getStartOfWeek:G,getEndOfWeek:Q,getStartOfMonth:V,getEndOfMonth:ee,parseTime:te,validateTimestamp:X,parsed:h,parseTimestamp:N,parseDate:J,getDayIdentifier:_,getTimeIdentifier:k,getDayTimeIdentifier:w,diffTimestamp:ie,updateRelative:M,updateMinutes:ue,updateWeekday:de,updateDayOfYear:se,updateWorkWeek:me,updateDisabled:ce,updateFormatted:O,getDayOfYear:S,getWorkWeek:E,getWeekday:b,isLeapYear:D,daysInMonth:T,copyTimestamp:A,padNumber:l,getDate:v,getTime:W,getDateTime:U,nextDay:p,prevDay:I,relativeDays:Y,findWeekday:C,getWeekdaySkips:ye,createDayList:he,createIntervalList:le,createNativeLocaleFormatter:De,makeDate:Te,makeDateTime:pe,validateNumber:Ie,isBetweenDates:_e,isOverlappingDates:ke,daysBetween:ve,weeksBetween:We,addToDate:we,compareTimestamps:ne,compareDate:re,compareTime:ae,compareDateTime:oe,getWeekdayFormatter:Ye,getWeekdayNames:Ce,getMonthFormatter:Fe,getMonthNames:Le},He=Object.freeze({__proto__:null,DAYS_IN_MONTH:a,DAYS_IN_MONTH_LEAP:o,DAYS_IN_MONTH_MAX:H,DAYS_IN_MONTH_MIN:t,DAYS_IN_WEEK:s,DAY_MIN:d,FIRST_HOUR:R,HOURS_IN_DAY:c,MILLISECONDS_IN_DAY:f,MILLISECONDS_IN_HOUR:j,MILLISECONDS_IN_MINUTE:$,MILLISECONDS_IN_WEEK:y,MINUTES_IN_HOUR:m,MONTH_MAX:u,MONTH_MIN:i,PARSE_DATE:L,PARSE_DATETIME:n,PARSE_TIME:r,SECONDS_IN_DAY:P,SECONDS_IN_HOUR:Z,SECONDS_IN_MINUTE:x,SECONDS_IN_WEEK:B,TimeObject:z,Timestamp:K,addToDate:we,compareDate:re,compareDateTime:oe,compareTime:ae,compareTimestamps:ne,copyTimestamp:A,createDayList:he,createIntervalList:le,createNativeLocaleFormatter:De,daysBetween:ve,daysInMonth:T,default:He,diffTimestamp:ie,findWeekday:C,getDate:v,getDateTime:U,getDayIdentifier:_,getDayOfYear:S,getDayTimeIdentifier:w,getEndOfMonth:ee,getEndOfWeek:Q,getMonthFormatter:Fe,getMonthNames:Le,getStartOfMonth:V,getStartOfWeek:G,getTime:W,getTimeIdentifier:k,getWeekday:b,getWeekdayFormatter:Ye,getWeekdayNames:Ce,getWeekdaySkips:ye,getWorkWeek:E,isBetweenDates:_e,isLeapYear:D,isOverlappingDates:ke,isToday:q,makeDate:Te,makeDateTime:pe,maxTimestamp:ge,minTimestamp:Ne,moveRelativeDays:fe,nextDay:p,padNumber:l,parseDate:J,parseTime:te,parseTimestamp:N,parsed:h,prevDay:I,relativeDays:Y,today:g,updateDayOfYear:se,updateDisabled:ce,updateFormatted:O,updateMinutes:ue,updateRelative:M,updateWeekday:de,updateWorkWeek:me,validateNumber:Ie,validateTimestamp:X,weeksBetween:We});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function $e(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function je(e,t){return 0===t?e:e.slice(0,t)}var xe={convertToUnit:Re,indexOf:$e},xe=Object.freeze({__proto__:null,convertToUnit:Re,default:xe,indexOf:$e,minCharWidth:je}),He={version:e,...He,...xe};return He});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define(t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.Timestamp=t())})(this,function(){const e="4.0.2",n=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,L=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,r=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,H=31,u=12,i=1,d=1,s=7,m=60,c=24,R=0,$=6e4,j=36e5,f=864e5,y=6048e5,x=60,Z=3600,P=86400,B=604800,K={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},z={hour:0,minute:0};function X(e){return!!n.exec(e)}function h(e){const t=n.exec(e);return t?{date:e,time:l(parseInt(t[6],10)||0,2)+":"+l(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 J(e,t=!1){const n=t?"UTC":"";return O({date:l(e[`get${n}FullYear`](),4)+"-"+l(e[`get${n}Month`]()+1,2)+"-"+l(e[`get${n}Date`](),2),time:l(e[`get${n}Hours`]()||0,2)+":"+l(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function l(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function D(e){return 1===(e%4===0^e%100===0^e%400===0)}function T(e,t){return(D(e)?o:a)[t]}function p(e){return++e.day,e.weekday=(e.weekday+1)%s,e.day>t&&e.day>T(e.year,e.month)&&(e.day=d,++e.month,e.month>u)&&(e.month=i,++e.year),e}function I(e){return e.day--,e.weekday=(e.weekday+6)%s,e.day<d&&(e.month--,e.month<i&&(e.year--,e.month=u),e.day=T(e.year,e.month)),e}function g(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),r=e.getFullYear();return[r,l(t,2),l(n,2)].join("-")}function q(e){return e===g()}function G(e,t,n){let r=A(e);if(1===r.day||0===r.weekday)while(!t.includes(r.weekday))r=p(r);return r=C(r,t[0],I),r=O(r),n&&(r=M(r,n,r.hasTime)),r}function Q(e,t,n){let r=A(e);const a=T(r.year,r.month);if(a===r.day||6===r.weekday)while(!t.includes(r.weekday))r=I(r);return r=C(r,t[t.length-1],p),r=O(r),n&&(r=M(r,n,r.hasTime)),r}function V(e){const t=A(e);return t.day=d,O(t),t}function ee(e){const t=A(e);return t.day=T(t.year,t.month),O(t),t}function te(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=r.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[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 ne(e,t){return JSON.stringify(e)===JSON.stringify(t)}function re(e,t){return v(e)===v(t)}function ae(e,t){return W(e)===W(t)}function oe(e,t){return U(e)===U(t)}function N(e,t){let n=h(e);return null===n?null:(n=O(n),t&&M(n,t,n.hasTime),n)}function _(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function k(e){return 100*e.hour+e.minute}function w(e){return _(e)+k(e)}function ie(e,t,n){const r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),a=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===n&&a<r?0:a-r}function M(e,t,n=!1){let r=_(t),a=_(e),o=r===a;return e.hasTime&&n&&o&&(r=k(t),a=k(e),o=r===a),e.past=a<r,e.current=o,e.future=a>r,e.currentWeekday=e.weekday===t.weekday,e}function ue(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/m),e.minute=t%m,e.time=W(e),n&&M(e,n,!0),e}function de(e){return e.weekday=b(e),e}function se(e){return e.doy=S(e),e}function me(e){return e.workweek=E(e),e}function ce(e,t,n,r,a){const o=_(e);if(void 0!==t){const d=_(h(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const s=_(h(n));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(r[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(var u in a)if(Array.isArray(a[u])&&2===a[u].length){const m=h(a[u][0]),c=h(a[u][1]);if(_e(e,m,c)){e.disabled=!0;break}}else{const f=_(N(a[u]+" 00:00"));if(f===o){e.disabled=!0;break}}return e}function O(e){return e.hasTime=!0,e.time=W(e),e.date=v(e),e.weekday=b(e),e.doy=S(e),e.workweek=E(e),e}function S(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 E(e){0===e.year&&(e=N(g()));const t=Te(e);if(isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=(n.setDate(n.getDate()-(n.getDay()+6)%7+3),new Date(n.getFullYear(),0,4)),a=(r.setDate(r.getDate()-(r.getDay()+6)%7+3),n.getTimezoneOffset()-r.getTimezoneOffset()),o=(n.setHours(n.getHours()-a),(n-r)/y);return 1+Math.floor(o)}function b(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%u+1,o=n(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*o+i+n(i/4)+n(o/4))%7+7)%7}return t}function A(e){return{...e}}function v(e){let t=l(e.year,4)+"-"+l(e.month,2);return e.hasDay&&(t+="-"+l(e.day,2)),t}function W(e){return e.hasTime?l(e.hour,2)+":"+l(e.minute,2):""}function U(e){return v(e)+" "+(e.hasTime?W(e):"00:00")}function fe(e,t=p,n=1,r=[0,1,2,3,4,5,6]){return Y(e,t,n,r)}function Y(e,t=p,n=1,r=[0,1,2,3,4,5,6]){r.includes(e.weekday)||0!==e.weekday||t!==p||++n;while(--n>=0)e=t(e),r.length<7&&!r.includes(e.weekday)&&++n;return e}function C(e,t,n=p,r=6){while(e.weekday!==t&&--r>=0)e=n(e);return e}function ye(t){const e=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)r[t[e]]=1;for(let n=0;n<s;++n){let t=1;for(let e=1;e<s;++e){const a=(n+e)%s;if(r[a])break;++t}e[n]=r[n]*t}return e}function he(e,t,n,r,a,o,i=[],u=[],d=42,s=0){const m=_(t),c=[];let f=A(e),y=0,h=y===m;if(!(m<_(e)))while((!h||c.length<s)&&c.length<d){if(y=_(f),h=h||y>m&&c.length>=s,h)break;if(0===r[f.weekday]);else{const l=A(f);O(l),M(l,n),ce(l,a,o,i,u),c.push(l)}f=Y(f,p)}return c}function le(t,n,r,a,o){const i=[];for(let e=0;e<a;++e){const u=(n+e)*r,d=A(t);i.push(ue(d,u,o))}return i}function De(r,a){const o=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?o:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(pe(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+U(t)),o}}}function Te(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 pe(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 Ie(e){return isFinite(parseInt(e,10))}function ge(e,t=!1){const n=!0===t?w:_;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function Ne(e,t=!1){const n=!0===t?w:_;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function _e(e,t,n,r){const a=_(e)+(!0===r?k(e):0),o=_(t)+(!0===r?k(t):0),i=_(n)+(!0===r?k(n):0);return a>=o&&a<=i}function ke(e,t,n,r){const a=_(e),o=_(t),i=_(n),u=_(r);return a>=i&&a<=u||o>=i&&o<=u||i>=a&&o>=u}function we(e,t){const r=A(e);let a;return Oe(t,(e,t)=>{if(void 0!==r[t]){r[t]+=parseInt(e,10);const n=Me.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&Ae(r,Me[a]),O(r),r}const Me=["minute","hour","day","month"];function Oe(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function Se(e){if(e.minute>=m||e.minute<0){const t=Math.floor(e.minute/m);e.minute-=t*m,e.hour+=t,Ee(e)}return e}function Ee(e){if(e.hour>=c||e.hour<0){const t=Math.floor(e.hour/c);e.hour-=t*c,e.day+=t,be(e)}return e}function be(t){F(t);let n=T(t.year,t.month);if(t.day>n){++t.month,t.month>u&&F(t);let e=t.day-n;n=T(t.year,t.month);do{e>n&&(++t.month,t.month>u&&F(t),e-=n,n=T(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&F(t),n=T(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&F(t),n=T(t.year,t.month))}while(e>n);t.day=n-e}return t}function F(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<i&&(e.month+=u,--e.year);return e}function Ae(e,t){switch(t){case"minute":return Se(e);case"hour":return Ee(e);case"day":return be(e);case"month":return F(e)}}function ve(e,t){const n=ie(e,t,!0);return Math.floor(n/f)}function We(e,t){let n=A(e),r=A(t);return n=C(n,0),r=C(r,6),Math.ceil(ve(n,r)/s)}const Ue={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 Ye(){const a=(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?a:e;function e(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]);return r.format(Ue[t])}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),a}}}function Ce(t,n){const e=Object.keys(Ue),r=Ye();return e.map(e=>r(e,t,n))}function Fe(){const o=(e,t)=>"",i={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,n){try{const r=new Intl.DateTimeFormat(n||void 0,i[e]||i["long"]),a=new Date;return a.setDate(1),a.setMonth(t),r.format(a)}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),o}}}function Le(t,n){const r=Fe();return[...Array(12).keys()].map(e=>r(e,t,n))}var He={PARSE_DATETIME:n,PARSE_DATE:L,PARSE_TIME:r,DAYS_IN_MONTH:a,DAYS_IN_MONTH_LEAP:o,DAYS_IN_MONTH_MIN:t,DAYS_IN_MONTH_MAX:H,MONTH_MAX:u,MONTH_MIN:i,DAY_MIN:d,DAYS_IN_WEEK:s,MINUTES_IN_HOUR:m,HOURS_IN_DAY:c,FIRST_HOUR:R,MILLISECONDS_IN_MINUTE:$,MILLISECONDS_IN_HOUR:j,MILLISECONDS_IN_DAY:f,MILLISECONDS_IN_WEEK:y,Timestamp:K,TimeObject:z,today:g,getStartOfWeek:G,getEndOfWeek:Q,getStartOfMonth:V,getEndOfMonth:ee,parseTime:te,validateTimestamp:X,parsed:h,parseTimestamp:N,parseDate:J,getDayIdentifier:_,getTimeIdentifier:k,getDayTimeIdentifier:w,diffTimestamp:ie,updateRelative:M,updateMinutes:ue,updateWeekday:de,updateDayOfYear:se,updateWorkWeek:me,updateDisabled:ce,updateFormatted:O,getDayOfYear:S,getWorkWeek:E,getWeekday:b,isLeapYear:D,daysInMonth:T,copyTimestamp:A,padNumber:l,getDate:v,getTime:W,getDateTime:U,nextDay:p,prevDay:I,relativeDays:Y,findWeekday:C,getWeekdaySkips:ye,createDayList:he,createIntervalList:le,createNativeLocaleFormatter:De,makeDate:Te,makeDateTime:pe,validateNumber:Ie,isBetweenDates:_e,isOverlappingDates:ke,daysBetween:ve,weeksBetween:We,addToDate:we,compareTimestamps:ne,compareDate:re,compareTime:ae,compareDateTime:oe,getWeekdayFormatter:Ye,getWeekdayNames:Ce,getMonthFormatter:Fe,getMonthNames:Le},He=Object.freeze({__proto__:null,DAYS_IN_MONTH:a,DAYS_IN_MONTH_LEAP:o,DAYS_IN_MONTH_MAX:H,DAYS_IN_MONTH_MIN:t,DAYS_IN_WEEK:s,DAY_MIN:d,FIRST_HOUR:R,HOURS_IN_DAY:c,MILLISECONDS_IN_DAY:f,MILLISECONDS_IN_HOUR:j,MILLISECONDS_IN_MINUTE:$,MILLISECONDS_IN_WEEK:y,MINUTES_IN_HOUR:m,MONTH_MAX:u,MONTH_MIN:i,PARSE_DATE:L,PARSE_DATETIME:n,PARSE_TIME:r,SECONDS_IN_DAY:P,SECONDS_IN_HOUR:Z,SECONDS_IN_MINUTE:x,SECONDS_IN_WEEK:B,TimeObject:z,Timestamp:K,addToDate:we,compareDate:re,compareDateTime:oe,compareTime:ae,compareTimestamps:ne,copyTimestamp:A,createDayList:he,createIntervalList:le,createNativeLocaleFormatter:De,daysBetween:ve,daysInMonth:T,default:He,diffTimestamp:ie,findWeekday:C,getDate:v,getDateTime:U,getDayIdentifier:_,getDayOfYear:S,getDayTimeIdentifier:w,getEndOfMonth:ee,getEndOfWeek:Q,getMonthFormatter:Fe,getMonthNames:Le,getStartOfMonth:V,getStartOfWeek:G,getTime:W,getTimeIdentifier:k,getWeekday:b,getWeekdayFormatter:Ye,getWeekdayNames:Ce,getWeekdaySkips:ye,getWorkWeek:E,isBetweenDates:_e,isLeapYear:D,isOverlappingDates:ke,isToday:q,makeDate:Te,makeDateTime:pe,maxTimestamp:ge,minTimestamp:Ne,moveRelativeDays:fe,nextDay:p,padNumber:l,parseDate:J,parseTime:te,parseTimestamp:N,parsed:h,prevDay:I,relativeDays:Y,today:g,updateDayOfYear:se,updateDisabled:ce,updateFormatted:O,updateMinutes:ue,updateRelative:M,updateWeekday:de,updateWorkWeek:me,validateNumber:Ie,validateTimestamp:X,weeksBetween:We});function Re(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function $e(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function je(e,t){return 0===t?e:e.slice(0,t)}var xe={convertToUnit:Re,indexOf:$e},xe=Object.freeze({__proto__:null,convertToUnit:Re,default:xe,indexOf:$e,minCharWidth:je}),He={version:e,...He,...xe};return He});
{
"name": "@quasar/quasar-ui-qcalendar",
"version": "4.0.1",
"version": "4.0.2",
"author": "Jeff Galbraith <jeff@quasar.dev>",

@@ -5,0 +5,0 @@ "productName": "QCalendar",

@@ -975,3 +975,7 @@ /* global window */

...intervalClass,
...getIntervalClasses(interval, props.selectedDates, props.selectedStartEndDates),
...getIntervalClasses(
interval,
Array.from(props.selectedDates),
props.selectedStartEndDates,
),
'q-calendar__hoverable': props.hoverable === true,

@@ -978,0 +982,0 @@ 'q-calendar__focusable': isFocusable === true,

@@ -717,3 +717,3 @@ /* global window */

outside,
props.selectedDates,
Array.from(props.selectedDates),
props.selectedStartEndDates,

@@ -866,4 +866,4 @@ props.hover,

props.selectedDates &&
props.selectedDates.length > 0 &&
props.selectedDates.includes(day.date)
Array.from(props.selectedDates).length > 0 &&
Array.from(props.selectedDates).includes(day.date)

@@ -870,0 +870,0 @@ const activeDate = props.noActiveDate !== true && __isActiveDate(day)

@@ -97,3 +97,3 @@ // common composables

selectedDates: {
type: Array,
type: [Array, Set],
default: () => [],

@@ -236,2 +236,3 @@ },

// this function is needed as a default value for dayStyle
function dayStyleDefault(/*timestamp*/) {

@@ -238,0 +239,0 @@ return undefined

/* global console */
const toCamelCase = (str) => str.replace(/(-\w)/g, (m) => m[1].toUpperCase())
let $listeners, $emit

@@ -8,2 +7,4 @@ /**

* The mouse event will not be set if there is no listener for it to key callbacks to a minimum
* @param {VTTCue.emit} emit
* @param {Array} listeners on the instance
* @param {Object} events undecorated events (ie: 'click-day' will be transformed to 'onClickDay')

@@ -13,3 +14,3 @@ * @param {Function} getEvent callback for event

*/
export function getMouseEventHandlers(events, getEvent) {
export function getMouseEventHandlers(emit, listeners, events, getEvent) {
const on = {}

@@ -23,3 +24,3 @@ for (const eventName in events) {

// make sure listeners has been set up properly
if ($listeners === undefined) {
if (listeners === undefined) {
// someone forgot to call the default function export

@@ -31,3 +32,3 @@ console.warn('$listeners has not been set up')

// if there is no listener for this, then don't process it
if ($listeners.value[eventKey] === undefined) continue
if (listeners.value[eventKey] === undefined) continue

@@ -53,3 +54,3 @@ // https://vuejs.org/v2/guide/render-function.html#Event-amp-Key-Modifiers

}
$emit(eventName, getEvent(mouseEvent, eventName))
emit(eventName, getEvent(mouseEvent, eventName))
}

@@ -80,4 +81,4 @@

*/
export function getDefaultMouseEventHandlers(suffix, getEvent) {
return getMouseEventHandlers(getMouseEventName(suffix), getEvent)
export function getDefaultMouseEventHandlers(emit, listeners, suffix, getEvent) {
return getMouseEventHandlers(emit, listeners, getMouseEventName(suffix), getEvent)
}

@@ -120,7 +121,11 @@

export default function (emit, listeners) {
$emit = emit
$listeners = listeners
const $emit = emit
const $listeners = listeners
return {
getMouseEventHandlers,
getDefaultMouseEventHandlers,
getMouseEventHandlers: (events, getEvent) => {
return getMouseEventHandlers($emit, $listeners, events, getEvent)
},
getDefaultMouseEventHandlers: (suffix, getEvent) => {
return getDefaultMouseEventHandlers($emit, $listeners, suffix, getEvent)
},
getMouseEventName,

@@ -127,0 +132,0 @@ getRawMouseEvents,

@@ -1,1 +0,1 @@

export const version = '4.0.1'
export const version = '4.0.2'

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc