/*! For license information please see calendar.198a5c2b.js.LICENSE.txt */ (self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[548],{6030:function(e,t){"use strict";t.Z={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"}},2222:function(e,t){"use strict";t.Z={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í"}},6271:function(e,t){"use strict";t.Z={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"}},8799: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.Z=r},6091: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.Z=r},8633:function(e,t){"use strict";t.Z={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"}},7278:function(e,t){"use strict";t.Z={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")}}},9337:function(e,t){"use strict";t.Z={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"}},5680:function(e,t){"use strict";t.Z={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"}},4267:function(e,t){"use strict";t.Z={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:"هیچ رویدادی به نمایش"}},4361:function(e,t){"use strict";t.Z={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"}},8956:function(e,t){"use strict";t.Z={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"}},4997:function(e,t){"use strict";t.Z={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"}},6486:function(e,t){"use strict";t.Z={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"}},4295:function(e,t){"use strict";t.Z={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"}},4707:function(e,t){"use strict";t.Z={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"}},9694:function(e,t){"use strict";t.Z={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"}},8008:function(e,t){"use strict";t.Z={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"}},6713:function(e,t){"use strict";t.Z={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")}}},8152:function(e,t){"use strict";t.Z={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"}},411:function(e,t){"use strict";t.Z={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"}},7318:function(e,t){"use strict";t.Z={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"}},138:function(e,t){"use strict";t.Z={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"}},801:function(e,t){"use strict";t.Z={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"}},110:function(e,t){"use strict";t.Z={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"}},197:function(e,t){"use strict";t.Z={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"}},7018:function(e,t){"use strict";t.Z={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"}},7974:function(e,t){"use strict";t.Z={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"}},26:function(e,t){"use strict";t.Z={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ị"}},6278:function(e,t){"use strict";t.Z={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"}},1191:function(e,t,n){n.g.KimaiCalendar=n(4798).Z},4798:function(e,t,n){"use strict";n.d(t,{Z:function(){return xu}});var r=n(3138),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 E(e,s,r,i,null)}function E(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 T(){return{current:null}}function w(e){return e.children}function D(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?E(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=_[c])||h&&f.key==h.key&&f.type===h.type)_[c]=void 0;else for(d=0;d3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),j(b(me,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function ve(e,t){var n=b(ge,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new D).__e=function(e){var t=this,n=he(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),pe(t,e,r)):i()};n?n(o):o()}},fe.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(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},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){pe(e,n,t)}))};var ye="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,_e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|shape|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,be="undefined"!=typeof document,Ee=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};D.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(D.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Te=u.event;function we(){}function De(){return this.cancelBubble}function Se(){return this.defaultPrevented}u.event=function(e){return Te&&(e=Te(e)),e.persist=we,e.isPropagationStopped=De,e.isDefaultPrevented=Se,e.nativeEvent=e};var Ce={configurable:!0,get:function(){return this.class}},xe=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];be&&"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)&&!Ee(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&&_e.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").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=A(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=A(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&&(Ce.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ce))}e.$$typeof=ye,xe&&xe(e)};var ke=u.__r;u.__r=function(e){ke&&ke(e),e.__c};var Re="undefined"!=typeof globalThis?globalThis:window;Re.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):Re.FullCalendarVDom={Component:D,createElement:b,render:j,createRef:T,Fragment:w,createContext:function(e){var t=V(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:ve,flushSync:function(e){e();var t=u.debounceRendering,n=[];function r(e){n.push(e)}u.debounceRendering=r,j(b(Oe,{}),document.createElement("div"));for(;n.length;)n.shift()();u.debounceRendering=t},unmountComponentAtNode:function(e){j(null,e)}};var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return b("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(D);if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ae=FullCalendarVDom.Component,Ie=FullCalendarVDom.createElement,Me=FullCalendarVDom.render,Pe=FullCalendarVDom.createRef,Ne=FullCalendarVDom.Fragment,He=FullCalendarVDom.createContext,Le=FullCalendarVDom.createPortal,Ye=FullCalendarVDom.flushSync,ze=FullCalendarVDom.unmountComponentAtNode,Be=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 Ue(e){e.parentNode&&e.parentNode.removeChild(e)}function We(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(je(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function je(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var Ve=/(top|left|right|bottom|width|height)$/i;function Fe(e,t){for(var n in t)qe(e,n,t[n])}function qe(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ve.test(t)?e.style[t]=n+"px":e.style[t]=n}function Ze(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 Ge(e){return e.getRootNode?e.getRootNode():document}var Ke=0;function Xe(){return"fc-dom-"+(Ke+=1)}function $e(e){e.preventDefault()}function Je(e,t,n,r){var i=function(e,t){return function(n){var r=We(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var Qe=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function et(e){return s({onClick:e},tt(e))}function tt(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var nt=0;function rt(){return String(nt+=1)}function it(){document.body.classList.add("fc-not-allowed")}function ot(){document.body.classList.remove("fc-not-allowed")}function st(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 at(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function lt(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 ut(e,t){return e-t}function ct(e){return e%1==0}function dt(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 ht=["sun","mon","tue","wed","thu","fri","sat"];function ft(e,t){var n=wt(e);return n[2]+=7*t,Dt(n)}function pt(e,t){var n=wt(e);return n[2]+=t,Dt(n)}function mt(e,t){var n=wt(e);return n[6]+=t,Dt(n)}function gt(e,t){return(t.valueOf()-e.valueOf())/864e5}function vt(e,t){return Ct(e)===Ct(t)?Math.round(gt(e,t)):null}function yt(e){return Dt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function _t(e,t,n,r){var i=Dt([t,0,1+bt(t,n,r)]),o=yt(e),s=Math.round(gt(i,o));return Math.floor(s/7)+1}function bt(e,t,n){var r=7+t-n;return-((7+Dt([e,0,r]).getUTCDay()-t)%7)+r-1}function Et(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Tt(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 wt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Dt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function St(e){return!isNaN(e.valueOf())}function Ct(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function xt(e,t,n,r){return{instanceId:rt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var kt=Object.prototype.hasOwnProperty;function Rt(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]=Rt(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 Ot(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function At(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function It(e){for(var t={},n=0,r=e;n10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",$t(t,!0)))),r}function Xt(e){return e.toISOString().replace(/T.*$/,"")}function $t(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+at(i,2)+":"+at(o,2):"GMT"+n+i+(o?":"+at(o,2):"")}function Jt(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=cn(function(e,t){var n={};for(var r in e)(!(r in nn)||nn[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=qt(t)&&(r=pt(r,1))}return e.start&&(n=yt(e.start),r&&r<=n&&(r=pt(n,1))),{start:n,end:r}}function qn(e,t,n,r){return"year"===r?Wt(n.diffWholeYears(e,t),"year"):"month"===r?Wt(n.diffWholeMonths(e,t),"month"):(o=t,s=yt(i=e),a=yt(o),{years:0,months:0,days:Math.round(gt(s,a)),milliseconds:o.valueOf()-a.valueOf()-(i.valueOf()-s.valueOf())});var i,o,s,a}function Zn(e,t){var n,r,i=[],o=t.start;for(e.sort(Gn),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 Jn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&Jn(t,r.start)}}function dr(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function hr(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?tt((function(e){s.trigger("eventClick",{el:e.target,event:new Or(t,r,i),jsEvent:e,view:t.viewApi})})):{}}var fr={start:Sn,end:Sn,allDay:Boolean};function pr(e,t,n){var r=function(e,t){var n=Dn(e,fr),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 mr(e,t,n){return s(s({},gr(e,t,n)),{timeZone:t.timeZone})}function gr(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 vr(e,t,n){var r=Un({editable:!1},n),i=jn(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:rr(i,t),instance:xt(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function yr(e,t,n){n.emitter.trigger("select",s(s({},_r(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function _r(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:rt(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Pn(o,t),extendedProps:s}}return null}function xr(e){return s(s(s({},In),Sr),e.pluginHooks.eventSourceRefiners)}function kr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Rr=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=mt(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)),Kt(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Dt(Et(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Dt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Tt(wt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(wt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Tt(wt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(wt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Yr=[],zr={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"},Br=s(s({},zr),{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 Ur(e){for(var t=e.length>0?e[0].code:"en",n=Yr.concat(e),r={en:Br},i=0,o=n;i0;i-=1){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Br;return jr(e,n,r)}(e,t):jr(e.code,[e.code],e)}function jr(e,t,n){var r=Rt([zr,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 Vr,Fr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function qr(e,t){return Cn(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({},Fr),e)}))}(e),null,t)}function Zr(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}()),Vr}var Xr={defs:{},instances:{}},$r=function(){function e(){this.getKeysForEventDefs=Qt(this._getKeysForEventDefs),this.splitDateSelection=Qt(this._splitDateSpan),this.splitEventStore=Qt(this._splitEventStore),this.splitIndividualUi=Qt(this._splitIndividualUi),this.splitEventDrag=Qt(this._splitInteraction),this.splitEventResize=Qt(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=At(n,(function(e,n){return t.eventUiBuilders[n]||Qt(Jr)})),n){var d=n[c],h=s[c]||Xr,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 ei(e,t){var n=["fc-day","fc-day-"+ht[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 ti=mn({year:"numeric",month:"long",day:"numeric"}),ni=mn({week:"long"});function ri(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?ni:ti);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:lt(o.navLinkHint,[l,u],l),"data-navlink":""},r?et(c):{onClick:c})}return{"aria-label":l}}var ii,oi=null;function si(){return null===oi&&(oi=function(){var e=document.createElement("div");Fe(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 Ue(e),t}()),oi}function ai(){return ii||(ii=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=li(e);return document.body.removeChild(e),t}()),ii}function li(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function ui(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():ci(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=li(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 si()&&"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 ci(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 di(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 hi=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=Kn(a,i.range)),a=Kn(a=this.adjustActiveRange(a),r),l=Xn(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=Gt(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return Wt({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&&(Ft(i)<0&&(s=yt(s),s=n.add(s,i)),Ft(o)>1&&(a=pt(a=yt(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&&qt(c)e.fetchRange.end}(e,t,n)})),t,!1,n)}function Xi(e,t,n,r,i){var o={};for(var s in e){var a=e[s];t[s]?o[s]=$i(a,n,r,i):o[s]=a}return o}function $i(e,t,n,r){var i=r.options,o=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],l=rt();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 Ji(e,t){return Ot(e,(function(e){return Qi(e,t)}))}function Qi(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function eo(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=Cn(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;i&&(e=to(e,i));r&&(e=to(e,r));return e}(i,t,o),t,o);return r&&(s=Yt(s,r,o)),Rn(no(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=Yt(t,n,r));return Rn(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Rn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Yt(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 no(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return On(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function to(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 fo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function po(e,t){for(var n=Mt(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 _o=function(){function e(e){var t=this;this.computeOptionsData=Qt(this._computeOptionsData),this.computeCurrentViewData=Qt(this._computeCurrentViewData),this.organizeRawLocales=Qt(Ur),this.buildLocale=Qt(Wr),this.buildPluginHooks=ki(),this.buildDateEnv=Qt(bo),this.buildTheme=Qt(Eo),this.parseToolbars=Qt(ao),this.buildViewSpecs=Qt(Wi),this.buildDateProfileGenerator=en(To),this.buildViewApi=Qt(wo),this.buildViewUiProps=en(Co),this.buildEventUiBySource=Qt(Do,Pt),this.buildEventUiBases=Qt(So),this.parseContextBusinessHours=en(ko),this.buildTitle=Qt(yo),this.emitter=new hi,this.actionRunner=new vo(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):kr(a.now,l)),d=o.dateProfileGenerator.build(c);Jn(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:Mo(s,o)}],i)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Po(r,t.level,t.levelCoord),Po(n,t.level,[e])):Po(n[t.level],t.lateral,e),this.stackCnts[Io(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=No(p,e.span.start,Ao),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[Io(m)]+1)),v+=1}}var _=0;if(c)for(_=l+1;_n(e[i-1]))return[i,0];for(;rs))return[o,1];r=o+1}}return[r,0]}var Ho=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Lo(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Yo(e){var t;return(t={})[e.component.uid]=e,t}var zo={},Bo=function(){function e(e,t){this.emitter=new hi}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Uo={},Wo={startTime:Wt,duration:Wt,create:Boolean,sourceId:String};function jo(e){var t=Dn(e,Wo),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 Vo=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 Ie.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 Ie.apply(void 0,a(["div",{className:v}],r))}return r[0]},t}(Ti),Fo=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,Ie("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 Ie(Vo,{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}(Ti),qo=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,Si(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||"",Ie("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}(Ti),Zo=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=tr(t);if(o&&r.isValidSegDownEl(e.target)){var s=We(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Or(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=Je(t.el,"click",".fc-event",n.handleSegClick),n}return o(t,e),t}(Ho),Go=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){tr(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,Je(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=tr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Or(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ho),Ko=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=Qt(bi),t.buildViewPropTransformers=Qt($o),t.buildToolbarProps=Qt(Xo),t.headerRef=Pe(),t.footerRef=Pe(),t.interactionsStore={},t.state={viewLabelId:Xe()},t.registerInteractiveComponent=function(e,n){var r=Lo(e,n),i=[Zo,Go].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,zo[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,i=n;r1?ri(this.context,a):{},f=s(s(s({date:t.toDate(a),view:i},o.extraHookProps),{text:d}),u);return Ie(Ai,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:es,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Ie("th",s({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:Xt(a),colSpan:o.colSpan},o.extraDataAttrs),Ie("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Ie("a",s({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},h),r)))}))},t}(Ti),ns=mn({weekday:"long"}),rs=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=pt(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[Qo].concat(ei(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 Ie(Ai,{hookProps:d,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:es,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,r,i,o){return Ie("th",s({ref:t,role:"columnheader",className:u.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Ie("div",{className:"fc-scrollgrid-sync-inner"},Ie("a",{"aria-label":n.format(a,ns),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Ti),is=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=kr(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=mt(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,Wt(1,e.unit)),o=i.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:os(r)},nextState:{nowDate:i,todayRange:os(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=_i,t}(Ae);function os(e){var t=yt(e);return{start:t,end:pt(t,1)}}var ss=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=Qt(as),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 Ie(is,{unit:"day"},(function(e,t){return Ie("tr",{role:"row"},o&&o("day"),n.map((function(e){return i?Ie(ts,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Ie(rs,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Ti);function as(e,t,n){return e||function(e,t){return mn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var ls=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}(),us=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(_s.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 _s.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return _s.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Ti),Es=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 Qs=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;Ye((function(){Me(Ie(Jo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,o){return r.setClassNames(t),r.setHeight(n),Ie(Ii.Provider,{value:r.customContentRenderId},Ie(Ko,s({isHeightAuto:i,forPrint:o},e)))})),r.el)}))}else r.isRendered&&(r.isRendered=!1,ze(r.el),r.setClassNames([]),r.setHeight(""))},r.el=t,r.renderRunner=new go(r.handleRenderRequest),new _o({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;Ye((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(!Jt(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n1,b=y.span.start===a;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,_?(d+=y.thickness,b&&m.push({seg:ga(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):b&&(m.push({seg:ga(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=[],_=0,b=u;_1,showWeekNumbers:t.showWeekNumbers,todayRange:p,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:a[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(ba),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 fi(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new fi(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:pt(n,1)}},t}(Ci);function ba(e){return e.eventRange.def.allDay}var Ea=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}(cs),Ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new Ea,t.tableRef=Pe(),t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Ie(_a,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}(Ci),wa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=Qt(Da),t.headerRef=Pe(),t.tableRef=Pe(),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&&Ie(ss,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Ie(Ta,{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}(ea);function Da(e,t){var n=new ls(e.renderRange,t);return new us(n,/year|month|week/.test(e.currentRangeUnit))}var Sa=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=ft(i,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=ft(l,6-Math.ceil(gt(a,l)/7)));return{start:a,end:l}},t}(Vi),Ca=xi({initialView:"dayGridMonth",views:{dayGrid:{component:wa,dateProfileGeneratorClass:Sa},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),xa=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}($r),ka=mn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Ra(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Ie(_i.Consumer,null,(function(n){if(!e.isLabeled)return Ie("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?ka:Array.isArray(i.slotLabelFormat)?mn(i.slotLabelFormat[0]):mn(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Ie(Ai,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:Oa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Ie("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Ie("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Ie("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}))}function Oa(e){return e.text}var Aa=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 Ie("tr",{key:e.key},Ie(Ra,s({},e)))}))},t}(Ti),Ia=mn({week:"short"}),Ma=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new xa,t.headerElRef=Pe(),t.rootElRef=Pe(),t.scrollerElRef=Pe(),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===gt(i.start,i.end)?ri(t.context,i.start,"week"):{};return r.weekNumbers&&"day"===e?Ie(js,{date:i.start,defaultFormat:Ia},(function(e,t,r,i){return Ie("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},Ie("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},Ie("a",s({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},o),i)))})):Ie("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},Ie("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 Ie(Ai,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Pa,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Ie("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Ie("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Ie("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=Rs(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:Ie("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ie("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}}),Ie(zi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Ie("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ie(As,{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&&Rs(u.options),h=!c.forPrint&&Os(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ie("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 Ie("tr",{role:"presentation"},a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Ie("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ie("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 Ie("div",{className:"fc-timegrid-axis-chunk"},Ie("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Ie("tbody",null,Ie(Aa,{slatMetas:o}))),Ie("div",{className:"fc-timegrid-now-indicator-container"},Ie(is,{unit:p?"minute":"day"},(function(e){var t=p&&s&&s.safeComputeTop(e);return"number"==typeof t?Ie(Ns,{isAxis:!0,date:e},(function(e,n,r,i){return Ie("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:ks},{key:"cols",content:ks}]}),Ie(zi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Ie("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ie(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}(Ci);function Pa(e){return e.text}var Na=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(Jn(t.currentRange,e)){var n=yt(e),r=e.valueOf()-n.valueOf();if(r>=qt(t.slotMinTime)&&r0,_=Boolean(l)&&l.span.end-l.span.start=0;t-=1)if(null!==(r=Zt(n=Wt(sl[t]),e))&&r>1)return n;return e}(r),c=[];qt(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)}}]});Uo.touchMouseIgnoreWait=500;var Tl=0,wl=0,Dl=!1,Sl=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,Tl+=1,setTimeout((function(){Tl-=1}),Uo.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 hi,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),1===(wl+=1)&&window.addEventListener("touchmove",Cl,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),(wl-=1)||window.removeEventListener("touchmove",Cl,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!We(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){Dl=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?We(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return Tl||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(Dl=!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 Cl(e){Dl&&e.preventDefault()}var xl=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",Fe(n,{left:r.left,top:r.top}),function(e,t){var n=function(r){t(r),Qe.forEach((function(t){e.removeEventListener(t,n)}))};Qe.forEach((function(t){e.addEventListener(t,n)}))}(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Ue(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&Fe(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"),Fe(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}(),kl=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}(pi),Rl=function(e){function t(t,n){return e.call(this,new mi(t),n)||this}return o(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return ui(this.scrollController.el)},t}(kl),Ol=function(e){function t(t){return e.call(this,new gi,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}(kl),Al="function"==typeof performance?performance.now:Date.now,Il=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=Al();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(Al()))}},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 Ol(!1):new Rl(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",$e)}(document.body),function(e){e.removeEventListener("contextmenu",$e)}(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 Sl(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 xl,r.autoScroller=new Il,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}(Bo),Pl=function(){function e(e){this.origRect=ci(e),this.scrollCaches=di(e).map((function(e){return new Rl(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 Hl(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 Ll(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=Er(o,i.getCurrentData().eventUiBases,l,i),d.mutatedEvents=u,hs(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?it():ot(),t||(l&&Hl(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 Or(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 Or(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:Ir(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||Wt(0),endDelta:n.validMutation.endDelta||Wt(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 Ml(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.context.options.dragScroll;var o=n.hitDragging=new Nl(n.dragging,Yo(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 We(e.subjectEl,".fc-event")},t}(Ho);var Wl=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=Ze(e.origEvent);t.matchesCancel=!!We(r,n),t.matchesEvent=!!We(r,Bl.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 Sl(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:Sn},Vl={dateClick:Sn,eventDragStart:Sn,eventDragStop:Sn,eventDrop:Sn,eventResizeStart:Sn,eventResizeStop:Sn,eventResize:Sn,drop:Sn,eventReceive:Sn,eventLeave:Sn},Fl=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.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.J2.getInstance(e.element);null!==t&&t.dispose()},eventMouseEnter:e=>{const t=e.event;if(!this.isKimaiSource(t))return;const n=e.el;let i=r.J2.getInstance(n);null===i&&(i=new r.J2(n,{title:o.getFormattedDate(t.start)+" | "+o.formatTime(t.start)+" - "+(t.end?o.formatTime(t.end):""),placement:"top",html:!0,content:this.renderEventPopoverContent(t),trigger:"focus"})),i.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 Cu.Z("calendar_contextMenu").createFromApi(t,e)}),(e=>{console.log("Failed to load actions for context menu",e)}))}}))}};if(!this.hasPermission("punch")&&this.hasPermission("create")&&void 0!==this.options.dragdrop){[].slice.call(document.querySelectorAll(this.options.dragdrop.container)).map((e=>new ql(e,{itemSelector:this.options.dragdrop.items}))),u={...u,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")&&(u={...u,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")&&(u={...u,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")||(u={...u,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&&(u={...u,googleCalendarApiKey:this.options.googleCalendarApiKey});let c=[];for(const e of this.options.eventSources){let t={};if("timesheet"===e.type)t={...t,id:"kimai-"+e.id,events:(t,n,r)=>{let s=e.url.replace("{from}",o.formatForAPI(t.start));s=s.replace("{to}",o.formatForAPI(t.end)),i.get(s,{},(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("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}),c.push(t)}c.length>0&&(u={...u,eventSources:c}),this.calendar=new Qs(t,u)}isKimaiSource(e){return null!==e&&(null!==e.source&&0===e.source.id.indexOf("kimai-"))}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:Su.Z.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.J2.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)}))}}},7169:function(e,t,n){"use strict";n.d(t,{Z: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"}}},3187:function(e,t,n){"use strict";n.d(t,{Z: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+='"}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.style.zIndex="1021",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)}))}))}}},3138:function(e,t,n){"use strict";n.d(t,{u_:function(){return Un},J2:function(){return _r},FN:function(){return Ur},u:function(){return gr}});var r={};n.r(r),n.d(r,{afterMain:function(){return w},afterRead:function(){return b},afterWrite:function(){return C},applyStyles:function(){return M},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return u},beforeMain:function(){return E},beforeRead:function(){return y},beforeWrite:function(){return D},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return re},createPopper:function(){return Me},createPopperBase:function(){return Ie},createPopperLite:function(){return Pe},detectOverflow:function(){return _e},end:function(){return d},eventListeners:function(){return oe},flip:function(){return be},hide:function(){return we},left:function(){return a},main:function(){return T},modifierPhases:function(){return x},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 _},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",_="read",b="afterRead",E="beforeMain",T="main",w="afterMain",D="beforeWrite",S="write",C="afterWrite",x=[y,_,b,E,T,w,D,S,C];function k(e){return e?(e.nodeName||"").toLowerCase():null}function R(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function O(e){return e instanceof R(e).Element||e instanceof Element}function A(e){return e instanceof R(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof R(e).ShadowRoot||e instanceof ShadowRoot)}var M={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)&&k(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)&&k(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function P(e){return e.split("-")[0]}var N=Math.max,H=Math.min,L=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 B(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&&L(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&L(r.height)/e.offsetHeight||1);var s=(O(e)?R(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 U(e){var t=B(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 W(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 R(e).getComputedStyle(e)}function V(e){return["table","td","th"].indexOf(k(e))>=0}function F(e){return((O(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===k(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=R(e),n=Z(e);n&&V(n)&&"static"===j(n).position;)n=Z(n);return n&&("html"===k(n)||"body"===k(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(k(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 K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return N(e,H(t,n))}function $(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=P(n.placement),f=K(h),p=[a,s].indexOf(h)>=0?"height":"width";if(c&&d){var m=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,u))}(l.padding,n),g=U(c),v="y"===f?i:a,y="y"===f?o:s,_=n.rects.reference[p]+n.rects.reference[f]-d[f]-n.rects.popper[p],b=d[f]-n.rects.reference[f],E=G(c),T=E?"y"===f?E.clientHeight||0:E.clientWidth||0:0,w=_/2-b/2,D=m[v],S=T-g[p]-m[y],C=T/2-g[p]/2+w,x=X(D,C,S),k=f;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-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)))&&W(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,_=c.y,b=void 0===_?0:_,E="function"==typeof m?m({x:y,y:b}):{x:y,y:b};y=E.x,b=E.y;var T=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),D=a,S=i,C=window;if(p){var x=G(n),k="clientHeight",O="clientWidth";if(x===R(n)&&"static"!==j(x=F(n)).position&&"absolute"===h&&(k="scrollHeight",O="scrollWidth"),l===i||(l===a||l===s)&&u===d)S=o,b-=(g&&x===C&&C.visualViewport?C.visualViewport.height:x[k])-r.height,b*=f?1:-1;if(l===a||(l===i||l===o)&&u===d)D=s,y-=(g&&x===C&&C.visualViewport?C.visualViewport.width:x[O])-r.width,y*=f?1:-1}var A,I=Object.assign({position:h},p&&te),M=!0===m?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:L(n*i)/i||0,y:L(r*i)/i||0}}({x:y,y:b},R(n)):{x:y,y:b};return y=M.x,b=M.y,f?Object.assign({},I,((A={})[S]=w?"0":"",A[D]=T?"0":"",A.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",A)):Object.assign({},I,((t={})[S]=w?b+"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:P(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=R(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=R(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return B(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(k(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=R(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=R(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)):O(t)?function(e,t){var n=B(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=N(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=N(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+=N(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 O(n)?t.filter((function(e){return O(e)&&W(e,n)&&"body"!==k(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=N(i.top,t.top),t.right=H(i.right,t.right),t.bottom=H(i.bottom,t.bottom),t.left=N(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?P(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?K(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 _e(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,_=n.elementContext,b=void 0===_?p:_,E=n.altBoundary,T=void 0!==E&&E,w=n.padding,D=void 0===w?0:w,S=$("number"!=typeof D?D:J(D,u)),C=b===p?m:p,x=e.rects.popper,k=e.elements[T?C:b],R=ve(O(k)?k:k.contextElement||F(e.elements.popper),g,y,c),A=B(e.elements.reference),I=ye({reference:A,element:x,strategy:"absolute",placement:a}),M=me(Object.assign({},x,I)),P=b===p?M:A,N={top:R.top-P.top+S.top,bottom:P.bottom-R.bottom+S.bottom,left:R.left-P.left+S.left,right:P.right-R.right+S.right},H=e.modifiersData.offset;if(b===p&&H){var L=H[a];Object.keys(N).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[i,o].indexOf(e)>=0?"y":"x";N[e]+=L[n]*t}))}return N}var be={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,_=n.boundary,b=n.rootBoundary,E=n.altBoundary,T=n.flipVariations,w=void 0===T||T,D=n.allowedAutoPlacements,S=t.options.placement,C=P(S),x=m||(C===S||!w?[ae(S)]:function(e){if(P(e)===l)return[];var t=ae(e);return[ue(e),t,ue(t)]}(S)),k=[S].concat(x).reduce((function(e,n){return e.concat(P(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]=_e(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[P(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:_,rootBoundary:b,padding:y,flipVariations:w,allowedAutoPlacements:D}):n)}),[]),R=t.rects.reference,O=t.rects.popper,A=new Map,I=!0,M=k[0],N=0;N=0,B=z?"width":"height",U=_e(t,{placement:H,boundary:_,rootBoundary:b,altBoundary:E,padding:y}),W=z?Y?s:a:Y?o:i;R[B]>O[B]&&(W=ae(W));var j=ae(W),V=[];if(h&&V.push(U[L]<=0),p&&V.push(U[W]<=0,U[j]<=0),V.every((function(e){return e}))){M=H,I=!1;break}A.set(H,V)}if(I)for(var F=function(e){var t=k.find((function(t){var n=A.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},q=w?3:1;q>0;q--){if("break"===F(q))break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ee(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 we={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=_e(t,{elementContext:"reference"}),a=_e(t,{altBoundary:!0}),l=Ee(s,r),u=Ee(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=P(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,_=n.tetherOffset,b=void 0===_?0:_,E=_e(t,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),T=P(t.placement),w=ee(t.placement),D=!w,S=K(T),C="x"===S?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,R=t.rects.popper,O="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,A="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(u){var L,Y="y"===S?i:a,z="y"===S?o:s,B="y"===S?"height":"width",W=x[S],j=W+E[Y],V=W-E[z],F=y?-R[B]/2:0,q=w===c?k[B]:R[B],Z=w===c?-R[B]:-k[B],$=t.elements.arrow,J=y&&$?U($):{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=X(0,k[B],J[B]),ie=D?k[B]/2-F-re-te-A.mainAxis:q-re-te-A.mainAxis,oe=D?-k[B]/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!=(L=null==I?void 0:I[S])?L:0,ue=W+oe-le,ce=X(y?H(j,W+ie-le-ae):j,W,y?N(V,ue):V);x[S]=ce,M[S]=ce-W}if(h){var de,he="x"===S?i:a,fe="x"===S?o:s,pe=x[C],me="y"===C?"height":"width",ge=pe+E[he],ve=pe-E[fe],ye=-1!==[i,a].indexOf(T),be=null!=(de=null==I?void 0:I[C])?de:0,Ee=ye?ge:pe-k[me]-R[me]-be+A.altAxis,Te=ye?pe+k[me]+R[me]-be-A.altAxis:ve,we=y&&ye?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(Ee,pe,Te):X(y?Ee:ge,pe,y?Te:ve);x[C]=we,M[C]=we-pe}t.modifiersData[r]=M}},requiresIfExists:["offset"]};function xe(e,t,n){void 0===n&&(n=!1);var r,i,o=A(t),s=A(t)&&function(e){var t=e.getBoundingClientRect(),n=L(t.width)/e.offsetWidth||1,r=L(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=F(t),l=B(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==k(t)||he(a))&&(u=(r=t)!==R(r)&&A(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ce(r)),A(t)?((c=B(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 ke(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 Re={placement:"bottom",modifiers:[],strategy:"absolute"};function Oe(){for(var e=arguments.length,t=new Array(e),n=0;nNe.has(e)&&Ne.get(e).get(t)||null,remove(e,t){if(!Ne.has(e))return;const n=Ne.get(e);n.delete(t),0===n.size&&Ne.delete(e)}},Le="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(Le))},Be=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ue=e=>Be(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ye(e)):null,We=e=>{if(!Be(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"))),Ve=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?Ve(e.parentNode):null},Fe=()=>{},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()},$e=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Je=(e,t,n=!0)=>{if(!n)return void $e(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(Le,o),$e(e))};t.addEventListener(Le,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 _t={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 bt{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=Be(t)?_t.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Be(t)?_t.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=Be(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 Et extends bt{constructor(e,t){super(),(e=Ue(e))&&(this._element=e,this._config=this._getConfig(t),He.set(this._element,this.constructor.DATA_KEY,this))}dispose(){He.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 He.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.0-alpha2"}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 Ye(t)},wt={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)&&We(e)))},getSelectorFromElement(e){const t=Tt(e);return t&&wt.findOne(t)?t:null},getElementFromSelector(e){const t=Tt(e);return t?wt.findOne(t):null},getMultipleElementsFromSelector(e){const t=Tt(e);return t?wt.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=wt.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))};class St extends Et{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"),Xe(St);const Ct='[data-bs-toggle="button"]';class xt extends Et{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=xt.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Ct,(e=>{e.preventDefault();const t=e.target.closest(Ct);xt.getOrCreateInstance(t).toggle()})),Xe(xt);const kt=".bs.swipe",Rt={endCallback:null,leftCallback:null,rightCallback:null},Ot={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class At extends bt{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 Rt}static get DefaultType(){return Ot}static get NAME(){return"swipe"}dispose(){mt.off(this._element,kt)}_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(),$e(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&&$e(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",Mt="prev",Pt="left",Nt="right",Ht="slid.bs.carousel",Lt="carousel",Yt="active",zt=".active",Bt=".carousel-item",Ut={ArrowLeft:Nt,ArrowRight:Pt},Wt={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 Vt extends Et{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=wt.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Lt&&this.cycle()}static get Default(){return Wt}static get DefaultType(){return jt}static get NAME(){return"carousel"}next(){this._slide(It)}nextWhenVisible(){!document.hidden&&We(this._element)&&this.next()}prev(){this._slide(Mt)}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,Ht,(()=>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,Ht,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?It:Mt;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 wt.find(".carousel-item img",this._element))mt.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Pt)),rightCallback:()=>this._slide(this._directionToOrder(Nt)),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=Ut[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=wt.findOne(zt,this._indicatorsElement);t.classList.remove(Yt),t.removeAttribute("aria-current");const n=wt.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(Ht)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return wt.findOne(".active.carousel-item",this._element)}_getItems(){return wt.find(Bt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ke()?e===Pt?Mt:It:e===Pt?It:Mt}_orderToDirection(e){return Ke()?e===Mt?Pt:Nt:e===Mt?Nt:Pt}static jQueryInterface(e){return this.each((function(){const t=Vt.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=wt.getElementFromSelector(this);if(!t||!t.classList.contains(Lt))return;e.preventDefault();const n=Vt.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())})),mt.on(window,"load.bs.carousel.data-api",(()=>{const e=wt.find('[data-bs-ride="carousel"]');for(const t of e)Vt.getOrCreateInstance(t)})),Xe(Vt);const Ft="show",qt="collapse",Zt="collapsing",Gt='[data-bs-toggle="collapse"]',Kt={parent:null,toggle:!0},Xt={parent:"(null|element)",toggle:"boolean"};class $t extends Et{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=wt.find(Gt);for(const e of n){const t=wt.getSelectorFromElement(e),n=wt.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 Kt}static get DefaultType(){return Xt}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=>$t.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=wt.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=Ue(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=wt.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=wt.find(":scope .collapse .collapse",this._config.parent);return wt.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=$t.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 wt.getMultipleElementsFromSelector(this))$t.getOrCreateInstance(e,{toggle:!1}).toggle()})),Xe($t);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=Ke()?"top-end":"top-start",un=Ke()?"top-start":"top-end",cn=Ke()?"bottom-end":"bottom-start",dn=Ke()?"bottom-start":"bottom-end",hn=Ke()?"left-start":"right-start",fn=Ke()?"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 Et{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=wt.next(this._element,an)[0]||wt.prev(this._element,an)[0]||wt.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"),_t.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Be(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:Be(this._config.reference)?e=Ue(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Me(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)&&(_t.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...$e(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=wt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>We(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=wt.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:wt.prev(this,on)[0]||wt.next(this,on)[0]||wt.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()})),Xe(gn);const vn="backdrop",yn="show",_n="mousedown.bs.backdrop",bn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},En={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Tn extends bt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return bn}static get DefaultType(){return En}static get NAME(){return vn}show(e){if(!this._config.isVisible)return void $e(e);this._append();const t=this._getElement();this._config.isAnimated&&qe(t),t.classList.add(yn),this._emulateAnimation((()=>{$e(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(yn),this._emulateAnimation((()=>{this.dispose(),$e(e)}))):$e(e)}dispose(){this._isAppended&&(mt.off(this._element,_n),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),mt.on(e,_n,(()=>{$e(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Je(e,this._getElement(),this._config.isAnimated)}}const wn=".bs.focustrap",Dn="backward",Sn={autofocus:!0,trapElement:null},Cn={autofocus:"boolean",trapElement:"element"};class xn extends bt{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,wn),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,wn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=wt.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 kn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Rn=".sticky-top",On="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,On,(t=>t+e)),this._setElementAttributes(kn,On,(t=>t+e)),this._setElementAttributes(Rn,An,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,On),this._resetElementAttributes(kn,On),this._resetElementAttributes(Rn,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&&_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(Be(e))t(e);else for(const n of wt.find(e,this._element))t(n)}}const Mn=".bs.modal",Pn="hidden.bs.modal",Nn="show.bs.modal",Hn="modal-open",Ln="show",Yn="modal-static",zn={backdrop:!0,focus:!0,keyboard:!0},Bn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Un extends Et{constructor(e,t){super(e,t),this._dialog=wt.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 Bn}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,Nn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Hn),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(Ln),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,Mn),mt.off(this._dialog,Mn),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 xn({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=wt.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),qe(this._element),this._element.classList.add(Ln);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(Hn),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,Pn)}))}_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=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=Un.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=wt.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,Nn,(e=>{e.defaultPrevented||mt.one(t,Pn,(()=>{We(this)&&this.focus()}))}));const n=wt.findOne(".modal.show");n&&Un.getInstance(n).hide();Un.getOrCreateInstance(t).toggle(this)})),Dt(Un),Xe(Un);const Wn="show",jn="showing",Vn="hiding",Fn=".offcanvas.show",qn="hidePrevented.bs.offcanvas",Zn="hidden.bs.offcanvas",Gn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xn extends Et{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 Kn}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(Wn),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(Vn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Wn,Vn),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 xn({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=Xn.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=wt.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),je(this))return;mt.one(t,Zn,(()=>{We(this)&&this.focus()}));const n=wt.findOne(Fn);n&&n!==t&&Xn.getInstance(n).hide();Xn.getOrCreateInstance(t).toggle(this)})),mt.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of wt.find(Fn))Xn.getOrCreateInstance(e).show()})),mt.on(window,"resize.bs.offcanvas",(()=>{for(const e of wt.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Xn.getOrCreateInstance(e).hide()})),Dt(Xn),Xe(Xn);const $n=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Jn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Qn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,er=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!$n.has(n)||Boolean(Jn.test(e.nodeValue)||Qn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},tr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],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:[]};const nr={allowList:tr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},rr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ir={entry:"(string|element|function|null)",selector:"(string|element)"};class or extends bt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return nr}static get DefaultType(){return rr}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},ir)}_setContent(e,t,n){const r=wt.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?Be(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)er(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return $e(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const sr=new Set(["sanitize","allowList","sanitizeFn"]),ar="fade",lr="show",ur=".modal",cr="hide.bs.modal",dr="hover",hr="focus",fr={AUTO:"auto",TOP:"top",RIGHT:Ke()?"left":"right",BOTTOM:"bottom",LEFT:Ke()?"right":"left"},pr={allowList:tr,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"},mr={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 gr extends Et{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 pr}static get DefaultType(){return mr}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(ur),cr,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=(Ve(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(lr),"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(lr),"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(ar,lr),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(ar),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new or({...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(ar)}_isShown(){return this.tip&&this.tip.classList.contains(lr)}_createPopper(e){const t=$e(this._config.placement,[this,e,this._element]),n=fr[t.toUpperCase()];return Me(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 $e(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,...$e(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===dr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===dr?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?hr:dr]=!0,t._enter()})),mt.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?hr:dr]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(ur),cr,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))sr.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=gr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(gr);const vr={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class _r extends gr{static get Default(){return vr}static get DefaultType(){return yr}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=_r.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(_r);const br="click.bs.scrollspy",Er="active",Tr="[href]",wr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Dr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Sr extends Et{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 wr}static get DefaultType(){return Dr}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&&(mt.off(this._config.target,br),mt.on(this._config.target,br,Tr,(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=wt.find(Tr,this._config.target);for(const t of e){if(!t.hash||je(t))continue;const e=wt.findOne(t.hash,this._element);We(e)&&(this._targetLinks.set(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(Er),this._activateParents(e),mt.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))wt.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(Er);else for(const t of wt.parents(e,".nav, .list-group"))for(const e of wt.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(Er)}_clearActiveClass(e){e.classList.remove(Er);const t=wt.find("[href].active",e);for(const e of t)e.classList.remove(Er)}static jQueryInterface(e){return this.each((function(){const t=Sr.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 wt.find('[data-bs-spy="scroll"]'))Sr.getOrCreateInstance(e)})),Xe(Sr);const Cr="ArrowLeft",xr="ArrowRight",kr="ArrowUp",Rr="ArrowDown",Or="active",Ar="fade",Ir="show",Mr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Pr=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Mr}`;class Nr extends Et{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(Or),this._activate(wt.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(Ir)}),e,e.classList.contains(Ar))}_deactivate(e,t){if(!e)return;e.classList.remove(Or),e.blur(),this._deactivate(wt.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(Ir)}),e,e.classList.contains(Ar))}_keydown(e){if(![Cr,xr,kr,Rr].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[xr,Rr].includes(e.key),n=Qe(this._getChildren().filter((e=>!je(e))),e.target,t,!0);n&&(n.focus({preventScroll:!0}),Nr.getOrCreateInstance(n).show())}_getChildren(){return wt.find(Pr,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=wt.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=wt.findOne(e,n);i&&i.classList.toggle(r,t)};r(".dropdown-toggle",Or),r(".dropdown-menu",Ir),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Or)}_getInnerElement(e){return e.matches(Pr)?e:wt.findOne(Pr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Nr.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",Mr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),je(this)||Nr.getOrCreateInstance(this).show()})),mt.on(window,"load.bs.tab",(()=>{for(const e of wt.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Nr.getOrCreateInstance(e)})),Xe(Nr);const Hr="hide",Lr="show",Yr="showing",zr={animation:"boolean",autohide:"boolean",delay:"number"},Br={animation:!0,autohide:!0,delay:5e3};class Ur extends Et{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Br}static get DefaultType(){return zr}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(Hr),qe(this._element),this._element.classList.add(Lr,Yr),this._queueCallback((()=>{this._element.classList.remove(Yr),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(Yr),this._queueCallback((()=>{this._element.classList.add(Hr),this._element.classList.remove(Yr,Lr),mt.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Lr),super.dispose()}isShown(){return this._element.classList.contains(Lr)}_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=Ur.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(Ur),Xe(Ur)},8350: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}),_=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=_.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=_.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 _["date-and-or-time"].fromICAL(e)},toICAL:function(e){return _["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]?_.date.fromICAL(t[0]):"")+(t[1]?"T"+_.time.fromICAL(t[1]):"")},toICAL:function(e){var t=e.split("T");return _.date.toICAL(t[0])+(t[1]?"T"+_.time.toICAL(t[1]):"")}},timestamp:v["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/}}),b=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}),E=t.helpers.extend(g,{binary:v.binary,date:_.date,"date-time":_["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"]}}),w={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:_,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:b},S={value:E,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:w,defaultType:"unknown",components:{vcard:D,vcard3:S,vevent:w,vtodo:w,vjournal:w,valarm:w,vtimezone:w,daylight:w,standard:w},icalendar:w,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 _=d||c;l=o._parseMultiValue(l,_,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?(O=N+7*(M-1))<=E&&this.days.push(D+O):(O=H+7*(M+1))>0&&this.days.push(D+O)}}this.days.sort((function(e,t){return e-t}))}else if(2==p&&"BYDAY"in r&&"BYMONTHDAY"in r){var L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(3==p&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y],z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTH.indexOf(z.month)>=0&&this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(2==p&&"BYDAY"in r&&"BYWEEKNO"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var B=(z=t.Time.fromDayOfYear(x,e)).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(B)&&this.days.push(x)}}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