1import{dc as ae,db as k,a8 as ui,en as Ro,eb as To,e as fi,c as xo,h as Vn,W as Mo,em as Io,ej as No,el as Ho,e2 as Po}from"./index-CmSfgMPc.js";import{b1 as I,b0 as Tt,aZ as h,ae as de,e as Se,aj as hi,N as Dt,aE as Ct,a0 as ko,af as Lo,g as xt,aA as Ao,aB as Wo,a8 as se,m as Bo,ay as Uo,aD as _o,s as Oo,u as jo,r as Fo,D as zo,A as Vo,S as Go,p as Yo}from"./ui-u4xJzAJX.js";import{C as qo,a as Zo}from"./ChevronRight-k26153qC.js";import{C as $o}from"./Close-00w14jVG.js";import{h as Xo}from"./HomeSectionHeader-BlK-fpDE.js";import{P as Ko}from"./Page-DJs2_DnW.js";import{H as Qo}from"./HeaderBreadcrumbs-C37Lb678.js";import{q as Jo}from"./useTeamEvents-CBXR1-Eb.js";import{C as el,E as tl}from"./EventFormDialog-DlsTbGwo.js";import{E as nl}from"./EventDetailsDialog-Iaxxo1Iv.js";import{z as ns,e as rl}from"./eventUtils-2hToJwnU.js";import"./media-UejkmJrh.js";import"./editor-WYCba1gG.js";import"./auth-CAQqEDmo.js";import"./Breadcrumbs-DLl0Yyid.js";import"./ArrowBack-DW5Rw6nZ.js";import"./arrayQueryData-Dbd0Vq1O.js";import"./PracticeEventActionsDropdown-Bt2OwgkC.js";import"./TableRowActionCheckbox-bF_IpQeh.js";import"./FormProvider-DnDUJPhm.js";import"./ConfirmationDialog-R5z214uq.js";import"./index-D71MChHd.js";import"./dashboard-constants-BT1-1P_A.js";import"./useTeamMembers-XvDZ6czZ.js";import"./useTeamDetails-BLrsU1y_.js";import"./is-empty-content-CaH9SNmP.js";import"./useFilteredPlays-DA6m05K6.js";import"./FolderTableRow-DBEc7N-3.js";import"./VirtualizedTable-CdxK8FqE.js";import"./StatusLabel-DQu7jmAq.js";import"./Label-CRbSig1w.js";import"./NestedMenuItem-D35wE-fw.js";import"./useTags-C9AI7So1.js";import"./MyAvatar-cR1nsHSO.js";import"./createAvatar-CgGTnP9k.js";import"./Avatar-DXzv_PDd.js";import"./TeamAvatar-B26t3vgX.js";import"./formatTime-C4LvR0l9.js";import"./utils-C_81NVtf.js";import"./useTable-D_wBxHhD.js";import"./PhaseThumbnail-YFQbd3pN.js";import"./ScrollRootContext-D4rEBX8N.js";import"./PlaySkeleton-XHVeGGQV.js";import"./Phase-CKzTdf-G.js";import"./useDimensions-DmCYnqMc.js";import"./ResizeObserver.es-BS4_j6we.js";import"./phases-D5vuSKXE.js";import"./_baseIteratee-DLZas4sG.js";import"./redux-toolkit.modern-C_3cW4ZS.js";import"./ImageTable-DG1yZaYr.js";import"./uppy_dashboard-DBRda8Tb.js";import"./debounce-EtspMjWp.js";import"./style.min-2_hb6s1z.js";import"./MediaDragPreview-ByvUhh25.js";import"./MenuPopover-BhhsVT9r.js";import"./useDeleteFileUpload-BP-mgE7c.js";import"./Thumbnail-B511Goxn.js";import"./useTabs-BLoPfCsz.js";import"./ClipsFilter-Dl1w7VrN.js";import"./TagsFilterList-oE9g_N-H.js";import"./MobileItemDate-CJzO65ws.js";import"./MobileItemTitle-B977gVqN.js";import"./PlayActionsDropdown-Bpq906fO.js";import"./index-CJRF5krZ.js";import"./SavingTeamPicker-BKfijbSp.js";import"./PlaygroundSelect-C4Zms5eu.js";import"./FolderPickerDialog-DK4NpHzb.js";import"./createFullPlayAnimation-B4_7WyRe.js";import"./plate-editor-BaakbyIW.js";import"./fetch-DBwU5uzv.js";import"./useIsPayingUserV2-1ea6Mwe4.js";import"./PlaysTableSelectedActions-DDgI0u9V.js";import"./usePickerFolderNav-BH6jrFUl.js";import"./PlaysFilter-1QZZ_4Mn.js";import"./tslib.es6-DNoqNiN7.js";import"./index-3IwWtNql.js";import"./FilterChips-k03CiDlL.js";import"./FolderBreadcrumbs-B1nSx_1h.js";import"./AddPracticePlanDialog-D37F4lYf.js";import"./useFilteredRotations-CLNJ4X7m.js";import"./RotationActionsDropdown-BzUxXdK9.js";import"./ShareRotationDialog-Dwh3Vb_K.js";import"./Helper-gg0VhJVF.js";import"./MobileItemInfo-BeYlsNx1.js";import"./useFilteredPlaybooks-CkDrAjC1.js";import"./PlaybookActionsDropdown-C6S7B_sf.js";import"./SavePlaybookDialog-DVNH3Mi6.js";import"./index-CN7p4I9l.js";import"./index-DTVaLiQt.js";import"./useFilteredPracticePlans-UWiv5veq.js";import"./PracticePlanOutput-D5lKsQ59.js";import"./PlayOutput-AZFLiRVd.js";import"./StyledSimpleBar-BBJMU75N.js";import"./simplebar-react.esm-BEXqbx-c.js";import"./settings-Ss96qd0q.js";import"./PlatejsContextProvider-CZfjqL4u.js";import"./utils-F2tmHSVX.js";import"./PlayDialog-BAYKfgkW.js";import"./usePlay-BykHhVGn.js";import"./InlineNumberInput-eky7Hdko.js";import"./Add-Dq0VXF9j.js";import"./NumberInput-B25CIogc.js";import"./useSafeAreaInset-BvbIwqWm.js";import"./DragIndicator-Dr_15w3-.js";import"./index-C78RJQGl.js";import"./practicePlan-Bwg4B7JK.js";import"./v4-Bg-q7VAD.js";import"./EventDetailsContent-BoE2kQru.js";import"./PlayerProfileDialog-Bho75fpA.js";import"./conversationDraft-CtDzc5OA.js";import"./RsvpControl-CLuegZ3U.js";import"./CloseRounded-C9lUJRsm.js";import"./AttendancePills-DalOp7ng.js";import"./SectionLabel-LDJ4y_Gk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ba4960f5-6c80-4613-8133-76866779d48f",t._sentryDebugIdIdentifier="sentry-dbid-ba4960f5-6c80-4613-8133-76866779d48f")}catch{}})();function Re(t,e,n,r,s){return sl(e,((i,a)=>{const o=i[a];if(o===void 0)throw new TypeError(Rc(a));return o}
1)(t,e),n,r)}function sl(t,e,n,r,s,i){const a=Yn(e,n,r);if(e!==a)throw new RangeError(Cc(t,e,n,r));return a}function il(t){return t!==null&&/object|function/.test(typeof t)}function ve(t,e=Map){const n=new e;return(r,...s)=>{if(n.has(r))return n.get(r);const i=t(r,...s);return n.set(r,i),i}}function gr(t,e){const n={};let r=t.length;for(const s of e)n[t[--r]]=s;return n}function al(t,e,n){const r={};for(const s in e)r[s]=t(e[s],s,n);return r}function gi(t,e,n){const r={};for(let s=0;s<e.length;s++){const i=e[s];r[i]=t(i,s,n)}return r}function ol(t,e,n){const r={};for(let s=0;s<t.length;s++)r[e[s]]=n[t[s]];return r}function ll(t,e){const n=Object.create(null);for(const r of t)n[r]=e[r];return n}function We(t,...e){return(...n)=>t(...e,...n)}function rs(t){return t[0].toUpperCase()+t.substring(1)}function mi(t){return t.slice().sort()}function pi(t,e){return String(e).padStart(t,"0")}function Gn(t,e){return Math.sign(t-e)}function Yn(t,e,n){return Math.min(Math.max(t,e),n)}function je(t,e){return[Math.floor(t/e),cl(t,e)]}function cl(t,e){return(t%e+e)%e}function Mt(t,e){return[vi(t,e),yi(t,e)]}function vi(t,e){return Math.trunc(t/e)||0}function yi(t,e){return t%e||0}function dl(t,e,n){let r=0,s=0;for(let o=0;o<=e;o++){const l=t[n[o]],c=Ii[o],d=oe/c,[u,g]=Mt(l,d);r+=g*c,s+=u}const[i,a]=Mt(r,oe);return[s+i,a]}function ul(t,e,n){const r={};for(let s=e;s>=0;s--){const i=Ii[s];r[n[s]]=vi(t,i),t=yi(t,i)}return r}function fl(t){if(!il(t))throw new TypeError(Dc);return t}function hl(t,e,n=t){if(typeof e!==t)throw new TypeError(Wt(n,e));return e}function gl(t,e="number"){if(!Number.isInteger(t))throw new RangeError(Sc(e,t));return t||0}function ml(t){if(typeof t=="symbol")throw new TypeError(wc);return String(t)}function Si(t,e="number"){if(typeof t=="bigint")throw new TypeError(bc(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Ec(e,t));return t}function pl(t,e){return Math.trunc(Si(t,e))||0}function vl(t,e){return gl(Si(t,e),e)}function yl(t,e){let[n,r]=Mt(e,oe),s=t+n;const i=Math.sign(s);return i&&i===-Math.sign(r)&&(s-=i,r+=i*oe),[s,r]}function on(t,e){return yl(t[0],t[1]+e)}function ss(t,e){return Gn(t[0],e[0])||Gn(t[1],e[1])}function Sl(t,e,n){return ss(t,e)===-1||ss(t,n)===1}function qn(t,e=1){const n=oe/e,[r,s]=Mt(t,n);return[r,s*e]}function Ei(t,e,n=je){const[r,s]=t,[i,a]=n(s,e);return[r*(oe/e)+i,a]}function El(t){const e=Re(t,"isoYear",$n,Zn),n=e===$n?1:e===Zn?-1:0;return n&&At(yn({...t,isoDay:t.isoDay+n,isoNanosecond:t.isoNanosecond-n})),t}function At(t){if(!t||Sl(t,Zc,qc))throw new RangeError(vr);return t}function bl(t){return dl(t,5,gt)[1]}function wl(t){const[e,n]=je(t,oe);return[ul(n,5,gt),e]}function Dl(t){return bi(t)[0]}function bi(t){return Ei(t,Fe)}function mr(t){return Sn(t.isoYear,t.isoMonth,t.isoDay,t.isoHour,t.isoMinute,t.isoSecond,t.isoMillisecond)}function yn(t){const e=mr(t);if(e!==void 0){const[n,r]=Mt(e,xe);return[n,r*ft+(t.isoMicrosecond||0)*En+(t.isoNanosecond||0)]}}function Cl(t,e){const[n,r]=wl(bl(t)-e);return At(yn({...t,isoDay:t.isoDay+r,...n}))}function ln(...t){return Sn(...t)/Mi}function Sn(...t){const[e,n]=Rl(...t),r=e.valueOf();if(!isNaN(r))return r-n*xe}function Rl(t,e=1,n=1,r=0,s=0,i=0,a=0){const o=t===$n?1:t===Zn?-1:0,l=new Date;return l.setUTCHours(r,s,i,a),l.setUTCFullYear(t,e-1,n+o),[l,o]}function wi(t,e){let[n,r]=on(t,e);r<0&&(r+=oe,n-=1);const[s,i]=je(r,ft),[a,o]=je(i,En);return Tl(n*xe+s,a,o)}function Tl(t,e=0,n=0){const r=Math.ceil(Math.max(0,Math.abs(t)-wr)/xe)*Math.sign(t),s=new Date(t-r*xe);return gr(Er,[s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate()+r,s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds(),e,n])}function pr(t,e){if(e<-wr)throw new RangeError(vr);const n=t.formatToParts(e),r={};for(const s of n)r[s.type]=s.value;return r}function xl(t){return[t.isoYear,t.isoMonth,t.isoDay]}function Ml(t,e){return[e,0]}function Il(){return Xc}function Nl(t,e){switch(e){case 2:return Hl(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Hl(t){return t%4==0&&(t%100!=0||t%400==0)}function Pl(t){return this.id===Bt?(({isoYear:e})=>e<1?["gregory-inverse",1-e]:["gregory",e])(t):this.id===at?Qc(t):[]}function kl(t){const e=mr(t);if(e<Kc){const{isoYear:i}=t;return i<1?["japanese-inverse",1-i]:["japanese",i]}const n=pr(Rr(at),e),{era:r,eraYear:s}=Ti(n,at);return[r,s]}function Ll(t){return Al(t),Bl(t),t}function Al(t){return Wl(t),t}function Wl(t,e){const{isoYear:n}=t,r=Re(t,"isoMonth",1,Il());return{isoYear:n,isoMonth:r,isoDay:Re(t,"isoDay",1,Nl(n,r))}}function Bl(t,e){return gr(gt,[Re(t,"isoHour",0,23),Re(t,"isoMinute",0,59),Re(t,"isoSecond",0,59),Re(t,"isoMillisecond",0,999),Re(t,"isoMicrosecond",0,999),Re(t,"isoNanosecond",0,999)])}function Ul(t){return t===void 0?{}:fl(t)}function _l(t,e,n,r=0){const s=n[t];if(s===void 0)return r;const i=ml(s),a=e[i];if(a===void 0)throw new RangeError(Tc(t,i,e));return a}function Ol(t){return{branding:rd,epochNanoseconds:t}}function Di(t,e,n){return{branding:nd,calendar:n,timeZone:e,epochNanoseconds:t}}function jl(t,e=t.calendar){return{branding:td,calendar:e,...ll(Gc,t)}}function Fl(t){return Ei(t.epochNanoseconds,ft)[0]}function Ci(t,e=0){if(e===1)return"";const[n,r]=je(Math.abs(t),Sr),[s,i]=je(r,yr),[a,o]=je(i,Fe);return Vl(t)+en(n)+":"+en(s)+(a||o?":"+en(a)+zl(o):"")}function zl(t,e){let n=pi(9,t);return n=n.replace(ad,""),n?"."+n:""}function Vl(t){return t<0?"-":"+"}function Gl(t,e){const{epochNanoseconds:n}=t,r=(e.N?e:e(t.timeZone)).N(n),s=wi(n,r);return{calendar:t.calendar,...s,offsetNanoseconds:r}}function Yl(t,e,n=0,r=t.v(e)){if(r.length===1)return r[0];if(n===1)throw new RangeError(kc);if(r.length)return r[n===3?1:0];const s=yn(e),i=((o,l)=>{const c=o.N(on(l,-oe));return(d=>{if(d>oe)throw new RangeError(Pc);return d})(o.N(on(l,oe))-c)})(t,s),a=i*(n===2?-1:1);return(r=t.v(wi(s,a)))[n===2?0:r.length-1]}function ql(t,e){return[t,e]}function is(t){const e=Math.floor(t/tn)*tn;return[e,e+tn]}function Zl(t,e){const n=hd.exec(t);return n?((r,s)=>{const i=r[4]||r[5];if(i)throw new RangeError(Lc(i));return(a=>{if(Math.abs(a)>=oe)throw new RangeError(Hc);return a})((Pn(r[2])*Sr+Pn(r[3])*yr+Pn(r[4])*Fe+$l(r[5]||""))*Kl(r[1]))})(n):void 0}function $l(t){return parseInt(t.padEnd(9,"0"))}function Xl(t){return new RegExp(`^${t}$`,"i")}function Kl(t){return t&&t!=="+"?-1:1}function Pn(t){return t===void 0?0:parseInt(t)}function Ql(t){return Jl(Ni(t))}function Jl(t){const e=Ri(t);return typeof e=="number"?Ci(e):e?(n=>{if(pd.test(n))throw new RangeError(Ic(n));if(md.test(n))throw new RangeError(Nc);return n.toLowerCase().split("/").map((r,s)=>(r.length<=3||/\d/.test(r))&&!/etc|yap/.test(r)?r.toUpperCase():r.replace(/baja|dumont|[a-z]+/g,(i,a)=>i.length<=2&&!s||i==="in"||i==="chat"?i.toUpperCase():i.length>2||!a?rs(i).replace(/island|noronha|murdo|rivadavia|urville/,rs):i)).join("/")})(t):Dr}function Ri(t){const e=Zl(t=t.toUpperCase());return e!==void 0?e:t!==Dr?gd(t):void 0}function ec(t,e){return"M"+en(t)+(e?"L":"")}function tc(t,e){return t-(e&&t>=e?1:0)}function nc(t,e){return(e+t)*(Math.sign(e)||1)||0}function rc(t){return Fc[sc(t)]}function sc(t){return cn(t.id||ht)}function ic(t){function e(s){return((i,a)=>({...Ti(i,a),V:i.month,day:parseInt(i.day)}))(pr(n,s),r)}const n=Rr(t),r=cn(t);return{id:t,_:ac(e),J:oc(e)}}function ac(t){return ve(e=>{const n=mr(e);return t(n)},WeakMap)}function oc(t){const e=t(0).year-$c;return ve(n=>{let r,s=Sn(n-e),i=0;const a=[],o=[];do s+=400*xe;while((r=t(s)).year<=n);do if(s+=(1-r.day)*xe,r.year===n&&(a.push(s),o.push(r.V)),s-=xe,++i>100||s<-wr)throw new RangeError(xc);while((r=t(s)).year>=n);return{K:a.reverse(),X:Ac(o.reverse())}})}function Ti(t,e){let n,r,s=xi(t);if(t.era){const i=Oc[e],a=jc[e]||{};i!==void 0&&(n=e==="islamic"?"ah":t.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,""),n==="bc"||n==="b"?n="bce":n==="ad"||n==="a"?n="ce":n==="beforeroc"&&(n="broc"),n=a[n]||n,r=s,s=nc(r,i[n]||0))}return{era:n,eraYear:r,year:s}}function xi(t){return parseInt(t.relatedYear||t.year)}function lc(t){const{year:e,V:n,day:r}=this._(t),{X:s}=this.J(e);return[e,s[n]+1,r]}function cc(t,e){const n=dc.call(this,t);return[tc(e,n),n===e]}function dc(t){const e=as(this,t),n=as(this,t-1),r=e.length;if(r>n.length){const s=rc(this);if(s<0)return-s;for(let i=0;i<r;i++)if(e[i]!==n[i])return i+1}}function uc(t){const e=this._(t);return[e.era,e.eraYear]}function as(t,e){return Object.keys(t.J(e).X)}function fc(t){return hc(Ni(t))}function hc(t){if((t=t.toLowerCase())!==ht&&t!==Bt){const e=Rr(t).resolvedOptions().calendar;if(cn(t)!==cn(e))throw new RangeError(Mc(t));return e}return t}function cn(t){return t==="islamicc"&&(t="islamic"),t.split("-")[0]}function gc(t,e){return n=>n===ht?t:n===Bt||n===at?Object.assign(Object.create(t),{id:n}):Object.assign(Object.create(e),vd(n))}function mc(t,e,n,r,s=0,i=0,a=0,o=0,l=0,c=0,d=ht){return jl(El(Ll(al(pl,gr(Er,[e,n,r,s,i,a,o,l,c])))),t(d))}function pc(t,e,n=ht){return Di(t.epochNanoseconds,e,n)}function vc(t,e,n,r){const s=((i,a,o,l)=>{const c=(d=>ed(Ul(d)))(l);return Yl(i(a),o,c)})(t,n,e,r);return Di(At(s),n,e.calendar)}function yc(t){return Ol(At(qn(vl(t),ft)))}const Sc=(t,e)=>
1`Non-integer ${t}: ${e}`,Ec=(t,e)=>`Non-finite ${t}: ${e}`,bc=t=>`Cannot convert bigint to ${t}`,wc="Cannot convert Symbol to string",Dc="Invalid object",Cc=(t,e,n,r,s)=>Wt(t,e)+`; must be between ${n}-${r}`,Wt=(t,e)=>`Invalid ${t}: ${e}`,Rc=t=>`Missing ${t}`,Tc=(t,e,n)=>Wt(t,e)+"; must be "+Object.keys(n).join(),xc="Invalid protocol results",Mc=t=>Wt("Calendar",t),Ic=t=>Wt("TimeZone",t),Nc="Forbidden ICU TimeZone",Hc="Out-of-bounds offset",Pc="Out-of-bounds TimeZone gap",kc="Ambiguous offset",vr="Out-of-bounds date",Lc=t=>`Invalid substring: ${t}`,Ac=We(gi,(t,e)=>e),Wc=We(gi,(t,e,n)=>n),en=We(pi,2),Bc={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Uc=Object.keys(Bc),xe=864e5,Mi=1e3,En=1e3,ft=1e6,Fe=1e9,yr=6e10,Sr=36e11,oe=864e11,Ii=[1,En,ft,Fe,yr,Sr,oe],_c=Uc.slice(0,6),ht="iso8601",Bt="gregory",at="japanese",Oc={[Bt]:{"gregory-inverse":-1,gregory:0},[at]:{"japanese-inverse":-1,japanese:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018},ethiopic:{ethioaa:0,ethiopic:5500},coptic:{"coptic-inverse":-1,coptic:0},roc:{"roc-inverse":-1,roc:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0}},jc={[Bt]:{bce:"gregory-inverse",ce:"gregory"},[at]:{bce:"japanese-inverse",ce:"japanese"},ethiopic:{era0:"ethioaa",era1:"ethiopic"},coptic:{era0:"coptic-inverse",era1:"coptic"},roc:{broc:"roc-inverse",minguo:"roc"}},Fc={chinese:13,dangi:13,hebrew:-6},Ni=We(hl,"string"),gt=["isoNanosecond","isoMicrosecond","isoMillisecond","isoSecond","isoMinute","isoHour"],zc=["isoDay","isoMonth","isoYear"],Er=gt.concat(zc),Vc=mi(gt),Gc=mi(Er),Yc=Wc(Vc,0),br=1e8,wr=br*xe,qc=[br,0],Zc=[-br,0],Zn=275760,$n=-271821,Hi=Intl.DateTimeFormat,$c=1970,Xc=12,Kc=Sn(1868,9,8),Qc=ve(kl,WeakMap),Jc={compatible:0,reject:1,earlier:2,later:3},ed=We(_l,"disambiguation",Jc),td="PlainDateTime",nd="ZonedDateTime",rd="Instant",Dr="UTC",tn=5184e3,sd=ln(1847),id=ln((()=>{const t=new Date;return(t.getTime()===0?2040:t.getUTCFullYear())+10})()),ad=/0+$/,Pi=ve(Gl,WeakMap),Cr=ve(t=>{const e=Ri(t);return typeof e=="object"?new ld(e):new od(e||0)});class od{constructor(e){this.j=e}N(){return this.j}v(e){return(n=>{const r=yn({...n,...Yc});if(!r||Math.abs(r[0])>1e8)throw new RangeError(vr)})(e),[Cl(e,this.j)]}l(){}}class ld{constructor(e){this.ae=(n=>{function r(c){const d=Yn(c,o,l),[u,g]=is(d),m=i(u),y=i(g);return m===y?m:s(a(u,g),m,y,c)}function s(c,d,u,g){let m,y;for(;(g===void 0||(m=g<c[0]?d:g>=c[1]?u:void 0)===void 0)&&(y=c[1]-c[0]);){const p=c[0]+Math.floor(y/2);n(p)===u?c[1]=p:c[0]=p+1}return m}const i=ve(n),a=ve(ql);let o=sd,l=id;return{se(c){const d=r(c-86400),u=r(c+86400),g=c-d,m=c-u;if(d===u)return[g];const y=r(g);return y===r(m)?[c-y]:d>u?[g,m]:[]},ue:r,l(c,d){const u=Yn(c,o,l);let[g,m]=is(u);const y=tn*d,p=d<0?()=>m>o||(o=u,0):()=>g<l||(l=u,0);for(;p();){const E=i(g),D=i(m);if(E!==D){const C=a(g,m);s(C,E,D);const w=C[0];if((Gn(w,c)||1)===d)return w}g+=y,m+=y}}}})((n=>r=>{const s=pr(n,r*Mi);return ln(xi(s),parseInt(s.month),parseInt(s.day),parseInt(s.hour),parseInt(s.minute),parseInt(s.second))-r})(e))}N(e){return this.ae.ue(Dl(e))*Fe}v(e){const[n,r]=[ln((s=e).isoYear,s.isoMonth,s.isoDay,s.isoHour,s.isoMinute,s.isoSecond),s.isoMillisecond*ft+s.isoMicrosecond*En+s.isoNanosecond];var s;return this.ae.se(n).map(i=>At(on(qn(i,Fe),r)))}l(e,n){const[r,s]=bi(e),i=this.ae.l(r+(n>0||s?1:0),n);if(i!==void 0)return qn(i,Fe)}}const cd="([+-])",dd="(?:[.,](\\d{1,9}))?",ud="(\\d{2})(?::?(\\d{2})(?::?(\\d{2})"+dd+")?)?",fd=cd+ud,hd=Xl(fd),gd=ve(t=>new Hi("en",{calendar:ht,timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:0})),md=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,pd=/[^\w\/:+-]+/,vd=ve(ic),Rr=ve(t=>new Hi("en",{calendar:t,timeZone:Dr,era:"short",year:"numeric",month:"short",day:"numeric",hour12:0})),yd={u:xl,$:Pl,m:Ml},Sd={u:lc,$:uc,m:cc},Ed=gc(yd,Sd),bd=We(ol,gt,_c);function wd(t,e){return pc(t,Ql(e))}function Dd(t){const e=Ed(t.calendar),[n,r,s]=e.u(t),[i,a]=e.$(t),[o,l]=e.m(n,r);return{era:i,eraYear:a,year:n,monthCode:ec(o,l),month:r,day:s}}function Cd(t){return Pi(t,Cr).offsetNanoseconds}const Rd=yc,Td=ve(t=>{const e=Pi(t,Cr),n=Ci(e.offsetNanoseconds);return{...Dd(e),...bd(e),offset:n}},WeakMap),xd=Fl,os=We(mc,fc),ls=We(vc,Cr);function cs(t,e){let n=ot(t);return n[2]+=e*7,fe(n)}function K(t,e){let n=ot(t);return n[2]+=e,fe(n)}function Ve(t,e){let n=ot(t);return n[6]+=e,fe(n)}function Md(t,e){return Ze(t,e)/7}function Ze(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function Id(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function Nd(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function Hd(t,e){return(e.valueOf()-t.valueOf())/1e3}function Pd(t,e){let n=j(t),r=j(e);return{years:0,months:0,days:Math.round(Ze(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function ki(t,e){let n=It(t,e);return n!==null&&n%7===0?n/7:null}function It(t,e){return nt(t)===nt(e)?Math.round(Ze(t,e)):null}function j(t){return fe([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function kd(t){return fe([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function Ld(t){return fe([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function Ad(t){return fe([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function Wd(t,e,n){let r=t.getUTCFullYear(),s=kn(t,r,e,n);if(s<1)return kn(t,r-1,e,n);let i=kn(t,r+1,e,n);return i>=1?Math.min(s,i):s}function kn(t,e,n,r){let s=fe([e,0,1+Bd(e,n,r)]),i=j(t),a=Math.round(Ze(s,i));return Math.floor(a/7)+1}function Bd(t,e,n){let r=7+e-n;return-((7+fe([t,0,r]).getUTCDay()-e)%7)+r-1}function Ud(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function ds(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function ot(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function fe(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function Li(t){return!isNaN(t.valueOf())}function nt(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}let Ai={};function _d(t,e){Ai[t]=e}function Od(t){return new Ai[t]}class jd{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return fe(e)}markerToArray(e){return ot(e)}}_d("gregory",jd);function Fd(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function us(t,e){let n=[],{start:r}=e,s,i;for(t.sort(zd),s=0;s<t.length;s+=1)i=t[s],i.start>r&&n.push({start:r,end:i.start}),i.end>r&&(r=i.end);return r<e.end&&n.push({start:r,end:e.end}),n}function zd(t,e){return t.start.valueOf()-e.start.valueOf()}function ke(t,e){let{start:n,end:r}=t,s=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(s={start:n,end:r}),s}function Vd(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function Tr(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function bn(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function Me(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function Gd(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function fs(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function dn(t,e,n){let r=fs(t,n.calendarSystem),s=e?fs(e,n.calendarSystem):null;return{date:r,start:r,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes}}function nn(t){return t%1===0}function st(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}const hs=["years","months","days","milliseconds"],Yd=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function U(t,e){return typeof t=="string"?qd(t):typeof t=="object"&&t?gs(t):typeof t=="number"?gs({[e||"milliseconds"]:t}):null}function qd(t){let e=Yd.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function gs(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function Zd(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Xn(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function $d(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function Xd(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function Kd(t){return it(t)/365}function Qd(t){return it(t)/30}function it(t){return Ie(t)/864e5}function Ie(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function xr(t,e){let n=null;for(let r=0;r<hs.length;r+=1){let s=hs[r];if(e[s]){let i=t[s]/e[s];if(!nn(i)||n!==null&&n!==i)return null;n=i}else if(t[s])return null}return n}function Kn(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function Wi(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",wn(e,!0)))),r}function mt(t){return t.toISOString().replace(/T.*$/,"")}function ms(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function Jd(t){return st(t.getUTCHours(),2)+":"+st(t.getUTCMinutes(),2)+":"+st(t.getUTCSeconds(),2)}function wn(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),i=Math.round(r%60);return e?`${n+st(s,2)}:${st(i,2)}`:`GMT${n}${s}${i?`:${st(i,2)}`:""}`}function ne(t){let e="";for(const n of t)e+=n.value;return e}const eu=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function tu(t){let e=eu.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(Li(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class nu{constructor(e){this.timeZone=e.timeZone,this.calendarSystem=Od(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekTextLong=e.weekTextLong,this.weekTextShort=e.weekTextShort??e.weekTextLong,this.cmdFormatter=e.cmdFormatter}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.timestampToMarker(new Date().valueOf())}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=fe(e)),n===null||!Li(n)?null:{marker:n,isTimeUnspecified:!1}}parse(e){let n=tu(e);if(n===null)return null;let{marker:r}=n;return n.timeZoneOffset!==null&&(r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3)),{marker:r,isTimeUnspecified:n.isTimeUnspecified}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}
1addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return nt(e)===nt(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return nt(e)===nt(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=ki(e,n),r!==null?{unit:"week",value:r}:(r=It(e,n),r!==null?{unit:"day",value:r}:(r=Id(e,n),nn(r)?{unit:"hour",value:r}:(r=Nd(e,n),nn(r)?{unit:"minute",value:r}:(r=Hd(e,n),nn(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let s;return r.years&&(s=this.diffWholeYears(e,n),s!==null)?s/Kd(r):r.months&&(s=this.diffWholeMonths(e,n),s!==null)?s/Qd(r):r.days&&(s=It(e,n),s!==null)?s/it(r):(n.valueOf()-e.valueOf())/Ie(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?j(e):n==="hour"?kd(e):n==="minute"?Ld(e):n==="second"?Ad(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):Wd(e,this.weekDow,this.weekDoy)}formatToParts(e,n){return n.formatToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},this)}formatRangeToParts(e,n,r,s={}){return s.isEndExclusive&&(n=Ve(n,-1)),r.formatRangeToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},{marker:n,timeZoneOffset:this.offsetForMarker(n)},this)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(r=this.offsetForMarker(e)),Wi(e,r,n.omitTime)}timestampToMarker(e){if(this.timeZone==="local")return fe(Ud(new Date(e)));if(this.timeZone==="UTC")return new Date(e);const n=Td(wd(Rd(e),this.timeZone));return new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond))}offsetForMarker(e){return this.timeZone==="local"?-ds(ot(e)).getTimezoneOffset():this.timeZone==="UTC"?0:Cd(ls(os(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone))/(1e9*60)}toDate(e){return this.timeZone==="local"?ds(ot(e)):this.timeZone==="UTC"?new Date(e.valueOf()):new Date(xd(ls(os(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone)))}}const ru=new Set(["week","meridiem","omitZeroMinute","omitCommas","forceCommas","omitTrailing","weekdayJustify"]),qt=/([ap])\.?m\.?/i,su=/,/g,iu=/\u200e/g,au=/[\s.,]+$/,Qn=/^\s+$/;class ou{constructor(e){const n={},r={};for(const s in e)ru.has(s)?r[s]=e[s]:n[s]=e[s];n.timeZoneName==="long"&&(n.timeZoneName="short"),this.timeZoneOnly=Object.keys(n).length===1&&n.timeZoneName==="short",this.weekOnly=!!(!Object.keys(n).length&&r.week),this.timeZoneOnly||(n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),r.omitZeroMinute&&(n.second||n.fractionalSecondDigits)&&delete r.omitZeroMinute,n.timeZone="UTC"),this.standardOptions=n,this.extendedOptions=r}formatToParts(e,n){const{standardOptions:r,extendedOptions:s}=this;if(this.timeZoneOnly)return[{type:"timeZoneName",value:wn(e.timeZoneOffset)}];if(this.weekOnly)return du(n.computeWeekNumber(e.marker),n.weekTextLong,n.weekTextShort,n.locale,s.week);const{normalFormat:i,zeroFormat:a}=this.getFormats(n),l=(a&&!e.marker.getUTCMinutes()?a:i).formatToParts(e.marker);return lu(l,e,r,s)}formatRangeToParts(e,n,r){const{standardOptions:s,extendedOptions:i}=this;if(this.timeZoneOnly||this.weekOnly)return this.formatToParts(e,r).map(d=>({source:d.type==="literal"?"shared":"startRange",...d}));const{normalFormat:a,zeroFormat:o}=this.getFormats(r),c=(o&&!e.marker.getUTCMinutes()&&!n.marker.getUTCMinutes()?o:a).formatRangeToParts(e.marker,n.marker);return cu(c,e,n,s,i)}getFormats(e){if(this.cachedContext!==e){const{standardOptions:n,extendedOptions:r}=this,{codes:s}=e.locale,i=new Intl.DateTimeFormat(s,n);let a;if(r.omitZeroMinute){const o={...n};delete o.minute,a=new Intl.DateTimeFormat(s,o)}this.cachedContext=e,this.cachedFormats={normalFormat:i,zeroFormat:a}}return this.cachedFormats}}function Bi(t,e,n){let r=!1,s;for(const i of t){const a=i.type==="literal";if(a||i.type==="dayPeriod"){let o=i.value;if(o=o.replace(iu,""),e.omitCommas&&(o=o.replace(su,"")),!a){const{meridiem:l}=e;l===!1?o=o.replace(qt,""):l==="narrow"?o=o.replace(qt,(c,d)=>d.toLocaleLowerCase()):l==="short"?o=o.replace(qt,(c,d)=>`${d.toLocaleLowerCase()}m`):l==="lowercase"&&(o=o.replace(qt,c=>c.toLocaleLowerCase())),s&&(s.value=s.value.trimEnd())}i.value=o}else if(i.type==="timeZoneName"){const o=n(i);o!=null&&(i.value=o,r=!0)}s=a?i:void 0}
1return{lastLiteral:s,anyTzInjected:r}}function lu(t,e,n,r){const s=n.timeZoneName==="short"?e.timeZoneOffset==null?"UTC":wn(e.timeZoneOffset):void 0,{lastLiteral:i,anyTzInjected:a}=Bi(t,r,()=>s);if(s&&!a&&(i?i.value+=" ":t.push({type:"literal",value:" "}),t.push({type:"timeZoneName",value:s})),r.weekdayJustify&&t.length===3&&Qn.test(t[1].value)&&t[r.weekdayJustify==="start"?2:0].type==="weekday"&&t.reverse(),r.forceCommas)for(const o of t)o.type==="literal"&&Qn.test(o.value)&&(o.value=`,${o.value}`);return r.omitTrailing&&Ui(t),t.filter(o=>o.value)}function cu(t,e,n,r,s){const i=r.timeZoneName==="short";if(Bi(t,s,a=>{if(!i)return;const o=a.source==="endRange"?n.timeZoneOffset:e.timeZoneOffset;return o==null?"UTC":wn(o)}),s.forceCommas)for(const a of t)a.type==="literal"&&Qn.test(a.value)&&(a.value=`,${a.value}`);return s.omitTrailing&&Ui(t),t.filter(a=>a.value)}function Ui(t){const e=t[t.length-1];(e==null?void 0:e.type)==="literal"&&(e.value=e.value.replace(au,""),e.value||t.pop())}function du(t,e,n,r,s){const i=[];return s==="long"?i.push({type:"literal",value:e}):(s==="short"||s==="narrow")&&i.push({type:"literal",value:n}),(s==="long"||s==="short")&&i.push({type:"literal",value:" "}),i.push({type:"week",value:r.simpleNumberFormat.format(t)}),r.options.direction==="rtl"&&i.reverse(),i}class uu{constructor(e){this.cmdStr=e}formatToParts(e,n){const r=n.cmdFormatter(this.cmdStr,dn(e,null,n));return Array.isArray(r)?r:[{type:"literal",value:r}]}formatRangeToParts(e,n,r){const s=r.cmdFormatter(this.cmdStr,dn(e,n,r));return Array.isArray(s)?s.map(i=>({source:"shared",...i})):[{source:"shared",type:"literal",value:s}]}}class fu{constructor(e){this.func=e}formatToParts(e,n){return[{type:"literal",value:this.func(dn(e,null,n))}]}formatRangeToParts(e,n,r){return[{source:"shared",type:"literal",value:this.func(dn(e,n,r))}]}}var f={popoverZ:"fc-dx",isolate:"fc-BT",borderBoxRoot:"fc-Yl",notAllowed:"fc-hV",noScrollbars:"fc-38",noShrink:"fc-jE",calendarScreenRoot:"fc-D5",safeTiles:"fc-hc",calendarPrintRoot:"fc-K9",cursorPointer:"fc-Du",cursorResizeT:"fc-Pr",cursorResizeB:"fc-DU",cursorResizeS:"fc-tA",cursorResizeE:"fc-kD",hit:"fc-LN",hitX:"fc-i5",hitY:"fc-9K",borderNone:"fc-oS",borderOnlyT:"fc-qY",borderOnlyB:"fc-QI",borderOnlyS:"fc-Wv",borderlessX:"fc-oz",fakeBorderS:"fc-EG",flexRow:"fc-GE",flexCol:"fc-In",grow:"fc-az",liquid:"fc-zC",minHeight0:"fc-LI",liquidX:"fc-8X",printRoot:"fc-aE",printHeader:"fc-y9",noPadding:"fc-uY",noMargin:"fc-6K",noMarginX:"fc-ji",whiteSpaceNoWrap:"fc-W9",whiteSpacePre:"fc-15",overflowAnchorNone:"fc-er",crop:"fc-1F",rel:"fc-4b",abs:"fc-QE",start0:"fc-Vl",fill:"fc-GW",fillTop:"fc-Hr",fillX:"fc-zt",fillY:"fc-t3",fillStart:"fc-Aw",sticky:"fc-p1",stickyT:"fc-mE",stickyS:"fc-XH",tableHeaderSticky:"fc-bg",contentBox:"fc-U1",alignCenter:"fc-DB",alignStart:"fc-7Q",alignEnd:"fc-Za",footerScrollbarSticky:"fc-U3",footerScrollbar:"fc-2V",breakInsideAvoid:"fc-7h",printSiblingRow:"fc-wm",z0:"fc-Fo",z1:"fc-cy",focusZ2:"fc-zN",internalEvent:"fc-WD",internalEventMirror:"fc-3l",internalEventDraggable:"fc-TR",internalEventSelected:"fc-ZO",internalEventResizable:"fc-ft",internalEventResizer:"fc-8C",internalEventResizerStart:"fc-88",internalEventResizerEnd:"fc-j1",internalBgEvent:"fc-xA",internalMoreLink:"fc-Jq",internalNavLink:"fc-3T",internalPopover:"fc-RO",internalView:"fc-w9",internalScroller:"fc-HS"};function v(...t){return t.filter(Boolean).join(" ")}function Nt(t){return t*100+"%"}function O(t){return typeof t=="object"&&t?new ou(t):typeof t=="string"?new uu(t):typeof t=="function"?new fu(t):null}function Le(...t){console.warn("FullCalendar:",...t)}const ps={};function ee(t,e){return!t||typeof t=="string"?t:(hu(e),"")}function R(t,e){return typeof t=="function"?n=>ee(t(n),e):ee(t,e)}function hu(t){ps[t]||(Le(`Invalid option \`${t}\`: expected a className string or a falsy value.`),ps[t]=!0)}function Dn(t){t.preventDefault()}function gu(t,e){return n=>{let r=n.target.closest(t);r&&e.call(r,n,r)}}function _i(t,e,n,r){let s=gu(n,r);return t.addEventListener(e,s),()=>{t.removeEventListener(e,s)}}function mu(t,e,n,r){let s;return _i(t,"mouseover",e,(i,a)=>
1{if(a!==s){s=a,n(i,a);let o=l=>{s=null,r(l,a),a.removeEventListener("mouseleave",o)};a.addEventListener("mouseleave",o)}})}const vs=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function pu(t,e){let n=r=>{e(r),vs.forEach(s=>{t.removeEventListener(s,n)})};vs.forEach(r=>{t.addEventListener(r,n)})}function Mr(t){return{onClick:t,...Oi(t)}}function Oi(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let ys=0;function He(){return ys+=1,String(ys)}function Ir(){document.body.classList.add(f.notAllowed)}function Nr(){document.body.classList.remove(f.notAllowed)}function vu(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",Dn)}function yu(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",Dn)}function Su(t){t.addEventListener("contextmenu",Dn)}function Eu(t){t.removeEventListener("contextmenu",Dn)}function bu(t){let e=[],n=[],r,s;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)s=n[r],typeof s=="string"?e.push(s.charAt(0)==="-"?{field:s.substring(1),order:-1}:{field:s,order:1}):typeof s=="function"&&e.push({func:s});return e}function wu(t,e,n){let r,s;for(r=0;r<n.length;r+=1)if(s=Du(t,e,n[r]),s)return s;return 0}function Du(t,e,n){return n.func?n.func(t,e):Cu(t[n.field],e[n.field])*(n.order||1)}function Cu(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function ue(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,s,i)=>r.replace("$"+i,s||""),t):n}function Ru(t,e){return t-e}function ji(t,e){return t===e}function Ee(t){const e=t.borderless;return{borderlessX:!!(t.borderlessX??e),borderlessTop:!!(t.borderlessTop??e),borderlessBottom:!!(t.borderlessBottom??e)}}const{hasOwnProperty:lt}=Object.prototype;function Ge(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function Ne(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function Fi(t){let e=[];for(let n in t)e.push(t[n]);return e}function zi(t){let e={};for(let n of t)e[n]=!0;return e}function Tu(t,e){return typeof t=="object"&&t&&typeof e=="object"&&e?Hr(t,e,Ae):t===e}function Hr(t,e,n){if(t===e)return!0;for(let r in t)if(lt.call(t,r)&&!(r in e))return!1;for(let r in e)if(lt.call(e,r)&&(!(r in t)||!n(t[r],e[r],r)))return!1;return!0}function Ln(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Ae(t,e):t===e}function Ae(t,e){return Hr(t,e,ji)}function Ss(t,e,n){return Hr(t,e,(r,s,i)=>{const a=n[i];return a?a(r,s):r===s})}function xu(t,e){let n=[];for(let r in t)lt.call(t,r)&&(r in e||n.push(r));for(let r in e)lt.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function Mu(t,e){return t?Iu(t,e,Nu):e}function Iu(t,e,n){const r={};for(let s in t)lt.call(t,s)&&(s in e||(r[s]=t[s]));for(let s in e)lt.call(e,s)&&(s in t?r[s]=n(t[s],e[s]):r[s]=e[s]);return r}function Nu(t,e){return Object.assign({},t,e)}function Zt(t,e){return Array.isArray(t)&&Array.isArray(e)?ct(t,e):t===e}function ct(t,e,n=ji){if(t===e)return!0;let r=t.length,s;if(r!==e.length)return!1;for(s=0;s<r;s+=1)if(!n(t[s],e[s]))return!1;return!0}const Es={navLinkDayClick:S,navLinkWeekClick:S,duration:U,buttons:S,toolbarElements:S,prevText:String,nextText:String,prevYearText:String,nextYearText:String,todayText:String,yearText:String,monthText:String,weekTextLong:String,weekTextShort:String,dayText:String,listText:S,todayHint:S,prevHint:S,nextHint:S,buttonDisplay:S,buttonGroupClass:R,buttonClass:R,defaultAllDayEventDuration:U,defaultTimedEventDuration:U,nextDayThreshold:U,scrollTime:U,scrollTimeReset:Boolean,slotMinTime:U,slotMaxTime:U,popoverFormat:O,slotDuration:U,snapDuration:U,headerToolbar:S,footerToolbar:S,forceEventDuration:Boolean,dayLaneClass:R,dayLaneInnerClass:R,dayLaneDidMount:S,dayLaneWillUnmount:S,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:S,weekNumbers:Boolean,weekNumberHeaderClass:R,weekNumberHeaderInnerClass:R,weekNumberHeaderContent:S,weekNumberHeaderDidMount:S,weekNumberHeaderWillUnmount:S,inl
1ineWeekNumberClass:R,inlineWeekNumberContent:S,inlineWeekNumberDidMount:S,inlineWeekNumberWillUnmount:S,editable:Boolean,controller:S,nowIndicator:Boolean,nowIndicatorSnap:S,nowIndicatorHeaderClass:R,nowIndicatorHeaderContent:S,nowIndicatorHeaderDidMount:S,nowIndicatorHeaderWillUnmount:S,nowIndicatorDotClass:ee,nowIndicatorLineClass:R,nowIndicatorLineContent:S,nowIndicatorLineDidMount:S,nowIndicatorLineWillUnmount:S,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:S,locale:S,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:S,eventOrder:bu,eventOrderStrict:Boolean,eventSlicing:Boolean,eventPrintLayout:String,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:S,contentHeight:S,direction:String,colorScheme:String,weekNumberFormat:O,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,progressiveEventRendering:Boolean,businessHours:S,initialDate:S,now:S,eventDataTransform:S,tableHeaderSticky:S,footerScrollbarSticky:S,defaultAllDay:Boolean,eventSourceFailure:S,eventSourceSuccess:S,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:S,eventConstraint:S,eventAllow:S,eventColor:String,eventContrastColor:String,eventDidMount:S,eventWillUnmount:S,eventContent:S,eventClass:R,eventInnerClass:R,eventTimeClass:R,eventTitleClass:R,eventBeforeClass:R,eventAfterClass:R,listItemEventClass:R,listItemEventInnerClass:R,listItemEventTimeClass:R,listItemEventTitleClass:R,listItemEventBeforeClass:R,listItemEventAfterClass:R,blockEventClass:R,blockEventInnerClass:R,blockEventTimeClass:R,blockEventTitleClass:R,blockEventBeforeClass:R,blockEventAfterClass:R,rowEventClass:R,rowEventInnerClass:R,rowEventTimeClass:R,rowEventTitleClass:R,rowEventTitleSticky:Boolean,rowEventBeforeClass:R,rowEventBeforeContent:S,rowEventAfterClass:R,rowEventAfterContent:S,columnEventClass:R,columnEventInnerClass:R,columnEventTimeClass:R,columnEventTitleClass:R,columnEventTitleSticky:Boolean,columnEventBeforeClass:R,columnEventAfterClass:R,backgroundEventClass:R,backgroundEventDidMount:S,backgroundEventWillUnmount:S,backgroundEventContent:S,backgroundEventInnerClass:R,backgroundEventTitleClass:R,backgroundEventColor:String,selectConstraint:S,selectOverlap:S,selectAllow:S,droppable:Boolean,unselectCancel:String,slotHeaderFormat:S,slotLaneClass:R,slotLaneDidMount:S,slotLaneWillUnmount:S,slotHeaderClass:R,slotHeaderInnerClass:R,slotHeaderContent:S,slotHeaderDidMount:S,slotHeaderWillUnmount:S,slotHeaderAlign:S,slotHeaderSticky:S,slotHeaderRowClass:ee,slotHeaderDividerClass:R,dayMaxEvents:S,dayMaxEventRows:S,dayMinWidth:Number,slotHeaderInterval:U,dayHeaderClass:R,dayHeaderInnerClass:R,dayHeaderContent:S,dayHeaderDidMount:S,dayHeaderWillUnmount:S,dayHeaderAlign:S,_dayHeaderSticky:S,dayHeaderRowClass:ee,dayHeaderDividerClass:R,dayRowClass:ee,dayCellDidMount:S,dayCellWillUnmount:S,dayCellClass:R,dayCellInnerClass:R,dayCellTopContent:S,dayCellTopClass:R,dayCellTopInnerClass:R,dayCellBottomClass:R,allDaySlot:Boolean,allDayText:String,allDayHeaderClass:R,allDayHeaderInnerClass:R,allDayHeaderContent:S,allDayHeaderDidMount:S,allDayHeaderWillUnmount:S,timedText:String,slotMinWidth:Number,slotMinHeight:Number,navLinks:Boolean,eventTimeFormat:O,rerenderDelay:Number,moreLinkText:S,moreLinkHint:S,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:U,hiddenDays:S,fixedWeekCount:Boolean,validRange:S,visibleRange:S,titleFormat:S,eventInteractive:Boolean,noEventsText:String,viewHint:S,viewChangeHint:String,navLinkHint:S,closeHint:String,eventsHint:String,headingLevel:Number,moreLinkClick:S,moreLinkContent:S,moreLinkDidMount:S,moreLinkWillUnmount:S,moreLinkClass:R,moreLinkInnerClass:R,rowMoreLinkClass:R,rowMoreLinkInnerClass:R,columnMoreLinkClass:R,columnMoreLinkInnerClass:R,navLinkClass:ee,monthStartFormat:O,dayCellFormat:O,handleCustomRendering:S,customRenderingMetaMap:S,customRenderingReplaces:Boolean,popoverClass:ee,popoverCloseClass:ee,popoverCloseContent:S,dayNarrowWidth:Number,borderless:Boolean,borderlessX:Boolean,borderlessTop:Boolean,borderlessBottom:Boolean,fillerClass:R,headerToolbarClass:R,footerToolbarClass:R,toolbarClass:R,toolbarSectionClass:R,toolbarTitleClass:ee,tableClass:R,tableHeaderClass:R,tableBodyClass:R,nonBusinessHoursClass:ee,highlightClass:ee,dayHeaders:Boolean,dayHeaderFormat:O,allDayDiv
1iderClass:ee,listDaysClass:ee,listDayClass:R,listDayFormat:Ds,listDayAltFormat:Ds,listDayHeaderDidMount:S,listDayHeaderWillUnmount:S,listDayHeaderClass:R,listDayHeaderInnerClass:R,listDayHeaderContent:S,listDayBodyClass:R,noEventsClass:R,noEventsInnerClass:R,noEventsContent:S,noEventsDidMount:S,noEventsWillUnmount:S,multiMonthMaxColumns:Number,singleMonthMinWidth:Number,singleMonthTitleFormat:O,singleMonthDidMount:S,singleMonthWillUnmount:S,singleMonthClass:R,singleMonthHeaderClass:R,singleMonthHeaderInnerClass:R},An={buttonDisplay:"auto",eventDisplay:"auto",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",initialView:"",aspectRatio:1.35,weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",eventPrintLayout:"auto",popoverFormat:{month:"long",day:"numeric",year:"numeric"},longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},dayCellFormat:{day:"numeric",omitTrailing:!0},headingLevel:2,outerBorder:!0,dayNarrowWidth:80,eventOverlap:!0,slotHeaderAlign:"start",slotHeaderSticky:!0,dayHeaderAlign:"start",_dayHeaderSticky:!0,rowEventTitleSticky:!0,columnEventTitleSticky:!0,nowIndicatorSnap:"auto",dayHeaders:!0},bs={datesSet:S,eventsSet:S,eventAdd:S,eventChange:S,eventRemove:S,eventClick:S,eventMouseEnter:S,eventMouseLeave:S,select:S,unselect:S,loading:S,_unmount:S,_beforeprint:S,_afterprint:S,_noDateSelect:S,_noEventDrop:S,_noEventResize:S,_timeScrollRequest:S,dateClick:S,eventDragStart:S,eventDragStop:S,eventDrop:S,eventResizeStart:S,eventResizeStop:S,eventResize:S,drop:S,eventReceive:S,eventLeave:S},ws={class:R,className:R,viewClass:R,viewDidMount:S,viewWillUnmount:S,views:S,plugins:S,initialEvents:S,events:S,eventSources:S},Hu={type:String,component:S,class:R,className:R,content:S,didMount:S,willUnmount:S,buttonTextKey:String,dateProfileGeneratorClass:S,usesMinMaxTime:Boolean,disallowAmbigTitle:Boolean},et={dateIncrement:Ln,headerToolbar:Ln,footerToolbar:Ln,buttons:Tu,plugins:Zt,events:Zt,eventSources:Zt,resources:Zt};function Pr(t,e){let n={},r={};for(let s in e)s in t&&(n[s]=e[s](t[s],s));for(let s in t)s in e||(r[s]=t[s]);return{refined:n,extra:r}}function S(t){return t}function Ds(t){return t===!1?null:O(t)}function Vi(t){let e=Math.floor(Ze(t.start,t.end))||1,n=j(t.start),r=K(n,e);return{start:n,end:r}}function Gi(t,e=U(0)){let n=null,r=null;if(t.end){r=j(t.end);let s=t.end.valueOf()-r.valueOf();s&&s>=Ie(e)&&(r=K(r,1))}return t.start&&(n=j(t.start),r&&r<=n&&(r=K(n,1))),{start:n,end:r}}function rt(t,e,n,r){return r==="year"?U(n.diffWholeYears(t,e),"year"):r==="month"?U(n.diffWholeMonths(t,e),"month"):Pd(t,e)}function kr(t,e){return{instanceId:He(),defId:t,range:e}}function Pu(t,e,n,r){for(let s=0;s<r.length;s+=1){let i=r[s].parse(t,n);if(i){let{allDay:a}=t;return a==null&&(a=e,a==null&&(a=i.allDayGuess,a==null&&(a=!1))),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:s}}}return null}function Ye(t,e,n){let{dateEnv:r,pluginHooks:s,options:i}=n,{defs:a,instances:o}=t;o=Ge(o,l=>!a[l.defId].recurringDef);for(let l in a){let c=a[l];if(c.recurringDef){let{duration:d}=c.recurringDef;d||(d=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);let u=ku(c,d,e,r,s.recurringTypes);for(let g of u){let m=kr(l,{start:g,end:r.add(g,d)});o[m.instanceId]=m}}}return{defs:a,instances:o}}function ku(t,e,n,r,s){let a=s[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(a=a.map(j)),a}function Ht(t,e,n,r,s,i){let a=le(),o=Wr(n);for(let l of t){let c=Zi(l,e,n,r,o,s,i);c&&Jn(c,a)}return a}function Jn(t,e=le()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function Lr(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],s=Cn(t,i=>Lu(r,i));return s.defs[r.defId]=r,s.instances[n.instanceId]=n,s}return le()}function Lu(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function le(){return{defs:{},instances:{}}}function Ar(t,e){return{defs:{...t.defs,...e.defs},instances:{...t.instances,...e.instances}}}function Cn(t,e){let n=Ge(t.defs,e),r=Ge(t.instances,s=>n[s.defId]);return{defs:n,instances:r}}function Au(t,e){let{defs:n,instances:r}=t,s={},i={};for(let a in n)e.defs[a]||(s[a]=n[a]);for(let a in r)!e.instances[a]&&s[r[a].defId]&&(i[a]=r[a]);return{defs:s,instances:i}}function Wu(t,e){return Array.isArray(t)?Ht(t,null,e,!0):typeof t=="object"&&t?Ht([t],null,e,!0):t!=null?String(t):null}const un={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:S,overlap:S,allow:S,class:ee,className:ee,color:String,contrastColor:String},Bu={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""};function fn(t,e){let n=Wu(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],color:t.color||"",contrastColor:t.contrastColor||"",className:(t.class??t.className)||""}}function Yi(t){return t.reduce(Uu,Bu)}function Uu(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),color:e.color||t.color,contrastColor:e.contrastColor||t.contrastColor,className:v(t.className,e.className)}}const rn={id:String,groupId:String,title:String,url:String,interactive:Boolean},qi={start:S,end:S,date:S,allDay:Boolean},_u={...rn,...qi,extendedProps:S};function Zi(t,e,n,r,s=Wr(n),i,a){let{refined:o,extra:l}=$i(t,n,s),c=ju(e,n),d=Pu(o,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let g=er(o,l,e?e.sourceId:"",d.allDay,!!d.duration,n,i);return g.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:g,instance:null}}let u=Ou(o,c,n,r);if(u){let g=er(o,l,e?e.sourceId:"",u.allDay,u.hasEnd,n,i),m=kr(g.defId,u.range);return a&&g.publicId&&a[g.publicId]&&(m.instanceId=a[g.publicId]),{def:g,instance:m}}return null}function $i(t,e,n=Wr(e)){return Pr(t,n)}function Wr(t){return{...un,..._u,...t.pluginHooks.eventRefiners}}function er(t,e,n,r,s,i,a){let o={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(a&&t.id?a[t.id]:"")||He(),sourceId:n,allDay:r,hasEnd:s,interactive:t.interactive,ui:fn(t,i),extendedProps:{...t.extendedProps||{},...e}};for(let l of i.pluginHooks.eventDefMemberAdders)Object.assign(o,l(t));return Object.freeze(o.ui.className),Object.freeze(o.extendedProps),o}function Ou(t,e,n,r){let{allDay:s}=t,i,a=null,o=!1,l,c=null,d=t.start!=null?t.start:t.date;if(i=n.dateEnv.createMarkerMeta(d),i)a=i.marker;else if(!r)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),s==null&&(e!=null?s=e:s=(!i||i.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),s&&a&&(a=j(a)),l&&(c=l.marker,s&&(c=j(c)),a&&c<=a&&(c=null)),c?o=!0:r||(o=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:o,range:{start:a,end:c}}}function ju(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}const Fu={start:S,end:S,allDay:Boolean};function zu(t,e,n){let r=Vu(t,e),{range:s}=r;if(!s.start)return null;if(!s.end){if(n==null)return null;s.end=e.add(s.start,n)}return r}function Vu(t,e){let{refined:n,extra:r}=Pr(t,Fu),s=n.start?e.createMarkerMeta(n.start):null,i=n.end?e.createMarkerMeta(n.end):null,{allDay:a}=n;return a==null&&(a=s&&s.isTimeUnspecified&&(!i||i.isTimeUnspecified)),{range:{start:s?s.marker:null,end:i?i.marker:null},allDay:a,...r}}function Gu(t,e){return Vd(t.range,e.range)&&t.allDay===e.allDay&&Yu(t,e)}function Yu(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function qu(t,e){return{...Ki(t.range,e,t.allDay),allDay:t.allDay}}function Xi(t,e,n){return{...Ki(t,e,n),timeZone:e.timeZone}}function Ki(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function Zu(t,e,n){let r=$i({editable:!1},n),s=er(r.refined,r.extra,"",t.allDay,!0,n);
vendor: 6,027 bytes, line 1
1return{def:s,ui:ea(s,e),instance:kr(s.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Qi(t,e,n){n.emitter.trigger("select",{...Br(t,n),jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view})}function $u(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Br(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,qu(t,e.dateEnv)),n}function Cs(t,e,n){let{dateEnv:r,options:s}=n,i=e;return t?(i=j(i),i=r.add(i,s.defaultAllDayEventDuration)):i=r.add(i,s.defaultTimedEventDuration),i}function Ur(t,e,n,r){let s=gn(t.defs,e),i=le();for(let a in t.defs){let o=t.defs[a];i.defs[a]=Xu(o,s[a],n,r)}for(let a in t.instances){let o=t.instances[a],l=i.defs[o.defId];i.instances[a]=Ku(o,l,s[o.defId],n,r)}return i}function Xu(t,e,n,r){let s=n.standardProps||{};s.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(s.hasEnd=!0);let i={...t,...s,ui:{...t.ui,...s.ui}};n.extendedProps&&(i.extendedProps={...i.extendedProps,...n.extendedProps});for(let a of r.pluginHooks.eventDefMutationAppliers)a(i,n,r);return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function Ku(t,e,n,r,s){let{dateEnv:i}=s,a=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,l={...t};return a&&(l.range=Vi(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),o&&(l.range={start:l.range.start,end:Cs(e.allDay,l.range.start,s)}),e.allDay&&(l.range={start:j(l.range.start),end:j(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Cs(e.allDay,l.range.start,s)),l}class tt{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class V{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in qi)Le(`Cannot set date-related event property \`${e}\`. Use a method instead.`);else if(e==="id")n=rn[e](n),this.mutate({standardProps:{publicId:n}});else if(e in rn)n=rn[e](n),this.mutate({standardProps:{[e]:n}});else if(e in un){let r=un[e](n);e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else Le(`Cannot set event property \`${e}\`. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,s=r.createMarker(e);if(s&&this._instance){let i=this._instance.range,a=rt(i.start,s,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(e,n={}){let{dateEnv:r}=this._context,s;if(!(e!=null&&(s=r.createMarker(e),!s))&&this._instance)if(s){let i=rt(this._instance.range.end,s,r,n.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:s}=this._context,i={allDay:r.allDay},a=s.createMarker(e),o;if(a&&!(n!=null&&(o=s.createMarker(n),!o))&&this._instance){let l=this._instance.range;r.allDay===!0&&(l=Vi(l));let c=rt(l.start,a,s,r.granularity);if(o){let d=rt(l.end,o,s,r.granularity);Zd(c,d)?this.mutate({datesDelta:c,standardProps:i}):this.mutate({startDelta:c,endDelta:d,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:c,standardProps:i})}}moveStart(e){let n=U(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=U(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=U(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:s}=n;s==null&&(s=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=s),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,s=O(e);return this._def.hasEnd?ne(n.formatRangeToParts(r.range.start,r.range.end,s)):ne(n.formatToParts(r.range.start,s))}mutate(e){let n=this._instance;if(n){let r=this._def,s=this._context,{eventStore:i}=s.getCurrentData(),a=Lr(i,n.instanceId);a=Ur(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""}},e,s);let l=new V(s,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],s.dispatch({type:"MERGE_EVENTS",eventStore:a}),s.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:ze(a,s,n),revert(){s.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,n=Ji(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new tt(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}
1get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get color(){return this._def.ui.color}get contrastColor(){return this._def.ui.contrastColor}get className(){return this._def.ui.className}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:s,endStr:i}=this,a={allDay:n.allDay};return n.title&&(a.title=n.title),s&&(a.start=s),i&&(a.end=i),n.publicId&&(a.id=n.publicId),n.groupId&&(a.groupId=n.groupId),n.url&&(a.url=n.url),r.display&&r.display!=="auto"&&(a.display=r.display),r.color&&(a.color=r.color),r.contrastColor&&(a.contrastColor=r.contrastColor),r.className&&(a.className=r.className),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,n.extendedProps):a.extendedProps=n.extendedProps),a}toJSON(){return this.toPlainObject()}}function Ji(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function ze(t,e,n){let{defs:r,instances:s}=t,i=[],a=n?n.instanceId:"";for(let o in s){let l=s[o],c=r[l.defId];l.instanceId!==a&&i.push(new V(e,c,l))}return i}function Rn(t){return t.eventRange.instance.instanceId}function tr(t,e,n,r){let s={},i={},a={},o=[],l=[],c=gn(t.defs,e);for(let d in t.defs){let u=t.defs[d];c[u.defId].display==="inverse-background"&&(u.groupId?(s[u.groupId]=[],a[u.groupId]||(a[u.groupId]=u)):i[d]=[])}for(let d in t.instances){let u=t.instances[d],g=t.defs[u.defId],m=c[g.defId],y=u.range,p=!g.allDay&&r?Gi(y,r):y,E=ke(p,n);E&&(m.display==="inverse-background"?g.groupId?s[g.groupId].push(E):i[u.defId].push(E):m.display!=="none"&&(m.display==="background"?o:l).push({def:g,ui:m,instance:u,range:E,isStart:p.start&&p.start.valueOf()===E.start.valueOf(),isEnd:p.end&&p.end.valueOf()===E.end.valueOf()}))}for(let d in s){let u=s[d],g=us(u,n);for(let m of g){let y=a[d],p=c[y.defId];o.push({def:y,ui:p,instance:null,range:m,isStart:!1,isEnd:!1})}}for(let d in i){let u=i[d],g=us(u,n);for(let m of g)o.push({def:t.defs[d],ui:c[d],instance:null,range:m,isStart:!1,isEnd:!1})}return{bg:o,fg:l}}function Qu(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function hn(t,e){t.fcEventRange=e}function dt(t){return t.fcEventRange||t.parentNode.fcEventRange||null}function gn(t,e){return Ne(t,n=>ea(n,e))}function ea(t,e){const n=[],r=e[""],s=e[t.defId];return r&&n.push(r),s&&n.push(s),n.push(t.ui),Yi(n)}function _r(t,e){let n=t.map(Ju);return n.sort((r,s)=>wu(r,s,e)),n.map(r=>r._seg)}function Ju(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,s=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return{...n.extendedProps,...n,id:n.publicId,start:s,end:i,duration:i-s,allDay:Number(n.allDay),_seg:t}}function ef(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:s,ui:i}=t,a=i.startEditable;for(let o of r)a=o(a,s,i,e);return a}function tf(t,e,n,r,s,i,a,o=!0,l=!0){const{dateEnv:c,options:d}=a,{def:u}=e;let{displayEventTime:g,displayEventEnd:m}=d;g==null&&(g=o!==!1),m==null&&(m=l!==!1);const y=!s&&n&&j(n).valueOf()!==j(e.instance.range.start).valueOf()?n:e.instance.range.start,p=!i&&r&&j(Ve(r,-1)).valueOf()!==j(Ve(e.instance.range.end,-1)).valueOf()?r:e.instance.range.end;if(g&&!u.allDay){if(m&&(s||i)&&u.hasEnd){const E=c.formatRangeToParts(y,p,t),D=rf(E);return D!=null?ne(c.formatToParts(y,t))+D+ne(c.formatToParts(p,t)):ne(E)}if(s)return ne(c.formatToParts(y,t))}return""}const nf=new Set(["year","month","day"]);function rf(t){let e,n=!1;for(const r of t)r.source==="shared"&&(e=r),nf.has(r.type)&&(n=!0);return n?e.value:void 0}function qe(t,e,n){let r=t.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&Me(e,r.start)}}function sf(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function af(t,e){let{def:n,instance:r}=t,{url:s}=n;if(s)return["a",{href:s},!0];let{emitter:i,options:a}=e,{eventInteractive:o}=a;o==null&&(o=n.interactive,o==null&&(o=!!i.hasHandlers("eventClick")));let l;return o&&(l=Oi(c=>{i.trigger("eventClick",{el:c.target,event:new V(e,n,r),jsEvent:c,view:e.viewApi})}),l={role:"button",...l}),["div",l,o]}const of=/(^c|C)lass(Name)?$/,lf=/Content$/,cf=/(DidMount|WillUnmount)$/,df=/^on[A-Z]/,uf={buttons:Mu};function ff(...t){const e={};for(const n of t)for(const r in n){const s=n[r];e[r]?e[r]=Te(e[r],s):e[r]=s}return e}function Te(...t){let e={};for(const n of t)for(let r in n)if(r in e){const s=uf[r]||(of.test(r)?hf:lf.test(r)?gf:cf.test(r)?mf:void 0);e[r]=s?s(e[r],n[r],r):n[r]}else e[r]=n[r];return e}function hf(t,e,n){const r=typeof t=="function",s=typeof e=="function";if(r||s){const i=a=>v(ee(r?t(a):t,n),ee(s?e(a):e,n));return i.parts=[t,e],i}return v(ee(t,n),ee(e,n))}function gf(t,e){if(typeof e=="function"){const n=r=>{const s=e(r);return s===!0?typeof t=="function"?t(r):t:s};return n.parts=[t,e],n}return e??t}function mf(t,e){if(t&&e){const n=(...r)=>{t(...r),e(...r)};return n.parts=[t,e],n}return t||e}function pf(t,e){const n=xu(t,e);for(let r of n)if(!df.test(r))return!1;return!0}function nr(t,e){const n=t&&t.parts,r=e&&e.parts;if(n&&r){const s=n.length,i=r.length;if(s!==i)return!1;for(let a=0;a<s;a++)if(!(n[a]===r[a]||nr(n[a],r[a])))return!1;return!0}return!1}const vf=[],ta={code:"en",week:{dow:0,doy:4},direction:"ltr",todayText:"Today",prevText:"Prev",nextText:"Next",prevYearText:"Prev year",nextYearText:"Next year",yearText:"Year",monthText:"Month",weekTextLong:"Week",dayText:"Day",listText:"List",closeHint:"Close",eventsHint:"Events",allDayText:"All-day",timedText:"Timed",moreLinkText:"more",noEventsText:"No events to display"},na={...ta,weekTextShort:"W",todayHint:(t,e)=>e==="day"?"Today":`This ${t}`,prevHint:"Previous $0",nextHint:"Next $0",viewHint:"$0 view",viewChangeHint:"Change view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}};function yf(t){let e=t.length>0?t[0].code:"en",n=vf.concat(t),r={en:na};for(let s of n)r[s.code]=s;return{map:r,defaultCode:e}}function ra(t,e){return typeof t=="object"&&!Array.isArray(t)?sa(t.code,[t.code],t):Sf(t,e)}function Sf(t,e){let n=[].concat(t||[]),r=Ef(n,e)||na;return sa(t,n,r)}function Ef(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let s=r.length;s>0;s-=1){let i=r.slice(0,s).join("-");if(e[i])return e[i]}}return null}function sa(t,e,n){let r=Te(ta,n);delete r.code;let{week:s}=r;return delete r.week,{codeArg:t,codes:e,week:s,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}
1class Rs extends Error{constructor(e,n){super(e),this.response=n}}function bf(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(s=>{if(s.ok)return s.json().then(i=>[i,s],()=>{throw new Rs("Failure parsing JSON",s)});throw new Rs("Request failed",s)})}function wf(t,e){e.emitter.trigger("datesSet",{...Xi(t.activeRange,e.dateEnv),view:e.viewApi})}function Df(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",ze(t,e))}let Cf={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const Rf={name:"array-event-source",eventSourceDefs:[Cf]};function Tf(t,e,n){let r=!1,s=function(o){r||(r=!0,e(o))},i=function(o){r||(r=!0,n(o))},a=t(s,i);a&&typeof a.then=="function"&&a.then(s,i)}let xf={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,s=t.eventSource.meta;Tf(s.bind(null,Xi(t.range,r)),i=>e({rawEvents:i}),n)}};const Mf={name:"func-event-source",eventSourceDefs:[xf]},If={method:String,extraParams:S,startParam:String,endParam:String,timeZoneParam:String};let Nf={parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,s=Pf(r,t.range,t.context);bf(r.method,r.url,s).then(([i,a])=>{e({rawEvents:i,response:a})},n)}};const Hf={name:"json-event-source",eventSourceRefiners:If,eventSourceDefs:[Nf]};function Pf(t,e,n){let{dateEnv:r,options:s}=n,i,a,o,l,c={};return i=t.startParam,i==null&&(i=s.startParam),a=t.endParam,a==null&&(a=s.endParam),o=t.timeZoneParam,o==null&&(o=s.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(c,l),c[i]=r.formatIso(e.start),c[a]=r.formatIso(e.end),r.timeZone!=="local"&&(c[o]=r.timeZone),c}const kf={name:"change-handler",optionChangeHandlers:{controller(t,e){t._setApi(e.calendarApi)},events(t,e){Ts([t],e)},eventSources:Ts}};function Ts(t,e){let n=Fi(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let s of t){let i=!1;for(let a=0;a<n.length;a+=1)if(n[a]._raw===s){n.splice(a,1),i=!0;break}i||r.push(s)}for(let s of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:s.sourceId});for(let s of r)e.calendarApi.addEventSource(s)}const Lf={id:String,defaultAllDay:Boolean,url:String,format:String,events:S,eventDataTransform:S,success:S,failure:S};function ia(t,e,n=aa(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:s,extra:i}=Pr(r,n),a=Af(s,e);if(a)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:s.defaultAllDay,eventDataTransform:s.eventDataTransform,success:s.success,failure:s.failure,publicId:s.id||"",sourceId:He(),sourceDefId:a.sourceDefId,meta:a.meta,ui:fn(s,e),extendedProps:i}}return null}function aa(t){return{...un,...Lf,...t.pluginHooks.eventSourceRefiners}}function Af(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let i=n[r].parseMeta(t);if(i)return{sourceDefId:r,meta:i}}return null}function Wf(t,e,n){let r=e?e.activeRange:null;return la({},zf(t,n),r,n)}function Bf(t,e,n,r){let s=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return la(t,e.sources,s,r);case"REMOVE_EVENT_SOURCE":return _f(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?ca(t,s,r):t;case"FETCH_EVENT_SOURCES":return Or(t,e.sourceIds?zi(e.sourceIds):da(t,r),s,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return Ff(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function Uf(t,e,n){let r=e?e.activeRange:null;return Or(t,da(t,n),r,!0,n)}function oa(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function la(t,e,n,r){let s={};for(let i of e)s[i.sourceId]=i;return n&&(s=ca(s,n,r)),{...t,...s}}function _f(t,e){return Ge(t,n=>n.sourceId!==e)}function ca(t,e,n){return Or(t,Ge(t,r=>Of(r,e,n)),e,!1,n)}function Of(t,e,n){return ua(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Or(t,e,n,r,s){let i={};for(let a in t){let o=t[a];e[a]?i[a]=jf(o,n,r,s):i[a]=o}return i}function jf(t,e,n,r){let{options:s,calendarApi:i}=r,a=r.pluginHooks.eventSourceDefs[t.sourceDefId],o=He();return a.fetch({eventSource:t,range:e,isRefetch:n,context:r},l=>{let{rawEvents:c}=l;s.eventSourceSuccess&&(c=s.eventSourceSuccess.call(i,c,l.response)||c),t.success&&(c=t.success.call(i,c,l.response)||c),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:c})},l=>{let c=!1;s.eventSourceFailure&&(s.eventSourceFailure.call(i,l),c=!0),t.failure&&(t.failure(l),c=!0),c||Le(`Unhandled event source error: ${l.message}`,l),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:l})}),{...t,isFetching:!0,latestFetchId:o}}function Ff(t,e,n,r){let s=t[e];return s&&n===s.latestFetchId?{...t,[e]:{...s,isFetching:!1,fetchRange:r}}:t}function da(t,e){return Ge(t,n=>ua(n,e))}function zf(t,e){let n=aa(e),r=[].concat(t.eventSources||[]),s=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let i of r){let a=ia(i,e,n);a&&s.push(a)}return s}function ua(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}const Vf={daysOfWeek:S,startTime:U,endTime:U,duration:U,startRecur:S,endRecur:S};let Gf={parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null,dateEnv:e},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=$d(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=ke(e,{start:t.startRecur,end:t.endRecur});return r?qf(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}};const Yf={name:"simple-recurring-event",recurringTypes:[Gf],eventRefiners:Vf};function qf(t,e,n,r,s){let i=t?zi(t):null,a=j(s.start),o=s.end,l=[];for(e&&(e.milliseconds<0?o=K(o,1):e.milliseconds>=1e3*60*60*24&&(a=K(a,-1)));a<o;){let c;(!i||i[a.getUTCDay()])&&(e?c=r.add(a,e):c=a,l.push(r.createMarker(n.toDate(c)))),a=K(a,1)}return l}const Zf=[Rf,Mf,Hf,Yf,kf,{name:"misc",isLoadingFuncs:[t=>oa(t.eventSources)],propSetHandlers:{dateProfile:wf,eventStore:Df}}],bt={text:"",hint:"",isDisabled:!1};class $f{constructor(e){this.handleDateChange=e}today(){var e;(e=this.calendarApi)==null||e.today()}prev(){var e;(e=this.calendarApi)==null||e.prev()}next(){var e;(e=this.calendarApi)==null||e.next()}prevYear(){var e;(e=this.calendarApi)==null||e.prevYear()}nextYear(){var e;(e=this.calendarApi)==null||e.nextYear()}gotoDate(e){var n;(n=this.calendarApi)==null||n.gotoDate(e)}incrementDate(e){var n;(n=this.calendarApi)==null||n.incrementDate(e)}changeView(e){var n;(n=this.calendarApi)==null||n.changeView(e)}get view(){var e;return(e=this.calendarApi)==null?void 0:e.view}getDate(){var e;return(e=this.calendarApi)==null?void 0:e.getDate()}getButtonState(){const{calendarApi:e}=this;return e&&e.getButtonState()||{today:bt,prev:bt,next:bt,prevYear:bt,nextYear:bt}}_setApi(e){this.calendarApi!==e&&(this.calendarApi&&(this.calendarApi.off("datesSet",this.handleDateChange),this.calendarApi=void 0),e&&(this.calendarApi=e,e.on("datesSet",this.handleDateChange)))}}function M(t,e,n){let r,s;return function(...i){if(!r)s=t.apply(this,i);else if(!ct(r,i)){let a=t.apply(this,i);(!e||!e(a,s))&&(s=a)}return r=i,s}}function Rt(t,e,n){let r,s;return i=>(r?Ae(r,i)||(s=t.call(this,i)):s=t.call(this,i),r=i,s)}const Pe=I.createContext({});function Xf(t,e,n,r,s,i,a,o,l,c,d,u,g,m){return{dateEnv:s,nowManager:i,options:n,pluginHooks:a,emitter:c,dispatch:o,getCurrentData:l,calendarApi:d,viewSpec:t,viewApi:e,dateProfileGenerator:r,baseId:u,registerInteractiveComponent:g,unregisterInteractiveComponent:m}}class $e extends I.Component{shouldComponentUpdate(e,n){return!Ss(this.props,e,this.propEquality)||!Ss(this.state,n,this.stateEquality)}}$e.addPropsEquality=Kf;$e.addStateEquality=Qf;$e.contextType=Pe;$e.prototype.propEquality={};$e.prototype.stateEquality={};class W extends $e{}W.contextType=Pe;function Kf(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function Qf(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function P(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class jr extends W{constructor(){super(...arguments),this.id=He(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.el=e;const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!xs(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&P(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:s,defaultGenerator:i,renderProps:a}=e,o=fa(e,"",this.handleEl);let l=!1,c,d=[],u;if(s!=null){const g=typeof s=="function"?s(a):s;if(g===!0)l=!0;else{const m=g&&typeof g=="object";m&&"html"in g?o.dangerouslySetInnerHTML={__html:g.html}:m&&"domNodes"in g?d=Array.prototype.slice.call(g.domNodes):(m?I.isValidElement(g):typeof g!="function")?c=g:u=g}}else l=!xs(e.generatorName,r);return l&&i&&(c=i(a)),this.queuedDomNodes=d,this.currentGeneratorMeta=u,I.createElement(e.tag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){const{props:n,context:r}
1=this,{handleCustomRendering:s,customRenderingMetaMap:i}=r.options;if(s){const a=this.currentGeneratorMeta??(i==null?void 0:i[n.generatorName]);a&&s({id:this.id,isActive:e,containerEl:this.el,reportNewContainerEl:this.updateElRef,generatorMeta:a,...n})}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,{el:r}=this;if(!ct(e,n)){for(const s of n)s.remove();for(let s of e)r.appendChild(s);this.currentDomNodes=e}}}jr.addPropsEquality({renderProps:Ae,attrs:pf,style:Ae});function xs(t,e){var n;return!!(e.handleCustomRendering&&t&&((n=e.customRenderingMetaMap)!=null&&n[t]))}function fa(t,e,n){const r={...t.attrs,ref:n};return(t.className||e)&&(r.className=v(e,t.className,r.className)),t.style&&(r.style=t.style),r}const Jf=I.createContext(0);class F extends I.Component{constructor(){super(...arguments),this.InnerContent=eh.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(P(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=b(e.classNameGenerator,e.renderProps);if(e.children){const r=fa(e,n,this.handleEl),s=e.children(this.InnerContent,e.renderProps,r);return e.tag?I.createElement(e.tag,r,s):s}else return I.createElement(jr,{...e,elRef:this.handleEl,tag:e.tag||"div",className:v(e.className,n),renderId:this.context})}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)==null||n.call(e,{...this.props.renderProps,el:this.el}):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)==null||n.call(e,{...this.props.renderProps,el:this.el})}}F.contextType=Jf;function eh(t,e){const n=t.props;return I.createElement(jr,{renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context,...e})}function b(t,e){return(typeof t=="function"?t(e):t)||""}function Tn(t){return t.text}function he(t){return t.height==="auto"||t.contentHeight==="auto"}function xn(t){let{tableHeaderSticky:e}=t;return(e==null||e==="auto")&&(e=he(t)),e}function ha(t){const e=he(t);let{footerScrollbarSticky:n}=t;return(n==null||n==="auto")&&(n=e),!!n&&e}function ga(t){const e=t.scrollerSyncerClass;if(!e)throw new RangeError("Must import @fullcalendar/scrollgrid");return e}class ma{constructor(e){this.handleChange=e,this.isMounted=!1,this.handleRefresh=()=>{let n=this.computeTiming();n.nowDate.valueOf()!==this.nowDate.valueOf()&&(this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.handleChange()),this.clearTimeout(),this.setTimeout(n.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()}}update(e){if(this.isMounted)(e.unit!==this.unit||e.unitValue!==this.unitValue||e.nowIndicatorSnap!==this.nowIndicatorSnap||e.nowManager!==this.nowManager||e.dateEnv!==this.dateEnv)&&(this.unit=e.unit,this.unitValue=e.unitValue,this.nowIndicatorSnap=e.nowIndicatorSnap,this.nowManager=e.nowManager,this.dateEnv=e.dateEnv,this.clearTimeout(),this.setTimeout());else{this.isMounted=!0,this.unit=e.unit,this.unitValue=e.unitValue,this.nowIndicatorSnap=e.nowIndicatorSnap,this.nowManager=e.nowManager,this.dateEnv=e.dateEnv;const n=this.computeTiming();this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.setTimeout(),this.nowManager.addResetListener(this.handleRefresh),typeof document<"u"&&document.addEventListener("visibilitychange",this.handleVisibilityChange)}return{nowDate:this.nowDate,todayRange:this.todayRange}}destroy(){this.isMounted&&(this.isMounted=!1,this.clearTimeout(),this.nowManager.removeResetListener(this.handleRefresh),typeof document<"u"&&document.removeEventListener("visibilitychange",this.handleVisibilityChange))}computeTiming(){let e=this.nowManager.getDateMarker(),{unit:n,unitValue:r,nowIndicatorSnap:s,dateEnv:i}=this;s==="auto"&&(s=/year|month|week|day/.test(n)||(r||1)===1);let a,o;return s?(a=i.startOf(e,n),o=i.add(a,U(1,n)).valueOf()-e.valueOf()):(a=e,o=1e3*60),o=Math.min(1e3*60*60*24,o),{nowDate:a,todayRange:th(a),waitMs:o}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.handleChange(),this.setTimeout(n.waitMs)},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function th(t){let e=j(t),n=K(e,1);return{start:e,end:n}}class pa{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,r,s){let{dateEnv:i}=this.props,a=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,r,-1,s)}buildNext(e,n,r,s){let{dateEnv:i}=this.props,a=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,r,1,s)}build(e,n,r,s=!0){let{props:i}=this,a,o,l,c,d,u;return a=this.buildValidRange(n),a=this.trimHiddenDays(a),s&&(e=Gd(e,a)),o=this.buildCurrentRangeInfo(e,r),l=/^(year|month|week|day)$/.test(o.unit),c=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,l),c=this.trimHiddenDays(c),d=c,i.showNonCurrentDates||(d=ke(d,o.range)),d=this.adjustActiveRange(d),d=ke(d,a),u=Tr(o.range,a),Me(c,e)||(e=c.start),{currentDate:e,validRange:a,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:l,activeRange:d,renderRange:c,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:u,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(e){let n=this.props.validRangeInput,r=typeof n=="function"?n.call(this.props.calendarApi,this.props.dateEnv.toDate(e)):n;return this.refineRange(r)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,s=null,i=null,a=null,o;return r.duration?(s=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,n,s,i)):(o=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,n,o)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(s=this.getFallbackDuration(),i=Kn(s).unit,a=this.buildRangeFromDuration(e,n,s,i)),{duration:s,unit:i,range:a}}getFallbackDuration(){return U({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:s,slotMaxTime:i}=this.props,{start:a,end:o}=e;return r&&(it(s)<0&&(a=j(a),a=n.add(a,s)),it(i)>1&&(o=j(o),o=K(o,-1),o=n.add(o,i))),{start:a,end:o}}
1buildRangeFromDuration(e,n,r,s){let{dateEnv:i,dateAlignment:a}=this.props,o,l,c;if(!a){let{dateIncrement:u}=this.props;u&&Ie(u)<Ie(r)?a=Kn(u).unit:a=s}it(r)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,n),o=j(o));function d(){o=i.startOf(e,a),l=i.add(o,r),c={start:o,end:l}}return d(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,n),d()),c}buildRangeFromDayCount(e,n,r){let{dateEnv:s,dateAlignment:i}=this.props,a=0,o=e,l;i&&(o=s.startOf(o,i)),o=j(o),o=this.skipHiddenDays(o,n),l=o;do l=K(l,1),this.isHiddenDay(l)||(a+=1);while(a<r);return{start:o,end:l}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,s=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,i=this.refineRange(s);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?U(1,r):e||U({days:1}))}refineRange(e){if(e){let n=Fd(e,this.props.dateEnv);return n&&(n=Gi(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,s;for(this.props.weekends===!1&&e.push(0,6),s=0;s<7;s+=1)(n[s]=e.indexOf(s)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=K(e,n);return e}}function va(t,e){const{currentRange:n}=t;if(t.currentRangeUnit==="year")return e.diffWholeYears(n.start,n.end)>1?"year":"month";if(t.currentRangeUnit==="month"){if(e.diffWholeMonths(n.start,n.end)>1)return"month"}else if(t.currentRangeUnit==="week"){if(ki(n.start,n.end)>1)return"week"}else if(t.currentRangeUnit==="day"&&It(n.start,n.end)>1)return"day"}function ya(t,e,n){if(t.valueOf()===j(t).valueOf()){if(e==="year")return!n.getMonth(t)&&n.getDay(t)===1;if(e==="month")return n.getDay(t)===1;if(e==="week")return t.getUTCDay()===n.weekDow;if(e==="day")return!0}return!1}function nh(t,e,n,r,s){switch(e.type){case"RECEIVE_EVENTS":return rh(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,s);case"RESET_RAW_EVENTS":return sh(t,n[e.sourceId],e.rawEvents,r.activeRange,s);case"ADD_EVENTS":return ih(t,e.eventStore,r?r.activeRange:null,s);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Ar(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ye(t,r.activeRange,s):t;case"REMOVE_EVENTS":return Au(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return Ea(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Cn(t,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return le();default:return t}}function rh(t,e,n,r,s,i){if(e&&n===e.latestFetchId){let a=Ht(Sa(s,e,i),e,i);return r&&(a=Ye(a,r,i)),Ar(Ea(t,e.sourceId),a)}return t}function sh(t,e,n,r,s){const{defIdMap:i,instanceIdMap:a}=oh(t);let o=Ht(Sa(n,e,s),e,s,!1,i,a);return Ye(o,r,s)}function Sa(t,e,n){let r=n.options.eventDataTransform,s=e?e.eventDataTransform:null;return s&&(t=Ms(t,s)),r&&(t=Ms(t,r)),t}function Ms(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let s=e(r);s?n.push(s):s==null&&n.push(r)}}return n}function ih(t,e,n,r){return n&&(e=Ye(e,n,r)),Ar(t,e)}function Is(t,e,n){let{defs:r}=t,s=Ne(t.instances,i=>r[i.defId].allDay?i:{...i,range:{start:n.createMarker(e.toDate(i.range.start)),end:n.createMarker(e.toDate(i.range.end))}});return{defs:r,instances:s}}function Ea(t,e){return Cn(t,n=>n.sourceId!==e)}function ah(t,e){return{defs:t.defs,instances:Ge(t.instances,n=>!e[n.instanceId])}}function oh(t){const{defs:e,instances:n}=t,r={},s={};for(let i in e){const a=e[i],{publicId:o}=a;o&&(r[o]=i)}for(let i in n){const a=n[i],o=e[a.defId],{publicId:l}=o;l&&(s[l]=i)}return{defIdMap:r,instanceIdMap:s}}class pt{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function lh(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function Fr(t){return{[t.component.uid]:t}}const rr={};class Ut{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){ch(this.handlers,e,n)}off(e,n){dh(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],s=this.options&&this.options[e],i=[].concat(s||[],r);for(let a of i)a.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function ch(t,e,n){(t[e]||(t[e]=[])).push(n)}function dh(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}function uh(t){return{name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{}
1,isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollerSyncerClass:t.scrollerSyncerClass||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},optionDefaults:t.optionDefaults?[t.optionDefaults]:[],propSetHandlers:t.propSetHandlers||{}}}function fh(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollerSyncerClass:null,listenerRefiners:{},optionRefiners:{},optionDefaults:[],propSetHandlers:{}};function s(i){for(let a of i){const{name:o}=a;if(!o)throw new Error("Plugin must specify a name");if(!n[o]){const l=n[o]=uh(a);r=gh(r,l),s(a.deps||[])}}}return t&&s(t),s(e),r}function hh(){let t=[],e=[],n;return(r,s)=>((!n||!ct(r,t)||!ct(s,e))&&(n=fh(r,s)),t=r,e=s,n)}function gh(t,e){return{premiumReleaseDate:mh(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:{...t.eventRefiners,...e.eventRefiners},eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:{...t.eventSourceRefiners,...e.eventSourceRefiners},isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:ff(t.views,e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:{...t.optionChangeHandlers,...e.optionChangeHandlers},scrollerSyncerClass:t.scrollerSyncerClass||e.scrollerSyncerClass,listenerRefiners:{...t.listenerRefiners,...e.listenerRefiners},optionRefiners:{...t.optionRefiners,...e.optionRefiners},optionDefaults:t.optionDefaults.concat(e.optionDefaults),propSetHandlers:{...t.propSetHandlers,...e.propSetHandlers}}}function mh(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}function ph(t,e){let n={},r;for(r in t)sr(r,n,t,e);
1for(r in e)sr(r,n,t,e);return n}function sr(t,e,n,r){if(e[t])return e[t];let s=vh(t,e,n,r);return s&&(e[t]=s),s}function vh(t,e,n,r){let s=n[t],i=r[t],a=d=>s&&s[d]!==null?s[d]:i&&i[d]!==null?i[d]:null,o=a("component"),l=a("superType"),c=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");c=sr(l,e,n,r)}return!o&&c&&(o=c.component),o?{type:t,component:o,defaults:Te(c?c.defaults:{},s?s.rawOptions:{}),overrides:Te(c?c.overrides:{},i?i.rawOptions:{})}:null}function Ns(t){return Ne(t,yh)}function yh(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Hs(e.content):n&&!(n.prototype instanceof W)&&(n=Hs(n)),{superType:e.type,component:n,rawOptions:e}}function Hs(t){return e=>h.jsx(Pe.Consumer,{children:n=>{const{options:r,viewSpec:s}=n,i={...e,nextDayThreshold:r.nextDayThreshold,...Ee(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:he(r),view:n.viewApi};return h.jsx(F,{tag:"div",className:v(b(r.viewClass,i),b(s.optionDefaults.class,i),b(s.optionDefaults.className,i),b(s.optionOverrides.class,i),b(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,customGenerator:t,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount})}})}function Sh(t,e,n){let r=Ns(t),s=Ns(e.views),i=ph(r,s);return Ne(i,a=>Eh(a,s,e,n))}function Eh(t,e,n,r){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,i=null,a="",o="",l={};if(s&&(i=bh(s),i)){let c=Kn(i);a=c.unit,c.value===1&&(o=a,l=e[a]?e[a].rawOptions:{})}return{type:t.type,component:t.component,duration:i,durationUnit:a,singleUnit:o,optionDefaults:t.defaults,optionOverrides:{...l,...t.overrides}}}let Ps={};function bh(t){let e=JSON.stringify(t),n=Ps[e];return n===void 0&&(n=U(t),Ps[e]=n),n}function wh(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function Dh(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function Ch(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function Rh(t,e){switch(e.type){case"SET_OPTION":return{...t,[e.optionName]:e.rawOptionValue};default:return t}}function Th(t,e,n,r,s){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return s.build(e.dateMarker||n,r);case"CHANGE_DATE":return s.build(e.dateMarker,r);case"PREV":if(i=s.buildPrev(t,n,r),i.isValid)return i;break;case"NEXT":if(i=s.buildNext(t,n,r),i.isValid)return i;break}return t}function xh(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function Mh(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function Ih(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function Nh(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function Hh(t,e,n){let r=t.headerToolbar?ks(t.headerToolbar,t,e,n):null,s=t.footerToolbar?ks(t.footerToolbar,t,e,n):null;return{header:r,footer:s}}function ks(t,e,n,r){let s=e.direction==="rtl",i=[],a=!1;function o(c){let d=Ph(c,e,n,r);return i.push(...d.viewsWithButtons),a=a||d.hasTitle,d.widgets}return{sectionWidgets:{start:o(t[s?"right":"left"]||t.start||""),center:o(t.center||""),end:o(t[s?"left":"right"]||t.end||"")},viewsWithButtons:i,hasTitle:a}}function Ph(t,e,n,r){let s=e.buttons||{},i=e.toolbarElements||{},a=t?t.split(" "):[],o=[],l=!1;return{widgets:a.map(d=>d.split(",").map(u=>{if(u==="title")return l=!0,{name:u};if(i[u])return{name:u,customElement:i[u]};let g,m=s[u]||{},y,p,E;if(g=n[u]){o.push(u);const D=g.optionDefaults.buttonTextKey;y=m.text||(D?e[D]:"")||(g.singleUnit?e[g.singleUnit+"TextLong"]||e[g.singleUnit+"Text"]:"")||u,p=ue(m.hint||e.viewHint,[y,u],y),E=C=>{var w;(w=m==null?void 0:m.click)==null||w.call(m,C),C.defaultPrevented||r.changeView(u)}}else y=m.text||e[u+"TextLong"]||e[u+"Text"]||u,u==="prevYear"?p=ue(m.hint||e.prevHint,[e.yearText,"year"],y):u==="nextYear"?p=ue(m.hint||e.nextHint,[e.yearText,"year"],y):p=D=>ue(m.hint||e[u+"Hint"],[e[D+"TextLong"]||e[D+"Text"],D],y),E=D=>{var C,w;(C=m==null?void 0:m.click)==null||C.call(m,D),D.defaultPrevented||(w=r[u])==null||w.call(r)};return{name:u,isView:!!g,buttonText:y,buttonHint:p,buttonDisplay:m.display,buttonIconClass:m.iconClass,buttonIconContent:m.iconContent,buttonClick:E,buttonIsPrimary:m.isPrimary||!1,buttonClass:m.class??m.className,buttonDidMount:m.didMount,buttonWillUnmount:m.willUnmount}})),viewsWithButtons:o,hasTitle:l}}class kh{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}
1get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const Lh={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",className:"",groupId:"_businessHours"};function Ah(t,e){return Ht(Wh(t),null,e)}function Wh(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>({...Lh,...n})),e}function Bh(t,e,n){let r;/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange;let s;const i={isEndExclusive:t.isRangeAllDay};return e.titleFormat?s=n.formatRangeToParts(r.start,r.end,O(e.titleFormat),i):(s=n.formatRangeToParts(r.start,r.end,O(Ls(t,e.disallowAmbigTitle,"long")),i),Uh(s)&&(s=n.formatRangeToParts(r.start,r.end,O(Ls(t,e.disallowAmbigTitle,"short")),i))),ne(s)}function Ls(t,e,n){const{currentRangeUnit:r}=t;if(r==="year")return{year:"numeric"};if(r==="month")return{year:"numeric",month:n};if(!e){const s=It(t.currentRange.start,t.currentRange.end);if(s!==null&&s>1)return{year:"numeric",month:n}}return{year:"numeric",month:"long",day:"numeric"}}function Uh(t){let e=!1,n=!1;for(const r of t)r.type==="month"&&(r.source==="startRange"&&(e=!0),r.source==="endRange"&&(n=!0));return e&&n}class As{constructor(){this.resetListeners=new Set}handleInput(e,n){const r=this.dateEnv;if(e!==r&&(typeof n=="function"?this.nowFn=n:r||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,r))for(const s of this.resetListeners.values())s()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class _h{constructor(e){this.computeCurrentViewData=M(this._computeCurrentViewData),this.organizeRawLocales=M(yf),this.buildLocale=M(ra),this.buildPluginHooks=hh(),this.buildDateEnv=M(Oh),this.parseToolbars=M(Hh),this.buildViewSpecs=M(Sh),this.buildDateProfileGenerator=Rt(jh),this.buildViewApi=M(Fh),this.buildViewUiProps=Rt(Gh),this.buildEventUiBySource=M(zh,Ae),this.buildEventUiBases=M(Vh),this.parseContextBusinessHours=Rt(Yh),this.buildToolbarProps=M(qh),this.buildTitle=M(Bh),this.nowManager=new As,this.isDrainingActionQueue=!1,this.actionQueue=[],this.optionOverrides={},this.emitter=new Ut,this.currentCalendarOptionsRefiners={},this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.handleNowChange=()=>{this.dispatch({type:"UPDATE_NOW"})},this.dispatch=n=>{this.actionQueue.push(n),this.isDrainingActionQueue||this.drainActionQueue()},this.config=e,this.nowManager=new As,this.nowTimer=new ma(this.handleNowChange)}destroy(){this.nowTimer.destroy()}update(e){return this.optionOverrides=e,this.actionQueue.push({type:"IDLE"}),this.drainActionQueue(),this.data}resetOptions(e,n){n===void 0?this.optionOverrides=e:(this.optionOverrides={...this.optionOverrides,...e},this.optionsForRefining.push(...n)),this.dispatch({type:"RESET_OPTIONS"})}drainActionQueue(){let e,{state:n,data:r}=this;const s=!n,{actionQueue:i}=this,a=[];for(this.isDrainingActionQueue=!0;i.length;){const o=i.shift();({state:n,data:r,calendarContext:e}=this.reduce(n,r,o)),this.state=n,this.data=r,o.type!=="IDLE"&&a.push(o)}if(this.isDrainingActionQueue=!1,s){const o=e.options.controller;o&&o._setApi(this.config.calendarApi)}if(!s&&a.length){const{onDataChange:o}=this.config;o&&o(this.data,a)}}
1reduce(e,n,r){let{config:s}=this,i=!e,a=i?{}:Rh(e.dynamicOptionOverrides,r),o=this.computeOptionsData(this.optionOverrides,a,s.calendarApi),l=i?o.calendarOptions.initialView||o.pluginHooks.initialView:wh(e.currentViewType,r),c=this.computeCurrentViewData(l,o,this.optionOverrides,a);s.calendarApi.currentDataManager=this,this.emitter.setThisContext(s.calendarApi),this.emitter.setOptions(c.options);let d={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:s.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},{nowDate:u}=this.nowTimer.update({unit:"day",unitValue:1,nowIndicatorSnap:"auto",nowManager:this.nowManager,dateEnv:o.dateEnv}),g=i?Ch(o.calendarOptions,o.dateEnv,this.nowManager):Dh(e.currentDate,r),m;i?m=c.dateProfileGenerator.build(g,u):(m=e.dateProfile,n&&n.dateProfileGenerator!==c.dateProfileGenerator&&(m=c.dateProfileGenerator.build(g,u)),m=Th(m,r,g,u,c.dateProfileGenerator)),(r&&(r.type==="PREV"||r.type==="NEXT")||!Me(m.activeRange,g))&&(g=m.currentRange.start);let y=i?Wf(o.calendarOptions,m,d):Bf(e.eventSources,r,m,d),p=i?le():nh(e.eventStore,r,y,m,d),E=oa(y),D=i?le():E&&!c.options.progressiveEventRendering&&e.renderableEventStore||p,{eventUiSingleBase:C,selectionConfig:w}=this.buildViewUiProps(d),T=this.buildEventUiBySource(y),x=i?{}:this.buildEventUiBases(D.defs,C,T),N={dynamicOptionOverrides:a,currentViewType:l,currentDate:g,dateProfile:m,eventSources:y,eventStore:p,renderableEventStore:D,selectionConfig:w,eventUiBases:x,businessHours:this.parseContextBusinessHours(d),dateSelection:i?null:xh(e.dateSelection,r),eventSelection:i?"":Mh(e.eventSelection,r),eventDrag:i?null:Ih(e.eventDrag,r),eventResize:i?null:Nh(e.eventResize,r),nowDate:u},H={...d,...N};for(let q of o.pluginHooks.reducers)Object.assign(N,q(e,r,H));let A=e?Ws(e,d):!1,L=Ws(N,d);!A&&L?this.emitter.trigger("loading",!0):A&&!L&&this.emitter.trigger("loading",!1);let B=this.buildTitle(m,c.options,o.dateEnv),G=this.buildToolbarProps(c.viewSpec,m,c.dateProfileGenerator,g,u,B),_={viewTitle:B,nowManager:this.nowManager,calendarApi:s.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData,toolbarProps:G,...o,...c,...N},z=o.pluginHooks.optionChangeHandlers,Q=n&&n.calendarOptions,$=o.calendarOptions;if(Q&&Q!==$){Q.timeZone!==$.timeZone&&(N.eventSources=_.eventSources=Uf(_.eventSources,m,_),N.eventStore=_.eventStore=Is(_.eventStore,n.dateEnv,_.dateEnv),N.renderableEventStore=_.renderableEventStore=Is(_.renderableEventStore,n.dateEnv,_.dateEnv));for(let q in z)(this.optionsForHandling.indexOf(q)!==-1||Q[q]!==$[q])&&z[q]($[q],_)}return this.optionsForHandling=[],{state:N,data:_,calendarContext:d}}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:s,pluginHooks:i,localeDefaults:a,availableLocaleData:o}=this.processRawCalendarOptions(e,n),l=this.buildDateEnv(s.timeZone,s.locale,s.weekNumberCalculation,s.firstDay,s.weekTextLong,s.weekTextShort,i,o),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides),d=this.parseToolbars(s,c,r);return this.stableCalendarOptionsData={calendarOptions:s,pluginHooks:i,dateEnv:l,viewSpecs:c,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,n){let{locales:r,locale:s}=Te(An,e,n),i=this.organizeRawLocales(r),a=i.map,o=this.buildLocale(s||i.defaultCode,a).options,l=this.buildPluginHooks(e.plugins||[],Zf),c=this.currentCalendarOptionsRefiners={...Es,...bs,...ws,...l.listenerRefiners,...l.optionRefiners},d=Te(An,...l.optionDefaults,o,Us(Te(e,n),c)),u={},g=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,y=!1;for(let p in d)this.optionsForRefining.indexOf(p)===-1&&(d[p]===g[p]||et[p]&&p in g&&et[p](g[p],d[p])||nr(g[p],d[p]))?u[p]=m[p]:c[p]&&(u[p]=c[p](d[p],p),y=!0);return y&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:o}}
1_computeCurrentViewData(e,n,r,s){let i=n.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a}=this.processRawViewOptions(i,n.pluginHooks,n.localeDefaults,r,s);this.nowManager.handleInput(n.dateEnv,a.now);let o=this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.config.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),l=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:i,options:a,dateProfileGenerator:o,viewApi:l}}processRawViewOptions(e,n,r,s,i){let a={...Es,...bs,...ws,...Hu,...n.listenerRefiners,...n.optionRefiners},o=Te(An,...n.optionDefaults,e.optionDefaults,r,Us(Te(s,e.optionOverrides,i),a)),l={},c=this.currentViewOptionsInput,d=this.currentViewOptionsRefined,u=!1;for(let g in o)o[g]===c[g]||et[g]&&et[g](o[g],c[g])||nr(c[g],o[g])?l[g]=d[g]:(o[g]===this.currentCalendarOptionsInput[g]||et[g]&&et[g](o[g],this.currentCalendarOptionsInput[g])?g in this.currentCalendarOptionsRefined&&(l[g]=this.currentCalendarOptionsRefined[g]):a[g]&&(l[g]=a[g](o[g],g)),u=!0);return u&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined}}}function Oh(t,e,n,r,s,i,a,o){let l=ra(e||o.defaultCode,o.map);return new nu({calendarSystem:"gregory",timeZone:t,locale:l,weekNumberCalculation:n,firstDay:r,weekTextLong:s,weekTextShort:i,cmdFormatter:a.cmdFormatter})}function jh(t){let e=t.dateProfileGeneratorClass||pa;return new e(t)}function Fh(t,e,n){return new kh(t,e,n)}function zh(t){return Ne(t,e=>e.ui)}function Vh(t,e,n){let r={"":e};for(let s in t){let i=t[s];i.sourceId&&n[i.sourceId]&&(r[s]=n[i.sourceId])}return r}function Gh(t){const{options:e}=t;return{eventUiSingleBase:fn({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow},t),selectionConfig:fn({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function Ws(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function Yh(t){return Ah(t.options.businessHours,t)}const Bs={};function Us(t,e){const n={};for(const r in t)e[r]?n[r]=t[r]:Bs[r]||(Le(`Unknown option \`${r}\`.`),Bs[r]=!0);return n}function qh(t,e,n,r,s,i){let a=n.build(s,s,void 0,!1),o=n.buildPrev(e,r,s,!1),l=n.buildNext(e,r,s,!1);return{title:i,selectedButton:t.type,navUnit:t.singleUnit,isTodayEnabled:a.isValid&&!Me(e.currentRange,s),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}class Zh{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):Le(`Unknown listener \`${e}\`.`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),s;n=n||"day",s=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),s?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:s.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),s=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),i,a;for(let o in n)s.push(o);for(i=0;i<s.length;i+=1)if(a=n[s[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=U(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}
1))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return ne(r.formatToParts(r.createMarker(e),O(n)))}formatRange(e,n,r){let{dateEnv:s}=this.getCurrentData();return ne(s.formatRangeToParts(s.createMarker(e),s.createMarker(n),O(r),r))}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let s=this.getCurrentData(),i=zu(r,s.dateEnv,U({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Qi(i,null,s))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),$u(e,n))}addEvent(e,n){if(e instanceof V){let a=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Jn({def:a,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),s;if(n instanceof tt)s=n.internalEventSource;else if(typeof n=="boolean")n&&([s]=Fi(r.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return Le(`Unknown event source ID \`${n}\`.`),null;s=a.internalEventSource}let i=Zi(e,s,r,!1);if(i){let a=new V(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Jn(i)}),this.triggerEventAdd(a),a}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Ji(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:s}=n.eventStore;e=String(e);for(let i in r){let a=r[i];if(a.publicId===e){if(a.recurringDef)return new V(n,a,null);for(let o in s){let l=s[o];if(l.defId===a.defId)return new V(n,a,l)}}}return null}getEvents(){let e=this.getCurrentData();return ze(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let s in n)r.push(new tt(e,n[s]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let s in r)if(r[s].publicId===e)return new tt(n,r[s]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof tt)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=ia(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new tt(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=U(e);n&&this.trigger("_timeScrollRequest",n)}getButtonState(){var c;const e=this.getCurrentData(),{toolbarProps:n}=e,r=e.calendarOptions,s=r.buttons||{},i=e.viewSpecs,a=e.viewSpec.singleUnit,o=[a?_s(a,r):"",a],l={today:{text:r.todayText,hint:ue(r.todayHint,o,r.todayText),isDisabled:!n.isTodayEnabled},prev:{text:r.prevText,hint:ue(r.prevHint,o,r.prevText),isDisabled:!n.isPrevEnabled},next:{text:r.nextText,hint:ue(r.nextHint,o,r.nextText),isDisabled:!n.isNextEnabled},prevYear:{text:r.prevYearText,hint:ue(r.prevHint,[r.yearText,"year"],r.prevYearText),isDisabled:!1},nextYear:{text:r.prevYearText,hint:ue(r.nextHint,[r.yearText,"year"],r.nextYearText),isDisabled:!1}};for(const d in i){const u=i[d],{singleUnit:g}=u,m=u.optionDefaults.buttonTextKey,y=((c=s[d])==null?void 0:c.text)||(m?r[m]:"")||(g?_s(g,r):"")||d,p=ue(r.viewHint,[y,d],y);l[d]={text:y,hint:p}}return l}}function _s(t,e){return e[t+"TextLong"]||e[t+"Text"]}class $h extends I.Component{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Tt.flushSync(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{Tt.flushSync(()=>{this.setState({forPrint:!1})})}}render(){var e;return(e=this.props)==null?void 0:e.children(this.state.forPrint)}componentDidMount(){const{props:e}=this,{emitter:n}=e;n.on("_beforeprint",this.handleBeforePrint),n.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){const{props:e}=this,{emitter:n}=e;n.off("_beforeprint",this.handleBeforePrint),n.off("_afterprint",this.handleAfterPrint)}}function Xh(t,e){let n=t.borderlessX??t.borderless,r=t.borderlessTop??t.borderless,s=t.borderlessBottom??t.borderless;const i={borderlessX:!!n,borderlessTop:!!r,borderlessBottom:!!s};return v(b(t.class,i),b(t.className,i),f.borderBoxRoot,f.isolate,f.flexCol,e?f.calendarPrintRoot:f.calendarScreenRoot)}class Kh extends W{render(){const{contentGenerator:e,className:n}=this.props;if(e)return h.jsx(F,{tag:"span",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:{},generatorName:void 0,customGenerator:e});
1if(n!==void 0)return h.jsx("span",{"aria-hidden":!0,className:n})}}class Qh extends W{render(){let{props:e}=this,{options:n}=this.context,r=e.widgetGroups.map(s=>this.renderWidgetGroup(s));return I.createElement("div",{className:b(n.toolbarSectionClass,{name:e.name})},...r)}renderWidgetGroup(e){let{props:n,context:r}=this,{options:s}=r,i=[],a=!0,o=!0;for(const l of e){const{name:c,isView:d}=l;c==="title"?a=!1:d||(o=!1)}for(let l of e){let{name:c,customElement:d,buttonHint:u}=l;if(c==="title")i.push(h.jsx("div",{role:"heading","aria-level":s.headingLevel,id:n.titleId,className:v(s.toolbarTitleClass),children:n.title}));else if(d)i.push(h.jsx(F,{tag:"span",style:{display:"contents"},renderProps:{},generatorName:void 0,customGenerator:d}));else{let g=c===n.selectedButton,m=!n.isTodayEnabled&&c==="today"||!n.isPrevEnabled&&c==="prev"||!n.isNextEnabled&&c==="next",y=l.buttonDisplay??s.buttonDisplay;y==="auto"&&(y=l.buttonIconContent||l.buttonIconClass?"icon":"text");let p;y!=="text"&&(p=h.jsx(Kh,{className:l.buttonIconClass,contentGenerator:l.buttonIconContent}));let E=e.length>1&&a,D=E?{hasSelection:o}:null,C={name:c,text:l.buttonText,isPrimary:l.buttonIsPrimary,isSelected:g,isDisabled:m,isIconOnly:y==="icon",buttonGroup:D};i.push(h.jsx(F,{tag:"button",attrs:{type:"button",disabled:m,...a&&o?{role:"tab","aria-selected":g}:{"aria-pressed":g},"aria-label":typeof u=="function"?u(n.navUnit):u,onClick:l.buttonClick},className:v(b(s.buttonClass,C),!m&&f.cursorPointer,E&&v(g?f.z1:f.z0,f.focusZ2)),renderProps:C,generatorName:void 0,classNameGenerator:l.buttonClass,didMount:l.buttonDidMount,willUnmount:l.buttonWillUnmount,children:()=>y==="text"?l.buttonText:y==="icon"?p:y==="icon-text"?h.jsxs(h.Fragment,{children:[p,l.buttonText]}):h.jsxs(h.Fragment,{children:[l.buttonText,p]})}))}}return i.length>1?I.createElement("div",{role:a&&o?"tablist":void 0,"aria-label":a&&o?s.viewChangeHint:void 0,className:v(b(s.buttonGroupClass,{hasSelection:o}),f.isolate)},...i):i[0]}}class Os extends W{render(){let{props:e}=this,n=this.context.options,{sectionWidgets:r}=e.model;const{borderlessX:s,borderlessTop:i,borderlessBottom:a}=Ee(n),o=e.isHeader?n.headerToolbarClass:n.footerToolbarClass;return h.jsxs("div",{className:v(b(o,{borderlessX:s,borderlessTop:i,borderlessBottom:a}),b(n.toolbarClass,{borderlessX:s,borderlessTop:i,borderlessBottom:a})),children:[this.renderSection("start",r.start),this.renderSection("center",r.center),this.renderSection("end",r.end)]})}renderSection(e,n){let{props:r}=this;return h.jsx(Qh,{name:e,widgetGroups:n,title:r.title,titleId:r.titleId,navUnit:r.navUnit,selectedButton:r.selectedButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled},e)}}class Jh extends pt{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:s}=this,{context:i}=s,a=dt(r);a&&s.isValidSegDownEl(n.target)&&i.emitter.trigger("eventClick",{el:r,event:new V(s.context,a.def,a.instance),jsEvent:n,view:i.viewApi})},this.destroy=_i(e.el,"click",`.${f.internalEvent}`,this.handleSegClick)}}class eg extends pt{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{dt(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=mu(e.el,`.${f.internalEvent}`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:s}=this,{context:i}=s,a=dt(r);(!n||s.isValidSegDownEl(n.target))&&i.emitter.trigger(e,{el:r,event:new V(i,a.def,a.instance),jsEvent:n,view:i.viewApi})}}class tg extends $e{constructor(){super(...arguments),this.buildViewContext=M(Xf),this.buildViewPropTransformers=M(ng),this.interactionsStore={},this.calendarInteractions=[],this.registerInteractiveComponent=(e,n)=>{let r=lh(e,n),i=[Jh,eg];n.disableHits||(i=i.concat(this.props.pluginHooks.componentInteractions));let a=i.map(o=>new o(r));this.interactionsStore[e.uid]=a,rr[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete rr[e.uid]}}get viewTitleId(){return this.props.baseId+"title"}render(){const{props:e}=this;let{toolbarConfig:n,options:r}=e,s,i=!1,a;e.forPrint||he(r)||(r.height!=null?i=!0:r.contentHeight!=null?s=r.contentHeight:a=Math.max(r.aspectRatio,.5));let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,e.baseId,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return h.jsxs(Pe.Provider,{value:o,children:[n.header&&h.jsx(Os,{model:n.header,isHeader:!0,titleId:this.viewTitleId,...e.toolbarProps}
1),h.jsxs("div",{className:v(f.flexCol,f.rel,f.overflowAnchorNone,f.minHeight0,i&&f.liquid),style:{height:s,aspectRatio:a!=null?String(a):void 0},children:[this.renderView(v((i||s)&&f.liquid,a!=null&&f.fill,f.internalView)),this.buildAppendContent()]}),n.footer&&h.jsx(Os,{model:n.footer,isHeader:!1,...e.toolbarProps})]})}renderView(e){const{props:n}=this,{pluginHooks:r,viewSpec:s,toolbarConfig:i,toolbarProps:a}=n;let o={className:e,dateProfile:n.dateProfile,businessHours:n.businessHours,eventStore:n.renderableEventStore,eventUiBases:n.eventUiBases,dateSelection:n.dateSelection,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,forPrint:n.forPrint,labelId:i.header&&i.header.hasTitle?this.viewTitleId:void 0,labelStr:i.header&&i.header.hasTitle?void 0:a.title},l=this.buildViewPropTransformers(r.viewPropsTransformers),c={...n,toolbarProps:a,forPrint:n.forPrint};for(let u of l)Object.assign(o,u.transform(o,c));let d=s.component;return h.jsx(d,{...o})}buildAppendContent(){const{props:e}=this;return h.jsx(h.Fragment,{children:e.pluginHooks.viewContainerAppends.map((n,r)=>h.jsx(I.Fragment,{children:n(e)},r))})}componentDidMount(){const{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e));let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e);for(let r of e.pluginHooks.contextInit)r(e)}componentDidUpdate(e){const{props:n}=this;let{propSetHandlers:r}=n.pluginHooks;for(let s in r)n[s]!==e[s]&&r[s](n[s],n)}componentWillUnmount(){const{props:e}=this;for(let n of this.calendarInteractions)n.destroy();this.calendarInteractions=[],e.emitter.trigger("_unmount")}}function ng(t){return t.map(e=>new e)}const rg=I.forwardRef((t,e)=>{const n=ag(t.id),[r,s]=I.useState("");function i(c,d){(sg(d)?Tt.flushSync:ig)(()=>{s(He())})}const[a]=I.useState(()=>new Zh),[o]=I.useState(()=>new _h({calendarApi:a,onDataChange:i}));I.useEffect(()=>()=>{o.destroy()},[]),I.useImperativeHandle(e,()=>({getApi:()=>a}),[]);const l=o.update(t);return h.jsx($h,{emitter:l.emitter,children:c=>{const d=l.calendarOptions,u=d.direction==="rtl",g=Xh(d,c);return h.jsx("div",{dir:u?"rtl":void 0,className:g,style:{height:d.height},"data-color-scheme":d.colorScheme||void 0,children:h.jsx(tg,{...l,baseId:n,forPrint:c})})}})});function sg(t){for(const e of t)if(e.type==="SET_EVENT_DRAG"||e.type==="UNSET_EVENT_DRAG"||e.type==="SET_EVENT_RESIZE"||e.type==="UNSET_EVENT_RESIZE"||e.type==="MERGE_EVENTS")return!0;return!1}function ig(t){t()}let js=!1;function ag(t){if(de.useId)return de.useId();const[e]=I.useState(()=>He());return t?t+":":(js||(js=!0,Le("Missing `id` prop. Provide one for better SSR support in React 17.")),`fc:${e}:`)}function og(){const t=I.useCallback(()=>{n({controller:e.controller})},[]),[e,n]=I.useState(()=>({controller:new $f(t)}));return e.controller}function ba(t){const e=t.getRootNode();return e instanceof Document?e.body||e.documentElement:e}function Pt(t){return getComputedStyle(t).direction==="rtl"}const lg=/(top|left|right|bottom|width|height)$/i;function sn(t,e){for(let n in e)cg(t,n,e[n])}function cg(t,e,n){n==null?t.style[e]="":typeof n=="number"&&lg.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function wa(t){var e;return((e=t.composedPath)==null?void 0:e.call(t)[0])??t.target}class _t extends I.Component{constructor(e,n){super(e,n),this.handleChange=()=>{this.forceUpdate()},this.runner=new ma(this.handleChange)}render(){const{props:e,context:n}=this,{nowDate:r,todayRange:s}=this.runner.update({nowManager:n.nowManager,unit:e.unit,unitValue:e.unitValue,nowIndicatorSnap:n.options.nowIndicatorSnap,dateEnv:n.dateEnv});return e.children(r,s)}componentWillUnmount(){this.runner.destroy()}}_t.contextType=Pe;const zr=O({year:"numeric",month:"long",day:"numeric"}),dg=O({week:"long"}),mn=O({weekday:"long"});function kt(t){for(const e of t)if(e.type==="weekday")return e.value;return""}function Lt(t){for(const e of t)if(e.type==="day")return e.value;return""}function Da(t){for(const e of t)if(e.type==="month")return e.value;return""}function vt(t,e,n="day"){return ne(t.dateEnv.formatToParts(e,n==="week"?dg:zr))}function yt(t,e,n="day",r=vt(t,e,n),s=!0){const{dateEnv:i,options:a,calendarApi:o}=t,l=i.toDate(e),c=d=>{let u=n==="day"?a.navLinkDayClick:n==="week"?a.navLinkWeekClick:null;typeof u=="function"?u.call(o,i.toDate(e),d):(typeof u=="string"&&(n=u),o.zoomTo(e,n))};return{role:"link","aria-label":ue(a.navLinkHint,[r,l],r),className:v(a.navLinkClass,f.cursorPointer,f.internalNavLink),...s?Mr(c):{onClick:c}}}function Xe(t,e,n,r,s){const i=!!(n&&(!n.activeRange||!Me(n.activeRange,t)));return{date:e.toDate(t),dow:t.getUTCDay(),isDisabled:i,isOther:!i&&!!(n&&!Me(n.currentRange,t)),isToday:!i&&!!(r&&Me(r,t)),isPast:!i&&!!(s?t<s:r&&t<r.start),isFuture:!i&&!!(s?t>s:r&&t>
1=r.end)}}function ir(t,e){return t!=null&&(t===e||Math.abs(t-e)<.01)}const ug=!0,ar=new Map,or=new Set;let lr=!1,Wn=!1;function te(t){or.add(t),!lr&&!Wn&&(Wn=!0,requestAnimationFrame(()=>{Wn=!1,Ca()}))}function Ca(){for(const t of or.values())t(),or.delete(t)}const $t=typeof ResizeObserver<"u"&&new ResizeObserver(t=>{lr=!0;for(let e of t){const n=e.target,r=ar.get(n);let s,i;if(e.borderBoxSize&&ug){const o=e.borderBoxSize[0]||e.borderBoxSize;s=o.inlineSize,i=o.blockSize}else({width:s,height:i}=n.getBoundingClientRect());let a=!1;ir(r.width,s)||(r.width=s,a=r.watchWidth),ir(r.height,i)||(r.height=i,a||(a=r.watchHeight)),a&&r.callback(s,i)}Tt.flushSync(()=>{Ca(),lr=!1})});function St(t,e,n=!0,r=!0){return ar.set(t,{callback:e,watchWidth:n,watchHeight:r}),$t&&$t.observe(t,{box:"border-box"}),()=>{ar.delete(t),$t&&$t.unobserve(t)}}function Vr(t,e){return St(t,e,!0)}function ut(t,e){return St(t,(n,r)=>e(r),!1,!0)}class Mn extends W{constructor(){super(...arguments),this.refineRenderProps=Rt(fg)}render(){const{props:e,context:n}=this,{options:r,viewSpec:s}=n,i=this.refineRenderProps({...Ee(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:he(r),viewApi:n.viewApi});return h.jsx(F,{elRef:e.elRef,tag:e.tag||"div",attrs:e.attrs,style:e.style,className:v(e.className,b(r.viewClass,i),b(s.optionDefaults.class,i),b(s.optionDefaults.className,i),b(s.optionOverrides.class,i),b(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount,children:()=>e.children})}}function fg(t){return{view:t.viewApi,borderlessX:t.borderlessX,borderlessTop:t.borderlessTop,borderlessBottom:t.borderlessBottom,options:t.options,isHeightAuto:t.isHeightAuto}}class be extends W{constructor(){super(...arguments),this.uid=He()}prepareHits(){}queryHit(e,n,r,s,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!e.closest(`.${f.internalEventMirror}`)}isValidDateDownEl(e){return!e.closest(`.${f.internalEvent}:not(.${f.internalBgEvent})`)&&!e.closest(`.${f.internalMoreLink}`)&&!e.closest(`.${f.internalNavLink}`)&&!e.closest(`.${f.internalPopover}`)}}class Fs{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}class hg{constructor(e){this.el=e,this.emitter=new Ut,this.isScroll=!1,this.isScrollRecent=!1,this.isWheelRecent=!1,this.isMouseDown=!1,this.isTouchDown=!1,this.isMouse=!1,this.isTouch=!1,this.isWheel=!1,this.handleScroll=()=>{this.isScrollRecent=!0,this.isMouseDown&&(this.isMouse=!0),this.isTouchDown&&(this.isTouch=!0),this.isWheelRecent&&(this.isWheel=!0),this.startScroll(),this.emitter.trigger("scroll",this.getIsDevice()),this.scrollWaiter.request(500)},this.handleScrollWait=()=>{this.isScrollRecent=!1,this.isTouchDown||this.endScroll()},this.handleWheel=()=>{this.isWheelRecent=!0,this.wheelWaiter.request(500)},this.handleWheelWait=()=>{this.isWheelRecent=!1},this.handleMouseDown=()=>{this.isMouseDown=!0},this.handleMouseUp=()=>{this.isMouseDown=!1},this.handleTouchStart=()=>{this.isTouchDown=!0},this.handleTouchEnd=()=>{this.isTouchDown=!1,this.isScrollRecent||this.endScroll()},this.wheelWaiter=new Fs(this.handleWheelWait),this.scrollWaiter=new Fs(this.handleScrollWait),e.addEventListener("scroll",this.handleScroll,{passive:!0}),e.addEventListener("wheel",this.handleWheel,{passive:!0}),e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("mouseup",this.handleMouseUp),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd)}destroy(){let{el:e}=this;e.removeEventListener("scroll",this.handleScroll,{passive:!0}),e.removeEventListener("wheel",this.handleWheel,{passive:!0}),e.removeEventListener("mousedown",this.handleMouseDown),e.removeEventListener("mouseup",this.handleMouseUp),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd)}startScroll(){this.isScroll||(this.isScroll=!0,this.emitter.trigger("scrollStart",this.getIsDevice()))}endScroll(){this.isScroll&&(this.scrollWaiter.clear(),this.wheelWaiter.clear(),this.isScroll=!1,this.isWheelRecent=!1,this.emitter.trigger("scrollEnd",this.getIsDevice()),this.isMouse=!1,this.isTouch=!1,this.isWheel=!1)}getIsDevice(){return this.isWheel||this.isMouse||this.isTouch}}class pe extends be{constructor(){super(...arguments),this.handleEl=e=>{this.el&&(this.el=null,this._isUnmounting=!0,this.listener.destroy()),e&&(this.el=e,this._isUnmounting=!1,this.listener=new hg(e))},this.handleHRuler=e=>{this.disconnectHRuler&&(this.disconnectHRuler(),this.disconnectHRuler=void 0,this.clientWidth!==void 0&&(this.clientWidth=void 0,P(this.props.clientWidthRef,null))),e&&(this.disconnectHRuler=Vr(e,n=>{this._isUnmounting||n!==this.clientWidth&&(this.clientWidth=n,P(this.props.clientWidthRef,n))}))},this.handleVRuler=e=>{this.disconnectVRuler&&(this.disconnectVRuler(),this.disconnectVRuler=void 0,this.clientHeight!==void 0&&(this.clientHeight=void 0,P(this.props.clientHeightRef,null))),e&&(this.disconnectVRuler=ut(e,n=>{if(this._isUnmounting)return;n!==this.clientHeight&&(this.clientHeight=n,P(this.props.clientHeightRef,n));const r=Math.round(this.el.getBoundingClientRect().height-n);r!==this.bottomScrollbarWidth&&(this.bottomScrollbarWidth=r,P(this.props.bottomScrollbarWidthRef,r))}))}}render(){const{props:e}=this,n=e.horizontal||e.vertical?"hidden":"";return h.jsxs("div",{ref:this.handleEl,className:v(e.className,f.n
1oPadding,f.rel,e.hideScrollbars&&f.noScrollbars,f.internalScroller),style:{...e.style,overflowX:e.horizontal?"auto":n,overflowY:e.vertical?"auto":n},children:[e.children,!!e.clientWidthRef&&h.jsx("div",{ref:this.handleHRuler,className:f.fillTop}),!!(e.clientHeightRef||e.bottomScrollbarWidthRef)&&h.jsx("div",{ref:this.handleVRuler,className:f.fillStart})]})}endScroll(){this.listener.endScroll()}get x(){const{el:e}=this;return e?gg(e):0}get y(){const{el:e}=this;return e?e.scrollTop:0}scrollTo({x:e,y:n}){const{el:r}=this;r&&(n!=null&&(r.scrollTop=n),e!=null&&mg(r,e))}addScrollStartListener(e){this.listener.emitter.on("scrollStart",e)}removeScrollStartListener(e){this.listener.emitter.off("scrollStart",e)}addScrollEndListener(e){this.listener.emitter.on("scrollEnd",e)}removeScrollEndListener(e){this.listener.emitter.off("scrollEnd",e)}}function gg(t){const{scrollLeft:e}=t;return Pt(t)?pg(e,t):e}function mg(t,e){const n=Pt(t);t.scrollLeft=n?vg(e,t):e}function pg(t,e){switch(Ra()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}function vg(t,e){switch(Ra()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}let zs;function Ra(){return zs||(zs=yg())}function yg(){let t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.direction="rtl";let e=document.createElement("div");e.style.width="200px",e.style.height="200px",t.appendChild(e),document.body.appendChild(t);let n;return t.scrollLeft>0?n="positive":(t.scrollLeft=50,t.scrollLeft>0?n="reverse":n="negative"),t.remove(),n}class Ot extends W{constructor(){super(...arguments),this.buildPublicEvent=M((e,n,r)=>new V(e,n,r)),this.handleEl=e=>{this.el=e,P(this.props.elRef,e),e&&hn(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{options:r}=n,{eventRange:s}=e,i=s.ui,a=r.eventTimeFormat||e.defaultTimeFormat,o=e.forcedTimeText??tf(a,s,e.slicedStart,e.slicedEnd,e.isStart,e.isEnd,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd),[l,c,d]=af(s,n),u=this.buildPublicEvent(n,s.def,s.instance),g=!e.disableDragging&&ef(s,n),m=/row|column/.test(e.display),y={event:u,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,timeText:o},p={event:u,view:n.viewApi,timeText:o,color:i.color||r.eventColor,contrastColor:i.contrastColor||r.eventContrastColor,isDraggable:g,isStartResizable:!e.disableResizing&&e.isStart&&i.durationEditable&&r.eventResizableFromStart,isEndResizable:!e.disableResizing&&e.isEnd&&i.durationEditable,isMirror:e.isMirror,isStart:!!e.isStart,isEnd:!!e.isEnd,isFirst:!!e.isFirst,isLast:!!e.isLast,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing,isInteractive:d,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,level:e.level||0,timeClass:v(b(r.eventTimeClass,y),m&&b(r.blockEventTimeClass,y),e.display==="row"&&b(r.rowEventTimeClass,y),e.display==="column"&&b(r.columnEventTimeClass,y),e.display==="list-item"&&b(r.listItemEventTimeClass,y)),titleClass:v(b(r.eventTitleClass,y),m&&b(r.blockEventTitleClass,y),e.display==="row"&&b(r.rowEventTitleClass,y),e.display==="column"&&b(r.columnEventTitleClass,y),e.display==="list-item"&&b(r.listItemEventTitleClass,y),e.display==="row"&&r.rowEventTitleSticky&&f.stickyS,e.display==="column"&&r.columnEventTitleSticky&&f.stickyT),options:{eventOverlap:!!r.eventOverlap}},E=v(m&&b(r.blockEventClass,p),e.display==="row"&&b(r.rowEventClass,p),e.display==="column"&&b(r.columnEventClass,p),e.display==="list-item"&&b(r.listItemEventClass,p),i.className,e.className,e.display==="column"?f.flexCol:f.flexRow,(s.def.url||g)&&f.cursorPointer,f.internalEvent,e.isMirror&&f.internalEventMirror,g&&f.internalEventDraggable,p.isSelected&&f.internalEventSelected,(p.isStartResizable||p.isEndResizable)&&f.internalEventResizable),D=v(b(r.eventBeforeClass,p),m&&b(r.blockEventBeforeClass,p),e.display==="row"&&b(r.rowEventBeforeClass,p),e.display==="column"&&b(r.columnEventBeforeClass,p),e.display==="list-item"&&b(r.listItemEventBeforeClass,p)),C=v(b(r.eventAfterClass,p),m&&b(r.blockEventAfterClass,p),e.display==="row"&&b(r.rowEventAfterClass,p),e.display==="column"&&b(r.columnEventAfterClass,p),e.display==="list-item"&&b(r.listItemEventAfterClass,p)),w=v(b(r.eventInnerClass,p),m&&b(r.blockEventInnerClass,p),e.display==="row"&&b(r.rowEventInnerClass,p),e.display==="column"&&b(r.columnEventInnerClass,p),e.display==="list-item"&&b(r.listItemEventInnerClass,p),!e.disableLiquid&&f.liquid),T=e.display==="row"&&r.rowEventBeforeContent,x=e.display==="row"&&r.rowEventAfterContent;return h.jsx(F,{tag:l,attrs:{...e.attrs,...c,dir:e.isDragging&&r.direction==="rtl"?"rtl":void 0},className:E,style:{"--fc-event-color":p.color,"--fc-event-contrast-color":p.contrastColor},elRef:this.handleEl,renderProps:p,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:Sg,classNameGenerator:r.eventClass,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount,children:N=>h.jsxs(h.Fragment,{children:[!!(p.isSelected&&m)&&h.jsx("div",{className:e.display==="column"?f.hitX:f.hitY}),(D||T)&&h.jsxs("div",{className:v(D,!e.disableZindexes&&f.z1,p.isStartResizable&&v(e.dis
1play==="column"?f.cursorResizeT:f.cursorResizeS,f.internalEventResizer,f.internalEventResizerStart)),children:[T&&h.jsx(F,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:p,generatorName:void 0,customGenerator:T}),!!(p.isStartResizable&&p.isSelected)&&h.jsx("div",{className:f.hit})]}),h.jsx(N,{tag:"div",className:v(w,!e.disableZindexes&&f.z0)}),(C||x)&&h.jsxs("div",{className:v(C,!e.disableZindexes&&f.z1,p.isEndResizable&&v(e.display==="column"?f.cursorResizeB:f.cursorResizeE,f.internalEventResizer,f.internalEventResizerEnd)),children:[x&&h.jsx(F,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:p,generatorName:void 0,customGenerator:x}),!!(p.isEndResizable&&p.isSelected)&&h.jsx("div",{className:f.hit})]})]})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&hn(this.el,this.props.eventRange)}}Ot.addPropsEquality({seg:Ae});function Sg(t){return h.jsxs(h.Fragment,{children:[t.timeText&&h.jsx("div",{className:t.timeClass,children:t.timeText}),h.jsx("div",{className:t.titleClass,children:t.event.title||h.jsx(h.Fragment,{children:"Â "})})]})}function Eg(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function Ta(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function bg(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function wg(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function Dg(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Cg(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,s=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,o=xg(t),l=o.y-r-s,c=o.x-i-a,d={borderLeft:r,borderRight:s,borderTop:i,borderBottom:a,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return n.direction==="rtl"?d.scrollbarLeft=l:d.scrollbarRight=l,e&&(d.paddingLeft=parseInt(n.paddingLeft,10)||0,d.paddingRight=parseInt(n.paddingRight,10)||0,d.paddingTop=parseInt(n.paddingTop,10)||0,d.paddingBottom=parseInt(n.paddingBottom,10)||0),d}function Rg(t,e=!1,n){let r=Gr(t),s=Cg(t,e),i={left:r.left+s.borderLeft+s.scrollbarLeft,right:r.right-s.borderRight-s.scrollbarRight,top:r.top+s.borderTop,bottom:r.bottom-s.borderBottom-s.scrollbarBottom};return e&&(i.left+=s.paddingLeft,i.right-=s.paddingRight,i.top+=s.paddingTop,i.bottom-=s.paddingBottom),i}function Gr(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function Tg(t){let e=xa(t),n=t.getBoundingClientRect();for(let r of e){let s=Ta(n,r.getBoundingClientRect());if(s)n=s;else return null}return n}function xa(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}function xg(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}class Ma{constructor(){this.sliceBusinessHours=M(this._sliceBusinessHours),this.sliceDateSelection=M(this._sliceDateSpan),this.sliceEventStore=M(this._sliceEventStore),this.sliceEventDrag=M(this._sliceInteraction),this.sliceEventResize=M(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,s,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,n,r,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,a,s,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,s,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,n,r,...i),eventResize:this.sliceEventResize(e.eventResize,a,n,r,...i),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,s,...i){return this._sliceDateSpan({range:{start:e,end:Ve(e,1)},allDay:!1},n,r,{},s,...i)}_sliceBusinessHours(e,n,r,s,...i){return e?this._sliceEventStore(Ye(e,Xt(n,!!r),s),{},n,r,...i).bg:[]}_sliceEventStore(e,n,r,s,...i){if(e){let a=tr(e,n,Xt(r,!!s),s);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,s,...i){if(!e)return null;let a=tr(e.mutatedEvents,n,Xt(r,!!s),s);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,s,i,...a){if(!e)return[];let o=Xt(n,!!r),l=ke(e.range,o);if(l){e={...e,range:l};let c=Zu(e,s,i),d=this.sliceRange(e.range,...a);for(let u of d)u.eventRange=c;return d}return[]}sliceEventRanges(e,n){let r=[];for(let s of e)r.push(...this.sliceEventRange(s,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:K(r.start,1)});let s=this.sliceRange(r,...n);for(let i of s)i.eventRange=e,i.isStart=e.isStart&&i.isStart,i.isEnd=e.isEnd&&i.isEnd;return s}}function Xt(t,e){let n=t.activeRange;return e?n:{start:Ve(n.start,t.slotMinTime.milliseconds),end:Ve(n.end,t.slotMaxTime.milliseconds-864e5)}}class Yr extends Ma{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}const Mg=new Date(2592e5);function Ia(t,e,n,r,s,i){const a=Na(t,e,n,r,s,i),o=va(n,i.dateEnv);if(e&&o!=="day")for(const l of a.dataConfigs)ya(l.dateMarker,o,i.dateEnv)&&(l.renderProps.isMajor=!0);return[a]}function Na(t,e,n,r,s,i,a,o){return{isDateRow:!0,renderConfig:Ig(s,e,i),dataConfigs:Ng(t,e,n,r,s,i,a,void 0,void 0,void 0,void 0,o)}}function Ig(t,e,n){const{options:r}=n;return{generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,classNameGenerator:r.dayHeaderClass,innerClassNameGenerator:r.dayHeaderInnerClass,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount,align:r.dayHeaderAlign,sticky:r._dayHeaderSticky,dayHeaderFormat:t,datesRepDistinctDays:e}}const Ha=[];for(let t=0;t<7;t++)Ha.push(K(new Date(2592e5),t));function Ng(t,e,n,r,s,i,a=1,o="",l={},c={},d="",u){const{dateEnv:g,viewApi:m,options:y}=i;return e?t.map((p,E)=>{const D=Xe(p,g,n,r),C=u!=null&&!(E%u),w=y.navLinks&&!D.isDisabled&&t.length>1,T={...D,...l,isMajor:C,isSticky:!1,inPopover:!1,hasNavLink:w,view:m},x=vt(i,p);return{key:o+p.toUTCString(),dateMarker:p,renderProps:T,attrs:{"aria-label":x,...D.isToday?{"aria-current":"date"}:{},"data-date":mt(p),...c},innerAttrs:w?yt(i,p,void 0,x):{"aria-hidden":!0},colSpan:a,hasNavLink:w,className:d}}):t.map((p,E)=>{const D=p.getUTCDay(),C=K(Mg,D),w={date:g.toDate(p),dow:D,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},T=u!=null&&!(E%u),x={...w,date:Ha[D],isMajor:T,isSticky:!1,inPopover:!1,hasNavLink:!1,view:m,...l}
1,N=ne(g.formatToParts(C,mn));return{key:o+String(D),dateMarker:p,renderProps:x,attrs:{"aria-label":N,...c},innerAttrs:{"aria-hidden":!0},colSpan:a,className:d}})}class ie{constructor(e,n=!1){this.masterCallback=e,this.ignoreDeletes=n,this.rev="",this.current=new Map,this.callbacks=new Map,this.handleValue=(r,s)=>{let{current:i,callbacks:a}=this;r===null?this.ignoreDeletes||(i.delete(s),a.delete(s)):i.set(s,r),this.rev=He(),this.masterCallback&&this.masterCallback(r,s)}}createRef(e){let n=this.callbacks.get(e);return n||(n=r=>{this.handleValue(r,e)},this.callbacks.set(e,n)),n}}class Et extends W{constructor(){super(...arguments),this.elRef=I.createRef()}render(){return h.jsx("div",{ref:this.elRef})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.elRef.current;this.disconnectWidth=Vr(n,r=>{this._isUnmounting||P(e.widthRef,r)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectWidth();const{props:e}=this;e.widthRef&&P(e.widthRef,null)}}function _e(t){return Rn(t)+":"+t.start+(t.standinFor?":standin":t.isSlice?":slice":"")}function an(t,e){const n=[];for(let r=0;r<e;r++)n[r]=[];for(const r of t)n[r.row].push(r);return n}function Vs(t,e){const n=[];if(t){for(let r=0;r<e;r++)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(const r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r++)n[r]=null;return n}function Gs(t,e){return{...t,start:e,end:e+1,isStart:t.isStart&&t.start===e,isEnd:t.isEnd&&t.end-1===e,standinFor:t}}class Pa extends W{constructor(){super(...arguments),this.buildPublicEvent=M((e,n,r)=>new V(e,n,r)),this.handleEl=e=>{this.el=e,e&&hn(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{eventRange:r}=e,{options:s}=n,i=r.ui,a=this.buildPublicEvent(n,r.def,r.instance),o={event:a,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1},l={event:a,view:n.viewApi,timeText:"",color:i.color||s.backgroundEventColor,contrastColor:i.contrastColor,isDraggable:!1,isStartResizable:!1,isEndResizable:!1,isMirror:!1,isStart:e.isStart,isEnd:e.isEnd,isFirst:!1,isLast:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:!1,isDragging:!1,isResizing:!1,isInteractive:!1,level:0,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,timeClass:"",titleClass:b(s.backgroundEventTitleClass,o),options:{eventOverlap:!!s.eventOverlap}},c=v(i.className,f.fill,f.internalEvent,f.internalBgEvent,e.isVertical?f.flexCol:f.flexRow),d=v(b(s.backgroundEventInnerClass,l),f.liquid);return h.jsx(F,{tag:"div",className:c,style:{"--fc-event-color":l.color,"--fc-event-contrast-color":l.contrastColor},defaultGenerator:Hg,elRef:this.handleEl,renderProps:l,generatorName:"backgroundEventContent",customGenerator:s.backgroundEventContent,classNameGenerator:s.backgroundEventClass,didMount:s.backgroundEventDidMount,willUnmount:s.backgroundEventWillUnmount,children:u=>h.jsx(u,{tag:"div",className:d})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&hn(this.el,this.props.eventRange)}}function Hg(t){let{title:e}=t.event;return e&&h.jsx("div",{className:t.titleClass,children:t.event.title})}function ka(t,e){return h.jsx("div",{className:v(t==="non-business"?e.nonBusinessHoursClass:t==="highlight"?e.highlightClass:void 0,f.fill)})}const Bn=10,Pg=1;class kg extends be{constructor(){super(...arguments),this.getDateMeta=M(Xe),this.closeRef=I.createRef(),this.focusStartRef=I.createRef(),this.focusEndRef=I.createRef(),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)},this.handleDocumentMouseDown=e=>{const n=wa(e);this.rootEl.contains(n)||this.handleClose()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleClose()},this.handleClose=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{props:e,context:n}=this,{options:r,dateEnv:s,viewApi:i}=n,{startDate:a,todayRange:o,dateProfile:l}=e,c=this.getDateMeta(a,s,l,o),d=s.formatToParts(a,r.popoverFormat),u=ne(d);const g={...c,isMajor:!1,isNarrow:!1,isSticky:!1,inPopover:!0,level:0,hasNavLink:!1,text:u,textParts:d,get weekdayText(){return kt(d)},get dayNumberText(){return Lt(d)},view:i},m={...c,isMajor:!1,isNarrow:!1,inPopover:!0,hasNavLink:!1,get weekdayText(){return kt(d)},get dayNumberText(){return Lt(d)},get monthText(){return Da(d)},view:i,text:"",textParts:[],options:{businessHours:!!r.businessHours}},y=mt(a),{dayHeaderAlign:p}=r,E=typeof p=="function"?p({level:0,inPopover:!0,isNarrow:!1}):p,D=Pt(e.alignEl);return Tt.createPortal(h.jsxs("div",{"data-date":y,id:e.id,role:"dialog","aria-labelledby":e.titleId,className:v(r.popoverClass,f.flexCol,f.popoverZ,f.abs,f.borderBoxRoot,f.internalPopover),style:{to
1p:0,left:0},dir:D?"rtl":void 0,"data-color-scheme":r.colorScheme||void 0,ref:this.handleRootEl,children:[h.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusStartRef}),h.jsxs("div",{className:v(b(r.dayHeaderClass,g),f.flexCol,f.borderOnlyB,E==="center"?f.alignCenter:E==="end"?f.alignEnd:f.alignStart),children:[h.jsx("div",{children:h.jsx(F,{tag:"div",attrs:{id:e.titleId},generatorName:"dayHeaderContent",renderProps:g,customGenerator:r.dayHeaderContent,defaultGenerator:Lg,classNameGenerator:r.dayHeaderInnerClass,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount})}),h.jsx(F,{tag:"button",attrs:{"aria-label":r.closeHint,...Mr(this.handleClose)},elRef:this.closeRef,className:v(r.popoverCloseClass,f.flexRow,f.cursorPointer),renderProps:{},customGenerator:r.popoverCloseContent,generatorName:"popoverCloseContent"})]}),h.jsx("div",{className:v(b(r.dayCellClass,m),f.flexCol,f.borderNone),children:h.jsx("div",{className:b(r.dayCellInnerClass,m),children:e.children})}),h.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusEndRef})]}),ba(e.alignEl))}queryHit(e,n,r,s,i){let{rootEl:a,props:o}=this;return n>=0&&n<s&&r>=0&&r<i?{dateProfile:o.dateProfile,dateSpan:{allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate},...o.dateSpanProps},getDayEl:()=>a,rect:{left:0,top:0,right:s,bottom:i},layer:1}:null}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.focusStartRef.current.addEventListener("focus",this.handleClose),this.focusEndRef.current.addEventListener("focus",this.handleClose),this.closeRef.current.focus({preventScroll:!0}),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.focusStartRef.current.removeEventListener("focus",this.handleClose),this.focusEndRef.current.removeEventListener("focus",this.handleClose)}updateSize(){let{alignEl:e,alignParentTop:n}=this.props,{rootEl:r}=this;const s=Pt(e),i=Tg(e);if(i){let a=r.getBoundingClientRect(),o=n?e.closest(n).getBoundingClientRect().top-Pg:i.top,l=s?i.right-a.width:i.left;o=Math.max(o,Bn),l=Math.min(l,document.documentElement.clientWidth-Bn-a.width),l=Math.max(l,Bn);const{offsetParent:c}=r;let d,u;if(!c||c===document.body)d=o+window.scrollY,u=l+window.scrollX;else{const g=c.getBoundingClientRect();d=o-g.top+c.scrollTop,u=l-g.left+c.scrollLeft}sn(r,{top:d,left:u})}}}function Lg(t){return t.text}function Ag(t,e){return t.end>e.start&&t.start<e.end}function Ys(t,e){const n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);if(n<r)return{start:n,end:r,isStart:t.isStart&&n===t.start,isEnd:t.isEnd&&r===t.end}}function Wg(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function cr(t){return t.end}function La(t){return t.reduce(Ug).eventRange.range.start}function Bg(t){return t.reduce(_g).eventRange.range.end}function Ug(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function _g(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class Aa extends W{constructor(){super(...arguments),this.state={isPopoverOpen:!1},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&P(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{dateEnv:s,options:i}=r,{moreLinkClick:a}=i,o=qs(n).start;function l(c){let{def:d,instance:u,range:g}=c.eventRange;return{event:new V(r,d,u),start:s.toDate(g.start),end:s.toDate(g.end),isStart:c.isStart,isEnd:c.isEnd}}typeof a=="function"&&(a=a({date:s.toDate(o),allDay:!!n.allDayDate,allSegs:n.segs.map(l),hiddenSegs:n.hiddenSegs.map(l),jsEvent:e,view:r.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&r.calendarApi.zoomTo(o,a)},this.handlePopoverClose=()=>{this.linkEl&&this.linkEl.focus(),this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return h.jsx(Pe.Consumer,{children:r=>{let{viewApi:s,options:i,calendarApi:a,baseId:o}=r,{moreLinkText:l}=i,c=e.hiddenSegs.length,d=qs(e),u=o+"popover-"+d.start.toISOString(),g=`+${c}`,m=typeof l=="function"?l.call(a,c):`${g} ${l}`,y=ue(i.moreLinkHint,[c],m),p={num:c,numericText:g,longText:m,text:e.isMicro||e.display==="column"?g:m,isNarrow:e.isNarrow,view:s};return h.jsxs(h.Fragment,{children:[!!c&&h.jsx(F,{tag:"div",elRef:this.handleLinkEl,className:v(b(e.display==="row"?i.rowMoreLinkClass:i.columnMoreLinkClass,p),e.className,e.display==="row"?f.flexRow:f.flexCol,f.internalMoreLink,f.cursorPointer),style:e.style,attrs:{...e.attrs,...Mr(this.handleClick),title:y,role:"button","aria-haspopup":"dialog","aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?u:void 0},renderProps:p,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:Og,classNameGenerator:i.moreLinkClass,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount,children:E=>h.jsx(E,{tag:"div",className:v(b(i.moreLinkInnerClass,p),b(e.display==="row"?i.rowMoreLinkInnerClass:i.columnMoreLinkInnerClass,p),e.display==="row"?f.stickyS:f.stickyT)})}),n.isPopoverOpen&&h.jsx(kg,{id:u,titleId:u+"-title",startDate:d.start,endDate:d.end,dateProfile:e.dateProfile,todayRange:e.todayRange,dateSpanProps:e.dateSpanProps,alignEl:e.alignElRef?e.alignElRef.current:this.linkEl,alignParentTop:e.alignParentTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose,children:e.popoverContent()})]})}})}}function Og(t){return t.text}function qs(t){return t.allDayDate?{start:t.allDayDate,end:K(t.allDayDate,1)}:{start:La(t.hiddenSegs),end:Bg(t.hiddenSegs)}}const Wa=O({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ba(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.end-t.start===1&&t.isStart&&t.isEnd}class jg extends W{render(){let{props:e}=this;return h.jsx(Aa,{display:"row",className:e.className,isNarrow:e.isNarrow,isMicro:e.isMicro,dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,segs:e.segs,hiddenSegs:e.hiddenSegs,alignElRef:e.alignElRef,alignParentTop:e.alignParentTop,dateSpanProps:e.dateSpanProps,popoverContent:()=>h.jsx(h.Fragment,{children:e.segs.map(n=>{let{eventRange:r}=n,{instanceId:s}=r.instance,i=!!(e.eventDrag&&e.eventDrag.affectedInstances[s]),a=!!(e.eventResize&&e.eventResize.affectedInstances[s]),o=i||a;return h.jsx("div",{style:{visibility:o?"hidden":void 0},children:h.jsx(Ot,{display:Ba(n)?"list-item":"row",eventRange:r,isStart:n.isStart,isEnd:n.isEnd,isDragging:i,isResizing:a,isMirror:!1,isSelected:s===e.eventSelection,defaultTimeFormat:Wa,defaultDisplayEventEnd:!1,...qe(r,e.todayRange)})},s)})})})}}class Fg extends be{constructor(){super(...arguments),this.getDateMeta=M(Xe),this.refineRenderProps=Rt(Gg),this.rootElRef=I.createRef(),this.handleBodyEl=e=>{this.disconnectBodyHeight&&(this.disconnectBodyHeight(),this.disconnectBodyHeight=void 0,P(this.props.headerHeightRef,null),P(this.props.mainHeightRef,null)),e&&(this.disconnectBodyHeight=St(e,(n,r)=>{if(this._isUnmounting)return;const{props:s}=this,i=e.getBoundingClientRect(),a=this.rootElRef.current.getBoundingClientRect(),o=i.top-a.top;ir(this.headerHeight,o)||(this.headerHeight=o,P(s.headerHeightRef,o)),s.fgLiquidHeight&&P(s.mainHeightRef,r)}))}}render(){let{props:e,context:n}=this,{options:r,dateEnv:s}=n;const i=e.showDayNumber&&Vg(e.date,e.dateProfile.currentRange,s),a=this.getDateMeta(e.date,s,e.dateProfile,e.todayRange),o=v(e.borderStart?f.borderOnlyS:f.borderNone,e.width!=null?"":f.liquid,f.flexCol,f.noMargin,f.noPadding),l=r.navLinks,c=this.refineRenderProps({date:e.date,isMajor:e.isMajor,isNarrow:e.isNarrow,dateMeta:a,hasLabel:e.showDayNumber,hasMonthLabel:i,hasNavLink:l,renderProps:e.renderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat,dayCellFormat:r.dayCellFormat,businessHours:!!r.businessHours});if(a.isDisabled)return h.jsx("div",{role:"gridcell","aria-disabled":!0,className:v(b(r.dayCellClass,c),e.className,o),style:{width:e.width}});const d=vt(n,e.date);return h.jsx(F,{tag:"div",elRef:this.rootElRef,className:v(e.className,o),attrs:{...e.attrs,role:"gridcell","aria-label":d,...c.isToday?{"aria-current":"date"}:{},"data-date":mt(e.date)},style:{width:e.width},renderProps:c,generatorName:"dayCellTopContent",customGenerator:r.dayCellTopContent,defaultGenerator:zg,classNameGenerator:r.dayCellClass,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount,children:u=>h.jsxs(h.Fragment,{children:[h.jsx("div",{className:v(f.rel,b(r.dayCellTopClass,c)),children:e.showDayNumber&&h.jsx(u,{tag:"div",attrs:l?yt(n,e.date,void 0,d):{"aria-hidden":!0},className:b(r.dayCellTopInnerClass,c)})}),h.jsxs("div",{className:v(f.flexCol,e.fgLiquidHeight?f.liquid:f.grow),ref:this.handleBodyEl,children:[h.jsx("div",{className:b(r.dayCellInnerClass,c),style:{minHeight:e.fgHeight},children:e.fg}),h.jsx(jg,{className:f.rel,allDayDate:e.date,segs:e.segs,hiddenSegs:e.hiddenSegs,alignElRef:this.rootElRef,alignParentTop:e.showDayNumber?"[role=row]":`.${f.internalView}`,dateSpanProps:e.dateSpanProps,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,isNarrow:e.isNarrow,isMicro:e.isMicro})]}),h.jsx("div",{className:v(f.rel,b(r.dayCellBottomClass,c))})]})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}function zg(t){return t.text||h.jsx(h.Fragment,{children:"Â "})}function Vg(t,e,n){const{start:r,end:s}=e,i=Ve(s,-1),a=n.getYear(r),o=n.getMonth(r),l=n.getYear(i),c=n.getMonth(i);return!(a===l&&o===c)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<s.valueOf())}function Gg(t){let{date:e,dateEnv:n,hasLabel:r,hasMonthLabel:s,hasNavLink:i,businessHours:a}=t,o=[],l="";return r&&(o=n.formatToParts(e,s?t.monthStartFormat:t.dayCellFormat),l=ne(o)),{...t.dateMeta,...t.renderProps,text:l,textParts:o,isMajor:t.isMajor,isNarrow:t.isNarrow,inPopover:!1,hasNavLink:i,get weekdayText(){return kt(o)},get dayNumberText(){return Lt(o)},get monthText(){return Da(o)},options:{businessHours:a},view:t.viewApi}}class dr{constructor(e,n=l=>
11,r=!1,s,i,a=!1,o=!1){this.getSegThickness=n,this.strictOrder=r,this.maxCoord=s,this.maxDepth=i,this.hiddenConsumes=a,this.allowSlicing=o,this.placementsByLevel=[],this.levelCoords=[],this.hiddenSegs=[];for(const l of e)this.insertSeg(l,this.getSegThickness(l))}insertSeg(e,n,r){if(n!=null){const s=this.findInsertion(e,n);if(this.isInsertionValid(s,n))this.insertSegAt(e,s,n,r);else{const{touchingPlacement:i}=s;if(i){if(this.hiddenConsumes&&!i.isZombie&&(i.isZombie=!0,this.hiddenSegs.push(i),this.allowSlicing)){const a=Object.assign({},i);Object.assign(i,Ys(i,e)),i.isSlice=!0,this.splitSeg(a,i.thickness,i)}this.allowSlicing?(this.hiddenSegs.push({...e,...Ys(e,i)}),this.splitSeg(e,n,i)):this.hiddenSegs.push(e)}else this.hiddenSegs.push(e)}}}isInsertionValid(e,n){return(this.maxCoord==null||e.levelCoord+n<=this.maxCoord)&&(this.maxDepth==null||e.depth<this.maxDepth)}splitSeg(e,n,r){e.start<r.start&&this.insertSeg({...e,end:r.start,isEnd:!1},n,!0),e.end>r.end&&this.insertSeg({...e,start:r.end,isStart:!1},n,!0)}insertSegAt(e,n,r,s){const i={...e,thickness:r,depth:n.depth,isSlice:s||e.isSlice||!1,isZombie:!1};n.lateralIndex===-1?(Un(this.placementsByLevel,n.levelIndex,[i]),Un(this.levelCoords,n.levelIndex,n.levelCoord)):Un(this.placementsByLevel[n.levelIndex],n.lateralIndex,i)}findInsertion(e,n){let{placementsByLevel:r,levelCoords:s}=this,i=r.length,a=0,o,l,c=0;for(let g=0;g<i;g+=1){const m=s[g];if(!this.strictOrder&&m>=a+n)break;let y=r[g],p,[E,D]=ur(y,e.start,cr),C=E+D;for(;(p=y[C])&&p.start<e.end;){let w=m+p.thickness;w>a&&(a=w,o=p,l=g),w===a&&(c=Math.max(c,p.depth+1)),C+=1}}let d=0;if(o)for(d=l+1;d<i&&s[d]<a;)d+=1;let u=-1;return d<i&&s[d]===a&&([u]=ur(r[d],e.end,cr)),{touchingPlacement:o,levelCoord:a,levelIndex:d,lateralIndex:u,depth:c}}traverseSegs(e){const{placementsByLevel:n,levelCoords:r}=this;for(let s=0;s<n.length;s++){const i=n[s],a=r[s];
1for(const o of i)o.isZombie||e(o,a)}}}function Yg(t){let e=[];for(let n of t){let r=[],s={segs:[n],start:n.start,end:n.end};for(let i of e)Ag(i,s)?s={...Wg(i,s),segs:i.segs.concat(s.segs)}:r.push(i);r.push(s),e=r}return e.map(n=>({key:Wi(La(n.segs)),...n}))}function Un(t,e,n){t.splice(e,0,n)}function ur(t,e,n){let r=0,s=t.length;if(!s||e<n(t[r]))return[0,0];if(e>n(t[s-1]))return[s,0];for(;r<s;){let i=Math.floor(r+(s-r)/2),a=n(t[i]);if(e<a)s=i;else if(e>a)r=i+1;else return[i,1]}return[r,0]}function qg(t,e,n,r,s,i=!0,a,o){let l,c,d;a===!0||o===!0?(l=r,d=!0):typeof a=="number"?(c=a,d=!1):typeof o=="number"&&(c=o,d=!0);const u=new Map,g=new Map,m=new Map,y=new Map;let p=new dr(t,T=>e.get(_e(T)),s,l,c,d,i);p.traverseSegs((T,x)=>{_n(u,T),m.set(_e(T),x),T.isSlice&&y.set(T.eventRange,!0)});for(const T of p.hiddenSegs)_n(g,T);if(y.size){m.clear(),p=new dr(Zg(t,u),T=>e.get(_e(T)),s,l,c,d),p.traverseSegs((T,x)=>{m.set(_e(T),x)});for(const T of p.hiddenSegs)_n(g,T)}const E=[],D=[],C=[],w=[];for(let T=0;T<n.length;T++)E.push([]),D.push([]),C.push([]),w.push(0);for(const T of t){const{eventRange:x}=T,N=u.get(x)||[],H=g.get(x)||[],A=y.get(x)||!1;if(C[T.start].push(T),A)for(const L of N)C[L.start].push(L);for(const L of N){for(let _=L.start;_<L.end;_++){const z=Gs(L,_);E[_].push(z)}const B=_e(L),G=m.get(B);if(G!=null){const _=e.get(B);for(let z=L.start;z<L.end;z++)w[z]=Math.max(w[z],G+_)}}for(const L of H)for(let B=L.start;B<L.end;B++){const G=Gs(L,B);E[B].push(G),D[B].push(G)}}return[E,D,C,m,w]}function _n(t,e){let n=t.get(e.eventRange);n||t.set(e.eventRange,n=[]),n.push(e)}function Zg(t,e){const n=[];for(const r of t)n.push(...e.get(r.eventRange)||[]);return n}class Ua{constructor(e,n){let r=e.start,{end:s}=e,i=[],a=[],o=-1;for(;r<s;)n.isHiddenDay(r)?i.push(o+.5):(o+=1,i.push(o),a.push(r)),r=K(r,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(K(e.end,-1)),s=Math.max(0,n),i=Math.min(this.cnt-1,r);return s=Math.ceil(s),i=Math.floor(i),s<=i?{start:s,end:i+1,isStart:n===s,isEnd:r===i}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(Ze(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class _a{constructor(e,n,r,s=""){this.dateEnv=r,this.majorUnit=s;let{dates:i}=e,a,o,l;if(n){for(o=i[0].getUTCDay(),a=1;a<i.length&&i[a].getUTCDay()!==o;a+=1);l=Math.ceil(i.length/a)}else l=1,a=i.length;this.rowCount=l,this.colCount=a,this.daySeries=e,this.cellRows=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCount;n+=1){let r=[];for(let s=0;s<this.colCount;s+=1)r.push(this.buildCell(n,s));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCount+n];return{key:r.toISOString(),date:r,isMajor:this.cellIsMajor(r)}}cellIsMajor(e){return this.majorUnit?ya(e,this.majorUnit,this.dateEnv):!1}buildHeaderDates(){let e=[];for(let n=0;n<this.colCount;n+=1)e.push(this.cellRows[0][n].date);return e}sliceRange(e){let{colCount:n}=this,r=this.daySeries.sliceRange(e),s=[];if(r){const{start:i,end:a}=r;let o=i;for(;o<a;){let l=Math.floor(o/n),c=Math.min((l+1)*n,a);s.push({row:l,start:o%n,end:(c-1)%n+1,isStart:r.isStart&&o===i,isEnd:r.isEnd&&c===a}),o=c}}return s}}function Oa(t,e,n){const r=new Ua(t.renderRange,e),s=/year|month|week/.test(t.currentRangeUnit),i=!s&&va(t,n);return new _a(r,s,n,i!=="day"?i:void 0)}function ja(t,e,n){return n==null?[void 0,void 0]:n/t<e?[e*t,e]:[n,void 0]}function $g(t,e,n){let r=0;for(const s of e){const i=s[0].key,a=s[0].date,o=s[s.length-1].date;if(t>=a&&t<=o)return r;const l=n.get(i);if(l==null)return;r+=l}return r}function Zs(t,e,n){let r,s;if(e!=null)r=t.start*e,s=(n-t.end)*e;else{const i=1/n;r=Nt(t.start*i),s=Nt(1-t.end*i)}return{insetInlineStart:r,insetInlineEnd:s}}function qr(t,e,n,r,s){const i=n??e/r,a=Math.floor(t/i),o=s?r-a-1:a,l=a*i,c=l+i;return{col:o,left:l,right:c}}function Xg(t,e,n){let r=0,s=0,i=0;for(const a of e){const o=a[0].key;if(s=i,i=s+n.get(o),t<i)break;r++}return{row:r,top:s,bottom:i}}function Kg(t,e){return t.querySelectorAll("[role=row]")[e]}function Zr(t,e){return t.querySelectorAll("[role=gridcell]")[e]}const jt=60,Qg=O({weekday:"narrow"});function $r(t,e,n){return t||Jg(e,n)}function Jg(t,e){return t?e>1?O({weekday:"short",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):O({weekday:"long",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):O({weekday:"short"})}class em extends I.Component{constructor(){super(...arguments),this.rootElRef=I.createRef()}render(){const{props:e}=this;return h.jsx("div",{className:v(e.className,f.abs),style:e.style,ref:this.rootElRef,children:e.children})}componentDidMount(){this._isUnmounting=!1;const e=this.rootElRef.current;this.disconnectHeight=ut(e,n=>{this._isUnmounting||P(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),P(this.props.heightRef,null)}}const tm=O({week:"narrow"});class Fa extends W{constructor(){super(...arguments),this.headerHeightRefMap=new ie(()=>{te(this.handleSegPositioning)}),this.mainHeightRefMap=new ie(()=>{(this.props.dayMaxEvents===!0||this.props.dayMaxEventRows===!0)&&te(this.handleSegPositioning)}),this.segHeightRefMap=new ie(()=>{te(this.handleSegPositioning)}),this.buildWeekNumberRenderProps=M(nm),this.handleRootEl=e=>{this.rootEl=e,P(this.props.rootElRef,e)},this.handleSegPositioning=()=>{this._isUnmounting||this.forceUpdate()}}render(){const{props:e,context:n,headerHeightRefMap:r,mainHeightRefMap:s}=this,{cells:i}=e,{options:a}=n,o=e.cells[0].date,l=e.dayMaxEvents===!0||e.dayMaxEventRows===!0,c=_r(e.fgEventSegs,a.eventOrder),[d,u]=this.computeFgDims(),[g,m,y,p,E]=qg(c,this.segHeightRefMap.current,i,l?u:void 0,a.eventOrderStrict,a.eventSlicing,e.dayMaxEvents,e.dayMaxEventRows),D=[];if(d!=null){let H=0;for(const A of i){const L=r.current.get(A.key);if(L!=null){const B=d-L;D.push(E[H]+B)}else D.push(void 0);H++}}const C=this.getHighlightSegs(),w=this.getMirrorSegs(),T=a.navLinks,x=vt(n,o,"week"),N=this.buildWeekNumberRenderProps(o,n,e.cellIsNarrow,T);return h.jsxs("div",{role:e.role,"aria-label":e.role==="row"?x:void 0,className:v(a.dayRowClass,e.className,f.flexRow,f.rel,f.isolate,e.forPrint&&e.basis!==void 0&&f.printSiblingRow),style:{flexBasis:e.basis},ref:this.handleRootEl,children:[e.showWeekNumbers&&!e.cellIsMicro&&h.jsx(F,{tag:"div",attrs:{...T?yt(n,o,"week",x,!1):{},role:void 0,"aria-hidden":!0},className:f.z1,renderProps:N,generatorName:"inlineWeekNumberContent",customGenerator:a.inlineWeekNumberContent,defaultGenerator:Tn,classNameGenerator:a.inlineWeekNumberClass,didMount:a.inlineWeekNumberDidMount,willUnmount:a.inlineWeekNumberWillUnmount}),this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(C,"highlight"),e.cells.map((H,A)=>{const L=this.renderFgSegs(d,y[A],p,e.todayRange,!1);return h.jsx(Fg,{dateProfile:e.dateProfile,todayRange:e.todayRange,date:H.date,isMajor:H.isMajor,showDayNumber:e.showDayNumbers,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,borderStart:!!A,segs:g[A],hiddenSegs:m[A],fgLiquidHeight:l,fg:h.jsx(h.Fragment,{children:L}),eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,renderProps:H.renderProps,dateSpanProps:H.dateSpanProps,attrs:H.attrs,className:H.className,fgHeight:D[A],width:e.colWidth,headerHeightRef:r.createRef(H.key),mainHeightRef:s.createRef(H.key)},H.key)}),this.renderFgSegs(d,w,p,e.todayRange,!0)]})}renderFgSegs(e,n,r,s,i){const{props:a,segHeightRefMap:o}=this,{colWidth:l,eventSelection:c,cellIsMicro:d}=a,u=a.cells.length,g=a.cells.length===1,m=[];for(const y of n){const p=_e(y),{standinFor:E,eventRange:D}=y,{instanceId:C}=D.instance;if(E)continue;const{insetInlineStart:w,insetInlineEnd:T}=Zs(y,l,u),x=r.get(E?_e(E):p)??(i?0:void 0),N=e!=null&&x!=null?e+x:void 0,H=!!(a.eventDrag&&a.eventDrag.affectedInstances[C]),A=!!(a.eventResize&&a.eventResize.affectedInstances[C]),L=!i&&(H||A||E||N==null),B=Ba(y),G=C===c;m.push(h.jsx(em,{className:y.start?f.fakeBorderS:"",style:{visibility:L?"hidden":void 0,top:N,insetInlineStart:w,insetInlineEnd:T,zIndex:G?1e3:0},heightRef:!E&&!i?o.createRef(p):null,children:h.jsx(Ot,{display:B?"list-item":"row",eventRange:D,isStart:y.isStart,isEnd:y.isEnd,isDragging:H,isResizing:A,isMirror:i,isSelected:G,isNarrow:a.cellIsNarrow,defaultTimeFormat:Wa,defaultDisplayEventEnd:g,disableResizing:B,forcedTimeText:d?"":void 0,...qe(D,s)})},p))}return m}renderFillSegs(e,n){const{props:r,context:s}=this,{todayRange:i,colWidth:a}=r,o=r.cells.length,l=[];for(const c of e){const d=c.start+":"+c.end,{insetInlineStart:u,insetInlineEnd:g}=Zs(c,a,o),m=!c.standinFor;l.push(h.jsx("div",{className:f.fillY,style:{visibility:m?"":"hidden",insetInlineStart:u,insetInlineEnd:g},children:n==="bg-event"?h.jsx(Pa,{eventRange:c.eventRange,isStart:c.isStart,isEnd:c.isEnd,isNarrow:r.cellIsNarrow,isVertical:!1,...qe(c.eventRange,i)}):ka(n,s.options)},d))}return h.jsx(h.Fragment,{children:l})}componentDidMount(){this._isUnmounting=!1;const{rootEl:e}=this;this.disconnectHeight=ut(e,n=>{P(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),P(this.props.heightRef,null)}computeFgDims(){const{cells:e}=this.props,n=this.headerHeightRefMap.current,r=this.mainHeightRefMap.current;let s,i;
1for(const a of e){const o=n.get(a.key),l=r.get(a.key);if(o!=null&&((s===void 0||o>s)&&(s=o),l!=null)){const c=o+l;(i===void 0||c<i)&&(i=c)}}return[s,i!=null&&s!=null?i-s:void 0]}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}}function nm(t,e,n,r){const{dateEnv:s,options:i}=e,a=s.computeWeekNumber(t),o=s.formatToParts(t,i.weekNumberFormat||tm),l=ne(o),c=s.toDate(t);return{num:a,text:l,textParts:o,date:c,isNarrow:n,hasNavLink:r}}class Xr extends be{constructor(){super(...arguments),this.splitBusinessHourSegs=M(an),this.splitBgEventSegs=M(sm),this.splitFgEventSegs=M(an),this.splitDateSelectionSegs=M(an),this.splitEventDrag=M(Vs),this.splitEventResize=M(Vs),this.rowHeightRefMap=new ie((e,n)=>{const{rowHeightRefMap:r}=this.props;r&&r.handleValue(e,n)}),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n,rowHeightRefMap:r}=this,{options:s}=n,i=e.cellRows.length,a=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),l=this.splitBusinessHourSegs(e.businessHourSegs,i),c=this.splitDateSelectionSegs(e.dateSelectionSegs,i),d=this.splitEventDrag(e.eventDrag,i),u=this.splitEventResize(e.eventResize,i),g=he(s),m=!e.forPrint&&!g,y=im(e.visibleWidth,i,g,s);return h.jsx("div",{role:"rowgroup",className:v(e.className,!e.forPrint&&f.flexCol),style:{width:e.width},ref:this.handleRootEl,children:e.cellRows.map((p,E)=>h.jsx(Fa,{role:"row",dateProfile:e.dateProfile,todayRange:e.todayRange,cells:p,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,showDayNumbers:i>1,showWeekNumbers:i>1&&s.weekNumbers,forPrint:e.forPrint,className:v(m&&f.grow,i>1&&f.breakInsideAvoid,E<i-1?f.borderOnlyB:f.borderNone),fgEventSegs:a[E],bgEventSegs:o[E],businessHourSegs:l[E],dateSelectionSegs:c[E],eventSelection:e.eventSelection,eventDrag:d[E],eventResize:u[E],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,colWidth:e.colWidth,basis:y,heightRef:r.createRef(p[0].key)},p[0].key))})}queryHit(e,n,r,s){const{props:i}=this,a=i.cellRows[0].length,{col:o,left:l,right:c}=qr(n,s,i.colWidth,a,e),{row:d,top:u,bottom:g}=Xg(r,i.cellRows,this.rowHeightRefMap.current),m=i.cellRows[d][o],y=m.date,p=K(y,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:y,end:p},allDay:!0,...m.dateSpanProps},getDayEl:()=>Zr(Kg(this.rootEl,d),o),rect:{left:l,right:c,top:u,bottom:g},layer:0}}}function rm(t){return t.eventRange.def.allDay}function sm(t,e){return an(t.filter(rm),e)}function im(t,e,n,r){if(t!=null){const s=t/r.aspectRatio/6;return e>6||n?s:0}return 0}class am extends W{constructor(){super(...arguments),this.state={},this.buildDayHeaderText=M(om),this.handleInnerEl=e=>{this.disconnectSize&&(this.disconnectSize(),this.disconnectSize=void 0),e?this.disconnectSize=St(e,(n,r)=>{this._isUnmounting||(P(this.props.innerHeightRef,r),this.setState({innerWidth:n}))}):P(this.props.innerHeightRef,null)}}render(){const{props:e,state:n,context:r}=this,{renderConfig:s,dataConfig:i}=e,a=e.colWidth!=null?e.colWidth*(i.colSpan||1):void 0,o=i.renderProps.isDisabled,l=s.dayHeaderFormat?this.buildDayHeaderRenderProps(i.renderProps,e.cellIsNarrow,e.rowLevel,e.cellIsMicro,i.dateMarker,s.dayHeaderFormat,!!s.datesRepDistinctDays,r.dateEnv):{...i.renderProps,isNarrow:e.cellIsNarrow,level:e.rowLevel},c=s.align,d=typeof c=="function"?c({level:e.rowLevel,inPopover:i.renderProps.inPopover,isNarrow:e.cellIsNarrow}):c,u=s.sticky,g=e.rowLevel>0&&u!==!1&&(d!=="center"||a!=null&&e.viewportWidth!=null&&a>e.viewportWidth*.75);let m;return g&&(d==="center"?n.innerWidth!=null&&(m=`calc(50% - ${n.innerWidth/2}px)`):m=typeof u=="number"||typeof u=="string"?u:0),h.jsx(F,{tag:"div",attrs:{role:"columnheader","aria-colspan":i.colSpan,...i.attrs},className:v(i.className,f.noMargin,f.noPadding,f.flexCol,e.borderStart?f.borderOnlyS:f.borderNone,d==="center"?f.alignCenter:d==="end"?f.alignEnd:f.alignStart,e.colWidth==null&&f.liquid,!g&&f.crop),style:{width:a},renderProps:l,generatorName:s.generatorName,customGenerator:s.customGenerator,defaultGenerator:Tn,classNameGenerator:o?void 0:s.classNameGenerator,didMount:s.didMount,willUnmount:s.willUnmount,children:y=>h.jsx("div",{ref:this.handleInnerEl,className:v(f.flexCol,f.noShrink,f.whiteSpaceNoWrap,g&&f.sticky),style:{left:m,right:m},children:h.jsx(y,{tag:"div",attrs:i.innerAttrs,className:b(s.innerClassNameGenerator,l)})})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}buildDayHeaderRenderProps(e,n,r,s,i,a,o,l){const c=this.buildDayHeaderText(o?i:e.date,a,o,l),d=s?this.buildDayHeaderText(i,Qg,!1,l):c;return{...e,isNarrow:n,level:r,text:d.text,textParts:d.textParts,weekdayText:s?d.text:c.weekdayText,dayNumberText:c.dayNumberText}}}function om(t,e,n,r){const s=r.formatToParts(t,e);return{text:ne(s),textParts:s,weekdayText:kt(s),dayNumberText:n?Lt(s):""}}class In extends W{constructor(){super(...arguments),this.innerHeightRefMap=new ie(()=>{te(this.handleInnerHeights)}),this.handleInnerHeights=()=>
1{if(this._isUnmounting)return;const e=this.innerHeightRefMap.current;let n=0;for(const r of e.values())n=Math.max(n,r);this.currentInnerHeight!==n&&(this.currentInnerHeight=n,P(this.props.innerHeightRef,n))}}render(){const{props:e,context:n}=this,{options:r}=n;return h.jsx("div",{role:e.role,"aria-rowindex":e.rowIndex!=null?1+e.rowIndex:void 0,className:v(r.dayHeaderRowClass,e.className,f.flexRow,f.contentBox,e.borderBottom?f.borderOnlyB:f.borderNone),style:{height:e.height},children:e.dataConfigs.map((s,i)=>h.jsx(am,{renderConfig:e.renderConfig,dataConfig:s,borderStart:!!i,colWidth:e.colWidth,viewportWidth:e.viewportWidth,innerHeightRef:this.innerHeightRefMap.createRef(s.key),cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:e.rowLevel},s.key))})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0,this.currentInnerHeight=void 0,P(this.props.innerHeightRef,null)}}class za extends W{render(){const{props:e}=this,{headerTiers:n}=e;return h.jsx("div",{role:"rowgroup",className:v(e.className,f.flexCol,e.width==null&&f.liquid),style:{width:e.width},children:n.map((r,s)=>I.createElement(In,{...r,key:s,role:"row",borderBottom:s<n.length-1,colWidth:e.colWidth,viewportWidth:e.viewportWidth,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:n.length-s-1}))})}}class lm extends W{constructor(){super(...arguments),this.state={},this.handleScroller=e=>{P(this.props.scrollerRef,e)},this.handleTotalWidth=e=>{this._isUnmounting||this.setState({totalWidth:e})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})}}render(){const{props:e,state:n,context:r}=this,{options:s}=r,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=Ee(s),{totalWidth:l,clientWidth:c}=n;let d=l!=null&&c!=null?l-c:void 0;d<3&&(d=0);const u=!e.forPrint&&!he(s),g=!e.forPrint&&xn(s),m=e.cellRows[0].length,y=c!=null?c/m:void 0,p=y!=null&&y<=jt,E=p||y!=null&&y<=s.dayNarrowWidth;return h.jsxs(h.Fragment,{children:[s.dayHeaders&&h.jsxs("div",{className:v(b(s.tableHeaderClass,{isSticky:g,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),f.printHeader,g&&f.tableHeaderSticky),children:[h.jsxs("div",{className:f.flexRow,children:[h.jsx(za,{headerTiers:e.headerTiers,cellIsNarrow:E,cellIsMicro:p}),!!d&&h.jsx("div",{className:v(b(s.fillerClass,{inTableHeader:!0}),f.borderOnlyS),style:{minWidth:d}})]}),h.jsx("div",{className:b(s.dayHeaderDividerClass,{isSticky:g,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),h.jsx(pe,{vertical:u,className:v(b(s.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&f.flexCol,u&&f.liquid),ref:this.handleScroller,clientWidthRef:this.handleClientWidth,children:h.jsx(Xr,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:f.grow,dayMaxEvents:e.forPrint?void 0:s.dayMaxEvents,dayMaxEventRows:s.dayMaxEventRows,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,visibleWidth:l,cellIsNarrow:E,cellIsMicro:p,rowHeightRefMap:e.rowHeightRefMap})}),h.jsx(Et,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}class Va extends W{constructor(){super(...arguments),this.rootElRef=I.createRef()}render(){const{props:e}=this;return h.jsx("div",{ref:this.rootElRef,className:v(f.footerScrollbar,e.isSticky&&f.footerScrollbarSticky),children:h.jsx(pe,{horizontal:!0,ref:e.scrollerRef,children:h.jsx("div",{style:{minWidth:e.canvasWidth}})})})}componentDidMount(){this._isUnmounting=!1,this.disconnectHeight=ut(this.rootElRef.current,e=>{this._isUnmounting||P(this.props.scrollbarWidthRef,e)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),P(this.props.scrollbarWidthRef,null)}}class cm extends W{constructor(){super(...arguments),this.state={},this.headerScrollerRef=I.createRef(),this.bodyScrollerRef=I.createRef(),this.footerScrollerRef=I.createRef(),this.handleTotalWidth=e=>{this._isUnmounting||this.setState({totalWidth:e})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})}}render(){const{props:e,state:n,context:r}=this,{options:s}=r,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=Ee(s),{totalWidth:l,clientWidth:c}=n,d=l!=null&&c!=null?l-c:void 0,u=!e.forPrint&&!he(s),g=!e.forPrint&&xn(s),m=!e.forPrint&&ha(s),y=e.cellRows[0].length,[p,E]=ja(y,e.dayMinWidth,c),D=E!=null&&E<=jt,C=D||E!=null&&E<=s.dayNarrowWidth;return h.jsxs(h.Fragment,{children:[s.dayHeaders&&h.jsxs("div",{className:v(b(s.tableHeaderClass,{isSticky:g,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),f.printHeader,g&&f.tableHeaderSticky),children:[h.jsxs(pe,{horizontal:!0,hideScrollbars:!0,className:f.flexRow,ref:this.headerScrollerRef,children:[h.jsx(za,{headerTiers:e.headerTiers,colWidth:E,viewportWidth:c,width:p,cellIsNarrow:C,cellIsMicro:D}),!!d&&h.jsx("div",{className:v(b(s.fillerClass,{inTableHeader:!0}),f.borderOnlyS),style:{minWidth:d}})]}),h.jsx("div",{className:b(s.dayHeaderDividerClass,{isSticky:g,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),h.jsx(pe,{vertical:u,horizontal:!0,hideScrollbars:m||e.forPrint,className:v(b(s.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&f.flexCol,u&&f.liquid),ref:this.bodyScrollerRef,clientWidthRef:this.handleClientWidth,children:h.jsx(Xr,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:f.grow,dayMaxEvents:e.forPrint?void 0:s.dayMaxEvents,dayMaxEventRows:s.dayMaxEventRows,fg
1EventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,colWidth:E,width:p,visibleWidth:l,cellIsNarrow:C,cellIsMicro:D,rowHeightRefMap:e.rowHeightRefMap})}),!!m&&h.jsx(Va,{isSticky:!0,canvasWidth:p,scrollerRef:this.footerScrollerRef}),h.jsx(Et,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1;const e=ga(this.context.pluginHooks);this.syncedScroller=new e(!0),P(this.props.scrollerRef,this.syncedScroller),this.updateSyncedScroller()}componentDidUpdate(){this.updateSyncedScroller()}componentWillUnmount(){this._isUnmounting=!0,this.syncedScroller.destroy()}updateSyncedScroller(){this.syncedScroller.handleChildren([this.headerScrollerRef.current,this.bodyScrollerRef.current,this.footerScrollerRef.current])}}class dm extends W{constructor(){super(...arguments),this.scrollerRef=I.createRef(),this.rowHeightRefMap=new ie(()=>{te(this.updateScrollY)}),this.scrollDate=null,this.updateScrollY=()=>{if(this._isUnmounting)return;const e=this.rowHeightRefMap.current,n=this.scrollerRef.current;if(n&&this.scrollDate){let r=$g(this.scrollDate,this.props.cellRows,e);r!=null&&(r&&r++,n.scrollTo({y:r}))}},this.handleScrollEnd=e=>{e&&(this.scrollDate=null)}}render(){const{props:e,context:n}=this,{options:r}=n,{borderlessX:s,borderlessTop:i,borderlessBottom:a}=Ee(r),o=e.forPrint?[]:e.businessHourSegs,l=e.forPrint?[]:e.dateSelectionSegs,c=e.forPrint?null:e.eventDrag,d=e.forPrint?null:e.eventResize,u={...e,businessHourSegs:o,dateSelectionSegs:l,eventDrag:c,eventResize:d,scrollerRef:this.scrollerRef,rowHeightRefMap:this.rowHeightRefMap};return h.jsx(Mn,{viewSpec:n.viewSpec,attrs:{role:"grid","aria-rowcount":e.headerTiers.length+e.cellRows.length,"aria-colcount":e.cellRows[0].length,"aria-labelledby":e.labelId,"aria-label":e.labelStr},className:v(e.className,f.printRoot,b(r.tableClass,{borderlessX:s,borderlessTop:i,borderlessBottom:a,multiMonthColumns:0})),children:r.dayMinWidth?h.jsx(cm,{...u,dayMinWidth:r.dayMinWidth}):h.jsx(lm,{...u})})}componentDidMount(){this._isUnmounting=!1,this.resetScroll(),this.scrollerRef.current.addScrollEndListener(this.handleScrollEnd)}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile&&this.context.options.scrollTimeReset&&this.resetScroll()}componentWillUnmount(){this._isUnmounting=!0,this.scrollerRef.current.removeScrollEndListener(this.handleScrollEnd)}resetScroll(){this.scrollDate=this.props.dateProfile.currentDate,this.updateScrollY(),this.scrollerRef.current.scrollTo({x:0})}}class Ga extends pa{buildRenderRange(e,n,r){let s=super.buildRenderRange(e,n,r),{props:i}=this;return Ya({currentRange:s,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}function Ya(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:s}=n,i;if(t.snapToWeek&&(r=e.startOfWeek(r),i=e.startOfWeek(s),i.valueOf()!==s.valueOf()&&(s=cs(i,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(K(n.end,-1))),o=Math.ceil(Md(a,s));s=cs(s,6-o)}return{start:r,end:s}}class um extends W{constructor(){super(...arguments),this.buildDayTableModel=M(Oa),this.buildDateRowConfigs=M(Ia),this.createDayHeaderFormatter=M($r),this.slicer=new Yr}render(){const{props:e,context:n}=this,{dateProfile:r}=e,{options:s,dateEnv:i}=n,a=this.buildDayTableModel(r,n.dateProfileGenerator,i),o=a.rowCount===1,l=this.createDayHeaderFormatter(n.options.dayHeaderFormat,o,a.colCount),c=this.slicer.sliceProps(e,r,s.nextDayThreshold,n,a);return h.jsx(_t,{unit:"day",children:(d,u)=>{const g=this.buildDateRowConfigs(a.headerDates,o,r,u,l,n);return h.jsx(dm,{labelId:e.labelId,labelStr:e.labelStr,dateProfile:r,todayRange:u,cellRows:a.cellRows,forPrint:e.forPrint,className:e.className,headerTiers:g,fgEventSegs:c.fgEventSegs,bgEventSegs:c.bgEventSegs,businessHourSegs:c.businessHourSegs,dateSelectionSegs:c.dateSelectionSegs,eventDrag:c.eventDrag,eventResize:c.eventResize,eventSelection:c.eventSelection})}})}}var qa={name:"daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:um,dateProfileGeneratorClass:Ga},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}};const On=le();
1class fm{constructor(){this.getKeysForEventDefs=M(this._getKeysForEventDefs),this.splitDateSelection=M(this._splitDateSpan),this.splitEventStore=M(this._splitEventStore),this.splitIndividualUi=M(this._splitIndividualUi),this.splitEventDrag=M(this._splitInteraction),this.splitEventResize=M(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),s=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),o=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=Ne(n,(d,u)=>this.eventUiBuilders[u]||M(hm));for(let d in n){let u=n[d],g=a[d]||On,m=this.eventUiBuilders[d];c[d]={businessHours:u.businessHours||e.businessHours,dateSelection:s[d]||null,eventStore:g,eventUiBases:m(e.eventUiBases[""],u.ui,i[d]),eventDrag:o[d]||null,eventResize:l[d]||null,eventSelection:g.instances[e.eventSelection]?e.eventSelection:""}}return c}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let s of r)n[s]=e}return n}_getKeysForEventDefs(e){return Ne(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:s}=e,i={};for(let a in r)for(let o of n[a])i[o]||(i[o]=le()),i[o].defs[a]=r[a];for(let a in s){let o=s[a];for(let l of n[o.defId])i[l]&&(i[l].instances[a]=o)}return i}_splitIndividualUi(e,n){let r={};for(let s in e)if(s)for(let i of n[s])r[i]||(r[i]={}),r[i][s]=e[s];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),s=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,s),a=o=>{n[o]||(n[o]={affectedEvents:r[o]||On,mutatedEvents:i[o]||On,isEvent:e.isEvent})};for(let o in r)a(o);for(let o in i)a(o)}return n}}function hm(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let s={"":Yi(r)};return n&&Object.assign(s,n),s}class gm extends fm{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?Qu(e)?["timed","allDay"]:["allDay"]:["timed"]}}class mm extends Ma{sliceRange(e,n){let r=[];for(let s=0;s<n.length;s+=1){let i=ke(e,n[s]);i&&r.push({startDate:i.start,endDate:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:s})}return r}}function wt(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function $s(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const Xs=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function pm(t,e,n,r,s){let i=new Date(0),a=t,o=U(0),l=n||vm(r),c=[],d=0;for(;Ie(a)<Ie(e);){let u=s.add(i,a),g=xr(o,l)!==null;c.push({date:u,time:a,key:u.toISOString(),isoTimeStr:Jd(u),isLabeled:g,isFirst:d===0}),a=Xn(a,r),o=Xn(o,r),d+=1}return c}function vm(t){let e,n,r;for(e=Xs.length-1;e>=0;e-=1)if(n=U(Xs[e]),r=xr(n,t),r!==null&&r>1)return n;return t}class Za extends W{constructor(){super(...arguments),this.innerElRef=I.createRef()}render(){let{props:e}=this,{options:n,viewApi:r}=this.context,s={text:n.allDayText,view:r,isNarrow:e.isNarrow};return h.jsx(F,{tag:"div",attrs:{role:"rowheader"},className:v(f.flexRow,f.noMargin,f.noPadding,f.contentBox),style:{width:e.width},renderProps:s,generatorName:"allDayHeaderContent",customGenerator:n.allDayHeaderContent,defaultGenerator:ym,classNameGenerator:n.allDayHeaderClass,didMount:n.allDayHeaderDidMount,willUnmount:n.allDayHeaderWillUnmount,children:i=>h.jsx("div",{className:v(f.flexRow,f.noShrink,f.whiteSpacePre),ref:this.innerElRef,children:h.jsx(i,{tag:"div",className:b(n.allDayHeaderInnerClass,s)})})})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;this.disconnectInnerWidth=Vr(n,r=>{this._isUnmounting||P(e.innerWidthRef,r)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectInnerWidth(),P(this.props.innerWidthRef,null)}}function ym(t){return t.text}class $a extends be{constructor(){super(...arguments),this.heightRef=I.createRef(),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}
1render(){return h.jsx(Fa,{...this.props,rootElRef:this.handleRootEl,heightRef:this.heightRef})}queryHit(e,n,r,s){const{props:i,heightRef:a}=this,o=i.cells.length,{col:l,left:c,right:d}=qr(n,s,i.colWidth,o,e),u=i.cells[l],g=u.date,m=K(g,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:g,end:m},allDay:!0,...u.dateSpanProps},getDayEl:()=>Zr(this.rootEl,l),rect:{left:c,right:d,top:0,bottom:a.current},layer:0}}}function Sm(t,e,n){let r=new Ua(t.renderRange,e);return new _a(r,!1,n)}function Em(t,e,n){let r=[];for(let s of t.headerDates)r.push({start:n.add(s,e.slotMinTime),end:n.add(s,e.slotMaxTime)});return r}function Xa(t,e,n=0,r,s){if(!r||!s)return[void 0,!1];const i=Math.max(r+1,n),a=s/e;let o,l;return t&&a>=i?(o=!0,l=a):(o=!1,l=i),[l,o]}function pn(t,e,n){return n||(n=j(t)),Ka(U(t.valueOf()-n.valueOf()),e)}function Ka(t,e){const n=Ie(e.slotMinTime),r=Ie(e.slotMaxTime);let s=(t.milliseconds-n)/(r-n);return s=Math.max(0,s),s=Math.min(1,s),s}function Ks(t,e,n,r,s,i,a){const o=[];if(s!=null){const l=s*r;for(const c of t){const d=pn(c.startDate,e,n),u=pn(c.endDate,e,n),g=d*l;let m=u*l,y=m-g;i!=null&&y<i&&(y=i,m=g+y),o.push({start:g,end:m,size:y,isShort:y<=a})}}return o}function bm(t,e,n,r){const s=[];for(let c=0;c<t.length;c++){const d=e[c];d&&s.push({...t[c],start:d.start,end:d.end})}const i=new dr(s,void 0,n,void 0,r);let a=wm(i);a=Tm(a,1);const o=xm(a),l=Yg(i.hiddenSegs);return[o,l]}function wm(t){const{placementsByLevel:e}=t,n=Kr((s,i)=>s+":"+i,(s,i)=>{let a=Rm(t,s,i),[o,l]=Qs(a,n),c=e[s][i];return[{...c,nextLevelNodes:o},c.thickness+l]}),[r]=Qs(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n);return r}function Qs(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:s}=t,i=r,a=[];for(;i<s;)a.push(e(n,i)),i+=1;return a.sort(Dm),[a.map(Cm),a[0][1]]}function Dm(t,e){return e[1]-t[1]}function Cm(t){return t[0]}function Rm(t,e,n){let{levelCoords:r,placementsByLevel:s}=t,i=s[e][n],a=r[e]+i.thickness,o=r.length,l=e;for(;l<o&&r[l]<a;l+=1);for(;l<o;l+=1){let c=s[l],d,u=ur(c,i.start,cr),g=u[0]+u[1],m=g;for(;(d=c[m])&&d.start<i.end;)m+=1;if(g<m)return{level:l,lateralStart:g,lateralEnd:m}}return null}function Tm(t,e){const n=Kr((r,s,i)=>Rn(r),(r,s,i)=>{let{nextLevelNodes:a,thickness:o}=r,l=o+i,c=o/l,d,u=[];if(!a.length)d=e;else for(let m of a)if(d===void 0){let y=n(m,s,l);d=y[0],u.push(y[1])}else{let y=n(m,d,0);u.push(y[1])}let g=(d-s)*c;return[d-g,{...r,thickness:g,nextLevelNodes:u}]});return t.map(r=>n(r,0,0)[1])}function xm(t){let e=new Map;const n=Kr((s,i,a)=>Rn(s),(s,i,a)=>{let o={...s,levelCoord:i,stackDepth:a,stackForward:0};return e.set(o.eventRange.instance.instanceId,o),o.stackForward=r(s.nextLevelNodes,i+s.thickness,a+1)});function r(s,i,a){let o=0;for(let l of s)o=Math.max(n(l,i,a)+1,o);return o}return r(t,0,0),e}function Kr(t,e){const n={};return(...r)=>{let s=t(...r);return s in n?n[s]:n[s]=e(...r)}}const Mm=O({hour:"numeric",minute:"2-digit",meridiem:!1});class Qa extends W{render(){const{props:e}=this;return h.jsx(Ot,{...e,display:"column",level:e.level,isNarrow:e.isNarrow,isShort:e.isShort,className:e.isLiquid?f.liquid:"",disableLiquid:!e.isLiquid,defaultTimeFormat:Mm})}}class Im extends W{render(){let{props:e}=this;return h.jsx("div",{className:v(f.abs,f.flexCol),style:{top:e.top,height:e.height,insetInlineEnd:0,zIndex:9999},children:h.jsx(Aa,{className:f.liquid,display:"column",allDayDate:null,segs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,dateSpanProps:e.dateSpanProps,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>Ja(e.hiddenSegs,e,!1),forceTimed:!0,isNarrow:e.isNarrow,isMicro:e.isMicro})})}}const Nm=t=>h.jsx(Pe.Consumer,{children:e=>{let{options:n}=e;return h.jsx("div",{className:v(t.className,n.nowIndicatorDotClass),style:t.style})}}),Hm=t=>h.jsx(Pe.Consumer,{children:e=>{let{options:n}=e,r={date:e.dateEnv.toDate(t.date),view:e.viewApi};return h.jsx(F,{elRef:t.elRef,tag:t.tag||"div",attrs:t.attrs,className:t.className,style:t.style,renderProps:r,generatorName:"nowIndicatorLineContent",customGenerator:n.nowIndicatorLineContent,classNameGenerator:n.nowIndicatorLineClass,didMount:n.nowIndicatorLineDidMount,willUnmount:n.nowIndicatorLineWillUnmount,children:t.children})}});function Pm(t){const e=t.totalHeight!=null?t.totalHeight*pn(t.nowDate,t.dateProfile,t.dayDate):void 0;return h.jsxs("div",{className:f.fill,style:{zIndex:2,pointerEvents:"none"},children:[h.jsx(Hm,{className:v(f.fillX,f.noMarginX,f.borderlessX),style:{to
1p:e},date:t.nowDate}),(t.showDot??!0)&&h.jsx(Nm,{className:v(f.abs,f.start0),style:{top:e}})]})}const Qr=typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes("firefox");class km extends W{constructor(){super(...arguments),this.sortEventSegs=M(_r),this.getDateMeta=M(Xe)}render(){let{props:e,context:n}=this,{options:r,dateEnv:s}=n,i=r.selectMirror,a=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=this.getDateMeta(e.date,s,e.dateProfile,e.todayRange);const l=v(e.borderStart?f.borderOnlyS:f.borderNone,e.width==null&&f.liquid,f.rel),c={width:e.width,zIndex:1},d=this.getIsStack(),u={...o,...e.renderProps,isStack:d,isNarrow:e.isNarrow,isMajor:e.isMajor,view:n.viewApi};if(o.isDisabled)return h.jsx("div",{role:"gridcell","aria-disabled":!0,className:v(b(r.dayLaneClass,u),l),style:c});const g=v(b(r.dayLaneInnerClass,u),!d&&f.fill),m=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return h.jsx(F,{tag:"div",attrs:{...e.attrs,role:"gridcell",...o.isToday?{"aria-current":"date"}:{},"data-date":mt(e.date)},className:l,style:c,renderProps:u,generatorName:void 0,classNameGenerator:r.dayLaneClass,didMount:r.dayLaneDidMount,willUnmount:r.dayLaneWillUnmount,children:()=>h.jsxs(h.Fragment,{children:[this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight"),h.jsx("div",{className:g,style:{zIndex:1},children:this.renderFgSegs(m,!1)}),!!a.length&&h.jsx("div",{className:g,style:{zIndex:1},children:this.renderFgSegs(a,!0)}),this.renderNowIndicator(e.nowIndicatorSegs)]})})}renderFgSegs(e,n){const{props:r}=this;return this.getIsStack()?Ja(e,r,n):this.renderPositionedFgSegs(e,n)}renderPositionedFgSegs(e,n){let{props:r,context:s}=this,{date:i,dateProfile:a,eventSelection:o,todayRange:l,nowDate:c}=r,{eventMaxStack:d,eventShortHeight:u,eventOrderStrict:g,eventMinHeight:m}=s.options,y=Ks(e,a,i,r.slatCnt,r.slatHeight,m,u),[p,E]=bm(e,y,g,d);return h.jsxs(h.Fragment,{children:[e.map((D,C)=>{let{eventRange:w}=D,{instanceId:T}=w.instance,x=y[C]||{},N=p.get(T),H=!n&&N?this.computeSegHStyle(N):{left:0,right:0,zIndex:0},A=T===o;A&&(H.zIndex+=1e3);let L=!!(r.eventDrag&&r.eventDrag.affectedInstances[T]),B=!!(r.eventResize&&r.eventResize.affectedInstances[T]),G=!n&&(L||B||!N);return h.jsx("div",{className:v(f.abs,f.flexCol),style:{visibility:G?"hidden":void 0,top:x.start,height:x.size,...H},children:h.jsx(Qa,{eventRange:w,slicedStart:D.startDate,slicedEnd:D.endDate,isStart:D.isStart,isEnd:D.isEnd,isDragging:L,isResizing:B,isMirror:n,isSelected:A,level:N?N.stackDepth:0,isNarrow:r.isNarrow,isShort:x.isShort||!1,isLiquid:!0,...qe(w,l,c)})},T)}),this.renderHiddenGroups(E)]})}renderHiddenGroups(e){let{dateSpanProps:n,dateProfile:r,todayRange:s,nowDate:i,eventSelection:a,eventDrag:o,eventResize:l,isNarrow:c,isMicro:d}=this.props;return h.jsx(h.Fragment,{children:e.map(u=>h.jsx(Im,{hiddenSegs:u.segs,top:u.start,height:u.end-u.start,isNarrow:c,isMicro:d,dateSpanProps:n,dateProfile:r,todayRange:s,nowDate:i,eventSelection:a,eventDrag:o,eventResize:l},u.key))})}renderFillSegs(e,n){let{props:r,context:s}=this,i=Ks(e,r.dateProfile,r.date,r.slatCnt,r.slatHeight,s.options.eventMinHeight,s.options.eventShortHeight);return h.jsx(h.Fragment,{children:e.map((a,o)=>{const{eventRange:l}=a,c=i[o]||{};return h.jsx("div",{className:f.fillX,style:{top:c.start,height:c.size,marginInlineStart:-1},children:n==="bg-event"?h.jsx(Pa,{eventRange:l,isStart:a.isStart,isEnd:a.isEnd,isNarrow:r.isNarrow,isShort:c.isShort||!1,isVertical:!0,...qe(l,r.todayRange,r.nowDate)}):ka(n,s.options)},sf(l))})})}renderNowIndicator(e){let{props:n}=this;if(!(n.forPrint||this.getIsStack()))return e.map((r,s)=>h.jsx(Pm,{nowDate:r.startDate,dayDate:n.date,dateProfile:n.dateProfile,totalHeight:n.slatHeight!=null?n.slatHeight*n.slatCnt:void 0,showDot:r.showDot??!0},s))}computeSegHStyle(e){let{options:n}=this.context,r=n.slotEventOverlap,s=e.levelCoord,i=e.levelCoord+e.thickness;r&&(i=Math.min(1,s+(i-s)*2));let a={zIndex:e.stackDepth+1,insetInlineStart:Nt(s),insetInlineEnd:Nt(1-i),marginInlineEnd:void 0};return r&&e.stackForward&&(a.marginInlineEnd=10*2),a}getIsStack(){const{eventPrintLayout:e}=this.context.options;return this.props.forPrint&&(e==="stack"||e!=="grid"&&Qr)}}function Ja(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:s,eventResize:i},a){return h.jsx(h.Fragment,{children:t.map(o=>{let{eventRange:l}=o,{instanceId:c}=l.instance,d=!!(s&&s.affectedInstances[c]),u=!!(i&&i.affectedInstances[c]),g=d||u;return h.jsx("div",{className:f.breakInsideAvoid,style:{visibility:g?"hidden":void 0}
1,children:h.jsx(Qa,{eventRange:l,slicedStart:o.startDate,slicedEnd:o.endDate,isStart:o.isStart,isEnd:o.isEnd,isDragging:d,isResizing:u,isMirror:a,isSelected:c===r,level:0,isShort:!1,isNarrow:!1,disableResizing:!0,...qe(l,e,n)})},c)})})}class Jr extends be{constructor(){super(...arguments),this.processSlotOptions=M(Lm),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)}}render(){const{props:e}=this;return h.jsx("div",{role:e.role,className:v(e.className,f.flexRow),ref:this.handleRootEl,children:e.cells.map((n,r)=>h.jsx(km,{dateProfile:e.dateProfile,nowDate:e.nowDate,todayRange:e.todayRange,date:n.date,isMajor:n.isMajor,slatCnt:e.slatCnt,renderProps:n.renderProps,attrs:n.attrs,dateSpanProps:n.dateSpanProps,forPrint:e.forPrint,borderStart:!!r,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,fgEventSegs:e.fgEventSegsByCol[r],bgEventSegs:e.bgEventSegsByCol[r],businessHourSegs:e.businessHourSegsByCol[r],nowIndicatorSegs:e.nowIndicatorSegsByCol[r],dateSelectionSegs:e.dateSelectionSegsByCol[r],eventDrag:e.eventDragByCol[r],eventResize:e.eventResizeByCol[r],eventSelection:e.eventSelection,width:e.colWidth,slatHeight:e.slatHeight},n.key))})}queryHit(e,n,r,s){const{dateProfile:i,cells:a,colWidth:o,slatHeight:l}=this.props,{dateEnv:c,options:d}=this.context,{snapDuration:u,snapsPerSlot:g}=this.processSlotOptions(d.slotDuration,d.snapDuration),m=a.length,{col:y,left:p,right:E}=qr(n,s,o,m,e),D=a[y],C=Math.floor(r/l),w=C*l,T=(r-w)/l,x=Math.floor(T*g),N=C*g+x,H=Xn(i.slotMinTime,Xd(u,N)),A=c.add(D.date,H),L=c.add(A,u);return{dateProfile:i,dateSpan:{range:{start:A,end:L},allDay:!1,...D.dateSpanProps},getDayEl:()=>Zr(this.rootEl,y),rect:{left:p,right:E,top:w,bottom:w+l},layer:0}}}Jr.addPropsEquality({style:Ae});function Lm(t,e){let n=e||t,r=xr(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}const Am=t=>h.jsx(Pe.Consumer,{children:e=>{let{options:n}=e,r={date:e.dateEnv.toDate(t.date),view:e.viewApi};return h.jsx(F,{elRef:t.elRef,tag:t.tag||"div",attrs:t.attrs,className:t.className,style:t.style,renderProps:r,generatorName:"nowIndicatorHeaderContent",customGenerator:n.nowIndicatorHeaderContent,classNameGenerator:n.nowIndicatorHeaderClass,didMount:n.nowIndicatorHeaderDidMount,willUnmount:n.nowIndicatorHeaderWillUnmount,children:t.children})}});function eo(t){return h.jsx("div",{className:v(f.fill,f.crop),style:{zIndex:2,pointerEvents:"none"},children:h.jsx(Am,{className:f.abs,style:{top:t.totalHeight!=null?t.totalHeight*pn(t.nowDate,t.dateProfile):void 0},date:t.nowDate})})}const Wm=O({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});class to extends W{constructor(){super(...arguments),this.createRenderProps=M(Bm),this.innerElRef=I.createRef()}render(){let{props:e,context:n}=this,{options:r}=n,s=r.slotHeaderFormat==null?Wm:Array.isArray(r.slotHeaderFormat)?O(r.slotHeaderFormat[0]):O(r.slotHeaderFormat),i=this.createRenderProps(e.date,e.time,!e.isLabeled,e.isNarrow,e.isFirst,s,n),a=v(e.liquidHeight&&f.liquid,f.flexRow,f.alignStart,f.noMargin,f.noPadding,e.borderTop?f.borderOnlyT:f.borderNone);return e.isLabeled?h.jsx(F,{tag:"div",attrs:{"data-time":e.isoTimeStr},style:{height:e.height},className:a,renderProps:i,generatorName:"slotHeaderContent",customGenerator:r.slotHeaderContent,defaultGenerator:Um,classNameGenerator:r.slotHeaderClass,didMount:r.slotHeaderDidMount,willUnmount:r.slotHeaderWillUnmount,children:o=>h.jsx("div",{ref:this.innerElRef,className:v(f.noShrink,f.whiteSpaceNoWrap,f.flexRow),children:h.jsx(o,{tag:"div",className:b(r.slotHeaderInnerClass,i)})})}):h.jsx("div",{className:v(b(r.slotHeaderClass,i),a),style:{height:e.height}})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;n&&(this.disconnectInnerSize=St(n,(r,s)=>{this._isUnmounting||(P(e.innerWidthRef,r),P(e.innerHeightRef,s))}))}componentWillUnmount(){const{props:e}=this;this._isUnmounting=!0,this.disconnectInnerSize&&(this.disconnectInnerSize(),P(e.innerWidthRef,null),P(e.innerHe
1ightRef,null))}}function Bm(t,e,n,r,s,i,a){return{...Xe(t,a.dateEnv),level:0,text:ne(a.dateEnv.formatToParts(t,i)),time:e,isMajor:!1,isMinor:n,isTime:!0,isNarrow:r,hasNavLink:!1,isFirst:s,view:a.viewApi}}function Um(t){return t.text}class no extends W{constructor(){super(...arguments),this.getDateMeta=M(Xe)}render(){let{props:e,context:n}=this,{options:r}=n,s={...this.getDateMeta(e.date,n.dateEnv),time:e.time,isMajor:!1,isMinor:!e.isLabeled,view:n.viewApi};return h.jsx(F,{tag:"div",attrs:{"data-time":e.isoTimeStr},className:v(f.noMargin,f.noPadding,f.liquid,e.borderTop?f.borderOnlyT:f.borderNone),renderProps:s,generatorName:void 0,classNameGenerator:r.slotLaneClass,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount})}}const _m=O({week:"short"});class ro extends W{constructor(){super(...arguments),this.innerElRef=I.createRef()}render(){let{props:e,context:n}=this,{options:r,dateEnv:s}=n,i=e.dateProfile.renderRange,o=Ze(i.start,i.end)===1&&r.navLinks,l=i.start,c=vt(n,l,"week"),d=s.computeWeekNumber(l),u=s.formatToParts(l,r.weekNumberFormat||_m),g=ne(u),m=s.toDate(l);const y={num:d,text:g,textParts:u,date:m,isNarrow:e.isNarrow,hasNavLink:o,options:{dayMinWidth:r.dayMinWidth}};return h.jsx(F,{tag:"div",attrs:{role:"gridcell","aria-label":c},className:v(f.flexRow,f.noMargin,f.noPadding,e.isLiquid?f.liquid:f.contentBox),style:{width:e.width},renderProps:y,generatorName:"weekNumberHeaderContent",customGenerator:r.weekNumberHeaderContent,defaultGenerator:Tn,classNameGenerator:r.weekNumberHeaderClass,didMount:r.weekNumberHeaderDidMount,willUnmount:r.weekNumberHeaderWillUnmount,children:p=>h.jsx("div",{ref:this.innerElRef,className:v(f.flexRow,f.noShrink,f.whiteSpaceNoWrap),children:h.jsx(p,{tag:"div",attrs:o?yt(n,i.start,"week",c):{"aria-label":c},className:b(r.weekNumberHeaderInnerClass,y)})})})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;this.disconnectInnerSize=St(n,(r,s)=>{this._isUnmounting||(P(e.innerWidthRef,r),P(e.innerHeightRef,s))})}componentWillUnmount(){const{props:e}=this;this._isUnmounting=!0,this.disconnectInnerSize(),P(e.innerWidthRef,null),P(e.innerHeightRef,null)}}function so(t){return h.jsx("div",{role:"gridcell",className:t.isLiquid?f.liquid:f.contentBox,style:{width:t.width}})}class io extends W{constructor(){super(...arguments),this.state={headerTierHeights:[]},this.headerLabelInnerWidthRefMap=new ie(()=>{te(this.handleAxisWidths)}),this.headerLabelInnerHeightRefMap=new ie(()=>{te(this.handleHeaderHeights)}),this.headerMainInnerHeightRefMap=new ie(()=>{te(this.handleHeaderHeights)}),this.handleAllDayLabelInnerWidth=e=>{this.allDayLabelInnerWidth=e,te(this.handleAxisWidths)},this.slatLabelInnerWidthRefMap=new ie(()=>{te(this.handleAxisWidths)}),this.slatLabelInnerHeightRefMap=new ie(()=>{te(this.handleSlatInnerHeights)}),this.headerScrollerRef=I.createRef(),this.allDayScrollerRef=I.createRef(),this.mainScrollerRef=I.createRef(),this.footScrollerRef=I.createRef(),this.axisScrollerRef=I.createRef(),this.handleTotalWidth=e=>{this._isUnmounting||this.setState({totalWidth:e})},this.handleBodyHeight=e=>{this._isUnmounting||this.setState({bodyHeight:e})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})},this.handleClientHeight=e=>{this._isUnmounting||this.setState({clientHeight:e})},this.handleStickyBottomScrollbarWidth=e=>{this._isUnmounting||this.setState({sticykBottomScrollbarWidth:e})},this.handleHeaderHeights=()=>{if(this._isUnmounting)return;const e=this.headerLabelInnerHeightRefMap.current,n=this.headerMainInnerHeightRefMap.current,r=[];for(const[s,i]of n.entries())r[s]=Math.max(e.get(s)||0,i);this.setState({headerTierHeights:r})},this.handleSlatInnerHeights=()=>{if(this._isUnmounting)return;const e=this.slatLabelInnerHeightRefMap.current;let n=0;for(const r of e.values())n=Math.max(n,r);this.state.slatInnerHeight!==n&&this.setState({slatInnerHeight:n})},this.handleAxisWidths=()=>{if(this._isUnmounting)return;const e=this.headerLabelInnerWidthRefMap.current,n=this.slatLabelInnerWidthRefMap.current;let r=this.allDayLabelInnerWidth||0;for(const s of e.values())r=Math.max(r,s);for(const s of n.values())r=Math.max(r,s);this.state.axisWidth!==r&&this.setState({axisWidth:r})}}render(){const{props:e,state:n,context:r,headerLabelInnerWidthRefMap:s,headerLabelInnerHeightRefMap:i,headerMainInnerHeightRefMap:a,slatLabelInnerWidthRefMap:o,slatLabelInnerHeightRefMap:l}=this,{nowDate:c,headerTiers:d,forPrint:u}=e,g=c.valueOf()-j(c).valueOf(),{axisWidth:m,totalWidth:y,clientWidth:p,clientHeight:E,bodyHeight:D,sticykBottomScrollbarWidth:C}=n,{options:w}=r,{borderlessX:T,borderlessTop:x,borderlessBottom:N}=Ee(w),H=y!=null&&p!=null&&m!=null?y-p-(m+1):void 0,A=!u&&!he(w),L=!u&&xn(w),B=!u&&ha(w),{eventPrintLayout:G}=w,_=G==="stack"||G!=="grid"&&Qr,z=u&&!_,Q=u&&_,$=e.cells.length,[q,X]=ja($,e.dayMinWidth,p),J=X!=null&&X<=jt,Z=J||X!=null&&X<=w.dayNarrowWidth,ge=e.slatMetas.length,[ce,we]=Xa(A&&w.expandRows,ge,w.slotMinHeight,n.slatInnerHeight,E);this.slatHeight=ce;const Be=(ce||0)*ge,De=z?Be:void 0,ye=A&&!w.expandRows&&E!=null&&E>Be,Ke=w.dayHeaders?d.length+1:1,Ue=B?C:D!=null&&E!=null?D-E:void 0;return h.jsxs(h.Fragment,{children:[w.dayHeaders&&h.jsxs("div",{className:v(b(w.tableHeaderClass,{isSticky:L,borderlessX:T,borderlessTop:x,borderlessBottom:N,multiMonthColumns:0}),f.flexCol,L&&f.tableHeaderSticky),style:{zIndex:1},children:[h.jsxs("div",{className:f.flexRow,children:[h.jsx("div",{role:"rowgroup",className:f.contentBox,style:{width:m},children:d.map((re,Y)=>h.jsx("div",{role:"row","aria-rowindex":Y+1,className:v(w.dayHeaderRowClass,f.flexRow,f.contentBox,Y<e.headerTiers.length-1?f.borderOnlyB:f.borderNone),style:{height:n.headerTierHeights[Y]},children:w.weekNumbers&&re.isDateRow?h.jsx(ro,{dateProfile:e.dateProfile,innerWidthRef:s.createRef(Y),innerHeightRef:i.createRef(Y),width:void 0,isLiquid:!0,isNarrow:Z}):h.jsx(so,{width:void 0,isLiquid:!0})},Y))}),h.jsx("div",{className:b(w.slotHeaderDividerClass,{inTableHeader:!0,options:{dayMinWidth:w.dayMinWidth}})}),h.jsxs(pe,{horizontal:!0,hideScrollbars:!0,className:v(f.flexRow,f.liquid),ref:this.headerScrollerRef,children:[h.jsx("div",{role:"rowgroup",className:q==null?f.liquid:"",style:{width:q},children:e.headerTiers.map((re,Y)=>I.createElement(In,{...re,key:Y,role:"row",rowIndex:Y,borderBottom:Y<e.headerTiers.length-1,height:n.headerTierHeights[Y],colWidth:X,viewportWidth:p,innerHeightRef:a.createRef(Y),cellIsNarrow:Z,cellIsMicro:J,rowLevel:e.headerTiers.length-Y-1}))}),!!H&&h.jsx("div",{className:v(b(w.fillerClass,{inTableHeader:!0}),f.borderOnlyS),style:{minWidth:H}})]})]}),h.jsx("div",{className:b(w.dayHeaderDividerClass,{isSticky:L,multiMonthColumns:0,options:{allDaySlot:!!w.allDaySlot}})})]}),h.jsxs("div",{role:"rowgroup",className:v(b(w.tableBodyClass,{borderlessX:T,borderlessTop:x,borderlessBottom:N,multiMonthColumns:0}),f.flexCol,A&&f.liquid,f.isolate),style:{zIndex:0},children:[w.allDaySlot&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{role:"row","aria-rowindex":Ke,className:f.flexRow,style:{zIndex:1},children:[h.jsx(Za,{width:m,innerWidthRef:this.handleAllDayLabelInnerWidth,isNarrow:Z}),h.jsx("div",{className:b(w.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:w.dayMinWidth}})}),h.jsxs(pe,{horizontal:!0,hideScrollbars:!0,className:v(f.flexRow,f.liquidX),ref:this.allDayScrollerRef,children:[h.jsx("div",{className:f.flexRow,style:{width:q},children:h.jsx($a,{dateProfile:e.dateProfile,todayRange:e.todayRange,cells:e.cells,showDayNumbers:!1,forPrint:u,isHitComboAllowed:e.isHitComboAllowed,className:v(f.borderNone,f.liquidX),cellIsNarrow:Z,cellIsMicro:J,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,colWidth:X})}),!!H&&h.jsx("div",{className:v(b(w.fillerClass,{inTableHeader:!1}),f.borderOnlyS),style:{minWidth:H}})]})]}
1),h.jsx("div",{className:v(w.allDayDividerClass),style:{zIndex:2}})]}),h.jsxs("div",{role:"row","aria-rowindex":Ke+(w.allDaySlot?1:0),className:v(f.flexRow,f.rel,A&&f.liquid),style:{zIndex:0},children:[h.jsx(pe,{vertical:A,hideScrollbars:!0,className:v(f.flexCol,f.contentBox),style:{width:m},ref:this.axisScrollerRef,clientHeightRef:this.handleBodyHeight,children:!Q&&h.jsx(h.Fragment,{children:h.jsxs("div",{role:"rowheader","aria-label":w.timedText,className:v(f.flexCol,f.grow,f.rel),style:{height:De},children:[h.jsx("div",{"aria-hidden":!0,className:v(f.flexCol,A&&w.expandRows&&f.grow,z&&f.fillX),children:e.slatMetas.map((re,Y)=>I.createElement(to,{...re,key:re.key,innerWidthRef:o.createRef(re.key),innerHeightRef:l.createRef(re.key),borderTop:!!Y,isNarrow:Z,height:we?void 0:ce,liquidHeight:we}))}),!u&&w.nowIndicator&&Me(e.dateProfile.currentRange,c)&&g>=e.dateProfile.slotMinTime.milliseconds&&g<e.dateProfile.slotMaxTime.milliseconds&&h.jsx(eo,{nowDate:c,dateProfile:e.dateProfile,totalHeight:ce!=null?ce*ge:void 0}),!!(ye||Ue)&&h.jsx("div",{className:v(b(w.fillerClass,{inTableHeader:!1}),f.borderOnlyT,ye&&f.liquid),style:{minHeight:Ue}})]})})}),h.jsx("div",{className:b(w.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:w.dayMinWidth}})}),h.jsxs("div",{className:v(f.flexCol,f.liquid),children:[h.jsx(pe,{vertical:A,horizontal:!0,hideScrollbars:B||u,className:v(f.flexCol,f.rel,A&&f.liquid),ref:this.mainScrollerRef,clientWidthRef:this.handleClientWidth,clientHeightRef:this.handleClientHeight,children:h.jsxs("div",{className:v(f.flexCol,f.grow,f.rel),style:{width:q,height:De},children:[h.jsx(Jr,{dateProfile:e.dateProfile,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatCnt:ge,forPrint:u,isHitComboAllowed:e.isHitComboAllowed,className:Q?"":f.fill,fgEventSegsByCol:e.fgEventSegsByCol,bgEventSegsByCol:e.bgEventSegsByCol,businessHourSegsByCol:e.businessHourSegsByCol,nowIndicatorSegsByCol:e.nowIndicatorSegsByCol,dateSelectionSegsByCol:e.dateSelectionSegsByCol,eventDragByCol:e.eventDragByCol,eventResizeByCol:e.eventResizeByCol,eventSelection:e.eventSelection,colWidth:X,slatHeight:ce,cellIsNarrow:Z,cellIsMicro:J}),!Q&&h.jsxs(h.Fragment,{children:[h.jsx("div",{"aria-hidden":!0,className:v(f.flexCol,A&&w.expandRows&&f.grow,z?f.fillX:f.rel),children:e.slatMetas.map((re,Y)=>h.jsx("div",{className:v(f.flexRow,we&&f.liquid),style:{height:we?"":ce},children:I.createElement(no,{...re,key:re.key,borderTop:!!Y})},re.key))}),ye&&h.jsx("div",{className:v(b(w.fillerClass,{inTableHeader:!1}),f.borderOnlyT,f.liquid)})]})]})}),!!B&&h.jsx(Va,{isSticky:!0,canvasWidth:q,scrollerRef:this.footScrollerRef,scrollbarWidthRef:this.handleStickyBottomScrollbarWidth})]})]})]}),h.jsx(Et,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1,this.initScrollers(),this.updateSlatHeight()}componentDidUpdate(){this.updateScrollers(),this.updateSlatHeight()}componentWillUnmount(){this._isUnmounting=!0,this.destroyScrollers(),this.prevSlatHeight=void 0,P(this.props.slatHeightRef,null)}updateSlatHeight(){this.prevSlatHeight!==this.slatHeight&&P(this.props.slatHeightRef,this.prevSlatHeight=this.slatHeight)}initScrollers(){const e=ga(this.context.pluginHooks);this.dayScroller=new e(!0),this.timeScroller=new e,P(this.props.dayScrollerRef,this.dayScroller),P(this.props.timeScrollerRef,this.timeScroller),this.updateScrollers()}updateScrollers(){this.dayScroller.handleChildren([this.headerScrollerRef.current,this.allDayScrollerRef.current,this.mainScrollerRef.current,this.footScrollerRef.current]),this.timeScroller.handleChildren([this.axisScrollerRef.current,this.mainScrollerRef.current])}destroyScrollers(){P(this.props.dayScrollerRef,null),P(this.props.timeScrollerRef,null)}}io.addPropsEquality({headerTierHeights:ct});class Om extends W{constructor(){super(...arguments),this.state={},this.headerLabelInnerWidthRefMap=new ie(()=>{te(this.handleAxisInnerWidths)}),this.handleAllDayLabelInnerWidth=e=>{this.allDayLabelInnerWidth=e,te(this.handleAxisInnerWidths)},this.handleWeekNumberInnerWidth=e=>{this.weekNumberInnerWidth=e,te(this.handleAxisInnerWidths)},this.slatLabelInnerWidthRefMap=new ie(()=>{te(this.handleAxisInnerWidths)}),this.slatLabelInnerHeightRefMap=new ie(()=>{te(this.handleSlatInnerHeights)}),this.handleTotalWidth=e=>{this._isUnmounting||requestAnimationFrame(()=>{this._isUnmounting||this.setState({totalWidth:e})})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})},this.handleClientHeight=e=>{this._isUnmounting||this.setState({clientHeight:e})},this.handleAxisInnerWidths=()=>
1{if(this._isUnmounting)return;const e=this.headerLabelInnerWidthRefMap.current,n=this.slatLabelInnerWidthRefMap.current;let r=Math.max(this.weekNumberInnerWidth||0,this.allDayLabelInnerWidth||0);for(const s of e.values())r=Math.max(r,s);for(const s of n.values())r=Math.max(r,s);this.state.axisWidth!==r&&this.setState({axisWidth:r})},this.handleSlatInnerHeights=()=>{if(this._isUnmounting)return;const e=this.slatLabelInnerHeightRefMap.current;let n=0;for(const r of e.values())n=Math.max(n,r);this.state.slatInnerHeight!==n&&this.setState({slatInnerHeight:n})}}render(){const{props:e,state:n,context:r,slatLabelInnerWidthRefMap:s,slatLabelInnerHeightRefMap:i,headerLabelInnerWidthRefMap:a}=this,{nowDate:o,forPrint:l}=e,c=o.valueOf()-j(o).valueOf(),{axisWidth:d,clientWidth:u,totalWidth:g}=n,{options:m}=r,{borderlessX:y,borderlessTop:p,borderlessBottom:E}=Ee(m),D=g!=null&&u!=null&&!l?g-u:void 0,C=!l&&!he(m),w=!l&&xn(m),T=e.slatMetas.length,[x,N]=Xa(C&&m.expandRows,T,m.slotMinHeight,n.slatInnerHeight,n.clientHeight);this.slatHeight=x;const H=(x||0)*T,A=C&&!m.expandRows&&n.clientHeight!=null&&n.clientHeight>H,{eventPrintLayout:L}=m,B=L==="stack"||L!=="grid"&&Qr,G=l&&!B,_=l&&B,z=G?H:void 0,Q=e.cells.length,$=u!=null?u/Q:void 0,q=$!=null&&$<=jt,X=q||$!=null&&$<=m.dayNarrowWidth;return h.jsxs(h.Fragment,{children:[m.dayHeaders&&h.jsxs("div",{role:"rowgroup",className:v(b(m.tableHeaderClass,{isSticky:w,borderlessX:y,borderlessTop:p,borderlessBottom:E,multiMonthColumns:0}),f.flexCol,w&&f.tableHeaderSticky),style:{zIndex:1},children:[e.headerTiers.map((J,Z)=>h.jsxs("div",{role:"row",className:f.flexRow,children:[h.jsx("div",{className:v(m.dayHeaderRowClass,f.flexRow,Z<e.headerTiers.length-1?f.borderOnlyB:f.borderNone),children:m.weekNumbers&&J.isDateRow?h.jsx(ro,{dateProfile:e.dateProfile,innerWidthRef:this.handleWeekNumberInnerWidth,innerHeightRef:a.createRef(Z),width:d,isLiquid:!1,isNarrow:X}):h.jsx(so,{width:d,isLiquid:!1})}),h.jsx("div",{className:b(m.slotHeaderDividerClass,{inTableHeader:!0,options:{dayMinWidth:m.dayMinWidth}})}),h.jsx(In,{...J,className:f.liquid,borderBottom:Z<e.headerTiers.length-1,viewportWidth:u,cellIsNarrow:X,cellIsMicro:q,rowLevel:e.headerTiers.length-Z-1}),!!D&&h.jsx("div",{className:v(b(m.fillerClass,{inTableHeader:!0}),f.borderOnlyS),style:{minWidth:D}})]},Z)),h.jsx("div",{className:b(m.dayHeaderDividerClass,{isSticky:w,multiMonthColumns:0,options:{allDaySlot:!!m.allDaySlot}})})]}),h.jsxs("div",{role:"rowgroup",className:v(b(m.tableBodyClass,{borderlessX:y,borderlessTop:p,borderlessBottom:E,multiMonthColumns:0}),f.flexCol,C&&f.liquid,f.isolate),style:{zIndex:0},children:[m.allDaySlot&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{role:"row",className:f.flexRow,style:{zIndex:1},children:[h.jsx(Za,{width:d,innerWidthRef:this.handleAllDayLabelInnerWidth,isNarrow:X}),h.jsx("div",{className:b(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}})}),h.jsx($a,{dateProfile:e.dateProfile,todayRange:e.todayRange,cells:e.cells,showDayNumbers:!1,forPrint:l,isHitComboAllowed:e.isHitComboAllowed,className:v(f.liquidX,f.borderNone),cellIsNarrow:X,cellIsMicro:q,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows}),!!D&&h.jsx("div",{className:v(b(m.fillerClass,{inTableHeader:!1}),f.borderOnlyS),style:{minWidth:D}})]}),h.jsx("div",{className:v(m.allDayDividerClass),style:{zIndex:2}})]}),h.jsx(pe,{vertical:C,className:v(f.flexCol,f.rel,C&&f.liquid),style:{zIndex:0},ref:e.timeScrollerRef,clientWidthRef:this.handleClientWidth,clientHeightRef:this.handleClientHeight,children:h.jsxs("div",{className:v(f.flexCol,f.grow,f.rel),style:{height:z},children:[h.jsxs("div",{role:"row",className:v(f.flexRow,!_&&f.fill),children:[h.jsx("div",{role:"rowheader","aria-label":m.timedText,className:f.contentBox,style:{width:d}}),h.jsx("div",{className:b(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}})}),h.jsx(Jr,{dateProfile:e.dateProfile,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatCnt:T,forPrint:l,isHitComboAllowed:e.isHitComboAllowed,className:f.liquid,fgEventSegsByCol:e.fgEventSegsByCol,bgEventSegsByCol:e.bgEventSegsByCol,businessHourSegsByCol:e.businessHourSegsByCol,nowIndicatorSegsByCol:e.nowIndicatorSegsByCol,dateSelectionSegsByCol:e.dateSelectionSegsByCol,eventDragByCol:e.eventDragByCol,eventResizeByCol:e.eventResizeByCol,eventSelection:e.eventSelection,slatHeight:x,cellIsNarrow:X,cellIsMicro:q})]}),!_&&h.jsxs(h.Fragment,{children:[h.jsx("div",{"aria-hidden":!0,
1className:v(f.flexCol,C&&m.expandRows&&f.grow,G?f.fillX:f.rel),children:e.slatMetas.map((J,Z)=>h.jsxs("div",{className:v(N&&f.liquid,f.flexRow),style:{height:N?void 0:x},children:[h.jsx("div",{className:f.flexCol,style:{width:d},children:I.createElement(to,{...J,key:J.key,innerWidthRef:s.createRef(J.key),innerHeightRef:i.createRef(J.key),borderTop:!!Z,isNarrow:X})}),h.jsx("div",{className:b(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}}),style:{visibility:"hidden"}}),I.createElement(no,{...J,key:J.key,borderTop:!!Z})]},J.key))}),A&&h.jsx("div",{className:v(b(m.fillerClass,{inTableHeader:!1}),f.borderOnlyT,f.liquid)}),!l&&m.nowIndicator&&Me(e.dateProfile.currentRange,o)&&c>=e.dateProfile.slotMinTime.milliseconds&&c<e.dateProfile.slotMaxTime.milliseconds&&h.jsx(eo,{nowDate:o,dateProfile:e.dateProfile,totalHeight:x!=null?x*T:void 0})]})]})})]}),h.jsx(Et,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1,this.updateSlatHeight()}componentDidUpdate(){this.updateSlatHeight()}componentWillUnmount(){this._isUnmounting=!0,this.prevSlatHeight=void 0,P(this.props.slatHeightRef,null)}updateSlatHeight(){this.prevSlatHeight!==this.slatHeight&&P(this.props.slatHeightRef,this.prevSlatHeight=this.slatHeight)}}function Js(t){return t.map(()=>[])}function ei(t){return t.map(()=>null)}class jm extends W{constructor(){super(...arguments),this.buildSlatMetas=M(pm),this.dayScrollerRef=I.createRef(),this.timeScrollerRef=I.createRef(),this.scrollState={},this.handleSlatHeight=e=>{this._isUnmounting||(this.slatHeight=e,e!=null&&te(this.applyTimeScroll))},this.handleTimeScrollRequest=e=>{this.scrollState.time=e,this.scrollState.y=void 0,this.applyTimeScroll()},this.handleTimeScrollEnd=e=>{if(e){const n=this.timeScrollerRef.current.y;this.props.forPrint||(this.scrollState.y=n,this.scrollState.time=void 0)}},this.applyTimeScroll=()=>{const e=this.timeScrollerRef.current,{slatHeight:n,scrollState:r}=this;let{y:s,time:i}=r;s==null&&i&&n!=null&&e&&(s=Ka(i,this.props.dateProfile)*(n*this.currentSlatCnt),s&&s++,r.y=s),s!=null&&e.scrollTo({y:s})}}render(){const{props:e,context:n}=this,{dateProfile:r}=e,{options:s,dateEnv:i}=n,{dayMinWidth:a}=s,{borderlessX:o,borderlessTop:l,borderlessBottom:c}=Ee(s),d=this.buildSlatMetas(r.slotMinTime,r.slotMaxTime,s.slotHeaderInterval,s.slotDuration,i);this.currentSlatCnt=d.length;const u=e.forPrint?[]:e.businessHourSegs,g=e.forPrint?[]:e.dateSelectionSegs,m=e.forPrint?null:e.eventDrag,y=e.forPrint?null:e.eventResize,p=e.forPrint?Js(e.businessHourSegsByCol):e.businessHourSegsByCol,E=e.forPrint?Js(e.dateSelectionSegsByCol):e.dateSelectionSegsByCol,D=e.forPrint?ei(e.eventDragByCol):e.eventDragByCol,C=e.forPrint?ei(e.eventResizeByCol):e.eventResizeByCol,w={dateProfile:r,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatMetas:d,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,headerTiers:e.headerTiers,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:u,dateSelectionSegs:g,eventDrag:m,eventResize:y,...zm(s),fgEventSegsByCol:e.fgEventSegsByCol,bgEventSegsByCol:e.bgEventSegsByCol,businessHourSegsByCol:p,nowIndicatorSegsByCol:e.nowIndicatorSegsByCol,dateSelectionSegsByCol:E,eventDragByCol:D,eventResizeByCol:C,eventSelection:e.eventSelection,timeScrollerRef:this.timeScrollerRef,timeScrollState:this.scrollState,slatHeightRef:this.handleSlatHeight,borderlessX:o,borderlessBottom:c};return h.jsx(Mn,{attrs:{role:"grid","aria-colcount":e.cells.length,"aria-labelledby":e.labelId,"aria-label":e.labelStr},className:v(e.className,b(s.tableClass,{borderlessX:o,borderlessTop:l,borderlessBottom:c,multiMonthColumns:0}),!e.forPrint&&f.flexCol,f.isolate),viewSpec:n.viewSpec,children:a?h.jsx(io,{...w,dayMinWidth:a,dayScrollerRef:this.dayScrollerRef}):h.jsx(Om,{...w})})}componentDidMount(){this._isUnmounting=!1,this.resetScroll(),this.context.emitter.on("_timeScrollRequest",this.handleTimeScrollRequest);const e=this.timeScrollerRef.current;e&&e.addScrollEndListener(this.handleTimeScrollEnd)}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile&&this.context.options.scrollTimeReset?this.resetScroll():e.forPrint&&!this.props.forPrint&&this.applyTimeScroll()}componentWillUnmount(){this._isUnmounting=!0,this.context.emitter.off("_timeScrollRequest",this.handleTimeScrollRequest);const e=this.timeScrollerRef.current;e&&e.removeScrollEndListener(this.handleTimeScrollEnd)}resetScroll(){this.handleTimeScrollRequest(this.context.options.scrollTime);const e=this.dayScrollerRef.current;e&&e.scrollTo({x:0})}}const Fm=5;function zm(t){let{dayMaxEvents:e,dayMaxEventRows:n}=t;return(e===!0||n===!0)&&(e=void 0,n=Fm),{dayMaxEvents:e,dayMaxEventRows:n}}class Vm extends be{constructor(){super(...arguments),this.createDayHeaderFormatter=M($r),this.buildTimeColsModel=M(Sm),this.buildDayRanges=M(Em),this.buildDateRowConfigs=M(Ia),this.splitFgEventSegs=M(wt),this.splitBgEventSegs=M(wt),this.splitBusinessHourSegs=M(wt),this.splitNowIndicatorSegs=M(wt),this.splitDateSelectionSegs=M(wt),this.splitEventDrag=M($s),this.splitEventResize=M($s),this.allDaySplitter=new gm,this.dayTableSlicer=new Yr,this.dayTimeColsSlicer=new mm}render(){const{props:e,context:n}=this,{dateProfile:r}=e,{options:s,dateProfileGenerator:i}=n,a=this.buildTimeColsModel(r,i,n.dateEnv),o=this.buildDayRanges(a,r,n.dateEnv),l=this.allDaySplitter.splitProps(e),c=this.dayTableSlicer.sliceProps(l.allDay,r,s.nextDayThreshold,n,a),d=this.dayTimeColsSlicer.sliceProps(l.timed,r,null,n,o),u=this.createDayHeaderFormatter(n.options.dayHeaderFormat,!0,a.colCount);return h.jsx(_t,{unit:s.nowIndicator?"minute":"day",children:(g,m)=>{const y=a.cellRows[0].length,p=!e.forPrint&&s.nowIndicator&&this.dayTimeColsSlicer.sliceNowDate(g,r,s.nextDayThreshold,n,o),E=this.splitFgEventSegs(d.fgEventSegs,y),D=this.splitBgEventSegs(d.bgEventSegs,y),C=this.splitBusinessHourSegs(d.businessHourSegs,y),w=this.splitNowIndicatorSegs(p,y),T=this.splitDateSelectionSegs(d.dateSelectionSegs,y),x=this.splitEventDrag(d.eventDrag,y),N=this.splitEventResize(d.eventResize,y),H=this.buildDateRowConfigs(a.headerDates,!0,e.dateProfile,m,u,n);return h.jsx(jm,{labelId:e.labelId,labelStr:e.labelStr,dateProfile:r,nowDate:g,todayRange:m,cells:a.cellRows[0],forPrint:e.forPrint,className:e.className,headerTiers:H,fgEventSegs:c.fgEventSegs,bgEventSegs:c.bgEventSegs,businessHourSegs:c.businessHourSegs,dateSelectionSegs:c.dateSelectionSegs,eventDrag:c.eventDrag,eventResize:c.eventResize,fgEventSegsByCol:E,bgEventSegsByCol:D,businessHourSegsByCol:C,nowIndicatorSegsByCol:w,dateSelectionSegsByCol:T,eventDragByCol:x,eventResizeByCol:N,eventSelection:e.eventSelection})}})}}var Gm={name:"timegrid",initialView:"timeGridWeek",deps:[qa],views:{timeGrid:{component:Vm,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}};class ti extends W{render(){const{props:e,context:n}=this,{options:r}=n,s=n.dateEnv.formatToParts(e.dayDate,e.dayFormat),i=ne(s),a=r.navLinks,o={...e.dateMeta,view:n.viewApi,text:i,textParts:s,get weekdayText(){return kt(s)},get dayNumberText(){return Lt(s)},hasNavLink:a,level:e.level},l=a?yt(this.context,e.dayDate,void 0,i,this.props.isTabbable):{};return h.jsx(F,{tag:"div",attrs:l,renderProps:o,generatorName:"listDayHeaderContent",customGenerator:r.listDayHeaderContent,defaultGenerator:Tn,classNameGenerator:r.listDayHeaderInnerClass})}}class Ym extends W{render(){let{options:e,viewApi:n,viewSpec:r}=this.context,{dayDate:s,dateMeta:i}=this.props,a=!this.props.forPrint;const o=e.listDayFormat??qm(r),l=e.listDayAltFormat??Zm(r);let c={...i,view:n};return h.jsx(F,{tag:"div",attrs:{"data-date":mt(s),...i.isToday?{"aria-current":"date"}:{}},className:a?f.stickyT:"",renderProps:c,generatorName:void 0,classNameGenerator:e.listDayHeaderClass,didMount:e.listDayHeaderDidMount,willUnmount:e.listDayHeaderWillUnmount,children:()=>h.jsxs(h.Fragment,{children:[!!o&&h.jsx(ti,{dayDate:s,dayFormat:o,isTabbable:!0,dateMeta:i,level:0}),!!l&&h.jsx(ti,{dayDate:s,dayFormat:l,isTabbable:!1,dateMeta:i,level:1})]})})}}function qm({durationUnit:t,singleUnit:e}){return e==="day"||t==="day"||e==="week"?mn:zr}function Zm({durationUnit:t,singleUnit:e}){if(e!=="day")return t==="day"||e==="week"?zr:mn}const $m=O({hour:"numeric",minute:"2-digit",meridiem:"short"});class Xm extends W{render(){let{props:e,context:n}=this,{eventRange:r}=e;const{displayEventTime:s}=n.options;let i=s!==!1&&(r.def.allDay||!e.isStart&&!e.isEnd)?n.options.allDayText:void 0;return h.jsx(Ot,{...e,attrs:{role:"listitem"},forcedTimeText:i,defaultTimeFormat:$m,disableDragging:!0,disableResizing:!0,disableZindexes:!0,display:"list-item"})}}class Km extends W{constructor(){super(...arguments),this.getDateMeta=M(Xe),this.sortEventSegs=M(_r)}render(){const{props:e,context:n}=this,{nowDate:r,todayRange:s}=e,{options:i}
1=n,a=this.getDateMeta(e.dayDate,n.dateEnv,void 0,s),o=this.sortEventSegs(e.segs,i.eventOrder),l=vt(this.context,e.dayDate),c={...a,isFirst:e.isFirst,isLast:e.isLast,view:n.viewApi},d={...a,view:n.viewApi};return h.jsxs("div",{role:"listitem","aria-label":l,className:b(i.listDayClass,c),children:[h.jsx(Ym,{dayDate:e.dayDate,dateMeta:a,forPrint:e.forPrint}),h.jsx("div",{role:"list","aria-label":i.eventsHint,className:v(b(i.listDayBodyClass,d),f.flexCol),children:o.map((u,g)=>{const m=Rn(u),y=g===0,p=g===o.length-1;return h.jsx(Xm,{eventRange:u.eventRange,slicedStart:u.slicedStart,slicedEnd:u.slicedEnd,isStart:u.isStart,isEnd:u.isEnd,isFirst:y,isLast:p,isDragging:!1,isResizing:!1,isMirror:!1,isSelected:!1,...qe(u.eventRange,s,r)},m)})})]})}}class Qm extends be{constructor(){super(...arguments),this.computeDateVars=M(ep),this.eventStoreToSegs=M(this._eventStoreToSegs),this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,disableHits:!0}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{options:r}=n,{dayDates:s,dayRanges:i}=this.computeDateVars(e.dateProfile),a=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i),o=!e.forPrint&&!he(r);return h.jsx(Mn,{viewSpec:n.viewSpec,className:v(e.className,f.flexCol),elRef:this.setRootEl,children:a.length?h.jsx(pe,{vertical:o,className:v(f.flexCol,o?f.liquid:""),children:this.renderSegList(a,s)}):this.renderEmptyMessage()})}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return h.jsx(F,{tag:"div",attrs:{role:"status"},renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Jm,classNameGenerator:e.noEventsClass,className:f.grow,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount,children:s=>h.jsx(s,{tag:"div",className:b(e.noEventsInnerClass,r)})})}renderSegList(e,n){let{options:r}=this.context,s=tp(e);return h.jsx("div",{role:"list","aria-labelledby":this.props.labelId,"aria-label":this.props.labelStr,className:v(f.flexCol,v(r.listDaysClass)),children:h.jsx(_t,{unit:"day",children:(i,a)=>{const o=[],l=s.reduce((d,u)=>d+(u?1:0),0);let c=0;for(let d=0;d<s.length;d+=1){let u=s[d];if(u){const g=n[d],m=mt(g),y=c===0,p=c===l-1;o.push(h.jsx(Km,{dayDate:g,nowDate:i,todayRange:a,segs:u,isFirst:y,isLast:p,forPrint:this.props.forPrint},m)),c+=1}}return h.jsx(h.Fragment,{children:o})}})})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(tr(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let s of e)r.push(...this.eventRangeToSegs(s,n));return r}eventRangeToSegs(e,n){let r=e.range,s,i=[];for(s=0;s<n.length;s+=1){const a=ke(r,n[s]);a&&i.push({eventRange:e,slicedStart:a.start,slicedEnd:a.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:s})}return i}}function Jm(t){return t.text}function ep(t){let e=j(t.renderRange.start),n=t.renderRange.end,r=[],s=[];for(;e<n;)r.push(e),s.push({start:e,end:K(e,1)}),e=K(e,1);return{dayDates:r,dayRanges:s}}function tp(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var np={name:"list",views:{list:{component:Qm,buttonTextKey:"listText",disallowAmbigTitle:!0},listDay:{type:"list",duration:{days:1}},listWeek:{type:"list",duration:{weeks:1}},listMonth:{type:"list",duration:{month:1}},listYear:{type:"list",duration:{year:1}}}};class rp{constructor(e,n){this.emitter=new Ut}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const ao={};function oo(t,e,n){let{instances:r}=t.mutatedEvents;for(let s in r)if(!bn(e.validRange,r[s].range))return!1;return lo({eventDrag:t},n)}function sp(t,e,n){return bn(e.validRange,t.range)?lo({dateSelection:t},n):!1}function lo(t,e){let n=e.getCurrentData(),r={businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null,...t};return(e.pluginHooks.isPropsValid||ip)(r,e)}function ip(t,e,n={},r){return!(t.eventDrag&&!ap(t,e,n,r)||t.dateSelection&&!op(t,e,n,r))}function ap(t,e,n,r){let s=e.getCurrentData(),i=t.eventDrag,a=i.mutatedEvents,o=a.defs,l=a.instances,c=gn(o,i.isEvent?t.eventUiBases:{"":s.selectionConfig});r&&(c=Ne(c,r));let d=ah(t.eventStore,i.affectedEvents.instances),u=d.defs,g=d.instances,m=gn(u,t.eventUiBases);for(let y in l){let p=l[y],E=p.range,D=c[p.defId],C=o[p.defId];if(!co(D.constraints,E,d,t.businessHours,e))return!1;let{eventOverlap:w}=e.options,T=typeof w=="function"?w:null;for(let N in g){let H=g[N];if(Tr(E,H.range)&&(m[H.defId].overlap===!1&&i.isEvent||D.overlap===!1||T&&!T(new V(e,u[H.defId],H),new V(e,C,p))))return!1}let x=s.eventStore;for(let N of D.allows){let H={...n,range:p.range,allDay:C.allDay},A=x.defs[C.defId],L=x.instances[y],B;if(A?B=new V(e,A,L):B=new V(e,C),!N(Br(H,e),B))return!1}}return!0}function op(t,e,n,r){let s=t.eventStore,i=s.defs,a=s.instances,o=t.dateSelection,l=o.range,{selectionConfig:c}=e.getCurrentData();if(r&&(c=r(c)),!co(c.constraints,l,s,t.businessHours,e))return!1;let{selectOverlap:d}=e.options,u=typeof d=="function"?d:null;for(let g in a){let m=a[g];if(Tr(l,m.range)&&(c.overlap===!1||u&&!u(new V(e,i[m.defId],m),null)))return!1}for(let g of c.allows){let m={...n,...o};if(!g(Br(m,e),null))return!1}return!0}function co(t,e,n,r,s){for(let i of t)if(!cp(lp(i,e,n,r,s),e))return!1;return!0}function lp(t,e,n,r,s){return t==="businessHours"?jn(Ye(r,e,s)):typeof t=="string"?jn(Cn(n,i=>i.groupId===t)):typeof t=="object"&&t?jn(Ye(t,e,s)):[]}function jn(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function cp(t,e){for(let n of t)if(bn(n,e))return!0;return!1}ao.touchMouseIgnoreWait=500;let fr=0,vn=0,hr=!1;class uo{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=n=>{if(!this.shouldIgnoreMouse()&&dp(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let s=n.target;this.shouldIgnoreMove||s.addEventListener("touchmove",this.handleTouchMove),s.addEventListener("touchend",this.handleTouchEnd),s.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{if(this.isDragging){let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)}},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,up()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,s=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:s,deltaX:r-this.origPageX,deltaY:s-this.origPageY})}},this.containerEl=e,this.emitter=new Ut,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),fp()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),hp()}cancel(){this.isDragging&&this.cleanup()}
1tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||r.closest(this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){hr=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?e.target.closest(this.selector):this.containerEl}shouldIgnoreMouse(){return fr||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(hr=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,n){let r=0,s=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,s=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:s}}createEventFromTouch(e,n){let r=e.touches,s,i,a=0,o=0;return r&&r.length?(s=r[0].pageX,i=r[0].pageY):(s=e.pageX,i=e.pageY),n?(this.origPageX=s,this.origPageY=i):(a=s-this.origPageX,o=i-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:s,pageY:i,deltaX:a,deltaY:o}}}function dp(t){return t.button===0&&!t.ctrlKey}function up(){fr+=1,setTimeout(()=>{fr-=1},ao.touchMouseIgnoreWait)}function fp(){vn+=1,vn===1&&window.addEventListener("touchmove",fo,{passive:!1})}function hp(){vn-=1,vn||window.removeEventListener("touchmove",fo,{passive:!1})}function fo(t){hr&&t.preventDefault()}class gp{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0,this.colorScheme=""}start(e,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&this.mirrorEl.style.setProperty("display","","important"),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&this.mirrorEl.style.setProperty("display","none","important"),this.isVisible=e)}stop(e,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,s=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",sn(r,{left:s.left,top:s.top}),pu(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(this.mirrorEl.remove(),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&sn(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",this.colorScheme&&n.setAttribute("data-color-scheme",this.colorScheme),n.classList.add(f.borderBoxRoot),sn(n,{position:"fixed",zIndex:this.zIndex,visibility:"",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class es{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class mp extends es{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class pp extends es{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class ho extends es{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class go extends ho{constructor(e,n){super(new mp(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Rg(this.scrollController.el)}}class vp extends ho{constructor(e){super(new pp,e)}getEventTarget(){return window}
vendor: 5,938 bytes, line 1
1computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const ni=typeof performance=="function"?performance.now:Date.now;class yp{constructor(){this.isEnabled=!0,this.scrollQuery=[window,`.${f.internalScroller}`],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=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let n=ni();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,s=n-window.scrollY,i=this.pointerScreenY===null?0:s-this.pointerScreenY,a=this.pointerScreenX===null?0:r-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=s,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ni()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,n){let{scrollCache:r}=e,{edgeThreshold:s}=this,i=s-e.distance,a=i*i/(s*s)*this.maxVelocity*n,o=1;switch(e.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+a*o);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,s=null,i=this.scrollCaches||[];for(let a of i){let o=a.clientRect,l=e-o.left,c=o.right-e,d=n-o.top,u=o.bottom-n;l>=0&&c>=0&&d>=0&&u>=0&&(d<=r&&this.everMovedUp&&a.canScrollUp()&&(!s||s.distance>d)&&(s={scrollCache:a,name:"top",distance:d}),u<=r&&this.everMovedDown&&a.canScrollDown()&&(!s||s.distance>u)&&(s={scrollCache:a,name:"bottom",distance:u}),l<=r&&this.everMovedLeft&&a.canScrollLeft()&&(!s||s.distance>l)&&(s={scrollCache:a,name:"left",distance:l}),c<=r&&this.everMovedRight&&a.canScrollRight()&&(!s||s.distance>c)&&(s={scrollCache:a,name:"right",distance:c}))}return s}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new vp(!1):new go(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class Ft extends rp{constructor(e,n){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=s=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.emitter.trigger("pointerdown",s),this.isInteracting&&(vu(document.body),Su(document.body),s.isTouch||s.origEvent.preventDefault(),this.mirror.setIsVisible(!1),this.mirror.start(s.subjectEl,s.pageX,s.pageY),this.startDelay(s),this.minDistance||this.handleDistanceSurpassed(s)))},this.onPointerMove=s=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",s),!this.isDistanceSurpassed){let i=this.minDistance,a,{deltaX:o,deltaY:l}=s;a=o*o+l*l,a>=i*i&&this.handleDistanceSurpassed(s)}this.isDragging&&(s.origEvent.type!=="scroll"&&(this.mirror.handleMove(s.pageX,s.pageY),this.autoScroller.handleMove(s.pageX,s.pageY)),this.emitter.trigger("dragmove",s))}},this.onPointerUp=s=>{this.isInteracting&&(this.isInteracting=!1,yu(document.body),Eu(document.body),this.emitter.trigger("pointerup",s),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(s)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new uo(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new gp,this.autoScroller=new yp}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(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),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}cancel(){this.isInteracting&&(this.isInteracting=!1,this.pointer.cancel())}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class Sp{constructor(e){this.el=e,this.origRect=Gr(e),this.isRtl=Pt(e),this.scrollCaches=xa(e).map(n=>new go(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let s of this.scrollCaches)if(!Ep(s.getEventTarget())&&!Eg(r,
1s.clientRect))return!1;return!0}}function Ep(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class Nn{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:s}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?this.emitter.trigger("pointerdown",r):s.cancel()},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Ut}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,s=e.subjectEl,i;s instanceof HTMLElement&&(i=Gr(s),r=bg(r,i));let a=this.initialHit=this.queryHitForOffset(r.left,r.top);if(a){if(this.useSubjectCenter&&i){let o=Ta(i,a.rect);o&&(r=wg(o))}this.coordAdjust=Dg(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Hn(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=Ne(this.droppableStore,e=>(e.component.prepareHits(),new Sp(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:s}=this,i=null;for(let a in r){let o=r[a].component,l=s[a];if(l&&l.isWithinClipping(e,n)){let c=l.computeLeft(),d=l.computeTop(),u=e-c,g=n-d,{origRect:m}=l,y=m.right-m.left,p=m.bottom-m.top;if(u>=0&&u<y&&g>=0&&g<p){let E=o.queryHit(l.isRtl,u,g,y,p);E&&bn(E.dateProfile.activeRange,E.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(u+c-window.scrollX,g+d-window.scrollY)))&&(!i||E.layer>i.layer)&&(E.componentId=a,E.context=o.context,E.rect.left+=c,E.rect.right+=c,E.rect.top+=d,E.rect.bottom+=d,i=E)}}}return i}}function Hn(t,e){return!t&&!e?!0:!!t!=!!e?!1:Gu(t.dateSpan,e.dateSpan)}function mo(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,bp(t,e.dateEnv)),n}function bp(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class wp extends pt{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:s}=this,i=r.origEvent.target;this.component.context.emitter.hasHandlers("dateClick")&&this.component.isValidDateDownEl(i)||s.cancel()},this.handleDragEnd=r=>{let{component:s}=this,{pointer:i}=this.dragging;if(!i.wasTouchScroll){let{initialHit:a,finalHit:o}=this.hitDragging;if(a&&o&&Hn(a,o)){let{context:l}=s,c={...mo(a.dateSpan,l),dayEl:a.getDayEl(),jsEvent:r.origEvent,view:l.viewApi||l.calendarApi.view};l.emitter.trigger("dateClick",c)}}},this.dragging=new Ft(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new Nn(this.dragging,Fr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class Dp extends pt{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=a=>{let{component:o,dragging:l}=this,{options:c}=o.context;c.selectable&&o.isValidDateDownEl(a.origEvent.target)?l.delay=a.isTouch?Cp(o):null:l.cancel()},this.handleDragStart=a=>{this.component.context.calendarApi.unselect(a)},this.handleHitUpdate=(a,o)=>{let{context:l}=this.component,c=null,d=!1;if(a){let u=this.hitDragging.initialHit;a.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,a)||(c=Rp(u,a,l.pluginHooks.dateSelectionTransformers)),(!c||!sp(c,a.dateProfile,l))&&(d=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),d?Ir():Nr(),o||(this.dragSelection=c)},this.handlePointerUp=a=>{this.dragSelection?(Qi(this.dragSelection,a,this.component.context),this.dragSelection=null):this.component.context.emitter.trigger("_noD
1ateSelect")};let{component:n}=e,{options:r}=n.context,s=this.dragging=new Ft(e.el);s.touchScrollAllowed=!1,s.minDistance=r.selectMinDistance||0,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Nn(this.dragging,Fr(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Cp(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Rp(t,e,n){let r=t.dateSpan,s=e.dateSpan,i=[r.range.start,r.range.end,s.range.start,s.range.end];i.sort(Ru);let a={};for(let o of n){let l=o(t,e);if(l===!1)return null;l&&Object.assign(a,l)}return a.range={start:i[0],end:i[3]},a.allDay=r.allDay,a}class zt extends pt{constructor(e){super(e),this.subjectEl=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=a=>{let o=a.origEvent.target,{component:l,dragging:c}=this,{mirror:d}=c,{options:u}=l.context,g=l.context;this.subjectEl=a.subjectEl;let y=(this.eventRange=dt(a.subjectEl)).instance.instanceId;this.relevantEvents=Lr(g.getCurrentData().eventStore,y),c.minDistance=a.isTouch?0:u.eventDragMinDistance,c.delay=a.isTouch&&y!==l.props.eventSelection?xp(l):null,d.parentNode=ba(o),d.revertDuration=u.dragRevertDuration,d.colorScheme=u.colorScheme||"",l.isValidSegDownEl(o)&&!o.closest(`.${f.internalEventResizer}`)?this.isDragging=a.subjectEl.classList.contains(f.internalEventDraggable):c.cancel()},this.handleDragStart=a=>{let o=this.component.context,l=this.eventRange,c=l.instance.instanceId;a.isTouch?c!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(a),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new V(o,l.def,l.instance),jsEvent:a.origEvent,view:o.viewApi}))},this.handleHitUpdate=(a,o)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,d=this.component.context,u=null,g=null,m=null,y=!1,p={affectedEvents:l,mutatedEvents:le(),isEvent:!0};if(a){u=a.context;let E=u.options;d===u||E.editable&&E.droppable?(g=Tp(c,a,this.eventRange.instance.range.start,u.getCurrentData().pluginHooks.eventDragMutationMassagers),g&&(m=Ur(l,u.getCurrentData().eventUiBases,g,u),p.mutatedEvents=m,oo(p,a.dateProfile,u)||(y=!0,g=null,m=null,p.mutatedEvents=le()))):u=null}this.displayDrag(u,p),y?Ir():Nr(),o||(d===u&&Hn(c,a)&&(g=null),this.dragging.setMirrorNeedsRevert(!g),this.dragging.setMirrorIsVisible(!a||!this.subjectEl.getRootNode().querySelector(`.${f.internalEventMirror}`)),this.receivingContext=u,this.validMutation=g,this.mutatedRelevantEvents=m)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=a=>{if(this.isDragging){let o=this.component.context,l=o.viewApi,{receivingContext:c,validMutation:d}=this,u=this.eventRange.def,g=this.eventRange.instance,m=new V(o,u,g),y=this.relevantEvents,p=this.mutatedRelevantEvents,{finalHit:E}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:m,jsEvent:a.origEvent,view:l}),d){if(c===o){let D=new V(o,p.defs[u.defId],g?p.instances[g.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:p});let C={oldEvent:m,event:D,relatedEvents:ze(p,o,g),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:y})}},w={};for(let T of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(w,T(d,o));o.emitter.trigger("eventDrop",{...C,...w,el:a.subjectEl,delta:d.datesDelta,jsEvent:a.origEvent,view:l}),o.emitter.trigger("eventChange",C)}else if(c){let D={event:m,relatedEvents:ze(y,o,g),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:y})}};o.emitter.trigger("eventLeave",{...D,draggedEl:a.subjectEl,view:l}),o.dispatch({type:"REMOVE_EVENTS",eventStore:y}),o.emitter.trigger("eventRemove",D);let C=p.defs[u.defId],w=p.instances[g.instanceId],T=new V(c,C,w);c.dispatch({type:"MERGE_EVENTS",eventStore:p});let x={event:T,relatedEvents:ze(p,c,w),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};c.emitter.trigger("eventAdd",x),a.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:g.instanceId}),c.emitter.trigger("drop",{...mo(E.dateSpan,c),draggedEl:a.subjectEl,jsEvent:a.origEvent,view:E.context.viewApi}),c.emitter.trigger("eventReceive",{...x,draggedEl:a.subjectEl,view:E.context.viewApi})}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};
vendor: 4,727 bytes, line 1
1let{component:n}=this,{options:r}=n.context,s=this.dragging=new Ft(e.el);s.pointer.selector=zt.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Nn(this.dragging,rr);i.useSubjectCenter=e.useEventCenter,i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,s=this.receivingContext;s&&s!==e&&(s===r?s.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:le(),isEvent:!0}}):s.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}zt.SELECTOR=`.${f.internalEventDraggable}, .${f.internalEventResizable}`;function Tp(t,e,n,r){let s=t.dateSpan,i=e.dateSpan,a=s.range.start,o=i.range.start,l={};s.allDay!==i.allDay&&(l.allDay=i.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,i.allDay?a=j(n):a=n);let c=rt(a,o,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);c.milliseconds&&(l.allDay=!1);let d={datesDelta:c,standardProps:l};for(let u of r)u(d,t,e);return d}function xp(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Mp extends pt{constructor(e){super(e),this.draggingSegEl=null,this.draggingEventRange=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=i=>{let{component:a}=this,o=this.querySegEl(i),l=this.eventRange=dt(o);this.dragging.minDistance=a.context.options.eventDragMinDistance,this.component.isValidSegDownEl(i.origEvent.target)&&!(i.isTouch&&this.component.props.eventSelection!==l.instance.instanceId)||this.dragging.cancel()},this.handleDragStart=i=>{let{context:a}=this.component,o=this.eventRange;this.relevantEvents=Lr(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingEventRange=dt(l),a.calendarApi.unselect(),a.emitter.trigger("eventResizeStart",{el:l,event:new V(a,o.def,o.instance),jsEvent:i.origEvent,view:a.viewApi})},this.handleHitUpdate=(i,a,o)=>{let{context:l}=this.component,c=this.relevantEvents,d=this.hitDragging.initialHit,u=this.eventRange.instance,g=null,m=null,y=!1,p={affectedEvents:c,mutatedEvents:le(),isEvent:!0};i&&(i.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,i)||(g=Ip(d,i,o.subjectEl.classList.contains(f.internalEventResizerStart),u.range))),g&&(m=Ur(c,l.getCurrentData().eventUiBases,g,l),p.mutatedEvents=m,oo(p,i.dateProfile,l)||(y=!0,g=null,m=null,p.mutatedEvents=null)),m?l.dispatch({type:"SET_EVENT_RESIZE",state:p}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),y?Ir():Nr(),a||(g&&Hn(d,i)&&(g=null),this.validMutation=g,this.mutatedRelevantEvents=m)},this.handleDragEnd=i=>{let{context:a}=this.component,o=this.eventRange.def,l=this.eventRange.instance,c=new V(a,o,l),d=this.relevantEvents,u=this.mutatedRelevantEvents;if(a.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:i.origEvent,view:a.viewApi}),this.validMutation){let g=new V(a,u.defs[o.defId],l?u.instances[l.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:u});let m={oldEvent:c,event:g,relatedEvents:ze(u,a,l),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:d})}};a.emitter.trigger("eventResize",{...m,el:this.draggingSegEl,startDelta:this.validMutation.startDelta||U(0),endDelta:this.validMutation.endDelta||U(0),jsEvent:i.origEvent,view:a.viewApi}),a.emitter.trigger("eventChange",m)}else a.emitter.trigger("_noEventResize");this.draggingEventRange=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new Ft(e.el);r.pointer.selector=`.${f.internalEventResizer}`,r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let s=this.hitDragging=new Nn(this.dragging,Fr(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return e.subjectEl.closest(`.${f.internalEvent}`)}}function Ip(t,e,n,r){let s=t.context.dateEnv,i=t.dateSpan.range.start,a=e.dateSpan.range.start,o=rt(i,a,s,t.largeUnit);
1if(n){if(s.add(r.start,o)<r.end)return{startDelta:o}}else if(s.add(r.end,o)>r.start)return{endDelta:o};return null}class Np{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let s=this.context.options.unselectCancel,i=wa(r.origEvent);this.matchesCancel=!!i.closest(s),this.matchesEvent=!!i.closest(zt.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:s}=this,{documentPointer:i}=this,a=s.getCurrentData();if(!i.wasTouchScroll){if(a.dateSelection&&!this.isRecentPointerDateSelect){let o=s.options.unselectAuto;o&&(!o||!this.matchesCancel)&&s.calendarApi.unselect(r)}a.eventSelection&&!this.matchesEvent&&s.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new uo(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)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}var Hp={name:"interaction",componentInteractions:[wp,Dp,zt,Mp],calendarInteractions:[Np],elementDraggingImpl:Ft};class Pp extends be{constructor(){super(...arguments),this.state={},this.buildDayTableModel=M(Oa),this.createDayHeaderFormatter=M($r),this.buildDateRowConfig=M(Na),this.titleElRef=I.createRef(),this.tableHeaderElRef=I.createRef(),this.rowHeightRefMap=new ie(()=>{te(this.handleHeights)}),this.slicer=new Yr,this.handleEl=e=>{var r;const{options:n}=this.context;e&&(this.rootEl=e,(r=n.singleMonthDidMount)==null||r.call(n,{el:this.rootEl,...this.renderProps}))},this.handleGridWidth=e=>{this._isUnmounting||this.setState({gridWidth:e})},this.handleHeights=()=>{this._isUnmounting||P(this.props.heightsRef,{titleHeight:this.titleHeight,tableHeaderHeight:this.tableHeaderHeight,rowHeightMap:this.rowHeightRefMap.current,cellRows:this.cellRows})}}get titleId(){return this.context.baseId+"month-"+this.props.isoDateStr}render(){const{props:e,state:n,context:r}=this,{dateProfile:s,forPrint:i}=e,{options:a,dateEnv:o}=r,{borderlessX:l,borderlessTop:c,borderlessBottom:d}=Ee(a),u=this.buildDayTableModel(s,r.dateProfileGenerator,o),g=this.slicer.sliceProps(e,s,a.nextDayThreshold,r,u),m=this.createDayHeaderFormatter(a.dayHeaderFormat,!1,u.colCount),y=this.buildDateRowConfig(u.headerDates,!1,s,e.todayRange,m,r);this.cellRows=u.cellRows;const p=!i&&e.colCount===1,E=!i||e.hasLateralSiblings,D=u.cellRows[0].length,C=n.gridWidth!=null?n.gridWidth/D:void 0,w=C!=null&&C<=jt,T=w||C!=null&&C<=a.dayNarrowWidth,x=n.gridWidth!=null?1/a.aspectRatio*n.gridWidth/6:void 0,N=p?x:void 0,H=p&&x!=null&&n.tableHeaderHeight!=null?x+n.tableHeaderHeight+1:void 0,A=i?[]:g.businessHourSegs,L=i?[]:g.dateSelectionSegs,B=i?null:g.eventDrag,G=i?null:g.eventResize,_=a.navLinks&&e.colCount>1,z={multiMonthColumns:e.colCount||0,isSticky:p,isNarrow:T,hasNavLink:_},Q=e.dateProfile.currentRange.start,$=_?yt(r,Q,"month",e.isoDateStr):{};return h.jsx("div",{role:"listitem",style:{width:e.width},children:h.jsxs("div",{role:"grid","aria-labelledby":this.titleId,"data-date":e.isoDateStr,className:v(b(a.singleMonthClass,{isFirst:e.isFirst,isLast:e.isLast,multiMonthColumns:e.colCount||0}),f.flexCol,e.hasLateralSiblings&&f.breakInsideAvoid),children:[h.jsx(Et,{widthRef:this.handleGridWidth}),h.jsx("div",{id:this.titleId,ref:this.titleElRef,className:v(b(a.singleMonthHeaderClass,z),p&&f.stickyT,f.flexCol),style:{zIndex:p?3:void 0,marginBottom:H},children:h.jsx("div",{...$,className:v(b(a.singleMonthHeaderInnerClass,z),$.className),children:ne(o.formatToParts(Q,e.titleFormat))})}),h.jsxs("div",{className:v(b(a.tableClass,{borderlessX:l,borderlessTop:c,borderlessBottom:d,multiMonthColumns:e.colCount||0}),f.flexCol),style:{marginTop:H!=null?-H:void 0},children:[h.jsxs("div",{ref:this.tableHeaderElRef,className:v(b(a.tableHeaderClass,{isSticky:p,borderlessX:l,borderlessTop:c,borderlessBottom:d,multiMonthColumns:e.colCount||0}),f.flexCol,p&&f.sticky),style:{zIndex:p?2:void 0,top:p?n.titleHeight:0,marginBottom:N},children:[h.jsx(In,{...y,role:"row",borderBottom:!1,cellIsNarrow:T,cellIsMicro:w,rowLevel:0}),h.jsx("div",{className:b(a.dayHeaderDividerClass,{isSticky:p,multiMonthColumns:e.colCount||0,options:{allDaySlot:!!a.allDaySlot}})})]}),h.jsx("div",{className:v(b(a.tableBodyClass,{borderlessX:l,borderlessTop:c,borderlessBottom:
1d,multiMonthColumns:e.colCount||0}),f.flexCol,E&&f.rel),style:{zIndex:p?1:void 0,marginTop:N!=null?-N:void 0,aspectRatio:E?String(a.aspectRatio):void 0},children:h.jsx(Xr,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:u.cellRows,className:E?f.fill:"",forPrint:i&&!e.hasLateralSiblings,dayMaxEventRows:i&&e.hasLateralSiblings?1:!0,fgEventSegs:g.fgEventSegs,bgEventSegs:g.bgEventSegs,businessHourSegs:A,dateSelectionSegs:L,eventDrag:B,eventResize:G,eventSelection:g.eventSelection,visibleWidth:n.gridWidth,cellIsNarrow:T,cellIsMicro:w,rowHeightRefMap:this.rowHeightRefMap})})]})]})})}componentDidMount(){this._isUnmounting=!1,this.disconnectTitleHeight=ut(this.titleElRef.current,e=>{this.setState({titleHeight:this.titleHeight=e}),te(this.handleHeights)}),this.disconnectTableHeaderHeight=ut(this.tableHeaderElRef.current,e=>{this.setState({tableHeaderHeight:this.tableHeaderHeight=e}),te(this.handleHeights)})}componentWillUnmount(){var n;const{options:e}=this.context;this._isUnmounting=!0,this.disconnectTitleHeight(),this.disconnectTableHeaderHeight(),(n=e.singleMonthWillUnmount)==null||n.call(e,{el:this.rootEl,...this.renderProps})}}class kp extends be{constructor(){super(...arguments),this.state={},this.splitDateProfileByMonth=M(Ap),this.buildMonthFormat=M(Up),this.scrollerRef=I.createRef(),this.tilesElRef=I.createRef(),this.scrollState={},this.handleInnerWidth=e=>{this._isUnmounting||this.setState({innerWidth:e})},this.handleScrollStart=()=>{this.scrollState.date=void 0,this.scrollState.top=void 0},this.handleScrollEnd=e=>{const n=this.scrollerRef.current;e&&n&&(this.scrollState.top=n.y,this.scrollState.date=void 0)}}render(){const{context:e,props:n,state:r}=this,{options:s}=e,i=!n.forPrint&&!he(s),a=this.splitDateProfileByMonth(e.dateProfileGenerator,n.dateProfile,e.dateEnv,s.fixedWeekCount,s.showNonCurrentDates),o=this.buildMonthFormat(s.singleMonthTitleFormat,a),{multiMonthMaxColumns:l,singleMonthMinWidth:c}=s,{innerWidth:d}=r;let u,g,m=!1;return d!=null&&(u=Math.max(1,Math.min(l,Math.floor(d/c))),n.forPrint&&(u=Math.min(u,2)),g=Nt(1/u),m=u>1),h.jsx(_t,{unit:"day",children:(y,p)=>h.jsxs(Mn,{viewSpec:e.viewSpec,className:v(!n.forPrint&&f.flexCol,n.className),children:[h.jsx(pe,{vertical:i,className:i?f.liquid:"",ref:this.scrollerRef,children:h.jsx("div",{role:"list",ref:this.tilesElRef,"aria-labelledby":n.labelId,"aria-label":n.labelStr,className:f.safeTiles,children:a.map((E,D)=>{const C=ms(E.currentRange.start);return I.createElement(Pp,{...n,key:C,todayRange:p,isoDateStr:C,titleFormat:o,dateProfile:E,width:g,colCount:u,isFirst:!D,isLast:D===a.length-1,hasLateralSiblings:m})})})}),h.jsx(Et,{widthRef:this.handleInnerWidth})]})})}componentDidMount(){this._isUnmounting=!1,this.scrollState.date=this.props.dateProfile.currentDate,this.scrollerRef.current.addScrollStartListener(this.handleScrollStart),this.scrollerRef.current.addScrollEndListener(this.handleScrollEnd),setTimeout(()=>{this.applyScroll()},0)}componentDidUpdate(e,n){e.dateProfile!==this.props.dateProfile?this.context.options.scrollTimeReset?this.resetScroll():this.applyScroll():n.innerWidth!==this.state.innerWidth&&this.applyScroll()}componentWillUnmount(){this._isUnmounting=!0,this.scrollerRef.current.removeScrollStartListener(this.handleScrollStart),this.scrollerRef.current.removeScrollEndListener(this.handleScrollEnd)}resetScroll(){this.scrollState.date=this.props.dateProfile.currentDate,this.scrollState.top=void 0,this.applyScroll()}applyScroll(){const e=this.scrollerRef.current,n=this.computeScrollTop();e&&n!=null&&e.scrollTo({y:n})}computeScrollTop(){const{scrollState:e}=this;if(e.top!=null)return e.top;if(e.date!=null){const n=this.tilesElRef.current,r=n==null?void 0:n.querySelector(`[data-date="${ms(e.date)}"]`),s=r==null?void 0:r.parentElement;if(n&&s){const i=Math.round(s.getBoundingClientRect().top),a=Math.round(n.getBoundingClientRect().top);return i-a}}}}const Lp=U(1,"month");function Ap(t,e,n,r,s){const{start:i,end:a}=e.currentRange;let o=i;const l=[];for(;o.valueOf()<a.valueOf();){const c=n.add(o,Lp),d={start:t.skipHiddenDays(o),end:t.skipHiddenDays(c,-1,!0)};let u=Ya({currentRange:d,snapToWeek:!0,fixedWeekCount:r,dateEnv:n});u={start:t.skipHiddenDays(u.start),end:t.skipHiddenDays(u.end,-1,!0)};const g=e.activeRange?ke(e.activeRange,s?u:d):null;l.push({currentDate:e.currentDate,isValid:e.isValid,validRange:e.validRange,renderRange:u,activeRange:g,currentRange:d,currentRangeUnit:"month",isRangeAllDay:!0,dateIncrement:e.dateIncrement,slotMinTime:e.slotMaxTime,slotMaxTime:e.slotMinTime}),o=c}return l}const Wp=O({year:"numeric",month:"long"}),Bp=O({month:"long"});function Up(t,e){return t||(e[0].currentRange.start.getUTCFullYear()!==e[e.length-1].currentRange.start.getUTCFullYear()?Wp:Bp)}var _p={name:"multimonth",initialView:"multiMonthYear",views:{multiMonth:{component:kp,dateProfileGeneratorClass:Ga,multiMonthMaxColumns:3,singleMonthMinWidth:350},multiMonthYear:{type:"multiMonth",duration:{years:1},fixedWeekCount:!0,showNonCurrentDates:!1}}};const Op="fc-forma-5Kh fc-forma-HHp fc-forma-La2";function ri(){return de.createElement(qo,{className:"fc-forma-AAt"})}
1function si(){return de.createElement(Zo,{className:"fc-forma-AAt"})}function jp(){return de.createElement($o,{sx:{fontSize:18,margin:"1px"},className:Op})}const Fp="fc-forma-bAU",Kt="fc-forma-Tid",Fn="fc-forma-fKI",zp="fc-forma-bzG",Qt="fc-forma-p95",Vp="fc-forma-lS3",Gp="fc-forma-iWk",Yp="fc-forma-fEn",qp="fc-forma-XCy",Zp="fc-forma-WPX",$p="fc-forma-kup",Xp="fc-forma-5V9",Kp=`${Xp} ${Yp} ${Vp}`,ts="fc-forma-VxY",po="fc-forma-znR",Qp=`${ts} ${qp} ${Gp}`,Oe=`${po} ${Zp} ${$p}`,Jt="fc-forma-IKt",vo="fc-forma-OSb fc-forma-Yus",Jp=`${vo} fc-forma-VzK fc-forma-Fmz`,yo="fc-forma-ZCt",ev=v(yo,"fc-forma-Jvb","fc-forma-S89"),So="fc-forma-v3L",tv=v(So,"fc-forma-hi1","fc-forma-W36"),me="fc-forma-HRt",Eo="fc-forma-YA2 fc-forma-C9h fc-forma-ZkV",ii=`${Eo} fc-forma-8ZZ fc-forma-1lj`,ai=`${Eo} fc-forma-xX5 fc-forma-433`,bo="fc-forma-YA2 fc-forma-tEU fc-forma-UZp fc-forma-qvz fc-forma-IdG fc-forma-Y27",oi=`${bo} fc-forma-if4 fc-forma-NN9`,li=`${bo} fc-forma-Z2g fc-forma-RWU`,nv="fc-forma-DLQ",ci=t=>v(!t.isNarrow&&"fc-forma-WoG"),di=t=>v("fc-forma-UZp fc-forma-G56",t.isMinor&&"fc-forma-M5N"),zn={listItemEventClass:t=>v("fc-forma-mwm fc-forma-df6 fc-forma-dpa",t.isNarrow?"fc-forma-6gf":"fc-forma-qK4",t.isSelected?ts:t.isInteractive?Oe:po),listItemEventBeforeClass:t=>v("fc-forma-PrA fc-forma-qvz fc-forma-IdG",t.isNarrow?"fc-forma-GSF":"fc-forma-fpO"),listItemEventInnerClass:t=>t.isNarrow?`fc-forma-h2r ${me}`:"fc-forma-vvo fc-forma-17F",listItemEventTimeClass:t=>v(t.isNarrow?"fc-forma-qNU":"fc-forma-I6e","fc-forma-JTJ fc-forma-O5O fc-forma-qbn"),listItemEventTitleClass:t=>v(t.isNarrow?"fc-forma-55Y":"fc-forma-qB7","fc-forma-Kw3 fc-forma-JTJ fc-forma-O5O fc-forma-nGI"),rowEventClass:t=>v(t.isEnd&&(t.isNarrow?"fc-forma-bpq":"fc-forma-Jha")),rowEventInnerClass:t=>t.isNarrow?"fc-forma-h2r":"fc-forma-vvo",rowMoreLinkClass:t=>v("fc-forma-mwm fc-forma-UZp fc-forma-dpa",t.isNarrow?"fc-forma-6gf fc-forma-R95":"fc-forma-qK4 fc-forma-lqW fc-forma-rK9",Oe),rowMoreLinkInnerClass:t=>t.isNarrow?`fc-forma-55Y fc-forma-h2r ${me}`:"fc-forma-qB7 fc-forma-vvo fc-forma-17F"};function rv({views:t,...e}){return de.createElement(rg,{className:"fc-forma-OW4",eventShortHeight:50,eventColor:"var(--mui-palette-primary-main)",eventContrastColor:"var(--mui-palette-primary-contrastText)",eventClass:n=>v(n.isDragging&&"fc-forma-OW4",n.event.url&&"fc-forma-iUM",n.isSelected?v(Fp,n.isDragging&&"fc-forma-ACR"):Kt,Qt),backgroundEventColor:"var(--mui-palette-secondary-main)",backgroundEventClass:"fc-forma-TEw fc-forma-xpM fc-forma-iVS",backgroundEventTitleClass:n=>v("fc-forma-F6C fc-forma-dra",n.isNarrow?`fc-forma-xbC ${me}`:"fc-forma-aS8 fc-forma-17F"),listItemEventClass:"fc-forma-gfU",listItemEventInnerClass:"fc-forma-HBk fc-forma-Hhr fc-forma-uEy fc-forma-gfU",blockEventClass:n=>v(`fc-forma-ytQ fc-forma-vPs fc-forma-qvz fc-forma-82y ${Fn}`,n.isInteractive?ev:yo,n.isDragging&&!n.isSelected&&"fc-forma-0HG"),blockEventTimeClass:"fc-forma-JTJ fc-forma-O5O fc-forma-qbn",blockEventTitleClass:"fc-forma-JTJ fc-forma-O5O fc-forma-nGI",rowEventClass:n=>v("fc-forma-mwm fc-forma-01w fc-forma-ur4 fc-forma-gfU",n.isStart&&"fc-forma-FgQ fc-forma-fdR",n.isEnd&&"fc-forma-EHb fc-forma-7EV fc-forma-Ea4"),rowEventBeforeClass:n=>v(n.isStartResizable?v(n.isSelected?oi:ii,"fc-forma-x0Q"):!n.isStart&&!n.isNarrow&&"fc-forma-fpO fc-forma-tEU fc-forma-kP8 fc-forma-ZLU fc-forma-crG fc-forma-Edw fc-forma-mGk"),rowEventAfterClass:n=>v(n.isEndResizable?v(n.isSelected?oi:ii,"fc-forma-8rg"):!n.isEnd&&!n.isNarrow&&"fc-forma-hCF fc-forma-tEU fc-forma-kP8 fc-forma-fMn fc-forma-crG fc-forma-SBP fc-forma-uuE"),rowEventInnerClass:n=>v("fc-forma-Hhr fc-forma-uEy fc-forma-gfU",n.isNarrow?me:"fc-forma-17F"),rowEventTimeClass:n=>v("fc-forma-kIZ",n.isNarrow?"fc-forma-qNU":"fc-forma-I6e"),rowEventTitleClass:n=>v(n.isNarrow?"fc-forma-55Y":"fc-forma-qB7"),columnEventClass:n=>v("fc-forma-FgQ fc-forma-EHb fc-forma-7EV fc-forma-z3l fc-forma-bLM",n.isStart&&"fc-forma-Bgy fc-forma-cQB fc-forma-ugX",n.isEnd&&"fc-forma-mwm fc-forma-mGy fc-forma-gjk fc-forma-7zG"),columnEventBeforeClass:n=>v(n.isStartResizable&&v(n.isSelected?li:ai,"fc-forma-f4s")),columnEventAfterClass:n=>v(n.isEndResizable&&v(n.isSelected?li:ai,"fc-forma-I8n")),columnEventInnerClass:n=>
1v("fc-forma-Hhr",n.isShort?"fc-forma-uEy fc-forma-gfU fc-forma-xbC fc-forma-RVT":v("fc-forma-bXY",n.isNarrow?"fc-forma-55Y":"fc-forma-qB7")),columnEventTimeClass:n=>v(!n.isShort&&(n.isNarrow?"fc-forma-zvv":"fc-forma-q8O"),me),columnEventTitleClass:n=>v(!n.isShort&&(n.isNarrow?"fc-forma-vvo":"fc-forma-ztx"),n.isShort||n.isNarrow?me:"fc-forma-17F"),moreLinkClass:`${Kt} ${Qt}`,moreLinkInnerClass:"fc-forma-JTJ fc-forma-O5O",columnMoreLinkClass:`fc-forma-mwm fc-forma-UZp fc-forma-lqW fc-forma-ePV fc-forma-dpa ${Kp} fc-forma-82y fc-forma-z3l fc-forma-bLM ${Fn}`,columnMoreLinkInnerClass:n=>n.isNarrow?`fc-forma-KbZ ${me}`:"fc-forma-xbC fc-forma-17F",dayHeaderAlign:n=>n.isNarrow?"center":"start",dayHeaderClass:n=>v("fc-forma-a65",n.isToday&&!n.level&&"fc-forma-vPs",n.isDisabled&&Jt,n.inPopover?"fc-forma-QTT fc-forma-G56":v(n.isMajor?"fc-forma-UZp fc-forma-I55":!n.isNarrow&&"fc-forma-UZp fc-forma-G56")),dayHeaderInnerClass:n=>v(n.isToday&&n.level&&"fc-forma-vPs","fc-forma-aS8 fc-forma-Hhr fc-forma-bXY",n.hasNavLink&&v(Oe,zp)),dayHeaderContent:n=>de.createElement(de.Fragment,null,n.isToday&&de.createElement("div",{className:"fc-forma-YA2 fc-forma-pPI fc-forma-xX5 fc-forma-l1Q fc-forma-R95 fc-forma-CT3"}),n.dayNumberText&&de.createElement("div",{className:v(n.isToday&&"fc-forma-Kw3",n.isNarrow?"fc-forma-PuF":"fc-forma-7Kt")},n.dayNumberText),n.weekdayText&&de.createElement("div",{className:"fc-forma-17F"},n.weekdayText)),dayCellClass:n=>v("fc-forma-UZp",n.isMajor?"fc-forma-I55":"fc-forma-G56",(n.isOther||n.isDisabled)&&!n.options.businessHours&&Jt),dayCellTopClass:n=>v(n.isNarrow?"fc-forma-WoG":"fc-forma-s9U","fc-forma-Hhr fc-forma-uEy",(n.isOther||n.isDisabled)&&n.options.businessHours&&"fc-forma-x07"),dayCellTopInnerClass:n=>v("fc-forma-Hhr fc-forma-uEy fc-forma-gfU fc-forma-a65 fc-forma-JTJ",n.isNarrow?`fc-forma-8in fc-forma-cL9 ${me}`:"fc-forma-19X fc-forma-6U1 fc-forma-gEy",n.isToday?v("fc-forma-IdG",n.isNarrow?"fc-forma-9ZR":"fc-forma-fpO",n.text===n.dayNumberText?n.isNarrow?"fc-forma-CSa":"fc-forma-IdL":n.isNarrow?"fc-forma-qB7":"fc-forma-ybQ",n.hasNavLink?v(Jp,Fn):vo):v("fc-forma-Ea4",n.isNarrow?"fc-forma-qB7":"fc-forma-ybQ",n.hasNavLink&&Oe),n.monthText&&"fc-forma-Kw3"),dayCellInnerClass:n=>v(n.inPopover&&"fc-forma-aS8"),popoverFormat:{day:"numeric",weekday:"long"},popoverClass:"fc-forma-HBk fc-forma-Y27 fc-forma-DC1 fc-forma-8Kl fc-forma-O5O fc-forma-uPX fc-forma-c0k fc-forma-nhl fc-forma-OW4",popoverCloseClass:`fc-forma-ytQ fc-forma-YA2 fc-forma-CdJ fc-forma-OPI fc-forma-xbC fc-forma-dpa ${Oe} ${Kt} ${Qt} fc-forma-om0`,popoverCloseContent:()=>de.createElement(jp,null),dayLaneClass:n=>v("fc-forma-UZp",n.isMajor?"fc-forma-I55":"fc-forma-G56",n.isDisabled&&Jt),dayLaneInnerClass:n=>n.isStack?"fc-forma-JQD":n.isNarrow?"fc-forma-6gf":"fc-forma-GSF fc-forma-Dk5",slotLaneClass:di,listDayClass:n=>v(!n.isLast&&"fc-forma-QTT fc-forma-G56","fc-forma-Hhr fc-forma-uEy fc-forma-lUe"),listDayHeaderClass:n=>v("fc-forma-yvz fc-forma-m2e fc-forma-cHr fc-forma-kHK fc-forma-Hhr fc-forma-bXY fc-forma-lUe",n.isToday&&"fc-forma-4Ki fc-forma-R95"),listDayHeaderInnerClass:n=>v("fc-forma-kOE",n.level?"fc-forma-17F":v("fc-forma-7Kt thg-list-day-name",n.isToday&&"fc-forma-Kw3"),n.hasNavLink&&"fc-forma-jaW"),listDayBodyClass:"fc-forma-oee fc-forma-qbd fc-forma-fIh fc-forma-rc8",singleMonthClass:n=>v(n.multiMonthColumns>1&&"fc-forma-tZ3",n.multiMonthColumns===1&&!n.isLast&&"fc-forma-G56 fc-forma-QTT"),singleMonthHeaderClass:n=>v(n.multiMonthColumns>1?"fc-forma-LbL":"fc-forma-KyB fc-forma-QTT fc-forma-G56 fc-forma-Y27","fc-forma-gfU"),singleMonthHeaderInnerClass:n=>v("fc-forma-qB7 fc-forma-dpa fc-forma-Kw3",n.hasNavLink&&Oe,n.isNarrow?"fc-forma-PuF":"fc-forma-7Kt"),tableHeaderClass:"fc-forma-Y27",fillerClass:"fc-forma-UZp fc-forma-G56 fc-forma-F6C",dayNarrowWidth:100,dayHeaderRowClass:"fc-forma-UZp fc-forma-G56",dayRowClass:"fc-forma-UZp fc-forma-G56",slotHeaderRowClass:"fc-forma-UZp fc-forma-G56",slotHeaderClass:di,navLinkClass:`${Kt} ${Qt}`,inlineWeekNumberClass:n=>v("fc-forma-YA2 fc-forma-MS6 fc-forma-JTJ fc-forma-fdR",n.isNarrow?`fc-forma-RWe fc-forma-8in fc-forma-KbZ ${me}`:"fc-forma-CdJ fc-forma-xbC fc-forma-17F",n.hasNavLink?Qp:ts),nonBusinessHoursClass:Jt,highlightClass:"fc-forma-gKu",nowIndicatorLineClass:"fc-forma-7VH fc-forma-v0S fc-forma-R3n",nowIndicatorDotClass:"fc-forma-xny fc-forma-uDX fc-forma-R3n fc-forma-UmK fc-forma-IdG fc-forma-fo8 fc-forma-bLM",views:{...t,dayGrid:{...zn,dayHeaderDividerClass:"fc-forma-QTT fc-forma-G56",dayCellBottomClass:ci,backgroundEventInnerClass:"fc-forma-Hhr fc-forma-u
1Ey fc-forma-RhI",...t==null?void 0:t.dayGrid},dayGridMonth:{dayHeaderFormat:{weekday:"long"},...t==null?void 0:t.dayGridMonth},multiMonth:{...zn,dayHeaderDividerClass:n=>v(n.multiMonthColumns===1&&"fc-forma-QTT fc-forma-G56"),dayCellBottomClass:ci,dayHeaderInnerClass:n=>v(n.isNarrow&&"fc-forma-Znt"),tableBodyClass:n=>v(n.multiMonthColumns>1&&"fc-forma-UZp fc-forma-G56 fc-forma-dpa fc-forma-O5O"),...t==null?void 0:t.multiMonth},timeGrid:{...zn,dayHeaderDividerClass:"fc-forma-QTT fc-forma-G56",dayCellBottomClass:nv,dayHeaderAlign:"start",weekNumberHeaderClass:"fc-forma-lU0 fc-forma-RhI",weekNumberHeaderInnerClass:n=>v("fc-forma-JQD fc-forma-xbC fc-forma-dpa fc-forma-17F",n.hasNavLink&&Oe),allDayHeaderClass:"fc-forma-gfU fc-forma-RhI",allDayHeaderInnerClass:n=>v("fc-forma-c0k fc-forma-XMF",n.isNarrow?me:"fc-forma-17F"),allDayDividerClass:"fc-forma-QTT fc-forma-G56",slotHeaderClass:"fc-forma-RhI",slotHeaderInnerClass:n=>v("fc-forma-c0k",n.isNarrow?me:"fc-forma-17F"),slotHeaderDividerClass:"fc-forma-EWl fc-forma-G56",...t==null?void 0:t.timeGrid},list:{listItemEventClass:n=>v("fc-forma-ytQ fc-forma-FgQ fc-forma-qvz fc-forma-kHK fc-forma-dpa",n.isInteractive?tv:So),listItemEventInnerClass:"fc-forma-ODb fc-forma-gEy",listItemEventTimeClass:"fc-forma-yvz fc-forma-8Ko fc-forma-cHr fc-forma-JTJ fc-forma-O5O fc-forma-yGY",listItemEventTitleClass:n=>v("fc-forma-oee fc-forma-qbd fc-forma-JTJ fc-forma-O5O fc-forma-RKK",n.event.url&&"fc-forma-YdZ"),noEventsClass:"fc-forma-oee fc-forma-Hhr fc-forma-bXY fc-forma-gfU fc-forma-a65",noEventsInnerClass:"fc-forma-UyD",...t==null?void 0:t.list}},...e})}const sv=[qa,Gm,np,Hp,_p],iv=["dayGridMonth","timeGridWeek","timeGridDay","listMonth","multiMonthYear"],av="timeGridDay",ov="timeGridWeek",lv={dayGridMonth:"Month",listMonth:"List",multiMonthYear:"Year"};function wo({controller:t,availableViews:e,addButton:n,...r}){"use no memo";var o,l,c,d;const s=t.getButtonState(),i=((o=t.view)==null?void 0:o.type)??e[0],a=u=>{var g;return lv[u]??((g=s[u])==null?void 0:g.text)??u};return ae(Se,{...r,children:[ae(hi,{direction:"row",spacing:.5,alignItems:"center",sx:{display:{xs:"flex",sm:"none"}},children:[ae(Se,{sx:{display:"flex",alignItems:"center"},children:[k(Dt,{onClick:()=>t.prev(),disabled:s.prev.isDisabled,"aria-label":s.prev.hint,children:k(ri,{})}),k(Dt,{onClick:()=>t.next(),disabled:s.next.isDisabled,"aria-label":s.next.hint,children:k(si,{})})]}),k(Ct,{variant:"subtitle1",noWrap:!0,sx:{flex:1,minWidth:0,fontWeight:600},children:(l=t.view)==null?void 0:l.title}),k(Lo,{size:"small",value:i,onChange:u=>t.changeView(u.target.value),sx:{flexShrink:0,fontSize:"0.875rem"},children:e.map(u=>k(ko,{value:u,children:a(u)},u))})]}),ae(Se,{sx:{display:{xs:"none",sm:"flex"},flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:1},children:[ae(Se,{sx:{display:"flex",flexShrink:0,alignItems:"center",gap:1},children:[n&&k(xt,{onClick:n.click,"aria-label":n.hint,variant:n.isPrimary===!1?"outlined":"contained",children:n.text}),k(xt,{onClick:()=>t.today(),"aria-label":s.today.hint,variant:"outlined",children:s.today.text}),ae(Se,{sx:{display:"flex",alignItems:"center"},children:[k(Dt,{onClick:()=>t.prev(),disabled:s.prev.isDisabled,"aria-label":s.prev.hint,children:k(ri,{})}),k(Dt,{onClick:()=>t.next(),disabled:s.next.isDisabled,"aria-label":s.next.hint,children:k(si,{})})]}),k(Ct,{variant:"h5",children:(c=t.view)==null?void 0:c.title})]}),k(Wo,{size:"small",exclusive:!0,value:(d=t.view)==null?void 0:d.type,onChange:(u,g)=>{g&&t.changeView(g)},children:e.map(u=>{var g;return k(Ao,{value:u,"aria-label":(g=s[u])==null?void 0:g.hint,color:"primary",sx:{px:2},children:a(u)},u)})})]})]})}wo.propTypes={controller:se.object.isRequired,availableViews:se.array.isRequired,addButton:se.object};function Do({availableViews:t=iv,addButton:e,className:n,height:r,contentHeight:s,direction:i,plugins:a=[],...o}){"use no memo";const l=og(),c=r==="auto"||s==="auto",d=!(o.borderlessX??o.borderless),u=!(o.borderlessTop??o.borderless),g=!(o.borderlessBottom??o.borderless);return ae(Se,{dir:i==="rtl"?"rtl":void 0,className:n,sx:m=>({display:"flex",flexDirection:"column",height:r,bgcolor:"background.paper",borderStyle:"solid",borderColor:"divider",borderLeftWidth:d?1:0,borderRightWidth:d?1:0,borderTopWidth:u?1:0,borderBottomWidth:g?1:0,...u&&d&&{borderTopLeftRadius:m.shape.borderRadius*2,borderTopRightRadius:m.shape.borderRadius*2},...g&&d&&{borderBottomLeftRadius:m.shape.borderRadius*2,borderBottomRightRadius:m.shape.borderRadius*2},...d&&u&&g&&{boxShadow:Xo(m).boxShadow},overflow:c?void 0:"hidden","& .thg-list-day-name":{fontSize:"1rem !important"}}),children:[k(wo,{sx:{padding:1.5,borderBottom:"1px solid",borderColor:"divider"},controller:l,availableViews:t,addButton:e}),k(Se,{sx:{flexGrow:1,minHeight:0},children:k(rv,{height:c?"auto":r!==void 0?"100%":s,initialView:t[0],navLinkDayClick:av,navLinkWeekClick:ov,controller:l,plugins:[...sv,...a],...o})})]})}Do.propTypes={availableViews:se.array,addButton:se.object,className:se.string,height:se.oneOfType([se.string,se.number]),contentHeight:se.oneOfType([se.string,se.number]),direction:se.string,plugins:se.array};Co.propTypes={open:se.bool,onClose:se.func,teamId:se.number};function Co(t){var T;const e=ui.c(28),{open:n,onClose:r,teamId:s}=t,{enqueueSnackbar:i}=Ro();let a;e[0]!==s?(a=["calendar_feed_url",s],e[0]=s,e[1]=a):a=e[1];const o=n&&!!s;let l;e[2]!==s?(l=async()=>{const{data:x}=await Mo.get(`/teams/${s}/calendar_feed`);return x},e[2]=s,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==o||e[6]!==l?(c={queryKey:a,enabled:o,retry:!1,queryFn:l},e[4]=a,e[5]=o,e[6]=l,e[7]=c):c=e[7];const d=To(c),u=(T=d.data)==null?void 0:T.url;let g;e[8]!==i||e[9]!==u?(g=async()=>{try{await navigator.clipboard.writeText(u),i("Link copied",{variant:"success"})}catch{i("Couldn't copy. Select the link manually.",{variant:"error"})}},e[8]=i,e[9]=u,e[10]=g):g=e[10];const m=g;let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=k(jo,{children:"Subscribe to Calendar"}),e[11]=y):y=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=k(Ct,{variant:"body2",sx:{color:"text.secondary",mb:2},children:"Add the team calendar to your own calendar app. Events stay up to date automatically."}),e[12]=p):p=e[12];let E;e[13]!==m||e[14]!==d.error||e[15]!==d.isError||e[16]!==d.isPending||e[17]!==n||e[18]!==u?(E=ae(Oo,{children:[p,d.isPending&&n?k(Se,{sx:{textAlign:"center",py:2},children:k(Bo,{size:24})}):d.isError?k(Ct,{variant:"body2",sx:{color:"error.main"},children:fi.printError(d.error)}):ae(xo,{children:[k(Uo,{fullWidth:!0,size:"small",value:u??"",slotProps:{htmlInput:{readOnly:!0}
1,input:{endAdornment:k(_o,{title:"Copy link",children:k(Dt,{onClick:m,edge:"end",children:k(Vn,{icon:"eva:copy-outline"})})})}},onFocus:cv}),ae(Ct,{variant:"caption",sx:{color:"text.secondary",display:"block",mt:1.5},children:["Google Calendar: Settings â Add calendar â From URL.",k("br",{}),"Apple Calendar: File â New Calendar Subscription."]})]})]}),e[13]=m,e[14]=d.error,e[15]=d.isError,e[16]=d.isPending,e[17]=n,e[18]=u,e[19]=E):E=e[19];let D;e[20]===Symbol.for("react.memo_cache_sentinel")?(D={boxShadow:0},e[20]=D):D=e[20];let C;e[21]!==r?(C=k(Fo,{children:k(xt,{onClick:r,color:"inherit",variant:"outlined",sx:D,children:"Close"})}),e[21]=r,e[22]=C):C=e[22];let w;return e[23]!==r||e[24]!==n||e[25]!==C||e[26]!==E?(w=ae(zo,{fullWidth:!0,maxWidth:"xs",open:n,onClose:r,children:[y,E,C]}),e[23]=r,e[24]=n,e[25]=C,e[26]=E,e[27]=w):w=e[27],w}function cv(t){return t.target.select()}const dv=["dayGridMonth","listMonth","multiMonthYear"];function ES(){const t=ui.c(61),{themeStretch:e}=Io(),[n,r]=No(),s=Ho(hv),[i,a]=I.useState(null),[o,l]=I.useState(null),[c,d]=I.useState(!1),[u,g]=I.useState(!1),[m,y]=I.useState(null);let p,E;t[0]!==n||t[1]!==r?(p=()=>{const Ce=n.get("event");Ce&&(l(Number(Ce)),r(fv,{replace:!0}))},E=[n,r],t[0]=n,t[1]=r,t[2]=p,t[3]=E):(p=t[2],E=t[3]),I.useEffect(p,E);const D=Po(s),C=i==null?void 0:i.from,w=i==null?void 0:i.to;let T;t[4]!==C||t[5]!==w||t[6]!==s?(T={teamId:s,from:C,to:w},t[4]=C,t[5]=w,t[6]=s,t[7]=T):T=t[7];const x=Jo(T);let N;t[8]!==x.data?(N=x.data??[],t[8]=x.data,t[9]=N):N=t[9];let H;t[10]!==N?(H=N.map(uv),t[10]=N,t[11]=H):H=t[11];const A=H;let L;t[12]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{y(null),d(!0)},t[12]=L):L=t[12];const B=L,G=e?!1:"xl";let _;t[13]===Symbol.for("react.memo_cache_sentinel")?(_=k(xt,{size:"medium",variant:"outlined",startIcon:k(Vn,{icon:"eva:link-2-outline"}),onClick:()=>g(!0),children:"Subscribe"}),t[13]=_):_=t[13];let z;t[14]!==D?(z=D&&k(xt,{size:"medium",variant:"contained",startIcon:k(Vn,{icon:"eva:plus-fill"}),onClick:B,children:"Add Event"}),t[14]=D,t[15]=z):z=t[15];let Q;t[16]!==z?(Q=k(Qo,{heading:"Calendar",action:ae(hi,{direction:"row",spacing:1,children:[_,z]})}),t[16]=z,t[17]=Q):Q=t[17];let $;t[18]!==s?($=k(el,{teamId:s}),t[18]=s,t[19]=$):$=t[19];let q;t[20]===Symbol.for("react.memo_cache_sentinel")?(q={'& [role="button"]':{cursor:"pointer"},"& .event-cancelled":{opacity:.6,textDecoration:"line-through"}},t[20]=q):q=t[20];let X;t[21]!==x.error||t[22]!==x.isError?(X=x.isError&&k(Vo,{severity:"error",sx:{mb:2},children:fi.printError(x.error)}),t[21]=x.error,t[22]=x.isError,t[23]=X):X=t[23];let J;t[24]===Symbol.for("react.memo_cache_sentinel")?(J={height:3,mb:"-3px",position:"relative",zIndex:1},t[24]=J):J=t[24];let Z;t[25]!==x.isFetching?(Z=x.isFetching&&k(Go,{sx:{height:3}}),t[25]=x.isFetching,t[26]=Z):Z=t[26];let ge;t[27]!==Z?(ge=k(Se,{sx:J,children:Z}),t[27]=Z,t[28]=ge):ge=t[28];let ce,we,Be;t[29]===Symbol.for("react.memo_cache_sentinel")?(ce={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"},we=Ce=>{a({from:ns(Ce.start),to:ns(Ce.end)})},Be=Ce=>{l(Number(Ce.event.id))},t[29]=ce,t[30]=we,t[31]=Be):(ce=t[29],we=t[30],Be=t[31]);let De;t[32]!==A?(De=k(Do,{availableViews:dv,events:A,height:"auto",firstDay:1,dayMaxEventRows:3,eventTimeFormat:ce,datesSet:we,eventClick:Be}),t[32]=A,t[33]=De):De=t[33];let ye;t[34]!==X||t[35]!==ge||t[36]!==De?(ye=ae(Se,{sx:q,children:[X,ge,De]}),t[34]=X,t[35]=ge,t[36]=De,t[37]=ye):ye=t[37];const Ke=o!=null;let Ue;t[38]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>l(null),t[38]=Ue):Ue=t[38];let re;t[39]===Symbol.for("react.memo_cache_sentinel")?(re=Ce=>{y(Ce),d(!0)},t[39]=re):re=t[39];let Y;t[40]!==o||t[41]!==Ke||t[42]!==s?(Y=k(nl,{open:Ke,onClose:Ue,teamId:s,eventId:o,onEdit:re}),t[40]=o,t[41]=Ke,t[42]=s,t[43]=Y):Y=t[43];let Vt;t[44]===Symbol.for("react.memo_cache_sentinel")?(Vt=()=>d(!1),t[44]=Vt):Vt=t[44];let Qe;t[45]!==m||t[46]!==c||t[47]!==s?(Qe=k(tl,{open:c,onClose:Vt,teamId:s,event:m}),t[45]=m,t[46]=c,t[47]=s,t[48]=Qe):Qe=t[48];let Gt;t[49]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>g(!1),t[49]=Gt):Gt=t[49];let Je;t[50]!==u||t[51]!==s?(Je=k(Co,{open:u,onClose:Gt,teamId:s}),t[50]=u,t[51]=s,t[52]=Je):Je=t[52];let Yt;return t[53]!==Q||t[54]!==$||t[55]!==ye||t[56]!==Y||t[57]!==Qe||t[58]!==Je||t[59]!==G?(Yt=k(Ko,{title:"Calendar",children:ae(Yo,{maxWidth:G,children:[Q,$,ye,Y,Qe,Je]})}),t[53]=Q,t[54]=$,t[55]=ye,t[56]=Y,t[57]=Qe,t[58]=Je,t[59]=G,t[60]=Yt):Yt=t[60],Yt}function uv(t){return{id:String(t.event_id),title:t.title,start:t.start_datetime.replace(" ","T"),end:t.end_datetime.replace(" ","T"),color:t.cancelled?"#9e9e9e":rl(t.type),classNames:t.cancelled?["event-cancelled"]:[]}}function fv(t){const e=new URLSearchParams(t);return e.delete("event"),e}function hv(t){return t==null?void 0:t.reduxUser.selectedTeamId}export{ES as default}; 2//# sourceMappingURL=TeamCalendarPage-DOV9gx71.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.