@watermarkinsights/ripple 3.27.0 → 3.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-b2e0cb4e.js → chartFunctions-42cfb4d3.js} +596 -596
  3. package/dist/cjs/{functions-9807717e.js → functions-85c3c557.js} +498 -498
  4. package/dist/cjs/{global-42a24725.js → global-9982752f.js} +72 -72
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  7. package/dist/cjs/{intl-526c75ec.js → intl-1c36fe38.js} +131 -131
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  13. package/dist/cjs/ripple.cjs.js +1 -1
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
  15. package/dist/cjs/wm-button.cjs.entry.js +189 -189
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
  17. package/dist/cjs/wm-chart.cjs.entry.js +183 -183
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +263 -263
  19. package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
  20. package/dist/cjs/wm-file.cjs.entry.js +181 -181
  21. package/dist/cjs/wm-input.cjs.entry.js +136 -136
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +32 -32
  24. package/dist/cjs/wm-modal.cjs.entry.js +152 -152
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +186 -186
  26. package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
  27. package/dist/cjs/wm-network-uploader.cjs.entry.js +465 -465
  28. package/dist/cjs/wm-option_2.cjs.entry.js +768 -768
  29. package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
  30. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
  31. package/dist/cjs/wm-search.cjs.entry.js +184 -184
  32. package/dist/cjs/wm-snackbar.cjs.entry.js +134 -134
  33. package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
  34. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  35. package/dist/cjs/wm-tag-input.cjs.entry.js +948 -941
  36. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  37. package/dist/cjs/wm-toggletip.cjs.entry.js +120 -120
  38. package/dist/cjs/wm-uploader.cjs.entry.js +441 -441
  39. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  40. package/dist/collection/components/charts/chartFunctions.js +562 -562
  41. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +267 -267
  42. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +125 -125
  43. package/dist/collection/components/charts/wm-chart/wm-chart.js +450 -450
  44. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +207 -207
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +143 -143
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +121 -121
  47. package/dist/collection/components/wm-action-menu/wm-action-menu.js +472 -472
  48. package/dist/collection/components/wm-button/wm-button.js +486 -486
  49. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +983 -983
  50. package/dist/collection/components/wm-datepicker/wm-datepicker.js +491 -491
  51. package/dist/collection/components/wm-file/wm-file.js +313 -313
  52. package/dist/collection/components/wm-file-list/wm-file-list.js +152 -152
  53. package/dist/collection/components/wm-input/wm-input.js +509 -509
  54. package/dist/collection/components/wm-menuitem/wm-menuitem.js +454 -454
  55. package/dist/collection/components/wm-modal/wm-modal-footer.js +138 -138
  56. package/dist/collection/components/wm-modal/wm-modal-header.js +82 -82
  57. package/dist/collection/components/wm-modal/wm-modal.js +462 -462
  58. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +119 -119
  59. package/dist/collection/components/wm-navigation/wm-navigation-item.js +130 -130
  60. package/dist/collection/components/wm-navigation/wm-navigation.js +217 -217
  61. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +106 -106
  62. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +123 -123
  63. package/dist/collection/components/wm-navigator/wm-navigator.js +467 -467
  64. package/dist/collection/components/wm-option/wm-option.js +435 -435
  65. package/dist/collection/components/wm-pagination/wm-pagination.js +362 -362
  66. package/dist/collection/components/wm-search/wm-search.js +439 -439
  67. package/dist/collection/components/wm-select/wm-select.js +1054 -1054
  68. package/dist/collection/components/wm-snackbar/wm-snackbar.js +267 -267
  69. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +211 -211
  70. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +327 -327
  71. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +108 -108
  72. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +122 -122
  73. package/dist/collection/components/wm-tag-input/wm-tag-input.css +21 -17
  74. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1302 -1295
  75. package/dist/collection/components/wm-timepicker/wm-timepicker.js +605 -605
  76. package/dist/collection/components/wm-toggletip/wm-toggletip.js +243 -243
  77. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +772 -772
  78. package/dist/collection/components/wm-uploader/wm-uploader.js +964 -964
  79. package/dist/collection/components/wm-wrapper/wm-wrapper.js +28 -28
  80. package/dist/collection/dev/scripts.js +20 -20
  81. package/dist/collection/global/__mocks__/functions.js +6 -6
  82. package/dist/collection/global/functions.js +541 -541
  83. package/dist/collection/global/global.js +79 -79
  84. package/dist/collection/global/interfaces.js +49 -49
  85. package/dist/collection/global/intl.js +132 -132
  86. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  87. package/dist/collection/global/services/http-service.js +50 -50
  88. package/dist/collection/lang/lang.js +5 -5
  89. package/dist/collection/lang/missing.js +43 -43
  90. package/dist/collection/lang/piglatin.js +93 -93
  91. package/dist/esm/{chartFunctions-dd9eb9ac.js → chartFunctions-0b53b301.js} +596 -596
  92. package/dist/esm/{functions-f32b1ca4.js → functions-cbb19d50.js} +498 -498
  93. package/dist/esm/{global-7ee0d78d.js → global-2c7bbfe6.js} +72 -72
  94. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  95. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  96. package/dist/esm/{intl-d101e1a9.js → intl-ffbca53d.js} +131 -131
  97. package/dist/esm/loader.js +1 -1
  98. package/dist/esm/polyfills/core-js.js +0 -0
  99. package/dist/esm/polyfills/dom.js +0 -0
  100. package/dist/esm/polyfills/es5-html-element.js +0 -0
  101. package/dist/esm/polyfills/index.js +0 -0
  102. package/dist/esm/polyfills/system.js +0 -0
  103. package/dist/esm/priv-chart-popover.entry.js +91 -91
  104. package/dist/esm/priv-datepicker.entry.js +657 -657
  105. package/dist/esm/priv-navigator-button.entry.js +19 -19
  106. package/dist/esm/priv-navigator-item.entry.js +23 -23
  107. package/dist/esm/ripple.js +1 -1
  108. package/dist/esm/wm-action-menu_2.entry.js +334 -334
  109. package/dist/esm/wm-button.entry.js +189 -189
  110. package/dist/esm/wm-chart-slice.entry.js +18 -18
  111. package/dist/esm/wm-chart.entry.js +183 -183
  112. package/dist/esm/wm-datepicker.entry.js +263 -263
  113. package/dist/esm/wm-file-list.entry.js +35 -35
  114. package/dist/esm/wm-file.entry.js +181 -181
  115. package/dist/esm/wm-input.entry.js +136 -136
  116. package/dist/esm/wm-modal-footer.entry.js +33 -33
  117. package/dist/esm/wm-modal-header.entry.js +32 -32
  118. package/dist/esm/wm-modal.entry.js +152 -152
  119. package/dist/esm/wm-navigation_3.entry.js +186 -186
  120. package/dist/esm/wm-navigator.entry.js +264 -264
  121. package/dist/esm/wm-network-uploader.entry.js +465 -465
  122. package/dist/esm/wm-option_2.entry.js +768 -768
  123. package/dist/esm/wm-pagination.entry.js +179 -179
  124. package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
  125. package/dist/esm/wm-search.entry.js +184 -184
  126. package/dist/esm/wm-snackbar.entry.js +134 -134
  127. package/dist/esm/wm-tab-item_3.entry.js +264 -264
  128. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  129. package/dist/esm/wm-tag-input.entry.js +948 -941
  130. package/dist/esm/wm-timepicker.entry.js +385 -385
  131. package/dist/esm/wm-toggletip.entry.js +120 -120
  132. package/dist/esm/wm-uploader.entry.js +441 -441
  133. package/dist/esm/wm-wrapper.entry.js +12 -12
  134. package/dist/esm-es5/{chartFunctions-dd9eb9ac.js → chartFunctions-0b53b301.js} +1 -1
  135. package/dist/esm-es5/{global-7ee0d78d.js → global-2c7bbfe6.js} +1 -1
  136. package/dist/esm-es5/{intl-d101e1a9.js → intl-ffbca53d.js} +1 -1
  137. package/dist/esm-es5/loader.js +1 -1
  138. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  139. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  140. package/dist/esm-es5/ripple.js +1 -1
  141. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  142. package/dist/esm-es5/wm-button.entry.js +1 -1
  143. package/dist/esm-es5/wm-chart.entry.js +1 -1
  144. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  145. package/dist/esm-es5/wm-file.entry.js +1 -1
  146. package/dist/esm-es5/wm-input.entry.js +1 -1
  147. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  148. package/dist/esm-es5/wm-modal.entry.js +1 -1
  149. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  150. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  151. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  152. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  153. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  154. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  155. package/dist/esm-es5/wm-search.entry.js +1 -1
  156. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  157. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  158. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  159. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  160. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  161. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  162. package/dist/ripple/{p-725c14b0.system.entry.js → p-00022d17.system.entry.js} +1 -1
  163. package/dist/ripple/{p-b97de06f.system.entry.js → p-0450cdbe.system.entry.js} +1 -1
  164. package/dist/ripple/{p-bfe1062d.entry.js → p-05a17658.entry.js} +1 -1
  165. package/dist/ripple/p-0b6a7b77.system.entry.js +1 -0
  166. package/dist/ripple/{p-b6bf2866.entry.js → p-0e789be7.entry.js} +1 -1
  167. package/dist/ripple/{p-b617b64f.system.entry.js → p-15779c22.system.entry.js} +1 -1
  168. package/dist/ripple/{p-04faca6b.entry.js → p-17487f1b.entry.js} +1 -1
  169. package/dist/ripple/{p-122da0d1.system.entry.js → p-197c83de.system.entry.js} +1 -1
  170. package/dist/ripple/{p-11d98b00.system.entry.js → p-1bad4efe.system.entry.js} +1 -1
  171. package/dist/ripple/{p-252ba295.system.entry.js → p-2ff923ee.system.entry.js} +1 -1
  172. package/dist/ripple/{p-a6afe65a.entry.js → p-31712996.entry.js} +1 -1
  173. package/dist/ripple/{p-f69276d5.system.entry.js → p-31c18f5e.system.entry.js} +1 -1
  174. package/dist/ripple/{p-df28f438.system.js → p-32944b70.system.js} +1 -1
  175. package/dist/ripple/{p-73d277ba.system.entry.js → p-36effc40.system.entry.js} +1 -1
  176. package/dist/ripple/{p-0be94e77.entry.js → p-3807bcae.entry.js} +1 -1
  177. package/dist/ripple/{p-88d17f6b.system.entry.js → p-3aa48fad.system.entry.js} +1 -1
  178. package/dist/ripple/{p-82a97531.system.entry.js → p-419f133c.system.entry.js} +1 -1
  179. package/dist/ripple/{p-13ec8ac0.entry.js → p-438a1e8e.entry.js} +1 -1
  180. package/dist/ripple/{p-19689aac.js → p-4698b365.js} +1 -1
  181. package/dist/ripple/{p-f8d45250.system.entry.js → p-54086f7b.system.entry.js} +1 -1
  182. package/dist/ripple/{p-47f53321.entry.js → p-5497694c.entry.js} +1 -1
  183. package/dist/ripple/{p-fb370a69.entry.js → p-58fbf116.entry.js} +1 -1
  184. package/dist/ripple/{p-14dfc4e7.entry.js → p-65a741c1.entry.js} +1 -1
  185. package/dist/ripple/{p-ac63b3aa.entry.js → p-7e74274b.entry.js} +1 -1
  186. package/dist/ripple/{p-81752607.system.js → p-81ad3fe5.system.js} +1 -1
  187. package/dist/ripple/{p-f3e42327.system.entry.js → p-89db9c27.system.entry.js} +1 -1
  188. package/dist/ripple/{p-4753fbfc.system.entry.js → p-947f01e2.system.entry.js} +1 -1
  189. package/dist/ripple/{p-3aee75e7.entry.js → p-978429f9.entry.js} +1 -1
  190. package/dist/ripple/{p-2c8fd902.system.entry.js → p-97d5b4bd.system.entry.js} +1 -1
  191. package/dist/ripple/{p-67c0ad56.system.entry.js → p-9d6a574b.system.entry.js} +1 -1
  192. package/dist/ripple/{p-c545fe1c.entry.js → p-a3ba2bdd.entry.js} +1 -1
  193. package/dist/ripple/{p-c7567fd3.entry.js → p-a42f5231.entry.js} +1 -1
  194. package/dist/ripple/p-a51aec3f.entry.js +1 -0
  195. package/dist/ripple/{p-b831988d.entry.js → p-a5b86b47.entry.js} +1 -1
  196. package/dist/ripple/{p-4cadf985.entry.js → p-a90b8a08.entry.js} +1 -1
  197. package/dist/ripple/{p-d9b66dca.system.entry.js → p-aabe172c.system.entry.js} +1 -1
  198. package/dist/ripple/{p-69121ad1.entry.js → p-ab2a0aee.entry.js} +1 -1
  199. package/dist/ripple/{p-5fb0aa58.js → p-aed93a25.js} +1 -1
  200. package/dist/ripple/{p-f39ee84b.entry.js → p-b2d75e7d.entry.js} +1 -1
  201. package/dist/ripple/{p-19b897ce.js → p-b410c675.js} +1 -1
  202. package/dist/ripple/{p-4809e419.system.entry.js → p-b6f558f7.system.entry.js} +1 -1
  203. package/dist/ripple/p-bb048fe7.entry.js +1 -0
  204. package/dist/ripple/{p-2805fed6.system.entry.js → p-bced37cf.system.entry.js} +1 -1
  205. package/dist/ripple/{p-c9a1834d.system.entry.js → p-bd0c1e7c.system.entry.js} +1 -1
  206. package/dist/ripple/{p-89f1991f.entry.js → p-c0e183f4.entry.js} +1 -1
  207. package/dist/ripple/{p-7eca18bd.system.entry.js → p-c27eda00.system.entry.js} +1 -1
  208. package/dist/ripple/{p-894bc6c4.system.entry.js → p-cd3e0b8b.system.entry.js} +1 -1
  209. package/dist/ripple/{p-f6b2e4ac.system.js → p-d1af63b5.system.js} +1 -1
  210. package/dist/ripple/{p-30572b71.system.js → p-d41ba263.system.js} +1 -1
  211. package/dist/ripple/{p-db7e6e89.entry.js → p-d8993992.entry.js} +1 -1
  212. package/dist/ripple/{p-f13b239c.system.entry.js → p-da525ed1.system.entry.js} +1 -1
  213. package/dist/ripple/{p-33af1eee.entry.js → p-e6f46289.entry.js} +1 -1
  214. package/dist/ripple/{p-e928f350.entry.js → p-fc967b2c.entry.js} +1 -1
  215. package/dist/ripple/ripple.esm.js +1 -1
  216. package/dist/ripple/ripple.js +1 -1
  217. package/dist/types/components/charts/chartFunctions.d.ts +37 -37
  218. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  219. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  220. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -47
  221. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -29
  222. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -20
  223. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  224. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -49
  225. package/dist/types/components/wm-button/wm-button.d.ts +44 -44
  226. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  227. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -42
  228. package/dist/types/components/wm-file/wm-file.d.ts +40 -40
  229. package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -16
  230. package/dist/types/components/wm-input/wm-input.d.ts +57 -57
  231. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  232. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  233. package/dist/types/components/wm-modal/wm-modal-header.d.ts +10 -10
  234. package/dist/types/components/wm-modal/wm-modal.d.ts +40 -40
  235. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +16 -16
  236. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  237. package/dist/types/components/wm-navigation/wm-navigation.d.ts +26 -26
  238. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  239. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  240. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  241. package/dist/types/components/wm-option/wm-option.d.ts +34 -34
  242. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  243. package/dist/types/components/wm-search/wm-search.d.ts +77 -77
  244. package/dist/types/components/wm-select/wm-select.d.ts +101 -101
  245. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +30 -30
  246. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -37
  247. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -52
  248. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  249. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -11
  250. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +137 -136
  251. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -62
  252. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +25 -25
  253. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  254. package/dist/types/components/wm-uploader/wm-uploader.d.ts +99 -99
  255. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  256. package/dist/types/components.d.ts +27 -27
  257. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  258. package/dist/types/global/functions.d.ts +40 -40
  259. package/dist/types/global/global.d.ts +1 -1
  260. package/dist/types/global/interfaces.d.ts +74 -74
  261. package/dist/types/global/intl.d.ts +29 -29
  262. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  263. package/dist/types/global/services/http-service.d.ts +4 -4
  264. package/dist/types/lang/lang.d.ts +5 -5
  265. package/package.json +46 -46
  266. package/dist/ripple/p-37de8e2f.entry.js +0 -1
  267. package/dist/ripple/p-b378e064.system.entry.js +0 -1
  268. package/dist/ripple/p-d2037549.entry.js +0 -1
  269. /package/dist/esm-es5/{functions-f32b1ca4.js → functions-cbb19d50.js} +0 -0
  270. /package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +0 -0
  271. /package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  272. /package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  273. /package/dist/ripple/{p-cfa80f5b.js → p-91480a89.js} +0 -0
  274. /package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +0 -0
  275. /package/dist/ripple/{p-9eb5a71e.system.js → p-b267e710.system.js} +0 -0
  276. /package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  277. /package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-c4ca5d46.system.js","./p-9eb5a71e.system.js"],(function(e){"use strict";var t,o,i,n,r,a,s;return{setters:[function(e){t=e.r;o=e.c;i=e.h;n=e.H;r=e.g},function(e){a=e.g;s=e.c}],execute:function(){var l="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";var d=e("wm_modal",function(){function e(e){var i=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",3);this.focusFirstElement=o(this,"focusFirstElement",3);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.bodyFocusListener=function(){return i.redirectFocusFromBody()};this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.uid=undefined}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"focusOnOpenEl",{get:function(){var e=null;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){e=this.el.querySelector("#wm-".concat(this.elementToFocus,"-").concat(this.uid))}else if(this.elementToFocus){e=this.el.querySelector("#"+this.elementToFocus);!e&&console.warn("Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.")}var t=this.el.querySelector("#wm-modal-close-".concat(this.uid));return e?e:t},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpenEl.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setAriaDescribedbyOnModal();this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){return e.focusOnOpenEl.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnCloseEl.focus()}))};e.prototype.componentWillLoad=function(){var e=this;if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.el.focus=function(){e.focusOnOpenEl.focus()};this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnCloseEl=e.parentElement}else{this.focusOnCloseEl=s(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.focusOnOpenEl.focus()}};e.prototype.render=function(){var e=this;return i(n,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},i("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),i("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());d.style=l}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-c4ca5d46.system.js","./p-b267e710.system.js"],(function(e){"use strict";var t,o,i,n,r,a,s;return{setters:[function(e){t=e.r;o=e.c;i=e.h;n=e.H;r=e.g},function(e){a=e.g;s=e.c}],execute:function(){var l="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";var d=e("wm_modal",function(){function e(e){var i=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",3);this.focusFirstElement=o(this,"focusFirstElement",3);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.bodyFocusListener=function(){return i.redirectFocusFromBody()};this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.uid=undefined}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"focusOnOpenEl",{get:function(){var e=null;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){e=this.el.querySelector("#wm-".concat(this.elementToFocus,"-").concat(this.uid))}else if(this.elementToFocus){e=this.el.querySelector("#"+this.elementToFocus);!e&&console.warn("Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.")}var t=this.el.querySelector("#wm-modal-close-".concat(this.uid));return e?e:t},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpenEl.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setAriaDescribedbyOnModal();this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){return e.focusOnOpenEl.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnCloseEl.focus()}))};e.prototype.componentWillLoad=function(){var e=this;if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.el.focus=function(){e.focusOnOpenEl.focus()};this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnCloseEl=e.parentElement}else{this.focusOnCloseEl=s(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.focusOnOpenEl.focus()}};e.prototype.render=function(){var e=this;return i(n,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},i("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),i("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());d.style=l}}}));
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as o}from"./p-b5dee715.js";import{o as n,g as r,m as h,w as a}from"./p-cfa80f5b.js";import{g as m}from"./p-888bec42.js";const d=class{constructor(s){t(this,s),this.wmActionMenuLoaded=i(this,"wmActionMenuLoaded",7),this.menuLoaded=i(this,"menuLoaded",7),this.openUp=!1,this.keysSoFar="",this.searchIndex=0,this.keyClear=null,this.isExpanded=!1,this.tooltipPosition=void 0,this.actionMenuType=null,this.buttonType=null,this.buttonText=void 0,this.disabled=!1,this.tooltip=void 0,this.labelForIdenticalButtons=void 0,this.darkMode=void 0}get horizontalPosition(){return this.el&&this.itemsEl&&n(this.el,this.itemsEl.clientWidth)?"right":"left"}get childItems(){return Array.from(this.el.querySelectorAll("wm-menuitem"))}get internalButtonType(){return"icon"===this.tempActionMenuType||"text"===this.tempActionMenuType?this.tempActionMenuType+"only":this.tempActionMenuType}get tempActionMenuType(){return this.actionMenuType||this.buttonType||"icon"}handleClickedItem(){this.close()}handleKeyUp(t){this.moveUp(t.target)}handleKeyDown(t){this.moveDown(t.detail)}handleHomeKey(){this.focusFirstItem()}handleEndKey(){this.focusLastItem()}handleTabKey(){this.isExpanded&&this.close()}handleEscKey(){this.close(),this.wmButtonEl.focus()}handleKey(t){switch(t.key){case"ArrowDown":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusFirstItem())));break;case"ArrowUp":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusLastItem())))}}handleMenuitemBlur(t){if(t.detail.relatedTarget!==this.el&&!this.el.contains(t.detail.relatedTarget)){const i=new CustomEvent("blur");i.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(i)}}handleButtonBlur(t){(t.relatedTarget===this.el||this.el.contains(t.relatedTarget))&&t.stopPropagation()}componentWillLoad(){this.uid=this.el.id?this.el.id:r(),this.buttonType&&console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}componentDidLoad(){"icon"===this.tempActionMenuType||this.buttonText||console.error("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'"),"icon"!==this.tempActionMenuType||this.tooltip||console.error("wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'"),this.wmActionMenuLoaded.emit(),this.menuLoaded.emit()}moveUp(t){const i=this.childItems.indexOf(t);0===i?this.focusLastItem():this.focusItem(this.childItems[i-1])}moveDown(t){const i=this.childItems.indexOf(t);i===this.childItems.length-1?this.focusFirstItem():this.focusItem(this.childItems[i+1])}open(){this.disabled||(this.openUp=h(this.el,this.itemsEl.clientHeight),this.isExpanded=!0,this.itemsEl.classList.remove("hidden"),window.requestAnimationFrame((()=>this.focusFirstItem())))}close(t=!0){this.isExpanded=!1,this.childItems.forEach((t=>t.focused=!1)),window.setTimeout((()=>{this.itemsEl.classList.add("hidden")}),150),window.setTimeout((()=>{!t||"BODY"!==document.activeElement.tagName&&"WM-MENUITEM"!==document.activeElement.tagName||this.wmButtonEl.focus()}),250)}focusItem(t){this.childItems.map((i=>i.focused=i===t)),t.focus&&t.focus()}focusFirstItem(){this.focusItem(this.childItems[0])}focusLastItem(){this.focusItem(this.childItems[this.childItems.length-1])}findAndFocusItem(t){const i=t.detail.toUpperCase();if(this.focusFirstItem(),!this.keysSoFar)for(var s=0;s<this.childItems.length;s++)this.childItems[s]===document.activeElement&&(this.searchIndex=s);this.keysSoFar+=i,this.clearKeysSoFarAfterDelay();var e=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);e||(e=this.findMatchInRange(this.childItems,0,this.searchIndex)),e&&this.focusItem(e)}clearKeysSoFarAfterDelay(){this.keyClear&&(window.clearTimeout(this.keyClear),this.keyClear=null),this.keyClear=window.setTimeout(function(){this.keysSoFar="",this.keyClear=null}.bind(this),500)}findMatchInRange(t,i,s){for(var e=i;e<s;e++){var o=t[e].innerText;if(o&&0===o.toUpperCase().indexOf(this.keysSoFar))return t[e]}return null}render(){return s(e,{onBlur:()=>this.close(!1)},s("div",{class:a()},s("wm-button",{"button-type":this.internalButtonType,tooltip:this.tooltip,"custom-background":this.darkMode?"dark":void 0,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:"icon"===this.tempActionMenuType?"f1d9":"",iconSize:"icon"===this.tempActionMenuType?"24px":void 0,id:`menubtn-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onBlur:t=>this.handleButtonBlur(t),disabled:this.disabled,ref:t=>this.wmButtonEl=t,"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":`menu-${this.uid}`},this.buttonText),s("div",{class:`dropdown ${this.openUp?"open-up":""} ${this.horizontalPosition} ${this.isExpanded?"open":""} hidden`,id:`menu-${this.uid}`,tabindex:-1,role:"menu",ref:t=>this.itemsEl=t},s("slot",null))))}static get delegatesFocus(){return!0}get el(){return o(this)}};d.style=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:#fff;z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";const l=class{constructor(s){t(this,s),this.wmMenuitemClicked=i(this,"wmMenuitemClicked",7),this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7),this.wmPageDownItems=i(this,"wmPageDownItems",7),this.wmPageUpItems=i(this,"wmPageUpItems",7),this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7),this.wmLetterPressed=i(this,"wmLetterPressed",7),this.wmMenuitemBlurred=i(this,"wmMenuitemBlurred",7),this.descriptionCharLimit=100,this.disabled=!1,this.focused=!1,this.icon=void 0,this.description=void 0,this.isKeying=!1}toggleKeyingOn(){this.isKeying=!0}toggleKeyingOff(){this.isKeying=!1}handleKeydown(t){const i=t.altKey||t.ctrlKey||t.metaKey,s=/^.$/.test(t.key)&&!i;switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||this.el.click();break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:s&&(t.preventDefault(),this.wmLetterPressed.emit(t.key))}}handleClick(){this.disabled||this.wmMenuitemClicked.emit()}handleBlur(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})}setOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}componentWillLoad(){this.icon&&(this.icon=m(this.icon)),this.description&&(this.description.length>this.descriptionCharLimit&&console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`),this.icon&&console.error("wm-menuitems with descriptions do not support the use of icons")),this.setOnClick()}componentDidLoad(){this.icon&&(this.iconEl.classList.add("mdi"),this.iconEl.innerHTML=`&#x${this.icon};`)}render(){return s(e,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},s("div",{class:"wrapper "+(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},s("span",{ref:t=>this.iconEl=t}),s("slot",null),this.description?s("div",{class:"description"},this.description):""))}get el(){return o(this)}static get watchers(){return{disabled:["setOnClick"]}}};l.style=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none;font-size:1.12rem}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';export{d as wm_action_menu,l as wm_menuitem}
1
+ import{r as t,c as i,h as s,H as e,g as o}from"./p-b5dee715.js";import{o as n,g as r,m as h,w as a}from"./p-91480a89.js";import{g as m}from"./p-43f1298b.js";const d=class{constructor(s){t(this,s),this.wmActionMenuLoaded=i(this,"wmActionMenuLoaded",7),this.menuLoaded=i(this,"menuLoaded",7),this.openUp=!1,this.keysSoFar="",this.searchIndex=0,this.keyClear=null,this.isExpanded=!1,this.tooltipPosition=void 0,this.actionMenuType=null,this.buttonType=null,this.buttonText=void 0,this.disabled=!1,this.tooltip=void 0,this.labelForIdenticalButtons=void 0,this.darkMode=void 0}get horizontalPosition(){return this.el&&this.itemsEl&&n(this.el,this.itemsEl.clientWidth)?"right":"left"}get childItems(){return Array.from(this.el.querySelectorAll("wm-menuitem"))}get internalButtonType(){return"icon"===this.tempActionMenuType||"text"===this.tempActionMenuType?this.tempActionMenuType+"only":this.tempActionMenuType}get tempActionMenuType(){return this.actionMenuType||this.buttonType||"icon"}handleClickedItem(){this.close()}handleKeyUp(t){this.moveUp(t.target)}handleKeyDown(t){this.moveDown(t.detail)}handleHomeKey(){this.focusFirstItem()}handleEndKey(){this.focusLastItem()}handleTabKey(){this.isExpanded&&this.close()}handleEscKey(){this.close(),this.wmButtonEl.focus()}handleKey(t){switch(t.key){case"ArrowDown":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusFirstItem())));break;case"ArrowUp":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusLastItem())))}}handleMenuitemBlur(t){if(t.detail.relatedTarget!==this.el&&!this.el.contains(t.detail.relatedTarget)){const i=new CustomEvent("blur");i.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(i)}}handleButtonBlur(t){(t.relatedTarget===this.el||this.el.contains(t.relatedTarget))&&t.stopPropagation()}componentWillLoad(){this.uid=this.el.id?this.el.id:r(),this.buttonType&&console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}componentDidLoad(){"icon"===this.tempActionMenuType||this.buttonText||console.error("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'"),"icon"!==this.tempActionMenuType||this.tooltip||console.error("wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'"),this.wmActionMenuLoaded.emit(),this.menuLoaded.emit()}moveUp(t){const i=this.childItems.indexOf(t);0===i?this.focusLastItem():this.focusItem(this.childItems[i-1])}moveDown(t){const i=this.childItems.indexOf(t);i===this.childItems.length-1?this.focusFirstItem():this.focusItem(this.childItems[i+1])}open(){this.disabled||(this.openUp=h(this.el,this.itemsEl.clientHeight),this.isExpanded=!0,this.itemsEl.classList.remove("hidden"),window.requestAnimationFrame((()=>this.focusFirstItem())))}close(t=!0){this.isExpanded=!1,this.childItems.forEach((t=>t.focused=!1)),window.setTimeout((()=>{this.itemsEl.classList.add("hidden")}),150),window.setTimeout((()=>{!t||"BODY"!==document.activeElement.tagName&&"WM-MENUITEM"!==document.activeElement.tagName||this.wmButtonEl.focus()}),250)}focusItem(t){this.childItems.map((i=>i.focused=i===t)),t.focus&&t.focus()}focusFirstItem(){this.focusItem(this.childItems[0])}focusLastItem(){this.focusItem(this.childItems[this.childItems.length-1])}findAndFocusItem(t){const i=t.detail.toUpperCase();if(this.focusFirstItem(),!this.keysSoFar)for(var s=0;s<this.childItems.length;s++)this.childItems[s]===document.activeElement&&(this.searchIndex=s);this.keysSoFar+=i,this.clearKeysSoFarAfterDelay();var e=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);e||(e=this.findMatchInRange(this.childItems,0,this.searchIndex)),e&&this.focusItem(e)}clearKeysSoFarAfterDelay(){this.keyClear&&(window.clearTimeout(this.keyClear),this.keyClear=null),this.keyClear=window.setTimeout(function(){this.keysSoFar="",this.keyClear=null}.bind(this),500)}findMatchInRange(t,i,s){for(var e=i;e<s;e++){var o=t[e].innerText;if(o&&0===o.toUpperCase().indexOf(this.keysSoFar))return t[e]}return null}render(){return s(e,{onBlur:()=>this.close(!1)},s("div",{class:a()},s("wm-button",{"button-type":this.internalButtonType,tooltip:this.tooltip,"custom-background":this.darkMode?"dark":void 0,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:"icon"===this.tempActionMenuType?"f1d9":"",iconSize:"icon"===this.tempActionMenuType?"24px":void 0,id:`menubtn-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onBlur:t=>this.handleButtonBlur(t),disabled:this.disabled,ref:t=>this.wmButtonEl=t,"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":`menu-${this.uid}`},this.buttonText),s("div",{class:`dropdown ${this.openUp?"open-up":""} ${this.horizontalPosition} ${this.isExpanded?"open":""} hidden`,id:`menu-${this.uid}`,tabindex:-1,role:"menu",ref:t=>this.itemsEl=t},s("slot",null))))}static get delegatesFocus(){return!0}get el(){return o(this)}};d.style=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:#fff;z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";const l=class{constructor(s){t(this,s),this.wmMenuitemClicked=i(this,"wmMenuitemClicked",7),this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7),this.wmPageDownItems=i(this,"wmPageDownItems",7),this.wmPageUpItems=i(this,"wmPageUpItems",7),this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7),this.wmLetterPressed=i(this,"wmLetterPressed",7),this.wmMenuitemBlurred=i(this,"wmMenuitemBlurred",7),this.descriptionCharLimit=100,this.disabled=!1,this.focused=!1,this.icon=void 0,this.description=void 0,this.isKeying=!1}toggleKeyingOn(){this.isKeying=!0}toggleKeyingOff(){this.isKeying=!1}handleKeydown(t){const i=t.altKey||t.ctrlKey||t.metaKey,s=/^.$/.test(t.key)&&!i;switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||this.el.click();break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:s&&(t.preventDefault(),this.wmLetterPressed.emit(t.key))}}handleClick(){this.disabled||this.wmMenuitemClicked.emit()}handleBlur(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})}setOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}componentWillLoad(){this.icon&&(this.icon=m(this.icon)),this.description&&(this.description.length>this.descriptionCharLimit&&console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`),this.icon&&console.error("wm-menuitems with descriptions do not support the use of icons")),this.setOnClick()}componentDidLoad(){this.icon&&(this.iconEl.classList.add("mdi"),this.iconEl.innerHTML=`&#x${this.icon};`)}render(){return s(e,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},s("div",{class:"wrapper "+(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},s("span",{ref:t=>this.iconEl=t}),s("slot",null),this.description?s("div",{class:"description"},this.description):""))}get el(){return o(this)}static get watchers(){return{disabled:["setOnClick"]}}};l.style=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none;font-size:1.12rem}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';export{d as wm_action_menu,l as wm_menuitem}
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var a=0,n=t.length,s;a<n;a++){if(s||!(a in t)){if(!s)s=Array.prototype.slice.call(t,0,a);s[a]=t[a]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-c4ca5d46.system.js","./p-9eb5a71e.system.js"],(function(e){"use strict";var t,o,a,n,s,i,r,d;return{setters:[function(e){t=e.r;o=e.c;a=e.h;n=e.f;s=e.g},function(e){i=e.i;r=e.m;d=e.y}],execute:function(){var c='.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:rgba(74, 74, 74, 0.05)}.toggle:disabled .calendar::after{color:#7b7b7b}.toggle:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#e6e6e6}.toggle:hover .calendar::after{color:#575195}[dir=RTL] .toggle{right:auto;left:0}.toggle span::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f0ed";font-size:1.5rem;color:#575195;padding:0;line-height:2.5rem}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:#fff}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:transparent;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:#575195;color:#575195}.popup .calendar-header .title-box:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";padding-left:0.75rem;font-size:1.12rem}.popup .calendar-header .title-box.year:after{content:"\\f143"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:#575195;background:transparent;padding:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi:hover{background-color:#efeef1}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9);background-color:#d7d6d9}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:#757575}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:#eeedf4}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:#4a4a4a;border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:#efeef1}.popup .day-view .date-grid .date-cell:active{background-color:#575195;color:#ffffff}.popup .day-view .date-grid .date-cell.current-month{color:#4a4a4a}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:#575195;color:#ffffff}.popup .month-view .months{border-top:2px solid;border-top-color:#eeedf4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:#eeedf4}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:#575195}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:#eeedf4}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{background-color:#efeef1}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:#575195;color:#ffffff}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var l=e("priv_datepicker",function(){function e(e){var n=this;t(this,e);this.cellTriggered=o(this,"cellTriggered",7);this.toggleButtonClicked=o(this,"toggleButtonClicked",7);this.popupClosed=o(this,"popupClosed",7);this.popupBlurred=o(this,"popupBlurred",7);this.popupClicked=true;this.buttonClicked=true;this.prevClicked=true;this.nextClicked=true;this.openUp=false;this.calendar_months=[i.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),i.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),i.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),i.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),i.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),i.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),i.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),i.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),i.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),i.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),i.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),i.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})];this.weekdays=[i.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),i.formatMessage({id:"date.monday",defaultMessage:"Monday"}),i.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),i.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),i.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),i.formatMessage({id:"date.friday",defaultMessage:"Friday"}),i.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})];this.renderCalendarDate=function(e,t){var o=n.removeZeroes(String(e[1]));var s=n.removeZeroes(String(e[2]));var r=o===n.monthInFocus?"current-month":"";var d=e[0]+e[1]+e[2];var c=n.isDateToday(e);return a("div",{role:"gridcell",id:"cell-".concat(d,"-").concat(n.parentId),class:"date-cell ".concat(r),"aria-selected":false,"aria-label":"".concat(c?"".concat(i.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"}),", "):"").concat(n.weekdays[t],", ").concat(n.calendar_months[o-1]," ").concat(s,", ").concat(e[0]),onClick:function(e){n.handleTriggeredDate(e.target)},onKeyDown:function(e){return n.trapFocusEnd(e)},"data-month":e[1],"data-year":e[0],onBlur:function(e){return e.stopPropagation()}},s)};this.disabled=false;this.isExpanded=false;this.view="day";this.date=new Date;this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth;this.parentId="";this.isTabbing=false}e.prototype.handleKey=function(e){this.prevClicked=false;this.nextClicked=false;switch(e.key){case"Enter":e.preventDefault();!e.target.id.includes("popup-title")&&e.target.click();break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.closePopup(true)}break;case"PageUp":e.preventDefault();this.backOneMonth();break;case"PageDown":e.preventDefault();this.forwardOneMonth();break;case"Home":e.preventDefault();this.unfocusCell();this.dayInFocus=1;n(this.el);break;case"End":e.preventDefault();this.unfocusCell();this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus);n(this.el);break;case"ArrowLeft":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===1){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else{this.dayInFocus-=1}}else{this.unfocusMonth();if(this.monthNumInFocus===0){this.monthNumInFocus=11}else{this.monthNumInFocus-=1}}break;case"ArrowRight":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=1}else{this.dayInFocus+=1}}else{this.unfocusMonth();if(this.monthNumInFocus===11){this.monthNumInFocus=0}else{this.monthNumInFocus+=1}}break;case"ArrowUp":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus<8){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;var o=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-o}else{this.dayInFocus-=7}}else{this.unfocusMonth();if(this.monthNumInFocus<3){this.monthNumInFocus+=9}else{this.monthNumInFocus-=3}}break;case"ArrowDown":e.preventDefault();if(!this.isExpanded){this.openPopup()}else{if(this.view==="day"){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();var a=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>a){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.dayInFocus-a}else{this.dayInFocus+=7}}else{var s=(document.activeElement.shadowRoot||document).activeElement;if(s.tagName==="BUTTON"||s.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth();if(this.monthNumInFocus>8){this.monthNumInFocus-=9}else{this.monthNumInFocus+=3}}}break}};e.prototype.toggleTabbingOn=function(e){var t=["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"];if(t.includes(e.key)){this.isTabbing=true}};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.blurHandler=function(e){if(!this.popupClicked&&!this.buttonClicked&&this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}this.popupClicked=false;this.buttonClicked=false};e.prototype.handleBlurOnWindow=function(e){if(this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}};e.prototype.componentDidUpdate=function(){this.handleSelectedDate();if(this.isExpanded){this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():this.view==="day"?this.focusCell():this.focusMonth()}};e.prototype.componentDidLoad=function(){this.handleSelectedDate();this.setDateValuesForView()};e.prototype.zeroPad=function(e,t){if(!String.prototype.padStart){String.prototype.padStart=function e(t,o){t=t-this.length;if(t>o.length){o+=o.repeat(t/o.length)}return o.slice(0,t)+String(this)}}return"".concat(e.toString()).padStart(t,"0")};e.prototype.removeZeroes=function(e){return+e<10?+e.slice(1):+e};e.prototype.isDateToday=function(e){var t=this;var o=new Date;var a=[o.getFullYear().toString(),(o.getMonth()+1).toString(),o.getDate().toString()];return a.reduce((function(o,a,n){return o&&t.removeZeroes(e[n]).toString()===a}),true)};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.buttonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(this.view==="day"){this.unfocusCell()}this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.changeView("day");if(e){this.buttonEl.focus()}};e.prototype.openPopup=function(){var e=this;this.panelPosition();this.setDateValuesForView();this.prevClicked=false;this.nextClicked=false;this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.focusCell()};e.prototype.getMonthDays=function(e,t){var o=[4,6,9,11];var a=t%4===0;return e===2?a?29:28:o.includes(e)?30:31};e.prototype.getMonthFirstDay=function(e,t){return+new Date(t,e-1,1,12,0,0).getDay()+1};e.prototype.getPreviousMonth=function(e,t){var o=e>1?e-1:12;var a=e>1?t:t-1;return{month:o,year:a}};e.prototype.getNextMonth=function(e,t){var o=e<12?e+1:1;var a=e<12?t:t+1;return{month:o,year:a}};e.prototype.getCalendarDates=function(e,t){var o=this;var a=this.getMonthDays(e,t);var n=this.getMonthFirstDay(e,t);var s=n-1;var i=42-(s+a);i=i>6?i-7:i;var r=this.getPreviousMonth(e,t),d=r.month,c=r.year;var l=this.getNextMonth(e,t),u=l.month,h=l.year;var p=this.getMonthDays(d,c);var f=__spreadArray([],new Array(s).fill("1"),true).map((function(e,t){var a=t+1+(p-s);return[c.toString(),o.zeroPad(d,2),o.zeroPad(a,2)]}));var m=__spreadArray([],new Array(a).fill("1"),true).map((function(a,n){var s=n+1;return[t.toString(),o.zeroPad(e,2),o.zeroPad(s,2)]}));var g=__spreadArray([],new Array(i).fill("1"),true).map((function(e,t){var a=t+1;return[h.toString(),o.zeroPad(u,2),o.zeroPad(a,2)]}));return __spreadArray(__spreadArray(__spreadArray([],f,true),m,true),g,true)};e.prototype.forwardOneMonth=function(){this.unfocusCell();var e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Displaying ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.backOneMonth=function(){this.unfocusCell();var e=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Viewing ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.handleTriggeredDate=function(e){this.cellTriggered.emit(e);this.closePopup(true)};e.prototype.handleSelectedDate=function(){if(this.selectedDate){this.selectedDate.removeAttribute("aria-selected")}this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay);if(this.selectedDate){this.selectedDate.setAttribute("aria-selected","true")}};e.prototype.getCellById=function(e,t,o){var a=e+this.zeroPad(t,2)+this.zeroPad(o,2);return this.el.querySelector("#cell-".concat(a,"-").concat(this.parentId))};e.prototype.unfocusCell=function(){var e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e.tabIndex=-1};e.prototype.focusCell=function(){var e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>e?e:this.dayInFocus;var t=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);if(t){t.tabIndex=0;t.focus()}};e.prototype.unfocusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=-1};e.prototype.focusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=0;e.focus()};e.prototype.trapFocusLeft=function(e){if(e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.trapFocusEnd=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.prevButton.focus()}};e.prototype.trapFocusRight=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.focusCellInView=function(){if(this.view==="day"){this.focusCell()}else{this.focusMonth()}};e.prototype.toggleBusyAttribute=function(e){this.el.querySelector("#wm-container").setAttribute("aria-busy",e)};e.prototype.setDateValuesForView=function(){this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth-1};e.prototype.updateLiveRegion=function(e){var t=this.el.querySelector("#live-region");t.innerHTML=e};e.prototype.panelPosition=function(){var e=document.getElementById(this.parentId);var t=e.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=r(e,this.popupEl.clientHeight,t);if(d(e,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}};e.prototype.changeView=function(e){this.view=e;this.monthNumInFocus=this.monthInFocus-1};e.prototype.renderMonths=function(e,t){var o=this;return a("div",{id:"month-".concat(t,"-").concat(this.parentId),class:"month ".concat(this.selectedMonth-1===t?"selected":""),role:"gridcell",tabindex:t+1===this.monthInFocus?0:-1,onKeyDown:function(e){return o.trapFocusEnd(e)},onBlur:function(e){return e.stopPropagation()},onClick:function(){o.monthInFocus=t+1;o.changeView("day")}},e)};e.prototype.render=function(){var e=this;var t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return a("div",{class:"container",id:"wm-container"},a("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input-".concat(this.parentId),ref:function(t){return e.buttonEl=t},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle-".concat(this.parentId)},a("span",{class:"calendar",title:i.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),a("div",{class:"popup ".concat(this.view,"-view ").concat(this.openUp?"expand-upwards":""," ").concat(this.isTabbing?"user-is-tabbing":""),id:"popup-".concat(this.parentId),ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true},role:"application","aria-describedby":"application"},this.view==="day"?a("div",{class:"day-view"},a("div",{class:"calendar-header"},a("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.backOneMonth()},onKeyDown:function(t){return e.trapFocusLeft(t)},ref:function(t){return e.prevButton=t},class:"arw-btn","aria-label":i.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-month-".concat(this.parentId),class:"title-box",tabindex:0,role:"button",onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("month")}},onClick:this.changeView.bind(this,"month"),"aria-label":"".concat(i.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"}),": ").concat(this.calendar_months[this.monthInFocus-1],"\n ").concat(this.yearInFocus,"."),"aria-describedby":"month-title"},a("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),a("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.forwardOneMonth()},onKeyDown:function(t){return e.trapFocusRight(t)},"aria-label":i.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:function(t){return e.nextButton=t},class:"arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-month-".concat(this.parentId),role:"grid",class:"date-grid"},a("div",{role:"rowgroup",class:"date-header"},a("div",{role:"row",class:"header-row"},a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),a("div",{role:"rowgroup"},a("div",{role:"row",class:"date-row"},t.slice(0,7).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(7,14).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(14,21).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(21,28).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(28,35).map((function(t,o){return e.renderCalendarDate(t,o)}))),t.length>35?a("div",{role:"row"},t.slice(35).map((function(t,o){return e.renderCalendarDate(t,o)}))):""))):a("div",{class:"month-view"},a("div",{class:"calendar-header"},a("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.yearInFocus-=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},onKeyDown:function(t){return e.trapFocusLeft(t)},"aria-label":i.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:function(t){return e.prevButton=t},class:"arw-btn"},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-year-".concat(this.parentId),tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("day")}},"aria-labelledby":"year-title"},a("span",{class:"title"},this.yearInFocus)),a("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.yearInFocus+=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},"aria-label":i.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:function(t){return e.trapFocusRight(t)},ref:function(t){return e.nextButton=t},class:"arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-year-".concat(this.parentId),role:"grid",class:"months"},a("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map((function(t,o){return e.renderMonths(t,o)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map((function(t,o){return e.renderMonths(t,o+3)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map((function(t,o){return e.renderMonths(t,o+6)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map((function(t,o){return e.renderMonths(t,o+9)})))))),this.isExpanded&&a("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),a("div",{id:"month-title",class:"sr-only"},i.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),a("div",{id:"year-title",class:"sr-only"},i.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),a("div",{id:"application",class:"sr-only"},i.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());l.style=c}}}));
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var a=0,n=t.length,s;a<n;a++){if(s||!(a in t)){if(!s)s=Array.prototype.slice.call(t,0,a);s[a]=t[a]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-c4ca5d46.system.js","./p-b267e710.system.js"],(function(e){"use strict";var t,o,a,n,s,i,r,d;return{setters:[function(e){t=e.r;o=e.c;a=e.h;n=e.f;s=e.g},function(e){i=e.i;r=e.m;d=e.y}],execute:function(){var c='.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:rgba(74, 74, 74, 0.05)}.toggle:disabled .calendar::after{color:#7b7b7b}.toggle:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#e6e6e6}.toggle:hover .calendar::after{color:#575195}[dir=RTL] .toggle{right:auto;left:0}.toggle span::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f0ed";font-size:1.5rem;color:#575195;padding:0;line-height:2.5rem}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:#fff}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:transparent;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:#575195;color:#575195}.popup .calendar-header .title-box:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";padding-left:0.75rem;font-size:1.12rem}.popup .calendar-header .title-box.year:after{content:"\\f143"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:#575195;background:transparent;padding:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi:hover{background-color:#efeef1}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9);background-color:#d7d6d9}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:#757575}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:#eeedf4}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:#4a4a4a;border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:#efeef1}.popup .day-view .date-grid .date-cell:active{background-color:#575195;color:#ffffff}.popup .day-view .date-grid .date-cell.current-month{color:#4a4a4a}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:#575195;color:#ffffff}.popup .month-view .months{border-top:2px solid;border-top-color:#eeedf4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:#eeedf4}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:#575195}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:#eeedf4}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{background-color:#efeef1}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:#575195;color:#ffffff}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var l=e("priv_datepicker",function(){function e(e){var n=this;t(this,e);this.cellTriggered=o(this,"cellTriggered",7);this.toggleButtonClicked=o(this,"toggleButtonClicked",7);this.popupClosed=o(this,"popupClosed",7);this.popupBlurred=o(this,"popupBlurred",7);this.popupClicked=true;this.buttonClicked=true;this.prevClicked=true;this.nextClicked=true;this.openUp=false;this.calendar_months=[i.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),i.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),i.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),i.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),i.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),i.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),i.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),i.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),i.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),i.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),i.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),i.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})];this.weekdays=[i.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),i.formatMessage({id:"date.monday",defaultMessage:"Monday"}),i.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),i.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),i.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),i.formatMessage({id:"date.friday",defaultMessage:"Friday"}),i.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})];this.renderCalendarDate=function(e,t){var o=n.removeZeroes(String(e[1]));var s=n.removeZeroes(String(e[2]));var r=o===n.monthInFocus?"current-month":"";var d=e[0]+e[1]+e[2];var c=n.isDateToday(e);return a("div",{role:"gridcell",id:"cell-".concat(d,"-").concat(n.parentId),class:"date-cell ".concat(r),"aria-selected":false,"aria-label":"".concat(c?"".concat(i.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"}),", "):"").concat(n.weekdays[t],", ").concat(n.calendar_months[o-1]," ").concat(s,", ").concat(e[0]),onClick:function(e){n.handleTriggeredDate(e.target)},onKeyDown:function(e){return n.trapFocusEnd(e)},"data-month":e[1],"data-year":e[0],onBlur:function(e){return e.stopPropagation()}},s)};this.disabled=false;this.isExpanded=false;this.view="day";this.date=new Date;this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth;this.parentId="";this.isTabbing=false}e.prototype.handleKey=function(e){this.prevClicked=false;this.nextClicked=false;switch(e.key){case"Enter":e.preventDefault();!e.target.id.includes("popup-title")&&e.target.click();break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.closePopup(true)}break;case"PageUp":e.preventDefault();this.backOneMonth();break;case"PageDown":e.preventDefault();this.forwardOneMonth();break;case"Home":e.preventDefault();this.unfocusCell();this.dayInFocus=1;n(this.el);break;case"End":e.preventDefault();this.unfocusCell();this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus);n(this.el);break;case"ArrowLeft":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===1){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else{this.dayInFocus-=1}}else{this.unfocusMonth();if(this.monthNumInFocus===0){this.monthNumInFocus=11}else{this.monthNumInFocus-=1}}break;case"ArrowRight":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=1}else{this.dayInFocus+=1}}else{this.unfocusMonth();if(this.monthNumInFocus===11){this.monthNumInFocus=0}else{this.monthNumInFocus+=1}}break;case"ArrowUp":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus<8){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;var o=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-o}else{this.dayInFocus-=7}}else{this.unfocusMonth();if(this.monthNumInFocus<3){this.monthNumInFocus+=9}else{this.monthNumInFocus-=3}}break;case"ArrowDown":e.preventDefault();if(!this.isExpanded){this.openPopup()}else{if(this.view==="day"){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();var a=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>a){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.dayInFocus-a}else{this.dayInFocus+=7}}else{var s=(document.activeElement.shadowRoot||document).activeElement;if(s.tagName==="BUTTON"||s.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth();if(this.monthNumInFocus>8){this.monthNumInFocus-=9}else{this.monthNumInFocus+=3}}}break}};e.prototype.toggleTabbingOn=function(e){var t=["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"];if(t.includes(e.key)){this.isTabbing=true}};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.blurHandler=function(e){if(!this.popupClicked&&!this.buttonClicked&&this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}this.popupClicked=false;this.buttonClicked=false};e.prototype.handleBlurOnWindow=function(e){if(this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}};e.prototype.componentDidUpdate=function(){this.handleSelectedDate();if(this.isExpanded){this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():this.view==="day"?this.focusCell():this.focusMonth()}};e.prototype.componentDidLoad=function(){this.handleSelectedDate();this.setDateValuesForView()};e.prototype.zeroPad=function(e,t){if(!String.prototype.padStart){String.prototype.padStart=function e(t,o){t=t-this.length;if(t>o.length){o+=o.repeat(t/o.length)}return o.slice(0,t)+String(this)}}return"".concat(e.toString()).padStart(t,"0")};e.prototype.removeZeroes=function(e){return+e<10?+e.slice(1):+e};e.prototype.isDateToday=function(e){var t=this;var o=new Date;var a=[o.getFullYear().toString(),(o.getMonth()+1).toString(),o.getDate().toString()];return a.reduce((function(o,a,n){return o&&t.removeZeroes(e[n]).toString()===a}),true)};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.buttonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(this.view==="day"){this.unfocusCell()}this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.changeView("day");if(e){this.buttonEl.focus()}};e.prototype.openPopup=function(){var e=this;this.panelPosition();this.setDateValuesForView();this.prevClicked=false;this.nextClicked=false;this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.focusCell()};e.prototype.getMonthDays=function(e,t){var o=[4,6,9,11];var a=t%4===0;return e===2?a?29:28:o.includes(e)?30:31};e.prototype.getMonthFirstDay=function(e,t){return+new Date(t,e-1,1,12,0,0).getDay()+1};e.prototype.getPreviousMonth=function(e,t){var o=e>1?e-1:12;var a=e>1?t:t-1;return{month:o,year:a}};e.prototype.getNextMonth=function(e,t){var o=e<12?e+1:1;var a=e<12?t:t+1;return{month:o,year:a}};e.prototype.getCalendarDates=function(e,t){var o=this;var a=this.getMonthDays(e,t);var n=this.getMonthFirstDay(e,t);var s=n-1;var i=42-(s+a);i=i>6?i-7:i;var r=this.getPreviousMonth(e,t),d=r.month,c=r.year;var l=this.getNextMonth(e,t),u=l.month,h=l.year;var p=this.getMonthDays(d,c);var f=__spreadArray([],new Array(s).fill("1"),true).map((function(e,t){var a=t+1+(p-s);return[c.toString(),o.zeroPad(d,2),o.zeroPad(a,2)]}));var m=__spreadArray([],new Array(a).fill("1"),true).map((function(a,n){var s=n+1;return[t.toString(),o.zeroPad(e,2),o.zeroPad(s,2)]}));var g=__spreadArray([],new Array(i).fill("1"),true).map((function(e,t){var a=t+1;return[h.toString(),o.zeroPad(u,2),o.zeroPad(a,2)]}));return __spreadArray(__spreadArray(__spreadArray([],f,true),m,true),g,true)};e.prototype.forwardOneMonth=function(){this.unfocusCell();var e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Displaying ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.backOneMonth=function(){this.unfocusCell();var e=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Viewing ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.handleTriggeredDate=function(e){this.cellTriggered.emit(e);this.closePopup(true)};e.prototype.handleSelectedDate=function(){if(this.selectedDate){this.selectedDate.removeAttribute("aria-selected")}this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay);if(this.selectedDate){this.selectedDate.setAttribute("aria-selected","true")}};e.prototype.getCellById=function(e,t,o){var a=e+this.zeroPad(t,2)+this.zeroPad(o,2);return this.el.querySelector("#cell-".concat(a,"-").concat(this.parentId))};e.prototype.unfocusCell=function(){var e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e.tabIndex=-1};e.prototype.focusCell=function(){var e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>e?e:this.dayInFocus;var t=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);if(t){t.tabIndex=0;t.focus()}};e.prototype.unfocusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=-1};e.prototype.focusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=0;e.focus()};e.prototype.trapFocusLeft=function(e){if(e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.trapFocusEnd=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.prevButton.focus()}};e.prototype.trapFocusRight=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.focusCellInView=function(){if(this.view==="day"){this.focusCell()}else{this.focusMonth()}};e.prototype.toggleBusyAttribute=function(e){this.el.querySelector("#wm-container").setAttribute("aria-busy",e)};e.prototype.setDateValuesForView=function(){this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth-1};e.prototype.updateLiveRegion=function(e){var t=this.el.querySelector("#live-region");t.innerHTML=e};e.prototype.panelPosition=function(){var e=document.getElementById(this.parentId);var t=e.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=r(e,this.popupEl.clientHeight,t);if(d(e,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}};e.prototype.changeView=function(e){this.view=e;this.monthNumInFocus=this.monthInFocus-1};e.prototype.renderMonths=function(e,t){var o=this;return a("div",{id:"month-".concat(t,"-").concat(this.parentId),class:"month ".concat(this.selectedMonth-1===t?"selected":""),role:"gridcell",tabindex:t+1===this.monthInFocus?0:-1,onKeyDown:function(e){return o.trapFocusEnd(e)},onBlur:function(e){return e.stopPropagation()},onClick:function(){o.monthInFocus=t+1;o.changeView("day")}},e)};e.prototype.render=function(){var e=this;var t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return a("div",{class:"container",id:"wm-container"},a("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input-".concat(this.parentId),ref:function(t){return e.buttonEl=t},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle-".concat(this.parentId)},a("span",{class:"calendar",title:i.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),a("div",{class:"popup ".concat(this.view,"-view ").concat(this.openUp?"expand-upwards":""," ").concat(this.isTabbing?"user-is-tabbing":""),id:"popup-".concat(this.parentId),ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true},role:"application","aria-describedby":"application"},this.view==="day"?a("div",{class:"day-view"},a("div",{class:"calendar-header"},a("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.backOneMonth()},onKeyDown:function(t){return e.trapFocusLeft(t)},ref:function(t){return e.prevButton=t},class:"arw-btn","aria-label":i.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-month-".concat(this.parentId),class:"title-box",tabindex:0,role:"button",onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("month")}},onClick:this.changeView.bind(this,"month"),"aria-label":"".concat(i.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"}),": ").concat(this.calendar_months[this.monthInFocus-1],"\n ").concat(this.yearInFocus,"."),"aria-describedby":"month-title"},a("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),a("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.forwardOneMonth()},onKeyDown:function(t){return e.trapFocusRight(t)},"aria-label":i.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:function(t){return e.nextButton=t},class:"arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-month-".concat(this.parentId),role:"grid",class:"date-grid"},a("div",{role:"rowgroup",class:"date-header"},a("div",{role:"row",class:"header-row"},a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),a("div",{role:"columnheader",class:"header-cell"},a("span",null,i.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),a("div",{role:"rowgroup"},a("div",{role:"row",class:"date-row"},t.slice(0,7).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(7,14).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(14,21).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(21,28).map((function(t,o){return e.renderCalendarDate(t,o)}))),a("div",{role:"row"},t.slice(28,35).map((function(t,o){return e.renderCalendarDate(t,o)}))),t.length>35?a("div",{role:"row"},t.slice(35).map((function(t,o){return e.renderCalendarDate(t,o)}))):""))):a("div",{class:"month-view"},a("div",{class:"calendar-header"},a("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.yearInFocus-=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},onKeyDown:function(t){return e.trapFocusLeft(t)},"aria-label":i.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:function(t){return e.prevButton=t},class:"arw-btn"},a("span",{class:"mdi"},"")),a("div",{id:"popup-title-year-".concat(this.parentId),tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("day")}},"aria-labelledby":"year-title"},a("span",{class:"title"},this.yearInFocus)),a("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.yearInFocus+=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},"aria-label":i.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:function(t){return e.trapFocusRight(t)},ref:function(t){return e.nextButton=t},class:"arw-btn"},a("span",{class:"mdi"},""))),a("div",{"aria-labelledby":"popup-title-year-".concat(this.parentId),role:"grid",class:"months"},a("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map((function(t,o){return e.renderMonths(t,o)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map((function(t,o){return e.renderMonths(t,o+3)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map((function(t,o){return e.renderMonths(t,o+6)}))),a("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map((function(t,o){return e.renderMonths(t,o+9)})))))),this.isExpanded&&a("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),a("div",{id:"month-title",class:"sr-only"},i.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),a("div",{id:"year-title",class:"sr-only"},i.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),a("div",{id:"application",class:"sr-only"},i.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());l.style=c}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,o,t){function n(e){return e instanceof o?e:new o((function(r){r(e)}))}return new(o||(o=Promise))((function(o,p){function a(e){try{i(t.next(e))}catch(e){p(e)}}function s(e){try{i(t["throw"](e))}catch(e){p(e)}}function i(e){e.done?o(e.value):n(e.value).then(a,s)}i((t=t.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var o={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},t,n,p,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return i([e,r])}}function i(s){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(t=1,n&&(p=s[0]&2?n["return"]:s[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,s[1])).done)return p;if(n=0,p)s=[s[0]&2,p.value];switch(s[0]){case 0:case 1:p=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(p=o.trys,p=p.length>0&&p[p.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!p||s[1]>p[0]&&s[1]<p[3])){o.label=s[1];break}if(s[0]===6&&o.label<p[1]){o.label=p[1];p=s;break}if(p&&o.label<p[2]){o.label=p[2];o.ops.push(s);break}if(p[2])o.ops.pop();o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e];n=0}finally{t=p=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-c4ca5d46.system.js","./p-9eb5a71e.system.js","./p-f6b2e4ac.system.js"],(function(e){"use strict";var r,o,t,n,p,a,s,i,c,m,d,l,w,g,b,h,u,f,x,v;return{setters:[function(e){r=e.r;o=e.f;t=e.h;n=e.H;p=e.g;a=e.c},function(e){s=e.g;i=e.i;c=e.d;m=e.q},function(e){d=e.a;l=e.h;w=e.g;g=e.r;b=e.d;h=e.e;u=e.f;f=e.i;x=e.k;v=e.l}],execute:function(){var y=":host,wm-progress-indicator{display:block}:host .component-wrapper,wm-progress-indicator .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper .label,wm-progress-indicator .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-progress-indicator .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .label.custom-width,wm-progress-indicator .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .doughnut-svg,wm-progress-indicator .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type),wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-progress-indicator .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-progress-indicator .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper,wm-progress-indicator .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type),wm-progress-indicator .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden,wm-progress-indicator .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper path:active,wm-progress-indicator .component-wrapper path:active,:host .component-wrapper path:hover,wm-progress-indicator .component-wrapper path:hover,:host .component-wrapper path:focus,wm-progress-indicator .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,wm-progress-indicator .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-progress-indicator .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-progress-indicator .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-progress-indicator .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-progress-indicator .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner,wm-progress-indicator .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-progress-indicator .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-progress-indicator .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-progress-indicator .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-progress-indicator .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,wm-progress-indicator .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,wm-progress-indicator .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,wm-progress-indicator .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-progress-indicator .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-progress-indicator .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-progress-indicator .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-progress-indicator .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-progress-indicator .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-progress-indicator .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,wm-progress-indicator .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-progress-indicator .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-progress-indicator .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-progress-indicator .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-progress-indicator .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-progress-indicator .component-wrapper.bar2,:host .component-wrapper.bar3,wm-progress-indicator .component-wrapper.bar3,:host .component-wrapper.bar4,wm-progress-indicator .component-wrapper.bar4,:host .component-wrapper.bar5,wm-progress-indicator .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning,wm-progress-indicator .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,wm-progress-indicator .component-wrapper.bar6,:host .component-wrapper.bar7,wm-progress-indicator .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,wm-progress-indicator .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper,wm-progress-indicator .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,wm-progress-indicator .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart,wm-progress-indicator .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,wm-progress-indicator .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines,wm-progress-indicator .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, #8f8f8f 1px, transparent 1px);background-position:-1px;border-left:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,wm-progress-indicator .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows,wm-progress-indicator .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,wm-progress-indicator .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label,wm-progress-indicator .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,wm-progress-indicator .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden,wm-progress-indicator .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,wm-progress-indicator .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar,wm-progress-indicator .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,wm-progress-indicator .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value,wm-progress-indicator .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,wm-progress-indicator .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis,wm-progress-indicator .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,wm-progress-indicator .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick,wm-progress-indicator .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,wm-progress-indicator .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span,wm-progress-indicator .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,wm-progress-indicator .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero,wm-progress-indicator .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,wm-progress-indicator .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,wm-progress-indicator .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,wm-progress-indicator .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,wm-progress-indicator .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,wm-progress-indicator .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus,wm-progress-indicator .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,wm-progress-indicator .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,wm-progress-indicator .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,wm-progress-indicator .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,wm-progress-indicator .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,wm-progress-indicator .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar,wm-progress-indicator .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.left-label,wm-progress-indicator .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-progress-indicator .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning,wm-progress-indicator .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions,wm-progress-indicator #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper,wm-progress-indicator .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-progress-indicator .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar1,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .legend.bar3,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var k=e("wm_progress_indicator",function(){function e(e){r(this,e);this.uid=s();this.slicesDetails=[];this.barLabelsWidth=this.el.parentElement.barLabelsWidth;this.label=undefined;this.subinfo=undefined;this.completionMessage=undefined;this.showLegend=true;this.isTabbing=false;this.mode=undefined;this.userIsNavigating=false}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return this.mode?d[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return i.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}if(this.el.children.length!==2){console.warn("wm-progress-indicator component must have 2 wm-progress-slice children.")}this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(function(r){return e.mode=r.detail}))};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,w.call(this,this.mode)];case 1:e.sent();o(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){w.call(this,this.mode)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return g.call(this,this.mode)}else{return b.call(this,this.mode)}};e.prototype.render=function(){var e=this;return t(n,{onBlur:function(){return x.call(e)}},t("div",{ref:function(r){return e.componentWrapperEl=r},class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""),role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},t("label",{id:"label-".concat(this.uid),class:"label ".concat(this.barLabelsWidth&&this.mode==="bar"?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:"graphic-".concat(this.uid)},t("span",{class:"label-text"},this.label),this.subinfo?t("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?u.call(this,this.mode):"",t("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.mode==="doughnut"?f.call(this):""),h())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return p(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["handleModeUpdate"]}},enumerable:false,configurable:true});return e}());k.style=y;var z=":host .legend-wrapper,wm-progress-monitor .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .legend-wrapper .legend,wm-progress-monitor .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .legend-wrapper .legend.bar1,wm-progress-monitor .legend-wrapper .legend.bar1,:host .legend-wrapper .legend.bar6,wm-progress-monitor .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top,wm-progress-monitor .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item,wm-progress-monitor .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color,wm-progress-monitor .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom,wm-progress-monitor .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item,wm-progress-monitor .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color,wm-progress-monitor .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item,wm-progress-monitor .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-monitor .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text,wm-progress-monitor .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color,wm-progress-monitor .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .legend-wrapper .legend.bar3,wm-progress-monitor .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host,wm-progress-monitor{display:-ms-flexbox;display:flex}:host .legend-wrapper,wm-progress-monitor .legend-wrapper{-ms-flex-align:start;align-items:flex-start;padding:0 1.25rem}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";var P=e("wm_progress_monitor",function(){function e(e){var t=this;r(this,e);this.wmProgressMonitorModeChange=a(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=c((function(){return o(t.el)}),50);this.breakpoint=undefined;this.groupLegend=undefined;this.barLabelsWidth=undefined}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var r=e>=20?e:e*this.doughnutWidth;return r},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var r=new ResizeObserver((function(){return e.debouncedUpdate()}));r.observe(this.el)};e.prototype.componentDidLoad=function(){this.wmProgressMonitorModeChange.emit(this.mode);this.modeInitialized=true};e.prototype.componentWillUpdate=function(){if(this.prevMode!==this.mode){this.wmProgressMonitorModeChange.emit(this.mode)}this.prevMode=this.mode};e.prototype.parseToNum=function(e){var r=e.toString();var o=r.replace("px","");return parseInt(o)};e.prototype.renderLegend=function(){var e=m(this.groupLegend);var r=d.bar.colors;return t("div",{class:"legend-wrapper"},t("div",{class:"legend"},e.map((function(e,o){var t={key:e,color:r[o]};return v(t)}))))};e.prototype.render=function(){return t(n,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&this.groupLegend&&this.mode==="bar"&&this.renderLegend(),this.modeInitialized&&t("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return p(this)},enumerable:false,configurable:true});return e}());P.style=z;var j=e("wm_progress_slice",function(){function e(e){r(this,e);this.wmProgressSliceUpdated=a(this,"wmProgressSliceUpdated",7);this.legend=undefined;this.amount=undefined;this.popoverTitle=undefined;this.popoverText=undefined;this.popoverButtonText=undefined}e.prototype.componentDidUpdate=function(){this.wmProgressSliceUpdated.emit()};return e}())}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,r,o,t){function n(e){return e instanceof o?e:new o((function(r){r(e)}))}return new(o||(o=Promise))((function(o,p){function a(e){try{i(t.next(e))}catch(e){p(e)}}function s(e){try{i(t["throw"](e))}catch(e){p(e)}}function i(e){e.done?o(e.value):n(e.value).then(a,s)}i((t=t.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var o={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},t,n,p,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return i([e,r])}}function i(s){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(t=1,n&&(p=s[0]&2?n["return"]:s[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,s[1])).done)return p;if(n=0,p)s=[s[0]&2,p.value];switch(s[0]){case 0:case 1:p=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(p=o.trys,p=p.length>0&&p[p.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!p||s[1]>p[0]&&s[1]<p[3])){o.label=s[1];break}if(s[0]===6&&o.label<p[1]){o.label=p[1];p=s;break}if(p&&o.label<p[2]){o.label=p[2];o.ops.push(s);break}if(p[2])o.ops.pop();o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e];n=0}finally{t=p=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-c4ca5d46.system.js","./p-b267e710.system.js","./p-d1af63b5.system.js"],(function(e){"use strict";var r,o,t,n,p,a,s,i,c,m,d,l,w,g,b,h,u,f,x,v;return{setters:[function(e){r=e.r;o=e.f;t=e.h;n=e.H;p=e.g;a=e.c},function(e){s=e.g;i=e.i;c=e.d;m=e.q},function(e){d=e.a;l=e.h;w=e.g;g=e.r;b=e.d;h=e.e;u=e.f;f=e.i;x=e.k;v=e.l}],execute:function(){var y=":host,wm-progress-indicator{display:block}:host .component-wrapper,wm-progress-indicator .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper .label,wm-progress-indicator .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-progress-indicator .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .label.custom-width,wm-progress-indicator .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .doughnut-svg,wm-progress-indicator .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment,wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type),wm-progress-indicator .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-progress-indicator .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-progress-indicator .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper,wm-progress-indicator .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type),wm-progress-indicator .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden,wm-progress-indicator .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper path:active,wm-progress-indicator .component-wrapper path:active,:host .component-wrapper path:hover,wm-progress-indicator .component-wrapper path:hover,:host .component-wrapper path:focus,wm-progress-indicator .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,wm-progress-indicator .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-progress-indicator .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-progress-indicator .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-progress-indicator .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment,wm-progress-indicator .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-progress-indicator .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner,wm-progress-indicator .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-progress-indicator .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-progress-indicator .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-progress-indicator .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-progress-indicator .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,wm-progress-indicator .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,wm-progress-indicator .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,wm-progress-indicator .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-progress-indicator .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-progress-indicator .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-progress-indicator .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-progress-indicator .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-progress-indicator .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-progress-indicator .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,wm-progress-indicator .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-progress-indicator .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-progress-indicator .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-progress-indicator .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-progress-indicator .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-progress-indicator .component-wrapper.bar2,:host .component-wrapper.bar3,wm-progress-indicator .component-wrapper.bar3,:host .component-wrapper.bar4,wm-progress-indicator .component-wrapper.bar4,:host .component-wrapper.bar5,wm-progress-indicator .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning,wm-progress-indicator .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,wm-progress-indicator .component-wrapper.bar6,:host .component-wrapper.bar7,wm-progress-indicator .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,wm-progress-indicator .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper,wm-progress-indicator .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,wm-progress-indicator .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart,wm-progress-indicator .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,wm-progress-indicator .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines,wm-progress-indicator .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, #8f8f8f 1px, transparent 1px);background-position:-1px;border-left:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,wm-progress-indicator .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows,wm-progress-indicator .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,wm-progress-indicator .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label,wm-progress-indicator .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,wm-progress-indicator .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden,wm-progress-indicator .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,wm-progress-indicator .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar,wm-progress-indicator .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,wm-progress-indicator .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value,wm-progress-indicator .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,wm-progress-indicator .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis,wm-progress-indicator .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,wm-progress-indicator .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick,wm-progress-indicator .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,wm-progress-indicator .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span,wm-progress-indicator .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,wm-progress-indicator .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero,wm-progress-indicator .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,wm-progress-indicator .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,wm-progress-indicator .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,wm-progress-indicator .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,wm-progress-indicator .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,wm-progress-indicator .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus,wm-progress-indicator .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,wm-progress-indicator .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,wm-progress-indicator .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,wm-progress-indicator .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,wm-progress-indicator .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,wm-progress-indicator .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar,wm-progress-indicator .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.left-label,wm-progress-indicator .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-progress-indicator .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning,wm-progress-indicator .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions,wm-progress-indicator #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper,wm-progress-indicator .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-progress-indicator .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar1,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .legend.bar3,wm-progress-indicator .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var k=e("wm_progress_indicator",function(){function e(e){r(this,e);this.uid=s();this.slicesDetails=[];this.barLabelsWidth=this.el.parentElement.barLabelsWidth;this.label=undefined;this.subinfo=undefined;this.completionMessage=undefined;this.showLegend=true;this.isTabbing=false;this.mode=undefined;this.userIsNavigating=false}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return this.mode?d[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return i.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}if(this.el.children.length!==2){console.warn("wm-progress-indicator component must have 2 wm-progress-slice children.")}this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(function(r){return e.mode=r.detail}))};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,w.call(this,this.mode)];case 1:e.sent();o(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){w.call(this,this.mode)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return g.call(this,this.mode)}else{return b.call(this,this.mode)}};e.prototype.render=function(){var e=this;return t(n,{onBlur:function(){return x.call(e)}},t("div",{ref:function(r){return e.componentWrapperEl=r},class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""),role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},t("label",{id:"label-".concat(this.uid),class:"label ".concat(this.barLabelsWidth&&this.mode==="bar"?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:"graphic-".concat(this.uid)},t("span",{class:"label-text"},this.label),this.subinfo?t("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?u.call(this,this.mode):"",t("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.mode==="doughnut"?f.call(this):""),h())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return p(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["handleModeUpdate"]}},enumerable:false,configurable:true});return e}());k.style=y;var z=":host .legend-wrapper,wm-progress-monitor .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .legend-wrapper .legend,wm-progress-monitor .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .legend-wrapper .legend.bar1,wm-progress-monitor .legend-wrapper .legend.bar1,:host .legend-wrapper .legend.bar6,wm-progress-monitor .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top,wm-progress-monitor .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item,wm-progress-monitor .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color,wm-progress-monitor .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom,wm-progress-monitor .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item,wm-progress-monitor .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color,wm-progress-monitor .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item,wm-progress-monitor .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-monitor .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text,wm-progress-monitor .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color,wm-progress-monitor .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .legend-wrapper .legend.bar3,wm-progress-monitor .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host,wm-progress-monitor{display:-ms-flexbox;display:flex}:host .legend-wrapper,wm-progress-monitor .legend-wrapper{-ms-flex-align:start;align-items:flex-start;padding:0 1.25rem}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";var P=e("wm_progress_monitor",function(){function e(e){var t=this;r(this,e);this.wmProgressMonitorModeChange=a(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=c((function(){return o(t.el)}),50);this.breakpoint=undefined;this.groupLegend=undefined;this.barLabelsWidth=undefined}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var r=e>=20?e:e*this.doughnutWidth;return r},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var r=new ResizeObserver((function(){return e.debouncedUpdate()}));r.observe(this.el)};e.prototype.componentDidLoad=function(){this.wmProgressMonitorModeChange.emit(this.mode);this.modeInitialized=true};e.prototype.componentWillUpdate=function(){if(this.prevMode!==this.mode){this.wmProgressMonitorModeChange.emit(this.mode)}this.prevMode=this.mode};e.prototype.parseToNum=function(e){var r=e.toString();var o=r.replace("px","");return parseInt(o)};e.prototype.renderLegend=function(){var e=m(this.groupLegend);var r=d.bar.colors;return t("div",{class:"legend-wrapper"},t("div",{class:"legend"},e.map((function(e,o){var t={key:e,color:r[o]};return v(t)}))))};e.prototype.render=function(){return t(n,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&this.groupLegend&&this.mode==="bar"&&this.renderLegend(),this.modeInitialized&&t("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return p(this)},enumerable:false,configurable:true});return e}());P.style=z;var j=e("wm_progress_slice",function(){function e(e){r(this,e);this.wmProgressSliceUpdated=a(this,"wmProgressSliceUpdated",7);this.legend=undefined;this.amount=undefined;this.popoverTitle=undefined;this.popoverText=undefined;this.popoverButtonText=undefined}e.prototype.componentDidUpdate=function(){this.wmProgressSliceUpdated.emit()};return e}())}}}));
@@ -1 +1 @@
1
- import{r as t,c as e,h as a,g as i}from"./p-b5dee715.js";import{d as n}from"./p-cfa80f5b.js";const s=class{constructor(a){t(this,a),this.wmPaginationPageClicked=e(this,"wmPaginationPageClicked",7),this.pageClicked=e(this,"pageClicked",7),this.focusCurrentPage=e(this,"focusCurrentPage",7),this.totalPages=0,this.debouncedResize=n((()=>{this.isLargeViewport=window.innerWidth>600}),250),this.getMiddlePageNums=()=>{let t;return t=this.currentPage<4?[2,3,4]:this.currentPage>this.totalPages-3?[this.totalPages-3,this.totalPages-2,this.totalPages-1]:[this.currentPage-1,this.currentPage,this.currentPage+1],t},this.currentPage=1,this.totalItems=void 0,this.itemsPerPage=void 0,this.value=1,this.isLargeViewport=window.innerWidth>600,this.isTabbing=!1,this.srAnnouncement=""}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}maintainFocusOnNumberChange(t){window.requestAnimationFrame((()=>{switch(t){case"previous":1===this.currentPage&&this.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector(`button#wm-${this.totalPages}`).focus();break;case"prev-arrow":1===this.currentPage&&this.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":this.el.shadowRoot.querySelector(`button#wm-${this.currentPage}`).focus();default:return}}))}handleResize(){this.debouncedResize()}calculateTotalPages(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)}componentWillLoad(){if(!this.totalItems||!this.itemsPerPage||!this.currentPage)throw new Error("Please check the required attributes");this.calculateTotalPages(),document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.el.focus=()=>{this.isLargeViewport?this.el.shadowRoot.getElementById(`wm-${this.currentPage}`).focus():1===this.currentPage?this.el.shadowRoot.getElementById("next-arw").focus():this.el.shadowRoot.getElementById("wm-1-arw").focus()}}updatePageDisplayed(t){this.value=t,this.wmPaginationPageClicked.emit(),this.pageClicked.emit(),this.srAnnouncement=`Current page, ${this.currentPage}. ${this.getCurrentPagesInView()}`}displayShortPagination(){let t=[];for(let e=1;e<=this.totalPages;e++)t.push(this.displayPageNumber(e));return t}displayLongPagination(){return[this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis(),...this.getMiddlePageNums().map((t=>this.displayPageNumber(t))),this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)]}displayPageNumber(t){return a("button",{id:`wm-${t}`,class:"paginationbtn",onClick:()=>{this.currentPage=t,this.updatePageDisplayed(t),this.maintainFocusOnNumberChange("page")},value:t,"aria-label":this.currentPage!==t?`Go to page ${t}`:"","aria-current":this.currentPage===t?"page":void 0},t)}displayEllipsis(){return a("span",{class:"ellipsis"},"...")}getCurrentPagesInView(){let t=this.itemsPerPage*this.currentPage;const e=t-this.itemsPerPage+1;return t>this.totalItems&&(t=this.totalItems),"Viewing "+(e===t?`${e}`:`${e}–${t} of ${this.totalItems}`)}renderLarge(){return a("div",{class:"largescreen"},a("div",{class:"pageview"},this.getCurrentPagesInView()),a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"previous",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage=this.currentPage-1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("previous")},disabled:1===this.currentPage,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),a("button",{id:"next",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage=this.currentPage+1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))}renderSmall(){return a("div",{class:"smallscreen"},a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"wm-1-arw",class:"paginationbtn",onClick:()=>{this.currentPage=1,this.updatePageDisplayed(1),this.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":1===this.currentPage?"page":void 0,"aria-label":"Go to page 1","aria-controls":"status",disabled:1===this.currentPage},a("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),a("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage-=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("prev-arrow")},disabled:1===this.currentPage,"aria-label":"Go to previous page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,a("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage+=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),a("button",{id:`wm-${this.totalPages}-arw`,class:"paginationbtn",onClick:()=>{this.currentPage=this.totalPages,this.updatePageDisplayed(this.totalPages),this.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":void 0,"aria-label":`Go to last page, page ${this.totalPages}`,"aria-controls":"status",disabled:this.currentPage===this.totalPages},a("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))}render(){return this.totalItems>this.itemsPerPage&&a("nav",{"aria-label":`Pagination Navigation. ${this.getCurrentPagesInView()}. Current page, ${this.currentPage}.`},this.isLargeViewport?this.renderLarge():this.renderSmall(),a("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))}static get delegatesFocus(){return!0}get el(){return i(this)}static get watchers(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}}};s.style='nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:#575195;background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:#565397}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:#9f9f9f;pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:#9f9f9f}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]),nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background-color:#575195;color:#fff}nav .largescreen .paginationbtn[aria-current=page]:hover{-webkit-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background:#4e4986}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{s as wm_pagination}
1
+ import{r as t,c as e,h as a,g as i}from"./p-b5dee715.js";import{d as n}from"./p-91480a89.js";const s=class{constructor(a){t(this,a),this.wmPaginationPageClicked=e(this,"wmPaginationPageClicked",7),this.pageClicked=e(this,"pageClicked",7),this.focusCurrentPage=e(this,"focusCurrentPage",7),this.totalPages=0,this.debouncedResize=n((()=>{this.isLargeViewport=window.innerWidth>600}),250),this.getMiddlePageNums=()=>{let t;return t=this.currentPage<4?[2,3,4]:this.currentPage>this.totalPages-3?[this.totalPages-3,this.totalPages-2,this.totalPages-1]:[this.currentPage-1,this.currentPage,this.currentPage+1],t},this.currentPage=1,this.totalItems=void 0,this.itemsPerPage=void 0,this.value=1,this.isLargeViewport=window.innerWidth>600,this.isTabbing=!1,this.srAnnouncement=""}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}maintainFocusOnNumberChange(t){window.requestAnimationFrame((()=>{switch(t){case"previous":1===this.currentPage&&this.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector(`button#wm-${this.totalPages}`).focus();break;case"prev-arrow":1===this.currentPage&&this.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":this.el.shadowRoot.querySelector(`button#wm-${this.currentPage}`).focus();default:return}}))}handleResize(){this.debouncedResize()}calculateTotalPages(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)}componentWillLoad(){if(!this.totalItems||!this.itemsPerPage||!this.currentPage)throw new Error("Please check the required attributes");this.calculateTotalPages(),document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.el.focus=()=>{this.isLargeViewport?this.el.shadowRoot.getElementById(`wm-${this.currentPage}`).focus():1===this.currentPage?this.el.shadowRoot.getElementById("next-arw").focus():this.el.shadowRoot.getElementById("wm-1-arw").focus()}}updatePageDisplayed(t){this.value=t,this.wmPaginationPageClicked.emit(),this.pageClicked.emit(),this.srAnnouncement=`Current page, ${this.currentPage}. ${this.getCurrentPagesInView()}`}displayShortPagination(){let t=[];for(let e=1;e<=this.totalPages;e++)t.push(this.displayPageNumber(e));return t}displayLongPagination(){return[this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis(),...this.getMiddlePageNums().map((t=>this.displayPageNumber(t))),this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)]}displayPageNumber(t){return a("button",{id:`wm-${t}`,class:"paginationbtn",onClick:()=>{this.currentPage=t,this.updatePageDisplayed(t),this.maintainFocusOnNumberChange("page")},value:t,"aria-label":this.currentPage!==t?`Go to page ${t}`:"","aria-current":this.currentPage===t?"page":void 0},t)}displayEllipsis(){return a("span",{class:"ellipsis"},"...")}getCurrentPagesInView(){let t=this.itemsPerPage*this.currentPage;const e=t-this.itemsPerPage+1;return t>this.totalItems&&(t=this.totalItems),"Viewing "+(e===t?`${e}`:`${e}–${t} of ${this.totalItems}`)}renderLarge(){return a("div",{class:"largescreen"},a("div",{class:"pageview"},this.getCurrentPagesInView()),a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"previous",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage=this.currentPage-1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("previous")},disabled:1===this.currentPage,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),a("button",{id:"next",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage=this.currentPage+1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))}renderSmall(){return a("div",{class:"smallscreen"},a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"wm-1-arw",class:"paginationbtn",onClick:()=>{this.currentPage=1,this.updatePageDisplayed(1),this.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":1===this.currentPage?"page":void 0,"aria-label":"Go to page 1","aria-controls":"status",disabled:1===this.currentPage},a("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),a("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage-=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("prev-arrow")},disabled:1===this.currentPage,"aria-label":"Go to previous page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,a("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage+=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),a("button",{id:`wm-${this.totalPages}-arw`,class:"paginationbtn",onClick:()=>{this.currentPage=this.totalPages,this.updatePageDisplayed(this.totalPages),this.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":void 0,"aria-label":`Go to last page, page ${this.totalPages}`,"aria-controls":"status",disabled:this.currentPage===this.totalPages},a("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))}render(){return this.totalItems>this.itemsPerPage&&a("nav",{"aria-label":`Pagination Navigation. ${this.getCurrentPagesInView()}. Current page, ${this.currentPage}.`},this.isLargeViewport?this.renderLarge():this.renderSmall(),a("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))}static get delegatesFocus(){return!0}get el(){return i(this)}static get watchers(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}}};s.style='nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:#575195;background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:#565397}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:#9f9f9f;pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:#9f9f9f}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]),nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background-color:#575195;color:#fff}nav .largescreen .paginationbtn[aria-current=page]:hover{-webkit-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background:#4e4986}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{s as wm_pagination}
@@ -1 +1 @@
1
- import{r as e,c as r,h as t,H as i,g as o}from"./p-b5dee715.js";import{i as s,g as a,m as n,b as p}from"./p-cfa80f5b.js";const h=class{constructor(t){e(this,t),this.wmTimepickerNewValidValue=r(this,"wmTimepickerNewValidValue",7),this.wmTimepickerOnChange=r(this,"wmTimepickerOnChange",7),this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i,this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/,this.uid="",this.timeFormat="hh:mm",this.times=[],this.openUp=!1,this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."}),this.disabled=!1,this.value="",this.errorMessage=void 0,this.label="",this.labelPosition="top",this.requiredField=!1,this.requiredFieldMessage=void 0,this.preventValidation=void 0,this.selectedOption=void 0,this.isExpanded=!1,this.isTabbing=!1,this.displayedErrorMessage=void 0}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKey(e){switch(e.key){case"ArrowDown":e.preventDefault(),!1===this.isExpanded?this.open("next"):this.moveDown(this.selectedOption);break;case"ArrowUp":e.preventDefault(),!1===this.isExpanded?this.open("previous"):this.moveUp(this.selectedOption);break;case"Enter":case" ":this.isExpanded&&(e.preventDefault(),this.handleOptionClick(this.selectedOption.textContent));break;case"Escape":e.preventDefault(),this.isExpanded&&(e.stopPropagation(),this.close());break;case"Tab":this.isExpanded&&this.close(!1);break;case"Home":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"));break;case"End":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}}updateErrorState(){this.displayedErrorMessage=this.errorMessage}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none."),this.uid=this.el.id?this.el.id:a(),this.updateErrorState(),this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"}),this.times=this.generateTimes()}componentDidLoad(){this.optionsEl.classList.add("hidden"),this.optionsList=Array.from(this.optionsEl.querySelectorAll("li")),this.value&&this.processInput()}isValidTime(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)}generateTimes(){let e=[],r=0;for(let t=0;r<1440;t++){const i=Math.floor(r/60).toString().padStart(2,"0"),o=(r%60).toString().padStart(2,"0");e[t]=`${i}:${o}`,r+=15}return e}findNearestTimeInterval(e){let r=this.formatToStorage(e);const t=parseInt(r.slice(3,5));if(t%15!=0){const i=parseInt(r.slice(0,2));let o=(15*Math.round(t/15)).toString().padStart(2,"0");if("60"===o){o="00";let e=i+1;24===e&&(e=0),r=r.replace(`${i.toString().padStart(2,"0")}:`,`${e.toString().padStart(2,"0")}:`)}parseInt(o)<8&&(o="00"),e=r.replace(`:${t.toString().padStart(2,"0")}`,`:${o}`)}return e}handleListSelection(e){e=this.findNearestTimeInterval(e);const r=this.optionsList.filter((r=>r.textContent==this.formatToDisplay(e)))[0];r&&this.focusOption(r)}setValue(e){const r=this.value;this.inputEl.value=this.formatToDisplay(e),this.value=this.formatToStorage(e),this.handleListSelection(e),r!==this.value&&this.wmTimepickerNewValidValue.emit({value:this.value}),this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})}processInput(){this.isValidTime(this.value)&&this.setValue(this.value);const e=this.determineErrorMessage();this.displayedErrorMessage=e}determineErrorMessage(){let e=this.errorMessage;const r=this.requiredFieldMessage||s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."}),t=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."}),i=this.isValidTime(this.value);return i&&!this.errorMessage?e=null:i||this.errorMessage||(e=this.requiredField&&!this.value?r:this.value?t:null),e}splitTime(e){const r=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);let t=parseInt(r[1]),i=r[2]||"00",o=r?r[3]:void 0;return 0===t&&(null==o?void 0:o.toUpperCase().includes("P"))&&(o="AM"),[t,i,o]}formatToDisplay(e){let[r,t,i]=this.splitTime(e);return 12!==r||i||(i="PM"),0!==r&&24!==r||(r=12),r>12&&(r-=12,i="PM"),i=i&&i.toUpperCase().includes("P")?"PM":"AM",`${r.toString().padStart(2,"0")}:${t} ${i}`}formatToStorage(e){let[r,t,i]=this.splitTime(e);return 24===r&&(r=0),12===r&&i&&i.toUpperCase().includes("A")&&(r-=12),i&&i.toUpperCase().includes("P")&&12!==r&&(r+=12),`${r.toString().padStart(2,"0")}:${t}`}open(e){this.openUp=n(this.el,this.optionsEl.clientHeight),this.isExpanded=!0,this.optionsEl.classList.remove("hidden"),!this.errorMessage&&this.value||this.handleListSelection("09:00"),this.setDropdownPosition("center",this.selectedOption),this.focusOption(this.selectedOption),window.requestAnimationFrame((()=>{"next"===e?this.moveDown(this.selectedOption):"previous"===e&&this.moveUp(this.selectedOption)}))}close(e=!0){this.isExpanded=!1,window.setTimeout((()=>{this.optionsEl.classList.add("hidden"),e&&this.buttonEl.focus()}),150)}focusOption(e){this.optionsList.forEach((e=>{e.tabIndex=-1})),e.tabIndex=0,this.selectedOption=e,e.focus()}setDropdownPosition(e,r){switch(e){case"top":this.optionsEl.scrollTop=(null==r?void 0:r.previousElementSibling).getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":this.optionsEl.scrollTop=(null==r?void 0:r.nextElementSibling).getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((e=>e.textContent===(null==r?void 0:r.textContent)))-2)*r.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length}}moveUp(e){const r=e.previousElementSibling;r?(r.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top&&this.setDropdownPosition("top",e),this.focusOption(r)):(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}moveDown(e){const r=e.nextElementSibling;r?(r.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom&&this.setDropdownPosition("bottom",e),this.focusOption(r)):(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"))}handleOptionClick(e){this.close(),this.setValue(e),this.processInput()}handleInput(){this.value=this.inputEl.value,this.isValidTime(this.value)&&(this.handleListSelection(this.findNearestTimeInterval(this.value)),this.setDropdownPosition("center",this.selectedOption))}handleInputBlur(e){this.preventValidation&&p(e,this.preventValidation)||this.processInput(),this.tpWrapper.classList.remove("focus")}renderOptions(){return this.times.map(((e,r)=>t("li",{id:`option${r+1}`,role:"option",onClick:()=>this.handleOptionClick(e)},this.formatToDisplay(e))))}render(){return t(i,{id:this.uid,invalid:this.displayedErrorMessage?"true":null,onBlur:()=>this.close(!1)},t("div",{class:`wrapper label-${this.labelPosition} ${this.displayedErrorMessage?"invalid":""}`,ref:e=>this.tpWrapper=e},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{id:`label-${this.uid}`,class:"label",htmlFor:`time-input-${this.uid}`},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",null,t("div",{class:"inner-wrapper"},t("input",{id:`time-input-${this.uid}`,"aria-label":this.label,"aria-describedby":`error-${this.uid}`,ref:e=>this.inputEl=e,onBlur:e=>this.handleInputBlur(e),onInput:()=>this.handleInput(),disabled:this.disabled,"aria-required":this.requiredField?"true":null,placeholder:this.timeFormat,autocomplete:"off",onFocus:()=>this.tpWrapper.classList.add("focus")}),t("button",{id:`btn-${this.uid}`,class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.buttonEl=e,disabled:this.disabled,"aria-controls":`list-${this.uid}`,"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":`time-input-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onMouseDown:e=>{e.preventDefault(),this.buttonEl.focus()}},t("span",{class:"clock"})),t("ul",{class:`options ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,id:`list-${this.uid}`,role:"listbox","aria-labelledby":`label-${this.uid}`,"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:e=>this.optionsEl=e},this.renderOptions())),t("div",{id:`error-${this.uid}`,class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))}static get delegatesFocus(){return!0}get el(){return o(this)}static get watchers(){return{errorMessage:["updateErrorState"]}}};h.style=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper,wm-timepicker .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-timepicker .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{display:block;font-style:italic;color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:4px;top:100%;left:0}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #19a1a9;-moz-box-shadow:0 0 0 1px #19a1a9;box-shadow:0 0 0 1px #19a1a9;outline:none;border-color:#19a1a9}';export{h as wm_timepicker}
1
+ import{r as e,c as r,h as t,H as i,g as o}from"./p-b5dee715.js";import{i as s,g as a,m as n,b as p}from"./p-91480a89.js";const h=class{constructor(t){e(this,t),this.wmTimepickerNewValidValue=r(this,"wmTimepickerNewValidValue",7),this.wmTimepickerOnChange=r(this,"wmTimepickerOnChange",7),this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i,this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/,this.uid="",this.timeFormat="hh:mm",this.times=[],this.openUp=!1,this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."}),this.disabled=!1,this.value="",this.errorMessage=void 0,this.label="",this.labelPosition="top",this.requiredField=!1,this.requiredFieldMessage=void 0,this.preventValidation=void 0,this.selectedOption=void 0,this.isExpanded=!1,this.isTabbing=!1,this.displayedErrorMessage=void 0}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKey(e){switch(e.key){case"ArrowDown":e.preventDefault(),!1===this.isExpanded?this.open("next"):this.moveDown(this.selectedOption);break;case"ArrowUp":e.preventDefault(),!1===this.isExpanded?this.open("previous"):this.moveUp(this.selectedOption);break;case"Enter":case" ":this.isExpanded&&(e.preventDefault(),this.handleOptionClick(this.selectedOption.textContent));break;case"Escape":e.preventDefault(),this.isExpanded&&(e.stopPropagation(),this.close());break;case"Tab":this.isExpanded&&this.close(!1);break;case"Home":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"));break;case"End":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}}updateErrorState(){this.displayedErrorMessage=this.errorMessage}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none."),this.uid=this.el.id?this.el.id:a(),this.updateErrorState(),this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"}),this.times=this.generateTimes()}componentDidLoad(){this.optionsEl.classList.add("hidden"),this.optionsList=Array.from(this.optionsEl.querySelectorAll("li")),this.value&&this.processInput()}isValidTime(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)}generateTimes(){let e=[],r=0;for(let t=0;r<1440;t++){const i=Math.floor(r/60).toString().padStart(2,"0"),o=(r%60).toString().padStart(2,"0");e[t]=`${i}:${o}`,r+=15}return e}findNearestTimeInterval(e){let r=this.formatToStorage(e);const t=parseInt(r.slice(3,5));if(t%15!=0){const i=parseInt(r.slice(0,2));let o=(15*Math.round(t/15)).toString().padStart(2,"0");if("60"===o){o="00";let e=i+1;24===e&&(e=0),r=r.replace(`${i.toString().padStart(2,"0")}:`,`${e.toString().padStart(2,"0")}:`)}parseInt(o)<8&&(o="00"),e=r.replace(`:${t.toString().padStart(2,"0")}`,`:${o}`)}return e}handleListSelection(e){e=this.findNearestTimeInterval(e);const r=this.optionsList.filter((r=>r.textContent==this.formatToDisplay(e)))[0];r&&this.focusOption(r)}setValue(e){const r=this.value;this.inputEl.value=this.formatToDisplay(e),this.value=this.formatToStorage(e),this.handleListSelection(e),r!==this.value&&this.wmTimepickerNewValidValue.emit({value:this.value}),this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})}processInput(){this.isValidTime(this.value)&&this.setValue(this.value);const e=this.determineErrorMessage();this.displayedErrorMessage=e}determineErrorMessage(){let e=this.errorMessage;const r=this.requiredFieldMessage||s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."}),t=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."}),i=this.isValidTime(this.value);return i&&!this.errorMessage?e=null:i||this.errorMessage||(e=this.requiredField&&!this.value?r:this.value?t:null),e}splitTime(e){const r=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);let t=parseInt(r[1]),i=r[2]||"00",o=r?r[3]:void 0;return 0===t&&(null==o?void 0:o.toUpperCase().includes("P"))&&(o="AM"),[t,i,o]}formatToDisplay(e){let[r,t,i]=this.splitTime(e);return 12!==r||i||(i="PM"),0!==r&&24!==r||(r=12),r>12&&(r-=12,i="PM"),i=i&&i.toUpperCase().includes("P")?"PM":"AM",`${r.toString().padStart(2,"0")}:${t} ${i}`}formatToStorage(e){let[r,t,i]=this.splitTime(e);return 24===r&&(r=0),12===r&&i&&i.toUpperCase().includes("A")&&(r-=12),i&&i.toUpperCase().includes("P")&&12!==r&&(r+=12),`${r.toString().padStart(2,"0")}:${t}`}open(e){this.openUp=n(this.el,this.optionsEl.clientHeight),this.isExpanded=!0,this.optionsEl.classList.remove("hidden"),!this.errorMessage&&this.value||this.handleListSelection("09:00"),this.setDropdownPosition("center",this.selectedOption),this.focusOption(this.selectedOption),window.requestAnimationFrame((()=>{"next"===e?this.moveDown(this.selectedOption):"previous"===e&&this.moveUp(this.selectedOption)}))}close(e=!0){this.isExpanded=!1,window.setTimeout((()=>{this.optionsEl.classList.add("hidden"),e&&this.buttonEl.focus()}),150)}focusOption(e){this.optionsList.forEach((e=>{e.tabIndex=-1})),e.tabIndex=0,this.selectedOption=e,e.focus()}setDropdownPosition(e,r){switch(e){case"top":this.optionsEl.scrollTop=(null==r?void 0:r.previousElementSibling).getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":this.optionsEl.scrollTop=(null==r?void 0:r.nextElementSibling).getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((e=>e.textContent===(null==r?void 0:r.textContent)))-2)*r.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length}}moveUp(e){const r=e.previousElementSibling;r?(r.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top&&this.setDropdownPosition("top",e),this.focusOption(r)):(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}moveDown(e){const r=e.nextElementSibling;r?(r.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom&&this.setDropdownPosition("bottom",e),this.focusOption(r)):(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"))}handleOptionClick(e){this.close(),this.setValue(e),this.processInput()}handleInput(){this.value=this.inputEl.value,this.isValidTime(this.value)&&(this.handleListSelection(this.findNearestTimeInterval(this.value)),this.setDropdownPosition("center",this.selectedOption))}handleInputBlur(e){this.preventValidation&&p(e,this.preventValidation)||this.processInput(),this.tpWrapper.classList.remove("focus")}renderOptions(){return this.times.map(((e,r)=>t("li",{id:`option${r+1}`,role:"option",onClick:()=>this.handleOptionClick(e)},this.formatToDisplay(e))))}render(){return t(i,{id:this.uid,invalid:this.displayedErrorMessage?"true":null,onBlur:()=>this.close(!1)},t("div",{class:`wrapper label-${this.labelPosition} ${this.displayedErrorMessage?"invalid":""}`,ref:e=>this.tpWrapper=e},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{id:`label-${this.uid}`,class:"label",htmlFor:`time-input-${this.uid}`},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",null,t("div",{class:"inner-wrapper"},t("input",{id:`time-input-${this.uid}`,"aria-label":this.label,"aria-describedby":`error-${this.uid}`,ref:e=>this.inputEl=e,onBlur:e=>this.handleInputBlur(e),onInput:()=>this.handleInput(),disabled:this.disabled,"aria-required":this.requiredField?"true":null,placeholder:this.timeFormat,autocomplete:"off",onFocus:()=>this.tpWrapper.classList.add("focus")}),t("button",{id:`btn-${this.uid}`,class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.buttonEl=e,disabled:this.disabled,"aria-controls":`list-${this.uid}`,"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":`time-input-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onMouseDown:e=>{e.preventDefault(),this.buttonEl.focus()}},t("span",{class:"clock"})),t("ul",{class:`options ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,id:`list-${this.uid}`,role:"listbox","aria-labelledby":`label-${this.uid}`,"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:e=>this.optionsEl=e},this.renderOptions())),t("div",{id:`error-${this.uid}`,class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))}static get delegatesFocus(){return!0}get el(){return o(this)}static get watchers(){return{errorMessage:["updateErrorState"]}}};h.style=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper,wm-timepicker .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-timepicker .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{display:block;font-style:italic;color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:4px;top:100%;left:0}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #19a1a9;-moz-box-shadow:0 0 0 1px #19a1a9;box-shadow:0 0 0 1px #19a1a9;outline:none;border-color:#19a1a9}';export{h as wm_timepicker}