@getflip/swirl-components-react 0.11.0 → 0.13.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 (166) 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.7f94c2d2.js → file-manager.entry.44afe574.js} +2 -2
  4. package/dist/{floating-ui.dom.esm-1a4e8b8a.87557233.js → floating-ui.dom.esm-b9f28f6d.15013ef7.js} +0 -0
  5. package/dist/{index-c3028f7d.557956d2.js → index-47862d62.75c2fcf1.js} +1 -1
  6. package/dist/index.d74835eb.js +1416 -0
  7. package/dist/stencil-generated/index.d.ts +3 -0
  8. package/dist/{swirl-action-list-item.entry.447b2688.js → swirl-action-list-item.entry.22d34bbd.js} +9 -9
  9. package/dist/{swirl-action-list-section.entry.e84808c9.js → swirl-action-list-section.entry.c91e7d7a.js} +6 -6
  10. package/dist/{swirl-action-list.entry.2fb802dc.js → swirl-action-list.entry.0d2936d4.js} +2 -2
  11. package/dist/{swirl-app-layout_5.entry.875542b9.js → swirl-app-layout_5.entry.abd68f10.js} +72 -72
  12. package/dist/{swirl-autocomplete.entry.7be53f33.js → swirl-autocomplete.entry.ca2df230.js} +11 -11
  13. package/dist/{swirl-avatar-group.entry.38bafbf0.js → swirl-avatar-group.entry.c4e75b36.js} +5 -5
  14. package/dist/{swirl-avatar.entry.6107d926.js → swirl-avatar.entry.46fb8405.js} +13 -13
  15. package/dist/{swirl-badge.entry.1f4d89cf.js → swirl-badge.entry.d2d0941a.js} +4 -4
  16. package/dist/{swirl-banner.entry.2d29edfc.js → swirl-banner.entry.55c2e81c.js} +7 -7
  17. package/dist/{swirl-button-group.entry.8ce93c3c.js → swirl-button-group.entry.2a7f639c.js} +7 -7
  18. package/dist/{swirl-button.entry.42b57f80.js → swirl-button.entry.4fb44693.js} +22 -22
  19. package/dist/{swirl-card.entry.a09d5cdf.js → swirl-card.entry.ae45d1e4.js} +6 -6
  20. package/dist/{swirl-checkbox.entry.58064458.js → swirl-checkbox.entry.4fd6f222.js} +12 -12
  21. package/dist/{swirl-chip.entry.b6b676d6.js → swirl-chip.entry.d023e9b6.js} +9 -9
  22. package/dist/swirl-components-react.js +105 -102
  23. package/dist/swirl-components-react.umd.cjs +77 -42
  24. package/dist/{swirl-console-layout.entry.88cca8db.js → swirl-console-layout.entry.57e74dab.js} +16 -16
  25. package/dist/{swirl-date-input.entry.1ff3f34d.js → swirl-date-input.entry.9a19f65d.js} +622 -619
  26. package/dist/swirl-date-picker_2.entry.9bad1948.js +37 -0
  27. package/dist/{swirl-description-list-item.entry.e5e7327a.js → swirl-description-list-item.entry.2872cecd.js} +2 -2
  28. package/dist/{swirl-description-list.entry.b451e1b2.js → swirl-description-list.entry.e98b5f6a.js} +1 -1
  29. package/dist/{swirl-dialog.entry.27d08ab3.js → swirl-dialog.entry.3c314ce8.js} +5 -5
  30. package/dist/{swirl-file-uploader.entry.6c075751.js → swirl-file-uploader.entry.a961108f.js} +5 -5
  31. package/dist/{swirl-file-viewer_7.entry.2d664fd5.js → swirl-file-viewer_7.entry.80730f50.js} +13 -13
  32. package/dist/swirl-form-control.entry.7b7792b7.js +70 -0
  33. package/dist/{swirl-form-group.entry.f58b5fda.js → swirl-form-group.entry.8ab35b6b.js} +3 -3
  34. package/dist/{swirl-heading.entry.1761ccaf.js → swirl-heading.entry.f6f15b36.js} +20 -10
  35. package/dist/{swirl-icon-add-photo.entry.2be32855.js → swirl-icon-add-photo.entry.e834d584.js} +3 -3
  36. package/dist/{swirl-icon-add_4.entry.54bb7e89.js → swirl-icon-add_4.entry.7a361599.js} +3 -3
  37. package/dist/{swirl-icon-admin-panel-settings.entry.a43bcc7d.js → swirl-icon-admin-panel-settings.entry.d609d64c.js} +3 -3
  38. package/dist/{swirl-icon-arrow-back.entry.ee4ddf1e.js → swirl-icon-arrow-back.entry.8acd2db8.js} +3 -3
  39. package/dist/{swirl-icon-arrow-downward_2.entry.74231d7a.js → swirl-icon-arrow-downward_2.entry.2444d544.js} +3 -3
  40. package/dist/{swirl-icon-arrow-forward.entry.a895e898.js → swirl-icon-arrow-forward.entry.7faa307c.js} +3 -3
  41. package/dist/{swirl-icon-arrow-left_3.entry.6ea8dad5.js → swirl-icon-arrow-left_3.entry.8aafc12d.js} +3 -3
  42. package/dist/{swirl-icon-arrow-right-small.entry.daf39424.js → swirl-icon-arrow-right-small.entry.b71661c0.js} +3 -3
  43. package/dist/{swirl-icon-attachment.entry.2cb8c35f.js → swirl-icon-attachment.entry.9953efe2.js} +3 -3
  44. package/dist/{swirl-icon-block.entry.0d7f0e2b.js → swirl-icon-block.entry.1e6aeb65.js} +3 -3
  45. package/dist/{swirl-icon-cancel_4.entry.2943f0c0.js → swirl-icon-cancel_4.entry.6fb2872f.js} +3 -3
  46. package/dist/{swirl-icon-chat-bubble.entry.66624624.js → swirl-icon-chat-bubble.entry.0b5c13c1.js} +3 -3
  47. package/dist/{swirl-icon-chats-filled.entry.83e0eeb7.js → swirl-icon-chats-filled.entry.f2c5a42a.js} +3 -3
  48. package/dist/{swirl-icon-chats-outlined.entry.f768aca8.js → swirl-icon-chats-outlined.entry.b37c9fd2.js} +3 -3
  49. package/dist/{swirl-icon-check-circle.entry.03a596c7.js → swirl-icon-check-circle.entry.9a3ba07b.js} +3 -3
  50. package/dist/swirl-icon-check-small_4.entry.0b082015.js +1468 -0
  51. package/dist/{swirl-icon-check-strong.entry.88cfb7b3.js → swirl-icon-check-strong.entry.32e1c97e.js} +3 -3
  52. package/dist/{swirl-icon-check.entry.360c5b8c.js → swirl-icon-check.entry.965b4009.js} +3 -3
  53. package/dist/{swirl-icon-chevron-left.entry.d6f5077d.js → swirl-icon-chevron-left.entry.ca081027.js} +3 -3
  54. package/dist/{swirl-icon-chevron-right.entry.4cbdaed5.js → swirl-icon-chevron-right.entry.d63b1c26.js} +3 -3
  55. package/dist/{swirl-icon-close-small.entry.d223e192.js → swirl-icon-close-small.entry.3785692a.js} +3 -3
  56. package/dist/{swirl-icon-close.entry.eee59783.js → swirl-icon-close.entry.7d6556d2.js} +3 -3
  57. package/dist/{swirl-icon-cloud-upload.entry.b50d30c3.js → swirl-icon-cloud-upload.entry.ee85d552.js} +3 -3
  58. package/dist/{swirl-icon-column.entry.07e869e3.js → swirl-icon-column.entry.d0591e93.js} +3 -3
  59. package/dist/{swirl-icon-comment.entry.221fe61a.js → swirl-icon-comment.entry.43355ec3.js} +3 -3
  60. package/dist/{swirl-icon-copy.entry.d113e5bb.js → swirl-icon-copy.entry.a9739808.js} +3 -3
  61. package/dist/{swirl-icon-date-range.entry.a1eb0554.js → swirl-icon-date-range.entry.c774ab8b.js} +3 -3
  62. package/dist/{swirl-icon-delete.entry.ebcf7073.js → swirl-icon-delete.entry.bf4b1f3b.js} +3 -3
  63. package/dist/{swirl-icon-description.entry.fb0d88a1.js → swirl-icon-description.entry.b8f1d590.js} +3 -3
  64. package/dist/{swirl-icon-edit.entry.c6cf867f.js → swirl-icon-edit.entry.1a96f349.js} +3 -3
  65. package/dist/{swirl-icon-emoji-mood.entry.bf9ee6c2.js → swirl-icon-emoji-mood.entry.f0ea6dc7.js} +3 -3
  66. package/dist/{swirl-icon-emoji-satisfied.entry.df8c1d60.js → swirl-icon-emoji-satisfied.entry.bacaef7c.js} +3 -3
  67. package/dist/{swirl-icon-error_3.entry.c21fbb54.js → swirl-icon-error_3.entry.77f2e57a.js} +13 -13
  68. package/dist/{swirl-icon-expand-more.entry.bbde4949.js → swirl-icon-expand-more.entry.5cf4f099.js} +3 -3
  69. package/dist/{swirl-icon-file.entry.7ab04321.js → swirl-icon-file.entry.b7c820e1.js} +3 -3
  70. package/dist/{swirl-icon-filter.entry.95211f5f.js → swirl-icon-filter.entry.25e3c016.js} +3 -3
  71. package/dist/{swirl-icon-folder-shared.entry.052229e9.js → swirl-icon-folder-shared.entry.8c6badf3.js} +3 -3
  72. package/dist/{swirl-icon-group-assign.entry.bb3ba16d.js → swirl-icon-group-assign.entry.5f9bcfc3.js} +3 -3
  73. package/dist/{swirl-icon-groups-custom.entry.89cb31bf.js → swirl-icon-groups-custom.entry.822d8779.js} +3 -3
  74. package/dist/{swirl-icon-groups-filled.entry.8e4dd776.js → swirl-icon-groups-filled.entry.acb66d44.js} +3 -3
  75. package/dist/{swirl-icon-groups-outlined.entry.d257fa35.js → swirl-icon-groups-outlined.entry.ccdaa445.js} +3 -3
  76. package/dist/{swirl-icon-groups.entry.eb164fa2.js → swirl-icon-groups.entry.6a86024e.js} +3 -3
  77. package/dist/{swirl-icon-help.entry.95af80fe.js → swirl-icon-help.entry.b993b08d.js} +3 -3
  78. package/dist/{swirl-icon-image.entry.ac7fce8a.js → swirl-icon-image.entry.f2786c07.js} +3 -3
  79. package/dist/{swirl-icon-info.entry.7bea6932.js → swirl-icon-info.entry.a37b48cb.js} +3 -3
  80. package/dist/{swirl-icon-inventory.entry.7bb8c552.js → swirl-icon-inventory.entry.d51e9d40.js} +3 -3
  81. package/dist/{swirl-icon-like.entry.ec92b9fd.js → swirl-icon-like.entry.d2bff5cf.js} +3 -3
  82. package/dist/{swirl-icon-link.entry.f3d5937c.js → swirl-icon-link.entry.dd2ec94a.js} +3 -3
  83. package/dist/{swirl-icon-lock.entry.807d8a95.js → swirl-icon-lock.entry.dd827390.js} +3 -3
  84. package/dist/{swirl-icon-logout.entry.4f31d257.js → swirl-icon-logout.entry.37e7dbf7.js} +3 -3
  85. package/dist/{swirl-icon-mail.entry.54c49af9.js → swirl-icon-mail.entry.aa5549f0.js} +3 -3
  86. package/dist/{swirl-icon-manage-accounts.entry.8bc3721c.js → swirl-icon-manage-accounts.entry.0ea7b173.js} +3 -3
  87. package/dist/{swirl-icon-mention.entry.5cf61986.js → swirl-icon-mention.entry.625f0842.js} +3 -3
  88. package/dist/{swirl-icon-menu-filled.entry.1597fcdc.js → swirl-icon-menu-filled.entry.831e831b.js} +3 -3
  89. package/dist/{swirl-icon-menu-outlined.entry.05c230c7.js → swirl-icon-menu-outlined.entry.eefcb24d.js} +3 -3
  90. package/dist/{swirl-icon-menu.entry.eb38317a.js → swirl-icon-menu.entry.1cc3453e.js} +3 -3
  91. package/dist/{swirl-icon-message.entry.3f3b0ee6.js → swirl-icon-message.entry.2b7599f4.js} +3 -3
  92. package/dist/{swirl-icon-more-horizontal.entry.746bde39.js → swirl-icon-more-horizontal.entry.b5c24b7a.js} +3 -3
  93. package/dist/{swirl-icon-more-vertikal.entry.bf9342ef.js → swirl-icon-more-vertikal.entry.04d7e5a6.js} +3 -3
  94. package/dist/{swirl-icon-news-filled.entry.1c1d78f8.js → swirl-icon-news-filled.entry.6190c1e5.js} +3 -3
  95. package/dist/{swirl-icon-news-outlined.entry.76c94ea9.js → swirl-icon-news-outlined.entry.e547af31.js} +3 -3
  96. package/dist/{swirl-icon-notifications-active.entry.d8c49de6.js → swirl-icon-notifications-active.entry.443daf87.js} +3 -3
  97. package/dist/{swirl-icon-notifications-off.entry.2c8866a8.js → swirl-icon-notifications-off.entry.9c7a77ac.js} +3 -3
  98. package/dist/{swirl-icon-notifications.entry.a5c7b275.js → swirl-icon-notifications.entry.486efc01.js} +3 -3
  99. package/dist/{swirl-icon-open-in-new.entry.128350f5.js → swirl-icon-open-in-new.entry.9a6a0052.js} +3 -3
  100. package/dist/{swirl-icon-people-alt.entry.7ac6d23a.js → swirl-icon-people-alt.entry.d3886045.js} +3 -3
  101. package/dist/{swirl-icon-person-off.entry.fda1c4d4.js → swirl-icon-person-off.entry.b3ea5502.js} +3 -3
  102. package/dist/{swirl-icon-person.entry.19fc5367.js → swirl-icon-person.entry.13a5b347.js} +3 -3
  103. package/dist/{swirl-icon-phone.entry.73cfee35.js → swirl-icon-phone.entry.0634bc2d.js} +3 -3
  104. package/dist/{swirl-icon-poll.entry.4ab05380.js → swirl-icon-poll.entry.048d86d7.js} +3 -3
  105. package/dist/{swirl-icon-print.entry.cd89ebc5.js → swirl-icon-print.entry.bccea0d9.js} +3 -3
  106. package/dist/{swirl-icon-recieved.entry.56d93432.js → swirl-icon-recieved.entry.549226c8.js} +3 -3
  107. package/dist/{swirl-icon-search-strong.entry.904a6694.js → swirl-icon-search-strong.entry.5038a3d3.js} +3 -3
  108. package/dist/{swirl-icon-search.entry.cf65f83f.js → swirl-icon-search.entry.933cda43.js} +3 -3
  109. package/dist/{swirl-icon-send.entry.56297757.js → swirl-icon-send.entry.570f8888.js} +3 -3
  110. package/dist/{swirl-icon-settings.entry.1c988cf1.js → swirl-icon-settings.entry.4267149c.js} +3 -3
  111. package/dist/{swirl-icon-sync.entry.b88dd7b8.js → swirl-icon-sync.entry.fdfe7aba.js} +3 -3
  112. package/dist/{swirl-icon-tasks-filled.entry.b2bf1c6e.js → swirl-icon-tasks-filled.entry.ded975a6.js} +3 -3
  113. package/dist/{swirl-icon-tasks-outlined.entry.09551261.js → swirl-icon-tasks-outlined.entry.9774132f.js} +3 -3
  114. package/dist/{swirl-icon-time-filled.entry.4954d002.js → swirl-icon-time-filled.entry.300bac3f.js} +3 -3
  115. package/dist/{swirl-icon-time-outlined.entry.697e9656.js → swirl-icon-time-outlined.entry.aff5bc33.js} +3 -3
  116. package/dist/{swirl-icon-user-assign.entry.fe5b582b.js → swirl-icon-user-assign.entry.eb8db1a8.js} +3 -3
  117. package/dist/{swirl-icon-video-camera.entry.d4707dde.js → swirl-icon-video-camera.entry.8855fd0a.js} +3 -3
  118. package/dist/{swirl-icon-warning.entry.69762f5b.js → swirl-icon-warning.entry.4b60bf85.js} +3 -3
  119. package/dist/{swirl-lightbox.entry.bae60d38.js → swirl-lightbox.entry.03ab7b33.js} +6 -6
  120. package/dist/{swirl-link.entry.3d52e8ef.js → swirl-link.entry.ab3a7bd8.js} +3 -3
  121. package/dist/{swirl-list.entry.53688da6.js → swirl-list.entry.ab67b563.js} +1 -1
  122. package/dist/{swirl-modal.entry.4bf5e6c3.js → swirl-modal.entry.4e72a21b.js} +15 -15
  123. package/dist/{swirl-option-list-section.entry.898ea907.js → swirl-option-list-section.entry.e98eecf1.js} +6 -6
  124. package/dist/{swirl-pagination.entry.b892dbdb.js → swirl-pagination.entry.c9d0b689.js} +8 -8
  125. package/dist/{swirl-pdf-reader.entry.28aa5b27.js → swirl-pdf-reader.entry.fbcbb9bf.js} +7 -7
  126. package/dist/{swirl-popover.entry.3e96f1d7.js → swirl-popover.entry.4ef4ee64.js} +8 -8
  127. package/dist/{swirl-progress-indicator.entry.30f3d224.js → swirl-progress-indicator.entry.c61c12fe.js} +4 -4
  128. package/dist/{swirl-radio-group.entry.9cbdf732.js → swirl-radio-group.entry.c311185d.js} +2 -2
  129. package/dist/{swirl-radio.entry.7a24ed80.js → swirl-radio.entry.257ccde8.js} +7 -7
  130. package/dist/{swirl-resource-list-file-item.entry.c7c3d567.js → swirl-resource-list-file-item.entry.6fa9004b.js} +7 -7
  131. package/dist/{swirl-search.entry.19702179.js → swirl-search.entry.8302bf45.js} +8 -8
  132. package/dist/swirl-select.entry.aba0219a.js +49 -0
  133. package/dist/{swirl-separator.entry.6dfbb1a4.js → swirl-separator.entry.ef60c75d.js} +1 -1
  134. package/dist/swirl-skeleton-box.entry.bd0d35d2.js +30 -0
  135. package/dist/swirl-skeleton-text.entry.c803a988.js +39 -0
  136. package/dist/{swirl-stack.entry.43f00bc0.js → swirl-stack.entry.b5fa46e8.js} +3 -3
  137. package/dist/{swirl-switch.entry.eaba1cc3.js → swirl-switch.entry.049b12c8.js} +13 -13
  138. package/dist/swirl-tab.entry.eab57d24.js +18 -0
  139. package/dist/{swirl-table-cell.entry.5cacafda.js → swirl-table-cell.entry.ed35c446.js} +1 -1
  140. package/dist/{swirl-table-column.entry.d66cfcf5.js → swirl-table-column.entry.e61f908d.js} +3 -3
  141. package/dist/{swirl-table-row-group.entry.4273e651.js → swirl-table-row-group.entry.bb48715f.js} +2 -2
  142. package/dist/{swirl-table-row.entry.1f98e36b.js → swirl-table-row.entry.bee5e4a9.js} +7 -7
  143. package/dist/{swirl-table.entry.5a37f233.js → swirl-table.entry.f59b9b3e.js} +12 -12
  144. package/dist/{swirl-tabs.entry.a932c6b9.js → swirl-tabs.entry.7810e64a.js} +4 -4
  145. package/dist/{swirl-tag.entry.2fd7c670.js → swirl-tag.entry.679951ac.js} +10 -10
  146. package/dist/{swirl-text-input.entry.c1eb2d9c.js → swirl-text-input.entry.bddd1dae.js} +12 -11
  147. package/dist/swirl-text.entry.9806d4db.js +31 -0
  148. package/dist/{swirl-theme-provider.entry.5bf11693.js → swirl-theme-provider.entry.ece49018.js} +13 -13
  149. package/dist/{swirl-thumbnail.entry.3b230d52.js → swirl-thumbnail.entry.342f1f8c.js} +7 -7
  150. package/dist/{swirl-toast-provider.entry.da18eaab.js → swirl-toast-provider.entry.2788262d.js} +6 -6
  151. package/dist/{swirl-toast.entry.d0f32449.js → swirl-toast.entry.0e7927ba.js} +7 -7
  152. package/dist/{swirl-tooltip.entry.e444ef8c.js → swirl-tooltip.entry.c8f0bd4f.js} +4 -4
  153. package/dist/{swirl-tree-navigation-item.entry.49118257.js → swirl-tree-navigation-item.entry.d5c4aec7.js} +7 -7
  154. package/dist/{swirl-video-thumbnail.entry.786a3d11.js → swirl-video-thumbnail.entry.2e7f4010.js} +2 -2
  155. package/dist/{swirl-visually-hidden.entry.1da622ab.js → swirl-visually-hidden.entry.7e057e1b.js} +1 -1
  156. package/dist/utils-33d31b58.1488fcfe.js +46 -0
  157. package/dist/wc-datepicker.entry.8c191661.js +269 -0
  158. package/package.json +2 -2
  159. package/dist/index.9489626d.js +0 -1393
  160. package/dist/swirl-date-picker_2.entry.e9905308.js +0 -1188
  161. package/dist/swirl-form-control.entry.89293c5d.js +0 -65
  162. package/dist/swirl-icon-check-small_3.entry.b2362b00.js +0 -153
  163. package/dist/swirl-select.entry.3ff36072.js +0 -48
  164. package/dist/swirl-tab.entry.982c6bc3.js +0 -18
  165. package/dist/swirl-text.entry.ec8c8813.js +0 -18
  166. package/dist/utils-7efaa1c6.4a9c3721.js +0 -42
@@ -1,1188 +0,0 @@
1
- import { r as le, c as we, h as x, H as be, F as te } from "./index.9489626d.js";
2
- import { c as de, a as Ce, g as ke } from "./_commonjsHelpers-44457d8d.ba94af77.js";
3
- import { c as _e } from "./index-c3028f7d.557956d2.js";
4
- import "react";
5
- import "react-dom";
6
- var Me = de(function(y, f) {
7
- (function(F, W) {
8
- y.exports = W();
9
- })(Ce, function() {
10
- return function() {
11
- var F = { d: function(r, e) {
12
- for (var t in e)
13
- F.o(e, t) && !F.o(r, t) && Object.defineProperty(r, t, { enumerable: !0, get: e[t] });
14
- }, o: function(r, e) {
15
- return Object.prototype.hasOwnProperty.call(r, e);
16
- } }, W = {};
17
- F.d(W, { default: function() {
18
- return H;
19
- } });
20
- 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 };
21
- function w(r) {
22
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document;
23
- return typeof r == "string" ? e.querySelector(r) : r;
24
- }
25
- function k() {
26
- 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);
27
- return e && n.classList.add(...e.split(" ")), i && (n.id = i), t && (n.innerHTML = t), a && G(n, a), n;
28
- }
29
- function G(r, e) {
30
- for (let [t, i] of Object.entries(e))
31
- i !== void 0 && r.setAttribute(t, i);
32
- return r;
33
- }
34
- function se(r) {
35
- return new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate();
36
- }
37
- function v(r) {
38
- let e = r.getHours(), t = e % 12 == 0 ? 12 : e % 12;
39
- 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() };
40
- }
41
- function I(r) {
42
- return r < 10 ? "0" + r : r;
43
- }
44
- function O(r) {
45
- let e = 10 * Math.floor(r.getFullYear() / 10);
46
- return [e, e + 9];
47
- }
48
- function S() {
49
- let r = [];
50
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
51
- t[i] = arguments[i];
52
- return t.forEach((a) => {
53
- if (typeof a == "object")
54
- for (let n in a)
55
- a[n] && r.push(n);
56
- else
57
- a && r.push(a);
58
- }), r.join(" ");
59
- }
60
- function D(r, e) {
61
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : l.days;
62
- if (!r || !e)
63
- return !1;
64
- let i = v(r), a = v(e);
65
- 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];
66
- }
67
- function T(r, e, t) {
68
- let i = X(r, !1).getTime(), a = X(e, !1).getTime();
69
- return t ? i >= a : i > a;
70
- }
71
- function P(r, e) {
72
- return !T(r, e, !0);
73
- }
74
- function X(r) {
75
- let e = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], t = new Date(r.getTime());
76
- return typeof e != "boolean" || e || ce(t), t;
77
- }
78
- function ce(r) {
79
- return r.setHours(0, 0, 0, 0), r;
80
- }
81
- function C(r, e, t) {
82
- r.length ? r.forEach((i) => {
83
- i.addEventListener(e, t);
84
- }) : r.addEventListener(e, t);
85
- }
86
- function j(r, e) {
87
- return !(!r || r === document || r instanceof DocumentFragment) && (r.matches(e) ? r : j(r.parentNode, e));
88
- }
89
- function R(r, e, t) {
90
- return r > t ? t : r < e ? e : r;
91
- }
92
- function Z(r) {
93
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
94
- t[i - 1] = arguments[i];
95
- return t.filter((a) => a).forEach((a) => {
96
- for (let [n, s] of Object.entries(a))
97
- if (s !== void 0 && s.toString() === "[object Object]") {
98
- let o = r[n] !== void 0 ? r[n].toString() : void 0, h = s.toString(), d = Array.isArray(s) ? [] : {};
99
- r[n] = r[n] ? o !== h ? d : r[n] : d, Z(r[n], s);
100
- } else
101
- r[n] = s;
102
- }), r;
103
- }
104
- function M(r) {
105
- let e = r;
106
- 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;
107
- }
108
- function Q(r) {
109
- let e = "\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";
110
- return new RegExp("(^|>|" + e + ")(" + r + ")($|<|" + e + ")", "g");
111
- }
112
- function L(r, e, t) {
113
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
114
- }
115
- class ue {
116
- constructor() {
117
- let { type: e, date: t, dp: i, opts: a, body: n } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
118
- L(this, "focus", () => {
119
- this.$cell.classList.add("-focus-"), this.focused = !0;
120
- }), L(this, "removeFocus", () => {
121
- this.$cell.classList.remove("-focus-"), this.focused = !1;
122
- }), L(this, "select", () => {
123
- this.$cell.classList.add("-selected-"), this.selected = !0;
124
- }), L(this, "removeSelect", () => {
125
- this.$cell.classList.remove("-selected-", "-range-from-", "-range-to-"), this.selected = !1;
126
- }), L(this, "onChangeSelectedDate", () => {
127
- this.isDisabled || (this._handleSelectedStatus(), this.opts.range && this._handleRangeStatus());
128
- }), L(this, "onChangeFocusDate", (s) => {
129
- if (!s)
130
- return void (this.focused && this.removeFocus());
131
- let o = D(s, this.date, this.type);
132
- o ? this.focus() : !o && this.focused && this.removeFocus(), this.opts.range && this._handleRangeStatus();
133
- }), 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();
134
- }
135
- init() {
136
- let { range: e, onRenderCell: t } = this.opts;
137
- 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());
138
- }
139
- _bindDatepickerEvents() {
140
- this.dp.on(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.on(l.eventChangeFocusDate, this.onChangeFocusDate);
141
- }
142
- unbindDatepickerEvents() {
143
- this.dp.off(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.off(l.eventChangeFocusDate, this.onChangeFocusDate);
144
- }
145
- _createElement() {
146
- var e;
147
- let { year: t, month: i, date: a } = v(this.date), n = ((e = this.customData) === null || e === void 0 ? void 0 : e.attrs) || {};
148
- this.$cell = k({ className: this._getClassName(), attrs: { "data-year": t, "data-month": i, "data-date": a, ...n } });
149
- }
150
- _getClassName() {
151
- var e, t;
152
- 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-": D(i, this.date, this.type), "-min-date-": s && D(s, this.date, this.type), "-max-date-": o && D(o, this.date, this.type) }), p = "";
153
- switch (this.type) {
154
- case l.days:
155
- p = S({ "-weekend-": this.dp.isWeekend(h), "-other-month-": this.isOtherMonth, "-disabled-": this.isOtherMonth && !a || d || c });
156
- break;
157
- case l.months:
158
- p = S({ "-disabled-": d || c });
159
- break;
160
- case l.years:
161
- p = S({ "-other-decade-": this.isOtherDecade, "-disabled-": d || this.isOtherDecade && !n || c });
162
- }
163
- return S(u, p, (t = this.customData) === null || t === void 0 ? void 0 : t.classes);
164
- }
165
- _getHtml() {
166
- var e;
167
- let { year: t, month: i, date: a } = v(this.date), { showOtherMonths: n, showOtherYears: s } = this.opts;
168
- if ((e = this.customData) !== null && e !== void 0 && e.html)
169
- return this.customData.html;
170
- switch (this.type) {
171
- case l.days:
172
- return !n && this.isOtherMonth ? "" : a;
173
- case l.months:
174
- return this.dp.locale[this.opts.monthsField][i];
175
- case l.years:
176
- return !s && this.isOtherDecade ? "" : t;
177
- }
178
- }
179
- _isOutOfMinMaxRange() {
180
- 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());
181
- return e && t ? P(c, e) || T(u, t) : e ? P(c, e) : t ? T(u, t) : void 0;
182
- }
183
- destroy() {
184
- this.unbindDatepickerEvents();
185
- }
186
- _handleRangeStatus() {
187
- 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 && D(this.date, e, this.type), "-range-to-": t && D(this.date, t, this.type) });
188
- var a, n, s;
189
- this.$cell.classList.remove("-range-from-", "-range-to-", "-in-range-"), i && this.$cell.classList.add(...i.split(" "));
190
- }
191
- _handleSelectedStatus() {
192
- let e = this.dp._checkIfDateIsSelected(this.date, this.type);
193
- e ? this.select() : !e && this.selected && this.removeSelect();
194
- }
195
- _handleInitialFocusStatus() {
196
- D(this.dp.focusDate, this.date, this.type) && this.focus();
197
- }
198
- get isDisabled() {
199
- return this.$cell.matches(".-disabled-");
200
- }
201
- get isOtherMonth() {
202
- return this.dp.isOtherMonth(this.date);
203
- }
204
- get isOtherDecade() {
205
- return this.dp.isOtherDecade(this.date);
206
- }
207
- }
208
- function _(r, e, t) {
209
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
210
- }
211
- 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>') };
212
- const K = ".air-datepicker-cell";
213
- class ae {
214
- constructor(e) {
215
- let { dp: t, type: i, opts: a } = e;
216
- _(this, "handleClick", (n) => {
217
- let s = n.target.closest(K).adpCell;
218
- if (s.isDisabled)
219
- return;
220
- if (!this.dp.isMinViewReached)
221
- return void this.dp.down();
222
- let o = this.dp._checkIfDateIsSelected(s.date, s.type);
223
- o ? this.dp._handleAlreadySelectedDates(o, s.date) : this.dp.selectDate(s.date);
224
- }), _(this, "handleDayNameClick", (n) => {
225
- let s = n.target.getAttribute("data-day-index");
226
- this.opts.onClickDayName({ dayIndex: Number(s), datepicker: this.dp });
227
- }), _(this, "onChangeCurrentView", (n) => {
228
- n !== this.type ? this.hide() : (this.show(), this.render());
229
- }), _(this, "onMouseOverCell", (n) => {
230
- let s = j(n.target, K);
231
- this.dp.setFocusDate(!!s && s.adpCell.date);
232
- }), _(this, "onMouseOutCell", () => {
233
- this.dp.setFocusDate(!1);
234
- }), _(this, "onClickBody", (n) => {
235
- let { onClickDayName: s } = this.opts, o = n.target;
236
- o.closest(K) && this.handleClick(n), s && o.closest(".air-datepicker-body--day-name") && this.handleDayNameClick(n);
237
- }), _(this, "onMouseDown", (n) => {
238
- this.pressed = !0;
239
- let s = j(n.target, K), o = s && s.adpCell;
240
- D(o.date, this.dp.rangeDateFrom) && (this.rangeFromFocused = !0), D(o.date, this.dp.rangeDateTo) && (this.rangeToFocused = !0);
241
- }), _(this, "onMouseMove", (n) => {
242
- if (!this.pressed || !this.dp.isMinViewReached)
243
- return;
244
- n.preventDefault();
245
- let s = j(n.target, K), o = s && s.adpCell, { selectedDates: h, rangeDateTo: d, rangeDateFrom: c } = this.dp;
246
- if (!o || o.isDisabled)
247
- return;
248
- let { date: u } = o;
249
- if (h.length === 2) {
250
- if (this.rangeFromFocused && !T(u, d)) {
251
- let { hours: p, minutes: g } = v(c);
252
- u.setHours(p), u.setMinutes(g), this.dp.rangeDateFrom = u, this.dp.replaceDate(c, u);
253
- }
254
- if (this.rangeToFocused && !P(u, c)) {
255
- let { hours: p, minutes: g } = v(d);
256
- u.setHours(p), u.setMinutes(g), this.dp.rangeDateTo = u, this.dp.replaceDate(d, u);
257
- }
258
- }
259
- }), _(this, "onMouseUp", () => {
260
- this.pressed = !1, this.rangeFromFocused = !1, this.rangeToFocused = !1;
261
- }), _(this, "onChangeViewDate", (n, s) => {
262
- if (!this.isVisible)
263
- return;
264
- let o = O(n), h = O(s);
265
- switch (this.dp.currentView) {
266
- case l.days:
267
- if (D(n, s, l.months))
268
- return;
269
- break;
270
- case l.months:
271
- if (D(n, s, l.years))
272
- return;
273
- break;
274
- case l.years:
275
- if (o[0] === h[0] && o[1] === h[1])
276
- return;
277
- }
278
- this.render();
279
- }), _(this, "render", () => {
280
- this.destroyCells(), this._generateCells(), this.cells.forEach((n) => {
281
- this.$cells.appendChild(n.render());
282
- });
283
- }), this.dp = t, this.type = i, this.opts = a, this.cells = [], this.$el = "", this.pressed = !1, this.isVisible = !0, this.init();
284
- }
285
- init() {
286
- this._buildBaseHtml(), this.type === l.days && this.renderDayNames(), this.render(), this._bindEvents(), this._bindDatepickerEvents();
287
- }
288
- _bindEvents() {
289
- let { range: e, dynamicRange: t } = this.opts;
290
- 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));
291
- }
292
- _bindDatepickerEvents() {
293
- this.dp.on(l.eventChangeViewDate, this.onChangeViewDate), this.dp.on(l.eventChangeCurrentView, this.onChangeCurrentView);
294
- }
295
- _buildBaseHtml() {
296
- this.$el = k({ className: "air-datepicker-body -".concat(this.type, "-"), innerHtml: pe[this.type] }), this.$names = w(".air-datepicker-body--day-names", this.$el), this.$cells = w(".air-datepicker-body--cells", this.$el);
297
- }
298
- _getDayNamesHtml() {
299
- 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;
300
- for (; s < 7; ) {
301
- let o = n % 7, h = S("air-datepicker-body--day-name", { [l.cssClassWeekend]: i(o), "-clickable-": !!a }), d = this.dp.locale.daysMin[o];
302
- t += '<div class="'.concat(h, `" data-day-index='`).concat(o, "'>").concat(d, "</div>"), s++, n++;
303
- }
304
- return t;
305
- }
306
- _getDaysCells() {
307
- 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;
308
- h = h < 0 ? h + 7 : h, d = d > 6 ? d - 7 : d;
309
- let c = function(z, U) {
310
- let { year: Y, month: B, date: q } = v(z);
311
- return new Date(Y, B, q - U);
312
- }(s, h), u = i + h + d, p = c.getDate(), { year: g, month: b } = v(c), $ = 0;
313
- for (; $ < u; ) {
314
- let z = new Date(g, b, p + $);
315
- this._generateCell(z), $++;
316
- }
317
- }
318
- _generateCell(e) {
319
- let { type: t, dp: i, opts: a } = this, n = new ue({ type: t, dp: i, opts: a, date: e, body: this });
320
- return this.cells.push(n), n;
321
- }
322
- _generateDayCells() {
323
- this._getDaysCells();
324
- }
325
- _generateMonthCells() {
326
- let { year: e } = this.dp.parsedViewDate, t = 0;
327
- for (; t < 12; )
328
- this.cells.push(this._generateCell(new Date(e, t))), t++;
329
- }
330
- _generateYearCells() {
331
- let e = O(this.dp.viewDate), t = e[0] - 1, i = e[1] + 1, a = t;
332
- for (; a <= i; )
333
- this.cells.push(this._generateCell(new Date(a, 0))), a++;
334
- }
335
- renderDayNames() {
336
- this.$names.innerHTML = this._getDayNamesHtml();
337
- }
338
- _generateCells() {
339
- switch (this.type) {
340
- case l.days:
341
- this._generateDayCells();
342
- break;
343
- case l.months:
344
- this._generateMonthCells();
345
- break;
346
- case l.years:
347
- this._generateYearCells();
348
- }
349
- }
350
- show() {
351
- this.isVisible = !0, this.$el.classList.remove("-hidden-");
352
- }
353
- hide() {
354
- this.isVisible = !1, this.$el.classList.add("-hidden-");
355
- }
356
- destroyCells() {
357
- this.cells.forEach((e) => e.destroy()), this.cells = [], this.$cells.innerHTML = "";
358
- }
359
- destroy() {
360
- this.destroyCells(), this.dp.off(l.eventChangeViewDate, this.onChangeViewDate), this.dp.off(l.eventChangeCurrentView, this.onChangeCurrentView);
361
- }
362
- }
363
- function E(r, e, t) {
364
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
365
- }
366
- class me {
367
- constructor(e) {
368
- let { dp: t, opts: i } = e;
369
- E(this, "onClickNav", (a) => {
370
- let n = j(a.target, ".air-datepicker-nav--action");
371
- if (!n)
372
- return;
373
- let s = n.dataset.action;
374
- this.dp[s]();
375
- }), E(this, "onChangeViewDate", () => {
376
- this.render(), this._resetNavStatus(), this.handleNavStatus();
377
- }), E(this, "onChangeCurrentView", () => {
378
- this.render(), this._resetNavStatus(), this.handleNavStatus();
379
- }), E(this, "onClickNavTitle", () => {
380
- this.dp.isFinalView || this.dp.up();
381
- }), E(this, "update", () => {
382
- let { prevHtml: a, nextHtml: n } = this.opts;
383
- this.$prev.innerHTML = a, this.$next.innerHTML = n, this._resetNavStatus(), this.render(), this.handleNavStatus();
384
- }), E(this, "renderDelay", () => {
385
- setTimeout(this.render);
386
- }), E(this, "render", () => {
387
- this.$title.innerHTML = this._getTitle(), function(a, n) {
388
- for (let s in n)
389
- n[s] ? a.classList.add(s) : a.classList.remove(s);
390
- }(this.$title, { "-disabled-": this.dp.isFinalView });
391
- }), this.dp = t, this.opts = i, this.init();
392
- }
393
- init() {
394
- this._createElement(), this._buildBaseHtml(), this._defineDOM(), this.render(), this.handleNavStatus(), this._bindEvents(), this._bindDatepickerEvents();
395
- }
396
- _defineDOM() {
397
- this.$title = w(".air-datepicker-nav--title", this.$el), this.$prev = w('[data-action="prev"]', this.$el), this.$next = w('[data-action="next"]', this.$el);
398
- }
399
- _bindEvents() {
400
- this.$el.addEventListener("click", this.onClickNav), this.$title.addEventListener("click", this.onClickNavTitle);
401
- }
402
- _bindDatepickerEvents() {
403
- 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));
404
- }
405
- destroy() {
406
- 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));
407
- }
408
- _createElement() {
409
- this.$el = k({ tagName: "nav", className: "air-datepicker-nav" });
410
- }
411
- _getTitle() {
412
- let { dp: e, opts: t } = this, i = t.navTitles[e.currentView];
413
- return typeof i == "function" ? i(e) : e.formatDate(e.viewDate, i);
414
- }
415
- handleNavStatus() {
416
- let { disableNavWhenOutOfRange: e } = this.opts, { minDate: t, maxDate: i } = this.dp;
417
- if (!t && !i || !e)
418
- return;
419
- let { year: a, month: n } = this.dp.parsedViewDate, s = !!t && v(t), o = !!i && v(i);
420
- switch (this.dp.currentView) {
421
- case l.days:
422
- t && s.month >= n && s.year >= a && this._disableNav("prev"), i && o.month <= n && o.year <= a && this._disableNav("next");
423
- break;
424
- case l.months:
425
- t && s.year >= a && this._disableNav("prev"), i && o.year <= a && this._disableNav("next");
426
- break;
427
- case l.years: {
428
- let h = O(this.dp.viewDate);
429
- t && s.year >= h[0] && this._disableNav("prev"), i && o.year <= h[1] && this._disableNav("next");
430
- break;
431
- }
432
- }
433
- }
434
- _disableNav(e) {
435
- w('[data-action="' + e + '"]', this.$el).classList.add("-disabled-");
436
- }
437
- _resetNavStatus() {
438
- (function(e) {
439
- for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
440
- i[a - 1] = arguments[a];
441
- e.length ? e.forEach((n) => {
442
- n.classList.remove(...i);
443
- }) : e.classList.remove(...i);
444
- })(this.$el.querySelectorAll(".air-datepicker-nav--action"), "-disabled-");
445
- }
446
- _buildBaseHtml() {
447
- let { prevHtml: e, nextHtml: t } = this.opts;
448
- 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>");
449
- }
450
- get isNavIsFunction() {
451
- let { navTitles: e } = this.opts;
452
- return Object.keys(e).find((t) => typeof e[t] == "function");
453
- }
454
- }
455
- var ne = { today: { content: (r) => r.locale.today, onClick: (r) => r.setViewDate(new Date()) }, clear: { content: (r) => r.locale.clear, onClick: (r) => r.clear() } };
456
- class ge {
457
- constructor(e) {
458
- let { dp: t, opts: i } = e;
459
- this.dp = t, this.opts = i, this.init();
460
- }
461
- init() {
462
- this.createElement(), this.render();
463
- }
464
- createElement() {
465
- this.$el = k({ className: "air-datepicker-buttons" });
466
- }
467
- destroy() {
468
- this.$el.parentNode.removeChild(this.$el);
469
- }
470
- clearHtml() {
471
- return this.$el.innerHTML = "", this;
472
- }
473
- generateButtons() {
474
- let { buttons: e } = this.opts;
475
- Array.isArray(e) || (e = [e]), e.forEach((t) => {
476
- let i = t;
477
- typeof t == "string" && ne[t] && (i = ne[t]);
478
- let a = this.createButton(i);
479
- i.onClick && this.attachEventToButton(a, i.onClick), this.$el.appendChild(a);
480
- });
481
- }
482
- attachEventToButton(e, t) {
483
- e.addEventListener("click", () => {
484
- t(this.dp);
485
- });
486
- }
487
- createButton(e) {
488
- let { content: t, className: i, tagName: a = "button", attrs: n = {} } = e, s = typeof t == "function" ? t(this.dp) : t;
489
- return k({ tagName: a, innerHtml: "<span tabindex='-1'>".concat(s, "</span>"), className: S("air-datepicker-button", i), attrs: n });
490
- }
491
- render() {
492
- this.generateButtons();
493
- }
494
- }
495
- function A(r, e, t) {
496
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
497
- }
498
- class ve {
499
- constructor() {
500
- let { opts: e, dp: t } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
501
- A(this, "toggleTimepickerIsActive", (a) => {
502
- this.dp.timepickerIsActive = a;
503
- }), A(this, "onChangeSelectedDate", (a) => {
504
- let { date: n, updateTime: s = !1 } = a;
505
- n && (this.setMinMaxTime(n), this.setCurrentTime(!!s && n), this.addTimeToDate(n));
506
- }), A(this, "onChangeLastSelectedDate", (a) => {
507
- a && (this.setTime(a), this.render());
508
- }), A(this, "onChangeInputRange", (a) => {
509
- let n = a.target;
510
- this[n.getAttribute("name")] = n.value, this.updateText(), this.dp.trigger(l.eventChangeTime, { hours: this.hours, minutes: this.minutes });
511
- }), A(this, "onMouseEnterLeave", (a) => {
512
- let n = a.target.getAttribute("name"), s = this.$minutesText;
513
- n === "hours" && (s = this.$hoursText), s.classList.toggle("-focus-");
514
- }), A(this, "onFocus", () => {
515
- this.toggleTimepickerIsActive(!0);
516
- }), A(this, "onBlur", () => {
517
- this.toggleTimepickerIsActive(!1);
518
- }), this.opts = e, this.dp = t;
519
- let { timeFormat: i } = this.dp.locale;
520
- i && (i.match(Q("h")) || i.match(Q("hh"))) && (this.ampm = !0), this.init();
521
- }
522
- init() {
523
- this.setTime(this.dp.lastSelectedDate || this.dp.viewDate), this.createElement(), this.buildHtml(), this.defineDOM(), this.render(), this.bindDatepickerEvents(), this.bindDOMEvents();
524
- }
525
- bindDatepickerEvents() {
526
- this.dp.on(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.on(l.eventChangeLastSelectedDate, this.onChangeLastSelectedDate);
527
- }
528
- bindDOMEvents() {
529
- let e = "input";
530
- 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);
531
- }
532
- createElement() {
533
- this.$el = k({ className: S("air-datepicker-time", { "-am-pm-": this.dp.ampm }) });
534
- }
535
- destroy() {
536
- this.dp.off(l.eventChangeSelectedDate, this.onChangeSelectedDate), this.dp.off(l.eventChangeLastSelectedDate, this.onChangeLastSelectedDate), this.$el.parentNode.removeChild(this.$el);
537
- }
538
- buildHtml() {
539
- 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;
540
- 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>";
541
- }
542
- defineDOM() {
543
- let e = (t) => w(t, this.$el);
544
- 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");
545
- }
546
- setTime(e) {
547
- this.setMinMaxTime(e), this.setCurrentTime(e);
548
- }
549
- addTimeToDate(e) {
550
- e && (e.setHours(this.hours), e.setMinutes(this.minutes));
551
- }
552
- setMinMaxTime(e) {
553
- if (this.setMinMaxTimeFromOptions(), e) {
554
- let { minDate: t, maxDate: i } = this.dp;
555
- t && D(e, t) && this.setMinTimeFromMinDate(t), i && D(e, i) && this.setMaxTimeFromMaxDate(i);
556
- }
557
- }
558
- setCurrentTime(e) {
559
- let { hours: t, minutes: i } = e ? v(e) : this;
560
- this.hours = R(t, this.minHours, this.maxHours), this.minutes = R(i, this.minMinutes, this.maxMinutes);
561
- }
562
- setMinMaxTimeFromOptions() {
563
- let { minHours: e, minMinutes: t, maxHours: i, maxMinutes: a } = this.opts;
564
- this.minHours = R(e, 0, 23), this.minMinutes = R(t, 0, 59), this.maxHours = R(i, 0, 23), this.maxMinutes = R(a, 0, 59);
565
- }
566
- setMinTimeFromMinDate(e) {
567
- let { lastSelectedDate: t } = this.dp;
568
- this.minHours = e.getHours(), t && t.getHours() > e.getHours() ? this.minMinutes = this.opts.minMinutes : this.minMinutes = e.getMinutes();
569
- }
570
- setMaxTimeFromMaxDate(e) {
571
- let { lastSelectedDate: t } = this.dp;
572
- this.maxHours = e.getHours(), t && t.getHours() < e.getHours() ? this.maxMinutes = this.opts.maxMinutes : this.maxMinutes = e.getMinutes();
573
- }
574
- getDayPeriod(e, t) {
575
- let i = e, a = Number(e);
576
- e instanceof Date && (i = v(e), a = Number(i.hours));
577
- let n = "am";
578
- if (t || this.ampm) {
579
- switch (!0) {
580
- case a === 12:
581
- case a > 11:
582
- n = "pm";
583
- }
584
- a = a % 12 == 0 ? 12 : a % 12;
585
- }
586
- return { hours: a, dayPeriod: n };
587
- }
588
- updateSliders() {
589
- G(this.$hours, { min: this.minHours, max: this.maxHours }).value = this.hours, G(this.$minutes, { min: this.minMinutes, max: this.maxMinutes }).value = this.minutes;
590
- }
591
- updateText() {
592
- this.$hoursText.innerHTML = I(this.displayHours), this.$minutesText.innerHTML = I(this.minutes), this.ampm && (this.$ampm.innerHTML = this.dayPeriod);
593
- }
594
- set hours(e) {
595
- this._hours = e;
596
- let { hours: t, dayPeriod: i } = this.getDayPeriod(e);
597
- this.displayHours = t, this.dayPeriod = i;
598
- }
599
- get hours() {
600
- return this._hours;
601
- }
602
- render() {
603
- this.updateSliders(), this.updateText();
604
- }
605
- }
606
- function N(r, e, t) {
607
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
608
- }
609
- class ye {
610
- constructor(e) {
611
- let { dp: t, opts: i } = e;
612
- 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) => {
613
- let n = this.hotKeys.get(a), s = v(this.getInitialFocusDate());
614
- n(s, this.dp);
615
- let { year: o, month: h, date: d } = s, c = se(new Date(o, h));
616
- c < d && (d = c);
617
- let u = this.dp.getClampedDate(new Date(o, h, d));
618
- this.dp.setFocusDate(u, { viewDateTransition: !0 });
619
- }), N(this, "isHotKeyPressed", () => {
620
- let a = !1, n = this.pressedKeys.size, s = (o) => this.pressedKeys.has(o);
621
- for (let [o] of this.hotKeys) {
622
- if (a)
623
- break;
624
- if (Array.isArray(o[0]))
625
- o.forEach((h) => {
626
- a || n !== h.length || (a = h.every(s) && o);
627
- });
628
- else {
629
- if (n !== o.length)
630
- continue;
631
- a = o.every(s) && o;
632
- }
633
- }
634
- return a;
635
- }), N(this, "isArrow", (a) => a >= 37 && a <= 40), N(this, "onKeyDown", (a) => {
636
- let { key: n, which: s } = a, { dp: o, dp: { focusDate: h }, opts: d } = this;
637
- this.registerKey(n);
638
- let c = this.isHotKeyPressed();
639
- if (c)
640
- return a.preventDefault(), void this.handleHotKey(c);
641
- if (this.isArrow(s))
642
- return a.preventDefault(), void this.focusNextCell(n);
643
- if (n === "Enter") {
644
- if (o.currentView !== d.minView)
645
- return void o.down();
646
- if (h) {
647
- let u = o._checkIfDateIsSelected(h);
648
- return void (u ? o._handleAlreadySelectedDates(u, h) : o.selectDate(h));
649
- }
650
- }
651
- n === "Escape" && this.dp.hide();
652
- }), N(this, "onKeyUp", (a) => {
653
- this.removeKey(a.key);
654
- }), this.dp = t, this.opts = i, this.init();
655
- }
656
- init() {
657
- this.bindKeyboardEvents();
658
- }
659
- bindKeyboardEvents() {
660
- let { $el: e } = this.dp;
661
- e.addEventListener("keydown", this.onKeyDown), e.addEventListener("keyup", this.onKeyUp);
662
- }
663
- destroy() {
664
- let { $el: e } = this.dp;
665
- e.removeEventListener("keydown", this.onKeyDown), e.removeEventListener("keyup", this.onKeyUp), this.hotKeys = null, this.pressedKeys = null;
666
- }
667
- getInitialFocusDate() {
668
- let { focusDate: e, currentView: t, selectedDates: i, parsedViewDate: { year: a, month: n } } = this.dp, s = e || i[i.length - 1];
669
- if (!s)
670
- switch (t) {
671
- case l.days:
672
- s = new Date(a, n, new Date().getDate());
673
- break;
674
- case l.months:
675
- s = new Date(a, n, 1);
676
- break;
677
- case l.years:
678
- s = new Date(a, 0, 1);
679
- }
680
- return s;
681
- }
682
- focusNextCell(e) {
683
- 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;
684
- switch (e) {
685
- case "ArrowLeft":
686
- i === a && (c -= 1), i === n && (d -= 1), i === s && (h -= 1);
687
- break;
688
- case "ArrowUp":
689
- i === a && (c -= 7), i === n && (d -= 3), i === s && (h -= 4);
690
- break;
691
- case "ArrowRight":
692
- i === a && (c += 1), i === n && (d += 1), i === s && (h += 1);
693
- break;
694
- case "ArrowDown":
695
- i === a && (c += 7), i === n && (d += 3), i === s && (h += 4);
696
- }
697
- let u = this.dp.getClampedDate(new Date(h, d, c));
698
- this.dp.setFocusDate(u, { viewDateTransition: !0 });
699
- }
700
- registerKey(e) {
701
- this.pressedKeys.add(e);
702
- }
703
- removeKey(e) {
704
- this.pressedKeys.delete(e);
705
- }
706
- }
707
- let De = { on(r, e) {
708
- this.__events || (this.__events = {}), this.__events[r] ? this.__events[r].push(e) : this.__events[r] = [e];
709
- }, off(r, e) {
710
- this.__events && this.__events[r] && (this.__events[r] = this.__events[r].filter((t) => t !== e));
711
- }, removeAllEvents() {
712
- this.__events = {};
713
- }, trigger(r) {
714
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
715
- t[i - 1] = arguments[i];
716
- this.__events && this.__events[r] && this.__events[r].forEach((a) => {
717
- a(...t);
718
- });
719
- } };
720
- function m(r, e, t) {
721
- return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
722
- }
723
- let ee = "", J = "", V = "", re = !1;
724
- class H {
725
- constructor(e, t) {
726
- var i = this;
727
- if (m(this, "viewIndexes", [l.days, l.months, l.years]), m(this, "next", () => {
728
- let { year: s, month: o } = this.parsedViewDate;
729
- switch (this.currentView) {
730
- case l.days:
731
- this.setViewDate(new Date(s, o + 1, 1));
732
- break;
733
- case l.months:
734
- this.setViewDate(new Date(s + 1, o, 1));
735
- break;
736
- case l.years:
737
- this.setViewDate(new Date(s + 10, 0, 1));
738
- }
739
- }), m(this, "prev", () => {
740
- let { year: s, month: o } = this.parsedViewDate;
741
- switch (this.currentView) {
742
- case l.days:
743
- this.setViewDate(new Date(s, o - 1, 1));
744
- break;
745
- case l.months:
746
- this.setViewDate(new Date(s - 1, o, 1));
747
- break;
748
- case l.years:
749
- this.setViewDate(new Date(s - 10, 0, 1));
750
- }
751
- }), m(this, "_finishHide", () => {
752
- this.hideAnimation = !1, this._destroyComponents(), this.$container.removeChild(this.$datepicker);
753
- }), m(this, "setPosition", function(s) {
754
- let o = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
755
- if (typeof (s = s || i.opts.position) == "function")
756
- return void (i.customHide = s({ $datepicker: i.$datepicker, $target: i.$el, $pointer: i.$pointer, isViewChange: o, done: i._finishHide }));
757
- let h, d, { isMobile: c } = i.opts, u = i.$el.getBoundingClientRect(), p = i.$el.getBoundingClientRect(), g = i.$datepicker.offsetParent, b = i.$el.offsetParent, $ = i.$datepicker.getBoundingClientRect(), z = s.split(" "), U = window.scrollY, Y = window.scrollX, B = i.opts.offset, q = z[0], fe = z[1];
758
- if (c)
759
- i.$datepicker.style.cssText = "left: 50%; top: 50%";
760
- else {
761
- if (g === b && g !== document.body && (p = { top: i.$el.offsetTop, left: i.$el.offsetLeft, width: u.width, height: i.$el.offsetHeight }, U = 0, Y = 0), g !== b && g !== document.body) {
762
- let he = g.getBoundingClientRect();
763
- p = { top: u.top - he.top, left: u.left - he.left, width: u.width, height: u.height }, U = 0, Y = 0;
764
- }
765
- switch (q) {
766
- case "top":
767
- h = p.top - $.height - B;
768
- break;
769
- case "right":
770
- d = p.left + p.width + B;
771
- break;
772
- case "bottom":
773
- h = p.top + p.height + B;
774
- break;
775
- case "left":
776
- d = p.left - $.width - B;
777
- }
778
- switch (fe) {
779
- case "top":
780
- h = p.top;
781
- break;
782
- case "right":
783
- d = p.left + p.width - $.width;
784
- break;
785
- case "bottom":
786
- h = p.top + p.height - $.height;
787
- break;
788
- case "left":
789
- d = p.left;
790
- break;
791
- case "center":
792
- /left|right/.test(q) ? h = p.top + p.height / 2 - $.height / 2 : d = p.left + p.width / 2 - $.width / 2;
793
- }
794
- i.$datepicker.style.cssText = "left: ".concat(d + Y, "px; top: ").concat(h + U, "px");
795
- }
796
- }), m(this, "_setInputValue", () => {
797
- let { opts: s, $altField: o, locale: { dateFormat: h } } = this, { altFieldDateFormat: d, altField: c } = s;
798
- c && o && (o.value = this._getInputValue(d)), this.$el.value = this._getInputValue(h);
799
- }), m(this, "_getInputValue", (s) => {
800
- let { selectedDates: o, opts: h } = this, { multipleDates: d, multipleDatesSeparator: c } = h;
801
- if (!o.length)
802
- return "";
803
- let u = typeof s == "function", p = u ? s(d ? o : o[0]) : o.map((g) => this.formatDate(g, s));
804
- return p = u ? p : p.join(c), p;
805
- }), m(this, "_checkIfDateIsSelected", function(s) {
806
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : l.days, h = !1;
807
- return i.selectedDates.some((d) => {
808
- let c = D(s, d, o);
809
- return h = c && d, c;
810
- }), h;
811
- }), m(this, "_scheduleCallAfterTransition", (s) => {
812
- this._cancelScheduledCall(), s && s(!1), this._onTransitionEnd = () => {
813
- s && s(!0);
814
- }, this.$datepicker.addEventListener("transitionend", this._onTransitionEnd, { once: !0 });
815
- }), m(this, "_cancelScheduledCall", () => {
816
- this.$datepicker.removeEventListener("transitionend", this._onTransitionEnd);
817
- }), m(this, "setViewDate", (s) => {
818
- if (!((s = M(s)) instanceof Date) || D(s, this.viewDate))
819
- return;
820
- let o = this.viewDate;
821
- this.viewDate = s;
822
- let { onChangeViewDate: h } = this.opts;
823
- if (h) {
824
- let { month: d, year: c } = this.parsedViewDate;
825
- h({ month: d, year: c, decade: this.curDecade });
826
- }
827
- this.trigger(l.eventChangeViewDate, s, o);
828
- }), m(this, "setFocusDate", function(s) {
829
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
830
- (!s || (s = M(s)) instanceof Date) && (i.focusDate = s, i.opts.range && s && i._handleRangeOnFocus(), i.trigger(l.eventChangeFocusDate, s, o));
831
- }), m(this, "setCurrentView", (s) => {
832
- if (this.viewIndexes.includes(s)) {
833
- if (this.currentView = s, this.elIsInput && this.visible && this.setPosition(void 0, !0), this.trigger(l.eventChangeCurrentView, s), !this.views[s]) {
834
- let o = this.views[s] = new ae({ dp: this, opts: this.opts, type: s });
835
- this.shouldUpdateDOM && this.$content.appendChild(o.$el);
836
- }
837
- this.opts.onChangeView && this.opts.onChangeView(s);
838
- }
839
- }), m(this, "_updateLastSelectedDate", (s) => {
840
- this.lastSelectedDate = s, this.trigger(l.eventChangeLastSelectedDate, s);
841
- }), m(this, "destroy", () => {
842
- let { showEvent: s, isMobile: o } = this.opts, h = this.$datepicker.parentNode;
843
- 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;
844
- }), m(this, "update", (s) => {
845
- let o = Z({}, this.opts);
846
- Z(this.opts, s);
847
- let { timepicker: h, buttons: d, range: c, selectedDates: u, isMobile: p } = this.opts, g = this.visible || this.treatAsInline;
848
- 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());
849
- }), m(this, "isOtherMonth", (s) => {
850
- let { month: o } = v(s);
851
- return o !== this.parsedViewDate.month;
852
- }), m(this, "isOtherYear", (s) => {
853
- let { year: o } = v(s);
854
- return o !== this.parsedViewDate.year;
855
- }), m(this, "isOtherDecade", (s) => {
856
- let { year: o } = v(s), [h, d] = O(this.viewDate);
857
- return o < h || o > d;
858
- }), m(this, "_onChangeSelectedDate", (s) => {
859
- let { silent: o } = s;
860
- setTimeout(() => {
861
- this._setInputValue(), this.opts.onSelect && !o && this._triggerOnSelect();
862
- });
863
- }), m(this, "_onChangeFocusedDate", function(s) {
864
- let { viewDateTransition: o } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
865
- if (!s)
866
- return;
867
- let h = !1;
868
- o && (h = i.isOtherMonth(s) || i.isOtherYear(s) || i.isOtherDecade(s)), h && i.setViewDate(s);
869
- }), m(this, "_onChangeTime", (s) => {
870
- let { hours: o, minutes: h } = s, d = new Date(), { lastSelectedDate: c, opts: { onSelect: u } } = this, p = c;
871
- c || (p = d);
872
- let g = this.getCell(p, this.currentViewSingular), b = g && g.adpCell;
873
- b && b.isDisabled || (p.setHours(o), p.setMinutes(h), c ? (this._setInputValue(), u && this._triggerOnSelect()) : this.selectDate(p));
874
- }), m(this, "_onFocus", (s) => {
875
- this.visible || this.show();
876
- }), m(this, "_onBlur", (s) => {
877
- this.inFocus || !this.visible || this.opts.isMobile || this.hide();
878
- }), m(this, "_onMouseDown", (s) => {
879
- this.inFocus = !0;
880
- }), m(this, "_onMouseUp", (s) => {
881
- this.inFocus = !1, this.$el.focus();
882
- }), m(this, "_onResize", () => {
883
- this.visible && typeof this.opts.position != "function" && this.setPosition();
884
- }), m(this, "_onClickOverlay", () => {
885
- this.visible && this.hide();
886
- }), m(this, "isWeekend", (s) => this.opts.weekends.includes(s)), m(this, "getClampedDate", (s) => {
887
- let { minDate: o, maxDate: h } = this, d = s;
888
- return h && T(s, h) ? d = h : o && P(s, o) && (d = o), d;
889
- }), this.$el = w(e), !this.$el)
890
- return;
891
- this.$datepicker = k({ className: "air-datepicker" }), this.opts = Z({}, ie, t), this.$customContainer = !!this.opts.container && w(this.opts.container), this.$altField = w(this.opts.altField || !1), ee || (ee = w("body"));
892
- let { view: a, startDate: n } = this.opts;
893
- 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();
894
- }
895
- init() {
896
- let { opts: e, treatAsInline: t, opts: { inline: i, isMobile: a, selectedDates: n, keyboardNav: s, onlyTimepicker: o } } = this;
897
- var h;
898
- 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();
899
- }
900
- _createMobileOverlay() {
901
- V = k({ className: "air-datepicker-overlay" }), J.appendChild(V);
902
- }
903
- _createComponents() {
904
- let { opts: e, treatAsInline: t, opts: { inline: i, buttons: a, timepicker: n, position: s, classes: o, onlyTimepicker: h, isMobile: d } } = this;
905
- 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);
906
- }
907
- _destroyComponents() {
908
- for (let e in this.views)
909
- this.views[e].destroy();
910
- this.views = {}, this.nav.destroy(), this.timepicker && this.timepicker.destroy();
911
- }
912
- _addMobileAttributes() {
913
- V.addEventListener("click", this._onClickOverlay), this.$datepicker.classList.add("-is-mobile-"), this.$el.setAttribute("readonly", !0);
914
- }
915
- _removeMobileAttributes() {
916
- V.removeEventListener("click", this._onClickOverlay), this.$datepicker.classList.remove("-is-mobile-"), this.initialReadonly || this.initialReadonly === "" || this.$el.removeAttribute("readonly");
917
- }
918
- _createMinMaxDates() {
919
- let { minDate: e, maxDate: t } = this.opts;
920
- this.minDate = !!e && M(e), this.maxDate = !!t && M(t);
921
- }
922
- _addTimepicker() {
923
- 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);
924
- }
925
- _addButtons() {
926
- 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);
927
- }
928
- _bindSubEvents() {
929
- this.on(l.eventChangeSelectedDate, this._onChangeSelectedDate), this.on(l.eventChangeFocusDate, this._onChangeFocusedDate), this.on(l.eventChangeTime, this._onChangeTime);
930
- }
931
- _buildBaseHtml() {
932
- let { inline: e } = this.opts;
933
- var t, i;
934
- 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 = w(".air-datepicker--content", this.$datepicker), this.$pointer = w(".air-datepicker--pointer", this.$datepicker), this.$nav = w(".air-datepicker--navigation", this.$datepicker);
935
- }
936
- _handleLocale() {
937
- let { locale: e, dateFormat: t, firstDay: i, timepicker: a, onlyTimepicker: n, timeFormat: s, dateTimeSeparator: o } = this.opts;
938
- var h;
939
- this.locale = (h = e, JSON.parse(JSON.stringify(h))), t && (this.locale.dateFormat = t), s !== void 0 && s !== "" && (this.locale.timeFormat = s);
940
- let { timeFormat: d } = this.locale;
941
- if (i !== "" && (this.locale.firstDay = i), a && typeof t != "function") {
942
- let c = d ? o : "";
943
- this.locale.dateFormat = [this.locale.dateFormat, d || ""].join(c);
944
- }
945
- n && typeof t != "function" && (this.locale.dateFormat = this.locale.timeFormat);
946
- }
947
- _setPositionClasses(e) {
948
- if (typeof e == "function")
949
- return void this.$datepicker.classList.add("-custom-position-");
950
- let t = (e = e.split(" "))[0], i = e[1], a = "air-datepicker -".concat(t, "-").concat(i, "- -from-").concat(t, "-");
951
- this.$datepicker.classList.add(...a.split(" "));
952
- }
953
- _bindEvents() {
954
- 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);
955
- }
956
- _limitViewDateByMaxMinDates() {
957
- let { viewDate: e, minDate: t, maxDate: i } = this;
958
- i && T(e, i) && this.setViewDate(i), t && P(e, t) && this.setViewDate(t);
959
- }
960
- formatDate() {
961
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.viewDate, t = arguments.length > 1 ? arguments[1] : void 0;
962
- if (e = M(e), !(e instanceof Date))
963
- return;
964
- let i = t, a = this.locale, n = v(e), s = O(e), o = H.replacer, h = "am";
965
- this.opts.timepicker && this.timepicker && (h = this.timepicker.getDayPeriod(e).dayPeriod);
966
- 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] };
967
- for (let [c, u] of Object.entries(d))
968
- i = o(i, Q(c), u);
969
- return i;
970
- }
971
- down(e) {
972
- this._handleUpDownActions(e, "down");
973
- }
974
- up(e) {
975
- this._handleUpDownActions(e, "up");
976
- }
977
- selectDate(e) {
978
- 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;
979
- if (Array.isArray(e))
980
- return e.forEach((b) => {
981
- this.selectDate(b, i);
982
- }), new Promise((b) => {
983
- setTimeout(b);
984
- });
985
- if ((e = M(e)) instanceof Date) {
986
- 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) {
987
- if (g === c)
988
- return;
989
- this._checkIfDateIsSelected(e) || s.push(e);
990
- } else if (u)
991
- switch (g) {
992
- case 1:
993
- 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];
994
- break;
995
- case 2:
996
- this.selectedDates = [e], this.rangeDateFrom = e, this.rangeDateTo = "";
997
- break;
998
- default:
999
- this.selectedDates = [e], this.rangeDateFrom = e;
1000
- }
1001
- else
1002
- this.selectedDates = [e];
1003
- 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((b) => {
1004
- setTimeout(b);
1005
- });
1006
- }
1007
- }
1008
- unselectDate(e) {
1009
- let t = this.selectedDates, i = this;
1010
- if ((e = M(e)) instanceof Date)
1011
- return t.some((a, n) => {
1012
- if (D(a, e))
1013
- 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;
1014
- });
1015
- }
1016
- replaceDate(e, t) {
1017
- let i = this.selectedDates.find((n) => D(n, e, this.currentView)), a = this.selectedDates.indexOf(i);
1018
- a < 0 || D(this.selectedDates[a], t, this.currentView) || (this.selectedDates[a] = t, this.trigger(l.eventChangeSelectedDate, { action: l.actionSelectDate, date: t, updateTime: !0 }), this._updateLastSelectedDate(t));
1019
- }
1020
- clear() {
1021
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1022
- return this.selectedDates = [], this.rangeDateFrom = !1, this.rangeDateTo = !1, this.trigger(l.eventChangeSelectedDate, { action: l.actionUnselectDate, silent: e.silent }), new Promise((t) => {
1023
- setTimeout(t);
1024
- });
1025
- }
1026
- show() {
1027
- let { onShow: e, isMobile: t } = this.opts;
1028
- 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();
1029
- }
1030
- hide() {
1031
- let { onHide: e, isMobile: t } = this.opts, i = this._hasTransition();
1032
- this.visible = !1, this.hideAnimation = !0, this.$datepicker.classList.remove("-active-"), this.customHide && this.customHide(), this.elIsInput && this.$el.blur(), this._scheduleCallAfterTransition((a) => {
1033
- !this.customHide && (a && i || !a && !i) && this._finishHide(), e && e(a);
1034
- }), t && V.classList.remove("-active-");
1035
- }
1036
- _triggerOnSelect() {
1037
- let e = [], t = [], { selectedDates: i, locale: a, opts: { onSelect: n, multipleDates: s, range: o } } = this, h = s || o, d = typeof a.dateFormat == "function";
1038
- 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 });
1039
- }
1040
- _handleAlreadySelectedDates(e, t) {
1041
- let { range: i, toggleSelected: a } = this.opts;
1042
- i ? a ? this.unselectDate(t) : this.selectedDates.length !== 2 && this.selectDate(t) : a && this.unselectDate(t), a || this._updateLastSelectedDate(e);
1043
- }
1044
- _handleUpDownActions(e, t) {
1045
- if (!((e = M(e || this.focusDate || this.viewDate)) instanceof Date))
1046
- return;
1047
- let i = t === "up" ? this.viewIndex + 1 : this.viewIndex - 1;
1048
- i > 2 && (i = 2), i < 0 && (i = 0), this.setViewDate(new Date(e.getFullYear(), e.getMonth(), 1)), this.setCurrentView(this.viewIndexes[i]);
1049
- }
1050
- _handleRangeOnFocus() {
1051
- 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]));
1052
- }
1053
- getCell(e) {
1054
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : l.day;
1055
- if (!((e = M(e)) instanceof Date))
1056
- return;
1057
- 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) };
1058
- return this.views[this.currentView].$el.querySelector(d[t]);
1059
- }
1060
- _showMobileOverlay() {
1061
- V.classList.add("-active-");
1062
- }
1063
- _hasTransition() {
1064
- return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((e, t) => parseFloat(t) + e, 0) > 0;
1065
- }
1066
- get shouldUpdateDOM() {
1067
- return this.visible || this.treatAsInline;
1068
- }
1069
- get parsedViewDate() {
1070
- return v(this.viewDate);
1071
- }
1072
- get currentViewSingular() {
1073
- return this.currentView.slice(0, -1);
1074
- }
1075
- get curDecade() {
1076
- return O(this.viewDate);
1077
- }
1078
- get viewIndex() {
1079
- return this.viewIndexes.indexOf(this.currentView);
1080
- }
1081
- get isFinalView() {
1082
- return this.currentView === l.years;
1083
- }
1084
- get hasSelectedDates() {
1085
- return this.selectedDates.length > 0;
1086
- }
1087
- get isMinViewReached() {
1088
- return this.currentView === this.opts.minView || this.currentView === l.days;
1089
- }
1090
- get $container() {
1091
- return this.$customContainer || J;
1092
- }
1093
- static replacer(e, t, i) {
1094
- return e.replace(t, function(a, n, s, o) {
1095
- return n + i + o;
1096
- });
1097
- }
1098
- }
1099
- var oe;
1100
- 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;
1101
- }();
1102
- });
1103
- }), $e = de(function(y, f) {
1104
- Object.defineProperty(f, "__esModule", {
1105
- value: !0
1106
- }), f.default = void 0;
1107
- var F = {
1108
- days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
1109
- daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1110
- daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1111
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
1112
- monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1113
- today: "Today",
1114
- clear: "Clear",
1115
- dateFormat: "MM/dd/yyyy",
1116
- timeFormat: "hh:mm aa",
1117
- firstDay: 0
1118
- };
1119
- f.default = F;
1120
- });
1121
- const Se = /* @__PURE__ */ ke($e), Te = ':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}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.air-datepicker-nav--title{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.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}', Ve = class {
1122
- constructor(y) {
1123
- le(this, y), this.valueChange = we(this, "valueChange", 3), this.locale = Se, this.onClick = (f) => {
1124
- f.stopPropagation(), f.preventDefault();
1125
- };
1126
- }
1127
- watchProps() {
1128
- this.init();
1129
- }
1130
- componentDidLoad() {
1131
- this.init();
1132
- }
1133
- disconnectedCallback() {
1134
- var y;
1135
- (y = this.picker) === null || y === void 0 || y.destroy();
1136
- }
1137
- init() {
1138
- var y;
1139
- (y = this.picker) === null || y === void 0 || y.destroy();
1140
- let f;
1141
- this.value === void 0 ? f = void 0 : Array.isArray(this.value) ? f = this.value : f = [this.value], this.picker = new Me(this.containerEl, {
1142
- classes: "date-picker",
1143
- inline: !0,
1144
- locale: this.locale,
1145
- maxDate: this.maxDate,
1146
- minDate: this.minDate,
1147
- minView: "days",
1148
- nextHtml: "<swirl-icon-chevron-right></swirl-icon-chevron-right>",
1149
- onSelect: ({ date: F }) => {
1150
- this.valueChange.emit(F);
1151
- },
1152
- prevHtml: "<swirl-icon-chevron-left></swirl-icon-chevron-left>",
1153
- range: this.range,
1154
- selectedDates: f,
1155
- startDate: this.startDate,
1156
- toggleSelected: !this.range,
1157
- view: "days"
1158
- });
1159
- }
1160
- render() {
1161
- return x(be, { onClick: this.onClick }, x("div", { ref: (y) => this.containerEl = y }));
1162
- }
1163
- static get watchers() {
1164
- return {
1165
- locale: ["watchProps"],
1166
- maxDate: ["watchProps"],
1167
- minDate: ["watchProps"],
1168
- range: ["watchProps"],
1169
- startDate: ["watchProps"],
1170
- value: ["watchProps"]
1171
- };
1172
- }
1173
- };
1174
- Ve.style = Te;
1175
- const xe = ":host{display:inline-flex}", Fe = class {
1176
- constructor(y) {
1177
- le(this, y), this.size = 24;
1178
- }
1179
- render() {
1180
- const y = this.size === 20 ? 24 : this.size, f = _e("swirl-icon", `swirl-icon--size-${this.size}`);
1181
- return x("svg", { class: f, fill: "none", height: this.size, part: "icon", viewBox: `0 0 ${y} ${y}`, 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 === 20 || 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" })));
1182
- }
1183
- };
1184
- Fe.style = xe;
1185
- export {
1186
- Ve as swirl_date_picker,
1187
- Fe as swirl_icon_today
1188
- };