@getflip/swirl-components-react 0.10.0 → 0.12.0

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 (270) hide show
  1. package/dist/{_commonjsHelpers-44457d8d.ba94af77.js → _commonjsHelpers-10467d11.b7d83301.js} +0 -0
  2. package/dist/balancetext-31f1ec68.bd1c1b2d.js +189 -0
  3. package/dist/file-manager.entry.7a321755.js +58 -0
  4. package/dist/{floating-ui.dom.esm-1a4e8b8a.87557233.js → floating-ui.dom.esm-b9f28f6d.15013ef7.js} +0 -0
  5. package/dist/{index-6d2e18c6.289636d4.js → index-47862d62.75c2fcf1.js} +1 -1
  6. package/dist/index.149af511.js +1394 -0
  7. package/dist/stencil-generated/index.d.ts +169 -157
  8. package/dist/swirl-action-list-item.entry.6548a6f0.js +34 -0
  9. package/dist/swirl-action-list-section.entry.e12fe159.js +15 -0
  10. package/dist/{flip-action-list.entry.7bdcff2f.js → swirl-action-list.entry.21644ba6.js} +3 -3
  11. package/dist/{flip-app-layout_5.entry.6e395cd4.js → swirl-app-layout_5.entry.9703e919.js} +28 -24
  12. package/dist/swirl-autocomplete.entry.4bad6cbf.js +70 -0
  13. package/dist/swirl-avatar-group.entry.d41bfa97.js +29 -0
  14. package/dist/{flip-avatar.entry.f5cb1fd9.js → swirl-avatar.entry.c81909ad.js} +8 -8
  15. package/dist/swirl-badge.entry.7bd8bbda.js +20 -0
  16. package/dist/swirl-banner.entry.ef0143b1.js +49 -0
  17. package/dist/swirl-button-group.entry.60578a80.js +20 -0
  18. package/dist/swirl-button.entry.167120c6.js +52 -0
  19. package/dist/{flip-card.entry.66635d0b.js → swirl-card.entry.47b41ce9.js} +4 -4
  20. package/dist/swirl-checkbox.entry.37c16abe.js +30 -0
  21. package/dist/{flip-chip.entry.2d504566.js → swirl-chip.entry.89c2c730.js} +23 -15
  22. package/dist/swirl-components-react.js +171 -159
  23. package/dist/swirl-components-react.umd.cjs +76 -46
  24. package/dist/{flip-console-layout.entry.0b474308.js → swirl-console-layout.entry.61b9ad81.js} +22 -22
  25. package/dist/{flip-date-input.entry.462f9e2d.js → swirl-date-input.entry.f0f6d6ee.js} +633 -623
  26. package/dist/swirl-date-picker_2.entry.91531b84.js +37 -0
  27. package/dist/{flip-description-list-item.entry.2ea98099.js → swirl-description-list-item.entry.99c83045.js} +18 -3
  28. package/dist/{flip-description-list.entry.c08605e6.js → swirl-description-list.entry.724f88d9.js} +5 -5
  29. package/dist/swirl-dialog.entry.b50cfdb2.js +45 -0
  30. package/dist/swirl-file-uploader.entry.f8afd2d4.js +32 -0
  31. package/dist/{flip-file-viewer_7.entry.8d39ace2.js → swirl-file-viewer_7.entry.8973a210.js} +20 -20
  32. package/dist/swirl-form-control.entry.bc87b691.js +70 -0
  33. package/dist/swirl-form-group.entry.674e8b3f.js +18 -0
  34. package/dist/swirl-heading.entry.8e9ded19.js +28 -0
  35. package/dist/swirl-icon-add-photo.entry.5a20015c.js +18 -0
  36. package/dist/swirl-icon-add_4.entry.0844d9ca.js +51 -0
  37. package/dist/swirl-icon-admin-panel-settings.entry.8f932fe7.js +18 -0
  38. package/dist/swirl-icon-arrow-back.entry.c9c0cd69.js +18 -0
  39. package/dist/swirl-icon-arrow-downward_2.entry.03e4f1bc.js +29 -0
  40. package/dist/swirl-icon-arrow-forward.entry.965aa3ee.js +18 -0
  41. package/dist/swirl-icon-arrow-left_3.entry.5cddfb42.js +40 -0
  42. package/dist/swirl-icon-arrow-right-small.entry.53b648b8.js +18 -0
  43. package/dist/swirl-icon-attachment.entry.302569e9.js +18 -0
  44. package/dist/swirl-icon-block.entry.79c5f2b2.js +18 -0
  45. package/dist/swirl-icon-cancel_4.entry.31c7f7d7.js +51 -0
  46. package/dist/swirl-icon-chat-bubble.entry.ac1cbfcd.js +18 -0
  47. package/dist/swirl-icon-chats-filled.entry.18c0e11a.js +18 -0
  48. package/dist/swirl-icon-chats-outlined.entry.af240396.js +18 -0
  49. package/dist/swirl-icon-check-circle.entry.4c0304e9.js +18 -0
  50. package/dist/swirl-icon-check-small_4.entry.c7292189.js +1468 -0
  51. package/dist/swirl-icon-check-strong.entry.0e1ebe49.js +18 -0
  52. package/dist/swirl-icon-check.entry.bb609d4c.js +18 -0
  53. package/dist/swirl-icon-chevron-left.entry.0faf5ceb.js +18 -0
  54. package/dist/swirl-icon-chevron-right.entry.9b9edbac.js +18 -0
  55. package/dist/swirl-icon-close-small.entry.47516cb5.js +18 -0
  56. package/dist/swirl-icon-close.entry.f20dd2d1.js +18 -0
  57. package/dist/swirl-icon-cloud-upload.entry.5307cd46.js +18 -0
  58. package/dist/swirl-icon-column.entry.fb461b40.js +18 -0
  59. package/dist/swirl-icon-comment.entry.7bfbd903.js +18 -0
  60. package/dist/swirl-icon-copy.entry.4c17082a.js +18 -0
  61. package/dist/swirl-icon-date-range.entry.c8ce6402.js +18 -0
  62. package/dist/swirl-icon-delete.entry.6d3a6a54.js +18 -0
  63. package/dist/swirl-icon-description.entry.060d019c.js +18 -0
  64. package/dist/swirl-icon-edit.entry.329a25ea.js +18 -0
  65. package/dist/swirl-icon-emoji-mood.entry.3fbee1e1.js +18 -0
  66. package/dist/swirl-icon-emoji-satisfied.entry.9fc1863d.js +18 -0
  67. package/dist/swirl-icon-error_3.entry.8209c557.js +58 -0
  68. package/dist/swirl-icon-expand-more.entry.b2e0a30c.js +18 -0
  69. package/dist/swirl-icon-file.entry.c0e82b43.js +18 -0
  70. package/dist/swirl-icon-filter.entry.e26fa57c.js +18 -0
  71. package/dist/swirl-icon-folder-shared.entry.0169b375.js +18 -0
  72. package/dist/swirl-icon-group-assign.entry.70e80a6e.js +18 -0
  73. package/dist/swirl-icon-groups-custom.entry.d16f5fb9.js +18 -0
  74. package/dist/swirl-icon-groups-filled.entry.6cccc3d3.js +18 -0
  75. package/dist/swirl-icon-groups-outlined.entry.2bf03f93.js +18 -0
  76. package/dist/swirl-icon-groups.entry.cbc420c1.js +18 -0
  77. package/dist/swirl-icon-help.entry.bca2c9e9.js +18 -0
  78. package/dist/swirl-icon-image.entry.67457d50.js +18 -0
  79. package/dist/swirl-icon-info.entry.0ee58aeb.js +18 -0
  80. package/dist/swirl-icon-inventory.entry.1548c8b5.js +18 -0
  81. package/dist/swirl-icon-like.entry.e9d549b8.js +18 -0
  82. package/dist/swirl-icon-link.entry.c442143c.js +18 -0
  83. package/dist/swirl-icon-lock.entry.d84f882b.js +18 -0
  84. package/dist/swirl-icon-logout.entry.7a6a96d3.js +18 -0
  85. package/dist/swirl-icon-mail.entry.a7b7df7b.js +18 -0
  86. package/dist/swirl-icon-manage-accounts.entry.fe2691fc.js +18 -0
  87. package/dist/swirl-icon-mention.entry.c0368650.js +18 -0
  88. package/dist/swirl-icon-menu-filled.entry.06cced02.js +18 -0
  89. package/dist/swirl-icon-menu-outlined.entry.89dca403.js +18 -0
  90. package/dist/swirl-icon-menu.entry.ff253f8f.js +18 -0
  91. package/dist/swirl-icon-message.entry.b7d9f581.js +18 -0
  92. package/dist/swirl-icon-more-horizontal.entry.407e51c1.js +18 -0
  93. package/dist/swirl-icon-more-vertikal.entry.718f85e0.js +18 -0
  94. package/dist/swirl-icon-news-filled.entry.5134e640.js +18 -0
  95. package/dist/swirl-icon-news-outlined.entry.9c0931c4.js +18 -0
  96. package/dist/swirl-icon-notifications-active.entry.c47bbb94.js +18 -0
  97. package/dist/swirl-icon-notifications-off.entry.d5933059.js +18 -0
  98. package/dist/swirl-icon-notifications.entry.b945b795.js +18 -0
  99. package/dist/swirl-icon-open-in-new.entry.98a7ed82.js +18 -0
  100. package/dist/swirl-icon-people-alt.entry.646cfc3d.js +18 -0
  101. package/dist/swirl-icon-person-off.entry.f5db1b83.js +18 -0
  102. package/dist/swirl-icon-person.entry.4b5b54cb.js +18 -0
  103. package/dist/swirl-icon-phone.entry.f6c4012a.js +18 -0
  104. package/dist/swirl-icon-poll.entry.9ee6b1d2.js +18 -0
  105. package/dist/swirl-icon-print.entry.37f08abb.js +18 -0
  106. package/dist/swirl-icon-recieved.entry.f79a1343.js +18 -0
  107. package/dist/swirl-icon-search-strong.entry.6752b238.js +18 -0
  108. package/dist/swirl-icon-search.entry.d152e72f.js +18 -0
  109. package/dist/swirl-icon-send.entry.cafcc526.js +18 -0
  110. package/dist/swirl-icon-settings.entry.cdd23f77.js +18 -0
  111. package/dist/swirl-icon-sync.entry.37eed48f.js +18 -0
  112. package/dist/swirl-icon-tasks-filled.entry.629446b0.js +18 -0
  113. package/dist/swirl-icon-tasks-outlined.entry.21e25bc3.js +18 -0
  114. package/dist/swirl-icon-time-filled.entry.67ee5a24.js +18 -0
  115. package/dist/swirl-icon-time-outlined.entry.d0eb5d19.js +18 -0
  116. package/dist/swirl-icon-user-assign.entry.8a6b68ea.js +18 -0
  117. package/dist/swirl-icon-video-camera.entry.85101910.js +18 -0
  118. package/dist/swirl-icon-warning.entry.330bf12a.js +18 -0
  119. package/dist/{flip-lightbox.entry.e6ea2310.js → swirl-lightbox.entry.7a2191eb.js} +13 -13
  120. package/dist/swirl-link.entry.81bd6e0f.js +15 -0
  121. package/dist/swirl-list.entry.ca7b2daf.js +18 -0
  122. package/dist/swirl-modal.entry.97df470f.js +63 -0
  123. package/dist/swirl-option-list-section.entry.b3b30b8f.js +15 -0
  124. package/dist/swirl-pagination.entry.0bbbf034.js +27 -0
  125. package/dist/{flip-pdf-reader.entry.4cdb28da.js → swirl-pdf-reader.entry.064e66a5.js} +8 -8
  126. package/dist/{flip-popover.entry.4a45218b.js → swirl-popover.entry.1e51f870.js} +10 -10
  127. package/dist/{flip-progress-indicator.entry.fc0e5979.js → swirl-progress-indicator.entry.46470fa4.js} +4 -4
  128. package/dist/swirl-radio-group.entry.f931de9f.js +35 -0
  129. package/dist/swirl-radio.entry.5ccbc5fa.js +29 -0
  130. package/dist/swirl-resource-list-file-item.entry.66329d69.js +37 -0
  131. package/dist/swirl-search.entry.364d373f.js +48 -0
  132. package/dist/swirl-select.entry.95b1f5bc.js +49 -0
  133. package/dist/swirl-separator.entry.7c230cd1.js +15 -0
  134. package/dist/{flip-stack.entry.a5b14f3a.js → swirl-stack.entry.cb1d54ae.js} +4 -4
  135. package/dist/swirl-switch.entry.895cfbbd.js +56 -0
  136. package/dist/swirl-tab.entry.b870a20f.js +18 -0
  137. package/dist/swirl-table-cell.entry.0d4a9b8f.js +15 -0
  138. package/dist/swirl-table-column.entry.b1f05cb5.js +23 -0
  139. package/dist/swirl-table-row-group.entry.85368b7a.js +19 -0
  140. package/dist/swirl-table-row.entry.39f31a4b.js +20 -0
  141. package/dist/swirl-table.entry.cd3a7dde.js +141 -0
  142. package/dist/{flip-tabs.entry.d3d9f791.js → swirl-tabs.entry.6dbf6d57.js} +8 -8
  143. package/dist/swirl-tag.entry.b0d8059b.js +21 -0
  144. package/dist/swirl-text-input.entry.86bbfa05.js +75 -0
  145. package/dist/swirl-text.entry.53142b33.js +31 -0
  146. package/dist/{flip-theme-provider.entry.2b2c55b9.js → swirl-theme-provider.entry.9cc36512.js} +18 -18
  147. package/dist/swirl-thumbnail.entry.bd0a5c89.js +18 -0
  148. package/dist/{flip-toast-provider.entry.729fe2a2.js → swirl-toast-provider.entry.7747ba81.js} +3 -3
  149. package/dist/swirl-toast.entry.ea517c98.js +52 -0
  150. package/dist/{flip-tooltip.entry.8392ec7f.js → swirl-tooltip.entry.71acfc7d.js} +8 -8
  151. package/dist/{flip-tree-navigation-item.entry.62f7ab3c.js → swirl-tree-navigation-item.entry.59540e7e.js} +4 -4
  152. package/dist/{flip-video-thumbnail.entry.edc7cce0.js → swirl-video-thumbnail.entry.4546c208.js} +3 -3
  153. package/dist/{flip-visually-hidden.entry.69776f72.js → swirl-visually-hidden.entry.bbc8b32d.js} +4 -4
  154. package/dist/utils-33d31b58.1488fcfe.js +46 -0
  155. package/dist/wc-datepicker.entry.d105e9ee.js +269 -0
  156. package/package.json +2 -2
  157. package/dist/file-manager.entry.8bb8e04c.js +0 -58
  158. package/dist/flip-action-list-item.entry.56f1f1ef.js +0 -18
  159. package/dist/flip-action-list-section.entry.a99c7d3e.js +0 -15
  160. package/dist/flip-autocomplete.entry.309d4ae7.js +0 -70
  161. package/dist/flip-avatar-group.entry.4192d45c.js +0 -29
  162. package/dist/flip-badge.entry.9de15857.js +0 -20
  163. package/dist/flip-banner.entry.703f5f14.js +0 -33
  164. package/dist/flip-button-group.entry.19eb382b.js +0 -20
  165. package/dist/flip-button.entry.a046c9ec.js +0 -41
  166. package/dist/flip-checkbox.entry.f73ba3b1.js +0 -30
  167. package/dist/flip-date-picker_2.entry.cbbcb306.js +0 -1186
  168. package/dist/flip-dialog.entry.97e79b3a.js +0 -45
  169. package/dist/flip-file-uploader.entry.2b504539.js +0 -32
  170. package/dist/flip-form-control.entry.1b840330.js +0 -65
  171. package/dist/flip-form-group.entry.8b6006f5.js +0 -18
  172. package/dist/flip-heading_2.entry.603511e8.js +0 -29
  173. package/dist/flip-icon-add-photo.entry.f336c2f0.js +0 -15
  174. package/dist/flip-icon-add_4.entry.99b75edc.js +0 -45
  175. package/dist/flip-icon-admin-panel-settings.entry.de10ebf5.js +0 -15
  176. package/dist/flip-icon-arrow-back.entry.b8865555.js +0 -15
  177. package/dist/flip-icon-arrow-forward.entry.b2ef6fc1.js +0 -15
  178. package/dist/flip-icon-arrow-left_3.entry.7a79a065.js +0 -35
  179. package/dist/flip-icon-arrow-right-small.entry.ae64706f.js +0 -15
  180. package/dist/flip-icon-attachment.entry.081189f0.js +0 -15
  181. package/dist/flip-icon-block.entry.6d9c5dfc.js +0 -15
  182. package/dist/flip-icon-cancel_4.entry.d2cb75c3.js +0 -45
  183. package/dist/flip-icon-chat-bubble.entry.67f98ff5.js +0 -15
  184. package/dist/flip-icon-chats-filled.entry.06584eb3.js +0 -15
  185. package/dist/flip-icon-chats-outlined.entry.dc6dbf4b.js +0 -15
  186. package/dist/flip-icon-check-circle.entry.29fe9a35.js +0 -15
  187. package/dist/flip-icon-check-small_3.entry.8070cb06.js +0 -143
  188. package/dist/flip-icon-check-strong.entry.fba6e55f.js +0 -15
  189. package/dist/flip-icon-check.entry.86260e1c.js +0 -15
  190. package/dist/flip-icon-chevron-left.entry.e4c7857a.js +0 -15
  191. package/dist/flip-icon-chevron-right.entry.1db14308.js +0 -15
  192. package/dist/flip-icon-close-small.entry.cbd4fc49.js +0 -15
  193. package/dist/flip-icon-close.entry.48763036.js +0 -15
  194. package/dist/flip-icon-cloud-upload.entry.98e40ba8.js +0 -15
  195. package/dist/flip-icon-comment.entry.6a6d8fbc.js +0 -15
  196. package/dist/flip-icon-copy.entry.53b11b1a.js +0 -15
  197. package/dist/flip-icon-date-range.entry.84d14dff.js +0 -15
  198. package/dist/flip-icon-delete.entry.a9b6ab40.js +0 -15
  199. package/dist/flip-icon-description.entry.6aefa229.js +0 -15
  200. package/dist/flip-icon-edit.entry.81a6837c.js +0 -15
  201. package/dist/flip-icon-emoji-mood.entry.b1766a9a.js +0 -15
  202. package/dist/flip-icon-emoji-satisfied.entry.89712163.js +0 -15
  203. package/dist/flip-icon-error_3.entry.d6a422a6.js +0 -39
  204. package/dist/flip-icon-expand-more.entry.63f210f6.js +0 -15
  205. package/dist/flip-icon-file.entry.625b53c4.js +0 -15
  206. package/dist/flip-icon-folder-shared.entry.2128dab9.js +0 -15
  207. package/dist/flip-icon-group-assign.entry.4860e5f5.js +0 -15
  208. package/dist/flip-icon-groups-custom.entry.ae87389c.js +0 -15
  209. package/dist/flip-icon-groups-filled.entry.251c942d.js +0 -15
  210. package/dist/flip-icon-groups-outlined.entry.43844b1d.js +0 -15
  211. package/dist/flip-icon-groups.entry.b4f9a7f7.js +0 -15
  212. package/dist/flip-icon-help.entry.1146bb20.js +0 -15
  213. package/dist/flip-icon-image.entry.0e41e08d.js +0 -15
  214. package/dist/flip-icon-info.entry.605cfdf6.js +0 -15
  215. package/dist/flip-icon-inventory.entry.166bc115.js +0 -15
  216. package/dist/flip-icon-like.entry.cae24842.js +0 -15
  217. package/dist/flip-icon-link.entry.22976afa.js +0 -15
  218. package/dist/flip-icon-lock.entry.566db977.js +0 -15
  219. package/dist/flip-icon-logout.entry.79ae2f2c.js +0 -15
  220. package/dist/flip-icon-mail.entry.3846875a.js +0 -15
  221. package/dist/flip-icon-manage-accounts.entry.b7dff46e.js +0 -15
  222. package/dist/flip-icon-mention.entry.8cae7e24.js +0 -15
  223. package/dist/flip-icon-menu-filled.entry.de447ac4.js +0 -15
  224. package/dist/flip-icon-menu-outlined.entry.3fb10f79.js +0 -15
  225. package/dist/flip-icon-menu.entry.cd1f33c3.js +0 -15
  226. package/dist/flip-icon-message.entry.b6422ee9.js +0 -15
  227. package/dist/flip-icon-more-horizontal.entry.57fdb45f.js +0 -15
  228. package/dist/flip-icon-more-vertikal.entry.60e8e3db.js +0 -15
  229. package/dist/flip-icon-news-filled.entry.9e2ae1ac.js +0 -15
  230. package/dist/flip-icon-news-outlined.entry.27fe1a80.js +0 -15
  231. package/dist/flip-icon-notifications-active.entry.ad17e8e4.js +0 -15
  232. package/dist/flip-icon-notifications-off.entry.669ff414.js +0 -15
  233. package/dist/flip-icon-notifications.entry.c533a876.js +0 -15
  234. package/dist/flip-icon-open-in-new.entry.f020da7b.js +0 -15
  235. package/dist/flip-icon-people-alt.entry.23a07d8d.js +0 -15
  236. package/dist/flip-icon-person-off.entry.b9487422.js +0 -15
  237. package/dist/flip-icon-person.entry.2b1ece6a.js +0 -15
  238. package/dist/flip-icon-phone.entry.d878e225.js +0 -15
  239. package/dist/flip-icon-poll.entry.9f9d3097.js +0 -15
  240. package/dist/flip-icon-print.entry.3c6ba219.js +0 -15
  241. package/dist/flip-icon-recieved.entry.0e863e26.js +0 -15
  242. package/dist/flip-icon-search-strong.entry.9e14089f.js +0 -15
  243. package/dist/flip-icon-search.entry.8e785c5b.js +0 -15
  244. package/dist/flip-icon-send.entry.2b9ec517.js +0 -15
  245. package/dist/flip-icon-settings.entry.1c1c82ba.js +0 -15
  246. package/dist/flip-icon-tasks-filled.entry.6b345bdf.js +0 -15
  247. package/dist/flip-icon-tasks-outlined.entry.75282f32.js +0 -15
  248. package/dist/flip-icon-time-filled.entry.4b2e3be8.js +0 -15
  249. package/dist/flip-icon-time-outlined.entry.1ce39655.js +0 -15
  250. package/dist/flip-icon-user-assign.entry.8fd4da9a.js +0 -15
  251. package/dist/flip-icon-video-camera.entry.7f1b8790.js +0 -15
  252. package/dist/flip-icon-warning.entry.a73148c4.js +0 -15
  253. package/dist/flip-link.entry.5daf5ffe.js +0 -15
  254. package/dist/flip-list.entry.25e0a5e8.js +0 -18
  255. package/dist/flip-modal.entry.f14cc170.js +0 -63
  256. package/dist/flip-option-list-section.entry.d1b4d66a.js +0 -15
  257. package/dist/flip-pagination.entry.e6de7b67.js +0 -27
  258. package/dist/flip-radio-group.entry.081a6b27.js +0 -35
  259. package/dist/flip-radio.entry.fd8faaa3.js +0 -29
  260. package/dist/flip-resource-list-file-item.entry.d15b84be.js +0 -20
  261. package/dist/flip-search.entry.638f3769.js +0 -31
  262. package/dist/flip-select.entry.5c709269.js +0 -48
  263. package/dist/flip-switch.entry.f812357e.js +0 -56
  264. package/dist/flip-tab.entry.83bf882c.js +0 -18
  265. package/dist/flip-tag.entry.8b80d408.js +0 -21
  266. package/dist/flip-text-input.entry.d1b0bb71.js +0 -60
  267. package/dist/flip-thumbnail.entry.4148adbc.js +0 -18
  268. package/dist/flip-toast.entry.7c89a88e.js +0 -39
  269. package/dist/index.6f8c9509.js +0 -1382
  270. package/dist/utils-39b2afe8.37b54ba4.js +0 -40
@@ -1,1186 +0,0 @@
1
- import { r as le, c as we, h as x, H as be, F as te } from "./index.6f8c9509.js";
2
- import { c as de, a as Ce, g as ke } from "./_commonjsHelpers-44457d8d.ba94af77.js";
3
- import "react";
4
- import "react-dom";
5
- var _e = de(function(D, b) {
6
- (function(F, W) {
7
- D.exports = W();
8
- })(Ce, function() {
9
- return function() {
10
- var F = { d: function(r, e) {
11
- for (var t in e)
12
- F.o(e, t) && !F.o(r, t) && Object.defineProperty(r, t, { enumerable: !0, get: e[t] });
13
- }, o: function(r, e) {
14
- return Object.prototype.hasOwnProperty.call(r, e);
15
- } }, W = {};
16
- F.d(W, { default: function() {
17
- return H;
18
- } });
19
- var l = { days: "days", months: "months", years: "years", day: "day", month: "month", year: "year", eventChangeViewDate: "changeViewDate", eventChangeCurrentView: "changeCurrentView", eventChangeFocusDate: "changeFocusDate", eventChangeSelectedDate: "changeSelectedDate", eventChangeTime: "changeTime", eventChangeLastSelectedDate: "changeLastSelectedDate", actionSelectDate: "selectDate", actionUnselectDate: "unselectDate", cssClassWeekend: "-weekend-" }, ie = { classes: "", inline: !1, locale: { days: ["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435", "\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A", "\u0412\u0442\u043E\u0440\u043D\u0438\u043A", "\u0421\u0440\u0435\u0434\u0430", "\u0427\u0435\u0442\u0432\u0435\u0440\u0433", "\u041F\u044F\u0442\u043D\u0438\u0446\u0430", "\u0421\u0443\u0431\u0431\u043E\u0442\u0430"], daysShort: ["\u0412\u043E\u0441", "\u041F\u043E\u043D", "\u0412\u0442\u043E", "\u0421\u0440\u0435", "\u0427\u0435\u0442", "\u041F\u044F\u0442", "\u0421\u0443\u0431"], daysMin: ["\u0412\u0441", "\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431"], months: ["\u042F\u043D\u0432\u0430\u0440\u044C", "\u0424\u0435\u0432\u0440\u0430\u043B\u044C", "\u041C\u0430\u0440\u0442", "\u0410\u043F\u0440\u0435\u043B\u044C", "\u041C\u0430\u0439", "\u0418\u044E\u043D\u044C", "\u0418\u044E\u043B\u044C", "\u0410\u0432\u0433\u0443\u0441\u0442", "\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C", "\u041E\u043A\u0442\u044F\u0431\u0440\u044C", "\u041D\u043E\u044F\u0431\u0440\u044C", "\u0414\u0435\u043A\u0430\u0431\u0440\u044C"], monthsShort: ["\u042F\u043D\u0432", "\u0424\u0435\u0432", "\u041C\u0430\u0440", "\u0410\u043F\u0440", "\u041C\u0430\u0439", "\u0418\u044E\u043D", "\u0418\u044E\u043B", "\u0410\u0432\u0433", "\u0421\u0435\u043D", "\u041E\u043A\u0442", "\u041D\u043E\u044F", "\u0414\u0435\u043A"], today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F", clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C", dateFormat: "dd.MM.yyyy", timeFormat: "HH:mm", firstDay: 1 }, startDate: new Date(), firstDay: "", weekends: [6, 0], dateFormat: "", altField: "", altFieldDateFormat: "T", toggleSelected: !0, keyboardNav: !0, selectedDates: !1, container: "", isMobile: !1, visible: !1, position: "bottom left", offset: 12, view: l.days, minView: l.days, showOtherMonths: !0, selectOtherMonths: !0, moveToOtherMonthsOnSelect: !0, showOtherYears: !0, selectOtherYears: !0, moveToOtherYearsOnSelect: !0, minDate: "", maxDate: "", disableNavWhenOutOfRange: !0, multipleDates: !1, multipleDatesSeparator: ", ", range: !1, dynamicRange: !0, buttons: !1, monthsField: "monthsShort", showEvent: "focus", autoClose: !1, prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>', nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>', navTitles: { days: "MMMM, <i>yyyy</i>", months: "yyyy", years: "yyyy1 - yyyy2" }, timepicker: !1, onlyTimepicker: !1, dateTimeSeparator: " ", timeFormat: "", minHours: 0, maxHours: 24, minMinutes: 0, maxMinutes: 59, hoursStep: 1, minutesStep: 1, onSelect: !1, onChangeViewDate: !1, onChangeView: !1, onRenderCell: !1, onShow: !1, onHide: !1, onClickDayName: !1 };
20
- function f(r) {
21
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document;
22
- return typeof r == "string" ? e.querySelector(r) : r;
23
- }
24
- function k() {
25
- let { tagName: r = "div", className: e = "", innerHtml: t = "", id: i = "", attrs: a = {} } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = document.createElement(r);
26
- return e && n.classList.add(...e.split(" ")), i && (n.id = i), t && (n.innerHTML = t), a && G(n, a), n;
27
- }
28
- function G(r, e) {
29
- for (let [t, i] of Object.entries(e))
30
- i !== void 0 && r.setAttribute(t, i);
31
- return r;
32
- }
33
- function se(r) {
34
- return new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate();
35
- }
36
- function v(r) {
37
- let e = r.getHours(), t = e % 12 == 0 ? 12 : e % 12;
38
- return { year: r.getFullYear(), month: r.getMonth(), fullMonth: r.getMonth() + 1 < 10 ? "0" + (r.getMonth() + 1) : r.getMonth() + 1, date: r.getDate(), fullDate: r.getDate() < 10 ? "0" + r.getDate() : r.getDate(), day: r.getDay(), hours: e, fullHours: I(e), hours12: t, fullHours12: I(t), minutes: r.getMinutes(), fullMinutes: r.getMinutes() < 10 ? "0" + r.getMinutes() : r.getMinutes() };
39
- }
40
- function I(r) {
41
- return r < 10 ? "0" + r : r;
42
- }
43
- function O(r) {
44
- let e = 10 * Math.floor(r.getFullYear() / 10);
45
- return [e, e + 9];
46
- }
47
- function S() {
48
- let r = [];
49
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
50
- t[i] = arguments[i];
51
- return t.forEach((a) => {
52
- if (typeof a == "object")
53
- for (let n in a)
54
- a[n] && r.push(n);
55
- else
56
- a && r.push(a);
57
- }), r.join(" ");
58
- }
59
- function y(r, e) {
60
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : l.days;
61
- if (!r || !e)
62
- return !1;
63
- let i = v(r), a = v(e);
64
- return { [l.days]: i.date === a.date && i.month === a.month && i.year === a.year, [l.months]: i.month === a.month && i.year === a.year, [l.years]: i.year === a.year }[t];
65
- }
66
- function T(r, e, t) {
67
- let i = X(r, !1).getTime(), a = X(e, !1).getTime();
68
- return t ? i >= a : i > a;
69
- }
70
- function P(r, e) {
71
- return !T(r, e, !0);
72
- }
73
- function X(r) {
74
- let e = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], t = new Date(r.getTime());
75
- return typeof e != "boolean" || e || ce(t), t;
76
- }
77
- function ce(r) {
78
- return r.setHours(0, 0, 0, 0), r;
79
- }
80
- function C(r, e, t) {
81
- r.length ? r.forEach((i) => {
82
- i.addEventListener(e, t);
83
- }) : r.addEventListener(e, t);
84
- }
85
- function z(r, e) {
86
- return !(!r || r === document || r instanceof DocumentFragment) && (r.matches(e) ? r : z(r.parentNode, e));
87
- }
88
- function R(r, e, t) {
89
- return r > t ? t : r < e ? e : r;
90
- }
91
- function Z(r) {
92
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
93
- t[i - 1] = arguments[i];
94
- return t.filter((a) => a).forEach((a) => {
95
- for (let [n, s] of Object.entries(a))
96
- if (s !== void 0 && s.toString() === "[object Object]") {
97
- let o = r[n] !== void 0 ? r[n].toString() : void 0, h = s.toString(), d = Array.isArray(s) ? [] : {};
98
- r[n] = r[n] ? o !== h ? d : r[n] : d, Z(r[n], s);
99
- } else
100
- r[n] = s;
101
- }), r;
102
- }
103
- function M(r) {
104
- let e = r;
105
- return r instanceof Date || (e = new Date(r)), isNaN(e.getTime()) && (console.log('Unable to convert value "'.concat(r, '" to Date object')), e = !1), e;
106
- }
107
- function Q(r) {
108
- let e = "\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";
109
- return new RegExp("(^|>|" + e + ")(" + r + ")($|<|" + e + ")", "g");
110
- }
111
- function L(r, e, t) {
112
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
113
- }
114
- class ue {
115
- constructor() {
116
- let { type: e, date: t, dp: i, opts: a, body: n } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
117
- L(this, "focus", () => {
118
- this.$cell.classList.add("-focus-"), this.focused = !0;
119
- }), L(this, "removeFocus", () => {
120
- this.$cell.classList.remove("-focus-"), this.focused = !1;
121
- }), L(this, "select", () => {
122
- this.$cell.classList.add("-selected-"), this.selected = !0;
123
- }), L(this, "removeSelect", () => {
124
- this.$cell.classList.remove("-selected-", "-range-from-", "-range-to-"), this.selected = !1;
125
- }), L(this, "onChangeSelectedDate", () => {
126
- this.isDisabled || (this._handleSelectedStatus(), this.opts.range && this._handleRangeStatus());
127
- }), L(this, "onChangeFocusDate", (s) => {
128
- if (!s)
129
- return void (this.focused && this.removeFocus());
130
- let o = y(s, this.date, this.type);
131
- o ? this.focus() : !o && this.focused && this.removeFocus(), this.opts.range && this._handleRangeStatus();
132
- }), L(this, "render", () => (this.$cell.innerHTML = this._getHtml(), this.$cell.adpCell = this, this.$cell)), this.type = e, this.singleType = this.type.slice(0, -1), this.date = t, this.dp = i, this.opts = a, this.body = n, this.customData = !1, this.init();
133
- }
134
- init() {
135
- let { range: e, onRenderCell: t } = this.opts;
136
- t && (this.customData = t({ date: this.date, cellType: this.singleType, datepicker: this.dp })), this._createElement(), this._bindDatepickerEvents(), this._handleInitialFocusStatus(), this.dp.hasSelectedDates && (this._handleSelectedStatus(), e && this._handleRangeStatus());
137
- }
138
- _bindDatepickerEvents() {
139
- this.dp.on(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.on(l.eventChangeFocusDate, this.onChangeFocusDate);
140
- }
141
- unbindDatepickerEvents() {
142
- this.dp.off(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.off(l.eventChangeFocusDate, this.onChangeFocusDate);
143
- }
144
- _createElement() {
145
- var e;
146
- let { year: t, month: i, date: a } = v(this.date), n = ((e = this.customData) === null || e === void 0 ? void 0 : e.attrs) || {};
147
- this.$cell = k({ className: this._getClassName(), attrs: { "data-year": t, "data-month": i, "data-date": a, ...n } });
148
- }
149
- _getClassName() {
150
- var e, t;
151
- let i = new Date(), { selectOtherMonths: a, selectOtherYears: n } = this.opts, { minDate: s, maxDate: o } = this.dp, { day: h } = v(this.date), d = this._isOutOfMinMaxRange(), c = (e = this.customData) === null || e === void 0 ? void 0 : e.disabled, u = S("air-datepicker-cell", "-".concat(this.singleType, "-"), { "-current-": y(i, this.date, this.type), "-min-date-": s && y(s, this.date, this.type), "-max-date-": o && y(o, this.date, this.type) }), p = "";
152
- switch (this.type) {
153
- case l.days:
154
- p = S({ "-weekend-": this.dp.isWeekend(h), "-other-month-": this.isOtherMonth, "-disabled-": this.isOtherMonth && !a || d || c });
155
- break;
156
- case l.months:
157
- p = S({ "-disabled-": d || c });
158
- break;
159
- case l.years:
160
- p = S({ "-other-decade-": this.isOtherDecade, "-disabled-": d || this.isOtherDecade && !n || c });
161
- }
162
- return S(u, p, (t = this.customData) === null || t === void 0 ? void 0 : t.classes);
163
- }
164
- _getHtml() {
165
- var e;
166
- let { year: t, month: i, date: a } = v(this.date), { showOtherMonths: n, showOtherYears: s } = this.opts;
167
- if ((e = this.customData) !== null && e !== void 0 && e.html)
168
- return this.customData.html;
169
- switch (this.type) {
170
- case l.days:
171
- return !n && this.isOtherMonth ? "" : a;
172
- case l.months:
173
- return this.dp.locale[this.opts.monthsField][i];
174
- case l.years:
175
- return !s && this.isOtherDecade ? "" : t;
176
- }
177
- }
178
- _isOutOfMinMaxRange() {
179
- let { minDate: e, maxDate: t } = this.dp, { type: i, date: a } = this, { month: n, year: s, date: o } = v(a), h = i === l.days, d = i === l.years, c = !!e && new Date(s, d ? e.getMonth() : n, h ? o : e.getDate()), u = !!t && new Date(s, d ? t.getMonth() : n, h ? o : t.getDate());
180
- return e && t ? P(c, e) || T(u, t) : e ? P(c, e) : t ? T(u, t) : void 0;
181
- }
182
- destroy() {
183
- this.unbindDatepickerEvents();
184
- }
185
- _handleRangeStatus() {
186
- let { rangeDateFrom: e, rangeDateTo: t } = this.dp, i = S({ "-in-range-": e && t && (a = this.date, n = e, s = t, T(a, n) && P(a, s)), "-range-from-": e && y(this.date, e, this.type), "-range-to-": t && y(this.date, t, this.type) });
187
- var a, n, s;
188
- this.$cell.classList.remove("-range-from-", "-range-to-", "-in-range-"), i && this.$cell.classList.add(...i.split(" "));
189
- }
190
- _handleSelectedStatus() {
191
- let e = this.dp._checkIfDateIsSelected(this.date, this.type);
192
- e ? this.select() : !e && this.selected && this.removeSelect();
193
- }
194
- _handleInitialFocusStatus() {
195
- y(this.dp.focusDate, this.date, this.type) && this.focus();
196
- }
197
- get isDisabled() {
198
- return this.$cell.matches(".-disabled-");
199
- }
200
- get isOtherMonth() {
201
- return this.dp.isOtherMonth(this.date);
202
- }
203
- get isOtherDecade() {
204
- return this.dp.isOtherDecade(this.date);
205
- }
206
- }
207
- function _(r, e, t) {
208
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
209
- }
210
- let pe = { [l.days]: '<div class="air-datepicker-body--day-names"></div>' + '<div class="air-datepicker-body--cells -'.concat(l.days, '-"></div>'), [l.months]: '<div class="air-datepicker-body--cells -'.concat(l.months, '-"></div>'), [l.years]: '<div class="air-datepicker-body--cells -'.concat(l.years, '-"></div>') };
211
- const K = ".air-datepicker-cell";
212
- class ae {
213
- constructor(e) {
214
- let { dp: t, type: i, opts: a } = e;
215
- _(this, "handleClick", (n) => {
216
- let s = n.target.closest(K).adpCell;
217
- if (s.isDisabled)
218
- return;
219
- if (!this.dp.isMinViewReached)
220
- return void this.dp.down();
221
- let o = this.dp._checkIfDateIsSelected(s.date, s.type);
222
- o ? this.dp._handleAlreadySelectedDates(o, s.date) : this.dp.selectDate(s.date);
223
- }), _(this, "handleDayNameClick", (n) => {
224
- let s = n.target.getAttribute("data-day-index");
225
- this.opts.onClickDayName({ dayIndex: Number(s), datepicker: this.dp });
226
- }), _(this, "onChangeCurrentView", (n) => {
227
- n !== this.type ? this.hide() : (this.show(), this.render());
228
- }), _(this, "onMouseOverCell", (n) => {
229
- let s = z(n.target, K);
230
- this.dp.setFocusDate(!!s && s.adpCell.date);
231
- }), _(this, "onMouseOutCell", () => {
232
- this.dp.setFocusDate(!1);
233
- }), _(this, "onClickBody", (n) => {
234
- let { onClickDayName: s } = this.opts, o = n.target;
235
- o.closest(K) && this.handleClick(n), s && o.closest(".air-datepicker-body--day-name") && this.handleDayNameClick(n);
236
- }), _(this, "onMouseDown", (n) => {
237
- this.pressed = !0;
238
- let s = z(n.target, K), o = s && s.adpCell;
239
- y(o.date, this.dp.rangeDateFrom) && (this.rangeFromFocused = !0), y(o.date, this.dp.rangeDateTo) && (this.rangeToFocused = !0);
240
- }), _(this, "onMouseMove", (n) => {
241
- if (!this.pressed || !this.dp.isMinViewReached)
242
- return;
243
- n.preventDefault();
244
- let s = z(n.target, K), o = s && s.adpCell, { selectedDates: h, rangeDateTo: d, rangeDateFrom: c } = this.dp;
245
- if (!o || o.isDisabled)
246
- return;
247
- let { date: u } = o;
248
- if (h.length === 2) {
249
- if (this.rangeFromFocused && !T(u, d)) {
250
- let { hours: p, minutes: g } = v(c);
251
- u.setHours(p), u.setMinutes(g), this.dp.rangeDateFrom = u, this.dp.replaceDate(c, u);
252
- }
253
- if (this.rangeToFocused && !P(u, c)) {
254
- let { hours: p, minutes: g } = v(d);
255
- u.setHours(p), u.setMinutes(g), this.dp.rangeDateTo = u, this.dp.replaceDate(d, u);
256
- }
257
- }
258
- }), _(this, "onMouseUp", () => {
259
- this.pressed = !1, this.rangeFromFocused = !1, this.rangeToFocused = !1;
260
- }), _(this, "onChangeViewDate", (n, s) => {
261
- if (!this.isVisible)
262
- return;
263
- let o = O(n), h = O(s);
264
- switch (this.dp.currentView) {
265
- case l.days:
266
- if (y(n, s, l.months))
267
- return;
268
- break;
269
- case l.months:
270
- if (y(n, s, l.years))
271
- return;
272
- break;
273
- case l.years:
274
- if (o[0] === h[0] && o[1] === h[1])
275
- return;
276
- }
277
- this.render();
278
- }), _(this, "render", () => {
279
- this.destroyCells(), this._generateCells(), this.cells.forEach((n) => {
280
- this.$cells.appendChild(n.render());
281
- });
282
- }), this.dp = t, this.type = i, this.opts = a, this.cells = [], this.$el = "", this.pressed = !1, this.isVisible = !0, this.init();
283
- }
284
- init() {
285
- this._buildBaseHtml(), this.type === l.days && this.renderDayNames(), this.render(), this._bindEvents(), this._bindDatepickerEvents();
286
- }
287
- _bindEvents() {
288
- let { range: e, dynamicRange: t } = this.opts;
289
- C(this.$el, "mouseover", this.onMouseOverCell), C(this.$el, "mouseout", this.onMouseOutCell), C(this.$el, "click", this.onClickBody), e && t && (C(this.$el, "mousedown", this.onMouseDown), C(this.$el, "mousemove", this.onMouseMove), C(window.document, "mouseup", this.onMouseUp));
290
- }
291
- _bindDatepickerEvents() {
292
- this.dp.on(l.eventChangeViewDate, this.onChangeViewDate), this.dp.on(l.eventChangeCurrentView, this.onChangeCurrentView);
293
- }
294
- _buildBaseHtml() {
295
- this.$el = k({ className: "air-datepicker-body -".concat(this.type, "-"), innerHtml: pe[this.type] }), this.$names = f(".air-datepicker-body--day-names", this.$el), this.$cells = f(".air-datepicker-body--cells", this.$el);
296
- }
297
- _getDayNamesHtml() {
298
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.dp.locale.firstDay, t = "", i = this.dp.isWeekend, { onClickDayName: a } = this.opts, n = e, s = 0;
299
- for (; s < 7; ) {
300
- let o = n % 7, h = S("air-datepicker-body--day-name", { [l.cssClassWeekend]: i(o), "-clickable-": !!a }), d = this.dp.locale.daysMin[o];
301
- t += '<div class="'.concat(h, `" data-day-index='`).concat(o, "'>").concat(d, "</div>"), s++, n++;
302
- }
303
- return t;
304
- }
305
- _getDaysCells() {
306
- let { viewDate: e, locale: { firstDay: t } } = this.dp, i = se(e), { year: a, month: n } = v(e), s = new Date(a, n, 1), o = new Date(a, n, i), h = s.getDay() - t, d = 6 - o.getDay() + t;
307
- h = h < 0 ? h + 7 : h, d = d > 6 ? d - 7 : d;
308
- let c = function(B, U) {
309
- let { year: Y, month: j, date: q } = v(B);
310
- return new Date(Y, j, q - U);
311
- }(s, h), u = i + h + d, p = c.getDate(), { year: g, month: w } = v(c), $ = 0;
312
- for (; $ < u; ) {
313
- let B = new Date(g, w, p + $);
314
- this._generateCell(B), $++;
315
- }
316
- }
317
- _generateCell(e) {
318
- let { type: t, dp: i, opts: a } = this, n = new ue({ type: t, dp: i, opts: a, date: e, body: this });
319
- return this.cells.push(n), n;
320
- }
321
- _generateDayCells() {
322
- this._getDaysCells();
323
- }
324
- _generateMonthCells() {
325
- let { year: e } = this.dp.parsedViewDate, t = 0;
326
- for (; t < 12; )
327
- this.cells.push(this._generateCell(new Date(e, t))), t++;
328
- }
329
- _generateYearCells() {
330
- let e = O(this.dp.viewDate), t = e[0] - 1, i = e[1] + 1, a = t;
331
- for (; a <= i; )
332
- this.cells.push(this._generateCell(new Date(a, 0))), a++;
333
- }
334
- renderDayNames() {
335
- this.$names.innerHTML = this._getDayNamesHtml();
336
- }
337
- _generateCells() {
338
- switch (this.type) {
339
- case l.days:
340
- this._generateDayCells();
341
- break;
342
- case l.months:
343
- this._generateMonthCells();
344
- break;
345
- case l.years:
346
- this._generateYearCells();
347
- }
348
- }
349
- show() {
350
- this.isVisible = !0, this.$el.classList.remove("-hidden-");
351
- }
352
- hide() {
353
- this.isVisible = !1, this.$el.classList.add("-hidden-");
354
- }
355
- destroyCells() {
356
- this.cells.forEach((e) => e.destroy()), this.cells = [], this.$cells.innerHTML = "";
357
- }
358
- destroy() {
359
- this.destroyCells(), this.dp.off(l.eventChangeViewDate, this.onChangeViewDate), this.dp.off(l.eventChangeCurrentView, this.onChangeCurrentView);
360
- }
361
- }
362
- function E(r, e, t) {
363
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
364
- }
365
- class me {
366
- constructor(e) {
367
- let { dp: t, opts: i } = e;
368
- E(this, "onClickNav", (a) => {
369
- let n = z(a.target, ".air-datepicker-nav--action");
370
- if (!n)
371
- return;
372
- let s = n.dataset.action;
373
- this.dp[s]();
374
- }), E(this, "onChangeViewDate", () => {
375
- this.render(), this._resetNavStatus(), this.handleNavStatus();
376
- }), E(this, "onChangeCurrentView", () => {
377
- this.render(), this._resetNavStatus(), this.handleNavStatus();
378
- }), E(this, "onClickNavTitle", () => {
379
- this.dp.isFinalView || this.dp.up();
380
- }), E(this, "update", () => {
381
- let { prevHtml: a, nextHtml: n } = this.opts;
382
- this.$prev.innerHTML = a, this.$next.innerHTML = n, this._resetNavStatus(), this.render(), this.handleNavStatus();
383
- }), E(this, "renderDelay", () => {
384
- setTimeout(this.render);
385
- }), E(this, "render", () => {
386
- this.$title.innerHTML = this._getTitle(), function(a, n) {
387
- for (let s in n)
388
- n[s] ? a.classList.add(s) : a.classList.remove(s);
389
- }(this.$title, { "-disabled-": this.dp.isFinalView });
390
- }), this.dp = t, this.opts = i, this.init();
391
- }
392
- init() {
393
- this._createElement(), this._buildBaseHtml(), this._defineDOM(), this.render(), this.handleNavStatus(), this._bindEvents(), this._bindDatepickerEvents();
394
- }
395
- _defineDOM() {
396
- this.$title = f(".air-datepicker-nav--title", this.$el), this.$prev = f('[data-action="prev"]', this.$el), this.$next = f('[data-action="next"]', this.$el);
397
- }
398
- _bindEvents() {
399
- this.$el.addEventListener("click", this.onClickNav), this.$title.addEventListener("click", this.onClickNavTitle);
400
- }
401
- _bindDatepickerEvents() {
402
- this.dp.on(l.eventChangeViewDate, this.onChangeViewDate), this.dp.on(l.eventChangeCurrentView, this.onChangeCurrentView), this.isNavIsFunction && (this.dp.on(l.eventChangeSelectedDate, this.renderDelay), this.dp.opts.timepicker && this.dp.on(l.eventChangeTime, this.render));
403
- }
404
- destroy() {
405
- this.dp.off(l.eventChangeViewDate, this.onChangeViewDate), this.dp.off(l.eventChangeCurrentView, this.onChangeCurrentView), this.isNavIsFunction && (this.dp.off(l.eventChangeSelectedDate, this.renderDelay), this.dp.opts.timepicker && this.dp.off(l.eventChangeTime, this.render));
406
- }
407
- _createElement() {
408
- this.$el = k({ tagName: "nav", className: "air-datepicker-nav" });
409
- }
410
- _getTitle() {
411
- let { dp: e, opts: t } = this, i = t.navTitles[e.currentView];
412
- return typeof i == "function" ? i(e) : e.formatDate(e.viewDate, i);
413
- }
414
- handleNavStatus() {
415
- let { disableNavWhenOutOfRange: e } = this.opts, { minDate: t, maxDate: i } = this.dp;
416
- if (!t && !i || !e)
417
- return;
418
- let { year: a, month: n } = this.dp.parsedViewDate, s = !!t && v(t), o = !!i && v(i);
419
- switch (this.dp.currentView) {
420
- case l.days:
421
- t && s.month >= n && s.year >= a && this._disableNav("prev"), i && o.month <= n && o.year <= a && this._disableNav("next");
422
- break;
423
- case l.months:
424
- t && s.year >= a && this._disableNav("prev"), i && o.year <= a && this._disableNav("next");
425
- break;
426
- case l.years: {
427
- let h = O(this.dp.viewDate);
428
- t && s.year >= h[0] && this._disableNav("prev"), i && o.year <= h[1] && this._disableNav("next");
429
- break;
430
- }
431
- }
432
- }
433
- _disableNav(e) {
434
- f('[data-action="' + e + '"]', this.$el).classList.add("-disabled-");
435
- }
436
- _resetNavStatus() {
437
- (function(e) {
438
- for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
439
- i[a - 1] = arguments[a];
440
- e.length ? e.forEach((n) => {
441
- n.classList.remove(...i);
442
- }) : e.classList.remove(...i);
443
- })(this.$el.querySelectorAll(".air-datepicker-nav--action"), "-disabled-");
444
- }
445
- _buildBaseHtml() {
446
- let { prevHtml: e, nextHtml: t } = this.opts;
447
- this.$el.innerHTML = '<div class="air-datepicker-nav--action" data-action="prev">'.concat(e, "</div>") + '<div class="air-datepicker-nav--title"></div>' + '<div class="air-datepicker-nav--action" data-action="next">'.concat(t, "</div>");
448
- }
449
- get isNavIsFunction() {
450
- let { navTitles: e } = this.opts;
451
- return Object.keys(e).find((t) => typeof e[t] == "function");
452
- }
453
- }
454
- var ne = { today: { content: (r) => r.locale.today, onClick: (r) => r.setViewDate(new Date()) }, clear: { content: (r) => r.locale.clear, onClick: (r) => r.clear() } };
455
- class ge {
456
- constructor(e) {
457
- let { dp: t, opts: i } = e;
458
- this.dp = t, this.opts = i, this.init();
459
- }
460
- init() {
461
- this.createElement(), this.render();
462
- }
463
- createElement() {
464
- this.$el = k({ className: "air-datepicker-buttons" });
465
- }
466
- destroy() {
467
- this.$el.parentNode.removeChild(this.$el);
468
- }
469
- clearHtml() {
470
- return this.$el.innerHTML = "", this;
471
- }
472
- generateButtons() {
473
- let { buttons: e } = this.opts;
474
- Array.isArray(e) || (e = [e]), e.forEach((t) => {
475
- let i = t;
476
- typeof t == "string" && ne[t] && (i = ne[t]);
477
- let a = this.createButton(i);
478
- i.onClick && this.attachEventToButton(a, i.onClick), this.$el.appendChild(a);
479
- });
480
- }
481
- attachEventToButton(e, t) {
482
- e.addEventListener("click", () => {
483
- t(this.dp);
484
- });
485
- }
486
- createButton(e) {
487
- let { content: t, className: i, tagName: a = "button", attrs: n = {} } = e, s = typeof t == "function" ? t(this.dp) : t;
488
- return k({ tagName: a, innerHtml: "<span tabindex='-1'>".concat(s, "</span>"), className: S("air-datepicker-button", i), attrs: n });
489
- }
490
- render() {
491
- this.generateButtons();
492
- }
493
- }
494
- function A(r, e, t) {
495
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
496
- }
497
- class ve {
498
- constructor() {
499
- let { opts: e, dp: t } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
500
- A(this, "toggleTimepickerIsActive", (a) => {
501
- this.dp.timepickerIsActive = a;
502
- }), A(this, "onChangeSelectedDate", (a) => {
503
- let { date: n, updateTime: s = !1 } = a;
504
- n && (this.setMinMaxTime(n), this.setCurrentTime(!!s && n), this.addTimeToDate(n));
505
- }), A(this, "onChangeLastSelectedDate", (a) => {
506
- a && (this.setTime(a), this.render());
507
- }), A(this, "onChangeInputRange", (a) => {
508
- let n = a.target;
509
- this[n.getAttribute("name")] = n.value, this.updateText(), this.dp.trigger(l.eventChangeTime, { hours: this.hours, minutes: this.minutes });
510
- }), A(this, "onMouseEnterLeave", (a) => {
511
- let n = a.target.getAttribute("name"), s = this.$minutesText;
512
- n === "hours" && (s = this.$hoursText), s.classList.toggle("-focus-");
513
- }), A(this, "onFocus", () => {
514
- this.toggleTimepickerIsActive(!0);
515
- }), A(this, "onBlur", () => {
516
- this.toggleTimepickerIsActive(!1);
517
- }), this.opts = e, this.dp = t;
518
- let { timeFormat: i } = this.dp.locale;
519
- i && (i.match(Q("h")) || i.match(Q("hh"))) && (this.ampm = !0), this.init();
520
- }
521
- init() {
522
- this.setTime(this.dp.lastSelectedDate || this.dp.viewDate), this.createElement(), this.buildHtml(), this.defineDOM(), this.render(), this.bindDatepickerEvents(), this.bindDOMEvents();
523
- }
524
- bindDatepickerEvents() {
525
- this.dp.on(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.on(l.eventChangeLastSelectedDate, this.onChangeLastSelectedDate);
526
- }
527
- bindDOMEvents() {
528
- let e = "input";
529
- navigator.userAgent.match(/trident/gi) && (e = "change"), C(this.$ranges, e, this.onChangeInputRange), C(this.$ranges, "mouseenter", this.onMouseEnterLeave), C(this.$ranges, "mouseleave", this.onMouseEnterLeave), C(this.$ranges, "focus", this.onFocus), C(this.$ranges, "mousedown", this.onFocus), C(this.$ranges, "blur", this.onBlur);
530
- }
531
- createElement() {
532
- this.$el = k({ className: S("air-datepicker-time", { "-am-pm-": this.dp.ampm }) });
533
- }
534
- destroy() {
535
- this.dp.off(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.off(l.eventChangeLastSelectedDate, this.onChangeLastSelectedDate), this.$el.parentNode.removeChild(this.$el);
536
- }
537
- buildHtml() {
538
- let { ampm: e, hours: t, displayHours: i, minutes: a, minHours: n, minMinutes: s, maxHours: o, maxMinutes: h, dayPeriod: d, opts: { hoursStep: c, minutesStep: u } } = this;
539
- this.$el.innerHTML = '<div class="air-datepicker-time--current">' + ' <span class="air-datepicker-time--current-hours">'.concat(I(i), "</span>") + ' <span class="air-datepicker-time--current-colon">:</span>' + ' <span class="air-datepicker-time--current-minutes">'.concat(I(a), "</span>") + " ".concat(e ? "<span class='air-datepicker-time--current-ampm'>".concat(d, "</span>") : "") + '</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row">' + ' <input type="range" name="hours" value="'.concat(t, '" min="').concat(n, '" max="').concat(o, '" step="').concat(c, '"/>') + ' </div> <div class="air-datepicker-time--row">' + ' <input type="range" name="minutes" value="'.concat(a, '" min="').concat(s, '" max="').concat(h, '" step="').concat(u, '"/>') + " </div></div>";
540
- }
541
- defineDOM() {
542
- let e = (t) => f(t, this.$el);
543
- this.$ranges = this.$el.querySelectorAll('[type="range"]'), this.$hours = e('[name="hours"]'), this.$minutes = e('[name="minutes"]'), this.$hoursText = e(".air-datepicker-time--current-hours"), this.$minutesText = e(".air-datepicker-time--current-minutes"), this.$ampm = e(".air-datepicker-time--current-ampm");
544
- }
545
- setTime(e) {
546
- this.setMinMaxTime(e), this.setCurrentTime(e);
547
- }
548
- addTimeToDate(e) {
549
- e && (e.setHours(this.hours), e.setMinutes(this.minutes));
550
- }
551
- setMinMaxTime(e) {
552
- if (this.setMinMaxTimeFromOptions(), e) {
553
- let { minDate: t, maxDate: i } = this.dp;
554
- t && y(e, t) && this.setMinTimeFromMinDate(t), i && y(e, i) && this.setMaxTimeFromMaxDate(i);
555
- }
556
- }
557
- setCurrentTime(e) {
558
- let { hours: t, minutes: i } = e ? v(e) : this;
559
- this.hours = R(t, this.minHours, this.maxHours), this.minutes = R(i, this.minMinutes, this.maxMinutes);
560
- }
561
- setMinMaxTimeFromOptions() {
562
- let { minHours: e, minMinutes: t, maxHours: i, maxMinutes: a } = this.opts;
563
- this.minHours = R(e, 0, 23), this.minMinutes = R(t, 0, 59), this.maxHours = R(i, 0, 23), this.maxMinutes = R(a, 0, 59);
564
- }
565
- setMinTimeFromMinDate(e) {
566
- let { lastSelectedDate: t } = this.dp;
567
- this.minHours = e.getHours(), t && t.getHours() > e.getHours() ? this.minMinutes = this.opts.minMinutes : this.minMinutes = e.getMinutes();
568
- }
569
- setMaxTimeFromMaxDate(e) {
570
- let { lastSelectedDate: t } = this.dp;
571
- this.maxHours = e.getHours(), t && t.getHours() < e.getHours() ? this.maxMinutes = this.opts.maxMinutes : this.maxMinutes = e.getMinutes();
572
- }
573
- getDayPeriod(e, t) {
574
- let i = e, a = Number(e);
575
- e instanceof Date && (i = v(e), a = Number(i.hours));
576
- let n = "am";
577
- if (t || this.ampm) {
578
- switch (!0) {
579
- case a === 12:
580
- case a > 11:
581
- n = "pm";
582
- }
583
- a = a % 12 == 0 ? 12 : a % 12;
584
- }
585
- return { hours: a, dayPeriod: n };
586
- }
587
- updateSliders() {
588
- G(this.$hours, { min: this.minHours, max: this.maxHours }).value = this.hours, G(this.$minutes, { min: this.minMinutes, max: this.maxMinutes }).value = this.minutes;
589
- }
590
- updateText() {
591
- this.$hoursText.innerHTML = I(this.displayHours), this.$minutesText.innerHTML = I(this.minutes), this.ampm && (this.$ampm.innerHTML = this.dayPeriod);
592
- }
593
- set hours(e) {
594
- this._hours = e;
595
- let { hours: t, dayPeriod: i } = this.getDayPeriod(e);
596
- this.displayHours = t, this.dayPeriod = i;
597
- }
598
- get hours() {
599
- return this._hours;
600
- }
601
- render() {
602
- this.updateSliders(), this.updateText();
603
- }
604
- }
605
- function N(r, e, t) {
606
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
607
- }
608
- class ye {
609
- constructor(e) {
610
- let { dp: t, opts: i } = e;
611
- N(this, "pressedKeys", /* @__PURE__ */ new Set()), N(this, "hotKeys", /* @__PURE__ */ new Map([[[["Control", "ArrowRight"], ["Control", "ArrowUp"]], (a) => a.month++], [[["Control", "ArrowLeft"], ["Control", "ArrowDown"]], (a) => a.month--], [[["Shift", "ArrowRight"], ["Shift", "ArrowUp"]], (a) => a.year++], [[["Shift", "ArrowLeft"], ["Shift", "ArrowDown"]], (a) => a.year--], [[["Alt", "ArrowRight"], ["Alt", "ArrowUp"]], (a) => a.year += 10], [[["Alt", "ArrowLeft"], ["Alt", "ArrowDown"]], (a) => a.year -= 10], [["Control", "Shift", "ArrowUp"], (a, n) => n.up()]])), N(this, "handleHotKey", (a) => {
612
- let n = this.hotKeys.get(a), s = v(this.getInitialFocusDate());
613
- n(s, this.dp);
614
- let { year: o, month: h, date: d } = s, c = se(new Date(o, h));
615
- c < d && (d = c);
616
- let u = this.dp.getClampedDate(new Date(o, h, d));
617
- this.dp.setFocusDate(u, { viewDateTransition: !0 });
618
- }), N(this, "isHotKeyPressed", () => {
619
- let a = !1, n = this.pressedKeys.size, s = (o) => this.pressedKeys.has(o);
620
- for (let [o] of this.hotKeys) {
621
- if (a)
622
- break;
623
- if (Array.isArray(o[0]))
624
- o.forEach((h) => {
625
- a || n !== h.length || (a = h.every(s) && o);
626
- });
627
- else {
628
- if (n !== o.length)
629
- continue;
630
- a = o.every(s) && o;
631
- }
632
- }
633
- return a;
634
- }), N(this, "isArrow", (a) => a >= 37 && a <= 40), N(this, "onKeyDown", (a) => {
635
- let { key: n, which: s } = a, { dp: o, dp: { focusDate: h }, opts: d } = this;
636
- this.registerKey(n);
637
- let c = this.isHotKeyPressed();
638
- if (c)
639
- return a.preventDefault(), void this.handleHotKey(c);
640
- if (this.isArrow(s))
641
- return a.preventDefault(), void this.focusNextCell(n);
642
- if (n === "Enter") {
643
- if (o.currentView !== d.minView)
644
- return void o.down();
645
- if (h) {
646
- let u = o._checkIfDateIsSelected(h);
647
- return void (u ? o._handleAlreadySelectedDates(u, h) : o.selectDate(h));
648
- }
649
- }
650
- n === "Escape" && this.dp.hide();
651
- }), N(this, "onKeyUp", (a) => {
652
- this.removeKey(a.key);
653
- }), this.dp = t, this.opts = i, this.init();
654
- }
655
- init() {
656
- this.bindKeyboardEvents();
657
- }
658
- bindKeyboardEvents() {
659
- let { $el: e } = this.dp;
660
- e.addEventListener("keydown", this.onKeyDown), e.addEventListener("keyup", this.onKeyUp);
661
- }
662
- destroy() {
663
- let { $el: e } = this.dp;
664
- e.removeEventListener("keydown", this.onKeyDown), e.removeEventListener("keyup", this.onKeyUp), this.hotKeys = null, this.pressedKeys = null;
665
- }
666
- getInitialFocusDate() {
667
- let { focusDate: e, currentView: t, selectedDates: i, parsedViewDate: { year: a, month: n } } = this.dp, s = e || i[i.length - 1];
668
- if (!s)
669
- switch (t) {
670
- case l.days:
671
- s = new Date(a, n, new Date().getDate());
672
- break;
673
- case l.months:
674
- s = new Date(a, n, 1);
675
- break;
676
- case l.years:
677
- s = new Date(a, 0, 1);
678
- }
679
- return s;
680
- }
681
- focusNextCell(e) {
682
- let t = this.getInitialFocusDate(), { currentView: i } = this.dp, { days: a, months: n, years: s } = l, o = v(t), h = o.year, d = o.month, c = o.date;
683
- switch (e) {
684
- case "ArrowLeft":
685
- i === a && (c -= 1), i === n && (d -= 1), i === s && (h -= 1);
686
- break;
687
- case "ArrowUp":
688
- i === a && (c -= 7), i === n && (d -= 3), i === s && (h -= 4);
689
- break;
690
- case "ArrowRight":
691
- i === a && (c += 1), i === n && (d += 1), i === s && (h += 1);
692
- break;
693
- case "ArrowDown":
694
- i === a && (c += 7), i === n && (d += 3), i === s && (h += 4);
695
- }
696
- let u = this.dp.getClampedDate(new Date(h, d, c));
697
- this.dp.setFocusDate(u, { viewDateTransition: !0 });
698
- }
699
- registerKey(e) {
700
- this.pressedKeys.add(e);
701
- }
702
- removeKey(e) {
703
- this.pressedKeys.delete(e);
704
- }
705
- }
706
- let De = { on(r, e) {
707
- this.__events || (this.__events = {}), this.__events[r] ? this.__events[r].push(e) : this.__events[r] = [e];
708
- }, off(r, e) {
709
- this.__events && this.__events[r] && (this.__events[r] = this.__events[r].filter((t) => t !== e));
710
- }, removeAllEvents() {
711
- this.__events = {};
712
- }, trigger(r) {
713
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
714
- t[i - 1] = arguments[i];
715
- this.__events && this.__events[r] && this.__events[r].forEach((a) => {
716
- a(...t);
717
- });
718
- } };
719
- function m(r, e, t) {
720
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
721
- }
722
- let ee = "", J = "", V = "", re = !1;
723
- class H {
724
- constructor(e, t) {
725
- var i = this;
726
- if (m(this, "viewIndexes", [l.days, l.months, l.years]), m(this, "next", () => {
727
- let { year: s, month: o } = this.parsedViewDate;
728
- switch (this.currentView) {
729
- case l.days:
730
- this.setViewDate(new Date(s, o + 1, 1));
731
- break;
732
- case l.months:
733
- this.setViewDate(new Date(s + 1, o, 1));
734
- break;
735
- case l.years:
736
- this.setViewDate(new Date(s + 10, 0, 1));
737
- }
738
- }), m(this, "prev", () => {
739
- let { year: s, month: o } = this.parsedViewDate;
740
- switch (this.currentView) {
741
- case l.days:
742
- this.setViewDate(new Date(s, o - 1, 1));
743
- break;
744
- case l.months:
745
- this.setViewDate(new Date(s - 1, o, 1));
746
- break;
747
- case l.years:
748
- this.setViewDate(new Date(s - 10, 0, 1));
749
- }
750
- }), m(this, "_finishHide", () => {
751
- this.hideAnimation = !1, this._destroyComponents(), this.$container.removeChild(this.$datepicker);
752
- }), m(this, "setPosition", function(s) {
753
- let o = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
754
- if (typeof (s = s || i.opts.position) == "function")
755
- return void (i.customHide = s({ $datepicker: i.$datepicker, $target: i.$el, $pointer: i.$pointer, isViewChange: o, done: i._finishHide }));
756
- let h, d, { isMobile: c } = i.opts, u = i.$el.getBoundingClientRect(), p = i.$el.getBoundingClientRect(), g = i.$datepicker.offsetParent, w = i.$el.offsetParent, $ = i.$datepicker.getBoundingClientRect(), B = s.split(" "), U = window.scrollY, Y = window.scrollX, j = i.opts.offset, q = B[0], fe = B[1];
757
- if (c)
758
- i.$datepicker.style.cssText = "left: 50%; top: 50%";
759
- else {
760
- if (g === w && g !== document.body && (p = { top: i.$el.offsetTop, left: i.$el.offsetLeft, width: u.width, height: i.$el.offsetHeight }, U = 0, Y = 0), g !== w && g !== document.body) {
761
- let he = g.getBoundingClientRect();
762
- p = { top: u.top - he.top, left: u.left - he.left, width: u.width, height: u.height }, U = 0, Y = 0;
763
- }
764
- switch (q) {
765
- case "top":
766
- h = p.top - $.height - j;
767
- break;
768
- case "right":
769
- d = p.left + p.width + j;
770
- break;
771
- case "bottom":
772
- h = p.top + p.height + j;
773
- break;
774
- case "left":
775
- d = p.left - $.width - j;
776
- }
777
- switch (fe) {
778
- case "top":
779
- h = p.top;
780
- break;
781
- case "right":
782
- d = p.left + p.width - $.width;
783
- break;
784
- case "bottom":
785
- h = p.top + p.height - $.height;
786
- break;
787
- case "left":
788
- d = p.left;
789
- break;
790
- case "center":
791
- /left|right/.test(q) ? h = p.top + p.height / 2 - $.height / 2 : d = p.left + p.width / 2 - $.width / 2;
792
- }
793
- i.$datepicker.style.cssText = "left: ".concat(d + Y, "px; top: ").concat(h + U, "px");
794
- }
795
- }), m(this, "_setInputValue", () => {
796
- let { opts: s, $altField: o, locale: { dateFormat: h } } = this, { altFieldDateFormat: d, altField: c } = s;
797
- c && o && (o.value = this._getInputValue(d)), this.$el.value = this._getInputValue(h);
798
- }), m(this, "_getInputValue", (s) => {
799
- let { selectedDates: o, opts: h } = this, { multipleDates: d, multipleDatesSeparator: c } = h;
800
- if (!o.length)
801
- return "";
802
- let u = typeof s == "function", p = u ? s(d ? o : o[0]) : o.map((g) => this.formatDate(g, s));
803
- return p = u ? p : p.join(c), p;
804
- }), m(this, "_checkIfDateIsSelected", function(s) {
805
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : l.days, h = !1;
806
- return i.selectedDates.some((d) => {
807
- let c = y(s, d, o);
808
- return h = c && d, c;
809
- }), h;
810
- }), m(this, "_scheduleCallAfterTransition", (s) => {
811
- this._cancelScheduledCall(), s && s(!1), this._onTransitionEnd = () => {
812
- s && s(!0);
813
- }, this.$datepicker.addEventListener("transitionend", this._onTransitionEnd, { once: !0 });
814
- }), m(this, "_cancelScheduledCall", () => {
815
- this.$datepicker.removeEventListener("transitionend", this._onTransitionEnd);
816
- }), m(this, "setViewDate", (s) => {
817
- if (!((s = M(s)) instanceof Date) || y(s, this.viewDate))
818
- return;
819
- let o = this.viewDate;
820
- this.viewDate = s;
821
- let { onChangeViewDate: h } = this.opts;
822
- if (h) {
823
- let { month: d, year: c } = this.parsedViewDate;
824
- h({ month: d, year: c, decade: this.curDecade });
825
- }
826
- this.trigger(l.eventChangeViewDate, s, o);
827
- }), m(this, "setFocusDate", function(s) {
828
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
829
- (!s || (s = M(s)) instanceof Date) && (i.focusDate = s, i.opts.range && s && i._handleRangeOnFocus(), i.trigger(l.eventChangeFocusDate, s, o));
830
- }), m(this, "setCurrentView", (s) => {
831
- if (this.viewIndexes.includes(s)) {
832
- if (this.currentView = s, this.elIsInput && this.visible && this.setPosition(void 0, !0), this.trigger(l.eventChangeCurrentView, s), !this.views[s]) {
833
- let o = this.views[s] = new ae({ dp: this, opts: this.opts, type: s });
834
- this.shouldUpdateDOM && this.$content.appendChild(o.$el);
835
- }
836
- this.opts.onChangeView && this.opts.onChangeView(s);
837
- }
838
- }), m(this, "_updateLastSelectedDate", (s) => {
839
- this.lastSelectedDate = s, this.trigger(l.eventChangeLastSelectedDate, s);
840
- }), m(this, "destroy", () => {
841
- let { showEvent: s, isMobile: o } = this.opts, h = this.$datepicker.parentNode;
842
- h && h.removeChild(this.$datepicker), this.$el.removeEventListener(s, this._onFocus), this.$el.removeEventListener("blur", this._onBlur), window.removeEventListener("resize", this._onResize), o && this._removeMobileAttributes(), this.keyboardNav && this.keyboardNav.destroy(), this.views = null, this.nav = null, this.$datepicker = null, this.opts = null, this.$customContainer = null, this.viewDate = null, this.focusDate = null, this.selectedDates = null, this.rangeDateFrom = null, this.rangeDateTo = null;
843
- }), m(this, "update", (s) => {
844
- let o = Z({}, this.opts);
845
- Z(this.opts, s);
846
- let { timepicker: h, buttons: d, range: c, selectedDates: u, isMobile: p } = this.opts, g = this.visible || this.treatAsInline;
847
- this._createMinMaxDates(), this._limitViewDateByMaxMinDates(), this._handleLocale(), !o.selectedDates && u && this.selectDate(u), s.view && this.setCurrentView(s.view), this._setInputValue(), o.range && !c ? (this.rangeDateTo = !1, this.rangeDateFrom = !1) : !o.range && c && this.selectedDates.length && (this.rangeDateFrom = this.selectedDates[0], this.rangeDateTo = this.selectedDates[1]), o.timepicker && !h ? (g && this.timepicker.destroy(), this.timepicker = !1, this.$timepicker.parentNode.removeChild(this.$timepicker)) : !o.timepicker && h && this._addTimepicker(), !o.buttons && d ? this._addButtons() : o.buttons && !d ? (this.buttons.destroy(), this.$buttons.parentNode.removeChild(this.$buttons)) : g && o.buttons && d && this.buttons.clearHtml().render(), !o.isMobile && p ? (this.treatAsInline || V || this._createMobileOverlay(), this._addMobileAttributes(), this.visible && this._showMobileOverlay()) : o.isMobile && !p && (this._removeMobileAttributes(), this.visible && (V.classList.remove("-active-"), typeof this.opts.position != "function" && this.setPosition())), g && (this.nav.update(), this.views[this.currentView].render(), this.currentView === l.days && this.views[this.currentView].renderDayNames());
848
- }), m(this, "isOtherMonth", (s) => {
849
- let { month: o } = v(s);
850
- return o !== this.parsedViewDate.month;
851
- }), m(this, "isOtherYear", (s) => {
852
- let { year: o } = v(s);
853
- return o !== this.parsedViewDate.year;
854
- }), m(this, "isOtherDecade", (s) => {
855
- let { year: o } = v(s), [h, d] = O(this.viewDate);
856
- return o < h || o > d;
857
- }), m(this, "_onChangeSelectedDate", (s) => {
858
- let { silent: o } = s;
859
- setTimeout(() => {
860
- this._setInputValue(), this.opts.onSelect && !o && this._triggerOnSelect();
861
- });
862
- }), m(this, "_onChangeFocusedDate", function(s) {
863
- let { viewDateTransition: o } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
864
- if (!s)
865
- return;
866
- let h = !1;
867
- o && (h = i.isOtherMonth(s) || i.isOtherYear(s) || i.isOtherDecade(s)), h && i.setViewDate(s);
868
- }), m(this, "_onChangeTime", (s) => {
869
- let { hours: o, minutes: h } = s, d = new Date(), { lastSelectedDate: c, opts: { onSelect: u } } = this, p = c;
870
- c || (p = d);
871
- let g = this.getCell(p, this.currentViewSingular), w = g && g.adpCell;
872
- w && w.isDisabled || (p.setHours(o), p.setMinutes(h), c ? (this._setInputValue(), u && this._triggerOnSelect()) : this.selectDate(p));
873
- }), m(this, "_onFocus", (s) => {
874
- this.visible || this.show();
875
- }), m(this, "_onBlur", (s) => {
876
- this.inFocus || !this.visible || this.opts.isMobile || this.hide();
877
- }), m(this, "_onMouseDown", (s) => {
878
- this.inFocus = !0;
879
- }), m(this, "_onMouseUp", (s) => {
880
- this.inFocus = !1, this.$el.focus();
881
- }), m(this, "_onResize", () => {
882
- this.visible && typeof this.opts.position != "function" && this.setPosition();
883
- }), m(this, "_onClickOverlay", () => {
884
- this.visible && this.hide();
885
- }), m(this, "isWeekend", (s) => this.opts.weekends.includes(s)), m(this, "getClampedDate", (s) => {
886
- let { minDate: o, maxDate: h } = this, d = s;
887
- return h && T(s, h) ? d = h : o && P(s, o) && (d = o), d;
888
- }), this.$el = f(e), !this.$el)
889
- return;
890
- this.$datepicker = k({ className: "air-datepicker" }), this.opts = Z({}, ie, t), this.$customContainer = !!this.opts.container && f(this.opts.container), this.$altField = f(this.opts.altField || !1), ee || (ee = f("body"));
891
- let { view: a, startDate: n } = this.opts;
892
- n || (this.opts.startDate = new Date()), this.$el.nodeName === "INPUT" && (this.elIsInput = !0), this.inited = !1, this.visible = !1, this.viewDate = M(this.opts.startDate), this.focusDate = !1, this.initialReadonly = this.$el.getAttribute("readonly"), this.customHide = !1, this.currentView = a, this.selectedDates = [], this.views = {}, this.keys = [], this.rangeDateFrom = "", this.rangeDateTo = "", this.timepickerIsActive = !1, this.treatAsInline = this.opts.inline || !this.elIsInput, this.init();
893
- }
894
- init() {
895
- let { opts: e, treatAsInline: t, opts: { inline: i, isMobile: a, selectedDates: n, keyboardNav: s, onlyTimepicker: o } } = this;
896
- var h;
897
- re || i || !this.elIsInput || (re = !0, J = k({ className: h = H.defaultContainerId, id: h }), ee.appendChild(J)), !a || V || t || this._createMobileOverlay(), this._handleLocale(), this._bindSubEvents(), this._createMinMaxDates(), this._limitViewDateByMaxMinDates(), this.elIsInput && (i || this._bindEvents(), s && !o && (this.keyboardNav = new ye({ dp: this, opts: e }))), n && this.selectDate(n, { silent: !0 }), this.opts.visible && !t && this.show(), a && !t && this.$el.setAttribute("readonly", !0), t && this._createComponents();
898
- }
899
- _createMobileOverlay() {
900
- V = k({ className: "air-datepicker-overlay" }), J.appendChild(V);
901
- }
902
- _createComponents() {
903
- let { opts: e, treatAsInline: t, opts: { inline: i, buttons: a, timepicker: n, position: s, classes: o, onlyTimepicker: h, isMobile: d } } = this;
904
- this._buildBaseHtml(), this.elIsInput && (i || this._setPositionClasses(s)), !i && this.elIsInput || this.$datepicker.classList.add("-inline-"), o && this.$datepicker.classList.add(...o.split(" ")), h && this.$datepicker.classList.add("-only-timepicker-"), d && !t && this._addMobileAttributes(), this.views[this.currentView] = new ae({ dp: this, type: this.currentView, opts: e }), this.nav = new me({ dp: this, opts: e }), n && this._addTimepicker(), a && this._addButtons(), this.$content.appendChild(this.views[this.currentView].$el), this.$nav.appendChild(this.nav.$el);
905
- }
906
- _destroyComponents() {
907
- for (let e in this.views)
908
- this.views[e].destroy();
909
- this.views = {}, this.nav.destroy(), this.timepicker && this.timepicker.destroy();
910
- }
911
- _addMobileAttributes() {
912
- V.addEventListener("click", this._onClickOverlay), this.$datepicker.classList.add("-is-mobile-"), this.$el.setAttribute("readonly", !0);
913
- }
914
- _removeMobileAttributes() {
915
- V.removeEventListener("click", this._onClickOverlay), this.$datepicker.classList.remove("-is-mobile-"), this.initialReadonly || this.initialReadonly === "" || this.$el.removeAttribute("readonly");
916
- }
917
- _createMinMaxDates() {
918
- let { minDate: e, maxDate: t } = this.opts;
919
- this.minDate = !!e && M(e), this.maxDate = !!t && M(t);
920
- }
921
- _addTimepicker() {
922
- this.$timepicker = k({ className: "air-datepicker--time" }), this.$datepicker.appendChild(this.$timepicker), this.timepicker = new ve({ dp: this, opts: this.opts }), this.$timepicker.appendChild(this.timepicker.$el);
923
- }
924
- _addButtons() {
925
- this.$buttons = k({ className: "air-datepicker--buttons" }), this.$datepicker.appendChild(this.$buttons), this.buttons = new ge({ dp: this, opts: this.opts }), this.$buttons.appendChild(this.buttons.$el);
926
- }
927
- _bindSubEvents() {
928
- this.on(l.eventChangeSelectedDate, this._onChangeSelectedDate), this.on(l.eventChangeFocusDate, this._onChangeFocusedDate), this.on(l.eventChangeTime, this._onChangeTime);
929
- }
930
- _buildBaseHtml() {
931
- let { inline: e } = this.opts;
932
- var t, i;
933
- this.elIsInput ? e ? (t = this.$datepicker, (i = this.$el).parentNode.insertBefore(t, i.nextSibling)) : this.$container.appendChild(this.$datepicker) : this.$el.appendChild(this.$datepicker), this.$datepicker.innerHTML = '<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>', this.$content = f(".air-datepicker--content", this.$datepicker), this.$pointer = f(".air-datepicker--pointer", this.$datepicker), this.$nav = f(".air-datepicker--navigation", this.$datepicker);
934
- }
935
- _handleLocale() {
936
- let { locale: e, dateFormat: t, firstDay: i, timepicker: a, onlyTimepicker: n, timeFormat: s, dateTimeSeparator: o } = this.opts;
937
- var h;
938
- this.locale = (h = e, JSON.parse(JSON.stringify(h))), t && (this.locale.dateFormat = t), s !== void 0 && s !== "" && (this.locale.timeFormat = s);
939
- let { timeFormat: d } = this.locale;
940
- if (i !== "" && (this.locale.firstDay = i), a && typeof t != "function") {
941
- let c = d ? o : "";
942
- this.locale.dateFormat = [this.locale.dateFormat, d || ""].join(c);
943
- }
944
- n && typeof t != "function" && (this.locale.dateFormat = this.locale.timeFormat);
945
- }
946
- _setPositionClasses(e) {
947
- if (typeof e == "function")
948
- return void this.$datepicker.classList.add("-custom-position-");
949
- let t = (e = e.split(" "))[0], i = e[1], a = "air-datepicker -".concat(t, "-").concat(i, "- -from-").concat(t, "-");
950
- this.$datepicker.classList.add(...a.split(" "));
951
- }
952
- _bindEvents() {
953
- this.$el.addEventListener(this.opts.showEvent, this._onFocus), this.$el.addEventListener("blur", this._onBlur), this.$datepicker.addEventListener("mousedown", this._onMouseDown), this.$datepicker.addEventListener("mouseup", this._onMouseUp), window.addEventListener("resize", this._onResize);
954
- }
955
- _limitViewDateByMaxMinDates() {
956
- let { viewDate: e, minDate: t, maxDate: i } = this;
957
- i && T(e, i) && this.setViewDate(i), t && P(e, t) && this.setViewDate(t);
958
- }
959
- formatDate() {
960
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.viewDate, t = arguments.length > 1 ? arguments[1] : void 0;
961
- if (e = M(e), !(e instanceof Date))
962
- return;
963
- let i = t, a = this.locale, n = v(e), s = O(e), o = H.replacer, h = "am";
964
- this.opts.timepicker && this.timepicker && (h = this.timepicker.getDayPeriod(e).dayPeriod);
965
- let d = { T: e.getTime(), m: n.minutes, mm: n.fullMinutes, h: n.hours12, hh: n.fullHours12, H: n.hours, HH: n.fullHours, aa: h, AA: h.toUpperCase(), E: a.daysShort[n.day], EEEE: a.days[n.day], d: n.date, dd: n.fullDate, M: n.month + 1, MM: n.fullMonth, MMM: a.monthsShort[n.month], MMMM: a.months[n.month], yy: n.year.toString().slice(-2), yyyy: n.year, yyyy1: s[0], yyyy2: s[1] };
966
- for (let [c, u] of Object.entries(d))
967
- i = o(i, Q(c), u);
968
- return i;
969
- }
970
- down(e) {
971
- this._handleUpDownActions(e, "down");
972
- }
973
- up(e) {
974
- this._handleUpDownActions(e, "up");
975
- }
976
- selectDate(e) {
977
- let t, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { currentView: a, parsedViewDate: n, selectedDates: s } = this, { updateTime: o } = i, { moveToOtherMonthsOnSelect: h, moveToOtherYearsOnSelect: d, multipleDates: c, range: u, autoClose: p } = this.opts, g = s.length;
978
- if (Array.isArray(e))
979
- return e.forEach((w) => {
980
- this.selectDate(w, i);
981
- }), new Promise((w) => {
982
- setTimeout(w);
983
- });
984
- if ((e = M(e)) instanceof Date) {
985
- if (a === l.days && e.getMonth() !== n.month && h && (t = new Date(e.getFullYear(), e.getMonth(), 1)), a === l.years && e.getFullYear() !== n.year && d && (t = new Date(e.getFullYear(), 0, 1)), t && this.setViewDate(t), c && !u) {
986
- if (g === c)
987
- return;
988
- this._checkIfDateIsSelected(e) || s.push(e);
989
- } else if (u)
990
- switch (g) {
991
- case 1:
992
- s.push(e), this.rangeDateTo || (this.rangeDateTo = e), T(this.rangeDateFrom, this.rangeDateTo) && (this.rangeDateTo = this.rangeDateFrom, this.rangeDateFrom = e), this.selectedDates = [this.rangeDateFrom, this.rangeDateTo];
993
- break;
994
- case 2:
995
- this.selectedDates = [e], this.rangeDateFrom = e, this.rangeDateTo = "";
996
- break;
997
- default:
998
- this.selectedDates = [e], this.rangeDateFrom = e;
999
- }
1000
- else
1001
- this.selectedDates = [e];
1002
- return this.trigger(l.eventChangeSelectedDate, { action: l.actionSelectDate, silent: i == null ? void 0 : i.silent, date: e, updateTime: o }), this._updateLastSelectedDate(e), p && !this.timepickerIsActive && this.visible && (c || u ? u && g === 1 && this.hide() : this.hide()), new Promise((w) => {
1003
- setTimeout(w);
1004
- });
1005
- }
1006
- }
1007
- unselectDate(e) {
1008
- let t = this.selectedDates, i = this;
1009
- if ((e = M(e)) instanceof Date)
1010
- return t.some((a, n) => {
1011
- if (y(a, e))
1012
- return t.splice(n, 1), i.selectedDates.length ? i._updateLastSelectedDate(i.selectedDates[i.selectedDates.length - 1]) : (i.rangeDateFrom = "", i.rangeDateTo = "", i._updateLastSelectedDate(!1)), this.trigger(l.eventChangeSelectedDate, { action: l.actionUnselectDate, date: e }), !0;
1013
- });
1014
- }
1015
- replaceDate(e, t) {
1016
- let i = this.selectedDates.find((n) => y(n, e, this.currentView)), a = this.selectedDates.indexOf(i);
1017
- a < 0 || y(this.selectedDates[a], t, this.currentView) || (this.selectedDates[a] = t, this.trigger(l.eventChangeSelectedDate, { action: l.actionSelectDate, date: t, updateTime: !0 }), this._updateLastSelectedDate(t));
1018
- }
1019
- clear() {
1020
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1021
- return this.selectedDates = [], this.rangeDateFrom = !1, this.rangeDateTo = !1, this.trigger(l.eventChangeSelectedDate, { action: l.actionUnselectDate, silent: e.silent }), new Promise((t) => {
1022
- setTimeout(t);
1023
- });
1024
- }
1025
- show() {
1026
- let { onShow: e, isMobile: t } = this.opts;
1027
- this._cancelScheduledCall(), this.visible || this.hideAnimation || this._createComponents(), this.setPosition(this.opts.position), this.$datepicker.classList.add("-active-"), this.visible = !0, e && this._scheduleCallAfterTransition(e), t && this._showMobileOverlay();
1028
- }
1029
- hide() {
1030
- let { onHide: e, isMobile: t } = this.opts, i = this._hasTransition();
1031
- this.visible = !1, this.hideAnimation = !0, this.$datepicker.classList.remove("-active-"), this.customHide && this.customHide(), this.elIsInput && this.$el.blur(), this._scheduleCallAfterTransition((a) => {
1032
- !this.customHide && (a && i || !a && !i) && this._finishHide(), e && e(a);
1033
- }), t && V.classList.remove("-active-");
1034
- }
1035
- _triggerOnSelect() {
1036
- let e = [], t = [], { selectedDates: i, locale: a, opts: { onSelect: n, multipleDates: s, range: o } } = this, h = s || o, d = typeof a.dateFormat == "function";
1037
- i.length && (e = i.map(X), t = d ? s ? a.dateFormat(e) : e.map((c) => a.dateFormat(c)) : e.map((c) => this.formatDate(c, a.dateFormat))), n({ date: h ? e : e[0], formattedDate: h ? t : t[0], datepicker: this });
1038
- }
1039
- _handleAlreadySelectedDates(e, t) {
1040
- let { range: i, toggleSelected: a } = this.opts;
1041
- i ? a ? this.unselectDate(t) : this.selectedDates.length !== 2 && this.selectDate(t) : a && this.unselectDate(t), a || this._updateLastSelectedDate(e);
1042
- }
1043
- _handleUpDownActions(e, t) {
1044
- if (!((e = M(e || this.focusDate || this.viewDate)) instanceof Date))
1045
- return;
1046
- let i = t === "up" ? this.viewIndex + 1 : this.viewIndex - 1;
1047
- i > 2 && (i = 2), i < 0 && (i = 0), this.setViewDate(new Date(e.getFullYear(), e.getMonth(), 1)), this.setCurrentView(this.viewIndexes[i]);
1048
- }
1049
- _handleRangeOnFocus() {
1050
- this.selectedDates.length === 1 && (T(this.selectedDates[0], this.focusDate) ? (this.rangeDateTo = this.selectedDates[0], this.rangeDateFrom = this.focusDate) : (this.rangeDateTo = this.focusDate, this.rangeDateFrom = this.selectedDates[0]));
1051
- }
1052
- getCell(e) {
1053
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : l.day;
1054
- if (!((e = M(e)) instanceof Date))
1055
- return;
1056
- let { year: i, month: a, date: n } = v(e), s = '[data-year="'.concat(i, '"]'), o = '[data-month="'.concat(a, '"]'), h = '[data-date="'.concat(n, '"]'), d = { [l.day]: "".concat(s).concat(o).concat(h), [l.month]: "".concat(s).concat(o), [l.year]: "".concat(s) };
1057
- return this.views[this.currentView].$el.querySelector(d[t]);
1058
- }
1059
- _showMobileOverlay() {
1060
- V.classList.add("-active-");
1061
- }
1062
- _hasTransition() {
1063
- return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((e, t) => parseFloat(t) + e, 0) > 0;
1064
- }
1065
- get shouldUpdateDOM() {
1066
- return this.visible || this.treatAsInline;
1067
- }
1068
- get parsedViewDate() {
1069
- return v(this.viewDate);
1070
- }
1071
- get currentViewSingular() {
1072
- return this.currentView.slice(0, -1);
1073
- }
1074
- get curDecade() {
1075
- return O(this.viewDate);
1076
- }
1077
- get viewIndex() {
1078
- return this.viewIndexes.indexOf(this.currentView);
1079
- }
1080
- get isFinalView() {
1081
- return this.currentView === l.years;
1082
- }
1083
- get hasSelectedDates() {
1084
- return this.selectedDates.length > 0;
1085
- }
1086
- get isMinViewReached() {
1087
- return this.currentView === this.opts.minView || this.currentView === l.days;
1088
- }
1089
- get $container() {
1090
- return this.$customContainer || J;
1091
- }
1092
- static replacer(e, t, i) {
1093
- return e.replace(t, function(a, n, s, o) {
1094
- return n + i + o;
1095
- });
1096
- }
1097
- }
1098
- var oe;
1099
- return m(H, "defaults", ie), m(H, "version", "3.3.0"), m(H, "defaultContainerId", "air-datepicker-global-container"), oe = H.prototype, Object.assign(oe, De), W.default;
1100
- }();
1101
- });
1102
- }), Me = de(function(D, b) {
1103
- Object.defineProperty(b, "__esModule", {
1104
- value: !0
1105
- }), b.default = void 0;
1106
- var F = {
1107
- days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
1108
- daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1109
- daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1110
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
1111
- monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1112
- today: "Today",
1113
- clear: "Clear",
1114
- dateFormat: "MM/dd/yyyy",
1115
- timeFormat: "hh:mm aa",
1116
- firstDay: 0
1117
- };
1118
- b.default = F;
1119
- });
1120
- const $e = /* @__PURE__ */ ke(Me), Se = ':host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.air-datepicker--pointer{display:none}.air-datepicker-nav{display:flex;margin-bottom:var(--s-space-8);align-items:center}.air-datepicker-nav--action{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border-radius:50%;color:var(--s-icon-highlight);cursor:pointer;order:2}.air-datepicker-nav--action:hover{background-color:var(--s-surface-overlay-hovered)}.air-datepicker-nav--title{padding:var(--s-space-8);flex-grow:1;border-radius:var(--s-border-radius-s);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer;order:0}.air-datepicker-nav--title i{font-style:normal}.air-datepicker-body--day-names{display:flex;margin-bottom:var(--s-space-8);justify-content:space-between;align-items:center}.air-datepicker-body--day-name{display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);aspect-ratio:1}.air-datepicker-body--cells{position:relative;z-index:1;display:flex;flex-wrap:wrap;justify-content:space-between}.air-datepicker-body--cells.-months-{gap:var(--s-space-2)}.air-datepicker-cell{position:relative;display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.air-datepicker-cell:not(.-month-):not(.-year-):not(.-in-range-):hover:before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-overlay-hovered);content:"";inset:0}.air-datepicker-cell.-month-,.air-datepicker-cell.-year-{height:2.5rem;flex-basis:calc(100 / 3 * 1% - var(--s-space-2) * 2);border-radius:var(--s-border-radius-s);aspect-ratio:auto}.air-datepicker-cell.-month-.-in-range-:before,.air-datepicker-cell.-year-.-in-range-:before{border-radius:var(--s-border-radius-s)}.air-datepicker-cell.-month-:hover:not(.-in-range-):not(.-selected-),.air-datepicker-cell.-year-:hover:not(.-in-range-):not(.-selected-){background-color:var(--s-surface-overlay-hovered)}.air-datepicker-cell.-other-month-{color:var(--s-text-subdued)}.air-datepicker-cell.-current-:not(.-month-):not(.-year-):after{position:absolute;z-index:-1;border:var(--s-border-width-default) solid var(--s-border-highlight);border-radius:50%;content:"";inset:0}.air-datepicker-cell.-selected-{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-selected-.-year-,.air-datepicker-cell.-selected-.-month-{background-color:var(--s-surface-highlight-default)}.air-datepicker-cell.-selected-:not(.-month-):not(.-year-):not(.-in-range-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-disabled-{color:var(--s-text-subdued);cursor:default}.air-datepicker-cell.-disabled-:hover{background-color:transparent}.air-datepicker-cell.-in-range-:before{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):after{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:50%;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):after{position:absolute;z-index:-1;top:0.0625rem;right:50%;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.-hidden-{display:none}', Te = class {
1121
- constructor(D) {
1122
- le(this, D), this.valueChange = we(this, "valueChange", 3), this.locale = $e, this.onClick = (b) => {
1123
- b.stopPropagation(), b.preventDefault();
1124
- };
1125
- }
1126
- watchProps() {
1127
- this.init();
1128
- }
1129
- componentDidLoad() {
1130
- this.init();
1131
- }
1132
- disconnectedCallback() {
1133
- var D;
1134
- (D = this.picker) === null || D === void 0 || D.destroy();
1135
- }
1136
- init() {
1137
- var D;
1138
- (D = this.picker) === null || D === void 0 || D.destroy();
1139
- let b;
1140
- this.value === void 0 ? b = void 0 : Array.isArray(this.value) ? b = this.value : b = [this.value], this.picker = new _e(this.containerEl, {
1141
- classes: "date-picker",
1142
- inline: !0,
1143
- locale: this.locale,
1144
- maxDate: this.maxDate,
1145
- minDate: this.minDate,
1146
- minView: "days",
1147
- nextHtml: "<flip-icon-chevron-right></flip-icon-chevron-right>",
1148
- onSelect: ({ date: F }) => {
1149
- this.valueChange.emit(F);
1150
- },
1151
- prevHtml: "<flip-icon-chevron-left></flip-icon-chevron-left>",
1152
- range: this.range,
1153
- selectedDates: b,
1154
- startDate: this.startDate,
1155
- toggleSelected: !this.range,
1156
- view: "days"
1157
- });
1158
- }
1159
- render() {
1160
- return x(be, { onClick: this.onClick }, x("div", { ref: (D) => this.containerEl = D }));
1161
- }
1162
- static get watchers() {
1163
- return {
1164
- locale: ["watchProps"],
1165
- maxDate: ["watchProps"],
1166
- minDate: ["watchProps"],
1167
- range: ["watchProps"],
1168
- startDate: ["watchProps"],
1169
- value: ["watchProps"]
1170
- };
1171
- }
1172
- };
1173
- Te.style = Se;
1174
- const Ve = ":host{display:inline-flex}", xe = class {
1175
- constructor(D) {
1176
- le(this, D), this.size = 24;
1177
- }
1178
- render() {
1179
- return x("svg", { class: "flip-icon", fill: "none", height: this.size, part: "icon", viewBox: `0 0 ${this.size} ${this.size}`, width: this.size, xmlns: "http://www.w3.org/2000/svg" }, this.size === 16 && x(te, null, x("path", { d: "M6 11C5.53333 11 5.13889 10.8389 4.81667 10.5167C4.49444 10.1945 4.33333 9.80004 4.33333 9.33337C4.33333 8.86671 4.49444 8.47226 4.81667 8.15004C5.13889 7.82782 5.53333 7.66671 6 7.66671C6.46667 7.66671 6.86111 7.82782 7.18333 8.15004C7.50556 8.47226 7.66667 8.86671 7.66667 9.33337C7.66667 9.80004 7.50556 10.1945 7.18333 10.5167C6.86111 10.8389 6.46667 11 6 11ZM3.33333 14.6667C2.96667 14.6667 2.65267 14.5363 2.39133 14.2754C2.13044 14.014 2 13.7 2 13.3334V4.00004C2 3.63337 2.13044 3.3196 2.39133 3.05871C2.65267 2.79737 2.96667 2.66671 3.33333 2.66671H4V2.00004C4 1.81115 4.06378 1.65271 4.19133 1.52471C4.31933 1.39715 4.47778 1.33337 4.66667 1.33337C4.85556 1.33337 5.014 1.39715 5.142 1.52471C5.26956 1.65271 5.33333 1.81115 5.33333 2.00004V2.66671H10.6667V2.00004C10.6667 1.81115 10.7307 1.65271 10.8587 1.52471C10.9862 1.39715 11.1444 1.33337 11.3333 1.33337C11.5222 1.33337 11.6804 1.39715 11.808 1.52471C11.936 1.65271 12 1.81115 12 2.00004V2.66671H12.6667C13.0333 2.66671 13.3473 2.79737 13.6087 3.05871C13.8696 3.3196 14 3.63337 14 4.00004V13.3334C14 13.7 13.8696 14.014 13.6087 14.2754C13.3473 14.5363 13.0333 14.6667 12.6667 14.6667H3.33333ZM3.33333 13.3334H12.6667V6.66671H3.33333V13.3334Z", fill: "currentColor" })), this.size === 24 && x(te, null, x("path", { d: "M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20Z", fill: "currentColor" })), this.size === 28 && x(te, null, x("path", { d: "M10.5 19.25C9.68333 19.25 8.99306 18.9681 8.42917 18.4042C7.86528 17.8403 7.58333 17.15 7.58333 16.3334C7.58333 15.5167 7.86528 14.8264 8.42917 14.2625C8.99306 13.6987 9.68333 13.4167 10.5 13.4167C11.3167 13.4167 12.0069 13.6987 12.5708 14.2625C13.1347 14.8264 13.4167 15.5167 13.4167 16.3334C13.4167 17.15 13.1347 17.8403 12.5708 18.4042C12.0069 18.9681 11.3167 19.25 10.5 19.25ZM5.83333 25.6667C5.19167 25.6667 4.64217 25.4384 4.18483 24.9819C3.72828 24.5245 3.5 23.975 3.5 23.3334V7.00004C3.5 6.35837 3.72828 5.80926 4.18483 5.35271C4.64217 4.89537 5.19167 4.66671 5.83333 4.66671H7V3.50004C7 3.16949 7.11161 2.89221 7.33483 2.66821C7.55883 2.44499 7.83611 2.33337 8.16667 2.33337C8.49722 2.33337 8.7745 2.44499 8.9985 2.66821C9.22172 2.89221 9.33333 3.16949 9.33333 3.50004V4.66671H18.6667V3.50004C18.6667 3.16949 18.7787 2.89221 19.0027 2.66821C19.2259 2.44499 19.5028 2.33337 19.8333 2.33337C20.1639 2.33337 20.4408 2.44499 20.664 2.66821C20.888 2.89221 21 3.16949 21 3.50004V4.66671H22.1667C22.8083 4.66671 23.3578 4.89537 23.8152 5.35271C24.2717 5.80926 24.5 6.35837 24.5 7.00004V23.3334C24.5 23.975 24.2717 24.5245 23.8152 24.9819C23.3578 25.4384 22.8083 25.6667 22.1667 25.6667H5.83333ZM5.83333 23.3334H22.1667V11.6667H5.83333V23.3334Z", fill: "currentColor" })));
1180
- }
1181
- };
1182
- xe.style = Ve;
1183
- export {
1184
- Te as flip_date_picker,
1185
- xe as flip_icon_today
1186
- };