@remit/web-client-dist 0.0.489 → 0.0.490

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/assets/{BriefPane-GKsxsmIt.js → BriefPane-Chh89Ls8.js} +1 -1
  2. package/assets/{CalendarComposePane-agoL1ns0.js → CalendarComposePane-B0ESup6A.js} +1 -1
  3. package/assets/{CalendarComposeSeed-Ru12tqux.js → CalendarComposeSeed-BuYpzJin.js} +1 -1
  4. package/assets/{CalendarShell-DMvRHN83.js → CalendarShell-B4Ev9evX.js} +1 -1
  5. package/assets/{EmptyState-DbhUEdf0.js → EmptyState-BxLeI5a7.js} +1 -1
  6. package/assets/{ErrorState-CcskHvYA.js → ErrorState-B16NlU7u.js} +1 -1
  7. package/assets/{FlaggedPane-DdBU5qXP.js → FlaggedPane-Dz6az4Ch.js} +1 -1
  8. package/assets/{FullCompose-BOzKHIWH.js → FullCompose-CKDKSEUF.js} +1 -1
  9. package/assets/{MailListHeader-B2Ptcy5T.js → MailListHeader-CxqJgX-k.js} +1 -1
  10. package/assets/{MailNav-zQ-2drnE.js → MailNav-54pF4-Wf.js} +1 -1
  11. package/assets/{MailShell-BjMK7Xnl.js → MailShell-DA_4KXyC.js} +1 -1
  12. package/assets/{MailViewChrome-Ct8l-wD4.js → MailViewChrome-BDmv5d9y.js} +1 -1
  13. package/assets/{MailboxPane-UuE1GnYv.js → MailboxPane-Cot-E3G4.js} +1 -1
  14. package/assets/{NavMenuButton-O5EMAZfL.js → NavMenuButton-FBbQvMN0.js} +1 -1
  15. package/assets/{OnboardingWizard-BJ00yeFD.js → OnboardingWizard-BuifJm-8.js} +1 -1
  16. package/assets/OpenCalendarEvent-BcgQLU8V.js +2 -0
  17. package/assets/{OutboxPane-DnmR4ilE.js → OutboxPane-BUzXwXuC.js} +1 -1
  18. package/assets/_calendarObjectId-mny-4EXP.js +1 -0
  19. package/assets/_mailboxId-DSVCDMo4.js +1 -0
  20. package/assets/_messageId-BGcgfODq.js +1 -0
  21. package/assets/_messageId-DYefqN3E.js +1 -0
  22. package/assets/_messageId-DhbKo3B6.js +1 -0
  23. package/assets/_outboxMessageId-CtUxM86V.js +1 -0
  24. package/assets/_recurrenceId-CG1uEnuq.js +1 -0
  25. package/assets/_threadId-BuNYV3q0.js +1 -0
  26. package/assets/_threadId-D4jC1uwj.js +1 -0
  27. package/assets/_threadId-owspbibg.js +1 -0
  28. package/assets/_view._date-W-1Y9W21.js +1 -0
  29. package/assets/{accounts-CWc1-aEx.js → accounts--qzTAuMz.js} +1 -1
  30. package/assets/{advanced-xjzZgyye.js → advanced-BCOHYqWC.js} +1 -1
  31. package/assets/{appearance-QAJxDwiO.js → appearance-B_BCHiNs.js} +1 -1
  32. package/assets/{attachment-file-DeNsnSqQ.js → attachment-file-vWrTKKNW.js} +1 -1
  33. package/assets/{avatar-Du_muwOj.js → avatar-BxToBov5.js} +1 -1
  34. package/assets/{bottom-sheet-BS756-KS.js → bottom-sheet-BVBJeXZ0.js} +1 -1
  35. package/assets/{brief-hpmfWjHw.js → brief-1IhifgBt.js} +1 -1
  36. package/assets/brief-D6axyIWt.js +1 -0
  37. package/assets/{browser-ponyfill-CPjvsOlN.js → browser-ponyfill-C_e5y55O.js} +1 -1
  38. package/assets/{bug-Btp8x95y.js → bug-B_S4InDq.js} +1 -1
  39. package/assets/{calendar-Cm5OlCq0.js → calendar-Cxa7ah-g.js} +1 -1
  40. package/assets/{calendar-days-M0oLf7Pt.js → calendar-days-CPA8pt11.js} +1 -1
  41. package/assets/{card-BHsMslso.js → card-CQW-PX25.js} +1 -1
  42. package/assets/chevron-left-ywps-Gyo.js +1 -0
  43. package/assets/{circle-check-Ci5U4ND7.js → circle-check-BkneSfe9.js} +1 -1
  44. package/assets/{circle-check-big-BvKLZUBR.js → circle-check-big-Dge9pLwP.js} +1 -1
  45. package/assets/{circle-help-5cJ6ehph.js → circle-help-BIrTTaE1.js} +1 -1
  46. package/assets/{clock-DR_uD23l.js → clock-jA6Z_hAe.js} +1 -1
  47. package/assets/compose._-_outboxMessageId_-BsmyGcLW.js +1 -0
  48. package/assets/compose._-_outboxMessageId_-CWb5oqtG.js +1 -0
  49. package/assets/compose._-_outboxMessageId_-Cz4sST6-.js +1 -0
  50. package/assets/compose._-_outboxMessageId_-ON1pjxCP.js +1 -0
  51. package/assets/{config-import-de63ZhzL.js → config-import-BW-n-4Yl.js} +1 -1
  52. package/assets/{confirm-dialog-4odXEYPg.js → confirm-dialog-BAOm_tmO.js} +1 -1
  53. package/assets/{credential-steps-C487bVsp.js → credential-steps-DxrEA0OS.js} +1 -1
  54. package/assets/{download-BW67NG6L.js → download-CsyaiJfT.js} +1 -1
  55. package/assets/{filters-BYdyVF3l.js → filters-ENJaCJ6i.js} +1 -1
  56. package/assets/{flagged-D2fcwnwU.js → flagged-CHS7Sv5L.js} +1 -1
  57. package/assets/flagged-ClM4D6w4.js +1 -0
  58. package/assets/{folders-EcP0rfiB.js → folders-RAY3kNRb.js} +1 -1
  59. package/assets/{format-BHDg2rrC.js → format-CTO21bLP.js} +1 -1
  60. package/assets/{help-copy-CyOAabh4.js → help-copy-CHa0UGds.js} +1 -1
  61. package/assets/{import-yZ1lZmOe.js → import-vggCfFY7.js} +1 -1
  62. package/assets/index-3e125Hab.js +1 -0
  63. package/assets/index-BGcgfODq.js +1 -0
  64. package/assets/index-BM0UvHaM.js +1 -0
  65. package/assets/index-BcqF5DIR.js +1 -0
  66. package/assets/index-CSZc00Y0.js +1 -0
  67. package/assets/index-Cn0HxZE8.js +1 -0
  68. package/assets/{index-g8bgQtJZ.js → index-CvHgBKzk.js} +61 -61
  69. package/assets/{index-C6BJBAqS.js → index-D-XMtAaX.js} +8 -8
  70. package/assets/{index-DtgfksfH.js → index-D23sIPjL.js} +1 -1
  71. package/assets/index-DYefqN3E.js +1 -0
  72. package/assets/index-Da7gFljw.js +1 -0
  73. package/assets/index-JhCVbgdu.js +1 -0
  74. package/assets/{kbd-DqC2ZgVF.js → kbd-CFfFFeOa.js} +1 -1
  75. package/assets/{labels-_ZUBf8If.js → labels-JtbKl6kA.js} +1 -1
  76. package/assets/{mail-CfYHpR3-.js → mail-BtsVUuTG.js} +1 -1
  77. package/assets/{mail-B9HYS5_j.js → mail-DxviAVO4.js} +1 -1
  78. package/assets/{menu-B8k6KgGJ.js → menu-z3yGPHVO.js} +1 -1
  79. package/assets/minus-DgJyoX-1.js +1 -0
  80. package/assets/{new-CKL5ztN7.js → new-Bn847M0C.js} +1 -1
  81. package/assets/onboarding-DxcXNbpR.js +1 -0
  82. package/assets/{onboarding-completion-C6oaKJr6.js → onboarding-completion-BibtVMVq.js} +1 -1
  83. package/assets/outbox-B0Er3Qme.js +1 -0
  84. package/assets/{pencil-DcdYZQHm.js → pencil-D4BuHCoD.js} +1 -1
  85. package/assets/{rich-text-xWONJedQ.js → rich-text-1RhkdX-3.js} +1 -1
  86. package/assets/{rich-text-spellcheck-worker-provider-CNwU2omR.js → rich-text-spellcheck-worker-provider-CyU5XlL_.js} +1 -1
  87. package/assets/{rotate-ccw-D_188uJN.js → rotate-ccw-BAMGL0nD.js} +1 -1
  88. package/assets/{row-actions-DfZb5JeP.js → row-actions-NntamOda.js} +1 -1
  89. package/assets/{search-mirror-7JkoCkyi.js → search-mirror-iyqYtIOH.js} +1 -1
  90. package/assets/{search-token-index-BOTTrCLk.js → search-token-index-CMEbenCb.js} +1 -1
  91. package/assets/{sections-BEguVFV2.js → sections-kEi5uTHL.js} +1 -1
  92. package/assets/{senders-BcpBIVSg.js → senders-BCbJ8qc6.js} +1 -1
  93. package/assets/settings-DS8owM2f.js +1 -0
  94. package/assets/{settings-screen-6UMcBZNz.js → settings-screen-Bas4TeYt.js} +1 -1
  95. package/assets/{shield-check-SmSS2Jxi.js → shield-check-BncfAN35.js} +1 -1
  96. package/assets/{suggested-vips-D2v6FYHK.js → suggested-vips-BXyjY5hr.js} +1 -1
  97. package/assets/useCalendarData-DDXYjxV5.js +1 -0
  98. package/assets/useCalendars-C17p7Nzh.js +1 -0
  99. package/assets/{useDebouncedValue-CBTfEGjG.js → useDebouncedValue-DT0N2ZZ8.js} +1 -1
  100. package/assets/{useFilters-UCepys59.js → useFilters-CFGQOfNb.js} +1 -1
  101. package/assets/{useLabels-D1TbYkW1.js → useLabels-4QZ-fg0L.js} +1 -1
  102. package/assets/{useLayoutTier-BWGxIu6c.js → useLayoutTier-CRRZIH_b.js} +1 -1
  103. package/assets/{useMessageBodyContent-CuLDcpM3.js → useMessageBodyContent-DAz3qVkt.js} +1 -1
  104. package/assets/{useQueries-CCN-XYPe.js → useQueries-BxE36uj9.js} +1 -1
  105. package/assets/{useRefreshControl-DuT7Vf8Z.js → useRefreshControl-D87kZX8a.js} +1 -1
  106. package/assets/{useSearchTokenContext-GTO16rww.js → useSearchTokenContext-Dvm-Yobe.js} +4 -4
  107. package/assets/useSemanticSearch-Fk64TQcq.js +1 -0
  108. package/assets/{useSignature-BvM9Jfop.js → useSignature-uiUpBdh0.js} +1 -1
  109. package/index.html +1 -1
  110. package/package.json +1 -1
  111. package/assets/OpenCalendarEvent-DFAHEVHt.js +0 -2
  112. package/assets/_calendarObjectId-6cOKQcgB.js +0 -1
  113. package/assets/_mailboxId-CFhgCYCF.js +0 -1
  114. package/assets/_messageId-C-LTrk0-.js +0 -1
  115. package/assets/_messageId-DZDvjiNN.js +0 -1
  116. package/assets/_messageId-LbrpD-BP.js +0 -1
  117. package/assets/_outboxMessageId-meXaRwTs.js +0 -1
  118. package/assets/_recurrenceId-DV189r6S.js +0 -1
  119. package/assets/_threadId-CPgw728G.js +0 -1
  120. package/assets/_threadId-C_-8qHTx.js +0 -1
  121. package/assets/_threadId-_PwgZfT0.js +0 -1
  122. package/assets/_view._date-Cn85wNA-.js +0 -1
  123. package/assets/brief-CErs70FI.js +0 -1
  124. package/assets/chevron-left-BPhVNe7C.js +0 -1
  125. package/assets/compose._-_outboxMessageId_-0lG1RQ-U.js +0 -1
  126. package/assets/compose._-_outboxMessageId_-BWV4mYDU.js +0 -1
  127. package/assets/compose._-_outboxMessageId_-Cvy5e97A.js +0 -1
  128. package/assets/compose._-_outboxMessageId_-D_hmUjGR.js +0 -1
  129. package/assets/flagged-CYneeAX9.js +0 -1
  130. package/assets/index-BKva5t-L.js +0 -1
  131. package/assets/index-BMNptzNH.js +0 -1
  132. package/assets/index-BoUGz-xy.js +0 -1
  133. package/assets/index-C3P_qUWn.js +0 -1
  134. package/assets/index-DMtQT3Gv.js +0 -1
  135. package/assets/index-DZDvjiNN.js +0 -1
  136. package/assets/index-DZYAx9Zv.js +0 -1
  137. package/assets/index-DaxLOC3T.js +0 -1
  138. package/assets/index-LbrpD-BP.js +0 -1
  139. package/assets/minus-CMPi7NES.js +0 -1
  140. package/assets/onboarding-BhJpStXu.js +0 -1
  141. package/assets/outbox-JUyi2qJo.js +0 -1
  142. package/assets/settings-Vu3bXMtt.js +0 -1
  143. package/assets/useCalendarData-C5aoyZVb.js +0 -1
  144. package/assets/useCalendars-DpFuwdMF.js +0 -1
  145. package/assets/useSemanticSearch-Du2bzbgF.js +0 -1
@@ -1 +0,0 @@
1
- import{e as Oo,t as K,j as d,Z as Wo,r as M,bG as ut,ar as Gs,bH as jo,L as Bo,bI as _o,O as Uo}from"./index-g8bgQtJZ.js";import{C as Fo}from"./CalendarComposeSeed-Ru12tqux.js";import{a as Vo}from"./CalendarShell-DMvRHN83.js";import{C as zo}from"./chevron-left-BPhVNe7C.js";import{c as Go,R as Yo,u as qo,a as Zo,b as $o,d as Xo,e as Ko,f as Jo}from"./useCalendars-DpFuwdMF.js";import{M as Qo}from"./mail-CfYHpR3-.js";import{G as el,u as tl}from"./useCalendarData-C5aoyZVb.js";import{N as nl}from"./NavMenuButton-O5EMAZfL.js";import{E as sl}from"./ErrorState-CcskHvYA.js";import"./menu-B8k6KgGJ.js";const rl=Oo("CalendarRange",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]]),Ae=globalThis.Temporal,il=(t,e)=>`Non-positive ${t}: ${e}`,al=(t,e)=>`Non-finite ${t}: ${e}`,ol=t=>`Cannot convert bigint to ${t}`,ll="Invalid object",cl=(t,e,n,s)=>Jt(t,e)+`; must be between ${n}-${s}`,Jt=(t,e)=>`Invalid ${t}: ${e}`,dl=1e3,ul=1e6,hl=1e9,fl=6e10,gl=36e11;function ml(t){return t===void 0?Object.create(null):yl(t)}function Jr(t,e="number"){if(typeof t=="bigint")throw new TypeError(ol(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(al(e,t));return t}function Jn(t,e){return Math.trunc(Jr(t,e))||0}function Ys(t,e){return pl(Jn(t,e),e)}function pl(t,e="number"){if(t<=0)throw new RangeError(il(e,t));return t}function vl(t,e,n){return Math.min(Math.max(t,e),n)}function Qr(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function yl(t){if(!Qr(t))throw new TypeError(ll);return t}const Sl=Jt,El=t=>`Missing ${t}`,bl=(t,e,n)=>Jt(t,e)+"; must be "+Object.keys(n).join(),Dl="Cannot use valueOf",wl="Invalid calling context",Cl=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Rl=t=>Jt("TimeZone",t),Qt="Out-of-bounds date",Tl=t=>`Invalid substring: ${t}`,ei=vl;function se(t){throw new RangeError(t)}function Ke(t){throw new TypeError(t)}function qs(t,e,n,s,r){return ti(e,((i,a)=>{const o=i[a];return o===void 0&&Ke(El(a)),o})(t,e),n,s)}function ti(t,e,n,s,r,i){const a=ei(e,n,s);return e!==a&&se(((o,l,c,u,f)=>cl(o,l,c,u))(t,e,n,s)),a}function Ge(t,e=Map){const n=new e;return(s,...r)=>{if(n.has(s))return n.get(s);const i=t(s,...r);return n.set(s,i),i}}const xl=t=>Ml({name:t}),Ml=(t,e)=>Qn(n=>({value:n,configurable:1,writable:!1}),t),Il=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function Qn(t,e){const n={};for(const s in e)n[s]=t(e[s],s);return n}function Nl(t,e){const n={};for(const s of t)n[s]=e;return n}function ni(t){const e={};for(const n of t)e[n]=s=>s[n];return e}function si(t,e,n=Object.create(null)){for(const s of t)n[s]=e[s];return n}function es(t,...e){return(...n)=>t(...e,...n)}function Zs(){}function $s(t){return t[0].toUpperCase()+t.substring(1)}function Hl(t){return new RegExp(`^${t}$`,"i")}function Pl(t){return parseInt(t.padEnd(9,"0"))}function kl(t){return t&&t!=="+"?-1:1}function bn(t){return t===void 0?0:parseInt(t)}function _t(t,e){return String(e).padStart(t,"0")}const ge=es(_t,2);function Ll(t,e){return Math.sign(t-e)}function ri(t,e){const n=t/e;return t%e<0n?n-1n:n}function ii(t,e){const n=ri(t,e);return[n,t-n*e]}function De(t,e){return[Math.floor(t/e),en(t,e)]}function en(t,e){return(t%e+e)%e}function Al(t,e){return Math.trunc(t/e)||0}function Mt(t){return Math.abs(t%1)===.5}function Ol(t){const e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}const Je=void 0;function tn(t){return t===Je?"iso8601":t===0?"gregory":t.id}function Wl(t,e){return"M"+ge(t)+(e?"L":"")}const jl={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Bl=Object.keys(jl),ts=dl,nn=ul,St=hl,ns=fl,ai=gl,ss=864e11,oi=BigInt(nn),kn=BigInt(St),Ne=BigInt(ss),sn=Bl.slice(0,6),rs=ni(sn),_l=["day","month","year"];function Ul(t){return Vl(t),t}const Fl={hour:23,minute:59,second:59};function Vl(t,e){const n={};for(const s of sn)n[s]=ti(s,t[s],0,Fl[s]||999);return n}function is(t){return li(t)*St+ci(t)}function li(t){return 3600*t.hour+60*t.minute+t.second}function ci(t){return t.millisecond*nn+t.microsecond*ts+t.nanosecond}function zl(t){const[e,n]=De(t,nn),[s,r]=De(n,ts);return Gl(e,s,r)}function Gl(t,e=0,n=0){const[s,r]=De(t,36e5),[i,a]=De(r,6e4),[o,l]=De(a,1e3);return{hour:s,minute:i,second:o,millisecond:l,microsecond:e,nanosecond:n}}function Xs(t){const[e,n]=ii(t,kn);return[Number(e),Number(n)]}function Yl(t){return as(t)+BigInt(is(t))}function as(t){return BigInt(Ut(t))*Ne}function Ut(t){return ht(t.year,t.month,t.day)}function ht(t,e=1,n=1){const s=e-1;return t+=Math.floor(s/12),e=en(s,12),Date.UTC(t%400-400,e,0)/864e5+146097*(Al(t,400)+1)+n}function rn(t){const[e,n]=ii(t,Ne);return{...ql(Number(e)),...zl(Number(n))}}function ql(t){const e=new Date(864e5*en(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}function Zl(t){return[t,0]}function $l(t,e,n){return{year:t,month:e,day:n}}function di(t,e){switch(e){case 2:return an(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Xl(t){return an(t)?366:365}function an(t){return t%4==0&&(t%100!=0||t%400==0)}function os(t){return en(ht(t.year,t.month,t.day)+4,7)||7}function ui(t){return ht(t.year,t.month,t.day)-ht(t.year)+1}function hi(t){let e=t.year,n=Math.floor((ui(t)-os(t)+10)/7),s=Dn(e);return n<1?n=s=Dn(--e):n>s&&(n=1,s=Dn(++e)),{weekOfYear:n,yearOfWeek:e,Be:s}}function Dn(t){const e=os({year:t,month:1,day:1});return e===4||e===3&&an(t)?53:52}function Kl({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Jl(t){return Ql(t),Ul(t)}function Ql(t){return ec(t),t}function ec(t,e){const{year:n}=t,s=qs(t,"month",1,12);return{year:n,month:s,day:qs(t,"day",1,di(n,s))}}function me(t,e){return t?t.ae(e):e}function tc(t,e,n){return t?t.L(e,n):Zl(n)}function Ks(t,e){return t===0?Kl(e):t&&t.h?.(e)||{}}function nc(t,e,n,s){return t?t.de(e,n,s):$l(e,n,s)}function sc(t,e){return t?t.j(e):12}function rc(t,e,n){return t?t.o(e,n):di(e,n)}function ic(t,e){const{year:n,month:s}=me(t,e),[r,i]=tc(t,n,s);return Wl(r,i)}function fi(t,e){const{year:n}=me(t,e);return t?t.q(n):an(n)}function gi(t,e){const{year:n}=me(t,e);return sc(t,n)}function mi(t,e){const{year:n,month:s}=me(t,e);return rc(t,n,s)}function pi(t,e){const{year:n}=me(t,e);return t?t.i(n):Xl(n)}function ac(t,e){if(!t)return ui(e);const{year:n}=me(t,e),s=nc(t,n,1,1);return Ut(e)-Ut(s)+1}function oc(t,e){return t===Je?hi(e).weekOfYear:void 0}function lc(t,e){return t===Je?hi(e).yearOfWeek:void 0}const Ft=es(cc,"string");function cc(t,e,n=t){return typeof e!==t&&Ke(Sl(n,e)),e}function dc(t,e="number"){return Number.isInteger(t)||se(((n,s)=>`Non-integer ${n}: ${s}`)(e,t)),t||0}function uc(t){return typeof t=="symbol"&&Ke("Cannot convert Symbol to string"),String(t)}function hc(t,e){return Qr(t)?String(t):Ft(t,e)}function fc(t,e){return dc(Jr(t,e),e)}const gc={compatible:0,reject:1,earlier:2,later:3},mc=[Math.floor,t=>Mt(t)?Math.floor(t):Math.round(t),Math.ceil,t=>Mt(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>Mt(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>Mt(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)];function pc(t,e,n,s=0){const r=n[t];if(r===void 0)return s;const i=uc(r),a=e[i];return a===void 0&&se(bl(t,i,e)),a}const vc=es(pc,"disambiguation",gc),vi=BigInt(1e8)*Ne,ls=BigInt(-1e8)*Ne,yi=ls-Ne;function yc(t){const e=as(t);return Sc(e),e!==yi||is(t)||se(Qt),t}function Sc(t,e=1){(t<(e?yi:ls)||t>vi)&&se(Qt)}function on(t){return(t<ls||t>vi)&&se(Qt),t}function Ec(t,e){return on(as(t)+BigInt(is(t)-e))}function bc(t){return{epochNanoseconds:t}}function Si(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Dc(t,e){return si(sn,t,wc(t,e))}function wc(t,e){return si(_l,t,{calendar:e})}function Ei(t){return e=t.epochNanoseconds,Number(ri(e,oi));var e}function bi(t){return t.epochNanoseconds}function Cc(t){return Rc(t,ns,7)}function Rc(t,e,n){return Tc(t/e,n)*e}function Tc(t,e){return mc[e](t)}const Di=Ge(xc,WeakMap);function xc(t){const{epochNanoseconds:e,timeZone:n}=t,s=n.B(e);return{...rn(e+BigInt(s)),offsetNanoseconds:s}}function Mc(t,e,n=0,s=t.N(e)){if(s.length===1)return s[0];if(n===1&&se("Ambiguous offset"),s.length)return s[n===3?1:0];const r=Yl(e),i=((o,l)=>{const c=o.B(l-Ne);return(u=>(u>ss&&se("Out-of-bounds TimeZone gap"),u))(o.B(l+Ne)-c)})(t,r),a=rn(r+BigInt(i*(n===2?-1:1)));return(s=t.N(a))[n===2?0:s.length-1]}const Ic=Hl("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Nc(t,e){const n=Ic.exec(t);if(n&&(s=>(r=>{r[0]!=="T"&&r[0]!=="t"||(r=r.slice(1));const i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),o=a.split(":");return o.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(a):(o.length===2||o.length===3)&&o.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(s.slice(1)))(n[0]))return((s,r)=>{const i=s[4]||s[5];return i&&se(Tl(i)),o=(bn(s[2])*ai+bn(s[3])*ns+bn(s[4])*St+Pl(s[5]||""))*kl(s[1]),Math.abs(o)>=ss&&se("Out-of-bounds offset"),o;var o})(n)}const Hc={era:hc,month:Ys,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){const n=t.toString;if(typeof n=="function")return Ft(n.call(t),e)}return Ft(t,e)},day:Ys},Pc=Nl(sn,Jn),kc=Object.assign({},Hc,Pc);({...kc});const Lc=Intl.DateTimeFormat;function Ac(t,e){e<-864e13&&se(Qt);const n=t.formatToParts(e),s={};for(const r of n)s[r.type]=r.value;return s}const Oc={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},wn=-388152e4;function Wc(t){return cs(rn(t.epochNanoseconds))+"Z"}function jc(t){const e=t.calendar,n=t.timeZone,s=n.B(t.epochNanoseconds);return cs(rn(t.epochNanoseconds+BigInt(s)))+wi(Cc(s))+Vc(n.id)+(e===Je?"":Ci(tn(e)))}function Bc(t){const e=t.calendar;return cs(t)+(e===Je?"":Ci(tn(e)))}function cs(t,e){return _c(t)+"T"+Fc(t)}function _c(t){return Uc(t)+"-"+ge(t.day)}function Uc(t){const{year:e}=t;return(e<0||e>9999?Ti(e)+_t(6,Math.abs(e)):_t(4,e))+"-"+ge(t.month)}function Fc(t,e){const n=[ge(t.hour),ge(t.minute)];return n.push(ge(t.second)+((s,r,i,a)=>Ri(s*nn+r*ts+i))(t.millisecond,t.microsecond,t.nanosecond)),n.join(":")}function wi(t,e=0){if(e===1)return"";const[n,s]=De(Math.abs(t),ai),[r,i]=De(s,ns),[a,o]=De(i,St);return Ti(t)+ge(n)+":"+ge(r)+(a||o?":"+ge(a)+Ri(o):"")}function Vc(t,e){return"["+t+"]"}function Ci(t,e){return"[u-ca="+t+"]"}const zc=/0+$/;function Ri(t,e){let n=_t(9,t);return n=n.replace(zc,""),n?"."+n:""}function Ti(t){return t<0?"-":"+"}const Gc=/^(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$/,Yc=/[^\w\/:+-]+/;function xi(t){return qc(Ft(t))}function qc(t){return Mi(t).id}function Mi(t){const e=t.toUpperCase(),n=(r=>{const i=Nc(r);if(i!==void 0)return{id:wi(i),X:i,m:i}})(e);if(n)return{kind:"fixed",...n};const s=e==="UTC"?"UTC":(r=>(Yc.test(r)&&se(Rl(r)),Gc.test(r)&&se("Forbidden ICU TimeZone"),r.toLowerCase().split("/").map((i,a)=>(i.length<=3||/\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(o,l)=>o.length<=2&&!a||o==="in"||o==="chat"?o.toUpperCase():o.length>2||!l?$s(o).replace(/island|noronha|murdo|rivadavia|urville/,$s):o)).join("/")))(t);return Zc(s)}const Zc=Ge(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};const e=t.toUpperCase(),n=$c(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),$c=Ge(t=>new Lc("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Ii(t){const e=Mi(t);return Xc(e.id,e)}const Xc=Ge((t,e)=>e.kind==="named"?new Jc(t,e.m,e.format):new Kc(t,e.m,e.kind==="fixed"?e.X:0));class Kc{constructor(e,n,s){this.id=e,this.m=n,this.X=s}B(){return this.X}N(e){return[Ec(e,this.X)]}O(){}}class Jc{constructor(e,n,s){this.id=e,this.m=n,this.ke=((r,i)=>{const a=Ge(r),o=Ge(Qc),l=86400*i;function c(f){const[g,m]=Qs(f,l),v=It(g),p=It(m),S=a(v),D=a(p);return S===D?S:u(o(v,p),S,D,f)}function u(f,g,m,v){let p,S;for(;(v===void 0||(p=v<f[0]?g:v>=f[1]?m:void 0)===void 0)&&(S=f[1]-f[0]);){const D=f[0]+Math.floor(S/2);r(D)===m?f[1]=D:f[0]=D+1}return p}return{xe(f){const g=c(f-86400),m=c(f+86400),v=f-g,p=f-m;if(g===m)return[v];const S=c(v);return S===c(p)?[f-S]:g>m?[v,p]:[]},we:c,O:function f(g,m){if(m>0&&g>=864e10)return;if(m<0){if(g<=wn)return;const E=Js()+94867200;if(g>E)return f(E,-1)}const v=m>0?Math.max(g,wn):g;let[p,S]=Qs(v,l);const D=l*m,R=m>0?Math.max(g,Js())+94867200:wn,C=()=>m<0?S>R:p<R;for(;C();){const E=It(p),x=It(S),I=a(E),k=a(x);if(I!==k){const P=o(E,x);u(P,I,k);const H=P[0];if((Ll(H,g)||1)===m)return H}p+=D,S+=D}}}})((r=>i=>{const a=Ac(r,1e3*i);return 86400*ht((o=>{const l=o.relatedYear;if(l!==void 0)return parseInt(l);const c=parseInt(o.year);return o.era!==void 0&&Ol(o.era)==="bce"?1-c:c})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(s),(r=>{const i=r.split("/").pop();return Oc[i]||60})(e))}B(e){return this.ke.we((n=>Xs(n)[0])(e))*St}N(e){const n=86400*Ut(e)+li(e),s=ci(e);return this.ke.xe(n).map(r=>on(BigInt(r)*kn+BigInt(s)))}O(e,n){const[s,r]=Xs(e),i=this.ke.O(s+(n>0||r?1:0),n);if(i!==void 0)return BigInt(i)*kn}}function Js(){return Math.floor(Date.now()/1e3)}function Qc(t,e){return[t,e]}function Qs(t,e){const n=Math.floor(t/e)*e;return[n,n+e]}function It(t){return ei(t,-1e10,864e10)}function ed(t,e,n){return Si(t.epochNanoseconds,e,n)}function td(t,e,n){const s=Mc(e,t,(r=>vc(ml(r)))(n));return Si(on(s),e,t.calendar)}function nd(t){return bc(on(BigInt(fc(t))*oi))}function sd(t,e,n,s,r){const i=new Set(t),a=new Set(e),o=new Set(n);return(l,c)=>{let u,f;const g={},m={},v={};let p=0,S=0;for(const H of Object.keys(l)){const A=l[H];A===void 0||o.has(H)||(i.has(H)?H==="dateStyle"?u=A:H==="timeStyle"?f=A:g[H]=A:H==="era"?m[H]=A:a.has(H)?H==="dateStyle"||H==="timeStyle"?S=1:p=1:v[H]=A)}const D=u!==void 0,R=f!==void 0,C=D||R,E=Object.keys(g).length>0,x=p||S,I=E||D||R,k=Object.keys(m).length>0;(!c&&x||c&&x&&!I||C&&(E||k||p))&&Ke("Invalid formatting options");const P={};return C||I||Object.assign(P,s),Object.assign(P,g,m,v),D&&(r?Object.assign(P,r[u]):P.dateStyle=u),R&&(P.timeStyle=f),P}}const rd={year:"numeric",month:"numeric",day:"numeric"},id={hour:"numeric",minute:"numeric",second:"numeric"},ad=Object.assign({},rd,id),od=["weekday","year","month","day","dateStyle"],ld=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],cd=od.concat(ld);({...ad});const dd="PlainDateTime",ud="ZonedDateTime",hd="Instant";function Qe(t,e,n,...s){return Object.defineProperties(e,xl(t)),Object.defineProperties(e.prototype,Il("Temporal."+t)),Object.defineProperties(e.prototype,Qn(r=>({get(){return r(n(this))},configurable:1}),Object.assign({},...s))),e}const et=Zs.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:Zs;function ln(){Ke(wl)}function ds(){Ke(Dl)}const us={era(t){return Ks(t.calendar,t).era},eraYear(t){return Ks(t.calendar,t).eraYear},year(t){return me(t.calendar,t).year},month(t){return me(t.calendar,t).month},monthCode(t){return ic(t.calendar,t)},day(t){return me(t.calendar,t).day}},fd={daysInMonth(t){return mi(t.calendar,t)},daysInYear(t){return pi(t.calendar,t)},monthsInYear(t){return gi(t.calendar,t)},inLeapYear(t){return fi(t.calendar,t)}},gd={dayOfWeek(t){return os(t)},dayOfYear(t){return ac(t.calendar,t)},weekOfYear(t){return oc(t.calendar,t)},yearOfWeek(t){return lc(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return mi(t.calendar,t)},daysInYear(t){return pi(t.calendar,t)},monthsInYear(t){return gi(t.calendar,t)},inLeapYear(t){return fi(t.calendar,t)}};function Vt(t){return ni(Object.keys(t))}const Ni=Vt(rs),Hi=Vt(us);Vt(fd),Vt(gd);function md(t){const e=Go(t.color),n=t.rsvp==="tentative"||t.status==="tentative";return K("flex min-w-0 overflow-hidden rounded-sm border-l-2 px-1.5 py-0.5",e.soft,e.text,e.rail,t.layout==="column"||t.stacked?"flex-col":"items-center gap-1.5",n&&"border-y border-r border-dashed",n&&e.border,t.rsvp==="declined"&&"opacity-60",t.selected&&"ring-2 ring-ring","text-2xs")}function pd({title:t,timeText:e,layout:n,rsvp:s,hasThread:r,isRecurring:i,zoneCertainty:a,trailing:o,detail:l}){const c=n==="column",u=a==="ambiguous",f=!c&&l!==void 0,g=d.jsxs("span",{className:K("flex min-w-0 items-center gap-1",c&&"w-full",s==="declined"&&"line-through"),children:[e!==""&&d.jsx("span",{className:"shrink-0 tabular-nums opacity-80",children:e}),d.jsx("span",{className:"truncate font-medium",children:t})]}),m=(i||r||u)&&d.jsxs("span",{className:K("flex shrink-0 items-center gap-1",c&&"mt-0.5",!c&&o===void 0&&"ml-auto"),children:[i&&d.jsx(Yo,{className:"size-2.5","aria-label":"Repeats"}),r&&d.jsx(Qo,{className:"size-2.5","aria-label":"From mail"}),u&&d.jsx(el,{className:"size-2.5 text-warning","aria-label":"Unclear zone"})]}),v=o!==void 0&&d.jsx("span",{className:K("shrink-0 opacity-80",!c&&"ml-auto"),children:o});return d.jsxs(d.Fragment,{children:[f?d.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g,m,v]}):d.jsxs(d.Fragment,{children:[g,m,v]}),l]})}function Pi(t){return K("flex cursor-pointer items-center justify-center rounded-md px-2 font-medium transition-colors","has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring",t?"bg-accent-2-soft text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg")}function vd({options:t,value:e,onChange:n,touch:s,ariaLabel:r,className:i}){const a=M.useId();return d.jsxs("fieldset",{className:K("inline-flex items-center gap-0.5",i),children:[d.jsx("legend",{className:"sr-only",children:r}),t.map(o=>d.jsxs("label",{className:K(Pi(e===o.value),s?"min-h-11 flex-1 text-sm":"h-7 text-xs"),children:[d.jsx("input",{type:"radio",name:a,value:o.value,checked:e===o.value,onChange:()=>n(o.value),className:"sr-only"}),s?o.shortLabel:o.label]},o.value))]})}const er=[{value:"year",label:"Year",shortLabel:"Y"},{value:"month",label:"Month",shortLabel:"M"},{value:"week",label:"Week",shortLabel:"W"},{value:"day",label:"Day",shortLabel:"D"},{value:"agenda",label:"Agenda",shortLabel:"List"}];function yd({value:t,onChange:e,views:n,touch:s,className:r}){const i=n?er.filter(a=>n.includes(a.value)):er;return d.jsx(vd,{ariaLabel:"Calendar view",options:i,value:t,onChange:e,touch:s,className:r})}function Sd({title:t,onPrev:e,onNext:n,onToday:s,children:r,touch:i}){const a=K("flex items-center justify-center rounded-md text-fg-muted outline-none transition-colors hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",i?"size-11":"size-7");return d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:e,"aria-label":"Previous",className:a,children:d.jsx(zo,{className:"size-4"})}),d.jsx("button",{type:"button",onClick:n,"aria-label":"Next",className:a,children:d.jsx(Wo,{className:"size-4"})}),d.jsx("button",{type:"button",onClick:s,className:K("rounded-md border border-line px-2.5 font-medium text-fg outline-none transition-colors hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",i?"min-h-11 text-sm":"h-7 text-xs"),children:"Today"}),d.jsx("h2",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:t}),r]})}const ki=`${dd}Record`,Li=`${ud}Record`,Ai=`${hd}Record`,Ed=new WeakMap,Oi=new WeakMap,Wi=new WeakMap,ji=new WeakMap;function Bi(t){return bd(t)||ln()}function bd(t){return Ed.get(t)}function _i(t){return Dd(t)||ln()}function Dd(t){return Oi.get(t)}function Ui(t,e){Oi.set(t,e)}function Fi(t){return wd(t)||ln()}function wd(t){return Wi.get(t)}function Vi(t,e){Wi.set(t,e)}function zi(t){return Cd(t)||ln()}function Cd(t){return ji.get(t)}function Gi(t,e){ji.set(t,e)}function Yi(t){return Bi(t).id}function qi(t){const e=Bi(t).ue;return e||se(Cl(Yi(t),"getExotic or getAny")),e}function Rd(t){if(t!==void 0)return Td(t)}function Td(t){return qi(t),Yi(t)}const lt=zi,xd=Qe(ki,class{get calendarId(){return lt(this).calendarId}toJSON(){return lt(this).toJSON()}valueOf(){return lt(this).valueOf()}},lt,Hi,Ni);function Md(t){const e=Object.create(xd.prototype);return Gi(e,t),et(e),e}function Id(t,e,n,s,r,i,a,o,l,c){return Md(new Ae.PlainDateTime(t,e,n,s,r,i,a,o,l,Rd(c)))}function Nd(t,e,n){return Zi(lt(t).toZonedDateTime(e,n))}const be=Fi,Hd=Qe(Li,class{get calendarId(){return be(this).calendarId}get timeZoneId(){return be(this).timeZoneId}get epochMilliseconds(){return be(this).epochMilliseconds}get epochNanoseconds(){return be(this).epochNanoseconds}toJSON(){return be(this).toJSON()}valueOf(){return be(this).valueOf()}},be,Hi,Ni);function Zi(t){const e=Object.create(Hd.prototype);return Vi(e,t),et(e),e}function Pd(t){return be(t).offsetNanoseconds}const ct=_i,kd=Qe(Ai,class{get epochMilliseconds(){return ct(this).epochMilliseconds}get epochNanoseconds(){return ct(this).epochNanoseconds}toJSON(){return ct(this).toJSON()}valueOf(){return ct(this).valueOf()}});function Ld(t){const e=Object.create(kd.prototype);return Ui(e,t),et(e),e}function Ad(t){return Ld(Ae.Instant.fromEpochMilliseconds(t))}function Od(t,e){return Zi(ct(t).toZonedDateTimeISO(e))}function Wd(t){return t===void 0?Je:jd(t)}function jd(t){return qi(t)()}const Lt=zi,Bd=Qe(ki,class{get calendarId(){return tn(Lt(this).calendar)}toJSON(){return Bc(Lt(this))}valueOf(){return ds()}},Lt,us,rs);function _d(t){const e=Object.create(Bd.prototype);return Gi(e,t),et(e),e}function Ud(t,e,n,s=0,r=0,i=0,a=0,o=0,l=0,c){const u=yc(Jl(Qn(Jn,{year:t,month:e,day:n,hour:s,minute:r,second:i,millisecond:a,microsecond:o,nanosecond:l}))),f=Wd(c);return _d(Dc(u,f))}function Fd(t,e,n){return $i(td(Lt(t),Ii(xi(e)),n))}const xe=Fi,Vd=Qe(Li,class{get calendarId(){return tn(xe(this).calendar)}get timeZoneId(){return xe(this).timeZone.id}get epochMilliseconds(){return Ei(xe(this))}get epochNanoseconds(){return bi(xe(this))}toJSON(){return jc(xe(this))}valueOf(){return ds()}},zd,us,rs);function $i(t){const e=Object.create(Vd.prototype);return Vi(e,t),et(e),e}function zd(t){const e=xe(t);return{...Di(e),calendar:e.calendar}}function Gd(t){return Di(xe(t)).offsetNanoseconds}const At=_i,Yd=Qe(Ai,class{get epochMilliseconds(){return Ei(At(this))}get epochNanoseconds(){return bi(At(this))}toJSON(){return Wc(At(this))}valueOf(){return ds()}});function qd(t){const e=Object.create(Yd.prototype);return Ui(e,t),et(e),e}function Zd(t){return qd(nd(t))}function $d(t,e){return $i(ed(At(t),Ii(xi(e))))}const Xd=Ae?Pd:Gd,tr=Ae?Id:Ud,nr=Ae?Nd:Fd,Kd=Ae?Ad:Zd,Jd=Ae?Od:$d;function sr(t,e){let n=Ye(t);return n[2]+=e*7,le(n)}function V(t,e){let n=Ye(t);return n[2]+=e,le(n)}function He(t,e){let n=Ye(t);return n[6]+=e,le(n)}function Qd(t,e){return Oe(t,e)/7}function Oe(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function eu(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function tu(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function nu(t,e){return(e.valueOf()-t.valueOf())/1e3}function su(t,e){let n=B(t),s=B(e);return{years:0,months:0,days:Math.round(Oe(n,s)),milliseconds:e.valueOf()-s.valueOf()-(t.valueOf()-n.valueOf())}}function Xi(t,e){let n=ft(t,e);return n!==null&&n%7===0?n/7:null}function ft(t,e){return Ue(t)===Ue(e)?Math.round(Oe(t,e)):null}function B(t){return le([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function ru(t){return le([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function iu(t){return le([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function au(t){return le([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function ou(t,e,n){let s=t.getUTCFullYear(),r=Cn(t,s,e,n);if(r<1)return Cn(t,s-1,e,n);let i=Cn(t,s+1,e,n);return i>=1?Math.min(r,i):r}function Cn(t,e,n,s){let r=le([e,0,1+lu(e,n,s)]),i=B(t),a=Math.round(Oe(r,i));return Math.floor(a/7)+1}function lu(t,e,n){let s=7+e-n;return-((7+le([t,0,s]).getUTCDay()-e)%7)+s-1}function cu(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function rr(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 Ye(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function le(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function Ki(t){return!isNaN(t.valueOf())}function Ue(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}let Ji={};function du(t,e){Ji[t]=e}function uu(t){return new Ji[t]}class hu{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return le(e)}markerToArray(e){return Ye(e)}}du("gregory",hu);function fu(t,e){let n=null,s=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(s=e.createMarker(t.end)),!n&&!s||n&&s&&s<n?null:{start:n,end:s}}function ir(t,e){let n=[],{start:s}=e,r,i;for(t.sort(gu),r=0;r<t.length;r+=1)i=t[r],i.start>s&&n.push({start:s,end:i.start}),i.end>s&&(s=i.end);return s<e.end&&n.push({start:s,end:e.end}),n}function gu(t,e){return t.start.valueOf()-e.start.valueOf()}function we(t,e){let{start:n,end:s}=t,r=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(s===null?s=e.end:s=new Date(Math.min(s.valueOf(),e.end.valueOf()))),(n===null||s===null||n<s)&&(r={start:n,end:s}),r}function mu(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 hs(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function cn(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function pe(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function pu(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 ar(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 zt(t,e,n){let s=ar(t,n.calendarSystem),r=e?ar(e,n.calendarSystem):null;return{date:s,start:s,end:r,timeZone:n.timeZone,localeCodes:n.locale.codes}}function Ot(t){return t%1===0}function Ve(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}const or=["years","months","days","milliseconds"],vu=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function W(t,e){return typeof t=="string"?yu(t):typeof t=="object"&&t?lr(t):typeof t=="number"?lr({[e||"milliseconds"]:t}):null}function yu(t){let e=vu.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 lr(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 Su(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Ln(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function Eu(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function bu(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function Du(t){return ze(t)/365}function wu(t){return ze(t)/30}function ze(t){return ve(t)/864e5}function ve(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function fs(t,e){let n=null;for(let s=0;s<or.length;s+=1){let r=or[s];if(e[r]){let i=t[r]/e[r];if(!Ot(i)||n!==null&&n!==i)return null;n=i}else if(t[r])return null}return n}function An(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 Qi(t,e,n=!1){let s=t.toISOString();return s=s.replace(".000",""),n&&(s=s.replace("T00:00:00Z","")),s.length>10&&(e==null?s=s.replace("Z",""):e!==0&&(s=s.replace("Z",dn(e,!0)))),s}function tt(t){return t.toISOString().replace(/T.*$/,"")}function cr(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function Cu(t){return Ve(t.getUTCHours(),2)+":"+Ve(t.getUTCMinutes(),2)+":"+Ve(t.getUTCSeconds(),2)}function dn(t,e=!1){let n=t<0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),i=Math.round(s%60);return e?`${n+Ve(r,2)}:${Ve(i,2)}`:`GMT${n}${r}${i?`:${Ve(i,2)}`:""}`}function q(t){let e="";for(const n of t)e+=n.value;return e}const Ru=/^\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=Ru.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(Ki(n)){let s=null;return e[13]&&(s=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:s}}}return null}class xu{constructor(e){this.timeZone=e.timeZone,this.calendarSystem=uu(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=le(e)),n===null||!Ki(n)?null:{marker:n,isTimeUnspecified:!1}}parse(e){let n=Tu(e);if(n===null)return null;let{marker:s}=n;return n.timeZoneOffset!==null&&(s=this.timestampToMarker(s.valueOf()-n.timeZoneOffset*60*1e3)),{marker:s,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 s=this.calendarSystem.markerToArray(e);return s[0]+=n.years,s[1]+=n.months,s[2]+=n.days,s[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(s)}subtract(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]-=n.years,s[1]-=n.months,s[2]-=n.days,s[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(s)}addYears(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]+=n,this.calendarSystem.arrayToMarker(s)}addMonths(e,n){let s=this.calendarSystem.markerToArray(e);return s[1]+=n,this.calendarSystem.arrayToMarker(s)}diffWholeYears(e,n){let{calendarSystem:s}=this;return Ue(e)===Ue(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)&&s.getMarkerMonth(e)===s.getMarkerMonth(n)?s.getMarkerYear(n)-s.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:s}=this;return Ue(e)===Ue(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)?s.getMarkerMonth(n)-s.getMarkerMonth(e)+(s.getMarkerYear(n)-s.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let s=this.diffWholeYears(e,n);return s!==null?{unit:"year",value:s}:(s=this.diffWholeMonths(e,n),s!==null?{unit:"month",value:s}:(s=Xi(e,n),s!==null?{unit:"week",value:s}:(s=ft(e,n),s!==null?{unit:"day",value:s}:(s=eu(e,n),Ot(s)?{unit:"hour",value:s}:(s=tu(e,n),Ot(s)?{unit:"minute",value:s}:(s=nu(e,n),Ot(s)?{unit:"second",value:s}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,s){let r;return s.years&&(r=this.diffWholeYears(e,n),r!==null)?r/Du(s):s.months&&(r=this.diffWholeMonths(e,n),r!==null)?r/wu(s):s.days&&(r=ft(e,n),r!==null)?r/ze(s):(n.valueOf()-e.valueOf())/ve(s)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?B(e):n==="hour"?ru(e):n==="minute"?iu(e):n==="second"?au(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)):ou(e,this.weekDow,this.weekDoy)}formatToParts(e,n){return n.formatToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},this)}formatRangeToParts(e,n,s,r={}){return r.isEndExclusive&&(n=He(n,-1)),s.formatRangeToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},{marker:n,timeZoneOffset:this.offsetForMarker(n)},this)}formatIso(e,n={}){let s=null;return n.omitTimeZoneOffset||(s=this.offsetForMarker(e)),Qi(e,s,n.omitTime)}timestampToMarker(e){if(this.timeZone==="local")return le(cu(new Date(e)));if(this.timeZone==="UTC")return new Date(e);const n=Jd(Kd(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"?-rr(Ye(e)).getTimezoneOffset():this.timeZone==="UTC"?0:Xd(nr(tr(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"?rr(Ye(e)):this.timeZone==="UTC"?new Date(e.valueOf()):new Date(nr(tr(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone).epochMilliseconds)}}const Mu=new Set(["week","meridiem","omitZeroMinute","omitCommas","forceCommas","omitTrailing","weekdayJustify"]),Nt=/([ap])\.?m\.?/i,Iu=/,/g,Nu=/\u200e/g,Hu=/[\s.,]+$/,On=/^\s+$/;class Pu{constructor(e){const n={},s={};for(const r in e)Mu.has(r)?s[r]=e[r]:n[r]=e[r];n.timeZoneName==="long"&&(n.timeZoneName="short"),this.timeZoneOnly=Object.keys(n).length===1&&n.timeZoneName==="short",this.weekOnly=!!(!Object.keys(n).length&&s.week),this.timeZoneOnly||(n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),s.omitZeroMinute&&(n.second||n.fractionalSecondDigits)&&delete s.omitZeroMinute,n.timeZone="UTC"),this.standardOptions=n,this.extendedOptions=s}formatToParts(e,n){const{standardOptions:s,extendedOptions:r}=this;if(this.timeZoneOnly)return[{type:"timeZoneName",value:dn(e.timeZoneOffset)}];if(this.weekOnly)return Au(n.computeWeekNumber(e.marker),n.weekTextLong,n.weekTextShort,n.locale,r.week);const{normalFormat:i,zeroFormat:a}=this.getFormats(n),l=(a&&!e.marker.getUTCMinutes()?a:i).formatToParts(e.marker);return ku(l,e,s,r)}formatRangeToParts(e,n,s){const{standardOptions:r,extendedOptions:i}=this;if(this.timeZoneOnly||this.weekOnly)return this.formatToParts(e,s).map(u=>({source:u.type==="literal"?"shared":"startRange",...u}));const{normalFormat:a,zeroFormat:o}=this.getFormats(s),c=(o&&!e.marker.getUTCMinutes()&&!n.marker.getUTCMinutes()?o:a).formatRangeToParts(e.marker,n.marker);return Lu(c,e,n,r,i)}getFormats(e){if(this.cachedContext!==e){const{standardOptions:n,extendedOptions:s}=this,{codes:r}=e.locale,i=new Intl.DateTimeFormat(r,n);let a;if(s.omitZeroMinute){const o={...n};delete o.minute,a=new Intl.DateTimeFormat(r,o)}this.cachedContext=e,this.cachedFormats={normalFormat:i,zeroFormat:a}}return this.cachedFormats}}function ea(t,e,n){let s=!1,r;for(const i of t){const a=i.type==="literal";if(a||i.type==="dayPeriod"){let o=i.value;if(o=o.replace(Nu,""),e.omitCommas&&(o=o.replace(Iu,"")),!a){const{meridiem:l}=e;l===!1?o=o.replace(Nt,""):l==="narrow"?o=o.replace(Nt,(c,u)=>u.toLocaleLowerCase()):l==="short"?o=o.replace(Nt,(c,u)=>`${u.toLocaleLowerCase()}m`):l==="lowercase"&&(o=o.replace(Nt,c=>c.toLocaleLowerCase())),r&&(r.value=r.value.trimEnd())}i.value=o}else if(i.type==="timeZoneName"){const o=n(i);o!=null&&(i.value=o,s=!0)}r=a?i:void 0}return{lastLiteral:r,anyTzInjected:s}}function ku(t,e,n,s){const r=n.timeZoneName==="short"?e.timeZoneOffset==null?"UTC":dn(e.timeZoneOffset):void 0,{lastLiteral:i,anyTzInjected:a}=ea(t,s,()=>r);if(r&&!a&&(i?i.value+=" ":t.push({type:"literal",value:" "}),t.push({type:"timeZoneName",value:r})),s.weekdayJustify&&t.length===3&&On.test(t[1].value)&&t[s.weekdayJustify==="start"?2:0].type==="weekday"&&t.reverse(),s.forceCommas)for(const o of t)o.type==="literal"&&On.test(o.value)&&(o.value=`,${o.value}`);return s.omitTrailing&&ta(t),t.filter(o=>o.value)}function Lu(t,e,n,s,r){const i=s.timeZoneName==="short";if(ea(t,r,a=>{if(!i)return;const o=a.source==="endRange"?n.timeZoneOffset:e.timeZoneOffset;return o==null?"UTC":dn(o)}),r.forceCommas)for(const a of t)a.type==="literal"&&On.test(a.value)&&(a.value=`,${a.value}`);return r.omitTrailing&&ta(t),t.filter(a=>a.value)}function ta(t){const e=t[t.length-1];e?.type==="literal"&&(e.value=e.value.replace(Hu,""),e.value||t.pop())}function Au(t,e,n,s,r){const i=[];return r==="long"?i.push({type:"literal",value:e}):(r==="short"||r==="narrow")&&i.push({type:"literal",value:n}),(r==="long"||r==="short")&&i.push({type:"literal",value:" "}),i.push({type:"week",value:s.simpleNumberFormat.format(t)}),s.options.direction==="rtl"&&i.reverse(),i}class Ou{constructor(e){this.cmdStr=e}formatToParts(e,n){const s=n.cmdFormatter(this.cmdStr,zt(e,null,n));return Array.isArray(s)?s:[{type:"literal",value:s}]}formatRangeToParts(e,n,s){const r=s.cmdFormatter(this.cmdStr,zt(e,n,s));return Array.isArray(r)?r.map(i=>({source:"shared",...i})):[{source:"shared",type:"literal",value:r}]}}class Wu{constructor(e){this.func=e}formatToParts(e,n){return[{type:"literal",value:this.func(zt(e,null,n))}]}formatRangeToParts(e,n,s){return[{source:"shared",type:"literal",value:this.func(zt(e,n,s))}]}}var h={popoverZ:"fc-nH",isolate:"fc-7s",borderBoxRoot:"fc-wa",notAllowed:"fc-4m",noScrollbars:"fc-eM",noShrink:"fc-Qo",calendarScreenRoot:"fc-fi",safeTiles:"fc-fl",calendarPrintRoot:"fc-Jf",cursorPointer:"fc-DP",cursorResizeT:"fc-An",cursorResizeB:"fc-lZ",cursorResizeS:"fc-9V",cursorResizeE:"fc-70",hit:"fc-mN",hitX:"fc-2d",hitY:"fc-B0",borderNone:"fc-Tu",borderOnlyT:"fc-hU",borderOnlyB:"fc-3e",borderOnlyS:"fc-PB",borderlessX:"fc-MQ",fakeBorderS:"fc-2l",flexRow:"fc-Ao",flexCol:"fc-HH",grow:"fc-GV",liquid:"fc-g2",minHeight0:"fc-Ot",liquidX:"fc-hp",printRoot:"fc-uD",printHeader:"fc-jM",noPadding:"fc-OJ",noMargin:"fc-oE",noMarginX:"fc-SS",whiteSpaceNoWrap:"fc-y2",whiteSpacePre:"fc-CN",overflowAnchorNone:"fc-gZ",crop:"fc-FA",rel:"fc-cc",abs:"fc-H0",start0:"fc-6t",fill:"fc-ct",fillTop:"fc-iv",fillX:"fc-Uu",fillY:"fc-7k",fillStart:"fc-Yw",sticky:"fc-Ip",stickyT:"fc-CS",stickyS:"fc-tT",tableHeaderSticky:"fc-hy",contentBox:"fc-Np",alignCenter:"fc-6H",alignStart:"fc-K8",alignEnd:"fc-E3",footerScrollbarSticky:"fc-Px",footerScrollbar:"fc-J4",breakInsideAvoid:"fc-Yi",printSiblingRow:"fc-fx",z0:"fc-BS",z1:"fc-iu",focusZ2:"fc-Bk",internalEvent:"fc-Ft",internalEventMirror:"fc-lc",internalEventDraggable:"fc-uL",internalEventSelected:"fc-Bv",internalEventResizable:"fc-Qk",internalEventResizer:"fc-9X",internalEventResizerStart:"fc-Sj",internalEventResizerEnd:"fc-DL",internalBgEvent:"fc-oP",internalMoreLink:"fc-R2",internalNavLink:"fc-SW",internalPopover:"fc-Cs",internalView:"fc-LQ",internalScroller:"fc-dT"};function b(...t){return t.filter(Boolean).join(" ")}function gt(t){return t*100+"%"}function j(t){return typeof t=="object"&&t?new Pu(t):typeof t=="string"?new Ou(t):typeof t=="function"?new Wu(t):null}function Ce(...t){console.warn("FullCalendar:",...t)}const dr={};function G(t,e){return!t||typeof t=="string"?t:(ju(e),"")}function T(t,e){return typeof t=="function"?n=>G(t(n),e):G(t,e)}function ju(t){dr[t]||(Ce(`Invalid option \`${t}\`: expected a className string or a falsy value.`),dr[t]=!0)}function un(t){t.preventDefault()}function Bu(t,e){return n=>{let s=n.target.closest(t);s&&e.call(s,n,s)}}function na(t,e,n,s){let r=Bu(n,s);return t.addEventListener(e,r),()=>{t.removeEventListener(e,r)}}function _u(t,e,n,s){let r;return na(t,"mouseover",e,(i,a)=>{if(a!==r){r=a,n(i,a);let o=l=>{r=null,s(l,a),a.removeEventListener("mouseleave",o)};a.addEventListener("mouseleave",o)}})}const ur=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Uu(t,e){let n=s=>{e(s),ur.forEach(r=>{t.removeEventListener(r,n)})};ur.forEach(s=>{t.addEventListener(s,n)})}function gs(t){return{onClick:t,...sa(t)}}function sa(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let hr=0;function Se(){return hr+=1,String(hr)}function ms(){document.body.classList.add(h.notAllowed)}function ps(){document.body.classList.remove(h.notAllowed)}function Fu(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",un)}function Vu(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",un)}function zu(t){t.addEventListener("contextmenu",un)}function Gu(t){t.removeEventListener("contextmenu",un)}function Yu(t){let e=[],n=[],s,r;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),s=0;s<n.length;s+=1)r=n[s],typeof r=="string"?e.push(r.charAt(0)==="-"?{field:r.substring(1),order:-1}:{field:r,order:1}):typeof r=="function"&&e.push({func:r});return e}function qu(t,e,n){let s,r;for(s=0;s<n.length;s+=1)if(r=Zu(t,e,n[s]),r)return r;return 0}function Zu(t,e,n){return n.func?n.func(t,e):$u(t[n.field],e[n.field])*(n.order||1)}function $u(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 oe(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((s,r,i)=>s.replace("$"+i,r||""),t):n}function Xu(t,e){return t-e}function ra(t,e){return t===e}function ue(t){const e=t.borderless;return{borderlessX:!!(t.borderlessX??e),borderlessTop:!!(t.borderlessTop??e),borderlessBottom:!!(t.borderlessBottom??e)}}const{hasOwnProperty:qe}=Object.prototype;function Pe(t,e){let n={};for(let s in t)e(t[s],s)&&(n[s]=t[s]);return n}function ye(t,e){let n={};for(let s in t)n[s]=e(t[s],s);return n}function ia(t){let e=[];for(let n in t)e.push(t[n]);return e}function aa(t){let e={};for(let n of t)e[n]=!0;return e}function Ku(t,e){return typeof t=="object"&&t&&typeof e=="object"&&e?vs(t,e,Re):t===e}function vs(t,e,n){if(t===e)return!0;for(let s in t)if(qe.call(t,s)&&!(s in e))return!1;for(let s in e)if(qe.call(e,s)&&(!(s in t)||!n(t[s],e[s],s)))return!1;return!0}function Rn(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Re(t,e):t===e}function Re(t,e){return vs(t,e,ra)}function fr(t,e,n){return vs(t,e,(s,r,i)=>{const a=n[i];return a?a(s,r):s===r})}function Ju(t,e){let n=[];for(let s in t)qe.call(t,s)&&(s in e||n.push(s));for(let s in e)qe.call(e,s)&&t[s]!==e[s]&&n.push(s);return n}function Qu(t,e){return t?eh(t,e,th):e}function eh(t,e,n){const s={};for(let r in t)qe.call(t,r)&&(r in e||(s[r]=t[r]));for(let r in e)qe.call(e,r)&&(r in t?s[r]=n(t[r],e[r]):s[r]=e[r]);return s}function th(t,e){return Object.assign({},t,e)}function Ht(t,e){return Array.isArray(t)&&Array.isArray(e)?Ze(t,e):t===e}function Ze(t,e,n=ra){if(t===e)return!0;let s=t.length,r;if(s!==e.length)return!1;for(r=0;r<s;r+=1)if(!n(t[r],e[r]))return!1;return!0}const gr={navLinkDayClick:y,navLinkWeekClick:y,duration:W,buttons:y,toolbarElements:y,prevText:String,nextText:String,prevYearText:String,nextYearText:String,todayText:String,yearText:String,monthText:String,weekTextLong:String,weekTextShort:String,dayText:String,listText:y,todayHint:y,prevHint:y,nextHint:y,buttonDisplay:y,buttonGroupClass:T,buttonClass:T,defaultAllDayEventDuration:W,defaultTimedEventDuration:W,nextDayThreshold:W,scrollTime:W,scrollTimeReset:Boolean,slotMinTime:W,slotMaxTime:W,popoverFormat:j,slotDuration:W,snapDuration:W,headerToolbar:y,footerToolbar:y,forceEventDuration:Boolean,dayLaneClass:T,dayLaneInnerClass:T,dayLaneDidMount:y,dayLaneWillUnmount:y,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:y,weekNumbers:Boolean,weekNumberHeaderClass:T,weekNumberHeaderInnerClass:T,weekNumberHeaderContent:y,weekNumberHeaderDidMount:y,weekNumberHeaderWillUnmount:y,inlineWeekNumberClass:T,inlineWeekNumberContent:y,inlineWeekNumberDidMount:y,inlineWeekNumberWillUnmount:y,editable:Boolean,controller:y,nowIndicator:Boolean,nowIndicatorSnap:y,nowIndicatorHeaderClass:T,nowIndicatorHeaderContent:y,nowIndicatorHeaderDidMount:y,nowIndicatorHeaderWillUnmount:y,nowIndicatorDotClass:G,nowIndicatorLineClass:T,nowIndicatorLineContent:y,nowIndicatorLineDidMount:y,nowIndicatorLineWillUnmount:y,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:y,locale:y,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:y,eventOrder:Yu,eventOrderStrict:Boolean,eventSlicing:Boolean,eventPrintLayout:String,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:y,contentHeight:y,direction:String,colorScheme:String,weekNumberFormat:j,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,progressiveEventRendering:Boolean,businessHours:y,initialDate:y,now:y,eventDataTransform:y,tableHeaderSticky:y,footerScrollbarSticky:y,defaultAllDay:Boolean,eventSourceFailure:y,eventSourceSuccess:y,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:y,eventConstraint:y,eventAllow:y,eventColor:String,eventContrastColor:String,eventDidMount:y,eventWillUnmount:y,eventContent:y,eventClass:T,eventInnerClass:T,eventTimeClass:T,eventTitleClass:T,eventBeforeClass:T,eventAfterClass:T,listItemEventClass:T,listItemEventInnerClass:T,listItemEventTimeClass:T,listItemEventTitleClass:T,listItemEventBeforeClass:T,listItemEventAfterClass:T,blockEventClass:T,blockEventInnerClass:T,blockEventTimeClass:T,blockEventTitleClass:T,blockEventBeforeClass:T,blockEventAfterClass:T,rowEventClass:T,rowEventInnerClass:T,rowEventTimeClass:T,rowEventTitleClass:T,rowEventTitleSticky:Boolean,rowEventBeforeClass:T,rowEventBeforeContent:y,rowEventAfterClass:T,rowEventAfterContent:y,columnEventClass:T,columnEventInnerClass:T,columnEventTimeClass:T,columnEventTitleClass:T,columnEventTitleSticky:Boolean,columnEventBeforeClass:T,columnEventAfterClass:T,backgroundEventClass:T,backgroundEventDidMount:y,backgroundEventWillUnmount:y,backgroundEventContent:y,backgroundEventInnerClass:T,backgroundEventTitleClass:T,backgroundEventColor:String,selectConstraint:y,selectOverlap:y,selectAllow:y,droppable:Boolean,unselectCancel:String,slotHeaderFormat:y,slotLaneClass:T,slotLaneDidMount:y,slotLaneWillUnmount:y,slotHeaderClass:T,slotHeaderInnerClass:T,slotHeaderContent:y,slotHeaderDidMount:y,slotHeaderWillUnmount:y,slotHeaderAlign:y,slotHeaderSticky:y,slotHeaderRowClass:G,slotHeaderDividerClass:T,dayMaxEvents:y,dayMaxEventRows:y,dayMinWidth:Number,slotHeaderInterval:W,dayHeaderClass:T,dayHeaderInnerClass:T,dayHeaderContent:y,dayHeaderDidMount:y,dayHeaderWillUnmount:y,dayHeaderAlign:y,_dayHeaderSticky:y,dayHeaderRowClass:G,dayHeaderDividerClass:T,dayRowClass:G,dayCellDidMount:y,dayCellWillUnmount:y,dayCellClass:T,dayCellInnerClass:T,dayCellTopContent:y,dayCellTopClass:T,dayCellTopInnerClass:T,dayCellBottomClass:T,allDaySlot:Boolean,allDayText:String,allDayHeaderClass:T,allDayHeaderInnerClass:T,allDayHeaderContent:y,allDayHeaderDidMount:y,allDayHeaderWillUnmount:y,timedText:String,slotMinWidth:Number,slotMinHeight:Number,navLinks:Boolean,eventTimeFormat:j,rerenderDelay:Number,moreLinkText:y,moreLinkHint:y,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:W,hiddenDays:y,fixedWeekCount:Boolean,validRange:y,visibleRange:y,titleFormat:y,eventInteractive:Boolean,noEventsText:String,viewHint:y,viewChangeHint:String,navLinkHint:y,closeHint:String,eventsHint:String,headingLevel:Number,moreLinkClick:y,moreLinkContent:y,moreLinkDidMount:y,moreLinkWillUnmount:y,moreLinkClass:T,moreLinkInnerClass:T,rowMoreLinkClass:T,rowMoreLinkInnerClass:T,columnMoreLinkClass:T,columnMoreLinkInnerClass:T,navLinkClass:G,monthStartFormat:j,dayCellFormat:j,handleCustomRendering:y,customRenderingMetaMap:y,popoverClass:G,popoverCloseClass:G,popoverCloseContent:y,dayNarrowWidth:Number,borderless:Boolean,borderlessX:Boolean,borderlessTop:Boolean,borderlessBottom:Boolean,fillerClass:T,headerToolbarClass:T,footerToolbarClass:T,toolbarClass:T,toolbarSectionClass:T,toolbarTitleClass:G,tableClass:T,tableHeaderClass:T,tableBodyClass:T,nonBusinessHoursClass:G,highlightClass:G,dayHeaders:Boolean,dayHeaderFormat:j,allDayDividerClass:G,listDaysClass:G,listDayClass:T,listDayFormat:vr,listDayAltFormat:vr,listDayHeaderDidMount:y,listDayHeaderWillUnmount:y,listDayHeaderClass:T,listDayHeaderInnerClass:T,listDayHeaderContent:y,listDayBodyClass:T,noEventsClass:T,noEventsInnerClass:T,noEventsContent:y,noEventsDidMount:y,noEventsWillUnmount:y,multiMonthMaxColumns:Number,singleMonthMinWidth:Number,singleMonthTitleFormat:j,singleMonthDidMount:y,singleMonthWillUnmount:y,singleMonthClass:T,singleMonthHeaderClass:T,singleMonthHeaderInnerClass:T},Tn={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},mr={datesSet:y,eventsSet:y,eventAdd:y,eventChange:y,eventRemove:y,eventClick:y,eventMouseEnter:y,eventMouseLeave:y,select:y,unselect:y,loading:y,_unmount:y,_beforeprint:y,_afterprint:y,_noDateSelect:y,_noEventDrop:y,_noEventResize:y,_timeScrollRequest:y,dateClick:y,eventDragStart:y,eventDragStop:y,eventDrop:y,eventResizeStart:y,eventResizeStop:y,eventResize:y,drop:y,eventReceive:y,eventLeave:y},pr={class:T,className:T,viewClass:T,viewDidMount:y,viewWillUnmount:y,views:y,plugins:y,initialEvents:y,events:y,eventSources:y},nh={type:String,component:y,class:T,className:T,content:y,didMount:y,willUnmount:y,buttonTextKey:String,dateProfileGeneratorClass:y,usesMinMaxTime:Boolean,disallowAmbigTitle:Boolean},Be={dateIncrement:Rn,headerToolbar:Rn,footerToolbar:Rn,buttons:Ku,plugins:Ht,events:Ht,eventSources:Ht,resources:Ht};function ys(t,e){let n={},s={};for(let r in e)r in t&&(n[r]=e[r](t[r],r));for(let r in t)r in e||(s[r]=t[r]);return{refined:n,extra:s}}function y(t){return t}function vr(t){return t===!1?null:j(t)}function oa(t){let e=Math.floor(Oe(t.start,t.end))||1,n=B(t.start),s=V(n,e);return{start:n,end:s}}function la(t,e=W(0)){let n=null,s=null;if(t.end){s=B(t.end);let r=t.end.valueOf()-s.valueOf();r&&r>=ve(e)&&(s=V(s,1))}return t.start&&(n=B(t.start),s&&s<=n&&(s=V(n,1))),{start:n,end:s}}function Fe(t,e,n,s){return s==="year"?W(n.diffWholeYears(t,e),"year"):s==="month"?W(n.diffWholeMonths(t,e),"month"):su(t,e)}function Ss(t,e){return{instanceId:Se(),defId:t,range:e}}function sh(t,e,n,s){for(let r=0;r<s.length;r+=1){let i=s[r].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:r}}}return null}function ke(t,e,n){let{dateEnv:s,pluginHooks:r,options:i}=n,{defs:a,instances:o}=t;o=Pe(o,l=>!a[l.defId].recurringDef);for(let l in a){let c=a[l];if(c.recurringDef){let{duration:u}=c.recurringDef;u||(u=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);let f=rh(c,u,e,s,r.recurringTypes);for(let g of f){let m=Ss(l,{start:g,end:s.add(g,u)});o[m.instanceId]=m}}}return{defs:a,instances:o}}function rh(t,e,n,s,r){let a=r[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:s.subtract(n.start,e),end:n.end},s);return t.allDay&&(a=a.map(B)),a}function mt(t,e,n,s,r,i){let a=ie(),o=Ds(n);for(let l of t){let c=ua(l,e,n,s,o,r,i);c&&Wn(c,a)}return a}function Wn(t,e=ie()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function Es(t,e){let n=t.instances[e];if(n){let s=t.defs[n.defId],r=hn(t,i=>ih(s,i));return r.defs[s.defId]=s,r.instances[n.instanceId]=n,r}return ie()}function ih(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function ie(){return{defs:{},instances:{}}}function bs(t,e){return{defs:{...t.defs,...e.defs},instances:{...t.instances,...e.instances}}}function hn(t,e){let n=Pe(t.defs,e),s=Pe(t.instances,r=>n[r.defId]);return{defs:n,instances:s}}function ah(t,e){let{defs:n,instances:s}=t,r={},i={};for(let a in n)e.defs[a]||(r[a]=n[a]);for(let a in s)!e.instances[a]&&r[s[a].defId]&&(i[a]=s[a]);return{defs:r,instances:i}}function oh(t,e){return Array.isArray(t)?mt(t,null,e,!0):typeof t=="object"&&t?mt([t],null,e,!0):t!=null?String(t):null}const Gt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:y,overlap:y,allow:y,class:G,className:G,color:String,contrastColor:String},lh={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""};function Yt(t,e){let n=oh(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 ca(t){return t.reduce(ch,lh)}function ch(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:b(t.className,e.className)}}const Wt={id:String,groupId:String,title:String,url:String,interactive:Boolean},da={start:y,end:y,date:y,allDay:Boolean},dh={...Wt,...da,extendedProps:y};function ua(t,e,n,s,r=Ds(n),i,a){let{refined:o,extra:l}=ha(t,n,r),c=hh(e,n),u=sh(o,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let g=jn(o,l,e?e.sourceId:"",u.allDay,!!u.duration,n,i);return g.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:g,instance:null}}let f=uh(o,c,n,s);if(f){let g=jn(o,l,e?e.sourceId:"",f.allDay,f.hasEnd,n,i),m=Ss(g.defId,f.range);return a&&g.publicId&&a[g.publicId]&&(m.instanceId=a[g.publicId]),{def:g,instance:m}}return null}function ha(t,e,n=Ds(e)){return ys(t,n)}function Ds(t){return{...Gt,...dh,...t.pluginHooks.eventRefiners}}function jn(t,e,n,s,r,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]:"")||Se(),sourceId:n,allDay:s,hasEnd:r,interactive:t.interactive,ui:Yt(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 uh(t,e,n,s){let{allDay:r}=t,i,a=null,o=!1,l,c=null,u=t.start!=null?t.start:t.date;if(i=n.dateEnv.createMarkerMeta(u),i)a=i.marker;else if(!s)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),r==null&&(e!=null?r=e:r=(!i||i.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),r&&a&&(a=B(a)),l&&(c=l.marker,r&&(c=B(c)),a&&c<=a&&(c=null)),c?o=!0:s||(o=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,r?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:r,hasEnd:o,range:{start:a,end:c}}}function hh(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}const fh={start:y,end:y,allDay:Boolean};function gh(t,e,n){let s=mh(t,e),{range:r}=s;if(!r.start)return null;if(!r.end){if(n==null)return null;r.end=e.add(r.start,n)}return s}function mh(t,e){let{refined:n,extra:s}=ys(t,fh),r=n.start?e.createMarkerMeta(n.start):null,i=n.end?e.createMarkerMeta(n.end):null,{allDay:a}=n;return a==null&&(a=r&&r.isTimeUnspecified&&(!i||i.isTimeUnspecified)),{range:{start:r?r.marker:null,end:i?i.marker:null},allDay:a,...s}}function ph(t,e){return mu(t.range,e.range)&&t.allDay===e.allDay&&vh(t,e)}function vh(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 yh(t,e){return{...ga(t.range,e,t.allDay),allDay:t.allDay}}function fa(t,e,n){return{...ga(t,e,n),timeZone:e.timeZone}}function ga(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 Sh(t,e,n){let s=ha({editable:!1},n),r=jn(s.refined,s.extra,"",t.allDay,!0,n);return{def:r,ui:va(r,e),instance:Ss(r.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function ma(t,e,n){n.emitter.trigger("select",{...ws(t,n),jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view})}function Eh(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function ws(t,e){let n={};for(let s of e.pluginHooks.dateSpanTransforms)Object.assign(n,s(t,e));return Object.assign(n,yh(t,e.dateEnv)),n}function yr(t,e,n){let{dateEnv:s,options:r}=n,i=e;return t?(i=B(i),i=s.add(i,r.defaultAllDayEventDuration)):i=s.add(i,r.defaultTimedEventDuration),i}function Cs(t,e,n,s){let r=Zt(t.defs,e),i=ie();for(let a in t.defs){let o=t.defs[a];i.defs[a]=bh(o,r[a],n,s)}for(let a in t.instances){let o=t.instances[a],l=i.defs[o.defId];i.instances[a]=Dh(o,l,r[o.defId],n,s)}return i}function bh(t,e,n,s){let r=n.standardProps||{};r.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(r.hasEnd=!0);let i={...t,...r,ui:{...t.ui,...r.ui}};n.extendedProps&&(i.extendedProps={...i.extendedProps,...n.extendedProps});for(let a of s.pluginHooks.eventDefMutationAppliers)a(i,n,s);return!i.hasEnd&&s.options.forceEventDuration&&(i.hasEnd=!0),i}function Dh(t,e,n,s,r){let{dateEnv:i}=r,a=s.standardProps&&s.standardProps.allDay===!0,o=s.standardProps&&s.standardProps.hasEnd===!1,l={...t};return a&&(l.range=oa(l.range)),s.datesDelta&&n.startEditable&&(l.range={start:i.add(l.range.start,s.datesDelta),end:i.add(l.range.end,s.datesDelta)}),s.startDelta&&n.durationEditable&&(l.range={start:i.add(l.range.start,s.startDelta),end:l.range.end}),s.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,s.endDelta)}),o&&(l.range={start:l.range.start,end:yr(e.allDay,l.range.start,r)}),e.allDay&&(l.range={start:B(l.range.start),end:B(l.range.end)}),l.range.end<l.range.start&&(l.range.end=yr(e.allDay,l.range.start,r)),l}class _e{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 F{constructor(e,n,s){this._context=e,this._def=n,this._instance=s||null}setProp(e,n){if(e in da)Ce(`Cannot set date-related event property \`${e}\`. Use a method instead.`);else if(e==="id")n=Wt[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Wt)n=Wt[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Gt){let s=Gt[e](n);e==="editable"?s={startEditable:n,durationEditable:n}:s={[e]:n},this.mutate({standardProps:{ui:s}})}else Ce(`Cannot set event property \`${e}\`. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:s}=this._context,r=s.createMarker(e);if(r&&this._instance){let i=this._instance.range,a=Fe(i.start,r,s,n.granularity);n.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(e,n={}){let{dateEnv:s}=this._context,r;if(!(e!=null&&(r=s.createMarker(e),!r))&&this._instance)if(r){let i=Fe(this._instance.range.end,r,s,n.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,s={}){let{dateEnv:r}=this._context,i={allDay:s.allDay},a=r.createMarker(e),o;if(a&&!(n!=null&&(o=r.createMarker(n),!o))&&this._instance){let l=this._instance.range;s.allDay===!0&&(l=oa(l));let c=Fe(l.start,a,r,s.granularity);if(o){let u=Fe(l.end,o,r,s.granularity);Su(c,u)?this.mutate({datesDelta:c,standardProps:i}):this.mutate({startDelta:c,endDelta:u,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:c,standardProps:i})}}moveStart(e){let n=W(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=W(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=W(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let s={allDay:e},{maintainDuration:r}=n;r==null&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(s.hasEnd=r),this.mutate({standardProps:s})}formatRange(e){let{dateEnv:n}=this._context,s=this._instance,r=j(e);return this._def.hasEnd?q(n.formatRangeToParts(s.range.start,s.range.end,r)):q(n.formatToParts(s.range.start,r))}mutate(e){let n=this._instance;if(n){let s=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),a=Es(i,n.instanceId);a=Cs(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""}},e,r);let l=new F(r,s,n);this._def=a.defs[s.defId],this._instance=a.instances[n.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:a}),r.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:Ie(a,r,n),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,n=pa(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 _e(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}get 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:s}=n,{startStr:r,endStr:i}=this,a={allDay:n.allDay};return n.title&&(a.title=n.title),r&&(a.start=r),i&&(a.end=i),n.publicId&&(a.id=n.publicId),n.groupId&&(a.groupId=n.groupId),n.url&&(a.url=n.url),s.display&&s.display!=="auto"&&(a.display=s.display),s.color&&(a.color=s.color),s.contrastColor&&(a.contrastColor=s.contrastColor),s.className&&(a.className=s.className),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,n.extendedProps):a.extendedProps=n.extendedProps),a}toJSON(){return this.toPlainObject()}}function pa(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Ie(t,e,n){let{defs:s,instances:r}=t,i=[],a=n?n.instanceId:"";for(let o in r){let l=r[o],c=s[l.defId];l.instanceId!==a&&i.push(new F(e,c,l))}return i}function fn(t){return t.eventRange.instance.instanceId}function Bn(t,e,n,s){let r={},i={},a={},o=[],l=[],c=Zt(t.defs,e);for(let u in t.defs){let f=t.defs[u];c[f.defId].display==="inverse-background"&&(f.groupId?(r[f.groupId]=[],a[f.groupId]||(a[f.groupId]=f)):i[u]=[])}for(let u in t.instances){let f=t.instances[u],g=t.defs[f.defId],m=c[g.defId],v=f.range,p=!g.allDay&&s?la(v,s):v,S=we(p,n);S&&(m.display==="inverse-background"?g.groupId?r[g.groupId].push(S):i[f.defId].push(S):m.display!=="none"&&(m.display==="background"?o:l).push({def:g,ui:m,instance:f,range:S,isStart:p.start&&p.start.valueOf()===S.start.valueOf(),isEnd:p.end&&p.end.valueOf()===S.end.valueOf()}))}for(let u in r){let f=r[u],g=ir(f,n);for(let m of g){let v=a[u],p=c[v.defId];o.push({def:v,ui:p,instance:null,range:m,isStart:!1,isEnd:!1})}}for(let u in i){let f=i[u],g=ir(f,n);for(let m of g)o.push({def:t.defs[u],ui:c[u],instance:null,range:m,isStart:!1,isEnd:!1})}return{bg:o,fg:l}}function wh(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function qt(t,e){t.fcEventRange=e}function $e(t){return t.fcEventRange||t.parentNode.fcEventRange||null}function Zt(t,e){return ye(t,n=>va(n,e))}function va(t,e){const n=[],s=e[""],r=e[t.defId];return s&&n.push(s),r&&n.push(r),n.push(t.ui),ca(n)}function Rs(t,e){let n=t.map(Ch);return n.sort((s,r)=>qu(s,r,e)),n.map(s=>s._seg)}function Ch(t){let{eventRange:e}=t,n=e.def,s=e.instance?e.instance.range:e.range,r=s.start?s.start.valueOf():0,i=s.end?s.end.valueOf():0;return{...n.extendedProps,...n,id:n.publicId,start:r,end:i,duration:i-r,allDay:Number(n.allDay),_seg:t}}function Rh(t,e){let{pluginHooks:n}=e,s=n.isDraggableTransformers,{def:r,ui:i}=t,a=i.startEditable;for(let o of s)a=o(a,r,i,e);return a}function Th(t,e,n,s,r,i,a,o=!0,l=!0){const{dateEnv:c,options:u}=a,{def:f}=e;let{displayEventTime:g,displayEventEnd:m}=u;g==null&&(g=o!==!1),m==null&&(m=l!==!1);const v=!r&&n&&B(n).valueOf()!==B(e.instance.range.start).valueOf()?n:e.instance.range.start,p=!i&&s&&B(He(s,-1)).valueOf()!==B(He(e.instance.range.end,-1)).valueOf()?s:e.instance.range.end;if(g&&!f.allDay){if(m&&(r||i)&&f.hasEnd){const S=c.formatRangeToParts(v,p,t),D=Mh(S);return D!=null?q(c.formatToParts(v,t))+D+q(c.formatToParts(p,t)):q(S)}if(r)return q(c.formatToParts(v,t))}return""}const xh=new Set(["year","month","day"]);function Mh(t){let e,n=!1;for(const s of t)s.source==="shared"&&(e=s),xh.has(s.type)&&(n=!0);return n?e.value:void 0}function Le(t,e,n){let s=t.range;return{isPast:s.end<=(n||e.start),isFuture:s.start>=(n||e.end),isToday:e&&pe(e,s.start)}}function Ih(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Nh(t,e){let{def:n,instance:s}=t,{url:r}=n;if(r)return["a",{href:r},!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=sa(c=>{i.trigger("eventClick",{el:c.target,event:new F(e,n,s),jsEvent:c,view:e.viewApi})}),l={role:"button",...l}),["div",l,o]}const Hh=/(^c|C)lass(Name)?$/,Ph=/Content$/,kh=/(DidMount|WillUnmount)$/,Lh=/^on[A-Z]/,Ah={buttons:Qu};function Oh(...t){const e={};for(const n of t)for(const s in n){const r=n[s];e[s]?e[s]=fe(e[s],r):e[s]=r}return e}function fe(...t){let e={};for(const n of t)for(let s in n)if(s in e){const r=Ah[s]||(Hh.test(s)?Wh:Ph.test(s)?jh:kh.test(s)?Bh:void 0);e[s]=r?r(e[s],n[s],s):n[s]}else e[s]=n[s];return e}function Wh(t,e,n){const s=typeof t=="function",r=typeof e=="function";if(s||r){const i=a=>b(G(s?t(a):t,n),G(r?e(a):e,n));return i.parts=[t,e],i}return b(G(t,n),G(e,n))}function jh(t,e){if(typeof e=="function"){const n=s=>{const r=e(s);return r===!0?typeof t=="function"?t(s):t:r};return n.parts=[t,e],n}return e??t}function Bh(t,e){if(t&&e){const n=(...s)=>{t(...s),e(...s)};return n.parts=[t,e],n}return t||e}function _h(t,e){const n=Ju(t,e);for(let s of n)if(!Lh.test(s))return!1;return!0}function _n(t,e){const n=t&&t.parts,s=e&&e.parts;if(n&&s){const r=n.length,i=s.length;if(r!==i)return!1;for(let a=0;a<r;a++)if(!(n[a]===s[a]||_n(n[a],s[a])))return!1;return!0}return!1}const Uh=[],ya={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"},Sa={...ya,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 Fh(t){let e=t.length>0?t[0].code:"en",n=Uh.concat(t),s={en:Sa};for(let r of n)s[r.code]=r;return{map:s,defaultCode:e}}function Ea(t,e){return typeof t=="object"&&!Array.isArray(t)?ba(t.code,[t.code],t):Vh(t,e)}function Vh(t,e){let n=[].concat(t||[]),s=zh(n,e)||Sa;return ba(t,n,s)}function zh(t,e){for(let n=0;n<t.length;n+=1){let s=t[n].toLocaleLowerCase().split("-");for(let r=s.length;r>0;r-=1){let i=s.slice(0,r).join("-");if(e[i])return e[i]}}return null}function ba(t,e,n){let s=fe(ya,n);delete s.code;let{week:r}=s;return delete s.week,{codeArg:t,codes:e,week:r,simpleNumberFormat:new Intl.NumberFormat(t),options:s}}class Sr extends Error{constructor(e,n){super(e),this.response=n}}function Gh(t,e,n){t=t.toUpperCase();const s={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(s.body=new URLSearchParams(n),s.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,s).then(r=>{if(r.ok)return r.json().then(i=>[i,r],()=>{throw new Sr("Failure parsing JSON",r)});throw new Sr("Request failed",r)})}function Yh(t,e){e.emitter.trigger("datesSet",{...fa(t.activeRange,e.dateEnv),view:e.viewApi})}function qh(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Ie(t,e))}let Zh={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const $h={name:"array-event-source",eventSourceDefs:[Zh]};function Xh(t,e,n){let s=!1,r=function(o){s||(s=!0,e(o))},i=function(o){s||(s=!0,n(o))},a=t(r,i);a&&typeof a.then=="function"&&a.then(r,i)}let Kh={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:s}=t.context,r=t.eventSource.meta;Xh(r.bind(null,fa(t.range,s)),i=>e({rawEvents:i}),n)}};const Jh={name:"func-event-source",eventSourceDefs:[Kh]},Qh={method:String,extraParams:y,startParam:String,endParam:String,timeZoneParam:String};let ef={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:s}=t.eventSource,r=nf(s,t.range,t.context);Gh(s.method,s.url,r).then(([i,a])=>{e({rawEvents:i,response:a})},n)}};const tf={name:"json-event-source",eventSourceRefiners:Qh,eventSourceDefs:[ef]};function nf(t,e,n){let{dateEnv:s,options:r}=n,i,a,o,l,c={};return i=t.startParam,i==null&&(i=r.startParam),a=t.endParam,a==null&&(a=r.endParam),o=t.timeZoneParam,o==null&&(o=r.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(c,l),c[i]=s.formatIso(e.start),c[a]=s.formatIso(e.end),s.timeZone!=="local"&&(c[o]=s.timeZone),c}const sf={name:"change-handler",optionChangeHandlers:{controller(t,e){t._setApi(e.calendarApi)},events(t,e){Er([t],e)},eventSources:Er}};function Er(t,e){let n=ia(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 s=[];for(let r of t){let i=!1;for(let a=0;a<n.length;a+=1)if(n[a]._raw===r){n.splice(a,1),i=!0;break}i||s.push(r)}for(let r of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:r.sourceId});for(let r of s)e.calendarApi.addEventSource(r)}const rf={id:String,defaultAllDay:Boolean,url:String,format:String,events:y,eventDataTransform:y,success:y,failure:y};function Da(t,e,n=wa(e)){let s;if(typeof t=="string"?s={url:t}:typeof t=="function"||Array.isArray(t)?s={events:t}:typeof t=="object"&&t&&(s=t),s){let{refined:r,extra:i}=ys(s,n),a=af(r,e);if(a)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:r.defaultAllDay,eventDataTransform:r.eventDataTransform,success:r.success,failure:r.failure,publicId:r.id||"",sourceId:Se(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Yt(r,e),extendedProps:i}}return null}function wa(t){return{...Gt,...rf,...t.pluginHooks.eventSourceRefiners}}function af(t,e){let n=e.pluginHooks.eventSourceDefs;for(let s=n.length-1;s>=0;s-=1){let i=n[s].parseMeta(t);if(i)return{sourceDefId:s,meta:i}}return null}function of(t,e,n){let s=e?e.activeRange:null;return Ra({},gf(t,n),s,n)}function lf(t,e,n,s){let r=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Ra(t,e.sources,r,s);case"REMOVE_EVENT_SOURCE":return df(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Ta(t,r,s):t;case"FETCH_EVENT_SOURCES":return Ts(t,e.sourceIds?aa(e.sourceIds):xa(t,s),r,e.isRefetch||!1,s);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 cf(t,e,n){let s=e?e.activeRange:null;return Ts(t,xa(t,n),s,!0,n)}function Ca(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function Ra(t,e,n,s){let r={};for(let i of e)r[i.sourceId]=i;return n&&(r=Ta(r,n,s)),{...t,...r}}function df(t,e){return Pe(t,n=>n.sourceId!==e)}function Ta(t,e,n){return Ts(t,Pe(t,s=>uf(s,e,n)),e,!1,n)}function uf(t,e,n){return Ma(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Ts(t,e,n,s,r){let i={};for(let a in t){let o=t[a];e[a]?i[a]=hf(o,n,s,r):i[a]=o}return i}function hf(t,e,n,s){let{options:r,calendarApi:i}=s,a=s.pluginHooks.eventSourceDefs[t.sourceDefId],o=Se();return a.fetch({eventSource:t,range:e,isRefetch:n,context:s},l=>{let{rawEvents:c}=l;r.eventSourceSuccess&&(c=r.eventSourceSuccess.call(i,c,l.response)||c),t.success&&(c=t.success.call(i,c,l.response)||c),s.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:c})},l=>{let c=!1;r.eventSourceFailure&&(r.eventSourceFailure.call(i,l),c=!0),t.failure&&(t.failure(l),c=!0),c||Ce(`Unhandled event source error: ${l.message}`,l),s.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:l})}),{...t,isFetching:!0,latestFetchId:o}}function ff(t,e,n,s){let r=t[e];return r&&n===r.latestFetchId?{...t,[e]:{...r,isFetching:!1,fetchRange:s}}:t}function xa(t,e){return Pe(t,n=>Ma(n,e))}function gf(t,e){let n=wa(e),s=[].concat(t.eventSources||[]),r=[];t.initialEvents&&s.unshift(t.initialEvents),t.events&&s.unshift(t.events);for(let i of s){let a=Da(i,e,n);a&&r.push(a)}return r}function Ma(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}const mf={daysOfWeek:y,startTime:W,endTime:W,duration:W,startRecur:y,endRecur:y};let pf={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},s;return t.duration&&(s=t.duration),!s&&t.startTime&&t.endTime&&(s=Eu(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:s,typeData:n}}return null},expand(t,e,n){let s=we(e,{start:t.startRecur,end:t.endRecur});return s?yf(t.daysOfWeek,t.startTime,t.dateEnv,n,s):[]}};const vf={name:"simple-recurring-event",recurringTypes:[pf],eventRefiners:mf};function yf(t,e,n,s,r){let i=t?aa(t):null,a=B(r.start),o=r.end,l=[];for(e&&(e.milliseconds<0?o=V(o,1):e.milliseconds>=1e3*60*60*24&&(a=V(a,-1)));a<o;){let c;(!i||i[a.getUTCDay()])&&(e?c=s.add(a,e):c=a,l.push(s.createMarker(n.toDate(c)))),a=V(a,1)}return l}const Sf=[$h,Jh,tf,vf,sf,{name:"misc",isLoadingFuncs:[t=>Ca(t.eventSources)],propSetHandlers:{dateProfile:Yh,eventStore:qh}}];function N(t,e,n){let s,r;return function(...i){if(!s)r=t.apply(this,i);else if(!Ze(s,i)){let a=t.apply(this,i);(!e||!e(a,r))&&(r=a)}return s=i,r}}function dt(t,e,n){let s,r;return i=>(s?Re(s,i)||(r=t.call(this,i)):r=t.call(this,i),s=i,r)}const Ee=M.createContext({});function Ef(t,e,n,s,r,i,a,o,l,c,u,f,g,m){return{dateEnv:r,nowManager:i,options:n,pluginHooks:a,emitter:c,dispatch:o,getCurrentData:l,calendarApi:u,viewSpec:t,viewApi:e,dateProfileGenerator:s,baseId:f,registerInteractiveComponent:g,unregisterInteractiveComponent:m}}class We extends M.Component{shouldComponentUpdate(e,n){return!fr(this.props,e,this.propEquality)||!fr(this.state,n,this.stateEquality)}}We.addPropsEquality=bf;We.addStateEquality=Df;We.contextType=Ee;We.prototype.propEquality={};We.prototype.stateEquality={};class O extends We{}O.contextType=Ee;function bf(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function Df(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function L(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class xs extends O{constructor(){super(...arguments),this.id=Se(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.el=e,this.props.elRef&&L(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:s}=n,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=Ia(e,"",this.handleEl);let l=!1,c,u=[],f;if(r!=null){const g=typeof r=="function"?r(a):r;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?u=Array.prototype.slice.call(g.domNodes):(m?M.isValidElement(g):typeof g!="function")?c=g:f=g}}else l=!wf(e.generatorName,s);return l&&i&&(c=i(a)),this.queuedDomNodes=u,this.currentGeneratorMeta=f,M.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:s}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=s.options;if(r){const a=this.currentGeneratorMeta??i?.[n.generatorName];a&&r({id:this.id,isActive:e,containerEl:this.el,generatorMeta:a,renderProps:n.renderProps})}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,{el:s}=this;if(!Ze(e,n)){for(const r of n)r.remove();for(let r of e)s.appendChild(r);this.currentDomNodes=e}}}xs.addPropsEquality({renderProps:Re,attrs:_h,style:Re});function wf(t,e){return!!(e.handleCustomRendering&&t&&e.customRenderingMetaMap?.[t])}function Ia(t,e,n){const s={...t.attrs,ref:n};return(t.className||e)&&(s.className=b(e,t.className,s.className)),t.style&&(s.style=t.style),s}const Cf=M.createContext(0);class U extends M.Component{constructor(){super(...arguments),this.InnerContent=Rf.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(L(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=w(e.classNameGenerator,e.renderProps);if(e.children){const s=Ia(e,n,this.handleEl),r=e.children(this.InnerContent,e.renderProps,s);return e.tag?M.createElement(e.tag,s,r):r}else return M.createElement(xs,{...e,elRef:this.handleEl,tag:e.tag||"div",className:b(e.className,n),renderId:this.context})}componentDidMount(){this.el?this.props.didMount?.({...this.props.renderProps,el:this.el}):this.didMountMisfire=!0}componentWillUnmount(){this.props.willUnmount?.({...this.props.renderProps,el:this.el})}}U.contextType=Cf;function Rf(t,e){const n=t.props;return M.createElement(xs,{renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context,...e})}function w(t,e){return(typeof t=="function"?t(e):t)||""}function gn(t){return t.text}function ce(t){return t.height==="auto"||t.contentHeight==="auto"}function mn(t){let{tableHeaderSticky:e}=t;return(e==null||e==="auto")&&(e=ce(t)),e}function Na(t){const e=ce(t);let{footerScrollbarSticky:n}=t;return(n==null||n==="auto")&&(n=e),!!n&&e}function Ha(t){const e=t.scrollerSyncerClass;if(!e)throw new RangeError("Must import @fullcalendar/scrollgrid");return e}class Pa{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:s,nowIndicatorSnap:r,dateEnv:i}=this;r==="auto"&&(r=/year|month|week|day/.test(n)||(s||1)===1);let a,o;return r?(a=i.startOf(e,n),o=i.add(a,W(1,n)).valueOf()-e.valueOf()):(a=e,o=1e3*60),o=Math.min(1e3*60*60*24,o),{nowDate:a,todayRange:Tf(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 Tf(t){let e=B(t),n=V(e,1);return{start:e,end:n}}class ka{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,s,r){let{dateEnv:i}=this.props,a=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,s,-1,r)}buildNext(e,n,s,r){let{dateEnv:i}=this.props,a=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,s,1,r)}build(e,n,s,r=!0){let{props:i}=this,a,o,l,c,u,f;return a=this.buildValidRange(n),a=this.trimHiddenDays(a),r&&(e=pu(e,a)),o=this.buildCurrentRangeInfo(e,s),l=/^(year|month|week|day)$/.test(o.unit),c=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,l),c=this.trimHiddenDays(c),u=c,i.showNonCurrentDates||(u=we(u,o.range)),u=this.adjustActiveRange(u),u=we(u,a),f=hs(o.range,a),pe(c,e)||(e=c.start),{currentDate:e,validRange:a,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:l,activeRange:u,renderRange:c,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:f,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(e){let n=this.props.validRangeInput,s=typeof n=="function"?n.call(this.props.calendarApi,this.props.dateEnv.toDate(e)):n;return this.refineRange(s)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:s}=this,r=null,i=null,a=null,o;return s.duration?(r=s.duration,i=s.durationUnit,a=this.buildRangeFromDuration(e,n,r,i)):(o=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,n,o)):(a=this.buildCustomVisibleRange(e))?i=s.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=An(r).unit,a=this.buildRangeFromDuration(e,n,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return W({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:s,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return s&&(ze(r)<0&&(a=B(a),a=n.add(a,r)),ze(i)>1&&(o=B(o),o=V(o,-1),o=n.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,n,s,r){let{dateEnv:i,dateAlignment:a}=this.props,o,l,c;if(!a){let{dateIncrement:f}=this.props;f&&ve(f)<ve(s)?a=An(f).unit:a=r}ze(s)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,n),o=B(o));function u(){o=i.startOf(e,a),l=i.add(o,s),c={start:o,end:l}}return u(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,n),u()),c}buildRangeFromDayCount(e,n,s){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,l;i&&(o=r.startOf(o,i)),o=B(o),o=this.skipHiddenDays(o,n),l=o;do l=V(l,1),this.isHiddenDay(l)||(a+=1);while(a<s);return{start:o,end:l}}buildCustomVisibleRange(e){let{props:n}=this,s=n.visibleRangeInput,r=typeof s=="function"?s.call(n.calendarApi,n.dateEnv.toDate(e)):s,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,n,s){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,s;return n||((s=this.props.dateAlignment)?W(1,s):e||W({days:1}))}refineRange(e){if(e){let n=fu(e,this.props.dateEnv);return n&&(n=la(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],s=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(n[r]=e.indexOf(r)!==-1)||(s+=1);if(!s)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:s}=e;return n&&(n=this.skipHiddenDays(n)),s&&(s=this.skipHiddenDays(s,-1,!0)),n==null||s==null||n<s?{start:n,end:s}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,s=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(s?n:0)+7)%7];)e=V(e,n);return e}}function La(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(Xi(n.start,n.end)>1)return"week"}else if(t.currentRangeUnit==="day"&&ft(n.start,n.end)>1)return"day"}function Aa(t,e,n){if(t.valueOf()===B(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 xf(t,e,n,s,r){switch(e.type){case"RECEIVE_EVENTS":return Mf(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,r);case"RESET_RAW_EVENTS":return If(t,n[e.sourceId],e.rawEvents,s.activeRange,r);case"ADD_EVENTS":return Nf(t,e.eventStore,s?s.activeRange:null,r);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return bs(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return s?ke(t,s.activeRange,r):t;case"REMOVE_EVENTS":return ah(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return Wa(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return hn(t,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return ie();default:return t}}function Mf(t,e,n,s,r,i){if(e&&n===e.latestFetchId){let a=mt(Oa(r,e,i),e,i);return s&&(a=ke(a,s,i)),bs(Wa(t,e.sourceId),a)}return t}function If(t,e,n,s,r){const{defIdMap:i,instanceIdMap:a}=Pf(t);let o=mt(Oa(n,e,r),e,r,!1,i,a);return ke(o,s,r)}function Oa(t,e,n){let s=n.options.eventDataTransform,r=e?e.eventDataTransform:null;return r&&(t=br(t,r)),s&&(t=br(t,s)),t}function br(t,e){let n;if(!e)n=t;else{n=[];for(let s of t){let r=e(s);r?n.push(r):r==null&&n.push(s)}}return n}function Nf(t,e,n,s){return n&&(e=ke(e,n,s)),bs(t,e)}function Dr(t,e,n){let{defs:s}=t,r=ye(t.instances,i=>s[i.defId].allDay?i:{...i,range:{start:n.createMarker(e.toDate(i.range.start)),end:n.createMarker(e.toDate(i.range.end))}});return{defs:s,instances:r}}function Wa(t,e){return hn(t,n=>n.sourceId!==e)}function Hf(t,e){return{defs:t.defs,instances:Pe(t.instances,n=>!e[n.instanceId])}}function Pf(t){const{defs:e,instances:n}=t,s={},r={};for(let i in e){const a=e[i],{publicId:o}=a;o&&(s[o]=i)}for(let i in n){const a=n[i],o=e[a.defId],{publicId:l}=o;l&&(r[l]=i)}return{defIdMap:s,instanceIdMap:r}}class nt{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function kf(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function Ms(t){return{[t.component.uid]:t}}const Un={};class Et{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){Lf(this.handlers,e,n)}off(e,n){Af(this.handlers,e,n)}trigger(e,...n){let s=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],s);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 Lf(t,e,n){(t[e]||(t[e]=[])).push(n)}function Af(t,e,n){n?t[e]&&(t[e]=t[e].filter(s=>s!==n)):delete t[e]}function Of(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||{},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 Wf(t,e){let n={},s={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 r(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]=Of(a);s=Bf(s,l),r(a.deps||[])}}}return t&&r(t),r(e),s}function jf(){let t=[],e=[],n;return(s,r)=>((!n||!Ze(s,t)||!Ze(r,e))&&(n=Wf(s,r)),t=s,e=r,n)}function Bf(t,e){return{premiumReleaseDate:_f(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:Oh(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 _f(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}function Uf(t,e){let n={},s;for(s in t)Fn(s,n,t,e);for(s in e)Fn(s,n,t,e);return n}function Fn(t,e,n,s){if(e[t])return e[t];let r=Ff(t,e,n,s);return r&&(e[t]=r),r}function Ff(t,e,n,s){let r=n[t],i=s[t],a=u=>r&&r[u]!==null?r[u]:i&&i[u]!==null?i[u]: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=Fn(l,e,n,s)}return!o&&c&&(o=c.component),o?{type:t,component:o,defaults:fe(c?c.defaults:{},r?r.rawOptions:{}),overrides:fe(c?c.overrides:{},i?i.rawOptions:{})}:null}function wr(t){return ye(t,Vf)}function Vf(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Cr(e.content):n&&!(n.prototype instanceof O)&&(n=Cr(n)),{superType:e.type,component:n,rawOptions:e}}function Cr(t){return e=>d.jsx(Ee.Consumer,{children:n=>{const{options:s,viewSpec:r}=n,i={...e,nextDayThreshold:s.nextDayThreshold,...ue(s),options:{headerToolbar:s.headerToolbar,footerToolbar:s.footerToolbar},isHeightAuto:ce(s),view:n.viewApi};return d.jsx(U,{tag:"div",className:b(w(s.viewClass,i),w(r.optionDefaults.class,i),w(r.optionDefaults.className,i),w(r.optionOverrides.class,i),w(r.optionOverrides.className,i)),renderProps:i,generatorName:void 0,customGenerator:t,didMount:s.didMount||s.viewDidMount,willUnmount:s.willUnmount||s.viewWillUnmount})}})}function zf(t,e,n){let s=wr(t),r=wr(e.views),i=Uf(s,r);return ye(i,a=>Gf(a,r,e,n))}function Gf(t,e,n,s){let r=t.overrides.duration||t.defaults.duration||s.duration||n.duration,i=null,a="",o="",l={};if(r&&(i=Yf(r),i)){let c=An(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 Rr={};function Yf(t){let e=JSON.stringify(t),n=Rr[e];return n===void 0&&(n=W(t),Rr[e]=n),n}function qf(t,e){return e.type==="CHANGE_VIEW_TYPE"&&(t=e.viewType),t}function Zf(t,e){return e.type==="CHANGE_DATE"?e.dateMarker:t}function $f(t,e,n){let s=t.initialDate;return s!=null?e.createMarker(s):n.getDateMarker()}function Xf(t,e){return e.type==="SET_OPTION"?{...t,[e.optionName]:e.rawOptionValue}:t}function Kf(t,e,n,s,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n,s);case"CHANGE_DATE":return r.build(e.dateMarker,s);case"PREV":if(i=r.buildPrev(t,n,s),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(t,n,s),i.isValid)return i;break}return t}function Jf(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function Qf(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function eg(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 tg(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 ng(t,e,n){let s=t.headerToolbar?Tr(t.headerToolbar,t,e,n):null,r=t.footerToolbar?Tr(t.footerToolbar,t,e,n):null;return{header:s,footer:r}}function Tr(t,e,n,s){let r=e.direction==="rtl",i=[],a=!1;function o(c){let u=sg(c,e,n,s);return i.push(...u.viewsWithButtons),a=a||u.hasTitle,u.widgets}return{sectionWidgets:{start:o(t[r?"right":"left"]||t.start||""),center:o(t.center||""),end:o(t[r?"left":"right"]||t.end||"")},viewsWithButtons:i,hasTitle:a}}function sg(t,e,n,s){let r=e.buttons||{},i=e.toolbarElements||{},a=t?t.split(" "):[],o=[],l=!1;return{widgets:a.map(u=>u.split(",").map(f=>{if(f==="title")return l=!0,{name:f};if(i[f])return{name:f,customElement:i[f]};let g,m=r[f]||{},v,p,S;if(g=n[f]){o.push(f);const D=g.optionDefaults.buttonTextKey;v=m.text||(D?e[D]:"")||(g.singleUnit?e[g.singleUnit+"TextLong"]||e[g.singleUnit+"Text"]:"")||f,p=oe(m.hint||e.viewHint,[v,f],v),S=R=>{m?.click?.(R),R.defaultPrevented||s.changeView(f)}}else v=m.text||e[f+"TextLong"]||e[f+"Text"]||f,f==="prevYear"?p=oe(m.hint||e.prevHint,[e.yearText,"year"],v):f==="nextYear"?p=oe(m.hint||e.nextHint,[e.yearText,"year"],v):p=D=>oe(m.hint||e[f+"Hint"],[e[D+"TextLong"]||e[D+"Text"],D],v),S=D=>{m?.click?.(D),D.defaultPrevented||s[f]?.()};return{name:f,isView:!!g,buttonText:v,buttonHint:p,buttonDisplay:m.display,buttonIconClass:m.iconClass,buttonIconContent:m.iconContent,buttonClick:S,buttonIsPrimary:m.isPrimary||!1,buttonClass:m.class??m.className,buttonDidMount:m.didMount,buttonWillUnmount:m.willUnmount}})),viewsWithButtons:o,hasTitle:l}}class rg{constructor(e,n,s){this.type=e,this.getCurrentData=n,this.dateEnv=s}get 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 ig={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",className:"",groupId:"_businessHours"};function ag(t,e){return mt(og(t),null,e)}function og(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=>({...ig,...n})),e}function lg(t,e,n){let s;/^(year|month)$/.test(t.currentRangeUnit)?s=t.currentRange:s=t.activeRange;let r;const i={isEndExclusive:t.isRangeAllDay};return e.titleFormat?r=n.formatRangeToParts(s.start,s.end,j(e.titleFormat),i):(r=n.formatRangeToParts(s.start,s.end,j(xr(t,e.disallowAmbigTitle,"long")),i),cg(r)&&(r=n.formatRangeToParts(s.start,s.end,j(xr(t,e.disallowAmbigTitle,"short")),i))),q(r)}function xr(t,e,n){const{currentRangeUnit:s}=t;if(s==="year")return{year:"numeric"};if(s==="month")return{year:"numeric",month:n};if(!e){const r=ft(t.currentRange.start,t.currentRange.end);if(r!==null&&r>1)return{year:"numeric",month:n}}return{year:"numeric",month:"long",day:"numeric"}}function cg(t){let e=!1,n=!1;for(const s of t)s.type==="month"&&(s.source==="startRange"&&(e=!0),s.source==="endRange"&&(n=!0));return e&&n}class Mr{constructor(){this.resetListeners=new Set}handleInput(e,n){const s=this.dateEnv;if(e!==s&&(typeof n=="function"?this.nowFn=n:s||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,s))for(const r of this.resetListeners.values())r()}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 dg{constructor(e){this.computeCurrentViewData=N(this._computeCurrentViewData),this.organizeRawLocales=N(Fh),this.buildLocale=N(Ea),this.buildPluginHooks=jf(),this.buildDateEnv=N(ug),this.parseToolbars=N(ng),this.buildViewSpecs=N(zf),this.buildDateProfileGenerator=dt(hg),this.buildViewApi=N(fg),this.buildViewUiProps=dt(pg),this.buildEventUiBySource=N(gg,Re),this.buildEventUiBases=N(mg),this.parseContextBusinessHours=dt(vg),this.buildToolbarProps=N(yg),this.buildTitle=N(lg),this.nowManager=new Mr,this.isDrainingActionQueue=!1,this.actionQueue=[],this.optionOverrides={},this.emitter=new Et,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 Mr,this.nowTimer=new Pa(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:s}=this;const r=!n,{actionQueue:i}=this,a=[];for(this.isDrainingActionQueue=!0;i.length;){const o=i.shift();({state:n,data:s,calendarContext:e}=this.reduce(n,s,o)),this.state=n,this.data=s,o.type!=="IDLE"&&a.push(o)}if(this.isDrainingActionQueue=!1,r){const o=e.options.controller;o&&o._setApi(this.config.calendarApi)}if(!r&&a.length){const{onDataChange:o}=this.config;o&&o(this.data,a)}}reduce(e,n,s){let{config:r}=this,i=!e,a=i?{}:Xf(e.dynamicOptionOverrides,s),o=this.computeOptionsData(this.optionOverrides,a,r.calendarApi),l=i?o.calendarOptions.initialView||o.pluginHooks.initialView:qf(e.currentViewType,s),c=this.computeCurrentViewData(l,o,this.optionOverrides,a);r.calendarApi.currentDataManager=this,this.emitter.setThisContext(r.calendarApi),this.emitter.setOptions(c.options);let u={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},{nowDate:f}=this.nowTimer.update({unit:"day",unitValue:1,nowIndicatorSnap:"auto",nowManager:this.nowManager,dateEnv:o.dateEnv}),g=i?$f(o.calendarOptions,o.dateEnv,this.nowManager):Zf(e.currentDate,s),m;i?m=c.dateProfileGenerator.build(g,f):(m=e.dateProfile,n&&n.dateProfileGenerator!==c.dateProfileGenerator&&(m=c.dateProfileGenerator.build(g,f)),m=Kf(m,s,g,f,c.dateProfileGenerator)),(s&&(s.type==="PREV"||s.type==="NEXT")||!pe(m.activeRange,g))&&(g=m.currentRange.start);let v=i?of(o.calendarOptions,m,u):lf(e.eventSources,s,m,u),p=i?ie():xf(e.eventStore,s,v,m,u),S=Ca(v),D=i?ie():S&&!c.options.progressiveEventRendering&&e.renderableEventStore||p,{eventUiSingleBase:R,selectionConfig:C}=this.buildViewUiProps(u),E=this.buildEventUiBySource(v),x=i?{}:this.buildEventUiBases(D.defs,R,E),I={dynamicOptionOverrides:a,currentViewType:l,currentDate:g,dateProfile:m,eventSources:v,eventStore:p,renderableEventStore:D,selectionConfig:C,eventUiBases:x,businessHours:this.parseContextBusinessHours(u),dateSelection:i?null:Jf(e.dateSelection,s),eventSelection:i?"":Qf(e.eventSelection,s),eventDrag:i?null:eg(e.eventDrag,s),eventResize:i?null:tg(e.eventResize,s),nowDate:f},k={...u,...I};for(let $ of o.pluginHooks.reducers)Object.assign(I,$(e,s,k));let P=e?Ir(e,u):!1,H=Ir(I,u);!P&&H?this.emitter.trigger("loading",!0):P&&!H&&this.emitter.trigger("loading",!1);let A=this.buildTitle(m,c.options,o.dateEnv),z=this.buildToolbarProps(c.viewSpec,m,c.dateProfileGenerator,g,f,A),_={viewTitle:A,nowManager:this.nowManager,calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData,toolbarProps:z,...o,...c,...I},Z=o.pluginHooks.optionChangeHandlers,re=n&&n.calendarOptions,te=o.calendarOptions;if(re&&re!==te){re.timeZone!==te.timeZone&&(I.eventSources=_.eventSources=cf(_.eventSources,m,_),I.eventStore=_.eventStore=Dr(_.eventStore,n.dateEnv,_.dateEnv),I.renderableEventStore=_.renderableEventStore=Dr(_.renderableEventStore,n.dateEnv,_.dateEnv));for(let $ in Z)(this.optionsForHandling.indexOf($)!==-1||re[$]!==te[$])&&Z[$](te[$],_)}return this.optionsForHandling=[],{state:I,data:_,calendarContext:u}}computeOptionsData(e,n,s){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o}=this.processRawCalendarOptions(e,n),l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekTextLong,r.weekTextShort,i,o),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides),u=this.parseToolbars(r,c,s);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,toolbarConfig:u,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,n){let{locales:s,locale:r}=fe(Tn,e,n),i=this.organizeRawLocales(s),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,l=this.buildPluginHooks(e.plugins||[],Sf),c=this.currentCalendarOptionsRefiners={...gr,...mr,...pr,...l.listenerRefiners,...l.optionRefiners},u=fe(Tn,...l.optionDefaults,o,Hr(fe(e,n),c)),f={},g=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,v=!1;for(let p in u)this.optionsForRefining.indexOf(p)===-1&&(u[p]===g[p]||Be[p]&&p in g&&Be[p](g[p],u[p])||_n(g[p],u[p]))?f[p]=m[p]:c[p]&&(f[p]=c[p](u[p],p),v=!0);return v&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=f,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}}_computeCurrentViewData(e,n,s,r){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,s,r);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,s,r,i){let a={...gr,...mr,...pr,...nh,...n.listenerRefiners,...n.optionRefiners},o=fe(Tn,...n.optionDefaults,e.optionDefaults,s,Hr(fe(r,e.optionOverrides,i),a)),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,f=!1;for(let g in o)o[g]===c[g]||Be[g]&&Be[g](o[g],c[g])||_n(c[g],o[g])?l[g]=u[g]:(o[g]===this.currentCalendarOptionsInput[g]||Be[g]&&Be[g](o[g],this.currentCalendarOptionsInput[g])?g in this.currentCalendarOptionsRefined&&(l[g]=this.currentCalendarOptionsRefined[g]):a[g]&&(l[g]=a[g](o[g],g)),f=!0);return f&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined}}}function ug(t,e,n,s,r,i,a,o){let l=Ea(e||o.defaultCode,o.map);return new xu({calendarSystem:"gregory",timeZone:t,locale:l,weekNumberCalculation:n,firstDay:s,weekTextLong:r,weekTextShort:i,cmdFormatter:a.cmdFormatter})}function hg(t){let e=t.dateProfileGeneratorClass||ka;return new e(t)}function fg(t,e,n){return new rg(t,e,n)}function gg(t){return ye(t,e=>e.ui)}function mg(t,e,n){let s={"":e};for(let r in t){let i=t[r];i.sourceId&&n[i.sourceId]&&(s[r]=n[i.sourceId])}return s}function pg(t){const{options:e}=t;return{eventUiSingleBase:Yt({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:Yt({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function Ir(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function vg(t){return ag(t.options.businessHours,t)}const Nr={};function Hr(t,e){const n={};for(const s in t)e[s]?n[s]=t[s]:Nr[s]||(Ce(`Unknown option \`${s}\`.`),Nr[s]=!0);return n}function yg(t,e,n,s,r,i){let a=n.build(r,r,void 0,!1),o=n.buildPrev(e,s,r,!1),l=n.buildNext(e,s,r,!1);return{title:i,selectedButton:t.type,navUnit:t.singleUnit,isTodayEnabled:a.isValid&&!pe(e.currentRange,r),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}class Sg{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:s}=this;s.currentCalendarOptionsRefiners[e]?s.emitter.on(e,n):Ce(`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:s}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:s.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let s=this.getCurrentData(),r;n=n||"day",r=s.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),r?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:s}=this.getCurrentData(),r=[].concat(s.header?s.header.viewsWithButtons:[],s.footer?s.footer.viewsWithButtons:[]),i,a;for(let o in n)r.push(o);for(i=0;i<r.length;i+=1)if(a=n[r[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(),s=W(e);s&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,s)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:s}=this.getCurrentData();return q(s.formatToParts(s.createMarker(e),j(n)))}formatRange(e,n,s){let{dateEnv:r}=this.getCurrentData();return q(r.formatRangeToParts(r.createMarker(e),r.createMarker(n),j(s),s))}formatIso(e,n){let{dateEnv:s}=this.getCurrentData();return s.formatIso(s.createMarker(e),{omitTime:n})}select(e,n){let s;n==null?e.start!=null?s=e:s={start:e,end:null}:s={start:e,end:n};let r=this.getCurrentData(),i=gh(s,r.dateEnv,W({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),ma(i,null,r))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Eh(e,n))}addEvent(e,n){if(e instanceof F){let a=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Wn({def:a,instance:o})}),this.triggerEventAdd(e)),e}let s=this.getCurrentData(),r;if(n instanceof _e)r=n.internalEventSource;else if(typeof n=="boolean")n&&([r]=ia(s.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return Ce(`Unknown event source ID \`${n}\`.`),null;r=a.internalEventSource}let i=ua(e,r,s,!1);if(i){let a=new F(s,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Wn(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:pa(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:s,instances:r}=n.eventStore;e=String(e);for(let i in s){let a=s[i];if(a.publicId===e){if(a.recurringDef)return new F(n,a,null);for(let o in r){let l=r[o];if(l.defId===a.defId)return new F(n,a,l)}}}return null}getEvents(){let e=this.getCurrentData();return Ie(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,s=[];for(let r in n)s.push(new _e(e,n[r]));return s}getEventSourceById(e){let n=this.getCurrentData(),s=n.eventSources;e=String(e);for(let r in s)if(s[r].publicId===e)return new _e(n,s[r]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof _e)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let s=Da(e,n);return s?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[s]}),new _e(n,s)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=W(e);n&&this.trigger("_timeScrollRequest",n)}getButtonState(){const e=this.getCurrentData(),{toolbarProps:n}=e,s=e.calendarOptions,r=s.buttons||{},i=e.viewSpecs,a=e.viewSpec.singleUnit,o=[a?Pr(a,s):"",a],l={today:{text:s.todayText,hint:oe(s.todayHint,o,s.todayText),isDisabled:!n.isTodayEnabled},prev:{text:s.prevText,hint:oe(s.prevHint,o,s.prevText),isDisabled:!n.isPrevEnabled},next:{text:s.nextText,hint:oe(s.nextHint,o,s.nextText),isDisabled:!n.isNextEnabled},prevYear:{text:s.prevYearText,hint:oe(s.prevHint,[s.yearText,"year"],s.prevYearText),isDisabled:!1},nextYear:{text:s.prevYearText,hint:oe(s.nextHint,[s.yearText,"year"],s.nextYearText),isDisabled:!1}};for(const c in i){const u=i[c],{singleUnit:f}=u,g=u.optionDefaults.buttonTextKey,m=r[c]?.text||(g?s[g]:"")||(f?Pr(f,s):"")||c,v=oe(s.viewHint,[m,c],m);l[c]={text:m,hint:v}}return l}}function Pr(t,e){return e[t+"TextLong"]||e[t+"Text"]}class Eg extends M.Component{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{ut.flushSync(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{ut.flushSync(()=>{this.setState({forPrint:!1})})}}render(){return this.props?.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 bg(t,e){let n=t.borderlessX??t.borderless,s=t.borderlessTop??t.borderless,r=t.borderlessBottom??t.borderless;const i={borderlessX:!!n,borderlessTop:!!s,borderlessBottom:!!r};return b(w(t.class,i),w(t.className,i),h.borderBoxRoot,h.isolate,h.flexCol,e?h.calendarPrintRoot:h.calendarScreenRoot)}class Dg extends O{render(){const{contentGenerator:e,className:n}=this.props;if(e)return d.jsx(U,{tag:"span",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:{},generatorName:void 0,customGenerator:e});if(n!==void 0)return d.jsx("span",{"aria-hidden":!0,className:n})}}class wg extends O{render(){let{props:e}=this,{options:n}=this.context,s=e.widgetGroups.map(r=>this.renderWidgetGroup(r));return M.createElement("div",{className:w(n.toolbarSectionClass,{name:e.name})},...s)}renderWidgetGroup(e){let{props:n,context:s}=this,{options:r}=s,i=[],a=!0,o=!0;for(const l of e){const{name:c,isView:u}=l;c==="title"?a=!1:u||(o=!1)}for(let l of e){let{name:c,customElement:u,buttonHint:f}=l;if(c==="title")i.push(d.jsx("div",{role:"heading","aria-level":r.headingLevel,id:n.titleId,className:b(r.toolbarTitleClass),children:n.title}));else if(u)i.push(d.jsx(U,{tag:"span",style:{display:"contents"},renderProps:{},generatorName:void 0,customGenerator:u}));else{let g=c===n.selectedButton,m=!n.isTodayEnabled&&c==="today"||!n.isPrevEnabled&&c==="prev"||!n.isNextEnabled&&c==="next",v=l.buttonDisplay??r.buttonDisplay;v==="auto"&&(v=l.buttonIconContent||l.buttonIconClass?"icon":"text");let p;v!=="text"&&(p=d.jsx(Dg,{className:l.buttonIconClass,contentGenerator:l.buttonIconContent}));let S=e.length>1&&a,D=S?{hasSelection:o}:null,R={name:c,text:l.buttonText,isPrimary:l.buttonIsPrimary,isSelected:g,isDisabled:m,isIconOnly:v==="icon",buttonGroup:D};i.push(d.jsx(U,{tag:"button",attrs:{type:"button",disabled:m,...a&&o?{role:"tab","aria-selected":g}:{"aria-pressed":g},"aria-label":typeof f=="function"?f(n.navUnit):f,onClick:l.buttonClick},className:b(w(r.buttonClass,R),!m&&h.cursorPointer,S&&b(g?h.z1:h.z0,h.focusZ2)),renderProps:R,generatorName:void 0,classNameGenerator:l.buttonClass,didMount:l.buttonDidMount,willUnmount:l.buttonWillUnmount,children:()=>v==="text"?l.buttonText:v==="icon"?p:v==="icon-text"?d.jsxs(d.Fragment,{children:[p,l.buttonText]}):d.jsxs(d.Fragment,{children:[l.buttonText,p]})}))}}return i.length>1?M.createElement("div",{role:a&&o?"tablist":void 0,"aria-label":a&&o?r.viewChangeHint:void 0,className:b(w(r.buttonGroupClass,{hasSelection:o}),h.isolate)},...i):i[0]}}class kr extends O{render(){let{props:e}=this,n=this.context.options,{sectionWidgets:s}=e.model;const{borderlessX:r,borderlessTop:i,borderlessBottom:a}=ue(n),o=e.isHeader?n.headerToolbarClass:n.footerToolbarClass;return d.jsxs("div",{className:b(w(o,{borderlessX:r,borderlessTop:i,borderlessBottom:a}),w(n.toolbarClass,{borderlessX:r,borderlessTop:i,borderlessBottom:a})),children:[this.renderSection("start",s.start),this.renderSection("center",s.center),this.renderSection("end",s.end)]})}renderSection(e,n){let{props:s}=this;return d.jsx(wg,{name:e,widgetGroups:n,title:s.title,titleId:s.titleId,navUnit:s.navUnit,selectedButton:s.selectedButton,isTodayEnabled:s.isTodayEnabled,isPrevEnabled:s.isPrevEnabled,isNextEnabled:s.isNextEnabled},e)}}class Cg extends nt{constructor(e){super(e),this.handleSegClick=(n,s)=>{let{component:r}=this,{context:i}=r,a=$e(s);a&&r.isValidSegDownEl(n.target)&&i.emitter.trigger("eventClick",{el:s,event:new F(r.context,a.def,a.instance),jsEvent:n,view:i.viewApi})},this.destroy=na(e.el,"click",`.${h.internalEvent}`,this.handleSegClick)}}class Rg extends nt{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,s)=>{$e(s)&&(this.currentSegEl=s,this.triggerEvent("eventMouseEnter",n,s))},this.handleSegLeave=(n,s)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,s))},this.removeHoverListeners=_u(e.el,`.${h.internalEvent}`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,s){let{component:r}=this,{context:i}=r,a=$e(s);(!n||r.isValidSegDownEl(n.target))&&i.emitter.trigger(e,{el:s,event:new F(i,a.def,a.instance),jsEvent:n,view:i.viewApi})}}class Tg extends We{constructor(){super(...arguments),this.buildViewContext=N(Ef),this.buildViewPropTransformers=N(xg),this.interactionsStore={},this.calendarInteractions=[],this.registerInteractiveComponent=(e,n)=>{let s=kf(e,n),i=[Cg,Rg];n.disableHits||(i=i.concat(this.props.pluginHooks.componentInteractions));let a=i.map(o=>new o(s));this.interactionsStore[e.uid]=a,Un[e.uid]=s},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let s of n)s.destroy();delete this.interactionsStore[e.uid]}delete Un[e.uid]}}get viewTitleId(){return this.props.baseId+"title"}render(){const{props:e}=this;let{toolbarConfig:n,options:s}=e,r,i=!1,a;e.forPrint||ce(s)||(s.height!=null?i=!0:s.contentHeight!=null?r=s.contentHeight:a=Math.max(s.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 d.jsxs(Ee.Provider,{value:o,children:[n.header&&d.jsx(kr,{model:n.header,isHeader:!0,titleId:this.viewTitleId,...e.toolbarProps}),d.jsxs("div",{className:b(h.flexCol,h.rel,h.overflowAnchorNone,h.minHeight0,i&&h.liquid),style:{height:r,aspectRatio:a!=null?String(a):void 0},children:[this.renderView(b((i||r)&&h.liquid,a!=null&&h.fill,h.internalView)),this.buildAppendContent()]}),n.footer&&d.jsx(kr,{model:n.footer,isHeader:!1,...e.toolbarProps})]})}renderView(e){const{props:n}=this,{pluginHooks:s,viewSpec:r,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(s.viewPropsTransformers),c={...n,toolbarProps:a,forPrint:n.forPrint};for(let f of l)Object.assign(o,f.transform(o,c));let u=r.component;return d.jsx(u,{...o})}buildAppendContent(){const{props:e}=this;return d.jsx(d.Fragment,{children:e.pluginHooks.viewContainerAppends.map((n,s)=>d.jsx(M.Fragment,{children:n(e)},s))})}componentDidMount(){const{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(s=>new s(e));let{propSetHandlers:n}=e.pluginHooks;for(let s in n)n[s](e[s],e);for(let s of e.pluginHooks.contextInit)s(e)}componentDidUpdate(e){const{props:n}=this;let{propSetHandlers:s}=n.pluginHooks;for(let r in s)n[r]!==e[r]&&s[r](n[r],n)}componentWillUnmount(){const{props:e}=this;for(let n of this.calendarInteractions)n.destroy();this.calendarInteractions=[],e.emitter.trigger("_unmount")}}function xg(t){return t.map(e=>new e)}const Mg=M.forwardRef((t,e)=>{const n=Hg(t.id),[s,r]=M.useState("");function i(c,u){(Ig(u)?ut.flushSync:Ng)(()=>{r(Se())})}const[a]=M.useState(()=>new Sg),[o]=M.useState(()=>new dg({calendarApi:a,onDataChange:i}));M.useEffect(()=>()=>{o.destroy()},[]),M.useImperativeHandle(e,()=>({getApi:()=>a}),[]);const l=o.update(t);return d.jsx(Eg,{emitter:l.emitter,children:c=>{const u=l.calendarOptions,f=u.direction==="rtl",g=bg(u,c);return d.jsx("div",{dir:f?"rtl":void 0,className:g,style:{height:u.height},"data-color-scheme":u.colorScheme||void 0,children:d.jsx(Tg,{...l,baseId:n,forPrint:c})})}})});function Ig(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 Ng(t){t()}let Lr=!1;function Hg(t){if(Gs.useId)return Gs.useId();const[e]=M.useState(()=>Se());return t?t+":":(Lr||(Lr=!0,Ce("Missing `id` prop. Provide one for better SSR support in React 17.")),`fc:${e}:`)}function ja(t){const e=t.getRootNode();return e instanceof Document?e.body||e.documentElement:e}function pt(t){return getComputedStyle(t).direction==="rtl"}const Pg=/(top|left|right|bottom|width|height)$/i;function jt(t,e){for(let n in e)kg(t,n,e[n])}function kg(t,e,n){n==null?t.style[e]="":typeof n=="number"&&Pg.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function Ba(t){return t.composedPath?.()[0]??t.target}class bt extends M.Component{constructor(e,n){super(e,n),this.handleChange=()=>{this.forceUpdate()},this.runner=new Pa(this.handleChange)}render(){const{props:e,context:n}=this,{nowDate:s,todayRange:r}=this.runner.update({nowManager:n.nowManager,unit:e.unit,unitValue:e.unitValue,nowIndicatorSnap:n.options.nowIndicatorSnap,dateEnv:n.dateEnv});return e.children(s,r)}componentWillUnmount(){this.runner.destroy()}}bt.contextType=Ee;const Is=j({year:"numeric",month:"long",day:"numeric"}),Lg=j({week:"long"}),$t=j({weekday:"long"});function vt(t){for(const e of t)if(e.type==="weekday")return e.value;return""}function yt(t){for(const e of t)if(e.type==="day")return e.value;return""}function _a(t){for(const e of t)if(e.type==="month")return e.value;return""}function st(t,e,n="day"){return q(t.dateEnv.formatToParts(e,n==="week"?Lg:Is))}function rt(t,e,n="day",s=st(t,e,n),r=!0){const{dateEnv:i,options:a,calendarApi:o}=t,l=i.toDate(e),c=u=>{let f=n==="day"?a.navLinkDayClick:n==="week"?a.navLinkWeekClick:null;typeof f=="function"?f.call(o,i.toDate(e),u):(typeof f=="string"&&(n=f),o.zoomTo(e,n))};return{role:"link","aria-label":oe(a.navLinkHint,[s,l],s),className:b(a.navLinkClass,h.cursorPointer,h.internalNavLink),...r?gs(c):{onClick:c}}}function je(t,e,n,s,r){const i=!!(n&&(!n.activeRange||!pe(n.activeRange,t)));return{date:e.toDate(t),dow:t.getUTCDay(),isDisabled:i,isOther:!i&&!!(n&&!pe(n.currentRange,t)),isToday:!i&&!!(s&&pe(s,t)),isPast:!i&&!!(r?t<r:s&&t<s.start),isFuture:!i&&!!(r?t>r:s&&t>=s.end)}}function Vn(t,e){return t!=null&&(t===e||Math.abs(t-e)<.01)}const Ag=!0,zn=new Map,Gn=new Set;let Yn=!1,xn=!1;function Y(t){Gn.add(t),!Yn&&!xn&&(xn=!0,requestAnimationFrame(()=>{xn=!1,Ua()}))}function Ua(){for(const t of Gn.values())t(),Gn.delete(t)}const Pt=typeof ResizeObserver<"u"&&new ResizeObserver(t=>{Yn=!0;for(let e of t){const n=e.target,s=zn.get(n);let r,i;if(e.borderBoxSize&&Ag){const o=e.borderBoxSize[0]||e.borderBoxSize;r=o.inlineSize,i=o.blockSize}else({width:r,height:i}=n.getBoundingClientRect());let a=!1;Vn(s.width,r)||(s.width=r,a=s.watchWidth),Vn(s.height,i)||(s.height=i,a||(a=s.watchHeight)),a&&s.callback(r,i)}ut.flushSync(()=>{Ua(),Yn=!1})});function it(t,e,n=!0,s=!0){return zn.set(t,{callback:e,watchWidth:n,watchHeight:s}),Pt&&Pt.observe(t,{box:"border-box"}),()=>{zn.delete(t),Pt&&Pt.unobserve(t)}}function Ns(t,e){return it(t,e,!0)}function Xe(t,e){return it(t,(n,s)=>e(s),!1,!0)}class pn extends O{constructor(){super(...arguments),this.refineRenderProps=dt(Og)}render(){const{props:e,context:n}=this,{options:s,viewSpec:r}=n,i=this.refineRenderProps({...ue(s),options:{headerToolbar:s.headerToolbar,footerToolbar:s.footerToolbar},isHeightAuto:ce(s),viewApi:n.viewApi});return d.jsx(U,{elRef:e.elRef,tag:e.tag||"div",attrs:e.attrs,style:e.style,className:b(e.className,w(s.viewClass,i),w(r.optionDefaults.class,i),w(r.optionDefaults.className,i),w(r.optionOverrides.class,i),w(r.optionOverrides.className,i)),renderProps:i,generatorName:void 0,didMount:s.didMount||s.viewDidMount,willUnmount:s.willUnmount||s.viewWillUnmount,children:()=>e.children})}}function Og(t){return{view:t.viewApi,borderlessX:t.borderlessX,borderlessTop:t.borderlessTop,borderlessBottom:t.borderlessBottom,options:t.options,isHeightAuto:t.isHeightAuto}}class he extends O{constructor(){super(...arguments),this.uid=Se()}prepareHits(){}queryHit(e,n,s,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!e.closest(`.${h.internalEventMirror}`)}isValidDateDownEl(e){return!e.closest(`.${h.internalEvent}:not(.${h.internalBgEvent})`)&&!e.closest(`.${h.internalMoreLink}`)&&!e.closest(`.${h.internalNavLink}`)&&!e.closest(`.${h.internalPopover}`)}}class Ar{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:s}=this;e in s&&(n?delete s[e]:(s[e]-=1,s[e]<=0&&delete s[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 Wg{constructor(e){this.el=e,this.emitter=new Et,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 Ar(this.handleWheelWait),this.scrollWaiter=new Ar(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 de extends he{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 Wg(e))},this.handleHRuler=e=>{this.disconnectHRuler&&(this.disconnectHRuler(),this.disconnectHRuler=void 0,this.clientWidth!==void 0&&(this.clientWidth=void 0,L(this.props.clientWidthRef,null))),e&&(this.disconnectHRuler=Ns(e,n=>{this._isUnmounting||n!==this.clientWidth&&(this.clientWidth=n,L(this.props.clientWidthRef,n))}))},this.handleVRuler=e=>{this.disconnectVRuler&&(this.disconnectVRuler(),this.disconnectVRuler=void 0,this.clientHeight!==void 0&&(this.clientHeight=void 0,L(this.props.clientHeightRef,null))),e&&(this.disconnectVRuler=Xe(e,n=>{if(this._isUnmounting)return;n!==this.clientHeight&&(this.clientHeight=n,L(this.props.clientHeightRef,n));const s=Math.round(this.el.getBoundingClientRect().height-n);s!==this.bottomScrollbarWidth&&(this.bottomScrollbarWidth=s,L(this.props.bottomScrollbarWidthRef,s))}))}}render(){const{props:e}=this,n=e.horizontal||e.vertical?"hidden":"";return d.jsxs("div",{ref:this.handleEl,className:b(e.className,h.noPadding,h.rel,e.hideScrollbars&&h.noScrollbars,h.internalScroller),style:{...e.style,overflowX:e.horizontal?"auto":n,overflowY:e.vertical?"auto":n},children:[e.children,!!e.clientWidthRef&&d.jsx("div",{ref:this.handleHRuler,className:h.fillTop}),!!(e.clientHeightRef||e.bottomScrollbarWidthRef)&&d.jsx("div",{ref:this.handleVRuler,className:h.fillStart})]})}endScroll(){this.listener.endScroll()}get x(){const{el:e}=this;return e?jg(e):0}get y(){const{el:e}=this;return e?e.scrollTop:0}scrollTo({x:e,y:n}){const{el:s}=this;s&&(n!=null&&(s.scrollTop=n),e!=null&&Bg(s,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 jg(t){const{scrollLeft:e}=t;return pt(t)?_g(e,t):e}function Bg(t,e){const n=pt(t);t.scrollLeft=n?Ug(e,t):e}function _g(t,e){switch(Fa()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}function Ug(t,e){switch(Fa()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}let Or;function Fa(){return Or||(Or=Fg())}function Fg(){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 Dt extends O{constructor(){super(...arguments),this.buildPublicEvent=N((e,n,s)=>new F(e,n,s)),this.handleEl=e=>{this.el=e,L(this.props.elRef,e),e&&qt(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{options:s}=n,{eventRange:r}=e,i=r.ui,a=s.eventTimeFormat||e.defaultTimeFormat,o=e.forcedTimeText??Th(a,r,e.slicedStart,e.slicedEnd,e.isStart,e.isEnd,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd),[l,c,u]=Nh(r,n),f=this.buildPublicEvent(n,r.def,r.instance),g=!e.disableDragging&&Rh(r,n),m=/row|column/.test(e.display),v={event:f,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,timeText:o},p={event:f,view:n.viewApi,timeText:o,color:i.color||s.eventColor,contrastColor:i.contrastColor||s.eventContrastColor,isDraggable:g,isStartResizable:!e.disableResizing&&e.isStart&&i.durationEditable&&s.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:u,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,level:e.level||0,timeClass:b(w(s.eventTimeClass,v),m&&w(s.blockEventTimeClass,v),e.display==="row"&&w(s.rowEventTimeClass,v),e.display==="column"&&w(s.columnEventTimeClass,v),e.display==="list-item"&&w(s.listItemEventTimeClass,v)),titleClass:b(w(s.eventTitleClass,v),m&&w(s.blockEventTitleClass,v),e.display==="row"&&w(s.rowEventTitleClass,v),e.display==="column"&&w(s.columnEventTitleClass,v),e.display==="list-item"&&w(s.listItemEventTitleClass,v),e.display==="row"&&s.rowEventTitleSticky&&h.stickyS,e.display==="column"&&s.columnEventTitleSticky&&h.stickyT),options:{eventOverlap:!!s.eventOverlap}},S=b(m&&w(s.blockEventClass,p),e.display==="row"&&w(s.rowEventClass,p),e.display==="column"&&w(s.columnEventClass,p),e.display==="list-item"&&w(s.listItemEventClass,p),i.className,e.className,e.display==="column"?h.flexCol:h.flexRow,(r.def.url||g)&&h.cursorPointer,h.internalEvent,e.isMirror&&h.internalEventMirror,g&&h.internalEventDraggable,p.isSelected&&h.internalEventSelected,(p.isStartResizable||p.isEndResizable)&&h.internalEventResizable),D=b(w(s.eventBeforeClass,p),m&&w(s.blockEventBeforeClass,p),e.display==="row"&&w(s.rowEventBeforeClass,p),e.display==="column"&&w(s.columnEventBeforeClass,p),e.display==="list-item"&&w(s.listItemEventBeforeClass,p)),R=b(w(s.eventAfterClass,p),m&&w(s.blockEventAfterClass,p),e.display==="row"&&w(s.rowEventAfterClass,p),e.display==="column"&&w(s.columnEventAfterClass,p),e.display==="list-item"&&w(s.listItemEventAfterClass,p)),C=b(w(s.eventInnerClass,p),m&&w(s.blockEventInnerClass,p),e.display==="row"&&w(s.rowEventInnerClass,p),e.display==="column"&&w(s.columnEventInnerClass,p),e.display==="list-item"&&w(s.listItemEventInnerClass,p),!e.disableLiquid&&h.liquid),E=e.display==="row"&&s.rowEventBeforeContent,x=e.display==="row"&&s.rowEventAfterContent;return d.jsx(U,{tag:l,attrs:{...e.attrs,...c,dir:e.isDragging&&s.direction==="rtl"?"rtl":void 0},className:S,style:{"--fc-event-color":p.color,"--fc-event-contrast-color":p.contrastColor},elRef:this.handleEl,renderProps:p,generatorName:"eventContent",customGenerator:s.eventContent,defaultGenerator:Vg,classNameGenerator:s.eventClass,didMount:s.eventDidMount,willUnmount:s.eventWillUnmount,children:I=>d.jsxs(d.Fragment,{children:[!!(p.isSelected&&m)&&d.jsx("div",{className:e.display==="column"?h.hitX:h.hitY}),(D||E)&&d.jsxs("div",{className:b(D,!e.disableZindexes&&h.z1,p.isStartResizable&&b(e.display==="column"?h.cursorResizeT:h.cursorResizeS,h.internalEventResizer,h.internalEventResizerStart)),children:[E&&d.jsx(U,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:p,generatorName:void 0,customGenerator:E}),!!(p.isStartResizable&&p.isSelected)&&d.jsx("div",{className:h.hit})]}),d.jsx(I,{tag:"div",className:b(C,!e.disableZindexes&&h.z0)}),(R||x)&&d.jsxs("div",{className:b(R,!e.disableZindexes&&h.z1,p.isEndResizable&&b(e.display==="column"?h.cursorResizeB:h.cursorResizeE,h.internalEventResizer,h.internalEventResizerEnd)),children:[x&&d.jsx(U,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:p,generatorName:void 0,customGenerator:x}),!!(p.isEndResizable&&p.isSelected)&&d.jsx("div",{className:h.hit})]})]})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&qt(this.el,this.props.eventRange)}}Dt.addPropsEquality({seg:Re});function Vg(t){return d.jsxs(d.Fragment,{children:[t.timeText&&d.jsx("div",{className:t.timeClass,children:t.timeText}),d.jsx("div",{className:t.titleClass,children:t.event.title||d.jsx(d.Fragment,{children:" "})})]})}function zg(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function Va(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 Gg(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 Yg(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function qg(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Zg(t,e=!1){let n=window.getComputedStyle(t),s=parseInt(n.borderLeftWidth,10)||0,r=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,o=Kg(t),l=o.y-s-r,c=o.x-i-a,u={borderLeft:s,borderRight:r,borderTop:i,borderBottom:a,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return n.direction==="rtl"?u.scrollbarLeft=l:u.scrollbarRight=l,e&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function $g(t,e=!1,n){let s=Hs(t),r=Zg(t,e),i={left:s.left+r.borderLeft+r.scrollbarLeft,right:s.right-r.borderRight-r.scrollbarRight,top:s.top+r.borderTop,bottom:s.bottom-r.borderBottom-r.scrollbarBottom};return e&&(i.left+=r.paddingLeft,i.right-=r.paddingRight,i.top+=r.paddingTop,i.bottom-=r.paddingBottom),i}function Hs(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 Xg(t){let e=za(t),n=t.getBoundingClientRect();for(let s of e){let r=Va(n,s.getBoundingClientRect());if(r)n=r;else return null}return n}function za(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 Kg(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}class Ga{constructor(){this.sliceBusinessHours=N(this._sliceBusinessHours),this.sliceDateSelection=N(this._sliceDateSpan),this.sliceEventStore=N(this._sliceEventStore),this.sliceEventDrag=N(this._sliceInteraction),this.sliceEventResize=N(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,s,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,n,s,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,s,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,s,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,n,s,...i),eventResize:this.sliceEventResize(e.eventResize,a,n,s,...i),eventSelection:e.eventSelection}}sliceNowDate(e,n,s,r,...i){return this._sliceDateSpan({range:{start:e,end:He(e,1)},allDay:!1},n,s,{},r,...i)}_sliceBusinessHours(e,n,s,r,...i){return e?this._sliceEventStore(ke(e,kt(n,!!s),r),{},n,s,...i).bg:[]}_sliceEventStore(e,n,s,r,...i){if(e){let a=Bn(e,n,kt(s,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,s,r,...i){if(!e)return null;let a=Bn(e.mutatedEvents,n,kt(s,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,s,r,i,...a){if(!e)return[];let o=kt(n,!!s),l=we(e.range,o);if(l){e={...e,range:l};let c=Sh(e,r,i),u=this.sliceRange(e.range,...a);for(let f of u)f.eventRange=c;return u}return[]}sliceEventRanges(e,n){let s=[];for(let r of e)s.push(...this.sliceEventRange(r,n));return s}sliceEventRange(e,n){let s=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(s={start:s.start,end:V(s.start,1)});let r=this.sliceRange(s,...n);for(let i of r)i.eventRange=e,i.isStart=e.isStart&&i.isStart,i.isEnd=e.isEnd&&i.isEnd;return r}}function kt(t,e){let n=t.activeRange;return e?n:{start:He(n.start,t.slotMinTime.milliseconds),end:He(n.end,t.slotMaxTime.milliseconds-864e5)}}class Ps extends Ga{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}const Jg=new Date(2592e5);function Ya(t,e,n,s,r,i){const a=qa(t,e,n,s,r,i),o=La(n,i.dateEnv);if(e&&o!=="day")for(const l of a.dataConfigs)Aa(l.dateMarker,o,i.dateEnv)&&(l.renderProps.isMajor=!0);return[a]}function qa(t,e,n,s,r,i,a,o){return{isDateRow:!0,renderConfig:Qg(r,e,i),dataConfigs:em(t,e,n,s,r,i,a,void 0,void 0,void 0,void 0,o)}}function Qg(t,e,n){const{options:s}=n;return{generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,classNameGenerator:s.dayHeaderClass,innerClassNameGenerator:s.dayHeaderInnerClass,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount,align:s.dayHeaderAlign,sticky:s._dayHeaderSticky,dayHeaderFormat:t,datesRepDistinctDays:e}}const Za=[];for(let t=0;t<7;t++)Za.push(V(new Date(2592e5),t));function em(t,e,n,s,r,i,a=1,o="",l={},c={},u="",f){const{dateEnv:g,viewApi:m,options:v}=i;return e?t.map((p,S)=>{const D=je(p,g,n,s),R=f!=null&&!(S%f),C=v.navLinks&&!D.isDisabled&&t.length>1,E={...D,...l,isMajor:R,isSticky:!1,inPopover:!1,hasNavLink:C,view:m},x=st(i,p);return{key:o+p.toUTCString(),dateMarker:p,renderProps:E,attrs:{"aria-label":x,...D.isToday?{"aria-current":"date"}:{},"data-date":tt(p),...c},innerAttrs:C?rt(i,p,void 0,x):{"aria-hidden":!0},colSpan:a,hasNavLink:C,className:u}}):t.map((p,S)=>{const D=p.getUTCDay(),R=V(Jg,D),C={date:g.toDate(p),dow:D,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},E=f!=null&&!(S%f),x={...C,date:Za[D],isMajor:E,isSticky:!1,inPopover:!1,hasNavLink:!1,view:m,...l},I=q(g.formatToParts(R,$t));return{key:o+String(D),dateMarker:p,renderProps:x,attrs:{"aria-label":I,...c},innerAttrs:{"aria-hidden":!0},colSpan:a,className:u}})}class ee{constructor(e,n=!1){this.masterCallback=e,this.ignoreDeletes=n,this.rev="",this.current=new Map,this.callbacks=new Map,this.handleValue=(s,r)=>{let{current:i,callbacks:a}=this;s===null?this.ignoreDeletes||(i.delete(r),a.delete(r)):i.set(r,s),this.rev=Se(),this.masterCallback&&this.masterCallback(s,r)}}createRef(e){let n=this.callbacks.get(e);return n||(n=s=>{this.handleValue(s,e)},this.callbacks.set(e,n)),n}}class at extends O{constructor(){super(...arguments),this.elRef=M.createRef()}render(){return d.jsx("div",{ref:this.elRef})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.elRef.current;this.disconnectWidth=Ns(n,s=>{this._isUnmounting||L(e.widthRef,s)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectWidth();const{props:e}=this;e.widthRef&&L(e.widthRef,null)}}function Me(t){return fn(t)+":"+t.start+(t.standinFor?":standin":t.isSlice?":slice":"")}function Bt(t,e){const n=[];for(let s=0;s<e;s++)n[s]=[];for(const s of t)n[s.row].push(s);return n}function Wr(t,e){const n=[];if(t){for(let s=0;s<e;s++)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(const s of t.segs)n[s.row].segs.push(s)}else for(let s=0;s<e;s++)n[s]=null;return n}function jr(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 $a extends O{constructor(){super(...arguments),this.buildPublicEvent=N((e,n,s)=>new F(e,n,s)),this.handleEl=e=>{this.el=e,e&&qt(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{eventRange:s}=e,{options:r}=n,i=s.ui,a=this.buildPublicEvent(n,s.def,s.instance),o={event:a,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1},l={event:a,view:n.viewApi,timeText:"",color:i.color||r.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:w(r.backgroundEventTitleClass,o),options:{eventOverlap:!!r.eventOverlap}},c=b(i.className,h.fill,h.internalEvent,h.internalBgEvent,e.isVertical?h.flexCol:h.flexRow),u=b(w(r.backgroundEventInnerClass,l),h.liquid);return d.jsx(U,{tag:"div",className:c,style:{"--fc-event-color":l.color,"--fc-event-contrast-color":l.contrastColor},defaultGenerator:tm,elRef:this.handleEl,renderProps:l,generatorName:"backgroundEventContent",customGenerator:r.backgroundEventContent,classNameGenerator:r.backgroundEventClass,didMount:r.backgroundEventDidMount,willUnmount:r.backgroundEventWillUnmount,children:f=>d.jsx(f,{tag:"div",className:u})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&qt(this.el,this.props.eventRange)}}function tm(t){let{title:e}=t.event;return e&&d.jsx("div",{className:t.titleClass,children:t.event.title})}function Xa(t,e){return d.jsx("div",{className:b(t==="non-business"?e.nonBusinessHoursClass:t==="highlight"?e.highlightClass:void 0,h.fill)})}const Mn=10,nm=1;class sm extends he{constructor(){super(...arguments),this.getDateMeta=N(je),this.closeRef=M.createRef(),this.focusStartRef=M.createRef(),this.focusEndRef=M.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=Ba(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:s,dateEnv:r,viewApi:i}=n,{startDate:a,todayRange:o,dateProfile:l}=e,c=this.getDateMeta(a,r,l,o),u=r.formatToParts(a,s.popoverFormat),f=q(u);const g={...c,isMajor:!1,isNarrow:!1,isSticky:!1,inPopover:!0,level:0,hasNavLink:!1,text:f,textParts:u,get weekdayText(){return vt(u)},get dayNumberText(){return yt(u)},view:i},m={...c,isMajor:!1,isNarrow:!1,inPopover:!0,hasNavLink:!1,get weekdayText(){return vt(u)},get dayNumberText(){return yt(u)},get monthText(){return _a(u)},view:i,text:"",textParts:[],options:{businessHours:!!s.businessHours}},v=tt(a),{dayHeaderAlign:p}=s,S=typeof p=="function"?p({level:0,inPopover:!0,isNarrow:!1}):p,D=pt(e.alignEl);return ut.createPortal(d.jsxs("div",{"data-date":v,id:e.id,role:"dialog","aria-labelledby":e.titleId,className:b(s.popoverClass,h.flexCol,h.popoverZ,h.abs,h.borderBoxRoot,h.internalPopover),style:{top:0,left:0},dir:D?"rtl":void 0,"data-color-scheme":s.colorScheme||void 0,ref:this.handleRootEl,children:[d.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusStartRef}),d.jsxs("div",{className:b(w(s.dayHeaderClass,g),h.flexCol,h.borderOnlyB,S==="center"?h.alignCenter:S==="end"?h.alignEnd:h.alignStart),children:[d.jsx("div",{children:d.jsx(U,{tag:"div",attrs:{id:e.titleId},generatorName:"dayHeaderContent",renderProps:g,customGenerator:s.dayHeaderContent,defaultGenerator:rm,classNameGenerator:s.dayHeaderInnerClass,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount})}),d.jsx(U,{tag:"button",attrs:{"aria-label":s.closeHint,...gs(this.handleClose)},elRef:this.closeRef,className:b(s.popoverCloseClass,h.flexRow,h.cursorPointer),renderProps:{},customGenerator:s.popoverCloseContent,generatorName:"popoverCloseContent"})]}),d.jsx("div",{className:b(w(s.dayCellClass,m),h.flexCol,h.borderNone),children:d.jsx("div",{className:w(s.dayCellInnerClass,m),children:e.children})}),d.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusEndRef})]}),ja(e.alignEl))}queryHit(e,n,s,r,i){let{rootEl:a,props:o}=this;return n>=0&&n<r&&s>=0&&s<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:r,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:s}=this;const r=pt(e),i=Xg(e);if(i){let a=s.getBoundingClientRect(),o=n?e.closest(n).getBoundingClientRect().top-nm:i.top,l=r?i.right-a.width:i.left;o=Math.max(o,Mn),l=Math.min(l,document.documentElement.clientWidth-Mn-a.width),l=Math.max(l,Mn);const{offsetParent:c}=s;let u,f;if(!c||c===document.body)u=o+window.scrollY,f=l+window.scrollX;else{const g=c.getBoundingClientRect();u=o-g.top+c.scrollTop,f=l-g.left+c.scrollLeft}jt(s,{top:u,left:f})}}}function rm(t){return t.text}function im(t,e){return t.end>e.start&&t.start<e.end}function Br(t,e){const n=Math.max(t.start,e.start),s=Math.min(t.end,e.end);if(n<s)return{start:n,end:s,isStart:t.isStart&&n===t.start,isEnd:t.isEnd&&s===t.end}}function am(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function qn(t){return t.end}function Ka(t){return t.reduce(lm).eventRange.range.start}function om(t){return t.reduce(cm).eventRange.range.end}function lm(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function cm(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class Ja extends O{constructor(){super(...arguments),this.state={isPopoverOpen:!1},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&L(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:s}=this,{dateEnv:r,options:i}=s,{moreLinkClick:a}=i,o=_r(n).start;function l(c){let{def:u,instance:f,range:g}=c.eventRange;return{event:new F(s,u,f),start:r.toDate(g.start),end:r.toDate(g.end),isStart:c.isStart,isEnd:c.isEnd}}typeof a=="function"&&(a=a({date:r.toDate(o),allDay:!!n.allDayDate,allSegs:n.segs.map(l),hiddenSegs:n.hiddenSegs.map(l),jsEvent:e,view:s.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&s.calendarApi.zoomTo(o,a)},this.handlePopoverClose=()=>{this.linkEl&&this.linkEl.focus(),this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return d.jsx(Ee.Consumer,{children:s=>{let{viewApi:r,options:i,calendarApi:a,baseId:o}=s,{moreLinkText:l}=i,c=e.hiddenSegs.length,u=_r(e),f=o+"popover-"+u.start.toISOString(),g=`+${c}`,m=typeof l=="function"?l.call(a,c):`${g} ${l}`,v=oe(i.moreLinkHint,[c],m),p={num:c,numericText:g,longText:m,text:e.isMicro||e.display==="column"?g:m,isNarrow:e.isNarrow,view:r};return d.jsxs(d.Fragment,{children:[!!c&&d.jsx(U,{tag:"div",elRef:this.handleLinkEl,className:b(w(e.display==="row"?i.rowMoreLinkClass:i.columnMoreLinkClass,p),e.className,e.display==="row"?h.flexRow:h.flexCol,h.internalMoreLink,h.cursorPointer),style:e.style,attrs:{...e.attrs,...gs(this.handleClick),title:v,role:"button","aria-haspopup":"dialog","aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?f:void 0},renderProps:p,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:dm,classNameGenerator:i.moreLinkClass,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount,children:S=>d.jsx(S,{tag:"div",className:b(w(i.moreLinkInnerClass,p),w(e.display==="row"?i.rowMoreLinkInnerClass:i.columnMoreLinkInnerClass,p),e.display==="row"?h.stickyS:h.stickyT)})}),n.isPopoverOpen&&d.jsx(sm,{id:f,titleId:f+"-title",startDate:u.start,endDate:u.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 dm(t){return t.text}function _r(t){return t.allDayDate?{start:t.allDayDate,end:V(t.allDayDate,1)}:{start:Ka(t.hiddenSegs),end:om(t.hiddenSegs)}}const Qa=j({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function eo(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 um extends O{render(){let{props:e}=this;return d.jsx(Ja,{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:()=>d.jsx(d.Fragment,{children:e.segs.map(n=>{let{eventRange:s}=n,{instanceId:r}=s.instance,i=!!(e.eventDrag&&e.eventDrag.affectedInstances[r]),a=!!(e.eventResize&&e.eventResize.affectedInstances[r]),o=i||a;return d.jsx("div",{style:{visibility:o?"hidden":void 0},children:d.jsx(Dt,{display:eo(n)?"list-item":"row",eventRange:s,isStart:n.isStart,isEnd:n.isEnd,isDragging:i,isResizing:a,isMirror:!1,isSelected:r===e.eventSelection,defaultTimeFormat:Qa,defaultDisplayEventEnd:!1,...Le(s,e.todayRange)})},r)})})})}}class hm extends he{constructor(){super(...arguments),this.getDateMeta=N(je),this.refineRenderProps=dt(mm),this.rootElRef=M.createRef(),this.handleBodyEl=e=>{this.disconnectBodyHeight&&(this.disconnectBodyHeight(),this.disconnectBodyHeight=void 0,L(this.props.headerHeightRef,null),L(this.props.mainHeightRef,null)),e&&(this.disconnectBodyHeight=it(e,(n,s)=>{if(this._isUnmounting)return;const{props:r}=this,i=e.getBoundingClientRect(),a=this.rootElRef.current.getBoundingClientRect(),o=i.top-a.top;Vn(this.headerHeight,o)||(this.headerHeight=o,L(r.headerHeightRef,o)),r.fgLiquidHeight&&L(r.mainHeightRef,s)}))}}render(){let{props:e,context:n}=this,{options:s,dateEnv:r}=n;const i=e.showDayNumber&&gm(e.date,e.dateProfile.currentRange,r),a=this.getDateMeta(e.date,r,e.dateProfile,e.todayRange),o=b(e.borderStart?h.borderOnlyS:h.borderNone,e.width!=null?"":h.liquid,h.flexCol,h.noMargin,h.noPadding),l=s.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:s.monthStartFormat,dayCellFormat:s.dayCellFormat,businessHours:!!s.businessHours});if(a.isDisabled)return d.jsx("div",{role:"gridcell","aria-disabled":!0,className:b(w(s.dayCellClass,c),e.className,o),style:{width:e.width}});const u=st(n,e.date);return d.jsx(U,{tag:"div",elRef:this.rootElRef,className:b(e.className,o),attrs:{...e.attrs,role:"gridcell","aria-label":u,...c.isToday?{"aria-current":"date"}:{},"data-date":tt(e.date)},style:{width:e.width},renderProps:c,generatorName:"dayCellTopContent",customGenerator:s.dayCellTopContent,defaultGenerator:fm,classNameGenerator:s.dayCellClass,didMount:s.dayCellDidMount,willUnmount:s.dayCellWillUnmount,children:f=>d.jsxs(d.Fragment,{children:[d.jsx("div",{className:b(h.rel,w(s.dayCellTopClass,c)),children:e.showDayNumber&&d.jsx(f,{tag:"div",attrs:l?rt(n,e.date,void 0,u):{"aria-hidden":!0},className:w(s.dayCellTopInnerClass,c)})}),d.jsxs("div",{className:b(h.flexCol,e.fgLiquidHeight?h.liquid:h.grow),ref:this.handleBodyEl,children:[d.jsx("div",{className:w(s.dayCellInnerClass,c),style:{minHeight:e.fgHeight},children:e.fg}),d.jsx(um,{className:h.rel,allDayDate:e.date,segs:e.segs,hiddenSegs:e.hiddenSegs,alignElRef:this.rootElRef,alignParentTop:e.showDayNumber?"[role=row]":`.${h.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})]}),d.jsx("div",{className:b(h.rel,w(s.dayCellBottomClass,c))})]})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}function fm(t){return t.text||d.jsx(d.Fragment,{children:" "})}function gm(t,e,n){const{start:s,end:r}=e,i=He(r,-1),a=n.getYear(s),o=n.getMonth(s),l=n.getYear(i),c=n.getMonth(i);return!(a===l&&o===c)&&(t.valueOf()===s.valueOf()||n.getDay(t)===1&&t.valueOf()<r.valueOf())}function mm(t){let{date:e,dateEnv:n,hasLabel:s,hasMonthLabel:r,hasNavLink:i,businessHours:a}=t,o=[],l="";return s&&(o=n.formatToParts(e,r?t.monthStartFormat:t.dayCellFormat),l=q(o)),{...t.dateMeta,...t.renderProps,text:l,textParts:o,isMajor:t.isMajor,isNarrow:t.isNarrow,inPopover:!1,hasNavLink:i,get weekdayText(){return vt(o)},get dayNumberText(){return yt(o)},get monthText(){return _a(o)},options:{businessHours:a},view:t.viewApi}}class Zn{constructor(e,n=l=>1,s=!1,r,i,a=!1,o=!1){this.getSegThickness=n,this.strictOrder=s,this.maxCoord=r,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,s){if(n!=null){const r=this.findInsertion(e,n);if(this.isInsertionValid(r,n))this.insertSegAt(e,r,n,s);else{const{touchingPlacement:i}=r;if(i){if(this.hiddenConsumes&&!i.isZombie&&(i.isZombie=!0,this.hiddenSegs.push(i),this.allowSlicing)){const a=Object.assign({},i);Object.assign(i,Br(i,e)),i.isSlice=!0,this.splitSeg(a,i.thickness,i)}this.allowSlicing?(this.hiddenSegs.push({...e,...Br(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,s){e.start<s.start&&this.insertSeg({...e,end:s.start,isEnd:!1},n,!0),e.end>s.end&&this.insertSeg({...e,start:s.end,isStart:!1},n,!0)}insertSegAt(e,n,s,r){const i={...e,thickness:s,depth:n.depth,isSlice:r||e.isSlice||!1,isZombie:!1};n.lateralIndex===-1?(In(this.placementsByLevel,n.levelIndex,[i]),In(this.levelCoords,n.levelIndex,n.levelCoord)):In(this.placementsByLevel[n.levelIndex],n.lateralIndex,i)}findInsertion(e,n){let{placementsByLevel:s,levelCoords:r}=this,i=s.length,a=0,o,l,c=0;for(let g=0;g<i;g+=1){const m=r[g];if(!this.strictOrder&&m>=a+n)break;let v=s[g],p,[S,D]=$n(v,e.start,qn),R=S+D;for(;(p=v[R])&&p.start<e.end;){let C=m+p.thickness;C>a&&(a=C,o=p,l=g),C===a&&(c=Math.max(c,p.depth+1)),R+=1}}let u=0;if(o)for(u=l+1;u<i&&r[u]<a;)u+=1;let f=-1;return u<i&&r[u]===a&&([f]=$n(s[u],e.end,qn)),{touchingPlacement:o,levelCoord:a,levelIndex:u,lateralIndex:f,depth:c}}traverseSegs(e){const{placementsByLevel:n,levelCoords:s}=this;for(let r=0;r<n.length;r++){const i=n[r],a=s[r];for(const o of i)o.isZombie||e(o,a)}}}function pm(t){let e=[];for(let n of t){let s=[],r={segs:[n],start:n.start,end:n.end};for(let i of e)im(i,r)?r={...am(i,r),segs:i.segs.concat(r.segs)}:s.push(i);s.push(r),e=s}return e.map(n=>({key:Qi(Ka(n.segs)),...n}))}function In(t,e,n){t.splice(e,0,n)}function $n(t,e,n){let s=0,r=t.length;if(!r||e<n(t[s]))return[0,0];if(e>n(t[r-1]))return[r,0];for(;s<r;){let i=Math.floor(s+(r-s)/2),a=n(t[i]);if(e<a)r=i;else if(e>a)s=i+1;else return[i,1]}return[s,0]}function vm(t,e,n,s,r,i=!0,a,o){let l,c,u;a===!0||o===!0?(l=s,u=!0):typeof a=="number"?(c=a,u=!1):typeof o=="number"&&(c=o,u=!0);const f=new Map,g=new Map,m=new Map,v=new Map;let p=new Zn(t,E=>e.get(Me(E)),r,l,c,u,i);p.traverseSegs((E,x)=>{Nn(f,E),m.set(Me(E),x),E.isSlice&&v.set(E.eventRange,!0)});for(const E of p.hiddenSegs)Nn(g,E);if(v.size){m.clear(),p=new Zn(ym(t,f),E=>e.get(Me(E)),r,l,c,u),p.traverseSegs((E,x)=>{m.set(Me(E),x)});for(const E of p.hiddenSegs)Nn(g,E)}const S=[],D=[],R=[],C=[];for(let E=0;E<n.length;E++)S.push([]),D.push([]),R.push([]),C.push(0);for(const E of t){const{eventRange:x}=E,I=f.get(x)||[],k=g.get(x)||[],P=v.get(x)||!1;if(R[E.start].push(E),P)for(const H of I)R[H.start].push(H);for(const H of I){for(let _=H.start;_<H.end;_++){const Z=jr(H,_);S[_].push(Z)}const A=Me(H),z=m.get(A);if(z!=null){const _=e.get(A);for(let Z=H.start;Z<H.end;Z++)C[Z]=Math.max(C[Z],z+_)}}for(const H of k)for(let A=H.start;A<H.end;A++){const z=jr(H,A);S[A].push(z),D[A].push(z)}}return[S,D,R,m,C]}function Nn(t,e){let n=t.get(e.eventRange);n||t.set(e.eventRange,n=[]),n.push(e)}function ym(t,e){const n=[];for(const s of t)n.push(...e.get(s.eventRange)||[]);return n}class to{constructor(e,n){let s=e.start,{end:r}=e,i=[],a=[],o=-1;for(;s<r;)n.isHiddenDay(s)?i.push(o+.5):(o+=1,i.push(o),a.push(s)),s=V(s,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),s=this.getDateDayIndex(V(e.end,-1)),r=Math.max(0,n),i=Math.min(this.cnt-1,s);return r=Math.ceil(r),i=Math.floor(i),r<=i?{start:r,end:i+1,isStart:n===r,isEnd:s===i}:null}getDateDayIndex(e){let{indices:n}=this,s=Math.floor(Oe(this.dates[0],e));return s<0?n[0]-1:s>=n.length?n[n.length-1]+1:n[s]}}class no{constructor(e,n,s,r=""){this.dateEnv=s,this.majorUnit=r;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 s=[];for(let r=0;r<this.colCount;r+=1)s.push(this.buildCell(n,r));e.push(s)}return e}buildCell(e,n){let s=this.daySeries.dates[e*this.colCount+n];return{key:s.toISOString(),date:s,isMajor:this.cellIsMajor(s)}}cellIsMajor(e){return this.majorUnit?Aa(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,s=this.daySeries.sliceRange(e),r=[];if(s){const{start:i,end:a}=s;let o=i;for(;o<a;){let l=Math.floor(o/n),c=Math.min((l+1)*n,a);r.push({row:l,start:o%n,end:(c-1)%n+1,isStart:s.isStart&&o===i,isEnd:s.isEnd&&c===a}),o=c}}return r}}function so(t,e,n){const s=new to(t.renderRange,e),r=/year|month|week/.test(t.currentRangeUnit),i=!r&&La(t,n);return new no(s,r,n,i!=="day"?i:void 0)}function ro(t,e,n){return n==null?[void 0,void 0]:n/t<e?[e*t,e]:[n,void 0]}function Sm(t,e,n){let s=0;for(const r of e){const i=r[0].key,a=r[0].date,o=r[r.length-1].date;if(t>=a&&t<=o)return s;const l=n.get(i);if(l==null)return;s+=l}return s}function Ur(t,e,n){let s,r;if(e!=null)s=t.start*e,r=(n-t.end)*e;else{const i=1/n;s=gt(t.start*i),r=gt(1-t.end*i)}return{insetInlineStart:s,insetInlineEnd:r}}function ks(t,e,n,s,r){const i=n??e/s,a=Math.floor(t/i),o=r?s-a-1:a,l=a*i,c=l+i;return{col:o,left:l,right:c}}function Em(t,e,n){let s=0,r=0,i=0;for(const a of e){const o=a[0].key;if(r=i,i=r+n.get(o),t<i)break;s++}return{row:s,top:r,bottom:i}}function bm(t,e){return t.querySelectorAll("[role=row]")[e]}function Ls(t,e){return t.querySelectorAll("[role=gridcell]")[e]}const wt=60,Dm=j({weekday:"narrow"});function As(t,e,n){return t||wm(e,n)}function wm(t,e){return t?e>1?j({weekday:"short",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):j({weekday:"long",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):j({weekday:"short"})}class Cm extends M.Component{constructor(){super(...arguments),this.rootElRef=M.createRef()}render(){const{props:e}=this;return d.jsx("div",{className:b(e.className,h.abs),style:e.style,ref:this.rootElRef,children:e.children})}componentDidMount(){this._isUnmounting=!1;const e=this.rootElRef.current;this.disconnectHeight=Xe(e,n=>{this._isUnmounting||L(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),L(this.props.heightRef,null)}}const Rm=j({week:"narrow"});class io extends O{constructor(){super(...arguments),this.headerHeightRefMap=new ee(()=>{Y(this.handleSegPositioning)}),this.mainHeightRefMap=new ee(()=>{(this.props.dayMaxEvents===!0||this.props.dayMaxEventRows===!0)&&Y(this.handleSegPositioning)}),this.segHeightRefMap=new ee(()=>{Y(this.handleSegPositioning)}),this.buildWeekNumberRenderProps=N(Tm),this.handleRootEl=e=>{this.rootEl=e,L(this.props.rootElRef,e)},this.handleSegPositioning=()=>{this._isUnmounting||this.forceUpdate()}}render(){const{props:e,context:n,headerHeightRefMap:s,mainHeightRefMap:r}=this,{cells:i}=e,{options:a}=n,o=e.cells[0].date,l=e.dayMaxEvents===!0||e.dayMaxEventRows===!0,c=Rs(e.fgEventSegs,a.eventOrder),[u,f]=this.computeFgDims(),[g,m,v,p,S]=vm(c,this.segHeightRefMap.current,i,l?f:void 0,a.eventOrderStrict,a.eventSlicing,e.dayMaxEvents,e.dayMaxEventRows),D=[];if(u!=null){let k=0;for(const P of i){const H=s.current.get(P.key);if(H!=null){const A=u-H;D.push(S[k]+A)}else D.push(void 0);k++}}const R=this.getHighlightSegs(),C=this.getMirrorSegs(),E=a.navLinks,x=st(n,o,"week"),I=this.buildWeekNumberRenderProps(o,n,e.cellIsNarrow,E);return d.jsxs("div",{role:e.role,"aria-label":e.role==="row"?x:void 0,className:b(a.dayRowClass,e.className,h.flexRow,h.rel,h.isolate,e.forPrint&&e.basis!==void 0&&h.printSiblingRow),style:{flexBasis:e.basis},ref:this.handleRootEl,children:[e.showWeekNumbers&&!e.cellIsMicro&&d.jsx(U,{tag:"div",attrs:{...E?rt(n,o,"week",x,!1):{},role:void 0,"aria-hidden":!0},className:h.z1,renderProps:I,generatorName:"inlineWeekNumberContent",customGenerator:a.inlineWeekNumberContent,defaultGenerator:gn,classNameGenerator:a.inlineWeekNumberClass,didMount:a.inlineWeekNumberDidMount,willUnmount:a.inlineWeekNumberWillUnmount}),this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(R,"highlight"),e.cells.map((k,P)=>{const H=this.renderFgSegs(u,v[P],p,e.todayRange,!1);return d.jsx(hm,{dateProfile:e.dateProfile,todayRange:e.todayRange,date:k.date,isMajor:k.isMajor,showDayNumber:e.showDayNumbers,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,borderStart:!!P,segs:g[P],hiddenSegs:m[P],fgLiquidHeight:l,fg:d.jsx(d.Fragment,{children:H}),eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,renderProps:k.renderProps,dateSpanProps:k.dateSpanProps,attrs:k.attrs,className:k.className,fgHeight:D[P],width:e.colWidth,headerHeightRef:s.createRef(k.key),mainHeightRef:r.createRef(k.key)},k.key)}),this.renderFgSegs(u,C,p,e.todayRange,!0)]})}renderFgSegs(e,n,s,r,i){const{props:a,segHeightRefMap:o}=this,{colWidth:l,eventSelection:c,cellIsMicro:u}=a,f=a.cells.length,g=a.cells.length===1,m=[];for(const v of n){const p=Me(v),{standinFor:S,eventRange:D}=v,{instanceId:R}=D.instance;if(S)continue;const{insetInlineStart:C,insetInlineEnd:E}=Ur(v,l,f),x=s.get(S?Me(S):p)??(i?0:void 0),I=e!=null&&x!=null?e+x:void 0,k=!!(a.eventDrag&&a.eventDrag.affectedInstances[R]),P=!!(a.eventResize&&a.eventResize.affectedInstances[R]),H=!i&&(k||P||S||I==null),A=eo(v),z=R===c;m.push(d.jsx(Cm,{className:v.start?h.fakeBorderS:"",style:{visibility:H?"hidden":void 0,top:I,insetInlineStart:C,insetInlineEnd:E,zIndex:z?1e3:0},heightRef:!S&&!i?o.createRef(p):null,children:d.jsx(Dt,{display:A?"list-item":"row",eventRange:D,isStart:v.isStart,isEnd:v.isEnd,isDragging:k,isResizing:P,isMirror:i,isSelected:z,isNarrow:a.cellIsNarrow,defaultTimeFormat:Qa,defaultDisplayEventEnd:g,disableResizing:A,forcedTimeText:u?"":void 0,...Le(D,r)})},p))}return m}renderFillSegs(e,n){const{props:s,context:r}=this,{todayRange:i,colWidth:a}=s,o=s.cells.length,l=[];for(const c of e){const u=c.start+":"+c.end,{insetInlineStart:f,insetInlineEnd:g}=Ur(c,a,o),m=!c.standinFor;l.push(d.jsx("div",{className:h.fillY,style:{visibility:m?"":"hidden",insetInlineStart:f,insetInlineEnd:g},children:n==="bg-event"?d.jsx($a,{eventRange:c.eventRange,isStart:c.isStart,isEnd:c.isEnd,isNarrow:s.cellIsNarrow,isVertical:!1,...Le(c.eventRange,i)}):Xa(n,r.options)},u))}return d.jsx(d.Fragment,{children:l})}componentDidMount(){this._isUnmounting=!1;const{rootEl:e}=this;this.disconnectHeight=Xe(e,n=>{L(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),L(this.props.heightRef,null)}computeFgDims(){const{cells:e}=this.props,n=this.headerHeightRefMap.current,s=this.mainHeightRefMap.current;let r,i;for(const a of e){const o=n.get(a.key),l=s.get(a.key);if(o!=null&&((r===void 0||o>r)&&(r=o),l!=null)){const c=o+l;(i===void 0||c<i)&&(i=c)}}return[r,i!=null&&r!=null?i-r: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 Tm(t,e,n,s){const{dateEnv:r,options:i}=e,a=r.computeWeekNumber(t),o=r.formatToParts(t,i.weekNumberFormat||Rm),l=q(o),c=r.toDate(t);return{num:a,text:l,textParts:o,date:c,isNarrow:n,hasNavLink:s}}class Os extends he{constructor(){super(...arguments),this.splitBusinessHourSegs=N(Bt),this.splitBgEventSegs=N(Mm),this.splitFgEventSegs=N(Bt),this.splitDateSelectionSegs=N(Bt),this.splitEventDrag=N(Wr),this.splitEventResize=N(Wr),this.rowHeightRefMap=new ee((e,n)=>{const{rowHeightRefMap:s}=this.props;s&&s.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:s}=this,{options:r}=n,{cellRows:i}=e,a=i.length,o=i[0]?.[0]?.key||"",l=this.splitFgEventSegs(e.fgEventSegs,a),c=this.splitBgEventSegs(e.bgEventSegs,a),u=this.splitBusinessHourSegs(e.businessHourSegs,a),f=this.splitDateSelectionSegs(e.dateSelectionSegs,a),g=this.splitEventDrag(e.eventDrag,a),m=this.splitEventResize(e.eventResize,a),v=ce(r),p=!e.forPrint&&!v,S=Im(e.visibleWidth,a,v,r);return d.jsx("div",{role:"rowgroup",className:b(e.className,!e.forPrint&&h.flexCol),style:{width:e.width},ref:this.handleRootEl,children:i.map((D,R)=>d.jsx(io,{role:"row",dateProfile:e.dateProfile,todayRange:e.todayRange,cells:D,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,showDayNumbers:a>1,showWeekNumbers:a>1&&r.weekNumbers,forPrint:e.forPrint,className:b(p&&h.grow,a>1&&h.breakInsideAvoid,R<a-1?h.borderOnlyB:h.borderNone),fgEventSegs:l[R],bgEventSegs:c[R],businessHourSegs:u[R],dateSelectionSegs:f[R],eventSelection:e.eventSelection,eventDrag:g[R],eventResize:m[R],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,colWidth:e.colWidth,basis:S,heightRef:s.createRef(D[0].key)},o+":"+D[0].key))})}queryHit(e,n,s,r){const{props:i}=this,a=i.cellRows[0].length,{col:o,left:l,right:c}=ks(n,r,i.colWidth,a,e),{row:u,top:f,bottom:g}=Em(s,i.cellRows,this.rowHeightRefMap.current),m=i.cellRows[u][o],v=m.date,p=V(v,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:v,end:p},allDay:!0,...m.dateSpanProps},getDayEl:()=>Ls(bm(this.rootEl,u),o),rect:{left:l,right:c,top:f,bottom:g},layer:0}}}function xm(t){return t.eventRange.def.allDay}function Mm(t,e){return Bt(t.filter(xm),e)}function Im(t,e,n,s){if(t!=null){const r=t/s.aspectRatio/6;return e>6||n?r:0}return 0}class Nm extends O{constructor(){super(...arguments),this.state={},this.buildDayHeaderText=N(Hm),this.handleInnerEl=e=>{this.disconnectSize&&(this.disconnectSize(),this.disconnectSize=void 0),e?this.disconnectSize=it(e,(n,s)=>{this._isUnmounting||(L(this.props.innerHeightRef,s),this.setState({innerWidth:n}))}):L(this.props.innerHeightRef,null)}}render(){const{props:e,state:n,context:s}=this,{renderConfig:r,dataConfig:i}=e,a=e.colWidth!=null?e.colWidth*(i.colSpan||1):void 0,o=i.renderProps.isDisabled,l=r.dayHeaderFormat?this.buildDayHeaderRenderProps(i.renderProps,e.cellIsNarrow,e.rowLevel,e.cellIsMicro,i.dateMarker,r.dayHeaderFormat,!!r.datesRepDistinctDays,s.dateEnv):{...i.renderProps,isNarrow:e.cellIsNarrow,level:e.rowLevel},c=r.align,u=typeof c=="function"?c({level:e.rowLevel,inPopover:i.renderProps.inPopover,isNarrow:e.cellIsNarrow}):c,f=r.sticky,g=e.rowLevel>0&&f!==!1&&(u!=="center"||a!=null&&e.viewportWidth!=null&&a>e.viewportWidth*.75);let m;return g&&(u==="center"?n.innerWidth!=null&&(m=`calc(50% - ${n.innerWidth/2}px)`):m=typeof f=="number"||typeof f=="string"?f:0),d.jsx(U,{tag:"div",attrs:{role:"columnheader","aria-colspan":i.colSpan,...i.attrs},className:b(i.className,h.noMargin,h.noPadding,h.flexCol,e.borderStart?h.borderOnlyS:h.borderNone,u==="center"?h.alignCenter:u==="end"?h.alignEnd:h.alignStart,e.colWidth==null&&h.liquid,!g&&h.crop),style:{width:a},renderProps:l,generatorName:r.generatorName,customGenerator:r.customGenerator,defaultGenerator:gn,classNameGenerator:o?void 0:r.classNameGenerator,didMount:r.didMount,willUnmount:r.willUnmount,children:v=>d.jsx("div",{ref:this.handleInnerEl,className:b(h.flexCol,h.noShrink,h.whiteSpaceNoWrap,g&&h.sticky),style:{left:m,right:m},children:d.jsx(v,{tag:"div",attrs:i.innerAttrs,className:w(r.innerClassNameGenerator,l)})})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}buildDayHeaderRenderProps(e,n,s,r,i,a,o,l){const c=this.buildDayHeaderText(o?i:e.date,a,o,l),u=r?this.buildDayHeaderText(i,Dm,!1,l):c;return{...e,isNarrow:n,level:s,text:u.text,textParts:u.textParts,weekdayText:r?u.text:c.weekdayText,dayNumberText:c.dayNumberText}}}function Hm(t,e,n,s){const r=s.formatToParts(t,e);return{text:q(r),textParts:r,weekdayText:vt(r),dayNumberText:n?yt(r):""}}class vn extends O{constructor(){super(...arguments),this.innerHeightRefMap=new ee(()=>{Y(this.handleInnerHeights)}),this.handleInnerHeights=()=>{if(this._isUnmounting)return;const e=this.innerHeightRefMap.current;let n=0;for(const s of e.values())n=Math.max(n,s);this.currentInnerHeight!==n&&(this.currentInnerHeight=n,L(this.props.innerHeightRef,n))}}render(){const{props:e,context:n}=this,{options:s}=n;return d.jsx("div",{role:e.role,"aria-rowindex":e.rowIndex!=null?1+e.rowIndex:void 0,className:b(s.dayHeaderRowClass,e.className,h.flexRow,h.contentBox,e.borderBottom?h.borderOnlyB:h.borderNone),style:{height:e.height},children:e.dataConfigs.map((r,i)=>d.jsx(Nm,{renderConfig:e.renderConfig,dataConfig:r,borderStart:!!i,colWidth:e.colWidth,viewportWidth:e.viewportWidth,innerHeightRef:this.innerHeightRefMap.createRef(r.key),cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:e.rowLevel},r.key))})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0,this.currentInnerHeight=void 0,L(this.props.innerHeightRef,null)}}class ao extends O{render(){const{props:e}=this,{headerTiers:n}=e;return d.jsx("div",{role:"rowgroup",className:b(e.className,h.flexCol,e.width==null&&h.liquid),style:{width:e.width},children:n.map((s,r)=>M.createElement(vn,{...s,key:r,role:"row",borderBottom:r<n.length-1,colWidth:e.colWidth,viewportWidth:e.viewportWidth,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:n.length-r-1}))})}}class Pm extends O{constructor(){super(...arguments),this.state={},this.handleScroller=e=>{L(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:s}=this,{options:r}=s,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=ue(r),{totalWidth:l,clientWidth:c}=n;let u=l!=null&&c!=null?l-c:void 0;u<3&&(u=0);const f=!e.forPrint&&!ce(r),g=!e.forPrint&&mn(r),m=e.cellRows[0].length,v=c!=null?c/m:void 0,p=v!=null&&v<=wt,S=p||v!=null&&v<=r.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[r.dayHeaders&&d.jsxs("div",{className:b(w(r.tableHeaderClass,{isSticky:g,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),h.printHeader,g&&h.tableHeaderSticky),children:[d.jsxs("div",{className:h.flexRow,children:[d.jsx(ao,{headerTiers:e.headerTiers,cellIsNarrow:S,cellIsMicro:p}),!!u&&d.jsx("div",{className:b(w(r.fillerClass,{inTableHeader:!0}),h.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:w(r.dayHeaderDividerClass,{isSticky:g,multiMonthColumns:0,options:{allDaySlot:!!r.allDaySlot}})})]}),d.jsx(de,{vertical:f,className:b(w(r.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&h.flexCol,f&&h.liquid),ref:this.handleScroller,clientWidthRef:this.handleClientWidth,children:d.jsx(Os,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:h.grow,dayMaxEvents:e.forPrint?void 0:r.dayMaxEvents,dayMaxEventRows:r.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:S,cellIsMicro:p,rowHeightRefMap:e.rowHeightRefMap})}),d.jsx(at,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}class oo extends O{constructor(){super(...arguments),this.rootElRef=M.createRef()}render(){const{props:e}=this;return d.jsx("div",{ref:this.rootElRef,className:b(h.footerScrollbar,e.isSticky&&h.footerScrollbarSticky),children:d.jsx(de,{horizontal:!0,ref:e.scrollerRef,children:d.jsx("div",{style:{minWidth:e.canvasWidth}})})})}componentDidMount(){this._isUnmounting=!1,this.disconnectHeight=Xe(this.rootElRef.current,e=>{this._isUnmounting||L(this.props.scrollbarWidthRef,e)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),L(this.props.scrollbarWidthRef,null)}}class km extends O{constructor(){super(...arguments),this.state={},this.headerScrollerRef=M.createRef(),this.bodyScrollerRef=M.createRef(),this.footerScrollerRef=M.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:s}=this,{options:r}=s,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=ue(r),{totalWidth:l,clientWidth:c}=n,u=l!=null&&c!=null?l-c:void 0,f=!e.forPrint&&!ce(r),g=!e.forPrint&&mn(r),m=!e.forPrint&&Na(r),v=e.cellRows[0].length,[p,S]=ro(v,e.dayMinWidth,c),D=S!=null&&S<=wt,R=D||S!=null&&S<=r.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[r.dayHeaders&&d.jsxs("div",{className:b(w(r.tableHeaderClass,{isSticky:g,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),h.printHeader,g&&h.tableHeaderSticky),children:[d.jsxs(de,{horizontal:!0,hideScrollbars:!0,className:h.flexRow,ref:this.headerScrollerRef,children:[d.jsx(ao,{headerTiers:e.headerTiers,colWidth:S,viewportWidth:c,width:p,cellIsNarrow:R,cellIsMicro:D}),!!u&&d.jsx("div",{className:b(w(r.fillerClass,{inTableHeader:!0}),h.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:w(r.dayHeaderDividerClass,{isSticky:g,multiMonthColumns:0,options:{allDaySlot:!!r.allDaySlot}})})]}),d.jsx(de,{vertical:f,horizontal:!0,hideScrollbars:m||e.forPrint,className:b(w(r.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&h.flexCol,f&&h.liquid),ref:this.bodyScrollerRef,clientWidthRef:this.handleClientWidth,children:d.jsx(Os,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:h.grow,dayMaxEvents:e.forPrint?void 0:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,colWidth:S,width:p,visibleWidth:l,cellIsNarrow:R,cellIsMicro:D,rowHeightRefMap:e.rowHeightRefMap})}),!!m&&d.jsx(oo,{isSticky:!0,canvasWidth:p,scrollerRef:this.footerScrollerRef}),d.jsx(at,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1;const e=Ha(this.context.pluginHooks);this.syncedScroller=new e(!0),L(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 Lm extends O{constructor(){super(...arguments),this.scrollerRef=M.createRef(),this.rowHeightRefMap=new ee(()=>{Y(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 s=Sm(this.scrollDate,this.props.cellRows,e);s!=null&&(s&&s++,n.scrollTo({y:s}))}},this.handleScrollEnd=e=>{e&&(this.scrollDate=null)}}render(){const{props:e,context:n}=this,{options:s}=n,{borderlessX:r,borderlessTop:i,borderlessBottom:a}=ue(s),o=e.forPrint?[]:e.businessHourSegs,l=e.forPrint?[]:e.dateSelectionSegs,c=e.forPrint?null:e.eventDrag,u=e.forPrint?null:e.eventResize,f={...e,businessHourSegs:o,dateSelectionSegs:l,eventDrag:c,eventResize:u,scrollerRef:this.scrollerRef,rowHeightRefMap:this.rowHeightRefMap};return d.jsx(pn,{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:b(e.className,h.printRoot,w(s.tableClass,{borderlessX:r,borderlessTop:i,borderlessBottom:a,multiMonthColumns:0})),children:s.dayMinWidth?d.jsx(km,{...f,dayMinWidth:s.dayMinWidth}):d.jsx(Pm,{...f})})}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 lo extends ka{buildRenderRange(e,n,s){let r=super.buildRenderRange(e,n,s),{props:i}=this;return co({currentRange:r,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}function co(t){let{dateEnv:e,currentRange:n}=t,{start:s,end:r}=n,i;if(t.snapToWeek&&(s=e.startOfWeek(s),i=e.startOfWeek(r),i.valueOf()!==r.valueOf()&&(r=sr(i,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(V(n.end,-1))),o=Math.ceil(Qd(a,r));r=sr(r,6-o)}return{start:s,end:r}}class Am extends O{constructor(){super(...arguments),this.buildDayTableModel=N(so),this.buildDateRowConfigs=N(Ya),this.createDayHeaderFormatter=N(As),this.slicer=new Ps}render(){const{props:e,context:n}=this,{dateProfile:s}=e,{options:r,dateEnv:i}=n,a=this.buildDayTableModel(s,n.dateProfileGenerator,i),o=a.rowCount===1,l=this.createDayHeaderFormatter(n.options.dayHeaderFormat,o,a.colCount),c=this.slicer.sliceProps(e,s,r.nextDayThreshold,n,a);return d.jsx(bt,{unit:"day",children:(u,f)=>{const g=this.buildDateRowConfigs(a.headerDates,o,s,f,l,n);return d.jsx(Lm,{labelId:e.labelId,labelStr:e.labelStr,dateProfile:s,todayRange:f,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 uo={name:"daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Am,dateProfileGeneratorClass:lo},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}}}};class Om{constructor(e,n){this.emitter=new Et}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const ho={};function fo(t,e,n){let{instances:s}=t.mutatedEvents;for(let r in s)if(!cn(e.validRange,s[r].range))return!1;return go({eventDrag:t},n)}function Wm(t,e,n){return cn(e.validRange,t.range)?go({dateSelection:t},n):!1}function go(t,e){let n=e.getCurrentData(),s={businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null,...t};return(e.pluginHooks.isPropsValid||jm)(s,e)}function jm(t,e,n={},s){return!(t.eventDrag&&!Bm(t,e,n,s)||t.dateSelection&&!_m(t,e,n,s))}function Bm(t,e,n,s){let r=e.getCurrentData(),i=t.eventDrag,a=i.mutatedEvents,o=a.defs,l=a.instances,c=Zt(o,i.isEvent?t.eventUiBases:{"":r.selectionConfig});s&&(c=ye(c,s));let u=Hf(t.eventStore,i.affectedEvents.instances),f=u.defs,g=u.instances,m=Zt(f,t.eventUiBases);for(let v in l){let p=l[v],S=p.range,D=c[p.defId],R=o[p.defId];if(!mo(D.constraints,S,u,t.businessHours,e))return!1;let{eventOverlap:C}=e.options,E=typeof C=="function"?C:null;for(let I in g){let k=g[I];if(hs(S,k.range)&&(m[k.defId].overlap===!1&&i.isEvent||D.overlap===!1||E&&!E(new F(e,f[k.defId],k),new F(e,R,p))))return!1}let x=r.eventStore;for(let I of D.allows){let k={...n,range:p.range,allDay:R.allDay},P=x.defs[R.defId],H=x.instances[v],A;if(P?A=new F(e,P,H):A=new F(e,R),!I(ws(k,e),A))return!1}}return!0}function _m(t,e,n,s){let r=t.eventStore,i=r.defs,a=r.instances,o=t.dateSelection,l=o.range,{selectionConfig:c}=e.getCurrentData();if(s&&(c=s(c)),!mo(c.constraints,l,r,t.businessHours,e))return!1;let{selectOverlap:u}=e.options,f=typeof u=="function"?u:null;for(let g in a){let m=a[g];if(hs(l,m.range)&&(c.overlap===!1||f&&!f(new F(e,i[m.defId],m),null)))return!1}for(let g of c.allows){let m={...n,...o};if(!g(ws(m,e),null))return!1}return!0}function mo(t,e,n,s,r){for(let i of t)if(!Fm(Um(i,e,n,s,r),e))return!1;return!0}function Um(t,e,n,s,r){return t==="businessHours"?Hn(ke(s,e,r)):typeof t=="string"?Hn(hn(n,i=>i.groupId===t)):typeof t=="object"&&t?Hn(ke(t,e,r)):[]}function Hn(t){let{instances:e}=t,n=[];for(let s in e)n.push(e[s].range);return n}function Fm(t,e){for(let n of t)if(cn(n,e))return!0;return!1}ho.touchMouseIgnoreWait=500;let Xn=0,Xt=0,Kn=!1;class po{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()&&Vm(n)&&this.tryStart(n)){let s=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let s=this.createEventFromMouse(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)},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 s=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s);let r=n.target;this.shouldIgnoreMove||r.addEventListener("touchmove",this.handleTouchMove),r.addEventListener("touchend",this.handleTouchEnd),r.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{if(this.isDragging){let s=this.createEventFromTouch(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)}},this.handleTouchEnd=n=>{if(this.isDragging){let s=n.target;s.removeEventListener("touchmove",this.handleTouchMove),s.removeEventListener("touchend",this.handleTouchEnd),s.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,zm()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let s=window.scrollX-this.prevScrollX+this.prevPageX,r=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:s,pageY:r,deltaX:s-this.origPageX,deltaY:r-this.origPageY})}},this.containerEl=e,this.emitter=new Et,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Gm()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Ym()}cancel(){this.isDragging&&this.cleanup()}tryStart(e){let n=this.querySubjectEl(e),s=e.target;return n&&(!this.handleSelector||s.closest(this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Kn=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?e.target.closest(this.selector):this.containerEl}shouldIgnoreMouse(){return Xn||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Kn=!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 s=0,r=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(s=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:s,deltaY:r}}createEventFromTouch(e,n){let s=e.touches,r,i,a=0,o=0;return s&&s.length?(r=s[0].pageX,i=s[0].pageY):(r=e.pageX,i=e.pageY),n?(this.origPageX=r,this.origPageY=i):(a=r-this.origPageX,o=i-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:a,deltaY:o}}}function Vm(t){return t.button===0&&!t.ctrlKey}function zm(){Xn+=1,setTimeout(()=>{Xn-=1},ho.touchMouseIgnoreWait)}function Gm(){Xt+=1,Xt===1&&window.addEventListener("touchmove",vo,{passive:!1})}function Ym(){Xt-=1,Xt||window.removeEventListener("touchmove",vo,{passive:!1})}function vo(t){Kn&&t.preventDefault()}class qm{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,s){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=s-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 s=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(s,this.revertDuration):setTimeout(s,0)}doRevertAnimation(e,n){let s=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();s.style.transition="top "+n+"ms,left "+n+"ms",jt(s,{left:r.left,top:r.top}),Uu(s,()=>{s.style.transition="",e()})}cleanup(){this.mirrorEl&&(this.mirrorEl.remove(),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&jt(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(h.borderBoxRoot),jt(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 Ws{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 Zm extends Ws{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 $m extends Ws{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 yo extends Ws{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 So extends yo{constructor(e,n){super(new Zm(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return $g(this.scrollController.el)}}class Xm extends yo{constructor(e){super(new $m,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const Fr=typeof performance=="function"?performance.now:Date.now;class Km{constructor(){this.isEnabled=!0,this.scrollQuery=[window,`.${h.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=Fr();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,s){this.isEnabled&&(this.scrollCaches=this.buildCaches(s),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 s=e-window.scrollX,r=n-window.scrollY,i=this.pointerScreenY===null?0:r-this.pointerScreenY,a=this.pointerScreenX===null?0:s-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=s,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Fr()))}}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:s}=e,{edgeThreshold:r}=this,i=r-e.distance,a=i*i/(r*r)*this.maxVelocity*n,o=1;switch(e.name){case"left":o=-1;case"right":s.setScrollLeft(s.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":s.setScrollTop(s.getScrollTop()+a*o);break}}computeBestEdge(e,n){let{edgeThreshold:s}=this,r=null,i=this.scrollCaches||[];for(let a of i){let o=a.clientRect,l=e-o.left,c=o.right-e,u=n-o.top,f=o.bottom-n;l>=0&&c>=0&&u>=0&&f>=0&&(u<=s&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"top",distance:u}),f<=s&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>f)&&(r={scrollCache:a,name:"bottom",distance:f}),l<=s&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),c<=s&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"right",distance:c}))}return r}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new Xm(!1):new So(n,!1))}queryScrollEls(e){let n=[];for(let s of this.scrollQuery)typeof s=="object"?n.push(s):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(s)));return n}}class Ct extends Om{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=r=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.emitter.trigger("pointerdown",r),this.isInteracting&&(Fu(document.body),zu(document.body),r.isTouch||r.origEvent.preventDefault(),this.mirror.setIsVisible(!1),this.mirror.start(r.subjectEl,r.pageX,r.pageY),this.startDelay(r),this.minDistance||this.handleDistanceSurpassed(r)))},this.onPointerMove=r=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",r),!this.isDistanceSurpassed){let i=this.minDistance,a,{deltaX:o,deltaY:l}=r;a=o*o+l*l,a>=i*i&&this.handleDistanceSurpassed(r)}this.isDragging&&(r.origEvent.type!=="scroll"&&(this.mirror.handleMove(r.pageX,r.pageY),this.autoScroller.handleMove(r.pageX,r.pageY)),this.emitter.trigger("dragmove",r))}},this.onPointerUp=r=>{this.isInteracting&&(this.isInteracting=!1,Vu(document.body),Gu(document.body),this.emitter.trigger("pointerup",r),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(r)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let s=this.pointer=new po(e);s.emitter.on("pointerdown",this.onPointerDown),s.emitter.on("pointermove",this.onPointerMove),s.emitter.on("pointerup",this.onPointerUp),n&&(s.selector=n),this.mirror=new qm,this.autoScroller=new Km}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 Jm{constructor(e){this.el=e,this.origRect=Hs(e),this.isRtl=pt(e),this.scrollCaches=za(e).map(n=>new So(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 s={left:e,top:n};for(let r of this.scrollCaches)if(!Qm(r.getEventTarget())&&!zg(s,r.clientRect))return!1;return!0}}function Qm(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class yn{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=s=>{let{dragging:r}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(s),this.initialHit||!this.requireInitial?this.emitter.trigger("pointerdown",s):r.cancel()},this.handleDragStart=s=>{this.emitter.trigger("dragstart",s),this.handleMove(s,!0)},this.handleDragMove=s=>{this.emitter.trigger("dragmove",s),this.handleMove(s)},this.handlePointerUp=s=>{this.releaseHits(),this.emitter.trigger("pointerup",s)},this.handleDragEnd=s=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,s),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",s)},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 Et}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},s=n,r=e.subjectEl,i;r instanceof HTMLElement&&(i=Hs(r),s=Gg(s,i));let a=this.initialHit=this.queryHitForOffset(s.left,s.top);if(a){if(this.useSubjectCenter&&i){let o=Va(i,a.rect);o&&(s=Yg(o))}this.coordAdjust=qg(s,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let s=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Sn(this.movingHit,s))&&(this.movingHit=s,this.emitter.trigger("hitupdate",s,!1,e))}prepareHits(){this.offsetTrackers=ye(this.droppableStore,e=>(e.component.prepareHits(),new Jm(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:s,offsetTrackers:r}=this,i=null;for(let a in s){let o=s[a].component,l=r[a];if(l&&l.isWithinClipping(e,n)){let c=l.computeLeft(),u=l.computeTop(),f=e-c,g=n-u,{origRect:m}=l,v=m.right-m.left,p=m.bottom-m.top;if(f>=0&&f<v&&g>=0&&g<p){let S=o.queryHit(l.isRtl,f,g,v,p);S&&cn(S.dateProfile.activeRange,S.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(f+c-window.scrollX,g+u-window.scrollY)))&&(!i||S.layer>i.layer)&&(S.componentId=a,S.context=o.context,S.rect.left+=c,S.rect.right+=c,S.rect.top+=u,S.rect.bottom+=u,i=S)}}}return i}}function Sn(t,e){return!t&&!e?!0:!!t!=!!e?!1:ph(t.dateSpan,e.dateSpan)}function Eo(t,e){let n={};for(let s of e.pluginHooks.datePointTransforms)Object.assign(n,s(t,e));return Object.assign(n,ep(t,e.dateEnv)),n}function ep(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class tp extends nt{constructor(e){super(e),this.handlePointerDown=s=>{let{dragging:r}=this,i=s.origEvent.target;this.component.context.emitter.hasHandlers("dateClick")&&this.component.isValidDateDownEl(i)||r.cancel()},this.handleDragEnd=s=>{let{component:r}=this,{pointer:i}=this.dragging;if(!i.wasTouchScroll){let{initialHit:a,finalHit:o}=this.hitDragging;if(a&&o&&Sn(a,o)){let{context:l}=r,c={...Eo(a.dateSpan,l),dayEl:a.getDayEl(),jsEvent:s.origEvent,view:l.viewApi||l.calendarApi.view};l.emitter.trigger("dateClick",c)}}},this.dragging=new Ct(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new yn(this.dragging,Ms(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class np extends nt{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?sp(o):null:l.cancel()},this.handleDragStart=a=>{this.component.context.calendarApi.unselect(a)},this.handleHitUpdate=(a,o)=>{let{context:l}=this.component,c=null,u=!1;if(a){let f=this.hitDragging.initialHit;a.componentId===f.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(f,a)||(c=rp(f,a,l.pluginHooks.dateSelectionTransformers)),(!c||!Wm(c,a.dateProfile,l))&&(u=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),u?ms():ps(),o||(this.dragSelection=c)},this.handlePointerUp=a=>{this.dragSelection?(ma(this.dragSelection,a,this.component.context),this.dragSelection=null):this.component.context.emitter.trigger("_noDateSelect")};let{component:n}=e,{options:s}=n.context,r=this.dragging=new Ct(e.el);r.touchScrollAllowed=!1,r.minDistance=s.selectMinDistance||0,r.autoScroller.isEnabled=s.dragScroll;let i=this.hitDragging=new yn(this.dragging,Ms(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 sp(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function rp(t,e,n){let s=t.dateSpan,r=e.dateSpan,i=[s.range.start,s.range.end,r.range.start,r.range.end];i.sort(Xu);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=s.allDay,a}class Rt extends nt{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:u}=c,{options:f}=l.context,g=l.context;this.subjectEl=a.subjectEl;let v=(this.eventRange=$e(a.subjectEl)).instance.instanceId;this.relevantEvents=Es(g.getCurrentData().eventStore,v),c.minDistance=a.isTouch?0:f.eventDragMinDistance,c.delay=a.isTouch&&v!==l.props.eventSelection?ap(l):null,u.parentNode=ja(o),u.revertDuration=f.dragRevertDuration,u.colorScheme=f.colorScheme||"",l.isValidSegDownEl(o)&&!o.closest(`.${h.internalEventResizer}`)?this.isDragging=a.subjectEl.classList.contains(h.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 F(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,u=this.component.context,f=null,g=null,m=null,v=!1,p={affectedEvents:l,mutatedEvents:ie(),isEvent:!0};if(a){f=a.context;let S=f.options;u===f||S.editable&&S.droppable?(g=ip(c,a,this.eventRange.instance.range.start,f.getCurrentData().pluginHooks.eventDragMutationMassagers),g&&(m=Cs(l,f.getCurrentData().eventUiBases,g,f),p.mutatedEvents=m,fo(p,a.dateProfile,f)||(v=!0,g=null,m=null,p.mutatedEvents=ie()))):f=null}this.displayDrag(f,p),v?ms():ps(),o||(u===f&&Sn(c,a)&&(g=null),this.dragging.setMirrorNeedsRevert(!g),this.dragging.setMirrorIsVisible(!a||!this.subjectEl.getRootNode().querySelector(`.${h.internalEventMirror}`)),this.receivingContext=f,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:u}=this,f=this.eventRange.def,g=this.eventRange.instance,m=new F(o,f,g),v=this.relevantEvents,p=this.mutatedRelevantEvents,{finalHit:S}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:m,jsEvent:a.origEvent,view:l}),u){if(c===o){let D=new F(o,p.defs[f.defId],g?p.instances[g.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:p});let R={oldEvent:m,event:D,relatedEvents:Ie(p,o,g),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:v})}},C={};for(let E of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(C,E(u,o));o.emitter.trigger("eventDrop",{...R,...C,el:a.subjectEl,delta:u.datesDelta,jsEvent:a.origEvent,view:l}),o.emitter.trigger("eventChange",R)}else if(c){let D={event:m,relatedEvents:Ie(v,o,g),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:v})}};o.emitter.trigger("eventLeave",{...D,draggedEl:a.subjectEl,view:l}),o.dispatch({type:"REMOVE_EVENTS",eventStore:v}),o.emitter.trigger("eventRemove",D);let R=p.defs[f.defId],C=p.instances[g.instanceId],E=new F(c,R,C);c.dispatch({type:"MERGE_EVENTS",eventStore:p});let x={event:E,relatedEvents:Ie(p,c,C),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",{...Eo(S.dateSpan,c),draggedEl:a.subjectEl,jsEvent:a.origEvent,view:S.context.viewApi}),c.emitter.trigger("eventReceive",{...x,draggedEl:a.subjectEl,view:S.context.viewApi})}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:s}=n.context,r=this.dragging=new Ct(e.el);r.pointer.selector=Rt.SELECTOR,r.touchScrollAllowed=!1,r.autoScroller.isEnabled=s.dragScroll;let i=this.hitDragging=new yn(this.dragging,Un);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 s=this.component.context,r=this.receivingContext;r&&r!==e&&(r===s?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:ie(),isEvent:!0}}):r.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}}Rt.SELECTOR=`.${h.internalEventDraggable}, .${h.internalEventResizable}`;function ip(t,e,n,s){let r=t.dateSpan,i=e.dateSpan,a=r.range.start,o=i.range.start,l={};r.allDay!==i.allDay&&(l.allDay=i.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,i.allDay?a=B(n):a=n);let c=Fe(a,o,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);c.milliseconds&&(l.allDay=!1);let u={datesDelta:c,standardProps:l};for(let f of s)f(u,t,e);return u}function ap(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class op extends nt{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=$e(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=Es(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingEventRange=$e(l),a.calendarApi.unselect(),a.emitter.trigger("eventResizeStart",{el:l,event:new F(a,o.def,o.instance),jsEvent:i.origEvent,view:a.viewApi})},this.handleHitUpdate=(i,a,o)=>{let{context:l}=this.component,c=this.relevantEvents,u=this.hitDragging.initialHit,f=this.eventRange.instance,g=null,m=null,v=!1,p={affectedEvents:c,mutatedEvents:ie(),isEvent:!0};i&&(i.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,i)||(g=lp(u,i,o.subjectEl.classList.contains(h.internalEventResizerStart),f.range))),g&&(m=Cs(c,l.getCurrentData().eventUiBases,g,l),p.mutatedEvents=m,fo(p,i.dateProfile,l)||(v=!0,g=null,m=null,p.mutatedEvents=null)),m?l.dispatch({type:"SET_EVENT_RESIZE",state:p}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),v?ms():ps(),a||(g&&Sn(u,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 F(a,o,l),u=this.relevantEvents,f=this.mutatedRelevantEvents;if(a.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:i.origEvent,view:a.viewApi}),this.validMutation){let g=new F(a,f.defs[o.defId],l?f.instances[l.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:f});let m={oldEvent:c,event:g,relatedEvents:Ie(f,a,l),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:u})}};a.emitter.trigger("eventResize",{...m,el:this.draggingSegEl,startDelta:this.validMutation.startDelta||W(0),endDelta:this.validMutation.endDelta||W(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,s=this.dragging=new Ct(e.el);s.pointer.selector=`.${h.internalEventResizer}`,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=n.context.options.dragScroll;let r=this.hitDragging=new yn(this.dragging,Ms(e));r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return e.subjectEl.closest(`.${h.internalEvent}`)}}function lp(t,e,n,s){let r=t.context.dateEnv,i=t.dateSpan.range.start,a=e.dateSpan.range.start,o=Fe(i,a,r,t.largeUnit);if(n){if(r.add(s.start,o)<s.end)return{startDelta:o}}else if(r.add(s.end,o)>s.start)return{endDelta:o};return null}class cp{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=s=>{s.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=s=>{let r=this.context.options.unselectCancel,i=Ba(s.origEvent);this.matchesCancel=!!i.closest(r),this.matchesEvent=!!i.closest(Rt.SELECTOR)},this.onDocumentPointerUp=s=>{let{context:r}=this,{documentPointer:i}=this,a=r.getCurrentData();if(!i.wasTouchScroll){if(a.dateSelection&&!this.isRecentPointerDateSelect){let o=r.options.unselectAuto;o&&(!o||!this.matchesCancel)&&r.calendarApi.unselect(s)}a.eventSelection&&!this.matchesEvent&&r.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new po(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 dp={name:"interaction",componentInteractions:[tp,np,Rt,op],calendarInteractions:[cp],elementDraggingImpl:Ct};class Vr extends O{render(){const{props:e,context:n}=this,{options:s}=n,r=n.dateEnv.formatToParts(e.dayDate,e.dayFormat),i=q(r),a=s.navLinks,o={...e.dateMeta,view:n.viewApi,text:i,textParts:r,get weekdayText(){return vt(r)},get dayNumberText(){return yt(r)},hasNavLink:a,level:e.level},l=a?rt(this.context,e.dayDate,void 0,i,this.props.isTabbable):{};return d.jsx(U,{tag:"div",attrs:l,renderProps:o,generatorName:"listDayHeaderContent",customGenerator:s.listDayHeaderContent,defaultGenerator:gn,classNameGenerator:s.listDayHeaderInnerClass})}}class up extends O{render(){let{options:e,viewApi:n,viewSpec:s}=this.context,{dayDate:r,dateMeta:i}=this.props,a=!this.props.forPrint;const o=e.listDayFormat??hp(s),l=e.listDayAltFormat??fp(s);let c={...i,view:n};return d.jsx(U,{tag:"div",attrs:{"data-date":tt(r),...i.isToday?{"aria-current":"date"}:{}},className:a?h.stickyT:"",renderProps:c,generatorName:void 0,classNameGenerator:e.listDayHeaderClass,didMount:e.listDayHeaderDidMount,willUnmount:e.listDayHeaderWillUnmount,children:()=>d.jsxs(d.Fragment,{children:[!!o&&d.jsx(Vr,{dayDate:r,dayFormat:o,isTabbable:!0,dateMeta:i,level:0}),!!l&&d.jsx(Vr,{dayDate:r,dayFormat:l,isTabbable:!1,dateMeta:i,level:1})]})})}}function hp({durationUnit:t,singleUnit:e}){return e==="day"||t==="day"||e==="week"?$t:Is}function fp({durationUnit:t,singleUnit:e}){if(e!=="day")return t==="day"||e==="week"?Is:$t}const gp=j({hour:"numeric",minute:"2-digit",meridiem:"short"});class mp extends O{render(){let{props:e,context:n}=this,{eventRange:s}=e;const{displayEventTime:r}=n.options;let i=r!==!1&&(s.def.allDay||!e.isStart&&!e.isEnd)?n.options.allDayText:void 0;return d.jsx(Dt,{...e,attrs:{role:"listitem"},forcedTimeText:i,defaultTimeFormat:gp,disableDragging:!0,disableResizing:!0,disableZindexes:!0,display:"list-item"})}}class pp extends O{constructor(){super(...arguments),this.getDateMeta=N(je),this.sortEventSegs=N(Rs)}render(){const{props:e,context:n}=this,{nowDate:s,todayRange:r}=e,{options:i}=n,a=this.getDateMeta(e.dayDate,n.dateEnv,void 0,r),o=this.sortEventSegs(e.segs,i.eventOrder),l=st(this.context,e.dayDate),c={...a,isFirst:e.isFirst,isLast:e.isLast,view:n.viewApi},u={...a,view:n.viewApi};return d.jsxs("div",{role:"listitem","aria-label":l,className:w(i.listDayClass,c),children:[d.jsx(up,{dayDate:e.dayDate,dateMeta:a,forPrint:e.forPrint}),d.jsx("div",{role:"list","aria-label":i.eventsHint,className:b(w(i.listDayBodyClass,u),h.flexCol),children:o.map((f,g)=>{const m=fn(f),v=g===0,p=g===o.length-1;return d.jsx(mp,{eventRange:f.eventRange,slicedStart:f.slicedStart,slicedEnd:f.slicedEnd,isStart:f.isStart,isEnd:f.isEnd,isFirst:v,isLast:p,isDragging:!1,isResizing:!1,isMirror:!1,isSelected:!1,...Le(f.eventRange,r,s)},m)})})]})}}class vp extends he{constructor(){super(...arguments),this.computeDateVars=N(Sp),this.eventStoreToSegs=N(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:s}=n,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),a=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i),o=!e.forPrint&&!ce(s);return d.jsx(pn,{viewSpec:n.viewSpec,className:b(e.className,h.flexCol),elRef:this.setRootEl,children:a.length?d.jsx(de,{vertical:o,className:b(h.flexCol,o?h.liquid:""),children:this.renderSegList(a,r)}):this.renderEmptyMessage()})}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,s={text:e.noEventsText,view:n};return d.jsx(U,{tag:"div",attrs:{role:"status"},renderProps:s,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:yp,classNameGenerator:e.noEventsClass,className:h.grow,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount,children:r=>d.jsx(r,{tag:"div",className:w(e.noEventsInnerClass,s)})})}renderSegList(e,n){let{options:s}=this.context,r=Ep(e);return d.jsx("div",{role:"list","aria-labelledby":this.props.labelId,"aria-label":this.props.labelStr,className:b(h.flexCol,b(s.listDaysClass)),children:d.jsx(bt,{unit:"day",children:(i,a)=>{const o=[],l=r.reduce((u,f)=>u+(f?1:0),0);let c=0;for(let u=0;u<r.length;u+=1){let f=r[u];if(f){const g=n[u],m=tt(g),v=c===0,p=c===l-1;o.push(d.jsx(pp,{dayDate:g,nowDate:i,todayRange:a,segs:f,isFirst:v,isLast:p,forPrint:this.props.forPrint},m)),c+=1}}return d.jsx(d.Fragment,{children:o})}})})}_eventStoreToSegs(e,n,s){return this.eventRangesToSegs(Bn(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,s)}eventRangesToSegs(e,n){let s=[];for(let r of e)s.push(...this.eventRangeToSegs(r,n));return s}eventRangeToSegs(e,n){let s=e.range,r,i=[];for(r=0;r<n.length;r+=1){const a=we(s,n[r]);a&&i.push({eventRange:e,slicedStart:a.start,slicedEnd:a.end,isStart:e.isStart&&s.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===a.end.valueOf(),dayIndex:r})}return i}}function yp(t){return t.text}function Sp(t){let e=B(t.renderRange.start),n=t.renderRange.end,s=[],r=[];for(;e<n;)s.push(e),r.push({start:e,end:V(e,1)}),e=V(e,1);return{dayDates:s,dayRanges:r}}function Ep(t){let e=[],n,s;for(n=0;n<t.length;n+=1)s=t[n],(e[s.dayIndex]||(e[s.dayIndex]=[])).push(s);return e}var bp={name:"list",views:{list:{component:vp,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 Dp extends he{constructor(){super(...arguments),this.state={},this.buildDayTableModel=N(so),this.createDayHeaderFormatter=N(As),this.buildDateRowConfig=N(qa),this.titleElRef=M.createRef(),this.tableHeaderElRef=M.createRef(),this.rowHeightRefMap=new ee(()=>{Y(this.handleHeights)}),this.slicer=new Ps,this.handleEl=e=>{const{options:n}=this.context;e&&(this.rootEl=e,n.singleMonthDidMount?.({el:this.rootEl,...this.renderProps}))},this.handleGridWidth=e=>{this._isUnmounting||this.setState({gridWidth:e})},this.handleHeights=()=>{this._isUnmounting||L(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:s}=this,{dateProfile:r,forPrint:i}=e,{options:a,dateEnv:o}=s,{borderlessX:l,borderlessTop:c,borderlessBottom:u}=ue(a),f=this.buildDayTableModel(r,s.dateProfileGenerator,o),g=this.slicer.sliceProps(e,r,a.nextDayThreshold,s,f),m=this.createDayHeaderFormatter(a.dayHeaderFormat,!1,f.colCount),v=this.buildDateRowConfig(f.headerDates,!1,r,e.todayRange,m,s);this.cellRows=f.cellRows;const p=!i&&e.colCount===1,S=!i||e.hasLateralSiblings,D=f.cellRows[0].length,R=n.gridWidth!=null?n.gridWidth/D:void 0,C=R!=null&&R<=wt,E=C||R!=null&&R<=a.dayNarrowWidth,x=n.gridWidth!=null?1/a.aspectRatio*n.gridWidth/6:void 0,I=p?x:void 0,k=p&&x!=null&&n.tableHeaderHeight!=null?x+n.tableHeaderHeight+1:void 0,P=i?[]:g.businessHourSegs,H=i?[]:g.dateSelectionSegs,A=i?null:g.eventDrag,z=i?null:g.eventResize,_=a.navLinks&&e.colCount>1,Z={multiMonthColumns:e.colCount||0,isSticky:p,isNarrow:E,hasNavLink:_},re=e.dateProfile.currentRange.start,te=_?rt(s,re,"month",e.isoDateStr):{};return d.jsx("div",{role:"listitem",style:{width:e.width},children:d.jsxs("div",{role:"grid","aria-labelledby":this.titleId,"data-date":e.isoDateStr,className:b(w(a.singleMonthClass,{isFirst:e.isFirst,isLast:e.isLast,multiMonthColumns:e.colCount||0}),h.flexCol,e.hasLateralSiblings&&h.breakInsideAvoid),children:[d.jsx(at,{widthRef:this.handleGridWidth}),d.jsx("div",{id:this.titleId,ref:this.titleElRef,className:b(w(a.singleMonthHeaderClass,Z),p&&h.stickyT,h.flexCol),style:{zIndex:p?3:void 0,marginBottom:k},children:d.jsx("div",{...te,className:b(w(a.singleMonthHeaderInnerClass,Z),te.className),children:q(o.formatToParts(re,e.titleFormat))})}),d.jsxs("div",{className:b(w(a.tableClass,{borderlessX:l,borderlessTop:c,borderlessBottom:u,multiMonthColumns:e.colCount||0}),h.flexCol),style:{marginTop:k!=null?-k:void 0},children:[d.jsxs("div",{ref:this.tableHeaderElRef,className:b(w(a.tableHeaderClass,{isSticky:p,borderlessX:l,borderlessTop:c,borderlessBottom:u,multiMonthColumns:e.colCount||0}),h.flexCol,p&&h.sticky),style:{zIndex:p?2:void 0,top:p?n.titleHeight:0,marginBottom:I},children:[d.jsx(vn,{...v,role:"row",borderBottom:!1,cellIsNarrow:E,cellIsMicro:C,rowLevel:0}),d.jsx("div",{className:w(a.dayHeaderDividerClass,{isSticky:p,multiMonthColumns:e.colCount||0,options:{allDaySlot:!!a.allDaySlot}})})]}),d.jsx("div",{className:b(w(a.tableBodyClass,{borderlessX:l,borderlessTop:c,borderlessBottom:u,multiMonthColumns:e.colCount||0}),h.flexCol,S&&h.rel),style:{zIndex:p?1:void 0,marginTop:I!=null?-I:void 0,aspectRatio:S?String(a.aspectRatio):void 0},children:d.jsx(Os,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:f.cellRows,className:S?h.fill:"",forPrint:i&&!e.hasLateralSiblings,dayMaxEventRows:i&&e.hasLateralSiblings?1:!0,fgEventSegs:g.fgEventSegs,bgEventSegs:g.bgEventSegs,businessHourSegs:P,dateSelectionSegs:H,eventDrag:A,eventResize:z,eventSelection:g.eventSelection,visibleWidth:n.gridWidth,cellIsNarrow:E,cellIsMicro:C,rowHeightRefMap:this.rowHeightRefMap})})]})]})})}componentDidMount(){this._isUnmounting=!1,this.disconnectTitleHeight=Xe(this.titleElRef.current,e=>{this.setState({titleHeight:this.titleHeight=e}),Y(this.handleHeights)}),this.disconnectTableHeaderHeight=Xe(this.tableHeaderElRef.current,e=>{this.setState({tableHeaderHeight:this.tableHeaderHeight=e}),Y(this.handleHeights)})}componentWillUnmount(){const{options:e}=this.context;this._isUnmounting=!0,this.disconnectTitleHeight(),this.disconnectTableHeaderHeight(),e.singleMonthWillUnmount?.({el:this.rootEl,...this.renderProps})}}class wp extends he{constructor(){super(...arguments),this.state={},this.splitDateProfileByMonth=N(Rp),this.buildMonthFormat=N(Mp),this.scrollerRef=M.createRef(),this.tilesElRef=M.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:s}=this,{options:r}=e,i=!n.forPrint&&!ce(r),a=this.splitDateProfileByMonth(e.dateProfileGenerator,n.dateProfile,e.dateEnv,r.fixedWeekCount,r.showNonCurrentDates),o=this.buildMonthFormat(r.singleMonthTitleFormat,a),{multiMonthMaxColumns:l,singleMonthMinWidth:c}=r,{innerWidth:u}=s;let f,g,m=!1;return u!=null&&(f=Math.max(1,Math.min(l,Math.floor(u/c))),n.forPrint&&(f=Math.min(f,2)),g=gt(1/f),m=f>1),d.jsx(bt,{unit:"day",children:(v,p)=>d.jsxs(pn,{viewSpec:e.viewSpec,className:b(!n.forPrint&&h.flexCol,n.className),children:[d.jsx(de,{vertical:i,className:i?h.liquid:"",ref:this.scrollerRef,children:d.jsx("div",{role:"list",ref:this.tilesElRef,"aria-labelledby":n.labelId,"aria-label":n.labelStr,className:h.safeTiles,children:a.map((S,D)=>{const R=cr(S.currentRange.start);return M.createElement(Dp,{...n,key:R,todayRange:p,isoDateStr:R,titleFormat:o,dateProfile:S,width:g,colCount:f,isFirst:!D,isLast:D===a.length-1,hasLateralSiblings:m})})})}),d.jsx(at,{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?.querySelector(`[data-date="${cr(e.date)}"]`)?.parentElement;if(n&&r){const i=Math.round(r.getBoundingClientRect().top),a=Math.round(n.getBoundingClientRect().top);return i-a}}}}const Cp=W(1,"month");function Rp(t,e,n,s,r){const{start:i,end:a}=e.currentRange;let o=i;const l=[];for(;o.valueOf()<a.valueOf();){const c=n.add(o,Cp),u={start:t.skipHiddenDays(o),end:t.skipHiddenDays(c,-1,!0)};let f=co({currentRange:u,snapToWeek:!0,fixedWeekCount:s,dateEnv:n});f={start:t.skipHiddenDays(f.start),end:t.skipHiddenDays(f.end,-1,!0)};const g=e.activeRange?we(e.activeRange,r?f:u):null;l.push({currentDate:e.currentDate,isValid:e.isValid,validRange:e.validRange,renderRange:f,activeRange:g,currentRange:u,currentRangeUnit:"month",isRangeAllDay:!0,dateIncrement:e.dateIncrement,slotMinTime:e.slotMaxTime,slotMaxTime:e.slotMinTime}),o=c}return l}const Tp=j({year:"numeric",month:"long"}),xp=j({month:"long"});function Mp(t,e){return t||(e[0].currentRange.start.getUTCFullYear()!==e[e.length-1].currentRange.start.getUTCFullYear()?Tp:xp)}var Ip={name:"multimonth",initialView:"multiMonthYear",views:{multiMonth:{component:wp,dateProfileGeneratorClass:lo,multiMonthMaxColumns:3,singleMonthMinWidth:350},multiMonthYear:{type:"multiMonth",duration:{years:1},fixedWeekCount:!0,showNonCurrentDates:!1}}};const Pn=ie();class Np{constructor(){this.getKeysForEventDefs=N(this._getKeysForEventDefs),this.splitDateSelection=N(this._splitDateSpan),this.splitEventStore=N(this._splitEventStore),this.splitIndividualUi=N(this._splitIndividualUi),this.splitEventDrag=N(this._splitInteraction),this.splitEventResize=N(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),s=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,s),a=this.splitEventStore(e.eventStore,s),o=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=ye(n,(u,f)=>this.eventUiBuilders[f]||N(Hp));for(let u in n){let f=n[u],g=a[u]||Pn,m=this.eventUiBuilders[u];c[u]={businessHours:f.businessHours||e.businessHours,dateSelection:r[u]||null,eventStore:g,eventUiBases:m(e.eventUiBases[""],f.ui,i[u]),eventDrag:o[u]||null,eventResize:l[u]||null,eventSelection:g.instances[e.eventSelection]?e.eventSelection:""}}return c}_splitDateSpan(e){let n={};if(e){let s=this.getKeysForDateSpan(e);for(let r of s)n[r]=e}return n}_getKeysForEventDefs(e){return ye(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:s,instances:r}=e,i={};for(let a in s)for(let o of n[a])i[o]||(i[o]=ie()),i[o].defs[a]=s[a];for(let a in r){let o=r[a];for(let l of n[o.defId])i[l]&&(i[l].instances[a]=o)}return i}_splitIndividualUi(e,n){let s={};for(let r in e)if(r)for(let i of n[r])s[i]||(s[i]={}),s[i][r]=e[r];return s}_splitInteraction(e){let n={};if(e){let s=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),a=o=>{n[o]||(n[o]={affectedEvents:s[o]||Pn,mutatedEvents:i[o]||Pn,isEvent:e.isEvent})};for(let o in s)a(o);for(let o in i)a(o)}return n}}function Hp(t,e,n){let s=[];t&&s.push(t),e&&s.push(e);let r={"":ca(s)};return n&&Object.assign(r,n),r}class Pp extends Np{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?wh(e)?["timed","allDay"]:["allDay"]:["timed"]}}class kp extends Ga{sliceRange(e,n){let s=[];for(let r=0;r<n.length;r+=1){let i=we(e,n[r]);i&&s.push({startDate:i.start,endDate:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return s}}function ot(t,e){let n=[],s;for(s=0;s<e;s+=1)n.push([]);if(t)for(s=0;s<t.length;s+=1)n[t[s].col].push(t[s]);return n}function zr(t,e){let n=[];if(t){for(let s=0;s<e;s+=1)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let s of t.segs)n[s.col].segs.push(s)}else for(let s=0;s<e;s+=1)n[s]=null;return n}const Gr=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function Lp(t,e,n,s,r){let i=new Date(0),a=t,o=W(0),l=n||Ap(s),c=[],u=0;for(;ve(a)<ve(e);){let f=r.add(i,a),g=fs(o,l)!==null;c.push({date:f,time:a,key:f.toISOString(),isoTimeStr:Cu(f),isLabeled:g,isFirst:u===0}),a=Ln(a,s),o=Ln(o,s),u+=1}return c}function Ap(t){let e,n,s;for(e=Gr.length-1;e>=0;e-=1)if(n=W(Gr[e]),s=fs(n,t),s!==null&&s>1)return n;return t}class bo extends O{constructor(){super(...arguments),this.innerElRef=M.createRef()}render(){let{props:e}=this,{options:n,viewApi:s}=this.context,r={text:n.allDayText,view:s,isNarrow:e.isNarrow};return d.jsx(U,{tag:"div",attrs:{role:"rowheader"},className:b(h.flexRow,h.noMargin,h.noPadding,h.contentBox),style:{width:e.width},renderProps:r,generatorName:"allDayHeaderContent",customGenerator:n.allDayHeaderContent,defaultGenerator:Op,classNameGenerator:n.allDayHeaderClass,didMount:n.allDayHeaderDidMount,willUnmount:n.allDayHeaderWillUnmount,children:i=>d.jsx("div",{className:b(h.flexRow,h.noShrink,h.whiteSpacePre),ref:this.innerElRef,children:d.jsx(i,{tag:"div",className:w(n.allDayHeaderInnerClass,r)})})})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;this.disconnectInnerWidth=Ns(n,s=>{this._isUnmounting||L(e.innerWidthRef,s)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectInnerWidth(),L(this.props.innerWidthRef,null)}}function Op(t){return t.text}class Do extends he{constructor(){super(...arguments),this.heightRef=M.createRef(),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){return d.jsx(io,{...this.props,rootElRef:this.handleRootEl,heightRef:this.heightRef})}queryHit(e,n,s,r){const{props:i,heightRef:a}=this,o=i.cells.length,{col:l,left:c,right:u}=ks(n,r,i.colWidth,o,e),f=i.cells[l],g=f.date,m=V(g,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:g,end:m},allDay:!0,...f.dateSpanProps},getDayEl:()=>Ls(this.rootEl,l),rect:{left:c,right:u,top:0,bottom:a.current},layer:0}}}function Wp(t,e,n){let s=new to(t.renderRange,e);return new no(s,!1,n)}function jp(t,e,n){let s=[];for(let r of t.headerDates)s.push({start:n.add(r,e.slotMinTime),end:n.add(r,e.slotMaxTime)});return s}function wo(t,e,n=0,s,r){if(!s||!r)return[void 0,!1];const i=Math.max(s+1,n),a=r/e;let o,l;return t&&a>=i?(o=!0,l=a):(o=!1,l=i),[l,o]}function Kt(t,e,n){return n||(n=B(t)),Co(W(t.valueOf()-n.valueOf()),e)}function Co(t,e){const n=ve(e.slotMinTime),s=ve(e.slotMaxTime);let r=(t.milliseconds-n)/(s-n);return r=Math.max(0,r),r=Math.min(1,r),r}function Yr(t,e,n,s,r,i,a){const o=[];if(r!=null){const l=r*s;for(const c of t){const u=Kt(c.startDate,e,n),f=Kt(c.endDate,e,n),g=u*l;let m=f*l,v=m-g;i!=null&&v<i&&(v=i,m=g+v),o.push({start:g,end:m,size:v,isShort:v<=a})}}return o}function Bp(t,e,n,s){const r=[];for(let c=0;c<t.length;c++){const u=e[c];u&&r.push({...t[c],start:u.start,end:u.end})}const i=new Zn(r,void 0,n,void 0,s);let a=_p(i);a=zp(a,1);const o=Gp(a),l=pm(i.hiddenSegs);return[o,l]}function _p(t){const{placementsByLevel:e}=t,n=js((r,i)=>r+":"+i,(r,i)=>{let a=Vp(t,r,i),[o,l]=qr(a,n),c=e[r][i];return[{...c,nextLevelNodes:o},c.thickness+l]}),[s]=qr(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n);return s}function qr(t,e){if(!t)return[[],0];let{level:n,lateralStart:s,lateralEnd:r}=t,i=s,a=[];for(;i<r;)a.push(e(n,i)),i+=1;return a.sort(Up),[a.map(Fp),a[0][1]]}function Up(t,e){return e[1]-t[1]}function Fp(t){return t[0]}function Vp(t,e,n){let{levelCoords:s,placementsByLevel:r}=t,i=r[e][n],a=s[e]+i.thickness,o=s.length,l=e;for(;l<o&&s[l]<a;l+=1);for(;l<o;l+=1){let c=r[l],u,f=$n(c,i.start,qn),g=f[0]+f[1],m=g;for(;(u=c[m])&&u.start<i.end;)m+=1;if(g<m)return{level:l,lateralStart:g,lateralEnd:m}}return null}function zp(t,e){const n=js((s,r,i)=>fn(s),(s,r,i)=>{let{nextLevelNodes:a,thickness:o}=s,l=o+i,c=o/l,u,f=[];if(!a.length)u=e;else for(let m of a)if(u===void 0){let v=n(m,r,l);u=v[0],f.push(v[1])}else{let v=n(m,u,0);f.push(v[1])}let g=(u-r)*c;return[u-g,{...s,thickness:g,nextLevelNodes:f}]});return t.map(s=>n(s,0,0)[1])}function Gp(t){let e=new Map;const n=js((r,i,a)=>fn(r),(r,i,a)=>{let o={...r,levelCoord:i,stackDepth:a,stackForward:0};return e.set(o.eventRange.instance.instanceId,o),o.stackForward=s(r.nextLevelNodes,i+r.thickness,a+1)});function s(r,i,a){let o=0;for(let l of r)o=Math.max(n(l,i,a)+1,o);return o}return s(t,0,0),e}function js(t,e){const n={};return(...s)=>{let r=t(...s);return r in n?n[r]:n[r]=e(...s)}}const Yp=j({hour:"numeric",minute:"2-digit",meridiem:!1});class Ro extends O{render(){const{props:e}=this;return d.jsx(Dt,{...e,display:"column",level:e.level,isNarrow:e.isNarrow,isShort:e.isShort,className:e.isLiquid?h.liquid:"",disableLiquid:!e.isLiquid,defaultTimeFormat:Yp})}}class qp extends O{render(){let{props:e}=this;return d.jsx("div",{className:b(h.abs,h.flexCol),style:{top:e.top,height:e.height,insetInlineEnd:0,zIndex:9999},children:d.jsx(Ja,{className:h.liquid,display:"column",allDayDate:null,segs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,dateSpanProps:e.dateSpanProps,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>To(e.hiddenSegs,e,!1),forceTimed:!0,isNarrow:e.isNarrow,isMicro:e.isMicro})})}}const Zp=t=>d.jsx(Ee.Consumer,{children:e=>{let{options:n}=e;return d.jsx("div",{className:b(t.className,n.nowIndicatorDotClass),style:t.style})}}),$p=t=>d.jsx(Ee.Consumer,{children:e=>{let{options:n}=e,s={date:e.dateEnv.toDate(t.date),view:e.viewApi};return d.jsx(U,{elRef:t.elRef,tag:t.tag||"div",attrs:t.attrs,className:t.className,style:t.style,renderProps:s,generatorName:"nowIndicatorLineContent",customGenerator:n.nowIndicatorLineContent,classNameGenerator:n.nowIndicatorLineClass,didMount:n.nowIndicatorLineDidMount,willUnmount:n.nowIndicatorLineWillUnmount,children:t.children})}});function Xp(t){const e=t.totalHeight!=null?t.totalHeight*Kt(t.nowDate,t.dateProfile,t.dayDate):void 0;return d.jsxs("div",{className:h.fill,style:{zIndex:2,pointerEvents:"none"},children:[d.jsx($p,{className:b(h.fillX,h.noMarginX,h.borderlessX),style:{top:e},date:t.nowDate}),(t.showDot??!0)&&d.jsx(Zp,{className:b(h.abs,h.start0),style:{top:e}})]})}const Bs=typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes("firefox");class Kp extends O{constructor(){super(...arguments),this.sortEventSegs=N(Rs),this.getDateMeta=N(je)}render(){let{props:e,context:n}=this,{options:s,dateEnv:r}=n,i=s.selectMirror,a=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=this.getDateMeta(e.date,r,e.dateProfile,e.todayRange);const l=b(e.borderStart?h.borderOnlyS:h.borderNone,e.width==null&&h.liquid,h.rel),c={width:e.width,zIndex:1},u=this.getIsStack(),f={...o,...e.renderProps,isStack:u,isNarrow:e.isNarrow,isMajor:e.isMajor,view:n.viewApi};if(o.isDisabled)return d.jsx("div",{role:"gridcell","aria-disabled":!0,className:b(w(s.dayLaneClass,f),l),style:c});const g=b(w(s.dayLaneInnerClass,f),!u&&h.fill),m=this.sortEventSegs(e.fgEventSegs,s.eventOrder);return d.jsx(U,{tag:"div",attrs:{...e.attrs,role:"gridcell",...o.isToday?{"aria-current":"date"}:{},"data-date":tt(e.date)},className:l,style:c,renderProps:f,generatorName:void 0,classNameGenerator:s.dayLaneClass,didMount:s.dayLaneDidMount,willUnmount:s.dayLaneWillUnmount,children:()=>d.jsxs(d.Fragment,{children:[this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight"),d.jsx("div",{className:g,style:{zIndex:1},children:this.renderFgSegs(m,!1)}),!!a.length&&d.jsx("div",{className:g,style:{zIndex:1},children:this.renderFgSegs(a,!0)}),this.renderNowIndicator(e.nowIndicatorSegs)]})})}renderFgSegs(e,n){const{props:s}=this;return this.getIsStack()?To(e,s,n):this.renderPositionedFgSegs(e,n)}renderPositionedFgSegs(e,n){let{props:s,context:r}=this,{date:i,dateProfile:a,eventSelection:o,todayRange:l,nowDate:c}=s,{eventMaxStack:u,eventShortHeight:f,eventOrderStrict:g,eventMinHeight:m}=r.options,v=Yr(e,a,i,s.slatCnt,s.slatHeight,m,f),[p,S]=Bp(e,v,g,u);return d.jsxs(d.Fragment,{children:[e.map((D,R)=>{let{eventRange:C}=D,{instanceId:E}=C.instance,x=v[R]||{},I=p.get(E),k=!n&&I?this.computeSegHStyle(I):{left:0,right:0,zIndex:0},P=E===o;P&&(k.zIndex+=1e3);let H=!!(s.eventDrag&&s.eventDrag.affectedInstances[E]),A=!!(s.eventResize&&s.eventResize.affectedInstances[E]),z=!n&&(H||A||!I);return d.jsx("div",{className:b(h.abs,h.flexCol),style:{visibility:z?"hidden":void 0,top:x.start,height:x.size,...k},children:d.jsx(Ro,{eventRange:C,slicedStart:D.startDate,slicedEnd:D.endDate,isStart:D.isStart,isEnd:D.isEnd,isDragging:H,isResizing:A,isMirror:n,isSelected:P,level:I?I.stackDepth:0,isNarrow:s.isNarrow,isShort:x.isShort||!1,isLiquid:!0,...Le(C,l,c)})},E)}),this.renderHiddenGroups(S)]})}renderHiddenGroups(e){let{dateSpanProps:n,dateProfile:s,todayRange:r,nowDate:i,eventSelection:a,eventDrag:o,eventResize:l,isNarrow:c,isMicro:u}=this.props;return d.jsx(d.Fragment,{children:e.map(f=>d.jsx(qp,{hiddenSegs:f.segs,top:f.start,height:f.end-f.start,isNarrow:c,isMicro:u,dateSpanProps:n,dateProfile:s,todayRange:r,nowDate:i,eventSelection:a,eventDrag:o,eventResize:l},f.key))})}renderFillSegs(e,n){let{props:s,context:r}=this,i=Yr(e,s.dateProfile,s.date,s.slatCnt,s.slatHeight,r.options.eventMinHeight,r.options.eventShortHeight);return d.jsx(d.Fragment,{children:e.map((a,o)=>{const{eventRange:l}=a,c=i[o]||{};return d.jsx("div",{className:h.fillX,style:{top:c.start,height:c.size,marginInlineStart:-1},children:n==="bg-event"?d.jsx($a,{eventRange:l,isStart:a.isStart,isEnd:a.isEnd,isNarrow:s.isNarrow,isShort:c.isShort||!1,isVertical:!0,...Le(l,s.todayRange,s.nowDate)}):Xa(n,r.options)},Ih(l))})})}renderNowIndicator(e){let{props:n}=this;if(!(n.forPrint||this.getIsStack()))return e.map((s,r)=>d.jsx(Xp,{nowDate:s.startDate,dayDate:n.date,dateProfile:n.dateProfile,totalHeight:n.slatHeight!=null?n.slatHeight*n.slatCnt:void 0,showDot:s.showDot??!0},r))}computeSegHStyle(e){let{options:n}=this.context,s=n.slotEventOverlap,r=e.levelCoord,i=e.levelCoord+e.thickness;s&&(i=Math.min(1,r+(i-r)*2));let a={zIndex:e.stackDepth+1,insetInlineStart:gt(r),insetInlineEnd:gt(1-i),marginInlineEnd:void 0};return s&&e.stackForward&&(a.marginInlineEnd=20),a}getIsStack(){const{eventPrintLayout:e}=this.context.options;return this.props.forPrint&&(e==="stack"||e!=="grid"&&Bs)}}function To(t,{todayRange:e,nowDate:n,eventSelection:s,eventDrag:r,eventResize:i},a){return d.jsx(d.Fragment,{children:t.map(o=>{let{eventRange:l}=o,{instanceId:c}=l.instance,u=!!(r&&r.affectedInstances[c]),f=!!(i&&i.affectedInstances[c]),g=u||f;return d.jsx("div",{className:h.breakInsideAvoid,style:{visibility:g?"hidden":void 0},children:d.jsx(Ro,{eventRange:l,slicedStart:o.startDate,slicedEnd:o.endDate,isStart:o.isStart,isEnd:o.isEnd,isDragging:u,isResizing:f,isMirror:a,isSelected:c===s,level:0,isShort:!1,isNarrow:!1,disableResizing:!0,...Le(l,e,n)})},c)})})}class _s extends he{constructor(){super(...arguments),this.processSlotOptions=N(Jp),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 d.jsx("div",{role:e.role,className:b(e.className,h.flexRow),ref:this.handleRootEl,children:e.cells.map((n,s)=>d.jsx(Kp,{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:!!s,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,fgEventSegs:e.fgEventSegsByCol[s],bgEventSegs:e.bgEventSegsByCol[s],businessHourSegs:e.businessHourSegsByCol[s],nowIndicatorSegs:e.nowIndicatorSegsByCol[s],dateSelectionSegs:e.dateSelectionSegsByCol[s],eventDrag:e.eventDragByCol[s],eventResize:e.eventResizeByCol[s],eventSelection:e.eventSelection,width:e.colWidth,slatHeight:e.slatHeight},n.key))})}queryHit(e,n,s,r){const{dateProfile:i,cells:a,colWidth:o,slatHeight:l}=this.props,{dateEnv:c,options:u}=this.context,{snapDuration:f,snapsPerSlot:g}=this.processSlotOptions(u.slotDuration,u.snapDuration),m=a.length,{col:v,left:p,right:S}=ks(n,r,o,m,e),D=a[v],R=Math.floor(s/l),C=R*l,E=(s-C)/l,x=Math.floor(E*g),I=R*g+x,k=Ln(i.slotMinTime,bu(f,I)),P=c.add(D.date,k),H=c.add(P,f);return{dateProfile:i,dateSpan:{range:{start:P,end:H},allDay:!1,...D.dateSpanProps},getDayEl:()=>Ls(this.rootEl,v),rect:{left:p,right:S,top:C,bottom:C+l},layer:0}}}_s.addPropsEquality({style:Re});function Jp(t,e){let n=e||t,s=fs(t,n);return s===null&&(n=t,s=1),{snapDuration:n,snapsPerSlot:s}}const Qp=t=>d.jsx(Ee.Consumer,{children:e=>{let{options:n}=e,s={date:e.dateEnv.toDate(t.date),view:e.viewApi};return d.jsx(U,{elRef:t.elRef,tag:t.tag||"div",attrs:t.attrs,className:t.className,style:t.style,renderProps:s,generatorName:"nowIndicatorHeaderContent",customGenerator:n.nowIndicatorHeaderContent,classNameGenerator:n.nowIndicatorHeaderClass,didMount:n.nowIndicatorHeaderDidMount,willUnmount:n.nowIndicatorHeaderWillUnmount,children:t.children})}});function xo(t){return d.jsx("div",{className:b(h.fill,h.crop),style:{zIndex:2,pointerEvents:"none"},children:d.jsx(Qp,{className:h.abs,style:{top:t.totalHeight!=null?t.totalHeight*Kt(t.nowDate,t.dateProfile):void 0},date:t.nowDate})})}const ev=j({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});class Mo extends O{constructor(){super(...arguments),this.createRenderProps=N(tv),this.innerElRef=M.createRef()}render(){let{props:e,context:n}=this,{options:s}=n,r=s.slotHeaderFormat==null?ev:Array.isArray(s.slotHeaderFormat)?j(s.slotHeaderFormat[0]):j(s.slotHeaderFormat),i=this.createRenderProps(e.date,e.time,!e.isLabeled,e.isNarrow,e.isFirst,r,n),a=b(e.liquidHeight&&h.liquid,h.flexRow,h.alignStart,h.noMargin,h.noPadding,e.borderTop?h.borderOnlyT:h.borderNone);return e.isLabeled?d.jsx(U,{tag:"div",attrs:{"data-time":e.isoTimeStr},style:{height:e.height},className:a,renderProps:i,generatorName:"slotHeaderContent",customGenerator:s.slotHeaderContent,defaultGenerator:nv,classNameGenerator:s.slotHeaderClass,didMount:s.slotHeaderDidMount,willUnmount:s.slotHeaderWillUnmount,children:o=>d.jsx("div",{ref:this.innerElRef,className:b(h.noShrink,h.whiteSpaceNoWrap,h.flexRow),children:d.jsx(o,{tag:"div",className:w(s.slotHeaderInnerClass,i)})})}):d.jsx("div",{className:b(w(s.slotHeaderClass,i),a),style:{height:e.height}})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;n&&(this.disconnectInnerSize=it(n,(s,r)=>{this._isUnmounting||(L(e.innerWidthRef,s),L(e.innerHeightRef,r))}))}componentWillUnmount(){const{props:e}=this;this._isUnmounting=!0,this.disconnectInnerSize&&(this.disconnectInnerSize(),L(e.innerWidthRef,null),L(e.innerHeightRef,null))}}function tv(t,e,n,s,r,i,a){return{...je(t,a.dateEnv),level:0,text:q(a.dateEnv.formatToParts(t,i)),time:e,isMajor:!1,isMinor:n,isTime:!0,isNarrow:s,hasNavLink:!1,isFirst:r,view:a.viewApi}}function nv(t){return t.text}class Io extends O{constructor(){super(...arguments),this.getDateMeta=N(je)}render(){let{props:e,context:n}=this,{options:s}=n,r={...this.getDateMeta(e.date,n.dateEnv),time:e.time,isMajor:!1,isMinor:!e.isLabeled,view:n.viewApi};return d.jsx(U,{tag:"div",attrs:{"data-time":e.isoTimeStr},className:b(h.noMargin,h.noPadding,h.liquid,e.borderTop?h.borderOnlyT:h.borderNone),renderProps:r,generatorName:void 0,classNameGenerator:s.slotLaneClass,didMount:s.slotLaneDidMount,willUnmount:s.slotLaneWillUnmount})}}const sv=j({week:"short"});class No extends O{constructor(){super(...arguments),this.innerElRef=M.createRef()}render(){let{props:e,context:n}=this,{options:s,dateEnv:r}=n,i=e.dateProfile.renderRange,o=Oe(i.start,i.end)===1&&s.navLinks,l=i.start,c=st(n,l,"week"),u=r.computeWeekNumber(l),f=r.formatToParts(l,s.weekNumberFormat||sv),g=q(f),m=r.toDate(l);const v={num:u,text:g,textParts:f,date:m,isNarrow:e.isNarrow,hasNavLink:o,options:{dayMinWidth:s.dayMinWidth}};return d.jsx(U,{tag:"div",attrs:{role:"gridcell","aria-label":c},className:b(h.flexRow,h.noMargin,h.noPadding,e.isLiquid?h.liquid:h.contentBox),style:{width:e.width},renderProps:v,generatorName:"weekNumberHeaderContent",customGenerator:s.weekNumberHeaderContent,defaultGenerator:gn,classNameGenerator:s.weekNumberHeaderClass,didMount:s.weekNumberHeaderDidMount,willUnmount:s.weekNumberHeaderWillUnmount,children:p=>d.jsx("div",{ref:this.innerElRef,className:b(h.flexRow,h.noShrink,h.whiteSpaceNoWrap),children:d.jsx(p,{tag:"div",attrs:o?rt(n,i.start,"week",c):{"aria-label":c},className:w(s.weekNumberHeaderInnerClass,v)})})})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.innerElRef.current;this.disconnectInnerSize=it(n,(s,r)=>{this._isUnmounting||(L(e.innerWidthRef,s),L(e.innerHeightRef,r))})}componentWillUnmount(){const{props:e}=this;this._isUnmounting=!0,this.disconnectInnerSize(),L(e.innerWidthRef,null),L(e.innerHeightRef,null)}}function Ho(t){return d.jsx("div",{role:"gridcell",className:t.isLiquid?h.liquid:h.contentBox,style:{width:t.width}})}class Po extends O{constructor(){super(...arguments),this.state={headerTierHeights:[]},this.headerLabelInnerWidthRefMap=new ee(()=>{Y(this.handleAxisWidths)}),this.headerLabelInnerHeightRefMap=new ee(()=>{Y(this.handleHeaderHeights)}),this.headerMainInnerHeightRefMap=new ee(()=>{Y(this.handleHeaderHeights)}),this.handleAllDayLabelInnerWidth=e=>{this.allDayLabelInnerWidth=e,Y(this.handleAxisWidths)},this.slatLabelInnerWidthRefMap=new ee(()=>{Y(this.handleAxisWidths)}),this.slatLabelInnerHeightRefMap=new ee(()=>{Y(this.handleSlatInnerHeights)}),this.headerScrollerRef=M.createRef(),this.allDayScrollerRef=M.createRef(),this.mainScrollerRef=M.createRef(),this.footScrollerRef=M.createRef(),this.axisScrollerRef=M.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,s=[];for(const[r,i]of n.entries())s[r]=Math.max(e.get(r)||0,i);this.setState({headerTierHeights:s})},this.handleSlatInnerHeights=()=>{if(this._isUnmounting)return;const e=this.slatLabelInnerHeightRefMap.current;let n=0;for(const s of e.values())n=Math.max(n,s);this.state.slatInnerHeight!==n&&this.setState({slatInnerHeight:n})},this.handleAxisWidths=()=>{if(this._isUnmounting)return;const e=this.headerLabelInnerWidthRefMap.current,n=this.slatLabelInnerWidthRefMap.current;let s=this.allDayLabelInnerWidth||0;for(const r of e.values())s=Math.max(s,r);for(const r of n.values())s=Math.max(s,r);this.state.axisWidth!==s&&this.setState({axisWidth:s})}}render(){const{props:e,state:n,context:s,headerLabelInnerWidthRefMap:r,headerLabelInnerHeightRefMap:i,headerMainInnerHeightRefMap:a,slatLabelInnerWidthRefMap:o,slatLabelInnerHeightRefMap:l}=this,{nowDate:c,headerTiers:u,forPrint:f}=e,g=c.valueOf()-B(c).valueOf(),{axisWidth:m,totalWidth:v,clientWidth:p,clientHeight:S,bodyHeight:D,sticykBottomScrollbarWidth:R}=n,{options:C}=s,{borderlessX:E,borderlessTop:x,borderlessBottom:I}=ue(C),k=v!=null&&p!=null&&m!=null?v-p-(m+1):void 0,P=!f&&!ce(C),H=!f&&mn(C),A=!f&&Na(C),{eventPrintLayout:z}=C,_=z==="stack"||z!=="grid"&&Bs,Z=f&&!_,re=f&&_,te=e.cells.length,[$,ne]=ro(te,e.dayMinWidth,p),J=ne!=null&&ne<=wt,Q=J||ne!=null&&ne<=C.dayNarrowWidth,Tt=e.slatMetas.length,[Te,xt]=wo(P&&C.expandRows,Tt,C.slotMinHeight,n.slatInnerHeight,S);this.slatHeight=Te;const Us=(Te||0)*Tt,Fs=Z?Us:void 0,En=P&&!C.expandRows&&S!=null&&S>Us,Vs=C.dayHeaders?u.length+1:1,zs=A?R:D!=null&&S!=null?D-S:void 0;return d.jsxs(d.Fragment,{children:[C.dayHeaders&&d.jsxs("div",{className:b(w(C.tableHeaderClass,{isSticky:H,borderlessX:E,borderlessTop:x,borderlessBottom:I,multiMonthColumns:0}),h.flexCol,H&&h.tableHeaderSticky),style:{zIndex:1},children:[d.jsxs("div",{className:h.flexRow,children:[d.jsx("div",{role:"rowgroup",className:h.contentBox,style:{width:m},children:u.map((ae,X)=>d.jsx("div",{role:"row","aria-rowindex":X+1,className:b(C.dayHeaderRowClass,h.flexRow,h.contentBox,X<e.headerTiers.length-1?h.borderOnlyB:h.borderNone),style:{height:n.headerTierHeights[X]},children:C.weekNumbers&&ae.isDateRow?d.jsx(No,{dateProfile:e.dateProfile,innerWidthRef:r.createRef(X),innerHeightRef:i.createRef(X),width:void 0,isLiquid:!0,isNarrow:Q}):d.jsx(Ho,{width:void 0,isLiquid:!0})},X))}),d.jsx("div",{className:w(C.slotHeaderDividerClass,{inTableHeader:!0,options:{dayMinWidth:C.dayMinWidth}})}),d.jsxs(de,{horizontal:!0,hideScrollbars:!0,className:b(h.flexRow,h.liquid),ref:this.headerScrollerRef,children:[d.jsx("div",{role:"rowgroup",className:$==null?h.liquid:"",style:{width:$},children:e.headerTiers.map((ae,X)=>M.createElement(vn,{...ae,key:X,role:"row",rowIndex:X,borderBottom:X<e.headerTiers.length-1,height:n.headerTierHeights[X],colWidth:ne,viewportWidth:p,innerHeightRef:a.createRef(X),cellIsNarrow:Q,cellIsMicro:J,rowLevel:e.headerTiers.length-X-1}))}),!!k&&d.jsx("div",{className:b(w(C.fillerClass,{inTableHeader:!0}),h.borderOnlyS),style:{minWidth:k}})]})]}),d.jsx("div",{className:w(C.dayHeaderDividerClass,{isSticky:H,multiMonthColumns:0,options:{allDaySlot:!!C.allDaySlot}})})]}),d.jsxs("div",{role:"rowgroup",className:b(w(C.tableBodyClass,{borderlessX:E,borderlessTop:x,borderlessBottom:I,multiMonthColumns:0}),h.flexCol,P&&h.liquid,h.isolate),style:{zIndex:0},children:[C.allDaySlot&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{role:"row","aria-rowindex":Vs,className:h.flexRow,style:{zIndex:1},children:[d.jsx(bo,{width:m,innerWidthRef:this.handleAllDayLabelInnerWidth,isNarrow:Q}),d.jsx("div",{className:w(C.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:C.dayMinWidth}})}),d.jsxs(de,{horizontal:!0,hideScrollbars:!0,className:b(h.flexRow,h.liquidX),ref:this.allDayScrollerRef,children:[d.jsx("div",{className:h.flexRow,style:{width:$},children:d.jsx(Do,{dateProfile:e.dateProfile,todayRange:e.todayRange,cells:e.cells,showDayNumbers:!1,forPrint:f,isHitComboAllowed:e.isHitComboAllowed,className:b(h.borderNone,h.liquidX),cellIsNarrow:Q,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:ne})}),!!k&&d.jsx("div",{className:b(w(C.fillerClass,{inTableHeader:!1}),h.borderOnlyS),style:{minWidth:k}})]})]}),d.jsx("div",{className:b(C.allDayDividerClass),style:{zIndex:2}})]}),d.jsxs("div",{role:"row","aria-rowindex":Vs+(C.allDaySlot?1:0),className:b(h.flexRow,h.rel,P&&h.liquid),style:{zIndex:0},children:[d.jsx(de,{vertical:P,hideScrollbars:!0,className:b(h.flexCol,h.contentBox),style:{width:m},ref:this.axisScrollerRef,clientHeightRef:this.handleBodyHeight,children:!re&&d.jsx(d.Fragment,{children:d.jsxs("div",{role:"rowheader","aria-label":C.timedText,className:b(h.flexCol,h.grow,h.rel),style:{height:Fs},children:[d.jsx("div",{"aria-hidden":!0,className:b(h.flexCol,P&&C.expandRows&&h.grow,Z&&h.fillX),children:e.slatMetas.map((ae,X)=>M.createElement(Mo,{...ae,key:ae.key,innerWidthRef:o.createRef(ae.key),innerHeightRef:l.createRef(ae.key),borderTop:!!X,isNarrow:Q,height:xt?void 0:Te,liquidHeight:xt}))}),!f&&C.nowIndicator&&pe(e.dateProfile.currentRange,c)&&g>=e.dateProfile.slotMinTime.milliseconds&&g<e.dateProfile.slotMaxTime.milliseconds&&d.jsx(xo,{nowDate:c,dateProfile:e.dateProfile,totalHeight:Te!=null?Te*Tt:void 0}),!!(En||zs)&&d.jsx("div",{className:b(w(C.fillerClass,{inTableHeader:!1}),h.borderOnlyT,En&&h.liquid),style:{minHeight:zs}})]})})}),d.jsx("div",{className:w(C.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:C.dayMinWidth}})}),d.jsxs("div",{className:b(h.flexCol,h.liquid),children:[d.jsx(de,{vertical:P,horizontal:!0,hideScrollbars:A||f,className:b(h.flexCol,h.rel,P&&h.liquid),ref:this.mainScrollerRef,clientWidthRef:this.handleClientWidth,clientHeightRef:this.handleClientHeight,children:d.jsxs("div",{className:b(h.flexCol,h.grow,h.rel),style:{width:$,height:Fs},children:[d.jsx(_s,{dateProfile:e.dateProfile,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatCnt:Tt,forPrint:f,isHitComboAllowed:e.isHitComboAllowed,className:re?"":h.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:ne,slatHeight:Te,cellIsNarrow:Q,cellIsMicro:J}),!re&&d.jsxs(d.Fragment,{children:[d.jsx("div",{"aria-hidden":!0,className:b(h.flexCol,P&&C.expandRows&&h.grow,Z?h.fillX:h.rel),children:e.slatMetas.map((ae,X)=>d.jsx("div",{className:b(h.flexRow,xt&&h.liquid),style:{height:xt?"":Te},children:M.createElement(Io,{...ae,key:ae.key,borderTop:!!X})},ae.key))}),En&&d.jsx("div",{className:b(w(C.fillerClass,{inTableHeader:!1}),h.borderOnlyT,h.liquid)})]})]})}),!!A&&d.jsx(oo,{isSticky:!0,canvasWidth:$,scrollerRef:this.footScrollerRef,scrollbarWidthRef:this.handleStickyBottomScrollbarWidth})]})]})]}),d.jsx(at,{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,L(this.props.slatHeightRef,null)}updateSlatHeight(){this.prevSlatHeight!==this.slatHeight&&L(this.props.slatHeightRef,this.prevSlatHeight=this.slatHeight)}initScrollers(){const e=Ha(this.context.pluginHooks);this.dayScroller=new e(!0),this.timeScroller=new e,L(this.props.dayScrollerRef,this.dayScroller),L(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(){L(this.props.dayScrollerRef,null),L(this.props.timeScrollerRef,null)}}Po.addPropsEquality({headerTierHeights:Ze});class rv extends O{constructor(){super(...arguments),this.state={},this.headerLabelInnerWidthRefMap=new ee(()=>{Y(this.handleAxisInnerWidths)}),this.handleAllDayLabelInnerWidth=e=>{this.allDayLabelInnerWidth=e,Y(this.handleAxisInnerWidths)},this.handleWeekNumberInnerWidth=e=>{this.weekNumberInnerWidth=e,Y(this.handleAxisInnerWidths)},this.slatLabelInnerWidthRefMap=new ee(()=>{Y(this.handleAxisInnerWidths)}),this.slatLabelInnerHeightRefMap=new ee(()=>{Y(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=()=>{if(this._isUnmounting)return;const e=this.headerLabelInnerWidthRefMap.current,n=this.slatLabelInnerWidthRefMap.current;let s=Math.max(this.weekNumberInnerWidth||0,this.allDayLabelInnerWidth||0);for(const r of e.values())s=Math.max(s,r);for(const r of n.values())s=Math.max(s,r);this.state.axisWidth!==s&&this.setState({axisWidth:s})},this.handleSlatInnerHeights=()=>{if(this._isUnmounting)return;const e=this.slatLabelInnerHeightRefMap.current;let n=0;for(const s of e.values())n=Math.max(n,s);this.state.slatInnerHeight!==n&&this.setState({slatInnerHeight:n})}}render(){const{props:e,state:n,context:s,slatLabelInnerWidthRefMap:r,slatLabelInnerHeightRefMap:i,headerLabelInnerWidthRefMap:a}=this,{nowDate:o,forPrint:l}=e,c=o.valueOf()-B(o).valueOf(),{axisWidth:u,clientWidth:f,totalWidth:g}=n,{options:m}=s,{borderlessX:v,borderlessTop:p,borderlessBottom:S}=ue(m),D=g!=null&&f!=null&&!l?g-f:void 0,R=!l&&!ce(m),C=!l&&mn(m),E=e.slatMetas.length,[x,I]=wo(R&&m.expandRows,E,m.slotMinHeight,n.slatInnerHeight,n.clientHeight);this.slatHeight=x;const k=(x||0)*E,P=R&&!m.expandRows&&n.clientHeight!=null&&n.clientHeight>k,{eventPrintLayout:H}=m,A=H==="stack"||H!=="grid"&&Bs,z=l&&!A,_=l&&A,Z=z?k:void 0,re=e.cells.length,te=f!=null?f/re:void 0,$=te!=null&&te<=wt,ne=$||te!=null&&te<=m.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[m.dayHeaders&&d.jsxs("div",{role:"rowgroup",className:b(w(m.tableHeaderClass,{isSticky:C,borderlessX:v,borderlessTop:p,borderlessBottom:S,multiMonthColumns:0}),h.flexCol,C&&h.tableHeaderSticky),style:{zIndex:1},children:[e.headerTiers.map((J,Q)=>d.jsxs("div",{role:"row",className:h.flexRow,children:[d.jsx("div",{className:b(m.dayHeaderRowClass,h.flexRow,Q<e.headerTiers.length-1?h.borderOnlyB:h.borderNone),children:m.weekNumbers&&J.isDateRow?d.jsx(No,{dateProfile:e.dateProfile,innerWidthRef:this.handleWeekNumberInnerWidth,innerHeightRef:a.createRef(Q),width:u,isLiquid:!1,isNarrow:ne}):d.jsx(Ho,{width:u,isLiquid:!1})}),d.jsx("div",{className:w(m.slotHeaderDividerClass,{inTableHeader:!0,options:{dayMinWidth:m.dayMinWidth}})}),d.jsx(vn,{...J,className:h.liquid,borderBottom:Q<e.headerTiers.length-1,viewportWidth:f,cellIsNarrow:ne,cellIsMicro:$,rowLevel:e.headerTiers.length-Q-1}),!!D&&d.jsx("div",{className:b(w(m.fillerClass,{inTableHeader:!0}),h.borderOnlyS),style:{minWidth:D}})]},Q)),d.jsx("div",{className:w(m.dayHeaderDividerClass,{isSticky:C,multiMonthColumns:0,options:{allDaySlot:!!m.allDaySlot}})})]}),d.jsxs("div",{role:"rowgroup",className:b(w(m.tableBodyClass,{borderlessX:v,borderlessTop:p,borderlessBottom:S,multiMonthColumns:0}),h.flexCol,R&&h.liquid,h.isolate),style:{zIndex:0},children:[m.allDaySlot&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{role:"row",className:h.flexRow,style:{zIndex:1},children:[d.jsx(bo,{width:u,innerWidthRef:this.handleAllDayLabelInnerWidth,isNarrow:ne}),d.jsx("div",{className:w(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}})}),d.jsx(Do,{dateProfile:e.dateProfile,todayRange:e.todayRange,cells:e.cells,showDayNumbers:!1,forPrint:l,isHitComboAllowed:e.isHitComboAllowed,className:b(h.liquidX,h.borderNone),cellIsNarrow:ne,cellIsMicro:$,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&&d.jsx("div",{className:b(w(m.fillerClass,{inTableHeader:!1}),h.borderOnlyS),style:{minWidth:D}})]}),d.jsx("div",{className:b(m.allDayDividerClass),style:{zIndex:2}})]}),d.jsx(de,{vertical:R,className:b(h.flexCol,h.rel,R&&h.liquid),style:{zIndex:0},ref:e.timeScrollerRef,clientWidthRef:this.handleClientWidth,clientHeightRef:this.handleClientHeight,children:d.jsxs("div",{className:b(h.flexCol,h.grow,h.rel),style:{height:Z},children:[d.jsxs("div",{role:"row",className:b(h.flexRow,!_&&h.fill),children:[d.jsx("div",{role:"rowheader","aria-label":m.timedText,className:h.contentBox,style:{width:u}}),d.jsx("div",{className:w(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}})}),d.jsx(_s,{dateProfile:e.dateProfile,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatCnt:E,forPrint:l,isHitComboAllowed:e.isHitComboAllowed,className:h.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:ne,cellIsMicro:$})]}),!_&&d.jsxs(d.Fragment,{children:[d.jsx("div",{"aria-hidden":!0,className:b(h.flexCol,R&&m.expandRows&&h.grow,z?h.fillX:h.rel),children:e.slatMetas.map((J,Q)=>d.jsxs("div",{className:b(I&&h.liquid,h.flexRow),style:{height:I?void 0:x},children:[d.jsx("div",{className:h.flexCol,style:{width:u},children:M.createElement(Mo,{...J,key:J.key,innerWidthRef:r.createRef(J.key),innerHeightRef:i.createRef(J.key),borderTop:!!Q,isNarrow:ne})}),d.jsx("div",{className:w(m.slotHeaderDividerClass,{inTableHeader:!1,options:{dayMinWidth:m.dayMinWidth}}),style:{visibility:"hidden"}}),M.createElement(Io,{...J,key:J.key,borderTop:!!Q})]},J.key))}),P&&d.jsx("div",{className:b(w(m.fillerClass,{inTableHeader:!1}),h.borderOnlyT,h.liquid)}),!l&&m.nowIndicator&&pe(e.dateProfile.currentRange,o)&&c>=e.dateProfile.slotMinTime.milliseconds&&c<e.dateProfile.slotMaxTime.milliseconds&&d.jsx(xo,{nowDate:o,dateProfile:e.dateProfile,totalHeight:x!=null?x*E:void 0})]})]})})]}),d.jsx(at,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1,this.updateSlatHeight()}componentDidUpdate(){this.updateSlatHeight()}componentWillUnmount(){this._isUnmounting=!0,this.prevSlatHeight=void 0,L(this.props.slatHeightRef,null)}updateSlatHeight(){this.prevSlatHeight!==this.slatHeight&&L(this.props.slatHeightRef,this.prevSlatHeight=this.slatHeight)}}function Zr(t){return t.map(()=>[])}function $r(t){return t.map(()=>null)}class iv extends O{constructor(){super(...arguments),this.buildSlatMetas=N(Lp),this.dayScrollerRef=M.createRef(),this.timeScrollerRef=M.createRef(),this.scrollState={},this.handleSlatHeight=e=>{this._isUnmounting||(this.slatHeight=e,e!=null&&Y(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:s}=this;let{y:r,time:i}=s;r==null&&i&&n!=null&&e&&(r=Co(i,this.props.dateProfile)*(n*this.currentSlatCnt),r&&r++,s.y=r),r!=null&&e.scrollTo({y:r})}}render(){const{props:e,context:n}=this,{dateProfile:s}=e,{options:r,dateEnv:i}=n,{dayMinWidth:a}=r,{borderlessX:o,borderlessTop:l,borderlessBottom:c}=ue(r),u=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,r.slotHeaderInterval,r.slotDuration,i);this.currentSlatCnt=u.length;const f=e.forPrint?[]:e.businessHourSegs,g=e.forPrint?[]:e.dateSelectionSegs,m=e.forPrint?null:e.eventDrag,v=e.forPrint?null:e.eventResize,p=e.forPrint?Zr(e.businessHourSegsByCol):e.businessHourSegsByCol,S=e.forPrint?Zr(e.dateSelectionSegsByCol):e.dateSelectionSegsByCol,D=e.forPrint?$r(e.eventDragByCol):e.eventDragByCol,R=e.forPrint?$r(e.eventResizeByCol):e.eventResizeByCol,C={dateProfile:s,nowDate:e.nowDate,todayRange:e.todayRange,cells:e.cells,slatMetas:u,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,headerTiers:e.headerTiers,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:f,dateSelectionSegs:g,eventDrag:m,eventResize:v,...ov(r),fgEventSegsByCol:e.fgEventSegsByCol,bgEventSegsByCol:e.bgEventSegsByCol,businessHourSegsByCol:p,nowIndicatorSegsByCol:e.nowIndicatorSegsByCol,dateSelectionSegsByCol:S,eventDragByCol:D,eventResizeByCol:R,eventSelection:e.eventSelection,timeScrollerRef:this.timeScrollerRef,timeScrollState:this.scrollState,slatHeightRef:this.handleSlatHeight,borderlessX:o,borderlessBottom:c};return d.jsx(pn,{attrs:{role:"grid","aria-colcount":e.cells.length,"aria-labelledby":e.labelId,"aria-label":e.labelStr},className:b(e.className,w(r.tableClass,{borderlessX:o,borderlessTop:l,borderlessBottom:c,multiMonthColumns:0}),!e.forPrint&&h.flexCol,h.isolate),viewSpec:n.viewSpec,children:a?d.jsx(Po,{...C,dayMinWidth:a,dayScrollerRef:this.dayScrollerRef}):d.jsx(rv,{...C})})}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 av=5;function ov(t){let{dayMaxEvents:e,dayMaxEventRows:n}=t;return(e===!0||n===!0)&&(e=void 0,n=av),{dayMaxEvents:e,dayMaxEventRows:n}}class lv extends he{constructor(){super(...arguments),this.createDayHeaderFormatter=N(As),this.buildTimeColsModel=N(Wp),this.buildDayRanges=N(jp),this.buildDateRowConfigs=N(Ya),this.splitFgEventSegs=N(ot),this.splitBgEventSegs=N(ot),this.splitBusinessHourSegs=N(ot),this.splitNowIndicatorSegs=N(ot),this.splitDateSelectionSegs=N(ot),this.splitEventDrag=N(zr),this.splitEventResize=N(zr),this.allDaySplitter=new Pp,this.dayTableSlicer=new Ps,this.dayTimeColsSlicer=new kp}render(){const{props:e,context:n}=this,{dateProfile:s}=e,{options:r,dateProfileGenerator:i}=n,a=this.buildTimeColsModel(s,i,n.dateEnv),o=this.buildDayRanges(a,s,n.dateEnv),l=this.allDaySplitter.splitProps(e),c=this.dayTableSlicer.sliceProps(l.allDay,s,r.nextDayThreshold,n,a),u=this.dayTimeColsSlicer.sliceProps(l.timed,s,null,n,o),f=this.createDayHeaderFormatter(n.options.dayHeaderFormat,!0,a.colCount);return d.jsx(bt,{unit:r.nowIndicator?"minute":"day",children:(g,m)=>{const v=a.cellRows[0].length,p=!e.forPrint&&r.nowIndicator&&this.dayTimeColsSlicer.sliceNowDate(g,s,r.nextDayThreshold,n,o),S=this.splitFgEventSegs(u.fgEventSegs,v),D=this.splitBgEventSegs(u.bgEventSegs,v),R=this.splitBusinessHourSegs(u.businessHourSegs,v),C=this.splitNowIndicatorSegs(p,v),E=this.splitDateSelectionSegs(u.dateSelectionSegs,v),x=this.splitEventDrag(u.eventDrag,v),I=this.splitEventResize(u.eventResize,v),k=this.buildDateRowConfigs(a.headerDates,!0,e.dateProfile,m,f,n);return d.jsx(iv,{labelId:e.labelId,labelStr:e.labelStr,dateProfile:s,nowDate:g,todayRange:m,cells:a.cellRows[0],forPrint:e.forPrint,className:e.className,headerTiers:k,fgEventSegs:c.fgEventSegs,bgEventSegs:c.bgEventSegs,businessHourSegs:c.businessHourSegs,dateSelectionSegs:c.dateSelectionSegs,eventDrag:c.eventDrag,eventResize:c.eventResize,fgEventSegsByCol:S,bgEventSegsByCol:D,businessHourSegsByCol:R,nowIndicatorSegsByCol:C,dateSelectionSegsByCol:E,eventDragByCol:x,eventResizeByCol:I,eventSelection:e.eventSelection})}})}}var cv={name:"timegrid",initialView:"timeGridWeek",deps:[uo],views:{timeGrid:{component:lv,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}};const dv=60,uv=6e4,hv=864e5;function fv(t,e,n){return n?ko(t):{date:t.slice(0,10),startTime:t.slice(11,16),endTime:e.slice(11,16),allDay:!1}}function gv(t,e){if(e)return ko(t);const n=t.slice(11,16);return{date:t.slice(0,10),startTime:n,endTime:jo(n,dv),allDay:!1}}function ko(t){return{date:t.slice(0,10),startTime:"",endTime:"",allDay:!0}}function mv(t,e,n,s){const r=Date.parse(e)-Date.parse(t);return n?Math.round(r/hv)>1:r/uv>s}const pv=[uo,cv,bp,Ip,dp],Xr={year:"multiMonthYear",month:"dayGridMonth",week:"timeGridWeek",day:"timeGridDay",agenda:"listWeek"},vv={year:{weekday:"narrow"},month:{weekday:"short"},week:{weekday:"short",day:"numeric"},day:{weekday:"short",day:"numeric"},agenda:{weekday:"short",day:"numeric"}},yv=new Set(["year","month","agenda"]),Sv={comfortable:{slotMinutes:30,slotMinHeight:26,eventShortHeight:34},compact:{slotMinutes:60,slotMinHeight:15,eventShortHeight:22}},Lo="cal-1",Ev={color:Lo,rsvp:"accepted",status:"confirmed",hasThread:!1,isRecurring:!1,zoneCertainty:"local"};function bv(t){return{id:t.id,title:t.title,start:t.start,end:t.end,allDay:t.allDay}}function Dv({view:t,date:e,events:n,colorByCalendarId:s,density:r,selectedEventId:i,timeZone:a,now:o,onSelectEvent:l,onPickSlot:c,onRangeChange:u,className:f}){const g=M.useRef(null);M.useEffect(()=>{g.current?.getApi().changeView(Xr[t])},[t]),M.useEffect(()=>{g.current?.getApi().gotoDate(e)},[e]);const m=M.useMemo(()=>n.map(bv),[n]),v=M.useMemo(()=>new Map(n.map(E=>[E.id,{color:s[E.calendarId]??Lo,rsvp:E.myRsvp,status:E.status,hasThread:E.threadId!=="",isRecurring:E.recurrenceRule!=="",zoneCertainty:E.zoneCertainty}])),[n,s]),p=M.useMemo(()=>E=>v.get(E)??Ev,[v]),S=M.useMemo(()=>E=>E.event.allDay||yv.has(t),[t]),D=M.useMemo(()=>E=>{const x=p(E.event.id),I=S(E);return K(md({color:x.color,layout:I?"row":"column",rsvp:x.rsvp,status:x.status,selected:E.event.id===i,stacked:!1}),"cursor-pointer outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring",I?"my-px px-1 py-0":"px-1 py-0.5")},[p,S,i]),R=Sv[r],C=r==="compact";return d.jsx("div",{className:K("h-full min-h-0 w-full text-fg",f),children:d.jsx(Mg,{ref:g,plugins:pv,initialView:Xr[t],initialDate:e,now:o,timeZone:a,height:"100%",headerToolbar:!1,firstDay:1,nowIndicator:!0,selectable:!0,selectMirror:!0,editable:!1,eventInteractive:!0,expandRows:!0,allDayText:"All day",dayMaxEvents:C?2:3,eventMaxStack:3,moreLinkClick:"popover",moreLinkText:E=>`+${E}`,slotMinTime:"07:00:00",slotMaxTime:"23:00:00",scrollTime:"08:30:00",scrollTimeReset:!1,slotDuration:{minutes:R.slotMinutes},slotMinHeight:R.slotMinHeight,eventShortHeight:R.eventShortHeight,displayEventEnd:!1,eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},slotHeaderFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},dayHeaderFormat:vv[t],events:m,eventClick:E=>l(E.event.id),dateClick:E=>c(gv(E.dateStr,E.allDay)),select:E=>{if(!mv(E.startStr,E.endStr,E.allDay,R.slotMinutes)){E.view.calendar.unselect();return}c(fv(E.startStr,E.endStr,E.allDay))},datesSet:E=>u(E.view.title),viewClass:"bg-surface",tableClass:"border-line",tableHeaderClass:"bg-surface",fillerClass:"border-line",dayHeaderRowClass:"h-pane-header",dayHeaderClass:E=>K("border-b border-line bg-surface",E.isToday?"text-accent":"text-fg-subtle"),dayHeaderInnerClass:"px-1 py-1 text-2xs font-semibold uppercase tracking-wider",dayHeaderDividerClass:"border-b border-line",dayCellClass:E=>K("border-line",E.isOther&&"bg-surface-sunken"),dayLaneClass:E=>K(E.isToday&&"bg-accent-soft/40"),dayCellTopInnerClass:E=>K("px-1 py-0.5 text-2xs tabular-nums",E.isToday?"font-semibold text-accent":"text-fg-muted"),dayRowClass:"border-line",slotLaneClass:E=>K("border-line",E.isMinor&&"border-dashed"),slotHeaderClass:"border-line",slotHeaderInnerClass:"pr-1.5 text-2xs tabular-nums text-fg-subtle",slotHeaderDividerClass:"border-r border-line",allDayHeaderClass:"border-line",allDayHeaderInnerClass:"px-1 text-2xs uppercase tracking-wider text-fg-subtle",allDayDividerClass:"border-b border-line-strong",nonBusinessHoursClass:"bg-surface-sunken",highlightClass:"bg-accent-soft",nowIndicatorLineClass:"border-t border-danger",nowIndicatorDotClass:"bg-danger",moreLinkClass:"rounded-sm bg-surface-sunken text-2xs font-semibold text-fg-muted hover:bg-line hover:text-fg",moreLinkInnerClass:"px-1 py-0.5",popoverClass:"rounded-lg border border-line bg-surface-raised shadow-xl shadow-black/20",popoverCloseClass:"text-fg-subtle hover:text-fg",listDaysClass:"bg-surface",listDayClass:"border-line",listDayHeaderClass:"border-y border-line bg-surface-sunken",listDayHeaderInnerClass:"flex h-section-row items-center px-row-inset text-2xs font-semibold uppercase tracking-wider text-fg-subtle",listDayBodyClass:"border-line",noEventsClass:"p-10 text-center",noEventsInnerClass:"text-sm text-fg-muted",noEventsContent:"Nothing scheduled",singleMonthClass:"p-2",singleMonthHeaderClass:"pb-1",singleMonthHeaderInnerClass:"text-xs font-semibold text-fg",eventClass:D,listItemEventClass:D,eventContent:E=>{const x=p(E.event.id),I=E.timeText!==""&&!C&&!E.isNarrow;return d.jsx(pd,{title:E.event.title,timeText:I?E.timeText:"",layout:S(E)?"row":"column",rsvp:x.rsvp,hasThread:x.hasThread,isRecurring:x.isRecurring,zoneCertainty:x.zoneCertainty})}})})}const wv={year:"The year grid arrives with the rest of the zoom ladder.",month:"The month grid arrives with the rest of the zoom ladder.",agenda:"The agenda arrives with the scrolling day strip."};function Cv({view:t}){return d.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 bg-surface p-8 text-center","data-testid":`calendar-placeholder-${t}`,children:[d.jsx(rl,{className:"size-8 text-fg-subtle","aria-hidden":"true"}),d.jsx("p",{className:"text-sm font-medium text-fg",children:"Not built yet"}),d.jsxs("p",{className:"max-w-xs text-sm text-fg-muted",children:[wv[t]??"This view arrives in a later stage."," Week and Day work now."]})]})}const Rv=[{value:"comfortable",label:"Detail"},{value:"compact",label:"Glance"}];function Tv(t,e){const n=new Date(`${e}T00:00:00`);return t==="year"?new Intl.DateTimeFormat(void 0,{year:"numeric"}).format(n):t==="day"?new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"long",year:"numeric"}).format(n):new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(n)}function xv({view:t,date:e,events:n,colorByCalendarId:s,isLoading:r=!1,error:i,onRetry:a,density:o,selectedEventId:l,timeZone:c,now:u,onChangeView:f,onToday:g,onChangeDensity:m,onSelectEvent:v,onPickSlot:p,onStep:S}){const D=M.useId(),[R,C]=M.useState({key:"",title:""}),E=`${t}/${e}`,x=R.key===E?R.title:Tv(t,e);return d.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-surface",children:[d.jsxs("div",{className:"flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-2",children:[d.jsx(nl,{}),d.jsxs(Sd,{title:x,onPrev:()=>S(-1),onNext:()=>S(1),onToday:g,children:[d.jsxs("fieldset",{className:"inline-flex items-center gap-0.5",children:[d.jsx("legend",{className:"sr-only",children:"Calendar density"}),Rv.map(I=>d.jsxs("label",{className:`${Pi(o===I.value)} h-7 text-xs`,children:[d.jsx("input",{type:"radio",name:D,value:I.value,checked:o===I.value,onChange:()=>m(I.value),className:"sr-only"}),I.label]},I.value))]}),d.jsx(yd,{value:t,onChange:f})]})]}),d.jsx("div",{className:"min-h-0 flex-1",children:i!=null?d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsx(sl,{title:"Couldn't load this week",error:i,onRetry:a})}):r?d.jsx("div",{role:"status","aria-label":"Loading the calendar",className:"flex h-full items-center justify-center bg-surface",children:d.jsx(Bo,{className:"size-6 animate-spin text-fg-subtle"})}):_o(t)?d.jsx(Dv,{view:t,date:e,events:n,colorByCalendarId:s,density:o,selectedEventId:l,timeZone:c,now:u,onSelectEvent:v,onPickSlot:p,onRangeChange:I=>C({key:E,title:I})}):d.jsx(Cv,{view:t})})]})}const Ao="remit:calendar-density",Kr="comfortable";function Mv(){try{return localStorage.getItem(Ao)==="compact"?"compact":Kr}catch{return Kr}}function Iv(t){try{localStorage.setItem(Ao,t)}catch{}}function _v(){const{view:t,date:e,calendarIds:n}=qo(),{events:s,colorByCalendarId:r,isLoading:i,error:a,retry:o,instanceOf:l}=tl({view:t,date:e,calendarIds:n}),{goToView:c,goToToday:u,step:f,openEvent:g,openComposer:m}=Zo(),v=$o(),p=Xo(),[S,D]=M.useState(Mv),R=M.useCallback(P=>{Iv(P),D(P)},[]),[C,E]=M.useState(void 0),x=M.useCallback(P=>{const H=l(P);g(H.calendarObjectId,H.recurrenceId)},[l,g]),I=M.useCallback(P=>{E(P),m()},[m]),k=d.jsx(xv,{view:t,date:e,events:s,colorByCalendarId:r,isLoading:i,error:a,onRetry:o,density:S,selectedEventId:v?Jo(v.calendarObjectId,v.recurrenceId??""):"",timeZone:Ko(),now:new Date().toISOString(),onChangeView:c,onToday:u,onStep:f,onChangeDensity:R,onSelectEvent:x,onPickSlot:I});return d.jsx(Fo,{pick:C,children:d.jsx(Vo,{workspace:k,reading:d.jsx(Uo,{}),hasOpenEvent:v!==void 0||p})})}export{_v as component};