ivt 0.6.7 → 0.6.8

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 (232) hide show
  1. package/dist/accordion/index.mjs +15 -15
  2. package/dist/accordion-table/index.mjs +27 -27
  3. package/dist/alert/index.mjs +2 -2
  4. package/dist/alert-dialog/index.mjs +17 -17
  5. package/dist/aspect-ratio/index.mjs +1 -1
  6. package/dist/auto-complete-multi-select/index.mjs +35 -35
  7. package/dist/auto-complete-multi-select/index.mjs.map +1 -1
  8. package/dist/avatar/index.mjs +7 -7
  9. package/dist/badge/index.mjs +3 -3
  10. package/dist/base/index.mjs +50 -50
  11. package/dist/breadcrumb/index.mjs +5 -5
  12. package/dist/button/index.mjs +3 -3
  13. package/dist/button-group/index.mjs +4 -4
  14. package/dist/calendar/index.mjs +9 -9
  15. package/dist/card/index.mjs +3 -3
  16. package/dist/carousel/index.mjs +4 -4
  17. package/dist/chart/index.mjs +4 -4
  18. package/dist/checkbox/index.mjs +14 -14
  19. package/dist/chunks/{CalendarRange-yEDYUjQD.mjs → CalendarRange-DinEz7Bu.mjs} +8 -8
  20. package/dist/chunks/{CalendarRange-yEDYUjQD.mjs.map → CalendarRange-DinEz7Bu.mjs.map} +1 -1
  21. package/dist/chunks/{ComboboxField-ILa8OaOB.mjs → ComboboxField-DFhG2o8Q.mjs} +9 -9
  22. package/dist/chunks/{ComboboxField-ILa8OaOB.mjs.map → ComboboxField-DFhG2o8Q.mjs.map} +1 -1
  23. package/dist/chunks/{Container-DIxGDpnK.mjs → Container-BFn84LrW.mjs} +2 -2
  24. package/dist/chunks/{Container-DIxGDpnK.mjs.map → Container-BFn84LrW.mjs.map} +1 -1
  25. package/dist/chunks/{DeleteConfirmationModal-Chw9qtJ5.mjs → DeleteConfirmationModal-COywnQdI.mjs} +4 -4
  26. package/dist/chunks/{DeleteConfirmationModal-Chw9qtJ5.mjs.map → DeleteConfirmationModal-COywnQdI.mjs.map} +1 -1
  27. package/dist/chunks/{ListItem-Cmc5KRwa.mjs → ListItem-DhlGqvBa.mjs} +4 -4
  28. package/dist/chunks/{ListItem-Cmc5KRwa.mjs.map → ListItem-DhlGqvBa.mjs.map} +1 -1
  29. package/dist/chunks/{TooltipIndicator-DmbkG9GU.mjs → TooltipIndicator-BqQlRbIh.mjs} +4 -4
  30. package/dist/chunks/{TooltipIndicator-DmbkG9GU.mjs.map → TooltipIndicator-BqQlRbIh.mjs.map} +1 -1
  31. package/dist/chunks/{_commonjsHelpers-BB7msia9.mjs → _commonjsHelpers-zXRxA_Z_.mjs} +1 -1
  32. package/dist/chunks/_commonjsHelpers-zXRxA_Z_.mjs.map +1 -0
  33. package/dist/chunks/{accordion-CEM9oHG4.mjs → accordion-ChA6nm2v.mjs} +11 -11
  34. package/dist/chunks/{accordion-CEM9oHG4.mjs.map → accordion-ChA6nm2v.mjs.map} +1 -1
  35. package/dist/chunks/{badge-Bq7g6DlG.mjs → badge-CZ5_5z6L.mjs} +2 -2
  36. package/dist/chunks/{badge-Bq7g6DlG.mjs.map → badge-CZ5_5z6L.mjs.map} +1 -1
  37. package/dist/chunks/{bundle-mjs-DF1QM7yV.mjs → bundle-mjs-CaEEedsA.mjs} +1 -1
  38. package/dist/chunks/{bundle-mjs-DF1QM7yV.mjs.map → bundle-mjs-CaEEedsA.mjs.map} +1 -1
  39. package/dist/chunks/{button-C0ijXnnF.mjs → button-BrCoykyb.mjs} +2 -2
  40. package/dist/chunks/{button-C0ijXnnF.mjs.map → button-BrCoykyb.mjs.map} +1 -1
  41. package/dist/chunks/{calendar-DZgstGv7.mjs → calendar-C8Mepf-u.mjs} +7 -7
  42. package/dist/chunks/{calendar-DZgstGv7.mjs.map → calendar-C8Mepf-u.mjs.map} +1 -1
  43. package/dist/chunks/{calendar-days-Bvb62uyh.mjs → calendar-days-DquGCG3-.mjs} +2 -2
  44. package/dist/chunks/{calendar-days-Bvb62uyh.mjs.map → calendar-days-DquGCG3-.mjs.map} +1 -1
  45. package/dist/chunks/{card-BQVVUjMb.mjs → card-KP_kMe8R.mjs} +2 -2
  46. package/dist/chunks/{card-BQVVUjMb.mjs.map → card-KP_kMe8R.mjs.map} +1 -1
  47. package/dist/chunks/{check-DduIDKAH.mjs → check-C_LwI9KH.mjs} +2 -2
  48. package/dist/chunks/{check-DduIDKAH.mjs.map → check-C_LwI9KH.mjs.map} +1 -1
  49. package/dist/chunks/{checkbox-CWK1-JLs.mjs → checkbox-Bv39fyuN.mjs} +11 -11
  50. package/dist/chunks/{checkbox-CWK1-JLs.mjs.map → checkbox-Bv39fyuN.mjs.map} +1 -1
  51. package/dist/chunks/{chevron-down-C8lGEIzE.mjs → chevron-down-D2i2UyYP.mjs} +2 -2
  52. package/dist/chunks/{chevron-down-C8lGEIzE.mjs.map → chevron-down-D2i2UyYP.mjs.map} +1 -1
  53. package/dist/chunks/{chevron-left-Ca4MIUps.mjs → chevron-left-BbfoPbuR.mjs} +2 -2
  54. package/dist/chunks/{chevron-left-Ca4MIUps.mjs.map → chevron-left-BbfoPbuR.mjs.map} +1 -1
  55. package/dist/chunks/{chevron-right-D8jyu1Ce.mjs → chevron-right-DFRHRqTX.mjs} +2 -2
  56. package/dist/chunks/{chevron-right-D8jyu1Ce.mjs.map → chevron-right-DFRHRqTX.mjs.map} +1 -1
  57. package/dist/chunks/{chevrons-up-down-2G_mHB5d.mjs → chevrons-up-down-DSPpUp87.mjs} +2 -2
  58. package/dist/chunks/{chevrons-up-down-2G_mHB5d.mjs.map → chevrons-up-down-DSPpUp87.mjs.map} +1 -1
  59. package/dist/chunks/{command-CTTEi-Tw.mjs → command-Bm6lmqaD.mjs} +8 -8
  60. package/dist/chunks/{command-CTTEi-Tw.mjs.map → command-Bm6lmqaD.mjs.map} +1 -1
  61. package/dist/chunks/{createLucideIcon-CyWof2Fq.mjs → createLucideIcon-BskRIXUQ.mjs} +1 -1
  62. package/dist/chunks/{createLucideIcon-CyWof2Fq.mjs.map → createLucideIcon-BskRIXUQ.mjs.map} +1 -1
  63. package/dist/chunks/{date-Nk-MIRuv.mjs → date-DHnqvn4D.mjs} +2 -2
  64. package/dist/chunks/{date-Nk-MIRuv.mjs.map → date-DHnqvn4D.mjs.map} +1 -1
  65. package/dist/chunks/{dialog-DsCgCf_e.mjs → dialog-CJHIAZTE.mjs} +4 -4
  66. package/dist/chunks/{dialog-DsCgCf_e.mjs.map → dialog-CJHIAZTE.mjs.map} +1 -1
  67. package/dist/chunks/{ellipsis-CETjPDAu.mjs → ellipsis-D6Uved1a.mjs} +2 -2
  68. package/dist/chunks/{ellipsis-CETjPDAu.mjs.map → ellipsis-D6Uved1a.mjs.map} +1 -1
  69. package/dist/chunks/{form-Cu6WYy_F.mjs → form-CCVv5YFB.mjs} +3 -3
  70. package/dist/chunks/{form-Cu6WYy_F.mjs.map → form-CCVv5YFB.mjs.map} +1 -1
  71. package/dist/chunks/{format-Dy5xvA9f.mjs → format-Bt8khlQQ.mjs} +1 -1
  72. package/dist/chunks/{format-Dy5xvA9f.mjs.map → format-Bt8khlQQ.mjs.map} +1 -1
  73. package/dist/chunks/{format-numbers-Cv0AFOA0.mjs → format-numbers-JNwpv2ZY.mjs} +1 -1
  74. package/dist/chunks/{format-numbers-Cv0AFOA0.mjs.map → format-numbers-JNwpv2ZY.mjs.map} +1 -1
  75. package/dist/chunks/{hover-card-DftgNnGK.mjs → hover-card-m57bFK9J.mjs} +11 -11
  76. package/dist/chunks/{hover-card-DftgNnGK.mjs.map → hover-card-m57bFK9J.mjs.map} +1 -1
  77. package/dist/chunks/{index-CUXpXuiX.mjs → index-3VUh2xvo.mjs} +15 -15
  78. package/dist/chunks/{index-CUXpXuiX.mjs.map → index-3VUh2xvo.mjs.map} +1 -1
  79. package/dist/chunks/{index-D56BYstR.mjs → index-BIkaCdbt.mjs} +1 -1
  80. package/dist/chunks/{index-D56BYstR.mjs.map → index-BIkaCdbt.mjs.map} +1 -1
  81. package/dist/chunks/{index-2anlJbdb.mjs → index-BTJfHGTc.mjs} +3 -3
  82. package/dist/chunks/{index-2anlJbdb.mjs.map → index-BTJfHGTc.mjs.map} +1 -1
  83. package/dist/chunks/{index-CKARIk9k.mjs → index-BVSvPx6q.mjs} +5 -5
  84. package/dist/chunks/{index-CKARIk9k.mjs.map → index-BVSvPx6q.mjs.map} +1 -1
  85. package/dist/chunks/{index-aXbRFMsA.mjs → index-BZW8t8v3.mjs} +1 -1
  86. package/dist/chunks/{index-aXbRFMsA.mjs.map → index-BZW8t8v3.mjs.map} +1 -1
  87. package/dist/chunks/{index-sGgLIg5I.mjs → index-BludQSPL.mjs} +11 -11
  88. package/dist/chunks/{index-sGgLIg5I.mjs.map → index-BludQSPL.mjs.map} +1 -1
  89. package/dist/chunks/{index-L4pU8dCQ.mjs → index-BtVAcGzW.mjs} +1 -1
  90. package/dist/chunks/{index-L4pU8dCQ.mjs.map → index-BtVAcGzW.mjs.map} +1 -1
  91. package/dist/chunks/{index-BI2MxMeC.mjs → index-ByMLqUYL.mjs} +1 -1
  92. package/dist/chunks/{index-BI2MxMeC.mjs.map → index-ByMLqUYL.mjs.map} +1 -1
  93. package/dist/chunks/{index-DAZztiKf.mjs → index-C-hJOAC4.mjs} +2 -2
  94. package/dist/chunks/{index-DAZztiKf.mjs.map → index-C-hJOAC4.mjs.map} +1 -1
  95. package/dist/chunks/{index-BsB-iQGw.mjs → index-CDrmAWkg.mjs} +1 -1
  96. package/dist/chunks/{index-BsB-iQGw.mjs.map → index-CDrmAWkg.mjs.map} +1 -1
  97. package/dist/chunks/{index-Dot3Y4xv.mjs → index-CIptCfJf.mjs} +9 -9
  98. package/dist/chunks/{index-Dot3Y4xv.mjs.map → index-CIptCfJf.mjs.map} +1 -1
  99. package/dist/chunks/{index-DE-b60L0.mjs → index-CXwTZrpH.mjs} +9 -9
  100. package/dist/chunks/{index-DE-b60L0.mjs.map → index-CXwTZrpH.mjs.map} +1 -1
  101. package/dist/chunks/{index-BEh8ek6-.mjs → index-CakOZHO3.mjs} +2 -2
  102. package/dist/chunks/{index-BEh8ek6-.mjs.map → index-CakOZHO3.mjs.map} +1 -1
  103. package/dist/chunks/{index-B0Kdhw0d.mjs → index-CdVMPbm9.mjs} +1 -1
  104. package/dist/chunks/{index-B0Kdhw0d.mjs.map → index-CdVMPbm9.mjs.map} +1 -1
  105. package/dist/chunks/{index-vtBqBO3S.mjs → index-CriKvahc.mjs} +1 -1
  106. package/dist/chunks/{index-vtBqBO3S.mjs.map → index-CriKvahc.mjs.map} +1 -1
  107. package/dist/chunks/{index-n9Y_kDgY.mjs → index-DT5qQT8O.mjs} +7 -7
  108. package/dist/chunks/{index-n9Y_kDgY.mjs.map → index-DT5qQT8O.mjs.map} +1 -1
  109. package/dist/chunks/{index-Coakg78O.mjs → index-DYd-Du-R.mjs} +5 -5
  110. package/dist/chunks/{index-Coakg78O.mjs.map → index-DYd-Du-R.mjs.map} +1 -1
  111. package/dist/chunks/{index-CQt6sjXa.mjs → index-Def6vQu2.mjs} +1 -1
  112. package/dist/chunks/{index-CQt6sjXa.mjs.map → index-Def6vQu2.mjs.map} +1 -1
  113. package/dist/chunks/{index-DpP8NjDG.mjs → index-Dnjw87dU.mjs} +1 -1
  114. package/dist/chunks/{index-DpP8NjDG.mjs.map → index-Dnjw87dU.mjs.map} +1 -1
  115. package/dist/chunks/{index-qUT5iV25.mjs → index-NRqjdxxl.mjs} +3 -3
  116. package/dist/chunks/{index-qUT5iV25.mjs.map → index-NRqjdxxl.mjs.map} +1 -1
  117. package/dist/chunks/{index-Ccz8nL5M.mjs → index-RuFdJyXd.mjs} +2 -2
  118. package/dist/chunks/{index-Ccz8nL5M.mjs.map → index-RuFdJyXd.mjs.map} +1 -1
  119. package/dist/chunks/{index-PrEP6495.mjs → index-VHai0Y8m.mjs} +1 -1
  120. package/dist/chunks/{index-PrEP6495.mjs.map → index-VHai0Y8m.mjs.map} +1 -1
  121. package/dist/chunks/{index-DZlAt5Up.mjs → index-yx3icX6K.mjs} +2 -2
  122. package/dist/chunks/{index-DZlAt5Up.mjs.map → index-yx3icX6K.mjs.map} +1 -1
  123. package/dist/chunks/{index.module-dysOJ0dE.mjs → index.module-Dje-TJtr.mjs} +1 -1
  124. package/dist/chunks/{index.module-dysOJ0dE.mjs.map → index.module-Dje-TJtr.mjs.map} +1 -1
  125. package/dist/chunks/{input-tGWBpkwj.mjs → input-BXFw-uDs.mjs} +2 -2
  126. package/dist/chunks/{input-tGWBpkwj.mjs.map → input-BXFw-uDs.mjs.map} +1 -1
  127. package/dist/chunks/{label-BrO1sQ0r.mjs → label-OLMS5GpP.mjs} +3 -3
  128. package/dist/chunks/{label-BrO1sQ0r.mjs.map → label-OLMS5GpP.mjs.map} +1 -1
  129. package/dist/chunks/{loader-circle-4xW2b9O-.mjs → loader-circle-qs0-1aBs.mjs} +2 -2
  130. package/dist/chunks/{loader-circle-4xW2b9O-.mjs.map → loader-circle-qs0-1aBs.mjs.map} +1 -1
  131. package/dist/chunks/{menubar-IydEfpqR.mjs → menubar-BeoTHJNg.mjs} +13 -13
  132. package/dist/chunks/{menubar-IydEfpqR.mjs.map → menubar-BeoTHJNg.mjs.map} +1 -1
  133. package/dist/chunks/{multi-select-okHPP4N6.mjs → multi-select-DeyQIgRQ.mjs} +13 -13
  134. package/dist/chunks/{multi-select-okHPP4N6.mjs.map → multi-select-DeyQIgRQ.mjs.map} +1 -1
  135. package/dist/chunks/{pagination-DMKpWpJG.mjs → pagination-DGqPj_OR.mjs} +6 -6
  136. package/dist/chunks/{pagination-DMKpWpJG.mjs.map → pagination-DGqPj_OR.mjs.map} +1 -1
  137. package/dist/chunks/{popover-BW3SktUO.mjs → popover-B-pugAWE.mjs} +13 -13
  138. package/dist/chunks/{popover-BW3SktUO.mjs.map → popover-B-pugAWE.mjs.map} +1 -1
  139. package/dist/chunks/{progress-DUEVgFeg.mjs → progress-CIWtoDXC.mjs} +4 -4
  140. package/dist/chunks/{progress-DUEVgFeg.mjs.map → progress-CIWtoDXC.mjs.map} +1 -1
  141. package/dist/chunks/{react-number-format.es-Cbz93HFd.mjs → react-number-format.es-5vtSY4fc.mjs} +1 -1
  142. package/dist/chunks/{react-number-format.es-Cbz93HFd.mjs.map → react-number-format.es-5vtSY4fc.mjs.map} +1 -1
  143. package/dist/chunks/{scroll-area-D9LK7L4w.mjs → scroll-area-Bc0xKKEb.mjs} +11 -11
  144. package/dist/chunks/{scroll-area-D9LK7L4w.mjs.map → scroll-area-Bc0xKKEb.mjs.map} +1 -1
  145. package/dist/chunks/{select-PRQ81N8j.mjs → select-C9_DK-uy.mjs} +5 -5
  146. package/dist/chunks/{select-PRQ81N8j.mjs.map → select-C9_DK-uy.mjs.map} +1 -1
  147. package/dist/chunks/{separator-D7Q4xZTz.mjs → separator-DzTcIFS-.mjs} +3 -3
  148. package/dist/chunks/{separator-D7Q4xZTz.mjs.map → separator-DzTcIFS-.mjs.map} +1 -1
  149. package/dist/chunks/{sheet-C-yvf0_u.mjs → sheet-sKogV_u3.mjs} +4 -4
  150. package/dist/chunks/{sheet-C-yvf0_u.mjs.map → sheet-sKogV_u3.mjs.map} +1 -1
  151. package/dist/chunks/{skeleton-Bz6KDspc.mjs → skeleton-BaRL_Ts6.mjs} +2 -2
  152. package/dist/chunks/{skeleton-Bz6KDspc.mjs.map → skeleton-BaRL_Ts6.mjs.map} +1 -1
  153. package/dist/chunks/{sortable-BD-qat9h.mjs → sortable-D_qI1HNr.mjs} +3 -3
  154. package/dist/chunks/{sortable-BD-qat9h.mjs.map → sortable-D_qI1HNr.mjs.map} +1 -1
  155. package/dist/chunks/{table-CcTvqI8M.mjs → table-7QA4HaS9.mjs} +2 -2
  156. package/dist/chunks/{table-CcTvqI8M.mjs.map → table-7QA4HaS9.mjs.map} +1 -1
  157. package/dist/chunks/{textarea-DQisQdiY.mjs → textarea-CoBkaQTT.mjs} +2 -2
  158. package/dist/chunks/{textarea-DQisQdiY.mjs.map → textarea-CoBkaQTT.mjs.map} +1 -1
  159. package/dist/chunks/{toggle-DAuL1B39.mjs → toggle-Cm9KzcXh.mjs} +5 -5
  160. package/dist/chunks/{toggle-DAuL1B39.mjs.map → toggle-Cm9KzcXh.mjs.map} +1 -1
  161. package/dist/chunks/{tooltip-DF-75FfQ.mjs → tooltip-CFESkRps.mjs} +13 -13
  162. package/dist/chunks/{tooltip-DF-75FfQ.mjs.map → tooltip-CFESkRps.mjs.map} +1 -1
  163. package/dist/chunks/{trash-2-C-nU3lmr.mjs → trash-2-CYhUZbRO.mjs} +2 -2
  164. package/dist/chunks/{trash-2-C-nU3lmr.mjs.map → trash-2-CYhUZbRO.mjs.map} +1 -1
  165. package/dist/chunks/{triangle-alert-MhLQqOiF.mjs → triangle-alert-CuubY64-.mjs} +2 -2
  166. package/dist/chunks/{triangle-alert-MhLQqOiF.mjs.map → triangle-alert-CuubY64-.mjs.map} +1 -1
  167. package/dist/chunks/{tslib.es6-Cuxw-1bu.mjs → tslib.es6-BCWqvfaj.mjs} +1 -1
  168. package/dist/chunks/{tslib.es6-Cuxw-1bu.mjs.map → tslib.es6-BCWqvfaj.mjs.map} +1 -1
  169. package/dist/chunks/{utils-CwDmCEge.mjs → utils-CRpax_Oz.mjs} +2 -2
  170. package/dist/chunks/{utils-CwDmCEge.mjs.map → utils-CRpax_Oz.mjs.map} +1 -1
  171. package/dist/chunks/{wand-sparkles-7XfX5Sd6.mjs → wand-sparkles-Co-ADBz0.mjs} +2 -2
  172. package/dist/chunks/{wand-sparkles-7XfX5Sd6.mjs.map → wand-sparkles-Co-ADBz0.mjs.map} +1 -1
  173. package/dist/chunks/{x-Dpaoz6yn.mjs → x-BEzQN-Vv.mjs} +2 -2
  174. package/dist/chunks/{x-Dpaoz6yn.mjs.map → x-BEzQN-Vv.mjs.map} +1 -1
  175. package/dist/collapsible/index.mjs +9 -9
  176. package/dist/combobox/index.mjs +26 -26
  177. package/dist/command/index.mjs +20 -20
  178. package/dist/context-menu/index.mjs +23 -23
  179. package/dist/dash/index.mjs +25 -25
  180. package/dist/data-table/index.mjs +35 -35
  181. package/dist/date-picker/index.mjs +27 -27
  182. package/dist/dialog/index.mjs +19 -19
  183. package/dist/drawer/index.mjs +16 -16
  184. package/dist/dropdown-menu/index.mjs +23 -23
  185. package/dist/dropzone/index.mjs +18 -18
  186. package/dist/editable-table/index.mjs +20 -20
  187. package/dist/empty/index.mjs +2 -2
  188. package/dist/field/index.mjs +5 -5
  189. package/dist/form/index.mjs +5 -5
  190. package/dist/form-fields/index.mjs +28 -28
  191. package/dist/hover-card/index.mjs +15 -15
  192. package/dist/icon/index.mjs +1 -1
  193. package/dist/index.css +1 -1
  194. package/dist/input/index.mjs +3 -3
  195. package/dist/input-group/index.mjs +5 -5
  196. package/dist/input-otp/index.mjs +3 -3
  197. package/dist/item/index.mjs +4 -4
  198. package/dist/ivt.css +1 -1
  199. package/dist/kbd/index.mjs +2 -2
  200. package/dist/label/index.mjs +4 -4
  201. package/dist/layout/index.mjs +23 -23
  202. package/dist/menubar/index.mjs +24 -24
  203. package/dist/multi-input-list/index.mjs +29 -29
  204. package/dist/multi-select/index.mjs +33 -33
  205. package/dist/navigation-menu/index.mjs +17 -17
  206. package/dist/pagination/index.mjs +8 -8
  207. package/dist/popover/index.mjs +18 -18
  208. package/dist/progress/index.mjs +5 -5
  209. package/dist/radio-group/index.mjs +17 -17
  210. package/dist/resizable/index.mjs +3 -3
  211. package/dist/scroll-area/index.mjs +12 -12
  212. package/dist/select/index.mjs +6 -6
  213. package/dist/separator/index.mjs +4 -4
  214. package/dist/shared/index.mjs +5 -5
  215. package/dist/sheet/index.mjs +19 -19
  216. package/dist/sidebar/index.mjs +27 -27
  217. package/dist/skeleton/index.mjs +3 -3
  218. package/dist/skeleton-component/index.mjs +4 -4
  219. package/dist/slider/index.mjs +12 -12
  220. package/dist/sortable/index.mjs +4 -4
  221. package/dist/spinner/index.mjs +4 -4
  222. package/dist/switch/index.mjs +10 -10
  223. package/dist/table/index.mjs +3 -3
  224. package/dist/table-filter/index.mjs +53 -53
  225. package/dist/tabs/index.mjs +13 -13
  226. package/dist/textarea/index.mjs +3 -3
  227. package/dist/toast/index.mjs +15 -15
  228. package/dist/toggle/index.mjs +7 -7
  229. package/dist/toggle-group/index.mjs +13 -13
  230. package/dist/tooltip/index.mjs +17 -17
  231. package/package.json +1 -1
  232. package/dist/chunks/_commonjsHelpers-BB7msia9.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-DZgstGv7.mjs","sources":["../../node_modules/date-fns/addMonths.js","../../node_modules/date-fns/addWeeks.js","../../node_modules/date-fns/addYears.js","../../node_modules/date-fns/max.js","../../node_modules/date-fns/min.js","../../node_modules/date-fns/isSameDay.js","../../node_modules/date-fns/differenceInCalendarMonths.js","../../node_modules/date-fns/endOfMonth.js","../../node_modules/date-fns/_lib/normalizeInterval.js","../../node_modules/date-fns/eachMonthOfInterval.js","../../node_modules/date-fns/startOfMonth.js","../../node_modules/date-fns/endOfYear.js","../../node_modules/date-fns/eachYearOfInterval.js","../../node_modules/date-fns/endOfWeek.js","../../node_modules/date-fns/endOfISOWeek.js","../../node_modules/date-fns/getDaysInMonth.js","../../node_modules/date-fns/getMonth.js","../../node_modules/date-fns/getYear.js","../../node_modules/date-fns/isAfter.js","../../node_modules/date-fns/isBefore.js","../../node_modules/date-fns/isSameMonth.js","../../node_modules/date-fns/isSameYear.js","../../node_modules/date-fns/setMonth.js","../../node_modules/date-fns/setYear.js","../../node_modules/@date-fns/tz/tzName/index.js","../../node_modules/@date-fns/tz/tzOffset/index.js","../../node_modules/@date-fns/tz/date/mini.js","../../node_modules/@date-fns/tz/date/index.js","../../node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js","../../node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js","../../node_modules/react-day-picker/dist/esm/classes/DateLib.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarDay.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js","../../node_modules/react-day-picker/dist/esm/components/Button.js","../../node_modules/react-day-picker/dist/esm/components/CaptionLabel.js","../../node_modules/react-day-picker/dist/esm/components/Chevron.js","../../node_modules/react-day-picker/dist/esm/components/Day.js","../../node_modules/react-day-picker/dist/esm/components/DayButton.js","../../node_modules/react-day-picker/dist/esm/UI.js","../../node_modules/react-day-picker/dist/esm/components/Dropdown.js","../../node_modules/react-day-picker/dist/esm/components/DropdownNav.js","../../node_modules/react-day-picker/dist/esm/components/Footer.js","../../node_modules/react-day-picker/dist/esm/components/Month.js","../../node_modules/react-day-picker/dist/esm/components/MonthCaption.js","../../node_modules/react-day-picker/dist/esm/components/MonthGrid.js","../../node_modules/react-day-picker/dist/esm/components/Months.js","../../node_modules/react-day-picker/dist/esm/useDayPicker.js","../../node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js","../../node_modules/react-day-picker/dist/esm/components/Nav.js","../../node_modules/react-day-picker/dist/esm/components/NextMonthButton.js","../../node_modules/react-day-picker/dist/esm/components/Option.js","../../node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js","../../node_modules/react-day-picker/dist/esm/components/Root.js","../../node_modules/react-day-picker/dist/esm/components/Select.js","../../node_modules/react-day-picker/dist/esm/components/Week.js","../../node_modules/react-day-picker/dist/esm/components/Weekday.js","../../node_modules/react-day-picker/dist/esm/components/Weekdays.js","../../node_modules/react-day-picker/dist/esm/components/WeekNumber.js","../../node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/components/Weeks.js","../../node_modules/react-day-picker/dist/esm/components/YearsDropdown.js","../../node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js","../../node_modules/react-day-picker/dist/esm/utils/typeguards.js","../../node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getComponents.js","../../node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js","../../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js","../../node_modules/react-day-picker/dist/esm/formatters/formatCaption.js","../../node_modules/react-day-picker/dist/esm/formatters/formatDay.js","../../node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js","../../node_modules/react-day-picker/dist/esm/helpers/getFormatters.js","../../node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js","../../node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js","../../node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js","../../node_modules/react-day-picker/dist/esm/labels/labelDayButton.js","../../node_modules/react-day-picker/dist/esm/labels/labelGrid.js","../../node_modules/react-day-picker/dist/esm/labels/labelGridcell.js","../../node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js","../../node_modules/react-day-picker/dist/esm/labels/labelNav.js","../../node_modules/react-day-picker/dist/esm/labels/labelNext.js","../../node_modules/react-day-picker/dist/esm/labels/labelPrevious.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekday.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js","../../node_modules/react-day-picker/dist/esm/useAnimation.js","../../node_modules/react-day-picker/dist/esm/helpers/getDates.js","../../node_modules/react-day-picker/dist/esm/helpers/getDays.js","../../node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js","../../node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getMonths.js","../../node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getWeeks.js","../../node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js","../../node_modules/react-day-picker/dist/esm/useCalendar.js","../../node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js","../../node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js","../../node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js","../../node_modules/react-day-picker/dist/esm/useFocus.js","../../node_modules/react-day-picker/dist/esm/selection/useMulti.js","../../node_modules/react-day-picker/dist/esm/utils/addToRange.js","../../node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js","../../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js","../../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js","../../node_modules/react-day-picker/dist/esm/selection/useRange.js","../../node_modules/react-day-picker/dist/esm/selection/useSingle.js","../../node_modules/react-day-picker/dist/esm/useSelection.js","../../node_modules/react-day-picker/dist/esm/DayPicker.js","../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result < date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result > date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n const [start, end] = normalizeDates(context, interval.start, interval.end);\n return { start, end };\n}\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setMonth(date.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2017, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Thu Jan 01 2015 00:00:00,\n * // Fri Jan 01 2016 00:00:00,\n * // Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setFullYear(date.getFullYear() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","/**\n * Time zone name format.\n */\n\n/**\n * The function returns the time zone name for the given date in the specified\n * time zone.\n *\n * It uses the `Intl.DateTimeFormat` API and by default outputs the time zone\n * name in a long format, e.g. \"Pacific Standard Time\" or\n * \"Singapore Standard Time\".\n *\n * It is possible to specify the format as the third argument using one of the following options\n *\n * - \"short\": e.g. \"EDT\" or \"GMT+8\".\n * - \"long\": e.g. \"Eastern Daylight Time\".\n * - \"shortGeneric\": e.g. \"ET\" or \"Singapore Time\".\n * - \"longGeneric\": e.g. \"Eastern Time\" or \"Singapore Standard Time\".\n *\n * These options correspond to TR35 tokens `z..zzz`, `zzzz`, `v`, and `vvvv` respectively: https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-zone\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date object to get the time zone name for\n * @param format - Optional format of the time zone name. Defaults to \"long\". Can be \"short\", \"long\", \"shortGeneric\", or \"longGeneric\".\n *\n * @returns Time zone name (e.g. \"Singapore Standard Time\")\n */\nexport function tzName(timeZone, date, format = \"long\") {\n return new Intl.DateTimeFormat(\"en-US\", {\n // Enforces engine to render the time. Without the option JavaScriptCore omits it.\n hour: \"numeric\",\n timeZone: timeZone,\n timeZoneName: format\n }).format(date).split(/\\s/g) // Format.JS uses non-breaking spaces\n .slice(2) // Skip the hour and AM/PM parts\n .join(\" \");\n}","const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split(\"GMT\")[1];\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +(values[0] || 0);\n const minutes = +(values[1] || 0);\n // Convert seconds to minutes by dividing by 60 to keep the function return in minutes.\n const seconds = +(values[2] || 0) / 60;\n return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;\n}","import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n const offset = -tzOffset(this.timeZone, this);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n return offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const baseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Seconds System diff adjustment\n\n const systemDate = new Date(+date);\n // Set the UTC seconds to 0 to isolate the timezone offset in seconds.\n systemDate.setUTCSeconds(0);\n // For negative systemOffset, invert the seconds.\n const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;\n\n // Calculate the seconds offset based on the timezone offset.\n const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;\n if (secondsOffset || systemSecondsOffset) {\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);\n Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);\n }\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}","import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}","const FIVE_WEEKS = 5;\nconst FOUR_WEEKS = 4;\n/**\n * Returns the number of weeks to display in the broadcast calendar for a given\n * month.\n *\n * The broadcast calendar may have either 4 or 5 weeks in a month, depending on\n * the start and end dates of the broadcast weeks.\n *\n * @since 9.4.0\n * @param month The month for which to calculate the number of weeks.\n * @param dateLib The date library to use for date manipulation.\n * @returns The number of weeks in the broadcast calendar (4 or 5).\n */\nexport function getBroadcastWeeksInMonth(month, dateLib) {\n // Get the first day of the month\n const firstDayOfMonth = dateLib.startOfMonth(month);\n // Get the day of the week for the first day of the month (1-7, where 1 is Monday)\n const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;\n const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);\n const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);\n const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)\n ? FIVE_WEEKS\n : FOUR_WEEKS;\n return numberOfWeeks;\n}\n","/**\n * Returns the start date of the week in the broadcast calendar.\n *\n * The broadcast week starts on Monday. If the first day of the month is not a\n * Monday, this function calculates the previous Monday as the start of the\n * broadcast week.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the start of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The start date of the broadcast week.\n */\nexport function startOfBroadcastWeek(date, dateLib) {\n const firstOfMonth = dateLib.startOfMonth(date);\n const dayOfWeek = firstOfMonth.getDay();\n if (dayOfWeek === 1) {\n return firstOfMonth;\n }\n else if (dayOfWeek === 0) {\n return dateLib.addDays(firstOfMonth, -1 * 6);\n }\n else {\n return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));\n }\n}\n","import { getBroadcastWeeksInMonth } from \"./getBroadcastWeeksInMonth.js\";\nimport { startOfBroadcastWeek } from \"./startOfBroadcastWeek.js\";\n/**\n * Returns the end date of the week in the broadcast calendar.\n *\n * The broadcast week ends on the last day of the last broadcast week for the\n * given date.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the end of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The end date of the broadcast week.\n */\nexport function endOfBroadcastWeek(date, dateLib) {\n const startDate = startOfBroadcastWeek(date, dateLib);\n const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);\n const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);\n return endDate;\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport { addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, format, getISOWeek, getMonth, getWeek, getYear, isAfter, isBefore, isDate, isSameDay, isSameMonth, isSameYear, max, min, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear, } from \"date-fns\";\nimport { enUS } from \"date-fns/locale/en-US\";\nimport { endOfBroadcastWeek } from \"../helpers/endOfBroadcastWeek.js\";\nimport { startOfBroadcastWeek } from \"../helpers/startOfBroadcastWeek.js\";\n/**\n * A wrapper class around [date-fns](http://date-fns.org) that provides utility\n * methods for date manipulation and formatting.\n *\n * @since 9.2.0\n * @example\n * const dateLib = new DateLib({ locale: es });\n * const newDate = dateLib.addDays(new Date(), 5);\n */\nexport class DateLib {\n /**\n * Creates an instance of `DateLib`.\n *\n * @param options Configuration options for the date library.\n * @param overrides Custom overrides for the date library functions.\n */\n constructor(options, overrides) {\n /**\n * Reference to the built-in Date constructor.\n *\n * @deprecated Use `newDate()` or `today()`.\n */\n this.Date = Date;\n /**\n * Creates a new `Date` object representing today's date.\n *\n * @since 9.5.0\n * @returns A `Date` object for today's date.\n */\n this.today = () => {\n if (this.overrides?.today) {\n return this.overrides.today();\n }\n if (this.options.timeZone) {\n return TZDate.tz(this.options.timeZone);\n }\n return new this.Date();\n };\n /**\n * Creates a new `Date` object with the specified year, month, and day.\n *\n * @since 9.5.0\n * @param year The year.\n * @param monthIndex The month (0-11).\n * @param date The day of the month.\n * @returns A new `Date` object.\n */\n this.newDate = (year, monthIndex, date) => {\n if (this.overrides?.newDate) {\n return this.overrides.newDate(year, monthIndex, date);\n }\n if (this.options.timeZone) {\n return new TZDate(year, monthIndex, date, this.options.timeZone);\n }\n return new Date(year, monthIndex, date);\n };\n /**\n * Adds the specified number of days to the given date.\n *\n * @param date The date to add days to.\n * @param amount The number of days to add.\n * @returns The new date with the days added.\n */\n this.addDays = (date, amount) => {\n return this.overrides?.addDays\n ? this.overrides.addDays(date, amount)\n : addDays(date, amount);\n };\n /**\n * Adds the specified number of months to the given date.\n *\n * @param date The date to add months to.\n * @param amount The number of months to add.\n * @returns The new date with the months added.\n */\n this.addMonths = (date, amount) => {\n return this.overrides?.addMonths\n ? this.overrides.addMonths(date, amount)\n : addMonths(date, amount);\n };\n /**\n * Adds the specified number of weeks to the given date.\n *\n * @param date The date to add weeks to.\n * @param amount The number of weeks to add.\n * @returns The new date with the weeks added.\n */\n this.addWeeks = (date, amount) => {\n return this.overrides?.addWeeks\n ? this.overrides.addWeeks(date, amount)\n : addWeeks(date, amount);\n };\n /**\n * Adds the specified number of years to the given date.\n *\n * @param date The date to add years to.\n * @param amount The number of years to add.\n * @returns The new date with the years added.\n */\n this.addYears = (date, amount) => {\n return this.overrides?.addYears\n ? this.overrides.addYears(date, amount)\n : addYears(date, amount);\n };\n /**\n * Returns the number of calendar days between the given dates.\n *\n * @param dateLeft The later date.\n * @param dateRight The earlier date.\n * @returns The number of calendar days between the dates.\n */\n this.differenceInCalendarDays = (dateLeft, dateRight) => {\n return this.overrides?.differenceInCalendarDays\n ? this.overrides.differenceInCalendarDays(dateLeft, dateRight)\n : differenceInCalendarDays(dateLeft, dateRight);\n };\n /**\n * Returns the number of calendar months between the given dates.\n *\n * @param dateLeft The later date.\n * @param dateRight The earlier date.\n * @returns The number of calendar months between the dates.\n */\n this.differenceInCalendarMonths = (dateLeft, dateRight) => {\n return this.overrides?.differenceInCalendarMonths\n ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight)\n : differenceInCalendarMonths(dateLeft, dateRight);\n };\n /**\n * Returns the months between the given dates.\n *\n * @param interval The interval to get the months for.\n */\n this.eachMonthOfInterval = (interval) => {\n return this.overrides?.eachMonthOfInterval\n ? this.overrides.eachMonthOfInterval(interval)\n : eachMonthOfInterval(interval);\n };\n /**\n * Returns the years between the given dates.\n *\n * @since 9.11.1\n * @param interval The interval to get the years for.\n * @returns The array of years in the interval.\n */\n this.eachYearOfInterval = (interval) => {\n const years = this.overrides?.eachYearOfInterval\n ? this.overrides.eachYearOfInterval(interval)\n : eachYearOfInterval(interval);\n // Remove duplicates that may happen across DST transitions (e.g., \"America/Sao_Paulo\")\n // See https://github.com/date-fns/tz/issues/72\n const uniqueYears = new Set(years.map((d) => this.getYear(d)));\n if (uniqueYears.size === years.length) {\n // No duplicates, return as is\n return years;\n }\n // Rebuild the array to ensure one date per year\n const yearsArray = [];\n uniqueYears.forEach((y) => {\n yearsArray.push(new Date(y, 0, 1));\n });\n return yearsArray;\n };\n /**\n * Returns the end of the broadcast week for the given date.\n *\n * @param date The original date.\n * @returns The end of the broadcast week.\n */\n this.endOfBroadcastWeek = (date) => {\n return this.overrides?.endOfBroadcastWeek\n ? this.overrides.endOfBroadcastWeek(date)\n : endOfBroadcastWeek(date, this);\n };\n /**\n * Returns the end of the ISO week for the given date.\n *\n * @param date The original date.\n * @returns The end of the ISO week.\n */\n this.endOfISOWeek = (date) => {\n return this.overrides?.endOfISOWeek\n ? this.overrides.endOfISOWeek(date)\n : endOfISOWeek(date);\n };\n /**\n * Returns the end of the month for the given date.\n *\n * @param date The original date.\n * @returns The end of the month.\n */\n this.endOfMonth = (date) => {\n return this.overrides?.endOfMonth\n ? this.overrides.endOfMonth(date)\n : endOfMonth(date);\n };\n /**\n * Returns the end of the week for the given date.\n *\n * @param date The original date.\n * @returns The end of the week.\n */\n this.endOfWeek = (date, options) => {\n return this.overrides?.endOfWeek\n ? this.overrides.endOfWeek(date, options)\n : endOfWeek(date, this.options);\n };\n /**\n * Returns the end of the year for the given date.\n *\n * @param date The original date.\n * @returns The end of the year.\n */\n this.endOfYear = (date) => {\n return this.overrides?.endOfYear\n ? this.overrides.endOfYear(date)\n : endOfYear(date);\n };\n /**\n * Formats the given date using the specified format string.\n *\n * @param date The date to format.\n * @param formatStr The format string.\n * @returns The formatted date string.\n */\n this.format = (date, formatStr, _options) => {\n const formatted = this.overrides?.format\n ? this.overrides.format(date, formatStr, this.options)\n : format(date, formatStr, this.options);\n if (this.options.numerals && this.options.numerals !== \"latn\") {\n return this.replaceDigits(formatted);\n }\n return formatted;\n };\n /**\n * Returns the ISO week number for the given date.\n *\n * @param date The date to get the ISO week number for.\n * @returns The ISO week number.\n */\n this.getISOWeek = (date) => {\n return this.overrides?.getISOWeek\n ? this.overrides.getISOWeek(date)\n : getISOWeek(date);\n };\n /**\n * Returns the month of the given date.\n *\n * @param date The date to get the month for.\n * @returns The month.\n */\n this.getMonth = (date, _options) => {\n return this.overrides?.getMonth\n ? this.overrides.getMonth(date, this.options)\n : getMonth(date, this.options);\n };\n /**\n * Returns the year of the given date.\n *\n * @param date The date to get the year for.\n * @returns The year.\n */\n this.getYear = (date, _options) => {\n return this.overrides?.getYear\n ? this.overrides.getYear(date, this.options)\n : getYear(date, this.options);\n };\n /**\n * Returns the local week number for the given date.\n *\n * @param date The date to get the week number for.\n * @returns The week number.\n */\n this.getWeek = (date, _options) => {\n return this.overrides?.getWeek\n ? this.overrides.getWeek(date, this.options)\n : getWeek(date, this.options);\n };\n /**\n * Checks if the first date is after the second date.\n *\n * @param date The date to compare.\n * @param dateToCompare The date to compare with.\n * @returns True if the first date is after the second date.\n */\n this.isAfter = (date, dateToCompare) => {\n return this.overrides?.isAfter\n ? this.overrides.isAfter(date, dateToCompare)\n : isAfter(date, dateToCompare);\n };\n /**\n * Checks if the first date is before the second date.\n *\n * @param date The date to compare.\n * @param dateToCompare The date to compare with.\n * @returns True if the first date is before the second date.\n */\n this.isBefore = (date, dateToCompare) => {\n return this.overrides?.isBefore\n ? this.overrides.isBefore(date, dateToCompare)\n : isBefore(date, dateToCompare);\n };\n /**\n * Checks if the given value is a Date object.\n *\n * @param value The value to check.\n * @returns True if the value is a Date object.\n */\n this.isDate = (value) => {\n return this.overrides?.isDate\n ? this.overrides.isDate(value)\n : isDate(value);\n };\n /**\n * Checks if the given dates are on the same day.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are on the same day.\n */\n this.isSameDay = (dateLeft, dateRight) => {\n return this.overrides?.isSameDay\n ? this.overrides.isSameDay(dateLeft, dateRight)\n : isSameDay(dateLeft, dateRight);\n };\n /**\n * Checks if the given dates are in the same month.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are in the same month.\n */\n this.isSameMonth = (dateLeft, dateRight) => {\n return this.overrides?.isSameMonth\n ? this.overrides.isSameMonth(dateLeft, dateRight)\n : isSameMonth(dateLeft, dateRight);\n };\n /**\n * Checks if the given dates are in the same year.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are in the same year.\n */\n this.isSameYear = (dateLeft, dateRight) => {\n return this.overrides?.isSameYear\n ? this.overrides.isSameYear(dateLeft, dateRight)\n : isSameYear(dateLeft, dateRight);\n };\n /**\n * Returns the latest date in the given array of dates.\n *\n * @param dates The array of dates to compare.\n * @returns The latest date.\n */\n this.max = (dates) => {\n return this.overrides?.max ? this.overrides.max(dates) : max(dates);\n };\n /**\n * Returns the earliest date in the given array of dates.\n *\n * @param dates The array of dates to compare.\n * @returns The earliest date.\n */\n this.min = (dates) => {\n return this.overrides?.min ? this.overrides.min(dates) : min(dates);\n };\n /**\n * Sets the month of the given date.\n *\n * @param date The date to set the month on.\n * @param month The month to set (0-11).\n * @returns The new date with the month set.\n */\n this.setMonth = (date, month) => {\n return this.overrides?.setMonth\n ? this.overrides.setMonth(date, month)\n : setMonth(date, month);\n };\n /**\n * Sets the year of the given date.\n *\n * @param date The date to set the year on.\n * @param year The year to set.\n * @returns The new date with the year set.\n */\n this.setYear = (date, year) => {\n return this.overrides?.setYear\n ? this.overrides.setYear(date, year)\n : setYear(date, year);\n };\n /**\n * Returns the start of the broadcast week for the given date.\n *\n * @param date The original date.\n * @returns The start of the broadcast week.\n */\n this.startOfBroadcastWeek = (date, _dateLib) => {\n return this.overrides?.startOfBroadcastWeek\n ? this.overrides.startOfBroadcastWeek(date, this)\n : startOfBroadcastWeek(date, this);\n };\n /**\n * Returns the start of the day for the given date.\n *\n * @param date The original date.\n * @returns The start of the day.\n */\n this.startOfDay = (date) => {\n return this.overrides?.startOfDay\n ? this.overrides.startOfDay(date)\n : startOfDay(date);\n };\n /**\n * Returns the start of the ISO week for the given date.\n *\n * @param date The original date.\n * @returns The start of the ISO week.\n */\n this.startOfISOWeek = (date) => {\n return this.overrides?.startOfISOWeek\n ? this.overrides.startOfISOWeek(date)\n : startOfISOWeek(date);\n };\n /**\n * Returns the start of the month for the given date.\n *\n * @param date The original date.\n * @returns The start of the month.\n */\n this.startOfMonth = (date) => {\n return this.overrides?.startOfMonth\n ? this.overrides.startOfMonth(date)\n : startOfMonth(date);\n };\n /**\n * Returns the start of the week for the given date.\n *\n * @param date The original date.\n * @returns The start of the week.\n */\n this.startOfWeek = (date, _options) => {\n return this.overrides?.startOfWeek\n ? this.overrides.startOfWeek(date, this.options)\n : startOfWeek(date, this.options);\n };\n /**\n * Returns the start of the year for the given date.\n *\n * @param date The original date.\n * @returns The start of the year.\n */\n this.startOfYear = (date) => {\n return this.overrides?.startOfYear\n ? this.overrides.startOfYear(date)\n : startOfYear(date);\n };\n this.options = { locale: enUS, ...options };\n this.overrides = overrides;\n }\n /**\n * Generates a mapping of Arabic digits (0-9) to the target numbering system\n * digits.\n *\n * @since 9.5.0\n * @returns A record mapping Arabic digits to the target numerals.\n */\n getDigitMap() {\n const { numerals = \"latn\" } = this.options;\n // Use Intl.NumberFormat to create a formatter with the specified numbering system\n const formatter = new Intl.NumberFormat(\"en-US\", {\n numberingSystem: numerals,\n });\n // Map Arabic digits (0-9) to the target numerals\n const digitMap = {};\n for (let i = 0; i < 10; i++) {\n digitMap[i.toString()] = formatter.format(i);\n }\n return digitMap;\n }\n /**\n * Replaces Arabic digits in a string with the target numbering system digits.\n *\n * @since 9.5.0\n * @param input The string containing Arabic digits.\n * @returns The string with digits replaced.\n */\n replaceDigits(input) {\n const digitMap = this.getDigitMap();\n return input.replace(/\\d/g, (digit) => digitMap[digit] || digit);\n }\n /**\n * Formats a number using the configured numbering system.\n *\n * @since 9.5.0\n * @param value The number to format.\n * @returns The formatted number as a string.\n */\n formatNumber(value) {\n return this.replaceDigits(value.toString());\n }\n /**\n * Returns the preferred ordering for month and year labels for the current\n * locale.\n */\n getMonthYearOrder() {\n const code = this.options.locale?.code;\n if (!code) {\n return \"month-first\";\n }\n return DateLib.yearFirstLocales.has(code) ? \"year-first\" : \"month-first\";\n }\n /**\n * Formats the month/year pair respecting locale conventions.\n *\n * @since 9.11.0\n */\n formatMonthYear(date) {\n const { locale, timeZone, numerals } = this.options;\n const localeCode = locale?.code;\n if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {\n try {\n const intl = new Intl.DateTimeFormat(localeCode, {\n month: \"long\",\n year: \"numeric\",\n timeZone,\n numberingSystem: numerals,\n });\n const formatted = intl.format(date);\n return formatted;\n }\n catch {\n // Fallback to date-fns formatting below.\n }\n }\n const pattern = this.getMonthYearOrder() === \"year-first\" ? \"y LLLL\" : \"LLLL y\";\n return this.format(date, pattern);\n }\n}\nDateLib.yearFirstLocales = new Set([\n \"eu\",\n \"hu\",\n \"ja\",\n \"ja-Hira\",\n \"ja-JP\",\n \"ko\",\n \"ko-KR\",\n \"lt\",\n \"lt-LT\",\n \"lv\",\n \"lv-LV\",\n \"mn\",\n \"mn-MN\",\n \"zh\",\n \"zh-CN\",\n \"zh-HK\",\n \"zh-TW\",\n]);\n/** The default locale (English). */\nexport { enUS as defaultLocale } from \"date-fns/locale/en-US\";\n/**\n * The default date library with English locale.\n *\n * @since 9.2.0\n */\nexport const defaultDateLib = new DateLib();\n/**\n * @ignore\n * @deprecated Use `defaultDateLib`.\n */\nexport const dateLib = defaultDateLib;\n","import { defaultDateLib } from \"./DateLib.js\";\n/**\n * Represents a day displayed in the calendar.\n *\n * In DayPicker, a `CalendarDay` is a wrapper around a `Date` object that\n * provides additional information about the day, such as whether it belongs to\n * the displayed month.\n */\nexport class CalendarDay {\n constructor(date, displayMonth, dateLib = defaultDateLib) {\n this.date = date;\n this.displayMonth = displayMonth;\n this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));\n this.dateLib = dateLib;\n }\n /**\n * Checks if this day is equal to another `CalendarDay`, considering both the\n * date and the displayed month.\n *\n * @param day The `CalendarDay` to compare with.\n * @returns `true` if the days are equal, otherwise `false`.\n */\n isEqualTo(day) {\n return (this.dateLib.isSameDay(day.date, this.date) &&\n this.dateLib.isSameMonth(day.displayMonth, this.displayMonth));\n }\n}\n","/**\n * Represents a month in a calendar year.\n *\n * A `CalendarMonth` contains the weeks within the month and the date of the\n * month.\n */\nexport class CalendarMonth {\n constructor(month, weeks) {\n this.date = month;\n this.weeks = weeks;\n }\n}\n","/**\n * Represents a week in a calendar month.\n *\n * A `CalendarWeek` contains the days within the week and the week number.\n */\nexport class CalendarWeek {\n constructor(weekNumber, days) {\n this.days = days;\n this.weekNumber = weekNumber;\n }\n}\n","import React from \"react\";\n/**\n * Render the button elements in the calendar.\n *\n * @private\n * @deprecated Use `PreviousMonthButton` or `@link NextMonthButton` instead.\n */\nexport function Button(props) {\n return React.createElement(\"button\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the label in the month caption.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function CaptionLabel(props) {\n return React.createElement(\"span\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the chevron icon used in the navigation buttons and dropdowns.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Chevron(props) {\n const { size = 24, orientation = \"left\", className } = props;\n return (\n // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component\n React.createElement(\"svg\", { className: className, width: size, height: size, viewBox: \"0 0 24 24\" },\n orientation === \"up\" && (React.createElement(\"polygon\", { points: \"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28\" })),\n orientation === \"down\" && (React.createElement(\"polygon\", { points: \"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72\" })),\n orientation === \"left\" && (React.createElement(\"polygon\", { points: \"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20\" })),\n orientation === \"right\" && (React.createElement(\"polygon\", { points: \"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20\" }))));\n}\n","import React from \"react\";\n/**\n * Render a grid cell for a specific day in the calendar.\n *\n * Handles interaction and focus for the day. If you only need to change the\n * content of the day cell, consider swapping the `DayButton` component\n * instead.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Day(props) {\n const { day, modifiers, ...tdProps } = props;\n return React.createElement(\"td\", { ...tdProps });\n}\n","import React from \"react\";\n/**\n * Render a button for a specific day in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DayButton(props) {\n const { day, modifiers, ...buttonProps } = props;\n const ref = React.useRef(null);\n React.useEffect(() => {\n if (modifiers.focused)\n ref.current?.focus();\n }, [modifiers.focused]);\n return React.createElement(\"button\", { ref: ref, ...buttonProps });\n}\n","/**\n * Enum representing the UI elements composing DayPicker. These elements are\n * mapped to {@link CustomComponents}, {@link ClassNames}, and {@link Styles}.\n *\n * Some elements are extended by flags and modifiers.\n */\nexport var UI;\n(function (UI) {\n /** The root component displaying the months and the navigation bar. */\n UI[\"Root\"] = \"root\";\n /** The Chevron SVG element used by navigation buttons and dropdowns. */\n UI[\"Chevron\"] = \"chevron\";\n /**\n * The grid cell with the day's date. Extended by {@link DayFlag} and\n * {@link SelectionState}.\n */\n UI[\"Day\"] = \"day\";\n /** The button containing the formatted day's date, inside the grid cell. */\n UI[\"DayButton\"] = \"day_button\";\n /** The caption label of the month (when not showing the dropdown navigation). */\n UI[\"CaptionLabel\"] = \"caption_label\";\n /** The container of the dropdown navigation (when enabled). */\n UI[\"Dropdowns\"] = \"dropdowns\";\n /** The dropdown element to select for years and months. */\n UI[\"Dropdown\"] = \"dropdown\";\n /** The container element of the dropdown. */\n UI[\"DropdownRoot\"] = \"dropdown_root\";\n /** The root element of the footer. */\n UI[\"Footer\"] = \"footer\";\n /** The month grid. */\n UI[\"MonthGrid\"] = \"month_grid\";\n /** Contains the dropdown navigation or the caption label. */\n UI[\"MonthCaption\"] = \"month_caption\";\n /** The dropdown with the months. */\n UI[\"MonthsDropdown\"] = \"months_dropdown\";\n /** Wrapper of the month grid. */\n UI[\"Month\"] = \"month\";\n /** The container of the displayed months. */\n UI[\"Months\"] = \"months\";\n /** The navigation bar with the previous and next buttons. */\n UI[\"Nav\"] = \"nav\";\n /**\n * The next month button in the navigation. *\n *\n * @since 9.1.0\n */\n UI[\"NextMonthButton\"] = \"button_next\";\n /**\n * The previous month button in the navigation.\n *\n * @since 9.1.0\n */\n UI[\"PreviousMonthButton\"] = \"button_previous\";\n /** The row containing the week. */\n UI[\"Week\"] = \"week\";\n /** The group of row weeks in a month (`tbody`). */\n UI[\"Weeks\"] = \"weeks\";\n /** The column header with the weekday. */\n UI[\"Weekday\"] = \"weekday\";\n /** The row grouping the weekdays in the column headers. */\n UI[\"Weekdays\"] = \"weekdays\";\n /** The cell containing the week number. */\n UI[\"WeekNumber\"] = \"week_number\";\n /** The cell header of the week numbers column. */\n UI[\"WeekNumberHeader\"] = \"week_number_header\";\n /** The dropdown with the years. */\n UI[\"YearsDropdown\"] = \"years_dropdown\";\n})(UI || (UI = {}));\n/** Enum representing flags for the {@link UI.Day} element. */\nexport var DayFlag;\n(function (DayFlag) {\n /** The day is disabled. */\n DayFlag[\"disabled\"] = \"disabled\";\n /** The day is hidden. */\n DayFlag[\"hidden\"] = \"hidden\";\n /** The day is outside the current month. */\n DayFlag[\"outside\"] = \"outside\";\n /** The day is focused. */\n DayFlag[\"focused\"] = \"focused\";\n /** The day is today. */\n DayFlag[\"today\"] = \"today\";\n})(DayFlag || (DayFlag = {}));\n/**\n * Enum representing selection states that can be applied to the {@link UI.Day}\n * element in selection mode.\n */\nexport var SelectionState;\n(function (SelectionState) {\n /** The day is at the end of a selected range. */\n SelectionState[\"range_end\"] = \"range_end\";\n /** The day is at the middle of a selected range. */\n SelectionState[\"range_middle\"] = \"range_middle\";\n /** The day is at the start of a selected range. */\n SelectionState[\"range_start\"] = \"range_start\";\n /** The day is selected. */\n SelectionState[\"selected\"] = \"selected\";\n})(SelectionState || (SelectionState = {}));\n/**\n * Enum representing different animation states for transitioning between\n * months.\n */\nexport var Animation;\n(function (Animation) {\n /** The entering weeks when they appear before the exiting month. */\n Animation[\"weeks_before_enter\"] = \"weeks_before_enter\";\n /** The exiting weeks when they disappear before the entering month. */\n Animation[\"weeks_before_exit\"] = \"weeks_before_exit\";\n /** The entering weeks when they appear after the exiting month. */\n Animation[\"weeks_after_enter\"] = \"weeks_after_enter\";\n /** The exiting weeks when they disappear after the entering month. */\n Animation[\"weeks_after_exit\"] = \"weeks_after_exit\";\n /** The entering caption when it appears after the exiting month. */\n Animation[\"caption_after_enter\"] = \"caption_after_enter\";\n /** The exiting caption when it disappears after the entering month. */\n Animation[\"caption_after_exit\"] = \"caption_after_exit\";\n /** The entering caption when it appears before the exiting month. */\n Animation[\"caption_before_enter\"] = \"caption_before_enter\";\n /** The exiting caption when it disappears before the entering month. */\n Animation[\"caption_before_exit\"] = \"caption_before_exit\";\n})(Animation || (Animation = {}));\n","import React from \"react\";\nimport { UI } from \"../UI.js\";\n/**\n * Render a dropdown component for navigation in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Dropdown(props) {\n const { options, className, components, classNames, ...selectProps } = props;\n const cssClassSelect = [classNames[UI.Dropdown], className].join(\" \");\n const selectedOption = options?.find(({ value }) => value === selectProps.value);\n return (React.createElement(\"span\", { \"data-disabled\": selectProps.disabled, className: classNames[UI.DropdownRoot] },\n React.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => (React.createElement(components.Option, { key: value, value: value, disabled: disabled }, label)))),\n React.createElement(\"span\", { className: classNames[UI.CaptionLabel], \"aria-hidden\": true },\n selectedOption?.label,\n React.createElement(components.Chevron, { orientation: \"down\", size: 18, className: classNames[UI.Chevron] }))));\n}\n","import React from \"react\";\n/**\n * Render the navigation dropdowns for the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DropdownNav(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the footer of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Footer(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the grid with the weekday header row and the weeks for a specific\n * month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Month(props) {\n const { calendarMonth, displayIndex, ...divProps } = props;\n return React.createElement(\"div\", { ...divProps }, props.children);\n}\n","import React from \"react\";\n/**\n * Render the caption for a month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthCaption(props) {\n const { calendarMonth, displayIndex, ...divProps } = props;\n return React.createElement(\"div\", { ...divProps });\n}\n","import React from \"react\";\n/**\n * Render the grid of days for a specific month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthGrid(props) {\n return React.createElement(\"table\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a container wrapping the month grids.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Months(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import { createContext, useContext } from \"react\";\n/** @ignore */\nexport const dayPickerContext = createContext(undefined);\n/**\n * Provides access to the DayPicker context, which includes properties and\n * methods to interact with the DayPicker component. This hook must be used\n * within a custom component.\n *\n * @template T - Use this type to refine the returned context type with a\n * specific selection mode.\n * @returns The context to work with DayPicker.\n * @throws {Error} If the hook is used outside of a DayPicker provider.\n * @group Hooks\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function useDayPicker() {\n const context = useContext(dayPickerContext);\n if (context === undefined) {\n throw new Error(\"useDayPicker() must be used within a custom component.\");\n }\n return context;\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between months in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthsDropdown(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Dropdown, { ...props });\n}\n","import React, { useCallback, } from \"react\";\nimport { UI } from \"../UI.js\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the navigation toolbar with buttons to navigate between months.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Nav(props) {\n const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;\n const { components, classNames, labels: { labelPrevious, labelNext }, } = useDayPicker();\n const handleNextClick = useCallback((e) => {\n if (nextMonth) {\n onNextClick?.(e);\n }\n }, [nextMonth, onNextClick]);\n const handlePreviousClick = useCallback((e) => {\n if (previousMonth) {\n onPreviousClick?.(e);\n }\n }, [previousMonth, onPreviousClick]);\n return (React.createElement(\"nav\", { ...navProps },\n React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick },\n React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: \"left\" })),\n React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick },\n React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, orientation: \"right\", className: classNames[UI.Chevron] }))));\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the button to navigate to the next month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function NextMonthButton(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Button, { ...props });\n}\n","import React from \"react\";\n/**\n * Render an `option` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Option(props) {\n return React.createElement(\"option\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the button to navigate to the previous month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function PreviousMonthButton(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Button, { ...props });\n}\n","import React from \"react\";\n/**\n * Render the root element of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Root(props) {\n const { rootRef, ...rest } = props;\n return React.createElement(\"div\", { ...rest, ref: rootRef });\n}\n","import React from \"react\";\n/**\n * Render a `select` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Select(props) {\n return React.createElement(\"select\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a table row representing a week in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Week(props) {\n const { week, ...trProps } = props;\n return React.createElement(\"tr\", { ...trProps });\n}\n","import React from \"react\";\n/**\n * Render a table header cell with the name of a weekday (e.g., \"Mo\", \"Tu\").\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekday(props) {\n return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the table row containing the weekday names.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekdays(props) {\n return (React.createElement(\"thead\", { \"aria-hidden\": true },\n React.createElement(\"tr\", { ...props })));\n}\n","import React from \"react\";\n/**\n * Render a table cell displaying the number of the week.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumber(props) {\n const { week, ...thProps } = props;\n return React.createElement(\"th\", { ...thProps });\n}\n","import React from \"react\";\n/**\n * Render the header cell for the week numbers column.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumberHeader(props) {\n return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the container for the weeks in the month grid.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weeks(props) {\n return React.createElement(\"tbody\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between years in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function YearsDropdown(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Dropdown, { ...props });\n}\n","import { defaultDateLib } from \"../classes/index.js\";\n/**\n * Checks if a given date is within a specified date range.\n *\n * @since 9.0.0\n * @param range - The date range to check against.\n * @param date - The date to check.\n * @param excludeEnds - If `true`, the range's start and end dates are excluded.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date is within the range, otherwise `false`.\n * @group Utilities\n */\nexport function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {\n let { from, to } = range;\n const { differenceInCalendarDays, isSameDay } = dateLib;\n if (from && to) {\n const isRangeInverted = differenceInCalendarDays(to, from) < 0;\n if (isRangeInverted) {\n [from, to] = [to, from];\n }\n const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&\n differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);\n return isInRange;\n }\n if (!excludeEnds && to) {\n return isSameDay(to, date);\n }\n if (!excludeEnds && from) {\n return isSameDay(from, date);\n }\n return false;\n}\n/**\n * @private\n * @deprecated Use {@link rangeIncludesDate} instead.\n */\nexport const isDateInRange = (range, date) => rangeIncludesDate(range, date, false, defaultDateLib);\n","/**\n * Checks if the given value is of type {@link DateInterval}.\n *\n * @param matcher - The value to check.\n * @returns `true` if the value is a {@link DateInterval}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateInterval(matcher) {\n return Boolean(matcher &&\n typeof matcher === \"object\" &&\n \"before\" in matcher &&\n \"after\" in matcher);\n}\n/**\n * Checks if the given value is of type {@link DateRange}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateRange}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateRange(value) {\n return Boolean(value && typeof value === \"object\" && \"from\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateAfter}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateAfter}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateAfterType(value) {\n return Boolean(value && typeof value === \"object\" && \"after\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateBefore}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateBefore}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateBeforeType(value) {\n return Boolean(value && typeof value === \"object\" && \"before\" in value);\n}\n/**\n * Checks if the given value is of type {@link DayOfWeek}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.\n * @group Utilities\n */\nexport function isDayOfWeekType(value) {\n return Boolean(value && typeof value === \"object\" && \"dayOfWeek\" in value);\n}\n/**\n * Checks if the given value is an array of valid dates.\n *\n * @private\n * @param value - The value to check.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the value is an array of valid dates, otherwise `false`.\n */\nexport function isDatesArray(value, dateLib) {\n return Array.isArray(value) && value.every(dateLib.isDate);\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a given date matches at least one of the specified {@link Matcher}.\n *\n * @param date - The date to check.\n * @param matchers - The matchers to check against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date matches any of the matchers, otherwise `false`.\n * @group Utilities\n */\nexport function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {\n const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;\n const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;\n return matchersArr.some((matcher) => {\n if (typeof matcher === \"boolean\") {\n return matcher;\n }\n if (dateLib.isDate(matcher)) {\n return isSameDay(date, matcher);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.includes(date);\n }\n if (isDateRange(matcher)) {\n return rangeIncludesDate(matcher, date, false, dateLib);\n }\n if (isDayOfWeekType(matcher)) {\n if (!Array.isArray(matcher.dayOfWeek)) {\n return matcher.dayOfWeek === date.getDay();\n }\n return matcher.dayOfWeek.includes(date.getDay());\n }\n if (isDateInterval(matcher)) {\n const diffBefore = differenceInCalendarDays(matcher.before, date);\n const diffAfter = differenceInCalendarDays(matcher.after, date);\n const isDayBefore = diffBefore > 0;\n const isDayAfter = diffAfter < 0;\n const isClosedInterval = isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return isDayAfter && isDayBefore;\n }\n else {\n return isDayBefore || isDayAfter;\n }\n }\n if (isDateAfterType(matcher)) {\n return differenceInCalendarDays(date, matcher.after) > 0;\n }\n if (isDateBeforeType(matcher)) {\n return differenceInCalendarDays(matcher.before, date) > 0;\n }\n if (typeof matcher === \"function\") {\n return matcher(date);\n }\n return false;\n });\n}\n/**\n * @private\n * @deprecated Use {@link dateMatchModifiers} instead.\n */\nexport const isMatch = dateMatchModifiers;\n","import { DayFlag } from \"../UI.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\n/**\n * Creates a function to retrieve the modifiers for a given day.\n *\n * This function calculates both internal and custom modifiers for each day\n * based on the provided calendar days and DayPicker props.\n *\n * @private\n * @param days The array of `CalendarDay` objects to process.\n * @param props The DayPicker props, including modifiers and configuration\n * options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A function that retrieves the modifiers for a given `CalendarDay`.\n */\nexport function createGetModifiers(days, props, navStart, navEnd, dateLib) {\n const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today, } = props;\n const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;\n const computedNavStart = navStart && startOfMonth(navStart);\n const computedNavEnd = navEnd && endOfMonth(navEnd);\n const internalModifiersMap = {\n [DayFlag.focused]: [],\n [DayFlag.outside]: [],\n [DayFlag.disabled]: [],\n [DayFlag.hidden]: [],\n [DayFlag.today]: [],\n };\n const customModifiersMap = {};\n for (const day of days) {\n const { date, displayMonth } = day;\n const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));\n const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));\n const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));\n const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));\n const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||\n isBeforeNavStart ||\n isAfterNavEnd ||\n // Broadcast calendar will show outside days as default\n (!broadcastCalendar && !showOutsideDays && isOutside) ||\n (broadcastCalendar && showOutsideDays === false && isOutside);\n const isToday = isSameDay(date, today ?? dateLib.today());\n if (isOutside)\n internalModifiersMap.outside.push(day);\n if (isDisabled)\n internalModifiersMap.disabled.push(day);\n if (isHidden)\n internalModifiersMap.hidden.push(day);\n if (isToday)\n internalModifiersMap.today.push(day);\n // Add custom modifiers\n if (modifiers) {\n Object.keys(modifiers).forEach((name) => {\n const modifierValue = modifiers?.[name];\n const isMatch = modifierValue\n ? dateMatchModifiers(date, modifierValue, dateLib)\n : false;\n if (!isMatch)\n return;\n if (customModifiersMap[name]) {\n customModifiersMap[name].push(day);\n }\n else {\n customModifiersMap[name] = [day];\n }\n });\n }\n }\n return (day) => {\n // Initialize all the modifiers to false\n const dayFlags = {\n [DayFlag.focused]: false,\n [DayFlag.disabled]: false,\n [DayFlag.hidden]: false,\n [DayFlag.outside]: false,\n [DayFlag.today]: false,\n };\n const customModifiers = {};\n // Find the modifiers for the given day\n for (const name in internalModifiersMap) {\n const days = internalModifiersMap[name];\n dayFlags[name] = days.some((d) => d === day);\n }\n for (const name in customModifiersMap) {\n customModifiers[name] = customModifiersMap[name].some((d) => d === day);\n }\n return {\n ...dayFlags,\n // custom modifiers should override all the previous ones\n ...customModifiers,\n };\n };\n}\n","import { DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the class names for a day based on its modifiers.\n *\n * This function combines the base class name for the day with any class names\n * associated with active modifiers.\n *\n * @param modifiers The modifiers applied to the day.\n * @param classNames The base class names for the calendar elements.\n * @param modifiersClassNames The class names associated with specific\n * modifiers.\n * @returns An array of class names for the day.\n */\nexport function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {\n const modifierClassNames = Object.entries(modifiers)\n .filter(([, active]) => active === true)\n .reduce((previousValue, [key]) => {\n if (modifiersClassNames[key]) {\n previousValue.push(modifiersClassNames[key]);\n }\n else if (classNames[DayFlag[key]]) {\n previousValue.push(classNames[DayFlag[key]]);\n }\n else if (classNames[SelectionState[key]]) {\n previousValue.push(classNames[SelectionState[key]]);\n }\n return previousValue;\n }, [classNames[UI.Day]]);\n return modifierClassNames;\n}\n","import * as components from \"../components/custom-components.js\";\n/**\n * Merges custom components from the props with the default components.\n *\n * This function ensures that any custom components provided in the props\n * override the default components.\n *\n * @param customComponents The custom components provided in the DayPicker\n * props.\n * @returns An object containing the merged components.\n */\nexport function getComponents(customComponents) {\n return {\n ...components,\n ...customComponents,\n };\n}\n","/**\n * Extracts `data-` attributes from the DayPicker props.\n *\n * This function collects all `data-` attributes from the props and adds\n * additional attributes based on the DayPicker configuration.\n *\n * @param props The DayPicker props.\n * @returns An object containing the `data-` attributes.\n */\nexport function getDataAttributes(props) {\n const dataAttributes = {\n \"data-mode\": props.mode ?? undefined,\n \"data-required\": \"required\" in props ? props.required : undefined,\n \"data-multiple-months\": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,\n \"data-week-numbers\": props.showWeekNumber || undefined,\n \"data-broadcast-calendar\": props.broadcastCalendar || undefined,\n \"data-nav-layout\": props.navLayout || undefined,\n };\n Object.entries(props).forEach(([key, val]) => {\n if (key.startsWith(\"data-\")) {\n dataAttributes[key] = val;\n }\n });\n return dataAttributes;\n}\n","import { Animation, DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the default class names for the UI elements.\n *\n * This function generates a mapping of default class names for various UI\n * elements, day flags, selection states, and animations.\n *\n * @returns An object containing the default class names.\n * @group Utilities\n */\nexport function getDefaultClassNames() {\n const classNames = {};\n for (const key in UI) {\n classNames[UI[key]] =\n `rdp-${UI[key]}`;\n }\n for (const key in DayFlag) {\n classNames[DayFlag[key]] =\n `rdp-${DayFlag[key]}`;\n }\n for (const key in SelectionState) {\n classNames[SelectionState[key]] =\n `rdp-${SelectionState[key]}`;\n }\n for (const key in Animation) {\n classNames[Animation[key]] =\n `rdp-${Animation[key]}`;\n }\n return classNames;\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the caption of the month.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param month The date representing the month.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted caption as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatCaption(month, options, dateLib) {\n const lib = dateLib ?? new DateLib(options);\n return lib.formatMonthYear(month);\n}\n/**\n * @private\n * @deprecated Use {@link formatCaption} instead.\n * @group Formatters\n */\nexport const formatMonthCaption = formatCaption;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the day date shown in the day cell.\n *\n * @defaultValue `d` (e.g., \"1\").\n * @param date The date to format.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted day as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatDay(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"d\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the month for the dropdown option label.\n *\n * @defaultValue The localized full month name.\n * @param month The date representing the month.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted month name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatMonthDropdown(month, dateLib = defaultDateLib) {\n return dateLib.format(month, \"LLLL\");\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the name of a weekday to be displayed in the weekdays header.\n *\n * @defaultValue `cccccc` (e.g., \"Mo\" for Monday).\n * @param weekday The date representing the weekday.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted weekday name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekdayName(weekday, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(weekday, \"cccccc\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the week number.\n *\n * @defaultValue The week number as a string, with a leading zero for single-digit numbers.\n * @param weekNumber The week number to format.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted week number as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {\n if (weekNumber < 10) {\n return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);\n }\n return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);\n}\n","/**\n * Formats the header for the week number column.\n *\n * @defaultValue An empty string `\"\"`.\n * @returns The formatted week number header as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumberHeader() {\n return ``;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the year for the dropdown option label.\n *\n * @param year The year to format.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted year as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatYearDropdown(year, dateLib = defaultDateLib) {\n return dateLib.format(year, \"yyyy\");\n}\n/**\n * @private\n * @deprecated Use `formatYearDropdown` instead.\n * @group Formatters\n */\nexport const formatYearCaption = formatYearDropdown;\n","import * as defaultFormatters from \"../formatters/index.js\";\n/**\n * Merges custom formatters from the props with the default formatters.\n *\n * @param customFormatters The custom formatters provided in the DayPicker\n * props.\n * @returns The merged formatters object.\n */\nexport function getFormatters(customFormatters) {\n if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {\n customFormatters.formatCaption = customFormatters.formatMonthCaption;\n }\n if (customFormatters?.formatYearCaption &&\n !customFormatters.formatYearDropdown) {\n customFormatters.formatYearDropdown = customFormatters.formatYearCaption;\n }\n return {\n ...defaultFormatters,\n ...customFormatters,\n };\n}\n","/**\n * Returns the months to show in the dropdown.\n *\n * This function generates a list of months for the current year, formatted\n * using the provided formatter, and determines whether each month should be\n * disabled based on the navigation range.\n *\n * @param displayMonth The currently displayed month.\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the month labels.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dropdown options representing the months, or `undefined`\n * if no months are available.\n */\nexport function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {\n const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;\n const months = eachMonthOfInterval({\n start: startOfYear(displayMonth),\n end: endOfYear(displayMonth),\n });\n const options = months.map((month) => {\n const label = formatters.formatMonthDropdown(month, dateLib);\n const value = getMonth(month);\n const disabled = (navStart && month < startOfMonth(navStart)) ||\n (navEnd && month > startOfMonth(navEnd)) ||\n false;\n return { value, label, disabled };\n });\n return options;\n}\n","import { UI } from \"../UI.js\";\n/**\n * Returns the computed style for a day based on its modifiers.\n *\n * This function merges the base styles for the day with any styles associated\n * with active modifiers.\n *\n * @param dayModifiers The modifiers applied to the day.\n * @param styles The base styles for the calendar elements.\n * @param modifiersStyles The styles associated with specific modifiers.\n * @returns The computed style for the day.\n */\nexport function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {\n let style = { ...styles?.[UI.Day] };\n Object.entries(dayModifiers)\n .filter(([, active]) => active === true)\n .forEach(([modifier]) => {\n style = {\n ...style,\n ...modifiersStyles?.[modifier],\n };\n });\n return style;\n}\n","/**\n * Generates a series of 7 days, starting from the beginning of the week, to use\n * for formatting weekday names (e.g., Monday, Tuesday, etc.).\n *\n * @param dateLib The date library to use for date manipulation.\n * @param ISOWeek Whether to use ISO week numbering (weeks start on Monday).\n * @param broadcastCalendar Whether to use the broadcast calendar (weeks start\n * on Monday, but may include adjustments for broadcast-specific rules).\n * @returns An array of 7 dates representing the weekdays.\n */\nexport function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {\n const today = dateLib.today();\n const start = broadcastCalendar\n ? dateLib.startOfBroadcastWeek(today, dateLib)\n : ISOWeek\n ? dateLib.startOfISOWeek(today)\n : dateLib.startOfWeek(today);\n const days = [];\n for (let i = 0; i < 7; i++) {\n const day = dateLib.addDays(start, i);\n days.push(day);\n }\n return days;\n}\n","/**\n * Returns the years to display in the dropdown.\n *\n * This function generates a list of years between the navigation start and end\n * dates, formatted using the provided formatter.\n *\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the year labels.\n * @param dateLib The date library to use for date manipulation.\n * @param reverse If true, reverses the order of the years (descending).\n * @returns An array of dropdown options representing the years, or `undefined`\n * if `navStart` or `navEnd` is not provided.\n */\nexport function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {\n if (!navStart)\n return undefined;\n if (!navEnd)\n return undefined;\n const { startOfYear, endOfYear, eachYearOfInterval, getYear } = dateLib;\n const firstNavYear = startOfYear(navStart);\n const lastNavYear = endOfYear(navEnd);\n const years = eachYearOfInterval({ start: firstNavYear, end: lastNavYear });\n if (reverse)\n years.reverse();\n return years.map((year) => {\n const label = formatters.formatYearDropdown(year, dateLib);\n return {\n value: getYear(year),\n label,\n disabled: false,\n };\n });\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a day button.\n *\n * Use the `modifiers` argument to provide additional context for the label,\n * such as indicating if the day is \"today\" or \"selected.\"\n *\n * @defaultValue The formatted date.\n * @param date - The date to format.\n * @param modifiers - The modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the day button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelDayButton(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers.today)\n label = `Today, ${label}`;\n if (modifiers.selected)\n label = `${label}, selected`;\n return label;\n}\n/**\n * @ignore\n * @deprecated Use `labelDayButton` instead.\n */\nexport const labelDay = labelDayButton;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for the month grid, which is announced when entering\n * the grid.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param date - The date representing the month.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the month grid.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGrid(date, options, dateLib) {\n const lib = dateLib ?? new DateLib(options);\n return lib.formatMonthYear(date);\n}\n/**\n * @ignore\n * @deprecated Use {@link labelGrid} instead.\n */\nexport const labelCaption = labelGrid;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the label for a day grid cell when the calendar is not interactive.\n *\n * @param date - The date to format.\n * @param modifiers - Optional modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The label for the day grid cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGridcell(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers?.today) {\n label = `Today, ${label}`;\n }\n return label;\n}\n","/**\n * Generates the ARIA label for the months dropdown.\n *\n * @defaultValue `\"Choose the Month\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the months dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelMonthDropdown(_options) {\n return \"Choose the Month\";\n}\n","/**\n * Generates the ARIA label for the navigation toolbar.\n *\n * @defaultValue `\"\"`\n * @returns The ARIA label for the navigation toolbar.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNav() {\n return \"\";\n}\n","/**\n * Generates the ARIA label for the \"next month\" button.\n *\n * @defaultValue `\"Go to the Next Month\"`\n * @param month - The date representing the next month, or `undefined` if there\n * is no next month.\n * @returns The ARIA label for the \"next month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNext(_month) {\n return \"Go to the Next Month\";\n}\n","/**\n * Generates the ARIA label for the \"previous month\" button.\n *\n * @defaultValue `\"Go to the Previous Month\"`\n * @param month - The date representing the previous month, or `undefined` if\n * there is no previous month.\n * @returns The ARIA label for the \"previous month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelPrevious(_month) {\n return \"Go to the Previous Month\";\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a weekday column header.\n *\n * @defaultValue `\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"`\n * @param date - The date representing the weekday.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the weekday column header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekday(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"cccc\");\n}\n","/**\n * Generates the ARIA label for the week number cell (the first cell in a row).\n *\n * @defaultValue `Week ${weekNumber}`\n * @param weekNumber - The number of the week.\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumber(weekNumber, _options) {\n return `Week ${weekNumber}`;\n}\n","/**\n * Generates the ARIA label for the week number header element.\n *\n * @defaultValue `\"Week Number\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumberHeader(_options) {\n return \"Week Number\";\n}\n","/**\n * Generates the ARIA label for the years dropdown.\n *\n * @defaultValue `\"Choose the Year\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the years dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelYearDropdown(_options) {\n return \"Choose the Year\";\n}\n","import { useLayoutEffect, useRef } from \"react\";\nimport { Animation } from \"./UI.js\";\nconst asHtmlElement = (element) => {\n if (element instanceof HTMLElement)\n return element;\n return null;\n};\nconst queryMonthEls = (element) => [\n ...(element.querySelectorAll(\"[data-animated-month]\") ?? []),\n];\nconst queryMonthEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-month]\"));\nconst queryCaptionEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-caption]\"));\nconst queryWeeksEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weeks]\"));\nconst queryNavEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-nav]\"));\nconst queryWeekdaysEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weekdays]\"));\n/**\n * Handles animations for transitioning between months in the DayPicker\n * component.\n *\n * @private\n * @param rootElRef - A reference to the root element of the DayPicker\n * component.\n * @param enabled - Whether animations are enabled.\n * @param options - Configuration options for the animation, including class\n * names, months, focused day, and the date utility library.\n */\nexport function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib, }) {\n const previousRootElSnapshotRef = useRef(null);\n const previousMonthsRef = useRef(months);\n const animatingRef = useRef(false);\n useLayoutEffect(() => {\n // get previous months before updating the previous months ref\n const previousMonths = previousMonthsRef.current;\n // update previous months ref for next effect trigger\n previousMonthsRef.current = months;\n if (!enabled ||\n !rootElRef.current ||\n // safety check because the ref can be set to anything by consumers\n !(rootElRef.current instanceof HTMLElement) ||\n // validation required for the animation to work as expected\n months.length === 0 ||\n previousMonths.length === 0 ||\n months.length !== previousMonths.length) {\n return;\n }\n const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);\n const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);\n const captionAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.caption_after_enter]\n : classNames[Animation.caption_before_enter];\n const weeksAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.weeks_after_enter]\n : classNames[Animation.weeks_before_enter];\n // get previous root element snapshot before updating the snapshot ref\n const previousRootElSnapshot = previousRootElSnapshotRef.current;\n // update snapshot for next effect trigger\n const rootElSnapshot = rootElRef.current.cloneNode(true);\n if (rootElSnapshot instanceof HTMLElement) {\n // if this effect is triggered while animating, we need to clean up the new root snapshot\n // to put it in the same state as when not animating, to correctly animate the next month change\n const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);\n currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {\n if (!(currentMonthElSnapshot instanceof HTMLElement))\n return;\n // remove the old month snapshots from the new root snapshot\n const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);\n if (previousMonthElSnapshot &&\n currentMonthElSnapshot.contains(previousMonthElSnapshot)) {\n currentMonthElSnapshot.removeChild(previousMonthElSnapshot);\n }\n // remove animation classes from the new month snapshots\n const captionEl = queryCaptionEl(currentMonthElSnapshot);\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthElSnapshot);\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n });\n previousRootElSnapshotRef.current = rootElSnapshot;\n }\n else {\n previousRootElSnapshotRef.current = null;\n }\n if (animatingRef.current ||\n isSameMonth ||\n // skip animation if a day is focused because it can cause issues to the animation and is better for a11y\n focused) {\n return;\n }\n const previousMonthEls = previousRootElSnapshot instanceof HTMLElement\n ? queryMonthEls(previousRootElSnapshot)\n : [];\n const currentMonthEls = queryMonthEls(rootElRef.current);\n if (currentMonthEls?.every((el) => el instanceof HTMLElement) &&\n previousMonthEls &&\n previousMonthEls.every((el) => el instanceof HTMLElement)) {\n animatingRef.current = true;\n const cleanUpFunctions = [];\n // set isolation to isolate to isolate the stacking context during animation\n rootElRef.current.style.isolation = \"isolate\";\n // set z-index to 1 to ensure the nav is clickable over the other elements being animated\n const navEl = queryNavEl(rootElRef.current);\n if (navEl) {\n navEl.style.zIndex = \"1\";\n }\n currentMonthEls.forEach((currentMonthEl, index) => {\n const previousMonthEl = previousMonthEls[index];\n if (!previousMonthEl) {\n return;\n }\n // animate new displayed month\n currentMonthEl.style.position = \"relative\";\n currentMonthEl.style.overflow = \"hidden\";\n const captionEl = queryCaptionEl(currentMonthEl);\n if (captionEl) {\n captionEl.classList.add(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthEl);\n if (weeksEl) {\n weeksEl.classList.add(weeksAnimationClass);\n }\n // animate new displayed month end\n const cleanUp = () => {\n animatingRef.current = false;\n if (rootElRef.current) {\n rootElRef.current.style.isolation = \"\";\n }\n if (navEl) {\n navEl.style.zIndex = \"\";\n }\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n currentMonthEl.style.position = \"\";\n currentMonthEl.style.overflow = \"\";\n if (currentMonthEl.contains(previousMonthEl)) {\n currentMonthEl.removeChild(previousMonthEl);\n }\n };\n cleanUpFunctions.push(cleanUp);\n // animate old displayed month\n previousMonthEl.style.pointerEvents = \"none\";\n previousMonthEl.style.position = \"absolute\";\n previousMonthEl.style.overflow = \"hidden\";\n previousMonthEl.setAttribute(\"aria-hidden\", \"true\");\n // hide the weekdays container of the old month and only the new one\n const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);\n if (previousWeekdaysEl) {\n previousWeekdaysEl.style.opacity = \"0\";\n }\n const previousCaptionEl = queryCaptionEl(previousMonthEl);\n if (previousCaptionEl) {\n previousCaptionEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.caption_before_exit]\n : classNames[Animation.caption_after_exit]);\n previousCaptionEl.addEventListener(\"animationend\", cleanUp);\n }\n const previousWeeksEl = queryWeeksEl(previousMonthEl);\n if (previousWeeksEl) {\n previousWeeksEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.weeks_before_exit]\n : classNames[Animation.weeks_after_exit]);\n }\n currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);\n });\n }\n });\n}\n","/**\n * Returns all the dates to display in the calendar.\n *\n * This function calculates the range of dates to display based on the provided\n * display months, constraints, and calendar configuration.\n *\n * @param displayMonths The months to display in the calendar.\n * @param maxDate The maximum date to include in the range.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates to display in the calendar.\n */\nexport function getDates(displayMonths, maxDate, props, dateLib) {\n const firstMonth = displayMonths[0];\n const lastMonth = displayMonths[displayMonths.length - 1];\n const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};\n const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const startWeekFirstDate = broadcastCalendar\n ? startOfBroadcastWeek(firstMonth, dateLib)\n : ISOWeek\n ? startOfISOWeek(firstMonth)\n : startOfWeek(firstMonth);\n const endWeekLastDate = broadcastCalendar\n ? endOfBroadcastWeek(lastMonth)\n : ISOWeek\n ? endOfISOWeek(endOfMonth(lastMonth))\n : endOfWeek(endOfMonth(lastMonth));\n const nOfDays = differenceInCalendarDays(endWeekLastDate, startWeekFirstDate);\n const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;\n const dates = [];\n for (let i = 0; i <= nOfDays; i++) {\n const date = addDays(startWeekFirstDate, i);\n if (maxDate && isAfter(date, maxDate)) {\n break;\n }\n dates.push(date);\n }\n // If fixed weeks is enabled, add the extra dates to the array\n const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;\n const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;\n if (fixedWeeks && dates.length < extraDates) {\n const daysToAdd = extraDates - dates.length;\n for (let i = 0; i < daysToAdd; i++) {\n const date = addDays(dates[dates.length - 1], 1);\n dates.push(date);\n }\n }\n return dates;\n}\n","/**\n * Returns all the days belonging to the calendar by merging the days in the\n * weeks for each month.\n *\n * @param calendarMonths The array of calendar months.\n * @returns An array of `CalendarDay` objects representing all the days in the\n * calendar.\n */\nexport function getDays(calendarMonths) {\n const initialDays = [];\n return calendarMonths.reduce((days, month) => {\n const weekDays = month.weeks.reduce((weekDays, week) => {\n return weekDays.concat(week.days.slice());\n }, initialDays.slice());\n return days.concat(weekDays.slice());\n }, initialDays.slice());\n}\n","/**\n * Returns the months to display in the calendar.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including `numberOfMonths`.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates representing the months to display.\n */\nexport function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {\n const { numberOfMonths = 1 } = props;\n const months = [];\n for (let i = 0; i < numberOfMonths; i++) {\n const month = dateLib.addMonths(firstDisplayedMonth, i);\n if (calendarEndMonth && month > calendarEndMonth) {\n break;\n }\n months.push(month);\n }\n return months;\n}\n","/**\n * Determines the initial month to display in the calendar based on the provided\n * props.\n *\n * This function calculates the starting month, considering constraints such as\n * `startMonth`, `endMonth`, and the number of months to display.\n *\n * @param props The DayPicker props, including navigation and date constraints.\n * @param dateLib The date library to use for date manipulation.\n * @returns The initial month to display.\n */\nexport function getInitialMonth(props, navStart, navEnd, dateLib) {\n const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;\n let initialMonth = month || defaultMonth || today;\n const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;\n if (navEnd &&\n differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {\n const offset = -1 * (numberOfMonths - 1);\n initialMonth = addMonths(navEnd, offset);\n }\n if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {\n initialMonth = navStart;\n }\n return startOfMonth(initialMonth);\n}\n","import { CalendarDay, CalendarMonth, CalendarWeek } from \"../classes/index.js\";\n/**\n * Returns the months to display in the calendar.\n *\n * This function generates `CalendarMonth` objects for each month to be\n * displayed, including their weeks and days, based on the provided display\n * months and dates.\n *\n * @param displayMonths The months (as dates) to display in the calendar.\n * @param dates The dates to display in the calendar.\n * @param props Options from the DayPicker props context.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of `CalendarMonth` objects representing the months to\n * display.\n */\nexport function getMonths(displayMonths, dates, props, dateLib) {\n const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const dayPickerMonths = displayMonths.reduce((months, month) => {\n const firstDateOfFirstWeek = props.broadcastCalendar\n ? startOfBroadcastWeek(month, dateLib)\n : props.ISOWeek\n ? startOfISOWeek(month)\n : startOfWeek(month);\n const lastDateOfLastWeek = props.broadcastCalendar\n ? endOfBroadcastWeek(month)\n : props.ISOWeek\n ? endOfISOWeek(endOfMonth(month))\n : endOfWeek(endOfMonth(month));\n /** The dates to display in the month. */\n const monthDates = dates.filter((date) => {\n return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;\n });\n const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;\n if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {\n const extraDates = dates.filter((date) => {\n const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;\n return (date > lastDateOfLastWeek &&\n date <= addDays(lastDateOfLastWeek, daysToAdd));\n });\n monthDates.push(...extraDates);\n }\n const weeks = monthDates.reduce((weeks, date) => {\n const weekNumber = props.ISOWeek ? getISOWeek(date) : getWeek(date);\n const week = weeks.find((week) => week.weekNumber === weekNumber);\n const day = new CalendarDay(date, month, dateLib);\n if (!week) {\n weeks.push(new CalendarWeek(weekNumber, [day]));\n }\n else {\n week.days.push(day);\n }\n return weeks;\n }, []);\n const dayPickerMonth = new CalendarMonth(month, weeks);\n months.push(dayPickerMonth);\n return months;\n }, []);\n if (!props.reverseMonths) {\n return dayPickerMonths;\n }\n else {\n return dayPickerMonths.reverse();\n }\n}\n","/**\n * Returns the start and end months for calendar navigation.\n *\n * @param props The DayPicker props, including navigation and layout options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A tuple containing the start and end months for navigation.\n */\nexport function getNavMonths(props, dateLib) {\n let { startMonth, endMonth } = props;\n const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today, } = dateLib;\n // Handle deprecated code\n const { fromYear, toYear, fromMonth, toMonth } = props;\n if (!startMonth && fromMonth) {\n startMonth = fromMonth;\n }\n if (!startMonth && fromYear) {\n startMonth = dateLib.newDate(fromYear, 0, 1);\n }\n if (!endMonth && toMonth) {\n endMonth = toMonth;\n }\n if (!endMonth && toYear) {\n endMonth = newDate(toYear, 11, 31);\n }\n const hasYearDropdown = props.captionLayout === \"dropdown\" ||\n props.captionLayout === \"dropdown-years\";\n if (startMonth) {\n startMonth = startOfMonth(startMonth);\n }\n else if (fromYear) {\n startMonth = newDate(fromYear, 0, 1);\n }\n else if (!startMonth && hasYearDropdown) {\n startMonth = startOfYear(addYears(props.today ?? today(), -100));\n }\n if (endMonth) {\n endMonth = endOfMonth(endMonth);\n }\n else if (toYear) {\n endMonth = newDate(toYear, 11, 31);\n }\n else if (!endMonth && hasYearDropdown) {\n endMonth = endOfYear(props.today ?? today());\n }\n return [\n startMonth ? startOfDay(startMonth) : startMonth,\n endMonth ? startOfDay(endMonth) : endMonth,\n ];\n}\n","/**\n * Returns the next month the user can navigate to, based on the given options.\n *\n * The next month is not always the next calendar month:\n *\n * - If it is after the `calendarEndMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips forward by the number of displayed\n * months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n * `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next month, or `undefined` if navigation is not possible.\n */\nexport function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {\n if (options.disableNavigation) {\n return undefined;\n }\n const { pagedNavigation, numberOfMonths = 1 } = options;\n const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n const offset = pagedNavigation ? numberOfMonths : 1;\n const month = startOfMonth(firstDisplayedMonth);\n if (!calendarEndMonth) {\n return addMonths(month, offset);\n }\n const monthsDiff = differenceInCalendarMonths(calendarEndMonth, firstDisplayedMonth);\n if (monthsDiff < numberOfMonths) {\n return undefined;\n }\n return addMonths(month, offset);\n}\n","/**\n * Returns the previous month the user can navigate to, based on the given\n * options.\n *\n * The previous month is not always the previous calendar month:\n *\n * - If it is before the `calendarStartMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips back by the number of displayed\n * months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n * `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The previous month, or `undefined` if navigation is not possible.\n */\nexport function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {\n if (options.disableNavigation) {\n return undefined;\n }\n const { pagedNavigation, numberOfMonths } = options;\n const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n const offset = pagedNavigation ? (numberOfMonths ?? 1) : 1;\n const month = startOfMonth(firstDisplayedMonth);\n if (!calendarStartMonth) {\n return addMonths(month, -offset);\n }\n const monthsDiff = differenceInCalendarMonths(month, calendarStartMonth);\n if (monthsDiff <= 0) {\n return undefined;\n }\n return addMonths(month, -offset);\n}\n","/**\n * Returns an array of calendar weeks from an array of calendar months.\n *\n * @param months The array of calendar months.\n * @returns An array of calendar weeks.\n */\nexport function getWeeks(months) {\n const initialWeeks = [];\n return months.reduce((weeks, month) => {\n return weeks.concat(month.weeks.slice());\n }, initialWeeks.slice());\n}\n","import { useState } from \"react\";\n/**\n * A custom hook for managing both controlled and uncontrolled component states.\n *\n * This hook allows a component to support both controlled and uncontrolled\n * states by determining whether the `controlledValue` is provided. If it is\n * undefined, the hook falls back to using the internal state.\n *\n * @example\n * // Uncontrolled usage\n * const [value, setValue] = useControlledValue(0, undefined);\n *\n * // Controlled usage\n * const [value, setValue] = useControlledValue(0, props.value);\n *\n * @template T - The type of the value.\n * @param defaultValue The initial value for the uncontrolled state.\n * @param controlledValue The value for the controlled state. If undefined, the\n * component will use the uncontrolled state.\n * @returns A tuple where the first element is the current value (either\n * controlled or uncontrolled) and the second element is a setter function to\n * update the value.\n */\nexport function useControlledValue(defaultValue, controlledValue) {\n const [uncontrolledValue, setValue] = useState(defaultValue);\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n return [value, setValue];\n}\n","import { useEffect } from \"react\";\nimport { getDates } from \"./helpers/getDates.js\";\nimport { getDays } from \"./helpers/getDays.js\";\nimport { getDisplayMonths } from \"./helpers/getDisplayMonths.js\";\nimport { getInitialMonth } from \"./helpers/getInitialMonth.js\";\nimport { getMonths } from \"./helpers/getMonths.js\";\nimport { getNavMonths } from \"./helpers/getNavMonth.js\";\nimport { getNextMonth } from \"./helpers/getNextMonth.js\";\nimport { getPreviousMonth } from \"./helpers/getPreviousMonth.js\";\nimport { getWeeks } from \"./helpers/getWeeks.js\";\nimport { useControlledValue } from \"./helpers/useControlledValue.js\";\n/**\n * Provides the calendar object to work with the calendar in custom components.\n *\n * @private\n * @param props - The DayPicker props related to calendar configuration.\n * @param dateLib - The date utility library instance.\n * @returns The calendar object containing displayed days, weeks, months, and\n * navigation methods.\n */\nexport function useCalendar(props, dateLib) {\n const [navStart, navEnd] = getNavMonths(props, dateLib);\n const { startOfMonth, endOfMonth } = dateLib;\n const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n const [firstMonth, setFirstMonth] = useControlledValue(initialMonth, \n // initialMonth is always computed from props.month if provided\n props.month ? initialMonth : undefined);\n // biome-ignore lint/correctness/useExhaustiveDependencies: change the initial month when the time zone changes.\n useEffect(() => {\n const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n setFirstMonth(newInitialMonth);\n }, [props.timeZone]);\n /** The months displayed in the calendar. */\n const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);\n /** The dates displayed in the calendar. */\n const dates = getDates(displayMonths, props.endMonth ? endOfMonth(props.endMonth) : undefined, props, dateLib);\n /** The Months displayed in the calendar. */\n const months = getMonths(displayMonths, dates, props, dateLib);\n /** The Weeks displayed in the calendar. */\n const weeks = getWeeks(months);\n /** The Days displayed in the calendar. */\n const days = getDays(months);\n const previousMonth = getPreviousMonth(firstMonth, navStart, props, dateLib);\n const nextMonth = getNextMonth(firstMonth, navEnd, props, dateLib);\n const { disableNavigation, onMonthChange } = props;\n const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));\n const goToMonth = (date) => {\n if (disableNavigation) {\n return;\n }\n let newMonth = startOfMonth(date);\n // if month is before start, use the first month instead\n if (navStart && newMonth < startOfMonth(navStart)) {\n newMonth = startOfMonth(navStart);\n }\n // if month is after endMonth, use the last month instead\n if (navEnd && newMonth > startOfMonth(navEnd)) {\n newMonth = startOfMonth(navEnd);\n }\n setFirstMonth(newMonth);\n onMonthChange?.(newMonth);\n };\n const goToDay = (day) => {\n // is this check necessary?\n if (isDayInCalendar(day)) {\n return;\n }\n goToMonth(day.date);\n };\n const calendar = {\n months,\n weeks,\n days,\n navStart,\n navEnd,\n previousMonth,\n nextMonth,\n goToMonth,\n goToDay,\n };\n return calendar;\n}\n","import { DayFlag } from \"../UI.js\";\nvar FocusTargetPriority;\n(function (FocusTargetPriority) {\n FocusTargetPriority[FocusTargetPriority[\"Today\"] = 0] = \"Today\";\n FocusTargetPriority[FocusTargetPriority[\"Selected\"] = 1] = \"Selected\";\n FocusTargetPriority[FocusTargetPriority[\"LastFocused\"] = 2] = \"LastFocused\";\n FocusTargetPriority[FocusTargetPriority[\"FocusedModifier\"] = 3] = \"FocusedModifier\";\n})(FocusTargetPriority || (FocusTargetPriority = {}));\n/**\n * Determines if a day is focusable based on its modifiers.\n *\n * A day is considered focusable if it is not disabled, hidden, or outside the\n * displayed month.\n *\n * @param modifiers The modifiers applied to the day.\n * @returns `true` if the day is focusable, otherwise `false`.\n */\nfunction isFocusableDay(modifiers) {\n return (!modifiers[DayFlag.disabled] &&\n !modifiers[DayFlag.hidden] &&\n !modifiers[DayFlag.outside]);\n}\n/**\n * Calculates the focus target day based on priority.\n *\n * This function determines the day that should receive focus in the calendar,\n * prioritizing days with specific modifiers (e.g., \"focused\", \"today\") or\n * selection states.\n *\n * @param days The array of `CalendarDay` objects to evaluate.\n * @param getModifiers A function to retrieve the modifiers for a given day.\n * @param isSelected A function to determine if a day is selected.\n * @param lastFocused The last focused day, if any.\n * @returns The `CalendarDay` that should receive focus, or `undefined` if no\n * focusable day is found.\n */\nexport function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {\n let focusTarget;\n let foundFocusTargetPriority = -1;\n for (const day of days) {\n const modifiers = getModifiers(day);\n if (isFocusableDay(modifiers)) {\n if (modifiers[DayFlag.focused] &&\n foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;\n }\n else if (lastFocused?.isEqualTo(day) &&\n foundFocusTargetPriority < FocusTargetPriority.LastFocused) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.LastFocused;\n }\n else if (isSelected(day.date) &&\n foundFocusTargetPriority < FocusTargetPriority.Selected) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.Selected;\n }\n else if (modifiers[DayFlag.today] &&\n foundFocusTargetPriority < FocusTargetPriority.Today) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.Today;\n }\n }\n }\n if (!focusTarget) {\n // Return the first day that is focusable\n focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));\n }\n return focusTarget;\n}\n","/**\n * Calculates the next date that should be focused in the calendar.\n *\n * This function determines the next focusable date based on the movement\n * direction, constraints, and calendar configuration.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDate The reference date from which to calculate the next focusable\n * date.\n * @param navStart The earliest date the user can navigate to.\n * @param navEnd The latest date the user can navigate to.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next focusable date.\n */\nexport function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {\n const { ISOWeek, broadcastCalendar } = props;\n const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const moveFns = {\n day: addDays,\n week: addWeeks,\n month: addMonths,\n year: addYears,\n startOfWeek: (date) => broadcastCalendar\n ? startOfBroadcastWeek(date, dateLib)\n : ISOWeek\n ? startOfISOWeek(date)\n : startOfWeek(date),\n endOfWeek: (date) => broadcastCalendar\n ? endOfBroadcastWeek(date)\n : ISOWeek\n ? endOfISOWeek(date)\n : endOfWeek(date),\n };\n let focusableDate = moveFns[moveBy](refDate, moveDir === \"after\" ? 1 : -1);\n if (moveDir === \"before\" && navStart) {\n focusableDate = max([navStart, focusableDate]);\n }\n else if (moveDir === \"after\" && navEnd) {\n focusableDate = min([navEnd, focusableDate]);\n }\n return focusableDate;\n}\n","import { CalendarDay } from \"../classes/index.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\nimport { getFocusableDate } from \"./getFocusableDate.js\";\n/**\n * Determines the next focusable day in the calendar.\n *\n * This function recursively calculates the next focusable day based on the\n * movement direction and modifiers applied to the days.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDay The currently focused day.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including modifiers and configuration\n * options.\n * @param dateLib The date library to use for date manipulation.\n * @param attempt The current recursion attempt (used to limit recursion depth).\n * @returns The next focusable day, or `undefined` if no focusable day is found.\n */\nexport function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {\n if (attempt > 365) {\n // Limit the recursion to 365 attempts\n return undefined;\n }\n const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);\n const isDisabled = Boolean(props.disabled &&\n dateMatchModifiers(focusableDate, props.disabled, dateLib));\n const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));\n const targetMonth = focusableDate;\n const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);\n if (!isDisabled && !isHidden) {\n return focusDay;\n }\n // Recursively attempt to find the next focusable date\n return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);\n}\n","import { useState } from \"react\";\nimport { calculateFocusTarget } from \"./helpers/calculateFocusTarget.js\";\nimport { getNextFocus } from \"./helpers/getNextFocus.js\";\n/**\n * Manages focus behavior for the DayPicker component, including setting,\n * moving, and blurring focus on calendar days.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param calendar - The calendar object containing the displayed days and\n * months.\n * @param getModifiers - A function to retrieve modifiers for a given day.\n * @param isSelected - A function to check if a date is selected.\n * @param dateLib - The date utility library instance.\n * @returns An object containing focus-related methods and the currently focused\n * day.\n */\nexport function useFocus(props, calendar, getModifiers, isSelected, dateLib) {\n const { autoFocus } = props;\n const [lastFocused, setLastFocused] = useState();\n const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);\n const [focusedDay, setFocused] = useState(autoFocus ? focusTarget : undefined);\n const blur = () => {\n setLastFocused(focusedDay);\n setFocused(undefined);\n };\n const moveFocus = (moveBy, moveDir) => {\n if (!focusedDay)\n return;\n const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);\n if (!nextFocus)\n return;\n if (props.disableNavigation) {\n const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));\n if (!isNextInCalendar) {\n return;\n }\n }\n calendar.goToDay(nextFocus);\n setFocused(nextFocus);\n };\n const isFocusTarget = (day) => {\n return Boolean(focusTarget?.isEqualTo(day));\n };\n const useFocus = {\n isFocusTarget,\n setFocused,\n focused: focusedDay,\n blur,\n moveFocus,\n };\n return useFocus;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage multiple-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected dates, a function to select dates,\n * and a function to check if a date is selected.\n */\nexport function useMulti(props, dateLib) {\n const { selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (date) => {\n return selected?.some((d) => isSameDay(d, date)) ?? false;\n };\n const { min, max } = props;\n const select = (triggerDate, modifiers, e) => {\n let newDates = [...(selected ?? [])];\n if (isSelected(triggerDate)) {\n if (selected?.length === min) {\n // Min value reached, do nothing\n return;\n }\n if (required && selected?.length === 1) {\n // Required value already selected do nothing\n return;\n }\n newDates = selected?.filter((d) => !isSameDay(d, triggerDate));\n }\n else {\n if (selected?.length === max) {\n // Max value reached, reset the selection to date\n newDates = [triggerDate];\n }\n else {\n // Add the date to the selection\n newDates = [...newDates, triggerDate];\n }\n }\n if (!onSelect) {\n setSelected(newDates);\n }\n onSelect?.(newDates, triggerDate, modifiers, e);\n return newDates;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Adds a date to an existing range, considering constraints like minimum and\n * maximum range size.\n *\n * @param date - The date to add to the range.\n * @param initialRange - The initial range to which the date will be added.\n * @param min - The minimum number of days in the range.\n * @param max - The maximum number of days in the range.\n * @param required - Whether the range must always include at least one date.\n * @param dateLib - The date utility library instance.\n * @returns The updated date range, or `undefined` if the range is cleared.\n * @group Utilities\n */\nexport function addToRange(date, initialRange, min = 0, max = 0, required = false, dateLib = defaultDateLib) {\n const { from, to } = initialRange || {};\n const { isSameDay, isAfter, isBefore } = dateLib;\n let range;\n if (!from && !to) {\n // the range is empty, add the date\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (from && !to) {\n // adding date to an incomplete range\n if (isSameDay(from, date)) {\n // adding a date equal to the start of the range\n if (min === 0) {\n range = { from, to: date };\n }\n else if (required) {\n range = { from, to: undefined };\n }\n else {\n range = undefined;\n }\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: from };\n }\n else {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n }\n else if (from && to) {\n // adding date to a complete range\n if (isSameDay(from, date) && isSameDay(to, date)) {\n // adding a date that is equal to both start and end of the range\n if (required) {\n range = { from, to };\n }\n else {\n range = undefined;\n }\n }\n else if (isSameDay(from, date)) {\n // adding a date equal to the the start of the range\n range = { from, to: min > 0 ? undefined : date };\n }\n else if (isSameDay(to, date)) {\n // adding a dare equal to the end of the range\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: to };\n }\n else if (isAfter(date, from)) {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n else if (isAfter(date, to)) {\n // adding a date after the end of the range\n range = { from, to: date };\n }\n else {\n throw new Error(\"Invalid range\");\n }\n }\n // check for min / max\n if (range?.from && range?.to) {\n const diff = dateLib.differenceInCalendarDays(range.to, range.from);\n if (max > 0 && diff > max) {\n range = { from: date, to: undefined };\n }\n else if (min > 1 && diff < min) {\n range = { from: date, to: undefined };\n }\n }\n return range;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Checks if a date range contains one or more specified days of the week.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param dayOfWeek - The day(s) of the week to check for (`0-6`, where `0` is\n * Sunday).\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains the specified day(s) of the week,\n * otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {\n const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n // iterate at maximum one week or the total days if the range is shorter than one week\n const totalDaysLimit = Math.min(totalDays, 6);\n for (let i = 0; i <= totalDaysLimit; i++) {\n if (dayOfWeekArr.includes(date.getDay())) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n return false;\n}\n","import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines if two date ranges overlap.\n *\n * @since 9.2.2\n * @param rangeLeft - The first date range.\n * @param rangeRight - The second date range.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the ranges overlap, otherwise `false`.\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a date range contains dates that match the given modifiers.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param modifiers - The modifiers to match against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains matching dates, otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n // Defer function matchers evaluation as they are the least performant.\n const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n if (typeof matcher === \"boolean\")\n return matcher;\n if (dateLib.isDate(matcher)) {\n return rangeIncludesDate(range, matcher, false, dateLib);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n }\n if (isDateRange(matcher)) {\n if (matcher.from && matcher.to) {\n return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n }\n return false;\n }\n if (isDayOfWeekType(matcher)) {\n return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n }\n if (isDateInterval(matcher)) {\n const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return rangeOverlaps(range, {\n from: dateLib.addDays(matcher.after, 1),\n to: dateLib.addDays(matcher.before, -1),\n }, dateLib);\n }\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n return false;\n });\n if (nonFunctionMatchersResult) {\n return true;\n }\n const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n if (functionMatchers.length) {\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n for (let i = 0; i <= totalDays; i++) {\n if (functionMatchers.some((matcher) => matcher(date))) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n }\n return false;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\nimport { addToRange, rangeContainsModifiers } from \"../utils/index.js\";\nimport { rangeIncludesDate } from \"../utils/rangeIncludesDate.js\";\n/**\n * Hook to manage range selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected range, a function to select a\n * range, and a function to check if a date is within the range.\n */\nexport function useRange(props, dateLib) {\n const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);\n const select = (triggerDate, modifiers, e) => {\n const { min, max } = props;\n const newRange = triggerDate\n ? addToRange(triggerDate, selected, min, max, required, dateLib)\n : undefined;\n if (excludeDisabled && disabled && newRange?.from && newRange.to) {\n if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {\n // if a disabled days is found, the range is reset\n newRange.from = triggerDate;\n newRange.to = undefined;\n }\n }\n if (!onSelect) {\n setSelected(newRange);\n }\n onSelect?.(newRange, triggerDate, modifiers, e);\n return newRange;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage single-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected date, a function to select a date,\n * and a function to check if a date is selected.\n */\nexport function useSingle(props, dateLib) {\n const { selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (compareDate) => {\n return selected ? isSameDay(selected, compareDate) : false;\n };\n const select = (triggerDate, modifiers, e) => {\n let newDate = triggerDate;\n if (!required && selected && selected && isSameDay(triggerDate, selected)) {\n // If the date is the same, clear the selection.\n newDate = undefined;\n }\n if (!onSelect) {\n setSelected(newDate);\n }\n if (required) {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n else {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n return newDate;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { useMulti } from \"./selection/useMulti.js\";\nimport { useRange } from \"./selection/useRange.js\";\nimport { useSingle } from \"./selection/useSingle.js\";\n/**\n * Determines the appropriate selection hook to use based on the selection mode\n * and returns the corresponding selection object.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns The selection object for the specified mode, or `undefined` if no\n * mode is set.\n */\nexport function useSelection(props, dateLib) {\n const single = useSingle(props, dateLib);\n const multi = useMulti(props, dateLib);\n const range = useRange(props, dateLib);\n switch (props.mode) {\n case \"single\":\n return single;\n case \"multiple\":\n return multi;\n case \"range\":\n return range;\n default:\n return undefined;\n }\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport React, { useCallback, useMemo, useRef } from \"react\";\nimport { DateLib, defaultLocale } from \"./classes/DateLib.js\";\nimport { createGetModifiers } from \"./helpers/createGetModifiers.js\";\nimport { getClassNamesForModifiers } from \"./helpers/getClassNamesForModifiers.js\";\nimport { getComponents } from \"./helpers/getComponents.js\";\nimport { getDataAttributes } from \"./helpers/getDataAttributes.js\";\nimport { getDefaultClassNames } from \"./helpers/getDefaultClassNames.js\";\nimport { getFormatters } from \"./helpers/getFormatters.js\";\nimport { getMonthOptions } from \"./helpers/getMonthOptions.js\";\nimport { getStyleForModifiers } from \"./helpers/getStyleForModifiers.js\";\nimport { getWeekdays } from \"./helpers/getWeekdays.js\";\nimport { getYearOptions } from \"./helpers/getYearOptions.js\";\nimport * as defaultLabels from \"./labels/index.js\";\nimport { DayFlag, SelectionState, UI } from \"./UI.js\";\nimport { useAnimation } from \"./useAnimation.js\";\nimport { useCalendar } from \"./useCalendar.js\";\nimport { dayPickerContext } from \"./useDayPicker.js\";\nimport { useFocus } from \"./useFocus.js\";\nimport { useSelection } from \"./useSelection.js\";\nimport { rangeIncludesDate } from \"./utils/rangeIncludesDate.js\";\nimport { isDateRange } from \"./utils/typeguards.js\";\n/**\n * Renders the DayPicker calendar component.\n *\n * @param initialProps - The props for the DayPicker component.\n * @returns The rendered DayPicker component.\n * @group DayPicker\n * @see https://daypicker.dev\n */\nexport function DayPicker(initialProps) {\n let props = initialProps;\n if (props.timeZone) {\n props = {\n ...initialProps,\n };\n if (props.today) {\n props.today = new TZDate(props.today, props.timeZone);\n }\n if (props.month) {\n props.month = new TZDate(props.month, props.timeZone);\n }\n if (props.defaultMonth) {\n props.defaultMonth = new TZDate(props.defaultMonth, props.timeZone);\n }\n if (props.startMonth) {\n props.startMonth = new TZDate(props.startMonth, props.timeZone);\n }\n if (props.endMonth) {\n props.endMonth = new TZDate(props.endMonth, props.timeZone);\n }\n if (props.mode === \"single\" && props.selected) {\n props.selected = new TZDate(props.selected, props.timeZone);\n }\n else if (props.mode === \"multiple\" && props.selected) {\n props.selected = props.selected?.map((date) => new TZDate(date, props.timeZone));\n }\n else if (props.mode === \"range\" && props.selected) {\n props.selected = {\n from: props.selected.from\n ? new TZDate(props.selected.from, props.timeZone)\n : undefined,\n to: props.selected.to\n ? new TZDate(props.selected.to, props.timeZone)\n : undefined,\n };\n }\n }\n const { components, formatters, labels, dateLib, locale, classNames } = useMemo(() => {\n const locale = { ...defaultLocale, ...props.locale };\n const dateLib = new DateLib({\n locale,\n weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,\n firstWeekContainsDate: props.firstWeekContainsDate,\n useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,\n useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,\n timeZone: props.timeZone,\n numerals: props.numerals,\n }, props.dateLib);\n return {\n dateLib,\n components: getComponents(props.components),\n formatters: getFormatters(props.formatters),\n labels: { ...defaultLabels, ...props.labels },\n locale,\n classNames: { ...getDefaultClassNames(), ...props.classNames },\n };\n }, [\n props.locale,\n props.broadcastCalendar,\n props.weekStartsOn,\n props.firstWeekContainsDate,\n props.useAdditionalWeekYearTokens,\n props.useAdditionalDayOfYearTokens,\n props.timeZone,\n props.numerals,\n props.dateLib,\n props.components,\n props.formatters,\n props.labels,\n props.classNames,\n ]);\n const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles, } = props;\n const { formatCaption, formatDay, formatMonthDropdown, formatWeekNumber, formatWeekNumberHeader, formatWeekdayName, formatYearDropdown, } = formatters;\n const calendar = useCalendar(props, dateLib);\n const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth, } = calendar;\n const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);\n const { isSelected, select, selected: selectedValue, } = useSelection(props, dateLib) ?? {};\n const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);\n const { labelDayButton, labelGridcell, labelGrid, labelMonthDropdown, labelNav, labelPrevious, labelNext, labelWeekday, labelWeekNumber, labelWeekNumberHeader, labelYearDropdown, } = labels;\n const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);\n const isInteractive = mode !== undefined || onDayClick !== undefined;\n const handlePreviousClick = useCallback(() => {\n if (!previousMonth)\n return;\n goToMonth(previousMonth);\n onPrevClick?.(previousMonth);\n }, [previousMonth, goToMonth, onPrevClick]);\n const handleNextClick = useCallback(() => {\n if (!nextMonth)\n return;\n goToMonth(nextMonth);\n onNextClick?.(nextMonth);\n }, [goToMonth, nextMonth, onNextClick]);\n const handleDayClick = useCallback((day, m) => (e) => {\n e.preventDefault();\n e.stopPropagation();\n setFocused(day);\n select?.(day.date, m, e);\n onDayClick?.(day.date, m, e);\n }, [select, onDayClick, setFocused]);\n const handleDayFocus = useCallback((day, m) => (e) => {\n setFocused(day);\n onDayFocus?.(day.date, m, e);\n }, [onDayFocus, setFocused]);\n const handleDayBlur = useCallback((day, m) => (e) => {\n blur();\n onDayBlur?.(day.date, m, e);\n }, [blur, onDayBlur]);\n const handleDayKeyDown = useCallback((day, modifiers) => (e) => {\n const keyMap = {\n ArrowLeft: [\n e.shiftKey ? \"month\" : \"day\",\n props.dir === \"rtl\" ? \"after\" : \"before\",\n ],\n ArrowRight: [\n e.shiftKey ? \"month\" : \"day\",\n props.dir === \"rtl\" ? \"before\" : \"after\",\n ],\n ArrowDown: [e.shiftKey ? \"year\" : \"week\", \"after\"],\n ArrowUp: [e.shiftKey ? \"year\" : \"week\", \"before\"],\n PageUp: [e.shiftKey ? \"year\" : \"month\", \"before\"],\n PageDown: [e.shiftKey ? \"year\" : \"month\", \"after\"],\n Home: [\"startOfWeek\", \"before\"],\n End: [\"endOfWeek\", \"after\"],\n };\n if (keyMap[e.key]) {\n e.preventDefault();\n e.stopPropagation();\n const [moveBy, moveDir] = keyMap[e.key];\n moveFocus(moveBy, moveDir);\n }\n onDayKeyDown?.(day.date, modifiers, e);\n }, [moveFocus, onDayKeyDown, props.dir]);\n const handleDayMouseEnter = useCallback((day, modifiers) => (e) => {\n onDayMouseEnter?.(day.date, modifiers, e);\n }, [onDayMouseEnter]);\n const handleDayMouseLeave = useCallback((day, modifiers) => (e) => {\n onDayMouseLeave?.(day.date, modifiers, e);\n }, [onDayMouseLeave]);\n const handleMonthChange = useCallback((date) => (e) => {\n const selectedMonth = Number(e.target.value);\n const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);\n goToMonth(month);\n }, [dateLib, goToMonth]);\n const handleYearChange = useCallback((date) => (e) => {\n const selectedYear = Number(e.target.value);\n const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);\n goToMonth(month);\n }, [dateLib, goToMonth]);\n const { className, style } = useMemo(() => ({\n className: [classNames[UI.Root], props.className]\n .filter(Boolean)\n .join(\" \"),\n style: { ...styles?.[UI.Root], ...props.style },\n }), [classNames, props.className, props.style, styles]);\n const dataAttributes = getDataAttributes(props);\n const rootElRef = useRef(null);\n useAnimation(rootElRef, Boolean(props.animate), {\n classNames,\n months,\n focused,\n dateLib,\n });\n const contextValue = {\n dayPickerProps: props,\n selected: selectedValue,\n select: select,\n isSelected,\n months,\n nextMonth,\n previousMonth,\n goToMonth,\n getModifiers,\n components,\n classNames,\n styles,\n labels,\n formatters,\n };\n return (React.createElement(dayPickerContext.Provider, { value: contextValue },\n React.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, \"aria-label\": props[\"aria-label\"], \"aria-labelledby\": props[\"aria-labelledby\"], ...dataAttributes },\n React.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },\n !props.hideNavigation && !navLayout && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n months.map((calendarMonth, displayIndex) => {\n return (React.createElement(components.Month, { \"data-animated-month\": props.animate ? \"true\" : undefined, className: classNames[UI.Month], style: styles?.[UI.Month], \n // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation\n key: displayIndex, displayIndex: displayIndex, calendarMonth: calendarMonth },\n navLayout === \"around\" &&\n !props.hideNavigation &&\n displayIndex === 0 && (React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === \"rtl\" ? \"right\" : \"left\" }))),\n React.createElement(components.MonthCaption, { \"data-animated-caption\": props.animate ? \"true\" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith(\"dropdown\") ? (React.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },\n (() => {\n const monthControl = captionLayout === \"dropdown\" ||\n captionLayout === \"dropdown-months\" ? (React.createElement(components.MonthsDropdown, { key: \"month\", className: classNames[UI.MonthsDropdown], \"aria-label\": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"month\" }, formatMonthDropdown(calendarMonth.date, dateLib)));\n const yearControl = captionLayout === \"dropdown\" ||\n captionLayout === \"dropdown-years\" ? (React.createElement(components.YearsDropdown, { key: \"year\", className: classNames[UI.YearsDropdown], \"aria-label\": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"year\" }, formatYearDropdown(calendarMonth.date, dateLib)));\n const controls = dateLib.getMonthYearOrder() === \"year-first\"\n ? [yearControl, monthControl]\n : [monthControl, yearControl];\n return controls;\n })(),\n React.createElement(\"span\", { role: \"status\", \"aria-live\": \"polite\", style: {\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n } }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (\n // biome-ignore lint/a11y/useSemanticElements: breaking change\n React.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: \"status\", \"aria-live\": \"polite\" }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))),\n navLayout === \"around\" &&\n !props.hideNavigation &&\n displayIndex === numberOfMonths - 1 && (React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === \"rtl\" ? \"left\" : \"right\" }))),\n displayIndex === numberOfMonths - 1 &&\n navLayout === \"after\" &&\n !props.hideNavigation && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n React.createElement(components.MonthGrid, { role: \"grid\", \"aria-multiselectable\": mode === \"multiple\" || mode === \"range\", \"aria-label\": labelGrid(calendarMonth.date, dateLib.options, dateLib) ||\n undefined, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },\n !props.hideWeekdays && (React.createElement(components.Weekdays, { \"data-animated-weekdays\": props.animate ? \"true\" : undefined, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },\n showWeekNumber && (React.createElement(components.WeekNumberHeader, { \"aria-label\": labelWeekNumberHeader(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: \"col\" }, formatWeekNumberHeader())),\n weekdays.map((weekday) => (React.createElement(components.Weekday, { \"aria-label\": labelWeekday(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: \"col\" }, formatWeekdayName(weekday, dateLib.options, dateLib)))))),\n React.createElement(components.Weeks, { \"data-animated-weeks\": props.animate ? \"true\" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {\n return (React.createElement(components.Week, { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week: week },\n showWeekNumber && (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.WeekNumber, { week: week, style: styles?.[UI.WeekNumber], \"aria-label\": labelWeekNumber(week.weekNumber, {\n locale,\n }), className: classNames[UI.WeekNumber], scope: \"row\", role: \"rowheader\" }, formatWeekNumber(week.weekNumber, dateLib))),\n week.days.map((day) => {\n const { date } = day;\n const modifiers = getModifiers(day);\n modifiers[DayFlag.focused] =\n !modifiers.hidden &&\n Boolean(focused?.isEqualTo(day));\n modifiers[SelectionState.selected] =\n isSelected?.(date) || modifiers.selected;\n if (isDateRange(selectedValue)) {\n // add range modifiers\n const { from, to } = selectedValue;\n modifiers[SelectionState.range_start] = Boolean(from && to && dateLib.isSameDay(date, from));\n modifiers[SelectionState.range_end] = Boolean(from && to && dateLib.isSameDay(date, to));\n modifiers[SelectionState.range_middle] =\n rangeIncludesDate(selectedValue, date, true, dateLib);\n }\n const style = getStyleForModifiers(modifiers, styles, props.modifiersStyles);\n const className = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);\n const ariaLabel = !isInteractive && !modifiers.hidden\n ? labelGridcell(date, modifiers, dateLib.options, dateLib)\n : undefined;\n return (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.Day, { key: `${dateLib.format(date, \"yyyy-MM-dd\")}_${dateLib.format(day.displayMonth, \"yyyy-MM\")}`, day: day, modifiers: modifiers, className: className.join(\" \"), style: style, role: \"gridcell\", \"aria-selected\": modifiers.selected || undefined, \"aria-label\": ariaLabel, \"data-day\": dateLib.format(date, \"yyyy-MM-dd\"), \"data-month\": day.outside\n ? dateLib.format(date, \"yyyy-MM\")\n : undefined, \"data-selected\": modifiers.selected || undefined, \"data-disabled\": modifiers.disabled || undefined, \"data-hidden\": modifiers.hidden || undefined, \"data-outside\": day.outside || undefined, \"data-focused\": modifiers.focused || undefined, \"data-today\": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: \"button\", day: day, modifiers: modifiers, disabled: modifiers.disabled || undefined, tabIndex: isFocusTarget(day) ? 0 : -1, \"aria-label\": labelDayButton(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay(date, dateLib.options, dateLib))) : (!modifiers.hidden &&\n formatDay(day.date, dateLib.options, dateLib))));\n })));\n })))));\n })),\n props.footer && (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: \"status\", \"aria-live\": \"polite\" }, props.footer)))));\n}\n","\"use client\";\n\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\tcaptionLayout = \"label\",\n\tbuttonVariant = \"ghost\",\n\tformatters,\n\tcomponents,\n\tfromYear,\n\ttoYear,\n\t...props\n}: React.ComponentProps<typeof DayPicker> & {\n\tbuttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n\tconst defaultClassNames = getDefaultClassNames();\n\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tcaptionLayout={captionLayout}\n\t\t\tformatters={{\n\t\t\t\tformatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n\t\t\t\t...formatters,\n\t\t\t}}\n\t\t\tclassNames={{\n\t\t\t\troot: cn(\"w-fit\", defaultClassNames.root),\n\t\t\t\tmonths: cn(\"flex gap-4 flex-row md:flex-row relative\", defaultClassNames.months),\n\t\t\t\tmonth: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n\t\t\t\tnav: cn(\n\t\t\t\t\t\"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n\t\t\t\t\tdefaultClassNames.nav,\n\t\t\t\t),\n\t\t\t\tbutton_previous: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t\"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n\t\t\t\t\tdefaultClassNames.button_previous,\n\t\t\t\t),\n\t\t\t\tbutton_next: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t\"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n\t\t\t\t\tdefaultClassNames.button_next,\n\t\t\t\t),\n\t\t\t\tmonth_caption: cn(\n\t\t\t\t\t\"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n\t\t\t\t\tdefaultClassNames.month_caption,\n\t\t\t\t),\n\t\t\t\tdropdowns: cn(\n\t\t\t\t\t\"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n\t\t\t\t\tdefaultClassNames.dropdowns,\n\t\t\t\t),\n\t\t\t\tdropdown_root: cn(\n\t\t\t\t\t\"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md\",\n\t\t\t\t\tdefaultClassNames.dropdown_root,\n\t\t\t\t),\n\t\t\t\tdropdown: cn(\"absolute bg-popover inset-0 opacity-0\", defaultClassNames.dropdown),\n\t\t\t\tcaption_label: cn(\n\t\t\t\t\t\"select-none font-medium capitalize\",\n\t\t\t\t\tcaptionLayout === \"label\"\n\t\t\t\t\t\t? \"text-sm\"\n\t\t\t\t\t\t: \"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n\t\t\t\t\tdefaultClassNames.caption_label,\n\t\t\t\t),\n\t\t\t\ttable: \"w-full border-collapse\",\n\t\t\t\tweekdays: cn(\"flex\", defaultClassNames.weekdays),\n\t\t\t\tweekday: cn(\n\t\t\t\t\t\"capitalize text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none\",\n\t\t\t\t\tdefaultClassNames.weekday,\n\t\t\t\t),\n\t\t\t\tweek: cn(\"flex w-full mt-2\", defaultClassNames.week),\n\t\t\t\tweek_number_header: cn(\"select-none w-(--cell-size)\", defaultClassNames.week_number_header),\n\t\t\t\tweek_number: cn(\n\t\t\t\t\t\"text-[0.8rem] select-none text-muted-foreground\",\n\t\t\t\t\tdefaultClassNames.week_number,\n\t\t\t\t),\n\t\t\t\tday: cn(\n\t\t\t\t\t\"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none\",\n\t\t\t\t\tdefaultClassNames.day,\n\t\t\t\t),\n\t\t\t\trange_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n\t\t\t\trange_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n\t\t\t\trange_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n\t\t\t\ttoday: cn(\n\t\t\t\t\t\"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none\",\n\t\t\t\t\tdefaultClassNames.today,\n\t\t\t\t),\n\t\t\t\toutside: cn(\n\t\t\t\t\t\"text-muted-foreground aria-selected:text-muted-foreground\",\n\t\t\t\t\tdefaultClassNames.outside,\n\t\t\t\t),\n\t\t\t\tdisabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n\t\t\t\thidden: cn(\"invisible\", defaultClassNames.hidden),\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tRoot: ({ className, rootRef, ...props }) => {\n\t\t\t\t\treturn <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n\t\t\t\t},\n\t\t\t\tChevron: ({ className, orientation, ...props }) => {\n\t\t\t\t\tif (orientation === \"left\") {\n\t\t\t\t\t\treturn <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (orientation === \"right\") {\n\t\t\t\t\t\treturn <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t},\n\t\t\t\tDayButton: CalendarDayButton,\n\t\t\t\tWeekNumber: ({ children, ...props }) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td {...props}>\n\t\t\t\t\t\t\t<div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t...components,\n\t\t\t}}\n\t\t\tfromYear={fromYear}\n\t\t\ttoYear={toYear}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CalendarDayButton({\n\tclassName,\n\tday,\n\tmodifiers,\n\t...props\n}: React.ComponentProps<typeof DayButton>) {\n\tconst defaultClassNames = getDefaultClassNames();\n\n\tconst ref = React.useRef<HTMLButtonElement>(null);\n\tReact.useEffect(() => {\n\t\tif (modifiers.focused) ref.current?.focus();\n\t}, [modifiers.focused]);\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant=\"ghost\"\n\t\t\tsize=\"icon\"\n\t\t\tdata-day={day.date.toLocaleDateString()}\n\t\t\tdata-selected-single={\n\t\t\t\tmodifiers.selected &&\n\t\t\t\t!modifiers.range_start &&\n\t\t\t\t!modifiers.range_end &&\n\t\t\t\t!modifiers.range_middle\n\t\t\t}\n\t\t\tdata-range-start={modifiers.range_start}\n\t\t\tdata-range-end={modifiers.range_end}\n\t\t\tdata-range-middle={modifiers.range_middle}\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70\",\n\t\t\t\tdefaultClassNames.day,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Calendar, CalendarDayButton };\n"],"names":["addMonths","date","amount","options","_date","toDate","in","isNaN","constructFrom","NaN","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addWeeks","addDays","addYears","max","dates","result","context","forEach","bind","date_","min","isSameDay","laterDate","earlierDate","dateLeft_","dateRight_","normalizeDates","startOfDay","differenceInCalendarMonths","laterDate_","earlierDate_","yearsDiff","monthsDiff","endOfMonth","month","setHours","normalizeInterval","interval","start","end","eachMonthOfInterval","reversed","endTime","setDate","step","push","reverse","startOfMonth","endOfYear","year","eachYearOfInterval","endOfWeek","defaultOptions","getDefaultOptions","weekStartsOn","locale","day","getDay","diff","endOfISOWeek","getDaysInMonth","monthIndex","lastDayOfMonth","getYear","isAfter","dateToCompare","isBefore","isSameMonth","isSameYear","midMonth","Math","setYear","tzName","timeZone","format","Intl","DateTimeFormat","hour","timeZoneName","split","slice","join","offsetFormatCache","offsetCache","tzOffset","offsetStr","calcOffset","captures","match","offsetRe","cacheStr","values","hours","minutes","seconds","TZDateMini","Date","tz","args","length","now","withTimeZone","getTimezoneOffset","offset","floor","ceil","setTime","time","prototype","apply","arguments","syncToInternal","Symbol","for","pop","internal","adjustToSystemTZ","re","Object","getOwnPropertyNames","method","test","utcMethod","replace","startsWith","syncFromInternal","setUTCSeconds","getUTCSeconds","round","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCMilliseconds","baseOffset","prevHour","setUTCHours","systemOffset","prevHourSystemOffset","systemDSTChange","dstShift","getHours","setUTCMinutes","offsetDiff","systemDate","systemSecondsOffset","getSeconds","secondsOffset","postBaseOffset","postOffset","postSystemOffset","postOffsetDiff","offsetChanged","postDiff","newBaseOffset","newOffset","offsetChange","TZDate","toISOString","sign","tzComponents","toString","toDateString","toTimeString","toUTCString","toLocaleString","locales","toLocaleDateString","toLocaleTimeString","String","abs","padStart","FIVE_WEEKS","FOUR_WEEKS","getBroadcastWeeksInMonth","dateLib","firstDayOfMonth","firstDayOfWeek","broadcastStartDate","lastDateOfLastWeek","numberOfWeeks","startOfBroadcastWeek","firstOfMonth","dayOfWeek","endOfBroadcastWeek","startDate","endDate","DateLib","getDigitMap","numerals","formatter","NumberFormat","numberingSystem","digitMap","i","replaceDigits","input","digit","formatNumber","value","getMonthYearOrder","code","yearFirstLocales","has","formatMonthYear","localeCode","intl","formatted","pattern","overrides","today","newDate","differenceInCalendarDays","dateLeft","dateRight","years","uniqueYears","Set","map","d","size","yearsArray","y","formatStr","_options","getISOWeek","getWeek","isDate","_dateLib","startOfISOWeek","startOfWeek","startOfYear","enUS","defaultDateLib","CalendarDay","isEqualTo","displayMonth","outside","Boolean","CalendarMonth","weeks","CalendarWeek","weekNumber","days","Button","props","React","createElement","CaptionLabel","Chevron","orientation","className","width","height","viewBox","points","Day","modifiers","tdProps","DayButton","buttonProps","ref","useRef","useEffect","focused","current","focus","UI","DayFlag","SelectionState","Animation","Dropdown","components","classNames","selectProps","cssClassSelect","selectedOption","find","disabled","DropdownRoot","Select","label","Option","key","DropdownNav","Footer","Month","calendarMonth","displayIndex","divProps","children","MonthCaption","MonthGrid","Months","dayPickerContext","createContext","undefined","useDayPicker","useContext","Error","MonthsDropdown","Nav","onPreviousClick","onNextClick","previousMonth","nextMonth","navProps","labels","labelPrevious","labelNext","handleNextClick","useCallback","e","handlePreviousClick","PreviousMonthButton","type","tabIndex","onClick","NextMonthButton","Root","rootRef","rest","Week","week","trProps","Weekday","Weekdays","WeekNumber","thProps","WeekNumberHeader","Weeks","YearsDropdown","rangeIncludesDate","range","excludeEnds","from","to","isRangeInverted","isInRange","isDateInterval","matcher","isDateRange","isDateAfterType","isDateBeforeType","isDayOfWeekType","isDatesArray","Array","isArray","every","dateMatchModifiers","matchers","matchersArr","some","includes","diffBefore","before","diffAfter","after","isDayBefore","isDayAfter","isClosedInterval","createGetModifiers","navStart","navEnd","hidden","showOutsideDays","broadcastCalendar","computedNavStart","computedNavEnd","internalModifiersMap","customModifiersMap","isOutside","isBeforeNavStart","isAfterNavEnd","isDisabled","isHidden","isToday","keys","name","modifierValue","isMatch","dayFlags","customModifiers","getClassNamesForModifiers","modifiersClassNames","modifierClassNames","entries","filter","active","reduce","previousValue","getComponents","customComponents","getDataAttributes","dataAttributes","mode","required","numberOfMonths","showWeekNumber","navLayout","val","getDefaultClassNames","formatCaption","lib","formatMonthCaption","formatDay","formatMonthDropdown","formatWeekdayName","weekday","formatWeekNumber","formatWeekNumberHeader","formatYearDropdown","formatYearCaption","getFormatters","customFormatters","defaultFormatters","getMonthOptions","formatters","months","getStyleForModifiers","dayModifiers","styles","modifiersStyles","style","modifier","getWeekdays","ISOWeek","getYearOptions","firstNavYear","lastNavYear","labelDayButton","selected","labelDay","labelGrid","labelCaption","labelGridcell","labelMonthDropdown","labelNav","_month","labelWeekday","labelWeekNumber","labelWeekNumberHeader","labelYearDropdown","asHtmlElement","element","HTMLElement","queryMonthEls","querySelectorAll","queryMonthEl","querySelector","queryCaptionEl","queryWeeksEl","queryNavEl","queryWeekdaysEl","useAnimation","rootElRef","enabled","previousRootElSnapshotRef","previousMonthsRef","animatingRef","useLayoutEffect","previousMonths","isAfterPreviousMonth","captionAnimationClass","caption_after_enter","caption_before_enter","weeksAnimationClass","weeks_after_enter","weeks_before_enter","previousRootElSnapshot","rootElSnapshot","cloneNode","currentMonthElsSnapshot","currentMonthElSnapshot","previousMonthElSnapshot","contains","removeChild","captionEl","classList","remove","weeksEl","previousMonthEls","currentMonthEls","el","isolation","navEl","zIndex","currentMonthEl","index","previousMonthEl","position","overflow","add","cleanUp","pointerEvents","setAttribute","previousWeekdaysEl","opacity","previousCaptionEl","caption_before_exit","caption_after_exit","addEventListener","previousWeeksEl","weeks_before_exit","weeks_after_exit","insertBefore","firstChild","getDates","displayMonths","maxDate","firstMonth","lastMonth","fixedWeeks","startWeekFirstDate","endWeekLastDate","nOfDays","nOfMonths","nrOfDaysWithFixedWeeks","extraDates","daysToAdd","getDays","calendarMonths","initialDays","weekDays","concat","getDisplayMonths","firstDisplayedMonth","calendarEndMonth","getInitialMonth","defaultMonth","initialMonth","getMonths","dayPickerMonths","firstDateOfFirstWeek","monthDates","dayPickerMonth","reverseMonths","getNavMonths","startMonth","endMonth","fromYear","toYear","fromMonth","toMonth","hasYearDropdown","captionLayout","getNextMonth","disableNavigation","pagedNavigation","getPreviousMonth","calendarStartMonth","getWeeks","initialWeeks","useControlledValue","defaultValue","controlledValue","uncontrolledValue","setValue","useState","useCalendar","setFirstMonth","newInitialMonth","onMonthChange","isDayInCalendar","goToMonth","newMonth","goToDay","calendar","FocusTargetPriority","isFocusableDay","calculateFocusTarget","getModifiers","isSelected","lastFocused","focusTarget","foundFocusTargetPriority","FocusedModifier","LastFocused","Selected","Today","getFocusableDate","moveBy","moveDir","refDate","moveFns","focusableDate","getNextFocus","refDay","attempt","targetMonth","focusDay","useFocus","autoFocus","setLastFocused","focusedDay","setFocused","blur","moveFocus","nextFocus","isNextInCalendar","isFocusTarget","useMulti","initiallySelected","onSelect","internallySelected","setSelected","select","triggerDate","newDates","addToRange","initialRange","rangeContainsDayOfWeek","dayOfWeekArr","totalDays","totalDaysLimit","rangeOverlaps","rangeLeft","rangeRight","rangeContainsModifiers","nonFunctionMatchers","nonFunctionMatchersResult","functionMatchers","useRange","excludeDisabled","newRange","useSingle","compareDate","useSelection","single","multi","DayPicker","initialProps","useMemo","defaultLocale","firstWeekContainsDate","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","defaultLabels","onDayBlur","onDayClick","onDayFocus","onDayKeyDown","onDayMouseEnter","onDayMouseLeave","onPrevClick","selectedValue","weekdays","isInteractive","handleDayClick","m","preventDefault","stopPropagation","handleDayFocus","handleDayBlur","handleDayKeyDown","keyMap","ArrowLeft","shiftKey","dir","ArrowRight","ArrowDown","ArrowUp","PageUp","PageDown","Home","End","handleDayMouseEnter","handleDayMouseLeave","handleMonthChange","selectedMonth","Number","target","handleYearChange","selectedYear","animate","contextValue","dayPickerProps","Provider","id","lang","nonce","title","role","hideNavigation","Dropdowns","monthControl","onChange","yearControl","reverseYears","controls","border","clip","margin","padding","whiteSpace","wordWrap","hideWeekdays","scope","range_start","range_end","range_middle","ariaLabel","onBlur","onFocus","onKeyDown","onMouseEnter","onMouseLeave","footer","Calendar","buttonVariant","defaultClassNames","cn","raw","root","nav","button_previous","buttonVariants","variant","button_next","month_caption","dropdowns","dropdown_root","dropdown","caption_label","table","week_number_header","week_number","div","data-slot","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","td","data-day","data-selected-single","data-range-start","data-range-end","data-range-middle"],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BC,IACM,SAASA,SAAAA,CAAUC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAA;IAC7C,MAAMC,KAAAA,GAAQC,MAAAA,CAAOJ,IAAAA,EAAME,OAAAA,EAASG,EAAAA,CAAAA;AACpC,IAAA,IAAIC,MAAML,MAAAA,CAAAA,EAAS,OAAOM,aAAAA,CAA6BP,IAAAA,EAAMQ,GAAAA,CAAAA;AAC7D,IAAA,IAAI,CAACP,MAAAA,EAAQ;;QAEX,OAAOE,KAAAA;AACT,IAAA;IACA,MAAMM,UAAAA,GAAaN,MAAMO,OAAO,EAAA;;;;;;;;;AAUhC,IAAA,MAAMC,oBAAoBJ,aAAAA,CAA6BP,IAAAA,EAAMG,MAAMS,OAAO,EAAA,CAAA;AAC1ED,IAAAA,iBAAAA,CAAkBE,QAAQ,CAACV,KAAAA,CAAMW,QAAQ,EAAA,GAAKb,SAAS,CAAA,EAAG,CAAA,CAAA;IAC1D,MAAMc,WAAAA,GAAcJ,kBAAkBD,OAAO,EAAA;AAC7C,IAAA,IAAID,cAAcM,WAAAA,EAAa;;;QAG7B,OAAOJ,iBAAAA;IACT,CAAA,MAAO;;;;;;;;AAQLR,QAAAA,KAAAA,CAAMa,WAAW,CACfL,iBAAAA,CAAkBM,WAAW,EAAA,EAC7BN,iBAAAA,CAAkBG,QAAQ,EAAA,EAC1BL,UAAAA,CAAAA;QAEF,OAAON,KAAAA;AACT,IAAA;AACF;;ACtEA;;;;;;;;;;;;;;;;;;;;;;;AAyBC,IACM,SAASe,QAAAA,CAASlB,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAA;IAC5C,OAAOiB,OAAAA,CAAQnB,IAAAA,EAAMC,MAAAA,GAAS,CAAA,EAAGC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,WAAW;AACvCuC,QAAAA,gBAAAA,EAAgBhe,UAAU0b,SAAS;AACnCuC,QAAAA,mBAAAA,EAAmBje,UAAU2b,YAAY;AACzCjc,QAAAA,SAAAA,EAAW4c,EAAAA,CACV,ovBAAA,EACAD,iBAAAA,CAAkBhpB,GAAG,EACrBqM,SAAAA,CAAAA;AAEA,QAAA,GAAGN;;AAGP;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]}
1
+ {"version":3,"file":"calendar-C8Mepf-u.mjs","sources":["../../node_modules/date-fns/addMonths.js","../../node_modules/date-fns/addWeeks.js","../../node_modules/date-fns/addYears.js","../../node_modules/date-fns/max.js","../../node_modules/date-fns/min.js","../../node_modules/date-fns/isSameDay.js","../../node_modules/date-fns/differenceInCalendarMonths.js","../../node_modules/date-fns/endOfMonth.js","../../node_modules/date-fns/_lib/normalizeInterval.js","../../node_modules/date-fns/eachMonthOfInterval.js","../../node_modules/date-fns/startOfMonth.js","../../node_modules/date-fns/endOfYear.js","../../node_modules/date-fns/eachYearOfInterval.js","../../node_modules/date-fns/endOfWeek.js","../../node_modules/date-fns/endOfISOWeek.js","../../node_modules/date-fns/getDaysInMonth.js","../../node_modules/date-fns/getMonth.js","../../node_modules/date-fns/getYear.js","../../node_modules/date-fns/isAfter.js","../../node_modules/date-fns/isBefore.js","../../node_modules/date-fns/isSameMonth.js","../../node_modules/date-fns/isSameYear.js","../../node_modules/date-fns/setMonth.js","../../node_modules/date-fns/setYear.js","../../node_modules/@date-fns/tz/tzName/index.js","../../node_modules/@date-fns/tz/tzOffset/index.js","../../node_modules/@date-fns/tz/date/mini.js","../../node_modules/@date-fns/tz/date/index.js","../../node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js","../../node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js","../../node_modules/react-day-picker/dist/esm/classes/DateLib.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarDay.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js","../../node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js","../../node_modules/react-day-picker/dist/esm/components/Button.js","../../node_modules/react-day-picker/dist/esm/components/CaptionLabel.js","../../node_modules/react-day-picker/dist/esm/components/Chevron.js","../../node_modules/react-day-picker/dist/esm/components/Day.js","../../node_modules/react-day-picker/dist/esm/components/DayButton.js","../../node_modules/react-day-picker/dist/esm/UI.js","../../node_modules/react-day-picker/dist/esm/components/Dropdown.js","../../node_modules/react-day-picker/dist/esm/components/DropdownNav.js","../../node_modules/react-day-picker/dist/esm/components/Footer.js","../../node_modules/react-day-picker/dist/esm/components/Month.js","../../node_modules/react-day-picker/dist/esm/components/MonthCaption.js","../../node_modules/react-day-picker/dist/esm/components/MonthGrid.js","../../node_modules/react-day-picker/dist/esm/components/Months.js","../../node_modules/react-day-picker/dist/esm/useDayPicker.js","../../node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js","../../node_modules/react-day-picker/dist/esm/components/Nav.js","../../node_modules/react-day-picker/dist/esm/components/NextMonthButton.js","../../node_modules/react-day-picker/dist/esm/components/Option.js","../../node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js","../../node_modules/react-day-picker/dist/esm/components/Root.js","../../node_modules/react-day-picker/dist/esm/components/Select.js","../../node_modules/react-day-picker/dist/esm/components/Week.js","../../node_modules/react-day-picker/dist/esm/components/Weekday.js","../../node_modules/react-day-picker/dist/esm/components/Weekdays.js","../../node_modules/react-day-picker/dist/esm/components/WeekNumber.js","../../node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/components/Weeks.js","../../node_modules/react-day-picker/dist/esm/components/YearsDropdown.js","../../node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js","../../node_modules/react-day-picker/dist/esm/utils/typeguards.js","../../node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getComponents.js","../../node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js","../../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js","../../node_modules/react-day-picker/dist/esm/formatters/formatCaption.js","../../node_modules/react-day-picker/dist/esm/formatters/formatDay.js","../../node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js","../../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js","../../node_modules/react-day-picker/dist/esm/helpers/getFormatters.js","../../node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js","../../node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js","../../node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js","../../node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js","../../node_modules/react-day-picker/dist/esm/labels/labelDayButton.js","../../node_modules/react-day-picker/dist/esm/labels/labelGrid.js","../../node_modules/react-day-picker/dist/esm/labels/labelGridcell.js","../../node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js","../../node_modules/react-day-picker/dist/esm/labels/labelNav.js","../../node_modules/react-day-picker/dist/esm/labels/labelNext.js","../../node_modules/react-day-picker/dist/esm/labels/labelPrevious.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekday.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js","../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js","../../node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js","../../node_modules/react-day-picker/dist/esm/useAnimation.js","../../node_modules/react-day-picker/dist/esm/helpers/getDates.js","../../node_modules/react-day-picker/dist/esm/helpers/getDays.js","../../node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js","../../node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getMonths.js","../../node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js","../../node_modules/react-day-picker/dist/esm/helpers/getWeeks.js","../../node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js","../../node_modules/react-day-picker/dist/esm/useCalendar.js","../../node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js","../../node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js","../../node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js","../../node_modules/react-day-picker/dist/esm/useFocus.js","../../node_modules/react-day-picker/dist/esm/selection/useMulti.js","../../node_modules/react-day-picker/dist/esm/utils/addToRange.js","../../node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js","../../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js","../../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js","../../node_modules/react-day-picker/dist/esm/selection/useRange.js","../../node_modules/react-day-picker/dist/esm/selection/useSingle.js","../../node_modules/react-day-picker/dist/esm/useSelection.js","../../node_modules/react-day-picker/dist/esm/DayPicker.js","../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result < date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result > date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n const [start, end] = normalizeDates(context, interval.start, interval.end);\n return { start, end };\n}\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setMonth(date.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2017, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Thu Jan 01 2015 00:00:00,\n * // Fri Jan 01 2016 00:00:00,\n * // Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setFullYear(date.getFullYear() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","/**\n * Time zone name format.\n */\n\n/**\n * The function returns the time zone name for the given date in the specified\n * time zone.\n *\n * It uses the `Intl.DateTimeFormat` API and by default outputs the time zone\n * name in a long format, e.g. \"Pacific Standard Time\" or\n * \"Singapore Standard Time\".\n *\n * It is possible to specify the format as the third argument using one of the following options\n *\n * - \"short\": e.g. \"EDT\" or \"GMT+8\".\n * - \"long\": e.g. \"Eastern Daylight Time\".\n * - \"shortGeneric\": e.g. \"ET\" or \"Singapore Time\".\n * - \"longGeneric\": e.g. \"Eastern Time\" or \"Singapore Standard Time\".\n *\n * These options correspond to TR35 tokens `z..zzz`, `zzzz`, `v`, and `vvvv` respectively: https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-zone\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date object to get the time zone name for\n * @param format - Optional format of the time zone name. Defaults to \"long\". Can be \"short\", \"long\", \"shortGeneric\", or \"longGeneric\".\n *\n * @returns Time zone name (e.g. \"Singapore Standard Time\")\n */\nexport function tzName(timeZone, date, format = \"long\") {\n return new Intl.DateTimeFormat(\"en-US\", {\n // Enforces engine to render the time. Without the option JavaScriptCore omits it.\n hour: \"numeric\",\n timeZone: timeZone,\n timeZoneName: format\n }).format(date).split(/\\s/g) // Format.JS uses non-breaking spaces\n .slice(2) // Skip the hour and AM/PM parts\n .join(\" \");\n}","const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split(\"GMT\")[1];\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +(values[0] || 0);\n const minutes = +(values[1] || 0);\n // Convert seconds to minutes by dividing by 60 to keep the function return in minutes.\n const seconds = +(values[2] || 0) / 60;\n return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;\n}","import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n const offset = -tzOffset(this.timeZone, this);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n return offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const baseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Seconds System diff adjustment\n\n const systemDate = new Date(+date);\n // Set the UTC seconds to 0 to isolate the timezone offset in seconds.\n systemDate.setUTCSeconds(0);\n // For negative systemOffset, invert the seconds.\n const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;\n\n // Calculate the seconds offset based on the timezone offset.\n const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;\n if (secondsOffset || systemSecondsOffset) {\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);\n Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);\n }\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}","import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}","const FIVE_WEEKS = 5;\nconst FOUR_WEEKS = 4;\n/**\n * Returns the number of weeks to display in the broadcast calendar for a given\n * month.\n *\n * The broadcast calendar may have either 4 or 5 weeks in a month, depending on\n * the start and end dates of the broadcast weeks.\n *\n * @since 9.4.0\n * @param month The month for which to calculate the number of weeks.\n * @param dateLib The date library to use for date manipulation.\n * @returns The number of weeks in the broadcast calendar (4 or 5).\n */\nexport function getBroadcastWeeksInMonth(month, dateLib) {\n // Get the first day of the month\n const firstDayOfMonth = dateLib.startOfMonth(month);\n // Get the day of the week for the first day of the month (1-7, where 1 is Monday)\n const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;\n const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);\n const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);\n const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)\n ? FIVE_WEEKS\n : FOUR_WEEKS;\n return numberOfWeeks;\n}\n","/**\n * Returns the start date of the week in the broadcast calendar.\n *\n * The broadcast week starts on Monday. If the first day of the month is not a\n * Monday, this function calculates the previous Monday as the start of the\n * broadcast week.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the start of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The start date of the broadcast week.\n */\nexport function startOfBroadcastWeek(date, dateLib) {\n const firstOfMonth = dateLib.startOfMonth(date);\n const dayOfWeek = firstOfMonth.getDay();\n if (dayOfWeek === 1) {\n return firstOfMonth;\n }\n else if (dayOfWeek === 0) {\n return dateLib.addDays(firstOfMonth, -1 * 6);\n }\n else {\n return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));\n }\n}\n","import { getBroadcastWeeksInMonth } from \"./getBroadcastWeeksInMonth.js\";\nimport { startOfBroadcastWeek } from \"./startOfBroadcastWeek.js\";\n/**\n * Returns the end date of the week in the broadcast calendar.\n *\n * The broadcast week ends on the last day of the last broadcast week for the\n * given date.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the end of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The end date of the broadcast week.\n */\nexport function endOfBroadcastWeek(date, dateLib) {\n const startDate = startOfBroadcastWeek(date, dateLib);\n const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);\n const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);\n return endDate;\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport { addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, format, getISOWeek, getMonth, getWeek, getYear, isAfter, isBefore, isDate, isSameDay, isSameMonth, isSameYear, max, min, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear, } from \"date-fns\";\nimport { enUS } from \"date-fns/locale/en-US\";\nimport { endOfBroadcastWeek } from \"../helpers/endOfBroadcastWeek.js\";\nimport { startOfBroadcastWeek } from \"../helpers/startOfBroadcastWeek.js\";\n/**\n * A wrapper class around [date-fns](http://date-fns.org) that provides utility\n * methods for date manipulation and formatting.\n *\n * @since 9.2.0\n * @example\n * const dateLib = new DateLib({ locale: es });\n * const newDate = dateLib.addDays(new Date(), 5);\n */\nexport class DateLib {\n /**\n * Creates an instance of `DateLib`.\n *\n * @param options Configuration options for the date library.\n * @param overrides Custom overrides for the date library functions.\n */\n constructor(options, overrides) {\n /**\n * Reference to the built-in Date constructor.\n *\n * @deprecated Use `newDate()` or `today()`.\n */\n this.Date = Date;\n /**\n * Creates a new `Date` object representing today's date.\n *\n * @since 9.5.0\n * @returns A `Date` object for today's date.\n */\n this.today = () => {\n if (this.overrides?.today) {\n return this.overrides.today();\n }\n if (this.options.timeZone) {\n return TZDate.tz(this.options.timeZone);\n }\n return new this.Date();\n };\n /**\n * Creates a new `Date` object with the specified year, month, and day.\n *\n * @since 9.5.0\n * @param year The year.\n * @param monthIndex The month (0-11).\n * @param date The day of the month.\n * @returns A new `Date` object.\n */\n this.newDate = (year, monthIndex, date) => {\n if (this.overrides?.newDate) {\n return this.overrides.newDate(year, monthIndex, date);\n }\n if (this.options.timeZone) {\n return new TZDate(year, monthIndex, date, this.options.timeZone);\n }\n return new Date(year, monthIndex, date);\n };\n /**\n * Adds the specified number of days to the given date.\n *\n * @param date The date to add days to.\n * @param amount The number of days to add.\n * @returns The new date with the days added.\n */\n this.addDays = (date, amount) => {\n return this.overrides?.addDays\n ? this.overrides.addDays(date, amount)\n : addDays(date, amount);\n };\n /**\n * Adds the specified number of months to the given date.\n *\n * @param date The date to add months to.\n * @param amount The number of months to add.\n * @returns The new date with the months added.\n */\n this.addMonths = (date, amount) => {\n return this.overrides?.addMonths\n ? this.overrides.addMonths(date, amount)\n : addMonths(date, amount);\n };\n /**\n * Adds the specified number of weeks to the given date.\n *\n * @param date The date to add weeks to.\n * @param amount The number of weeks to add.\n * @returns The new date with the weeks added.\n */\n this.addWeeks = (date, amount) => {\n return this.overrides?.addWeeks\n ? this.overrides.addWeeks(date, amount)\n : addWeeks(date, amount);\n };\n /**\n * Adds the specified number of years to the given date.\n *\n * @param date The date to add years to.\n * @param amount The number of years to add.\n * @returns The new date with the years added.\n */\n this.addYears = (date, amount) => {\n return this.overrides?.addYears\n ? this.overrides.addYears(date, amount)\n : addYears(date, amount);\n };\n /**\n * Returns the number of calendar days between the given dates.\n *\n * @param dateLeft The later date.\n * @param dateRight The earlier date.\n * @returns The number of calendar days between the dates.\n */\n this.differenceInCalendarDays = (dateLeft, dateRight) => {\n return this.overrides?.differenceInCalendarDays\n ? this.overrides.differenceInCalendarDays(dateLeft, dateRight)\n : differenceInCalendarDays(dateLeft, dateRight);\n };\n /**\n * Returns the number of calendar months between the given dates.\n *\n * @param dateLeft The later date.\n * @param dateRight The earlier date.\n * @returns The number of calendar months between the dates.\n */\n this.differenceInCalendarMonths = (dateLeft, dateRight) => {\n return this.overrides?.differenceInCalendarMonths\n ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight)\n : differenceInCalendarMonths(dateLeft, dateRight);\n };\n /**\n * Returns the months between the given dates.\n *\n * @param interval The interval to get the months for.\n */\n this.eachMonthOfInterval = (interval) => {\n return this.overrides?.eachMonthOfInterval\n ? this.overrides.eachMonthOfInterval(interval)\n : eachMonthOfInterval(interval);\n };\n /**\n * Returns the years between the given dates.\n *\n * @since 9.11.1\n * @param interval The interval to get the years for.\n * @returns The array of years in the interval.\n */\n this.eachYearOfInterval = (interval) => {\n const years = this.overrides?.eachYearOfInterval\n ? this.overrides.eachYearOfInterval(interval)\n : eachYearOfInterval(interval);\n // Remove duplicates that may happen across DST transitions (e.g., \"America/Sao_Paulo\")\n // See https://github.com/date-fns/tz/issues/72\n const uniqueYears = new Set(years.map((d) => this.getYear(d)));\n if (uniqueYears.size === years.length) {\n // No duplicates, return as is\n return years;\n }\n // Rebuild the array to ensure one date per year\n const yearsArray = [];\n uniqueYears.forEach((y) => {\n yearsArray.push(new Date(y, 0, 1));\n });\n return yearsArray;\n };\n /**\n * Returns the end of the broadcast week for the given date.\n *\n * @param date The original date.\n * @returns The end of the broadcast week.\n */\n this.endOfBroadcastWeek = (date) => {\n return this.overrides?.endOfBroadcastWeek\n ? this.overrides.endOfBroadcastWeek(date)\n : endOfBroadcastWeek(date, this);\n };\n /**\n * Returns the end of the ISO week for the given date.\n *\n * @param date The original date.\n * @returns The end of the ISO week.\n */\n this.endOfISOWeek = (date) => {\n return this.overrides?.endOfISOWeek\n ? this.overrides.endOfISOWeek(date)\n : endOfISOWeek(date);\n };\n /**\n * Returns the end of the month for the given date.\n *\n * @param date The original date.\n * @returns The end of the month.\n */\n this.endOfMonth = (date) => {\n return this.overrides?.endOfMonth\n ? this.overrides.endOfMonth(date)\n : endOfMonth(date);\n };\n /**\n * Returns the end of the week for the given date.\n *\n * @param date The original date.\n * @returns The end of the week.\n */\n this.endOfWeek = (date, options) => {\n return this.overrides?.endOfWeek\n ? this.overrides.endOfWeek(date, options)\n : endOfWeek(date, this.options);\n };\n /**\n * Returns the end of the year for the given date.\n *\n * @param date The original date.\n * @returns The end of the year.\n */\n this.endOfYear = (date) => {\n return this.overrides?.endOfYear\n ? this.overrides.endOfYear(date)\n : endOfYear(date);\n };\n /**\n * Formats the given date using the specified format string.\n *\n * @param date The date to format.\n * @param formatStr The format string.\n * @returns The formatted date string.\n */\n this.format = (date, formatStr, _options) => {\n const formatted = this.overrides?.format\n ? this.overrides.format(date, formatStr, this.options)\n : format(date, formatStr, this.options);\n if (this.options.numerals && this.options.numerals !== \"latn\") {\n return this.replaceDigits(formatted);\n }\n return formatted;\n };\n /**\n * Returns the ISO week number for the given date.\n *\n * @param date The date to get the ISO week number for.\n * @returns The ISO week number.\n */\n this.getISOWeek = (date) => {\n return this.overrides?.getISOWeek\n ? this.overrides.getISOWeek(date)\n : getISOWeek(date);\n };\n /**\n * Returns the month of the given date.\n *\n * @param date The date to get the month for.\n * @returns The month.\n */\n this.getMonth = (date, _options) => {\n return this.overrides?.getMonth\n ? this.overrides.getMonth(date, this.options)\n : getMonth(date, this.options);\n };\n /**\n * Returns the year of the given date.\n *\n * @param date The date to get the year for.\n * @returns The year.\n */\n this.getYear = (date, _options) => {\n return this.overrides?.getYear\n ? this.overrides.getYear(date, this.options)\n : getYear(date, this.options);\n };\n /**\n * Returns the local week number for the given date.\n *\n * @param date The date to get the week number for.\n * @returns The week number.\n */\n this.getWeek = (date, _options) => {\n return this.overrides?.getWeek\n ? this.overrides.getWeek(date, this.options)\n : getWeek(date, this.options);\n };\n /**\n * Checks if the first date is after the second date.\n *\n * @param date The date to compare.\n * @param dateToCompare The date to compare with.\n * @returns True if the first date is after the second date.\n */\n this.isAfter = (date, dateToCompare) => {\n return this.overrides?.isAfter\n ? this.overrides.isAfter(date, dateToCompare)\n : isAfter(date, dateToCompare);\n };\n /**\n * Checks if the first date is before the second date.\n *\n * @param date The date to compare.\n * @param dateToCompare The date to compare with.\n * @returns True if the first date is before the second date.\n */\n this.isBefore = (date, dateToCompare) => {\n return this.overrides?.isBefore\n ? this.overrides.isBefore(date, dateToCompare)\n : isBefore(date, dateToCompare);\n };\n /**\n * Checks if the given value is a Date object.\n *\n * @param value The value to check.\n * @returns True if the value is a Date object.\n */\n this.isDate = (value) => {\n return this.overrides?.isDate\n ? this.overrides.isDate(value)\n : isDate(value);\n };\n /**\n * Checks if the given dates are on the same day.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are on the same day.\n */\n this.isSameDay = (dateLeft, dateRight) => {\n return this.overrides?.isSameDay\n ? this.overrides.isSameDay(dateLeft, dateRight)\n : isSameDay(dateLeft, dateRight);\n };\n /**\n * Checks if the given dates are in the same month.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are in the same month.\n */\n this.isSameMonth = (dateLeft, dateRight) => {\n return this.overrides?.isSameMonth\n ? this.overrides.isSameMonth(dateLeft, dateRight)\n : isSameMonth(dateLeft, dateRight);\n };\n /**\n * Checks if the given dates are in the same year.\n *\n * @param dateLeft The first date to compare.\n * @param dateRight The second date to compare.\n * @returns True if the dates are in the same year.\n */\n this.isSameYear = (dateLeft, dateRight) => {\n return this.overrides?.isSameYear\n ? this.overrides.isSameYear(dateLeft, dateRight)\n : isSameYear(dateLeft, dateRight);\n };\n /**\n * Returns the latest date in the given array of dates.\n *\n * @param dates The array of dates to compare.\n * @returns The latest date.\n */\n this.max = (dates) => {\n return this.overrides?.max ? this.overrides.max(dates) : max(dates);\n };\n /**\n * Returns the earliest date in the given array of dates.\n *\n * @param dates The array of dates to compare.\n * @returns The earliest date.\n */\n this.min = (dates) => {\n return this.overrides?.min ? this.overrides.min(dates) : min(dates);\n };\n /**\n * Sets the month of the given date.\n *\n * @param date The date to set the month on.\n * @param month The month to set (0-11).\n * @returns The new date with the month set.\n */\n this.setMonth = (date, month) => {\n return this.overrides?.setMonth\n ? this.overrides.setMonth(date, month)\n : setMonth(date, month);\n };\n /**\n * Sets the year of the given date.\n *\n * @param date The date to set the year on.\n * @param year The year to set.\n * @returns The new date with the year set.\n */\n this.setYear = (date, year) => {\n return this.overrides?.setYear\n ? this.overrides.setYear(date, year)\n : setYear(date, year);\n };\n /**\n * Returns the start of the broadcast week for the given date.\n *\n * @param date The original date.\n * @returns The start of the broadcast week.\n */\n this.startOfBroadcastWeek = (date, _dateLib) => {\n return this.overrides?.startOfBroadcastWeek\n ? this.overrides.startOfBroadcastWeek(date, this)\n : startOfBroadcastWeek(date, this);\n };\n /**\n * Returns the start of the day for the given date.\n *\n * @param date The original date.\n * @returns The start of the day.\n */\n this.startOfDay = (date) => {\n return this.overrides?.startOfDay\n ? this.overrides.startOfDay(date)\n : startOfDay(date);\n };\n /**\n * Returns the start of the ISO week for the given date.\n *\n * @param date The original date.\n * @returns The start of the ISO week.\n */\n this.startOfISOWeek = (date) => {\n return this.overrides?.startOfISOWeek\n ? this.overrides.startOfISOWeek(date)\n : startOfISOWeek(date);\n };\n /**\n * Returns the start of the month for the given date.\n *\n * @param date The original date.\n * @returns The start of the month.\n */\n this.startOfMonth = (date) => {\n return this.overrides?.startOfMonth\n ? this.overrides.startOfMonth(date)\n : startOfMonth(date);\n };\n /**\n * Returns the start of the week for the given date.\n *\n * @param date The original date.\n * @returns The start of the week.\n */\n this.startOfWeek = (date, _options) => {\n return this.overrides?.startOfWeek\n ? this.overrides.startOfWeek(date, this.options)\n : startOfWeek(date, this.options);\n };\n /**\n * Returns the start of the year for the given date.\n *\n * @param date The original date.\n * @returns The start of the year.\n */\n this.startOfYear = (date) => {\n return this.overrides?.startOfYear\n ? this.overrides.startOfYear(date)\n : startOfYear(date);\n };\n this.options = { locale: enUS, ...options };\n this.overrides = overrides;\n }\n /**\n * Generates a mapping of Arabic digits (0-9) to the target numbering system\n * digits.\n *\n * @since 9.5.0\n * @returns A record mapping Arabic digits to the target numerals.\n */\n getDigitMap() {\n const { numerals = \"latn\" } = this.options;\n // Use Intl.NumberFormat to create a formatter with the specified numbering system\n const formatter = new Intl.NumberFormat(\"en-US\", {\n numberingSystem: numerals,\n });\n // Map Arabic digits (0-9) to the target numerals\n const digitMap = {};\n for (let i = 0; i < 10; i++) {\n digitMap[i.toString()] = formatter.format(i);\n }\n return digitMap;\n }\n /**\n * Replaces Arabic digits in a string with the target numbering system digits.\n *\n * @since 9.5.0\n * @param input The string containing Arabic digits.\n * @returns The string with digits replaced.\n */\n replaceDigits(input) {\n const digitMap = this.getDigitMap();\n return input.replace(/\\d/g, (digit) => digitMap[digit] || digit);\n }\n /**\n * Formats a number using the configured numbering system.\n *\n * @since 9.5.0\n * @param value The number to format.\n * @returns The formatted number as a string.\n */\n formatNumber(value) {\n return this.replaceDigits(value.toString());\n }\n /**\n * Returns the preferred ordering for month and year labels for the current\n * locale.\n */\n getMonthYearOrder() {\n const code = this.options.locale?.code;\n if (!code) {\n return \"month-first\";\n }\n return DateLib.yearFirstLocales.has(code) ? \"year-first\" : \"month-first\";\n }\n /**\n * Formats the month/year pair respecting locale conventions.\n *\n * @since 9.11.0\n */\n formatMonthYear(date) {\n const { locale, timeZone, numerals } = this.options;\n const localeCode = locale?.code;\n if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {\n try {\n const intl = new Intl.DateTimeFormat(localeCode, {\n month: \"long\",\n year: \"numeric\",\n timeZone,\n numberingSystem: numerals,\n });\n const formatted = intl.format(date);\n return formatted;\n }\n catch {\n // Fallback to date-fns formatting below.\n }\n }\n const pattern = this.getMonthYearOrder() === \"year-first\" ? \"y LLLL\" : \"LLLL y\";\n return this.format(date, pattern);\n }\n}\nDateLib.yearFirstLocales = new Set([\n \"eu\",\n \"hu\",\n \"ja\",\n \"ja-Hira\",\n \"ja-JP\",\n \"ko\",\n \"ko-KR\",\n \"lt\",\n \"lt-LT\",\n \"lv\",\n \"lv-LV\",\n \"mn\",\n \"mn-MN\",\n \"zh\",\n \"zh-CN\",\n \"zh-HK\",\n \"zh-TW\",\n]);\n/** The default locale (English). */\nexport { enUS as defaultLocale } from \"date-fns/locale/en-US\";\n/**\n * The default date library with English locale.\n *\n * @since 9.2.0\n */\nexport const defaultDateLib = new DateLib();\n/**\n * @ignore\n * @deprecated Use `defaultDateLib`.\n */\nexport const dateLib = defaultDateLib;\n","import { defaultDateLib } from \"./DateLib.js\";\n/**\n * Represents a day displayed in the calendar.\n *\n * In DayPicker, a `CalendarDay` is a wrapper around a `Date` object that\n * provides additional information about the day, such as whether it belongs to\n * the displayed month.\n */\nexport class CalendarDay {\n constructor(date, displayMonth, dateLib = defaultDateLib) {\n this.date = date;\n this.displayMonth = displayMonth;\n this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));\n this.dateLib = dateLib;\n }\n /**\n * Checks if this day is equal to another `CalendarDay`, considering both the\n * date and the displayed month.\n *\n * @param day The `CalendarDay` to compare with.\n * @returns `true` if the days are equal, otherwise `false`.\n */\n isEqualTo(day) {\n return (this.dateLib.isSameDay(day.date, this.date) &&\n this.dateLib.isSameMonth(day.displayMonth, this.displayMonth));\n }\n}\n","/**\n * Represents a month in a calendar year.\n *\n * A `CalendarMonth` contains the weeks within the month and the date of the\n * month.\n */\nexport class CalendarMonth {\n constructor(month, weeks) {\n this.date = month;\n this.weeks = weeks;\n }\n}\n","/**\n * Represents a week in a calendar month.\n *\n * A `CalendarWeek` contains the days within the week and the week number.\n */\nexport class CalendarWeek {\n constructor(weekNumber, days) {\n this.days = days;\n this.weekNumber = weekNumber;\n }\n}\n","import React from \"react\";\n/**\n * Render the button elements in the calendar.\n *\n * @private\n * @deprecated Use `PreviousMonthButton` or `@link NextMonthButton` instead.\n */\nexport function Button(props) {\n return React.createElement(\"button\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the label in the month caption.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function CaptionLabel(props) {\n return React.createElement(\"span\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the chevron icon used in the navigation buttons and dropdowns.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Chevron(props) {\n const { size = 24, orientation = \"left\", className } = props;\n return (\n // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component\n React.createElement(\"svg\", { className: className, width: size, height: size, viewBox: \"0 0 24 24\" },\n orientation === \"up\" && (React.createElement(\"polygon\", { points: \"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28\" })),\n orientation === \"down\" && (React.createElement(\"polygon\", { points: \"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72\" })),\n orientation === \"left\" && (React.createElement(\"polygon\", { points: \"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20\" })),\n orientation === \"right\" && (React.createElement(\"polygon\", { points: \"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20\" }))));\n}\n","import React from \"react\";\n/**\n * Render a grid cell for a specific day in the calendar.\n *\n * Handles interaction and focus for the day. If you only need to change the\n * content of the day cell, consider swapping the `DayButton` component\n * instead.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Day(props) {\n const { day, modifiers, ...tdProps } = props;\n return React.createElement(\"td\", { ...tdProps });\n}\n","import React from \"react\";\n/**\n * Render a button for a specific day in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DayButton(props) {\n const { day, modifiers, ...buttonProps } = props;\n const ref = React.useRef(null);\n React.useEffect(() => {\n if (modifiers.focused)\n ref.current?.focus();\n }, [modifiers.focused]);\n return React.createElement(\"button\", { ref: ref, ...buttonProps });\n}\n","/**\n * Enum representing the UI elements composing DayPicker. These elements are\n * mapped to {@link CustomComponents}, {@link ClassNames}, and {@link Styles}.\n *\n * Some elements are extended by flags and modifiers.\n */\nexport var UI;\n(function (UI) {\n /** The root component displaying the months and the navigation bar. */\n UI[\"Root\"] = \"root\";\n /** The Chevron SVG element used by navigation buttons and dropdowns. */\n UI[\"Chevron\"] = \"chevron\";\n /**\n * The grid cell with the day's date. Extended by {@link DayFlag} and\n * {@link SelectionState}.\n */\n UI[\"Day\"] = \"day\";\n /** The button containing the formatted day's date, inside the grid cell. */\n UI[\"DayButton\"] = \"day_button\";\n /** The caption label of the month (when not showing the dropdown navigation). */\n UI[\"CaptionLabel\"] = \"caption_label\";\n /** The container of the dropdown navigation (when enabled). */\n UI[\"Dropdowns\"] = \"dropdowns\";\n /** The dropdown element to select for years and months. */\n UI[\"Dropdown\"] = \"dropdown\";\n /** The container element of the dropdown. */\n UI[\"DropdownRoot\"] = \"dropdown_root\";\n /** The root element of the footer. */\n UI[\"Footer\"] = \"footer\";\n /** The month grid. */\n UI[\"MonthGrid\"] = \"month_grid\";\n /** Contains the dropdown navigation or the caption label. */\n UI[\"MonthCaption\"] = \"month_caption\";\n /** The dropdown with the months. */\n UI[\"MonthsDropdown\"] = \"months_dropdown\";\n /** Wrapper of the month grid. */\n UI[\"Month\"] = \"month\";\n /** The container of the displayed months. */\n UI[\"Months\"] = \"months\";\n /** The navigation bar with the previous and next buttons. */\n UI[\"Nav\"] = \"nav\";\n /**\n * The next month button in the navigation. *\n *\n * @since 9.1.0\n */\n UI[\"NextMonthButton\"] = \"button_next\";\n /**\n * The previous month button in the navigation.\n *\n * @since 9.1.0\n */\n UI[\"PreviousMonthButton\"] = \"button_previous\";\n /** The row containing the week. */\n UI[\"Week\"] = \"week\";\n /** The group of row weeks in a month (`tbody`). */\n UI[\"Weeks\"] = \"weeks\";\n /** The column header with the weekday. */\n UI[\"Weekday\"] = \"weekday\";\n /** The row grouping the weekdays in the column headers. */\n UI[\"Weekdays\"] = \"weekdays\";\n /** The cell containing the week number. */\n UI[\"WeekNumber\"] = \"week_number\";\n /** The cell header of the week numbers column. */\n UI[\"WeekNumberHeader\"] = \"week_number_header\";\n /** The dropdown with the years. */\n UI[\"YearsDropdown\"] = \"years_dropdown\";\n})(UI || (UI = {}));\n/** Enum representing flags for the {@link UI.Day} element. */\nexport var DayFlag;\n(function (DayFlag) {\n /** The day is disabled. */\n DayFlag[\"disabled\"] = \"disabled\";\n /** The day is hidden. */\n DayFlag[\"hidden\"] = \"hidden\";\n /** The day is outside the current month. */\n DayFlag[\"outside\"] = \"outside\";\n /** The day is focused. */\n DayFlag[\"focused\"] = \"focused\";\n /** The day is today. */\n DayFlag[\"today\"] = \"today\";\n})(DayFlag || (DayFlag = {}));\n/**\n * Enum representing selection states that can be applied to the {@link UI.Day}\n * element in selection mode.\n */\nexport var SelectionState;\n(function (SelectionState) {\n /** The day is at the end of a selected range. */\n SelectionState[\"range_end\"] = \"range_end\";\n /** The day is at the middle of a selected range. */\n SelectionState[\"range_middle\"] = \"range_middle\";\n /** The day is at the start of a selected range. */\n SelectionState[\"range_start\"] = \"range_start\";\n /** The day is selected. */\n SelectionState[\"selected\"] = \"selected\";\n})(SelectionState || (SelectionState = {}));\n/**\n * Enum representing different animation states for transitioning between\n * months.\n */\nexport var Animation;\n(function (Animation) {\n /** The entering weeks when they appear before the exiting month. */\n Animation[\"weeks_before_enter\"] = \"weeks_before_enter\";\n /** The exiting weeks when they disappear before the entering month. */\n Animation[\"weeks_before_exit\"] = \"weeks_before_exit\";\n /** The entering weeks when they appear after the exiting month. */\n Animation[\"weeks_after_enter\"] = \"weeks_after_enter\";\n /** The exiting weeks when they disappear after the entering month. */\n Animation[\"weeks_after_exit\"] = \"weeks_after_exit\";\n /** The entering caption when it appears after the exiting month. */\n Animation[\"caption_after_enter\"] = \"caption_after_enter\";\n /** The exiting caption when it disappears after the entering month. */\n Animation[\"caption_after_exit\"] = \"caption_after_exit\";\n /** The entering caption when it appears before the exiting month. */\n Animation[\"caption_before_enter\"] = \"caption_before_enter\";\n /** The exiting caption when it disappears before the entering month. */\n Animation[\"caption_before_exit\"] = \"caption_before_exit\";\n})(Animation || (Animation = {}));\n","import React from \"react\";\nimport { UI } from \"../UI.js\";\n/**\n * Render a dropdown component for navigation in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Dropdown(props) {\n const { options, className, components, classNames, ...selectProps } = props;\n const cssClassSelect = [classNames[UI.Dropdown], className].join(\" \");\n const selectedOption = options?.find(({ value }) => value === selectProps.value);\n return (React.createElement(\"span\", { \"data-disabled\": selectProps.disabled, className: classNames[UI.DropdownRoot] },\n React.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => (React.createElement(components.Option, { key: value, value: value, disabled: disabled }, label)))),\n React.createElement(\"span\", { className: classNames[UI.CaptionLabel], \"aria-hidden\": true },\n selectedOption?.label,\n React.createElement(components.Chevron, { orientation: \"down\", size: 18, className: classNames[UI.Chevron] }))));\n}\n","import React from \"react\";\n/**\n * Render the navigation dropdowns for the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DropdownNav(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the footer of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Footer(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the grid with the weekday header row and the weeks for a specific\n * month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Month(props) {\n const { calendarMonth, displayIndex, ...divProps } = props;\n return React.createElement(\"div\", { ...divProps }, props.children);\n}\n","import React from \"react\";\n/**\n * Render the caption for a month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthCaption(props) {\n const { calendarMonth, displayIndex, ...divProps } = props;\n return React.createElement(\"div\", { ...divProps });\n}\n","import React from \"react\";\n/**\n * Render the grid of days for a specific month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthGrid(props) {\n return React.createElement(\"table\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a container wrapping the month grids.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Months(props) {\n return React.createElement(\"div\", { ...props });\n}\n","import { createContext, useContext } from \"react\";\n/** @ignore */\nexport const dayPickerContext = createContext(undefined);\n/**\n * Provides access to the DayPicker context, which includes properties and\n * methods to interact with the DayPicker component. This hook must be used\n * within a custom component.\n *\n * @template T - Use this type to refine the returned context type with a\n * specific selection mode.\n * @returns The context to work with DayPicker.\n * @throws {Error} If the hook is used outside of a DayPicker provider.\n * @group Hooks\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function useDayPicker() {\n const context = useContext(dayPickerContext);\n if (context === undefined) {\n throw new Error(\"useDayPicker() must be used within a custom component.\");\n }\n return context;\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between months in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthsDropdown(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Dropdown, { ...props });\n}\n","import React, { useCallback, } from \"react\";\nimport { UI } from \"../UI.js\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the navigation toolbar with buttons to navigate between months.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Nav(props) {\n const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;\n const { components, classNames, labels: { labelPrevious, labelNext }, } = useDayPicker();\n const handleNextClick = useCallback((e) => {\n if (nextMonth) {\n onNextClick?.(e);\n }\n }, [nextMonth, onNextClick]);\n const handlePreviousClick = useCallback((e) => {\n if (previousMonth) {\n onPreviousClick?.(e);\n }\n }, [previousMonth, onPreviousClick]);\n return (React.createElement(\"nav\", { ...navProps },\n React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick },\n React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: \"left\" })),\n React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick },\n React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, orientation: \"right\", className: classNames[UI.Chevron] }))));\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the button to navigate to the next month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function NextMonthButton(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Button, { ...props });\n}\n","import React from \"react\";\n/**\n * Render an `option` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Option(props) {\n return React.createElement(\"option\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the button to navigate to the previous month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function PreviousMonthButton(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Button, { ...props });\n}\n","import React from \"react\";\n/**\n * Render the root element of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Root(props) {\n const { rootRef, ...rest } = props;\n return React.createElement(\"div\", { ...rest, ref: rootRef });\n}\n","import React from \"react\";\n/**\n * Render a `select` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Select(props) {\n return React.createElement(\"select\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a table row representing a week in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Week(props) {\n const { week, ...trProps } = props;\n return React.createElement(\"tr\", { ...trProps });\n}\n","import React from \"react\";\n/**\n * Render a table header cell with the name of a weekday (e.g., \"Mo\", \"Tu\").\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekday(props) {\n return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the table row containing the weekday names.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekdays(props) {\n return (React.createElement(\"thead\", { \"aria-hidden\": true },\n React.createElement(\"tr\", { ...props })));\n}\n","import React from \"react\";\n/**\n * Render a table cell displaying the number of the week.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumber(props) {\n const { week, ...thProps } = props;\n return React.createElement(\"th\", { ...thProps });\n}\n","import React from \"react\";\n/**\n * Render the header cell for the week numbers column.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumberHeader(props) {\n return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the container for the weeks in the month grid.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weeks(props) {\n return React.createElement(\"tbody\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between years in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function YearsDropdown(props) {\n const { components } = useDayPicker();\n return React.createElement(components.Dropdown, { ...props });\n}\n","import { defaultDateLib } from \"../classes/index.js\";\n/**\n * Checks if a given date is within a specified date range.\n *\n * @since 9.0.0\n * @param range - The date range to check against.\n * @param date - The date to check.\n * @param excludeEnds - If `true`, the range's start and end dates are excluded.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date is within the range, otherwise `false`.\n * @group Utilities\n */\nexport function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {\n let { from, to } = range;\n const { differenceInCalendarDays, isSameDay } = dateLib;\n if (from && to) {\n const isRangeInverted = differenceInCalendarDays(to, from) < 0;\n if (isRangeInverted) {\n [from, to] = [to, from];\n }\n const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&\n differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);\n return isInRange;\n }\n if (!excludeEnds && to) {\n return isSameDay(to, date);\n }\n if (!excludeEnds && from) {\n return isSameDay(from, date);\n }\n return false;\n}\n/**\n * @private\n * @deprecated Use {@link rangeIncludesDate} instead.\n */\nexport const isDateInRange = (range, date) => rangeIncludesDate(range, date, false, defaultDateLib);\n","/**\n * Checks if the given value is of type {@link DateInterval}.\n *\n * @param matcher - The value to check.\n * @returns `true` if the value is a {@link DateInterval}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateInterval(matcher) {\n return Boolean(matcher &&\n typeof matcher === \"object\" &&\n \"before\" in matcher &&\n \"after\" in matcher);\n}\n/**\n * Checks if the given value is of type {@link DateRange}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateRange}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateRange(value) {\n return Boolean(value && typeof value === \"object\" && \"from\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateAfter}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateAfter}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateAfterType(value) {\n return Boolean(value && typeof value === \"object\" && \"after\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateBefore}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateBefore}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateBeforeType(value) {\n return Boolean(value && typeof value === \"object\" && \"before\" in value);\n}\n/**\n * Checks if the given value is of type {@link DayOfWeek}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.\n * @group Utilities\n */\nexport function isDayOfWeekType(value) {\n return Boolean(value && typeof value === \"object\" && \"dayOfWeek\" in value);\n}\n/**\n * Checks if the given value is an array of valid dates.\n *\n * @private\n * @param value - The value to check.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the value is an array of valid dates, otherwise `false`.\n */\nexport function isDatesArray(value, dateLib) {\n return Array.isArray(value) && value.every(dateLib.isDate);\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a given date matches at least one of the specified {@link Matcher}.\n *\n * @param date - The date to check.\n * @param matchers - The matchers to check against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date matches any of the matchers, otherwise `false`.\n * @group Utilities\n */\nexport function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {\n const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;\n const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;\n return matchersArr.some((matcher) => {\n if (typeof matcher === \"boolean\") {\n return matcher;\n }\n if (dateLib.isDate(matcher)) {\n return isSameDay(date, matcher);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.includes(date);\n }\n if (isDateRange(matcher)) {\n return rangeIncludesDate(matcher, date, false, dateLib);\n }\n if (isDayOfWeekType(matcher)) {\n if (!Array.isArray(matcher.dayOfWeek)) {\n return matcher.dayOfWeek === date.getDay();\n }\n return matcher.dayOfWeek.includes(date.getDay());\n }\n if (isDateInterval(matcher)) {\n const diffBefore = differenceInCalendarDays(matcher.before, date);\n const diffAfter = differenceInCalendarDays(matcher.after, date);\n const isDayBefore = diffBefore > 0;\n const isDayAfter = diffAfter < 0;\n const isClosedInterval = isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return isDayAfter && isDayBefore;\n }\n else {\n return isDayBefore || isDayAfter;\n }\n }\n if (isDateAfterType(matcher)) {\n return differenceInCalendarDays(date, matcher.after) > 0;\n }\n if (isDateBeforeType(matcher)) {\n return differenceInCalendarDays(matcher.before, date) > 0;\n }\n if (typeof matcher === \"function\") {\n return matcher(date);\n }\n return false;\n });\n}\n/**\n * @private\n * @deprecated Use {@link dateMatchModifiers} instead.\n */\nexport const isMatch = dateMatchModifiers;\n","import { DayFlag } from \"../UI.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\n/**\n * Creates a function to retrieve the modifiers for a given day.\n *\n * This function calculates both internal and custom modifiers for each day\n * based on the provided calendar days and DayPicker props.\n *\n * @private\n * @param days The array of `CalendarDay` objects to process.\n * @param props The DayPicker props, including modifiers and configuration\n * options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A function that retrieves the modifiers for a given `CalendarDay`.\n */\nexport function createGetModifiers(days, props, navStart, navEnd, dateLib) {\n const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today, } = props;\n const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;\n const computedNavStart = navStart && startOfMonth(navStart);\n const computedNavEnd = navEnd && endOfMonth(navEnd);\n const internalModifiersMap = {\n [DayFlag.focused]: [],\n [DayFlag.outside]: [],\n [DayFlag.disabled]: [],\n [DayFlag.hidden]: [],\n [DayFlag.today]: [],\n };\n const customModifiersMap = {};\n for (const day of days) {\n const { date, displayMonth } = day;\n const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));\n const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));\n const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));\n const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));\n const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||\n isBeforeNavStart ||\n isAfterNavEnd ||\n // Broadcast calendar will show outside days as default\n (!broadcastCalendar && !showOutsideDays && isOutside) ||\n (broadcastCalendar && showOutsideDays === false && isOutside);\n const isToday = isSameDay(date, today ?? dateLib.today());\n if (isOutside)\n internalModifiersMap.outside.push(day);\n if (isDisabled)\n internalModifiersMap.disabled.push(day);\n if (isHidden)\n internalModifiersMap.hidden.push(day);\n if (isToday)\n internalModifiersMap.today.push(day);\n // Add custom modifiers\n if (modifiers) {\n Object.keys(modifiers).forEach((name) => {\n const modifierValue = modifiers?.[name];\n const isMatch = modifierValue\n ? dateMatchModifiers(date, modifierValue, dateLib)\n : false;\n if (!isMatch)\n return;\n if (customModifiersMap[name]) {\n customModifiersMap[name].push(day);\n }\n else {\n customModifiersMap[name] = [day];\n }\n });\n }\n }\n return (day) => {\n // Initialize all the modifiers to false\n const dayFlags = {\n [DayFlag.focused]: false,\n [DayFlag.disabled]: false,\n [DayFlag.hidden]: false,\n [DayFlag.outside]: false,\n [DayFlag.today]: false,\n };\n const customModifiers = {};\n // Find the modifiers for the given day\n for (const name in internalModifiersMap) {\n const days = internalModifiersMap[name];\n dayFlags[name] = days.some((d) => d === day);\n }\n for (const name in customModifiersMap) {\n customModifiers[name] = customModifiersMap[name].some((d) => d === day);\n }\n return {\n ...dayFlags,\n // custom modifiers should override all the previous ones\n ...customModifiers,\n };\n };\n}\n","import { DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the class names for a day based on its modifiers.\n *\n * This function combines the base class name for the day with any class names\n * associated with active modifiers.\n *\n * @param modifiers The modifiers applied to the day.\n * @param classNames The base class names for the calendar elements.\n * @param modifiersClassNames The class names associated with specific\n * modifiers.\n * @returns An array of class names for the day.\n */\nexport function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {\n const modifierClassNames = Object.entries(modifiers)\n .filter(([, active]) => active === true)\n .reduce((previousValue, [key]) => {\n if (modifiersClassNames[key]) {\n previousValue.push(modifiersClassNames[key]);\n }\n else if (classNames[DayFlag[key]]) {\n previousValue.push(classNames[DayFlag[key]]);\n }\n else if (classNames[SelectionState[key]]) {\n previousValue.push(classNames[SelectionState[key]]);\n }\n return previousValue;\n }, [classNames[UI.Day]]);\n return modifierClassNames;\n}\n","import * as components from \"../components/custom-components.js\";\n/**\n * Merges custom components from the props with the default components.\n *\n * This function ensures that any custom components provided in the props\n * override the default components.\n *\n * @param customComponents The custom components provided in the DayPicker\n * props.\n * @returns An object containing the merged components.\n */\nexport function getComponents(customComponents) {\n return {\n ...components,\n ...customComponents,\n };\n}\n","/**\n * Extracts `data-` attributes from the DayPicker props.\n *\n * This function collects all `data-` attributes from the props and adds\n * additional attributes based on the DayPicker configuration.\n *\n * @param props The DayPicker props.\n * @returns An object containing the `data-` attributes.\n */\nexport function getDataAttributes(props) {\n const dataAttributes = {\n \"data-mode\": props.mode ?? undefined,\n \"data-required\": \"required\" in props ? props.required : undefined,\n \"data-multiple-months\": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,\n \"data-week-numbers\": props.showWeekNumber || undefined,\n \"data-broadcast-calendar\": props.broadcastCalendar || undefined,\n \"data-nav-layout\": props.navLayout || undefined,\n };\n Object.entries(props).forEach(([key, val]) => {\n if (key.startsWith(\"data-\")) {\n dataAttributes[key] = val;\n }\n });\n return dataAttributes;\n}\n","import { Animation, DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the default class names for the UI elements.\n *\n * This function generates a mapping of default class names for various UI\n * elements, day flags, selection states, and animations.\n *\n * @returns An object containing the default class names.\n * @group Utilities\n */\nexport function getDefaultClassNames() {\n const classNames = {};\n for (const key in UI) {\n classNames[UI[key]] =\n `rdp-${UI[key]}`;\n }\n for (const key in DayFlag) {\n classNames[DayFlag[key]] =\n `rdp-${DayFlag[key]}`;\n }\n for (const key in SelectionState) {\n classNames[SelectionState[key]] =\n `rdp-${SelectionState[key]}`;\n }\n for (const key in Animation) {\n classNames[Animation[key]] =\n `rdp-${Animation[key]}`;\n }\n return classNames;\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the caption of the month.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param month The date representing the month.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted caption as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatCaption(month, options, dateLib) {\n const lib = dateLib ?? new DateLib(options);\n return lib.formatMonthYear(month);\n}\n/**\n * @private\n * @deprecated Use {@link formatCaption} instead.\n * @group Formatters\n */\nexport const formatMonthCaption = formatCaption;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the day date shown in the day cell.\n *\n * @defaultValue `d` (e.g., \"1\").\n * @param date The date to format.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted day as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatDay(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"d\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the month for the dropdown option label.\n *\n * @defaultValue The localized full month name.\n * @param month The date representing the month.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted month name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatMonthDropdown(month, dateLib = defaultDateLib) {\n return dateLib.format(month, \"LLLL\");\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the name of a weekday to be displayed in the weekdays header.\n *\n * @defaultValue `cccccc` (e.g., \"Mo\" for Monday).\n * @param weekday The date representing the weekday.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted weekday name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekdayName(weekday, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(weekday, \"cccccc\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the week number.\n *\n * @defaultValue The week number as a string, with a leading zero for single-digit numbers.\n * @param weekNumber The week number to format.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted week number as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {\n if (weekNumber < 10) {\n return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);\n }\n return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);\n}\n","/**\n * Formats the header for the week number column.\n *\n * @defaultValue An empty string `\"\"`.\n * @returns The formatted week number header as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumberHeader() {\n return ``;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the year for the dropdown option label.\n *\n * @param year The year to format.\n * @param dateLib The date library to use for formatting. Defaults to\n * `defaultDateLib`.\n * @returns The formatted year as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatYearDropdown(year, dateLib = defaultDateLib) {\n return dateLib.format(year, \"yyyy\");\n}\n/**\n * @private\n * @deprecated Use `formatYearDropdown` instead.\n * @group Formatters\n */\nexport const formatYearCaption = formatYearDropdown;\n","import * as defaultFormatters from \"../formatters/index.js\";\n/**\n * Merges custom formatters from the props with the default formatters.\n *\n * @param customFormatters The custom formatters provided in the DayPicker\n * props.\n * @returns The merged formatters object.\n */\nexport function getFormatters(customFormatters) {\n if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {\n customFormatters.formatCaption = customFormatters.formatMonthCaption;\n }\n if (customFormatters?.formatYearCaption &&\n !customFormatters.formatYearDropdown) {\n customFormatters.formatYearDropdown = customFormatters.formatYearCaption;\n }\n return {\n ...defaultFormatters,\n ...customFormatters,\n };\n}\n","/**\n * Returns the months to show in the dropdown.\n *\n * This function generates a list of months for the current year, formatted\n * using the provided formatter, and determines whether each month should be\n * disabled based on the navigation range.\n *\n * @param displayMonth The currently displayed month.\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the month labels.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dropdown options representing the months, or `undefined`\n * if no months are available.\n */\nexport function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {\n const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;\n const months = eachMonthOfInterval({\n start: startOfYear(displayMonth),\n end: endOfYear(displayMonth),\n });\n const options = months.map((month) => {\n const label = formatters.formatMonthDropdown(month, dateLib);\n const value = getMonth(month);\n const disabled = (navStart && month < startOfMonth(navStart)) ||\n (navEnd && month > startOfMonth(navEnd)) ||\n false;\n return { value, label, disabled };\n });\n return options;\n}\n","import { UI } from \"../UI.js\";\n/**\n * Returns the computed style for a day based on its modifiers.\n *\n * This function merges the base styles for the day with any styles associated\n * with active modifiers.\n *\n * @param dayModifiers The modifiers applied to the day.\n * @param styles The base styles for the calendar elements.\n * @param modifiersStyles The styles associated with specific modifiers.\n * @returns The computed style for the day.\n */\nexport function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {\n let style = { ...styles?.[UI.Day] };\n Object.entries(dayModifiers)\n .filter(([, active]) => active === true)\n .forEach(([modifier]) => {\n style = {\n ...style,\n ...modifiersStyles?.[modifier],\n };\n });\n return style;\n}\n","/**\n * Generates a series of 7 days, starting from the beginning of the week, to use\n * for formatting weekday names (e.g., Monday, Tuesday, etc.).\n *\n * @param dateLib The date library to use for date manipulation.\n * @param ISOWeek Whether to use ISO week numbering (weeks start on Monday).\n * @param broadcastCalendar Whether to use the broadcast calendar (weeks start\n * on Monday, but may include adjustments for broadcast-specific rules).\n * @returns An array of 7 dates representing the weekdays.\n */\nexport function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {\n const today = dateLib.today();\n const start = broadcastCalendar\n ? dateLib.startOfBroadcastWeek(today, dateLib)\n : ISOWeek\n ? dateLib.startOfISOWeek(today)\n : dateLib.startOfWeek(today);\n const days = [];\n for (let i = 0; i < 7; i++) {\n const day = dateLib.addDays(start, i);\n days.push(day);\n }\n return days;\n}\n","/**\n * Returns the years to display in the dropdown.\n *\n * This function generates a list of years between the navigation start and end\n * dates, formatted using the provided formatter.\n *\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the year labels.\n * @param dateLib The date library to use for date manipulation.\n * @param reverse If true, reverses the order of the years (descending).\n * @returns An array of dropdown options representing the years, or `undefined`\n * if `navStart` or `navEnd` is not provided.\n */\nexport function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {\n if (!navStart)\n return undefined;\n if (!navEnd)\n return undefined;\n const { startOfYear, endOfYear, eachYearOfInterval, getYear } = dateLib;\n const firstNavYear = startOfYear(navStart);\n const lastNavYear = endOfYear(navEnd);\n const years = eachYearOfInterval({ start: firstNavYear, end: lastNavYear });\n if (reverse)\n years.reverse();\n return years.map((year) => {\n const label = formatters.formatYearDropdown(year, dateLib);\n return {\n value: getYear(year),\n label,\n disabled: false,\n };\n });\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a day button.\n *\n * Use the `modifiers` argument to provide additional context for the label,\n * such as indicating if the day is \"today\" or \"selected.\"\n *\n * @defaultValue The formatted date.\n * @param date - The date to format.\n * @param modifiers - The modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the day button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelDayButton(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers.today)\n label = `Today, ${label}`;\n if (modifiers.selected)\n label = `${label}, selected`;\n return label;\n}\n/**\n * @ignore\n * @deprecated Use `labelDayButton` instead.\n */\nexport const labelDay = labelDayButton;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for the month grid, which is announced when entering\n * the grid.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param date - The date representing the month.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the month grid.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGrid(date, options, dateLib) {\n const lib = dateLib ?? new DateLib(options);\n return lib.formatMonthYear(date);\n}\n/**\n * @ignore\n * @deprecated Use {@link labelGrid} instead.\n */\nexport const labelCaption = labelGrid;\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the label for a day grid cell when the calendar is not interactive.\n *\n * @param date - The date to format.\n * @param modifiers - Optional modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The label for the day grid cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGridcell(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers?.today) {\n label = `Today, ${label}`;\n }\n return label;\n}\n","/**\n * Generates the ARIA label for the months dropdown.\n *\n * @defaultValue `\"Choose the Month\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the months dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelMonthDropdown(_options) {\n return \"Choose the Month\";\n}\n","/**\n * Generates the ARIA label for the navigation toolbar.\n *\n * @defaultValue `\"\"`\n * @returns The ARIA label for the navigation toolbar.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNav() {\n return \"\";\n}\n","/**\n * Generates the ARIA label for the \"next month\" button.\n *\n * @defaultValue `\"Go to the Next Month\"`\n * @param month - The date representing the next month, or `undefined` if there\n * is no next month.\n * @returns The ARIA label for the \"next month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNext(_month) {\n return \"Go to the Next Month\";\n}\n","/**\n * Generates the ARIA label for the \"previous month\" button.\n *\n * @defaultValue `\"Go to the Previous Month\"`\n * @param month - The date representing the previous month, or `undefined` if\n * there is no previous month.\n * @returns The ARIA label for the \"previous month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelPrevious(_month) {\n return \"Go to the Previous Month\";\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a weekday column header.\n *\n * @defaultValue `\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"`\n * @param date - The date representing the weekday.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the weekday column header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekday(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"cccc\");\n}\n","/**\n * Generates the ARIA label for the week number cell (the first cell in a row).\n *\n * @defaultValue `Week ${weekNumber}`\n * @param weekNumber - The number of the week.\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumber(weekNumber, _options) {\n return `Week ${weekNumber}`;\n}\n","/**\n * Generates the ARIA label for the week number header element.\n *\n * @defaultValue `\"Week Number\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumberHeader(_options) {\n return \"Week Number\";\n}\n","/**\n * Generates the ARIA label for the years dropdown.\n *\n * @defaultValue `\"Choose the Year\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the years dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelYearDropdown(_options) {\n return \"Choose the Year\";\n}\n","import { useLayoutEffect, useRef } from \"react\";\nimport { Animation } from \"./UI.js\";\nconst asHtmlElement = (element) => {\n if (element instanceof HTMLElement)\n return element;\n return null;\n};\nconst queryMonthEls = (element) => [\n ...(element.querySelectorAll(\"[data-animated-month]\") ?? []),\n];\nconst queryMonthEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-month]\"));\nconst queryCaptionEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-caption]\"));\nconst queryWeeksEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weeks]\"));\nconst queryNavEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-nav]\"));\nconst queryWeekdaysEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weekdays]\"));\n/**\n * Handles animations for transitioning between months in the DayPicker\n * component.\n *\n * @private\n * @param rootElRef - A reference to the root element of the DayPicker\n * component.\n * @param enabled - Whether animations are enabled.\n * @param options - Configuration options for the animation, including class\n * names, months, focused day, and the date utility library.\n */\nexport function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib, }) {\n const previousRootElSnapshotRef = useRef(null);\n const previousMonthsRef = useRef(months);\n const animatingRef = useRef(false);\n useLayoutEffect(() => {\n // get previous months before updating the previous months ref\n const previousMonths = previousMonthsRef.current;\n // update previous months ref for next effect trigger\n previousMonthsRef.current = months;\n if (!enabled ||\n !rootElRef.current ||\n // safety check because the ref can be set to anything by consumers\n !(rootElRef.current instanceof HTMLElement) ||\n // validation required for the animation to work as expected\n months.length === 0 ||\n previousMonths.length === 0 ||\n months.length !== previousMonths.length) {\n return;\n }\n const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);\n const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);\n const captionAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.caption_after_enter]\n : classNames[Animation.caption_before_enter];\n const weeksAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.weeks_after_enter]\n : classNames[Animation.weeks_before_enter];\n // get previous root element snapshot before updating the snapshot ref\n const previousRootElSnapshot = previousRootElSnapshotRef.current;\n // update snapshot for next effect trigger\n const rootElSnapshot = rootElRef.current.cloneNode(true);\n if (rootElSnapshot instanceof HTMLElement) {\n // if this effect is triggered while animating, we need to clean up the new root snapshot\n // to put it in the same state as when not animating, to correctly animate the next month change\n const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);\n currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {\n if (!(currentMonthElSnapshot instanceof HTMLElement))\n return;\n // remove the old month snapshots from the new root snapshot\n const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);\n if (previousMonthElSnapshot &&\n currentMonthElSnapshot.contains(previousMonthElSnapshot)) {\n currentMonthElSnapshot.removeChild(previousMonthElSnapshot);\n }\n // remove animation classes from the new month snapshots\n const captionEl = queryCaptionEl(currentMonthElSnapshot);\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthElSnapshot);\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n });\n previousRootElSnapshotRef.current = rootElSnapshot;\n }\n else {\n previousRootElSnapshotRef.current = null;\n }\n if (animatingRef.current ||\n isSameMonth ||\n // skip animation if a day is focused because it can cause issues to the animation and is better for a11y\n focused) {\n return;\n }\n const previousMonthEls = previousRootElSnapshot instanceof HTMLElement\n ? queryMonthEls(previousRootElSnapshot)\n : [];\n const currentMonthEls = queryMonthEls(rootElRef.current);\n if (currentMonthEls?.every((el) => el instanceof HTMLElement) &&\n previousMonthEls &&\n previousMonthEls.every((el) => el instanceof HTMLElement)) {\n animatingRef.current = true;\n const cleanUpFunctions = [];\n // set isolation to isolate to isolate the stacking context during animation\n rootElRef.current.style.isolation = \"isolate\";\n // set z-index to 1 to ensure the nav is clickable over the other elements being animated\n const navEl = queryNavEl(rootElRef.current);\n if (navEl) {\n navEl.style.zIndex = \"1\";\n }\n currentMonthEls.forEach((currentMonthEl, index) => {\n const previousMonthEl = previousMonthEls[index];\n if (!previousMonthEl) {\n return;\n }\n // animate new displayed month\n currentMonthEl.style.position = \"relative\";\n currentMonthEl.style.overflow = \"hidden\";\n const captionEl = queryCaptionEl(currentMonthEl);\n if (captionEl) {\n captionEl.classList.add(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthEl);\n if (weeksEl) {\n weeksEl.classList.add(weeksAnimationClass);\n }\n // animate new displayed month end\n const cleanUp = () => {\n animatingRef.current = false;\n if (rootElRef.current) {\n rootElRef.current.style.isolation = \"\";\n }\n if (navEl) {\n navEl.style.zIndex = \"\";\n }\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n currentMonthEl.style.position = \"\";\n currentMonthEl.style.overflow = \"\";\n if (currentMonthEl.contains(previousMonthEl)) {\n currentMonthEl.removeChild(previousMonthEl);\n }\n };\n cleanUpFunctions.push(cleanUp);\n // animate old displayed month\n previousMonthEl.style.pointerEvents = \"none\";\n previousMonthEl.style.position = \"absolute\";\n previousMonthEl.style.overflow = \"hidden\";\n previousMonthEl.setAttribute(\"aria-hidden\", \"true\");\n // hide the weekdays container of the old month and only the new one\n const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);\n if (previousWeekdaysEl) {\n previousWeekdaysEl.style.opacity = \"0\";\n }\n const previousCaptionEl = queryCaptionEl(previousMonthEl);\n if (previousCaptionEl) {\n previousCaptionEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.caption_before_exit]\n : classNames[Animation.caption_after_exit]);\n previousCaptionEl.addEventListener(\"animationend\", cleanUp);\n }\n const previousWeeksEl = queryWeeksEl(previousMonthEl);\n if (previousWeeksEl) {\n previousWeeksEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.weeks_before_exit]\n : classNames[Animation.weeks_after_exit]);\n }\n currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);\n });\n }\n });\n}\n","/**\n * Returns all the dates to display in the calendar.\n *\n * This function calculates the range of dates to display based on the provided\n * display months, constraints, and calendar configuration.\n *\n * @param displayMonths The months to display in the calendar.\n * @param maxDate The maximum date to include in the range.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates to display in the calendar.\n */\nexport function getDates(displayMonths, maxDate, props, dateLib) {\n const firstMonth = displayMonths[0];\n const lastMonth = displayMonths[displayMonths.length - 1];\n const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};\n const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const startWeekFirstDate = broadcastCalendar\n ? startOfBroadcastWeek(firstMonth, dateLib)\n : ISOWeek\n ? startOfISOWeek(firstMonth)\n : startOfWeek(firstMonth);\n const endWeekLastDate = broadcastCalendar\n ? endOfBroadcastWeek(lastMonth)\n : ISOWeek\n ? endOfISOWeek(endOfMonth(lastMonth))\n : endOfWeek(endOfMonth(lastMonth));\n const nOfDays = differenceInCalendarDays(endWeekLastDate, startWeekFirstDate);\n const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;\n const dates = [];\n for (let i = 0; i <= nOfDays; i++) {\n const date = addDays(startWeekFirstDate, i);\n if (maxDate && isAfter(date, maxDate)) {\n break;\n }\n dates.push(date);\n }\n // If fixed weeks is enabled, add the extra dates to the array\n const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;\n const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;\n if (fixedWeeks && dates.length < extraDates) {\n const daysToAdd = extraDates - dates.length;\n for (let i = 0; i < daysToAdd; i++) {\n const date = addDays(dates[dates.length - 1], 1);\n dates.push(date);\n }\n }\n return dates;\n}\n","/**\n * Returns all the days belonging to the calendar by merging the days in the\n * weeks for each month.\n *\n * @param calendarMonths The array of calendar months.\n * @returns An array of `CalendarDay` objects representing all the days in the\n * calendar.\n */\nexport function getDays(calendarMonths) {\n const initialDays = [];\n return calendarMonths.reduce((days, month) => {\n const weekDays = month.weeks.reduce((weekDays, week) => {\n return weekDays.concat(week.days.slice());\n }, initialDays.slice());\n return days.concat(weekDays.slice());\n }, initialDays.slice());\n}\n","/**\n * Returns the months to display in the calendar.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including `numberOfMonths`.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates representing the months to display.\n */\nexport function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {\n const { numberOfMonths = 1 } = props;\n const months = [];\n for (let i = 0; i < numberOfMonths; i++) {\n const month = dateLib.addMonths(firstDisplayedMonth, i);\n if (calendarEndMonth && month > calendarEndMonth) {\n break;\n }\n months.push(month);\n }\n return months;\n}\n","/**\n * Determines the initial month to display in the calendar based on the provided\n * props.\n *\n * This function calculates the starting month, considering constraints such as\n * `startMonth`, `endMonth`, and the number of months to display.\n *\n * @param props The DayPicker props, including navigation and date constraints.\n * @param dateLib The date library to use for date manipulation.\n * @returns The initial month to display.\n */\nexport function getInitialMonth(props, navStart, navEnd, dateLib) {\n const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;\n let initialMonth = month || defaultMonth || today;\n const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;\n if (navEnd &&\n differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {\n const offset = -1 * (numberOfMonths - 1);\n initialMonth = addMonths(navEnd, offset);\n }\n if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {\n initialMonth = navStart;\n }\n return startOfMonth(initialMonth);\n}\n","import { CalendarDay, CalendarMonth, CalendarWeek } from \"../classes/index.js\";\n/**\n * Returns the months to display in the calendar.\n *\n * This function generates `CalendarMonth` objects for each month to be\n * displayed, including their weeks and days, based on the provided display\n * months and dates.\n *\n * @param displayMonths The months (as dates) to display in the calendar.\n * @param dates The dates to display in the calendar.\n * @param props Options from the DayPicker props context.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of `CalendarMonth` objects representing the months to\n * display.\n */\nexport function getMonths(displayMonths, dates, props, dateLib) {\n const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const dayPickerMonths = displayMonths.reduce((months, month) => {\n const firstDateOfFirstWeek = props.broadcastCalendar\n ? startOfBroadcastWeek(month, dateLib)\n : props.ISOWeek\n ? startOfISOWeek(month)\n : startOfWeek(month);\n const lastDateOfLastWeek = props.broadcastCalendar\n ? endOfBroadcastWeek(month)\n : props.ISOWeek\n ? endOfISOWeek(endOfMonth(month))\n : endOfWeek(endOfMonth(month));\n /** The dates to display in the month. */\n const monthDates = dates.filter((date) => {\n return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;\n });\n const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;\n if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {\n const extraDates = dates.filter((date) => {\n const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;\n return (date > lastDateOfLastWeek &&\n date <= addDays(lastDateOfLastWeek, daysToAdd));\n });\n monthDates.push(...extraDates);\n }\n const weeks = monthDates.reduce((weeks, date) => {\n const weekNumber = props.ISOWeek ? getISOWeek(date) : getWeek(date);\n const week = weeks.find((week) => week.weekNumber === weekNumber);\n const day = new CalendarDay(date, month, dateLib);\n if (!week) {\n weeks.push(new CalendarWeek(weekNumber, [day]));\n }\n else {\n week.days.push(day);\n }\n return weeks;\n }, []);\n const dayPickerMonth = new CalendarMonth(month, weeks);\n months.push(dayPickerMonth);\n return months;\n }, []);\n if (!props.reverseMonths) {\n return dayPickerMonths;\n }\n else {\n return dayPickerMonths.reverse();\n }\n}\n","/**\n * Returns the start and end months for calendar navigation.\n *\n * @param props The DayPicker props, including navigation and layout options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A tuple containing the start and end months for navigation.\n */\nexport function getNavMonths(props, dateLib) {\n let { startMonth, endMonth } = props;\n const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today, } = dateLib;\n // Handle deprecated code\n const { fromYear, toYear, fromMonth, toMonth } = props;\n if (!startMonth && fromMonth) {\n startMonth = fromMonth;\n }\n if (!startMonth && fromYear) {\n startMonth = dateLib.newDate(fromYear, 0, 1);\n }\n if (!endMonth && toMonth) {\n endMonth = toMonth;\n }\n if (!endMonth && toYear) {\n endMonth = newDate(toYear, 11, 31);\n }\n const hasYearDropdown = props.captionLayout === \"dropdown\" ||\n props.captionLayout === \"dropdown-years\";\n if (startMonth) {\n startMonth = startOfMonth(startMonth);\n }\n else if (fromYear) {\n startMonth = newDate(fromYear, 0, 1);\n }\n else if (!startMonth && hasYearDropdown) {\n startMonth = startOfYear(addYears(props.today ?? today(), -100));\n }\n if (endMonth) {\n endMonth = endOfMonth(endMonth);\n }\n else if (toYear) {\n endMonth = newDate(toYear, 11, 31);\n }\n else if (!endMonth && hasYearDropdown) {\n endMonth = endOfYear(props.today ?? today());\n }\n return [\n startMonth ? startOfDay(startMonth) : startMonth,\n endMonth ? startOfDay(endMonth) : endMonth,\n ];\n}\n","/**\n * Returns the next month the user can navigate to, based on the given options.\n *\n * The next month is not always the next calendar month:\n *\n * - If it is after the `calendarEndMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips forward by the number of displayed\n * months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n * `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next month, or `undefined` if navigation is not possible.\n */\nexport function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {\n if (options.disableNavigation) {\n return undefined;\n }\n const { pagedNavigation, numberOfMonths = 1 } = options;\n const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n const offset = pagedNavigation ? numberOfMonths : 1;\n const month = startOfMonth(firstDisplayedMonth);\n if (!calendarEndMonth) {\n return addMonths(month, offset);\n }\n const monthsDiff = differenceInCalendarMonths(calendarEndMonth, firstDisplayedMonth);\n if (monthsDiff < numberOfMonths) {\n return undefined;\n }\n return addMonths(month, offset);\n}\n","/**\n * Returns the previous month the user can navigate to, based on the given\n * options.\n *\n * The previous month is not always the previous calendar month:\n *\n * - If it is before the `calendarStartMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips back by the number of displayed\n * months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n * `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The previous month, or `undefined` if navigation is not possible.\n */\nexport function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {\n if (options.disableNavigation) {\n return undefined;\n }\n const { pagedNavigation, numberOfMonths } = options;\n const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n const offset = pagedNavigation ? (numberOfMonths ?? 1) : 1;\n const month = startOfMonth(firstDisplayedMonth);\n if (!calendarStartMonth) {\n return addMonths(month, -offset);\n }\n const monthsDiff = differenceInCalendarMonths(month, calendarStartMonth);\n if (monthsDiff <= 0) {\n return undefined;\n }\n return addMonths(month, -offset);\n}\n","/**\n * Returns an array of calendar weeks from an array of calendar months.\n *\n * @param months The array of calendar months.\n * @returns An array of calendar weeks.\n */\nexport function getWeeks(months) {\n const initialWeeks = [];\n return months.reduce((weeks, month) => {\n return weeks.concat(month.weeks.slice());\n }, initialWeeks.slice());\n}\n","import { useState } from \"react\";\n/**\n * A custom hook for managing both controlled and uncontrolled component states.\n *\n * This hook allows a component to support both controlled and uncontrolled\n * states by determining whether the `controlledValue` is provided. If it is\n * undefined, the hook falls back to using the internal state.\n *\n * @example\n * // Uncontrolled usage\n * const [value, setValue] = useControlledValue(0, undefined);\n *\n * // Controlled usage\n * const [value, setValue] = useControlledValue(0, props.value);\n *\n * @template T - The type of the value.\n * @param defaultValue The initial value for the uncontrolled state.\n * @param controlledValue The value for the controlled state. If undefined, the\n * component will use the uncontrolled state.\n * @returns A tuple where the first element is the current value (either\n * controlled or uncontrolled) and the second element is a setter function to\n * update the value.\n */\nexport function useControlledValue(defaultValue, controlledValue) {\n const [uncontrolledValue, setValue] = useState(defaultValue);\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n return [value, setValue];\n}\n","import { useEffect } from \"react\";\nimport { getDates } from \"./helpers/getDates.js\";\nimport { getDays } from \"./helpers/getDays.js\";\nimport { getDisplayMonths } from \"./helpers/getDisplayMonths.js\";\nimport { getInitialMonth } from \"./helpers/getInitialMonth.js\";\nimport { getMonths } from \"./helpers/getMonths.js\";\nimport { getNavMonths } from \"./helpers/getNavMonth.js\";\nimport { getNextMonth } from \"./helpers/getNextMonth.js\";\nimport { getPreviousMonth } from \"./helpers/getPreviousMonth.js\";\nimport { getWeeks } from \"./helpers/getWeeks.js\";\nimport { useControlledValue } from \"./helpers/useControlledValue.js\";\n/**\n * Provides the calendar object to work with the calendar in custom components.\n *\n * @private\n * @param props - The DayPicker props related to calendar configuration.\n * @param dateLib - The date utility library instance.\n * @returns The calendar object containing displayed days, weeks, months, and\n * navigation methods.\n */\nexport function useCalendar(props, dateLib) {\n const [navStart, navEnd] = getNavMonths(props, dateLib);\n const { startOfMonth, endOfMonth } = dateLib;\n const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n const [firstMonth, setFirstMonth] = useControlledValue(initialMonth, \n // initialMonth is always computed from props.month if provided\n props.month ? initialMonth : undefined);\n // biome-ignore lint/correctness/useExhaustiveDependencies: change the initial month when the time zone changes.\n useEffect(() => {\n const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n setFirstMonth(newInitialMonth);\n }, [props.timeZone]);\n /** The months displayed in the calendar. */\n const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);\n /** The dates displayed in the calendar. */\n const dates = getDates(displayMonths, props.endMonth ? endOfMonth(props.endMonth) : undefined, props, dateLib);\n /** The Months displayed in the calendar. */\n const months = getMonths(displayMonths, dates, props, dateLib);\n /** The Weeks displayed in the calendar. */\n const weeks = getWeeks(months);\n /** The Days displayed in the calendar. */\n const days = getDays(months);\n const previousMonth = getPreviousMonth(firstMonth, navStart, props, dateLib);\n const nextMonth = getNextMonth(firstMonth, navEnd, props, dateLib);\n const { disableNavigation, onMonthChange } = props;\n const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));\n const goToMonth = (date) => {\n if (disableNavigation) {\n return;\n }\n let newMonth = startOfMonth(date);\n // if month is before start, use the first month instead\n if (navStart && newMonth < startOfMonth(navStart)) {\n newMonth = startOfMonth(navStart);\n }\n // if month is after endMonth, use the last month instead\n if (navEnd && newMonth > startOfMonth(navEnd)) {\n newMonth = startOfMonth(navEnd);\n }\n setFirstMonth(newMonth);\n onMonthChange?.(newMonth);\n };\n const goToDay = (day) => {\n // is this check necessary?\n if (isDayInCalendar(day)) {\n return;\n }\n goToMonth(day.date);\n };\n const calendar = {\n months,\n weeks,\n days,\n navStart,\n navEnd,\n previousMonth,\n nextMonth,\n goToMonth,\n goToDay,\n };\n return calendar;\n}\n","import { DayFlag } from \"../UI.js\";\nvar FocusTargetPriority;\n(function (FocusTargetPriority) {\n FocusTargetPriority[FocusTargetPriority[\"Today\"] = 0] = \"Today\";\n FocusTargetPriority[FocusTargetPriority[\"Selected\"] = 1] = \"Selected\";\n FocusTargetPriority[FocusTargetPriority[\"LastFocused\"] = 2] = \"LastFocused\";\n FocusTargetPriority[FocusTargetPriority[\"FocusedModifier\"] = 3] = \"FocusedModifier\";\n})(FocusTargetPriority || (FocusTargetPriority = {}));\n/**\n * Determines if a day is focusable based on its modifiers.\n *\n * A day is considered focusable if it is not disabled, hidden, or outside the\n * displayed month.\n *\n * @param modifiers The modifiers applied to the day.\n * @returns `true` if the day is focusable, otherwise `false`.\n */\nfunction isFocusableDay(modifiers) {\n return (!modifiers[DayFlag.disabled] &&\n !modifiers[DayFlag.hidden] &&\n !modifiers[DayFlag.outside]);\n}\n/**\n * Calculates the focus target day based on priority.\n *\n * This function determines the day that should receive focus in the calendar,\n * prioritizing days with specific modifiers (e.g., \"focused\", \"today\") or\n * selection states.\n *\n * @param days The array of `CalendarDay` objects to evaluate.\n * @param getModifiers A function to retrieve the modifiers for a given day.\n * @param isSelected A function to determine if a day is selected.\n * @param lastFocused The last focused day, if any.\n * @returns The `CalendarDay` that should receive focus, or `undefined` if no\n * focusable day is found.\n */\nexport function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {\n let focusTarget;\n let foundFocusTargetPriority = -1;\n for (const day of days) {\n const modifiers = getModifiers(day);\n if (isFocusableDay(modifiers)) {\n if (modifiers[DayFlag.focused] &&\n foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;\n }\n else if (lastFocused?.isEqualTo(day) &&\n foundFocusTargetPriority < FocusTargetPriority.LastFocused) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.LastFocused;\n }\n else if (isSelected(day.date) &&\n foundFocusTargetPriority < FocusTargetPriority.Selected) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.Selected;\n }\n else if (modifiers[DayFlag.today] &&\n foundFocusTargetPriority < FocusTargetPriority.Today) {\n focusTarget = day;\n foundFocusTargetPriority = FocusTargetPriority.Today;\n }\n }\n }\n if (!focusTarget) {\n // Return the first day that is focusable\n focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));\n }\n return focusTarget;\n}\n","/**\n * Calculates the next date that should be focused in the calendar.\n *\n * This function determines the next focusable date based on the movement\n * direction, constraints, and calendar configuration.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDate The reference date from which to calculate the next focusable\n * date.\n * @param navStart The earliest date the user can navigate to.\n * @param navEnd The latest date the user can navigate to.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next focusable date.\n */\nexport function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {\n const { ISOWeek, broadcastCalendar } = props;\n const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const moveFns = {\n day: addDays,\n week: addWeeks,\n month: addMonths,\n year: addYears,\n startOfWeek: (date) => broadcastCalendar\n ? startOfBroadcastWeek(date, dateLib)\n : ISOWeek\n ? startOfISOWeek(date)\n : startOfWeek(date),\n endOfWeek: (date) => broadcastCalendar\n ? endOfBroadcastWeek(date)\n : ISOWeek\n ? endOfISOWeek(date)\n : endOfWeek(date),\n };\n let focusableDate = moveFns[moveBy](refDate, moveDir === \"after\" ? 1 : -1);\n if (moveDir === \"before\" && navStart) {\n focusableDate = max([navStart, focusableDate]);\n }\n else if (moveDir === \"after\" && navEnd) {\n focusableDate = min([navEnd, focusableDate]);\n }\n return focusableDate;\n}\n","import { CalendarDay } from \"../classes/index.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\nimport { getFocusableDate } from \"./getFocusableDate.js\";\n/**\n * Determines the next focusable day in the calendar.\n *\n * This function recursively calculates the next focusable day based on the\n * movement direction and modifiers applied to the days.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDay The currently focused day.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including modifiers and configuration\n * options.\n * @param dateLib The date library to use for date manipulation.\n * @param attempt The current recursion attempt (used to limit recursion depth).\n * @returns The next focusable day, or `undefined` if no focusable day is found.\n */\nexport function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {\n if (attempt > 365) {\n // Limit the recursion to 365 attempts\n return undefined;\n }\n const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);\n const isDisabled = Boolean(props.disabled &&\n dateMatchModifiers(focusableDate, props.disabled, dateLib));\n const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));\n const targetMonth = focusableDate;\n const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);\n if (!isDisabled && !isHidden) {\n return focusDay;\n }\n // Recursively attempt to find the next focusable date\n return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);\n}\n","import { useState } from \"react\";\nimport { calculateFocusTarget } from \"./helpers/calculateFocusTarget.js\";\nimport { getNextFocus } from \"./helpers/getNextFocus.js\";\n/**\n * Manages focus behavior for the DayPicker component, including setting,\n * moving, and blurring focus on calendar days.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param calendar - The calendar object containing the displayed days and\n * months.\n * @param getModifiers - A function to retrieve modifiers for a given day.\n * @param isSelected - A function to check if a date is selected.\n * @param dateLib - The date utility library instance.\n * @returns An object containing focus-related methods and the currently focused\n * day.\n */\nexport function useFocus(props, calendar, getModifiers, isSelected, dateLib) {\n const { autoFocus } = props;\n const [lastFocused, setLastFocused] = useState();\n const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);\n const [focusedDay, setFocused] = useState(autoFocus ? focusTarget : undefined);\n const blur = () => {\n setLastFocused(focusedDay);\n setFocused(undefined);\n };\n const moveFocus = (moveBy, moveDir) => {\n if (!focusedDay)\n return;\n const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);\n if (!nextFocus)\n return;\n if (props.disableNavigation) {\n const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));\n if (!isNextInCalendar) {\n return;\n }\n }\n calendar.goToDay(nextFocus);\n setFocused(nextFocus);\n };\n const isFocusTarget = (day) => {\n return Boolean(focusTarget?.isEqualTo(day));\n };\n const useFocus = {\n isFocusTarget,\n setFocused,\n focused: focusedDay,\n blur,\n moveFocus,\n };\n return useFocus;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage multiple-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected dates, a function to select dates,\n * and a function to check if a date is selected.\n */\nexport function useMulti(props, dateLib) {\n const { selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (date) => {\n return selected?.some((d) => isSameDay(d, date)) ?? false;\n };\n const { min, max } = props;\n const select = (triggerDate, modifiers, e) => {\n let newDates = [...(selected ?? [])];\n if (isSelected(triggerDate)) {\n if (selected?.length === min) {\n // Min value reached, do nothing\n return;\n }\n if (required && selected?.length === 1) {\n // Required value already selected do nothing\n return;\n }\n newDates = selected?.filter((d) => !isSameDay(d, triggerDate));\n }\n else {\n if (selected?.length === max) {\n // Max value reached, reset the selection to date\n newDates = [triggerDate];\n }\n else {\n // Add the date to the selection\n newDates = [...newDates, triggerDate];\n }\n }\n if (!onSelect) {\n setSelected(newDates);\n }\n onSelect?.(newDates, triggerDate, modifiers, e);\n return newDates;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Adds a date to an existing range, considering constraints like minimum and\n * maximum range size.\n *\n * @param date - The date to add to the range.\n * @param initialRange - The initial range to which the date will be added.\n * @param min - The minimum number of days in the range.\n * @param max - The maximum number of days in the range.\n * @param required - Whether the range must always include at least one date.\n * @param dateLib - The date utility library instance.\n * @returns The updated date range, or `undefined` if the range is cleared.\n * @group Utilities\n */\nexport function addToRange(date, initialRange, min = 0, max = 0, required = false, dateLib = defaultDateLib) {\n const { from, to } = initialRange || {};\n const { isSameDay, isAfter, isBefore } = dateLib;\n let range;\n if (!from && !to) {\n // the range is empty, add the date\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (from && !to) {\n // adding date to an incomplete range\n if (isSameDay(from, date)) {\n // adding a date equal to the start of the range\n if (min === 0) {\n range = { from, to: date };\n }\n else if (required) {\n range = { from, to: undefined };\n }\n else {\n range = undefined;\n }\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: from };\n }\n else {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n }\n else if (from && to) {\n // adding date to a complete range\n if (isSameDay(from, date) && isSameDay(to, date)) {\n // adding a date that is equal to both start and end of the range\n if (required) {\n range = { from, to };\n }\n else {\n range = undefined;\n }\n }\n else if (isSameDay(from, date)) {\n // adding a date equal to the the start of the range\n range = { from, to: min > 0 ? undefined : date };\n }\n else if (isSameDay(to, date)) {\n // adding a dare equal to the end of the range\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: to };\n }\n else if (isAfter(date, from)) {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n else if (isAfter(date, to)) {\n // adding a date after the end of the range\n range = { from, to: date };\n }\n else {\n throw new Error(\"Invalid range\");\n }\n }\n // check for min / max\n if (range?.from && range?.to) {\n const diff = dateLib.differenceInCalendarDays(range.to, range.from);\n if (max > 0 && diff > max) {\n range = { from: date, to: undefined };\n }\n else if (min > 1 && diff < min) {\n range = { from: date, to: undefined };\n }\n }\n return range;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Checks if a date range contains one or more specified days of the week.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param dayOfWeek - The day(s) of the week to check for (`0-6`, where `0` is\n * Sunday).\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains the specified day(s) of the week,\n * otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {\n const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n // iterate at maximum one week or the total days if the range is shorter than one week\n const totalDaysLimit = Math.min(totalDays, 6);\n for (let i = 0; i <= totalDaysLimit; i++) {\n if (dayOfWeekArr.includes(date.getDay())) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n return false;\n}\n","import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines if two date ranges overlap.\n *\n * @since 9.2.2\n * @param rangeLeft - The first date range.\n * @param rangeRight - The second date range.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the ranges overlap, otherwise `false`.\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a date range contains dates that match the given modifiers.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param modifiers - The modifiers to match against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains matching dates, otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n // Defer function matchers evaluation as they are the least performant.\n const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n if (typeof matcher === \"boolean\")\n return matcher;\n if (dateLib.isDate(matcher)) {\n return rangeIncludesDate(range, matcher, false, dateLib);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n }\n if (isDateRange(matcher)) {\n if (matcher.from && matcher.to) {\n return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n }\n return false;\n }\n if (isDayOfWeekType(matcher)) {\n return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n }\n if (isDateInterval(matcher)) {\n const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return rangeOverlaps(range, {\n from: dateLib.addDays(matcher.after, 1),\n to: dateLib.addDays(matcher.before, -1),\n }, dateLib);\n }\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n return false;\n });\n if (nonFunctionMatchersResult) {\n return true;\n }\n const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n if (functionMatchers.length) {\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n for (let i = 0; i <= totalDays; i++) {\n if (functionMatchers.some((matcher) => matcher(date))) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n }\n return false;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\nimport { addToRange, rangeContainsModifiers } from \"../utils/index.js\";\nimport { rangeIncludesDate } from \"../utils/rangeIncludesDate.js\";\n/**\n * Hook to manage range selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected range, a function to select a\n * range, and a function to check if a date is within the range.\n */\nexport function useRange(props, dateLib) {\n const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);\n const select = (triggerDate, modifiers, e) => {\n const { min, max } = props;\n const newRange = triggerDate\n ? addToRange(triggerDate, selected, min, max, required, dateLib)\n : undefined;\n if (excludeDisabled && disabled && newRange?.from && newRange.to) {\n if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {\n // if a disabled days is found, the range is reset\n newRange.from = triggerDate;\n newRange.to = undefined;\n }\n }\n if (!onSelect) {\n setSelected(newRange);\n }\n onSelect?.(newRange, triggerDate, modifiers, e);\n return newRange;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage single-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected date, a function to select a date,\n * and a function to check if a date is selected.\n */\nexport function useSingle(props, dateLib) {\n const { selected: initiallySelected, required, onSelect, } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (compareDate) => {\n return selected ? isSameDay(selected, compareDate) : false;\n };\n const select = (triggerDate, modifiers, e) => {\n let newDate = triggerDate;\n if (!required && selected && selected && isSameDay(triggerDate, selected)) {\n // If the date is the same, clear the selection.\n newDate = undefined;\n }\n if (!onSelect) {\n setSelected(newDate);\n }\n if (required) {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n else {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n return newDate;\n };\n return {\n selected,\n select,\n isSelected,\n };\n}\n","import { useMulti } from \"./selection/useMulti.js\";\nimport { useRange } from \"./selection/useRange.js\";\nimport { useSingle } from \"./selection/useSingle.js\";\n/**\n * Determines the appropriate selection hook to use based on the selection mode\n * and returns the corresponding selection object.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns The selection object for the specified mode, or `undefined` if no\n * mode is set.\n */\nexport function useSelection(props, dateLib) {\n const single = useSingle(props, dateLib);\n const multi = useMulti(props, dateLib);\n const range = useRange(props, dateLib);\n switch (props.mode) {\n case \"single\":\n return single;\n case \"multiple\":\n return multi;\n case \"range\":\n return range;\n default:\n return undefined;\n }\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport React, { useCallback, useMemo, useRef } from \"react\";\nimport { DateLib, defaultLocale } from \"./classes/DateLib.js\";\nimport { createGetModifiers } from \"./helpers/createGetModifiers.js\";\nimport { getClassNamesForModifiers } from \"./helpers/getClassNamesForModifiers.js\";\nimport { getComponents } from \"./helpers/getComponents.js\";\nimport { getDataAttributes } from \"./helpers/getDataAttributes.js\";\nimport { getDefaultClassNames } from \"./helpers/getDefaultClassNames.js\";\nimport { getFormatters } from \"./helpers/getFormatters.js\";\nimport { getMonthOptions } from \"./helpers/getMonthOptions.js\";\nimport { getStyleForModifiers } from \"./helpers/getStyleForModifiers.js\";\nimport { getWeekdays } from \"./helpers/getWeekdays.js\";\nimport { getYearOptions } from \"./helpers/getYearOptions.js\";\nimport * as defaultLabels from \"./labels/index.js\";\nimport { DayFlag, SelectionState, UI } from \"./UI.js\";\nimport { useAnimation } from \"./useAnimation.js\";\nimport { useCalendar } from \"./useCalendar.js\";\nimport { dayPickerContext } from \"./useDayPicker.js\";\nimport { useFocus } from \"./useFocus.js\";\nimport { useSelection } from \"./useSelection.js\";\nimport { rangeIncludesDate } from \"./utils/rangeIncludesDate.js\";\nimport { isDateRange } from \"./utils/typeguards.js\";\n/**\n * Renders the DayPicker calendar component.\n *\n * @param initialProps - The props for the DayPicker component.\n * @returns The rendered DayPicker component.\n * @group DayPicker\n * @see https://daypicker.dev\n */\nexport function DayPicker(initialProps) {\n let props = initialProps;\n if (props.timeZone) {\n props = {\n ...initialProps,\n };\n if (props.today) {\n props.today = new TZDate(props.today, props.timeZone);\n }\n if (props.month) {\n props.month = new TZDate(props.month, props.timeZone);\n }\n if (props.defaultMonth) {\n props.defaultMonth = new TZDate(props.defaultMonth, props.timeZone);\n }\n if (props.startMonth) {\n props.startMonth = new TZDate(props.startMonth, props.timeZone);\n }\n if (props.endMonth) {\n props.endMonth = new TZDate(props.endMonth, props.timeZone);\n }\n if (props.mode === \"single\" && props.selected) {\n props.selected = new TZDate(props.selected, props.timeZone);\n }\n else if (props.mode === \"multiple\" && props.selected) {\n props.selected = props.selected?.map((date) => new TZDate(date, props.timeZone));\n }\n else if (props.mode === \"range\" && props.selected) {\n props.selected = {\n from: props.selected.from\n ? new TZDate(props.selected.from, props.timeZone)\n : undefined,\n to: props.selected.to\n ? new TZDate(props.selected.to, props.timeZone)\n : undefined,\n };\n }\n }\n const { components, formatters, labels, dateLib, locale, classNames } = useMemo(() => {\n const locale = { ...defaultLocale, ...props.locale };\n const dateLib = new DateLib({\n locale,\n weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,\n firstWeekContainsDate: props.firstWeekContainsDate,\n useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,\n useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,\n timeZone: props.timeZone,\n numerals: props.numerals,\n }, props.dateLib);\n return {\n dateLib,\n components: getComponents(props.components),\n formatters: getFormatters(props.formatters),\n labels: { ...defaultLabels, ...props.labels },\n locale,\n classNames: { ...getDefaultClassNames(), ...props.classNames },\n };\n }, [\n props.locale,\n props.broadcastCalendar,\n props.weekStartsOn,\n props.firstWeekContainsDate,\n props.useAdditionalWeekYearTokens,\n props.useAdditionalDayOfYearTokens,\n props.timeZone,\n props.numerals,\n props.dateLib,\n props.components,\n props.formatters,\n props.labels,\n props.classNames,\n ]);\n const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles, } = props;\n const { formatCaption, formatDay, formatMonthDropdown, formatWeekNumber, formatWeekNumberHeader, formatWeekdayName, formatYearDropdown, } = formatters;\n const calendar = useCalendar(props, dateLib);\n const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth, } = calendar;\n const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);\n const { isSelected, select, selected: selectedValue, } = useSelection(props, dateLib) ?? {};\n const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);\n const { labelDayButton, labelGridcell, labelGrid, labelMonthDropdown, labelNav, labelPrevious, labelNext, labelWeekday, labelWeekNumber, labelWeekNumberHeader, labelYearDropdown, } = labels;\n const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);\n const isInteractive = mode !== undefined || onDayClick !== undefined;\n const handlePreviousClick = useCallback(() => {\n if (!previousMonth)\n return;\n goToMonth(previousMonth);\n onPrevClick?.(previousMonth);\n }, [previousMonth, goToMonth, onPrevClick]);\n const handleNextClick = useCallback(() => {\n if (!nextMonth)\n return;\n goToMonth(nextMonth);\n onNextClick?.(nextMonth);\n }, [goToMonth, nextMonth, onNextClick]);\n const handleDayClick = useCallback((day, m) => (e) => {\n e.preventDefault();\n e.stopPropagation();\n setFocused(day);\n select?.(day.date, m, e);\n onDayClick?.(day.date, m, e);\n }, [select, onDayClick, setFocused]);\n const handleDayFocus = useCallback((day, m) => (e) => {\n setFocused(day);\n onDayFocus?.(day.date, m, e);\n }, [onDayFocus, setFocused]);\n const handleDayBlur = useCallback((day, m) => (e) => {\n blur();\n onDayBlur?.(day.date, m, e);\n }, [blur, onDayBlur]);\n const handleDayKeyDown = useCallback((day, modifiers) => (e) => {\n const keyMap = {\n ArrowLeft: [\n e.shiftKey ? \"month\" : \"day\",\n props.dir === \"rtl\" ? \"after\" : \"before\",\n ],\n ArrowRight: [\n e.shiftKey ? \"month\" : \"day\",\n props.dir === \"rtl\" ? \"before\" : \"after\",\n ],\n ArrowDown: [e.shiftKey ? \"year\" : \"week\", \"after\"],\n ArrowUp: [e.shiftKey ? \"year\" : \"week\", \"before\"],\n PageUp: [e.shiftKey ? \"year\" : \"month\", \"before\"],\n PageDown: [e.shiftKey ? \"year\" : \"month\", \"after\"],\n Home: [\"startOfWeek\", \"before\"],\n End: [\"endOfWeek\", \"after\"],\n };\n if (keyMap[e.key]) {\n e.preventDefault();\n e.stopPropagation();\n const [moveBy, moveDir] = keyMap[e.key];\n moveFocus(moveBy, moveDir);\n }\n onDayKeyDown?.(day.date, modifiers, e);\n }, [moveFocus, onDayKeyDown, props.dir]);\n const handleDayMouseEnter = useCallback((day, modifiers) => (e) => {\n onDayMouseEnter?.(day.date, modifiers, e);\n }, [onDayMouseEnter]);\n const handleDayMouseLeave = useCallback((day, modifiers) => (e) => {\n onDayMouseLeave?.(day.date, modifiers, e);\n }, [onDayMouseLeave]);\n const handleMonthChange = useCallback((date) => (e) => {\n const selectedMonth = Number(e.target.value);\n const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);\n goToMonth(month);\n }, [dateLib, goToMonth]);\n const handleYearChange = useCallback((date) => (e) => {\n const selectedYear = Number(e.target.value);\n const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);\n goToMonth(month);\n }, [dateLib, goToMonth]);\n const { className, style } = useMemo(() => ({\n className: [classNames[UI.Root], props.className]\n .filter(Boolean)\n .join(\" \"),\n style: { ...styles?.[UI.Root], ...props.style },\n }), [classNames, props.className, props.style, styles]);\n const dataAttributes = getDataAttributes(props);\n const rootElRef = useRef(null);\n useAnimation(rootElRef, Boolean(props.animate), {\n classNames,\n months,\n focused,\n dateLib,\n });\n const contextValue = {\n dayPickerProps: props,\n selected: selectedValue,\n select: select,\n isSelected,\n months,\n nextMonth,\n previousMonth,\n goToMonth,\n getModifiers,\n components,\n classNames,\n styles,\n labels,\n formatters,\n };\n return (React.createElement(dayPickerContext.Provider, { value: contextValue },\n React.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, \"aria-label\": props[\"aria-label\"], \"aria-labelledby\": props[\"aria-labelledby\"], ...dataAttributes },\n React.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },\n !props.hideNavigation && !navLayout && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n months.map((calendarMonth, displayIndex) => {\n return (React.createElement(components.Month, { \"data-animated-month\": props.animate ? \"true\" : undefined, className: classNames[UI.Month], style: styles?.[UI.Month], \n // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation\n key: displayIndex, displayIndex: displayIndex, calendarMonth: calendarMonth },\n navLayout === \"around\" &&\n !props.hideNavigation &&\n displayIndex === 0 && (React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === \"rtl\" ? \"right\" : \"left\" }))),\n React.createElement(components.MonthCaption, { \"data-animated-caption\": props.animate ? \"true\" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith(\"dropdown\") ? (React.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },\n (() => {\n const monthControl = captionLayout === \"dropdown\" ||\n captionLayout === \"dropdown-months\" ? (React.createElement(components.MonthsDropdown, { key: \"month\", className: classNames[UI.MonthsDropdown], \"aria-label\": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"month\" }, formatMonthDropdown(calendarMonth.date, dateLib)));\n const yearControl = captionLayout === \"dropdown\" ||\n captionLayout === \"dropdown-years\" ? (React.createElement(components.YearsDropdown, { key: \"year\", className: classNames[UI.YearsDropdown], \"aria-label\": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"year\" }, formatYearDropdown(calendarMonth.date, dateLib)));\n const controls = dateLib.getMonthYearOrder() === \"year-first\"\n ? [yearControl, monthControl]\n : [monthControl, yearControl];\n return controls;\n })(),\n React.createElement(\"span\", { role: \"status\", \"aria-live\": \"polite\", style: {\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n } }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (\n // biome-ignore lint/a11y/useSemanticElements: breaking change\n React.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: \"status\", \"aria-live\": \"polite\" }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))),\n navLayout === \"around\" &&\n !props.hideNavigation &&\n displayIndex === numberOfMonths - 1 && (React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === \"rtl\" ? \"left\" : \"right\" }))),\n displayIndex === numberOfMonths - 1 &&\n navLayout === \"after\" &&\n !props.hideNavigation && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n React.createElement(components.MonthGrid, { role: \"grid\", \"aria-multiselectable\": mode === \"multiple\" || mode === \"range\", \"aria-label\": labelGrid(calendarMonth.date, dateLib.options, dateLib) ||\n undefined, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },\n !props.hideWeekdays && (React.createElement(components.Weekdays, { \"data-animated-weekdays\": props.animate ? \"true\" : undefined, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },\n showWeekNumber && (React.createElement(components.WeekNumberHeader, { \"aria-label\": labelWeekNumberHeader(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: \"col\" }, formatWeekNumberHeader())),\n weekdays.map((weekday) => (React.createElement(components.Weekday, { \"aria-label\": labelWeekday(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: \"col\" }, formatWeekdayName(weekday, dateLib.options, dateLib)))))),\n React.createElement(components.Weeks, { \"data-animated-weeks\": props.animate ? \"true\" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {\n return (React.createElement(components.Week, { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week: week },\n showWeekNumber && (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.WeekNumber, { week: week, style: styles?.[UI.WeekNumber], \"aria-label\": labelWeekNumber(week.weekNumber, {\n locale,\n }), className: classNames[UI.WeekNumber], scope: \"row\", role: \"rowheader\" }, formatWeekNumber(week.weekNumber, dateLib))),\n week.days.map((day) => {\n const { date } = day;\n const modifiers = getModifiers(day);\n modifiers[DayFlag.focused] =\n !modifiers.hidden &&\n Boolean(focused?.isEqualTo(day));\n modifiers[SelectionState.selected] =\n isSelected?.(date) || modifiers.selected;\n if (isDateRange(selectedValue)) {\n // add range modifiers\n const { from, to } = selectedValue;\n modifiers[SelectionState.range_start] = Boolean(from && to && dateLib.isSameDay(date, from));\n modifiers[SelectionState.range_end] = Boolean(from && to && dateLib.isSameDay(date, to));\n modifiers[SelectionState.range_middle] =\n rangeIncludesDate(selectedValue, date, true, dateLib);\n }\n const style = getStyleForModifiers(modifiers, styles, props.modifiersStyles);\n const className = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);\n const ariaLabel = !isInteractive && !modifiers.hidden\n ? labelGridcell(date, modifiers, dateLib.options, dateLib)\n : undefined;\n return (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.Day, { key: `${dateLib.format(date, \"yyyy-MM-dd\")}_${dateLib.format(day.displayMonth, \"yyyy-MM\")}`, day: day, modifiers: modifiers, className: className.join(\" \"), style: style, role: \"gridcell\", \"aria-selected\": modifiers.selected || undefined, \"aria-label\": ariaLabel, \"data-day\": dateLib.format(date, \"yyyy-MM-dd\"), \"data-month\": day.outside\n ? dateLib.format(date, \"yyyy-MM\")\n : undefined, \"data-selected\": modifiers.selected || undefined, \"data-disabled\": modifiers.disabled || undefined, \"data-hidden\": modifiers.hidden || undefined, \"data-outside\": day.outside || undefined, \"data-focused\": modifiers.focused || undefined, \"data-today\": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: \"button\", day: day, modifiers: modifiers, disabled: modifiers.disabled || undefined, tabIndex: isFocusTarget(day) ? 0 : -1, \"aria-label\": labelDayButton(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay(date, dateLib.options, dateLib))) : (!modifiers.hidden &&\n formatDay(day.date, dateLib.options, dateLib))));\n })));\n })))));\n })),\n props.footer && (\n // biome-ignore lint/a11y/useSemanticElements: react component\n React.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: \"status\", \"aria-live\": \"polite\" }, props.footer)))));\n}\n","\"use client\";\n\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\tcaptionLayout = \"label\",\n\tbuttonVariant = \"ghost\",\n\tformatters,\n\tcomponents,\n\tfromYear,\n\ttoYear,\n\t...props\n}: React.ComponentProps<typeof DayPicker> & {\n\tbuttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n\tconst defaultClassNames = getDefaultClassNames();\n\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tcaptionLayout={captionLayout}\n\t\t\tformatters={{\n\t\t\t\tformatMonthDropdown: (date) => date.toLocaleString(\"default\", { month: \"short\" }),\n\t\t\t\t...formatters,\n\t\t\t}}\n\t\t\tclassNames={{\n\t\t\t\troot: cn(\"w-fit\", defaultClassNames.root),\n\t\t\t\tmonths: cn(\"flex gap-4 flex-row md:flex-row relative\", defaultClassNames.months),\n\t\t\t\tmonth: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n\t\t\t\tnav: cn(\n\t\t\t\t\t\"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n\t\t\t\t\tdefaultClassNames.nav,\n\t\t\t\t),\n\t\t\t\tbutton_previous: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t\"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n\t\t\t\t\tdefaultClassNames.button_previous,\n\t\t\t\t),\n\t\t\t\tbutton_next: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t\"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n\t\t\t\t\tdefaultClassNames.button_next,\n\t\t\t\t),\n\t\t\t\tmonth_caption: cn(\n\t\t\t\t\t\"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n\t\t\t\t\tdefaultClassNames.month_caption,\n\t\t\t\t),\n\t\t\t\tdropdowns: cn(\n\t\t\t\t\t\"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n\t\t\t\t\tdefaultClassNames.dropdowns,\n\t\t\t\t),\n\t\t\t\tdropdown_root: cn(\n\t\t\t\t\t\"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md\",\n\t\t\t\t\tdefaultClassNames.dropdown_root,\n\t\t\t\t),\n\t\t\t\tdropdown: cn(\"absolute bg-popover inset-0 opacity-0\", defaultClassNames.dropdown),\n\t\t\t\tcaption_label: cn(\n\t\t\t\t\t\"select-none font-medium capitalize\",\n\t\t\t\t\tcaptionLayout === \"label\"\n\t\t\t\t\t\t? \"text-sm\"\n\t\t\t\t\t\t: \"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n\t\t\t\t\tdefaultClassNames.caption_label,\n\t\t\t\t),\n\t\t\t\ttable: \"w-full border-collapse\",\n\t\t\t\tweekdays: cn(\"flex\", defaultClassNames.weekdays),\n\t\t\t\tweekday: cn(\n\t\t\t\t\t\"capitalize text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none\",\n\t\t\t\t\tdefaultClassNames.weekday,\n\t\t\t\t),\n\t\t\t\tweek: cn(\"flex w-full mt-2\", defaultClassNames.week),\n\t\t\t\tweek_number_header: cn(\"select-none w-(--cell-size)\", defaultClassNames.week_number_header),\n\t\t\t\tweek_number: cn(\n\t\t\t\t\t\"text-[0.8rem] select-none text-muted-foreground\",\n\t\t\t\t\tdefaultClassNames.week_number,\n\t\t\t\t),\n\t\t\t\tday: cn(\n\t\t\t\t\t\"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none\",\n\t\t\t\t\tdefaultClassNames.day,\n\t\t\t\t),\n\t\t\t\trange_start: cn(\"rounded-l-md bg-accent\", defaultClassNames.range_start),\n\t\t\t\trange_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n\t\t\t\trange_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n\t\t\t\ttoday: cn(\n\t\t\t\t\t\"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none\",\n\t\t\t\t\tdefaultClassNames.today,\n\t\t\t\t),\n\t\t\t\toutside: cn(\n\t\t\t\t\t\"text-muted-foreground aria-selected:text-muted-foreground\",\n\t\t\t\t\tdefaultClassNames.outside,\n\t\t\t\t),\n\t\t\t\tdisabled: cn(\"text-muted-foreground opacity-50\", defaultClassNames.disabled),\n\t\t\t\thidden: cn(\"invisible\", defaultClassNames.hidden),\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tRoot: ({ className, rootRef, ...props }) => {\n\t\t\t\t\treturn <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n\t\t\t\t},\n\t\t\t\tChevron: ({ className, orientation, ...props }) => {\n\t\t\t\t\tif (orientation === \"left\") {\n\t\t\t\t\t\treturn <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (orientation === \"right\") {\n\t\t\t\t\t\treturn <ChevronRightIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />;\n\t\t\t\t},\n\t\t\t\tDayButton: CalendarDayButton,\n\t\t\t\tWeekNumber: ({ children, ...props }) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td {...props}>\n\t\t\t\t\t\t\t<div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t...components,\n\t\t\t}}\n\t\t\tfromYear={fromYear}\n\t\t\ttoYear={toYear}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CalendarDayButton({\n\tclassName,\n\tday,\n\tmodifiers,\n\t...props\n}: React.ComponentProps<typeof DayButton>) {\n\tconst defaultClassNames = getDefaultClassNames();\n\n\tconst ref = React.useRef<HTMLButtonElement>(null);\n\tReact.useEffect(() => {\n\t\tif (modifiers.focused) ref.current?.focus();\n\t}, [modifiers.focused]);\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant=\"ghost\"\n\t\t\tsize=\"icon\"\n\t\t\tdata-day={day.date.toLocaleDateString()}\n\t\t\tdata-selected-single={\n\t\t\t\tmodifiers.selected &&\n\t\t\t\t!modifiers.range_start &&\n\t\t\t\t!modifiers.range_end &&\n\t\t\t\t!modifiers.range_middle\n\t\t\t}\n\t\t\tdata-range-start={modifiers.range_start}\n\t\t\tdata-range-end={modifiers.range_end}\n\t\t\tdata-range-middle={modifiers.range_middle}\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70\",\n\t\t\t\tdefaultClassNames.day,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Calendar, CalendarDayButton };\n"],"names":["addMonths","date","amount","options","_date","toDate","in","isNaN","constructFrom","NaN","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addWeeks","addDays","addYears","max","dates","result","context","forEach","bind","date_","min","isSameDay","laterDate","earlierDate","dateLeft_","dateRight_","normalizeDates","startOfDay","differenceInCalendarMonths","laterDate_","earlierDate_","yearsDiff","monthsDiff","endOfMonth","month","setHours","normalizeInterval","interval","start","end","eachMonthOfInterval","reversed","endTime","setDate","step","push","reverse","startOfMonth","endOfYear","year","eachYearOfInterval","endOfWeek","defaultOptions","getDefaultOptions","weekStartsOn","locale","day","getDay","diff","endOfISOWeek","getDaysInMonth","monthIndex","lastDayOfMonth","getYear","isAfter","dateToCompare","isBefore","isSameMonth","isSameYear","midMonth","Math","setYear","tzName","timeZone","format","Intl","DateTimeFormat","hour","timeZoneName","split","slice","join","offsetFormatCache","offsetCache","tzOffset","offsetStr","calcOffset","captures","match","offsetRe","cacheStr","values","hours","minutes","seconds","TZDateMini","Date","tz","args","length","now","withTimeZone","getTimezoneOffset","offset","floor","ceil","setTime","time","prototype","apply","arguments","syncToInternal","Symbol","for","pop","internal","adjustToSystemTZ","re","Object","getOwnPropertyNames","method","test","utcMethod","replace","startsWith","syncFromInternal","setUTCSeconds","getUTCSeconds","round","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCMilliseconds","baseOffset","prevHour","setUTCHours","systemOffset","prevHourSystemOffset","systemDSTChange","dstShift","getHours","setUTCMinutes","offsetDiff","systemDate","systemSecondsOffset","getSeconds","secondsOffset","postBaseOffset","postOffset","postSystemOffset","postOffsetDiff","offsetChanged","postDiff","newBaseOffset","newOffset","offsetChange","TZDate","toISOString","sign","tzComponents","toString","toDateString","toTimeString","toUTCString","toLocaleString","locales","toLocaleDateString","toLocaleTimeString","String","abs","padStart","FIVE_WEEKS","FOUR_WEEKS","getBroadcastWeeksInMonth","dateLib","firstDayOfMonth","firstDayOfWeek","broadcastStartDate","lastDateOfLastWeek","numberOfWeeks","startOfBroadcastWeek","firstOfMonth","dayOfWeek","endOfBroadcastWeek","startDate","endDate","DateLib","getDigitMap","numerals","formatter","NumberFormat","numberingSystem","digitMap","i","replaceDigits","input","digit","formatNumber","value","getMonthYearOrder","code","yearFirstLocales","has","formatMonthYear","localeCode","intl","formatted","pattern","overrides","today","newDate","differenceInCalendarDays","dateLeft","dateRight","years","uniqueYears","Set","map","d","size","yearsArray","y","formatStr","_options","getISOWeek","getWeek","isDate","_dateLib","startOfISOWeek","startOfWeek","startOfYear","enUS","defaultDateLib","CalendarDay","isEqualTo","displayMonth","outside","Boolean","CalendarMonth","weeks","CalendarWeek","weekNumber","days","Button","props","React","createElement","CaptionLabel","Chevron","orientation","className","width","height","viewBox","points","Day","modifiers","tdProps","DayButton","buttonProps","ref","useRef","useEffect","focused","current","focus","UI","DayFlag","SelectionState","Animation","Dropdown","components","classNames","selectProps","cssClassSelect","selectedOption","find","disabled","DropdownRoot","Select","label","Option","key","DropdownNav","Footer","Month","calendarMonth","displayIndex","divProps","children","MonthCaption","MonthGrid","Months","dayPickerContext","createContext","undefined","useDayPicker","useContext","Error","MonthsDropdown","Nav","onPreviousClick","onNextClick","previousMonth","nextMonth","navProps","labels","labelPrevious","labelNext","handleNextClick","useCallback","e","handlePreviousClick","PreviousMonthButton","type","tabIndex","onClick","NextMonthButton","Root","rootRef","rest","Week","week","trProps","Weekday","Weekdays","WeekNumber","thProps","WeekNumberHeader","Weeks","YearsDropdown","rangeIncludesDate","range","excludeEnds","from","to","isRangeInverted","isInRange","isDateInterval","matcher","isDateRange","isDateAfterType","isDateBeforeType","isDayOfWeekType","isDatesArray","Array","isArray","every","dateMatchModifiers","matchers","matchersArr","some","includes","diffBefore","before","diffAfter","after","isDayBefore","isDayAfter","isClosedInterval","createGetModifiers","navStart","navEnd","hidden","showOutsideDays","broadcastCalendar","computedNavStart","computedNavEnd","internalModifiersMap","customModifiersMap","isOutside","isBeforeNavStart","isAfterNavEnd","isDisabled","isHidden","isToday","keys","name","modifierValue","isMatch","dayFlags","customModifiers","getClassNamesForModifiers","modifiersClassNames","modifierClassNames","entries","filter","active","reduce","previousValue","getComponents","customComponents","getDataAttributes","dataAttributes","mode","required","numberOfMonths","showWeekNumber","navLayout","val","getDefaultClassNames","formatCaption","lib","formatMonthCaption","formatDay","formatMonthDropdown","formatWeekdayName","weekday","formatWeekNumber","formatWeekNumberHeader","formatYearDropdown","formatYearCaption","getFormatters","customFormatters","defaultFormatters","getMonthOptions","formatters","months","getStyleForModifiers","dayModifiers","styles","modifiersStyles","style","modifier","getWeekdays","ISOWeek","getYearOptions","firstNavYear","lastNavYear","labelDayButton","selected","labelDay","labelGrid","labelCaption","labelGridcell","labelMonthDropdown","labelNav","_month","labelWeekday","labelWeekNumber","labelWeekNumberHeader","labelYearDropdown","asHtmlElement","element","HTMLElement","queryMonthEls","querySelectorAll","queryMonthEl","querySelector","queryCaptionEl","queryWeeksEl","queryNavEl","queryWeekdaysEl","useAnimation","rootElRef","enabled","previousRootElSnapshotRef","previousMonthsRef","animatingRef","useLayoutEffect","previousMonths","isAfterPreviousMonth","captionAnimationClass","caption_after_enter","caption_before_enter","weeksAnimationClass","weeks_after_enter","weeks_before_enter","previousRootElSnapshot","rootElSnapshot","cloneNode","currentMonthElsSnapshot","currentMonthElSnapshot","previousMonthElSnapshot","contains","removeChild","captionEl","classList","remove","weeksEl","previousMonthEls","currentMonthEls","el","isolation","navEl","zIndex","currentMonthEl","index","previousMonthEl","position","overflow","add","cleanUp","pointerEvents","setAttribute","previousWeekdaysEl","opacity","previousCaptionEl","caption_before_exit","caption_after_exit","addEventListener","previousWeeksEl","weeks_before_exit","weeks_after_exit","insertBefore","firstChild","getDates","displayMonths","maxDate","firstMonth","lastMonth","fixedWeeks","startWeekFirstDate","endWeekLastDate","nOfDays","nOfMonths","nrOfDaysWithFixedWeeks","extraDates","daysToAdd","getDays","calendarMonths","initialDays","weekDays","concat","getDisplayMonths","firstDisplayedMonth","calendarEndMonth","getInitialMonth","defaultMonth","initialMonth","getMonths","dayPickerMonths","firstDateOfFirstWeek","monthDates","dayPickerMonth","reverseMonths","getNavMonths","startMonth","endMonth","fromYear","toYear","fromMonth","toMonth","hasYearDropdown","captionLayout","getNextMonth","disableNavigation","pagedNavigation","getPreviousMonth","calendarStartMonth","getWeeks","initialWeeks","useControlledValue","defaultValue","controlledValue","uncontrolledValue","setValue","useState","useCalendar","setFirstMonth","newInitialMonth","onMonthChange","isDayInCalendar","goToMonth","newMonth","goToDay","calendar","FocusTargetPriority","isFocusableDay","calculateFocusTarget","getModifiers","isSelected","lastFocused","focusTarget","foundFocusTargetPriority","FocusedModifier","LastFocused","Selected","Today","getFocusableDate","moveBy","moveDir","refDate","moveFns","focusableDate","getNextFocus","refDay","attempt","targetMonth","focusDay","useFocus","autoFocus","setLastFocused","focusedDay","setFocused","blur","moveFocus","nextFocus","isNextInCalendar","isFocusTarget","useMulti","initiallySelected","onSelect","internallySelected","setSelected","select","triggerDate","newDates","addToRange","initialRange","rangeContainsDayOfWeek","dayOfWeekArr","totalDays","totalDaysLimit","rangeOverlaps","rangeLeft","rangeRight","rangeContainsModifiers","nonFunctionMatchers","nonFunctionMatchersResult","functionMatchers","useRange","excludeDisabled","newRange","useSingle","compareDate","useSelection","single","multi","DayPicker","initialProps","useMemo","defaultLocale","firstWeekContainsDate","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","defaultLabels","onDayBlur","onDayClick","onDayFocus","onDayKeyDown","onDayMouseEnter","onDayMouseLeave","onPrevClick","selectedValue","weekdays","isInteractive","handleDayClick","m","preventDefault","stopPropagation","handleDayFocus","handleDayBlur","handleDayKeyDown","keyMap","ArrowLeft","shiftKey","dir","ArrowRight","ArrowDown","ArrowUp","PageUp","PageDown","Home","End","handleDayMouseEnter","handleDayMouseLeave","handleMonthChange","selectedMonth","Number","target","handleYearChange","selectedYear","animate","contextValue","dayPickerProps","Provider","id","lang","nonce","title","role","hideNavigation","Dropdowns","monthControl","onChange","yearControl","reverseYears","controls","border","clip","margin","padding","whiteSpace","wordWrap","hideWeekdays","scope","range_start","range_end","range_middle","ariaLabel","onBlur","onFocus","onKeyDown","onMouseEnter","onMouseLeave","footer","Calendar","buttonVariant","defaultClassNames","cn","raw","root","nav","button_previous","buttonVariants","variant","button_next","month_caption","dropdowns","dropdown_root","dropdown","caption_label","table","week_number_header","week_number","div","data-slot","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","td","data-day","data-selected-single","data-range-start","data-range-end","data-range-middle"],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BC,IACM,SAASA,SAAAA,CAAUC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAA;IAC7C,MAAMC,KAAAA,GAAQC,MAAAA,CAAOJ,IAAAA,EAAME,OAAAA,EAASG,EAAAA,CAAAA;AACpC,IAAA,IAAIC,MAAML,MAAAA,CAAAA,EAAS,OAAOM,aAAAA,CAA6BP,IAAAA,EAAMQ,GAAAA,CAAAA;AAC7D,IAAA,IAAI,CAACP,MAAAA,EAAQ;;QAEX,OAAOE,KAAAA;AACT,IAAA;IACA,MAAMM,UAAAA,GAAaN,MAAMO,OAAO,EAAA;;;;;;;;;AAUhC,IAAA,MAAMC,oBAAoBJ,aAAAA,CAA6BP,IAAAA,EAAMG,MAAMS,OAAO,EAAA,CAAA;AAC1ED,IAAAA,iBAAAA,CAAkBE,QAAQ,CAACV,KAAAA,CAAMW,QAAQ,EAAA,GAAKb,SAAS,CAAA,EAAG,CAAA,CAAA;IAC1D,MAAMc,WAAAA,GAAcJ,kBAAkBD,OAAO,EAAA;AAC7C,IAAA,IAAID,cAAcM,WAAAA,EAAa;;;QAG7B,OAAOJ,iBAAAA;IACT,CAAA,MA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EAAAA;QACAiB,GAAAA,EAAKA,GAAAA;QACLwc,OAAAA,EAAQ,OAAA;QACRjf,IAAAA,EAAK,MAAA;QACLkgB,UAAAA,EAAUxqB,GAAAA,CAAIhE,IAAI,CAACiL,kBAAkB,EAAA;AACrCwjB,QAAAA,sBAAAA,EACC9d,SAAAA,CAAU8K,QAAQ,IAClB,CAAC9K,SAAAA,CAAUyb,WAAW,IACtB,CAACzb,SAAAA,CAAU0b,SAAS,IACpB,CAAC1b,UAAU2b,YAAY;AAExBoC,QAAAA,kBAAAA,EAAkB/d,UAAUyb,WAAW;AACvCuC,QAAAA,gBAAAA,EAAgBhe,UAAU0b,SAAS;AACnCuC,QAAAA,mBAAAA,EAAmBje,UAAU2b,YAAY;AACzCjc,QAAAA,SAAAA,EAAW4c,EAAAA,CACV,ovBAAA,EACAD,iBAAAA,CAAkBhpB,GAAG,EACrBqM,SAAAA,CAAAA;AAEA,QAAA,GAAGN;;AAGP;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]}