@watermarkinsights/ripple 5.9.0 → 5.10.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/cjs/{global-bcbcacab.js → global-636af00b.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
  4. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  5. package/dist/cjs/priv-navigator-button.cjs.entry.js +1 -1
  6. package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-option-list.cjs.entry.js +1 -1
  8. package/dist/cjs/ripple.cjs.js +1 -1
  9. package/dist/cjs/wm-action-menu_2.cjs.entry.js +16 -7
  10. package/dist/cjs/wm-button.cjs.entry.js +17 -2
  11. package/dist/cjs/wm-chart.cjs.entry.js +1 -1
  12. package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
  13. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-file-list.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-input.cjs.entry.js +1 -1
  17. package/dist/cjs/wm-line-chart.cjs.entry.js +1 -1
  18. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +3 -3
  19. package/dist/cjs/wm-modal_3.cjs.entry.js +3 -3
  20. package/dist/cjs/wm-navigation_3.cjs.entry.js +3 -3
  21. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  22. package/dist/cjs/wm-nested-select.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-optgroup.cjs.entry.js +1 -1
  24. package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
  25. package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
  26. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  27. package/dist/cjs/wm-search.cjs.entry.js +1 -1
  28. package/dist/cjs/wm-snackbar.cjs.entry.js +1 -1
  29. package/dist/cjs/wm-tab-item_3.cjs.entry.js +3 -3
  30. package/dist/cjs/wm-tag-input.cjs.entry.js +1 -1
  31. package/dist/cjs/wm-textarea.cjs.entry.js +1 -1
  32. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  33. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  34. package/dist/cjs/wm-uploader.cjs.entry.js +14 -4
  35. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +30 -0
  36. package/dist/collection/components/charts/wm-chart/wm-chart.css +30 -0
  37. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +30 -0
  38. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +30 -0
  39. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +30 -0
  40. package/dist/collection/components/datepickers/datepicker.css +30 -0
  41. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +30 -0
  42. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +30 -0
  43. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +30 -0
  44. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +30 -0
  45. package/dist/collection/components/selects/wm-option/wm-option.css +30 -0
  46. package/dist/collection/components/selects/wm-select/wm-select.css +30 -0
  47. package/dist/collection/components/wm-action-menu/wm-action-menu.css +30 -0
  48. package/dist/collection/components/wm-button/wm-button.css +32 -1
  49. package/dist/collection/components/wm-button/wm-button.js +16 -1
  50. package/dist/collection/components/wm-file/wm-file.css +30 -0
  51. package/dist/collection/components/wm-file-list/wm-file-list.css +30 -0
  52. package/dist/collection/components/wm-input/wm-input.css +30 -0
  53. package/dist/collection/components/wm-menuitem/wm-menuitem.css +36 -3
  54. package/dist/collection/components/wm-menuitem/wm-menuitem.js +14 -5
  55. package/dist/collection/components/wm-modal/wm-modal-footer.css +30 -0
  56. package/dist/collection/components/wm-modal/wm-modal-header.css +30 -0
  57. package/dist/collection/components/wm-modal/wm-modal.css +30 -0
  58. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +30 -0
  59. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +30 -0
  60. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +30 -0
  61. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +30 -0
  62. package/dist/collection/components/wm-navigation/wm-navigation-item.css +30 -0
  63. package/dist/collection/components/wm-navigation/wm-navigation.css +30 -0
  64. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +30 -0
  65. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +30 -0
  66. package/dist/collection/components/wm-navigator/wm-navigator.css +30 -0
  67. package/dist/collection/components/wm-pagination/wm-pagination.css +30 -0
  68. package/dist/collection/components/wm-search/wm-search.css +30 -0
  69. package/dist/collection/components/wm-snackbar/wm-snackbar.css +30 -0
  70. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +30 -0
  71. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +30 -0
  72. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +30 -0
  73. package/dist/collection/components/wm-tag-input/wm-tag-input.css +30 -0
  74. package/dist/collection/components/wm-textarea/wm-textarea.css +30 -0
  75. package/dist/collection/components/wm-timepicker/wm-timepicker.css +30 -0
  76. package/dist/collection/components/wm-toggletip/wm-toggletip.css +30 -0
  77. package/dist/collection/components/wm-uploader/wm-uploader.css +32 -1
  78. package/dist/collection/components/wm-uploader/wm-uploader.js +13 -3
  79. package/dist/esm/{global-5bd4039b.js → global-e6ae5517.js} +1 -1
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/priv-calendar.entry.js +1 -1
  82. package/dist/esm/priv-chart-popover.entry.js +1 -1
  83. package/dist/esm/priv-navigator-button.entry.js +1 -1
  84. package/dist/esm/priv-navigator-item.entry.js +1 -1
  85. package/dist/esm/priv-option-list.entry.js +1 -1
  86. package/dist/esm/ripple.js +1 -1
  87. package/dist/esm/wm-action-menu_2.entry.js +16 -7
  88. package/dist/esm/wm-button.entry.js +17 -2
  89. package/dist/esm/wm-chart.entry.js +1 -1
  90. package/dist/esm/wm-date-range.entry.js +1 -1
  91. package/dist/esm/wm-datepicker.entry.js +1 -1
  92. package/dist/esm/wm-file-list.entry.js +1 -1
  93. package/dist/esm/wm-file.entry.js +1 -1
  94. package/dist/esm/wm-input.entry.js +1 -1
  95. package/dist/esm/wm-line-chart.entry.js +1 -1
  96. package/dist/esm/wm-modal-pss_3.entry.js +3 -3
  97. package/dist/esm/wm-modal_3.entry.js +3 -3
  98. package/dist/esm/wm-navigation_3.entry.js +3 -3
  99. package/dist/esm/wm-navigator.entry.js +1 -1
  100. package/dist/esm/wm-nested-select.entry.js +1 -1
  101. package/dist/esm/wm-optgroup.entry.js +1 -1
  102. package/dist/esm/wm-option_2.entry.js +2 -2
  103. package/dist/esm/wm-pagination.entry.js +1 -1
  104. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  105. package/dist/esm/wm-search.entry.js +1 -1
  106. package/dist/esm/wm-snackbar.entry.js +1 -1
  107. package/dist/esm/wm-tab-item_3.entry.js +3 -3
  108. package/dist/esm/wm-tag-input.entry.js +1 -1
  109. package/dist/esm/wm-textarea.entry.js +1 -1
  110. package/dist/esm/wm-timepicker.entry.js +1 -1
  111. package/dist/esm/wm-toggletip.entry.js +1 -1
  112. package/dist/esm/wm-uploader.entry.js +14 -4
  113. package/dist/esm-es5/global-e6ae5517.js +1 -0
  114. package/dist/esm-es5/loader.js +1 -1
  115. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  116. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  117. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  118. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  119. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  120. package/dist/esm-es5/ripple.js +1 -1
  121. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  122. package/dist/esm-es5/wm-button.entry.js +1 -1
  123. package/dist/esm-es5/wm-chart.entry.js +1 -1
  124. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  125. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  126. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  127. package/dist/esm-es5/wm-file.entry.js +1 -1
  128. package/dist/esm-es5/wm-input.entry.js +1 -1
  129. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  130. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  131. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  132. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  133. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  134. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  135. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  136. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  137. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  138. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  139. package/dist/esm-es5/wm-search.entry.js +1 -1
  140. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  141. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  142. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  143. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  144. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  145. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  146. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  147. package/dist/ripple/p-02bfee27.entry.js +1 -0
  148. package/dist/ripple/{p-f9d26f8b.system.entry.js → p-02ff9d9a.system.entry.js} +1 -1
  149. package/dist/ripple/p-056f9114.system.entry.js +1 -0
  150. package/dist/ripple/{p-870cf4ef.entry.js → p-0c66ecba.entry.js} +1 -1
  151. package/dist/ripple/p-0e6fc5a0.system.entry.js +1 -0
  152. package/dist/ripple/p-0eaa5f28.system.entry.js +1 -0
  153. package/dist/ripple/p-1664fdca.entry.js +1 -0
  154. package/dist/ripple/p-1d05f67b.system.entry.js +1 -0
  155. package/dist/ripple/p-1d8a56df.entry.js +1 -0
  156. package/dist/ripple/p-28b03c72.entry.js +1 -0
  157. package/dist/ripple/p-39edbc9c.entry.js +1 -0
  158. package/dist/ripple/p-3cbe36c5.system.entry.js +1 -0
  159. package/dist/ripple/p-3f8f2a25.entry.js +1 -0
  160. package/dist/ripple/p-40defee8.entry.js +1 -0
  161. package/dist/ripple/p-45d9682c.system.entry.js +1 -0
  162. package/dist/ripple/{p-e53b6f7c.entry.js → p-47719c70.entry.js} +1 -1
  163. package/dist/ripple/p-4e741c68.system.entry.js +1 -0
  164. package/dist/ripple/p-4edaeeeb.system.entry.js +1 -0
  165. package/dist/ripple/{p-6692b5a6.entry.js → p-52ac4efc.entry.js} +1 -1
  166. package/dist/ripple/p-5782584c.system.entry.js +1 -0
  167. package/dist/ripple/p-6837e730.entry.js +1 -0
  168. package/dist/ripple/p-6be637a4.system.entry.js +1 -0
  169. package/dist/ripple/p-6e6f0bb6.system.entry.js +1 -0
  170. package/dist/ripple/p-73cba751.entry.js +1 -0
  171. package/dist/ripple/p-79dd2d45.entry.js +1 -0
  172. package/dist/ripple/p-7f6bdd09.entry.js +1 -0
  173. package/dist/ripple/p-8454039b.system.entry.js +1 -0
  174. package/dist/ripple/p-87f0b9e4.system.entry.js +1 -0
  175. package/dist/ripple/p-891a5937.system.entry.js +1 -0
  176. package/dist/ripple/p-897995da.system.entry.js +1 -0
  177. package/dist/ripple/p-8a8f341e.entry.js +1 -0
  178. package/dist/ripple/p-8dfff1de.entry.js +1 -0
  179. package/dist/ripple/p-94283558.system.entry.js +1 -0
  180. package/dist/ripple/{p-37649315.entry.js → p-9ac65a33.entry.js} +1 -1
  181. package/dist/ripple/p-9cf3201c.system.entry.js +1 -0
  182. package/dist/ripple/p-9e5e84ff.system.entry.js +1 -0
  183. package/dist/ripple/p-9ef3f104.js +1 -0
  184. package/dist/ripple/p-b0ccd8f7.entry.js +1 -0
  185. package/dist/ripple/p-b1887b90.entry.js +1 -0
  186. package/dist/ripple/{p-6ad695a5.entry.js → p-b670af1d.entry.js} +1 -1
  187. package/dist/ripple/p-b7d6a53d.system.entry.js +1 -0
  188. package/dist/ripple/{p-e28671cd.system.entry.js → p-bf45953e.system.entry.js} +1 -1
  189. package/dist/ripple/p-c232f2de.entry.js +1 -0
  190. package/dist/ripple/p-ccfffedb.entry.js +1 -0
  191. package/dist/ripple/p-ce73934e.system.entry.js +1 -0
  192. package/dist/ripple/p-d16fcb24.entry.js +1 -0
  193. package/dist/ripple/p-d1a46a3d.entry.js +1 -0
  194. package/dist/ripple/p-d2933cff.system.entry.js +1 -0
  195. package/dist/ripple/{p-52338bbc.entry.js → p-d7312723.entry.js} +1 -1
  196. package/dist/ripple/p-da3003ab.entry.js +1 -0
  197. package/dist/ripple/p-dbda39c7.system.entry.js +1 -0
  198. package/dist/ripple/p-ddcdf330.entry.js +1 -0
  199. package/dist/ripple/p-e19a8330.entry.js +1 -0
  200. package/dist/ripple/{p-65f4ce68.system.js → p-e62c52d6.system.js} +1 -1
  201. package/dist/ripple/p-e66e33ee.system.js +1 -0
  202. package/dist/ripple/p-e8e6c4cf.system.entry.js +1 -0
  203. package/dist/ripple/p-e9588527.entry.js +1 -0
  204. package/dist/ripple/{p-dd76bf0a.system.entry.js → p-e9ec2446.system.entry.js} +1 -1
  205. package/dist/ripple/p-f22a2dcd.system.entry.js +1 -0
  206. package/dist/ripple/p-f237c69b.system.entry.js +1 -0
  207. package/dist/ripple/p-f3e19729.entry.js +1 -0
  208. package/dist/ripple/p-f56f2911.system.entry.js +1 -0
  209. package/dist/ripple/p-f657216e.system.entry.js +1 -0
  210. package/dist/ripple/p-fe00606b.entry.js +1 -0
  211. package/dist/ripple/p-ff7df52d.system.entry.js +1 -0
  212. package/dist/ripple/ripple.css +1 -0
  213. package/dist/ripple/ripple.esm.js +1 -1
  214. package/dist/ripple/ripple.js +1 -1
  215. package/dist/types/components/wm-button/wm-button.d.ts +1 -0
  216. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +1 -2
  217. package/package.json +1 -1
  218. package/dist/esm-es5/global-5bd4039b.js +0 -1
  219. package/dist/ripple/p-021ff5fa.system.entry.js +0 -1
  220. package/dist/ripple/p-037bf5c7.system.entry.js +0 -1
  221. package/dist/ripple/p-04d5e7d7.entry.js +0 -1
  222. package/dist/ripple/p-0eea8fd3.system.entry.js +0 -1
  223. package/dist/ripple/p-0faf7ef9.system.entry.js +0 -1
  224. package/dist/ripple/p-13cc92e7.entry.js +0 -1
  225. package/dist/ripple/p-1618709f.entry.js +0 -1
  226. package/dist/ripple/p-1f73b257.entry.js +0 -1
  227. package/dist/ripple/p-2520d947.system.entry.js +0 -1
  228. package/dist/ripple/p-29f41fea.system.entry.js +0 -1
  229. package/dist/ripple/p-2c028fe2.entry.js +0 -1
  230. package/dist/ripple/p-2f565d7a.system.entry.js +0 -1
  231. package/dist/ripple/p-311923b2.system.entry.js +0 -1
  232. package/dist/ripple/p-3212fd0e.entry.js +0 -1
  233. package/dist/ripple/p-34d80f95.entry.js +0 -1
  234. package/dist/ripple/p-3aca84d7.entry.js +0 -1
  235. package/dist/ripple/p-3bb1f795.system.entry.js +0 -1
  236. package/dist/ripple/p-43b03ad8.system.entry.js +0 -1
  237. package/dist/ripple/p-4c5606da.system.entry.js +0 -1
  238. package/dist/ripple/p-54d7688a.entry.js +0 -1
  239. package/dist/ripple/p-5ea1c7a6.entry.js +0 -1
  240. package/dist/ripple/p-5eb02aa9.system.entry.js +0 -1
  241. package/dist/ripple/p-6025efee.system.entry.js +0 -1
  242. package/dist/ripple/p-6a4c59e0.system.entry.js +0 -1
  243. package/dist/ripple/p-6d2122b9.entry.js +0 -1
  244. package/dist/ripple/p-6eb50cc3.system.entry.js +0 -1
  245. package/dist/ripple/p-7039fa60.system.entry.js +0 -1
  246. package/dist/ripple/p-72c22a55.entry.js +0 -1
  247. package/dist/ripple/p-7906a797.system.entry.js +0 -1
  248. package/dist/ripple/p-7b982ba8.system.entry.js +0 -1
  249. package/dist/ripple/p-7e4866c3.entry.js +0 -1
  250. package/dist/ripple/p-8f217fb1.entry.js +0 -1
  251. package/dist/ripple/p-90261a03.system.entry.js +0 -1
  252. package/dist/ripple/p-902a54c5.entry.js +0 -1
  253. package/dist/ripple/p-9a2cf94c.system.entry.js +0 -1
  254. package/dist/ripple/p-9dc64e6f.entry.js +0 -1
  255. package/dist/ripple/p-ade3d9a9.entry.js +0 -1
  256. package/dist/ripple/p-ae4c8481.system.entry.js +0 -1
  257. package/dist/ripple/p-b01d022f.entry.js +0 -1
  258. package/dist/ripple/p-b0e099f8.entry.js +0 -1
  259. package/dist/ripple/p-b19ea29e.entry.js +0 -1
  260. package/dist/ripple/p-c2657183.entry.js +0 -1
  261. package/dist/ripple/p-c39a3951.system.entry.js +0 -1
  262. package/dist/ripple/p-c7e928cb.system.entry.js +0 -1
  263. package/dist/ripple/p-c885c7f9.entry.js +0 -1
  264. package/dist/ripple/p-c9543950.system.entry.js +0 -1
  265. package/dist/ripple/p-cbd2473d.system.entry.js +0 -1
  266. package/dist/ripple/p-cedfcf23.entry.js +0 -1
  267. package/dist/ripple/p-d824406e.system.entry.js +0 -1
  268. package/dist/ripple/p-e4ff7200.entry.js +0 -1
  269. package/dist/ripple/p-e6f3f0e5.system.entry.js +0 -1
  270. package/dist/ripple/p-ec52a08e.system.js +0 -1
  271. package/dist/ripple/p-f05e38b1.entry.js +0 -1
  272. package/dist/ripple/p-f367f027.system.entry.js +0 -1
  273. package/dist/ripple/p-fe3451ec.js +0 -1
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-558b5a82.js";export{s as setNonce}from"./index-558b5a82.js";import"./global-5bd4039b.js";var patchBrowser=function(){var e=import.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return promiseResolve(a)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["wm-tab-item_3",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["wm-file",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["wm-modal-pss_3",[[0,"wm-modal-pss-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}],[0,"wm-modal-pss-header",{"heading":[1],"subheading":[1]}],[0,"wm-modal-pss",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]],{"open":["toggleModal"]}]]],["wm-modal_3",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}],[0,"wm-modal-header",{"heading":[1],"subheading":[1]}],[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["wm-navigator",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["wm-optgroup",[[17,"wm-optgroup",{"label":[1],"isExpanded":[1028,"is-expanded"],"multiple":[1028],"disabled":[4],"emitDeselection":[64],"handleChildChange":[64]},[[0,"wmKeyLeftPressed","handleOptionKeyLeft"]],{"isExpanded":["isExpandedChanged"]}]]],["wm-navigation_3",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["wm-progress-indicator_3",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-chart",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["wm-date-range",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["wm-datepicker",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["wm-line-chart",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["wm-search",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["wm-chart-slice",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-file-list",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["wm-input",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["wm-nested-select",[[17,"wm-nested-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"constrainedMaxHeight":[1025,"constrained-max-height"],"isExpanded":[32],"showClearSelectionButton":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"keydown","handleKeyDown"],[6,"click","handleClick"],[0,"optgroupExpanded","handleOptgroupExpanded"],[0,"optgroupHidden","handleOptgroupHidden"]]]]],["wm-pagination",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["wm-snackbar",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["wm-tag-input",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["wm-tag-option",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["wm-textarea",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["wm-timepicker",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["wm-toggletip",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["wm-uploader",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["wm-wrapper",[[0,"wm-wrapper"]]],["priv-navigator-button",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["priv-navigator-item",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["priv-calendar",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["priv-chart-popover",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["wm-option_2",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["priv-option-list",[[4,"priv-option-list",{"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"searchPlaceholder":[1,"search-placeholder"],"optgroupLabel":[1,"optgroup-label"],"maxHeight":[1,"max-height"],"upwardsHeightLimit":[2,"upwards-height-limit"],"announcement":[32],"searchTerm":[32],"handleChildChange":[64],"clearSearch":[64],"focusOption":[64],"handleInitialFocus":[64],"unfocusAll":[64],"updateOptionVisibility":[64]},[[0,"wmLetterPressed","findAndFocusOption"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"intCloneClicked","handleOptionCloneSelection"]]]]],["wm-button",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["wm-action-menu_2",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-558b5a82.js";export{s as setNonce}from"./index-558b5a82.js";import"./global-e6ae5517.js";var patchBrowser=function(){var e=import.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return promiseResolve(a)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["wm-tab-item_3",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["wm-file",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["wm-modal-pss_3",[[0,"wm-modal-pss-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}],[0,"wm-modal-pss-header",{"heading":[1],"subheading":[1]}],[0,"wm-modal-pss",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]],{"open":["toggleModal"]}]]],["wm-modal_3",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}],[0,"wm-modal-header",{"heading":[1],"subheading":[1]}],[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["wm-navigator",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["wm-optgroup",[[17,"wm-optgroup",{"label":[1],"isExpanded":[1028,"is-expanded"],"multiple":[1028],"disabled":[4],"emitDeselection":[64],"handleChildChange":[64]},[[0,"wmKeyLeftPressed","handleOptionKeyLeft"]],{"isExpanded":["isExpandedChanged"]}]]],["wm-navigation_3",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["wm-progress-indicator_3",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-chart",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["wm-date-range",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["wm-datepicker",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["wm-line-chart",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["wm-search",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["wm-chart-slice",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-file-list",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["wm-input",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["wm-nested-select",[[17,"wm-nested-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"constrainedMaxHeight":[1025,"constrained-max-height"],"isExpanded":[32],"showClearSelectionButton":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"keydown","handleKeyDown"],[6,"click","handleClick"],[0,"optgroupExpanded","handleOptgroupExpanded"],[0,"optgroupHidden","handleOptgroupHidden"]]]]],["wm-pagination",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["wm-snackbar",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["wm-tag-input",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["wm-tag-option",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["wm-textarea",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["wm-timepicker",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["wm-toggletip",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["wm-uploader",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["wm-wrapper",[[0,"wm-wrapper"]]],["priv-navigator-button",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["priv-navigator-item",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["priv-calendar",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["priv-chart-popover",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["wm-option_2",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["priv-option-list",[[4,"priv-option-list",{"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"searchPlaceholder":[1,"search-placeholder"],"optgroupLabel":[1,"optgroup-label"],"maxHeight":[1,"max-height"],"upwardsHeightLimit":[2,"upwards-height-limit"],"announcement":[32],"searchTerm":[32],"handleChildChange":[64],"clearSearch":[64],"focusOption":[64],"handleInitialFocus":[64],"unfocusAll":[64],"updateOptionVisibility":[64]},[[0,"wmLetterPressed","findAndFocusOption"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"intCloneClicked","handleOptionCloneSelection"]]]]],["wm-button",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["wm-action-menu_2",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}));
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-558b5a82.js";import{d as debounce,q as shouldShiftRight,k as shouldOpenUp,y as getTextDir}from"./functions-8800c690.js";import{g as getIconCodeFromName}from"./interfaces-cc5b177f.js";var wmActionMenuCss=":host{--wmcolor-actionmenu-background:var(--wmcolor-background);--wmcolor-actionmenu-text:var(--wmcolor-interactive);--wmcolor-actionmenu-text-disabled:var(--wmcolor-option-text-disabled);position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:var(--wmcolor-actionmenu-text);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);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-actionmenu-background);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}";var ActionMenu=function(){function t(t){var i=this;registerInstance(this,t);this.wmActionMenuLoaded=createEvent(this,"wmActionMenuLoaded",7);this.menuLoaded=createEvent(this,"menuLoaded",7);this.openUp=false;this.keysSoFar="";this.searchIndex=0;this.debouncedClearKeysSoFar=debounce((function(){i.keysSoFar=""}),500);this.isExpanded=false;this.tooltipPosition=undefined;this.actionMenuType="icon";this.buttonText=undefined;this.disabled=false;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.darkMode=undefined}Object.defineProperty(t.prototype,"horizontalPosition",{get:function(){return!!this.el&&!!this.itemsEl&&shouldShiftRight(this.el,this.itemsEl.clientWidth)?"right":"left"},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-menuitem"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"internalButtonType",{get:function(){return this.actionMenuType==="icon"||this.actionMenuType==="text"?this.actionMenuType+"only":this.actionMenuType},enumerable:false,configurable:true});t.prototype.handleClickedItem=function(){this.close()};t.prototype.handleKeyUp=function(t){this.moveUp(t.target)};t.prototype.handleKeyDown=function(t){this.moveDown(t.detail)};t.prototype.handleHomeKey=function(){this.focusFirstItem()};t.prototype.handleEndKey=function(){this.focusLastItem()};t.prototype.handleTabKey=function(){if(this.isExpanded){this.close()}};t.prototype.handleEscKey=function(){this.close();this.wmButtonEl.focus()};t.prototype.handleKey=function(t){var i=this;switch(t.key){case"ArrowDown":if(!this.isExpanded){t.preventDefault();this.open();window.requestAnimationFrame((function(){return i.focusFirstItem()}))}break;case"ArrowUp":if(!this.isExpanded){t.preventDefault();this.open();window.requestAnimationFrame((function(){return i.focusLastItem()}))}break}};t.prototype.handleMenuitemBlur=function(t){var i=t.detail.relatedTarget===this.el||this.el.contains(t.detail.relatedTarget);if(!i){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleButtonBlur=function(t){var i=t.relatedTarget===this.el||this.el.contains(t.relatedTarget);if(i){t.stopPropagation()}};t.prototype.componentDidLoad=function(){if(this.actionMenuType!=="icon"&&!this.buttonText){console.error("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'")}if(this.actionMenuType==="icon"&&!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()};t.prototype.moveUp=function(t){var i=this.childItems.indexOf(t);if(i===0){this.focusLastItem()}else{this.childItems[i-1].focus()}};t.prototype.moveDown=function(t){var i=this.childItems.indexOf(t);if(i===this.childItems.length-1){this.focusFirstItem()}else{this.childItems[i+1].focus()}};t.prototype.open=function(){var t=this;if(!this.disabled){this.openUp=shouldOpenUp(this.el,this.itemsEl.clientHeight);this.isExpanded=true;this.itemsEl.classList.remove("hidden");window.requestAnimationFrame((function(){return t.focusFirstItem()}))}};t.prototype.close=function(t){var i=this;if(t===void 0){t=true}this.isExpanded=false;window.setTimeout((function(){i.itemsEl.classList.add("hidden")}),150);window.setTimeout((function(){if(t&&(document.activeElement.tagName==="BODY"||document.activeElement.tagName==="WM-MENUITEM")){i.wmButtonEl.focus()}}),250)};t.prototype.focusFirstItem=function(){this.childItems[0].focus()};t.prototype.focusLastItem=function(){this.childItems[this.childItems.length-1].focus()};t.prototype.findAndFocusItem=function(t){var i=this;if(!this.keysSoFar&&t.detail==" "){t.target.click()}else{var e=t.detail.toLowerCase();this.focusFirstItem();if(!this.keysSoFar){this.childItems.forEach((function(t,e){if(t===document.activeElement){i.searchIndex=e}}))}this.keysSoFar+=e;var n=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!n){n=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(n){n.focus()}this.debouncedClearKeysSoFar()}};t.prototype.findMatchInRange=function(t,i,e){for(var n=i;n<e;n++){var o=t[n].textContent;if(o&&o.toLowerCase().indexOf(this.keysSoFar)===0){return t[n]}}return null};t.prototype.render=function(){var t=this;return h(Host,{onBlur:function(){return t.close(false)}},h("div",{class:getTextDir()},h("wm-button",{"button-type":this.internalButtonType,tooltip:this.tooltip,"custom-background":this.darkMode?"dark":undefined,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:this.actionMenuType==="icon"?"f1d9":"",iconSize:this.actionMenuType==="icon"?"24px":undefined,id:"menubtn",onClick:function(){return t.isExpanded?t.close():t.open()},onBlur:function(i){return t.handleButtonBlur(i)},disabled:this.disabled,ref:function(i){return t.wmButtonEl=i},"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":"menu"},this.buttonText),h("div",{class:"dropdown ".concat(this.openUp?"open-up":""," ").concat(this.horizontalPosition," ").concat(this.isExpanded?"open":""," hidden"),id:"menu",tabindex:-1,role:"menu",ref:function(i){return t.itemsEl=i}},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ActionMenu.style=wmActionMenuCss;var wmMenuitemCss=':host{--wmcolor-actionmenu-item-background-hover:var(--wmcolor-option-background-hover);--wmcolor-actionmenu-item-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-actionmenu-item-background:var(--wmcolor-option-background);--wmcolor-actionmenu-item-border:var(--wmcolor-option-border);--wmcolor-actionmenu-item-text-description:var(--wmcolor-option-text);--wmcolor-actionmenu-item-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-actionmenu-item-text:var(--wmcolor-interactive);contain:content;font-family:inherit}:host .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:var(--wmcolor-actionmenu-item-background);font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid var(--wmcolor-actionmenu-item-border);color:var(--wmcolor-actionmenu-item-text);font-weight:700}:host .wrapper:hover{background:var(--wmcolor-actionmenu-item-background-hover);outline:none}:host .wrapper .description{color:var(--wmcolor-actionmenu-item-text-description);font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper:not(:last-child){border-bottom:2px solid var(--wmcolor-actionmenu-item-border)}:host ::slotted{font-family:inherit}:host .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-visible){outline:none}:host(:focus-visible) .wrapper{outline:none;background:var(--wmcolor-actionmenu-item-background-hover)}:host([aria-disabled=true]){pointer-events:none}:host([aria-disabled=true]) .wrapper{background:var(--wmcolor-actionmenu-item-background-disabled);color:var(--wmcolor-actionmenu-text-disabled)}:host([aria-disabled=true]) .description{color:var(--wmcolor-actionmenu-text-disabled)}';var Menuitem=function(){function t(t){registerInstance(this,t);this.wmMenuitemClicked=createEvent(this,"wmMenuitemClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmPageDownItems=createEvent(this,"wmPageDownItems",7);this.wmPageUpItems=createEvent(this,"wmPageUpItems",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmMenuitemBlurred=createEvent(this,"wmMenuitemBlurred",7);this.descriptionCharLimit=100;this.disabled=false;this.icon=undefined;this.description=undefined}t.prototype.handleKeydown=function(t){var i=t.altKey||t.ctrlKey||t.metaKey;var e=/^.$/.test(t.key);var n=e&&!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();if(!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:if(n){t.preventDefault();this.wmLetterPressed.emit(t.key)}}};t.prototype.handleClick=function(){if(!this.disabled){this.wmMenuitemClicked.emit()}};t.prototype.handleBlur=function(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})};t.prototype.setOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};t.prototype.componentWillLoad=function(){if(this.icon){this.icon=getIconCodeFromName(this.icon)}if(this.description){if(this.description.length>this.descriptionCharLimit){console.error("wm-menuitem description is above the character limit of ".concat(this.descriptionCharLimit))}if(this.icon){console.error("wm-menuitems with descriptions do not support the use of icons")}}this.setOnClick()};t.prototype.componentDidLoad=function(){if(this.icon){this.iconEl.classList.add("mdi");this.iconEl.innerHTML="&#x".concat(this.icon,";")}};t.prototype.render=function(){var t=this;return h(Host,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},h("div",{class:"wrapper","aria-disabled":this.disabled?"true":null},h("span",{ref:function(i){return t.iconEl=i}}),this.el.textContent,this.description?h("div",{class:"description"},this.description):""))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["setOnClick"]}},enumerable:false,configurable:true});return t}();Menuitem.style=wmMenuitemCss;export{ActionMenu as wm_action_menu,Menuitem as wm_menuitem};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-558b5a82.js";import{d as debounce,q as shouldShiftRight,k as shouldOpenUp,y as getTextDir}from"./functions-8800c690.js";import{g as getIconCodeFromName}from"./interfaces-cc5b177f.js";var wmActionMenuCss=".svg-icon{display:inline-block}.svg-icon:before{content:\"\";background-color:var(--icon-fill, currentColor);width:var(--icon-size, 14px);height:var(--icon-size, 14px)}.svg-icon.horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg-icon.vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.svg-icon.svg-pencil:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}.svg-icon.svg-rotate-right:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}:host{--wmcolor-actionmenu-background:var(--wmcolor-background);--wmcolor-actionmenu-text:var(--wmcolor-interactive);--wmcolor-actionmenu-text-disabled:var(--wmcolor-option-text-disabled);position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:var(--wmcolor-actionmenu-text);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);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-actionmenu-background);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}";var ActionMenu=function(){function t(t){var i=this;registerInstance(this,t);this.wmActionMenuLoaded=createEvent(this,"wmActionMenuLoaded",7);this.menuLoaded=createEvent(this,"menuLoaded",7);this.openUp=false;this.keysSoFar="";this.searchIndex=0;this.debouncedClearKeysSoFar=debounce((function(){i.keysSoFar=""}),500);this.isExpanded=false;this.tooltipPosition=undefined;this.actionMenuType="icon";this.buttonText=undefined;this.disabled=false;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.darkMode=undefined}Object.defineProperty(t.prototype,"horizontalPosition",{get:function(){return!!this.el&&!!this.itemsEl&&shouldShiftRight(this.el,this.itemsEl.clientWidth)?"right":"left"},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-menuitem"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"internalButtonType",{get:function(){return this.actionMenuType==="icon"||this.actionMenuType==="text"?this.actionMenuType+"only":this.actionMenuType},enumerable:false,configurable:true});t.prototype.handleClickedItem=function(){this.close()};t.prototype.handleKeyUp=function(t){this.moveUp(t.target)};t.prototype.handleKeyDown=function(t){this.moveDown(t.detail)};t.prototype.handleHomeKey=function(){this.focusFirstItem()};t.prototype.handleEndKey=function(){this.focusLastItem()};t.prototype.handleTabKey=function(){if(this.isExpanded){this.close()}};t.prototype.handleEscKey=function(){this.close();this.wmButtonEl.focus()};t.prototype.handleKey=function(t){var i=this;switch(t.key){case"ArrowDown":if(!this.isExpanded){t.preventDefault();this.open();window.requestAnimationFrame((function(){return i.focusFirstItem()}))}break;case"ArrowUp":if(!this.isExpanded){t.preventDefault();this.open();window.requestAnimationFrame((function(){return i.focusLastItem()}))}break}};t.prototype.handleMenuitemBlur=function(t){var i=t.detail.relatedTarget===this.el||this.el.contains(t.detail.relatedTarget);if(!i){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleButtonBlur=function(t){var i=t.relatedTarget===this.el||this.el.contains(t.relatedTarget);if(i){t.stopPropagation()}};t.prototype.componentDidLoad=function(){if(this.actionMenuType!=="icon"&&!this.buttonText){console.error("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'")}if(this.actionMenuType==="icon"&&!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()};t.prototype.moveUp=function(t){var i=this.childItems.indexOf(t);if(i===0){this.focusLastItem()}else{this.childItems[i-1].focus()}};t.prototype.moveDown=function(t){var i=this.childItems.indexOf(t);if(i===this.childItems.length-1){this.focusFirstItem()}else{this.childItems[i+1].focus()}};t.prototype.open=function(){var t=this;if(!this.disabled){this.openUp=shouldOpenUp(this.el,this.itemsEl.clientHeight);this.isExpanded=true;this.itemsEl.classList.remove("hidden");window.requestAnimationFrame((function(){return t.focusFirstItem()}))}};t.prototype.close=function(t){var i=this;if(t===void 0){t=true}this.isExpanded=false;window.setTimeout((function(){i.itemsEl.classList.add("hidden")}),150);window.setTimeout((function(){if(t&&(document.activeElement.tagName==="BODY"||document.activeElement.tagName==="WM-MENUITEM")){i.wmButtonEl.focus()}}),250)};t.prototype.focusFirstItem=function(){this.childItems[0].focus()};t.prototype.focusLastItem=function(){this.childItems[this.childItems.length-1].focus()};t.prototype.findAndFocusItem=function(t){var i=this;if(!this.keysSoFar&&t.detail==" "){t.target.click()}else{var e=t.detail.toLowerCase();this.focusFirstItem();if(!this.keysSoFar){this.childItems.forEach((function(t,e){if(t===document.activeElement){i.searchIndex=e}}))}this.keysSoFar+=e;var n=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!n){n=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(n){n.focus()}this.debouncedClearKeysSoFar()}};t.prototype.findMatchInRange=function(t,i,e){for(var n=i;n<e;n++){var o=t[n].textContent;if(o&&o.toLowerCase().indexOf(this.keysSoFar)===0){return t[n]}}return null};t.prototype.render=function(){var t=this;return h(Host,{onBlur:function(){return t.close(false)}},h("div",{class:getTextDir()},h("wm-button",{"button-type":this.internalButtonType,tooltip:this.tooltip,"custom-background":this.darkMode?"dark":undefined,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:this.actionMenuType==="icon"?"f1d9":"",iconSize:this.actionMenuType==="icon"?"24px":undefined,id:"menubtn",onClick:function(){return t.isExpanded?t.close():t.open()},onBlur:function(i){return t.handleButtonBlur(i)},disabled:this.disabled,ref:function(i){return t.wmButtonEl=i},"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":"menu"},this.buttonText),h("div",{class:"dropdown ".concat(this.openUp?"open-up":""," ").concat(this.horizontalPosition," ").concat(this.isExpanded?"open":""," hidden"),id:"menu",tabindex:-1,role:"menu",ref:function(i){return t.itemsEl=i}},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ActionMenu.style=wmActionMenuCss;var wmMenuitemCss=".svg-icon{display:inline-block}.svg-icon:before{content:\"\";background-color:var(--icon-fill, currentColor);width:var(--icon-size, 14px);height:var(--icon-size, 14px)}.svg-icon.horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg-icon.vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.svg-icon.svg-pencil:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}.svg-icon.svg-rotate-right:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}:host{--wmcolor-actionmenu-item-background-hover:var(--wmcolor-option-background-hover);--wmcolor-actionmenu-item-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-actionmenu-item-background:var(--wmcolor-option-background);--wmcolor-actionmenu-item-border:var(--wmcolor-option-border);--wmcolor-actionmenu-item-text-description:var(--wmcolor-option-text);--wmcolor-actionmenu-item-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-actionmenu-item-text:var(--wmcolor-interactive);contain:content;font-family:inherit}:host .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:var(--wmcolor-actionmenu-item-background);font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid var(--wmcolor-actionmenu-item-border);color:var(--wmcolor-actionmenu-item-text);font-weight:700}:host .wrapper:hover{background:var(--wmcolor-actionmenu-item-background-hover);outline:none}:host .wrapper .description{color:var(--wmcolor-actionmenu-item-text-description);font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper:not(:last-child){border-bottom:2px solid var(--wmcolor-actionmenu-item-border)}:host ::slotted{font-family:inherit}:host .svg-icon,:host .mdi{display:inline-block;margin-right:0.625rem;pointer-events:none}:host .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.12rem}:host(:focus-visible){outline:none}:host(:focus-visible) .wrapper{outline:none;background:var(--wmcolor-actionmenu-item-background-hover)}:host([aria-disabled=true]){pointer-events:none}:host([aria-disabled=true]) .wrapper{background:var(--wmcolor-actionmenu-item-background-disabled);color:var(--wmcolor-actionmenu-text-disabled)}:host([aria-disabled=true]) .description{color:var(--wmcolor-actionmenu-text-disabled)}";var Menuitem=function(){function t(t){registerInstance(this,t);this.wmMenuitemClicked=createEvent(this,"wmMenuitemClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmPageDownItems=createEvent(this,"wmPageDownItems",7);this.wmPageUpItems=createEvent(this,"wmPageUpItems",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmMenuitemBlurred=createEvent(this,"wmMenuitemBlurred",7);this.descriptionCharLimit=100;this.disabled=false;this.icon=undefined;this.description=undefined}t.prototype.handleKeydown=function(t){var i=t.altKey||t.ctrlKey||t.metaKey;var e=/^.$/.test(t.key);var n=e&&!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();if(!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:if(n){t.preventDefault();this.wmLetterPressed.emit(t.key)}}};t.prototype.handleClick=function(){if(!this.disabled){this.wmMenuitemClicked.emit()}};t.prototype.handleBlur=function(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})};t.prototype.setOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};t.prototype.componentWillLoad=function(){if(this.icon){this.icon=getIconCodeFromName(this.icon)}if(this.description){if(this.description.length>this.descriptionCharLimit){console.error("wm-menuitem description is above the character limit of ".concat(this.descriptionCharLimit))}if(this.icon){console.error("wm-menuitems with descriptions do not support the use of icons")}}this.setOnClick()};t.prototype.renderIcon=function(){if(this.icon.match(/^#/)){return h("span",{class:"svg-icon svg-".concat(this.icon.slice(1))})}else if(this.icon.match(/^\/\S*[#]\S*/)){return h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-icon",width:"14px",height:"14px"},h("use",{href:this.icon}))}else{return h("span",{class:"mdi","aria-hidden":"true"},String.fromCodePoint(parseInt("0x".concat(this.icon))))}};t.prototype.render=function(){return h(Host,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},h("div",{class:"wrapper","aria-disabled":this.disabled?"true":null},this.icon&&this.renderIcon(),this.el.textContent,this.description?h("div",{class:"description"},this.description):""))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["setOnClick"]}},enumerable:false,configurable:true});return t}();Menuitem.style=wmMenuitemCss;export{ActionMenu as wm_action_menu,Menuitem as wm_menuitem};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-558b5a82.js";import{g as getIconCodeFromName}from"./interfaces-cc5b177f.js";import{g as generateId,t as toBool,h as hideTooltip,a as handleDisabledAttribute,s as showTooltip,b as triggerFormSubmit}from"./functions-8800c690.js";var wmButtonCss=':host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,:host .wm-button:focus-visible{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled){outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-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)}:host .wm-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere;border-radius:2px}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly:before{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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational:before{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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary:before{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";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host([disabled]),:host(.button-disabled){pointer-events:none}:host([disabled=false]){pointer-events:initial}:host{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}: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(.-textonly){min-width:0}';var Button=function(){function o(o){registerInstance(this,o);this.id=generateId();this.ariaPopup=false;this.disabled=false;this.buttonType="secondary";this.icon=undefined;this.iconSize=undefined;this.iconRotate=undefined;this.iconFlip=undefined;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.tooltipPosition="bottom-right";this.permanentlyDelete=false;this.textWrap=true;this.customBackground=undefined;this.isSubmit=false;this.isTabbing=false}Object.defineProperty(o.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"isTruncated",{get:function(){return!!this.buttonEl&&this.buttonType==="textonly"&&this.buttonEl.offsetWidth<this.buttonEl.scrollWidth},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasTooltip",{get:function(){return["icononly","navigational"].includes(this.buttonType)||this.isTruncated},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"buttonClasses",{get:function(){var o="wm-button";o+=this.permanentlyDelete?" -permanentlydelete":"";o+=this.buttonType?" -"+this.buttonType:" -secondary";o+=this.textWrap?"":" nowrap";o+=this.isTabbing?" user-is-tabbing":"";o+=this.isTruncated?" -truncated":"";o+=this.customBackground==="dark"?" dark":"";return o},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"iconStyles",{get:function(){var o="";o+=this.iconRotate?"rotate(".concat(this.iconRotate,"deg)"):"";o+=this.iconFlip==="horizontal"?"scaleX(-1)":"";o+=this.iconFlip==="vertical"?"scaleY(-1)":"";return Object.assign(Object.assign({},this.iconSize&&{fontSize:this.iconSize}),(this.iconRotate||this.iconFlip)&&{transform:o})},enumerable:false,configurable:true});o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleScroll=function(){hideTooltip()};o.prototype.validateType=function(o){var t=["primary","secondary","textonly","icononly","navigational","selector","selector-primary","pairpositive","pairnegative"].includes(o);if(!t){this.buttonType="secondary"}this.validateIcon()};o.prototype.updateIcon=function(){this.icon=getIconCodeFromName(this.icon)};o.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};o.prototype.validateIcon=function(){switch(this.buttonType){case"icononly":case"navigational":if(!this.icon){console.error("wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.")}if(!this.tooltip){console.error("wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.")}break;case"pairpositive":this.icon="f12c";break;case"pairnegative":this.icon="f739";break}};o.prototype.handleKeydown=function(o){switch(o.key){case"Enter":o.preventDefault();if(!this.isDisabled){this.el.click()}break}};o.prototype.handleMouseEnter=function(o){if(this.hasTooltip){var t="";if(this.isTruncated&&this.el.textContent){t=this.el.textContent}else if(this.tooltip){t=this.tooltip}showTooltip(this.tooltipPosition,o.target,t)}};o.prototype.handleFocus=function(o){if(this.hasTooltip&&this.isTabbing){var t="";if(this.isTruncated&&this.el.textContent){t=this.el.textContent}else if(this.tooltip){t=this.tooltip}showTooltip(this.tooltipPosition,o.target,t)}};o.prototype.componentWillLoad=function(){this.validateType(this.buttonType);if(this.icon){this.icon=this.icon=getIconCodeFromName(this.icon)}handleDisabledAttribute(this.el,this.isDisabled)};o.prototype.componentDidLoad=function(){var o=this;if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.isSubmit&&this.el.addEventListener("click",(function(){return triggerFormSubmit(o.el.closest("form"))}));this.ariaPopup=!!this.el.getAttribute("aria-haspopup")};o.prototype.getAriaLabel=function(){if(this.buttonType==="icononly"||this.buttonType==="navigational"){return this.labelForIdenticalButtons||this.tooltip}if(this.labelForIdenticalButtons){return this.labelForIdenticalButtons}};o.prototype.render=function(){var o=this;return h(Host,{class:"".concat(this.isDisabled?"button-disabled":""," -").concat(this.buttonType)},h("button",{id:this.id,class:"".concat(this.buttonClasses),disabled:this.isDisabled,ref:function(t){return o.buttonEl=t},"aria-label":this.getAriaLabel(),"aria-hasPopup":this.ariaPopup?"menu":null,onMouseEnter:function(t){return o.handleMouseEnter(t)},onMouseLeave:function(){return hideTooltip()},onFocus:function(t){return o.handleFocus(t)},onBlur:function(){return hideTooltip()},onClick:function(){return hideTooltip()}},this.icon&&h("span",{class:"mdi",style:this.iconStyles,"aria-hidden":"true"},String.fromCodePoint(parseInt("0x".concat(this.icon)))),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(o,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{buttonType:["validateType"],icon:["updateIcon"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return o}();Button.style=wmButtonCss;export{Button as wm_button};
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-558b5a82.js";import{g as getIconCodeFromName}from"./interfaces-cc5b177f.js";import{g as generateId,t as toBool,h as hideTooltip,a as handleDisabledAttribute,s as showTooltip,b as triggerFormSubmit}from"./functions-8800c690.js";var wmButtonCss=":host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,:host .wm-button:focus-visible{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled){outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-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)}:host .wm-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,:host .wm-button:not(.-icononly):not(.-navigational) .svg-icon{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere;border-radius:2px}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly:before{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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational:before{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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary:before{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\";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}.svg-icon{display:inline-block}.svg-icon:before{content:\"\";background-color:var(--icon-fill, currentColor);width:var(--icon-size, 14px);height:var(--icon-size, 14px)}.svg-icon.horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg-icon.vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.svg-icon.svg-pencil:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}.svg-icon.svg-rotate-right:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}:host([disabled]),:host(.button-disabled){pointer-events:none}:host([disabled=false]){pointer-events:initial}:host{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}: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(.-textonly){min-width:0}";var Button=function(){function o(o){registerInstance(this,o);this.id=generateId();this.ariaPopup=false;this.disabled=false;this.buttonType="secondary";this.icon=undefined;this.iconSize=undefined;this.iconRotate=undefined;this.iconFlip=undefined;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.tooltipPosition="bottom-right";this.permanentlyDelete=false;this.textWrap=true;this.customBackground=undefined;this.isSubmit=false;this.isTabbing=false}Object.defineProperty(o.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"isTruncated",{get:function(){return!!this.buttonEl&&this.buttonType==="textonly"&&this.buttonEl.offsetWidth<this.buttonEl.scrollWidth},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasTooltip",{get:function(){return["icononly","navigational"].includes(this.buttonType)||this.isTruncated},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"buttonClasses",{get:function(){var o="wm-button";o+=this.permanentlyDelete?" -permanentlydelete":"";o+=this.buttonType?" -"+this.buttonType:" -secondary";o+=this.textWrap?"":" nowrap";o+=this.isTabbing?" user-is-tabbing":"";o+=this.isTruncated?" -truncated":"";o+=this.customBackground==="dark"?" dark":"";return o},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"iconStyles",{get:function(){var o="";o+=this.iconRotate?"rotate(".concat(this.iconRotate,"deg)"):"";o+=this.iconFlip==="horizontal"?"scaleX(-1)":"";o+=this.iconFlip==="vertical"?"scaleY(-1)":"";return Object.assign(Object.assign({},this.iconSize&&{fontSize:this.iconSize}),(this.iconRotate||this.iconFlip)&&{transform:o})},enumerable:false,configurable:true});o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleScroll=function(){hideTooltip()};o.prototype.validateType=function(o){var t=["primary","secondary","textonly","icononly","navigational","selector","selector-primary","pairpositive","pairnegative"].includes(o);if(!t){this.buttonType="secondary"}this.validateIcon()};o.prototype.updateIcon=function(){this.icon=getIconCodeFromName(this.icon)};o.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};o.prototype.validateIcon=function(){switch(this.buttonType){case"icononly":case"navigational":if(!this.icon){console.error("wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.")}if(!this.tooltip){console.error("wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.")}break;case"pairpositive":this.icon="f12c";break;case"pairnegative":this.icon="f739";break}};o.prototype.handleKeydown=function(o){switch(o.key){case"Enter":o.preventDefault();if(!this.isDisabled){this.el.click()}break}};o.prototype.handleMouseEnter=function(o){if(this.hasTooltip){var t="";if(this.isTruncated&&this.el.textContent){t=this.el.textContent}else if(this.tooltip){t=this.tooltip}showTooltip(this.tooltipPosition,o.target,t)}};o.prototype.handleFocus=function(o){if(this.hasTooltip&&this.isTabbing){var t="";if(this.isTruncated&&this.el.textContent){t=this.el.textContent}else if(this.tooltip){t=this.tooltip}showTooltip(this.tooltipPosition,o.target,t)}};o.prototype.componentWillLoad=function(){this.validateType(this.buttonType);if(this.icon){this.icon=this.icon=getIconCodeFromName(this.icon)}handleDisabledAttribute(this.el,this.isDisabled)};o.prototype.componentDidLoad=function(){var o=this;if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.isSubmit&&this.el.addEventListener("click",(function(){return triggerFormSubmit(o.el.closest("form"))}));this.ariaPopup=!!this.el.getAttribute("aria-haspopup")};o.prototype.getAriaLabel=function(){if(this.buttonType==="icononly"||this.buttonType==="navigational"){return this.labelForIdenticalButtons||this.tooltip}if(this.labelForIdenticalButtons){return this.labelForIdenticalButtons}};o.prototype.renderIcon=function(){if(this.icon.match(/^#/)){return h("span",{class:"svg-icon svg-".concat(this.icon.slice(1)),style:this.iconStyles})}else if(this.icon.match(/^\/\S*[#]\S*/)){return h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-icon",width:this.iconSize?this.iconSize:"14px",height:this.iconSize?this.iconSize:"14px"},h("use",{href:this.icon}))}else{return h("span",{class:"mdi",style:this.iconStyles,"aria-hidden":"true"},String.fromCodePoint(parseInt("0x".concat(this.icon))))}};o.prototype.render=function(){var o=this;return h(Host,{class:"".concat(this.isDisabled?"button-disabled":""," -").concat(this.buttonType)},h("button",{id:this.id,class:"".concat(this.buttonClasses),disabled:this.isDisabled,ref:function(t){return o.buttonEl=t},"aria-label":this.getAriaLabel(),"aria-hasPopup":this.ariaPopup?"menu":null,onMouseEnter:function(t){return o.handleMouseEnter(t)},onMouseLeave:function(){return hideTooltip()},onFocus:function(t){return o.handleFocus(t)},onBlur:function(){return hideTooltip()},onClick:function(){return hideTooltip()}},this.icon&&this.renderIcon(),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(o,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{buttonType:["validateType"],icon:["updateIcon"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return o}();Button.style=wmButtonCss;export{Button as wm_button};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-558b5a82.js";import{g as generateId,d as debounce}from"./functions-8800c690.js";import{a as allChartsDetails,h as handleChartKeydown,g as getDetails,r as removeSegmentInfoHighlight,b as renderSimpleBar,c as renderStackedBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,i as renderHiddenValuesMessage,j as exitChart,k as amountToPercent}from"./chartFunctions-34f19953.js";import{c as chartMessages}from"./intl-b110ca8d.js";var wmChartCss=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .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:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values.none{margin:0}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .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{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,:host .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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .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.bar{-ms-flex-direction:row;flex-direction:row}:host .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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .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,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:116px}:host .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 .axis{position:absolute;top:0;left:0;width:100%;overflow:visible;-webkit-transform:translate(0px, 96px);transform:translate(0px, 96px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar3 .bar3-axis-label{position:absolute;bottom:-4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .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,:host .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,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .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,:host .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,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .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{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #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{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{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.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .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{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var Chart=function(){function e(e){var t=this;registerInstance(this,e);this.uid=generateId();this.slicesDetails=[];this.debouncedSliceUpdate=debounce((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getDetails.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.focusedSliceId=undefined}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,"currentChartType",{get:function(){return this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return allChartsDetails[this.currentChartType]},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,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,getDetails.call(this,this.currentChartType)];case 1:r.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){forceUpdate(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));removeSegmentInfoHighlight(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var o=amountToPercent(e.amount,this.total,false);var n=this.el.offsetWidth;var a=o/100*n>=t;var p=a||e.amount==0?"".concat(o,"%"):"".concat(t,"px");return h("div",{class:"value-wrapper ".concat(a?"":"fixed-width"),style:{width:p}},h("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return h("svg",{class:"axis"},h("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),h("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),h("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),h("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return renderSimpleBar.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return renderStackedBar.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return renderDoughnut.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return exitChart.call(e)}},h("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":chartMessages.interactiveChart,"aria-describedby":"chart-instructions"},h("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.isBar&&renderLegend.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&renderLegend.call(this,this.currentChartType),h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&renderHiddenValuesMessage()),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function p(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(i,p)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:p(0),throw:p(1),return:p(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function p(e){return function(t){return s([e,t])}}function s(p){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,p[0]&&(r=0)),r)try{if(o=1,n&&(a=p[0]&2?n["return"]:p[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;if(n=0,a)p=[p[0]&2,a.value];switch(p[0]){case 0:case 1:a=p;break;case 4:r.label++;return{value:p[1],done:false};case 5:r.label++;n=p[1];p=[0];continue;case 7:p=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1];a=p;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(p);break}if(a[2])r.ops.pop();r.trys.pop();continue}p=t.call(e,r)}catch(e){p=[6,e];n=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-558b5a82.js";import{g as generateId,d as debounce}from"./functions-8800c690.js";import{a as allChartsDetails,h as handleChartKeydown,g as getDetails,r as removeSegmentInfoHighlight,b as renderSimpleBar,c as renderStackedBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,i as renderHiddenValuesMessage,j as exitChart,k as amountToPercent}from"./chartFunctions-34f19953.js";import{c as chartMessages}from"./intl-b110ca8d.js";var wmChartCss=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .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:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values.none{margin:0}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .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{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,:host .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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .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.bar{-ms-flex-direction:row;flex-direction:row}:host .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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .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,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:116px}:host .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 .axis{position:absolute;top:0;left:0;width:100%;overflow:visible;-webkit-transform:translate(0px, 96px);transform:translate(0px, 96px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar3 .bar3-axis-label{position:absolute;bottom:-4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .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,:host .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,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .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,:host .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,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .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{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #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{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{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.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .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{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}.svg-icon{display:inline-block}.svg-icon:before{content:\"\";background-color:var(--icon-fill, currentColor);width:var(--icon-size, 14px);height:var(--icon-size, 14px)}.svg-icon.horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg-icon.vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.svg-icon.svg-pencil:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}.svg-icon.svg-rotate-right:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}";var Chart=function(){function e(e){var t=this;registerInstance(this,e);this.uid=generateId();this.slicesDetails=[];this.debouncedSliceUpdate=debounce((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getDetails.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.focusedSliceId=undefined}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,"currentChartType",{get:function(){return this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return allChartsDetails[this.currentChartType]},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,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,getDetails.call(this,this.currentChartType)];case 1:r.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){forceUpdate(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));removeSegmentInfoHighlight(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var o=amountToPercent(e.amount,this.total,false);var n=this.el.offsetWidth;var a=o/100*n>=t;var i=a||e.amount==0?"".concat(o,"%"):"".concat(t,"px");return h("div",{class:"value-wrapper ".concat(a?"":"fixed-width"),style:{width:i}},h("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return h("svg",{class:"axis"},h("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),h("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),h("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),h("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return renderSimpleBar.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return renderStackedBar.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return renderDoughnut.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return exitChart.call(e)}},h("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":chartMessages.interactiveChart,"aria-describedby":"chart-instructions"},h("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.isBar&&renderLegend.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&renderLegend.call(this,this.currentChartType),h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&renderHiddenValuesMessage()),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,i){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function s(t){try{l(i["throw"](t))}catch(t){n(t)}}function l(t){t.done?r(t.value):a(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-558b5a82.js";import{t as toBool,j as dateToISO,a as handleDisabledAttribute,k as shouldOpenUp,B as getContextMeasurements,C as dateFind,D as calendar_months,E as findParentWithHiddenOverflow,i as intl}from"./functions-8800c690.js";var datepickerCss=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .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{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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{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{color:var(--wmcolor-text-error)}:host .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{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.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 DateRange=function(){function t(t){registerInstance(this,t);this.wmRangeSelection=createEvent(this,"wmRangeSelection",7);this.wmStartInputBlur=createEvent(this,"wmStartInputBlur",7);this.wmEndInputBlur=createEvent(this,"wmEndInputBlur",7);this.openUp=false;this.calWidth=681;this.popupClicked=false;this.toggleButtonClicked=false;this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};this.dateFormat="mm/dd/yyyy";this.disabled=false;this.errorMessage=undefined;this.invalidStart=false;this.invalidEnd=false;this.labelStart="";this.labelEnd="";this.preselected=undefined;this.requiredField=false;this.valueStart="";this.valueEnd="";this.availSpace=0;this.isExpanded=false}Object.defineProperty(t.prototype,"_disabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusDates",{get:function(){var t=this.toISO(this.valueStart);var e=dateToISO(new Date);if(this._isValidISO(t)){e=t}else if(this.preselected&&this._isValidISO(this.preselected)){e=this.preselected}var r=this.toJSDate(e);if(r.getUTCMonth()==11){r.setYear(r.getUTCFullYear()+1)}r.setMonth((r.getUTCMonth()+1)%12,1);var i=dateToISO(r);var a=this.toISO(this.valueEnd);if(this._isValidISO(a)){var n=this.isSameMonth(e,a);if(!n){i=a;if(!t){var o=this.toJSDate(i);var s=o.getUTCMonth()-1;if(s==-1){s=11;o.setYear(o.getUTCFullYear()-1)}o.setMonth(s,1);e=dateToISO(o)}}}return[e,i]},enumerable:false,configurable:true});t.prototype.isSameMonth=function(t,e){if(t&&e){return t.slice(0,-3)===e.slice(0,-3)}else{return false}};t.prototype.toJSDate=function(t){if(t&&this._isValidISO(t)){var e=new Date;e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2]));return e}else{return undefined}};t.prototype.toISO=function(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)};t.prototype.handleDisabled=function(){handleDisabledAttribute(this.el,this._disabled)};t.prototype.updateValueStart=function(){this.startInputEl.value=this.valueStart?this.valueStart:""};t.prototype.updateValueEnd=function(){this.endInputEl.value=this.valueEnd?this.valueEnd:""};t.prototype.handleErrorMessage=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};t.prototype.closePopup=function(t){var e=this;if(t===void 0){t=false}this.date1=undefined;this.date2=undefined;this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.startCalEl.hoverDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;this.endCalEl.hoverDate=undefined;this.isExpanded=false;this.startCalEl.view="day";this.endCalEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){e.popupEl.style.visibility="hidden"}),250);if(t){this.toggleEl.focus()}};t.prototype.openPopup=function(){var t=this;this.openUp=shouldOpenUp(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);var e=getContextMeasurements(this.el),r=e.spaceLeft,i=e.spaceRight;if(i>=this.calWidth-this.el.clientWidth){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else if(r>=this.calWidth-this.el.clientWidth){this.popupEl.style.right="0";this.popupEl.style.left="auto"}else{var a=(this.availSpace-this.calWidth)/2-r;this.popupEl.style.left="".concat(a,"px");this.popupEl.style.right="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){t.popupEl.classList.add("open")}));this.isExpanded=true;this.startCalEl.focusDate=this.focusDates[0];this.endCalEl.focusDate=this.focusDates[1];this.startCalEl.focusCell();if(this.valueStart){var n=this.toISO(this.valueStart);if(this._isValidISO(n)){this.startCalEl.startDate=n}if(this.valueEnd){var o=this.toISO(this.valueEnd);if(this._isValidISO(o)){if(this.isSameMonth(n,o)){this.startCalEl.endDate=o}else{this.endCalEl.endDate=o}}}}};t.prototype.handleFocus=function(){this.wrapperEl.classList.add("focus")};t.prototype.handleBlur=function(){this.wrapperEl.classList.remove("focus")};t.prototype.handleStartInputBlur=function(){this.wmStartInputBlur.emit()};t.prototype.handleEndInputBlur=function(){this.wmEndInputBlur.emit()};t.prototype.handleStartInput=function(t){this.valueStart=t.target.value};t.prototype.handleEndInput=function(t){this.valueEnd=t.target.value};t.prototype.handleKey=function(t){switch(t.key){case"Escape":t.preventDefault();t.stopPropagation();this.closePopup(true);break}};t.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};t.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};t.prototype.handleDateFocus=function(t){var e=t.target;var r=e.focusDate;var i=this.startCalEl.focusDate.slice(0,-3);var a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl){if(i>=a){this.endCalEl.focusDate=dateFind.month.increase(this.startCalEl.focusDate,1)}}else if(e==this.endCalEl){if(a<=i){this.startCalEl.focusDate=dateFind.month.decrease(this.endCalEl.focusDate,1)}}if(this.oldFocusVal){var n=dateFind.year.asInt(r);var o=dateFind.year.asInt(this.oldFocusVal);var s=dateFind.month.asInt(r);var l=dateFind.month.asInt(this.oldFocusVal);if(e.view==="day"){if(n!=o||s!=l){this.liveRegionEl.innerHTML="Viewing ".concat(calendar_months[s-1],", ").concat(n)}}else{if(n!=o){this.liveRegionEl.innerHTML="".concat(n," selected.")}else if(s!=l){this.liveRegionEl.innerHTML="".concat(calendar_months[s-1],", ").concat(n)}}}this.oldFocusVal=e.focusDate};t.prototype.handlePopupBlurred=function(t){if(t.detail.relatedTarget!==this.el){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleCellTriggered=function(t){var e=t.detail.cal;var r=t.detail.cell;var i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate){this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;e.startDate=i;this.date1=i;this.date2=undefined}else if(this.date1&&i!==this.date1){if(this.date1>i){this.date2=this.date1;this.date1=i}else{this.date2=i}var a={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(a);this.closePopup(true);this.date1=undefined;this.date2=undefined}else{e.startDate=i;this.date1=i}var n=new CustomEvent("input");this.el.dispatchEvent(n);var o=new CustomEvent("change");this.el.dispatchEvent(o)};t.prototype.handleOutOfCal=function(){this.startCalEl.hoverDate=undefined;this.endCalEl.hoverDate=undefined};t.prototype.handleCellHovered=function(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?undefined:t.detail;this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?undefined:t.detail};t.prototype.reformatDate=function(t,e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this._reformatDate(t,e,r)]}))}))};t.prototype._reformatDate=function(t,e,r){if(t!=="ISO"&&e!=="ISO")return"";if(!t||!e||!r)return"";var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(t==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(t==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(t==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};t.prototype.isValidISO=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this._isValidISO(t)]}))}))};t.prototype._isValidISO=function(t){var e=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!t||!e.test(t)){return false}else{var r=t.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var n=parseInt(r[0],10);if(n<1e3||n>3e3||a==0||a>12)return false;var o=[31,28,31,30,31,30,31,31,30,31,30,31];if(n%400==0||n%100!=0&&n%4==0)o[1]=29;return i>0&&i<=o[a-1]}};t.prototype.setAvailSpace=function(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth};t.prototype.componentWillLoad=function(){var t=this;if(this.labelStart===""||this.labelEnd===""){console.error("For accessibility reasons you must specify labels for the date range inputs.")}handleDisabledAttribute(this.el,this._disabled);this.hiddenOverflowParent=findParentWithHiddenOverflow(this.el);if(this.hiddenOverflowParent){var e=new ResizeObserver((function(){t.availSpace=t.hiddenOverflowParent.clientWidth}));e.observe(this.hiddenOverflowParent)}this.setAvailSpace()};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionEl.textContent=t};t.prototype.renderCalendars=function(){var t=this;if(this.calWidth<=this.availSpace){return h(Fragment,null,h("div",{class:"popup-wrapper ".concat(this.startCalEl&&this.startCalEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(e){return t.popupEl=e},onClick:function(){return t.popupClicked=true},style:{display:"flex"}},h("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.endCalEl.focusLastFocusable()}}),h("priv-calendar",{ref:function(e){return t.startCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),h("priv-calendar",{ref:function(e){return t.endCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),h("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.startCalEl.focusFirstFocusable()}})))}};t.prototype.render=function(){var t=this;return h(Host,{"aria-busy":"false"},h("div",{ref:function(e){return t.wrapperEl=e},class:"wrapper"},h("div",{class:"range-wrapper ".concat(this.calWidth<=this.availSpace?"cal":"")},h("div",{class:"label-wrapper",id:"start-label-wrapper"},h("label",{ref:function(e){return t.labelEl=e},id:"startlabel",htmlFor:"start-date-input",class:"label",title:"".concat(this.labelStart," (").concat(this.dateFormat,")")},this.labelStart,this.requiredField&&h("span",{"aria-hidden":"true",class:"required"},"*"))),h("div",{class:"label-wrapper",id:"end-label-wrapper"},h("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:"".concat(this.labelEnd," (").concat(this.dateFormat,")")},this.labelEnd,this.requiredField&&h("span",{"aria-hidden":"true",class:"required"},"*"))),h("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input ".concat(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleStartInput(e)},onBlur:function(){return t.handleStartInputBlur()},ref:function(e){return t.startInputEl=e},"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),h("div",{id:"hyphen"}," - "),h("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input ".concat(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleEndInput(e)},onBlur:function(){return t.handleEndInputBlur()},ref:function(e){return t.endInputEl=e},"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),h("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&h("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"start-date-input end-date-input","aria-label":intl.formatMessage({id:"date.selectRange",defaultMessage:"Select range",description:"Button text for screen readers."}),ref:function(e){return t.toggleEl=e},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},h("span",{class:"calendar",title:intl.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),h("div",null,h("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),h("div",{id:"month-title",class:"sr-only"},intl.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),h("div",{id:"year-title",class:"sr-only"},intl.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),h("div",{id:"error",class:"error"},this.errorMessage),h("div",{ref:function(e){return t.liveRegionEl=e},class:"sr-only","aria-live":"polite","aria-atomic":"true"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}},enumerable:false,configurable:true});return t}();DateRange.style=datepickerCss;export{DateRange as wm_date_range};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,i){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function s(t){try{l(i["throw"](t))}catch(t){n(t)}}function l(t){t.done?r(t.value):a(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-558b5a82.js";import{t as toBool,j as dateToISO,a as handleDisabledAttribute,k as shouldOpenUp,B as getContextMeasurements,C as dateFind,D as calendar_months,E as findParentWithHiddenOverflow,i as intl}from"./functions-8800c690.js";var datepickerCss=".svg-icon{display:inline-block}.svg-icon:before{content:\"\";background-color:var(--icon-fill, currentColor);width:var(--icon-size, 14px);height:var(--icon-size, 14px)}.svg-icon.horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg-icon.vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.svg-icon.svg-pencil:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}.svg-icon.svg-rotate-right:before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z'/%3E%3C/svg%3E%0A\");-webkit-mask-size:100%;mask-size:100%;display:block}:host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .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{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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{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{color:var(--wmcolor-text-error)}:host .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{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:\"start-label-wrapper . end-label-wrapper\" \"start-date-input hyphen end-date-input\"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:\"start-label-wrapper . end-label-wrapper .\" \"start-date-input hyphen end-date-input toggle-wrapper\"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.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 DateRange=function(){function t(t){registerInstance(this,t);this.wmRangeSelection=createEvent(this,"wmRangeSelection",7);this.wmStartInputBlur=createEvent(this,"wmStartInputBlur",7);this.wmEndInputBlur=createEvent(this,"wmEndInputBlur",7);this.openUp=false;this.calWidth=681;this.popupClicked=false;this.toggleButtonClicked=false;this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"};this.dateFormat="mm/dd/yyyy";this.disabled=false;this.errorMessage=undefined;this.invalidStart=false;this.invalidEnd=false;this.labelStart="";this.labelEnd="";this.preselected=undefined;this.requiredField=false;this.valueStart="";this.valueEnd="";this.availSpace=0;this.isExpanded=false}Object.defineProperty(t.prototype,"_disabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusDates",{get:function(){var t=this.toISO(this.valueStart);var e=dateToISO(new Date);if(this._isValidISO(t)){e=t}else if(this.preselected&&this._isValidISO(this.preselected)){e=this.preselected}var r=this.toJSDate(e);if(r.getUTCMonth()==11){r.setYear(r.getUTCFullYear()+1)}r.setMonth((r.getUTCMonth()+1)%12,1);var i=dateToISO(r);var a=this.toISO(this.valueEnd);if(this._isValidISO(a)){var n=this.isSameMonth(e,a);if(!n){i=a;if(!t){var o=this.toJSDate(i);var s=o.getUTCMonth()-1;if(s==-1){s=11;o.setYear(o.getUTCFullYear()-1)}o.setMonth(s,1);e=dateToISO(o)}}}return[e,i]},enumerable:false,configurable:true});t.prototype.isSameMonth=function(t,e){if(t&&e){return t.slice(0,-3)===e.slice(0,-3)}else{return false}};t.prototype.toJSDate=function(t){if(t&&this._isValidISO(t)){var e=new Date;e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2]));return e}else{return undefined}};t.prototype.toISO=function(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)};t.prototype.handleDisabled=function(){handleDisabledAttribute(this.el,this._disabled)};t.prototype.updateValueStart=function(){this.startInputEl.value=this.valueStart?this.valueStart:""};t.prototype.updateValueEnd=function(){this.endInputEl.value=this.valueEnd?this.valueEnd:""};t.prototype.handleErrorMessage=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.toggleButtonClicked=true};t.prototype.closePopup=function(t){var e=this;if(t===void 0){t=false}this.date1=undefined;this.date2=undefined;this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.startCalEl.hoverDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;this.endCalEl.hoverDate=undefined;this.isExpanded=false;this.startCalEl.view="day";this.endCalEl.view="day";this.popupEl.classList.remove("open");window.setTimeout((function(){e.popupEl.style.visibility="hidden"}),250);if(t){this.toggleEl.focus()}};t.prototype.openPopup=function(){var t=this;this.openUp=shouldOpenUp(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);var e=getContextMeasurements(this.el),r=e.spaceLeft,i=e.spaceRight;if(i>=this.calWidth-this.el.clientWidth){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else if(r>=this.calWidth-this.el.clientWidth){this.popupEl.style.right="0";this.popupEl.style.left="auto"}else{var a=(this.availSpace-this.calWidth)/2-r;this.popupEl.style.left="".concat(a,"px");this.popupEl.style.right="auto"}this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){t.popupEl.classList.add("open")}));this.isExpanded=true;this.startCalEl.focusDate=this.focusDates[0];this.endCalEl.focusDate=this.focusDates[1];this.startCalEl.focusCell();if(this.valueStart){var n=this.toISO(this.valueStart);if(this._isValidISO(n)){this.startCalEl.startDate=n}if(this.valueEnd){var o=this.toISO(this.valueEnd);if(this._isValidISO(o)){if(this.isSameMonth(n,o)){this.startCalEl.endDate=o}else{this.endCalEl.endDate=o}}}}};t.prototype.handleFocus=function(){this.wrapperEl.classList.add("focus")};t.prototype.handleBlur=function(){this.wrapperEl.classList.remove("focus")};t.prototype.handleStartInputBlur=function(){this.wmStartInputBlur.emit()};t.prototype.handleEndInputBlur=function(){this.wmEndInputBlur.emit()};t.prototype.handleStartInput=function(t){this.valueStart=t.target.value};t.prototype.handleEndInput=function(t){this.valueEnd=t.target.value};t.prototype.handleKey=function(t){switch(t.key){case"Escape":t.preventDefault();t.stopPropagation();this.closePopup(true);break}};t.prototype.blurHandler=function(){if(!this.popupClicked&&!this.toggleButtonClicked&&this.isExpanded){this.closePopup()}this.popupClicked=false;this.toggleButtonClicked=false};t.prototype.handleBlurOnWindow=function(){if(this.isExpanded){this.closePopup()}};t.prototype.handleDateFocus=function(t){var e=t.target;var r=e.focusDate;var i=this.startCalEl.focusDate.slice(0,-3);var a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl){if(i>=a){this.endCalEl.focusDate=dateFind.month.increase(this.startCalEl.focusDate,1)}}else if(e==this.endCalEl){if(a<=i){this.startCalEl.focusDate=dateFind.month.decrease(this.endCalEl.focusDate,1)}}if(this.oldFocusVal){var n=dateFind.year.asInt(r);var o=dateFind.year.asInt(this.oldFocusVal);var s=dateFind.month.asInt(r);var l=dateFind.month.asInt(this.oldFocusVal);if(e.view==="day"){if(n!=o||s!=l){this.liveRegionEl.innerHTML="Viewing ".concat(calendar_months[s-1],", ").concat(n)}}else{if(n!=o){this.liveRegionEl.innerHTML="".concat(n," selected.")}else if(s!=l){this.liveRegionEl.innerHTML="".concat(calendar_months[s-1],", ").concat(n)}}}this.oldFocusVal=e.focusDate};t.prototype.handlePopupBlurred=function(t){if(t.detail.relatedTarget!==this.el){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleCellTriggered=function(t){var e=t.detail.cal;var r=t.detail.cell;var i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate){this.startCalEl.startDate=undefined;this.startCalEl.endDate=undefined;this.endCalEl.startDate=undefined;this.endCalEl.endDate=undefined;e.startDate=i;this.date1=i;this.date2=undefined}else if(this.date1&&i!==this.date1){if(this.date1>i){this.date2=this.date1;this.date1=i}else{this.date2=i}var a={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(a);this.closePopup(true);this.date1=undefined;this.date2=undefined}else{e.startDate=i;this.date1=i}var n=new CustomEvent("input");this.el.dispatchEvent(n);var o=new CustomEvent("change");this.el.dispatchEvent(o)};t.prototype.handleOutOfCal=function(){this.startCalEl.hoverDate=undefined;this.endCalEl.hoverDate=undefined};t.prototype.handleCellHovered=function(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?undefined:t.detail;this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?undefined:t.detail};t.prototype.reformatDate=function(t,e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this._reformatDate(t,e,r)]}))}))};t.prototype._reformatDate=function(t,e,r){if(t!=="ISO"&&e!=="ISO")return"";if(!t||!e||!r)return"";var i=/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;if(!i.test(r)){return r}else{var a=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return a[1].padStart(2,"0")+"/"+a[2].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"INT":return a[2].padStart(2,"0")+"/"+a[1].padStart(2,"0")+"/"+a[0].padStart(4,"20");case"ISO":if(t==="US"){return a[2].padStart(4,"20")+"-"+a[0].padStart(2,"0")+"-"+a[1].padStart(2,"0")}else if(t==="INT"){return a[2].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[0].padStart(2,"0")}else if(t==="ISO"){return a[0].padStart(4,"20")+"-"+a[1].padStart(2,"0")+"-"+a[2].padStart(2,"0")}default:return a.join("/")}}};t.prototype.isValidISO=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this._isValidISO(t)]}))}))};t.prototype._isValidISO=function(t){var e=/^\d\d\d\d[-]\d\d[-]\d\d$/;if(!t||!e.test(t)){return false}else{var r=t.split("-");var i=parseInt(r[2],10);var a=parseInt(r[1],10);var n=parseInt(r[0],10);if(n<1e3||n>3e3||a==0||a>12)return false;var o=[31,28,31,30,31,30,31,31,30,31,30,31];if(n%400==0||n%100!=0&&n%4==0)o[1]=29;return i>0&&i<=o[a-1]}};t.prototype.setAvailSpace=function(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth};t.prototype.componentWillLoad=function(){var t=this;if(this.labelStart===""||this.labelEnd===""){console.error("For accessibility reasons you must specify labels for the date range inputs.")}handleDisabledAttribute(this.el,this._disabled);this.hiddenOverflowParent=findParentWithHiddenOverflow(this.el);if(this.hiddenOverflowParent){var e=new ResizeObserver((function(){t.availSpace=t.hiddenOverflowParent.clientWidth}));e.observe(this.hiddenOverflowParent)}this.setAvailSpace()};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionEl.textContent=t};t.prototype.renderCalendars=function(){var t=this;if(this.calWidth<=this.availSpace){return h(Fragment,null,h("div",{class:"popup-wrapper ".concat(this.startCalEl&&this.startCalEl.view,"-view ").concat(this.openUp?"expand-upwards":""),id:"popup-wrapper",ref:function(e){return t.popupEl=e},onClick:function(){return t.popupClicked=true},style:{display:"flex"}},h("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.endCalEl.focusLastFocusable()}}),h("priv-calendar",{ref:function(e){return t.startCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),h("priv-calendar",{ref:function(e){return t.endCalEl=e},onClick:function(){return t.popupClicked=true},onDateFocus:function(e){return t.handleDateFocus(e)}}),h("div",{class:"trapfocus",tabIndex:this.isExpanded?0:undefined,onFocus:function(){return t.startCalEl.focusFirstFocusable()}})))}};t.prototype.render=function(){var t=this;return h(Host,{"aria-busy":"false"},h("div",{ref:function(e){return t.wrapperEl=e},class:"wrapper"},h("div",{class:"range-wrapper ".concat(this.calWidth<=this.availSpace?"cal":"")},h("div",{class:"label-wrapper",id:"start-label-wrapper"},h("label",{ref:function(e){return t.labelEl=e},id:"startlabel",htmlFor:"start-date-input",class:"label",title:"".concat(this.labelStart," (").concat(this.dateFormat,")")},this.labelStart,this.requiredField&&h("span",{"aria-hidden":"true",class:"required"},"*"))),h("div",{class:"label-wrapper",id:"end-label-wrapper"},h("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:"".concat(this.labelEnd," (").concat(this.dateFormat,")")},this.labelEnd,this.requiredField&&h("span",{"aria-hidden":"true",class:"required"},"*"))),h("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input ".concat(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleStartInput(e)},onBlur:function(){return t.handleStartInputBlur()},ref:function(e){return t.startInputEl=e},"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),h("div",{id:"hyphen"}," - "),h("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input ".concat(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:function(){return t.handleFocus()},onInput:function(e){return t.handleEndInput(e)},onBlur:function(){return t.handleEndInputBlur()},ref:function(e){return t.endInputEl=e},"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),h("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&h("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"start-date-input end-date-input","aria-label":intl.formatMessage({id:"date.selectRange",defaultMessage:"Select range",description:"Button text for screen readers."}),ref:function(e){return t.toggleEl=e},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle"},h("span",{class:"calendar",title:intl.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),h("div",null,h("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),h("div",{id:"month-title",class:"sr-only"},intl.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),h("div",{id:"year-title",class:"sr-only"},intl.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),h("div",{id:"error",class:"error"},this.errorMessage),h("div",{ref:function(e){return t.liveRegionEl=e},class:"sr-only","aria-live":"polite","aria-atomic":"true"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}},enumerable:false,configurable:true});return t}();DateRange.style=datepickerCss;export{DateRange as wm_date_range};