@fullcalendar/core 6.1.15 → 7.0.0-beta.1

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 (174) hide show
  1. package/index.cjs +48 -110
  2. package/index.d.ts +2 -1
  3. package/index.global.js +1558 -1794
  4. package/index.global.min.js +2 -2
  5. package/index.js +51 -113
  6. package/internal-common.cjs +1919 -2093
  7. package/internal-common.d.ts +176 -288
  8. package/internal-common.js +1905 -2073
  9. package/internal.cjs +16 -22
  10. package/internal.d.ts +2 -1
  11. package/internal.js +1 -1
  12. package/locales/af.global.js +1 -1
  13. package/locales/af.global.min.js +1 -1
  14. package/locales/ar-dz.global.js +1 -1
  15. package/locales/ar-dz.global.min.js +1 -1
  16. package/locales/ar-kw.global.js +1 -1
  17. package/locales/ar-kw.global.min.js +1 -1
  18. package/locales/ar-ly.global.js +1 -1
  19. package/locales/ar-ly.global.min.js +1 -1
  20. package/locales/ar-ma.global.js +1 -1
  21. package/locales/ar-ma.global.min.js +1 -1
  22. package/locales/ar-sa.global.js +1 -1
  23. package/locales/ar-sa.global.min.js +1 -1
  24. package/locales/ar-tn.global.js +1 -1
  25. package/locales/ar-tn.global.min.js +1 -1
  26. package/locales/ar.global.js +1 -1
  27. package/locales/ar.global.min.js +1 -1
  28. package/locales/az.global.js +1 -1
  29. package/locales/az.global.min.js +1 -1
  30. package/locales/bg.global.js +1 -1
  31. package/locales/bg.global.min.js +1 -1
  32. package/locales/bn.global.js +1 -1
  33. package/locales/bn.global.min.js +1 -1
  34. package/locales/bs.global.js +1 -1
  35. package/locales/bs.global.min.js +1 -1
  36. package/locales/ca.global.js +1 -1
  37. package/locales/ca.global.min.js +1 -1
  38. package/locales/cs.global.js +1 -1
  39. package/locales/cs.global.min.js +1 -1
  40. package/locales/cy.global.js +1 -1
  41. package/locales/cy.global.min.js +1 -1
  42. package/locales/da.global.js +1 -1
  43. package/locales/da.global.min.js +1 -1
  44. package/locales/de-at.global.js +1 -1
  45. package/locales/de-at.global.min.js +1 -1
  46. package/locales/de.global.js +1 -1
  47. package/locales/de.global.min.js +1 -1
  48. package/locales/el.global.js +1 -1
  49. package/locales/el.global.min.js +1 -1
  50. package/locales/en-au.global.js +1 -1
  51. package/locales/en-au.global.min.js +1 -1
  52. package/locales/en-gb.global.js +1 -1
  53. package/locales/en-gb.global.min.js +1 -1
  54. package/locales/en-nz.global.js +1 -1
  55. package/locales/en-nz.global.min.js +1 -1
  56. package/locales/eo.global.js +1 -1
  57. package/locales/eo.global.min.js +1 -1
  58. package/locales/es-us.global.js +1 -1
  59. package/locales/es-us.global.min.js +1 -1
  60. package/locales/es.global.js +1 -1
  61. package/locales/es.global.min.js +1 -1
  62. package/locales/et.global.js +1 -1
  63. package/locales/et.global.min.js +1 -1
  64. package/locales/eu.global.js +1 -1
  65. package/locales/eu.global.min.js +1 -1
  66. package/locales/fa.global.js +1 -1
  67. package/locales/fa.global.min.js +1 -1
  68. package/locales/fi.global.js +1 -1
  69. package/locales/fi.global.min.js +1 -1
  70. package/locales/fr-ca.global.js +1 -1
  71. package/locales/fr-ca.global.min.js +1 -1
  72. package/locales/fr-ch.global.js +1 -1
  73. package/locales/fr-ch.global.min.js +1 -1
  74. package/locales/fr.global.js +1 -1
  75. package/locales/fr.global.min.js +1 -1
  76. package/locales/gl.global.js +1 -1
  77. package/locales/gl.global.min.js +1 -1
  78. package/locales/he.global.js +1 -1
  79. package/locales/he.global.min.js +1 -1
  80. package/locales/hi.global.js +1 -1
  81. package/locales/hi.global.min.js +1 -1
  82. package/locales/hr.global.js +1 -1
  83. package/locales/hr.global.min.js +1 -1
  84. package/locales/hu.global.js +1 -1
  85. package/locales/hu.global.min.js +1 -1
  86. package/locales/hy-am.global.js +1 -1
  87. package/locales/hy-am.global.min.js +1 -1
  88. package/locales/id.global.js +1 -1
  89. package/locales/id.global.min.js +1 -1
  90. package/locales/is.global.js +1 -1
  91. package/locales/is.global.min.js +1 -1
  92. package/locales/it.global.js +1 -1
  93. package/locales/it.global.min.js +1 -1
  94. package/locales/ja.global.js +1 -1
  95. package/locales/ja.global.min.js +1 -1
  96. package/locales/ka.global.js +1 -1
  97. package/locales/ka.global.min.js +1 -1
  98. package/locales/kk.global.js +1 -1
  99. package/locales/kk.global.min.js +1 -1
  100. package/locales/km.global.js +1 -1
  101. package/locales/km.global.min.js +1 -1
  102. package/locales/ko.global.js +1 -1
  103. package/locales/ko.global.min.js +1 -1
  104. package/locales/ku.global.js +1 -1
  105. package/locales/ku.global.min.js +1 -1
  106. package/locales/lb.global.js +1 -1
  107. package/locales/lb.global.min.js +1 -1
  108. package/locales/lt.global.js +1 -1
  109. package/locales/lt.global.min.js +1 -1
  110. package/locales/lv.global.js +1 -1
  111. package/locales/lv.global.min.js +1 -1
  112. package/locales/mk.global.js +1 -1
  113. package/locales/mk.global.min.js +1 -1
  114. package/locales/ms.global.js +1 -1
  115. package/locales/ms.global.min.js +1 -1
  116. package/locales/nb.global.js +1 -1
  117. package/locales/nb.global.min.js +1 -1
  118. package/locales/ne.global.js +1 -1
  119. package/locales/ne.global.min.js +1 -1
  120. package/locales/nl.global.js +1 -1
  121. package/locales/nl.global.min.js +1 -1
  122. package/locales/nn.global.js +1 -1
  123. package/locales/nn.global.min.js +1 -1
  124. package/locales/pl.global.js +1 -1
  125. package/locales/pl.global.min.js +1 -1
  126. package/locales/pt-br.global.js +1 -1
  127. package/locales/pt-br.global.min.js +1 -1
  128. package/locales/pt.global.js +1 -1
  129. package/locales/pt.global.min.js +1 -1
  130. package/locales/ro.global.js +1 -1
  131. package/locales/ro.global.min.js +1 -1
  132. package/locales/ru.global.js +1 -1
  133. package/locales/ru.global.min.js +1 -1
  134. package/locales/si-lk.global.js +1 -1
  135. package/locales/si-lk.global.min.js +1 -1
  136. package/locales/sk.global.js +1 -1
  137. package/locales/sk.global.min.js +1 -1
  138. package/locales/sl.global.js +1 -1
  139. package/locales/sl.global.min.js +1 -1
  140. package/locales/sm.global.js +1 -1
  141. package/locales/sm.global.min.js +1 -1
  142. package/locales/sq.global.js +1 -1
  143. package/locales/sq.global.min.js +1 -1
  144. package/locales/sr-cyrl.global.js +1 -1
  145. package/locales/sr-cyrl.global.min.js +1 -1
  146. package/locales/sr.global.js +1 -1
  147. package/locales/sr.global.min.js +1 -1
  148. package/locales/sv.global.js +1 -1
  149. package/locales/sv.global.min.js +1 -1
  150. package/locales/ta-in.global.js +1 -1
  151. package/locales/ta-in.global.min.js +1 -1
  152. package/locales/th.global.js +1 -1
  153. package/locales/th.global.min.js +1 -1
  154. package/locales/tr.global.js +1 -1
  155. package/locales/tr.global.min.js +1 -1
  156. package/locales/ug.global.js +1 -1
  157. package/locales/ug.global.min.js +1 -1
  158. package/locales/uk.global.js +1 -1
  159. package/locales/uk.global.min.js +1 -1
  160. package/locales/uz-cy.global.js +1 -1
  161. package/locales/uz-cy.global.min.js +1 -1
  162. package/locales/uz.global.js +1 -1
  163. package/locales/uz.global.min.js +1 -1
  164. package/locales/vi.global.js +1 -1
  165. package/locales/vi.global.min.js +1 -1
  166. package/locales/zh-cn.global.js +1 -1
  167. package/locales/zh-cn.global.min.js +1 -1
  168. package/locales/zh-tw.global.js +1 -1
  169. package/locales/zh-tw.global.min.js +1 -1
  170. package/locales-all.global.js +1 -1
  171. package/locales-all.global.min.js +1 -1
  172. package/package.json +2 -2
  173. package/preact.d.ts +6 -0
  174. package/preact.js +1 -1
package/index.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Core v6.1.15
2
+ FullCalendar Core v7.0.0-beta.1
3
3
  Docs & License: https://fullcalendar.io
4
4
  (c) 2024 Adam Shaw
5
5
  */
@@ -86,7 +86,7 @@ var FullCalendar = (function (exports) {
86
86
  registerStylesRoot(document);
87
87
  }
88
88
 
89
- var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}";
89
+ var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc{display:flex;flex-direction:column;gap:1.5em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-flex-row{display:flex;flex-direction:row}.fc-flex-column{display:flex;flex-direction:column}.fc-grow{flex-grow:1}.fc-basis0,.fc-liquid{flex-basis:0}.fc-liquid{flex-grow:1;min-height:0;min-width:0}.fc-row{display:flex;flex-direction:row}.fc-rowgroup{display:flex;flex-direction:column}.fc-row,.fc-rowdivider,.fc-rowgroup{border-color:var(--fc-border-color);border-style:solid;border-width:1px 0 0}.fc-row:first-child:not(.fc-not-first),.fc-rowdivider+.fc-row,.fc-rowdivider+.fc-rowgroup,.fc-rowdivider:first-child,.fc-rowgroup:first-child,.fc-sticky-header+.fc-row,.fc-sticky-header+.fc-rowgroup{border-top-width:0}.fc-cell,.fc-celldivider{border:0 solid var(--fc-border-color)}.fc-cell{margin:0!important;padding:0!important}.fc-cell-inner{overflow:hidden;white-space:nowrap}.fc-direction-ltr .fc-cell,.fc-direction-ltr .fc-celldivider{border-left-width:1px}.fc-direction-ltr .fc-cell:first-child:not(.fc-not-first),.fc-direction-ltr .fc-celldivider+.fc-cell{border-left-width:0}.fc-direction-ltr .fc-celldivider,.fc-direction-rtl .fc-cell,.fc-direction-rtl .fc-celldivider{border-right-width:1px}.fc-direction-rtl .fc-cell:first-child:not(.fc-not-first),.fc-direction-rtl .fc-celldivider+.fc-cell{border-right-width:0}.fc-direction-rtl .fc-celldivider{border-left-width:1px}.fc-cell:only-child{flex-basis:0;flex-grow:1;min-width:0}.fc-celldivider,.fc-rowdivider{background:var(--fc-neutral-bg-color)}.fc-celldivider{padding-left:2px}.fc-rowdivider{padding-bottom:2px}.fc-rowdivider,.fc-sticky-header{border-bottom-width:1px}.fc-rel{position:relative}.fc-abs{position:absolute}.fc-fill{bottom:0;top:0}.fc-fill,.fc-fill-x{left:0;position:absolute;right:0}.fc-fill-y{bottom:0;position:absolute;top:0}.fc-sticky-y{bottom:0;position:sticky;top:0}.fc-sticky-x{left:0;position:sticky;right:0}.fc-sticky-header{background:var(--fc-page-bg-color);position:sticky;top:0;z-index:9999}.fc-sticky-footer{bottom:0;position:sticky;z-index:9999}.fc-content-box{box-sizing:content-box}.fc-border{border:1px solid var(--fc-border-color)}.fc-offscreen{left:-10000px;position:absolute}.fc-shaded{background-color:var(--fc-neutral-bg-color)}.fc-padding-sm{padding:2px 4px}.fc-padding-md{padding:4px 5px}.fc-padding-lg{padding:8px}.fc-justify-center{justify-content:center}.fc-align-center{align-items:center}.fc-align-start{align-items:flex-start}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-view-harness{position:relative}.fc-view-harness-fixedheight,.fc-view-harness-liquid{display:flex;flex-direction:column}.fc-view-harness-fixedheight>.fc-view,.fc-view-harness-liquid,.fc-view-harness-liquid>.fc-view{flex-basis:0;flex-grow:1;min-height:0}.fc-view-harness-aspectratio>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-event-inner{position:relative;z-index:2}.fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-bg-event,.fc-highlight,.fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc-non-business{background:var(--fc-non-business-color)}.fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc-highlight{background:var(--fc-highlight-color)}.fc-day-disabled{background:var(--fc-neutral-bg-color)}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-h-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-time,.fc-h-event .fc-event-title{overflow:hidden;white-space:nowrap}.fc-h-event .fc-event-title-outer{display:flex;flex-basis:0;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-title{left:0;position:sticky;right:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc-popover-title{margin:0 2px}.fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}.fc-scroller-nobars{-ms-overflow-style:none;scrollbar-width:none}.fc-scroller-nobars::-webkit-scrollbar{display:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc-button{-webkit-appearance:button}.fc-button:not(:disabled){cursor:pointer}.fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc-button:hover{text-decoration:none}.fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc-button:disabled{opacity:.65}.fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button-primary:not(:disabled).fc-button-active,.fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc-button-primary:not(:disabled).fc-button-active:focus,.fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc-button-group>.fc-button.fc-button-active,.fc-button-group>.fc-button:active,.fc-button-group>.fc-button:focus,.fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc-toolbar{align-items:center;display:flex;flex-direction:row;gap:.75em;justify-content:space-between}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc-toolbar-chunk{display:flex;flex-direction:row;flex-shrink:0;gap:.75em}.fc-toolbar-title{font-size:1.75em;margin:0;white-space:nowrap}";
90
90
  injectStyles(css_248z);
91
91
 
92
92
  function removeElement(el) {
@@ -375,20 +375,6 @@ var FullCalendar = (function (exports) {
375
375
  function isInt(n) {
376
376
  return n % 1 === 0;
377
377
  }
378
- /* FC-specific DOM dimension stuff
379
- ----------------------------------------------------------------------------------------------------------------------*/
380
- function computeSmallestCellWidth(cellEl) {
381
- let allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame');
382
- let contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion');
383
- if (!allWidthEl) {
384
- throw new Error('needs fc-scrollgrid-shrink-frame className'); // TODO: use const
385
- }
386
- if (!contentWidthEl) {
387
- throw new Error('needs fc-scrollgrid-shrink-cushion className');
388
- }
389
- return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border
390
- contentWidthEl.getBoundingClientRect().width;
391
- }
392
378
 
393
379
  const INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];
394
380
  const PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;
@@ -1463,8 +1449,6 @@ var FullCalendar = (function (exports) {
1463
1449
  dropAccept: identity,
1464
1450
  eventOrder: parseFieldSpecs,
1465
1451
  eventOrderStrict: Boolean,
1466
- handleWindowResize: Boolean,
1467
- windowResizeDelay: Number,
1468
1452
  longPressDelay: Number,
1469
1453
  eventDragMinDistance: Number,
1470
1454
  expandRows: Boolean,
@@ -1614,8 +1598,6 @@ var FullCalendar = (function (exports) {
1614
1598
  dropAccept: '*',
1615
1599
  eventOrder: 'start,-duration,allDay,title',
1616
1600
  dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },
1617
- handleWindowResize: true,
1618
- windowResizeDelay: 100,
1619
1601
  longPressDelay: 1000,
1620
1602
  eventDragMinDistance: 5,
1621
1603
  expandRows: false,
@@ -1634,7 +1616,6 @@ var FullCalendar = (function (exports) {
1634
1616
  eventAdd: identity,
1635
1617
  eventChange: identity,
1636
1618
  eventRemove: identity,
1637
- windowResize: identity,
1638
1619
  eventClick: identity,
1639
1620
  eventMouseEnter: identity,
1640
1621
  eventMouseLeave: identity,
@@ -1647,8 +1628,7 @@ var FullCalendar = (function (exports) {
1647
1628
  _afterprint: identity,
1648
1629
  _noEventDrop: identity,
1649
1630
  _noEventResize: identity,
1650
- _resize: identity,
1651
- _scrollRequest: identity,
1631
+ _timeScrollRequest: identity,
1652
1632
  };
1653
1633
  // calendar-specific options
1654
1634
  // -------------------------
@@ -1897,6 +1877,9 @@ var FullCalendar = (function (exports) {
1897
1877
  }
1898
1878
  return [];
1899
1879
  }
1880
+ function fracToCssDim(frac) {
1881
+ return frac * 100 + '%';
1882
+ }
1900
1883
 
1901
1884
  // TODO: better called "EventSettings" or "EventConfig"
1902
1885
  // TODO: move this file into structs
@@ -2232,33 +2215,6 @@ var FullCalendar = (function (exports) {
2232
2215
  };
2233
2216
  }
2234
2217
 
2235
- let canVGrowWithinCell;
2236
- function getCanVGrowWithinCell() {
2237
- if (canVGrowWithinCell == null) {
2238
- canVGrowWithinCell = computeCanVGrowWithinCell();
2239
- }
2240
- return canVGrowWithinCell;
2241
- }
2242
- function computeCanVGrowWithinCell() {
2243
- // for SSR, because this function is call immediately at top-level
2244
- // TODO: just make this logic execute top-level, immediately, instead of doing lazily
2245
- if (typeof document === 'undefined') {
2246
- return true;
2247
- }
2248
- let el = document.createElement('div');
2249
- el.style.position = 'absolute';
2250
- el.style.top = '0px';
2251
- el.style.left = '0px';
2252
- el.innerHTML = '<table><tr><td><div></div></td></tr></table>';
2253
- el.querySelector('table').style.height = '100px';
2254
- el.querySelector('div').style.height = '100%';
2255
- document.body.appendChild(el);
2256
- let div = el.querySelector('div');
2257
- let possible = div.offsetHeight > 0;
2258
- document.body.removeChild(el);
2259
- return possible;
2260
- }
2261
-
2262
2218
  const EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere
2263
2219
  class Splitter {
2264
2220
  constructor() {
@@ -2289,9 +2245,9 @@ var FullCalendar = (function (exports) {
2289
2245
  dateSelection: dateSelections[key] || null,
2290
2246
  eventStore,
2291
2247
  eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),
2292
- eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
2293
2248
  eventDrag: eventDrags[key] || null,
2294
2249
  eventResize: eventResizes[key] || null,
2250
+ eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
2295
2251
  };
2296
2252
  }
2297
2253
  return splitProps;
@@ -2505,7 +2461,6 @@ var FullCalendar = (function (exports) {
2505
2461
  else {
2506
2462
  if (meta.isToday) {
2507
2463
  classNames.push('fc-day-today');
2508
- classNames.push(theme.getClass('today'));
2509
2464
  }
2510
2465
  if (meta.isPast) {
2511
2466
  classNames.push('fc-day-past');
@@ -2530,7 +2485,6 @@ var FullCalendar = (function (exports) {
2530
2485
  else {
2531
2486
  if (meta.isToday) {
2532
2487
  classNames.push('fc-slot-today');
2533
- classNames.push(theme.getClass('today'));
2534
2488
  }
2535
2489
  if (meta.isPast) {
2536
2490
  classNames.push('fc-slot-past');
@@ -2542,6 +2496,101 @@ var FullCalendar = (function (exports) {
2542
2496
  return classNames;
2543
2497
  }
2544
2498
 
2499
+ // TODO: kill Component::safeSetState
2500
+ // TODO: kill
2501
+ function setStateDimMap(component, key, newMap) {
2502
+ const currentMap = component.state[key];
2503
+ if (!currentMap || !isDimMapsEqual(currentMap, newMap)) {
2504
+ component.setState({ [key]: newMap });
2505
+ }
2506
+ }
2507
+ // TODO: kill
2508
+ function isDimMapsEqual(oldMap, newMap) {
2509
+ for (const key in newMap) {
2510
+ if (!isDimsEqual(oldMap[key], newMap[key])) {
2511
+ return false;
2512
+ }
2513
+ }
2514
+ return true;
2515
+ }
2516
+ // TODO: kill
2517
+ function isDimsEqual(v0, v1) {
2518
+ return v0 != null && (v0 === v1 || Math.abs(v0 - v1) < 0.01);
2519
+ }
2520
+
2521
+ const callbackMap = new Map();
2522
+ let flushedCallbackSet = new Set();
2523
+ let isHandling = false;
2524
+ /*
2525
+ Performant from multiple perspectives:
2526
+ - less memory with one ResizeObserver
2527
+ - batches firing
2528
+ */
2529
+ const resizeObserver = new ResizeObserver((entries) => {
2530
+ isHandling = true;
2531
+ for (let entry of entries) {
2532
+ const callback = callbackMap.get(entry.target);
2533
+ if (entry.contentBoxSize) {
2534
+ // The standard makes contentBoxSize an array...
2535
+ if (entry.contentBoxSize[0]) {
2536
+ callback(entry.contentBoxSize[0].inlineSize, entry.contentBoxSize[0].blockSize);
2537
+ }
2538
+ else {
2539
+ // ...but old versions of Firefox treat it as a single item
2540
+ callback(entry.contentBoxSize.inlineSize, entry.contentBoxSize.blockSize);
2541
+ }
2542
+ }
2543
+ else {
2544
+ callback(entry.contentRect.width, entry.contentRect.height);
2545
+ }
2546
+ }
2547
+ for (const flushedCallback of flushedCallbackSet.values()) {
2548
+ flushedCallback();
2549
+ flushedCallbackSet.delete(flushedCallback);
2550
+ }
2551
+ isHandling = false;
2552
+ });
2553
+ /*
2554
+ PRECONDITIONS:
2555
+ - element can only have one listener attached ever
2556
+ - element cannot have border or padding
2557
+
2558
+ TODO:
2559
+ - always force border/padding on these elements to `0 !important` ???
2560
+ */
2561
+ function watchSize(el, callback) {
2562
+ callbackMap.set(el, callback);
2563
+ resizeObserver.observe(el);
2564
+ return () => {
2565
+ callbackMap.delete(el);
2566
+ resizeObserver.unobserve(el);
2567
+ };
2568
+ }
2569
+ function watchWidth(el, callback) {
2570
+ let currentWidth;
2571
+ return watchSize(el, (width) => {
2572
+ if (currentWidth == null || currentWidth !== width) {
2573
+ callback(currentWidth = width);
2574
+ }
2575
+ });
2576
+ }
2577
+ function watchHeight(el, callback) {
2578
+ let currentHeight;
2579
+ return watchSize(el, (_width, height) => {
2580
+ if (currentHeight == null || currentHeight !== height) {
2581
+ callback(currentHeight = height);
2582
+ }
2583
+ });
2584
+ }
2585
+ function afterSize(callback) {
2586
+ if (isHandling) {
2587
+ flushedCallbackSet.add(callback);
2588
+ }
2589
+ else {
2590
+ callback(); // TODO: should we queue microtask?
2591
+ }
2592
+ }
2593
+
2545
2594
  const DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
2546
2595
  const WEEK_FORMAT = createFormatter({ week: 'long' });
2547
2596
  function buildNavLinkAttrs(context, dateMarker, viewType = 'day', isTabbable = true) {
@@ -3024,16 +3073,19 @@ var FullCalendar = (function (exports) {
3024
3073
  Theme.prototype.baseIconClass = '';
3025
3074
  Theme.prototype.iconOverridePrefix = '';
3026
3075
 
3027
- var n,l$1,u$1,i$1,t,r$1,o,f$1,e$1,c$1={},s=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u$1:o};return null==o&&null!=l$1.vnode&&l$1.vnode(f),f}function d(){return {current:null}}function _(n){return n.children}function k$1(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||g$2(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||g$2(n,r,l[r],u[r],i);}function b$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function g$2(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||b$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||b$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?w$2:m$1,r):n.removeEventListener(l,r?w$2:m$1,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function m$1(n){t=!0;try{return this.l[n.type+!1](l$1.event?l$1.event(n):n)}finally{t=!1;}}function w$2(n){t=!0;try{return this.l[n.type+!0](l$1.event?l$1.event(n):n)}finally{t=!1;}}function x$1(n,l){this.props=n,this.context=l;}function A(n,l){if(null==l)return n.__?A(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?A(n):null}function P$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return P$1(n)}}function C$1(n){t?setTimeout(n):f$1(n);}function T$1(n){(!n.__d&&(n.__d=!0)&&r$1.push(n)&&!$$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||C$1)($$1);}function $$1(){var n,l,u,i,t,o,f,e;for(r$1.sort(function(n,l){return n.__v.__b-l.__v.__b});n=r$1.shift();)n.__d&&(l=r$1.length,i=void 0,t=void 0,f=(o=(u=n).__v).__e,(e=u.__P)&&(i=[],(t=h({},o)).__v=o.__v+1,M(e,o,t,u.__n,void 0!==e.ownerSVGElement,null!=o.__h?[f]:null,i,null==f?A(o):f,o.__h),N(i,o),o.__e!=f&&P$1(o)),r$1.length>l&&r$1.sort(function(n,l){return n.__v.__b-l.__v.__b}));$$1.__r=0;}function H$1(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,b,g,m=i&&i.__k||s,w=m.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(d=u.__k[h]=null==(d=l[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?p(null,d,null,null,d):Array.isArray(d)?p(_,{children:d},null,null,null):d.__b>0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=m[h])||y&&d.key==y.key&&d.type===y.type)m[h]=void 0;else for(v=0;v<w;v++){if((y=m[v])&&d.key==y.key&&d.type===y.type){m[v]=void 0;break}y=null;}M(n,d,y=y||c$1,t,r,o,f,e,a),k=d.__e,(v=d.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,d),g.push(v,d.__c||k,d)),null!=k?(null==b&&(b=k),"function"==typeof d.type&&d.__k===y.__k?d.__d=e=I$1(d,e,n):e=z$1(n,d,y,m,k,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=A(y));}for(u.__e=b,h=w;h--;)null!=m[h]&&("function"==typeof u.type&&null!=m[h].__e&&m[h].__e==u.__d&&(u.__d=L$1(i).nextSibling),q(m[h],m[h]));if(g)for(h=0;h<g.length;h++)S(g[h],g[++h],g[++h]);}function I$1(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?I$1(i,l,u):z$1(u,i,i,t,i.__e,l));return l}function j$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){j$2(n,l);}):l.push(n)),l}function z$1(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else {for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function L$1(n){var l,u,i;if(null==n.type||"string"==typeof n.type)return n.__e;if(n.__k)for(l=n.__k.length-1;l>=0;l--)if((u=n.__k[l])&&(i=L$1(u)))return i;return null}function M(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,k,b,g,m,w,A,P,C,T,$=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof $){if(b=u.props,g=(s=$.contextType)&&t[s.__c],m=s?g?g.props.value:s.__:t,i.__c?k=(a=u.__c=i.__c).__=a.__E:("prototype"in $&&$.prototype.render?u.__c=a=new $(b,m):(u.__c=a=new x$1(b,m),a.constructor=$,a.render=B$1),g&&g.sub(a),a.props=b,a.state||(a.state={}),a.context=m,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=$.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,$.getDerivedStateFromProps(b,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==$.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==$.getDerivedStateFromProps&&b!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,m),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(b,a.__s,m)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=b,a.state=a.__s,a.__d=!1),u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),w=0;w<a._sb.length;w++)a.__h.push(a._sb[w]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(b,a.__s,m),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,p,d);});}if(a.context=m,a.props=b,a.__P=n,A=l$1.__r,P=0,"prototype"in $&&$.prototype.render){for(a.state=a.__s,a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),C=0;C<a._sb.length;C++)a.__h.push(a._sb[C]);a._sb=[];}else do{a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),a.state=a.__s;}while(a.__d&&++P<25);a.state=a.__s,null!=a.getChildContext&&(t=h(h({},t),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(d=a.getSnapshotBeforeUpdate(y,p)),T=null!=s&&s.type===_&&null==s.key?s.props.children:s,H$1(n,Array.isArray(T)?T:[T],u,i,t,r,o,f,e,c),a.base=u.__e,u.__h=null,a.__h.length&&f.push(a),k&&(a.__E=a.__=null),a.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=O(i.__e,u,i,t,r,o,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l$1.__e(n,u,i);}}function N(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function O(l,u,i,t,r,o,f,e){var s,a,h,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,e=!1;}if(null===d)y===p||e&&l.data===p||(l.data=p);else {if(o=o&&n.call(l.childNodes),a=(y=i.props||c$1).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!e){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""));}if(k$1(l,p,y,r,e),h)u.__k=[];else if(_=u.props.children,H$1(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&A(i,0),e),null!=o)for(_=o.length;_--;)null!=o[_]&&v$1(o[_]);e||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&g$2(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&g$2(l,"checked",_,y.checked,!1));}return l}function S(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function q(n,u,i){var t,r;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||S(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&q(t[r],u,i||"function"!=typeof n.type);i||null==n.__e||v$1(n.__e),n.__=n.__e=n.__d=void 0;}function B$1(n,l,u){return this.constructor(n,u)}function D$1(u,i,t){var r,o,f;l$1.__&&l$1.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],M(i,u=(!r&&t||i).__k=y(_,null,[u]),o||c$1,c$1,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),N(f,u);}function E(n,l){D$1(n,l,E);}function F$1(l,u,i){var t,r,o,f=h({},l.props);for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function G$1(n,l){var u={__c:l="__cC"+e$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,T$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l$1={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,i$1=function(n){return null!=n&&void 0===n.constructor},t=!1,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),T$1(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),T$1(this));},x$1.prototype.render=_,r$1=[],f$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$$1.__r=0,e$1=0;
3076
+ var n,l$1,u$1,t,i$1,o,r$1,f$1,e$1,c$1,s$1,a$1,h={},p=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){var l=n.parentNode;l&&l.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g$1(l,f,i,o,null)}function g$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function m$1(){return {current:null}}function k$1(n){return n.children}function b(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||r$1)(P$1);}function P$1(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O$1(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$2(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P$1.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$$1(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&"boolean"!=typeof y&&"function"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O$1(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $$1(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g$1(null,i,null,null,null):y(i)?g$1(k$1,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L$1(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(y(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||v$1.test(l)?u:u+"px";}function A$1(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k$1&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$2(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$2(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$2(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&"setAttribute"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1;}if(null===b)m===k||e&&l.data===k||(l.data=k);else {if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],"children"==s);else if("dangerouslySetInnerHTML"==s)p=d;else if("key"!==s&&!(s in k)){if("value"==s&&"defaultValue"in k||"checked"==s&&"defaultChecked"in k)continue;A$1(l,s,null,d,o);}for(s in k)d=k[s],"children"==s?v=d:"dangerouslySetInnerHTML"==s?a=d:"value"==s?_=d:"checked"==s?g=d:"key"===s||e&&"function"!=typeof d||m[s]===d||A$1(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=""),S(l,y(v)?v:[v],u,t,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w$1(r[s]);e||(s="value",void 0!==_&&(_!==l[s]||"progress"===b&&!_||"option"===b&&_!==m[s])&&A$1(l,s,_,m[s],o),s="checked",void 0!==g&&g!==l[s]&&A$1(l,s,g,m[s],o));}return l}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V$1(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V$1(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q(n,l,u){return this.constructor(n,u)}function B$2(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O$1(t,u=(!o&&i||t).__k=_(k$1,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$2(f,u,e);}function D$1(n,l){B$2(n,l,D$1);}function E$1(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g$1(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l="__cC"+a$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},b.prototype.render=k$1,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P$1.__r=0,e$1=0,c$1=F(!1),s$1=F(!0),a$1=0;
3028
3077
 
3029
- var r,u,i,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e&&e(n);},l$1.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w$1),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j$1)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w$1(n){var t=r;n.__c=n.__(),r=t;}
3078
+ var r,u,i,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}
3030
3079
 
3031
- function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function w(n){this.props=n;}(w.prototype=new x$1).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n);};var T=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r);};var I=l$1.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null;}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function V(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n);},(D.prototype=new x$1).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},D.prototype.componentWillUnmount=function(){this.t=[];},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&y(_,null,n.fallback);return i&&(i.__h=null),[y(_,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function P(n){return this.getChildContext=function(){return n.context},n.children}function $(n){var e=this,r=n.i;e.componentWillUnmount=function(){D$1(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),D$1(y(P,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount();}function j(n,e){var r=y($,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new x$1).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u();};e?e(o):o();}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=j$2(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H="undefined"!=typeof document,Z=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};x$1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(x$1.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var G=l$1.event;function J(){}function K(){return this.cancelBubble}function Q(){return this.defaultPrevented}l$1.event=function(n){return G&&(n=G(n)),n.persist=J,n.isPropagationStopped=K,n.isDefaultPrevented=Q,n.nativeEvent=n};var nn={configurable:!0,get:function(){return this.class}},tn=l$1.vnode;l$1.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];H&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Z(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&B.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l);}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=j$2(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=j$2(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),n.props=u,e.class!=e.className&&(nn.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",nn));}n.$$typeof=z,tn&&tn(n);};var en=l$1.__r;l$1.__r=function(n){en&&en(n),n.__c;};
3080
+ function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function C(n,t){this.props=n,this.context=t;}(C.prototype=new b).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var M=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r);};var T=l$1.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null;}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function U(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n);},(L.prototype=new b).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c());};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&_(k$1,null,n.fallback);return i&&(i.__u&=-33),[_(k$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){B$2(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return !0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),B$2(_(W,{context:e.context},n.__v),e.l);}function j(n,e){var r=_(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new b).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=H$1(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y="undefined"!=typeof document,$=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(b.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var J=l$1.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}l$1.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=l$1.vnode;l$1.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Y&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var c=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"ondoubleclick"===c?o="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||$(t.type)?"onfocus"===c?o="onfocusin":"onblur"===c?o="onfocusout":H.test(o)?o=c:-1===e.indexOf("-")&&B.test(o)?o=o.replace(Z,"-$&").toLowerCase():null===i&&(i=void 0):c=o="oninput","oninput"===c&&u[o=c]&&(o="oninputCapture"),u[o]=i;}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==e&&null!=u.defaultValue&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u;}(n),n.$$typeof=z,en&&en(n);};var rn=l$1.__r;l$1.__r=function(n){rn&&rn(n),n.__c;};var un=l$1.diffed;l$1.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value);};
3032
3081
 
3033
3082
  /*
3034
3083
  NOTE: this can be a public API, especially createElement for hooks.
3035
3084
  See examples/typescript-scheduler/src/index.ts
3036
3085
  */
3086
+ /*
3087
+ TODO: rethink this
3088
+ */
3037
3089
  function flushSync(runBeforeFlush) {
3038
3090
  runBeforeFlush();
3039
3091
  let oldDebounceRendering = l$1.debounceRendering; // orig
@@ -3042,19 +3094,19 @@ var FullCalendar = (function (exports) {
3042
3094
  callbackQ.push(callback);
3043
3095
  }
3044
3096
  l$1.debounceRendering = execCallbackSync;
3045
- D$1(y(FakeComponent, {}), document.createElement('div'));
3097
+ B$2(_(FakeComponent, {}), document.createElement('div'));
3046
3098
  while (callbackQ.length) {
3047
3099
  callbackQ.shift()();
3048
3100
  }
3049
3101
  l$1.debounceRendering = oldDebounceRendering;
3050
3102
  }
3051
- class FakeComponent extends x$1 {
3052
- render() { return y('div', {}); }
3103
+ class FakeComponent extends b {
3104
+ render() { return _('div', {}); }
3053
3105
  componentDidMount() { this.setState({}); }
3054
3106
  }
3055
3107
  // TODO: use preact/compat instead?
3056
3108
  function createContext(defaultValue) {
3057
- let ContextType = G$1(defaultValue);
3109
+ let ContextType = G(defaultValue);
3058
3110
  let origProvider = ContextType.Provider;
3059
3111
  ContextType.Provider = function () {
3060
3112
  let isNew = !this.getChildContext;
@@ -3088,55 +3140,19 @@ var FullCalendar = (function (exports) {
3088
3140
  flushSync: flushSync,
3089
3141
  createContext: createContext,
3090
3142
  createPortal: j,
3091
- Component: x$1,
3092
- Fragment: _,
3093
- cloneElement: F$1,
3094
- createElement: y,
3095
- createRef: d,
3096
- h: y,
3097
- hydrate: E,
3098
- get isValidElement () { return i$1; },
3143
+ Component: b,
3144
+ Fragment: k$1,
3145
+ cloneElement: E$1,
3146
+ createElement: _,
3147
+ createRef: m$1,
3148
+ h: _,
3149
+ hydrate: D$1,
3150
+ get isValidElement () { return t; },
3099
3151
  get options () { return l$1; },
3100
- render: D$1,
3101
- toChildArray: j$2
3152
+ render: B$2,
3153
+ toChildArray: H$1
3102
3154
  };
3103
3155
 
3104
- class ScrollResponder {
3105
- constructor(execFunc, emitter, scrollTime, scrollTimeReset) {
3106
- this.execFunc = execFunc;
3107
- this.emitter = emitter;
3108
- this.scrollTime = scrollTime;
3109
- this.scrollTimeReset = scrollTimeReset;
3110
- this.handleScrollRequest = (request) => {
3111
- this.queuedRequest = Object.assign({}, this.queuedRequest || {}, request);
3112
- this.drain();
3113
- };
3114
- emitter.on('_scrollRequest', this.handleScrollRequest);
3115
- this.fireInitialScroll();
3116
- }
3117
- detach() {
3118
- this.emitter.off('_scrollRequest', this.handleScrollRequest);
3119
- }
3120
- update(isDatesNew) {
3121
- if (isDatesNew && this.scrollTimeReset) {
3122
- this.fireInitialScroll(); // will drain
3123
- }
3124
- else {
3125
- this.drain();
3126
- }
3127
- }
3128
- fireInitialScroll() {
3129
- this.handleScrollRequest({
3130
- time: this.scrollTime,
3131
- });
3132
- }
3133
- drain() {
3134
- if (this.queuedRequest && this.execFunc(this.queuedRequest)) {
3135
- this.queuedRequest = null;
3136
- }
3137
- }
3138
- }
3139
-
3140
3156
  const ViewContextType = createContext({}); // for Components
3141
3157
  function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) {
3142
3158
  return {
@@ -3152,22 +3168,13 @@ var FullCalendar = (function (exports) {
3152
3168
  dateProfileGenerator,
3153
3169
  theme,
3154
3170
  isRtl: viewOptions.direction === 'rtl',
3155
- addResizeHandler(handler) {
3156
- emitter.on('_resize', handler);
3157
- },
3158
- removeResizeHandler(handler) {
3159
- emitter.off('_resize', handler);
3160
- },
3161
- createScrollResponder(execFunc) {
3162
- return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset);
3163
- },
3164
3171
  registerInteractiveComponent,
3165
3172
  unregisterInteractiveComponent,
3166
3173
  };
3167
3174
  }
3168
3175
 
3169
3176
  /* eslint max-classes-per-file: off */
3170
- class PureComponent extends x$1 {
3177
+ class PureComponent extends b {
3171
3178
  shouldComponentUpdate(nextProps, nextState) {
3172
3179
  if (this.debug) {
3173
3180
  // eslint-disable-next-line no-console
@@ -4185,12 +4192,12 @@ var FullCalendar = (function (exports) {
4185
4192
  function hasBgRendering(def) {
4186
4193
  return def.ui.display === 'background' || def.ui.display === 'inverse-background';
4187
4194
  }
4188
- function setElSeg(el, seg) {
4189
- el.fcSeg = seg;
4195
+ function setElEventRange(el, eventRange) {
4196
+ el.fcEventRange = eventRange;
4190
4197
  }
4191
- function getElSeg(el) {
4192
- return el.fcSeg ||
4193
- el.parentNode.fcSeg || // for the harness
4198
+ function getElEventRange(el) {
4199
+ return el.fcEventRange ||
4200
+ el.parentNode.fcEventRange || // for the harness
4194
4201
  null;
4195
4202
  }
4196
4203
  // event ui computation
@@ -4210,7 +4217,7 @@ var FullCalendar = (function (exports) {
4210
4217
  }
4211
4218
  function sortEventSegs(segs, eventOrderSpecs) {
4212
4219
  let objs = segs.map(buildSegCompareObj);
4213
- objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs));
4220
+ objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs)); // !!!
4214
4221
  return objs.map((c) => c._seg);
4215
4222
  }
4216
4223
  // returns a object with all primitive props that can be compared
@@ -4223,29 +4230,23 @@ var FullCalendar = (function (exports) {
4223
4230
  return Object.assign(Object.assign(Object.assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start,
4224
4231
  end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg });
4225
4232
  }
4226
- function computeSegDraggable(seg, context) {
4233
+ function computeEventRangeDraggable(eventRange, context) {
4227
4234
  let { pluginHooks } = context;
4228
4235
  let transformers = pluginHooks.isDraggableTransformers;
4229
- let { def, ui } = seg.eventRange;
4236
+ let { def, ui } = eventRange;
4230
4237
  let val = ui.startEditable;
4231
4238
  for (let transformer of transformers) {
4232
4239
  val = transformer(val, def, ui, context);
4233
4240
  }
4234
4241
  return val;
4235
4242
  }
4236
- function computeSegStartResizable(seg, context) {
4237
- return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart;
4238
- }
4239
- function computeSegEndResizable(seg, context) {
4240
- return seg.isEnd && seg.eventRange.ui.durationEditable;
4241
- }
4242
- function buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true
4243
+ function buildEventRangeTimeText(eventRange, timeFormat, context, defaultDisplayEventTime, // defaults to true
4243
4244
  defaultDisplayEventEnd, // defaults to true
4244
4245
  startOverride, endOverride) {
4245
4246
  let { dateEnv, options } = context;
4246
4247
  let { displayEventTime, displayEventEnd } = options;
4247
- let eventDef = seg.eventRange.def;
4248
- let eventInstance = seg.eventRange.instance;
4248
+ let eventDef = eventRange.def;
4249
+ let eventInstance = eventRange.instance;
4249
4250
  if (displayEventTime == null) {
4250
4251
  displayEventTime = defaultDisplayEventTime !== false;
4251
4252
  }
@@ -4254,8 +4255,8 @@ var FullCalendar = (function (exports) {
4254
4255
  }
4255
4256
  let wholeEventStart = eventInstance.range.start;
4256
4257
  let wholeEventEnd = eventInstance.range.end;
4257
- let segStart = startOverride || seg.start || seg.eventRange.range.start;
4258
- let segEnd = endOverride || seg.end || seg.eventRange.range.end;
4258
+ let segStart = startOverride || eventRange.range.start;
4259
+ let segEnd = endOverride || eventRange.range.end;
4259
4260
  let isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf();
4260
4261
  let isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf();
4261
4262
  if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) {
@@ -4273,8 +4274,8 @@ var FullCalendar = (function (exports) {
4273
4274
  }
4274
4275
  return '';
4275
4276
  }
4276
- function getSegMeta(seg, todayRange, nowDate) {
4277
- let segRange = seg.eventRange.range;
4277
+ function getEventRangeMeta(eventRange, todayRange, nowDate) {
4278
+ let segRange = eventRange.range;
4278
4279
  return {
4279
4280
  isPast: segRange.end <= (nowDate || todayRange.start),
4280
4281
  isFuture: segRange.start >= (nowDate || todayRange.end),
@@ -4324,8 +4325,8 @@ var FullCalendar = (function (exports) {
4324
4325
  : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`;
4325
4326
  // inverse-background events don't have specific instances. TODO: better solution
4326
4327
  }
4327
- function getSegAnchorAttrs(seg, context) {
4328
- let { def, instance } = seg.eventRange;
4328
+ function getEventRangeAnchorAttrs(eventRange, context) {
4329
+ let { def, instance } = eventRange;
4329
4330
  let { url } = def;
4330
4331
  if (url) {
4331
4332
  return { href: url };
@@ -4818,707 +4819,865 @@ var FullCalendar = (function (exports) {
4818
4819
  }
4819
4820
  }
4820
4821
 
4821
- class SegHierarchy {
4822
- constructor(getEntryThickness = (entry) => {
4823
- // if no thickness known, assume 1 (if 0, so small it always fits)
4824
- return entry.thickness || 1;
4825
- }) {
4826
- this.getEntryThickness = getEntryThickness;
4827
- // settings
4828
- this.strictOrder = false;
4829
- this.allowReslicing = false;
4830
- this.maxCoord = -1; // -1 means no max
4831
- this.maxStackCnt = -1; // -1 means no max
4832
- this.levelCoords = []; // ordered
4833
- this.entriesByLevel = []; // parallel with levelCoords
4834
- this.stackCnts = {}; // TODO: use better technique!?
4835
- }
4836
- addSegs(inputs) {
4837
- let hiddenEntries = [];
4838
- for (let input of inputs) {
4839
- this.insertEntry(input, hiddenEntries);
4840
- }
4841
- return hiddenEntries;
4822
+ class ContentInjector extends BaseComponent {
4823
+ constructor() {
4824
+ super(...arguments);
4825
+ this.id = guid();
4826
+ this.queuedDomNodes = [];
4827
+ this.currentDomNodes = [];
4828
+ this.handleEl = (el) => {
4829
+ const { options } = this.context;
4830
+ const { generatorName } = this.props;
4831
+ if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
4832
+ this.updateElRef(el);
4833
+ }
4834
+ };
4835
+ this.updateElRef = (el) => {
4836
+ if (this.props.elRef) {
4837
+ setRef(this.props.elRef, el);
4838
+ }
4839
+ };
4842
4840
  }
4843
- insertEntry(entry, hiddenEntries) {
4844
- let insertion = this.findInsertion(entry);
4845
- if (this.isInsertionValid(insertion, entry)) {
4846
- this.insertEntryAt(entry, insertion);
4841
+ render() {
4842
+ const { props, context } = this;
4843
+ const { options } = context;
4844
+ const { customGenerator, defaultGenerator, renderProps } = props;
4845
+ const attrs = buildElAttrs(props, [], this.handleEl);
4846
+ let useDefault = false;
4847
+ let innerContent;
4848
+ let queuedDomNodes = [];
4849
+ let currentGeneratorMeta;
4850
+ if (customGenerator != null) {
4851
+ const customGeneratorRes = typeof customGenerator === 'function' ?
4852
+ customGenerator(renderProps, _) :
4853
+ customGenerator;
4854
+ if (customGeneratorRes === true) {
4855
+ useDefault = true;
4856
+ }
4857
+ else {
4858
+ const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null
4859
+ if (isObject && ('html' in customGeneratorRes)) {
4860
+ attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
4861
+ }
4862
+ else if (isObject && ('domNodes' in customGeneratorRes)) {
4863
+ queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
4864
+ }
4865
+ else if (isObject
4866
+ ? t(customGeneratorRes) // vdom node
4867
+ : typeof customGeneratorRes !== 'function' // primitive value (like string or number)
4868
+ ) {
4869
+ // use in vdom
4870
+ innerContent = customGeneratorRes;
4871
+ }
4872
+ else {
4873
+ // an exotic object for handleCustomRendering
4874
+ currentGeneratorMeta = customGeneratorRes;
4875
+ }
4876
+ }
4847
4877
  }
4848
4878
  else {
4849
- this.handleInvalidInsertion(insertion, entry, hiddenEntries);
4879
+ useDefault = !hasCustomRenderingHandler(props.generatorName, options);
4880
+ }
4881
+ if (useDefault && defaultGenerator) {
4882
+ innerContent = defaultGenerator(renderProps);
4850
4883
  }
4884
+ this.queuedDomNodes = queuedDomNodes;
4885
+ this.currentGeneratorMeta = currentGeneratorMeta;
4886
+ return _(props.elTag, attrs, innerContent);
4851
4887
  }
4852
- isInsertionValid(insertion, entry) {
4853
- return (this.maxCoord === -1 || insertion.levelCoord + this.getEntryThickness(entry) <= this.maxCoord) &&
4854
- (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
4888
+ componentDidMount() {
4889
+ this.applyQueueudDomNodes();
4890
+ this.triggerCustomRendering(true);
4855
4891
  }
4856
- handleInvalidInsertion(insertion, entry, hiddenEntries) {
4857
- if (this.allowReslicing && insertion.touchingEntry) {
4858
- const hiddenEntry = Object.assign(Object.assign({}, entry), { span: intersectSpans(entry.span, insertion.touchingEntry.span) });
4859
- hiddenEntries.push(hiddenEntry);
4860
- this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
4861
- }
4862
- else {
4863
- hiddenEntries.push(entry);
4864
- }
4892
+ componentDidUpdate() {
4893
+ this.applyQueueudDomNodes();
4894
+ this.triggerCustomRendering(true);
4865
4895
  }
4866
- /*
4867
- Does NOT add what hit the `barrier` into hiddenEntries. Should already be done.
4868
- */
4869
- splitEntry(entry, barrier, hiddenEntries) {
4870
- let entrySpan = entry.span;
4871
- let barrierSpan = barrier.span;
4872
- if (entrySpan.start < barrierSpan.start) {
4873
- this.insertEntry({
4874
- index: entry.index,
4875
- thickness: entry.thickness,
4876
- span: { start: entrySpan.start, end: barrierSpan.start },
4877
- }, hiddenEntries);
4878
- }
4879
- if (entrySpan.end > barrierSpan.end) {
4880
- this.insertEntry({
4881
- index: entry.index,
4882
- thickness: entry.thickness,
4883
- span: { start: barrierSpan.end, end: entrySpan.end },
4884
- }, hiddenEntries);
4885
- }
4896
+ componentWillUnmount() {
4897
+ this.triggerCustomRendering(false); // TODO: different API for removal?
4886
4898
  }
4887
- insertEntryAt(entry, insertion) {
4888
- let { entriesByLevel, levelCoords } = this;
4889
- if (insertion.lateral === -1) {
4890
- // create a new level
4891
- insertAt(levelCoords, insertion.level, insertion.levelCoord);
4892
- insertAt(entriesByLevel, insertion.level, [entry]);
4893
- }
4894
- else {
4895
- // insert into existing level
4896
- insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
4899
+ triggerCustomRendering(isActive) {
4900
+ var _a;
4901
+ const { props, context } = this;
4902
+ const { handleCustomRendering, customRenderingMetaMap } = context.options;
4903
+ if (handleCustomRendering) {
4904
+ const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
4905
+ if (generatorMeta) {
4906
+ handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
4907
+ generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) }));
4908
+ }
4897
4909
  }
4898
- this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
4899
4910
  }
4900
- /*
4901
- does not care about limits
4902
- */
4903
- findInsertion(newEntry) {
4904
- let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this;
4905
- let levelCnt = levelCoords.length;
4906
- let candidateCoord = 0;
4907
- let touchingLevel = -1;
4908
- let touchingLateral = -1;
4909
- let touchingEntry = null;
4910
- let stackCnt = 0;
4911
- for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
4912
- const trackingCoord = levelCoords[trackingLevel];
4913
- // if the current level is past the placed entry, we have found a good empty space and can stop.
4914
- // if strictOrder, keep finding more lateral intersections.
4915
- if (!strictOrder && trackingCoord >= candidateCoord + this.getEntryThickness(newEntry)) {
4916
- break;
4917
- }
4918
- let trackingEntries = entriesByLevel[trackingLevel];
4919
- let trackingEntry;
4920
- let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
4921
- let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
4922
- while ( // loop through entries that horizontally intersect
4923
- (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
4924
- trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
4925
- ) {
4926
- let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry);
4927
- // intersects into the top of the candidate?
4928
- if (trackingEntryBottom > candidateCoord) {
4929
- candidateCoord = trackingEntryBottom;
4930
- touchingEntry = trackingEntry;
4931
- touchingLevel = trackingLevel;
4932
- touchingLateral = lateralIndex;
4933
- }
4934
- // butts up against top of candidate? (will happen if just intersected as well)
4935
- if (trackingEntryBottom === candidateCoord) {
4936
- // accumulate the highest possible stackCnt of the trackingEntries that butt up
4937
- stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
4938
- }
4939
- lateralIndex += 1;
4940
- }
4941
- }
4942
- // the destination level will be after touchingEntry's level. find it
4943
- let destLevel = 0;
4944
- if (touchingEntry) {
4945
- destLevel = touchingLevel + 1;
4946
- while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
4947
- destLevel += 1;
4948
- }
4949
- }
4950
- // if adding to an existing level, find where to insert
4951
- let destLateral = -1;
4952
- if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
4953
- destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
4954
- }
4955
- return {
4956
- touchingLevel,
4957
- touchingLateral,
4958
- touchingEntry,
4959
- stackCnt,
4960
- levelCoord: candidateCoord,
4961
- level: destLevel,
4962
- lateral: destLateral,
4963
- };
4964
- }
4965
- // sorted by levelCoord (lowest to highest)
4966
- toRects() {
4967
- let { entriesByLevel, levelCoords } = this;
4968
- let levelCnt = entriesByLevel.length;
4969
- let rects = [];
4970
- for (let level = 0; level < levelCnt; level += 1) {
4971
- let entries = entriesByLevel[level];
4972
- let levelCoord = levelCoords[level];
4973
- for (let entry of entries) {
4974
- rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord }));
4911
+ applyQueueudDomNodes() {
4912
+ const { queuedDomNodes, currentDomNodes } = this;
4913
+ const el = this.base;
4914
+ if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
4915
+ currentDomNodes.forEach(removeElement);
4916
+ for (let newNode of queuedDomNodes) {
4917
+ el.appendChild(newNode);
4975
4918
  }
4919
+ this.currentDomNodes = queuedDomNodes;
4976
4920
  }
4977
- return rects;
4978
4921
  }
4979
4922
  }
4980
- function getEntrySpanEnd(entry) {
4981
- return entry.span.end;
4923
+ ContentInjector.addPropsEquality({
4924
+ elClasses: isArraysEqual,
4925
+ elStyle: isPropsEqual,
4926
+ elAttrs: isNonHandlerPropsEqual,
4927
+ renderProps: isPropsEqual,
4928
+ });
4929
+ // Util
4930
+ /*
4931
+ Does UI-framework provide custom way of rendering that does not use Preact VDOM
4932
+ AND does the calendar's options define custom rendering?
4933
+ AKA. Should we NOT render the default content?
4934
+ */
4935
+ function hasCustomRenderingHandler(generatorName, options) {
4936
+ var _a;
4937
+ return Boolean(options.handleCustomRendering &&
4938
+ generatorName &&
4939
+ ((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
4982
4940
  }
4983
- function buildEntryKey(entry) {
4984
- return entry.index + ':' + entry.span.start;
4941
+ function buildElAttrs(props, extraClassNames, elRef) {
4942
+ const attrs = Object.assign(Object.assign({}, props.elAttrs), { ref: elRef });
4943
+ if (props.elClasses || extraClassNames) {
4944
+ attrs.className = (props.elClasses || [])
4945
+ .concat(extraClassNames || [])
4946
+ .concat(attrs.className || [])
4947
+ .filter(Boolean)
4948
+ .join(' ');
4949
+ }
4950
+ if (props.elStyle) {
4951
+ attrs.style = props.elStyle;
4952
+ }
4953
+ return attrs;
4985
4954
  }
4986
- // returns groups with entries sorted by input order
4987
- function groupIntersectingEntries(entries) {
4988
- let merges = [];
4989
- for (let entry of entries) {
4990
- let filteredMerges = [];
4991
- let hungryMerge = {
4992
- span: entry.span,
4993
- entries: [entry],
4955
+ function isTruthy(val) {
4956
+ return Boolean(val);
4957
+ }
4958
+
4959
+ const RenderId = createContext(0);
4960
+
4961
+ class ContentContainer extends b {
4962
+ constructor() {
4963
+ super(...arguments);
4964
+ this.InnerContent = InnerContentInjector.bind(undefined, this);
4965
+ this.handleEl = (el) => {
4966
+ this.el = el;
4967
+ if (this.props.elRef) {
4968
+ setRef(this.props.elRef, el);
4969
+ if (el && this.didMountMisfire) {
4970
+ this.componentDidMount();
4971
+ }
4972
+ }
4994
4973
  };
4995
- for (let merge of merges) {
4996
- if (intersectSpans(merge.span, hungryMerge.span)) {
4997
- hungryMerge = {
4998
- entries: merge.entries.concat(hungryMerge.entries),
4999
- span: joinSpans(merge.span, hungryMerge.span),
5000
- };
4974
+ }
4975
+ render() {
4976
+ const { props } = this;
4977
+ const generatedClassNames = generateClassNames(props.classNameGenerator, props.renderProps);
4978
+ if (props.children) {
4979
+ const elAttrs = buildElAttrs(props, generatedClassNames, this.handleEl);
4980
+ const children = props.children(this.InnerContent, props.renderProps, elAttrs);
4981
+ if (props.elTag) {
4982
+ return _(props.elTag, elAttrs, children);
5001
4983
  }
5002
4984
  else {
5003
- filteredMerges.push(merge);
4985
+ return children;
5004
4986
  }
5005
4987
  }
5006
- filteredMerges.push(hungryMerge);
5007
- merges = filteredMerges;
5008
- }
5009
- return merges;
5010
- }
5011
- function joinSpans(span0, span1) {
5012
- return {
5013
- start: Math.min(span0.start, span1.start),
5014
- end: Math.max(span0.end, span1.end),
5015
- };
5016
- }
5017
- function intersectSpans(span0, span1) {
5018
- let start = Math.max(span0.start, span1.start);
5019
- let end = Math.min(span0.end, span1.end);
5020
- if (start < end) {
5021
- return { start, end };
5022
- }
5023
- return null;
5024
- }
5025
- // general util
5026
- // ---------------------------------------------------------------------------------------------------------------------
5027
- function insertAt(arr, index, item) {
5028
- arr.splice(index, 0, item);
5029
- }
5030
- function binarySearch(a, searchVal, getItemVal) {
5031
- let startIndex = 0;
5032
- let endIndex = a.length; // exclusive
5033
- if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item
5034
- return [0, 0];
5035
- }
5036
- if (searchVal > getItemVal(a[endIndex - 1])) { // after last item
5037
- return [endIndex, 0];
5038
- }
5039
- while (startIndex < endIndex) {
5040
- let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2);
5041
- let middleVal = getItemVal(a[middleIndex]);
5042
- if (searchVal < middleVal) {
5043
- endIndex = middleIndex;
4988
+ else {
4989
+ return _((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, elTag: props.elTag || 'div', elClasses: (props.elClasses || []).concat(generatedClassNames), renderId: this.context }));
5044
4990
  }
5045
- else if (searchVal > middleVal) {
5046
- startIndex = middleIndex + 1;
4991
+ }
4992
+ componentDidMount() {
4993
+ var _a, _b;
4994
+ if (this.el) {
4995
+ (_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5047
4996
  }
5048
- else { // equal!
5049
- return [middleIndex, 1];
4997
+ else {
4998
+ this.didMountMisfire = true;
5050
4999
  }
5051
5000
  }
5052
- return [startIndex, 0];
5053
- }
5054
-
5055
- class Interaction {
5056
- constructor(settings) {
5057
- this.component = settings.component;
5058
- this.isHitComboAllowed = settings.isHitComboAllowed || null;
5059
- }
5060
- destroy() {
5001
+ componentWillUnmount() {
5002
+ var _a, _b;
5003
+ (_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5061
5004
  }
5062
5005
  }
5063
- function parseInteractionSettings(component, input) {
5064
- return {
5065
- component,
5066
- el: input.el,
5067
- useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,
5068
- isHitComboAllowed: input.isHitComboAllowed || null,
5069
- };
5006
+ ContentContainer.contextType = RenderId;
5007
+ function InnerContentInjector(containerComponent, props) {
5008
+ const parentProps = containerComponent.props;
5009
+ return _((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
5070
5010
  }
5071
- function interactionSettingsToStore(settings) {
5072
- return {
5073
- [settings.component.uid]: settings,
5074
- };
5011
+ // Utils
5012
+ function generateClassNames(classNameGenerator, renderProps) {
5013
+ const classNames = typeof classNameGenerator === 'function' ?
5014
+ classNameGenerator(renderProps) :
5015
+ classNameGenerator || [];
5016
+ return typeof classNames === 'string' ? [classNames] : classNames;
5075
5017
  }
5076
- // global state
5077
- const interactionSettingsStore = {};
5078
-
5079
- /*
5080
- An abstraction for a dragging interaction originating on an event.
5081
- Does higher-level things than PointerDragger, such as possibly:
5082
- - a "mirror" that moves with the pointer
5083
- - a minimum number of pixels or other criteria for a true drag to begin
5084
5018
 
5085
- subclasses must emit:
5086
- - pointerdown
5087
- - dragstart
5088
- - dragmove
5089
- - pointerup
5090
- - dragend
5091
- */
5092
- class ElementDragging {
5093
- constructor(el, selector) {
5094
- this.emitter = new Emitter();
5095
- }
5096
- destroy() {
5097
- }
5098
- setMirrorIsVisible(bool) {
5099
- // optional if subclass doesn't want to support a mirror
5100
- }
5101
- setMirrorNeedsRevert(bool) {
5102
- // optional if subclass doesn't want to support a mirror
5019
+ const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
5020
+ class DayCellContainer extends BaseComponent {
5021
+ constructor() {
5022
+ super(...arguments);
5023
+ this.refineRenderProps = memoizeObjArg(refineRenderProps);
5103
5024
  }
5104
- setAutoScrollEnabled(bool) {
5105
- // optional
5025
+ render() {
5026
+ let { props, context } = this;
5027
+ let { options } = context;
5028
+ let renderProps = this.refineRenderProps({
5029
+ date: props.date,
5030
+ dateProfile: props.dateProfile,
5031
+ todayRange: props.todayRange,
5032
+ isMonthStart: props.isMonthStart || false,
5033
+ showDayNumber: props.showDayNumber,
5034
+ extraRenderProps: props.extraRenderProps,
5035
+ viewApi: context.viewApi,
5036
+ dateEnv: context.dateEnv,
5037
+ monthStartFormat: options.monthStartFormat,
5038
+ });
5039
+ return (_(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
5040
+ ...getDayClassNames(renderProps, context.theme),
5041
+ ...(props.elClasses || []),
5042
+ ], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
5043
+ // don't use custom classNames if disabled
5044
+ renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
5106
5045
  }
5107
5046
  }
5108
-
5109
- // TODO: get rid of this in favor of options system,
5110
- // tho it's really easy to access this globally rather than pass thru options.
5111
- const config = {};
5112
-
5113
- /*
5114
- Information about what will happen when an external element is dragged-and-dropped
5115
- onto a calendar. Contains information for creating an event.
5116
- */
5117
- const DRAG_META_REFINERS = {
5118
- startTime: createDuration,
5119
- duration: createDuration,
5120
- create: Boolean,
5121
- sourceId: String,
5122
- };
5123
- function parseDragMeta(raw) {
5124
- let { refined, extra } = refineProps(raw, DRAG_META_REFINERS);
5125
- return {
5126
- startTime: refined.startTime || null,
5127
- duration: refined.duration || null,
5128
- create: refined.create != null ? refined.create : true,
5129
- sourceId: refined.sourceId,
5130
- leftoverProps: extra,
5131
- };
5047
+ function hasCustomDayCellContent(options) {
5048
+ return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
5049
+ }
5050
+ function refineRenderProps(raw) {
5051
+ let { date, dateEnv, dateProfile, isMonthStart } = raw;
5052
+ let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
5053
+ let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
5054
+ return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
5055
+ dayNumberText }), raw.extraRenderProps);
5132
5056
  }
5133
5057
 
5134
- class CalendarRoot extends BaseComponent {
5058
+ const PADDING_FROM_VIEWPORT = 10;
5059
+ class Popover extends BaseComponent {
5135
5060
  constructor() {
5136
5061
  super(...arguments);
5137
5062
  this.state = {
5138
- forPrint: false,
5063
+ titleId: getUniqueDomId(),
5139
5064
  };
5140
- this.handleBeforePrint = () => {
5141
- flushSync(() => {
5142
- this.setState({ forPrint: true });
5143
- });
5065
+ this.handleRootEl = (el) => {
5066
+ this.rootEl = el;
5067
+ if (this.props.elRef) {
5068
+ setRef(this.props.elRef, el);
5069
+ }
5144
5070
  };
5145
- this.handleAfterPrint = () => {
5146
- flushSync(() => {
5147
- this.setState({ forPrint: false });
5148
- });
5071
+ // Triggered when the user clicks *anywhere* in the document, for the autoHide feature
5072
+ this.handleDocumentMouseDown = (ev) => {
5073
+ // only hide the popover if the click happened outside the popover
5074
+ const target = getEventTargetViaRoot(ev);
5075
+ if (!this.rootEl.contains(target)) {
5076
+ this.handleCloseClick();
5077
+ }
5078
+ };
5079
+ this.handleDocumentKeyDown = (ev) => {
5080
+ if (ev.key === 'Escape') {
5081
+ this.handleCloseClick();
5082
+ }
5083
+ };
5084
+ this.handleCloseClick = () => {
5085
+ let { onClose } = this.props;
5086
+ if (onClose) {
5087
+ onClose();
5088
+ }
5149
5089
  };
5150
5090
  }
5151
5091
  render() {
5152
- let { props } = this;
5153
- let { options } = props;
5154
- let { forPrint } = this.state;
5155
- let isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto';
5156
- let height = (!isHeightAuto && options.height != null) ? options.height : '';
5092
+ let { theme, options } = this.context;
5093
+ let { props, state } = this;
5157
5094
  let classNames = [
5158
- 'fc',
5159
- forPrint ? 'fc-media-print' : 'fc-media-screen',
5160
- `fc-direction-${options.direction}`,
5161
- props.theme.getClass('root'),
5162
- ];
5163
- if (!getCanVGrowWithinCell()) {
5164
- classNames.push('fc-liquid-hack');
5165
- }
5166
- return props.children(classNames, height, isHeightAuto, forPrint);
5095
+ 'fc-popover',
5096
+ theme.getClass('popover'),
5097
+ ].concat(props.extraClassNames || []);
5098
+ return j(_("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
5099
+ _("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
5100
+ _("span", { className: "fc-popover-title", id: state.titleId }, props.title),
5101
+ _("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
5102
+ _("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
5167
5103
  }
5168
5104
  componentDidMount() {
5169
- let { emitter } = this.props;
5170
- emitter.on('_beforeprint', this.handleBeforePrint);
5171
- emitter.on('_afterprint', this.handleAfterPrint);
5105
+ document.addEventListener('mousedown', this.handleDocumentMouseDown);
5106
+ document.addEventListener('keydown', this.handleDocumentKeyDown);
5107
+ this.updateSize();
5172
5108
  }
5173
5109
  componentWillUnmount() {
5174
- let { emitter } = this.props;
5175
- emitter.off('_beforeprint', this.handleBeforePrint);
5176
- emitter.off('_afterprint', this.handleAfterPrint);
5110
+ document.removeEventListener('mousedown', this.handleDocumentMouseDown);
5111
+ document.removeEventListener('keydown', this.handleDocumentKeyDown);
5112
+ }
5113
+ updateSize() {
5114
+ let { isRtl } = this.context;
5115
+ let { alignmentEl, alignGridTop } = this.props;
5116
+ let { rootEl } = this;
5117
+ let alignmentRect = computeClippedClientRect(alignmentEl);
5118
+ if (alignmentRect) {
5119
+ let popoverDims = rootEl.getBoundingClientRect();
5120
+ if (alignGridTop) {
5121
+ throw new Error('alignGridTop not supported yet');
5122
+ }
5123
+ // position relative to viewport
5124
+ let popoverTop = alignGridTop
5125
+ ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top // BAD!!!
5126
+ : alignmentRect.top;
5127
+ let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
5128
+ // constrain
5129
+ popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
5130
+ popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
5131
+ popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
5132
+ let origin = rootEl.offsetParent.getBoundingClientRect();
5133
+ applyStyle(rootEl, {
5134
+ top: popoverTop - origin.top,
5135
+ left: popoverLeft - origin.left,
5136
+ });
5137
+ }
5177
5138
  }
5178
5139
  }
5179
5140
 
5180
- // Computes a default column header formatting string if `colFormat` is not explicitly defined
5181
- function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {
5182
- // if more than one week row, or if there are a lot of columns with not much space,
5183
- // put just the day numbers will be in each cell
5184
- if (!datesRepDistinctDays || dayCnt > 10) {
5185
- return createFormatter({ weekday: 'short' }); // "Sat"
5141
+ class MorePopover extends DateComponent {
5142
+ constructor() {
5143
+ super(...arguments);
5144
+ this.handleRootEl = (rootEl) => {
5145
+ this.rootEl = rootEl;
5146
+ if (rootEl) {
5147
+ this.context.registerInteractiveComponent(this, {
5148
+ el: rootEl,
5149
+ useEventCenter: false,
5150
+ });
5151
+ }
5152
+ else {
5153
+ this.context.unregisterInteractiveComponent(this);
5154
+ }
5155
+ };
5186
5156
  }
5187
- if (dayCnt > 1) {
5188
- return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }); // "Sat 11/12"
5157
+ render() {
5158
+ let { options, dateEnv } = this.context;
5159
+ let { props } = this;
5160
+ let { startDate, todayRange, dateProfile } = props;
5161
+ let title = dateEnv.format(startDate, options.dayPopoverFormat);
5162
+ return (_(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, elAttrs) => (_(Popover, { elRef: elAttrs.ref, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(elAttrs.className || []), extraAttrs: elAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
5163
+ hasCustomDayCellContent(options) && (_(InnerContent, { elTag: "div", elClasses: ['fc-more-popover-misc'] })),
5164
+ props.children))));
5165
+ }
5166
+ queryHit(positionLeft, positionTop, elWidth, elHeight) {
5167
+ let { rootEl, props } = this;
5168
+ if (positionLeft >= 0 && positionLeft < elWidth &&
5169
+ positionTop >= 0 && positionTop < elHeight) {
5170
+ return {
5171
+ dateProfile: props.dateProfile,
5172
+ dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
5173
+ start: props.startDate,
5174
+ end: props.endDate,
5175
+ } }, props.extraDateSpan),
5176
+ dayEl: rootEl,
5177
+ rect: {
5178
+ left: 0,
5179
+ top: 0,
5180
+ right: elWidth,
5181
+ bottom: elHeight,
5182
+ },
5183
+ layer: 1, // important when comparing with hits from other components
5184
+ };
5185
+ }
5186
+ return null;
5189
5187
  }
5190
- return createFormatter({ weekday: 'long' }); // "Saturday"
5191
- }
5192
-
5193
- const CLASS_NAME = 'fc-col-header-cell'; // do the cushion too? no
5194
- function renderInner$1(renderProps) {
5195
- return renderProps.text;
5196
5188
  }
5197
5189
 
5198
- class ContentInjector extends BaseComponent {
5190
+ class MoreLinkContainer extends BaseComponent {
5199
5191
  constructor() {
5200
5192
  super(...arguments);
5201
- this.id = guid();
5202
- this.queuedDomNodes = [];
5203
- this.currentDomNodes = [];
5204
- this.handleEl = (el) => {
5205
- const { options } = this.context;
5206
- const { generatorName } = this.props;
5207
- if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
5208
- this.updateElRef(el);
5209
- }
5193
+ this.state = {
5194
+ isPopoverOpen: false,
5195
+ popoverId: getUniqueDomId(),
5210
5196
  };
5211
- this.updateElRef = (el) => {
5197
+ this.handleLinkEl = (linkEl) => {
5198
+ this.linkEl = linkEl;
5212
5199
  if (this.props.elRef) {
5213
- setRef(this.props.elRef, el);
5200
+ setRef(this.props.elRef, linkEl);
5201
+ }
5202
+ };
5203
+ this.handleClick = (ev) => {
5204
+ let { props, context } = this;
5205
+ let { moreLinkClick } = context.options;
5206
+ let date = computeRange(props).start;
5207
+ function buildPublicSeg(seg) {
5208
+ let { def, instance, range } = seg.eventRange;
5209
+ return {
5210
+ event: new EventImpl(context, def, instance),
5211
+ start: context.dateEnv.toDate(range.start),
5212
+ end: context.dateEnv.toDate(range.end),
5213
+ isStart: seg.isStart,
5214
+ isEnd: seg.isEnd,
5215
+ };
5216
+ }
5217
+ if (typeof moreLinkClick === 'function') {
5218
+ moreLinkClick = moreLinkClick({
5219
+ date,
5220
+ allDay: Boolean(props.allDayDate),
5221
+ allSegs: props.segs.map(buildPublicSeg),
5222
+ hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
5223
+ jsEvent: ev,
5224
+ view: context.viewApi,
5225
+ });
5226
+ }
5227
+ if (!moreLinkClick || moreLinkClick === 'popover') {
5228
+ this.setState({ isPopoverOpen: true });
5229
+ }
5230
+ else if (typeof moreLinkClick === 'string') { // a view name
5231
+ context.calendarApi.zoomTo(date, moreLinkClick);
5214
5232
  }
5215
5233
  };
5234
+ this.handlePopoverClose = () => {
5235
+ this.setState({ isPopoverOpen: false });
5236
+ };
5216
5237
  }
5217
5238
  render() {
5218
- const { props, context } = this;
5219
- const { options } = context;
5220
- const { customGenerator, defaultGenerator, renderProps } = props;
5221
- const attrs = buildElAttrs(props, [], this.handleEl);
5222
- let useDefault = false;
5223
- let innerContent;
5224
- let queuedDomNodes = [];
5225
- let currentGeneratorMeta;
5226
- if (customGenerator != null) {
5227
- const customGeneratorRes = typeof customGenerator === 'function' ?
5228
- customGenerator(renderProps, y) :
5229
- customGenerator;
5230
- if (customGeneratorRes === true) {
5231
- useDefault = true;
5239
+ let { props, state } = this;
5240
+ return (_(ViewContextType.Consumer, null, (context) => {
5241
+ let { viewApi, options, calendarApi } = context;
5242
+ let { moreLinkText } = options;
5243
+ let moreCnt = props.hiddenSegs.length;
5244
+ let range = computeRange(props);
5245
+ let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
5246
+ ? moreLinkText.call(calendarApi, moreCnt)
5247
+ : `+${moreCnt} ${moreLinkText}`;
5248
+ let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
5249
+ let renderProps = {
5250
+ num: moreCnt,
5251
+ shortText: `+${moreCnt}`,
5252
+ text,
5253
+ view: viewApi,
5254
+ };
5255
+ return (_(k$1, null,
5256
+ Boolean(moreCnt) && (_(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
5257
+ ...(props.elClasses || []),
5258
+ 'fc-more-link',
5259
+ ], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
5260
+ state.isPopoverOpen && (_(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
5261
+ props.alignmentElRef.current :
5262
+ this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
5263
+ }));
5264
+ }
5265
+ componentDidMount() {
5266
+ this.updateParentEl();
5267
+ }
5268
+ componentDidUpdate() {
5269
+ this.updateParentEl();
5270
+ }
5271
+ updateParentEl() {
5272
+ if (this.linkEl) {
5273
+ this.parentEl = elementClosest(this.linkEl, '.fc-view-harness'); // HACK. reconsider
5274
+ }
5275
+ }
5276
+ }
5277
+ function renderMoreLinkInner(props) {
5278
+ return props.text;
5279
+ }
5280
+ function computeRange(props) {
5281
+ if (props.allDayDate) {
5282
+ return {
5283
+ start: props.allDayDate,
5284
+ end: addDays(props.allDayDate, 1),
5285
+ };
5286
+ }
5287
+ return {
5288
+ start: computeEarliestSegStart(props.hiddenSegs),
5289
+ end: computeLatestSegEnd(props.hiddenSegs),
5290
+ };
5291
+ }
5292
+ function computeEarliestSegStart(segs) {
5293
+ return segs.reduce(pickEarliestStart).eventRange.range.start;
5294
+ }
5295
+ function pickEarliestStart(seg0, seg1) {
5296
+ return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
5297
+ }
5298
+ function computeLatestSegEnd(segs) {
5299
+ return segs.reduce(pickLatestEnd).eventRange.range.end;
5300
+ }
5301
+ function pickLatestEnd(seg0, seg1) {
5302
+ return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
5303
+ }
5304
+
5305
+ class SegHierarchy {
5306
+ constructor(getEntryThickness = (entry) => {
5307
+ // if no thickness known, assume 1 (if 0, so small it always fits)
5308
+ return entry.thickness;
5309
+ }) {
5310
+ this.getEntryThickness = getEntryThickness;
5311
+ // settings
5312
+ this.strictOrder = false;
5313
+ this.allowReslicing = false;
5314
+ this.maxCoord = -1; // -1 means no max
5315
+ this.maxStackCnt = -1; // -1 means no max
5316
+ this.levelCoords = []; // ordered
5317
+ this.entriesByLevel = []; // parallel with levelCoords
5318
+ this.stackCnts = {}; // TODO: use better technique!?
5319
+ }
5320
+ addSegs(inputs) {
5321
+ let hiddenEntries = [];
5322
+ for (let input of inputs) {
5323
+ this.insertEntry(input, hiddenEntries);
5324
+ }
5325
+ return hiddenEntries;
5326
+ }
5327
+ insertEntry(entry, hiddenEntries) {
5328
+ let entryThickness = this.getEntryThickness(entry);
5329
+ if (entryThickness == null) {
5330
+ hiddenEntries.push(entry);
5331
+ }
5332
+ else {
5333
+ let insertion = this.findInsertion(entry, entryThickness);
5334
+ if (this.isInsertionValid(insertion, entry, entryThickness)) {
5335
+ this.insertEntryAt(entry, insertion);
5232
5336
  }
5233
5337
  else {
5234
- const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null
5235
- if (isObject && ('html' in customGeneratorRes)) {
5236
- attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
5237
- }
5238
- else if (isObject && ('domNodes' in customGeneratorRes)) {
5239
- queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
5240
- }
5241
- else if (isObject
5242
- ? i$1(customGeneratorRes) // vdom node
5243
- : typeof customGeneratorRes !== 'function' // primitive value (like string or number)
5244
- ) {
5245
- // use in vdom
5246
- innerContent = customGeneratorRes;
5247
- }
5248
- else {
5249
- // an exotic object for handleCustomRendering
5250
- currentGeneratorMeta = customGeneratorRes;
5251
- }
5338
+ this.handleInvalidInsertion(insertion, entry, hiddenEntries);
5252
5339
  }
5253
5340
  }
5254
- else {
5255
- useDefault = !hasCustomRenderingHandler(props.generatorName, options);
5341
+ }
5342
+ isInsertionValid(insertion, entry, entryThickness) {
5343
+ return (this.maxCoord === -1 || insertion.levelCoord + entryThickness <= this.maxCoord) &&
5344
+ (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
5345
+ }
5346
+ handleInvalidInsertion(insertion, entry, hiddenEntries) {
5347
+ if (this.allowReslicing && insertion.touchingEntry) {
5348
+ const hiddenEntry = Object.assign(Object.assign({}, entry), { span: intersectSpans(entry.span, insertion.touchingEntry.span) });
5349
+ hiddenEntries.push(hiddenEntry);
5350
+ this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
5256
5351
  }
5257
- if (useDefault && defaultGenerator) {
5258
- innerContent = defaultGenerator(renderProps);
5352
+ else {
5353
+ hiddenEntries.push(entry);
5259
5354
  }
5260
- this.queuedDomNodes = queuedDomNodes;
5261
- this.currentGeneratorMeta = currentGeneratorMeta;
5262
- return y(props.elTag, attrs, innerContent);
5263
5355
  }
5264
- componentDidMount() {
5265
- this.applyQueueudDomNodes();
5266
- this.triggerCustomRendering(true);
5267
- }
5268
- componentDidUpdate() {
5269
- this.applyQueueudDomNodes();
5270
- this.triggerCustomRendering(true);
5356
+ /*
5357
+ Does NOT add what hit the `barrier` into hiddenEntries. Should already be done.
5358
+ */
5359
+ splitEntry(entry, barrier, hiddenEntries) {
5360
+ let entrySpan = entry.span;
5361
+ let barrierSpan = barrier.span;
5362
+ if (entrySpan.start < barrierSpan.start) {
5363
+ this.insertEntry({
5364
+ index: entry.index,
5365
+ seg: entry.seg,
5366
+ thickness: entry.thickness,
5367
+ span: { start: entrySpan.start, end: barrierSpan.start },
5368
+ }, hiddenEntries);
5369
+ }
5370
+ if (entrySpan.end > barrierSpan.end) {
5371
+ this.insertEntry({
5372
+ index: entry.index,
5373
+ seg: entry.seg,
5374
+ thickness: entry.thickness,
5375
+ span: { start: barrierSpan.end, end: entrySpan.end },
5376
+ }, hiddenEntries);
5377
+ }
5271
5378
  }
5272
- componentWillUnmount() {
5273
- this.triggerCustomRendering(false); // TODO: different API for removal?
5379
+ insertEntryAt(entry, insertion) {
5380
+ let { entriesByLevel, levelCoords } = this;
5381
+ if (insertion.lateral === -1) {
5382
+ // create a new level
5383
+ insertAt(levelCoords, insertion.level, insertion.levelCoord);
5384
+ insertAt(entriesByLevel, insertion.level, [entry]);
5385
+ }
5386
+ else {
5387
+ // insert into existing level
5388
+ insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
5389
+ }
5390
+ this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
5274
5391
  }
5275
- triggerCustomRendering(isActive) {
5276
- var _a;
5277
- const { props, context } = this;
5278
- const { handleCustomRendering, customRenderingMetaMap } = context.options;
5279
- if (handleCustomRendering) {
5280
- const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
5281
- if (generatorMeta) {
5282
- handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
5283
- generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) }));
5392
+ /*
5393
+ does not care about limits
5394
+ */
5395
+ findInsertion(newEntry, newEntryThickness) {
5396
+ let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this;
5397
+ let levelCnt = levelCoords.length;
5398
+ let candidateCoord = 0;
5399
+ let touchingLevel = -1;
5400
+ let touchingLateral = -1;
5401
+ let touchingEntry = null;
5402
+ let stackCnt = 0;
5403
+ for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
5404
+ const trackingCoord = levelCoords[trackingLevel];
5405
+ // if the current level is past the placed entry, we have found a good empty space and can stop.
5406
+ // if strictOrder, keep finding more lateral intersections.
5407
+ if (!strictOrder && trackingCoord >= candidateCoord + newEntryThickness) {
5408
+ break;
5409
+ }
5410
+ let trackingEntries = entriesByLevel[trackingLevel];
5411
+ let trackingEntry;
5412
+ let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
5413
+ let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
5414
+ while ( // loop through entries that horizontally intersect
5415
+ (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
5416
+ trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
5417
+ ) {
5418
+ let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry);
5419
+ // intersects into the top of the candidate?
5420
+ if (trackingEntryBottom > candidateCoord) {
5421
+ candidateCoord = trackingEntryBottom;
5422
+ touchingEntry = trackingEntry;
5423
+ touchingLevel = trackingLevel;
5424
+ touchingLateral = lateralIndex;
5425
+ }
5426
+ // butts up against top of candidate? (will happen if just intersected as well)
5427
+ if (trackingEntryBottom === candidateCoord) {
5428
+ // accumulate the highest possible stackCnt of the trackingEntries that butt up
5429
+ stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
5430
+ }
5431
+ lateralIndex += 1;
5284
5432
  }
5285
5433
  }
5286
- }
5287
- applyQueueudDomNodes() {
5288
- const { queuedDomNodes, currentDomNodes } = this;
5289
- const el = this.base;
5290
- if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
5291
- currentDomNodes.forEach(removeElement);
5292
- for (let newNode of queuedDomNodes) {
5293
- el.appendChild(newNode);
5434
+ // the destination level will be after touchingEntry's level. find it
5435
+ let destLevel = 0;
5436
+ if (touchingEntry) {
5437
+ destLevel = touchingLevel + 1;
5438
+ while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
5439
+ destLevel += 1;
5440
+ }
5441
+ }
5442
+ // if adding to an existing level, find where to insert
5443
+ let destLateral = -1;
5444
+ if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
5445
+ destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
5446
+ }
5447
+ return {
5448
+ touchingLevel,
5449
+ touchingLateral,
5450
+ touchingEntry,
5451
+ stackCnt,
5452
+ levelCoord: candidateCoord,
5453
+ level: destLevel,
5454
+ lateral: destLateral,
5455
+ };
5456
+ }
5457
+ // sorted by levelCoord (lowest to highest)
5458
+ toRects() {
5459
+ let { entriesByLevel, levelCoords } = this;
5460
+ let levelCnt = entriesByLevel.length;
5461
+ let rects = [];
5462
+ for (let level = 0; level < levelCnt; level += 1) {
5463
+ let entries = entriesByLevel[level];
5464
+ let levelCoord = levelCoords[level];
5465
+ for (let entry of entries) {
5466
+ rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord }));
5294
5467
  }
5295
- this.currentDomNodes = queuedDomNodes;
5296
5468
  }
5469
+ return rects;
5297
5470
  }
5298
5471
  }
5299
- ContentInjector.addPropsEquality({
5300
- elClasses: isArraysEqual,
5301
- elStyle: isPropsEqual,
5302
- elAttrs: isNonHandlerPropsEqual,
5303
- renderProps: isPropsEqual,
5304
- });
5305
- // Util
5472
+ function getEntrySpanEnd(entry) {
5473
+ return entry.span.end;
5474
+ }
5306
5475
  /*
5307
- Does UI-framework provide custom way of rendering that does not use Preact VDOM
5308
- AND does the calendar's options define custom rendering?
5309
- AKA. Should we NOT render the default content?
5476
+ Generates a unique ID whose lifespan is a single run of SegHierarchy, so can be really specific
5477
+ without fear of accidentally busting the cache on subsequent rerenders
5310
5478
  */
5311
- function hasCustomRenderingHandler(generatorName, options) {
5312
- var _a;
5313
- return Boolean(options.handleCustomRendering &&
5314
- generatorName &&
5315
- ((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
5316
- }
5317
- function buildElAttrs(props, extraClassNames, elRef) {
5318
- const attrs = Object.assign(Object.assign({}, props.elAttrs), { ref: elRef });
5319
- if (props.elClasses || extraClassNames) {
5320
- attrs.className = (props.elClasses || [])
5321
- .concat(extraClassNames || [])
5322
- .concat(attrs.className || [])
5323
- .filter(Boolean)
5324
- .join(' ');
5325
- }
5326
- if (props.elStyle) {
5327
- attrs.style = props.elStyle;
5328
- }
5329
- return attrs;
5330
- }
5331
- function isTruthy(val) {
5332
- return Boolean(val);
5479
+ function buildEntryKey(entry) {
5480
+ return entry.index + ':' + entry.span.start;
5333
5481
  }
5334
-
5335
- const RenderId = createContext(0);
5336
-
5337
- class ContentContainer extends x$1 {
5338
- constructor() {
5339
- super(...arguments);
5340
- this.InnerContent = InnerContentInjector.bind(undefined, this);
5341
- this.handleEl = (el) => {
5342
- this.el = el;
5343
- if (this.props.elRef) {
5344
- setRef(this.props.elRef, el);
5345
- if (el && this.didMountMisfire) {
5346
- this.componentDidMount();
5347
- }
5348
- }
5482
+ /*
5483
+ returns groups with entries sorted by input order
5484
+ */
5485
+ function groupIntersectingEntries(entries) {
5486
+ let merges = [];
5487
+ for (let entry of entries) {
5488
+ let filteredMerges = [];
5489
+ let hungryMerge = {
5490
+ span: entry.span,
5491
+ entries: [entry],
5349
5492
  };
5350
- }
5351
- render() {
5352
- const { props } = this;
5353
- const generatedClassNames = generateClassNames(props.classNameGenerator, props.renderProps);
5354
- if (props.children) {
5355
- const elAttrs = buildElAttrs(props, generatedClassNames, this.handleEl);
5356
- const children = props.children(this.InnerContent, props.renderProps, elAttrs);
5357
- if (props.elTag) {
5358
- return y(props.elTag, elAttrs, children);
5493
+ for (let merge of merges) {
5494
+ if (intersectSpans(merge.span, hungryMerge.span)) {
5495
+ hungryMerge = {
5496
+ span: joinSpans(merge.span, hungryMerge.span),
5497
+ entries: merge.entries.concat(hungryMerge.entries), // keep preexisting merge's items first. maintains order
5498
+ };
5359
5499
  }
5360
5500
  else {
5361
- return children;
5501
+ filteredMerges.push(merge);
5362
5502
  }
5363
5503
  }
5364
- else {
5365
- return y((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, elTag: props.elTag || 'div', elClasses: (props.elClasses || []).concat(generatedClassNames), renderId: this.context }));
5366
- }
5367
- }
5368
- componentDidMount() {
5369
- var _a, _b;
5370
- if (this.el) {
5371
- (_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5372
- }
5373
- else {
5374
- this.didMountMisfire = true;
5375
- }
5376
- }
5377
- componentWillUnmount() {
5378
- var _a, _b;
5379
- (_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5504
+ filteredMerges.push(hungryMerge);
5505
+ merges = filteredMerges;
5380
5506
  }
5507
+ return merges.map((merge) => {
5508
+ const segs = merge.entries.map(extractEntrySeg);
5509
+ return {
5510
+ key: buildIsoString(computeEarliestSegStart(segs)),
5511
+ span: merge.span,
5512
+ segs,
5513
+ };
5514
+ });
5381
5515
  }
5382
- ContentContainer.contextType = RenderId;
5383
- function InnerContentInjector(containerComponent, props) {
5384
- const parentProps = containerComponent.props;
5385
- return y((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
5516
+ function extractEntrySeg(entry) {
5517
+ return entry.seg;
5386
5518
  }
5387
- // Utils
5388
- function generateClassNames(classNameGenerator, renderProps) {
5389
- const classNames = typeof classNameGenerator === 'function' ?
5390
- classNameGenerator(renderProps) :
5391
- classNameGenerator || [];
5392
- return typeof classNames === 'string' ? [classNames] : classNames;
5519
+ function joinSpans(span0, span1) {
5520
+ return {
5521
+ start: Math.min(span0.start, span1.start),
5522
+ end: Math.max(span0.end, span1.end),
5523
+ };
5393
5524
  }
5394
-
5395
- // BAD name for this class now. used in the Header
5396
- class TableDateCell extends BaseComponent {
5397
- render() {
5398
- let { dateEnv, options, theme, viewApi } = this.context;
5399
- let { props } = this;
5400
- let { date, dateProfile } = props;
5401
- let dayMeta = getDateMeta(date, props.todayRange, null, dateProfile);
5402
- let classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme));
5403
- let text = dateEnv.format(date, props.dayHeaderFormat);
5404
- // if colCnt is 1, we are already in a day-view and don't need a navlink
5405
- let navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1)
5406
- ? buildNavLinkAttrs(this.context, date)
5407
- : {};
5408
- let renderProps = Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraRenderProps), { text }), dayMeta);
5409
- return (y(ContentContainer, { elTag: "th", elClasses: classNames, elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan, 'data-date': !dayMeta.isDisabled ? formatDayString(date) : undefined }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContainer) => (y("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && (y(InnerContainer, { elTag: "a", elAttrs: navLinkAttrs, elClasses: [
5410
- 'fc-col-header-cell-cushion',
5411
- props.isSticky && 'fc-sticky',
5412
- ] }))))));
5413
- }
5414
- }
5415
-
5416
- const WEEKDAY_FORMAT = createFormatter({ weekday: 'long' });
5417
- class TableDowCell extends BaseComponent {
5418
- render() {
5419
- let { props } = this;
5420
- let { dateEnv, theme, viewApi, options } = this.context;
5421
- let date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT
5422
- let dateMeta = {
5423
- dow: props.dow,
5424
- isDisabled: false,
5425
- isFuture: false,
5426
- isPast: false,
5427
- isToday: false,
5428
- isOther: false,
5429
- };
5430
- let text = dateEnv.format(date, props.dayHeaderFormat);
5431
- let renderProps = Object.assign(Object.assign(Object.assign(Object.assign({ // TODO: make this public?
5432
- date }, dateMeta), { view: viewApi }), props.extraRenderProps), { text });
5433
- return (y(ContentContainer, { elTag: "th", elClasses: [
5434
- CLASS_NAME,
5435
- ...getDayClassNames(dateMeta, theme),
5436
- ...(props.extraClassNames || []),
5437
- ], elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContent) => (y("div", { className: "fc-scrollgrid-sync-inner" },
5438
- y(InnerContent, { elTag: "a", elClasses: [
5439
- 'fc-col-header-cell-cushion',
5440
- props.isSticky && 'fc-sticky',
5441
- ], elAttrs: {
5442
- 'aria-label': dateEnv.format(date, WEEKDAY_FORMAT),
5443
- } })))));
5444
- }
5445
- }
5446
-
5447
- class NowTimer extends x$1 {
5448
- constructor(props, context) {
5449
- super(props, context);
5450
- this.initialNowDate = getNow(context.options.now, context.dateEnv);
5451
- this.initialNowQueriedMs = new Date().valueOf();
5452
- this.state = this.computeTiming().currentState;
5525
+ function intersectSpans(span0, span1) {
5526
+ let start = Math.max(span0.start, span1.start);
5527
+ let end = Math.min(span0.end, span1.end);
5528
+ if (start < end) {
5529
+ return { start, end };
5453
5530
  }
5454
- render() {
5455
- let { props, state } = this;
5456
- return props.children(state.nowDate, state.todayRange);
5531
+ return null;
5532
+ }
5533
+ // general util
5534
+ // ---------------------------------------------------------------------------------------------------------------------
5535
+ function insertAt(arr, index, item) {
5536
+ arr.splice(index, 0, item);
5537
+ }
5538
+ function binarySearch(a, searchVal, getItemVal) {
5539
+ let startIndex = 0;
5540
+ let endIndex = a.length; // exclusive
5541
+ if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item
5542
+ return [0, 0];
5457
5543
  }
5458
- componentDidMount() {
5459
- this.setTimeout();
5544
+ if (searchVal > getItemVal(a[endIndex - 1])) { // after last item
5545
+ return [endIndex, 0];
5460
5546
  }
5461
- componentDidUpdate(prevProps) {
5462
- if (prevProps.unit !== this.props.unit) {
5463
- this.clearTimeout();
5464
- this.setTimeout();
5547
+ while (startIndex < endIndex) {
5548
+ let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2);
5549
+ let middleVal = getItemVal(a[middleIndex]);
5550
+ if (searchVal < middleVal) {
5551
+ endIndex = middleIndex;
5552
+ }
5553
+ else if (searchVal > middleVal) {
5554
+ startIndex = middleIndex + 1;
5555
+ }
5556
+ else { // equal!
5557
+ return [middleIndex, 1];
5465
5558
  }
5466
5559
  }
5467
- componentWillUnmount() {
5468
- this.clearTimeout();
5560
+ return [startIndex, 0];
5561
+ }
5562
+
5563
+ class Interaction {
5564
+ constructor(settings) {
5565
+ this.component = settings.component;
5566
+ this.isHitComboAllowed = settings.isHitComboAllowed || null;
5469
5567
  }
5470
- computeTiming() {
5471
- let { props, context } = this;
5472
- let unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);
5473
- let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);
5474
- let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));
5475
- let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();
5476
- // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)
5477
- // ensure no longer than a day
5478
- waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);
5479
- return {
5480
- currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },
5481
- nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },
5482
- waitMs,
5483
- };
5568
+ destroy() {
5484
5569
  }
5485
- setTimeout() {
5486
- let { nextState, waitMs } = this.computeTiming();
5487
- this.timeoutId = setTimeout(() => {
5488
- this.setState(nextState, () => {
5489
- this.setTimeout();
5490
- });
5491
- }, waitMs);
5570
+ }
5571
+ function parseInteractionSettings(component, input) {
5572
+ return {
5573
+ component,
5574
+ el: input.el,
5575
+ useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,
5576
+ isHitComboAllowed: input.isHitComboAllowed || null,
5577
+ };
5578
+ }
5579
+ function interactionSettingsToStore(settings) {
5580
+ return {
5581
+ [settings.component.uid]: settings,
5582
+ };
5583
+ }
5584
+ // global state
5585
+ const interactionSettingsStore = {};
5586
+
5587
+ /*
5588
+ An abstraction for a dragging interaction originating on an event.
5589
+ Does higher-level things than PointerDragger, such as possibly:
5590
+ - a "mirror" that moves with the pointer
5591
+ - a minimum number of pixels or other criteria for a true drag to begin
5592
+
5593
+ subclasses must emit:
5594
+ - pointerdown
5595
+ - dragstart
5596
+ - dragmove
5597
+ - pointerup
5598
+ - dragend
5599
+ */
5600
+ class ElementDragging {
5601
+ constructor(el, selector) {
5602
+ this.emitter = new Emitter();
5492
5603
  }
5493
- clearTimeout() {
5494
- if (this.timeoutId) {
5495
- clearTimeout(this.timeoutId);
5496
- }
5604
+ destroy() {
5497
5605
  }
5498
- }
5499
- NowTimer.contextType = ViewContextType;
5500
- function buildDayRange(date) {
5501
- let start = startOfDay(date);
5502
- let end = addDays(start, 1);
5503
- return { start, end };
5606
+ setMirrorIsVisible(bool) {
5607
+ // optional if subclass doesn't want to support a mirror
5608
+ }
5609
+ setMirrorNeedsRevert(bool) {
5610
+ // optional if subclass doesn't want to support a mirror
5611
+ }
5612
+ setAutoScrollEnabled(bool) {
5613
+ // optional
5614
+ }
5615
+ }
5616
+
5617
+ // TODO: get rid of this in favor of options system,
5618
+ // tho it's really easy to access this globally rather than pass thru options.
5619
+ const config = {};
5620
+
5621
+ /*
5622
+ Information about what will happen when an external element is dragged-and-dropped
5623
+ onto a calendar. Contains information for creating an event.
5624
+ */
5625
+ const DRAG_META_REFINERS = {
5626
+ startTime: createDuration,
5627
+ duration: createDuration,
5628
+ create: Boolean,
5629
+ sourceId: String,
5630
+ };
5631
+ function parseDragMeta(raw) {
5632
+ let { refined, extra } = refineProps(raw, DRAG_META_REFINERS);
5633
+ return {
5634
+ startTime: refined.startTime || null,
5635
+ duration: refined.duration || null,
5636
+ create: refined.create != null ? refined.create : true,
5637
+ sourceId: refined.sourceId,
5638
+ leftoverProps: extra,
5639
+ };
5504
5640
  }
5505
5641
 
5506
- class DayHeader extends BaseComponent {
5642
+ class CalendarRoot extends BaseComponent {
5507
5643
  constructor() {
5508
5644
  super(...arguments);
5509
- this.createDayHeaderFormatter = memoize(createDayHeaderFormatter);
5645
+ this.state = {
5646
+ forPrint: false,
5647
+ };
5648
+ this.handleBeforePrint = () => {
5649
+ flushSync(() => {
5650
+ this.setState({ forPrint: true });
5651
+ });
5652
+ };
5653
+ this.handleAfterPrint = () => {
5654
+ flushSync(() => {
5655
+ this.setState({ forPrint: false });
5656
+ });
5657
+ };
5510
5658
  }
5511
5659
  render() {
5512
- let { context } = this;
5513
- let { dates, dateProfile, datesRepDistinctDays, renderIntro } = this.props;
5514
- let dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length);
5515
- return (y(NowTimer, { unit: "day" }, (nowDate, todayRange) => (y("tr", { role: "row" },
5516
- renderIntro && renderIntro('day'),
5517
- dates.map((date) => (datesRepDistinctDays ? (y(TableDateCell, { key: date.toISOString(), date: date, dateProfile: dateProfile, todayRange: todayRange, colCnt: dates.length, dayHeaderFormat: dayHeaderFormat })) : (y(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat: dayHeaderFormat }))))))));
5660
+ let { props, state } = this;
5661
+ let { options } = props;
5662
+ let { forPrint } = state;
5663
+ let classNames = [
5664
+ 'fc',
5665
+ forPrint ? 'fc-media-print' : 'fc-media-screen',
5666
+ `fc-direction-${options.direction}`,
5667
+ props.theme.getClass('root'),
5668
+ ];
5669
+ return props.children(classNames, options.height, forPrint);
5670
+ }
5671
+ componentDidMount() {
5672
+ let { emitter } = this.props;
5673
+ emitter.on('_beforeprint', this.handleBeforePrint);
5674
+ emitter.on('_afterprint', this.handleAfterPrint);
5675
+ }
5676
+ componentWillUnmount() {
5677
+ let { emitter } = this.props;
5678
+ emitter.off('_beforeprint', this.handleBeforePrint);
5679
+ emitter.off('_afterprint', this.handleAfterPrint);
5518
5680
  }
5519
- }
5520
- function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) {
5521
- return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt);
5522
5681
  }
5523
5682
 
5524
5683
  class DaySeriesModel {
@@ -5572,86 +5731,413 @@ var FullCalendar = (function (exports) {
5572
5731
  if (dayOffset < 0) {
5573
5732
  return indices[0] - 1;
5574
5733
  }
5575
- if (dayOffset >= indices.length) {
5576
- return indices[indices.length - 1] + 1;
5734
+ if (dayOffset >= indices.length) {
5735
+ return indices[indices.length - 1] + 1;
5736
+ }
5737
+ return indices[dayOffset];
5738
+ }
5739
+ }
5740
+
5741
+ class DayTableModel {
5742
+ constructor(daySeries, breakOnWeeks) {
5743
+ let { dates } = daySeries;
5744
+ let daysPerRow;
5745
+ let firstDay;
5746
+ let rowCnt;
5747
+ if (breakOnWeeks) {
5748
+ // count columns until the day-of-week repeats
5749
+ firstDay = dates[0].getUTCDay();
5750
+ for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) {
5751
+ if (dates[daysPerRow].getUTCDay() === firstDay) {
5752
+ break;
5753
+ }
5754
+ }
5755
+ rowCnt = Math.ceil(dates.length / daysPerRow);
5756
+ }
5757
+ else {
5758
+ rowCnt = 1;
5759
+ daysPerRow = dates.length;
5760
+ }
5761
+ this.rowCnt = rowCnt;
5762
+ this.colCnt = daysPerRow;
5763
+ this.daySeries = daySeries;
5764
+ this.cellRows = this.buildCells();
5765
+ this.headerDates = this.buildHeaderDates();
5766
+ }
5767
+ buildCells() {
5768
+ let rows = [];
5769
+ for (let row = 0; row < this.rowCnt; row += 1) {
5770
+ let cells = [];
5771
+ for (let col = 0; col < this.colCnt; col += 1) {
5772
+ cells.push(this.buildCell(row, col));
5773
+ }
5774
+ rows.push(cells);
5775
+ }
5776
+ return rows;
5777
+ }
5778
+ buildCell(row, col) {
5779
+ let date = this.daySeries.dates[row * this.colCnt + col];
5780
+ return {
5781
+ key: date.toISOString(),
5782
+ date,
5783
+ };
5784
+ }
5785
+ buildHeaderDates() {
5786
+ let dates = [];
5787
+ for (let col = 0; col < this.colCnt; col += 1) {
5788
+ dates.push(this.cellRows[0][col].date);
5789
+ }
5790
+ return dates;
5791
+ }
5792
+ sliceRange(range) {
5793
+ let { colCnt } = this;
5794
+ let seriesSeg = this.daySeries.sliceRange(range);
5795
+ let segs = [];
5796
+ if (seriesSeg) {
5797
+ let { firstIndex, lastIndex } = seriesSeg;
5798
+ let index = firstIndex;
5799
+ while (index <= lastIndex) {
5800
+ let row = Math.floor(index / colCnt);
5801
+ let nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);
5802
+ segs.push({
5803
+ row,
5804
+ firstCol: index % colCnt,
5805
+ lastCol: (nextIndex - 1) % colCnt,
5806
+ isStart: seriesSeg.isStart && index === firstIndex,
5807
+ isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex,
5808
+ });
5809
+ index = nextIndex;
5810
+ }
5811
+ }
5812
+ return segs;
5813
+ }
5814
+ }
5815
+
5816
+ class DelayedRunner {
5817
+ constructor(drainedOption) {
5818
+ this.drainedOption = drainedOption;
5819
+ this.isRunning = false;
5820
+ this.isDirty = false;
5821
+ this.pauseDepths = {};
5822
+ this.timeoutId = 0;
5823
+ }
5824
+ request(delay) {
5825
+ this.isDirty = true;
5826
+ if (!this.isPaused()) {
5827
+ this.clearTimeout();
5828
+ if (delay == null) {
5829
+ this.tryDrain();
5830
+ }
5831
+ else {
5832
+ this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce
5833
+ this.tryDrain.bind(this), delay);
5834
+ }
5835
+ }
5836
+ }
5837
+ pause(scope = '') {
5838
+ let { pauseDepths } = this;
5839
+ pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;
5840
+ this.clearTimeout();
5841
+ }
5842
+ resume(scope = '', force) {
5843
+ let { pauseDepths } = this;
5844
+ if (scope in pauseDepths) {
5845
+ if (force) {
5846
+ delete pauseDepths[scope];
5847
+ }
5848
+ else {
5849
+ pauseDepths[scope] -= 1;
5850
+ let depth = pauseDepths[scope];
5851
+ if (depth <= 0) {
5852
+ delete pauseDepths[scope];
5853
+ }
5854
+ }
5855
+ this.tryDrain();
5856
+ }
5857
+ }
5858
+ isPaused() {
5859
+ return Object.keys(this.pauseDepths).length;
5860
+ }
5861
+ tryDrain() {
5862
+ if (!this.isRunning && !this.isPaused()) {
5863
+ this.isRunning = true;
5864
+ while (this.isDirty) {
5865
+ this.isDirty = false;
5866
+ this.drained(); // might set isDirty to true again
5867
+ }
5868
+ this.isRunning = false;
5869
+ }
5870
+ }
5871
+ clear() {
5872
+ this.clearTimeout();
5873
+ this.isDirty = false;
5874
+ this.pauseDepths = {};
5875
+ }
5876
+ clearTimeout() {
5877
+ if (this.timeoutId) {
5878
+ clearTimeout(this.timeoutId);
5879
+ this.timeoutId = 0;
5880
+ }
5881
+ }
5882
+ drained() {
5883
+ if (this.drainedOption) {
5884
+ this.drainedOption();
5885
+ }
5886
+ }
5887
+ }
5888
+
5889
+ const WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ');
5890
+ /*
5891
+ Fires:
5892
+ - scrollStart (always user)
5893
+ - scroll
5894
+ - scrollEnd (always user)
5895
+
5896
+ NOTE: detection is complicated (w/ touch and wheel) because ScrollerSyncer needs to know about it,
5897
+ but are we sure we can't just ignore programmatic scrollTo() calls with a flag? and determine the
5898
+ the scroll-master simply by who was the newest scroller? Does passive:true do things asynchronously?
5899
+ */
5900
+ class ScrollListener {
5901
+ constructor(el) {
5902
+ this.el = el;
5903
+ this.emitter = new Emitter();
5904
+ this.isScrolling = false;
5905
+ this.isTouching = false; // user currently has finger down?
5906
+ this.isRecentlyWheeled = false;
5907
+ this.isRecentlyScrolled = false;
5908
+ this.wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this));
5909
+ this.scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this));
5910
+ // Handlers
5911
+ // ----------------------------------------------------------------------------------------------
5912
+ this.handleScroll = () => {
5913
+ this.startScroll();
5914
+ this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching);
5915
+ this.isRecentlyScrolled = true;
5916
+ this.scrollWaiter.request(500);
5917
+ };
5918
+ // will fire *before* the scroll event is fired (might not cause a scroll)
5919
+ this.handleWheel = () => {
5920
+ this.isRecentlyWheeled = true;
5921
+ this.wheelWaiter.request(500);
5922
+ };
5923
+ // will fire *before* the scroll event is fired (might not cause a scroll)
5924
+ this.handleTouchStart = () => {
5925
+ this.isTouching = true;
5926
+ };
5927
+ this.handleTouchEnd = () => {
5928
+ this.isTouching = false;
5929
+ // if the user ended their touch, and the scroll area wasn't moving,
5930
+ // we consider this to be the end of the scroll.
5931
+ if (!this.isRecentlyScrolled) {
5932
+ this.endScroll(); // won't fire if already ended
5933
+ }
5934
+ };
5935
+ el.addEventListener('scroll', this.handleScroll);
5936
+ el.addEventListener('touchstart', this.handleTouchStart, { passive: true });
5937
+ el.addEventListener('touchend', this.handleTouchEnd);
5938
+ for (let eventName of WHEEL_EVENT_NAMES) {
5939
+ el.addEventListener(eventName, this.handleWheel, { passive: true });
5940
+ }
5941
+ }
5942
+ destroy() {
5943
+ let { el } = this;
5944
+ el.removeEventListener('scroll', this.handleScroll);
5945
+ el.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
5946
+ el.removeEventListener('touchend', this.handleTouchEnd);
5947
+ for (let eventName of WHEEL_EVENT_NAMES) {
5948
+ el.removeEventListener(eventName, this.handleWheel, { passive: true });
5949
+ }
5950
+ }
5951
+ // Start / Stop
5952
+ // ----------------------------------------------------------------------------------------------
5953
+ startScroll() {
5954
+ if (!this.isScrolling) {
5955
+ this.isScrolling = true;
5956
+ this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching);
5957
+ }
5958
+ }
5959
+ endScroll() {
5960
+ if (this.isScrolling) {
5961
+ this.emitter.trigger('scrollEnd');
5962
+ this.isScrolling = false;
5963
+ this.isRecentlyScrolled = true;
5964
+ this.isRecentlyWheeled = false;
5965
+ this.scrollWaiter.clear();
5966
+ this.wheelWaiter.clear();
5967
+ }
5968
+ }
5969
+ _handleScrollWaited() {
5970
+ this.isRecentlyScrolled = false;
5971
+ // only end the scroll if not currently touching.
5972
+ // if touching, the scrolling will end later, on touchend.
5973
+ if (!this.isTouching) {
5974
+ this.endScroll(); // won't fire if already ended
5975
+ }
5976
+ }
5977
+ _handleWheelWaited() {
5978
+ this.isRecentlyWheeled = false;
5979
+ }
5980
+ }
5981
+
5982
+ class Scroller extends DateComponent {
5983
+ constructor() {
5984
+ super(...arguments);
5985
+ // ref
5986
+ this.elRef = m$1();
5987
+ }
5988
+ render() {
5989
+ const { props } = this;
5990
+ // if there's only one axis that needs scrolling, the other axis will unintentionally have
5991
+ // scrollbars too, so we must force to 'hidden'
5992
+ const fallbackOverflow = (props.horizontal || props.vertical) ? 'hidden' : '';
5993
+ return (_("div", { ref: this.elRef, className: [
5994
+ 'fc-scroller',
5995
+ props.hideScrollbars ? 'fc-scroller-nobars' : '',
5996
+ ...(props.elClassNames || []),
5997
+ ].join(' '), style: Object.assign(Object.assign({}, props.elStyle), { overflowX: props.horizontal ? 'auto' : fallbackOverflow, overflowY: props.vertical ? 'auto' : fallbackOverflow }) }, props.children));
5998
+ }
5999
+ componentDidMount() {
6000
+ const el = this.elRef.current; // TODO: make dynamic with useEffect
6001
+ this.listener = new ScrollListener(el);
6002
+ this.disconnectSize = watchSize(el, (contentWidth, contentHeight) => {
6003
+ const { props, context } = this;
6004
+ const bottomScrollbarWidth = el.offsetHeight - el.clientHeight;
6005
+ const horizontalScrollbarWidth = el.offsetWidth - el.clientWidth;
6006
+ let rightScrollbarWidth = 0;
6007
+ let leftScrollbarWidth = 0;
6008
+ if (context.isRtl && getRtlScrollerConfig().leftScrollbars) {
6009
+ leftScrollbarWidth = horizontalScrollbarWidth;
6010
+ }
6011
+ else {
6012
+ rightScrollbarWidth = horizontalScrollbarWidth;
6013
+ }
6014
+ if (!isDimsEqual(this.currentWidth, contentWidth)) {
6015
+ setRef(props.widthRef, this.currentWidth = contentWidth);
6016
+ }
6017
+ if (!isDimsEqual(this.currentHeight, contentHeight)) {
6018
+ setRef(props.heightRef, this.currentHeight = contentHeight);
6019
+ }
6020
+ if (!isDimsEqual(this.currentBottomScrollbarWidth, bottomScrollbarWidth)) {
6021
+ setRef(props.bottomScrollbarWidthRef, this.currentBottomScrollbarWidth = bottomScrollbarWidth);
6022
+ }
6023
+ if (!isDimsEqual(this.currentRightScrollbarWidth, rightScrollbarWidth)) {
6024
+ setRef(props.rightScrollbarWidthRef, this.currentRightScrollbarWidth = rightScrollbarWidth);
6025
+ }
6026
+ if (!isDimsEqual(this.currentLeftScrollbarWidth, leftScrollbarWidth)) {
6027
+ setRef(props.leftScrollbarWidthRef, this.currentLeftScrollbarWidth = leftScrollbarWidth);
6028
+ }
6029
+ });
6030
+ }
6031
+ componentWillUnmount() {
6032
+ const { props } = this;
6033
+ this.disconnectSize();
6034
+ this.listener.destroy();
6035
+ setRef(props.widthRef, null);
6036
+ setRef(props.heightRef, null);
6037
+ setRef(props.bottomScrollbarWidthRef, null);
6038
+ setRef(props.rightScrollbarWidthRef, null);
6039
+ setRef(props.leftScrollbarWidthRef, null);
6040
+ }
6041
+ endScroll() {
6042
+ this.listener.endScroll();
6043
+ }
6044
+ // Public API
6045
+ // -----------------------------------------------------------------------------------------------
6046
+ get x() {
6047
+ const { isRtl } = this.context;
6048
+ const el = this.elRef.current;
6049
+ return getNormalizedScrollX(el, isRtl);
6050
+ }
6051
+ get y() {
6052
+ const el = this.elRef.current;
6053
+ return el.scrollTop;
6054
+ }
6055
+ scrollTo({ x, y }) {
6056
+ const { isRtl } = this.context;
6057
+ const el = this.elRef.current;
6058
+ if (y != null) {
6059
+ el.scrollTop = y;
6060
+ }
6061
+ if (x != null) {
6062
+ setNormalizedScrollX(el, isRtl, x);
5577
6063
  }
5578
- return indices[dayOffset];
6064
+ }
6065
+ addScrollEndListener(handler) {
6066
+ this.listener.emitter.on('scrollEnd', handler);
6067
+ }
6068
+ removeScrollEndListener(handler) {
6069
+ this.listener.emitter.off('scrollEnd', handler);
5579
6070
  }
5580
6071
  }
5581
-
5582
- class DayTableModel {
5583
- constructor(daySeries, breakOnWeeks) {
5584
- let { dates } = daySeries;
5585
- let daysPerRow;
5586
- let firstDay;
5587
- let rowCnt;
5588
- if (breakOnWeeks) {
5589
- // count columns until the day-of-week repeats
5590
- firstDay = dates[0].getUTCDay();
5591
- for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) {
5592
- if (dates[daysPerRow].getUTCDay() === firstDay) {
5593
- break;
5594
- }
5595
- }
5596
- rowCnt = Math.ceil(dates.length / daysPerRow);
5597
- }
5598
- else {
5599
- rowCnt = 1;
5600
- daysPerRow = dates.length;
5601
- }
5602
- this.rowCnt = rowCnt;
5603
- this.colCnt = daysPerRow;
5604
- this.daySeries = daySeries;
5605
- this.cells = this.buildCells();
5606
- this.headerDates = this.buildHeaderDates();
6072
+ // Public API
6073
+ // -------------------------------------------------------------------------------------------------
6074
+ // TODO: consolidate with scroll-left-norm.ts
6075
+ function getNormalizedScrollX(el, isRtl) {
6076
+ const { scrollLeft } = el;
6077
+ return isRtl ? getNormalizedRtlScrollX(scrollLeft, el) : scrollLeft;
6078
+ }
6079
+ function setNormalizedScrollX(el, isRtl, x) {
6080
+ el.scrollLeft = isRtl ? getNormalizedRtlScrollLeft(x, el) : x;
6081
+ }
6082
+ /*
6083
+ Returns a value in the 'reverse' system
6084
+ */
6085
+ function getNormalizedRtlScrollX(scrollLeft, el) {
6086
+ switch (getRtlScrollerConfig().system) {
6087
+ case 'positive':
6088
+ return el.scrollWidth - el.clientWidth - scrollLeft;
6089
+ case 'negative':
6090
+ return -scrollLeft;
5607
6091
  }
5608
- buildCells() {
5609
- let rows = [];
5610
- for (let row = 0; row < this.rowCnt; row += 1) {
5611
- let cells = [];
5612
- for (let col = 0; col < this.colCnt; col += 1) {
5613
- cells.push(this.buildCell(row, col));
5614
- }
5615
- rows.push(cells);
5616
- }
5617
- return rows;
6092
+ return scrollLeft;
6093
+ }
6094
+ /*
6095
+ Receives a value in the 'reverse' system
6096
+ TODO: is this really the same equations as getNormalizedRtlScrollX??? I think so
6097
+ If so, consolidate. With isRtl check too
6098
+ */
6099
+ function getNormalizedRtlScrollLeft(x, el) {
6100
+ switch (getRtlScrollerConfig().system) {
6101
+ case 'positive':
6102
+ return el.scrollWidth - el.clientWidth - x;
6103
+ case 'negative':
6104
+ return -x;
5618
6105
  }
5619
- buildCell(row, col) {
5620
- let date = this.daySeries.dates[row * this.colCnt + col];
5621
- return {
5622
- key: date.toISOString(),
5623
- date,
5624
- };
6106
+ return x;
6107
+ }
6108
+ let _rtlScrollerConfig;
6109
+ function getRtlScrollerConfig() {
6110
+ return _rtlScrollerConfig || (_rtlScrollerConfig = detectRtlScrollerConfig());
6111
+ }
6112
+ function detectRtlScrollerConfig() {
6113
+ let el = document.createElement('div');
6114
+ el.style.position = 'absolute';
6115
+ el.style.top = '-1000px';
6116
+ el.style.width = '100px'; // must be at least the side of scrollbars or you get inaccurate values (#7335)
6117
+ el.style.height = '100px'; // "
6118
+ el.style.overflow = 'scroll';
6119
+ el.style.direction = 'rtl';
6120
+ let innerEl = document.createElement('div');
6121
+ innerEl.style.width = '200px';
6122
+ innerEl.style.height = '200px';
6123
+ el.appendChild(innerEl);
6124
+ document.body.appendChild(el);
6125
+ let system;
6126
+ if (el.scrollLeft > 0) {
6127
+ system = 'positive'; // scroll is a positive number from the left edge
5625
6128
  }
5626
- buildHeaderDates() {
5627
- let dates = [];
5628
- for (let col = 0; col < this.colCnt; col += 1) {
5629
- dates.push(this.cells[0][col].date);
6129
+ else {
6130
+ el.scrollLeft = 50;
6131
+ if (el.scrollLeft > 0) {
6132
+ system = 'reverse'; // scroll is a positive number from the right edge
5630
6133
  }
5631
- return dates;
5632
- }
5633
- sliceRange(range) {
5634
- let { colCnt } = this;
5635
- let seriesSeg = this.daySeries.sliceRange(range);
5636
- let segs = [];
5637
- if (seriesSeg) {
5638
- let { firstIndex, lastIndex } = seriesSeg;
5639
- let index = firstIndex;
5640
- while (index <= lastIndex) {
5641
- let row = Math.floor(index / colCnt);
5642
- let nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);
5643
- segs.push({
5644
- row,
5645
- firstCol: index % colCnt,
5646
- lastCol: (nextIndex - 1) % colCnt,
5647
- isStart: seriesSeg.isStart && index === firstIndex,
5648
- isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex,
5649
- });
5650
- index = nextIndex;
5651
- }
6134
+ else {
6135
+ system = 'negative'; // scroll is a negative number from the right edge
5652
6136
  }
5653
- return segs;
5654
6137
  }
6138
+ let rightScrollbars = innerEl.getBoundingClientRect().right < el.getBoundingClientRect().right;
6139
+ removeElement(el);
6140
+ return { system, leftScrollbars: !rightScrollbars };
5655
6141
  }
5656
6142
 
5657
6143
  class Slicer {
@@ -6111,906 +6597,249 @@ var FullCalendar = (function (exports) {
6111
6597
  };
6112
6598
  }
6113
6599
  return fetch(url, fetchOptions).then((fetchRes) => {
6114
- if (fetchRes.ok) {
6115
- return fetchRes.json().then((parsedResponse) => {
6116
- return [parsedResponse, fetchRes];
6117
- }, () => {
6118
- throw new JsonRequestError('Failure parsing JSON', fetchRes);
6119
- });
6120
- }
6121
- else {
6122
- throw new JsonRequestError('Request failed', fetchRes);
6123
- }
6124
- });
6125
- }
6126
-
6127
- class DelayedRunner {
6128
- constructor(drainedOption) {
6129
- this.drainedOption = drainedOption;
6130
- this.isRunning = false;
6131
- this.isDirty = false;
6132
- this.pauseDepths = {};
6133
- this.timeoutId = 0;
6134
- }
6135
- request(delay) {
6136
- this.isDirty = true;
6137
- if (!this.isPaused()) {
6138
- this.clearTimeout();
6139
- if (delay == null) {
6140
- this.tryDrain();
6141
- }
6142
- else {
6143
- this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce
6144
- this.tryDrain.bind(this), delay);
6145
- }
6146
- }
6147
- }
6148
- pause(scope = '') {
6149
- let { pauseDepths } = this;
6150
- pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;
6151
- this.clearTimeout();
6152
- }
6153
- resume(scope = '', force) {
6154
- let { pauseDepths } = this;
6155
- if (scope in pauseDepths) {
6156
- if (force) {
6157
- delete pauseDepths[scope];
6158
- }
6159
- else {
6160
- pauseDepths[scope] -= 1;
6161
- let depth = pauseDepths[scope];
6162
- if (depth <= 0) {
6163
- delete pauseDepths[scope];
6164
- }
6165
- }
6166
- this.tryDrain();
6167
- }
6168
- }
6169
- isPaused() {
6170
- return Object.keys(this.pauseDepths).length;
6171
- }
6172
- tryDrain() {
6173
- if (!this.isRunning && !this.isPaused()) {
6174
- this.isRunning = true;
6175
- while (this.isDirty) {
6176
- this.isDirty = false;
6177
- this.drained(); // might set isDirty to true again
6178
- }
6179
- this.isRunning = false;
6180
- }
6181
- }
6182
- clear() {
6183
- this.clearTimeout();
6184
- this.isDirty = false;
6185
- this.pauseDepths = {};
6186
- }
6187
- clearTimeout() {
6188
- if (this.timeoutId) {
6189
- clearTimeout(this.timeoutId);
6190
- this.timeoutId = 0;
6191
- }
6192
- }
6193
- drained() {
6194
- if (this.drainedOption) {
6195
- this.drainedOption();
6196
- }
6197
- }
6198
- }
6199
-
6200
- const VISIBLE_HIDDEN_RE = /^(visible|hidden)$/;
6201
- class Scroller extends BaseComponent {
6202
- constructor() {
6203
- super(...arguments);
6204
- this.handleEl = (el) => {
6205
- this.el = el;
6206
- setRef(this.props.elRef, el);
6207
- };
6208
- }
6209
- render() {
6210
- let { props } = this;
6211
- let { liquid, liquidIsAbsolute } = props;
6212
- let isAbsolute = liquid && liquidIsAbsolute;
6213
- let className = ['fc-scroller'];
6214
- if (liquid) {
6215
- if (liquidIsAbsolute) {
6216
- className.push('fc-scroller-liquid-absolute');
6217
- }
6218
- else {
6219
- className.push('fc-scroller-liquid');
6220
- }
6221
- }
6222
- return (y("div", { ref: this.handleEl, className: className.join(' '), style: {
6223
- overflowX: props.overflowX,
6224
- overflowY: props.overflowY,
6225
- left: (isAbsolute && -(props.overcomeLeft || 0)) || '',
6226
- right: (isAbsolute && -(props.overcomeRight || 0)) || '',
6227
- bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '',
6228
- marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '',
6229
- marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '',
6230
- marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '',
6231
- maxHeight: props.maxHeight || '',
6232
- } }, props.children));
6233
- }
6234
- needsXScrolling() {
6235
- if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
6236
- return false;
6237
- }
6238
- // testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers.
6239
- // much more reliable to see if children are taller than the scroller, even tho doesn't account for
6240
- // inner-child margins and absolute positioning
6241
- let { el } = this;
6242
- let realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth();
6243
- let { children } = el;
6244
- for (let i = 0; i < children.length; i += 1) {
6245
- let childEl = children[i];
6246
- if (childEl.getBoundingClientRect().width > realClientWidth) {
6247
- return true;
6248
- }
6249
- }
6250
- return false;
6251
- }
6252
- needsYScrolling() {
6253
- if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
6254
- return false;
6255
- }
6256
- // testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers.
6257
- // much more reliable to see if children are taller than the scroller, even tho doesn't account for
6258
- // inner-child margins and absolute positioning
6259
- let { el } = this;
6260
- let realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth();
6261
- let { children } = el;
6262
- for (let i = 0; i < children.length; i += 1) {
6263
- let childEl = children[i];
6264
- if (childEl.getBoundingClientRect().height > realClientHeight) {
6265
- return true;
6266
- }
6267
- }
6268
- return false;
6269
- }
6270
- getXScrollbarWidth() {
6271
- if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
6272
- return 0;
6273
- }
6274
- return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important?
6275
- }
6276
- getYScrollbarWidth() {
6277
- if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
6278
- return 0;
6279
- }
6280
- return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important?
6281
- }
6282
- }
6283
-
6284
- /*
6285
- TODO: somehow infer OtherArgs from masterCallback?
6286
- TODO: infer RefType from masterCallback if provided
6287
- */
6288
- class RefMap {
6289
- constructor(masterCallback) {
6290
- this.masterCallback = masterCallback;
6291
- this.currentMap = {};
6292
- this.depths = {};
6293
- this.callbackMap = {};
6294
- this.handleValue = (val, key) => {
6295
- let { depths, currentMap } = this;
6296
- let removed = false;
6297
- let added = false;
6298
- if (val !== null) {
6299
- // for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore
6300
- removed = (key in currentMap);
6301
- currentMap[key] = val;
6302
- depths[key] = (depths[key] || 0) + 1;
6303
- added = true;
6304
- }
6305
- else {
6306
- depths[key] -= 1;
6307
- if (!depths[key]) {
6308
- delete currentMap[key];
6309
- delete this.callbackMap[key];
6310
- removed = true;
6311
- }
6312
- }
6313
- if (this.masterCallback) {
6314
- if (removed) {
6315
- this.masterCallback(null, String(key));
6316
- }
6317
- if (added) {
6318
- this.masterCallback(val, String(key));
6319
- }
6320
- }
6321
- };
6322
- }
6323
- createRef(key) {
6324
- let refCallback = this.callbackMap[key];
6325
- if (!refCallback) {
6326
- refCallback = this.callbackMap[key] = (val) => {
6327
- this.handleValue(val, String(key));
6328
- };
6329
- }
6330
- return refCallback;
6331
- }
6332
- // TODO: check callers that don't care about order. should use getAll instead
6333
- // NOTE: this method has become less valuable now that we are encouraged to map order by some other index
6334
- // TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and "collect"
6335
- collect(startIndex, endIndex, step) {
6336
- return collectFromHash(this.currentMap, startIndex, endIndex, step);
6337
- }
6338
- getAll() {
6339
- return hashValuesToArray(this.currentMap);
6340
- }
6341
- }
6342
-
6343
- function computeShrinkWidth(chunkEls) {
6344
- let shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink');
6345
- let largestWidth = 0;
6346
- for (let shrinkCell of shrinkCells) {
6347
- largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell));
6348
- }
6349
- return Math.ceil(largestWidth); // <table> elements work best with integers. round up to ensure contents fits
6350
- }
6351
- function getSectionHasLiquidHeight(props, sectionConfig) {
6352
- return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)
6353
- }
6354
- function getAllowYScrolling(props, sectionConfig) {
6355
- return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars
6356
- getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars
6357
- }
6358
- // TODO: ONLY use `arg`. force out internal function to use same API
6359
- function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {
6360
- let { expandRows } = arg;
6361
- let content = typeof chunkConfig.content === 'function' ?
6362
- chunkConfig.content(arg) :
6363
- y('table', {
6364
- role: 'presentation',
6365
- className: [
6366
- chunkConfig.tableClassName,
6367
- sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',
6368
- ].join(' '),
6369
- style: {
6370
- minWidth: arg.tableMinWidth,
6371
- width: arg.clientWidth,
6372
- height: expandRows ? arg.clientHeight : '', // css `height` on a <table> serves as a min-height
6373
- },
6374
- }, arg.tableColGroupNode, y(isHeader ? 'thead' : 'tbody', {
6375
- role: 'presentation',
6376
- }, typeof chunkConfig.rowContent === 'function'
6377
- ? chunkConfig.rowContent(arg)
6378
- : chunkConfig.rowContent));
6379
- return content;
6380
- }
6381
- function isColPropsEqual(cols0, cols1) {
6382
- return isArraysEqual(cols0, cols1, isPropsEqual);
6383
- }
6384
- function renderMicroColGroup(cols, shrinkWidth) {
6385
- let colNodes = [];
6386
- /*
6387
- for ColProps with spans, it would have been great to make a single <col span="">
6388
- HOWEVER, Chrome was getting messing up distributing the width to <td>/<th> elements with colspans.
6389
- SOLUTION: making individual <col> elements makes Chrome behave.
6390
- */
6391
- for (let colProps of cols) {
6392
- let span = colProps.span || 1;
6393
- for (let i = 0; i < span; i += 1) {
6394
- colNodes.push(y("col", { style: {
6395
- width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),
6396
- minWidth: colProps.minWidth || '',
6397
- } }));
6398
- }
6399
- }
6400
- return y('colgroup', {}, ...colNodes);
6401
- }
6402
- function sanitizeShrinkWidth(shrinkWidth) {
6403
- /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth
6404
- 4 accounts for 2 2-pixel borders. TODO: better solution? */
6405
- return shrinkWidth == null ? 4 : shrinkWidth;
6406
- }
6407
- function hasShrinkWidth(cols) {
6408
- for (let col of cols) {
6409
- if (col.width === 'shrink') {
6410
- return true;
6411
- }
6412
- }
6413
- return false;
6414
- }
6415
- function getScrollGridClassNames(liquid, context) {
6416
- let classNames = [
6417
- 'fc-scrollgrid',
6418
- context.theme.getClass('table'),
6419
- ];
6420
- if (liquid) {
6421
- classNames.push('fc-scrollgrid-liquid');
6422
- }
6423
- return classNames;
6424
- }
6425
- function getSectionClassNames(sectionConfig, wholeTableVGrow) {
6426
- let classNames = [
6427
- 'fc-scrollgrid-section',
6428
- `fc-scrollgrid-section-${sectionConfig.type}`,
6429
- sectionConfig.className, // used?
6430
- ];
6431
- if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {
6432
- classNames.push('fc-scrollgrid-section-liquid');
6433
- }
6434
- if (sectionConfig.isSticky) {
6435
- classNames.push('fc-scrollgrid-section-sticky');
6436
- }
6437
- return classNames;
6600
+ if (fetchRes.ok) {
6601
+ return fetchRes.json().then((parsedResponse) => {
6602
+ return [parsedResponse, fetchRes];
6603
+ }, () => {
6604
+ throw new JsonRequestError('Failure parsing JSON', fetchRes);
6605
+ });
6606
+ }
6607
+ else {
6608
+ throw new JsonRequestError('Request failed', fetchRes);
6609
+ }
6610
+ });
6438
6611
  }
6439
- function renderScrollShim(arg) {
6440
- return (y("div", { className: "fc-scrollgrid-sticky-shim", style: {
6441
- width: arg.clientWidth,
6442
- minWidth: arg.tableMinWidth,
6443
- } }));
6612
+
6613
+ function getIsHeightAuto(options) {
6614
+ return options.height === 'auto' || options.viewHeight === 'auto';
6444
6615
  }
6445
6616
  function getStickyHeaderDates(options) {
6446
6617
  let { stickyHeaderDates } = options;
6447
6618
  if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {
6448
- stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto';
6619
+ stickyHeaderDates = getIsHeightAuto(options);
6449
6620
  }
6450
6621
  return stickyHeaderDates;
6451
6622
  }
6452
6623
  function getStickyFooterScrollbar(options) {
6453
6624
  let { stickyFooterScrollbar } = options;
6454
6625
  if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {
6455
- stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto';
6626
+ stickyFooterScrollbar = getIsHeightAuto(options);
6456
6627
  }
6457
6628
  return stickyFooterScrollbar;
6458
6629
  }
6459
-
6460
- class SimpleScrollGrid extends BaseComponent {
6461
- constructor() {
6462
- super(...arguments);
6463
- this.processCols = memoize((a) => a, isColPropsEqual); // so we get same `cols` props every time
6464
- // yucky to memoize VNodes, but much more efficient for consumers
6465
- this.renderMicroColGroup = memoize(renderMicroColGroup);
6466
- this.scrollerRefs = new RefMap();
6467
- this.scrollerElRefs = new RefMap(this._handleScrollerEl.bind(this));
6468
- this.state = {
6469
- shrinkWidth: null,
6470
- forceYScrollbars: false,
6471
- scrollerClientWidths: {},
6472
- scrollerClientHeights: {},
6473
- };
6474
- // TODO: can do a really simple print-view. dont need to join rows
6475
- this.handleSizing = () => {
6476
- this.safeSetState(Object.assign({ shrinkWidth: this.computeShrinkWidth() }, this.computeScrollerDims()));
6477
- };
6478
- }
6479
- render() {
6480
- let { props, state, context } = this;
6481
- let sectionConfigs = props.sections || [];
6482
- let cols = this.processCols(props.cols);
6483
- let microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth);
6484
- let classNames = getScrollGridClassNames(props.liquid, context);
6485
- if (props.collapsibleWidth) {
6486
- classNames.push('fc-scrollgrid-collapsible');
6487
- }
6488
- // TODO: make DRY
6489
- let configCnt = sectionConfigs.length;
6490
- let configI = 0;
6491
- let currentConfig;
6492
- let headSectionNodes = [];
6493
- let bodySectionNodes = [];
6494
- let footSectionNodes = [];
6495
- while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
6496
- headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
6497
- configI += 1;
6498
- }
6499
- while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
6500
- bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false));
6501
- configI += 1;
6502
- }
6503
- while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
6504
- footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
6505
- configI += 1;
6506
- }
6507
- // firefox bug: when setting height on table and there is a thead or tfoot,
6508
- // the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524)
6509
- // use getCanVGrowWithinCell as a way to detect table-stupid firefox.
6510
- // if so, use a simpler dom structure, jam everything into a lone tbody.
6511
- let isBuggy = !getCanVGrowWithinCell();
6512
- const roleAttrs = { role: 'rowgroup' };
6513
- return y('table', {
6514
- role: 'grid',
6515
- className: classNames.join(' '),
6516
- style: { height: props.height },
6517
- }, Boolean(!isBuggy && headSectionNodes.length) && y('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && y('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && y('tfoot', roleAttrs, ...footSectionNodes), isBuggy && y('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes));
6518
- }
6519
- renderSection(sectionConfig, microColGroupNode, isHeader) {
6520
- if ('outerContent' in sectionConfig) {
6521
- return (y(_, { key: sectionConfig.key }, sectionConfig.outerContent));
6522
- }
6523
- return (y("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)));
6524
- }
6525
- renderChunkTd(sectionConfig, microColGroupNode, chunkConfig, isHeader) {
6526
- if ('outerContent' in chunkConfig) {
6527
- return chunkConfig.outerContent;
6528
- }
6529
- let { props } = this;
6530
- let { forceYScrollbars, scrollerClientWidths, scrollerClientHeights } = this.state;
6531
- let needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config?
6532
- let isLiquid = getSectionHasLiquidHeight(props, sectionConfig);
6533
- // for `!props.liquid` - is WHOLE scrollgrid natural height?
6534
- // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars
6535
- let overflowY = !props.liquid ? 'visible' :
6536
- forceYScrollbars ? 'scroll' :
6537
- !needsYScrolling ? 'hidden' :
6538
- 'auto';
6539
- let sectionKey = sectionConfig.key;
6540
- let content = renderChunkContent(sectionConfig, chunkConfig, {
6541
- tableColGroupNode: microColGroupNode,
6542
- tableMinWidth: '',
6543
- clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null,
6544
- clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null,
6545
- expandRows: sectionConfig.expandRows,
6546
- syncRowHeights: false,
6547
- rowSyncHeights: [],
6548
- reportRowHeightChange: () => { },
6549
- }, isHeader);
6550
- return y(isHeader ? 'th' : 'td', {
6551
- ref: chunkConfig.elRef,
6552
- role: 'presentation',
6553
- }, y("div", { className: `fc-scroller-harness${isLiquid ? ' fc-scroller-harness-liquid' : ''}` },
6554
- y(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute // because its within a harness
6555
- : true }, content)));
6556
- }
6557
- _handleScrollerEl(scrollerEl, key) {
6558
- let section = getSectionByKey(this.props.sections, key);
6559
- if (section) {
6560
- setRef(section.chunk.scrollerElRef, scrollerEl);
6561
- }
6562
- }
6563
- componentDidMount() {
6564
- this.handleSizing();
6565
- this.context.addResizeHandler(this.handleSizing);
6566
- }
6567
- componentDidUpdate() {
6568
- // TODO: need better solution when state contains non-sizing things
6569
- this.handleSizing();
6570
- }
6571
- componentWillUnmount() {
6572
- this.context.removeResizeHandler(this.handleSizing);
6573
- }
6574
- computeShrinkWidth() {
6575
- return hasShrinkWidth(this.props.cols)
6576
- ? computeShrinkWidth(this.scrollerElRefs.getAll())
6577
- : 0;
6578
- }
6579
- computeScrollerDims() {
6580
- let scrollbarWidth = getScrollbarWidths();
6581
- let { scrollerRefs, scrollerElRefs } = this;
6582
- let forceYScrollbars = false;
6583
- let scrollerClientWidths = {};
6584
- let scrollerClientHeights = {};
6585
- for (let sectionKey in scrollerRefs.currentMap) {
6586
- let scroller = scrollerRefs.currentMap[sectionKey];
6587
- if (scroller && scroller.needsYScrolling()) {
6588
- forceYScrollbars = true;
6589
- break;
6590
- }
6591
- }
6592
- for (let section of this.props.sections) {
6593
- let sectionKey = section.key;
6594
- let scrollerEl = scrollerElRefs.currentMap[sectionKey];
6595
- if (scrollerEl) {
6596
- let harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders
6597
- scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars
6598
- ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future
6599
- : 0));
6600
- scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height);
6601
- }
6602
- }
6603
- return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights };
6604
- }
6605
- }
6606
- SimpleScrollGrid.addStateEquality({
6607
- scrollerClientWidths: isPropsEqual,
6608
- scrollerClientHeights: isPropsEqual,
6609
- });
6610
- function getSectionByKey(sections, key) {
6611
- for (let section of sections) {
6612
- if (section.key === key) {
6613
- return section;
6614
- }
6630
+ function getScrollerSyncerClass(pluginHooks) {
6631
+ const ScrollerSyncer = pluginHooks.scrollerSyncerClass;
6632
+ if (!ScrollerSyncer) {
6633
+ throw new RangeError('Must import @fullcalendar/scrollgrid');
6615
6634
  }
6616
- return null;
6635
+ return ScrollerSyncer;
6617
6636
  }
6618
6637
 
6619
- class EventContainer extends BaseComponent {
6620
- constructor() {
6621
- super(...arguments);
6622
- this.handleEl = (el) => {
6623
- this.el = el;
6624
- if (el) {
6625
- setElSeg(el, this.props.seg);
6638
+ /*
6639
+ TODO: make API where createRefMap() called
6640
+ */
6641
+ class RefMap {
6642
+ constructor(masterCallback) {
6643
+ this.masterCallback = masterCallback;
6644
+ this.rev = '';
6645
+ this.current = new Map();
6646
+ this.callbacks = new Map;
6647
+ this.handleValue = (val, key) => {
6648
+ let { current, callbacks } = this;
6649
+ if (val === null) {
6650
+ current.delete(key);
6651
+ callbacks.delete(key);
6652
+ }
6653
+ else {
6654
+ current.set(key, val);
6655
+ }
6656
+ this.rev = guid();
6657
+ if (this.masterCallback) {
6658
+ this.masterCallback(val, key);
6626
6659
  }
6627
6660
  };
6628
6661
  }
6629
- render() {
6630
- const { props, context } = this;
6631
- const { options } = context;
6632
- const { seg } = props;
6633
- const { eventRange } = seg;
6634
- const { ui } = eventRange;
6635
- const renderProps = {
6636
- event: new EventImpl(context, eventRange.def, eventRange.instance),
6637
- view: context.viewApi,
6638
- timeText: props.timeText,
6639
- textColor: ui.textColor,
6640
- backgroundColor: ui.backgroundColor,
6641
- borderColor: ui.borderColor,
6642
- isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
6643
- isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
6644
- isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
6645
- isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
6646
- isStart: Boolean(seg.isStart),
6647
- isEnd: Boolean(seg.isEnd),
6648
- isPast: Boolean(props.isPast),
6649
- isFuture: Boolean(props.isFuture),
6650
- isToday: Boolean(props.isToday),
6651
- isSelected: Boolean(props.isSelected),
6652
- isDragging: Boolean(props.isDragging),
6653
- isResizing: Boolean(props.isResizing),
6654
- };
6655
- return (y(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
6656
- ...getEventClassNames(renderProps),
6657
- ...seg.eventRange.ui.classNames,
6658
- ...(props.elClasses || []),
6659
- ], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
6660
- }
6661
- componentDidUpdate(prevProps) {
6662
- if (this.el && this.props.seg !== prevProps.seg) {
6663
- setElSeg(this.el, this.props.seg);
6662
+ createRef(key) {
6663
+ let refCallback = this.callbacks.get(key);
6664
+ if (!refCallback) {
6665
+ refCallback = (val) => {
6666
+ this.handleValue(val, key);
6667
+ };
6668
+ this.callbacks.set(key, refCallback);
6664
6669
  }
6670
+ return refCallback;
6665
6671
  }
6666
6672
  }
6667
6673
 
6668
- // should not be a purecomponent
6669
- class StandardEvent extends BaseComponent {
6670
- render() {
6671
- let { props, context } = this;
6672
- let { options } = context;
6673
- let { seg } = props;
6674
- let { ui } = seg.eventRange;
6675
- let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
6676
- let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
6677
- return (y(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
6678
- borderColor: ui.borderColor,
6679
- backgroundColor: ui.backgroundColor,
6680
- }, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (y(_, null,
6681
- y(InnerContent, { elTag: "div", elClasses: ['fc-event-main'], elStyle: { color: eventContentArg.textColor } }),
6682
- Boolean(eventContentArg.isStartResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-start" })),
6683
- Boolean(eventContentArg.isEndResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
6684
- }
6685
- }
6686
- function renderInnerContent$1(innerProps) {
6687
- return (y("div", { className: "fc-event-main-frame" },
6688
- innerProps.timeText && (y("div", { className: "fc-event-time" }, innerProps.timeText)),
6689
- y("div", { className: "fc-event-title-container" },
6690
- y("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || y(_, null, "\u00A0")))));
6691
- }
6692
-
6693
- const NowIndicatorContainer = (props) => (y(ViewContextType.Consumer, null, (context) => {
6694
- let { options } = context;
6695
- let renderProps = {
6696
- isAxis: props.isAxis,
6697
- date: context.dateEnv.toDate(props.date),
6698
- view: context.viewApi,
6699
- };
6700
- return (y(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
6701
- }));
6702
-
6703
- const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
6704
- class DayCellContainer extends BaseComponent {
6705
- constructor() {
6706
- super(...arguments);
6707
- this.refineRenderProps = memoizeObjArg(refineRenderProps);
6708
- }
6709
- render() {
6710
- let { props, context } = this;
6711
- let { options } = context;
6712
- let renderProps = this.refineRenderProps({
6713
- date: props.date,
6714
- dateProfile: props.dateProfile,
6715
- todayRange: props.todayRange,
6716
- isMonthStart: props.isMonthStart || false,
6717
- showDayNumber: props.showDayNumber,
6718
- extraRenderProps: props.extraRenderProps,
6719
- viewApi: context.viewApi,
6720
- dateEnv: context.dateEnv,
6721
- monthStartFormat: options.monthStartFormat,
6722
- });
6723
- return (y(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
6724
- ...getDayClassNames(renderProps, context.theme),
6725
- ...(props.elClasses || []),
6726
- ], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
6727
- // don't use custom classNames if disabled
6728
- renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
6729
- }
6730
- }
6731
- function hasCustomDayCellContent(options) {
6732
- return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
6733
- }
6734
- function refineRenderProps(raw) {
6735
- let { date, dateEnv, dateProfile, isMonthStart } = raw;
6736
- let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
6737
- let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
6738
- return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
6739
- dayNumberText }), raw.extraRenderProps);
6740
- }
6741
-
6742
- class BgEvent extends BaseComponent {
6743
- render() {
6744
- let { props } = this;
6745
- let { seg } = props;
6746
- return (y(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: seg.eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, seg: seg, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
6747
- }
6748
- }
6749
- function renderInnerContent(props) {
6750
- let { title } = props.event;
6751
- return title && (y("div", { className: "fc-event-title" }, props.event.title));
6752
- }
6753
- function renderFill(fillType) {
6754
- return (y("div", { className: `fc-${fillType}` }));
6755
- }
6756
-
6757
- const WeekNumberContainer = (props) => (y(ViewContextType.Consumer, null, (context) => {
6758
- let { dateEnv, options } = context;
6759
- let { date } = props;
6760
- let format = options.weekNumberFormat || props.defaultFormat;
6761
- let num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?
6762
- let text = dateEnv.format(date, format);
6763
- let renderProps = { num, text, date };
6764
- return (y(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
6765
- , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
6766
- }));
6767
- function renderInner(innerProps) {
6768
- return innerProps.text;
6769
- }
6770
-
6771
- const PADDING_FROM_VIEWPORT = 10;
6772
- class Popover extends BaseComponent {
6773
- constructor() {
6774
- super(...arguments);
6775
- this.state = {
6776
- titleId: getUniqueDomId(),
6777
- };
6778
- this.handleRootEl = (el) => {
6779
- this.rootEl = el;
6780
- if (this.props.elRef) {
6781
- setRef(this.props.elRef, el);
6782
- }
6783
- };
6784
- // Triggered when the user clicks *anywhere* in the document, for the autoHide feature
6785
- this.handleDocumentMouseDown = (ev) => {
6786
- // only hide the popover if the click happened outside the popover
6787
- const target = getEventTargetViaRoot(ev);
6788
- if (!this.rootEl.contains(target)) {
6789
- this.handleCloseClick();
6790
- }
6791
- };
6792
- this.handleDocumentKeyDown = (ev) => {
6793
- if (ev.key === 'Escape') {
6794
- this.handleCloseClick();
6795
- }
6796
- };
6797
- this.handleCloseClick = () => {
6798
- let { onClose } = this.props;
6799
- if (onClose) {
6800
- onClose();
6801
- }
6802
- };
6674
+ class NowTimer extends b {
6675
+ constructor(props, context) {
6676
+ super(props, context);
6677
+ this.initialNowDate = getNow(context.options.now, context.dateEnv);
6678
+ this.initialNowQueriedMs = new Date().valueOf();
6679
+ this.state = this.computeTiming().currentState;
6803
6680
  }
6804
6681
  render() {
6805
- let { theme, options } = this.context;
6806
6682
  let { props, state } = this;
6807
- let classNames = [
6808
- 'fc-popover',
6809
- theme.getClass('popover'),
6810
- ].concat(props.extraClassNames || []);
6811
- return j(y("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
6812
- y("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
6813
- y("span", { className: "fc-popover-title", id: state.titleId }, props.title),
6814
- y("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
6815
- y("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
6683
+ return props.children(state.nowDate, state.todayRange);
6816
6684
  }
6817
6685
  componentDidMount() {
6818
- document.addEventListener('mousedown', this.handleDocumentMouseDown);
6819
- document.addEventListener('keydown', this.handleDocumentKeyDown);
6820
- this.updateSize();
6686
+ this.setTimeout();
6687
+ }
6688
+ componentDidUpdate(prevProps) {
6689
+ if (prevProps.unit !== this.props.unit) {
6690
+ this.clearTimeout();
6691
+ this.setTimeout();
6692
+ }
6821
6693
  }
6822
6694
  componentWillUnmount() {
6823
- document.removeEventListener('mousedown', this.handleDocumentMouseDown);
6824
- document.removeEventListener('keydown', this.handleDocumentKeyDown);
6695
+ this.clearTimeout();
6825
6696
  }
6826
- updateSize() {
6827
- let { isRtl } = this.context;
6828
- let { alignmentEl, alignGridTop } = this.props;
6829
- let { rootEl } = this;
6830
- let alignmentRect = computeClippedClientRect(alignmentEl);
6831
- if (alignmentRect) {
6832
- let popoverDims = rootEl.getBoundingClientRect();
6833
- // position relative to viewport
6834
- let popoverTop = alignGridTop
6835
- ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top
6836
- : alignmentRect.top;
6837
- let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
6838
- // constrain
6839
- popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
6840
- popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
6841
- popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
6842
- let origin = rootEl.offsetParent.getBoundingClientRect();
6843
- applyStyle(rootEl, {
6844
- top: popoverTop - origin.top,
6845
- left: popoverLeft - origin.left,
6697
+ computeTiming() {
6698
+ let { props, context } = this;
6699
+ let unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);
6700
+ let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);
6701
+ let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));
6702
+ let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();
6703
+ // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)
6704
+ // ensure no longer than a day
6705
+ waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);
6706
+ return {
6707
+ currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },
6708
+ nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },
6709
+ waitMs,
6710
+ };
6711
+ }
6712
+ setTimeout() {
6713
+ let { nextState, waitMs } = this.computeTiming();
6714
+ this.timeoutId = setTimeout(() => {
6715
+ this.setState(nextState, () => {
6716
+ this.setTimeout();
6846
6717
  });
6718
+ }, waitMs);
6719
+ }
6720
+ clearTimeout() {
6721
+ if (this.timeoutId) {
6722
+ clearTimeout(this.timeoutId);
6847
6723
  }
6848
6724
  }
6849
6725
  }
6726
+ NowTimer.contextType = ViewContextType;
6727
+ function buildDayRange(date) {
6728
+ let start = startOfDay(date);
6729
+ let end = addDays(start, 1);
6730
+ return { start, end };
6731
+ }
6850
6732
 
6851
- class MorePopover extends DateComponent {
6733
+ class EventContainer extends BaseComponent {
6852
6734
  constructor() {
6853
6735
  super(...arguments);
6854
- this.handleRootEl = (rootEl) => {
6855
- this.rootEl = rootEl;
6856
- if (rootEl) {
6857
- this.context.registerInteractiveComponent(this, {
6858
- el: rootEl,
6859
- useEventCenter: false,
6860
- });
6861
- }
6862
- else {
6863
- this.context.unregisterInteractiveComponent(this);
6736
+ this.handleEl = (el) => {
6737
+ this.el = el;
6738
+ if (el) {
6739
+ setElEventRange(el, this.props.eventRange);
6864
6740
  }
6865
6741
  };
6866
6742
  }
6867
6743
  render() {
6868
- let { options, dateEnv } = this.context;
6869
- let { props } = this;
6870
- let { startDate, todayRange, dateProfile } = props;
6871
- let title = dateEnv.format(startDate, options.dayPopoverFormat);
6872
- return (y(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, elAttrs) => (y(Popover, { elRef: elAttrs.ref, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(elAttrs.className || []), extraAttrs: elAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
6873
- hasCustomDayCellContent(options) && (y(InnerContent, { elTag: "div", elClasses: ['fc-more-popover-misc'] })),
6874
- props.children))));
6744
+ const { props, context } = this;
6745
+ const { options } = context;
6746
+ const { eventRange } = props;
6747
+ const { ui } = eventRange;
6748
+ const renderProps = {
6749
+ event: new EventImpl(context, eventRange.def, eventRange.instance),
6750
+ view: context.viewApi,
6751
+ timeText: props.timeText,
6752
+ textColor: ui.textColor,
6753
+ backgroundColor: ui.backgroundColor,
6754
+ borderColor: ui.borderColor,
6755
+ isDraggable: !props.disableDragging && computeEventRangeDraggable(eventRange, context),
6756
+ isStartResizable: !props.disableResizing && props.isStart && eventRange.ui.durationEditable && options.eventResizableFromStart,
6757
+ isEndResizable: !props.disableResizing && props.isEnd && eventRange.ui.durationEditable,
6758
+ isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
6759
+ isStart: Boolean(props.isStart),
6760
+ isEnd: Boolean(props.isEnd),
6761
+ isPast: Boolean(props.isPast),
6762
+ isFuture: Boolean(props.isFuture),
6763
+ isToday: Boolean(props.isToday),
6764
+ isSelected: Boolean(props.isSelected),
6765
+ isDragging: Boolean(props.isDragging),
6766
+ isResizing: Boolean(props.isResizing),
6767
+ };
6768
+ return (_(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
6769
+ ...getEventClassNames(renderProps),
6770
+ ...eventRange.ui.classNames,
6771
+ ...(props.elClasses || []),
6772
+ ], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
6875
6773
  }
6876
- queryHit(positionLeft, positionTop, elWidth, elHeight) {
6877
- let { rootEl, props } = this;
6878
- if (positionLeft >= 0 && positionLeft < elWidth &&
6879
- positionTop >= 0 && positionTop < elHeight) {
6880
- return {
6881
- dateProfile: props.dateProfile,
6882
- dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
6883
- start: props.startDate,
6884
- end: props.endDate,
6885
- } }, props.extraDateSpan),
6886
- dayEl: rootEl,
6887
- rect: {
6888
- left: 0,
6889
- top: 0,
6890
- right: elWidth,
6891
- bottom: elHeight,
6892
- },
6893
- layer: 1, // important when comparing with hits from other components
6894
- };
6774
+ componentDidUpdate(prevProps) {
6775
+ if (this.el && this.props.eventRange !== prevProps.eventRange) {
6776
+ setElEventRange(this.el, this.props.eventRange);
6895
6777
  }
6896
- return null;
6897
6778
  }
6898
6779
  }
6899
6780
 
6900
- class MoreLinkContainer extends BaseComponent {
6901
- constructor() {
6902
- super(...arguments);
6903
- this.state = {
6904
- isPopoverOpen: false,
6905
- popoverId: getUniqueDomId(),
6906
- };
6907
- this.handleLinkEl = (linkEl) => {
6908
- this.linkEl = linkEl;
6909
- if (this.props.elRef) {
6910
- setRef(this.props.elRef, linkEl);
6911
- }
6912
- };
6913
- this.handleClick = (ev) => {
6914
- let { props, context } = this;
6915
- let { moreLinkClick } = context.options;
6916
- let date = computeRange(props).start;
6917
- function buildPublicSeg(seg) {
6918
- let { def, instance, range } = seg.eventRange;
6919
- return {
6920
- event: new EventImpl(context, def, instance),
6921
- start: context.dateEnv.toDate(range.start),
6922
- end: context.dateEnv.toDate(range.end),
6923
- isStart: seg.isStart,
6924
- isEnd: seg.isEnd,
6925
- };
6926
- }
6927
- if (typeof moreLinkClick === 'function') {
6928
- moreLinkClick = moreLinkClick({
6929
- date,
6930
- allDay: Boolean(props.allDayDate),
6931
- allSegs: props.allSegs.map(buildPublicSeg),
6932
- hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
6933
- jsEvent: ev,
6934
- view: context.viewApi,
6935
- });
6936
- }
6937
- if (!moreLinkClick || moreLinkClick === 'popover') {
6938
- this.setState({ isPopoverOpen: true });
6939
- }
6940
- else if (typeof moreLinkClick === 'string') { // a view name
6941
- context.calendarApi.zoomTo(date, moreLinkClick);
6942
- }
6943
- };
6944
- this.handlePopoverClose = () => {
6945
- this.setState({ isPopoverOpen: false });
6946
- };
6947
- }
6781
+ // should not be a purecomponent
6782
+ class StandardEvent extends BaseComponent {
6948
6783
  render() {
6949
- let { props, state } = this;
6950
- return (y(ViewContextType.Consumer, null, (context) => {
6951
- let { viewApi, options, calendarApi } = context;
6952
- let { moreLinkText } = options;
6953
- let { moreCnt } = props;
6954
- let range = computeRange(props);
6955
- let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
6956
- ? moreLinkText.call(calendarApi, moreCnt)
6957
- : `+${moreCnt} ${moreLinkText}`;
6958
- let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
6959
- let renderProps = {
6960
- num: moreCnt,
6961
- shortText: `+${moreCnt}`,
6962
- text,
6963
- view: viewApi,
6964
- };
6965
- return (y(_, null,
6966
- Boolean(props.moreCnt) && (y(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
6967
- ...(props.elClasses || []),
6968
- 'fc-more-link',
6969
- ], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
6970
- state.isPopoverOpen && (y(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
6971
- props.alignmentElRef.current :
6972
- this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
6973
- }));
6974
- }
6975
- componentDidMount() {
6976
- this.updateParentEl();
6977
- }
6978
- componentDidUpdate() {
6979
- this.updateParentEl();
6980
- }
6981
- updateParentEl() {
6982
- if (this.linkEl) {
6983
- this.parentEl = elementClosest(this.linkEl, '.fc-view-harness');
6984
- }
6784
+ let { props, context } = this;
6785
+ let { options } = context;
6786
+ let { eventRange } = props;
6787
+ let { ui } = eventRange;
6788
+ let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
6789
+ let timeText = buildEventRangeTimeText(eventRange, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd, props.startOverride, props.endOverride);
6790
+ return (_(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
6791
+ borderColor: ui.borderColor,
6792
+ backgroundColor: ui.backgroundColor,
6793
+ }, elAttrs: getEventRangeAnchorAttrs(eventRange, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (_(k$1, null,
6794
+ _(InnerContent, { elTag: "div", elClasses: ['fc-event-inner'], elStyle: { color: eventContentArg.textColor } }),
6795
+ Boolean(eventContentArg.isStartResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-start" })),
6796
+ Boolean(eventContentArg.isEndResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
6985
6797
  }
6986
6798
  }
6987
- function renderMoreLinkInner(props) {
6988
- return props.text;
6799
+ function renderInnerContent$1(innerProps) {
6800
+ return (_(k$1, null,
6801
+ innerProps.timeText && (_("div", { className: "fc-event-time" }, innerProps.timeText)),
6802
+ _("div", { className: "fc-event-title-outer" },
6803
+ _("div", { className: "fc-event-title" }, innerProps.event.title || _(k$1, null, "\u00A0")))));
6989
6804
  }
6990
- function computeRange(props) {
6991
- if (props.allDayDate) {
6992
- return {
6993
- start: props.allDayDate,
6994
- end: addDays(props.allDayDate, 1),
6995
- };
6996
- }
6997
- let { hiddenSegs } = props;
6998
- return {
6999
- start: computeEarliestSegStart(hiddenSegs),
7000
- end: computeLatestSegEnd(hiddenSegs),
6805
+
6806
+ const NowIndicatorContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
6807
+ let { options } = context;
6808
+ let renderProps = {
6809
+ isAxis: props.isAxis,
6810
+ date: context.dateEnv.toDate(props.date),
6811
+ view: context.viewApi,
7001
6812
  };
6813
+ return (_(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
6814
+ }));
6815
+
6816
+ class BgEvent extends BaseComponent {
6817
+ render() {
6818
+ let { props } = this;
6819
+ let { eventRange } = props;
6820
+ return (_(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, eventRange: eventRange, isStart: props.isStart, isEnd: props.isEnd, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
6821
+ }
7002
6822
  }
7003
- function computeEarliestSegStart(segs) {
7004
- return segs.reduce(pickEarliestStart).eventRange.range.start;
7005
- }
7006
- function pickEarliestStart(seg0, seg1) {
7007
- return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
6823
+ function renderInnerContent(props) {
6824
+ let { title } = props.event;
6825
+ return title && (_("div", { className: "fc-event-title" }, props.event.title));
7008
6826
  }
7009
- function computeLatestSegEnd(segs) {
7010
- return segs.reduce(pickLatestEnd).eventRange.range.end;
6827
+ function renderFill(fillType) {
6828
+ return (_("div", { className: `fc-${fillType}` }));
7011
6829
  }
7012
- function pickLatestEnd(seg0, seg1) {
7013
- return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
6830
+
6831
+ const WeekNumberContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
6832
+ let { dateEnv, options } = context;
6833
+ let { date } = props;
6834
+ let format = options.weekNumberFormat || props.defaultFormat;
6835
+ let num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?
6836
+ let text = dateEnv.format(date, format);
6837
+ let renderProps = { num, text, date };
6838
+ return (_(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
6839
+ , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
6840
+ }));
6841
+ function renderInner(innerProps) {
6842
+ return innerProps.text;
7014
6843
  }
7015
6844
 
7016
6845
  class ViewContainer extends BaseComponent {
@@ -7018,7 +6847,7 @@ var FullCalendar = (function (exports) {
7018
6847
  let { props, context } = this;
7019
6848
  let { options } = context;
7020
6849
  let renderProps = { view: context.viewApi };
7021
- return (y(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
6850
+ return (_(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
7022
6851
  ...buildViewClassNames(props.viewSpec),
7023
6852
  ...(props.elClasses || []),
7024
6853
  ], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
@@ -7092,6 +6921,9 @@ var FullCalendar = (function (exports) {
7092
6921
  return null;
7093
6922
  }
7094
6923
 
6924
+ /*
6925
+ Calendar instance for ALL frameworks
6926
+ */
7095
6927
  class CalendarImpl {
7096
6928
  getCurrentData() {
7097
6929
  return this.currentDataManager.getCurrentData();
@@ -7104,7 +6936,7 @@ var FullCalendar = (function (exports) {
7104
6936
  callback();
7105
6937
  }
7106
6938
  updateSize() {
7107
- this.trigger('_resize', true);
6939
+ console.warn('Doesnt do anything!');
7108
6940
  }
7109
6941
  // Options
7110
6942
  // -----------------------------------------------------------------------------------------------------------------
@@ -7463,7 +7295,7 @@ var FullCalendar = (function (exports) {
7463
7295
  scrollToTime(timeInput) {
7464
7296
  let time = createDuration(timeInput);
7465
7297
  if (time) {
7466
- this.trigger('_scrollRequest', { time });
7298
+ this.trigger('_timeScrollRequest', time);
7467
7299
  }
7468
7300
  }
7469
7301
  }
@@ -7563,7 +7395,7 @@ var FullCalendar = (function (exports) {
7563
7395
  getEventTargetViaRoot: getEventTargetViaRoot,
7564
7396
  getUniqueDomId: getUniqueDomId,
7565
7397
  parseClassNames: parseClassNames,
7566
- getCanVGrowWithinCell: getCanVGrowWithinCell,
7398
+ fracToCssDim: fracToCssDim,
7567
7399
  createEmptyEventStore: createEmptyEventStore,
7568
7400
  mergeEventStores: mergeEventStores,
7569
7401
  getRelevantEvents: getRelevantEvents,
@@ -7574,6 +7406,13 @@ var FullCalendar = (function (exports) {
7574
7406
  getDayClassNames: getDayClassNames,
7575
7407
  getDateMeta: getDateMeta,
7576
7408
  getSlotClassNames: getSlotClassNames,
7409
+ setStateDimMap: setStateDimMap,
7410
+ isDimMapsEqual: isDimMapsEqual,
7411
+ isDimsEqual: isDimsEqual,
7412
+ watchSize: watchSize,
7413
+ watchWidth: watchWidth,
7414
+ watchHeight: watchHeight,
7415
+ afterSize: afterSize,
7577
7416
  buildNavLinkAttrs: buildNavLinkAttrs,
7578
7417
  preventDefault: preventDefault,
7579
7418
  whenTransitionDone: whenTransitionDone,
@@ -7637,20 +7476,19 @@ var FullCalendar = (function (exports) {
7637
7476
  config: config,
7638
7477
  parseDragMeta: parseDragMeta,
7639
7478
  CalendarRoot: CalendarRoot,
7640
- DayHeader: DayHeader,
7641
- computeFallbackHeaderFormat: computeFallbackHeaderFormat,
7642
- TableDateCell: TableDateCell,
7643
- TableDowCell: TableDowCell,
7644
7479
  DaySeriesModel: DaySeriesModel,
7645
7480
  sliceEventStore: sliceEventStore,
7646
7481
  hasBgRendering: hasBgRendering,
7647
- getElSeg: getElSeg,
7648
- buildSegTimeText: buildSegTimeText,
7482
+ getElEventRange: getElEventRange,
7483
+ buildEventRangeTimeText: buildEventRangeTimeText,
7649
7484
  sortEventSegs: sortEventSegs,
7650
- getSegMeta: getSegMeta,
7485
+ getEventRangeMeta: getEventRangeMeta,
7651
7486
  buildEventRangeKey: buildEventRangeKey,
7652
- getSegAnchorAttrs: getSegAnchorAttrs,
7487
+ getEventRangeAnchorAttrs: getEventRangeAnchorAttrs,
7653
7488
  DayTableModel: DayTableModel,
7489
+ Scroller: Scroller,
7490
+ getNormalizedScrollX: getNormalizedScrollX,
7491
+ setNormalizedScrollX: setNormalizedScrollX,
7654
7492
  Slicer: Slicer,
7655
7493
  applyMutationToEventStore: applyMutationToEventStore,
7656
7494
  isPropsValid: isPropsValid,
@@ -7660,26 +7498,14 @@ var FullCalendar = (function (exports) {
7660
7498
  BaseComponent: BaseComponent,
7661
7499
  setRef: setRef,
7662
7500
  DelayedRunner: DelayedRunner,
7663
- SimpleScrollGrid: SimpleScrollGrid,
7664
- hasShrinkWidth: hasShrinkWidth,
7665
- renderMicroColGroup: renderMicroColGroup,
7666
- getScrollGridClassNames: getScrollGridClassNames,
7667
- getSectionClassNames: getSectionClassNames,
7668
- getSectionHasLiquidHeight: getSectionHasLiquidHeight,
7669
- getAllowYScrolling: getAllowYScrolling,
7670
- renderChunkContent: renderChunkContent,
7671
- computeShrinkWidth: computeShrinkWidth,
7672
- sanitizeShrinkWidth: sanitizeShrinkWidth,
7673
- isColPropsEqual: isColPropsEqual,
7674
- renderScrollShim: renderScrollShim,
7675
7501
  getStickyFooterScrollbar: getStickyFooterScrollbar,
7676
7502
  getStickyHeaderDates: getStickyHeaderDates,
7677
- Scroller: Scroller,
7503
+ getIsHeightAuto: getIsHeightAuto,
7504
+ getScrollerSyncerClass: getScrollerSyncerClass,
7678
7505
  getScrollbarWidths: getScrollbarWidths,
7679
7506
  RefMap: RefMap,
7680
7507
  getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft,
7681
7508
  NowTimer: NowTimer,
7682
- ScrollResponder: ScrollResponder,
7683
7509
  StandardEvent: StandardEvent,
7684
7510
  NowIndicatorContainer: NowIndicatorContainer,
7685
7511
  DayCellContainer: DayCellContainer,
@@ -7832,7 +7658,7 @@ var FullCalendar = (function (exports) {
7832
7658
  initialView: input.initialView || '',
7833
7659
  elementDraggingImpl: input.elementDraggingImpl,
7834
7660
  optionChangeHandlers: input.optionChangeHandlers || {},
7835
- scrollGridImpl: input.scrollGridImpl || null,
7661
+ scrollerSyncerClass: input.scrollerSyncerClass || null,
7836
7662
  listenerRefiners: input.listenerRefiners || {},
7837
7663
  optionRefiners: input.optionRefiners || {},
7838
7664
  propSetHandlers: input.propSetHandlers || {},
@@ -7870,7 +7696,7 @@ var FullCalendar = (function (exports) {
7870
7696
  initialView: '',
7871
7697
  elementDraggingImpl: null,
7872
7698
  optionChangeHandlers: {},
7873
- scrollGridImpl: null,
7699
+ scrollerSyncerClass: null,
7874
7700
  listenerRefiners: {},
7875
7701
  optionRefiners: {},
7876
7702
  propSetHandlers: {},
@@ -7940,7 +7766,7 @@ var FullCalendar = (function (exports) {
7940
7766
  initialView: hooks0.initialView || hooks1.initialView,
7941
7767
  elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
7942
7768
  optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
7943
- scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,
7769
+ scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,
7944
7770
  listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
7945
7771
  optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
7946
7772
  propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
@@ -7960,7 +7786,6 @@ var FullCalendar = (function (exports) {
7960
7786
  }
7961
7787
  StandardTheme.prototype.classes = {
7962
7788
  root: 'fc-theme-standard',
7963
- tableCellShaded: 'fc-cell-shaded',
7964
7789
  buttonGroup: 'fc-button-group',
7965
7790
  button: 'fc-button fc-button-primary',
7966
7791
  buttonActive: 'fc-button-active',
@@ -8056,7 +7881,7 @@ var FullCalendar = (function (exports) {
8056
7881
  };
8057
7882
  }
8058
7883
  function createViewHookComponent(options) {
8059
- return (viewProps) => (y(ViewContextType.Consumer, null, (context) => (y(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
7884
+ return (viewProps) => (_(ViewContextType.Consumer, null, (context) => (_(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
8060
7885
  }
8061
7886
 
8062
7887
  function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
@@ -9323,7 +9148,9 @@ var FullCalendar = (function (exports) {
9323
9148
  class ToolbarSection extends BaseComponent {
9324
9149
  render() {
9325
9150
  let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
9326
- return y('div', { className: 'fc-toolbar-chunk' }, ...children);
9151
+ return _('div', {
9152
+ className: 'fc-toolbar-chunk fc-toolbar-' + this.props.name
9153
+ }, ...children);
9327
9154
  }
9328
9155
  renderWidgetGroup(widgetGroup) {
9329
9156
  let { props } = this;
@@ -9334,7 +9161,7 @@ var FullCalendar = (function (exports) {
9334
9161
  let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
9335
9162
  if (buttonName === 'title') {
9336
9163
  isOnlyButtons = false;
9337
- children.push(y("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
9164
+ children.push(_("h2", { className: "fc-toolbar-title" }, props.title));
9338
9165
  }
9339
9166
  else {
9340
9167
  let isPressed = buttonName === props.activeButton;
@@ -9345,12 +9172,12 @@ var FullCalendar = (function (exports) {
9345
9172
  if (isPressed) {
9346
9173
  buttonClasses.push(theme.getClass('buttonActive'));
9347
9174
  }
9348
- children.push(y("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? y("span", { className: buttonIcon, role: "img" }) : '')));
9175
+ children.push(_("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? _("span", { className: buttonIcon, role: "img" }) : '')));
9349
9176
  }
9350
9177
  }
9351
9178
  if (children.length > 1) {
9352
9179
  let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
9353
- return y('div', { className: groupClassName }, ...children);
9180
+ return _('div', { className: groupClassName }, ...children);
9354
9181
  }
9355
9182
  return children[0];
9356
9183
  }
@@ -9383,72 +9210,14 @@ var FullCalendar = (function (exports) {
9383
9210
  'fc-toolbar',
9384
9211
  forceLtr ? 'fc-toolbar-ltr' : '',
9385
9212
  ];
9386
- return (y("div", { className: classNames.join(' ') },
9213
+ return (_("div", { className: classNames.join(' ') },
9387
9214
  this.renderSection('start', startContent || []),
9388
9215
  this.renderSection('center', centerContent || []),
9389
9216
  this.renderSection('end', endContent || [])));
9390
9217
  }
9391
9218
  renderSection(key, widgetGroups) {
9392
9219
  let { props } = this;
9393
- return (y(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }));
9394
- }
9395
- }
9396
-
9397
- class ViewHarness extends BaseComponent {
9398
- constructor() {
9399
- super(...arguments);
9400
- this.state = {
9401
- availableWidth: null,
9402
- };
9403
- this.handleEl = (el) => {
9404
- this.el = el;
9405
- setRef(this.props.elRef, el);
9406
- this.updateAvailableWidth();
9407
- };
9408
- this.handleResize = () => {
9409
- this.updateAvailableWidth();
9410
- };
9411
- }
9412
- render() {
9413
- let { props, state } = this;
9414
- let { aspectRatio } = props;
9415
- let classNames = [
9416
- 'fc-view-harness',
9417
- (aspectRatio || props.liquid || props.height)
9418
- ? 'fc-view-harness-active' // harness controls the height
9419
- : 'fc-view-harness-passive', // let the view do the height
9420
- ];
9421
- let height = '';
9422
- let paddingBottom = '';
9423
- if (aspectRatio) {
9424
- if (state.availableWidth !== null) {
9425
- height = state.availableWidth / aspectRatio;
9426
- }
9427
- else {
9428
- // while waiting to know availableWidth, we can't set height to *zero*
9429
- // because will cause lots of unnecessary scrollbars within scrollgrid.
9430
- // BETTER: don't start rendering ANYTHING yet until we know container width
9431
- // NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606)
9432
- paddingBottom = `${(1 / aspectRatio) * 100}%`;
9433
- }
9434
- }
9435
- else {
9436
- height = props.height || '';
9437
- }
9438
- return (y("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
9439
- }
9440
- componentDidMount() {
9441
- this.context.addResizeHandler(this.handleResize);
9442
- }
9443
- componentWillUnmount() {
9444
- this.context.removeResizeHandler(this.handleResize);
9445
- }
9446
- updateAvailableWidth() {
9447
- if (this.el && // needed. but why?
9448
- this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth
9449
- ) {
9450
- this.setState({ availableWidth: this.el.offsetWidth });
9451
- }
9220
+ return (_(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
9452
9221
  }
9453
9222
  }
9454
9223
 
@@ -9461,8 +9230,8 @@ var FullCalendar = (function (exports) {
9461
9230
  this.handleSegClick = (ev, segEl) => {
9462
9231
  let { component } = this;
9463
9232
  let { context } = component;
9464
- let seg = getElSeg(segEl);
9465
- if (seg && // might be the <div> surrounding the more link
9233
+ let eventRange = getElEventRange(segEl);
9234
+ if (eventRange && // might be the <div> surrounding the more link
9466
9235
  component.isValidSegDownEl(ev.target)) {
9467
9236
  // our way to simulate a link click for elements that can't be <a> tags
9468
9237
  // grab before trigger fired in case trigger trashes DOM thru rerendering
@@ -9470,7 +9239,7 @@ var FullCalendar = (function (exports) {
9470
9239
  let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
9471
9240
  context.emitter.trigger('eventClick', {
9472
9241
  el: segEl,
9473
- event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance),
9242
+ event: new EventImpl(component.context, eventRange.def, eventRange.instance),
9474
9243
  jsEvent: ev,
9475
9244
  view: context.viewApi,
9476
9245
  });
@@ -9498,7 +9267,7 @@ var FullCalendar = (function (exports) {
9498
9267
  }
9499
9268
  };
9500
9269
  this.handleSegEnter = (ev, segEl) => {
9501
- if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
9270
+ if (getElEventRange(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
9502
9271
  this.currentSegEl = segEl;
9503
9272
  this.triggerEvent('eventMouseEnter', ev, segEl);
9504
9273
  }
@@ -9518,11 +9287,11 @@ var FullCalendar = (function (exports) {
9518
9287
  triggerEvent(publicEvName, ev, segEl) {
9519
9288
  let { component } = this;
9520
9289
  let { context } = component;
9521
- let seg = getElSeg(segEl);
9290
+ let eventRange = getElEventRange(segEl);
9522
9291
  if (!ev || component.isValidSegDownEl(ev.target)) {
9523
9292
  context.emitter.trigger(publicEvName, {
9524
9293
  el: segEl,
9525
- event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance),
9294
+ event: new EventImpl(context, eventRange.def, eventRange.instance),
9526
9295
  jsEvent: ev,
9527
9296
  view: context.viewApi,
9528
9297
  });
@@ -9530,19 +9299,34 @@ var FullCalendar = (function (exports) {
9530
9299
  }
9531
9300
  }
9532
9301
 
9302
+ class ViewHarness extends b {
9303
+ render() {
9304
+ const { props } = this;
9305
+ return (_("div", { className: [
9306
+ 'fc-view-harness',
9307
+ props.height != null
9308
+ ? 'fc-view-harness-fixedheight'
9309
+ : props.heightLiquid
9310
+ ? 'fc-view-harness-liquid'
9311
+ : props.aspectRatio != null
9312
+ ? 'fc-view-harness-aspectratio'
9313
+ : ''
9314
+ ].join(' '), style: {
9315
+ height: props.height,
9316
+ paddingBottom: props.aspectRatio != null
9317
+ ? `${(1 / props.aspectRatio) * 100}%`
9318
+ : undefined
9319
+ } }, props.children));
9320
+ }
9321
+ }
9322
+
9533
9323
  class CalendarContent extends PureComponent {
9534
9324
  constructor() {
9535
9325
  super(...arguments);
9536
9326
  this.buildViewContext = memoize(buildViewContext);
9537
9327
  this.buildViewPropTransformers = memoize(buildViewPropTransformers);
9538
9328
  this.buildToolbarProps = memoize(buildToolbarProps);
9539
- this.headerRef = d();
9540
- this.footerRef = d();
9541
9329
  this.interactionsStore = {};
9542
- // eslint-disable-next-line
9543
- this.state = {
9544
- viewLabelId: getUniqueDomId(),
9545
- };
9546
9330
  // Component Registration
9547
9331
  // -----------------------------------------------------------------------------------------------------------------
9548
9332
  this.registerInteractiveComponent = (component, settingsInput) => {
@@ -9566,20 +9350,6 @@ var FullCalendar = (function (exports) {
9566
9350
  }
9567
9351
  delete interactionSettingsStore[component.uid];
9568
9352
  };
9569
- // Resizing
9570
- // -----------------------------------------------------------------------------------------------------------------
9571
- this.resizeRunner = new DelayedRunner(() => {
9572
- this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
9573
- this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
9574
- });
9575
- this.handleWindowResize = (ev) => {
9576
- let { options } = this.props;
9577
- if (options.handleWindowResize &&
9578
- ev.target === window // avoid jqui events
9579
- ) {
9580
- this.resizeRunner.request(options.windowResizeDelay);
9581
- }
9582
- };
9583
9353
  }
9584
9354
  /*
9585
9355
  renders INSIDE of an outer div
@@ -9589,14 +9359,12 @@ var FullCalendar = (function (exports) {
9589
9359
  let { toolbarConfig, options } = props;
9590
9360
  let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
9591
9361
  props.viewTitle);
9592
- let viewVGrow = false;
9593
- let viewHeight = '';
9362
+ let viewHeight;
9363
+ let viewHeightLiquid = false;
9594
9364
  let viewAspectRatio;
9595
- if (props.isHeightAuto || props.forPrint) {
9596
- viewHeight = '';
9597
- }
9365
+ if (props.forPrint || getIsHeightAuto(options)) ;
9598
9366
  else if (options.height != null) {
9599
- viewVGrow = true;
9367
+ viewHeightLiquid = true;
9600
9368
  }
9601
9369
  else if (options.contentHeight != null) {
9602
9370
  viewHeight = options.contentHeight;
@@ -9605,21 +9373,17 @@ var FullCalendar = (function (exports) {
9605
9373
  viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
9606
9374
  }
9607
9375
  let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
9608
- let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
9609
- ? this.state.viewLabelId
9610
- : undefined;
9611
- return (y(ViewContextType.Provider, { value: viewContext },
9612
- toolbarConfig.header && (y(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
9613
- y(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
9376
+ return (_(ViewContextType.Provider, { value: viewContext },
9377
+ toolbarConfig.header && (_(Toolbar, Object.assign({ extraClassName: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
9378
+ _(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
9614
9379
  this.renderView(props),
9615
9380
  this.buildAppendContent()),
9616
- toolbarConfig.footer && (y(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
9381
+ toolbarConfig.footer && (_(Toolbar, Object.assign({ extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
9617
9382
  }
9618
9383
  componentDidMount() {
9619
9384
  let { props } = this;
9620
9385
  this.calendarInteractions = props.pluginHooks.calendarInteractions
9621
9386
  .map((CalendarInteractionClass) => new CalendarInteractionClass(props));
9622
- window.addEventListener('resize', this.handleWindowResize);
9623
9387
  let { propSetHandlers } = props.pluginHooks;
9624
9388
  for (let propName in propSetHandlers) {
9625
9389
  propSetHandlers[propName](props[propName], props);
@@ -9635,8 +9399,6 @@ var FullCalendar = (function (exports) {
9635
9399
  }
9636
9400
  }
9637
9401
  componentWillUnmount() {
9638
- window.removeEventListener('resize', this.handleWindowResize);
9639
- this.resizeRunner.clear();
9640
9402
  for (let interaction of this.calendarInteractions) {
9641
9403
  interaction.destroy();
9642
9404
  }
@@ -9645,7 +9407,7 @@ var FullCalendar = (function (exports) {
9645
9407
  buildAppendContent() {
9646
9408
  let { props } = this;
9647
9409
  let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
9648
- return y(_, {}, ...children);
9410
+ return _(k$1, {}, ...children);
9649
9411
  }
9650
9412
  renderView(props) {
9651
9413
  let { pluginHooks } = props;
@@ -9659,7 +9421,6 @@ var FullCalendar = (function (exports) {
9659
9421
  eventSelection: props.eventSelection,
9660
9422
  eventDrag: props.eventDrag,
9661
9423
  eventResize: props.eventResize,
9662
- isHeightAuto: props.isHeightAuto,
9663
9424
  forPrint: props.forPrint,
9664
9425
  };
9665
9426
  let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
@@ -9667,7 +9428,7 @@ var FullCalendar = (function (exports) {
9667
9428
  Object.assign(viewProps, transformer.transform(viewProps, props));
9668
9429
  }
9669
9430
  let ViewComponent = viewSpec.component;
9670
- return (y(ViewComponent, Object.assign({}, viewProps)));
9431
+ return (_(ViewComponent, Object.assign({}, viewProps)));
9671
9432
  }
9672
9433
  }
9673
9434
  function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
@@ -9690,6 +9451,9 @@ var FullCalendar = (function (exports) {
9690
9451
  return theClasses.map((TheClass) => new TheClass());
9691
9452
  }
9692
9453
 
9454
+ /*
9455
+ Vanilla JS API
9456
+ */
9693
9457
  class Calendar extends CalendarImpl {
9694
9458
  constructor(el, optionOverrides = {}) {
9695
9459
  super();
@@ -9714,17 +9478,17 @@ var FullCalendar = (function (exports) {
9714
9478
  this.isRendered = true;
9715
9479
  let { currentData } = this;
9716
9480
  flushSync(() => {
9717
- D$1(y(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => {
9481
+ B$2(_(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, forPrint) => {
9718
9482
  this.setClassNames(classNames);
9719
9483
  this.setHeight(height);
9720
- return (y(RenderId.Provider, { value: this.customContentRenderId },
9721
- y(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData))));
9484
+ return (_(RenderId.Provider, { value: this.customContentRenderId },
9485
+ _(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
9722
9486
  }), this.el);
9723
9487
  });
9724
9488
  }
9725
9489
  else if (this.isRendered) {
9726
9490
  this.isRendered = false;
9727
- D$1(null, this.el);
9491
+ B$2(null, this.el);
9728
9492
  this.setClassNames([]);
9729
9493
  this.setHeight('');
9730
9494
  }
@@ -9835,7 +9599,7 @@ var FullCalendar = (function (exports) {
9835
9599
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
9836
9600
  }
9837
9601
 
9838
- const version = '6.1.15';
9602
+ const version = '7.0.0-beta.1';
9839
9603
 
9840
9604
  exports.Calendar = Calendar;
9841
9605
  exports.Internal = internal;