=0&&di.layer)&&(m.componentId=o,m.context=s.context,m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function Fl(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,i=n.range,o=r.range,(null===i.start?null:i.start.valueOf())===(null===o.start?null:o.start.valueOf())&&(null===i.end?null:i.end.valueOf())===(null===o.end?null:o.end.valueOf())&&n.allDay===r.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(n,r));var n,r,i,o}function $l(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.datePointTransforms;or.start)return{endDelta:a};return null}(s,e,r.subjectEl.classList.contains("fc-event-resizer-start"),a.range)));l&&(u=xr(o,i.getCurrentData().eventUiBases,l,i),d.mutatedEvents=u,_s(d,e.dateProfile,i)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?i.dispatch({type:"SET_EVENT_RESIZE",state:d}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),c?ct():dt(),t||(l&&Fl(s,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,i=n.eventRange.instance,o=new Hr(t,r,i),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:o,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Hr(t,l.defs[r.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:o,event:u,relatedEvents:zr(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",s(s({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Zt(0),endDelta:n.validMutation.endDelta||Zt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,i=n.dragging=new Wl(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.context.options.dragScroll;var o=n.hitDragging=new Bl(n.dragging,$o(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragstart",n.handleDragStart),o.emitter.on("hitupdate",n.handleHitUpdate),o.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Ze(e.subjectEl,".fc-event")},t}(Fo);var Xl=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=Qe(e.origEvent);t.matchesCancel=!!Ze(r,n),t.matchesEvent=!!Ze(r,Gl.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Rl(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Jl={fixedMirrorParent:In},Ql={dateClick:In,eventDragStart:In,eventDragStop:In,eventDrop:In,eventResizeStart:In,eventResizeStop:In,eventResize:In,drop:In,eventReceive:In,eventLeave:In},eu=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,r){var i=n.hitDragging.dragging,o=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(o=e.context,n.canDropElOnCalendar(r.subjectEl,o)&&(a=function(e,t,n){for(var r=s({},t.leftoverProps),i=0,o=n.pluginHooks.externalDefTransforms;i{document.dispatchEvent(new CustomEvent("kimai.calendar.changeDate",{detail:{view:this.toExternalViewName(e.view.type),date:e.start.toISOString().split("T")[0]}}))},views:{dayGrid:{dayMaxEventRows:this.options.dayLimit}},viewClassNames:()=>{document.querySelector(".fc-dayGridMonth-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridWeek-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridDay-button").classList.remove("btn-icon")},eventWillUnmount:e=>{if(null===e.event.source)return;if(!this.isKimaiSource(e.event))return;const t=r.AM.getInstance(e.element);null!==t&&t.dispose()},eventMouseEnter:e=>{const t=e.event;if(!this.isKimaiSource(t))return;const n=e.el,i=o.getFormattedDate(t.start)+" | "+o.formatTime(t.start)+" - "+(t.end?o.formatTime(t.end):""),s=this.renderEventPopoverContent(t);let a=r.AM.getInstance(n);null!==a?a.setContent({".popover-header":i,".popover-body":s}):a=new r.AM(n,{title:i,placement:"top",html:!0,content:s,trigger:"focus"}),a.show()},eventMouseLeave:e=>{this.isKimaiSource(e.event)&&this.hidePopover(e.el)},eventDidMount:e=>{e.el.addEventListener("contextmenu",t=>{t.preventDefault();const n=e.event;if(!n.allDay){const e=this.options.url.actions(n.extendedProps.timesheet);i.get(e,{},e=>{new Pu.A("calendar_contextMenu").createFromApi(t,e)},e=>{console.log("Failed to load actions for context menu",e)})}})},eventsSet:e=>{this._renderDayAndWeekSum(this.getCalendar().getCurrentData().viewSpec.type,e)}};if(!this.hasPermission("punch")&&this.hasPermission("create")&&void 0!==this.options.dragdrop){[].slice.call(document.querySelectorAll(this.options.dragdrop.container)).map(e=>new tu(e,{itemSelector:this.options.dragdrop.items})),l={...l,droppable:!0,drop:e=>{const t=e.draggedEl,n=t.parentElement;let r=JSON.parse(t.dataset.entry);const s=JSON.parse(n.dataset.routeReplacer);let l=n.dataset.route;for(const[e,t]of Object.entries(s))l=l.replace(e,r[t]);let u=e.date;if("dayGridMonth"===e.view.type){let e=this.options.defaultStartTime;if(null===e){const t=new Date;e=(t.getHours()<10?"0":"")+t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()}u=o.addHumanDuration(u,e)}let c=o.addHumanDuration(u,this.options.slotDuration);this.hasPermission("punch")||(this.hasPermission("edit_begin")&&(r.begin=o.formatForAPI(u)),this.hasPermission("edit_end")&&(r.end=o.formatForAPI(c))),r=this.options.preparePayloadForUpdate(r),"PATCH"===n.dataset.method?i.patch(l,JSON.stringify(r),e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")}):i.post(l,JSON.stringify(r),e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")})}}}!this.hasPermission("punch")&&this.hasPermission("create")&&(l={...l,dateClick:e=>{if("dayGridMonth"!==e.view.type)return;const t=this.options.url.create(e.dateStr);s.openUrlInModal(t)},selectable:!0,select:e=>{if("dayGridMonth"===e.view.type)return;const t=this.options.url.create(e.startStr,e.endStr);s.openUrlInModal(t)}}),this.hasPermission("edit")&&(l={...l,eventClick:e=>{const t=e.event;this.isKimaiSource(t)?(this.hidePopover(e.el),t.extendedProps.exported&&!this.hasPermission("edit_exported")||s.openUrlInModal(this.options.url.edit(t.id),e=>{403!==e.status&&console.log(e)})):e.jsEvent.preventDefault()}},this.hasPermission("punch")||(l={...l,dragRevertDuration:0,eventStartEditable:this.hasPermission("edit_begin"),eventDurationEditable:this.hasPermission("edit_end")||this.hasPermission("edit_duration"),eventDragStart:e=>{this.hidePopover(e.el)},eventDrop:e=>{this.changeHandler(e)},eventResizeStart:e=>{this.hidePopover(e.el)},eventResize:e=>{this.changeHandler(e)}})),void 0!==this.options.googleCalendarApiKey&&(l={...l,googleCalendarApiKey:this.options.googleCalendarApiKey});let u=[];for(const e of this.options.eventSources){let t={};if("timesheet"===e.type)t={...t,id:"kimai-"+e.id,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},e=>{let t=[];for(const n of e)t.push(this.convertSourceForCalendar(n));n(t)},r)}};else if("google"===e.type)t={...t,id:"google-"+e.id,name:"google",editable:!1};else if("json"===e.type)t={...t,id:"json-"+e.id,editable:!1,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},e=>{let t=[];for(const n of e)t.push(n);n(t)},r)}};else{if("ical"!==e.type){console.log("Unknown source type given, skipping to load events from: "+e.id);continue}t={...t,id:"ical-"+e.id,url:e.url,format:"ics",editable:!1}}void 0!==e.options&&(t={...t,...e.options}),u.push(t)}u.length>0&&(l={...l,eventSources:u}),this.calendar=new aa(t,l)}isKimaiSource(e){return null!==e&&(null!==e.source&&0===e.source.id.indexOf("kimai-"))}toExternalViewName(e){switch(e){case"timeGridDay":return"day";case"timeGridWeek":return"week";default:return"month"}}toInternalViewName(e){switch(e){case"day":case"agendaDay":case"timeGridDay":return"timeGridDay";case"week":case"agendaWeek":case"timeGridWeek":return"timeGridWeek";default:return"dayGridMonth"}}hasPermission(e){return this.options.permissions[e]}getCalendar(){return this.calendar}render(){this.calendar.render()}reloadEvents(){this.calendar.getEventSources().forEach(e=>e.refetch())}convertSourceForCalendar(e){const t=this.kimai.getConfiguration().get("defaultColor");let n=e.activity.color;null!==n&&n!==t||(n=e.project.color,null!==n&&n!==t||(n=e.project.customer.color)),null===n&&(n=t);const r=this.kimai.getPlugin("date");let i=this.options.patterns.title;return i=i.replace("{project}",e.project.name),i=i.replace("{customer}",e.project.customer.name),i=i.replace("{description}",e.description??""),i=i.replace("{activity}",e.activity.name??""),i=null===e.end?i.replace("{duration}",""):i.replace("{duration}",r.formatDuration(e.duration)),""!==i&&null!==i||(i=e.activity.name),{id:e.id,timesheet:e.id,title:i,description:e.description,exported:e.exported,start:e.begin,end:e.end,activity:e.activity.name,project:e.project.name,customer:e.project.customer.name,tags:e.tags,color:n,textColor:Nu.A.calculateContrastColor(n)}}renderEventPopoverContent(e){const t=e.extendedProps,n=this.kimai.getPlugin("escape");let r="";if(null!==t.tags&&t.tags.length>0)for(let e of t.tags)r+=''+n.escapeForHtml(e)+"";return'\n \n
\n - '+this.options.translations.customer+": "+n.escapeForHtml(t.customer)+"
\n - "+this.options.translations.project+": "+n.escapeForHtml(t.project)+"
\n - "+this.options.translations.activity+": "+n.escapeForHtml(t.activity)+"
\n
"+(null!==t.description||t.tags.length>0?"
":"")+(t.description?"
"+n.escapeForHtml(t.description)+"
":"")+r+"\n
"}hidePopover(e){let t=r.AM.getInstance(e);null!==t&&t.hide()}changeHandler(e){const t=e.event;if(t.extendedProps.exported&&!this.hasPermission("edit_exported"))return void e.revert();const n=this.kimai.getPlugin("api"),r=this.kimai.getPlugin("alert"),i=this.kimai.getPlugin("date");let o={begin:i.formatForAPI(t.start)};null!==t.end&&void 0!==t.end?o.end=i.formatForAPI(t.end):o.end=null;const s=this.options.url.update(t.id);n.patch(s,JSON.stringify(o),()=>{r.success("action.update.success")},t=>{e.revert(),n.handleError("action.update.error",t)})}_renderDayAndWeekSum(e,t){if("dayGridMonth"===e)return;const n=this.kimai.getPlugin("date"),r={};"timeGridWeek"===e&&document.querySelectorAll("th.fc-col-header-cell[data-date]").forEach(e=>{r[e.dataset.date]=0}),t.forEach(e=>{const t=Lu.c9.fromJSDate(e.start).toUTC(),n=t.toFormat("yyyy-MM-dd");if(r[n]||(r[n]=0),null!==e.end){const i=Lu.c9.fromJSDate(e.end).toUTC().diff(t,"hours").as("seconds");r[n]+=i}});document.querySelectorAll(".fc-dailytotal").forEach(e=>e.remove());for(const t in r){const i=r[t];if("timeGridWeek"===e){document.querySelectorAll(`th.fc-col-header-cell[data-date="${t}"]`).forEach(e=>{const t=document.createElement("div");t.classList.add("fc-dailytotal"),t.textContent=n.formatSeconds(i),e.appendChild(t)})}}if("timeGridDay"===e){const e=document.querySelector("th.fc-day"),t=e.dataset.date;document.querySelectorAll(".fc-dailytotal").forEach(e=>e.remove());const i=document.createElement("div");i.classList.add("fc-dailytotal"),i.textContent=n.formatSeconds(r[t]),e.appendChild(i)}}}},2565:function(e,t){"use strict";t.A={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"}},2758:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{constructor(e){this.id=e}getContextMenuElement(){if(null===document.getElementById(this.id)){const e=document.createElement("div");e.id=this.id,e.classList.add("dropdown-menu","d-none"),document.body.appendChild(e)}return document.getElementById(this.id)}createFromApi(e,t){let n="";for(const e of t)if(!0===e.divider&&(n+=''),null!==e.url){if(n+='"+e.title+""}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),n.innerHTML=t,n.style.position="fixed",n.style.top=e.clientY+"px",n.style.left=e.clientX+"px";const r=e=>{e.target.classList.contains("dropdown-toggle")||e.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",r),document.removeEventListener("click",r))};n.addEventListener("click",r),document.addEventListener("click",r),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(e){[].slice.call(document.querySelectorAll(e)).map(e=>{null!==e.querySelector("td.actions div.dropdown-menu")&&e.addEventListener("contextmenu",t=>{let n=t.target;for(;null!==n;){const e=n.tagName.toUpperCase();if("TH"===e||"TABLE"===e||"BODY"===e)return;if("TR"===e)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const i=n.querySelector("td.actions div.dropdown-menu");if(null===i)return;t.preventDefault();new r(e.dataset.contextMenu).createFromClickEvent(t,i.innerHTML)})})}}},3445:function(e,t){"use strict";t.A={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"}},3578:function(e,t){"use strict";t.A={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"}},3793:function(e,t){"use strict";t.A={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"}},4019:function(e,t){"use strict";t.A={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"}},4053:function(e,t){"use strict";t.A={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"}},4729:function(e,t){"use strict";t.A={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"}},4773:function(e,t){"use strict";t.A={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"}},4836:function(e,t){"use strict";t.A={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"}},4853:function(e,t){"use strict";t.A={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}}},5179:function(e,t){"use strict";t.A={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"}},5431:function(e,t){"use strict";function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var r={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(n(e)," ").concat(e)},next:function(e){return"Nächste".concat(n(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(n(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};t.A=r},5506:function(e,t){"use strict";t.A={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"}},5690:function(e,t){"use strict";t.A={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"}},6225:function(e){var t,n,r,i;(t=e.exports).foldLength=75,t.newLineChar="\r\n",t.helpers={updateTimezones:function(e){var n,r,i,o,s,a;if(!e||"vcalendar"!==e.name)return e;for(n=e.getAllSubcomponents(),r=[],i={},s=0;s0&&"\\"===e[n-1]))return n;n+=1}return-1},binsearchInsert:function(e,t,n){if(!e.length)return 0;for(var r,i,o=0,s=e.length-1;o<=s;)if((i=n(t,e[r=o+Math.floor((s-o)/2)]))<0)s=r-1;else{if(!(i>0))break;o=r+1}return i<0?r:i>0?r+1:r},dumpn:function(){t.debug&&("undefined"!=typeof console&&"log"in console?t.helpers.dumpn=function(e){console.log(e)}:t.helpers.dumpn=function(e){dump(e+"\n")},t.helpers.dumpn(arguments[0]))},clone:function(e,n){if(e&&"object"==typeof e){if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){for(var r=[],i=0;i65535?2:1:(n+=t.newLineChar+" "+r.substring(0,i),r=r.substring(i),i=o=0)}return n.substr(t.newLineChar.length+1)},pad2:function(e){switch("string"!=typeof e&&("number"==typeof e&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}},trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)},inherits:function(e,n,r){function i(){}i.prototype=e.prototype,n.prototype=new i,r&&t.helpers.extend(r,n.prototype)},extend:function(e,t){for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r&&!Object.getOwnPropertyDescriptor(t,n)&&Object.defineProperty(t,n,r)}return t}},t.design=function(){"use strict";var e=/\\\\|\\,|\\[Nn]/g,n=/\\|,|\n/g;function r(e,t){return{matches:/.*/,fromICAL:function(t,n){return function(e,t,n){if(-1===e.indexOf("\\"))return e;n&&(t=new RegExp(t.source+"|\\\\"+n));return e.replace(t,p)}(t,e,n)},toICAL:function(e,n){var r=t;return n&&(r=new RegExp(r.source+"|"+n)),e.replace(r,function(e){switch(e){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case"\n":return"\\n";default:return e}})}}}var i={defaultType:"text"},o={defaultType:"text",multiValue:","},s={defaultType:"text",structuredValue:";"},a={defaultType:"integer"},l={defaultType:"date-time",allowedTypes:["date-time","date"]},u={defaultType:"date-time"},c={defaultType:"uri"},d={defaultType:"utc-offset"},h={defaultType:"recur"},f={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return"\n";default:return e}}var m={categories:o,url:c,version:i,uid:i},g={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){return"TRUE"===e},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){var n=parseFloat(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){var n=parseInt(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.substr(0,3)+e.substr(4,2):e.substr(0,3)+e.substr(4,2)+e.substr(7,2)},fromICAL:function(e){return e.length<6?e.substr(0,3)+":"+e.substr(3,2):e.substr(0,3)+":"+e.substr(3,2)+":"+e.substr(5,2)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}},v=t.helpers.extend(g,{text:r(/\\\\|\\;|\\,|\\[Nn]/g,/\\|;|,|\n/g),uri:{},binary:{decorate:function(e){return t.Binary.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,n){return C.strict?t.Time.fromDateString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()},fromICAL:function(e){return!C.strict&&e.length>=15?v["date-time"].fromICAL(e):e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)},toICAL:function(e){var t=e.length;return 10==t?e.substr(0,4)+e.substr(5,2)+e.substr(8,2):t>=19?v["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){if(C.strict||8!=e.length){var t=e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+"T"+e.substr(9,2)+":"+e.substr(11,2)+":"+e.substr(13,2);return e[15]&&"Z"===e[15]&&(t+="Z"),t}return v.date.fromICAL(e)},toICAL:function(e){var t=e.length;if(10!=t||C.strict){if(t>=19){var n=e.substr(0,4)+e.substr(5,2)+e.substr(8,5)+e.substr(14,2)+e.substr(17,2);return e[19]&&"Z"===e[19]&&(n+="Z"),n}return e}return v.date.toICAL(e)},decorate:function(e,n){return C.strict?t.Time.fromDateTimeString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return t.Duration.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){var n=e.split("/");return n[0]=v["date-time"].fromICAL(n[0]),t.Duration.isValueString(n[1])||(n[1]=v["date-time"].fromICAL(n[1])),n},toICAL:function(e){return C.strict||10!=e[0].length?e[0]=v["date-time"].toICAL(e[0]):e[0]=v.date.toICAL(e[0]),t.Duration.isValueString(e[1])||(C.strict||10!=e[1].length?e[1]=v["date-time"].toICAL(e[1]):e[1]=v.date.toICAL(e[1])),e.join("/")},decorate:function(e,n){return t.Period.fromJSON(e,n,!C.strict)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return t.Recur._stringToData(e,!0)},toICAL:function(e){var n="";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];"until"==r?i=i.length>10?v["date-time"].toICAL(i):v.date.toICAL(i):"wkst"==r?"number"==typeof i&&(i=t.Recur.numericDayToIcalDay(i)):Array.isArray(i)&&(i=i.join(",")),n+=r.toUpperCase()+"="+i+";"}return n.substr(0,n.length-1)},decorate:function(e){return t.Recur.fromData(e)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;var t=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2);return"Z"===e[6]&&(t+="Z"),t},toICAL:function(e){if(e.length<8)return e;var t=e.substr(0,2)+e.substr(3,2)+e.substr(6,2);return"Z"===e[8]&&(t+="Z"),t}}}),y=t.helpers.extend(m,{action:i,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:i,class:i,comment:i,completed:u,contact:i,created:u,description:i,dtend:l,dtstamp:u,dtstart:l,due:l,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:h,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":u,location:i,method:i,organizer:{defaultType:"cal-address"},"percent-complete":a,priority:a,prodid:i,"related-to":i,repeat:a,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return-1!==e.indexOf("/")?"period":-1===e.indexOf("T")?"date":"date-time"}},"recurrence-id":l,resources:o,"request-status":s,rrule:h,sequence:a,status:i,summary:i,transp:i,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:d,tzoffsetto:d,tzurl:c,tzid:i,tzname:i}),b=t.helpers.extend(g,{text:r(e,n),uri:r(e,n),date:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return 8==e.length?v.date.fromICAL(e):"-"==e[0]&&6==e.length?e.substr(0,4)+"-"+e.substr(4):e},toICAL:function(e){return 10==e.length?v.date.toICAL(e):"-"==e[0]&&7==e.length?e.substr(0,4)+e.substr(5):e}},time:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=b.time._splitZone(e,!0),n=t[0],r=t[1];return 6==r.length?r=r.substr(0,2)+":"+r.substr(2,2)+":"+r.substr(4,2):4==r.length&&"-"!=r[0]?r=r.substr(0,2)+":"+r.substr(2,2):5==r.length&&(r=r.substr(0,3)+":"+r.substr(3,2)),5!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+":"+n.substr(3)),r+n},toICAL:function(e){var t=b.time._splitZone(e),n=t[0],r=t[1];return 8==r.length?r=r.substr(0,2)+r.substr(3,2)+r.substr(6,2):5==r.length&&"-"!=r[0]?r=r.substr(0,2)+r.substr(3,2):6==r.length&&(r=r.substr(0,3)+r.substr(4,2)),6!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+n.substr(4)),r+n},_splitZone:function(e,t){var n,r,i=e.length-1,o=e.length-(t?5:6),s=e[o];return"Z"==e[i]?(n=e[i],r=e.substr(0,i)):e.length>6&&("-"==s||"+"==s)?(n=e.substr(o),r=e.substr(0,o)):(n="",r=e),[n,r]}},"date-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return b["date-and-or-time"].fromICAL(e)},toICAL:function(e){return b["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=e.split("T");return(t[0]?b.date.fromICAL(t[0]):"")+(t[1]?"T"+b.time.fromICAL(t[1]):"")},toICAL:function(e){var t=e.split("T");return b.date.toICAL(t[0])+(t[1]?"T"+b.time.toICAL(t[1]):"")}},timestamp:v["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/}}),_=t.helpers.extend(m,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:f,bday:f,caladruri:c,caluri:c,clientpidmap:s,email:i,fburl:c,fn:i,gender:s,geo:c,impp:c,key:c,kind:i,lang:{defaultType:"language-tag"},logo:c,member:c,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,note:i,org:{defaultType:"text",structuredValue:";"},photo:c,related:c,rev:{defaultType:"timestamp"},role:i,sound:c,source:c,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:i,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:i}),w=t.helpers.extend(g,{binary:v.binary,date:b.date,"date-time":b["date-time"],"phone-number":{},uri:v.uri,text:v.text,time:v.time,vcard:v.text,"utc-offset":{toICAL:function(e){return e.substr(0,7)},fromICAL:function(e){return e.substr(0,7)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}}),T=t.helpers.extend(m,{fn:i,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:i,tel:{defaultType:"phone-number"},email:i,mailer:i,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:i,role:i,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:s,note:o,prodid:i,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},"sort-string":i,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:i,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),E={value:v,param:{cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},property:y},D={value:b,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},property:_},S={value:w,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},property:T},C={strict:!0,defaultSet:E,defaultType:"unknown",components:{vcard:D,vcard3:S,vevent:E,vtodo:E,vjournal:E,valarm:E,vtimezone:E,daylight:E,standard:E},icalendar:E,vcard:D,vcard3:S,getDesignSet:function(e){return e&&e in C.components?C.components[e]:C.defaultSet}};return C}(),t.stringify=function(){"use strict";var e="\r\n",n="unknown",r=t.design,i=t.helpers;function o(t){"string"==typeof t[0]&&(t=[t]);for(var n=0,r=t.length,i="";n0&&("version"!==t[1][0][0]||"4.0"!==t[1][0][3])&&(c="vcard3"),n=n||r.getDesignSet(c);l1)throw new i("invalid ical body. component began but did not end");return t=null,1==n.length?n[0]:n}i.prototype=Error.prototype,o.property=function(e,t){var r={component:[[],[]],designSet:t||n.defaultSet};return o._handleContentLine(e,r),r.component[1][0]},o.component=function(e){return o(e)},o.ParserError=i,o._handleContentLine=function(e,t){var r,s,a,l,u,c,d=e.indexOf(":"),h=e.indexOf(";"),f={};if(-1!==h&&-1!==d&&h>d&&(h=-1),-1!==h){if(a=e.substring(0,h).toLowerCase(),-1==(u=o._parseParameters(e.substring(h),0,t.designSet))[2])throw new i("Invalid parameters in '"+e+"'");if(f=u[0],r=u[1].length+u[2]+h,-1===(s=e.substring(r).indexOf(":")))throw new i("Missing parameter value in '"+e+"'");l=e.substring(r+s+1)}else{if(-1===d)throw new i('invalid line (no token ";" or ":") "'+e+'"');if(a=e.substring(0,d).toLowerCase(),l=e.substring(d+1),"begin"===a){var p=[l.toLowerCase(),[],[]];return 1===t.stack.length?t.component.push(p):t.component[2].push(p),t.stack.push(t.component),t.component=p,void(t.designSet||(t.designSet=n.getDesignSet(t.component[0])))}if("end"===a)return void(t.component=t.stack.pop())}var m,g,v=!1,y=!1;a in t.designSet.property&&("multiValue"in(m=t.designSet.property[a])&&(v=m.multiValue),"structuredValue"in m&&(y=m.structuredValue),l&&"detectType"in m&&(c=m.detectType(l))),c||(c="value"in f?f.value.toLowerCase():m?m.defaultType:"unknown"),delete f.value,v&&y?g=[a,f,c,l=o._parseMultiValue(l,y,c,[],v,t.designSet,y)]:v?(g=[a,f,c],o._parseMultiValue(l,v,c,g,null,t.designSet,!1)):g=y?[a,f,c,l=o._parseMultiValue(l,y,c,[],null,t.designSet,y)]:[a,f,c,l=o._parseValue(l,c,t.designSet,!1)],"vcard"!==t.component[0]||0!==t.component[1].length||"version"===a&&"4.0"===l||(t.designSet=n.getDesignSet("vcard3")),t.component[1].push(g)},o._parseValue=function(e,t,n,r){return t in n.value&&"fromICAL"in n.value[t]?n.value[t].fromICAL(e,r):e},o._parseParameters=function(e,t,n){for(var s,a,l,u,c,d,h=t,f=0,p={},m=-1;!1!==f&&-1!==(f=r.unescapedIndexOf(e,"=",f+1));){if(0==(s=e.substr(h+1,f-h-1)).length)throw new i("Empty parameter name in '"+e+"'");if(d=!1,c=!1,u=(a=s.toLowerCase())in n.param&&n.param[a].valueType?n.param[a].valueType:"text",a in n.param&&(c=n.param[a].multiValue,n.param[a].multiValueSeparateDQuote&&(d=o._rfc6868Escape('"'+c+'"'))),'"'===e[f+1]){if(m=f+2,f=r.unescapedIndexOf(e,'"',m),c&&-1!=f)for(var g=!0;g;)e[f+1]==c&&'"'==e[f+2]?f=r.unescapedIndexOf(e,'"',f+3):g=!1;if(-1===f)throw new i('invalid line (no matching double quote) "'+e+'"');l=e.substr(m,f-m),-1===(h=r.unescapedIndexOf(e,";",f))&&(f=!1)}else{m=f+1;var v=r.unescapedIndexOf(e,";",m),y=r.unescapedIndexOf(e,":",m);-1!==y&&v>y?(v=y,f=!1):-1===v?(v=-1===y?e.length:y,f=!1):(h=v,f=v),l=e.substr(m,v-m)}if(l=o._rfc6868Escape(l),c){var b=d||c;l=o._parseMultiValue(l,b,u,[],null,n)}else l=o._parseValue(l,u,n);c&&a in p?Array.isArray(p[a])?p[a].push(l):p[a]=[p[a],l]:p[a]=l}return[p,l,m]},o._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,function(e){return s[e]})};var s={"^'":'"',"^n":"\n","^^":"^"};return o._parseMultiValue=function(e,t,n,i,s,a,l){var u,c=0,d=0;if(0===t.length)return e;for(;-1!==(c=r.unescapedIndexOf(e,t,d));)u=e.substr(d,c-d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),d=c+t.length;return u=e.substr(d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),1==i.length?i[0]:i},o._eachLine=function(t,n){var r,i,o,s=t.length,a=t.search(e),l=a;do{o=(l=t.indexOf("\n",a)+1)>1&&"\r"===t[l-2]?2:1,0===l&&(l=s,o=0)," "===(i=t[a])||"\t"===i?r+=t.substr(a+1,l-a-(o+1)):(r&&n(null,r),r=t.substr(a,l-a-o)),a=l}while(l!==s);(r=r.trim()).length&&n(null,r)},o}(),t.Component=function(){"use strict";function e(e,t){"string"==typeof e&&(e=[e,[],[]]),this.jCal=e,this.parent=t||null}return e.prototype={_hydratedPropertyCount:0,_hydratedComponentCount:0,get name(){return this.jCal[0]},get _designSet(){return this.parent&&this.parent._designSet||t.design.getDesignSet(this.name)},_hydrateComponent:function(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];var n=new e(this.jCal[2][t],this);return this._hydratedComponentCount++,this._components[t]=n},_hydrateProperty:function(e){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[e])return this._properties[e];var n=new t.Property(this.jCal[1][e],this);return this._hydratedPropertyCount++,this._properties[e]=n},getFirstSubcomponent:function(e){if(e)for(var t=0,n=this.jCal[2],r=n.length;t=0;o--)n&&i[o][0]!==n||this._removeObjectByIndex(e,r,o)},addSubcomponent:function(e){this._components||(this._components=[],this._hydratedComponentCount=0),e.parent&&e.parent.removeSubcomponent(e);var t=this.jCal[2].push(e.jCal);return this._components[t-1]=e,this._hydratedComponentCount++,e.parent=this,e},removeSubcomponent:function(e){var t=this._removeObject(2,"_components",e);return t&&this._hydratedComponentCount--,t},removeAllSubcomponents:function(e){var t=this._removeAllObjects(2,"_components",e);return this._hydratedComponentCount=0,t},addProperty:function(e){if(!(e instanceof t.Property))throw new TypeError("must instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),e.parent&&e.parent.removeProperty(e);var n=this.jCal[1].push(e.jCal);return this._properties[n-1]=e,this._hydratedPropertyCount++,e.parent=this,e},addPropertyWithValue:function(e,n){var r=new t.Property(e);return r.setValue(n),this.addProperty(r),r},updatePropertyWithValue:function(e,t){var n=this.getFirstProperty(e);return n?n.setValue(t):n=this.addPropertyWithValue(e,t),n},removeProperty:function(e){var t=this._removeObject(1,"_properties",e);return t&&this._hydratedPropertyCount--,t},removeAllProperties:function(e){var t=this._removeAllObjects(1,"_properties",e);return this._hydratedPropertyCount=0,t},toJSON:function(){return this.jCal},toString:function(){return t.stringify.component(this.jCal,this._designSet)}},e.fromString=function(n){return new e(t.parse.component(n))},e}(),t.Property=function(){"use strict";var e=t.design;function n(t,n){this._parent=n||null,"string"==typeof t?(this.jCal=[t,{},e.defaultType],this.jCal[2]=this.getDefaultType()):this.jCal=t,this._updateType()}return n.prototype={get type(){return this.jCal[2]},get name(){return this.jCal[0]},get parent(){return this._parent},set parent(t){var n=!this._parent||t&&t._designSet!=this._parent._designSet;return this._parent=t,this.type==e.defaultType&&n&&(this.jCal[2]=this.getDefaultType(),this._updateType()),t},get _designSet(){return this.parent?this.parent._designSet:e.defaultSet},_updateType:function(){var e=this._designSet;if(this.type in e.value){e.value[this.type];"decorate"in e.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in e.property&&(this.isMultiValue="multiValue"in e.property[this.name],this.isStructuredValue="structuredValue"in e.property[this.name])}},_hydrateValue:function(e){return this._values&&this._values[e]?this._values[e]:this.jCal.length<=3+e?null:this.isDecorated?(this._values||(this._values=[]),this._values[e]=this._decorate(this.jCal[3+e])):this.jCal[3+e]},_decorate:function(e){return this._designSet.value[this.type].decorate(e,this)},_undecorate:function(e){return this._designSet.value[this.type].undecorate(e,this)},_setDecoratedValue:function(e,t){this._values||(this._values=[]),"object"==typeof e&&"icaltype"in e?(this.jCal[3+t]=this._undecorate(e),this._values[t]=e):(this.jCal[3+t]=e,this._values[t]=this._decorate(e))},getParameter:function(e){return e in this.jCal[1]?this.jCal[1][e]:void 0},getFirstParameter:function(e){var t=this.getParameter(e);return Array.isArray(t)?t[0]:t},setParameter:function(e,t){var n=e.toLowerCase();"string"==typeof t&&n in this._designSet.param&&"multiValue"in this._designSet.param[n]&&(t=[t]),this.jCal[1][e]=t},removeParameter:function(e){delete this.jCal[1][e]},getDefaultType:function(){var t=this.jCal[0],n=this._designSet;if(t in n.property){var r=n.property[t];if("defaultType"in r)return r.defaultType}return e.defaultType},resetType:function(e){this.removeAllValues(),this.jCal[2]=e,this._updateType()},getFirstValue:function(){return this._hydrateValue(0)},getValues:function(){var e=this.jCal.length-3;if(e<1)return[];for(var t=0,n=[];t0&&"object"==typeof e[0]&&"icaltype"in e[0]&&this.resetType(e[0].icaltype),this.isDecorated)for(;nn)-(n>t)},_normalize:function(){for(var e=this.toSeconds(),t=this.factor;e<-43200;)e+=97200;for(;e>50400;)e-=97200;this.fromSeconds(e),0==e&&(this.factor=t)},toICALString:function(){return t.design.icalendar.value["utc-offset"].toICAL(this.toString())},toString:function(){return(1==this.factor?"+":"-")+t.helpers.pad2(this.hours)+":"+t.helpers.pad2(this.minutes)}},e.fromString=function(e){var n={};return n.factor="+"===e[0]?1:-1,n.hours=t.helpers.strictParseInt(e.substr(1,2)),n.minutes=t.helpers.strictParseInt(e.substr(4,2)),new t.UtcOffset(n)},e.fromSeconds=function(t){var n=new e;return n.fromSeconds(t),n},e}(),t.Binary=function(){function e(e){this.value=e}return e.prototype={icaltype:"binary",decodeValue:function(){return this._b64_decode(this.value)},setEncodedValue:function(e){this.value=this._b64_encode(e)},_b64_encode:function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a>16&255,n=s>>8&255,r=255&s,c[u++]=64==i?String.fromCharCode(t):64==o?String.fromCharCode(t,n):String.fromCharCode(t,n,r)}while(ln)-(t=0?i=r:o=-1,-1==o&&-1!=i)break;if((r+=o)<0)return 0;if(r>=this.changes.length)break}var a=this.changes[i];if(a.utcOffset-a.prevUtcOffset<0&&i>0){var l=t.helpers.clone(a,!0);if(t.Timezone.adjust_change(l,0,0,0,l.prevUtcOffset),t.Timezone._compare_change_fn(n,l)<0){var u=this.changes[i-1],c=!1;a.is_daylight!=c&&u.is_daylight==c&&(a=u)}}return a.utcOffset},_findNearbyChange:function(e){var n=t.helpers.binsearchInsert(this.changes,e,t.Timezone._compare_change_fn);return n>=this.changes.length?this.changes.length-1:n},_ensureCoverage:function(e){if(-1==t.Timezone._minimumExpansionYear){var n=t.Time.now();t.Timezone._minimumExpansionYear=n.year}var r=e;if(rt.Timezone.MAX_YEAR&&(r=t.Timezone.MAX_YEAR),!this.changes.length||this.expandedUntilYearn)&&h);)i.year=h.year,i.month=h.month,i.day=h.day,i.hour=h.hour,i.minute=h.minute,i.second=h.second,i.isDate=h.isDate,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}else(i=a()).year=o.year,i.month=o.month,i.day=o.day,i.hour=o.hour,i.minute=o.minute,i.second=o.second,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);return r},toString:function(){return this.tznames?this.tznames:this.tzid}},t.Timezone._compare_change_fn=function(e,t){return e.yeart.year?1:e.montht.month?1:e.dayt.day?1:e.hourt.hour?1:e.minutet.minute?1:e.secondt.second?1:0},t.Timezone.convert_time=function(e,n,r){if(e.isDate||n.tzid==r.tzid||n==t.Timezone.localTimezone||r==t.Timezone.localTimezone)return e.zone=r,e;var i=n.utcOffset(e);return e.adjust(0,0,0,-i),i=r.utcOffset(e),e.adjust(0,0,0,i),null},t.Timezone.fromData=function(e){return(new t.Timezone).fromData(e)},t.Timezone.utcTimezone=t.Timezone.fromData({tzid:"UTC"}),t.Timezone.localTimezone=t.Timezone.fromData({tzid:"floating"}),t.Timezone.adjust_change=function(e,n,r,i,o){return t.Time.prototype.adjust.call(e,n,r,i,o,e)},t.Timezone._minimumExpansionYear=-1,t.Timezone.MAX_YEAR=2035,t.Timezone.EXTRA_COVERAGE=5,t.TimezoneService=((i={get count(){return Object.keys(r).length},reset:function(){r=Object.create(null);var e=t.Timezone.utcTimezone;r.Z=e,r.UTC=e,r.GMT=e},has:function(e){return!!r[e]},get:function(e){return r[e]},register:function(e,n){if(e instanceof t.Component&&"vtimezone"===e.name&&(e=(n=new t.Timezone(e)).tzid),!(n instanceof t.Timezone))throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component");r[e]=n},remove:function(e){return delete r[e]}}).reset(),i),t.Time=function(e,t){this.wrappedJSObject=this;var n=this._time=Object.create(null);n.year=0,n.month=1,n.day=1,n.hour=0,n.minute=0,n.second=0,n.isDate=!1,this.fromData(e,t)},t.Time._dowCache={},t.Time._wnCache={},t.Time.prototype={icalclass:"icaltime",_cachedUnixTime:null,get icaltype(){return this.isDate?"date":"date-time"},zone:null,_pendingNormalization:!1,clone:function(){return new t.Time(this._time,this.zone)},reset:function(){this.fromData(t.Time.epochTime),this.zone=t.Timezone.utcTimezone},resetTo:function(e,t,n,r,i,o,s){this.fromData({year:e,month:t,day:n,hour:r,minute:i,second:o,zone:s})},fromJSDate:function(e,n){return e?n?(this.zone=t.Timezone.utcTimezone,this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()):(this.zone=t.Timezone.localTimezone,this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.hour=e.getHours(),this.minute=e.getMinutes(),this.second=e.getSeconds()):this.reset(),this._cachedUnixTime=null,this},fromData:function(e,n){if(e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if("icaltype"===r)continue;this[r]=e[r]}if(n&&(this.zone=n),e&&!("isDate"in e)?this.isDate=!("hour"in e):e&&"isDate"in e&&(this.isDate=e.isDate),e&&"timezone"in e){var i=t.TimezoneService.get(e.timezone);this.zone=i||t.Timezone.localTimezone}return e&&"zone"in e&&(this.zone=e.zone),this.zone||(this.zone=t.Timezone.localTimezone),this._cachedUnixTime=null,this},dayOfWeek:function(e){var n=e||t.Time.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+n;if(r in t.Time._dowCache)return t.Time._dowCache[r];var i=this.day,o=this.month+(this.month<3?12:0),s=this.year-(this.month<3?1:0),a=i+s+t.helpers.trunc(26*(o+1)/10)+t.helpers.trunc(s/4);return a=((a+=6*t.helpers.trunc(s/100)+t.helpers.trunc(s/400))+7-n)%7+1,t.Time._dowCache[r]=a,a},dayOfYear:function(){var e=t.Time.isLeapYear(this.year)?1:0;return t.Time.daysInYearPassedMonth[e][this.month-1]+this.day},startOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-n)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},endOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+n-t.Time.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},startOfMonth:function(){var e=this.clone();return e.day=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfMonth:function(){var e=this.clone();return e.day=t.Time.daysInMonth(e.month,e.year),e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startOfYear:function(){var e=this.clone();return e.day=1,e.month=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfYear:function(){var e=this.clone();return e.day=31,e.month=12,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startDoyWeek:function(e){var n=e||t.Time.SUNDAY,r=this.dayOfWeek()-n;return r<0&&(r+=7),this.dayOfYear()-r},getDominicalLetter:function(){return t.Time.getDominicalLetter(this.year)},nthWeekDay:function(e,n){var r,i=t.Time.daysInMonth(this.month,this.year),o=n,s=0,a=this.clone();if(o>=0){a.day=1,0!=o&&o--,s=a.day;var l=e-a.dayOfWeek();l<0&&(l+=7),s+=l,s-=e,r=e}else a.day=i,o++,(r=a.dayOfWeek()-e)<0&&(r+=7),r=i-r;return s+(r+=7*o)},isNthWeekDay:function(e,t){var n=this.dayOfWeek();return 0===t&&n===e||this.nthWeekDay(e,t)===this.day},weekNumber:function(e){var n,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(r in t.Time._wnCache)return t.Time._wnCache[r];var i=this.clone();i.isDate=!0;var o=this.year;12==i.month&&i.day>25?(n=t.Time.weekOneStarts(o+1,e),i.compare(n)<0?n=t.Time.weekOneStarts(o,e):o++):(n=t.Time.weekOneStarts(o,e),i.compare(n)<0&&(n=t.Time.weekOneStarts(--o,e)));var s=i.subtractDate(n).toSeconds()/86400,a=t.helpers.trunc(s/7)+1;return t.Time._wnCache[r]=a,a},addDuration:function(e){var t=e.isNegative?-1:1,n=this.second,r=this.minute,i=this.hour,o=this.day;n+=t*e.seconds,r+=t*e.minutes,i+=t*e.hours,o+=t*e.days,o+=7*t*e.weeks,this.second=n,this.minute=r,this.hour=i,this.day=o,this._cachedUnixTime=null},subtractDate:function(e){var n=this.toUnixTime()+this.utcOffset(),r=e.toUnixTime()+e.utcOffset();return t.Duration.fromSeconds(n-r)},subtractDateTz:function(e){var n=this.toUnixTime(),r=e.toUnixTime();return t.Duration.fromSeconds(n-r)},compare:function(e){var t=this.toUnixTime(),n=e.toUnixTime();return t>n?1:n>t?-1:0},compareDateOnlyTz:function(e,n){function r(e){return t.Time._cmp_attr(i,o,e)}var i=this.convertToZone(n),o=e.convertToZone(n),s=0;return 0!=(s=r("year"))||0!=(s=r("month"))||(s=r("day")),s},convertToZone:function(e){var n=this.clone(),r=this.zone.tzid==e.tzid;return this.isDate||r||t.Timezone.convert_time(n,this.zone,e),n.zone=e,n},utcOffset:function(){return this.zone==t.Timezone.localTimezone||this.zone==t.Timezone.utcTimezone?0:this.zone.utcOffset(this)},toICALString:function(){var e=this.toString();return e.length>10?t.design.icalendar.value["date-time"].toICAL(e):t.design.icalendar.value.date.toICAL(e)},toString:function(){var e=this.year+"-"+t.helpers.pad2(this.month)+"-"+t.helpers.pad2(this.day);return this.isDate||(e+="T"+t.helpers.pad2(this.hour)+":"+t.helpers.pad2(this.minute)+":"+t.helpers.pad2(this.second),this.zone===t.Timezone.utcTimezone&&(e+="Z")),e},toJSDate:function(){return this.zone==t.Timezone.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())},_normalize:function(){return this._time.isDate,this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this},adjust:function(e,n,r,i,o){var s,a,l,u,c,d,h,f=0,p=0,m=o||this._time;if(m.isDate||(l=m.second+i,m.second=l%60,s=t.helpers.trunc(l/60),m.second<0&&(m.second+=60,s--),u=m.minute+r+s,m.minute=u%60,a=t.helpers.trunc(u/60),m.minute<0&&(m.minute+=60,a--),c=m.hour+n+a,m.hour=c%24,f=t.helpers.trunc(c/24),m.hour<0&&(m.hour+=24,f--)),m.month>12?p=t.helpers.trunc((m.month-1)/12):m.month<1&&(p=t.helpers.trunc(m.month/12)-1),m.year+=p,m.month-=12*p,(d=m.day+e+f)>0)for(;!(d<=(h=t.Time.daysInMonth(m.month,m.year)));)m.month++,m.month>12&&(m.year++,m.month=1),d-=h;else for(;d<=0;)1==m.month?(m.year--,m.month=12):m.month--,d+=t.Time.daysInMonth(m.month,m.year);return m.day=d,this._cachedUnixTime=null,this},fromUnixTime:function(e){this.zone=t.Timezone.utcTimezone;var n=t.Time.epochTime.clone();n.adjust(0,0,0,e),this.year=n.year,this.month=n.month,this.day=n.day,this.hour=n.hour,this.minute=n.minute,this.second=Math.floor(n.second),this._cachedUnixTime=null},toUnixTime:function(){if(null!==this._cachedUnixTime)return this._cachedUnixTime;var e=this.utcOffset(),t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-e);return this._cachedUnixTime=t/1e3,this._cachedUnixTime},toJSON:function(){for(var e,t=["year","month","day","hour","minute","second","isDate"],n=Object.create(null),r=0,i=t.length;r12||(r=[0,31,28,31,30,31,30,31,31,30,31,30,31][e],2==e&&(r+=t.Time.isLeapYear(n))),r},t.Time.isLeapYear=function(e){return e<=1752?e%4==0:e%4==0&&e%100!=0||e%400==0},t.Time.fromDayOfYear=function(e,n){var r=n,i=e,o=new t.Time;o.auto_normalize=!1;var s=t.Time.isLeapYear(r)?1:0;if(i<1)return r--,s=t.Time.isLeapYear(r)?1:0,i+=t.Time.daysInYearPassedMonth[s][12],t.Time.fromDayOfYear(i,r);if(i>t.Time.daysInYearPassedMonth[s][12])return s=t.Time.isLeapYear(r)?1:0,i-=t.Time.daysInYearPassedMonth[s][12],r++,t.Time.fromDayOfYear(i,r);o.year=r,o.isDate=!0;for(var a=11;a>=0;a--)if(i>t.Time.daysInYearPassedMonth[s][a]){o.month=a+1,o.day=i-t.Time.daysInYearPassedMonth[s][a];break}return o.auto_normalize=!0,o},t.Time.fromStringv2=function(e){return new t.Time({year:parseInt(e.substr(0,4),10),month:parseInt(e.substr(5,2),10),day:parseInt(e.substr(8,2),10),isDate:!0})},t.Time.fromDateString=function(e){return new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),isDate:!0})},t.Time.fromDateTimeString=function(e,n){if(e.length<19)throw new Error('invalid date-time value: "'+e+'"');var r;return e[19]&&"Z"===e[19]?r="Z":n&&(r=n.getParameter("tzid")),new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),hour:t.helpers.strictParseInt(e.substr(11,2)),minute:t.helpers.strictParseInt(e.substr(14,2)),second:t.helpers.strictParseInt(e.substr(17,2)),timezone:r})},t.Time.fromString=function(e,n){return e.length>10?t.Time.fromDateTimeString(e,n):t.Time.fromDateString(e)},t.Time.fromJSDate=function(e,n){return(new t.Time).fromJSDate(e,n)},t.Time.fromData=function(e,n){return(new t.Time).fromData(e,n)},t.Time.now=function(){return t.Time.fromJSDate(new Date,!1)},t.Time.weekOneStarts=function(e,n){var r=t.Time.fromData({year:e,month:1,day:1,isDate:!0}),i=r.dayOfWeek(),o=n||t.Time.DEFAULT_WEEK_START;return i>t.Time.THURSDAY&&(r.day+=7),o>t.Time.THURSDAY&&(r.day-=7),r.day-=i-o,r},t.Time.getDominicalLetter=function(e){var n="GFEDCBA",r=(e+(e/4|0)+(e/400|0)-(e/100|0)-1)%7;return t.Time.isLeapYear(e)?n[(r+6)%7]+n[r]:n[r]},t.Time.epochTime=t.Time.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"}),t.Time._cmp_attr=function(e,t,n){return e[n]>t[n]?1:e[n]4?r(u,f?1:3,2):null,second:4==d?r(u,2,2):6==d?r(u,4,2):8==d?r(u,6,2):null};return l="Z"==l?t.Timezone.utcTimezone:l&&":"==l[3]?t.UtcOffset.fromString(l):null,new t.VCardTime(p,l,n)},function(){var e={SU:t.Time.SUNDAY,MO:t.Time.MONDAY,TU:t.Time.TUESDAY,WE:t.Time.WEDNESDAY,TH:t.Time.THURSDAY,FR:t.Time.FRIDAY,SA:t.Time.SATURDAY},n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);function i(e,n,r,i){var o=i;if("+"===i[0]&&(o=i.substr(1)),o=t.helpers.strictParseInt(o),void 0!==n&&i '+n);if(void 0!==r&&i>r)throw new Error(e+': invalid value "'+i+'" must be < '+n);return o}t.Recur=function(e){this.wrappedJSObject=this,this.parts={},e&&"object"==typeof e&&this.fromData(e)},t.Recur.prototype={parts:null,interval:1,wkst:t.Time.MONDAY,until:null,count:null,freq:null,icalclass:"icalrecur",icaltype:"recur",iterator:function(e){return new t.RecurIterator({rule:this,dtstart:e})},clone:function(){return new t.Recur(this.toJSON())},isFinite:function(){return!(!this.count&&!this.until)},isByCount:function(){return!(!this.count||this.until)},addComponent:function(e,t){var n=e.toUpperCase();n in this.parts?this.parts[n].push(t):this.parts[n]=[t]},setComponent:function(e,t){this.parts[e.toUpperCase()]=t.slice()},getComponent:function(e){var t=e.toUpperCase();return t in this.parts?this.parts[t].slice():[]},getNextOccurrence:function(e,t){var n,r=this.iterator(e);do{n=r.next()}while(n&&n.compare(t)<=0);return n&&t.zone&&(n.zone=t.zone),n},fromData:function(e){for(var n in e){var r=n.toUpperCase();r in u?Array.isArray(e[n])?this.parts[r]=e[n]:this.parts[r]=[e[n]]:this[n]=e[n]}this.interval&&"number"!=typeof this.interval&&l.INTERVAL(this.interval,this),this.wkst&&"number"!=typeof this.wkst&&(this.wkst=t.Recur.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof t.Time||(this.until=t.Time.fromString(this.until))},toJSON:function(){var e=Object.create(null);for(var n in e.freq=this.freq,this.count&&(e.count=this.count),this.interval>1&&(e.interval=this.interval),this.parts)if(this.parts.hasOwnProperty(n)){var r=this.parts[n];Array.isArray(r)&&1==r.length?e[n.toLowerCase()]=r[0]:e[n.toLowerCase()]=t.helpers.clone(this.parts[n])}return this.until&&(e.until=this.until.toString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e.wkst=t.Recur.numericDayToIcalDay(this.wkst)),e},toString:function(){var e="FREQ="+this.freq;for(var n in this.count&&(e+=";COUNT="+this.count),this.interval>1&&(e+=";INTERVAL="+this.interval),this.parts)this.parts.hasOwnProperty(n)&&(e+=";"+n+"="+this.parts[n]);return this.until&&(e+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e+=";WKST="+t.Recur.numericDayToIcalDay(this.wkst)),e}},t.Recur.icalDayToNumericDay=function(n,r){var i=r||t.Time.SUNDAY;return(e[n]-i+7)%7+1},t.Recur.numericDayToIcalDay=function(e,r){var i=e+(r||t.Time.SUNDAY)-t.Time.SUNDAY;return i>7&&(i-=7),n[i]};var o=/^(SU|MO|TU|WE|TH|FR|SA)$/,s=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,a=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"],l={FREQ:function(e,t,n){if(-1===a.indexOf(e))throw new Error('invalid frequency "'+e+'" expected: "'+a.join(", ")+'"');t.freq=e},COUNT:function(e,n,r){n.count=t.helpers.strictParseInt(e)},INTERVAL:function(e,n,r){n.interval=t.helpers.strictParseInt(e),n.interval<1&&(n.interval=1)},UNTIL:function(e,n,r){e.length>10?n.until=t.design.icalendar.value["date-time"].fromICAL(e):n.until=t.design.icalendar.value.date.fromICAL(e),r||(n.until=t.Time.fromString(n.until))},WKST:function(e,n,r){if(!o.test(e))throw new Error('invalid WKST value "'+e+'"');n.wkst=t.Recur.icalDayToNumericDay(e)}},u={BYSECOND:i.bind(this,"BYSECOND",0,60),BYMINUTE:i.bind(this,"BYMINUTE",0,59),BYHOUR:i.bind(this,"BYHOUR",0,23),BYDAY:function(e){if(s.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:i.bind(this,"BYMONTHDAY",-31,31),BYYEARDAY:i.bind(this,"BYYEARDAY",-366,366),BYWEEKNO:i.bind(this,"BYWEEKNO",-53,53),BYMONTH:i.bind(this,"BYMONTH",1,12),BYSETPOS:i.bind(this,"BYSETPOS",-366,366)};t.Recur.fromString=function(e){var n=t.Recur._stringToData(e,!1);return new t.Recur(n)},t.Recur.fromData=function(e){return new t.Recur(e)},t.Recur._stringToData=function(e,t){for(var n=Object.create(null),r=e.split(";"),i=r.length,o=0;o=0||r<0)&&(this.last.day+=r)}else{var i=t.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek());e.BYDAY=[i]}if("YEARLY"==this.rule.freq){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if("MONTHLY"==this.rule.freq&&this.has_by_data("BYDAY")){var o=null,s=this.last.clone(),a=t.Time.daysInMonth(this.last.month,this.last.year);for(var l in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(l)){this.last=s.clone();n=(u=this.ruleDayOfWeek(this.by_data.BYDAY[l]))[0];var u,c=u[1],d=this.last.nthWeekDay(c,n);if(n>=6||n<=-6)throw new Error("Malformed values in BYDAY part");if(d>a||d<=0){if(o&&o.month==s.month)continue;for(;d>a||d<=0;)this.increment_month(),a=t.Time.daysInMonth(this.last.month,this.last.year),d=this.last.nthWeekDay(c,n)}this.last.day=d,(!o||this.last.compare(o)<0)&&(o=this.last.clone())}if(this.last=o.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>a||0==this.last.day)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")&&this.last.day<0){a=t.Time.daysInMonth(this.last.month,this.last.year);this.last.day=a+this.last.day+1}},next:function(){var e,t=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(0==this.occurrence_number&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do{switch(e=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":e=this.next_month();break;case"YEARLY":this.next_year();break;default:return null}}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!e);if(0==this.last.compare(t))throw new Error("Same occurrence found twice, protecting you from death by recursion");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)},next_second:function(){return this.next_generic("BYSECOND","SECONDLY","second","minute")},increment_second:function(e){return this.increment_generic(e,"second",60,"minute")},next_minute:function(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")},increment_minute:function(e){return this.increment_generic(e,"minute",60,"hour")},next_hour:function(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")},increment_hour:function(e){this.increment_generic(e,"hour",24,"monthday")},next_day:function(){this.by_data;var e="DAILY"==this.rule.freq;return 0==this.next_hour()||(e?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0},next_week:function(){var e=0;if(0==this.next_weekday_by_week())return e;if(this.has_by_data("BYWEEKNO")){++this.by_indices.BYWEEKNO;this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,e=1),this.last.month=1,this.last.day=1;var t=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*t,e&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return e},normalizeByMonthDayRules:function(e,n,r){for(var i,o=t.Time.daysInMonth(n,e),s=[],a=0,l=r.length;ao)){if(i<0)i=o+(i+1);else if(0===i)continue;-1===s.indexOf(i)&&s.push(i)}return s.sort(function(e,t){return e-t})},_byDayAndMonthDay:function(e){var n,r,i,o,s=this.by_data.BYDAY,a=0,l=s.length,u=0,c=this,d=this.last.day;function h(){for(o=t.Time.daysInMonth(c.last.month,c.last.year),n=c.normalizeByMonthDayRules(c.last.year,c.last.month,c.by_data.BYMONTHDAY),i=n.length;n[a]<=d&&(!e||n[a]!=d)&&ao)f();else{var m=n[a++];if(m>=r){d=m;for(var g=0;gn&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data("BYSETPOS")&&!this.check_set_position(1)||(e=1):e=0)}else if(this.has_by_data("BYMONTHDAY")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());n=t.Time.daysInMonth(this.last.month,this.last.year);(s=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY])<0&&(s=n+s+1),s>n?(this.last.day=1,e=this.is_day_in_byday(this.last)):this.last.day=s}else{this.increment_month();n=t.Time.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>n?e=0:this.last.day=this.by_data.BYMONTHDAY[0]}return e},next_weekday_by_week:function(){var e=0;if(0==this.next_hour())return e;if(!this.has_by_data("BYDAY"))return 1;for(;;){var n=new t.Time;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,e=1);var r=this.by_data.BYDAY[this.by_indices.BYDAY],i=this.ruleDayOfWeek(r)[1];(i-=this.rule.wkst)<0&&(i+=7),n.year=this.last.year,n.month=this.last.month,n.day=this.last.day;var o=n.startDoyWeek(this.rule.wkst);if(!(i+o<1)||e){var s=t.Time.fromDayOfYear(o+i,this.last.year);return this.last.year=s.year,this.last.month=s.month,this.last.day=s.day,e}}},next_year:function(){if(0==this.next_hour())return 0;if(++this.days_index==this.days.length){this.days_index=0;do{this.increment_year(this.rule.interval),this.expand_year_days(this.last.year)}while(0==this.days.length)}return this._nextByYearDay(),1},_nextByYearDay:function(){var e=this.days[this.days_index],n=this.last.year;e<1&&(e+=1,n+=1);var r=t.Time.fromDayOfYear(e,n);this.last.day=r.day,this.last.month=r.month},ruleDayOfWeek:function(e,n){var r=e.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);return r?[parseInt(r[1]||0,10),e=t.Recur.icalDayToNumericDay(r[2],n)]:[0,0]},next_generic:function(e,t,n,r,i){var o=e in this.by_data,s=this.rule.freq==t,a=0;if(i&&0==this[i]())return a;if(o){this.by_indices[e]++;this.by_indices[e];var l=this.by_data[e];this.by_indices[e]==l.length&&(this.by_indices[e]=0,a=1),this.last[n]=l[this.by_indices[e]]}else s&&this["increment_"+n](this.rule.interval);return o&&a&&s&&this["increment_"+r](1),a},increment_monthday:function(e){for(var n=0;nr&&(this.last.day-=r,this.increment_month())}},increment_month:function(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{"MONTHLY"==this.rule.freq?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;var e=t.helpers.trunc(this.last.month/12);this.last.month%=12,this.last.month++,0!=e&&this.increment_year(e)}},increment_year:function(e){this.last.year+=e},increment_generic:function(e,n,r,i){this.last[n]+=e;var o=t.helpers.trunc(this.last[n]/r);this.last[n]%=r,0!=o&&this["increment_"+i](o)},has_by_data:function(e){return e in this.rule.parts},expand_year_days:function(e){var n=new t.Time;this.days=[];var r={},i=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s in this.rule.parts&&(r[s]=this.rule.parts[s])}if("BYMONTH"in r&&"BYWEEKNO"in r){var a=1,l={};n.year=e,n.isDate=!0;for(var u=0;u0?(M=P+7*(R-1))<=w&&this.days.push(D+M):(M=L+7*(R+1))>0&&this.days.push(D+M)}}this.days.sort(function(e,t){return e-t})}else if(2==p&&"BYDAY"in r&&"BYMONTHDAY"in r){var H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y];var z=t.Time.fromDayOfYear(k,e);this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(k)}}else if(3==p&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y],z=t.Time.fromDayOfYear(k,e);this.by_data.BYMONTH.indexOf(z.month)>=0&&this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(k)}}else if(2==p&&"BYDAY"in r&&"BYWEEKNO"in r){H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y];var V=(z=t.Time.fromDayOfYear(k,e)).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(V)&&this.days.push(k)}}else 3==p&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r||(this.days=1==p&&"BYYEARDAY"in r?this.days.concat(this.by_data.BYYEARDAY):[]);return 0},expand_by_day:function(e){var t=[],n=this.last.clone();n.year=e,n.month=1,n.day=1,n.isDate=!0;var r=n.dayOfWeek();n.month=12,n.day=31,n.isDate=!0;var i=n.dayOfWeek(),o=n.dayOfYear();for(var s in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(s)){var a=this.by_data.BYDAY[s],l=this.ruleDayOfWeek(a),u=l[0],c=l[1];if(0==u)for(var d=(c+7-r)%7+1;d<=o;d+=7)t.push(d);else if(u>0){var h;h=c>=r?c-r+1:c-r+8,t.push(h+7*(u-1))}else{var f;u=-u,f=c<=i?o-i+c:o-i+c-7,t.push(f-7*(u-1))}}return t},is_day_in_byday:function(e){for(var t in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(t)){var n=this.by_data.BYDAY[t],r=this.ruleDayOfWeek(n),i=r[0],o=r[1],s=e.dayOfWeek();if(0==i&&o==s||e.nthWeekDay(o,i)==e.day)return 1}return 0},check_set_position:function(e){return!!this.has_by_data("BYSETPOS")&&-1!==this.by_data.BYSETPOS.indexOf(e)},sort_byday_rules:function(e){for(var t=0;tthis.ruleDayOfWeek(e[t],this.rule.wkst)[1]){var r=e[t];e[t]=e[n],e[n]=r}}},check_contract_restriction:function(t,n){var r=e._indexMap[t],i=e._expandMap[this.rule.freq][r],o=!1;if(t in this.by_data&&i==e.CONTRACT){var s=this.by_data[t];for(var a in s)if(s.hasOwnProperty(a)&&s[a]==n){o=!0;break}}else o=!0;return o},check_contracting_rules:function(){var e=this.last.dayOfWeek(),n=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",t.Recur.numericDayToIcalDay(e))&&this.check_contract_restriction("BYWEEKNO",n)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)},setup_defaults:function(t,n,r){var i=e._indexMap[t];return e._expandMap[this.rule.freq][i]!=e.CONTRACT&&(t in this.by_data||(this.by_data[t]=[r]),this.rule.freq!=n)?this.by_data[t][0]:r},toJSON:function(){var e=Object.create(null);return e.initialized=this.initialized,e.rule=this.rule.toJSON(),e.dtstart=this.dtstart.toJSON(),e.by_data=this.by_data,e.days=this.days,e.last=this.last.toJSON(),e.by_indices=this.by_indices,e.occurrence_number=this.occurrence_number,e}},e._indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8},e._expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]},e.UNKNOWN=0,e.CONTRACT=1,e.EXPAND=2,e.ILLEGAL=3,e}(),t.RecurExpansion=function(){function e(e){return t.helpers.formatClassType(e,t.Time)}function n(e,t){return e.compare(t)}function r(e){this.ruleDates=[],this.exDates=[],this.fromData(e)}return r.prototype={complete:!1,ruleIterators:null,ruleDates:null,exDates:null,ruleDateInc:0,exDateInc:0,exDate:null,ruleDate:null,dtstart:null,last:null,fromData:function(n){var r=t.helpers.formatClassType(n.dtstart,t.Time);if(!r)throw new Error(".dtstart (ICAL.Time) must be given");if(this.dtstart=r,n.component)this._init(n.component);else{if(this.last=e(n.last)||r.clone(),!n.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=n.ruleIterators.map(function(e){return t.helpers.formatClassType(e,t.RecurIterator)}),this.ruleDateInc=n.ruleDateInc,this.exDateInc=n.exDateInc,n.ruleDates&&(this.ruleDates=n.ruleDates.map(e),this.ruleDate=this.ruleDates[this.ruleDateInc]),n.exDates&&(this.exDates=n.exDates.map(e),this.exDate=this.exDates[this.exDateInc]),void 0!==n.complete&&(this.complete=n.complete)}},next:function(){for(var e,t,n,r=0;;){if(r++>500)throw new Error("max tries have occured, rule may be impossible to forfill.");if(t=this.ruleDate,e=this._nextRecurrenceIter(this.last),!t&&!e){this.complete=!0;break}if((!t||e&&t.compare(e.last)>0)&&(t=e.last.clone(),e.next()),this.ruleDate===t&&this._nextRuleDay(),this.last=t,!this.exDate||((n=this.exDate.compare(this.last))<0&&this._nextExDay(),0!==n))return this.last;this._nextExDay()}},toJSON:function(){function e(e){return e.toJSON()}var t=Object.create(null);return t.ruleIterators=this.ruleIterators.map(e),this.ruleDates&&(t.ruleDates=this.ruleDates.map(e)),this.exDates&&(t.exDates=this.exDates.map(e)),t.ruleDateInc=this.ruleDateInc,t.exDateInc=this.exDateInc,t.last=this.last.toJSON(),t.dtstart=this.dtstart.toJSON(),t.complete=this.complete,t},_extractDates:function(e,r){function i(e){o=t.helpers.binsearchInsert(s,e,n),s.splice(o,0,e)}for(var o,s=[],a=e.getAllProperties(r),l=a.length,u=0;u0)&&(r=t);return r}},r}(),t.Event=function(){function e(e,n){e instanceof t.Component||(n=e,e=null),this.component=e||new t.Component("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],n&&n.strictExceptions&&(this.strictExceptions=n.strictExceptions),n&&n.exceptions?n.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(e){e.hasProperty("recurrence-id")&&this.relateException(e)},this)}function n(e,t){return e[0]>t[0]?1:t[0]>e[0]?-1:0}return e.prototype={THISANDFUTURE:"THISANDFUTURE",exceptions:null,strictExceptions:!1,relateException:function(e){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(e instanceof t.Component&&(e=new t.Event(e)),this.strictExceptions&&e.uid!==this.uid)throw new Error("attempted to relate unrelated exception");var r=e.recurrenceId.toString();if(this.exceptions[r]=e,e.modifiesFuture()){var i=[e.recurrenceId.toUnixTime(),r],o=t.helpers.binsearchInsert(this.rangeExceptions,i,n);this.rangeExceptions.splice(o,0,i)}},modifiesFuture:function(){return!!this.component.hasProperty("recurrence-id")&&this.component.getFirstProperty("recurrence-id").getParameter("range")===this.THISANDFUTURE},findRangeException:function(e){if(!this.rangeExceptions.length)return null;var r=e.toUnixTime(),i=t.helpers.binsearchInsert(this.rangeExceptions,[r],n);if((i-=1)<0)return null;var o=this.rangeExceptions[i];return r=0?d:1e3+d,(et({year:r,month:i,day:o,hour:24===a?0:a,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let j={};const B=new Map;function F(e,t={}){const n=JSON.stringify([e,t]);let r=B.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),B.set(n,r)),r}const $=new Map;const q=new Map;let Z=null;const G=new Map;function K(e){let t=G.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),G.set(e,t)),t}const X=new Map;function J(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=$.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),$.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return $e(this.floor?Math.floor(e):Ke(e,3),this.padTo)}}class ee{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=F(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class te{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ve()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=q.get(i);return void 0===o&&(o=new Intl.RelativeTimeFormat(e,t),q.set(i,o)),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,u=i[e],c=r?l?u[1]:u[2]||u[1]:l?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ne={firstDay:1,minimalDays:4,weekend:[6,7]};class re{static fromOpts(e){return re.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||we.defaultLocale,s=o||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,l=n||we.defaultOutputCalendar,u=Be(r)||we.defaultWeekSettings;return new re(s,a,l,u,o)}static resetCache(){Z=null,B.clear(),$.clear(),q.clear(),G.clear(),X.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return re.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=F(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=F(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===K(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?re.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Be(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return J(this,e,ft,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=br.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return J(this,e,vt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=br.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return J(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[br.utc(2016,11,13,9),br.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return J(this,e,Tt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[br.utc(-40,1,1),br.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ee(e,this.intl,t)}relFormatter(e={}){return new te(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=j[n];return r||(r=new Intl.ListFormat(e,t),j[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||K(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:We()?function(e){let t=X.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ne,...t}),X.set(e,t)}return t}(this.locale):ne}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ie=null;class oe extends L{static get utcInstance(){return null===ie&&(ie=new oe(0)),ie}static instance(e){return 0===e?oe.utcInstance:new oe(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new oe(ot(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${lt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${lt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class se extends L{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ae(e,t){if(He(e)||null===e)return t;if(e instanceof L)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Y.instance:"utc"===n||"gmt"===n?oe.utcInstance:oe.parseSpecifier(n)||U.create(e)}return Ye(e)?oe.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new se(e)}const le={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ce=le.hanidec.replace(/[\[|\]]/g,"").split("");const de=new Map;function he({numberingSystem:e},t=""){const n=e||"latn";let r=de.get(n);void 0===r&&(r=new Map,de.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${le[n]}${t}`),r.set(t,i)),i}let fe,pe=()=>Date.now(),me="system",ge=null,ve=null,ye=null,be=60,_e=null;class we{static get now(){return pe}static set now(e){pe=e}static set defaultZone(e){me=e}static get defaultZone(){return ae(me,Y.instance)}static get defaultLocale(){return ge}static set defaultLocale(e){ge=e}static get defaultNumberingSystem(){return ve}static set defaultNumberingSystem(e){ve=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return _e}static set defaultWeekSettings(e){_e=Be(e)}static get twoDigitCutoffYear(){return be}static set twoDigitCutoffYear(e){be=e%100}static get throwOnInvalid(){return fe}static set throwOnInvalid(e){fe=e}static resetCaches(){re.resetCache(),U.resetCache(),br.resetCache(),de.clear()}}class Te{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ee=[0,31,59,90,120,151,181,212,243,273,304,334],De=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Ce(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function ke(e,t,n){return n+(Xe(e)?De:Ee)[t-1]}function xe(e,t){const n=Xe(e)?De:Ee,r=n.findIndex(e=>ent(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:a,...ut(e)}}function Ae(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=Oe(Ce(r,1,t),n),a=Je(r);let l,u=7*i+o-s-7+t;u<1?(l=r-1,u+=Je(l)):u>a?(l=r+1,u-=Je(r)):l=r;const{month:c,day:d}=xe(l,u);return{year:l,month:c,day:d,...ut(e)}}function Ie(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:ke(t,n,r),...ut(e)}}function Re(e){const{year:t,ordinal:n}=e,{month:r,day:i}=xe(t,n);return{year:t,month:r,day:i,...ut(e)}}function Ne(e,t){if(!He(e.localWeekday)||!He(e.localWeekNumber)||!He(e.localWeekYear)){if(!He(e.weekday)||!He(e.weekNumber)||!He(e.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return He(e.localWeekday)||(e.weekday=e.localWeekday),He(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),He(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Pe(e){const t=ze(e.year),n=Fe(e.month,1,12),r=Fe(e.day,1,Qe(e.year,e.month));return t?n?!r&&Se("day",e.day):Se("month",e.month):Se("year",e.year)}function Le(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Fe(t,0,23)||24===t&&0===n&&0===r&&0===i,s=Fe(n,0,59),a=Fe(r,0,59),l=Fe(i,0,999);return o?s?a?!l&&Se("millisecond",i):Se("second",r):Se("minute",n):Se("hour",t)}function He(e){return void 0===e}function Ye(e){return"number"==typeof e}function ze(e){return"number"==typeof e&&e%1==0}function Ve(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function We(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Be(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!Fe(e.firstDay,1,7)||!Fe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Fe(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Fe(e,t,n){return ze(e)&&e>=t&&e<=n}function $e(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qe(e){return He(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return He(e)||null===e||""===e?void 0:parseFloat(e)}function Ge(e){if(!He(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ke(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Xe(e){return e%4==0&&(e%100!=0||e%400==0)}function Je(e){return Xe(e)?366:365}function Qe(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Xe(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function et(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function tt(e,t,n){return-Oe(Ce(e,1,t),n)+t-1}function nt(e,t=4,n=1){const r=tt(e,t,n),i=tt(e+1,t,n);return(Je(e)-r+i)/7}function rt(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function it(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function ot(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function st(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function at(e,t){const n={};for(const r in e)if(je(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=st(i)}return n}function lt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${$e(n,2)}:${$e(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${$e(n,2)}${$e(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const ct=["January","February","March","April","May","June","July","August","September","October","November","December"],dt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht=["J","F","M","A","M","J","J","A","S","O","N","D"];function ft(e){switch(e){case"narrow":return[...ht];case"short":return[...dt];case"long":return[...ct];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const pt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],mt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gt=["M","T","W","T","F","S","S"];function vt(e){switch(e){case"narrow":return[...gt];case"short":return[...mt];case"long":return[...pt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],bt=["Before Christ","Anno Domini"],_t=["BC","AD"],wt=["B","A"];function Tt(e){switch(e){case"narrow":return[...wt];case"short":return[..._t];case"long":return[...bt];default:return null}}function Et(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Dt={D:p,DD:m,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:T,T:E,TT:D,TTT:S,TTTT:C,f:k,ff:O,fff:I,ffff:N,F:x,FF:M,FFF:R,FFFF:P};class St{static create(e,t={}){return new St(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Dt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return $e(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=()=>n?function(e){return yt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,r)=>n?function(e,t){return ft(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return vt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=St.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Tt(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return Et(St.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=St.parseFormat(t),o=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),s=e.shiftTo(...o.map(r).filter(e=>e));return Et(i,((e,t)=>i=>{const o=r(i);if(o){const r=t.isNegativeDuration&&o!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(o)*r,i.length,s)}return i})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const Ct=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function kt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function xt(...e){return t=>e.reduce(([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]},[{},null,1]).slice(0,2)}function Ot(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Mt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:h(Ze(n)),months:h(Ze(r)),weeks:h(Ze(i)),days:h(Ze(o)),hours:h(Ze(s)),minutes:h(Ze(a)),seconds:h(Ze(l),"-0"===l),milliseconds:h(Ge(u),d)}]}const $t={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qt(e,t,n,r,i,o,s){const a={year:2===t.length?rt(qe(t)):qe(t),month:dt.indexOf(n)+1,day:qe(r),hour:qe(i),minute:qe(o)};return s&&(a.second=qe(s)),e&&(a.weekday=e.length>3?pt.indexOf(e)+1:mt.indexOf(e)+1),a}const Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Gt(e){const[,t,n,r,i,o,s,a,l,u,c,d]=e,h=qt(t,i,r,n,o,s,a);let f;return f=l?$t[l]:u?0:ot(c,d),[h,new oe(f)]}const Kt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Xt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,i,r,n,o,s,a),oe.utcInstance]}function en(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,a,n,r,i,o,s),oe.utcInstance]}const tn=kt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Nt),nn=kt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nt),rn=kt(/(\d{4})-?(\d{3})/,Nt),on=kt(Rt),sn=xt(function(e,t){return[{year:zt(e,t),month:zt(e,t+1,1),day:zt(e,t+2,1)},null,t+3]},Vt,Wt,Ut),an=xt(Pt,Vt,Wt,Ut),ln=xt(Lt,Vt,Wt,Ut),un=xt(Vt,Wt,Ut);const cn=xt(Vt);const dn=kt(/(\d{4})-(\d\d)-(\d\d)/,Yt),hn=kt(Ht),fn=xt(Vt,Wt,Ut);const pn="Invalid Duration",mn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},gn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...mn},vn=365.2425,yn=30.436875,bn={years:{quarters:4,months:12,weeks:52.1775,days:vn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:yn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...mn},_n=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wn=_n.slice(0).reverse();function Tn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Cn(r)}function En(e,t){let n=t.milliseconds??0;for(const r of wn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Dn(e,t){const n=En(e,t)<0?-1:1;_n.reduceRight((r,i)=>{if(He(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i},null),_n.reduce((n,r)=>{if(He(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function Sn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Cn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?bn:gn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||re.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Cn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Cn({values:at(e,Cn.normalizeUnit),loc:re.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ye(e))return Cn.fromMillis(e);if(Cn.isDuration(e))return e;if("object"==typeof e)return Cn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Ot(e,[Bt,Ft])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Ot(e,[jt,cn])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof Te?e:new Te(e,t);if(we.throwOnInvalid)throw new s(n);return new Cn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new l(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?St.create(this.loc,n).formatDurationFromString(this,e):pn}toHuman(e={}){if(!this.isValid)return pn;const t=!1!==e.showZeros,n=_n.map(n=>{const r=this.values[n];return He(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ke(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return br.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?En(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Cn.fromDurationLike(e),n={};for(const e of _n)(je(t.values,e)||je(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Tn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Cn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=st(e(this.values[n],n));return Tn(this,{values:t},!0)}get(e){return this[Cn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Tn(this,{values:{...this.values,...at(e,Cn.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Tn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Dn(this.matrix,e),Tn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Tn(this,{values:Sn(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Cn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const o of _n)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;Ye(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else Ye(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return Dn(this.matrix,t),Tn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Tn(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return Tn(this,{values:Sn(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of _n)if(!t(this.values[n],e.values[n]))return!1;return!0}}const kn="Invalid Interval";class xn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof Te?e:new Te(e,t);if(we.throwOnInvalid)throw new o(n);return new xn({invalid:n})}static fromDateTimes(e,t){const n=_r(e),r=_r(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?xn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(_r).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(xn.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=Cn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i));n=+e>+this.e?this.e:e,o.push(xn.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:xn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return xn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),o=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(xn.fromDateTimes(t,e.time)),t=null);return xn.merge(r)}difference(...e){return xn.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:kn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=p,t={}){return this.isValid?St.create(this.s.loc.clone(t),e).formatInterval(this):kn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:kn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:kn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:kn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:kn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Cn.invalid(this.invalidReason)}mapEndpoints(e){return xn.fromDateTimes(e(this.s),e(this.e))}}class On{static hasDST(e=we.defaultZone){const t=br.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return ae(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||re.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||re.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||re.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||re.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return re.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return re.create(t,null,"gregory").eras(e)}static features(){return{relative:Ve(),localeWeek:We()}}}function Mn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Cn.fromMillis(r).as("days"))}function An(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Mn(e,t);return(n-n%7)/7}],["days",Mn]],i={},o=e;let s,a;for(const[l,u]of r)n.indexOf(l)>=0&&(s=l,i[l]=u(e,t),a=o.plus(i),a>t?(i[l]--,(e=o.plus(i))>t&&(a=e,i[l]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const l=t-i,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(s0?Cn.fromMillis(l,r).shiftTo(...u).plus(c):c}function In(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Rn=`[ ${String.fromCharCode(160)}]`,Nn=new RegExp(Rn,"g");function Pn(e){return e.replace(/\./g,"\\.?").replace(Nn,Rn)}function Ln(e){return e.replace(/\./g,"").replace(Nn," ").toLowerCase()}function Hn(e,t){return null===e?null:{regex:RegExp(e.map(Pn).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function Yn(e,t){return{regex:e,deser:([,e,t])=>ot(e,t),groups:t}}function zn(e){return{regex:e,deser:([e])=>e}}const Vn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Wn=null;function Un(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Fn(St.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class jn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Un(St.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=he(t),r=he(t,"{2}"),i=he(t,"{3}"),o=he(t,"{4}"),s=he(t,"{6}"),a=he(t,"{1,2}"),l=he(t,"{1,3}"),u=he(t,"{1,6}"),c=he(t,"{1,9}"),d=he(t,"{2,4}"),h=he(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Hn(t.eras("short"),0);case"GG":return Hn(t.eras("long"),0);case"y":return In(u);case"yy":case"kk":return In(d,rt);case"yyyy":case"kkkk":return In(o);case"yyyyy":return In(h);case"yyyyyy":return In(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return In(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return In(r);case"MMM":return Hn(t.months("short",!0),1);case"MMMM":return Hn(t.months("long",!0),1);case"LLL":return Hn(t.months("short",!1),1);case"LLLL":return Hn(t.months("long",!1),1);case"o":case"S":return In(l);case"ooo":case"SSS":return In(i);case"u":return zn(c);case"uu":return zn(a);case"uuu":case"E":case"c":return In(n);case"a":return Hn(t.meridiems(),0);case"EEE":return Hn(t.weekdays("short",!1),1);case"EEEE":return Hn(t.weekdays("long",!1),1);case"ccc":return Hn(t.weekdays("short",!0),1);case"cccc":return Hn(t.weekdays("long",!0),1);case"Z":case"ZZ":return Yn(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return Yn(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return zn(/[a-z_+-/]{1,256}?/i);case" ":return zn(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(je(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return He(e.z)||(n=U.create(e.z)),He(e.Z)||(n||(n=new oe(e.Z)),t=e.Z),He(e.q)||(e.M=3*(e.q-1)+1),He(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),He(e.u)||(e.S=Ge(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(je(n,"a")&&je(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Bn(e,t,n){return new jn(e,n).explainFromTokens(t)}function Fn(e,t){if(!e)return null;const n=St.create(t,e).dtFormatter((Wn||(Wn=br.fromMillis(1555555555555)),Wn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Vn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i))}const $n="Invalid DateTime",qn=864e13;function Zn(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Gn(e){return null===e.weekData&&(e.weekData=Me(e.c)),e.weekData}function Kn(e){return null===e.localWeekData&&(e.localWeekData=Me(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Xn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new br({...n,...t,old:n})}function Jn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Qn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function er(e,t,n){return Jn(et(e),t,n)}function tr(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Qe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=Cn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=et(o);let[l,u]=Jn(a,n,e.zone);return 0!==s&&(l+=s,u=e.zone.offset(l)),{ts:l,o:u}}function nr(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=br.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return br.invalid(new Te("unparsable",`the input "${i}" can't be parsed as ${r}`))}function rr(e,t,n=!0){return e.isValid?St.create(re.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ir(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=$e(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=$e(e.c.month),"month"===n)return i;i+="-"}else if(i+=$e(e.c.month),"month"===n)return i;return i+=$e(e.c.day),i}function or(e,t,n,r,i,o,s){let a=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=$e(e.c.hour),"hour"===s)break;if(t){if(l+=":",l+=$e(e.c.minute),"minute"===s)break;a&&(l+=":",l+=$e(e.c.second))}else{if(l+=$e(e.c.minute),"minute"===s)break;a&&(l+=$e(e.c.second))}if("second"===s)break;!a||r&&0===e.c.millisecond||(l+=".",l+=$e(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!o?l+="Z":e.o<0?(l+="-",l+=$e(Math.trunc(-e.o/60)),l+=":",l+=$e(Math.trunc(-e.o%60))):(l+="+",l+=$e(Math.trunc(e.o/60)),l+=":",l+=$e(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const sr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ar={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ur=["year","month","day","hour","minute","second","millisecond"],cr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],dr=["year","ordinal","hour","minute","second","millisecond"];function hr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new l(e);return t}function fr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hr(e)}}function pr(e,t){const n=ae(t.zone,we.defaultZone);if(!n.isValid)return br.invalid(Zn(n));const r=re.fromObject(t);let i,o;if(He(e.year))i=we.now();else{for(const t of ur)He(e[t])&&(e[t]=sr[t]);const t=Pe(e)||Le(e);if(t)return br.invalid(t);const r=function(e){if(void 0===vr&&(vr=we.now()),"iana"!==e.type)return e.offset(vr);const t=e.name;let n=yr.get(t);return void 0===n&&(n=e.offset(vr),yr.set(t,n)),n}(n);[i,o]=er(e,r,n)}return new br({ts:i,zone:n,loc:r,o:o})}function mr(e,t,n){const r=!!He(n.round)||n.round,i=He(n.rounding)?"trunc":n.rounding,o=(e,o)=>{e=Ke(e,r||n.calendary?0:2,n.calendary?"round":i);return t.loc.clone(n).relFormatter(n).format(e,o)},s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return o(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return o(t,e)}return o(e>t?-0:0,n.units[n.units.length-1])}function gr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let vr;const yr=new Map;class br{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Te("invalid input"):null)||(t.isValid?null:Zn(t));this.ts=He(e.ts)?we.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=Ye(e.o)&&!e.old?e.o:t.offset(this.ts);r=Qn(this.ts,o),n=Number.isNaN(r.year)?new Te("invalid input"):null,r=n?null:r,i=n?null:o}}this._zone=t,this.loc=e.loc||re.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new br({})}static local(){const[e,t]=gr(arguments),[n,r,i,o,s,a,l]=t;return pr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:l},e)}static utc(){const[e,t]=gr(arguments),[n,r,i,o,s,a,l]=t;return e.zone=oe.utcInstance,pr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return br.invalid("invalid input");const i=ae(t.zone,we.defaultZone);return i.isValid?new br({ts:n,zone:i,loc:re.fromObject(t)}):br.invalid(Zn(i))}static fromMillis(e,t={}){if(Ye(e))return e<-qn||e>qn?br.invalid("Timestamp out of range"):new br({ts:e,zone:ae(t.zone,we.defaultZone),loc:re.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ye(e))return new br({ts:1e3*e,zone:ae(t.zone,we.defaultZone),loc:re.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ae(t.zone,we.defaultZone);if(!n.isValid)return br.invalid(Zn(n));const r=re.fromObject(t),i=at(e,fr),{minDaysInFirstWeek:o,startOfWeek:s}=Ne(i,r),l=we.now(),u=He(t.specificOffset)?n.offset(l):t.specificOffset,c=!He(i.ordinal),d=!He(i.year),h=!He(i.month)||!He(i.day),f=d||h,p=i.weekYear||i.weekNumber;if((f||c)&&p)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new a("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!f;let g,v,y=Qn(l,u);m?(g=cr,v=ar,y=Me(y,o,s)):c?(g=dr,v=lr,y=Ie(y)):(g=ur,v=sr);let b=!1;for(const e of g){He(i[e])?i[e]=b?v[e]:y[e]:b=!0}const _=m?function(e,t=4,n=1){const r=ze(e.weekYear),i=Fe(e.weekNumber,1,nt(e.weekYear,t,n)),o=Fe(e.weekday,1,7);return r?i?!o&&Se("weekday",e.weekday):Se("week",e.weekNumber):Se("weekYear",e.weekYear)}(i,o,s):c?function(e){const t=ze(e.year),n=Fe(e.ordinal,1,Je(e.year));return t?!n&&Se("ordinal",e.ordinal):Se("year",e.year)}(i):Pe(i),w=_||Le(i);if(w)return br.invalid(w);const T=m?Ae(i,o,s):c?Re(i):i,[E,D]=er(T,u,n),S=new br({ts:E,zone:n,o:D,loc:r});return i.weekday&&f&&e.weekday!==S.weekday?br.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${S.toISO()}`):S.isValid?S:br.invalid(S.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Ot(e,[tn,sn],[nn,an],[rn,ln],[on,un])}(e);return nr(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Ot(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Gt])}(e);return nr(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Ot(e,[Kt,Qt],[Xt,Qt],[Jt,en])}(e);return nr(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(He(e)||He(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=re.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=Bn(e,t,n);return[r,i,o,s]}(o,e,t);return c?br.invalid(c):nr(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return br.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Ot(e,[dn,sn],[hn,fn])}(e);return nr(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof Te?e:new Te(e,t);if(we.throwOnInvalid)throw new i(n);return new br({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Fn(e,re.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Un(St.parseFormat(e),re.fromObject(t)).map(e=>e.val).join("")}static resetCache(){vr=void 0,yr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Gn(this).weekYear:NaN}get weekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get weekday(){return this.isValid?Gn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Kn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Kn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Kn(this).weekYear:NaN}get ordinal(){return this.isValid?Ie(this.c).ordinal:NaN}get monthShort(){return this.isValid?On.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?On.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?On.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?On.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=et(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,l=n-s*t,u=Qn(a,o),c=Qn(l,s);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Xn(this,{ts:a}),Xn(this,{ts:l})]:[this]}get isInLeapYear(){return Xe(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Je(this.year):NaN}get weeksInWeekYear(){return this.isValid?nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=St.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(oe.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ae(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=er(n,t,e)}return Xn(this,{ts:r,zone:e})}return br.invalid(Zn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Xn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=at(e,fr),{minDaysInFirstWeek:n,startOfWeek:r}=Ne(t,this.loc),i=!He(t.weekYear)||!He(t.weekNumber)||!He(t.weekday),o=!He(t.ordinal),s=!He(t.year),l=!He(t.month)||!He(t.day),u=s||l,c=t.weekYear||t.weekNumber;if((u||o)&&c)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new a("Can't mix ordinal dates with month/day");let d;i?d=Ae({...Me(this.c,n,r),...t},n,r):He(t.ordinal)?(d={...this.toObject(),...t},He(t.day)&&(d.day=Math.min(Qe(d.year,d.month),d.day))):d=Re({...Ie(this.c),...t});const[h,f]=er(d,this.o,this.zone);return Xn(this,{ts:h,o:f})}plus(e){if(!this.isValid)return this;return Xn(this,tr(this,Cn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Xn(this,tr(this,Cn.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=Cn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=or(this,s,t,n,r,i,o),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ir(this,"extended"===e,hr(t)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended",precision:s="milliseconds"}={}){if(!this.isValid)return null;return s=hr(s),(r&&ur.indexOf(s)>=3?"T":"")+or(this,"extended"===o,t,e,n,i,s)}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ir(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),rr(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():$n}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Cn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(a=t,Array.isArray(a)?a:[a]).map(Cn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=An(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(br.now(),e,t)}until(e){return this.isValid?xn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||br.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(br.isDateTime))throw new u("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return Bn(re.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return br.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=re.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new jn(i,e)}static fromFormatParser(e,t,n={}){if(He(e)||He(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=re.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?br.invalid(c):nr(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return p}static get DATE_MED(){return m}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return E}static get TIME_24_WITH_SECONDS(){return D}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return C}static get DATETIME_SHORT(){return k}static get DATETIME_SHORT_WITH_SECONDS(){return x}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return M}static get DATETIME_MED_WITH_WEEKDAY(){return A}static get DATETIME_FULL(){return I}static get DATETIME_FULL_WITH_SECONDS(){return R}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function _r(e){if(br.isDateTime(e))return e;if(e&&e.valueOf&&Ye(e.valueOf()))return br.fromJSDate(e);if(e&&"object"==typeof e)return br.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}},8333:function(e,t){"use strict";t.A={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"}},8357:function(e,t){"use strict";t.A={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"}},8366:function(e,t){"use strict";t.A={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"}},9336:function(e,t,n){"use strict";n.d(t,{aF:function(){return Ir},go:function(){return Kr},AM:function(){return Ti},y8:function(){return yo},m_:function(){return vi}});var r={};n.r(r),n.d(r,{afterMain:function(){return E},afterRead:function(){return _},afterWrite:function(){return C},applyStyles:function(){return R},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return u},beforeMain:function(){return w},beforeRead:function(){return y},beforeWrite:function(){return D},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return re},createPopper:function(){return Re},createPopperBase:function(){return Ie},createPopperLite:function(){return Ne},detectOverflow:function(){return be},end:function(){return d},eventListeners:function(){return oe},flip:function(){return _e},hide:function(){return Ee},left:function(){return a},main:function(){return T},modifierPhases:function(){return k},offset:function(){return De},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Ae},popperOffsets:function(){return Se},preventOverflow:function(){return Ce},read:function(){return b},reference:function(){return m},right:function(){return s},start:function(){return c},top:function(){return i},variationPlacements:function(){return g},viewport:function(){return f},write:function(){return S}});var i="top",o="bottom",s="right",a="left",l="auto",u=[i,o,s,a],c="start",d="end",h="clippingParents",f="viewport",p="popper",m="reference",g=u.reduce(function(e,t){return e.concat([t+"-"+c,t+"-"+d])},[]),v=[].concat(u,[l]).reduce(function(e,t){return e.concat([t,t+"-"+c,t+"-"+d])},[]),y="beforeRead",b="read",_="afterRead",w="beforeMain",T="main",E="afterMain",D="beforeWrite",S="write",C="afterWrite",k=[y,b,_,w,T,E,D,S,C];function x(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function M(e){return e instanceof O(e).Element||e instanceof Element}function A(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}var R={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];A(i)&&x(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});A(r)&&x(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function N(e){return e.split("-")[0]}var P=Math.max,L=Math.min,H=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function V(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&A(e)&&(i=e.offsetWidth>0&&H(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H(r.height)/e.offsetHeight||1);var s=(M(e)?O(e):window).visualViewport,a=!z()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function W(e){var t=V(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function U(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(e){return O(e).getComputedStyle(e)}function B(e){return["table","td","th"].indexOf(x(e))>=0}function F(e){return((M(e)?e.ownerDocument:e.document)||window.document).documentElement}function $(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||F(e)}function q(e){return A(e)&&"fixed"!==j(e).position?e.offsetParent:null}function Z(e){for(var t=O(e),n=q(e);n&&B(n)&&"static"===j(n).position;)n=q(n);return n&&("html"===x(n)||"body"===x(n)&&"static"===j(n).position)?t:n||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&A(e)&&"fixed"===j(e).position)return null;var n=$(e);for(I(n)&&(n=n.host);A(n)&&["html","body"].indexOf(x(n))<0;){var r=j(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function G(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e,t,n){return P(e,L(t,n))}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,l=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,h=N(n.placement),f=G(h),p=[a,s].indexOf(h)>=0?"height":"width";if(c&&d){var m=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,u))}(l.padding,n),g=W(c),v="y"===f?i:a,y="y"===f?o:s,b=n.rects.reference[p]+n.rects.reference[f]-d[f]-n.rects.popper[p],_=d[f]-n.rects.reference[f],w=Z(c),T=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,E=b/2-_/2,D=m[v],S=T-g[p]-m[y],C=T/2-g[p]/2+E,k=K(D,C,S),x=f;n.modifiersData[r]=((t={})[x]=k,t.centerOffset=k-C,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&U(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,l=e.placement,u=e.variation,c=e.offsets,h=e.position,f=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=c.x,y=void 0===v?0:v,b=c.y,_=void 0===b?0:b,w="function"==typeof m?m({x:y,y:_}):{x:y,y:_};y=w.x,_=w.y;var T=c.hasOwnProperty("x"),E=c.hasOwnProperty("y"),D=a,S=i,C=window;if(p){var k=Z(n),x="clientHeight",M="clientWidth";if(k===O(n)&&"static"!==j(k=F(n)).position&&"absolute"===h&&(x="scrollHeight",M="scrollWidth"),l===i||(l===a||l===s)&&u===d)S=o,_-=(g&&k===C&&C.visualViewport?C.visualViewport.height:k[x])-r.height,_*=f?1:-1;if(l===a||(l===i||l===o)&&u===d)D=s,y-=(g&&k===C&&C.visualViewport?C.visualViewport.width:k[M])-r.width,y*=f?1:-1}var A,I=Object.assign({position:h},p&&te),R=!0===m?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(r*i)/i||0}}({x:y,y:_},O(n)):{x:y,y:_};return y=R.x,_=R.y,f?Object.assign({},I,((A={})[S]=E?"0":"",A[D]=T?"0":"",A.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",A)):Object.assign({},I,((t={})[S]=E?_+"px":"",t[D]=T?y+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:N(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ie={passive:!0};var oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=O(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(e){e.addEventListener("scroll",n.update,ie)}),a&&l.addEventListener("resize",n.update,ie),function(){o&&u.forEach(function(e){e.removeEventListener("scroll",n.update,ie)}),a&&l.removeEventListener("resize",n.update,ie)}},data:{}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,function(e){return se[e]})}var le={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,function(e){return le[e]})}function ce(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return V(F(e)).left+ce(e).scrollLeft}function he(e){var t=j(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:A(e)&&he(e)?e:fe($(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=O(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe($(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===f?me(function(e,t){var n=O(e),r=F(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=z();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):M(t)?function(e,t){var n=V(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=F(e),r=ce(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=P(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=P(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===j(i||n).direction&&(a+=P(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(F(e)))}function ve(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe($(e)),n=["absolute","fixed"].indexOf(j(e).position)>=0&&A(e)?Z(e):e;return M(n)?t.filter(function(e){return M(e)&&U(e,n)&&"body"!==x(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(t,n){var i=ge(e,n,r);return t.top=P(i.top,t.top),t.right=L(i.right,t.right),t.bottom=L(i.bottom,t.bottom),t.left=P(i.left,t.left),t},ge(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,r=e.element,l=e.placement,u=l?N(l):null,h=l?ee(l):null,f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2;switch(u){case i:t={x:f,y:n.y-r.height};break;case o:t={x:f,y:n.y+n.height};break;case s:t={x:n.x+n.width,y:p};break;case a:t={x:n.x-r.width,y:p};break;default:t={x:n.x,y:n.y}}var m=u?G(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case c:t[m]=t[m]-(n[g]/2-r[g]/2);break;case d:t[m]=t[m]+(n[g]/2-r[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,l=n.strategy,c=void 0===l?e.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?f:v,b=n.elementContext,_=void 0===b?p:b,w=n.altBoundary,T=void 0!==w&&w,E=n.padding,D=void 0===E?0:E,S=X("number"!=typeof D?D:J(D,u)),C=_===p?m:p,k=e.rects.popper,x=e.elements[T?C:_],O=ve(M(x)?x:x.contextElement||F(e.elements.popper),g,y,c),A=V(e.elements.reference),I=ye({reference:A,element:k,strategy:"absolute",placement:a}),R=me(Object.assign({},k,I)),N=_===p?R:A,P={top:O.top-N.top+S.top,bottom:N.bottom-O.bottom+S.bottom,left:O.left-N.left+S.left,right:N.right-O.right+S.right},L=e.modifiersData.offset;if(_===p&&L){var H=L[a];Object.keys(P).forEach(function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[i,o].indexOf(e)>=0?"y":"x";P[e]+=H[n]*t})}return P}var _e={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var d=n.mainAxis,h=void 0===d||d,f=n.altAxis,p=void 0===f||f,m=n.fallbackPlacements,y=n.padding,b=n.boundary,_=n.rootBoundary,w=n.altBoundary,T=n.flipVariations,E=void 0===T||T,D=n.allowedAutoPlacements,S=t.options.placement,C=N(S),k=m||(C===S||!E?[ae(S)]:function(e){if(N(e)===l)return[];var t=ae(e);return[ue(e),t,ue(t)]}(S)),x=[S].concat(k).reduce(function(e,n){return e.concat(N(n)===l?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?v:l,d=ee(r),h=d?a?g:g.filter(function(e){return ee(e)===d}):u,f=h.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=h);var p=f.reduce(function(t,n){return t[n]=be(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[N(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:n,boundary:b,rootBoundary:_,padding:y,flipVariations:E,allowedAutoPlacements:D}):n)},[]),O=t.rects.reference,M=t.rects.popper,A=new Map,I=!0,R=x[0],P=0;P=0,V=z?"width":"height",W=be(t,{placement:L,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),U=z?Y?s:a:Y?o:i;O[V]>M[V]&&(U=ae(U));var j=ae(U),B=[];if(h&&B.push(W[H]<=0),p&&B.push(W[U]<=0,W[j]<=0),B.every(function(e){return e})){R=L,I=!1;break}A.set(L,B)}if(I)for(var F=function(e){var t=x.find(function(t){var n=A.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return R=t,"break"},$=E?3:1;$>0;$--){if("break"===F($))break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Te(e){return[i,s,o,a].some(function(t){return e[t]>=0})}var Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(s,r),u=we(a,i,o),c=Te(l),d=Te(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var De={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,l=void 0===o?[0,0]:o,u=v.reduce(function(e,n){return e[n]=function(e,t,n){var r=N(e),o=[a,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*o,[a,s].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e},{}),c=u[t.placement],d=c.x,h=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=u}};var Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,l=n.mainAxis,u=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,b=n.tetherOffset,_=void 0===b?0:b,w=be(t,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),T=N(t.placement),E=ee(t.placement),D=!E,S=G(T),C="x"===S?"y":"x",k=t.modifiersData.popperOffsets,x=t.rects.reference,O=t.rects.popper,M="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,A="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(k){if(u){var H,Y="y"===S?i:a,z="y"===S?o:s,V="y"===S?"height":"width",U=k[S],j=U+w[Y],B=U-w[z],F=y?-O[V]/2:0,$=E===c?x[V]:O[V],q=E===c?-O[V]:-x[V],X=t.elements.arrow,J=y&&X?W(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[Y],ne=Q[z],re=K(0,x[V],J[V]),ie=D?x[V]/2-F-re-te-A.mainAxis:$-re-te-A.mainAxis,oe=D?-x[V]/2+F+re+ne+A.mainAxis:q+re+ne+A.mainAxis,se=t.elements.arrow&&Z(t.elements.arrow),ae=se?"y"===S?se.clientTop||0:se.clientLeft||0:0,le=null!=(H=null==I?void 0:I[S])?H:0,ue=U+oe-le,ce=K(y?L(j,U+ie-le-ae):j,U,y?P(B,ue):B);k[S]=ce,R[S]=ce-U}if(h){var de,he="x"===S?i:a,fe="x"===S?o:s,pe=k[C],me="y"===C?"height":"width",ge=pe+w[he],ve=pe-w[fe],ye=-1!==[i,a].indexOf(T),_e=null!=(de=null==I?void 0:I[C])?de:0,we=ye?ge:pe-x[me]-O[me]-_e+A.altAxis,Te=ye?pe+x[me]+O[me]-_e-A.altAxis:ve,Ee=y&&ye?function(e,t,n){var r=K(e,t,n);return r>n?n:r}(we,pe,Te):K(y?we:ge,pe,y?Te:ve);k[C]=Ee,R[C]=Ee-pe}t.modifiersData[r]=R}},requiresIfExists:["offset"]};function ke(e,t,n){void 0===n&&(n=!1);var r,i,o=A(t),s=A(t)&&function(e){var t=e.getBoundingClientRect(),n=H(t.width)/e.offsetWidth||1,r=H(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=F(t),l=V(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==x(t)||he(a))&&(u=(r=t)!==O(r)&&A(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ce(r)),A(t)?((c=V(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=de(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function xe(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}var Oe={placement:"bottom",modifiers:[],strategy:"absolute"};function Me(){for(var e=arguments.length,t=new Array(e),n=0;n(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),ze=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),Ve=e=>{e.dispatchEvent(new Event(He))},We=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ue=e=>We(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ye(e)):null,je=e=>{if(!We(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},Be=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),Fe=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Fe(e.parentNode):null},$e=()=>{},qe=e=>{e.offsetHeight},Ze=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ge=[],Ke=()=>"rtl"===document.documentElement.dir,Xe=e=>{var t;t=()=>{const t=Ze();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(Ge.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ge)e()}),Ge.push(t)):t()},Je=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,Qe=(e,t,n=!0)=>{if(!n)return void Je(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let i=!1;const o=({target:n})=>{n===t&&(i=!0,t.removeEventListener(He,o),Je(e))};t.addEventListener(He,o),setTimeout(()=>{i||Ve(t)},r)},et=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},tt=/[^.]*(?=\..*)\.|.*/,nt=/\..*/,rt=/::\d+$/,it={};let ot=1;const st={mouseenter:"mouseover",mouseleave:"mouseout"},at=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function lt(e,t){return t&&`${t}::${ot++}`||e.uidEvent||ot++}function ut(e){const t=lt(e);return e.uidEvent=t,it[t]=it[t]||{},it[t]}function ct(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function dt(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=mt(e);return at.has(o)||(o=e),[r,i,o]}function ht(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=dt(t,n,r);if(t in st){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=ut(e),u=l[a]||(l[a]={}),c=ct(u,s,o?n:null);if(c)return void(c.oneOff=c.oneOff&&i);const d=lt(s,t.replace(tt,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return vt(i,{delegateTarget:s}),r.oneOff&>.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return vt(r,{delegateTarget:e}),n.oneOff&>.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,u[d]=h,e.addEventListener(a,h,o)}function ft(e,t,n,r,i){const o=ct(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function pt(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&ft(e,t,n,s.callable,s.delegationSelector)}function mt(e){return e=e.replace(nt,""),st[e]||e}const gt={on(e,t,n,r){ht(e,t,n,r,!1)},one(e,t,n,r){ht(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=dt(t,n,r),a=s!==t,l=ut(e),u=l[s]||{},c=t.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))pt(e,l,n,t.slice(1));for(const[n,r]of Object.entries(u)){const i=n.replace(rt,"");a&&!t.includes(i)||ft(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(u).length)return;ft(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=Ze();let i=null,o=!0,s=!0,a=!1;t!==mt(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=vt(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function vt(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get(){return r}})}return e}function yt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function bt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const _t={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${bt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${bt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=yt(e.dataset[r])}return t},getDataAttribute(e,t){return yt(e.getAttribute(`data-bs-${bt(t)}`))}};class wt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=We(t)?_t.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...We(t)?_t.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,r]of Object.entries(t)){const t=e[n],i=We(t)?"element":ze(t);if(!new RegExp(r).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${r}".`)}}}class Tt extends wt{constructor(e,t){super(),(e=Ue(e))&&(this._element=e,this._config=this._getConfig(t),Le.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Le.remove(this._element,this.constructor.DATA_KEY),gt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Qe(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Le.get(Ue(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Et=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(e=>Ye(e)).join(","):null},Dt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(e=>e.matches(t))},parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!Be(e)&&je(e))},getSelectorFromElement(e){const t=Et(e);return t&&Dt.findOne(t)?t:null},getElementFromSelector(e){const t=Et(e);return t?Dt.findOne(t):null},getMultipleElementsFromSelector(e){const t=Et(e);return t?Dt.find(t):[]}},St=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;gt.on(document,n,`[data-bs-dismiss="${r}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Be(this))return;const i=Dt.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()})},Ct=".bs.alert",kt=`close${Ct}`,xt=`closed${Ct}`;class Ot extends Tt{static get NAME(){return"alert"}close(){if(gt.trigger(this._element,kt).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),gt.trigger(this._element,xt),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Ot.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}St(Ot,"close"),Xe(Ot);const Mt='[data-bs-toggle="button"]';class At extends Tt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=At.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}gt.on(document,"click.bs.button.data-api",Mt,e=>{e.preventDefault();const t=e.target.closest(Mt);At.getOrCreateInstance(t).toggle()}),Xe(At);const It=".bs.swipe",Rt=`touchstart${It}`,Nt=`touchmove${It}`,Pt=`touchend${It}`,Lt=`pointerdown${It}`,Ht=`pointerup${It}`,Yt={endCallback:null,leftCallback:null,rightCallback:null},zt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Vt extends wt{constructor(e,t){super(),this._element=e,e&&Vt.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Yt}static get DefaultType(){return zt}static get NAME(){return"swipe"}dispose(){gt.off(this._element,It)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Je(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Je(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(gt.on(this._element,Lt,e=>this._start(e)),gt.on(this._element,Ht,e=>this._end(e)),this._element.classList.add("pointer-event")):(gt.on(this._element,Rt,e=>this._start(e)),gt.on(this._element,Nt,e=>this._move(e)),gt.on(this._element,Pt,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Wt=".bs.carousel",Ut=".data-api",jt="ArrowLeft",Bt="ArrowRight",Ft="next",$t="prev",qt="left",Zt="right",Gt=`slide${Wt}`,Kt=`slid${Wt}`,Xt=`keydown${Wt}`,Jt=`mouseenter${Wt}`,Qt=`mouseleave${Wt}`,en=`dragstart${Wt}`,tn=`load${Wt}${Ut}`,nn=`click${Wt}${Ut}`,rn="carousel",on="active",sn=".active",an=".carousel-item",ln=sn+an,un={[jt]:Zt,[Bt]:qt},cn={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},dn={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class hn extends Tt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Dt.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===rn&&this.cycle()}static get Default(){return cn}static get DefaultType(){return dn}static get NAME(){return"carousel"}next(){this._slide(Ft)}nextWhenVisible(){!document.hidden&&je(this._element)&&this.next()}prev(){this._slide($t)}pause(){this._isSliding&&Ve(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?gt.one(this._element,Kt,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void gt.one(this._element,Kt,()=>this.to(e));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?Ft:$t;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&>.on(this._element,Xt,e=>this._keydown(e)),"hover"===this._config.pause&&(gt.on(this._element,Jt,()=>this.pause()),gt.on(this._element,Qt,()=>this._maybeEnableCycle())),this._config.touch&&Vt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Dt.find(".carousel-item img",this._element))gt.on(e,en,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(qt)),rightCallback:()=>this._slide(this._directionToOrder(Zt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Vt(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=un[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Dt.findOne(sn,this._indicatorsElement);t.classList.remove(on),t.removeAttribute("aria-current");const n=Dt.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(on),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===Ft,i=t||et(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>gt.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(Gt).defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",u=r?"carousel-item-next":"carousel-item-prev";i.classList.add(u),qe(i),n.classList.add(l),i.classList.add(l);this._queueCallback(()=>{i.classList.remove(l,u),i.classList.add(on),n.classList.remove(on,u,l),this._isSliding=!1,s(Kt)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Dt.findOne(ln,this._element)}_getItems(){return Dt.find(an,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ke()?e===qt?$t:Ft:e===qt?Ft:$t}_orderToDirection(e){return Ke()?e===$t?qt:Zt:e===$t?Zt:qt}static jQueryInterface(e){return this.each(function(){const t=hn.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}gt.on(document,nn,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=Dt.getElementFromSelector(this);if(!t||!t.classList.contains(rn))return;e.preventDefault();const n=hn.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===_t.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),gt.on(window,tn,()=>{const e=Dt.find('[data-bs-ride="carousel"]');for(const t of e)hn.getOrCreateInstance(t)}),Xe(hn);const fn=".bs.collapse",pn=`show${fn}`,mn=`shown${fn}`,gn=`hide${fn}`,vn=`hidden${fn}`,yn=`click${fn}.data-api`,bn="show",_n="collapse",wn="collapsing",Tn=`:scope .${_n} .${_n}`,En='[data-bs-toggle="collapse"]',Dn={parent:null,toggle:!0},Sn={parent:"(null|element)",toggle:"boolean"};class Cn extends Tt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=Dt.find(En);for(const e of n){const t=Dt.getSelectorFromElement(e),n=Dt.find(t).filter(e=>e===this._element);null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Dn}static get DefaultType(){return Sn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>Cn.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(gt.trigger(this._element,pn).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(_n),this._element.classList.add(wn),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(wn),this._element.classList.add(_n,bn),this._element.style[t]="",gt.trigger(this._element,mn)},this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(gt.trigger(this._element,gn).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,qe(this._element),this._element.classList.add(wn),this._element.classList.remove(_n,bn);for(const e of this._triggerArray){const t=Dt.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(wn),this._element.classList.add(_n),gt.trigger(this._element,vn)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(bn)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ue(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(En);for(const t of e){const e=Dt.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Dt.find(Tn,this._config.parent);return Dt.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=Cn.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}})}}gt.on(document,yn,En,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Dt.getMultipleElementsFromSelector(this))Cn.getOrCreateInstance(e,{toggle:!1}).toggle()}),Xe(Cn);const kn="dropdown",xn=".bs.dropdown",On=".data-api",Mn="ArrowUp",An="ArrowDown",In=`hide${xn}`,Rn=`hidden${xn}`,Nn=`show${xn}`,Pn=`shown${xn}`,Ln=`click${xn}${On}`,Hn=`keydown${xn}${On}`,Yn=`keyup${xn}${On}`,zn="show",Vn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Wn=`${Vn}.${zn}`,Un=".dropdown-menu",jn=Ke()?"top-end":"top-start",Bn=Ke()?"top-start":"top-end",Fn=Ke()?"bottom-end":"bottom-start",$n=Ke()?"bottom-start":"bottom-end",qn=Ke()?"left-start":"right-start",Zn=Ke()?"right-start":"left-start",Gn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Kn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Xn extends Tt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Dt.next(this._element,Un)[0]||Dt.prev(this._element,Un)[0]||Dt.findOne(Un,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Gn}static get DefaultType(){return Kn}static get NAME(){return kn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Be(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!gt.trigger(this._element,Nn,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))gt.on(e,"mouseover",$e);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(zn),this._element.classList.add(zn),gt.trigger(this._element,Pn,e)}}hide(){if(Be(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!gt.trigger(this._element,In,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.off(e,"mouseover",$e);this._popper&&this._popper.destroy(),this._menu.classList.remove(zn),this._element.classList.remove(zn),this._element.setAttribute("aria-expanded","false"),_t.removeDataAttribute(this._menu,"popper"),gt.trigger(this._element,Rn,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!We(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${kn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){let e=this._element;"parent"===this._config.reference?e=this._parent:We(this._config.reference)?e=Ue(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Re(e,this._menu,t)}_isShown(){return this._menu.classList.contains(zn)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return qn;if(e.classList.contains("dropstart"))return Zn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Bn:jn:t?$n:Fn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(_t.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Je(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const n=Dt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(e=>je(e));n.length&&et(n,t,e===An,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Xn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Dt.find(Wn);for(const n of t){const t=Xn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[Mn,An].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(Vn)?this:Dt.prev(this,Vn)[0]||Dt.next(this,Vn)[0]||Dt.findOne(Vn,e.delegateTarget.parentNode),o=Xn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}gt.on(document,Hn,Vn,Xn.dataApiKeydownHandler),gt.on(document,Hn,Un,Xn.dataApiKeydownHandler),gt.on(document,Ln,Xn.clearMenus),gt.on(document,Yn,Xn.clearMenus),gt.on(document,Ln,Vn,function(e){e.preventDefault(),Xn.getOrCreateInstance(this).toggle()}),Xe(Xn);const Jn="backdrop",Qn="show",er=`mousedown.bs.${Jn}`,tr={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},nr={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class rr extends wt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return Jn}show(e){if(!this._config.isVisible)return void Je(e);this._append();const t=this._getElement();this._config.isAnimated&&qe(t),t.classList.add(Qn),this._emulateAnimation(()=>{Je(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(Qn),this._emulateAnimation(()=>{this.dispose(),Je(e)})):Je(e)}dispose(){this._isAppended&&(gt.off(this._element,er),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ue(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),gt.on(e,er,()=>{Je(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Qe(e,this._getElement(),this._config.isAnimated)}}const ir=".bs.focustrap",or=`focusin${ir}`,sr=`keydown.tab${ir}`,ar="backward",lr={autofocus:!0,trapElement:null},ur={autofocus:"boolean",trapElement:"element"};class cr extends wt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return lr}static get DefaultType(){return ur}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),gt.off(document,ir),gt.on(document,or,e=>this._handleFocusin(e)),gt.on(document,sr,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,gt.off(document,ir))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=Dt.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===ar?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?ar:"forward")}}const dr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",hr=".sticky-top",fr="padding-right",pr="margin-right";class mr{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fr,t=>t+e),this._setElementAttributes(dr,fr,t=>t+e),this._setElementAttributes(hr,pr,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,fr),this._resetElementAttributes(dr,fr),this._resetElementAttributes(hr,pr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)})}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&_t.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,e=>{const n=_t.getDataAttribute(e,t);null!==n?(_t.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)})}_applyManipulationCallback(e,t){if(We(e))t(e);else for(const n of Dt.find(e,this._element))t(n)}}const gr=".bs.modal",vr=`hide${gr}`,yr=`hidePrevented${gr}`,br=`hidden${gr}`,_r=`show${gr}`,wr=`shown${gr}`,Tr=`resize${gr}`,Er=`click.dismiss${gr}`,Dr=`mousedown.dismiss${gr}`,Sr=`keydown.dismiss${gr}`,Cr=`click${gr}.data-api`,kr="modal-open",xr="show",Or="modal-static",Mr={backdrop:!0,focus:!0,keyboard:!0},Ar={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ir extends Tt{constructor(e,t){super(e,t),this._dialog=Dt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mr,this._addEventListeners()}static get Default(){return Mr}static get DefaultType(){return Ar}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;gt.trigger(this._element,_r,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(kr),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){if(!this._isShown||this._isTransitioning)return;gt.trigger(this._element,vr).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(xr),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){gt.off(window,gr),gt.off(this._dialog,gr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new rr({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cr({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Dt.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),qe(this._element),this._element.classList.add(xr);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,gt.trigger(this._element,wr,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){gt.on(this._element,Sr,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),gt.on(window,Tr,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),gt.on(this._element,Dr,e=>{gt.one(this._element,Er,t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(kr),this._resetAdjustments(),this._scrollBar.reset(),gt.trigger(this._element,br)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(gt.trigger(this._element,yr).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Or)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Or),this._queueCallback(()=>{this._element.classList.remove(Or),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Ke()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Ke()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=Ir.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}})}}gt.on(document,Cr,'[data-bs-toggle="modal"]',function(e){const t=Dt.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),gt.one(t,_r,e=>{e.defaultPrevented||gt.one(t,br,()=>{je(this)&&this.focus()})});const n=Dt.findOne(".modal.show");n&&Ir.getInstance(n).hide();Ir.getOrCreateInstance(t).toggle(this)}),St(Ir),Xe(Ir);const Rr=".bs.offcanvas",Nr=".data-api",Pr=`load${Rr}${Nr}`,Lr="show",Hr="showing",Yr="hiding",zr=".offcanvas.show",Vr=`show${Rr}`,Wr=`shown${Rr}`,Ur=`hide${Rr}`,jr=`hidePrevented${Rr}`,Br=`hidden${Rr}`,Fr=`resize${Rr}`,$r=`click${Rr}${Nr}`,qr=`keydown.dismiss${Rr}`,Zr={backdrop:!0,keyboard:!0,scroll:!1},Gr={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Kr extends Tt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Zr}static get DefaultType(){return Gr}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(gt.trigger(this._element,Vr,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new mr).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Hr);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Lr),this._element.classList.remove(Hr),gt.trigger(this._element,Wr,{relatedTarget:e})},this._element,!0)}hide(){if(!this._isShown)return;if(gt.trigger(this._element,Ur).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Yr),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(Lr,Yr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new mr).reset(),gt.trigger(this._element,Br)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new rr({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():gt.trigger(this._element,jr)}:null})}_initializeFocusTrap(){return new cr({trapElement:this._element})}_addEventListeners(){gt.on(this._element,qr,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():gt.trigger(this._element,jr))})}static jQueryInterface(e){return this.each(function(){const t=Kr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}gt.on(document,$r,'[data-bs-toggle="offcanvas"]',function(e){const t=Dt.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),Be(this))return;gt.one(t,Br,()=>{je(this)&&this.focus()});const n=Dt.findOne(zr);n&&n!==t&&Kr.getInstance(n).hide();Kr.getOrCreateInstance(t).toggle(this)}),gt.on(window,Pr,()=>{for(const e of Dt.find(zr))Kr.getOrCreateInstance(e).show()}),gt.on(window,Fr,()=>{for(const e of Dt.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Kr.getOrCreateInstance(e).hide()}),St(Kr),Xe(Kr);const Xr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Jr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ei=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Jr.has(n)||Boolean(Qr.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};const ti={allowList:Xr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},ni={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ri={entry:"(string|element|function|null)",selector:"(string|element)"};class ii extends wt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return ti}static get DefaultType(){return ni}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},ri)}_setContent(e,t,n){const r=Dt.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?We(t)?this._putElementInTemplate(Ue(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)ei(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Je(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const oi=new Set(["sanitize","allowList","sanitizeFn"]),si="fade",ai="show",li=".tooltip-inner",ui=".modal",ci="hide.bs.modal",di="hover",hi="focus",fi="click",pi={AUTO:"auto",TOP:"top",RIGHT:Ke()?"left":"right",BOTTOM:"bottom",LEFT:Ke()?"right":"left"},mi={allowList:Xr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},gi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class vi extends Tt{constructor(e,t){super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),gt.off(this._element.closest(ui),ci,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=gt.trigger(this._element,this.constructor.eventName("show")),t=(Fe(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),gt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ai),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.on(e,"mouseover",$e);this._queueCallback(()=>{gt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(gt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ai),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.off(e,"mouseover",$e);this._activeTrigger[fi]=!1,this._activeTrigger[hi]=!1,this._activeTrigger[di]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),gt.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(si,ai),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(si),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ii({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[li]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(si)}_isShown(){return this.tip&&this.tip.classList.contains(ai)}_createPopper(e){const t=Je(this._config.placement,[this,e,this._element]),n=pi[t.toUpperCase()];return Re(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Je(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Je(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)gt.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[fi]=!(t._isShown()&&t._activeTrigger[fi]),t.toggle()});else if("manual"!==t){const e=t===di?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===di?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");gt.on(this._element,e,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?hi:di]=!0,t._enter()}),gt.on(this._element,n,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?hi:di]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},gt.on(this._element.closest(ui),ci,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=_t.getDataAttributes(this._element);for(const e of Object.keys(t))oi.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ue(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=vi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Xe(vi);const yi=".popover-header",bi=".popover-body",_i={...vi.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},wi={...vi.DefaultType,content:"(null|string|element|function)"};class Ti extends vi{static get Default(){return _i}static get DefaultType(){return wi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[yi]:this._getTitle(),[bi]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Ti.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Xe(Ti);const Ei=".bs.scrollspy",Di=`activate${Ei}`,Si=`click${Ei}`,Ci=`load${Ei}.data-api`,ki="active",xi="[href]",Oi=".nav-link",Mi=`${Oi}, .nav-item > ${Oi}, .list-group-item`,Ai={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ii={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ri extends Tt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ai}static get DefaultType(){return Ii}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ue(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(gt.off(this._config.target,Si),gt.on(this._config.target,Si,xi,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Dt.find(xi,this._config.target);for(const t of e){if(!t.hash||Be(t))continue;const e=Dt.findOne(decodeURI(t.hash),this._element);je(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(ki),this._activateParents(e),gt.trigger(this._element,Di,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Dt.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(ki);else for(const t of Dt.parents(e,".nav, .list-group"))for(const e of Dt.prev(t,Mi))e.classList.add(ki)}_clearActiveClass(e){e.classList.remove(ki);const t=Dt.find(`${xi}.${ki}`,e);for(const e of t)e.classList.remove(ki)}static jQueryInterface(e){return this.each(function(){const t=Ri.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}gt.on(window,Ci,()=>{for(const e of Dt.find('[data-bs-spy="scroll"]'))Ri.getOrCreateInstance(e)}),Xe(Ri);const Ni=".bs.tab",Pi=`hide${Ni}`,Li=`hidden${Ni}`,Hi=`show${Ni}`,Yi=`shown${Ni}`,zi=`click${Ni}`,Vi=`keydown${Ni}`,Wi=`load${Ni}`,Ui="ArrowLeft",ji="ArrowRight",Bi="ArrowUp",Fi="ArrowDown",$i="Home",qi="End",Zi="active",Gi="fade",Ki="show",Xi=".dropdown-toggle",Ji=`:not(${Xi})`,Qi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',eo=`${`.nav-link${Ji}, .list-group-item${Ji}, [role="tab"]${Ji}`}, ${Qi}`,to=`.${Zi}[data-bs-toggle="tab"], .${Zi}[data-bs-toggle="pill"], .${Zi}[data-bs-toggle="list"]`;class no extends Tt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),gt.on(this._element,Vi,e=>this._keydown(e)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?gt.trigger(t,Pi,{relatedTarget:e}):null;gt.trigger(e,Hi,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Zi),this._activate(Dt.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),gt.trigger(e,Yi,{relatedTarget:t})):e.classList.add(Ki)},e,e.classList.contains(Gi))}_deactivate(e,t){if(!e)return;e.classList.remove(Zi),e.blur(),this._deactivate(Dt.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),gt.trigger(e,Li,{relatedTarget:t})):e.classList.remove(Ki)},e,e.classList.contains(Gi))}_keydown(e){if(![Ui,ji,Bi,Fi,$i,qi].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!Be(e));let n;if([$i,qi].includes(e.key))n=t[e.key===$i?0:t.length-1];else{const r=[ji,Fi].includes(e.key);n=et(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),no.getOrCreateInstance(n).show())}_getChildren(){return Dt.find(eo,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Dt.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=Dt.findOne(e,n);i&&i.classList.toggle(r,t)};r(Xi,Zi),r(".dropdown-menu",Ki),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Zi)}_getInnerElement(e){return e.matches(eo)?e:Dt.findOne(eo,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=no.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}gt.on(document,zi,Qi,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),Be(this)||no.getOrCreateInstance(this).show()}),gt.on(window,Wi,()=>{for(const e of Dt.find(to))no.getOrCreateInstance(e)}),Xe(no);const ro=".bs.toast",io=`mouseover${ro}`,oo=`mouseout${ro}`,so=`focusin${ro}`,ao=`focusout${ro}`,lo=`hide${ro}`,uo=`hidden${ro}`,co=`show${ro}`,ho=`shown${ro}`,fo="hide",po="show",mo="showing",go={animation:"boolean",autohide:"boolean",delay:"number"},vo={animation:!0,autohide:!0,delay:5e3};class yo extends Tt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return vo}static get DefaultType(){return go}static get NAME(){return"toast"}show(){if(gt.trigger(this._element,co).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(fo),qe(this._element),this._element.classList.add(po,mo),this._queueCallback(()=>{this._element.classList.remove(mo),gt.trigger(this._element,ho),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(gt.trigger(this._element,lo).defaultPrevented)return;this._element.classList.add(mo),this._queueCallback(()=>{this._element.classList.add(fo),this._element.classList.remove(mo,po),gt.trigger(this._element,uo)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(po),super.dispose()}isShown(){return this._element.classList.contains(po)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){gt.on(this._element,io,e=>this._onInteraction(e,!0)),gt.on(this._element,oo,e=>this._onInteraction(e,!1)),gt.on(this._element,so,e=>this._onInteraction(e,!0)),gt.on(this._element,ao,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=yo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}St(yo),Xe(yo)},9379:function(e,t){"use strict";t.A={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"}},9478:function(e,t){"use strict";t.A={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"}},9795:function(e,t){"use strict";t.A={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"}},9997:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{static calculateContrastColor(e){"#"===e.slice(0,1)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map(function(e){return e+e}).join(""));return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}}},function(e){var t;t=6941,e(e.s=t)}]);
\ No newline at end of file
diff --git a/public/build/calendar.d82e420f.js.LICENSE.txt b/public/build/calendar.d498f3b2.js.LICENSE.txt
similarity index 78%
rename from public/build/calendar.d82e420f.js.LICENSE.txt
rename to public/build/calendar.d498f3b2.js.LICENSE.txt
index 2532478f50..a7c3b15489 100644
--- a/public/build/calendar.d82e420f.js.LICENSE.txt
+++ b/public/build/calendar.d498f3b2.js.LICENSE.txt
@@ -1,6 +1,6 @@
/*!
- * Bootstrap v5.3.3 (https://getbootstrap.com/)
- * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v5.3.8 (https://getbootstrap.com/)
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
diff --git a/public/build/calendar.d82e420f.js b/public/build/calendar.d82e420f.js
deleted file mode 100644
index 994d6fde4d..0000000000
--- a/public/build/calendar.d82e420f.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see calendar.d82e420f.js.LICENSE.txt */
-(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[517],{5179:function(e,t){"use strict";t.A={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"}},3578:function(e,t){"use strict";t.A={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"}},4019:function(e,t){"use strict";t.A={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"}},6629:function(e,t){"use strict";function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var r={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(n(e)," ").concat(e)},next:function(e){return"Nächste".concat(n(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(n(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};t.A=r},5431:function(e,t){"use strict";function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var r={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(n(e)," ").concat(e)},next:function(e){return"Nächste".concat(n(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(n(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};t.A=r},7781:function(e,t){"use strict";t.A={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"}},4853:function(e,t){"use strict";t.A={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}}},1368:function(e,t){"use strict";t.A={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:function(e){return"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()}},viewHint:function(e){return"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase()},weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:function(e){return"Mostrar ".concat(e," eventos más")},noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"}},8366:function(e,t){"use strict";t.A={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"}},8333:function(e,t){"use strict";t.A={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"}},4053:function(e,t){"use strict";t.A={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"}},6500:function(e,t){"use strict";t.A={code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"}},9795:function(e,t){"use strict";t.A={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"}},5690:function(e,t){"use strict";t.A={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"}},9379:function(e,t){"use strict";t.A={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"}},4729:function(e,t){"use strict";t.A={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"}},3793:function(e,t){"use strict";t.A={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"}},9478:function(e,t){"use strict";t.A={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"}},524:function(e,t){"use strict";t.A={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:function(e){return"Vis ".concat(e," flere hendelse").concat(1===e?"":"r")}}},5506:function(e,t){"use strict";t.A={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"}},1868:function(e,t){"use strict";t.A={code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"}},8357:function(e,t){"use strict";t.A={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"}},4836:function(e,t){"use strict";t.A={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"}},683:function(e,t){"use strict";t.A={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:function(e){return"+alte "+e},noEventsText:"Nu există evenimente de afișat"}},2565:function(e,t){"use strict";t.A={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"}},6914:function(e,t){"use strict";t.A={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:function(e){return"+ďalšie: "+e},noEventsText:"Žiadne akcie na zobrazenie"}},3445:function(e,t){"use strict";t.A={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"}},214:function(e,t){"use strict";t.A={code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"}},4773:function(e,t){"use strict";t.A={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"}},1730:function(e,t){"use strict";t.A={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"}},6941:function(e,t,n){n.g.KimaiCalendar=n(4661).A},4661:function(e,t,n){"use strict";n.d(t,{A:function(){return Nu}});var r=n(9336),i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&(s.children=arguments.length>3?l.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return T(e,s,r,i,null)}function T(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++c:i};return null==i&&null!=u.vnode&&u.vnode(o),o}function E(){return{current:null}}function D(e){return e.children}function S(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function C(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||S(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||S(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?x:k,o):e.removeEventListener(t,o?x:k,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function k(e){d=!0;try{return this.l[e.type+!1](u.event?u.event(e):e)}finally{d=!1}}function x(e){d=!0;try{return this.l[e.type+!0](u.event?u.event(e):e)}finally{d=!1}}function O(e,t){this.props=e,this.context=t}function M(e,t){if(null==t)return e.__?M(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&h.sort((function(e,t){return e.__v.__b-t.__v.__b})));N.__r=0}function P(e,t,n,r,i,o,s,a,l,u){var c,d,h,f,p,m,y,b=r&&r.__k||v,_=b.length;for(n.__k=[],c=0;c0?T(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=b[c])||h&&f.key==h.key&&f.type===h.type)b[c]=void 0;else for(d=0;d<_;d++){if((h=b[d])&&f.key==h.key&&f.type===h.type){b[d]=void 0;break}h=null}V(e,f,h=h||g,i,o,s,a,l,u),p=f.__e,(d=f.ref)&&h.ref!=d&&(y||(y=[]),h.ref&&y.push(h.ref,null,f),y.push(d,f.__c||p,f)),null!=p?(null==m&&(m=p),"function"==typeof f.type&&f.__k===h.__k?f.__d=l=L(f,l,e):l=Y(e,f,h,b,p,l),"function"==typeof n.type&&(n.__d=l)):l&&h.__e==l&&l.parentNode!=e&&(l=M(h))}for(n.__e=m,c=_;c--;)null!=b[c]&&("function"==typeof n.type&&null!=b[c].__e&&b[c].__e==n.__d&&(n.__d=z(r).nextSibling),B(b[c],b[c]));if(y)for(c=0;c=0;t--)if((n=e.__k[t])&&(r=z(n)))return r;return null}function V(e,t,n,r,i,o,s,a,l){var c,d,h,f,p,m,g,v,y,_,w,T,E,S,C,k=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=u.__b)&&c(t);try{e:if("function"==typeof k){if(v=t.props,y=(c=k.contextType)&&r[c.__c],_=c?y?y.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(v,_):(t.__c=d=new O(v,_),d.constructor=k,d.render=F),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=_,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=b({},d.__s)),b(d.__s,k.getDerivedStateFromProps(v,d.__s))),f=d.props,p=d.state,d.__v=t,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,_),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,_)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),w=0;w3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),q(w(we,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ee(e,t){var n=w(Te,{__v:e,i:t});return n.containerInfo=t,n}(be.prototype=new O).__a=function(e){var t=this,n=ye(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),_e(t,e,r)):i()};n?n(o):o()}},be.prototype.render=function(e){this.u=null,this.o=new Map;var t=H(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},be.prototype.componentDidUpdate=be.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){_e(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Se=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ce="undefined"!=typeof document,ke=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};O.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(O.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var xe=u.event;function Oe(){}function Me(){return this.cancelBubble}function Ae(){return this.defaultPrevented}u.event=function(e){return xe&&(e=xe(e)),e.persist=Oe,e.isPropagationStopped=Me,e.isDefaultPrevented=Ae,e.nativeEvent=e};var Ie={configurable:!0,get:function(){return this.class}},Re=u.vnode;u.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];Ce&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!ke(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Se.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=H(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=H(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ie.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ie))}e.$$typeof=De,Re&&Re(e)};var Ne=u.__r;u.__r=function(e){Ne&&Ne(e),e.__c};var Pe="undefined"!=typeof globalThis?globalThis:window;Pe.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):Pe.FullCalendarVDom={Component:O,createElement:w,render:q,createRef:E,Fragment:D,createContext:function(e){var t=Z(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.forEach((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},createPortal:Ee,flushSync:function(e){e();var t=u.debounceRendering,n=[];function r(e){n.push(e)}u.debounceRendering=r,q(w(Le,{}),document.createElement("div"));for(;n.length;)n.shift()();u.debounceRendering=t},unmountComponentAtNode:function(e){q(null,e)}};var Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return w("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(O);if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var He=FullCalendarVDom.Component,Ye=FullCalendarVDom.createElement,ze=FullCalendarVDom.render,Ve=FullCalendarVDom.createRef,We=FullCalendarVDom.Fragment,Ue=FullCalendarVDom.createContext,je=FullCalendarVDom.createPortal,Be=FullCalendarVDom.flushSync,Fe=FullCalendarVDom.unmountComponentAtNode,qe=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function Ze(e){e.parentNode&&e.parentNode.removeChild(e)}function Ge(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if($e(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function $e(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var Ke=/(top|left|right|bottom|width|height)$/i;function Xe(e,t){for(var n in t)Je(e,n,t[n])}function Je(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ke.test(t)?e.style[t]=n+"px":e.style[t]=n}function Qe(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function et(e){return e.getRootNode?e.getRootNode():document}var tt=0;function nt(){return"fc-dom-"+(tt+=1)}function rt(e){e.preventDefault()}function it(e,t,n,r){var i=function(e,t){return function(n){var r=Ge(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var ot=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function st(e){return s({onClick:e},at(e))}function at(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var lt=0;function ut(){return String(lt+=1)}function ct(){document.body.classList.add("fc-not-allowed")}function dt(){document.body.classList.remove("fc-not-allowed")}function ht(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"==typeof e||"string"==typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function ft(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function pt(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function mt(e,t){return e-t}function gt(e){return e%1==0}function vt(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var yt=["sun","mon","tue","wed","thu","fri","sat"];function bt(e,t){var n=Ot(e);return n[2]+=7*t,Mt(n)}function _t(e,t){var n=Ot(e);return n[2]+=t,Mt(n)}function wt(e,t){var n=Ot(e);return n[6]+=t,Mt(n)}function Tt(e,t){return(t.valueOf()-e.valueOf())/864e5}function Et(e,t){return It(e)===It(t)?Math.round(Tt(e,t)):null}function Dt(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){var i=Mt([t,0,1+Ct(t,n,r)]),o=Dt(e),s=Math.round(Tt(i,o));return Math.floor(s/7)+1}function Ct(e,t,n){var r=7+t-n;return-((7+Mt([e,0,r]).getUTCDay()-t)%7)+r-1}function kt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function xt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Ot(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Mt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function At(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Rt(e,t,n,r){return{instanceId:ut(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Nt=Object.prototype.hasOwnProperty;function Pt(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o-=1){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Pt(i))}for(o=e.length-1;o>=0;o-=1){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Lt(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Ht(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Yt(e){for(var t={},n=0,r=e;n10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rn(t,!0)))),r}function nn(e){return e.toISOString().replace(/T.*$/,"")}function rn(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ft(i,2)+":"+ft(o,2):"GMT"+n+i+(o?":"+ft(o,2):"")}function on(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=gn(function(e,t){var n={};for(var r in e)(!(r in un)||un[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),f=function(e,t,n,r){var i=0;for(;i=Jt(t)&&(r=_t(r,1))}return e.start&&(n=Dt(e.start),r&&r<=n&&(r=_t(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?Gt(n.diffWholeYears(e,t),"year"):"month"===r?Gt(n.diffWholeMonths(e,t),"month"):(o=t,s=Dt(i=e),a=Dt(o),{years:0,months:0,days:Math.round(Tt(s,a)),milliseconds:o.valueOf()-a.valueOf()-(i.valueOf()-s.valueOf())});var i,o,s,a}function Qn(e,t){var n,r,i=[],o=t.start;for(e.sort(er),n=0;no&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return ot.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function ir(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&ir(t,r.start)}}function vr(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function yr(e,t){var n=e.eventRange,r=n.def,i=n.instance,o=r.url;if(o)return{href:o};var s=t.emitter,a=t.options.eventInteractive;return null==a&&null==(a=r.interactive)&&(a=Boolean(s.hasHandlers("eventClick"))),a?at((function(e){s.trigger("eventClick",{el:e.target,event:new Lr(t,r,i),jsEvent:e,view:t.viewApi})})):{}}var br={start:An,end:An,allDay:Boolean};function _r(e,t,n){var r=function(e,t){var n=Mn(e,br),r=n.refined,i=n.extra,o=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,l=r.allDay;null==l&&(l=o&&o.isTimeUnspecified&&(!a||a.isTimeUnspecified));return s({range:{start:o?o.marker:null,end:a?a.marker:null},allDay:l},i)}(e,t),i=r.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function wr(e,t,n){return s(s({},Tr(e,t,n)),{timeZone:t.timeZone})}function Tr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Er(e,t,n){var r=Zn({editable:!1},n),i=$n(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:ur(i,t),instance:Rt(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Dr(e,t,n){n.emitter.trigger("select",s(s({},Sr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Sr(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.dateSpanTransforms;o=0;r-=1){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:ut(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Vn(o,t),extendedProps:s}}return null}function Rr(e){return s(s(s({},Yn),Ar),e.pluginHooks.eventSourceRefiners)}function Nr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Pr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=wt(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),tn(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Mt(kt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Mt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-xt(Ot(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ot(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?xt(Ot(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Ot(e))*60):new Date(e.valueOf()-(t||0))},e}(),Br=[],Fr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},qr=s(s({},Fr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function Zr(e){for(var t=e.length>0?e[0].code:"en",n=Br.concat(e),r={en:qr},i=0,o=n;i0;i-=1){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||qr;return $r(e,n,r)}(e,t):$r(e.code,[e.code],e)}function $r(e,t,n){var r=Pt([Fr,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Kr,Xr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Jr(e,t){return In(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return s(s({},Xr),e)}))}(e),null,t)}function Qr(e,t){return e.left>=t.left&&e.left=t.top&&e.top |
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Kr}var ni={defs:{},instances:{}},ri=function(){function e(){this.getKeysForEventDefs=sn(this._getKeysForEventDefs),this.splitDateSelection=sn(this._splitDateSpan),this.splitEventStore=sn(this._splitEventStore),this.splitIndividualUi=sn(this._splitIndividualUi),this.splitEventDrag=sn(this._splitInteraction),this.splitEventResize=sn(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Ht(n,(function(e,n){return t.eventUiBuilders[n]||sn(ii)})),n){var d=n[c],h=s[c]||ni,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:f(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);nn:!!t&&e>=t.end)}}function si(e,t){var n=["fc-day","fc-day-"+yt[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var ai=wn({year:"numeric",month:"long",day:"numeric"}),li=wn({week:"long"});function ui(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var i=e.dateEnv,o=e.options,a=e.calendarApi,l=i.format(t,"week"===n?li:ai);if(o.navLinks){var u=i.toDate(t),c=function(e){var r="day"===n?o.navLinkDayClick:"week"===n?o.navLinkWeekClick:null;"function"==typeof r?r.call(a,i.toDate(t),e):("string"==typeof r&&(n=r),a.zoomTo(t,n))};return s({title:pt(o.navLinkHint,[l,u],l),"data-navlink":""},r?st(c):{onClick:c})}return{"aria-label":l}}var ci,di=null;function hi(){return null===di&&(di=function(){var e=document.createElement("div");Xe(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ze(e),t}()),di}function fi(){return ci||(ci=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=pi(e);return document.body.removeChild(e),t}()),ci}function pi(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function mi(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():gi(e),i=function(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=pi(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return hi()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function gi(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function vi(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var yi=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tr(a,i.range)),a=tr(a=this.adjustActiveRange(a),r),l=nr(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=en(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return Gt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xt(i)<0&&(s=Dt(s),s=n.add(s,i)),Xt(o)>1&&(a=_t(a=Dt(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Jt(c)e.fetchRange.end}(e,t,n)})),t,!1,n)}function no(e,t,n,r,i){var o={};for(var s in e){var a=e[s];t[s]?o[s]=ro(a,n,r,i):o[s]=a}return o}function ro(e,t,n,r){var i=r.options,o=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],l=ut();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var s=n.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,n.xhr)||s),e.success&&(s=e.success.call(o,s,n.xhr)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:l,fetchRange:t,rawEvents:s})}),(function(n){console.warn(n.message,n),i.eventSourceFailure&&i.eventSourceFailure.call(o,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:l,fetchRange:t,error:n})})),s(s({},e),{isFetching:!0,latestFetchId:l})}function io(e,t){return Lt(e,(function(e){return oo(e,t)}))}function oo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function so(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=In(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;i&&(e=ao(e,i));r&&(e=ao(e,r));return e}(i,t,o),t,o);return r&&(s=Bt(s,r,o)),Pn(lo(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Bt(t,n,r));return Pn(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Pn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Bt(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return lo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ln(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function ao(e,t){var n;if(t){n=[];for(var r=0,i=e;r=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function bo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function _o(e,t){for(var n=zt(t.getCurrentData().eventSources),r=[],i=0,o=e;i1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var So=function(){function e(e){var t=this;this.computeOptionsData=sn(this._computeOptionsData),this.computeCurrentViewData=sn(this._computeCurrentViewData),this.organizeRawLocales=sn(Zr),this.buildLocale=sn(Gr),this.buildPluginHooks=Ni(),this.buildDateEnv=sn(Co),this.buildTheme=sn(ko),this.parseToolbars=sn(po),this.buildViewSpecs=sn(Gi),this.buildDateProfileGenerator=an(xo),this.buildViewApi=sn(Oo),this.buildViewUiProps=an(Io),this.buildEventUiBySource=sn(Mo,Vt),this.buildEventUiBases=sn(Ao),this.parseContextBusinessHours=an(No),this.buildTitle=sn(Do),this.emitter=new yi,this.actionRunner=new Eo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,o=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);var a,l,u,c=(a=r.calendarOptions,l=r.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Nr(a.now,l)),d=o.dateProfileGenerator.build(c);ir(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,p=r.pluginHooks.contextInit;fs.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:o.end}},i)),r?(n.push.apply(n,a([{index:e.index,thickness:e.thickness,span:zo(s,o)}],i)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Vo(r,t.level,t.levelCoord),Vo(n,t.level,[e])):Vo(n[t.level],t.lateral,e),this.stackCnts[Yo(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,i=t.strictOrder,o=t.stackCnts,s=n.length,a=0,l=-1,u=-1,c=null,d=0,h=0;h=a+e.thickness)break;for(var p=r[h],m=void 0,g=Wo(p,e.span.start,Ho),v=g[0]+g[1];(m=p[v])&&m.span.starta&&(a=y,c=m,l=h,u=v),y===a&&(d=Math.max(d,o[Yo(m)]+1)),v+=1}}var b=0;if(c)for(b=l+1;bn(e[i-1]))return[i,0];for(;rs))return[o,1];r=o+1}}return[r,0]}var Uo=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function jo(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Bo(e){var t;return(t={})[e.component.uid]=e,t}var Fo={},qo=function(){function e(e,t){this.emitter=new yi}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Zo={},Go={startTime:Gt,duration:Gt,create:Boolean,sourceId:String};function $o(e){var t=Mn(e,Go),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var Ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Ye.apply(void 0,a(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],i=!0,o=0,s=e;o1){var v=i&&n.getClass("buttonGroup")||"";return Ye.apply(void 0,a(["div",{className:v}],r))}return r[0]},t}(xi),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.sectionWidgets,a=s.center;return s.left?(o=!0,e=s.left):e=s.start,s.right?(o=!0,t=s.right):t=s.end,Ye("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Ye(Ko,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(xi),Jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,Ai(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Ye("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(xi),Qo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=ar(t);if(o&&r.isValidSegDownEl(e.target)){var s=Ge(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Lr(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=it(t.el,"click",".fc-event",n.handleSegClick),n}return o(t,e),t}(Uo),es=function(e){function t(t){var n,r,i,o,s,a=e.call(this,t)||this;return a.handleEventElRemove=function(e){e===a.currentSegEl&&a.handleSegLeave(null,a.currentSegEl)},a.handleSegEnter=function(e,t){ar(t)&&(a.currentSegEl=t,a.triggerEvent("eventMouseEnter",e,t))},a.handleSegLeave=function(e,t){a.currentSegEl&&(a.currentSegEl=null,a.triggerEvent("eventMouseLeave",e,t))},a.removeHoverListeners=(n=t.el,r=".fc-event",i=a.handleSegEnter,o=a.handleSegLeave,it(n,"mouseover",r,(function(e,t){if(t!==s){s=t,i(e,t);var n=function(e){s=null,o(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),a}return o(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=ar(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Lr(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Uo),ts=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=sn(Ci),t.buildViewPropTransformers=sn(rs),t.buildToolbarProps=sn(ns),t.headerRef=Ve(),t.footerRef=Ve(),t.interactionsStore={},t.state={viewLabelId:nt()},t.registerInteractiveComponent=function(e,n){var r=jo(e,n),i=[Qo,es].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,Fo[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,i=n;r1?ui(this.context,a):{},f=s(s(s({date:t.toDate(a),view:i},o.extraHookProps),{text:d}),u);return Ye(Hi,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ss,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Ye("th",s({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:nn(a),colSpan:o.colSpan},o.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Ye("a",s({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},h),r)))}))},t}(xi),ls=wn({weekday:"long"}),us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,i=t.viewApi,o=t.options,a=_t(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[os].concat(si(l,r),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=s(s(s(s({date:a},l),{view:i}),e.extraHookProps),{text:c});return Ye(Hi,{hookProps:d,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:ss,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,r,i,o){return Ye("th",s({ref:t,role:"columnheader",className:u.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},Ye("a",{"aria-label":n.format(a,ls),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(xi),cs=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Nr(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=wt(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,Gt(1,e.unit)),o=i.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:ds(r)},nextState:{nowDate:i,todayRange:ds(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Si,t}(He);function ds(e){var t=Dt(e);return{start:t,end:_t(t,1)}}var hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=sn(fs),t}return o(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Ye(cs,{unit:"day"},(function(e,t){return Ye("tr",{role:"row"},o&&o("day"),n.map((function(e){return i?Ye(as,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Ye(us,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(xi);function fs(e,t,n){return e||function(e,t){return wn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var ps=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),ms=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(Ss.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Ss.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ss.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(xi),ks=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):(i[n]-=1,i[n]||(delete o[n],delete t.callbackMap[n],s=!0)),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return function(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o=0&&e=0&&tt.eventRange.range.end?e:t}var oa=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.isRendering=!1,r.isRendered=!1,r.currentClassNames=[],r.customContentRenderId=0,r.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":r.renderRunner.tryDrain()}},r.handleData=function(e){r.currentData=e,r.renderRunner.request(e.calendarOptions.rerenderDelay)},r.handleRenderRequest=function(){if(r.isRendering){r.isRendered=!0;var e=r.currentData;Be((function(){ze(Ye(is,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,o){return r.setClassNames(t),r.setHeight(n),Ye(Yi.Provider,{value:r.customContentRenderId},Ye(ts,s({isHeightAuto:i,forPrint:o},e)))})),r.el)}))}else r.isRendered&&(r.isRendered=!1,Fe(r.el),r.setClassNames([]),r.setHeight(""))},r.el=t,r.renderRunner=new To(r.handleRenderRequest),new So({optionOverrides:n,calendarApi:r,onAction:r.handleAction,onData:r.handleData}),r}return o(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){var t=this;Be((function(){e.prototype.updateSize.call(t)}))},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!on(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n1,_=y.span.start===a;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,b?(d+=y.thickness,_&&m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):_&&(m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}i.push(u),o.push(m),s.push(d)}return{singleColPlacements:i,multiColPlacements:o,leftoverMargins:s}}(a.toRects(),e,s),p=f.singleColPlacements,m=f.multiColPlacements,g=f.leftoverMargins,v=[],y=[],b=0,_=u;b<_.length;b++){m[(S=_[b]).firstCol].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var w=S.firstCol;w<=S.lastCol;w+=1)p[w].push({seg:Ta(S,w,w+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(w=0;w1,showWeekNumbers:t.showWeekNumbers,todayRange:p,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:a[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(Ca),fgEventSegs:u[f],dateSelectionSegs:c[f],eventDrag:d[f],eventResize:h[f],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new bi(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new bi(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i){var a=this.props.cells[o][i];return{dateProfile:this.props.dateProfile,dateSpan:s({range:this.getCellRange(o,i),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:_t(n,1)}},t}(Ii);function Ca(e){return e.eventRange.def.allDay}var ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return o(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(gs),xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new ka,t.tableRef=Ve(),t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Ye(Sa,s({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(Ii),Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=sn(Ma),t.headerRef=Ve(),t.tableRef=Ve(),t}return o(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Ye(hs,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Ye(xa,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(sa);function Ma(e,t){var n=new ps(e.renderRange,t);return new ms(n,/year|month|week/.test(e.currentRangeUnit))}var Aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;(/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=bt(i,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=bt(l,6-Math.ceil(Tt(a,l)/7)));return{start:a,end:l}},t}(Ki),Ia=Ri({initialView:"dayGridMonth",views:{dayGrid:{component:Oa,dateProfileGeneratorClass:Aa},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t},t}(ri),Na=wn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Pa(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Ye(Si.Consumer,null,(function(n){if(!e.isLabeled)return Ye("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?Na:Array.isArray(i.slotLabelFormat)?wn(i.slotLabelFormat[0]):wn(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Ye(Hi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:La,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Ye("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Ye("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Ye("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}))}function La(e){return e.text}var Ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Ye("tr",{key:e.key},Ye(Pa,s({},e)))}))},t}(xi),Ya=wn({week:"short"}),za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new Ra,t.headerElRef=Ve(),t.rootElRef=Ve(),t.scrollerElRef=Ve(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=t.context.options,i=t.props.dateProfile.renderRange,o=1===Tt(i.start,i.end)?ui(t.context,i.start,"week"):{};return r.weekNumbers&&"day"===e?Ye($s,{date:i.start,defaultFormat:Ya},(function(e,t,r,i){return Ye("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},Ye("a",s({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},o),i)))})):Ye("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},Ye("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Ye(Hi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Ye("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Ye("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return o(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Ps(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Ye(Fi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(Hs,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ps(u.options),h=!c.forPrint&&Ls(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var p=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Ye("div",{className:"fc-timegrid-axis-chunk"},Ye("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Ye("tbody",null,Ye(Ha,{slatMetas:o}))),Ye("div",{className:"fc-timegrid-now-indicator-container"},Ye(cs,{unit:p?"minute":"day"},(function(e){var t=p&&s&&s.safeComputeTop(e);return"number"==typeof t?Ye(Ws,{isAxis:!0,date:e},(function(e,n,r,i){return Ye("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ns},{key:"cols",content:Ns}]}),Ye(Fi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(l,{liquid:!c.isHeightAuto&&!c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(Ii);function Va(e){return e.text}var Wa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(ir(t.currentRange,e)){var n=Dt(e),r=e.valueOf()-n.valueOf();if(r>=Jt(t.slotMinTime)&&r0,b=Boolean(l)&&l.span.end-l.span.start=0;t-=1)if(null!==(r=Qt(n=Gt(hl[t]),e))&&r>1)return n;return e}(r),c=[];Jt(a)=e.getTime())&&(!t||n<=t.getTime())}function i(e){var t=e.startDate.toJSDate().getTime(),n=e.endDate.toJSDate().getTime();return e.endDate.isDate&&n>t&&(n-=1),{startTime:t,endTime:n}}var o=[];this.events.forEach((function(e){e.isRecurrenceException()&&o.push(e)}));var s={events:[],occurrences:[]};return this.events.filter((function(e){return!e.isRecurrenceException()})).forEach((function(e){var a=[];if(e.component.getAllProperties("exdate").forEach((function(e){var t=e.getFirstValue();a.push(t.toJSDate().getTime())})),e.isRecurring()){var l=e.iterator(),u=void 0,c=0,d=function(){if(c+=1,u=l.next()){var n=e.getOccurrenceDetails(u),d=i(n),h=d.startTime,f=d.endTime,p=-1!==a.indexOf(h),m=o.find((function(t){return t.uid===e.uid&&t.recurrenceId.toJSDate().getTime()===n.startDate.toJSDate().getTime()}));if(t&&h>t.getTime())return"break";r(h,f)&&(m?s.events.push(m):p||s.occurrences.push(n))}};do{if("break"===d())break}while(u&&(!n.maxIterations||c=200&&s.status<400?i(s.responseText,s):o("Request failed",s)},s.onerror=function(){return o("Request failed",s)},s.send(null)):l.completed?u(l.errorMessage,l.iCalExpander,l.xhr):l.callbacks.push(u)}}]});Zo.touchMouseIgnoreWait=500;var xl=0,Ol=0,Ml=!1,Al=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,xl+=1,setTimeout((function(){xl-=1}),Zo.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new yi,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),1===(Ol+=1)&&window.addEventListener("touchmove",Il,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),(Ol-=1)||window.removeEventListener("touchmove",Il,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!Ge(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){Ml=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?Ge(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return xl||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(Ml=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function Il(e){Ml&&e.preventDefault()}var Rl=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",Xe(n,{left:r.left,top:r.top}),function(e,t){var n=function(r){t(r),ot.forEach((function(t){e.removeEventListener(t,n)}))};ot.forEach((function(t){e.addEventListener(t,n)}))}(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Ze(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&Xe(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),Xe(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),Nl=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return o(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(_i),Pl=function(e){function t(t,n){return e.call(this,new wi(t),n)||this}return o(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return mi(this.scrollController.el)},t}(Nl),Ll=function(e){function t(t){return e.call(this,new Ti,t)||this}return o(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(Nl),Hl="function"==typeof performance?performance.now:Date.now,Yl=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=Hl();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Hl()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new Ll(!1):new Pl(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,function(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",rt)}(document.body),function(e){e.removeEventListener("contextmenu",rt)}(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new Al(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new Rl,r.autoScroller=new Yl,r}return o(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(qo),Vl=function(){function e(e){this.origRect=gi(e),this.scrollCaches=vi(e).map((function(e){return new Pl(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&c=0&&di.layer)&&(m.componentId=o,m.context=s.context,m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function Ul(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,i=n.range,o=r.range,(null===i.start?null:i.start.valueOf())===(null===o.start?null:o.start.valueOf())&&(null===i.end?null:i.end.valueOf())===(null===o.end?null:o.end.valueOf())&&n.allDay===r.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(n,r));var n,r,i,o}function jl(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.datePointTransforms;or.start)return{endDelta:a};return null}(s,e,r.subjectEl.classList.contains("fc-event-resizer-start"),a.range)));l&&(u=kr(o,i.getCurrentData().eventUiBases,l,i),d.mutatedEvents=u,ys(d,e.dateProfile,i)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?i.dispatch({type:"SET_EVENT_RESIZE",state:d}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),c?ct():dt(),t||(l&&Ul(s,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,i=n.eventRange.instance,o=new Lr(t,r,i),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:o,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Lr(t,l.defs[r.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:o,event:u,relatedEvents:Yr(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",s(s({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Gt(0),endDelta:n.validMutation.endDelta||Gt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,i=n.dragging=new zl(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.context.options.dragScroll;var o=n.hitDragging=new Wl(n.dragging,Bo(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragstart",n.handleDragStart),o.emitter.on("hitupdate",n.handleHitUpdate),o.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Ge(e.subjectEl,".fc-event")},t}(Uo);var Gl=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=Qe(e.origEvent);t.matchesCancel=!!Ge(r,n),t.matchesEvent=!!Ge(r,ql.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Al(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),$l={fixedMirrorParent:An},Kl={dateClick:An,eventDragStart:An,eventDragStop:An,eventDrop:An,eventResizeStart:An,eventResizeStop:An,eventResize:An,drop:An,eventReceive:An,eventLeave:An},Xl=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,r){var i=n.hitDragging.dragging,o=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(o=e.context,n.canDropElOnCalendar(r.subjectEl,o)&&(a=function(e,t,n){for(var r=s({},t.leftoverProps),i=0,o=n.pluginHooks.externalDefTransforms;i{document.dispatchEvent(new CustomEvent("kimai.calendar.changeDate",{detail:{view:this.toExternalViewName(e.view.type),date:e.start.toISOString().split("T")[0]}}))},views:{dayGrid:{dayMaxEventRows:this.options.dayLimit}},viewClassNames:()=>{document.querySelector(".fc-dayGridMonth-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridWeek-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridDay-button").classList.remove("btn-icon")},eventWillUnmount:e=>{if(null===e.event.source)return;if(!this.isKimaiSource(e.event))return;const t=r.AM.getInstance(e.element);null!==t&&t.dispose()},eventMouseEnter:e=>{const t=e.event;if(!this.isKimaiSource(t))return;const n=e.el,i=o.getFormattedDate(t.start)+" | "+o.formatTime(t.start)+" - "+(t.end?o.formatTime(t.end):""),s=this.renderEventPopoverContent(t);let a=r.AM.getInstance(n);null!==a?a.setContent({".popover-header":i,".popover-body":s}):a=new r.AM(n,{title:i,placement:"top",html:!0,content:s,trigger:"focus"}),a.show()},eventMouseLeave:e=>{this.isKimaiSource(e.event)&&this.hidePopover(e.el)},eventDidMount:e=>{e.el.addEventListener("contextmenu",(t=>{t.preventDefault();const n=e.event;if(!n.allDay){const e=this.options.url.actions(n.extendedProps.timesheet);i.get(e,{},(e=>{new Iu.A("calendar_contextMenu").createFromApi(t,e)}),(e=>{console.log("Failed to load actions for context menu",e)}))}}))},eventsSet:e=>{this._renderDayAndWeekSum(this.getCalendar().getCurrentData().viewSpec.type,e)}};if(!this.hasPermission("punch")&&this.hasPermission("create")&&void 0!==this.options.dragdrop){[].slice.call(document.querySelectorAll(this.options.dragdrop.container)).map((e=>new Jl(e,{itemSelector:this.options.dragdrop.items}))),l={...l,droppable:!0,drop:e=>{const t=e.draggedEl,n=t.parentElement;let r=JSON.parse(t.dataset.entry);const s=JSON.parse(n.dataset.routeReplacer);let l=n.dataset.route;for(const[e,t]of Object.entries(s))l=l.replace(e,r[t]);let u=e.date;if("dayGridMonth"===e.view.type){let e=this.options.defaultStartTime;if(null===e){const t=new Date;e=(t.getHours()<10?"0":"")+t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()}u=o.addHumanDuration(u,e)}let c=o.addHumanDuration(u,this.options.slotDuration);this.hasPermission("punch")||(this.hasPermission("edit_begin")&&(r.begin=o.formatForAPI(u)),this.hasPermission("edit_end")&&(r.end=o.formatForAPI(c))),r=this.options.preparePayloadForUpdate(r),"PATCH"===n.dataset.method?i.patch(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")})):i.post(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")}))}}}!this.hasPermission("punch")&&this.hasPermission("create")&&(l={...l,dateClick:e=>{if("dayGridMonth"!==e.view.type)return;const t=this.options.url.create(e.dateStr);s.openUrlInModal(t)},selectable:!0,select:e=>{if("dayGridMonth"===e.view.type)return;const t=this.options.url.create(e.startStr,e.endStr);s.openUrlInModal(t)}}),this.hasPermission("edit")&&(l={...l,eventClick:e=>{const t=e.event;this.isKimaiSource(t)?(this.hidePopover(e.el),t.extendedProps.exported&&!this.hasPermission("edit_exported")||s.openUrlInModal(this.options.url.edit(t.id),(e=>{403!==e.status&&console.log(e)}))):e.jsEvent.preventDefault()}},this.hasPermission("punch")||(l={...l,dragRevertDuration:0,eventStartEditable:this.hasPermission("edit_begin"),eventDurationEditable:this.hasPermission("edit_end")||this.hasPermission("edit_duration"),eventDragStart:e=>{this.hidePopover(e.el)},eventDrop:e=>{this.changeHandler(e)},eventResizeStart:e=>{this.hidePopover(e.el)},eventResize:e=>{this.changeHandler(e)}})),void 0!==this.options.googleCalendarApiKey&&(l={...l,googleCalendarApiKey:this.options.googleCalendarApiKey});let u=[];for(const e of this.options.eventSources){let t={};if("timesheet"===e.type)t={...t,id:"kimai-"+e.id,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(this.convertSourceForCalendar(n));n(t)}),r)}};else if("google"===e.type)t={...t,id:"google-"+e.id,name:"google",editable:!1};else if("json"===e.type)t={...t,id:"json-"+e.id,editable:!1,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(n);n(t)}),r)}};else{if("ical"!==e.type){console.log("Unknown source type given, skipping to load events from: "+e.id);continue}t={...t,id:"ical-"+e.id,url:e.url,format:"ics",editable:!1}}void 0!==e.options&&(t={...t,...e.options}),u.push(t)}u.length>0&&(l={...l,eventSources:u}),this.calendar=new oa(t,l)}isKimaiSource(e){return null!==e&&(null!==e.source&&0===e.source.id.indexOf("kimai-"))}toExternalViewName(e){switch(e){case"timeGridDay":return"day";case"timeGridWeek":return"week";default:return"month"}}toInternalViewName(e){switch(e){case"day":case"agendaDay":case"timeGridDay":return"timeGridDay";case"week":case"agendaWeek":case"timeGridWeek":return"timeGridWeek";default:return"dayGridMonth"}}hasPermission(e){return this.options.permissions[e]}getCalendar(){return this.calendar}render(){this.calendar.render()}reloadEvents(){this.calendar.getEventSources().forEach((e=>e.refetch()))}convertSourceForCalendar(e){const t=this.kimai.getConfiguration().get("defaultColor");let n=e.activity.color;null!==n&&n!==t||(n=e.project.color,null!==n&&n!==t||(n=e.project.customer.color)),null===n&&(n=t);const r=this.kimai.getPlugin("date");let i=this.options.patterns.title;return i=i.replace("{project}",e.project.name),i=i.replace("{customer}",e.project.customer.name),i=i.replace("{description}",e.description??""),i=i.replace("{activity}",e.activity.name??""),i=null===e.end?i.replace("{duration}",""):i.replace("{duration}",r.formatDuration(e.duration)),""!==i&&null!==i||(i=e.activity.name),{id:e.id,timesheet:e.id,title:i,description:e.description,exported:e.exported,start:e.begin,end:e.end,activity:e.activity.name,project:e.project.name,customer:e.project.customer.name,tags:e.tags,color:n,textColor:Au.A.calculateContrastColor(n)}}renderEventPopoverContent(e){const t=e.extendedProps,n=this.kimai.getPlugin("escape");let r="";if(null!==t.tags&&t.tags.length>0)for(let e of t.tags)r+=''+n.escapeForHtml(e)+"";return'\n \n
\n - '+this.options.translations.customer+": "+n.escapeForHtml(t.customer)+"
\n - "+this.options.translations.project+": "+n.escapeForHtml(t.project)+"
\n - "+this.options.translations.activity+": "+n.escapeForHtml(t.activity)+"
\n
"+(null!==t.description||t.tags.length>0?"
":"")+(t.description?"
"+n.escapeForHtml(t.description)+"
":"")+r+"\n
"}hidePopover(e){let t=r.AM.getInstance(e);null!==t&&t.hide()}changeHandler(e){const t=e.event;if(t.extendedProps.exported&&!this.hasPermission("edit_exported"))return void e.revert();const n=this.kimai.getPlugin("api"),r=this.kimai.getPlugin("alert"),i=this.kimai.getPlugin("date");let o={begin:i.formatForAPI(t.start)};null!==t.end&&void 0!==t.end?o.end=i.formatForAPI(t.end):o.end=null;const s=this.options.url.update(t.id);n.patch(s,JSON.stringify(o),(()=>{r.success("action.update.success")}),(t=>{e.revert(),n.handleError("action.update.error",t)}))}_renderDayAndWeekSum(e,t){if("dayGridMonth"===e)return;const n=this.kimai.getPlugin("date"),r={};"timeGridWeek"===e&&document.querySelectorAll("th.fc-col-header-cell[data-date]").forEach((e=>{r[e.dataset.date]=0})),t.forEach((e=>{const t=Ru.c9.fromJSDate(e.start).toUTC(),n=t.toFormat("yyyy-MM-dd");if(r[n]||(r[n]=0),null!==e.end){const i=Ru.c9.fromJSDate(e.end).toUTC().diff(t,"hours").as("seconds");r[n]+=i}}));document.querySelectorAll(".fc-dailytotal").forEach((e=>e.remove()));for(const t in r){const i=r[t];if("timeGridWeek"===e){document.querySelectorAll(`th.fc-col-header-cell[data-date="${t}"]`).forEach((e=>{const t=document.createElement("div");t.classList.add("fc-dailytotal"),t.textContent=n.formatSeconds(i),e.appendChild(t)}))}}if("timeGridDay"===e){const e=document.querySelector("th.fc-day"),t=e.dataset.date;document.querySelectorAll(".fc-dailytotal").forEach((e=>e.remove()));const i=document.createElement("div");i.classList.add("fc-dailytotal"),i.textContent=n.formatSeconds(r[t]),e.appendChild(i)}}}},9997:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{static calculateContrastColor(e){"#"===e.slice(0,1)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((function(e){return e+e})).join(""));return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}},2758:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{constructor(e){this.id=e}getContextMenuElement(){if(null===document.getElementById(this.id)){const e=document.createElement("div");e.id=this.id,e.classList.add("dropdown-menu","d-none"),document.body.appendChild(e)}return document.getElementById(this.id)}createFromApi(e,t){let n="";for(const e of t)if(!0===e.divider&&(n+=''),null!==e.url){if(n+='"+e.title+""}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),n.innerHTML=t,n.style.position="fixed",n.style.top=e.clientY+"px",n.style.left=e.clientX+"px";const r=e=>{e.target.classList.contains("dropdown-toggle")||e.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",r),document.removeEventListener("click",r))};n.addEventListener("click",r),document.addEventListener("click",r),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(e){[].slice.call(document.querySelectorAll(e)).map((e=>{null!==e.querySelector("td.actions div.dropdown-menu")&&e.addEventListener("contextmenu",(t=>{let n=t.target;for(;null!==n;){const e=n.tagName.toUpperCase();if("TH"===e||"TABLE"===e||"BODY"===e)return;if("TR"===e)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const i=n.querySelector("td.actions div.dropdown-menu");if(null===i)return;t.preventDefault();new r(e.dataset.contextMenu).createFromClickEvent(t,i.innerHTML)}))}))}}},9336:function(e,t,n){"use strict";n.d(t,{aF:function(){return Wn},go:function(){return Kn},AM:function(){return yr},y8:function(){return jr},m_:function(){return mr}});var r={};n.r(r),n.d(r,{afterMain:function(){return E},afterRead:function(){return _},afterWrite:function(){return C},applyStyles:function(){return R},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return u},beforeMain:function(){return w},beforeRead:function(){return y},beforeWrite:function(){return D},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return re},createPopper:function(){return Re},createPopperBase:function(){return Ie},createPopperLite:function(){return Ne},detectOverflow:function(){return be},end:function(){return d},eventListeners:function(){return oe},flip:function(){return _e},hide:function(){return Ee},left:function(){return a},main:function(){return T},modifierPhases:function(){return k},offset:function(){return De},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Ae},popperOffsets:function(){return Se},preventOverflow:function(){return Ce},read:function(){return b},reference:function(){return m},right:function(){return s},start:function(){return c},top:function(){return i},variationPlacements:function(){return g},viewport:function(){return f},write:function(){return S}});var i="top",o="bottom",s="right",a="left",l="auto",u=[i,o,s,a],c="start",d="end",h="clippingParents",f="viewport",p="popper",m="reference",g=u.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+d])}),[]),v=[].concat(u,[l]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+d])}),[]),y="beforeRead",b="read",_="afterRead",w="beforeMain",T="main",E="afterMain",D="beforeWrite",S="write",C="afterWrite",k=[y,b,_,w,T,E,D,S,C];function x(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function M(e){return e instanceof O(e).Element||e instanceof Element}function A(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}var R={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];A(i)&&x(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});A(r)&&x(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function N(e){return e.split("-")[0]}var P=Math.max,L=Math.min,H=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function V(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&A(e)&&(i=e.offsetWidth>0&&H(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H(r.height)/e.offsetHeight||1);var s=(M(e)?O(e):window).visualViewport,a=!z()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function W(e){var t=V(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function U(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(e){return O(e).getComputedStyle(e)}function B(e){return["table","td","th"].indexOf(x(e))>=0}function F(e){return((M(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||F(e)}function Z(e){return A(e)&&"fixed"!==j(e).position?e.offsetParent:null}function G(e){for(var t=O(e),n=Z(e);n&&B(n)&&"static"===j(n).position;)n=Z(n);return n&&("html"===x(n)||"body"===x(n)&&"static"===j(n).position)?t:n||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&A(e)&&"fixed"===j(e).position)return null;var n=q(e);for(I(n)&&(n=n.host);A(n)&&["html","body"].indexOf(x(n))<0;){var r=j(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function $(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e,t,n){return P(e,L(t,n))}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,l=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,h=N(n.placement),f=$(h),p=[a,s].indexOf(h)>=0?"height":"width";if(c&&d){var m=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,u))}(l.padding,n),g=W(c),v="y"===f?i:a,y="y"===f?o:s,b=n.rects.reference[p]+n.rects.reference[f]-d[f]-n.rects.popper[p],_=d[f]-n.rects.reference[f],w=G(c),T=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,E=b/2-_/2,D=m[v],S=T-g[p]-m[y],C=T/2-g[p]/2+E,k=K(D,C,S),x=f;n.modifiersData[r]=((t={})[x]=k,t.centerOffset=k-C,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&U(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,l=e.placement,u=e.variation,c=e.offsets,h=e.position,f=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=c.x,y=void 0===v?0:v,b=c.y,_=void 0===b?0:b,w="function"==typeof m?m({x:y,y:_}):{x:y,y:_};y=w.x,_=w.y;var T=c.hasOwnProperty("x"),E=c.hasOwnProperty("y"),D=a,S=i,C=window;if(p){var k=G(n),x="clientHeight",M="clientWidth";if(k===O(n)&&"static"!==j(k=F(n)).position&&"absolute"===h&&(x="scrollHeight",M="scrollWidth"),l===i||(l===a||l===s)&&u===d)S=o,_-=(g&&k===C&&C.visualViewport?C.visualViewport.height:k[x])-r.height,_*=f?1:-1;if(l===a||(l===i||l===o)&&u===d)D=s,y-=(g&&k===C&&C.visualViewport?C.visualViewport.width:k[M])-r.width,y*=f?1:-1}var A,I=Object.assign({position:h},p&&te),R=!0===m?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(r*i)/i||0}}({x:y,y:_},O(n)):{x:y,y:_};return y=R.x,_=R.y,f?Object.assign({},I,((A={})[S]=E?"0":"",A[D]=T?"0":"",A.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",A)):Object.assign({},I,((t={})[S]=E?_+"px":"",t[D]=T?y+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:N(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ie={passive:!0};var oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=O(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,ie)})),a&&l.addEventListener("resize",n.update,ie),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,ie)})),a&&l.removeEventListener("resize",n.update,ie)}},data:{}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ce(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return V(F(e)).left+ce(e).scrollLeft}function he(e){var t=j(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:A(e)&&he(e)?e:fe(q(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=O(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe(q(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===f?me(function(e,t){var n=O(e),r=F(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=z();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):M(t)?function(e,t){var n=V(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=F(e),r=ce(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=P(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=P(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===j(i||n).direction&&(a+=P(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(F(e)))}function ve(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe(q(e)),n=["absolute","fixed"].indexOf(j(e).position)>=0&&A(e)?G(e):e;return M(n)?t.filter((function(e){return M(e)&&U(e,n)&&"body"!==x(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=ge(e,n,r);return t.top=P(i.top,t.top),t.right=L(i.right,t.right),t.bottom=L(i.bottom,t.bottom),t.left=P(i.left,t.left),t}),ge(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,r=e.element,l=e.placement,u=l?N(l):null,h=l?ee(l):null,f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2;switch(u){case i:t={x:f,y:n.y-r.height};break;case o:t={x:f,y:n.y+n.height};break;case s:t={x:n.x+n.width,y:p};break;case a:t={x:n.x-r.width,y:p};break;default:t={x:n.x,y:n.y}}var m=u?$(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case c:t[m]=t[m]-(n[g]/2-r[g]/2);break;case d:t[m]=t[m]+(n[g]/2-r[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,l=n.strategy,c=void 0===l?e.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?f:v,b=n.elementContext,_=void 0===b?p:b,w=n.altBoundary,T=void 0!==w&&w,E=n.padding,D=void 0===E?0:E,S=X("number"!=typeof D?D:J(D,u)),C=_===p?m:p,k=e.rects.popper,x=e.elements[T?C:_],O=ve(M(x)?x:x.contextElement||F(e.elements.popper),g,y,c),A=V(e.elements.reference),I=ye({reference:A,element:k,strategy:"absolute",placement:a}),R=me(Object.assign({},k,I)),N=_===p?R:A,P={top:O.top-N.top+S.top,bottom:N.bottom-O.bottom+S.bottom,left:O.left-N.left+S.left,right:N.right-O.right+S.right},L=e.modifiersData.offset;if(_===p&&L){var H=L[a];Object.keys(P).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[i,o].indexOf(e)>=0?"y":"x";P[e]+=H[n]*t}))}return P}var _e={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var d=n.mainAxis,h=void 0===d||d,f=n.altAxis,p=void 0===f||f,m=n.fallbackPlacements,y=n.padding,b=n.boundary,_=n.rootBoundary,w=n.altBoundary,T=n.flipVariations,E=void 0===T||T,D=n.allowedAutoPlacements,S=t.options.placement,C=N(S),k=m||(C===S||!E?[ae(S)]:function(e){if(N(e)===l)return[];var t=ae(e);return[ue(e),t,ue(t)]}(S)),x=[S].concat(k).reduce((function(e,n){return e.concat(N(n)===l?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?v:l,d=ee(r),h=d?a?g:g.filter((function(e){return ee(e)===d})):u,f=h.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=h);var p=f.reduce((function(t,n){return t[n]=be(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[N(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:b,rootBoundary:_,padding:y,flipVariations:E,allowedAutoPlacements:D}):n)}),[]),O=t.rects.reference,M=t.rects.popper,A=new Map,I=!0,R=x[0],P=0;P=0,V=z?"width":"height",W=be(t,{placement:L,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),U=z?Y?s:a:Y?o:i;O[V]>M[V]&&(U=ae(U));var j=ae(U),B=[];if(h&&B.push(W[H]<=0),p&&B.push(W[U]<=0,W[j]<=0),B.every((function(e){return e}))){R=L,I=!1;break}A.set(L,B)}if(I)for(var F=function(e){var t=x.find((function(t){var n=A.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return R=t,"break"},q=E?3:1;q>0;q--){if("break"===F(q))break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Te(e){return[i,s,o,a].some((function(t){return e[t]>=0}))}var Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(s,r),u=we(a,i,o),c=Te(l),d=Te(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var De={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,l=void 0===o?[0,0]:o,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),o=[a,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*o,[a,s].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e}),{}),c=u[t.placement],d=c.x,h=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=u}};var Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,l=n.mainAxis,u=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,b=n.tetherOffset,_=void 0===b?0:b,w=be(t,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),T=N(t.placement),E=ee(t.placement),D=!E,S=$(T),C="x"===S?"y":"x",k=t.modifiersData.popperOffsets,x=t.rects.reference,O=t.rects.popper,M="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,A="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(k){if(u){var H,Y="y"===S?i:a,z="y"===S?o:s,V="y"===S?"height":"width",U=k[S],j=U+w[Y],B=U-w[z],F=y?-O[V]/2:0,q=E===c?x[V]:O[V],Z=E===c?-O[V]:-x[V],X=t.elements.arrow,J=y&&X?W(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[Y],ne=Q[z],re=K(0,x[V],J[V]),ie=D?x[V]/2-F-re-te-A.mainAxis:q-re-te-A.mainAxis,oe=D?-x[V]/2+F+re+ne+A.mainAxis:Z+re+ne+A.mainAxis,se=t.elements.arrow&&G(t.elements.arrow),ae=se?"y"===S?se.clientTop||0:se.clientLeft||0:0,le=null!=(H=null==I?void 0:I[S])?H:0,ue=U+oe-le,ce=K(y?L(j,U+ie-le-ae):j,U,y?P(B,ue):B);k[S]=ce,R[S]=ce-U}if(h){var de,he="x"===S?i:a,fe="x"===S?o:s,pe=k[C],me="y"===C?"height":"width",ge=pe+w[he],ve=pe-w[fe],ye=-1!==[i,a].indexOf(T),_e=null!=(de=null==I?void 0:I[C])?de:0,we=ye?ge:pe-x[me]-O[me]-_e+A.altAxis,Te=ye?pe+x[me]+O[me]-_e-A.altAxis:ve,Ee=y&&ye?function(e,t,n){var r=K(e,t,n);return r>n?n:r}(we,pe,Te):K(y?we:ge,pe,y?Te:ve);k[C]=Ee,R[C]=Ee-pe}t.modifiersData[r]=R}},requiresIfExists:["offset"]};function ke(e,t,n){void 0===n&&(n=!1);var r,i,o=A(t),s=A(t)&&function(e){var t=e.getBoundingClientRect(),n=H(t.width)/e.offsetWidth||1,r=H(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=F(t),l=V(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==x(t)||he(a))&&(u=(r=t)!==O(r)&&A(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ce(r)),A(t)?((c=V(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=de(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function xe(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var Oe={placement:"bottom",modifiers:[],strategy:"absolute"};function Me(){for(var e=arguments.length,t=new Array(e),n=0;nPe.has(e)&&Pe.get(e).get(t)||null,remove(e,t){if(!Pe.has(e))return;const n=Pe.get(e);n.delete(t),0===n.size&&Pe.delete(e)}},He="transitionend",Ye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),ze=e=>{e.dispatchEvent(new Event(He))},Ve=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),We=e=>Ve(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ye(e)):null,Ue=e=>{if(!Ve(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},je=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),Be=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Be(e.parentNode):null},Fe=()=>{},qe=e=>{e.offsetHeight},Ze=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ge=[],$e=()=>"rtl"===document.documentElement.dir,Ke=e=>{var t;t=()=>{const t=Ze();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(Ge.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Ge)e()})),Ge.push(t)):t()},Xe=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Je=(e,t,n=!0)=>{if(!n)return void Xe(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let i=!1;const o=({target:n})=>{n===t&&(i=!0,t.removeEventListener(He,o),Xe(e))};t.addEventListener(He,o),setTimeout((()=>{i||ze(t)}),r)},Qe=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,nt=/::\d+$/,rt={};let it=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function at(e,t){return t&&`${t}::${it++}`||e.uidEvent||it++}function lt(e){const t=at(e);return e.uidEvent=t,rt[t]=rt[t]||{},rt[t]}function ut(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function ct(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=pt(e);return st.has(o)||(o=e),[r,i,o]}function dt(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=ct(t,n,r);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),u=l[a]||(l[a]={}),c=ut(u,s,o?n:null);if(c)return void(c.oneOff=c.oneOff&&i);const d=at(s,t.replace(et,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(i,{delegateTarget:s}),r.oneOff&&mt.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return gt(r,{delegateTarget:e}),n.oneOff&&mt.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,u[d]=h,e.addEventListener(a,h,o)}function ht(e,t,n,r,i){const o=ut(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function ft(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&ht(e,t,n,s.callable,s.delegationSelector)}function pt(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,n,r){dt(e,t,n,r,!1)},one(e,t,n,r){dt(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=ct(t,n,r),a=s!==t,l=lt(e),u=l[s]||{},c=t.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))ft(e,l,n,t.slice(1));for(const[n,r]of Object.entries(u)){const i=n.replace(nt,"");a&&!t.includes(i)||ht(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(u).length)return;ht(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=Ze();let i=null,o=!0,s=!0,a=!1;t!==pt(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function gt(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function vt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function yt(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const bt={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${yt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${yt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=vt(e.dataset[r])}return t},getDataAttribute:(e,t)=>vt(e.getAttribute(`data-bs-${yt(t)}`))};class _t{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=Ve(t)?bt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Ve(t)?bt.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const t=e[r],o=Ve(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)}var n}}class wt extends _t{constructor(e,t){super(),(e=We(e))&&(this._element=e,this._config=this._getConfig(t),Le.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Le.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Je(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Le.get(We(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Tt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>Ye(e))).join(","):null},Et={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!je(e)&&Ue(e)))},getSelectorFromElement(e){const t=Tt(e);return t&&Et.findOne(t)?t:null},getElementFromSelector(e){const t=Tt(e);return t?Et.findOne(t):null},getMultipleElementsFromSelector(e){const t=Tt(e);return t?Et.find(t):[]}},Dt=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;mt.on(document,n,`[data-bs-dismiss="${r}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),je(this))return;const i=Et.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))};class St extends wt{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=St.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(St,"close"),Ke(St);const Ct='[data-bs-toggle="button"]';class kt extends wt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=kt.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Ct,(e=>{e.preventDefault();const t=e.target.closest(Ct);kt.getOrCreateInstance(t).toggle()})),Ke(kt);const xt=".bs.swipe",Ot={endCallback:null,leftCallback:null,rightCallback:null},Mt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class At extends _t{constructor(e,t){super(),this._element=e,e&&At.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ot}static get DefaultType(){return Mt}static get NAME(){return"swipe"}dispose(){mt.off(this._element,xt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Xe(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Xe(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,"pointerdown.bs.swipe",(e=>this._start(e))),mt.on(this._element,"pointerup.bs.swipe",(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,"touchstart.bs.swipe",(e=>this._start(e))),mt.on(this._element,"touchmove.bs.swipe",(e=>this._move(e))),mt.on(this._element,"touchend.bs.swipe",(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const It="next",Rt="prev",Nt="left",Pt="right",Lt="slid.bs.carousel",Ht="carousel",Yt="active",zt=".active",Vt=".carousel-item",Wt={ArrowLeft:Pt,ArrowRight:Nt},Ut={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},jt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Bt extends wt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Et.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ht&&this.cycle()}static get Default(){return Ut}static get DefaultType(){return jt}static get NAME(){return"carousel"}next(){this._slide(It)}nextWhenVisible(){!document.hidden&&Ue(this._element)&&this.next()}prev(){this._slide(Rt)}pause(){this._isSliding&&ze(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Lt,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Lt,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?It:Rt;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),mt.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&At.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Et.find(".carousel-item img",this._element))mt.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Nt)),rightCallback:()=>this._slide(this._directionToOrder(Pt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new At(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Wt[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Et.findOne(zt,this._indicatorsElement);t.classList.remove(Yt),t.removeAttribute("aria-current");const n=Et.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Yt),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===It,i=t||Qe(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>mt.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s("slide.bs.carousel").defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",u=r?"carousel-item-next":"carousel-item-prev";i.classList.add(u),qe(i),n.classList.add(l),i.classList.add(l);this._queueCallback((()=>{i.classList.remove(l,u),i.classList.add(Yt),n.classList.remove(Yt,u,l),this._isSliding=!1,s(Lt)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Et.findOne(".active.carousel-item",this._element)}_getItems(){return Et.find(Vt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return $e()?e===Nt?Rt:It:e===Nt?It:Rt}_orderToDirection(e){return $e()?e===Rt?Nt:Pt:e===Rt?Pt:Nt}static jQueryInterface(e){return this.each((function(){const t=Bt.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(e){const t=Et.getElementFromSelector(this);if(!t||!t.classList.contains(Ht))return;e.preventDefault();const n=Bt.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===bt.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),mt.on(window,"load.bs.carousel.data-api",(()=>{const e=Et.find('[data-bs-ride="carousel"]');for(const t of e)Bt.getOrCreateInstance(t)})),Ke(Bt);const Ft="show",qt="collapse",Zt="collapsing",Gt='[data-bs-toggle="collapse"]',$t={parent:null,toggle:!0},Kt={parent:"(null|element)",toggle:"boolean"};class Xt extends wt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=Et.find(Gt);for(const e of n){const t=Et.getSelectorFromElement(e),n=Et.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return $t}static get DefaultType(){return Kt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Xt.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(qt),this._element.classList.add(Zt),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Zt),this._element.classList.add(qt,Ft),this._element.style[t]="",mt.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,qe(this._element),this._element.classList.add(Zt),this._element.classList.remove(qt,Ft);for(const e of this._triggerArray){const t=Et.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Zt),this._element.classList.add(qt),mt.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(Ft)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=We(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Gt);for(const t of e){const e=Et.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Et.find(":scope .collapse .collapse",this._config.parent);return Et.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=Xt.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}mt.on(document,"click.bs.collapse.data-api",Gt,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Et.getMultipleElementsFromSelector(this))Xt.getOrCreateInstance(e,{toggle:!1}).toggle()})),Ke(Xt);const Jt="dropdown",Qt="ArrowUp",en="ArrowDown",tn="click.bs.dropdown.data-api",nn="keydown.bs.dropdown.data-api",rn="show",on='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',sn=`${on}.show`,an=".dropdown-menu",ln=$e()?"top-end":"top-start",un=$e()?"top-start":"top-end",cn=$e()?"bottom-end":"bottom-start",dn=$e()?"bottom-start":"bottom-end",hn=$e()?"left-start":"right-start",fn=$e()?"right-start":"left-start",pn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},mn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gn extends wt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Et.next(this._element,an)[0]||Et.prev(this._element,an)[0]||Et.findOne(an,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return pn}static get DefaultType(){return mn}static get NAME(){return Jt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(je(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(rn),this._element.classList.add(rn),mt.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(je(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._popper&&this._popper.destroy(),this._menu.classList.remove(rn),this._element.classList.remove(rn),this._element.setAttribute("aria-expanded","false"),bt.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Ve(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Jt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Ve(this._config.reference)?e=We(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Re(e,this._menu,t)}_isShown(){return this._menu.classList.contains(rn)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return hn;if(e.classList.contains("dropstart"))return fn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?un:ln:t?dn:cn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(bt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Xe(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=Et.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>Ue(e)));n.length&&Qe(n,t,e===en,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=gn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Et.find(sn);for(const n of t){const t=gn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[Qt,en].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(on)?this:Et.prev(this,on)[0]||Et.next(this,on)[0]||Et.findOne(on,e.delegateTarget.parentNode),o=gn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}mt.on(document,nn,on,gn.dataApiKeydownHandler),mt.on(document,nn,an,gn.dataApiKeydownHandler),mt.on(document,tn,gn.clearMenus),mt.on(document,"keyup.bs.dropdown.data-api",gn.clearMenus),mt.on(document,tn,on,(function(e){e.preventDefault(),gn.getOrCreateInstance(this).toggle()})),Ke(gn);const vn="backdrop",yn="show",bn="mousedown.bs.backdrop",_n={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},wn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Tn extends _t{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return _n}static get DefaultType(){return wn}static get NAME(){return vn}show(e){if(!this._config.isVisible)return void Xe(e);this._append();const t=this._getElement();this._config.isAnimated&&qe(t),t.classList.add(yn),this._emulateAnimation((()=>{Xe(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(yn),this._emulateAnimation((()=>{this.dispose(),Xe(e)}))):Xe(e)}dispose(){this._isAppended&&(mt.off(this._element,bn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=We(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,bn,(()=>{Xe(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Je(e,this._getElement(),this._config.isAnimated)}}const En=".bs.focustrap",Dn="backward",Sn={autofocus:!0,trapElement:null},Cn={autofocus:"boolean",trapElement:"element"};class kn extends _t{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,En),mt.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),mt.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,En))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=Et.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===Dn?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Dn:"forward")}}const xn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",On=".sticky-top",Mn="padding-right",An="margin-right";class In{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Mn,(t=>t+e)),this._setElementAttributes(xn,Mn,(t=>t+e)),this._setElementAttributes(On,An,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Mn),this._resetElementAttributes(xn,Mn),this._resetElementAttributes(On,An)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&bt.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=bt.getDataAttribute(e,t);null!==n?(bt.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(Ve(e))t(e);else for(const n of Et.find(e,this._element))t(n)}}const Rn=".bs.modal",Nn="hidden.bs.modal",Pn="show.bs.modal",Ln="modal-open",Hn="show",Yn="modal-static",zn={backdrop:!0,focus:!0,keyboard:!0},Vn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Wn extends wt{constructor(e,t){super(e,t),this._dialog=Et.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new In,this._addEventListeners()}static get Default(){return zn}static get DefaultType(){return Vn}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,Pn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ln),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Hn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,Rn),mt.off(this._dialog,Rn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Tn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new kn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Et.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),qe(this._element),this._element.classList.add(Hn);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.modal",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,"mousedown.dismiss.bs.modal",(e=>{mt.one(this._element,"click.dismiss.bs.modal",(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ln),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,Nn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Yn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Yn),this._queueCallback((()=>{this._element.classList.remove(Yn),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=$e()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=$e()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Wn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}mt.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=Et.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,Pn,(e=>{e.defaultPrevented||mt.one(t,Nn,(()=>{Ue(this)&&this.focus()}))}));const n=Et.findOne(".modal.show");n&&Wn.getInstance(n).hide();Wn.getOrCreateInstance(t).toggle(this)})),Dt(Wn),Ke(Wn);const Un="show",jn="showing",Bn="hiding",Fn=".offcanvas.show",qn="hidePrevented.bs.offcanvas",Zn="hidden.bs.offcanvas",Gn={backdrop:!0,keyboard:!0,scroll:!1},$n={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Kn extends wt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Gn}static get DefaultType(){return $n}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new In).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(jn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Un),this._element.classList.remove(jn),mt.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Bn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Un,Bn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new In).reset(),mt.trigger(this._element,Zn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Tn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,qn)}:null})}_initializeFocusTrap(){return new kn({trapElement:this._element})}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,qn))}))}static jQueryInterface(e){return this.each((function(){const t=Kn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=Et.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),je(this))return;mt.one(t,Zn,(()=>{Ue(this)&&this.focus()}));const n=Et.findOne(Fn);n&&n!==t&&Kn.getInstance(n).hide();Kn.getOrCreateInstance(t).toggle(this)})),mt.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of Et.find(Fn))Kn.getOrCreateInstance(e).show()})),mt.on(window,"resize.bs.offcanvas",(()=>{for(const e of Et.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Kn.getOrCreateInstance(e).hide()})),Dt(Kn),Ke(Kn);const Xn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Jn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,er=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Jn.has(n)||Boolean(Qn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))};const tr={allowList:Xn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},nr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},rr={entry:"(string|element|function|null)",selector:"(string|element)"};class ir extends _t{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},rr)}_setContent(e,t,n){const r=Et.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?Ve(t)?this._putElementInTemplate(We(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)er(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Xe(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const or=new Set(["sanitize","allowList","sanitizeFn"]),sr="fade",ar="show",lr=".modal",ur="hide.bs.modal",cr="hover",dr="focus",hr={AUTO:"auto",TOP:"top",RIGHT:$e()?"left":"right",BOTTOM:"bottom",LEFT:$e()?"right":"left"},fr={allowList:Xn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},pr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mr extends wt{constructor(e,t){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return fr}static get DefaultType(){return pr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(lr),ur,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(Be(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(sr,ar),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(sr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ir({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(sr)}_isShown(){return this.tip&&this.tip.classList.contains(ar)}_createPopper(e){const t=Xe(this._config.placement,[this,e,this._element]),n=hr[t.toUpperCase()];return Re(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Xe(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Xe(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===cr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===cr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?dr:cr]=!0,t._enter()})),mt.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?dr:cr]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(lr),ur,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=bt.getDataAttributes(this._element);for(const e of Object.keys(t))or.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:We(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ke(mr);const gr={...mr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},vr={...mr.DefaultType,content:"(null|string|element|function)"};class yr extends mr{static get Default(){return gr}static get DefaultType(){return vr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=yr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ke(yr);const br="click.bs.scrollspy",_r="active",wr="[href]",Tr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Er={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Dr extends wt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tr}static get DefaultType(){return Er}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=We(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,br),mt.on(this._config.target,br,wr,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Et.find(wr,this._config.target);for(const t of e){if(!t.hash||je(t))continue;const e=Et.findOne(decodeURI(t.hash),this._element);Ue(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(_r),this._activateParents(e),mt.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Et.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(_r);else for(const t of Et.parents(e,".nav, .list-group"))for(const e of Et.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(_r)}_clearActiveClass(e){e.classList.remove(_r);const t=Et.find("[href].active",e);for(const e of t)e.classList.remove(_r)}static jQueryInterface(e){return this.each((function(){const t=Dr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,"load.bs.scrollspy.data-api",(()=>{for(const e of Et.find('[data-bs-spy="scroll"]'))Dr.getOrCreateInstance(e)})),Ke(Dr);const Sr="ArrowLeft",Cr="ArrowRight",kr="ArrowUp",xr="ArrowDown",Or="Home",Mr="End",Ar="active",Ir="fade",Rr="show",Nr=".dropdown-toggle",Pr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Lr=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Pr}`;class Hr extends wt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,"keydown.bs.tab",(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?mt.trigger(t,"hide.bs.tab",{relatedTarget:e}):null;mt.trigger(e,"show.bs.tab",{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Ar),this._activate(Et.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,"shown.bs.tab",{relatedTarget:t})):e.classList.add(Rr)}),e,e.classList.contains(Ir))}_deactivate(e,t){if(!e)return;e.classList.remove(Ar),e.blur(),this._deactivate(Et.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,"hidden.bs.tab",{relatedTarget:t})):e.classList.remove(Rr)}),e,e.classList.contains(Ir))}_keydown(e){if(![Sr,Cr,kr,xr,Or,Mr].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!je(e)));let n;if([Or,Mr].includes(e.key))n=t[e.key===Or?0:t.length-1];else{const r=[Cr,xr].includes(e.key);n=Qe(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Hr.getOrCreateInstance(n).show())}_getChildren(){return Et.find(Lr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Et.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=Et.findOne(e,n);i&&i.classList.toggle(r,t)};r(Nr,Ar),r(".dropdown-menu",Rr),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Ar)}_getInnerElement(e){return e.matches(Lr)?e:Et.findOne(Lr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Hr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,"click.bs.tab",Pr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),je(this)||Hr.getOrCreateInstance(this).show()})),mt.on(window,"load.bs.tab",(()=>{for(const e of Et.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Hr.getOrCreateInstance(e)})),Ke(Hr);const Yr="hide",zr="show",Vr="showing",Wr={animation:"boolean",autohide:"boolean",delay:"number"},Ur={animation:!0,autohide:!0,delay:5e3};class jr extends wt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ur}static get DefaultType(){return Wr}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Yr),qe(this._element),this._element.classList.add(zr,Vr),this._queueCallback((()=>{this._element.classList.remove(Vr),mt.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add(Vr),this._queueCallback((()=>{this._element.classList.add(Yr),this._element.classList.remove(Vr,zr),mt.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(zr),super.dispose()}isShown(){return this._element.classList.contains(zr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),mt.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=jr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(jr),Ke(jr)},6225:function(e){var t,n,r,i;(t=e.exports).foldLength=75,t.newLineChar="\r\n",t.helpers={updateTimezones:function(e){var n,r,i,o,s,a;if(!e||"vcalendar"!==e.name)return e;for(n=e.getAllSubcomponents(),r=[],i={},s=0;s0&&"\\"===e[n-1]))return n;n+=1}return-1},binsearchInsert:function(e,t,n){if(!e.length)return 0;for(var r,i,o=0,s=e.length-1;o<=s;)if((i=n(t,e[r=o+Math.floor((s-o)/2)]))<0)s=r-1;else{if(!(i>0))break;o=r+1}return i<0?r:i>0?r+1:r},dumpn:function(){t.debug&&("undefined"!=typeof console&&"log"in console?t.helpers.dumpn=function(e){console.log(e)}:t.helpers.dumpn=function(e){dump(e+"\n")},t.helpers.dumpn(arguments[0]))},clone:function(e,n){if(e&&"object"==typeof e){if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){for(var r=[],i=0;i65535?2:1:(n+=t.newLineChar+" "+r.substring(0,i),r=r.substring(i),i=o=0)}return n.substr(t.newLineChar.length+1)},pad2:function(e){switch("string"!=typeof e&&("number"==typeof e&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}},trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)},inherits:function(e,n,r){function i(){}i.prototype=e.prototype,n.prototype=new i,r&&t.helpers.extend(r,n.prototype)},extend:function(e,t){for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r&&!Object.getOwnPropertyDescriptor(t,n)&&Object.defineProperty(t,n,r)}return t}},t.design=function(){"use strict";var e=/\\\\|\\,|\\[Nn]/g,n=/\\|,|\n/g;function r(e,t){return{matches:/.*/,fromICAL:function(t,n){return function(e,t,n){if(-1===e.indexOf("\\"))return e;n&&(t=new RegExp(t.source+"|\\\\"+n));return e.replace(t,p)}(t,e,n)},toICAL:function(e,n){var r=t;return n&&(r=new RegExp(r.source+"|"+n)),e.replace(r,(function(e){switch(e){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case"\n":return"\\n";default:return e}}))}}}var i={defaultType:"text"},o={defaultType:"text",multiValue:","},s={defaultType:"text",structuredValue:";"},a={defaultType:"integer"},l={defaultType:"date-time",allowedTypes:["date-time","date"]},u={defaultType:"date-time"},c={defaultType:"uri"},d={defaultType:"utc-offset"},h={defaultType:"recur"},f={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return"\n";default:return e}}var m={categories:o,url:c,version:i,uid:i},g={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){return"TRUE"===e},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){var n=parseFloat(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){var n=parseInt(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.substr(0,3)+e.substr(4,2):e.substr(0,3)+e.substr(4,2)+e.substr(7,2)},fromICAL:function(e){return e.length<6?e.substr(0,3)+":"+e.substr(3,2):e.substr(0,3)+":"+e.substr(3,2)+":"+e.substr(5,2)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}},v=t.helpers.extend(g,{text:r(/\\\\|\\;|\\,|\\[Nn]/g,/\\|;|,|\n/g),uri:{},binary:{decorate:function(e){return t.Binary.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,n){return C.strict?t.Time.fromDateString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()},fromICAL:function(e){return!C.strict&&e.length>=15?v["date-time"].fromICAL(e):e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)},toICAL:function(e){var t=e.length;return 10==t?e.substr(0,4)+e.substr(5,2)+e.substr(8,2):t>=19?v["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){if(C.strict||8!=e.length){var t=e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+"T"+e.substr(9,2)+":"+e.substr(11,2)+":"+e.substr(13,2);return e[15]&&"Z"===e[15]&&(t+="Z"),t}return v.date.fromICAL(e)},toICAL:function(e){var t=e.length;if(10!=t||C.strict){if(t>=19){var n=e.substr(0,4)+e.substr(5,2)+e.substr(8,5)+e.substr(14,2)+e.substr(17,2);return e[19]&&"Z"===e[19]&&(n+="Z"),n}return e}return v.date.toICAL(e)},decorate:function(e,n){return C.strict?t.Time.fromDateTimeString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return t.Duration.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){var n=e.split("/");return n[0]=v["date-time"].fromICAL(n[0]),t.Duration.isValueString(n[1])||(n[1]=v["date-time"].fromICAL(n[1])),n},toICAL:function(e){return C.strict||10!=e[0].length?e[0]=v["date-time"].toICAL(e[0]):e[0]=v.date.toICAL(e[0]),t.Duration.isValueString(e[1])||(C.strict||10!=e[1].length?e[1]=v["date-time"].toICAL(e[1]):e[1]=v.date.toICAL(e[1])),e.join("/")},decorate:function(e,n){return t.Period.fromJSON(e,n,!C.strict)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return t.Recur._stringToData(e,!0)},toICAL:function(e){var n="";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];"until"==r?i=i.length>10?v["date-time"].toICAL(i):v.date.toICAL(i):"wkst"==r?"number"==typeof i&&(i=t.Recur.numericDayToIcalDay(i)):Array.isArray(i)&&(i=i.join(",")),n+=r.toUpperCase()+"="+i+";"}return n.substr(0,n.length-1)},decorate:function(e){return t.Recur.fromData(e)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;var t=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2);return"Z"===e[6]&&(t+="Z"),t},toICAL:function(e){if(e.length<8)return e;var t=e.substr(0,2)+e.substr(3,2)+e.substr(6,2);return"Z"===e[8]&&(t+="Z"),t}}}),y=t.helpers.extend(m,{action:i,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:i,class:i,comment:i,completed:u,contact:i,created:u,description:i,dtend:l,dtstamp:u,dtstart:l,due:l,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:h,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":u,location:i,method:i,organizer:{defaultType:"cal-address"},"percent-complete":a,priority:a,prodid:i,"related-to":i,repeat:a,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return-1!==e.indexOf("/")?"period":-1===e.indexOf("T")?"date":"date-time"}},"recurrence-id":l,resources:o,"request-status":s,rrule:h,sequence:a,status:i,summary:i,transp:i,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:d,tzoffsetto:d,tzurl:c,tzid:i,tzname:i}),b=t.helpers.extend(g,{text:r(e,n),uri:r(e,n),date:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return 8==e.length?v.date.fromICAL(e):"-"==e[0]&&6==e.length?e.substr(0,4)+"-"+e.substr(4):e},toICAL:function(e){return 10==e.length?v.date.toICAL(e):"-"==e[0]&&7==e.length?e.substr(0,4)+e.substr(5):e}},time:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=b.time._splitZone(e,!0),n=t[0],r=t[1];return 6==r.length?r=r.substr(0,2)+":"+r.substr(2,2)+":"+r.substr(4,2):4==r.length&&"-"!=r[0]?r=r.substr(0,2)+":"+r.substr(2,2):5==r.length&&(r=r.substr(0,3)+":"+r.substr(3,2)),5!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+":"+n.substr(3)),r+n},toICAL:function(e){var t=b.time._splitZone(e),n=t[0],r=t[1];return 8==r.length?r=r.substr(0,2)+r.substr(3,2)+r.substr(6,2):5==r.length&&"-"!=r[0]?r=r.substr(0,2)+r.substr(3,2):6==r.length&&(r=r.substr(0,3)+r.substr(4,2)),6!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+n.substr(4)),r+n},_splitZone:function(e,t){var n,r,i=e.length-1,o=e.length-(t?5:6),s=e[o];return"Z"==e[i]?(n=e[i],r=e.substr(0,i)):e.length>6&&("-"==s||"+"==s)?(n=e.substr(o),r=e.substr(0,o)):(n="",r=e),[n,r]}},"date-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return b["date-and-or-time"].fromICAL(e)},toICAL:function(e){return b["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=e.split("T");return(t[0]?b.date.fromICAL(t[0]):"")+(t[1]?"T"+b.time.fromICAL(t[1]):"")},toICAL:function(e){var t=e.split("T");return b.date.toICAL(t[0])+(t[1]?"T"+b.time.toICAL(t[1]):"")}},timestamp:v["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/}}),_=t.helpers.extend(m,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:f,bday:f,caladruri:c,caluri:c,clientpidmap:s,email:i,fburl:c,fn:i,gender:s,geo:c,impp:c,key:c,kind:i,lang:{defaultType:"language-tag"},logo:c,member:c,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,note:i,org:{defaultType:"text",structuredValue:";"},photo:c,related:c,rev:{defaultType:"timestamp"},role:i,sound:c,source:c,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:i,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:i}),w=t.helpers.extend(g,{binary:v.binary,date:b.date,"date-time":b["date-time"],"phone-number":{},uri:v.uri,text:v.text,time:v.time,vcard:v.text,"utc-offset":{toICAL:function(e){return e.substr(0,7)},fromICAL:function(e){return e.substr(0,7)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}}),T=t.helpers.extend(m,{fn:i,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:i,tel:{defaultType:"phone-number"},email:i,mailer:i,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:i,role:i,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:s,note:o,prodid:i,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},"sort-string":i,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:i,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),E={value:v,param:{cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},property:y},D={value:b,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},property:_},S={value:w,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},property:T},C={strict:!0,defaultSet:E,defaultType:"unknown",components:{vcard:D,vcard3:S,vevent:E,vtodo:E,vjournal:E,valarm:E,vtimezone:E,daylight:E,standard:E},icalendar:E,vcard:D,vcard3:S,getDesignSet:function(e){return e&&e in C.components?C.components[e]:C.defaultSet}};return C}(),t.stringify=function(){"use strict";var e="\r\n",n="unknown",r=t.design,i=t.helpers;function o(t){"string"==typeof t[0]&&(t=[t]);for(var n=0,r=t.length,i="";n0&&("version"!==t[1][0][0]||"4.0"!==t[1][0][3])&&(c="vcard3"),n=n||r.getDesignSet(c);l1)throw new i("invalid ical body. component began but did not end");return t=null,1==n.length?n[0]:n}i.prototype=Error.prototype,o.property=function(e,t){var r={component:[[],[]],designSet:t||n.defaultSet};return o._handleContentLine(e,r),r.component[1][0]},o.component=function(e){return o(e)},o.ParserError=i,o._handleContentLine=function(e,t){var r,s,a,l,u,c,d=e.indexOf(":"),h=e.indexOf(";"),f={};if(-1!==h&&-1!==d&&h>d&&(h=-1),-1!==h){if(a=e.substring(0,h).toLowerCase(),-1==(u=o._parseParameters(e.substring(h),0,t.designSet))[2])throw new i("Invalid parameters in '"+e+"'");if(f=u[0],r=u[1].length+u[2]+h,-1===(s=e.substring(r).indexOf(":")))throw new i("Missing parameter value in '"+e+"'");l=e.substring(r+s+1)}else{if(-1===d)throw new i('invalid line (no token ";" or ":") "'+e+'"');if(a=e.substring(0,d).toLowerCase(),l=e.substring(d+1),"begin"===a){var p=[l.toLowerCase(),[],[]];return 1===t.stack.length?t.component.push(p):t.component[2].push(p),t.stack.push(t.component),t.component=p,void(t.designSet||(t.designSet=n.getDesignSet(t.component[0])))}if("end"===a)return void(t.component=t.stack.pop())}var m,g,v=!1,y=!1;a in t.designSet.property&&("multiValue"in(m=t.designSet.property[a])&&(v=m.multiValue),"structuredValue"in m&&(y=m.structuredValue),l&&"detectType"in m&&(c=m.detectType(l))),c||(c="value"in f?f.value.toLowerCase():m?m.defaultType:"unknown"),delete f.value,v&&y?g=[a,f,c,l=o._parseMultiValue(l,y,c,[],v,t.designSet,y)]:v?(g=[a,f,c],o._parseMultiValue(l,v,c,g,null,t.designSet,!1)):g=y?[a,f,c,l=o._parseMultiValue(l,y,c,[],null,t.designSet,y)]:[a,f,c,l=o._parseValue(l,c,t.designSet,!1)],"vcard"!==t.component[0]||0!==t.component[1].length||"version"===a&&"4.0"===l||(t.designSet=n.getDesignSet("vcard3")),t.component[1].push(g)},o._parseValue=function(e,t,n,r){return t in n.value&&"fromICAL"in n.value[t]?n.value[t].fromICAL(e,r):e},o._parseParameters=function(e,t,n){for(var s,a,l,u,c,d,h=t,f=0,p={},m=-1;!1!==f&&-1!==(f=r.unescapedIndexOf(e,"=",f+1));){if(0==(s=e.substr(h+1,f-h-1)).length)throw new i("Empty parameter name in '"+e+"'");if(d=!1,c=!1,u=(a=s.toLowerCase())in n.param&&n.param[a].valueType?n.param[a].valueType:"text",a in n.param&&(c=n.param[a].multiValue,n.param[a].multiValueSeparateDQuote&&(d=o._rfc6868Escape('"'+c+'"'))),'"'===e[f+1]){if(m=f+2,f=r.unescapedIndexOf(e,'"',m),c&&-1!=f)for(var g=!0;g;)e[f+1]==c&&'"'==e[f+2]?f=r.unescapedIndexOf(e,'"',f+3):g=!1;if(-1===f)throw new i('invalid line (no matching double quote) "'+e+'"');l=e.substr(m,f-m),-1===(h=r.unescapedIndexOf(e,";",f))&&(f=!1)}else{m=f+1;var v=r.unescapedIndexOf(e,";",m),y=r.unescapedIndexOf(e,":",m);-1!==y&&v>y?(v=y,f=!1):-1===v?(v=-1===y?e.length:y,f=!1):(h=v,f=v),l=e.substr(m,v-m)}if(l=o._rfc6868Escape(l),c){var b=d||c;l=o._parseMultiValue(l,b,u,[],null,n)}else l=o._parseValue(l,u,n);c&&a in p?Array.isArray(p[a])?p[a].push(l):p[a]=[p[a],l]:p[a]=l}return[p,l,m]},o._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,(function(e){return s[e]}))};var s={"^'":'"',"^n":"\n","^^":"^"};return o._parseMultiValue=function(e,t,n,i,s,a,l){var u,c=0,d=0;if(0===t.length)return e;for(;-1!==(c=r.unescapedIndexOf(e,t,d));)u=e.substr(d,c-d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),d=c+t.length;return u=e.substr(d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),1==i.length?i[0]:i},o._eachLine=function(t,n){var r,i,o,s=t.length,a=t.search(e),l=a;do{o=(l=t.indexOf("\n",a)+1)>1&&"\r"===t[l-2]?2:1,0===l&&(l=s,o=0)," "===(i=t[a])||"\t"===i?r+=t.substr(a+1,l-a-(o+1)):(r&&n(null,r),r=t.substr(a,l-a-o)),a=l}while(l!==s);(r=r.trim()).length&&n(null,r)},o}(),t.Component=function(){"use strict";function e(e,t){"string"==typeof e&&(e=[e,[],[]]),this.jCal=e,this.parent=t||null}return e.prototype={_hydratedPropertyCount:0,_hydratedComponentCount:0,get name(){return this.jCal[0]},get _designSet(){return this.parent&&this.parent._designSet||t.design.getDesignSet(this.name)},_hydrateComponent:function(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];var n=new e(this.jCal[2][t],this);return this._hydratedComponentCount++,this._components[t]=n},_hydrateProperty:function(e){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[e])return this._properties[e];var n=new t.Property(this.jCal[1][e],this);return this._hydratedPropertyCount++,this._properties[e]=n},getFirstSubcomponent:function(e){if(e)for(var t=0,n=this.jCal[2],r=n.length;t=0;o--)n&&i[o][0]!==n||this._removeObjectByIndex(e,r,o)},addSubcomponent:function(e){this._components||(this._components=[],this._hydratedComponentCount=0),e.parent&&e.parent.removeSubcomponent(e);var t=this.jCal[2].push(e.jCal);return this._components[t-1]=e,this._hydratedComponentCount++,e.parent=this,e},removeSubcomponent:function(e){var t=this._removeObject(2,"_components",e);return t&&this._hydratedComponentCount--,t},removeAllSubcomponents:function(e){var t=this._removeAllObjects(2,"_components",e);return this._hydratedComponentCount=0,t},addProperty:function(e){if(!(e instanceof t.Property))throw new TypeError("must instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),e.parent&&e.parent.removeProperty(e);var n=this.jCal[1].push(e.jCal);return this._properties[n-1]=e,this._hydratedPropertyCount++,e.parent=this,e},addPropertyWithValue:function(e,n){var r=new t.Property(e);return r.setValue(n),this.addProperty(r),r},updatePropertyWithValue:function(e,t){var n=this.getFirstProperty(e);return n?n.setValue(t):n=this.addPropertyWithValue(e,t),n},removeProperty:function(e){var t=this._removeObject(1,"_properties",e);return t&&this._hydratedPropertyCount--,t},removeAllProperties:function(e){var t=this._removeAllObjects(1,"_properties",e);return this._hydratedPropertyCount=0,t},toJSON:function(){return this.jCal},toString:function(){return t.stringify.component(this.jCal,this._designSet)}},e.fromString=function(n){return new e(t.parse.component(n))},e}(),t.Property=function(){"use strict";var e=t.design;function n(t,n){this._parent=n||null,"string"==typeof t?(this.jCal=[t,{},e.defaultType],this.jCal[2]=this.getDefaultType()):this.jCal=t,this._updateType()}return n.prototype={get type(){return this.jCal[2]},get name(){return this.jCal[0]},get parent(){return this._parent},set parent(t){var n=!this._parent||t&&t._designSet!=this._parent._designSet;return this._parent=t,this.type==e.defaultType&&n&&(this.jCal[2]=this.getDefaultType(),this._updateType()),t},get _designSet(){return this.parent?this.parent._designSet:e.defaultSet},_updateType:function(){var e=this._designSet;if(this.type in e.value){e.value[this.type];"decorate"in e.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in e.property&&(this.isMultiValue="multiValue"in e.property[this.name],this.isStructuredValue="structuredValue"in e.property[this.name])}},_hydrateValue:function(e){return this._values&&this._values[e]?this._values[e]:this.jCal.length<=3+e?null:this.isDecorated?(this._values||(this._values=[]),this._values[e]=this._decorate(this.jCal[3+e])):this.jCal[3+e]},_decorate:function(e){return this._designSet.value[this.type].decorate(e,this)},_undecorate:function(e){return this._designSet.value[this.type].undecorate(e,this)},_setDecoratedValue:function(e,t){this._values||(this._values=[]),"object"==typeof e&&"icaltype"in e?(this.jCal[3+t]=this._undecorate(e),this._values[t]=e):(this.jCal[3+t]=e,this._values[t]=this._decorate(e))},getParameter:function(e){return e in this.jCal[1]?this.jCal[1][e]:void 0},getFirstParameter:function(e){var t=this.getParameter(e);return Array.isArray(t)?t[0]:t},setParameter:function(e,t){var n=e.toLowerCase();"string"==typeof t&&n in this._designSet.param&&"multiValue"in this._designSet.param[n]&&(t=[t]),this.jCal[1][e]=t},removeParameter:function(e){delete this.jCal[1][e]},getDefaultType:function(){var t=this.jCal[0],n=this._designSet;if(t in n.property){var r=n.property[t];if("defaultType"in r)return r.defaultType}return e.defaultType},resetType:function(e){this.removeAllValues(),this.jCal[2]=e,this._updateType()},getFirstValue:function(){return this._hydrateValue(0)},getValues:function(){var e=this.jCal.length-3;if(e<1)return[];for(var t=0,n=[];t0&&"object"==typeof e[0]&&"icaltype"in e[0]&&this.resetType(e[0].icaltype),this.isDecorated)for(;nn)-(n>t)},_normalize:function(){for(var e=this.toSeconds(),t=this.factor;e<-43200;)e+=97200;for(;e>50400;)e-=97200;this.fromSeconds(e),0==e&&(this.factor=t)},toICALString:function(){return t.design.icalendar.value["utc-offset"].toICAL(this.toString())},toString:function(){return(1==this.factor?"+":"-")+t.helpers.pad2(this.hours)+":"+t.helpers.pad2(this.minutes)}},e.fromString=function(e){var n={};return n.factor="+"===e[0]?1:-1,n.hours=t.helpers.strictParseInt(e.substr(1,2)),n.minutes=t.helpers.strictParseInt(e.substr(4,2)),new t.UtcOffset(n)},e.fromSeconds=function(t){var n=new e;return n.fromSeconds(t),n},e}(),t.Binary=function(){function e(e){this.value=e}return e.prototype={icaltype:"binary",decodeValue:function(){return this._b64_decode(this.value)},setEncodedValue:function(e){this.value=this._b64_encode(e)},_b64_encode:function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a>16&255,n=s>>8&255,r=255&s,c[u++]=64==i?String.fromCharCode(t):64==o?String.fromCharCode(t,n):String.fromCharCode(t,n,r)}while(ln)-(t=0?i=r:o=-1,-1==o&&-1!=i)break;if((r+=o)<0)return 0;if(r>=this.changes.length)break}var a=this.changes[i];if(a.utcOffset-a.prevUtcOffset<0&&i>0){var l=t.helpers.clone(a,!0);if(t.Timezone.adjust_change(l,0,0,0,l.prevUtcOffset),t.Timezone._compare_change_fn(n,l)<0){var u=this.changes[i-1];0!=a.is_daylight&&0==u.is_daylight&&(a=u)}}return a.utcOffset},_findNearbyChange:function(e){var n=t.helpers.binsearchInsert(this.changes,e,t.Timezone._compare_change_fn);return n>=this.changes.length?this.changes.length-1:n},_ensureCoverage:function(e){if(-1==t.Timezone._minimumExpansionYear){var n=t.Time.now();t.Timezone._minimumExpansionYear=n.year}var r=e;if(rt.Timezone.MAX_YEAR&&(r=t.Timezone.MAX_YEAR),!this.changes.length||this.expandedUntilYearn)&&h);)i.year=h.year,i.month=h.month,i.day=h.day,i.hour=h.hour,i.minute=h.minute,i.second=h.second,i.isDate=h.isDate,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}else(i=a()).year=o.year,i.month=o.month,i.day=o.day,i.hour=o.hour,i.minute=o.minute,i.second=o.second,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);return r},toString:function(){return this.tznames?this.tznames:this.tzid}},t.Timezone._compare_change_fn=function(e,t){return e.yeart.year?1:e.montht.month?1:e.dayt.day?1:e.hourt.hour?1:e.minutet.minute?1:e.secondt.second?1:0},t.Timezone.convert_time=function(e,n,r){if(e.isDate||n.tzid==r.tzid||n==t.Timezone.localTimezone||r==t.Timezone.localTimezone)return e.zone=r,e;var i=n.utcOffset(e);return e.adjust(0,0,0,-i),i=r.utcOffset(e),e.adjust(0,0,0,i),null},t.Timezone.fromData=function(e){return(new t.Timezone).fromData(e)},t.Timezone.utcTimezone=t.Timezone.fromData({tzid:"UTC"}),t.Timezone.localTimezone=t.Timezone.fromData({tzid:"floating"}),t.Timezone.adjust_change=function(e,n,r,i,o){return t.Time.prototype.adjust.call(e,n,r,i,o,e)},t.Timezone._minimumExpansionYear=-1,t.Timezone.MAX_YEAR=2035,t.Timezone.EXTRA_COVERAGE=5,t.TimezoneService=((i={get count(){return Object.keys(r).length},reset:function(){r=Object.create(null);var e=t.Timezone.utcTimezone;r.Z=e,r.UTC=e,r.GMT=e},has:function(e){return!!r[e]},get:function(e){return r[e]},register:function(e,n){if(e instanceof t.Component&&"vtimezone"===e.name&&(e=(n=new t.Timezone(e)).tzid),!(n instanceof t.Timezone))throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component");r[e]=n},remove:function(e){return delete r[e]}}).reset(),i),t.Time=function(e,t){this.wrappedJSObject=this;var n=this._time=Object.create(null);n.year=0,n.month=1,n.day=1,n.hour=0,n.minute=0,n.second=0,n.isDate=!1,this.fromData(e,t)},t.Time._dowCache={},t.Time._wnCache={},t.Time.prototype={icalclass:"icaltime",_cachedUnixTime:null,get icaltype(){return this.isDate?"date":"date-time"},zone:null,_pendingNormalization:!1,clone:function(){return new t.Time(this._time,this.zone)},reset:function(){this.fromData(t.Time.epochTime),this.zone=t.Timezone.utcTimezone},resetTo:function(e,t,n,r,i,o,s){this.fromData({year:e,month:t,day:n,hour:r,minute:i,second:o,zone:s})},fromJSDate:function(e,n){return e?n?(this.zone=t.Timezone.utcTimezone,this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()):(this.zone=t.Timezone.localTimezone,this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.hour=e.getHours(),this.minute=e.getMinutes(),this.second=e.getSeconds()):this.reset(),this._cachedUnixTime=null,this},fromData:function(e,n){if(e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if("icaltype"===r)continue;this[r]=e[r]}if(n&&(this.zone=n),e&&!("isDate"in e)?this.isDate=!("hour"in e):e&&"isDate"in e&&(this.isDate=e.isDate),e&&"timezone"in e){var i=t.TimezoneService.get(e.timezone);this.zone=i||t.Timezone.localTimezone}return e&&"zone"in e&&(this.zone=e.zone),this.zone||(this.zone=t.Timezone.localTimezone),this._cachedUnixTime=null,this},dayOfWeek:function(e){var n=e||t.Time.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+n;if(r in t.Time._dowCache)return t.Time._dowCache[r];var i=this.day,o=this.month+(this.month<3?12:0),s=this.year-(this.month<3?1:0),a=i+s+t.helpers.trunc(26*(o+1)/10)+t.helpers.trunc(s/4);return a=((a+=6*t.helpers.trunc(s/100)+t.helpers.trunc(s/400))+7-n)%7+1,t.Time._dowCache[r]=a,a},dayOfYear:function(){var e=t.Time.isLeapYear(this.year)?1:0;return t.Time.daysInYearPassedMonth[e][this.month-1]+this.day},startOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-n)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},endOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+n-t.Time.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},startOfMonth:function(){var e=this.clone();return e.day=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfMonth:function(){var e=this.clone();return e.day=t.Time.daysInMonth(e.month,e.year),e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startOfYear:function(){var e=this.clone();return e.day=1,e.month=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfYear:function(){var e=this.clone();return e.day=31,e.month=12,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startDoyWeek:function(e){var n=e||t.Time.SUNDAY,r=this.dayOfWeek()-n;return r<0&&(r+=7),this.dayOfYear()-r},getDominicalLetter:function(){return t.Time.getDominicalLetter(this.year)},nthWeekDay:function(e,n){var r,i=t.Time.daysInMonth(this.month,this.year),o=n,s=0,a=this.clone();if(o>=0){a.day=1,0!=o&&o--,s=a.day;var l=e-a.dayOfWeek();l<0&&(l+=7),s+=l,s-=e,r=e}else a.day=i,o++,(r=a.dayOfWeek()-e)<0&&(r+=7),r=i-r;return s+(r+=7*o)},isNthWeekDay:function(e,t){var n=this.dayOfWeek();return 0===t&&n===e||this.nthWeekDay(e,t)===this.day},weekNumber:function(e){var n,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(r in t.Time._wnCache)return t.Time._wnCache[r];var i=this.clone();i.isDate=!0;var o=this.year;12==i.month&&i.day>25?(n=t.Time.weekOneStarts(o+1,e),i.compare(n)<0?n=t.Time.weekOneStarts(o,e):o++):(n=t.Time.weekOneStarts(o,e),i.compare(n)<0&&(n=t.Time.weekOneStarts(--o,e)));var s=i.subtractDate(n).toSeconds()/86400,a=t.helpers.trunc(s/7)+1;return t.Time._wnCache[r]=a,a},addDuration:function(e){var t=e.isNegative?-1:1,n=this.second,r=this.minute,i=this.hour,o=this.day;n+=t*e.seconds,r+=t*e.minutes,i+=t*e.hours,o+=t*e.days,o+=7*t*e.weeks,this.second=n,this.minute=r,this.hour=i,this.day=o,this._cachedUnixTime=null},subtractDate:function(e){var n=this.toUnixTime()+this.utcOffset(),r=e.toUnixTime()+e.utcOffset();return t.Duration.fromSeconds(n-r)},subtractDateTz:function(e){var n=this.toUnixTime(),r=e.toUnixTime();return t.Duration.fromSeconds(n-r)},compare:function(e){var t=this.toUnixTime(),n=e.toUnixTime();return t>n?1:n>t?-1:0},compareDateOnlyTz:function(e,n){function r(e){return t.Time._cmp_attr(i,o,e)}var i=this.convertToZone(n),o=e.convertToZone(n),s=0;return 0!=(s=r("year"))||0!=(s=r("month"))||(s=r("day")),s},convertToZone:function(e){var n=this.clone(),r=this.zone.tzid==e.tzid;return this.isDate||r||t.Timezone.convert_time(n,this.zone,e),n.zone=e,n},utcOffset:function(){return this.zone==t.Timezone.localTimezone||this.zone==t.Timezone.utcTimezone?0:this.zone.utcOffset(this)},toICALString:function(){var e=this.toString();return e.length>10?t.design.icalendar.value["date-time"].toICAL(e):t.design.icalendar.value.date.toICAL(e)},toString:function(){var e=this.year+"-"+t.helpers.pad2(this.month)+"-"+t.helpers.pad2(this.day);return this.isDate||(e+="T"+t.helpers.pad2(this.hour)+":"+t.helpers.pad2(this.minute)+":"+t.helpers.pad2(this.second),this.zone===t.Timezone.utcTimezone&&(e+="Z")),e},toJSDate:function(){return this.zone==t.Timezone.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())},_normalize:function(){return this._time.isDate,this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this},adjust:function(e,n,r,i,o){var s,a,l,u,c,d,h,f=0,p=0,m=o||this._time;if(m.isDate||(l=m.second+i,m.second=l%60,s=t.helpers.trunc(l/60),m.second<0&&(m.second+=60,s--),u=m.minute+r+s,m.minute=u%60,a=t.helpers.trunc(u/60),m.minute<0&&(m.minute+=60,a--),c=m.hour+n+a,m.hour=c%24,f=t.helpers.trunc(c/24),m.hour<0&&(m.hour+=24,f--)),m.month>12?p=t.helpers.trunc((m.month-1)/12):m.month<1&&(p=t.helpers.trunc(m.month/12)-1),m.year+=p,m.month-=12*p,(d=m.day+e+f)>0)for(;!(d<=(h=t.Time.daysInMonth(m.month,m.year)));)m.month++,m.month>12&&(m.year++,m.month=1),d-=h;else for(;d<=0;)1==m.month?(m.year--,m.month=12):m.month--,d+=t.Time.daysInMonth(m.month,m.year);return m.day=d,this._cachedUnixTime=null,this},fromUnixTime:function(e){this.zone=t.Timezone.utcTimezone;var n=t.Time.epochTime.clone();n.adjust(0,0,0,e),this.year=n.year,this.month=n.month,this.day=n.day,this.hour=n.hour,this.minute=n.minute,this.second=Math.floor(n.second),this._cachedUnixTime=null},toUnixTime:function(){if(null!==this._cachedUnixTime)return this._cachedUnixTime;var e=this.utcOffset(),t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-e);return this._cachedUnixTime=t/1e3,this._cachedUnixTime},toJSON:function(){for(var e,t=["year","month","day","hour","minute","second","isDate"],n=Object.create(null),r=0,i=t.length;r12||(r=[0,31,28,31,30,31,30,31,31,30,31,30,31][e],2==e&&(r+=t.Time.isLeapYear(n))),r},t.Time.isLeapYear=function(e){return e<=1752?e%4==0:e%4==0&&e%100!=0||e%400==0},t.Time.fromDayOfYear=function(e,n){var r=n,i=e,o=new t.Time;o.auto_normalize=!1;var s=t.Time.isLeapYear(r)?1:0;if(i<1)return r--,s=t.Time.isLeapYear(r)?1:0,i+=t.Time.daysInYearPassedMonth[s][12],t.Time.fromDayOfYear(i,r);if(i>t.Time.daysInYearPassedMonth[s][12])return s=t.Time.isLeapYear(r)?1:0,i-=t.Time.daysInYearPassedMonth[s][12],r++,t.Time.fromDayOfYear(i,r);o.year=r,o.isDate=!0;for(var a=11;a>=0;a--)if(i>t.Time.daysInYearPassedMonth[s][a]){o.month=a+1,o.day=i-t.Time.daysInYearPassedMonth[s][a];break}return o.auto_normalize=!0,o},t.Time.fromStringv2=function(e){return new t.Time({year:parseInt(e.substr(0,4),10),month:parseInt(e.substr(5,2),10),day:parseInt(e.substr(8,2),10),isDate:!0})},t.Time.fromDateString=function(e){return new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),isDate:!0})},t.Time.fromDateTimeString=function(e,n){if(e.length<19)throw new Error('invalid date-time value: "'+e+'"');var r;return e[19]&&"Z"===e[19]?r="Z":n&&(r=n.getParameter("tzid")),new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),hour:t.helpers.strictParseInt(e.substr(11,2)),minute:t.helpers.strictParseInt(e.substr(14,2)),second:t.helpers.strictParseInt(e.substr(17,2)),timezone:r})},t.Time.fromString=function(e,n){return e.length>10?t.Time.fromDateTimeString(e,n):t.Time.fromDateString(e)},t.Time.fromJSDate=function(e,n){return(new t.Time).fromJSDate(e,n)},t.Time.fromData=function(e,n){return(new t.Time).fromData(e,n)},t.Time.now=function(){return t.Time.fromJSDate(new Date,!1)},t.Time.weekOneStarts=function(e,n){var r=t.Time.fromData({year:e,month:1,day:1,isDate:!0}),i=r.dayOfWeek(),o=n||t.Time.DEFAULT_WEEK_START;return i>t.Time.THURSDAY&&(r.day+=7),o>t.Time.THURSDAY&&(r.day-=7),r.day-=i-o,r},t.Time.getDominicalLetter=function(e){var n="GFEDCBA",r=(e+(e/4|0)+(e/400|0)-(e/100|0)-1)%7;return t.Time.isLeapYear(e)?n[(r+6)%7]+n[r]:n[r]},t.Time.epochTime=t.Time.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"}),t.Time._cmp_attr=function(e,t,n){return e[n]>t[n]?1:e[n]4?r(u,f?1:3,2):null,second:4==d?r(u,2,2):6==d?r(u,4,2):8==d?r(u,6,2):null};return l="Z"==l?t.Timezone.utcTimezone:l&&":"==l[3]?t.UtcOffset.fromString(l):null,new t.VCardTime(p,l,n)},function(){var e={SU:t.Time.SUNDAY,MO:t.Time.MONDAY,TU:t.Time.TUESDAY,WE:t.Time.WEDNESDAY,TH:t.Time.THURSDAY,FR:t.Time.FRIDAY,SA:t.Time.SATURDAY},n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);function i(e,n,r,i){var o=i;if("+"===i[0]&&(o=i.substr(1)),o=t.helpers.strictParseInt(o),void 0!==n&&i '+n);if(void 0!==r&&i>r)throw new Error(e+': invalid value "'+i+'" must be < '+n);return o}t.Recur=function(e){this.wrappedJSObject=this,this.parts={},e&&"object"==typeof e&&this.fromData(e)},t.Recur.prototype={parts:null,interval:1,wkst:t.Time.MONDAY,until:null,count:null,freq:null,icalclass:"icalrecur",icaltype:"recur",iterator:function(e){return new t.RecurIterator({rule:this,dtstart:e})},clone:function(){return new t.Recur(this.toJSON())},isFinite:function(){return!(!this.count&&!this.until)},isByCount:function(){return!(!this.count||this.until)},addComponent:function(e,t){var n=e.toUpperCase();n in this.parts?this.parts[n].push(t):this.parts[n]=[t]},setComponent:function(e,t){this.parts[e.toUpperCase()]=t.slice()},getComponent:function(e){var t=e.toUpperCase();return t in this.parts?this.parts[t].slice():[]},getNextOccurrence:function(e,t){var n,r=this.iterator(e);do{n=r.next()}while(n&&n.compare(t)<=0);return n&&t.zone&&(n.zone=t.zone),n},fromData:function(e){for(var n in e){var r=n.toUpperCase();r in u?Array.isArray(e[n])?this.parts[r]=e[n]:this.parts[r]=[e[n]]:this[n]=e[n]}this.interval&&"number"!=typeof this.interval&&l.INTERVAL(this.interval,this),this.wkst&&"number"!=typeof this.wkst&&(this.wkst=t.Recur.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof t.Time||(this.until=t.Time.fromString(this.until))},toJSON:function(){var e=Object.create(null);for(var n in e.freq=this.freq,this.count&&(e.count=this.count),this.interval>1&&(e.interval=this.interval),this.parts)if(this.parts.hasOwnProperty(n)){var r=this.parts[n];Array.isArray(r)&&1==r.length?e[n.toLowerCase()]=r[0]:e[n.toLowerCase()]=t.helpers.clone(this.parts[n])}return this.until&&(e.until=this.until.toString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e.wkst=t.Recur.numericDayToIcalDay(this.wkst)),e},toString:function(){var e="FREQ="+this.freq;for(var n in this.count&&(e+=";COUNT="+this.count),this.interval>1&&(e+=";INTERVAL="+this.interval),this.parts)this.parts.hasOwnProperty(n)&&(e+=";"+n+"="+this.parts[n]);return this.until&&(e+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e+=";WKST="+t.Recur.numericDayToIcalDay(this.wkst)),e}},t.Recur.icalDayToNumericDay=function(n,r){var i=r||t.Time.SUNDAY;return(e[n]-i+7)%7+1},t.Recur.numericDayToIcalDay=function(e,r){var i=e+(r||t.Time.SUNDAY)-t.Time.SUNDAY;return i>7&&(i-=7),n[i]};var o=/^(SU|MO|TU|WE|TH|FR|SA)$/,s=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,a=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"],l={FREQ:function(e,t,n){if(-1===a.indexOf(e))throw new Error('invalid frequency "'+e+'" expected: "'+a.join(", ")+'"');t.freq=e},COUNT:function(e,n,r){n.count=t.helpers.strictParseInt(e)},INTERVAL:function(e,n,r){n.interval=t.helpers.strictParseInt(e),n.interval<1&&(n.interval=1)},UNTIL:function(e,n,r){e.length>10?n.until=t.design.icalendar.value["date-time"].fromICAL(e):n.until=t.design.icalendar.value.date.fromICAL(e),r||(n.until=t.Time.fromString(n.until))},WKST:function(e,n,r){if(!o.test(e))throw new Error('invalid WKST value "'+e+'"');n.wkst=t.Recur.icalDayToNumericDay(e)}},u={BYSECOND:i.bind(this,"BYSECOND",0,60),BYMINUTE:i.bind(this,"BYMINUTE",0,59),BYHOUR:i.bind(this,"BYHOUR",0,23),BYDAY:function(e){if(s.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:i.bind(this,"BYMONTHDAY",-31,31),BYYEARDAY:i.bind(this,"BYYEARDAY",-366,366),BYWEEKNO:i.bind(this,"BYWEEKNO",-53,53),BYMONTH:i.bind(this,"BYMONTH",1,12),BYSETPOS:i.bind(this,"BYSETPOS",-366,366)};t.Recur.fromString=function(e){var n=t.Recur._stringToData(e,!1);return new t.Recur(n)},t.Recur.fromData=function(e){return new t.Recur(e)},t.Recur._stringToData=function(e,t){for(var n=Object.create(null),r=e.split(";"),i=r.length,o=0;o=0||r<0)&&(this.last.day+=r)}else{var i=t.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek());e.BYDAY=[i]}if("YEARLY"==this.rule.freq){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if("MONTHLY"==this.rule.freq&&this.has_by_data("BYDAY")){var o=null,s=this.last.clone(),a=t.Time.daysInMonth(this.last.month,this.last.year);for(var l in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(l)){this.last=s.clone();n=(u=this.ruleDayOfWeek(this.by_data.BYDAY[l]))[0];var u,c=u[1],d=this.last.nthWeekDay(c,n);if(n>=6||n<=-6)throw new Error("Malformed values in BYDAY part");if(d>a||d<=0){if(o&&o.month==s.month)continue;for(;d>a||d<=0;)this.increment_month(),a=t.Time.daysInMonth(this.last.month,this.last.year),d=this.last.nthWeekDay(c,n)}this.last.day=d,(!o||this.last.compare(o)<0)&&(o=this.last.clone())}if(this.last=o.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>a||0==this.last.day)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")&&this.last.day<0){a=t.Time.daysInMonth(this.last.month,this.last.year);this.last.day=a+this.last.day+1}},next:function(){var e,t=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(0==this.occurrence_number&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do{switch(e=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":e=this.next_month();break;case"YEARLY":this.next_year();break;default:return null}}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!e);if(0==this.last.compare(t))throw new Error("Same occurrence found twice, protecting you from death by recursion");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)},next_second:function(){return this.next_generic("BYSECOND","SECONDLY","second","minute")},increment_second:function(e){return this.increment_generic(e,"second",60,"minute")},next_minute:function(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")},increment_minute:function(e){return this.increment_generic(e,"minute",60,"hour")},next_hour:function(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")},increment_hour:function(e){this.increment_generic(e,"hour",24,"monthday")},next_day:function(){this.by_data;var e="DAILY"==this.rule.freq;return 0==this.next_hour()||(e?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0},next_week:function(){var e=0;if(0==this.next_weekday_by_week())return e;if(this.has_by_data("BYWEEKNO")){++this.by_indices.BYWEEKNO;this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,e=1),this.last.month=1,this.last.day=1;var t=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*t,e&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return e},normalizeByMonthDayRules:function(e,n,r){for(var i,o=t.Time.daysInMonth(n,e),s=[],a=0,l=r.length;ao)){if(i<0)i=o+(i+1);else if(0===i)continue;-1===s.indexOf(i)&&s.push(i)}return s.sort((function(e,t){return e-t}))},_byDayAndMonthDay:function(e){var n,r,i,o,s=this.by_data.BYDAY,a=0,l=s.length,u=0,c=this,d=this.last.day;function h(){for(o=t.Time.daysInMonth(c.last.month,c.last.year),n=c.normalizeByMonthDayRules(c.last.year,c.last.month,c.by_data.BYMONTHDAY),i=n.length;n[a]<=d&&(!e||n[a]!=d)&&ao)f();else{var m=n[a++];if(m>=r){d=m;for(var g=0;gn&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data("BYSETPOS")&&!this.check_set_position(1)||(e=1):e=0)}else if(this.has_by_data("BYMONTHDAY")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());n=t.Time.daysInMonth(this.last.month,this.last.year);(s=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY])<0&&(s=n+s+1),s>n?(this.last.day=1,e=this.is_day_in_byday(this.last)):this.last.day=s}else{this.increment_month();n=t.Time.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>n?e=0:this.last.day=this.by_data.BYMONTHDAY[0]}return e},next_weekday_by_week:function(){var e=0;if(0==this.next_hour())return e;if(!this.has_by_data("BYDAY"))return 1;for(;;){var n=new t.Time;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,e=1);var r=this.by_data.BYDAY[this.by_indices.BYDAY],i=this.ruleDayOfWeek(r)[1];(i-=this.rule.wkst)<0&&(i+=7),n.year=this.last.year,n.month=this.last.month,n.day=this.last.day;var o=n.startDoyWeek(this.rule.wkst);if(!(i+o<1)||e){var s=t.Time.fromDayOfYear(o+i,this.last.year);return this.last.year=s.year,this.last.month=s.month,this.last.day=s.day,e}}},next_year:function(){if(0==this.next_hour())return 0;if(++this.days_index==this.days.length){this.days_index=0;do{this.increment_year(this.rule.interval),this.expand_year_days(this.last.year)}while(0==this.days.length)}return this._nextByYearDay(),1},_nextByYearDay:function(){var e=this.days[this.days_index],n=this.last.year;e<1&&(e+=1,n+=1);var r=t.Time.fromDayOfYear(e,n);this.last.day=r.day,this.last.month=r.month},ruleDayOfWeek:function(e,n){var r=e.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);return r?[parseInt(r[1]||0,10),e=t.Recur.icalDayToNumericDay(r[2],n)]:[0,0]},next_generic:function(e,t,n,r,i){var o=e in this.by_data,s=this.rule.freq==t,a=0;if(i&&0==this[i]())return a;if(o){this.by_indices[e]++;this.by_indices[e];var l=this.by_data[e];this.by_indices[e]==l.length&&(this.by_indices[e]=0,a=1),this.last[n]=l[this.by_indices[e]]}else s&&this["increment_"+n](this.rule.interval);return o&&a&&s&&this["increment_"+r](1),a},increment_monthday:function(e){for(var n=0;nr&&(this.last.day-=r,this.increment_month())}},increment_month:function(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{"MONTHLY"==this.rule.freq?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;var e=t.helpers.trunc(this.last.month/12);this.last.month%=12,this.last.month++,0!=e&&this.increment_year(e)}},increment_year:function(e){this.last.year+=e},increment_generic:function(e,n,r,i){this.last[n]+=e;var o=t.helpers.trunc(this.last[n]/r);this.last[n]%=r,0!=o&&this["increment_"+i](o)},has_by_data:function(e){return e in this.rule.parts},expand_year_days:function(e){var n=new t.Time;this.days=[];var r={},i=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s in this.rule.parts&&(r[s]=this.rule.parts[s])}if("BYMONTH"in r&&"BYWEEKNO"in r){var a=1,l={};n.year=e,n.isDate=!0;for(var u=0;u0?(M=P+7*(R-1))<=w&&this.days.push(D+M):(M=L+7*(R+1))>0&&this.days.push(D+M)}}this.days.sort((function(e,t){return e-t}))}else if(2==p&&"BYDAY"in r&&"BYMONTHDAY"in r){var H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y];var z=t.Time.fromDayOfYear(k,e);this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(k)}}else if(3==p&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y],z=t.Time.fromDayOfYear(k,e);this.by_data.BYMONTH.indexOf(z.month)>=0&&this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(k)}}else if(2==p&&"BYDAY"in r&&"BYWEEKNO"in r){H=this.expand_by_day(e);for(var Y in H)if(H.hasOwnProperty(Y)){k=H[Y];var V=(z=t.Time.fromDayOfYear(k,e)).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(V)&&this.days.push(k)}}else 3==p&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r||(this.days=1==p&&"BYYEARDAY"in r?this.days.concat(this.by_data.BYYEARDAY):[]);return 0},expand_by_day:function(e){var t=[],n=this.last.clone();n.year=e,n.month=1,n.day=1,n.isDate=!0;var r=n.dayOfWeek();n.month=12,n.day=31,n.isDate=!0;var i=n.dayOfWeek(),o=n.dayOfYear();for(var s in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(s)){var a=this.by_data.BYDAY[s],l=this.ruleDayOfWeek(a),u=l[0],c=l[1];if(0==u)for(var d=(c+7-r)%7+1;d<=o;d+=7)t.push(d);else if(u>0){var h;h=c>=r?c-r+1:c-r+8,t.push(h+7*(u-1))}else{var f;u=-u,f=c<=i?o-i+c:o-i+c-7,t.push(f-7*(u-1))}}return t},is_day_in_byday:function(e){for(var t in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(t)){var n=this.by_data.BYDAY[t],r=this.ruleDayOfWeek(n),i=r[0],o=r[1],s=e.dayOfWeek();if(0==i&&o==s||e.nthWeekDay(o,i)==e.day)return 1}return 0},check_set_position:function(e){return!!this.has_by_data("BYSETPOS")&&-1!==this.by_data.BYSETPOS.indexOf(e)},sort_byday_rules:function(e){for(var t=0;tthis.ruleDayOfWeek(e[t],this.rule.wkst)[1]){var r=e[t];e[t]=e[n],e[n]=r}}},check_contract_restriction:function(t,n){var r=e._indexMap[t],i=e._expandMap[this.rule.freq][r],o=!1;if(t in this.by_data&&i==e.CONTRACT){var s=this.by_data[t];for(var a in s)if(s.hasOwnProperty(a)&&s[a]==n){o=!0;break}}else o=!0;return o},check_contracting_rules:function(){var e=this.last.dayOfWeek(),n=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",t.Recur.numericDayToIcalDay(e))&&this.check_contract_restriction("BYWEEKNO",n)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)},setup_defaults:function(t,n,r){var i=e._indexMap[t];return e._expandMap[this.rule.freq][i]!=e.CONTRACT&&(t in this.by_data||(this.by_data[t]=[r]),this.rule.freq!=n)?this.by_data[t][0]:r},toJSON:function(){var e=Object.create(null);return e.initialized=this.initialized,e.rule=this.rule.toJSON(),e.dtstart=this.dtstart.toJSON(),e.by_data=this.by_data,e.days=this.days,e.last=this.last.toJSON(),e.by_indices=this.by_indices,e.occurrence_number=this.occurrence_number,e}},e._indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8},e._expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]},e.UNKNOWN=0,e.CONTRACT=1,e.EXPAND=2,e.ILLEGAL=3,e}(),t.RecurExpansion=function(){function e(e){return t.helpers.formatClassType(e,t.Time)}function n(e,t){return e.compare(t)}function r(e){this.ruleDates=[],this.exDates=[],this.fromData(e)}return r.prototype={complete:!1,ruleIterators:null,ruleDates:null,exDates:null,ruleDateInc:0,exDateInc:0,exDate:null,ruleDate:null,dtstart:null,last:null,fromData:function(n){var r=t.helpers.formatClassType(n.dtstart,t.Time);if(!r)throw new Error(".dtstart (ICAL.Time) must be given");if(this.dtstart=r,n.component)this._init(n.component);else{if(this.last=e(n.last)||r.clone(),!n.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=n.ruleIterators.map((function(e){return t.helpers.formatClassType(e,t.RecurIterator)})),this.ruleDateInc=n.ruleDateInc,this.exDateInc=n.exDateInc,n.ruleDates&&(this.ruleDates=n.ruleDates.map(e),this.ruleDate=this.ruleDates[this.ruleDateInc]),n.exDates&&(this.exDates=n.exDates.map(e),this.exDate=this.exDates[this.exDateInc]),void 0!==n.complete&&(this.complete=n.complete)}},next:function(){for(var e,t,n,r=0;;){if(r++>500)throw new Error("max tries have occured, rule may be impossible to forfill.");if(t=this.ruleDate,e=this._nextRecurrenceIter(this.last),!t&&!e){this.complete=!0;break}if((!t||e&&t.compare(e.last)>0)&&(t=e.last.clone(),e.next()),this.ruleDate===t&&this._nextRuleDay(),this.last=t,!this.exDate||((n=this.exDate.compare(this.last))<0&&this._nextExDay(),0!==n))return this.last;this._nextExDay()}},toJSON:function(){function e(e){return e.toJSON()}var t=Object.create(null);return t.ruleIterators=this.ruleIterators.map(e),this.ruleDates&&(t.ruleDates=this.ruleDates.map(e)),this.exDates&&(t.exDates=this.exDates.map(e)),t.ruleDateInc=this.ruleDateInc,t.exDateInc=this.exDateInc,t.last=this.last.toJSON(),t.dtstart=this.dtstart.toJSON(),t.complete=this.complete,t},_extractDates:function(e,r){function i(e){o=t.helpers.binsearchInsert(s,e,n),s.splice(o,0,e)}for(var o,s=[],a=e.getAllProperties(r),l=a.length,u=0;u0)&&(r=t);return r}},r}(),t.Event=function(){function e(e,n){e instanceof t.Component||(n=e,e=null),this.component=e||new t.Component("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],n&&n.strictExceptions&&(this.strictExceptions=n.strictExceptions),n&&n.exceptions?n.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach((function(e){e.hasProperty("recurrence-id")&&this.relateException(e)}),this)}function n(e,t){return e[0]>t[0]?1:t[0]>e[0]?-1:0}return e.prototype={THISANDFUTURE:"THISANDFUTURE",exceptions:null,strictExceptions:!1,relateException:function(e){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(e instanceof t.Component&&(e=new t.Event(e)),this.strictExceptions&&e.uid!==this.uid)throw new Error("attempted to relate unrelated exception");var r=e.recurrenceId.toString();if(this.exceptions[r]=e,e.modifiesFuture()){var i=[e.recurrenceId.toUnixTime(),r],o=t.helpers.binsearchInsert(this.rangeExceptions,i,n);this.rangeExceptions.splice(o,0,i)}},modifiesFuture:function(){return!!this.component.hasProperty("recurrence-id")&&this.component.getFirstProperty("recurrence-id").getParameter("range")===this.THISANDFUTURE},findRangeException:function(e){if(!this.rangeExceptions.length)return null;var r=e.toUnixTime(),i=t.helpers.binsearchInsert(this.rangeExceptions,[r],n);if((i-=1)<0)return null;var o=this.rangeExceptions[i];return r=0?h:1e3+h,(Je({year:i,month:o,day:s,hour:24===l?0:l,minute:u,second:c,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let j={};let B={};function F(e,t={}){const n=JSON.stringify([e,t]);let r=B[n];return r||(r=new Intl.DateTimeFormat(e,t),B[n]=r),r}let q={};let Z={};let G=null;let $={};function K(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class X{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=q[n];return r||(r=new Intl.NumberFormat(e,t),q[n]=r),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Be(this.floor?Math.floor(e):Ge(e,3),this.padTo)}}class J{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=F(t,i)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Q{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ye()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=Z[i];return o||(o=new Intl.RelativeTimeFormat(e,t),Z[i]=o),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,u=i[e],c=r?l?u[1]:u[2]||u[1]:l?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ee={firstDay:1,minimalDays:4,weekend:[6,7]};class te{static fromOpts(e){return te.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||be.defaultLocale,s=o||(i?"en-US":G||(G=(new Intl.DateTimeFormat).resolvedOptions().locale,G)),a=t||be.defaultNumberingSystem,l=n||be.defaultOutputCalendar,u=Ue(r)||be.defaultWeekSettings;return new te(s,a,l,u,o)}static resetCache(){G=null,B={},q={},Z={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return te.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=F(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=F(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?te.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ue(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return K(this,e,dt,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=mr.utc(2009,n,1);t.push(e(r))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[r][e]}))}weekdays(e,t=!1){return K(this,e,mt,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=mr.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return K(this,void 0,(()=>gt),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[mr.utc(2016,11,13,9),mr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return K(this,e,_t,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[mr.utc(-40,1,1),mr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(e={}){return new X(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new J(e,this.intl,t)}relFormatter(e={}){return new Q(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=j[n];return r||(r=new Intl.ListFormat(e,t),j[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ze()?function(e){let t=$[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,$[e]=t}return t}(this.locale):ee}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ne=null;class re extends L{static get utcInstance(){return null===ne&&(ne=new re(0)),ne}static instance(e){return 0===e?re.utcInstance:new re(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new re(rt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${st(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${st(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return st(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ie extends L{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function oe(e,t){if(Pe(e)||null===e)return t;if(e instanceof L)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Y.instance:"utc"===n||"gmt"===n?re.utcInstance:re.parseSpecifier(n)||U.create(e)}return Le(e)?re.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ie(e)}const se={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ae={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},le=se.hanidec.replace(/[\[|\]]/g,"").split("");let ue={};function ce({numberingSystem:e},t=""){const n=e||"latn";return ue[n]||(ue[n]={}),ue[n][t]||(ue[n][t]=new RegExp(`${se[n]}${t}`)),ue[n][t]}let de,he=()=>Date.now(),fe="system",pe=null,me=null,ge=null,ve=60,ye=null;class be{static get now(){return he}static set now(e){he=e}static set defaultZone(e){fe=e}static get defaultZone(){return oe(fe,Y.instance)}static get defaultLocale(){return pe}static set defaultLocale(e){pe=e}static get defaultNumberingSystem(){return me}static set defaultNumberingSystem(e){me=e}static get defaultOutputCalendar(){return ge}static set defaultOutputCalendar(e){ge=e}static get defaultWeekSettings(){return ye}static set defaultWeekSettings(e){ye=Ue(e)}static get twoDigitCutoffYear(){return ve}static set twoDigitCutoffYear(e){ve=e%100}static get throwOnInvalid(){return de}static set throwOnInvalid(e){de=e}static resetCaches(){te.resetCache(),U.resetCache(),mr.resetCache(),ue={}}}class _e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const we=[0,31,59,90,120,151,181,212,243,273,304,334],Te=[0,31,60,91,121,152,182,213,244,274,305,335];function Ee(e,t){return new _e("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function De(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function Se(e,t,n){return n+($e(e)?Te:we)[t-1]}function Ce(e,t){const n=$e(e)?Te:we,r=n.findIndex((e=>eet(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:a,...at(e)}}function Oe(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=ke(De(r,1,t),n),a=Ke(r);let l,u=7*i+o-s-7+t;u<1?(l=r-1,u+=Ke(l)):u>a?(l=r+1,u-=Ke(r)):l=r;const{month:c,day:d}=Ce(l,u);return{year:l,month:c,day:d,...at(e)}}function Me(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Se(t,n,r),...at(e)}}function Ae(e){const{year:t,ordinal:n}=e,{month:r,day:i}=Ce(t,n);return{year:t,month:r,day:i,...at(e)}}function Ie(e,t){if(!Pe(e.localWeekday)||!Pe(e.localWeekNumber)||!Pe(e.localWeekYear)){if(!Pe(e.weekday)||!Pe(e.weekNumber)||!Pe(e.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Pe(e.localWeekday)||(e.weekday=e.localWeekday),Pe(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Pe(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Re(e){const t=He(e.year),n=je(e.month,1,12),r=je(e.day,1,Xe(e.year,e.month));return t?n?!r&&Ee("day",e.day):Ee("month",e.month):Ee("year",e.year)}function Ne(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=je(t,0,23)||24===t&&0===n&&0===r&&0===i,s=je(n,0,59),a=je(r,0,59),l=je(i,0,999);return o?s?a?!l&&Ee("millisecond",i):Ee("second",r):Ee("minute",n):Ee("hour",t)}function Pe(e){return void 0===e}function Le(e){return"number"==typeof e}function He(e){return"number"==typeof e&&e%1==0}function Ye(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ve(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function We(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!je(e.firstDay,1,7)||!je(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!je(e,1,7))))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function je(e,t,n){return He(e)&&e>=t&&e<=n}function Be(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Fe(e){return Pe(e)||null===e||""===e?void 0:parseInt(e,10)}function qe(e){return Pe(e)||null===e||""===e?void 0:parseFloat(e)}function Ze(e){if(!Pe(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ge(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function $e(e){return e%4==0&&(e%100!=0||e%400==0)}function Ke(e){return $e(e)?366:365}function Xe(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?$e(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Je(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Qe(e,t,n){return-ke(De(e,1,t),n)+t-1}function et(e,t=4,n=1){const r=Qe(e,t,n),i=Qe(e+1,t,n);return(Ke(e)-r+i)/7}function tt(e){return e>99?e:e>be.twoDigitCutoffYear?1900+e:2e3+e}function nt(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find((e=>"timezonename"===e.type.toLowerCase()));return a?a.value:null}function rt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function it(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new u(`Invalid unit value ${e}`);return t}function ot(e,t){const n={};for(const r in e)if(We(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=it(i)}return n}function st(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${Be(n,2)}:${Be(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Be(n,2)}${Be(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function at(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ct=["J","F","M","A","M","J","J","A","S","O","N","D"];function dt(e){switch(e){case"narrow":return[...ct];case"short":return[...ut];case"long":return[...lt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ht=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ft=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],pt=["M","T","W","T","F","S","S"];function mt(e){switch(e){case"narrow":return[...pt];case"short":return[...ft];case"long":return[...ht];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gt=["AM","PM"],vt=["Before Christ","Anno Domini"],yt=["BC","AD"],bt=["B","A"];function _t(e){switch(e){case"narrow":return[...bt];case"short":return[...yt];case"long":return[...vt];default:return null}}function wt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Tt={D:p,DD:m,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:T,T:E,TT:D,TTT:S,TTTT:C,f:k,ff:O,fff:I,ffff:N,F:x,FF:M,FFF:R,FFFF:P};class Et{static create(e,t={}){return new Et(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0&&i.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Tt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Be(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=()=>n?function(e){return gt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,r)=>n?function(e,t){return dt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return mt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Et.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return _t(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return wt(Et.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=Et.parseFormat(t),i=r.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]);return wt(r,(e=>t=>{const r=n(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...i.map(n).filter((e=>e)))))}}const Dt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function St(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function Ct(...e){return t=>e.reduce((([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]}),[{},null,1]).slice(0,2)}function kt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function xt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:h(qe(n)),months:h(qe(r)),weeks:h(qe(i)),days:h(qe(o)),hours:h(qe(s)),minutes:h(qe(a)),seconds:h(qe(l),"-0"===l),milliseconds:h(Ze(u),d)}]}const Bt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ft(e,t,n,r,i,o,s){const a={year:2===t.length?tt(Fe(t)):Fe(t),month:ut.indexOf(n)+1,day:Fe(r),hour:Fe(i),minute:Fe(o)};return s&&(a.second=Fe(s)),e&&(a.weekday=e.length>3?ht.indexOf(e)+1:ft.indexOf(e)+1),a}const qt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Zt(e){const[,t,n,r,i,o,s,a,l,u,c,d]=e,h=Ft(t,i,r,n,o,s,a);let f;return f=l?Bt[l]:u?0:rt(c,d),[h,new re(f)]}const Gt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$t=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Xt(e){const[,t,n,r,i,o,s,a]=e;return[Ft(t,i,r,n,o,s,a),re.utcInstance]}function Jt(e){const[,t,n,r,i,o,s,a]=e;return[Ft(t,a,n,r,i,o,s),re.utcInstance]}const Qt=St(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,It),en=St(/(\d{4})-?W(\d\d)(?:-?(\d))?/,It),tn=St(/(\d{4})-?(\d{3})/,It),nn=St(At),rn=Ct((function(e,t){return[{year:Ht(e,t),month:Ht(e,t+1,1),day:Ht(e,t+2,1)},null,t+3]}),Yt,zt,Vt),on=Ct(Rt,Yt,zt,Vt),sn=Ct(Nt,Yt,zt,Vt),an=Ct(Yt,zt,Vt);const ln=Ct(Yt);const un=St(/(\d{4})-(\d\d)-(\d\d)/,Lt),cn=St(Pt),dn=Ct(Yt,zt,Vt);const hn="Invalid Duration",fn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},pn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...fn},mn=365.2425,gn=30.436875,vn={years:{quarters:4,months:12,weeks:52.1775,days:mn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...fn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bn=yn.slice(0).reverse();function _n(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new En(r)}function wn(e,t){let n=t.milliseconds??0;for(const r of bn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Tn(e,t){const n=wn(e,t)<0?-1:1;yn.reduceRight(((r,i)=>{if(Pe(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i}),null),yn.reduce(((n,r)=>{if(Pe(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r}),null)}class En{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?vn:pn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||te.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return En.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new En({values:ot(e,En.normalizeUnit),loc:te.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Le(e))return En.fromMillis(e);if(En.isDuration(e))return e;if("object"==typeof e)return En.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return kt(e,[Ut,jt])}(e);return n?En.fromObject(n,t):En.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return kt(e,[Wt,ln])}(e);return n?En.fromObject(n,t):En.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof _e?e:new _e(e,t);if(be.throwOnInvalid)throw new s(n);return new En({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new l(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Et.create(this.loc,n).formatDurationFromString(this,e):hn}toHuman(e={}){if(!this.isValid)return hn;const t=yn.map((t=>{const n=this.values[t];return Pe(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ge(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return mr.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=En.fromDurationLike(e),n={};for(const e of yn)(We(t.values,e)||We(this.values,e))&&(n[e]=t.get(e)+this.get(e));return _n(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=En.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=it(e(this.values[n],n));return _n(this,{values:t},!0)}get(e){return this[En.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return _n(this,{values:{...this.values,...ot(e,En.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return _n(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Tn(this.matrix,e),_n(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return _n(this,{values:function(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>En.normalizeUnit(e)));const t={},n={},r=this.toObject();let i;for(const o of yn)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;Le(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else Le(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return Tn(this.matrix,t),_n(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return _n(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of yn)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const Dn="Invalid Interval";class Sn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof _e?e:new _e(e,t);if(be.throwOnInvalid)throw new o(n);return new Sn({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Sn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(gr).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(Sn.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=En.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i)));n=+e>+this.e?this.e:e,o.push(Sn.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:Sn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Sn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),o=Array.prototype.concat(...i).sort(((e,t)=>e.time-t.time));for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&r.push(Sn.fromDateTimes(t,e.time)),t=null);return Sn.merge(r)}difference(...e){return Sn.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Dn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=p,t={}){return this.isValid?Et.create(this.s.loc.clone(t),e).formatInterval(this):Dn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Dn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Dn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Dn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Dn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):En.invalid(this.invalidReason)}mapEndpoints(e){return Sn.fromDateTimes(e(this.s),e(this.e))}}class Cn{static hasDST(e=be.defaultZone){const t=mr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return oe(e,be.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||te.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||te.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||te.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||te.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return te.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return te.create(t,null,"gregory").eras(e)}static features(){return{relative:Ye(),localeWeek:ze()}}}function kn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(En.fromMillis(r).as("days"))}function xn(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=kn(e,t);return(n-n%7)/7}],["days",kn]],i={},o=e;let s,a;for(const[l,u]of r)n.indexOf(l)>=0&&(s=l,i[l]=u(e,t),a=o.plus(i),a>t?(i[l]--,(e=o.plus(i))>t&&(a=e,i[l]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const l=t-i,u=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(s0?En.fromMillis(l,r).shiftTo(...u).plus(c):c}function On(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Mn=`[ ${String.fromCharCode(160)}]`,An=new RegExp(Mn,"g");function In(e){return e.replace(/\./g,"\\.?").replace(An,Mn)}function Rn(e){return e.replace(/\./g,"").replace(An," ").toLowerCase()}function Nn(e,t){return null===e?null:{regex:RegExp(e.map(In).join("|")),deser:([n])=>e.findIndex((e=>Rn(n)===Rn(e)))+t}}function Pn(e,t){return{regex:e,deser:([,e,t])=>rt(e,t),groups:t}}function Ln(e){return{regex:e,deser:([e])=>e}}const Hn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Yn=null;function zn(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=Un(Et.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class Vn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zn(Et.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=ce(t),r=ce(t,"{2}"),i=ce(t,"{3}"),o=ce(t,"{4}"),s=ce(t,"{6}"),a=ce(t,"{1,2}"),l=ce(t,"{1,3}"),u=ce(t,"{1,6}"),c=ce(t,"{1,9}"),d=ce(t,"{2,4}"),h=ce(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Nn(t.eras("short"),0);case"GG":return Nn(t.eras("long"),0);case"y":return On(u);case"yy":case"kk":return On(d,tt);case"yyyy":case"kkkk":return On(o);case"yyyyy":return On(h);case"yyyyyy":return On(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return On(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return On(r);case"MMM":return Nn(t.months("short",!0),1);case"MMMM":return Nn(t.months("long",!0),1);case"LLL":return Nn(t.months("short",!1),1);case"LLLL":return Nn(t.months("long",!1),1);case"o":case"S":return On(l);case"ooo":case"SSS":return On(i);case"u":return Ln(c);case"uu":return Ln(a);case"uuu":case"E":case"c":return On(n);case"a":return Nn(t.meridiems(),0);case"EEE":return Nn(t.weekdays("short",!1),1);case"EEEE":return Nn(t.weekdays("long",!1),1);case"ccc":return Nn(t.weekdays("short",!0),1);case"cccc":return Nn(t.weekdays("long",!0),1);case"Z":case"ZZ":return Pn(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return Pn(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return Ln(/[a-z_+-/]{1,256}?/i);case" ":return Ln(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(We(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return Pe(e.z)||(n=U.create(e.z)),Pe(e.Z)||(n||(n=new re(e.Z)),t=e.Z),Pe(e.q)||(e.M=3*(e.q-1)+1),Pe(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Pe(e.u)||(e.S=Ze(e.u)),[Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(n):[null,null,void 0];if(We(n,"a")&&We(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Wn(e,t,n){return new Vn(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=Et.create(t,e).dtFormatter((Yn||(Yn=mr.fromMillis(1555555555555)),Yn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Hn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i)))}const jn="Invalid DateTime",Bn=864e13;function Fn(e){return new _e("unsupported zone",`the zone "${e.name}" is not supported`)}function qn(e){return null===e.weekData&&(e.weekData=xe(e.c)),e.weekData}function Zn(e){return null===e.localWeekData&&(e.localWeekData=xe(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Gn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mr({...n,...t,old:n})}function $n(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Kn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Xn(e,t,n){return $n(Je(e),t,n)}function Jn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Xe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=En.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Je(o);let[l,u]=$n(a,n,e.zone);return 0!==s&&(l+=s,u=e.zone.offset(l)),{ts:l,o:u}}function Qn(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=mr.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return mr.invalid(new _e("unparsable",`the input "${i}" can't be parsed as ${r}`))}function er(e,t,n=!0){return e.isValid?Et.create(te.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function tr(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Be(e.c.year,n?6:4),t?(r+="-",r+=Be(e.c.month),r+="-",r+=Be(e.c.day)):(r+=Be(e.c.month),r+=Be(e.c.day)),r}function nr(e,t,n,r,i,o){let s=Be(e.c.hour);return t?(s+=":",s+=Be(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(s+=":")):s+=Be(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(s+=Be(e.c.second),0===e.c.millisecond&&r||(s+=".",s+=Be(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset&&!o?s+="Z":e.o<0?(s+="-",s+=Be(Math.trunc(-e.o/60)),s+=":",s+=Be(Math.trunc(-e.o%60))):(s+="+",s+=Be(Math.trunc(e.o/60)),s+=":",s+=Be(Math.trunc(e.o%60)))),o&&(s+="["+e.zone.ianaName+"]"),s}const rr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ir={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},or={ordinal:1,hour:0,minute:0,second:0,millisecond:0},sr=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lr=["year","ordinal","hour","minute","second","millisecond"];function ur(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new l(e);return t}(e)}}function cr(e,t){const n=oe(t.zone,be.defaultZone);if(!n.isValid)return mr.invalid(Fn(n));const r=te.fromObject(t);let i,o;if(Pe(e.year))i=be.now();else{for(const t of sr)Pe(e[t])&&(e[t]=rr[t]);const t=Re(e)||Ne(e);if(t)return mr.invalid(t);const r=function(e){return pr[e]||(void 0===fr&&(fr=be.now()),pr[e]=e.offset(fr)),pr[e]}(n);[i,o]=Xn(e,r,n)}return new mr({ts:i,zone:n,loc:r,o:o})}function dr(e,t,n){const r=!!Pe(n.round)||n.round,i=(e,i)=>{e=Ge(e,r||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,i)},o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function hr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let fr,pr={};class mr{constructor(e){const t=e.zone||be.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Fn(t));this.ts=Pe(e.ts)?be.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=Le(e.o)&&!e.old?e.o:t.offset(this.ts);r=Kn(this.ts,o),n=Number.isNaN(r.year)?new _e("invalid input"):null,r=n?null:r,i=n?null:o}}this._zone=t,this.loc=e.loc||te.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new mr({})}static local(){const[e,t]=hr(arguments),[n,r,i,o,s,a,l]=t;return cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:l},e)}static utc(){const[e,t]=hr(arguments),[n,r,i,o,s,a,l]=t;return e.zone=re.utcInstance,cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return mr.invalid("invalid input");const i=oe(t.zone,be.defaultZone);return i.isValid?new mr({ts:n,zone:i,loc:te.fromObject(t)}):mr.invalid(Fn(i))}static fromMillis(e,t={}){if(Le(e))return e<-Bn||e>Bn?mr.invalid("Timestamp out of range"):new mr({ts:e,zone:oe(t.zone,be.defaultZone),loc:te.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Le(e))return new mr({ts:1e3*e,zone:oe(t.zone,be.defaultZone),loc:te.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=oe(t.zone,be.defaultZone);if(!n.isValid)return mr.invalid(Fn(n));const r=te.fromObject(t),i=ot(e,ur),{minDaysInFirstWeek:o,startOfWeek:s}=Ie(i,r),l=be.now(),u=Pe(t.specificOffset)?n.offset(l):t.specificOffset,c=!Pe(i.ordinal),d=!Pe(i.year),h=!Pe(i.month)||!Pe(i.day),f=d||h,p=i.weekYear||i.weekNumber;if((f||c)&&p)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new a("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!f;let g,v,y=Kn(l,u);m?(g=ar,v=ir,y=xe(y,o,s)):c?(g=lr,v=or,y=Me(y)):(g=sr,v=rr);let b=!1;for(const e of g){Pe(i[e])?i[e]=b?v[e]:y[e]:b=!0}const _=m?function(e,t=4,n=1){const r=He(e.weekYear),i=je(e.weekNumber,1,et(e.weekYear,t,n)),o=je(e.weekday,1,7);return r?i?!o&&Ee("weekday",e.weekday):Ee("week",e.weekNumber):Ee("weekYear",e.weekYear)}(i,o,s):c?function(e){const t=He(e.year),n=je(e.ordinal,1,Ke(e.year));return t?!n&&Ee("ordinal",e.ordinal):Ee("year",e.year)}(i):Re(i),w=_||Ne(i);if(w)return mr.invalid(w);const T=m?Oe(i,o,s):c?Ae(i):i,[E,D]=Xn(T,u,n),S=new mr({ts:E,zone:n,o:D,loc:r});return i.weekday&&f&&e.weekday!==S.weekday?mr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${S.toISO()}`):S.isValid?S:mr.invalid(S.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return kt(e,[Qt,rn],[en,on],[tn,sn],[nn,an])}(e);return Qn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return kt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[qt,Zt])}(e);return Qn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return kt(e,[Gt,Xt],[$t,Xt],[Kt,Jt])}(e);return Qn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Pe(e)||Pe(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=te.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=Wn(e,t,n);return[r,i,o,s]}(o,e,t);return c?mr.invalid(c):Qn(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return mr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return kt(e,[un,rn],[cn,dn])}(e);return Qn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof _e?e:new _e(e,t);if(be.throwOnInvalid)throw new i(n);return new mr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Un(e,te.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return zn(Et.parseFormat(e),te.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){fr=void 0,pr={}}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?qn(this).weekYear:NaN}get weekNumber(){return this.isValid?qn(this).weekNumber:NaN}get weekday(){return this.isValid?qn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Zn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Zn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Zn(this).weekYear:NaN}get ordinal(){return this.isValid?Me(this.c).ordinal:NaN}get monthShort(){return this.isValid?Cn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Cn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Cn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Cn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Je(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,l=n-s*t,u=Kn(a,o),c=Kn(l,s);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Gn(this,{ts:a}),Gn(this,{ts:l})]:[this]}get isInLeapYear(){return $e(this.year)}get daysInMonth(){return Xe(this.year,this.month)}get daysInYear(){return this.isValid?Ke(this.year):NaN}get weeksInWeekYear(){return this.isValid?et(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?et(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Et.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(re.instance(e),t)}toLocal(){return this.setZone(be.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=oe(e,be.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Xn(n,t,e)}return Gn(this,{ts:r,zone:e})}return mr.invalid(Fn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Gn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ot(e,ur),{minDaysInFirstWeek:n,startOfWeek:r}=Ie(t,this.loc),i=!Pe(t.weekYear)||!Pe(t.weekNumber)||!Pe(t.weekday),o=!Pe(t.ordinal),s=!Pe(t.year),l=!Pe(t.month)||!Pe(t.day),u=s||l,c=t.weekYear||t.weekNumber;if((u||o)&&c)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new a("Can't mix ordinal dates with month/day");let d;i?d=Oe({...xe(this.c,n,r),...t},n,r):Pe(t.ordinal)?(d={...this.toObject(),...t},Pe(t.day)&&(d.day=Math.min(Xe(d.year,d.month),d.day))):d=Ae({...Me(this.c),...t});const[h,f]=Xn(d,this.o,this.zone);return Gn(this,{ts:h,o:f})}plus(e){if(!this.isValid)return this;return Gn(this,Jn(this,En.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Gn(this,Jn(this,En.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=En.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;tthis.valueOf(),s=xn(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(mr.now(),e,t)}until(e){return this.isValid?Sn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||mr.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf()),Math.min)}static max(...e){if(!e.every(mr.isDateTime))throw new u("max requires all arguments be DateTimes");return Ve(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return Wn(te.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return mr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=te.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Vn(i,e)}static fromFormatParser(e,t,n={}){if(Pe(e)||Pe(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=te.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?mr.invalid(c):Qn(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return p}static get DATE_MED(){return m}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return E}static get TIME_24_WITH_SECONDS(){return D}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return C}static get DATETIME_SHORT(){return k}static get DATETIME_SHORT_WITH_SECONDS(){return x}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return M}static get DATETIME_MED_WITH_WEEKDAY(){return A}static get DATETIME_FULL(){return I}static get DATETIME_FULL_WITH_SECONDS(){return R}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function gr(e){if(mr.isDateTime(e))return e;if(e&&e.valueOf&&Le(e.valueOf()))return mr.fromJSDate(e);if(e&&"object"==typeof e)return mr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}},function(e){var t;t=6941,e(e.s=t)}]);
\ No newline at end of file
diff --git a/public/build/chart.56f16a68.js b/public/build/chart.56f16a68.js
new file mode 100644
index 0000000000..9f331eca85
--- /dev/null
+++ b/public/build/chart.56f16a68.js
@@ -0,0 +1,2 @@
+/*! For license information please see chart.56f16a68.js.LICENSE.txt */
+"use strict";(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[65],{3808:function(t,e,i){function s(t){return t+.5|0}const n=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return n(s(2.55*t),0,255)}function a(t){return n(s(255*t),0,255)}function r(t){return n(s(t/2.55)/100,0,1)}function h(t){return n(s(100*t),0,100)}const l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],d=t=>c[15&t],u=t=>c[(240&t)>>4]+c[15&t],f=t=>(240&t)>>4==(15&t);function g(t){var e=(t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a))(t)?d:u;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function m(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function b(t,e,i){const s=x(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function _(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,h,l;return n!==o&&(l=n-o,h=a>.5?l/(2-n-o):l/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),P.transparent=[0,0,0,0]);const e=P[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const A=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const C=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,O=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function R(t,e,i){if(t){let s=_(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=v(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function T(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=a(t[3]))):(e=T(t,{r:0,g:0,b:0,a:1})).a=a(e.a),e}function E(t){return"r"===t.charAt(0)?function(t){const e=A.exec(t);let i,s,a,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?o(t):n(255*t,0,255)}return i=+e[1],s=+e[3],a=+e[5],i=255&(e[2]?o(i):n(i,0,255)),s=255&(e[4]?o(s):n(s,0,255)),a=255&(e[6]?o(a):n(a,0,255)),{r:i,g:s,b:a,a:r}}}(t):w(t)}class L{constructor(t){if(t instanceof L)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=I(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*l[s[1]],g:255&17*l[s[2]],b:255&17*l[s[3]],a:5===o?17*l[s[4]]:255}:7!==o&&9!==o||(n={r:l[s[1]]<<4|l[s[2]],g:l[s[3]]<<4|l[s[4]],b:l[s[5]]<<4|l[s[6]],a:9===o?l[s[7]]<<4|l[s[8]]:255})),i=n||D(t)||E(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=T(this._rgb);return t&&(t.a=r(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${r(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?g(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=_(t),i=e[0],s=h(e[1]),n=h(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${r(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,h=((a*r===-1?a:(a+r)/(1+a*r))+1)/2;n=1-h,i.r=255&h*i.r+n*s.r+.5,i.g=255&h*i.g+n*s.g+.5,i.b=255&h*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=O(r(t.r)),n=O(r(t.g)),o=O(r(t.b));return{r:a(C(s+i*(O(r(e.r))-s))),g:a(C(n+i*(O(r(e.g))-n))),b:a(C(o+i*(O(r(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new L(this.rgb)}alpha(t){return this._rgb.a=a(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=_(t);i[0]=M(i[0]+e),i=v(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function z(){}const F=(()=>{let t=0;return()=>t++})();function B(t){return null==t}function W(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function V(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return V(t)?t:e}function N(t,e){return void 0===t?e:t}const $=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Y(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,s){let n,o,a;if(W(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function et(t,e){const i=tt[e]||(tt[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function it(t){return t.charAt(0).toUpperCase()+t.slice(1)}const st=t=>void 0!==t,nt=t=>"function"==typeof t,ot=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const at=Math.PI,rt=2*at,ht=rt+at,lt=Number.POSITIVE_INFINITY,ct=at/180,dt=at/2,ut=at/4,ft=2*at/3,gt=Math.log10,pt=Math.sign;function xt(t,e,i){return Math.abs(t-e)h&&l=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function Ot(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const Rt=(t,e,i,s)=>Ot(t,i,s?s=>{const n=t[s][e];return nt[s][e]Ot(t,i,s=>t[s][e]>=i);const It=["push","pop","shift","splice","unshift"];function Et(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(It.forEach(e=>{delete t[e]}),delete t._chartjs)}function Lt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const zt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ft(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,zt.call(window,()=>{s=!1,t.apply(e,i)}))}}const Bt=t=>"start"===t?"left":"end"===t?"right":"center",Wt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Ht(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,vScale:r,_parsed:h}=t,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=a.axis,{min:d,max:u,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(n=Math.min(Rt(h,c,d).lo,i?s:Rt(e,c,a.getPixelForValue(d)).lo),l){const t=h.slice(0,n+1).reverse().findIndex(t=>!B(t[r.axis]));n-=Math.max(0,t)}n=At(n,0,s-1)}if(g){let t=Math.max(Rt(h,a.axis,u,!0).hi+1,i?0:Rt(e,c,a.getPixelForValue(u),!0).hi+1);if(l){const e=h.slice(t-1).findIndex(t=>!B(t[r.axis]));t+=Math.max(0,e)}o=At(t,n,s)-n}else o=s-n}return{start:n,count:o}}function Vt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const jt=t=>0===t||1===t,Nt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*rt/i),$t=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*rt/i)+1,Yt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*dt),easeOutSine:t=>Math.sin(t*dt),easeInOutSine:t=>-.5*(Math.cos(at*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>jt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>jt(t)?t:Nt(t,.075,.3),easeOutElastic:t=>jt(t)?t:$t(t,.075,.3),easeInOutElastic(t){const e=.1125;return jt(t)?t:t<.5?.5*Nt(2*t,e,.45):.5+.5*$t(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Yt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Yt.easeInBounce(2*t):.5*Yt.easeOutBounce(2*t-1)+.5};function Ut(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Xt(t){return Ut(t)?t:new L(t)}function qt(t){return Ut(t)?t:new L(t).saturate(.5).darken(.1).hexString()}const Kt=["x","y","borderWidth","radius","tension"],Jt=["color","borderColor","backgroundColor"];const Gt=new Map;function Zt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Gt.get(i);return s||(s=new Intl.NumberFormat(t,e),Gt.set(i,s)),s}(e,i).format(t)}const Qt={values(t){return W(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=gt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),Zt(t,s,h)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(gt(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?Qt.numeric.call(this,t,e,i):""}};var te={formatters:Qt};const ee=Object.create(null),ie=Object.create(null);function se(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>qt(e.borderColor),this.hoverColor=(t,e)=>qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ne(this,t,e)}get(t){return se(this,t)}describe(t,e){return ne(ie,t,e)}override(t,e){return ne(ee,t,e)}route(t,e,i,s){const n=se(this,t),o=se(this,i),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[s];return H(t)?Object.assign({},e,t):N(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}var ae=new oe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Jt},numbers:{type:"number",properties:Kt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:te.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function re(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function he(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function le(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ce(t,e,i,s){de(t,e,i,s,null)}function de(t,e,i,s,n){let o,a,r,h,l,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let x=(g||0)*ct;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(x),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,rt):t.arc(i,s,p,0,rt),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(x)*c,s-Math.cos(x)*p),x+=ft,t.lineTo(i+Math.sin(x)*c,s-Math.cos(x)*p),x+=ft,t.lineTo(i+Math.sin(x)*c,s-Math.cos(x)*p),t.closePath();break;case"rectRounded":l=.516*p,h=p-l,a=Math.cos(x+ut)*h,d=Math.cos(x+ut)*(n?n/2-l:h),r=Math.sin(x+ut)*h,u=Math.sin(x+ut)*(n?n/2-l:h),t.arc(i-d,s-r,l,x-at,x-dt),t.arc(i+u,s-a,l,x-dt,x),t.arc(i+d,s+r,l,x,x+dt),t.arc(i-u,s+a,l,x+dt,x+at),t.closePath();break;case"rect":if(!g){h=Math.SQRT1_2*p,c=n?n/2:h,t.rect(i-c,s-h,2*c,2*h);break}x+=ut;case"rectRot":d=Math.cos(x)*(n?n/2:p),a=Math.cos(x)*p,r=Math.sin(x)*p,u=Math.sin(x)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-a),t.lineTo(i+d,s+r),t.lineTo(i-u,s+a),t.closePath();break;case"crossRot":x+=ut;case"cross":d=Math.cos(x)*(n?n/2:p),a=Math.cos(x)*p,r=Math.sin(x)*p,u=Math.sin(x)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"star":d=Math.cos(x)*(n?n/2:p),a=Math.cos(x)*p,r=Math.sin(x)*p,u=Math.sin(x)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a),x+=ut,d=Math.cos(x)*(n?n/2:p),a=Math.cos(x)*p,r=Math.sin(x)*p,u=Math.sin(x)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"line":a=n?n/2:Math.cos(x)*p,r=Math.sin(x)*p,t.moveTo(i-a,s-r),t.lineTo(i+a,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(x)*(n?n/2:p),s+Math.sin(x)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ue(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let h,l;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),B(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;h+t||0;function Se(t,e){const i={},s=H(e),n=s?Object.keys(e):e,o=H(t)?s?i=>N(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=ke(o(t));return i}function Pe(t){return Se(t,{top:"y",right:"x",bottom:"y",left:"x"})}function De(t){return Se(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ae(t){const e=Pe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ce(t,e){t=t||{},e=e||ae.font;let i=N(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=N(t.style,e.style);s&&!(""+s).match(Me)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:N(t.family,e.family),lineHeight:we(N(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:N(t.weight,e.weight),string:""};return n.string=function(t){return!t||B(t.size)||B(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Oe(t,e,i,s){let n,o,a,r=!0;for(n=0,o=t.length;nt[0]){const o=i||t;void 0===s&&(s=Ne("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:n,override:i=>Te([i,...t],e,o,s)};return new Proxy(a,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,s){return Fe(i,s,()=>function(t,e,i,s){let n;for(const o of e)if(n=Ne(Le(o,t),i),void 0!==n)return ze(t,n)?Ve(i,s,t,n):n}(s,e,t,i))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return $e(t).includes(e)},ownKeys(t){return $e(t)},set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Ie(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ee(t,s),setContext:e=>Ie(t,e,i,s),override:n=>Ie(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return Fe(t,e,()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=t;let r=s[e];nt(r)&&a.isScriptable(e)&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||s);r.delete(t),ze(t,h)&&(h=Ve(n._scopes,n,t,h));return h}(e,r,t,i));W(r)&&r.length&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=i;if(void 0!==o.index&&s(t))return e[o.index%e.length];if(H(e[0])){const i=e,s=n._scopes.filter(t=>t!==i);e=[];for(const h of i){const i=Ve(s,n,t,h);e.push(Ie(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));ze(e,r)&&(r=Ie(r,n,o&&o[e],a));return r}(t,e,i))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,s){return t[i]=s,delete e[i],!0}})}function Ee(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:nt(i)?i:()=>i,isIndexable:nt(s)?s:()=>s}}const Le=(t,e)=>t?t+it(e):e,ze=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Fe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Be(t,e,i){return nt(t)?t(e,i):t}const We=(t,e)=>!0===t?e:"string"==typeof t?et(e,t):void 0;function He(t,e,i,s,n){for(const o of e){const e=We(i,o);if(e){t.add(e);const o=Be(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function Ve(t,e,i,s){const n=e._rootScopes,o=Be(e._fallback,i,s),a=[...t,...n],r=new Set;r.add(s);let h=je(r,a,i,o||i,s);return null!==h&&((void 0===o||o===i||(h=je(r,a,o,h,s),null!==h))&&Te(Array.from(r),[""],n,o,()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(W(n)&&H(i))return i;return n||{}}(e,i,s)))}function je(t,e,i,s,n){for(;i;)i=He(t,e,i,s,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function $e(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Ye(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,h,l,c;for(r=0,h=s;re"x"===t?"y":"x";function Ke(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=kt(o,n),h=kt(a,o);let l=r/(r+h),c=h/(r+h);l=isNaN(l)?0:l,c=isNaN(c)?0:c;const d=s*l,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Je(t,e="x"){const i=qe(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,h,l=Xe(t,0);for(a=0;a