@watermarkinsights/ripple 5.28.1 → 5.29.0-alpha.2

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 (267) hide show
  1. package/dist/cjs/{app-globals-0b8313f1.js → app-globals-4965a440.js} +1 -1
  2. package/dist/cjs/{chartFunctions-51660576.js → chartFunctions-608adb05.js} +1 -1
  3. package/dist/cjs/{functions-2041a1d8.js → functions-b188d5b3.js} +0 -32
  4. package/dist/cjs/{intl-02a445a1.js → intl-01531391.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/priv-calendar.cjs.entry.js +4 -4
  7. package/dist/cjs/priv-chart-popover-old.cjs.entry.js +1 -1
  8. package/dist/cjs/priv-chart-popover_2.cjs.entry.js +1 -1
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +1 -1
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
  11. package/dist/cjs/priv-option-list.cjs.entry.js +3 -3
  12. package/dist/cjs/ripple.cjs.js +2 -2
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +5 -5
  14. package/dist/cjs/wm-button.cjs.entry.js +2 -2
  15. package/dist/cjs/wm-chart-bar.cjs.entry.js +3 -3
  16. package/dist/cjs/wm-chart-column.cjs.entry.js +3 -3
  17. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  18. package/dist/cjs/wm-date-range.cjs.entry.js +153 -115
  19. package/dist/cjs/wm-datepicker.cjs.entry.js +128 -91
  20. package/dist/cjs/wm-file-list.cjs.entry.js +1 -1
  21. package/dist/cjs/wm-file.cjs.entry.js +2 -2
  22. package/dist/cjs/wm-flyout.cjs.entry.js +3 -3
  23. package/dist/cjs/wm-input.cjs.entry.js +3 -3
  24. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  25. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +6 -6
  26. package/dist/cjs/wm-modal_3.cjs.entry.js +6 -6
  27. package/dist/cjs/wm-navigation_3.cjs.entry.js +6 -6
  28. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  29. package/dist/cjs/wm-nested-select.cjs.entry.js +5 -5
  30. package/dist/cjs/wm-optgroup.cjs.entry.js +2 -2
  31. package/dist/cjs/wm-option_2.cjs.entry.js +7 -7
  32. package/dist/cjs/wm-pagination.cjs.entry.js +3 -3
  33. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  34. package/dist/cjs/wm-search.cjs.entry.js +5 -5
  35. package/dist/cjs/wm-snackbar.cjs.entry.js +4 -4
  36. package/dist/cjs/wm-tab-item_3.cjs.entry.js +7 -7
  37. package/dist/cjs/wm-tag-input.cjs.entry.js +4 -4
  38. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  39. package/dist/cjs/wm-textarea.cjs.entry.js +3 -3
  40. package/dist/cjs/wm-timepicker.cjs.entry.js +3 -3
  41. package/dist/cjs/wm-toggletip.cjs.entry.js +4 -4
  42. package/dist/cjs/wm-uploader.cjs.entry.js +4 -4
  43. package/dist/collection/components/datepickers/datepicker.css +4 -0
  44. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +38 -21
  45. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  46. package/dist/collection/components/datepickers/wm-date-range.js +157 -140
  47. package/dist/collection/components/datepickers/wm-datepicker.js +132 -115
  48. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +1 -1
  49. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +3 -3
  50. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
  51. package/dist/collection/components/selects/wm-option/wm-option.js +1 -1
  52. package/dist/collection/components/selects/wm-select/wm-select.js +4 -4
  53. package/dist/collection/components/wm-action-menu/wm-action-menu.js +3 -3
  54. package/dist/collection/components/wm-button/wm-button.js +1 -1
  55. package/dist/collection/components/wm-file/wm-file.js +1 -1
  56. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  57. package/dist/collection/components/wm-flyout/wm-flyout.js +1 -1
  58. package/dist/collection/components/wm-input/wm-input.js +1 -1
  59. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  60. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  61. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  62. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  63. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +1 -1
  64. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
  65. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
  66. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  67. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  68. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  69. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  70. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  71. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  72. package/dist/collection/components/wm-search/wm-search.css +2 -0
  73. package/dist/collection/components/wm-search/wm-search.js +2 -2
  74. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  75. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +2 -2
  76. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +3 -3
  77. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  78. package/dist/collection/components/wm-tag-input/wm-tag-input.js +2 -2
  79. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  80. package/dist/collection/components/wm-timepicker/wm-timepicker.js +2 -2
  81. package/dist/collection/components/wm-toggletip/wm-toggletip.js +3 -3
  82. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  83. package/dist/collection/global/functions.js +0 -30
  84. package/dist/esm/{app-globals-b5a717cb.js → app-globals-eba3c8fb.js} +1 -1
  85. package/dist/esm/{chartFunctions-ba9dc8bc.js → chartFunctions-4bc77b76.js} +1 -1
  86. package/dist/esm/{functions-2c952c7e.js → functions-de887809.js} +1 -31
  87. package/dist/esm/{intl-28a56253.js → intl-56b47a7b.js} +1 -1
  88. package/dist/esm/loader.js +2 -2
  89. package/dist/esm/priv-calendar.entry.js +4 -4
  90. package/dist/esm/priv-chart-popover-old.entry.js +1 -1
  91. package/dist/esm/priv-chart-popover_2.entry.js +1 -1
  92. package/dist/esm/priv-navigator-button.entry.js +1 -1
  93. package/dist/esm/priv-navigator-item.entry.js +1 -1
  94. package/dist/esm/priv-option-list.entry.js +3 -3
  95. package/dist/esm/ripple.js +2 -2
  96. package/dist/esm/wm-action-menu_2.entry.js +5 -5
  97. package/dist/esm/wm-button.entry.js +2 -2
  98. package/dist/esm/wm-chart-bar.entry.js +3 -3
  99. package/dist/esm/wm-chart-column.entry.js +3 -3
  100. package/dist/esm/wm-chart.entry.js +3 -3
  101. package/dist/esm/wm-date-range.entry.js +153 -115
  102. package/dist/esm/wm-datepicker.entry.js +128 -91
  103. package/dist/esm/wm-file-list.entry.js +1 -1
  104. package/dist/esm/wm-file.entry.js +2 -2
  105. package/dist/esm/wm-flyout.entry.js +3 -3
  106. package/dist/esm/wm-input.entry.js +3 -3
  107. package/dist/esm/wm-line-chart.entry.js +3 -3
  108. package/dist/esm/wm-modal-pss_3.entry.js +6 -6
  109. package/dist/esm/wm-modal_3.entry.js +6 -6
  110. package/dist/esm/wm-navigation_3.entry.js +6 -6
  111. package/dist/esm/wm-navigator.entry.js +1 -1
  112. package/dist/esm/wm-nested-select.entry.js +5 -5
  113. package/dist/esm/wm-optgroup.entry.js +2 -2
  114. package/dist/esm/wm-option_2.entry.js +7 -7
  115. package/dist/esm/wm-pagination.entry.js +3 -3
  116. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  117. package/dist/esm/wm-search.entry.js +5 -5
  118. package/dist/esm/wm-snackbar.entry.js +4 -4
  119. package/dist/esm/wm-tab-item_3.entry.js +7 -7
  120. package/dist/esm/wm-tag-input.entry.js +4 -4
  121. package/dist/esm/wm-tag-option.entry.js +1 -1
  122. package/dist/esm/wm-textarea.entry.js +3 -3
  123. package/dist/esm/wm-timepicker.entry.js +3 -3
  124. package/dist/esm/wm-toggletip.entry.js +4 -4
  125. package/dist/esm/wm-uploader.entry.js +4 -4
  126. package/dist/esm-es5/app-globals-eba3c8fb.js +1 -0
  127. package/dist/esm-es5/{chartFunctions-ba9dc8bc.js → chartFunctions-4bc77b76.js} +1 -1
  128. package/dist/esm-es5/{functions-2c952c7e.js → functions-de887809.js} +1 -1
  129. package/dist/esm-es5/{intl-28a56253.js → intl-56b47a7b.js} +1 -1
  130. package/dist/esm-es5/loader.js +1 -1
  131. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  132. package/dist/esm-es5/priv-chart-popover-old.entry.js +1 -1
  133. package/dist/esm-es5/priv-chart-popover_2.entry.js +1 -1
  134. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  135. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  136. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  137. package/dist/esm-es5/ripple.js +1 -1
  138. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  139. package/dist/esm-es5/wm-button.entry.js +1 -1
  140. package/dist/esm-es5/wm-chart-bar.entry.js +1 -1
  141. package/dist/esm-es5/wm-chart-column.entry.js +1 -1
  142. package/dist/esm-es5/wm-chart.entry.js +1 -1
  143. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  144. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  145. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  146. package/dist/esm-es5/wm-file.entry.js +1 -1
  147. package/dist/esm-es5/wm-flyout.entry.js +1 -1
  148. package/dist/esm-es5/wm-input.entry.js +1 -1
  149. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  150. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  151. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  152. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  153. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  154. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  155. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  156. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  157. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  158. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  159. package/dist/esm-es5/wm-search.entry.js +1 -1
  160. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  161. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  162. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  163. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  164. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  165. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  166. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  167. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  168. package/dist/ripple/{p-4b1f77ac.entry.js → p-03a6850a.entry.js} +1 -1
  169. package/dist/ripple/{p-1827c07b.system.entry.js → p-0c3162d5.system.entry.js} +1 -1
  170. package/dist/ripple/{p-39c777f2.system.entry.js → p-0ec71f08.system.entry.js} +1 -1
  171. package/dist/ripple/{p-b47869f8.system.entry.js → p-1032c0db.system.entry.js} +1 -1
  172. package/dist/ripple/{p-aee33406.system.entry.js → p-13152ac1.system.entry.js} +1 -1
  173. package/dist/ripple/p-1318ae67.entry.js +1 -0
  174. package/dist/ripple/{p-6ec064ab.system.entry.js → p-137bf0c0.system.entry.js} +1 -1
  175. package/dist/ripple/{p-9a121a9f.entry.js → p-13bb6faf.entry.js} +1 -1
  176. package/dist/ripple/{p-a0f67c24.entry.js → p-16ff8110.entry.js} +1 -1
  177. package/dist/ripple/{p-1cf4994d.system.entry.js → p-1825d519.system.entry.js} +1 -1
  178. package/dist/ripple/{p-587c8c0b.entry.js → p-18417851.entry.js} +1 -1
  179. package/dist/ripple/p-1c655f6b.entry.js +1 -0
  180. package/dist/ripple/{p-3b335c30.system.entry.js → p-1ce77857.system.entry.js} +1 -1
  181. package/dist/ripple/{p-d8500a20.entry.js → p-1d76061a.entry.js} +1 -1
  182. package/dist/ripple/{p-6689ae84.system.entry.js → p-22b57f73.system.entry.js} +1 -1
  183. package/dist/ripple/{p-d4136c40.system.entry.js → p-24dfbf1d.system.entry.js} +1 -1
  184. package/dist/ripple/{p-2524203b.system.entry.js → p-28996d67.system.entry.js} +1 -1
  185. package/dist/ripple/{p-2e87a994.system.entry.js → p-30118d12.system.entry.js} +1 -1
  186. package/dist/ripple/{p-357b24b6.entry.js → p-32f3581a.entry.js} +1 -1
  187. package/dist/ripple/p-334d8711.system.js +1 -0
  188. package/dist/ripple/{p-640d450d.js → p-3c8c5933.js} +1 -1
  189. package/dist/ripple/{p-76646853.system.entry.js → p-436bf381.system.entry.js} +1 -1
  190. package/dist/ripple/{p-3fde7b17.system.entry.js → p-43843597.system.entry.js} +1 -1
  191. package/dist/ripple/{p-81eafe68.entry.js → p-48b596ae.entry.js} +1 -1
  192. package/dist/ripple/{p-c3710308.system.js → p-4bab5360.system.js} +1 -1
  193. package/dist/ripple/{p-bbaa0295.entry.js → p-4ff0db4d.entry.js} +1 -1
  194. package/dist/ripple/{p-c071456c.system.entry.js → p-57f1bafd.system.entry.js} +1 -1
  195. package/dist/ripple/{p-01055d26.entry.js → p-5b0e9165.entry.js} +1 -1
  196. package/dist/ripple/p-600b72ad.system.js +1 -0
  197. package/dist/ripple/{p-1a78f028.system.entry.js → p-6266fcbf.system.entry.js} +1 -1
  198. package/dist/ripple/{p-13730e2a.system.entry.js → p-646e22d3.system.entry.js} +1 -1
  199. package/dist/ripple/{p-7c5c3ec3.system.entry.js → p-6d2af8d9.system.entry.js} +1 -1
  200. package/dist/ripple/{p-ff2bf89a.system.entry.js → p-6d46f775.system.entry.js} +1 -1
  201. package/dist/ripple/{p-ca839c73.entry.js → p-6de0efee.entry.js} +1 -1
  202. package/dist/ripple/{p-2054d617.entry.js → p-7833db63.entry.js} +1 -1
  203. package/dist/ripple/p-7b7c32af.entry.js +1 -0
  204. package/dist/ripple/{p-ba6c13c7.entry.js → p-817aa29c.entry.js} +1 -1
  205. package/dist/ripple/{p-63c804c2.entry.js → p-82c9bd47.entry.js} +1 -1
  206. package/dist/ripple/{p-5bf97600.entry.js → p-8480138d.entry.js} +1 -1
  207. package/dist/ripple/{p-23750a8d.entry.js → p-85ef702d.entry.js} +1 -1
  208. package/dist/ripple/{p-e559b093.system.entry.js → p-86bcd942.system.entry.js} +1 -1
  209. package/dist/ripple/{p-f52ff657.entry.js → p-8799bce9.entry.js} +1 -1
  210. package/dist/ripple/{p-037e3c7a.entry.js → p-8dcc8c0c.entry.js} +1 -1
  211. package/dist/ripple/{p-8647ef67.entry.js → p-8fa572a8.entry.js} +1 -1
  212. package/dist/ripple/{p-18761ad7.js → p-904545cc.js} +1 -1
  213. package/dist/ripple/{p-57b566af.system.entry.js → p-90cb5d27.system.entry.js} +1 -1
  214. package/dist/ripple/p-9202ef69.system.entry.js +1 -0
  215. package/dist/ripple/{p-26b5b04e.system.entry.js → p-9f971522.system.entry.js} +1 -1
  216. package/dist/ripple/p-a235bc17.js +1 -0
  217. package/dist/ripple/{p-7851b16f.system.entry.js → p-a5dc49c1.system.entry.js} +1 -1
  218. package/dist/ripple/{p-fc9b09ba.system.entry.js → p-a73fb160.system.entry.js} +1 -1
  219. package/dist/ripple/{p-dcff6224.system.entry.js → p-a9580e7a.system.entry.js} +1 -1
  220. package/dist/ripple/p-b04a6351.entry.js +1 -0
  221. package/dist/ripple/{p-2fdaacf5.entry.js → p-b09998e1.entry.js} +1 -1
  222. package/dist/ripple/{p-c90dea3b.system.entry.js → p-b3a86ec4.system.entry.js} +1 -1
  223. package/dist/ripple/p-b501f06c.entry.js +1 -0
  224. package/dist/ripple/{p-1d528e60.entry.js → p-b957033b.entry.js} +1 -1
  225. package/dist/ripple/{p-f2f896b2.system.entry.js → p-ca3abcc0.system.entry.js} +1 -1
  226. package/dist/ripple/{p-a8b2b639.system.entry.js → p-cc455a6c.system.entry.js} +1 -1
  227. package/dist/ripple/{p-952f0628.entry.js → p-cdf9c0e9.entry.js} +1 -1
  228. package/dist/ripple/{p-81674b46.js → p-d4ae193e.js} +1 -1
  229. package/dist/ripple/{p-3a481357.system.js → p-d4d769a7.system.js} +1 -1
  230. package/dist/ripple/{p-eff5e623.system.entry.js → p-d6a9000f.system.entry.js} +1 -1
  231. package/dist/ripple/{p-6cdb2b26.entry.js → p-d6cd9f79.entry.js} +1 -1
  232. package/dist/ripple/{p-bfd74710.entry.js → p-d9e4335e.entry.js} +1 -1
  233. package/dist/ripple/{p-ef4e30c2.entry.js → p-dadf3ed3.entry.js} +1 -1
  234. package/dist/ripple/p-dc3684b5.entry.js +1 -0
  235. package/dist/ripple/{p-ae3aa9a6.entry.js → p-dca94e24.entry.js} +1 -1
  236. package/dist/ripple/{p-30ffd48a.system.entry.js → p-dcd6acc5.system.entry.js} +1 -1
  237. package/dist/ripple/{p-a0841eee.entry.js → p-dd81e308.entry.js} +1 -1
  238. package/dist/ripple/{p-e1ff0d63.system.entry.js → p-e11d9b06.system.entry.js} +1 -1
  239. package/dist/ripple/{p-7dc387b5.system.entry.js → p-e36e71dc.system.entry.js} +1 -1
  240. package/dist/ripple/{p-8634b2e1.entry.js → p-e6a81600.entry.js} +1 -1
  241. package/dist/ripple/{p-3b93eed7.system.entry.js → p-ef7d84da.system.entry.js} +1 -1
  242. package/dist/ripple/{p-118888bb.entry.js → p-f1de3153.entry.js} +1 -1
  243. package/dist/ripple/p-f3e84476.system.entry.js +1 -0
  244. package/dist/ripple/{p-3cd9160c.system.entry.js → p-f4d27fea.system.entry.js} +1 -1
  245. package/dist/ripple/p-fb062f04.system.js +1 -0
  246. package/dist/ripple/{p-1c08e803.system.entry.js → p-fcf4bd61.system.entry.js} +1 -1
  247. package/dist/ripple/{p-5af87cce.entry.js → p-fd02c124.entry.js} +1 -1
  248. package/dist/ripple/{p-097c7a49.entry.js → p-ffa20853.entry.js} +1 -1
  249. package/dist/ripple/ripple.esm.js +1 -1
  250. package/dist/ripple/ripple.js +1 -1
  251. package/dist/types/components/datepickers/wm-date-range.d.ts +13 -13
  252. package/dist/types/components/datepickers/wm-datepicker.d.ts +13 -12
  253. package/dist/types/global/functions.d.ts +0 -1
  254. package/package.json +2 -2
  255. package/dist/esm-es5/app-globals-b5a717cb.js +0 -1
  256. package/dist/ripple/p-001b65cb.system.js +0 -1
  257. package/dist/ripple/p-06ccdc10.entry.js +0 -1
  258. package/dist/ripple/p-0d882420.system.js +0 -1
  259. package/dist/ripple/p-0f86a48a.entry.js +0 -1
  260. package/dist/ripple/p-282564c9.entry.js +0 -1
  261. package/dist/ripple/p-5e285786.entry.js +0 -1
  262. package/dist/ripple/p-61d8d940.system.entry.js +0 -1
  263. package/dist/ripple/p-637bcbd6.system.js +0 -1
  264. package/dist/ripple/p-6b725bc9.entry.js +0 -1
  265. package/dist/ripple/p-8cf004ef.entry.js +0 -1
  266. package/dist/ripple/p-99baa733.system.entry.js +0 -1
  267. package/dist/ripple/p-9bd3eb06.js +0 -1
@@ -1 +1 @@
1
- import{h as t}from"./p-d0858afa.js";import{i as s,c as e,e as i,f as n}from"./p-640d450d.js";const a="#ff5f4e",r="#19a1a9",o="#088000",h="#2e1b46",c="#8b86ca",u="#575195",d="#6b6b6b",l={doughnut:{size:155,colors:[o,d],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[c,h,d],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[u,r,h,a,d],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[o,d],padding:0,category:"stackedBar"},bar2:{size:400,colors:[d,c,u,h,r,a],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",r,"#8e4129",a],padding:0,category:"stackedBar"},bar4:{size:400,colors:[a,r,u],padding:0,category:"stackedBar"},bar5:{size:400,colors:[d,c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[c],padding:0,category:"simpleBar"},bar7:{size:400,colors:[u,r,a,d],padding:0,category:"simpleBar"}};function f(t){return"percentage"===t||"amount"===t?"show-values":""}const p=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),g=s.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function b(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function m(t,s,e){return e?Math.round(100*t/s):Math.round(1e4*t/s)/100}function v(t,s){return 360*t/s}function x(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function w(t,s,e,i){var n=x(t+t*s*Math.cos(Math.PI*e/180)),a=x(t+t*s*Math.sin(Math.PI*e/180));return void 0!==i?{x1:n,y1:a,x2:x(t+t*s*Math.cos(Math.PI*i/180)),y2:x(t+t*s*Math.sin(Math.PI*i/180))}:{x:n,y:a}}function $(t,s,e,i,n){var a=x(n/2*t);return`A ${a}, ${a} 0 ${s} ${x(e)}, ${x(i)}`}function M(t){return Math.round(t/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(t))}function k(t,s){const e=t/s,i=10**Math.floor(Math.log10(e)),n=e/i;let a;return a=n>5?10*i:n>3?5*i:n>2?3*i:n>1.5?2*i:n>1?1.5*i:i,a}function y(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function z(t,s){this.popoverEl&&!this.isTabbing&&(this.componentWrapperEl.classList.toggle("interactive-popover",!!s.buttonText),s.coords={x:t.clientX,y:t.clientY},B(this.popoverEl,s),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function A(t,s){this.popoverEl&&this.isTabbing&&(this.componentWrapperEl.classList.toggle("interactive-popover",!!s.buttonText),this.focusedSliceId=s.id,s.coords=n(t.target),s.coords.x=s.coords.x+30,s.coords.y=s.coords.y+30,B(this.popoverEl,s),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function C(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,D.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,I.call(this);break;case"Tab":S.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function B(t,s){t.open=!1,s.title&&s.text&&(t.sliceDetails=Object.assign({},s),window.setTimeout((()=>t.open=!0),30))}function I(){const t=e(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;F.call(this,s)}function D(){if(this.sliceEls){const t=e(document.activeElement);let s=this.sliceEls.indexOf(t);-1===s?s=0:0===s?s=this.sliceEls.length-1:s-=1,F.call(this,s)}}function F(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.componentWrapperEl.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.sliceEls[t].tabIndex=0,this.sliceEls[t].focusable=!0,this.sliceEls[t].focus(),this.focusedSliceId=this.sliceEls[t].id,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}function S(){this.focusedSliceId=void 0,this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.componentWrapperEl.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1)}),100)}async function j(t){this.slicesDetails=[];let s=0;const e=Array.from(this.el.children);this.total=e.reduce(((t,s)=>t+parseInt(s.getAttribute("amount")||"0")),0);let i=[...l[t].colors];"bar2"===this.chartType&&(e.length<=5&&i.splice(1,1),e.length<=4&&i.splice(2,1)),"bar3"===t&&2===e.length&&(i=[i[1],i[3]]),"doughnut2"===t&&e.length<5&&(i.splice(2,1),e.length<4&&i.shift()),"bar5"!==t||this.notStartedColor||i.shift();let n=0;e.forEach(((e,a)=>{const r=e.getAttribute("amount");if(null==r)return;const o=parseInt(r||"0"),h=m(o,this.total,!0);let c=a;"bar6"===t&&(c=0);const u={amount:o,visualAmount:o,perc:h,legend:e.getAttribute("legend"),color:i[c]||d,offset:s,id:`${this.uid}-${n+1}`,title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:!1,index:n};s+=o,this.slicesDetails.push(u),n++}))}function K(t,s,e){const i=v(s,this.total)-90,n=t/this.total*360;let a=i+n;const r=n>180?"1 1":"0 1",o=n>180?"1 0":"0 0",h=this.chartDetails.size/2,c=this.chartDetails.thickness,u="doughnut"===e?2.25:3;360===n&&(a-=.01);const d=w(h,1,i+1.5,a),l=w(h,c,i+u,a);return`M ${d.x1}, ${d.y1} `+$(1,r,d.x2,d.y2,this.chartDetails.size)+` L ${l.x2}, ${l.y2} `+$(c,o,l.x1,l.y1,this.chartDetails.size)+" z"}function N(){const e=s.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return t("div",{id:"chart-instructions"},e)}function T(s){const e=this.chartDetails.size+this.chartDetails.padding,i="doughnut"===s;let n=i?this.slicesDetails:function(t,s){let e=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),i=0;return e.filter((t=>t.amount>0)).forEach(((t,n)=>{const a=e[n===e.length-1?0:n+1],r=m(e[0===n?e.length-1:n-1].amount,s,!0),o=m(a.amount,s,!0),h=0===t.perc?8:5;t.inSmallCluster=t.perc<4&&(r<h||o<h),t.offset=i,i+=t.amount})),e}(this.slicesDetails,this.total);n=function(t,s,e){const i=s.map((t=>v(t.amount,e)));if(i.some((t=>0!==t&&t<7))){const t=i.map((t=>0==t?t:Math.max(t,7))),n=t.reduce(((t,s)=>t+(s>7&&0!==s?s:0)),0),a=360-t.reduce(((t,s)=>t+(s>7&&0!==s?0:s)),0),r=(n-a)/a,o=t.map((t=>t>7?t-r*t:0==t?0:7));let h=0;s=s.map(((t,s)=>{const i=o[s]/360*e,n=h;return h+=i,Object.assign(Object.assign({},t),{visualAmount:i,offset:n})}))}return s}(0,n,this.total);const a=n[0].amount;let r=m(a,this.total,!0);return 0===r&&a>0?r="<1%":100===r&&a<this.total?r=">99%":r+="%",t("div",{class:"chart-wrapper doughnut-wrapper"},t("svg",{width:e+"px",height:e+"px",id:`graphic-${this.uid}`,class:"doughnut-svg"},t("defs",null,t("filter",{id:"wmHoverDropShadow"},t("feGaussianBlur",{stdDeviation:"3"}),t("feOffset",{result:"offsetblur"}),t("feFlood",{"flood-color":"#333"}),t("feComposite",{operator:"in",in2:"offsetblur"}),t("feMerge",null,t("feMergeNode",null),t("feMergeNode",{in:"SourceGraphic"})))),n.map((t=>W.call(this,t,s))),q.call(this),i?t("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},r):t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},n.map((t=>t.amount>0&&!t.inSmallCluster?E.call(this,t):"")))))}function H(t,s){t.forEach((t=>{t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==s.index?t.classList.add("faded"):t.classList.remove("faded")}))}function O(t){t.forEach((t=>{t.classList.remove("faded")}))}function W(s,e){const i=m(s.amount,this.total,!0)+"%";return!isNaN(s.amount)&&t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.visualAmount?s.color:"transparent",d:K.call(this,s.visualAmount,s.offset,e),onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),role:"img","aria-label":`${s.legend}, ${i}`,"data-segmentindex":s.index}))}function q(){return this.isTabbing?t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("use",{tabindex:-1,id:"kfbg1",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfstroke",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfbg2",xlinkHref:`#${this.focusedSliceId}`})):""}function E(s){const e=v(s.offset+s.visualAmount/2,this.total);let i,{x:n,y:a}=w(this.chartDetails.size/2,1.4,e-90);return i=0===s.perc&&s.amount>0?"<1%":100===s.perc&&s.amount<this.total?">99%":s.perc+"%",t("text",{class:"value",x:n+"px",y:a+"px","data-segmentindex":s.index},i)}function G(s){const e="bar"===s,i=this.el.shadowRoot.querySelectorAll(".value");return i.length>0&&requestAnimationFrame((()=>{let t=[],s=!1;i.forEach((e=>{e.classList.remove("hidden");const i=parseInt(e.dataset.value);if(t.length>0&&0!=i){const n=e.getBoundingClientRect().left-4;t.forEach((t=>{const a=parseInt(t.dataset.value);t.getBoundingClientRect().right>n&&((i<a?e:t).classList.add("hidden"),s=!0)}))}!e.classList.contains("hidden")&&i>0&&t.push(e)})),(this.isBar||this.isDoughnut)&&this.showHiddenValuesMessage(s)})),t("div",{class:"chart-wrapper bar-wrapper"},e?t("div",{class:"single-perc"},m(this.slicesDetails[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:`inner-stacked-bar-wrapper ${f(this.valueFormat)}`},e?"":t("div",{class:`values ${this.valueFormat}`},this.slicesDetails.map((t=>this.renderBarText(t,5)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((t=>L.call(this,t,5)))),e?P.call(this):""),"bar3"===this.chartType?t("div",{class:"bar3-axis-label","aria-hidden":"true"},t("span",null,"0%"),t("span",null,"100%")):"")}function L(s,e){const i=m(s.amount,this.total,!1),n=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper"),a=i/100*(n?n.offsetWidth:this.el.offsetWidth)>=e,r=a||0==s.amount?`${i}%`:`${e}px`;let o="";return"percentage"==this.valueFormat?o=`${m(s.amount,this.total,!0)} %`:"amount"==this.valueFormat&&(o=s.amount.toString()),t("div",{class:`segment stacked-bar-segment ${0===m(s.amount,this.total,!1)?"zero":""} ${a?"":"fixed-width"}`,style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("span",{class:"sr-only"},`${s.legend} ${o}`))}function R(s){const e=this.slicesDetails.map((t=>t.amount)).reduce(((t,s)=>t>s?t:s)),n=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);let a=M(this.el.getBoundingClientRect().width-n-48),r=k(e,a);const o=Math.floor((a*r-e)/r);a-=o,this.el.style.setProperty("--backgroundSize",100/a+"%"),this.el.style.setProperty("--labelWidth",this.labelWidth),"bar7"!==s||this.showBarLegend||this.el.style.setProperty("--labelWidth","0px");const h=[];this.slicesDetails.forEach((i=>{i.legend&&h.push(function(s,e,i){return t("label",{class:`label${"bar7"!==i||e?"":" hidden"}`},s)}(i.legend,this.showBarLegend,s)),h.push(U.call(this,i,r,a,e))}));const c=[];for(let s=1;s<=a;s++){const e=b(i(s,r));c.push(t("div",{class:"tick"},t("span",null,e)))}const u="bar6"===s&&this.showGrid&&this.el.getBoundingClientRect().width>300;return t("div",{class:"chart-wrapper simple-bar-wrapper"},t("div",{class:`chart ${f(this.valueFormat)}`},u&&t("div",{class:"gridlines"}),t("div",{class:"rows"},h)),u&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),c))}function U(s,e,i,n){const a=m(s.amount,"bar6"===this.currentChartType?e*i:n,!1),r=a?a+"%":"1px",o=b(s.amount);let h="amount"===this.valueFormat?o:"";return"bar6"===this.currentChartType&&"percentage"===this.valueFormat?h=s.amount+"%":"bar7"===this.currentChartType&&"percentage"===this.valueFormat&&(h=(0===this.total?"0":m(s.amount,this.total,!0))+"%"),t("div",{class:"bar segment",style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const e=this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return this.isDoughnut&&this.showHiddenValuesMessage(e),t("div",{class:"legend-wrapper"},t("div",{class:`legend ${s} ${"bar"===this.mode?"--top":"--bottom"}`,"aria-hidden":"true"},this.slicesDetails.map((t=>{const s="amount"==this.printModeFormat?`${t.amount}/${this.total}`:`${m(t.amount,this.total,!0)}%`;if(t.amount||t.legend)return J.call(this,{key:t.legend,color:t.color},s,t)}))),this.isDoughnut&&!this.printMode&&Q())}}function J(s,e="",i=null){const n=t=>{i&&(i.coords={x:t.clientX,y:t.clientY},B(this.popoverEl,i),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),i))};return t("div",{class:"legend-item",onClick:t=>n(t),"data-segmentindex":i?i.index:null},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key,e&&t("span",{class:"print-value "+(this.printMode?"force-visible":"")},": ",e)))}function P(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function Q(){return t("div",{class:"hidden-values-warning hidden"},p,t("br",null),g)}function X(t,s,e,i=0){switch(e){case"amount":return t.toFixed(i);case"percentage":const e=t/s*100;return t>0&&e<1?"<1%":e>99&&t!==s?">99%":`${Math.round(e).toFixed(0)}%`;default:return""}}function Y(t,s=[1,1.5,2,2.5,3,5,10]){const e=t/Math.pow(10,Math.floor(Math.log10(t)));return s.some((t=>Math.abs(e-t)<1e-4))}function Z(t){if(0===t||!Number.isFinite(t))return 0;let s=Math.abs(t);for(let t=0;t<=15;t++){const e=Math.round(s),i=1e-9;if(Math.abs(s-e)<i)return t;s*=10}return 2}function _(t){if(0===t||!Number.isFinite(t))return 0;const s=Math.abs(t);let e=s;return s>=1e6?e=s/1e6:s>=1e3&&(e=s/1e3),Math.max(Z(s),Z(e))}function tt(t,s){const e=void 0!==s;if(t>=1e6){const i=t/1e6;return e?`${i.toFixed(s)}M`:`${i.toFixed(t%1e6==0?0:1)}M`}if(t>=1e3){const i=t/1e3;return e?`${i.toFixed(s)}K`:`${i.toFixed(t%1e3==0?0:1)}K`}return e?t.toFixed(s):t.toString()}function st(t,s){for(let e=t;e>=1;e--){const t=s/e;if(Y(t))return{numIntervals:e,interval:t}}return{numIntervals:1,interval:s}}function et(t){if(t<=0)return 0;const s=[1,1.5,2,2.5,3,5,10],e=Math.pow(10,Math.floor(Math.log10(t))),i=t/e;for(const t of s)if(t>=i)return t*e;return 10*e}function it(t){const s=new Set,e=[];return t.forEach((t=>{t.forEach((t=>{s.has(t.barLegend)||(s.add(t.barLegend),e.push(t))}))})),e}function nt(t,s){const e=new Map;return t.forEach((t=>{let i=t.groupName;i||(i=s),e.has(i)||e.set(i,[]),e.get(i).push(t)})),e}function at(t){const s=[...t],e=[];s.forEach((t=>{t.groupName&&!e.includes(t.groupName)&&e.push(t.groupName)}));const i=s.filter((t=>t.groupName===e[0])).map((t=>t.barLegend));return s.sort(((t,s)=>{const n=e.indexOf(t.groupName||""),a=e.indexOf(s.groupName||"");return n!==a?n-a:i.indexOf(t.barLegend)-i.indexOf(s.barLegend)}))}export{l as a,R as b,G as c,T as d,N as e,V as f,j as g,C as h,Q as i,S as j,m as k,P as l,J as m,et as n,nt as o,it as p,X as q,O as r,at as s,st as t,tt as u,M as v,_ as w,k as x}
1
+ import{h as t}from"./p-d0858afa.js";import{i as s,c as e,e as i,f as n}from"./p-3c8c5933.js";const a="#ff5f4e",r="#19a1a9",o="#088000",h="#2e1b46",c="#8b86ca",u="#575195",d="#6b6b6b",l={doughnut:{size:155,colors:[o,d],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[c,h,d],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[u,r,h,a,d],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[o,d],padding:0,category:"stackedBar"},bar2:{size:400,colors:[d,c,u,h,r,a],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",r,"#8e4129",a],padding:0,category:"stackedBar"},bar4:{size:400,colors:[a,r,u],padding:0,category:"stackedBar"},bar5:{size:400,colors:[d,c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[c],padding:0,category:"simpleBar"},bar7:{size:400,colors:[u,r,a,d],padding:0,category:"simpleBar"}};function f(t){return"percentage"===t||"amount"===t?"show-values":""}const p=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),g=s.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function b(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function m(t,s,e){return e?Math.round(100*t/s):Math.round(1e4*t/s)/100}function v(t,s){return 360*t/s}function x(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function w(t,s,e,i){var n=x(t+t*s*Math.cos(Math.PI*e/180)),a=x(t+t*s*Math.sin(Math.PI*e/180));return void 0!==i?{x1:n,y1:a,x2:x(t+t*s*Math.cos(Math.PI*i/180)),y2:x(t+t*s*Math.sin(Math.PI*i/180))}:{x:n,y:a}}function $(t,s,e,i,n){var a=x(n/2*t);return`A ${a}, ${a} 0 ${s} ${x(e)}, ${x(i)}`}function M(t){return Math.round(t/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(t))}function k(t,s){const e=t/s,i=10**Math.floor(Math.log10(e)),n=e/i;let a;return a=n>5?10*i:n>3?5*i:n>2?3*i:n>1.5?2*i:n>1?1.5*i:i,a}function y(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function z(t,s){this.popoverEl&&!this.isTabbing&&(this.componentWrapperEl.classList.toggle("interactive-popover",!!s.buttonText),s.coords={x:t.clientX,y:t.clientY},B(this.popoverEl,s),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function A(t,s){this.popoverEl&&this.isTabbing&&(this.componentWrapperEl.classList.toggle("interactive-popover",!!s.buttonText),this.focusedSliceId=s.id,s.coords=n(t.target),s.coords.x=s.coords.x+30,s.coords.y=s.coords.y+30,B(this.popoverEl,s),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function C(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,D.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,I.call(this);break;case"Tab":S.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function B(t,s){t.open=!1,s.title&&s.text&&(t.sliceDetails=Object.assign({},s),window.setTimeout((()=>t.open=!0),30))}function I(){const t=e(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;F.call(this,s)}function D(){if(this.sliceEls){const t=e(document.activeElement);let s=this.sliceEls.indexOf(t);-1===s?s=0:0===s?s=this.sliceEls.length-1:s-=1,F.call(this,s)}}function F(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.componentWrapperEl.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.sliceEls[t].tabIndex=0,this.sliceEls[t].focusable=!0,this.sliceEls[t].focus(),this.focusedSliceId=this.sliceEls[t].id,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}function S(){this.focusedSliceId=void 0,this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.componentWrapperEl.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1)}),100)}async function j(t){this.slicesDetails=[];let s=0;const e=Array.from(this.el.children);this.total=e.reduce(((t,s)=>t+parseInt(s.getAttribute("amount")||"0")),0);let i=[...l[t].colors];"bar2"===this.chartType&&(e.length<=5&&i.splice(1,1),e.length<=4&&i.splice(2,1)),"bar3"===t&&2===e.length&&(i=[i[1],i[3]]),"doughnut2"===t&&e.length<5&&(i.splice(2,1),e.length<4&&i.shift()),"bar5"!==t||this.notStartedColor||i.shift();let n=0;e.forEach(((e,a)=>{const r=e.getAttribute("amount");if(null==r)return;const o=parseInt(r||"0"),h=m(o,this.total,!0);let c=a;"bar6"===t&&(c=0);const u={amount:o,visualAmount:o,perc:h,legend:e.getAttribute("legend"),color:i[c]||d,offset:s,id:`${this.uid}-${n+1}`,title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:!1,index:n};s+=o,this.slicesDetails.push(u),n++}))}function K(t,s,e){const i=v(s,this.total)-90,n=t/this.total*360;let a=i+n;const r=n>180?"1 1":"0 1",o=n>180?"1 0":"0 0",h=this.chartDetails.size/2,c=this.chartDetails.thickness,u="doughnut"===e?2.25:3;360===n&&(a-=.01);const d=w(h,1,i+1.5,a),l=w(h,c,i+u,a);return`M ${d.x1}, ${d.y1} `+$(1,r,d.x2,d.y2,this.chartDetails.size)+` L ${l.x2}, ${l.y2} `+$(c,o,l.x1,l.y1,this.chartDetails.size)+" z"}function N(){const e=s.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return t("div",{id:"chart-instructions"},e)}function T(s){const e=this.chartDetails.size+this.chartDetails.padding,i="doughnut"===s;let n=i?this.slicesDetails:function(t,s){let e=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),i=0;return e.filter((t=>t.amount>0)).forEach(((t,n)=>{const a=e[n===e.length-1?0:n+1],r=m(e[0===n?e.length-1:n-1].amount,s,!0),o=m(a.amount,s,!0),h=0===t.perc?8:5;t.inSmallCluster=t.perc<4&&(r<h||o<h),t.offset=i,i+=t.amount})),e}(this.slicesDetails,this.total);n=function(t,s,e){const i=s.map((t=>v(t.amount,e)));if(i.some((t=>0!==t&&t<7))){const t=i.map((t=>0==t?t:Math.max(t,7))),n=t.reduce(((t,s)=>t+(s>7&&0!==s?s:0)),0),a=360-t.reduce(((t,s)=>t+(s>7&&0!==s?0:s)),0),r=(n-a)/a,o=t.map((t=>t>7?t-r*t:0==t?0:7));let h=0;s=s.map(((t,s)=>{const i=o[s]/360*e,n=h;return h+=i,Object.assign(Object.assign({},t),{visualAmount:i,offset:n})}))}return s}(0,n,this.total);const a=n[0].amount;let r=m(a,this.total,!0);return 0===r&&a>0?r="<1%":100===r&&a<this.total?r=">99%":r+="%",t("div",{class:"chart-wrapper doughnut-wrapper"},t("svg",{width:e+"px",height:e+"px",id:`graphic-${this.uid}`,class:"doughnut-svg"},t("defs",null,t("filter",{id:"wmHoverDropShadow"},t("feGaussianBlur",{stdDeviation:"3"}),t("feOffset",{result:"offsetblur"}),t("feFlood",{"flood-color":"#333"}),t("feComposite",{operator:"in",in2:"offsetblur"}),t("feMerge",null,t("feMergeNode",null),t("feMergeNode",{in:"SourceGraphic"})))),n.map((t=>W.call(this,t,s))),q.call(this),i?t("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},r):t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},n.map((t=>t.amount>0&&!t.inSmallCluster?E.call(this,t):"")))))}function H(t,s){t.forEach((t=>{t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==s.index?t.classList.add("faded"):t.classList.remove("faded")}))}function O(t){t.forEach((t=>{t.classList.remove("faded")}))}function W(s,e){const i=m(s.amount,this.total,!0)+"%";return!isNaN(s.amount)&&t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.visualAmount?s.color:"transparent",d:K.call(this,s.visualAmount,s.offset,e),onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),role:"img","aria-label":`${s.legend}, ${i}`,"data-segmentindex":s.index}))}function q(){return this.isTabbing?t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("use",{tabindex:-1,id:"kfbg1",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfstroke",xlinkHref:`#${this.focusedSliceId}`}),t("use",{tabindex:-1,id:"kfbg2",xlinkHref:`#${this.focusedSliceId}`})):""}function E(s){const e=v(s.offset+s.visualAmount/2,this.total);let i,{x:n,y:a}=w(this.chartDetails.size/2,1.4,e-90);return i=0===s.perc&&s.amount>0?"<1%":100===s.perc&&s.amount<this.total?">99%":s.perc+"%",t("text",{class:"value",x:n+"px",y:a+"px","data-segmentindex":s.index},i)}function G(s){const e="bar"===s,i=this.el.shadowRoot.querySelectorAll(".value");return i.length>0&&requestAnimationFrame((()=>{let t=[],s=!1;i.forEach((e=>{e.classList.remove("hidden");const i=parseInt(e.dataset.value);if(t.length>0&&0!=i){const n=e.getBoundingClientRect().left-4;t.forEach((t=>{const a=parseInt(t.dataset.value);t.getBoundingClientRect().right>n&&((i<a?e:t).classList.add("hidden"),s=!0)}))}!e.classList.contains("hidden")&&i>0&&t.push(e)})),(this.isBar||this.isDoughnut)&&this.showHiddenValuesMessage(s)})),t("div",{class:"chart-wrapper bar-wrapper"},e?t("div",{class:"single-perc"},m(this.slicesDetails[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:`inner-stacked-bar-wrapper ${f(this.valueFormat)}`},e?"":t("div",{class:`values ${this.valueFormat}`},this.slicesDetails.map((t=>this.renderBarText(t,5)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((t=>L.call(this,t,5)))),e?P.call(this):""),"bar3"===this.chartType?t("div",{class:"bar3-axis-label","aria-hidden":"true"},t("span",null,"0%"),t("span",null,"100%")):"")}function L(s,e){const i=m(s.amount,this.total,!1),n=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper"),a=i/100*(n?n.offsetWidth:this.el.offsetWidth)>=e,r=a||0==s.amount?`${i}%`:`${e}px`;let o="";return"percentage"==this.valueFormat?o=`${m(s.amount,this.total,!0)} %`:"amount"==this.valueFormat&&(o=s.amount.toString()),t("div",{class:`segment stacked-bar-segment ${0===m(s.amount,this.total,!1)?"zero":""} ${a?"":"fixed-width"}`,style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("span",{class:"sr-only"},`${s.legend} ${o}`))}function R(s){const e=this.slicesDetails.map((t=>t.amount)).reduce(((t,s)=>t>s?t:s)),n=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);let a=M(this.el.getBoundingClientRect().width-n-48),r=k(e,a);const o=Math.floor((a*r-e)/r);a-=o,this.el.style.setProperty("--backgroundSize",100/a+"%"),this.el.style.setProperty("--labelWidth",this.labelWidth),"bar7"!==s||this.showBarLegend||this.el.style.setProperty("--labelWidth","0px");const h=[];this.slicesDetails.forEach((i=>{i.legend&&h.push(function(s,e,i){return t("label",{class:`label${"bar7"!==i||e?"":" hidden"}`},s)}(i.legend,this.showBarLegend,s)),h.push(U.call(this,i,r,a,e))}));const c=[];for(let s=1;s<=a;s++){const e=b(i(s,r));c.push(t("div",{class:"tick"},t("span",null,e)))}const u="bar6"===s&&this.showGrid&&this.el.getBoundingClientRect().width>300;return t("div",{class:"chart-wrapper simple-bar-wrapper"},t("div",{class:`chart ${f(this.valueFormat)}`},u&&t("div",{class:"gridlines"}),t("div",{class:"rows"},h)),u&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),c))}function U(s,e,i,n){const a=m(s.amount,"bar6"===this.currentChartType?e*i:n,!1),r=a?a+"%":"1px",o=b(s.amount);let h="amount"===this.valueFormat?o:"";return"bar6"===this.currentChartType&&"percentage"===this.valueFormat?h=s.amount+"%":"bar7"===this.currentChartType&&"percentage"===this.valueFormat&&(h=(0===this.total?"0":m(s.amount,this.total,!0))+"%"),t("div",{class:"bar segment",style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>A.call(this,t,s),onKeyDown:t=>y.call(this,t),"data-segmentindex":s.index},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const e=this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return this.isDoughnut&&this.showHiddenValuesMessage(e),t("div",{class:"legend-wrapper"},t("div",{class:`legend ${s} ${"bar"===this.mode?"--top":"--bottom"}`,"aria-hidden":"true"},this.slicesDetails.map((t=>{const s="amount"==this.printModeFormat?`${t.amount}/${this.total}`:`${m(t.amount,this.total,!0)}%`;if(t.amount||t.legend)return J.call(this,{key:t.legend,color:t.color},s,t)}))),this.isDoughnut&&!this.printMode&&Q())}}function J(s,e="",i=null){const n=t=>{i&&(i.coords={x:t.clientX,y:t.clientY},B(this.popoverEl,i),H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),i))};return t("div",{class:"legend-item",onClick:t=>n(t),"data-segmentindex":i?i.index:null},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key,e&&t("span",{class:"print-value "+(this.printMode?"force-visible":"")},": ",e)))}function P(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function Q(){return t("div",{class:"hidden-values-warning hidden"},p,t("br",null),g)}function X(t,s,e,i=0){switch(e){case"amount":return t.toFixed(i);case"percentage":const e=t/s*100;return t>0&&e<1?"<1%":e>99&&t!==s?">99%":`${Math.round(e).toFixed(0)}%`;default:return""}}function Y(t,s=[1,1.5,2,2.5,3,5,10]){const e=t/Math.pow(10,Math.floor(Math.log10(t)));return s.some((t=>Math.abs(e-t)<1e-4))}function Z(t){if(0===t||!Number.isFinite(t))return 0;let s=Math.abs(t);for(let t=0;t<=15;t++){const e=Math.round(s),i=1e-9;if(Math.abs(s-e)<i)return t;s*=10}return 2}function _(t){if(0===t||!Number.isFinite(t))return 0;const s=Math.abs(t);let e=s;return s>=1e6?e=s/1e6:s>=1e3&&(e=s/1e3),Math.max(Z(s),Z(e))}function tt(t,s){const e=void 0!==s;if(t>=1e6){const i=t/1e6;return e?`${i.toFixed(s)}M`:`${i.toFixed(t%1e6==0?0:1)}M`}if(t>=1e3){const i=t/1e3;return e?`${i.toFixed(s)}K`:`${i.toFixed(t%1e3==0?0:1)}K`}return e?t.toFixed(s):t.toString()}function st(t,s){for(let e=t;e>=1;e--){const t=s/e;if(Y(t))return{numIntervals:e,interval:t}}return{numIntervals:1,interval:s}}function et(t){if(t<=0)return 0;const s=[1,1.5,2,2.5,3,5,10],e=Math.pow(10,Math.floor(Math.log10(t))),i=t/e;for(const t of s)if(t>=i)return t*e;return 10*e}function it(t){const s=new Set,e=[];return t.forEach((t=>{t.forEach((t=>{s.has(t.barLegend)||(s.add(t.barLegend),e.push(t))}))})),e}function nt(t,s){const e=new Map;return t.forEach((t=>{let i=t.groupName;i||(i=s),e.has(i)||e.set(i,[]),e.get(i).push(t)})),e}function at(t){const s=[...t],e=[];s.forEach((t=>{t.groupName&&!e.includes(t.groupName)&&e.push(t.groupName)}));const i=s.filter((t=>t.groupName===e[0])).map((t=>t.barLegend));return s.sort(((t,s)=>{const n=e.indexOf(t.groupName||""),a=e.indexOf(s.groupName||"");return n!==a?n-a:i.indexOf(t.barLegend)-i.indexOf(s.barLegend)}))}export{l as a,R as b,G as c,T as d,N as e,V as f,j as g,C as h,Q as i,S as j,m as k,P as l,J as m,et as n,nt as o,it as p,X as q,O as r,at as s,st as t,tt as u,M as v,_ as w,k as x}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{o(n.next(t))}catch(t){a(t)}}function u(t){try{o(n["throw"](t))}catch(t){a(t)}}function o(t){t.done?e(t.value):i(t.value).then(s,u)}o((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(r){return o([t,r])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;i=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=r.call(t,e)}catch(t){u=[6,t];i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-117c3d78.system.js","./p-0d882420.system.js"],(function(t){"use strict";var r,e,n,i,a;return{setters:[function(t){r=t.h},function(t){e=t.i;n=t.c;i=t.e;a=t.f}],execute:function(){t({b:R,c:q,d:N,e:T,f:P,g:I,h:A,i:X,j:B,k:v,l:Q,m:J,n:nt,o:at,p:it,q:Y,r:O,s:st,t:et,u:rt,v:w,w:tt,x:y});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var u=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.periwinkle,s.cyan,s.midnight,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.lavender,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function o(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var f=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function h(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function v(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function d(t,r){return t*360/r}function l(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function p(t,r,e,n){var i=l(t+t*r*Math.cos(Math.PI*e/180));var a=l(t+t*r*Math.sin(Math.PI*e/180));if(n!==undefined){var s=l(t+t*r*Math.cos(Math.PI*n/180));var u=l(t+t*r*Math.sin(Math.PI*n/180));return{x1:i,y1:a,x2:s,y2:u}}return{x:i,y:a}}function g(t,r,e,n,i){var a=l(i/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(l(e),", ").concat(l(n))}function b(t,r,e,n,i){var a=(t-r)*(i-n)/(e-r)+n;return a<n?n:a>i?i:a}function m(t){return b(t,300,900,70,150)}function w(t){return Math.round(t/m(t))}function y(t,r){var e=t/r;var n=Math.pow(10,Math.floor(Math.log10(e)));var i=e/n;var a;if(i>5){a=10*n}else if(i>3){a=5*n}else if(i>2){a=3*n}else if(i>1.5){a=2*n}else if(i>1){a=1.5*n}else{a=n}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){this.componentWrapperEl.classList.toggle("interactive-popover",!!r.buttonText);r.coords={x:t.clientX,y:t.clientY};z(this.popoverEl,r);H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.componentWrapperEl.classList.toggle("interactive-popover",!!r.buttonText);this.focusedSliceId=r.id;r.coords=a(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;z(this.popoverEl,r);H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function A(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":B.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function z(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=n(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,r)}function C(){if(this.sliceEls){var t=n(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}S.call(this,r)}}function S(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function B(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function I(t){return __awaiter(this,void 0,void 0,(function(){var r,e,n,i;var a=this;return __generator(this,(function(o){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){var e=parseInt(r.getAttribute("amount")||"0");return t+e}),0);n=__spreadArray([],u[t].colors,true);if(this.chartType==="bar2"){if(e.length<=5){n.splice(1,1)}if(e.length<=4){n.splice(2,1)}}if(t==="bar3"&&e.length===2){n=[n[1],n[3]]}if(t==="doughnut2"&&e.length<5){n.splice(2,1);if(e.length<4){n.shift()}}if(t==="bar5"&&!this.notStartedColor){n.shift()}i=0;e.forEach((function(e,u){var o=e.getAttribute("amount");if(o==null)return;var c=parseInt(o||"0");var f=v(c,a.total,true);var h=u;if(t==="bar6"){h=0}var d={amount:c,visualAmount:c,perc:f,legend:e.getAttribute("legend"),color:n[h]||s.gray,offset:r,id:"".concat(a.uid,"-").concat(i+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:i};r+=c;a.slicesDetails.push(d);i++}));return[2]}))}))}function D(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var n=0;e.filter((function(t){return t.amount>0})).forEach((function(t,i){var a=e[i===0?e.length-1:i-1];var s=e[i===e.length-1?0:i+1];var u=v(a.amount,r,true);var o=v(s.amount,r,true);var c=t.perc===0?8:5;var f=t.perc<4;var h=u<c;var d=o<c;var l=f&&(h||d);t.inSmallCluster=l;t.offset=n;n+=t.amount}));return e}function F(t,r,e){var n=d(r,this.total)-90;var i=t/this.total*360;var a=n+i;var s=i>180?"1 1":"0 1";var u=i>180?"1 0":"0 0";var o=this.chartDetails.size/2;var c=this.chartDetails.thickness;var f=1;var h=e==="doughnut";var v=1.5;var l=h?2.25:3;if(i===360){a-=.01}var b=p(o,f,n+v,a);var m=p(o,c,n+l,a);var w="M ".concat(b.x1,", ").concat(b.y1," ");var y=g(f,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=g(c,u,m.x1,m.y1,this.chartDetails.size);return w+y+x+k+" z"}function T(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function j(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function K(t,r,e){var n=r.map((function(t){return d(t.amount,e)}));var i=n.some((function(r){return r!==0&&r<t}));if(i){var a=n.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var u=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var o=360-u;var c=s-o;var f=c/o;var h=a.map((function(r){return r>t?r-f*r:r==0?0:t}));var v=0;r=r.map((function(t,r){var n=h[r]/360*e;var i=v;v+=n;return Object.assign(Object.assign({},t),{visualAmount:n,offset:i})}))}return r}function N(t){var e=this;var n=this.chartDetails.size+this.chartDetails.padding;var i=t==="doughnut";var a=i?this.slicesDetails:D(this.slicesDetails,this.total);a=K(7,a,this.total);var s=a[0].amount;var u=v(s,this.total,true);if(u===0&&s>0){u="<1%"}else if(u===100&&s<this.total){u=">99%"}else{u=u+"%"}return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:n+"px",height:n+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},j(),a.map((function(r){return E.call(e,r,t)})),G.call(this),i?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},u):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?W.call(e,t):""})))))}function H(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function O(t){t.forEach((function(t){t.classList.remove("faded")}))}function E(t,e){var n=this;var i=v(t.amount,this.total,true)+"%";return!isNaN(t.amount)&&r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.visualAmount?t.color:"transparent",d:F.call(this,t.visualAmount,t.offset,e),onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(i),"data-segmentindex":t.index}))}function G(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function W(t){var e=d(t.offset+t.visualAmount/2,this.total);var n=p(this.chartDetails.size/2,1.4,e-90),i=n.x,a=n.y;var s;if(t.perc===0&&t.amount>0){s="<1%"}else if(t.perc===100&&t.amount<this.total){s=">99%"}else{s=t.perc+"%"}return r("text",{class:"value",x:i+"px",y:a+"px","data-segmentindex":t.index},s)}function q(t){var e=this;var n=t==="bar";var i=this.el.shadowRoot.querySelectorAll(".value");if(i.length>0){requestAnimationFrame((function(){var t=[];var r=4;var n=false;i.forEach((function(e){e.classList.remove("hidden");var i=parseInt(e.dataset.value);if(t.length>0&&i!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var u=i<r?e:t;u.classList.add("hidden");n=true}}))}if(!e.classList.contains("hidden")&&i>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(n)}))}return r("div",{class:"chart-wrapper bar-wrapper"},n?r("div",{class:"single-perc"},v(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(o(this.valueFormat))},!n?r("div",{class:"values ".concat(this.valueFormat)},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return L.call(e,t,5)}))),n?Q.call(this):""),this.chartType==="bar3"?r("div",{class:"bar3-axis-label","aria-hidden":"true"},r("span",null,"0%"),r("span",null,"100%")):"")}function L(t,e){var n=this;var i=v(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var u=i/100*s>=e;var o=u||t.amount==0?"".concat(i,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(v(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(v(t.amount,this.total,false)===0?"zero":""," ").concat(u?"":"fixed-width"),style:{backgroundColor:t.color,width:o},onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function R(t){var e=this;var n=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var u=this.el.getBoundingClientRect().width;var c=u-a-s;var f=w(c);var v=y(n,f);var d=f*v;var l=Math.floor((d-n)/v);f-=l;this.el.style.setProperty("--backgroundSize",100/f+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var p=[];this.slicesDetails.forEach((function(r){r.legend&&p.push(U(r.legend,e.showBarLegend,t));p.push(V.call(e,r,v,f,n))}));var g=[];for(var b=1;b<=f;b++){var m=h(i(b,v));g.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(o(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},p)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),g))}function U(t,e,n){var i=n==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(i)},t)}function V(t,e,n,i){var a=this;var s=this.currentChartType==="bar6"?e*n:i;var u=v(t.amount,s,false);var o=u?u+"%":"1px";var c=h(t.amount);var f=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){f=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){f=(this.total===0?"0":v(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:o},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},f))}function P(t){var e=this;if(this.showLegend){var n=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(n);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(v(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,n){var i=this;if(e===void 0){e=""}if(n===void 0){n=null}var a=function(t){if(n){n.coords={x:t.clientX,y:t.clientY};z(i.popoverEl,n);H(Array.from(i.el.shadowRoot.querySelectorAll("[data-segmentindex")),n)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":n?n.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),f)}function Y(t,r,e,n){if(n===void 0){n=0}switch(e){case"amount":return t.toFixed(n);case"percentage":var i=t/r*100;if(t>0&&i<1)return"<1%";if(i>99&&t!==r)return">99%";return"".concat(Math.round(i).toFixed(0),"%");default:case"none":return""}}function Z(t,r){if(r===void 0){r=[1,1.5,2,2.5,3,5,10]}var e=Math.pow(10,Math.floor(Math.log10(t)));var n=t/e;var i=r.some((function(t){return Math.abs(n-t)<1e-4}));return i}function $(t){if(t===0||!Number.isFinite(t))return 0;var r=15;var e=Math.abs(t);for(var n=0;n<=r;n++){var i=Math.round(e);var a=1e-9;if(Math.abs(e-i)<a){return n}e*=10}return 2}function tt(t){if(t===0||!Number.isFinite(t))return 0;var r=Math.abs(t);var e=r;if(r>=1e6){e=r/1e6}else if(r>=1e3){e=r/1e3}return Math.max($(r),$(e))}function rt(t,r){var e=r!==undefined;if(t>=1e6){var n=t/1e6;if(e){return"".concat(n.toFixed(r),"M")}return"".concat(n.toFixed(t%1e6===0?0:1),"M")}if(t>=1e3){var n=t/1e3;if(e){return"".concat(n.toFixed(r),"K")}return"".concat(n.toFixed(t%1e3===0?0:1),"K")}if(e){return t.toFixed(r)}return t.toString()}function et(t,r){for(var e=t;e>=1;e--){var n=r/e;if(Z(n)){return{numIntervals:e,interval:n}}}return{numIntervals:1,interval:r}}function nt(t){if(t<=0)return 0;var r=[1,1.5,2,2.5,3,5,10];var e=Math.pow(10,Math.floor(Math.log10(t)));var n=t/e;for(var i=0,a=r;i<a.length;i++){var s=a[i];if(s>=n){return s*e}}return 10*e}function it(t){var r=new Set;var e=[];t.forEach((function(t){t.forEach((function(t){if(!r.has(t.barLegend)){r.add(t.barLegend);e.push(t)}}))}));return e}function at(t,r){var e=new Map;t.forEach((function(t){var n=t.groupName;if(!n){n=r}if(!e.has(n)){e.set(n,[])}e.get(n).push(t)}));return e}function st(t){var r=__spreadArray([],t,true);var e=[];r.forEach((function(t){if(t.groupName&&!e.includes(t.groupName)){e.push(t.groupName)}}));var n=r.filter((function(t){return t.groupName===e[0]})).map((function(t){return t.barLegend}));var i=r.sort((function(t,r){var i=e.indexOf(t.groupName||"");var a=e.indexOf(r.groupName||"");if(i!==a){return i-a}var s=n.indexOf(t.barLegend);var u=n.indexOf(r.barLegend);return s-u}));return i}}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{o(n.next(t))}catch(t){a(t)}}function u(t){try{o(n["throw"](t))}catch(t){a(t)}}function o(t){t.done?e(t.value):i(t.value).then(s,u)}o((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(r){return o([t,r])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;i=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=r.call(t,e)}catch(t){u=[6,t];i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-117c3d78.system.js","./p-334d8711.system.js"],(function(t){"use strict";var r,e,n,i,a;return{setters:[function(t){r=t.h},function(t){e=t.i;n=t.c;i=t.e;a=t.f}],execute:function(){t({b:R,c:q,d:N,e:T,f:P,g:I,h:A,i:X,j:B,k:v,l:Q,m:J,n:nt,o:at,p:it,q:Y,r:O,s:st,t:et,u:rt,v:w,w:tt,x:y});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var u=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.periwinkle,s.cyan,s.midnight,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.lavender,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function o(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var f=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function h(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function v(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function d(t,r){return t*360/r}function l(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function p(t,r,e,n){var i=l(t+t*r*Math.cos(Math.PI*e/180));var a=l(t+t*r*Math.sin(Math.PI*e/180));if(n!==undefined){var s=l(t+t*r*Math.cos(Math.PI*n/180));var u=l(t+t*r*Math.sin(Math.PI*n/180));return{x1:i,y1:a,x2:s,y2:u}}return{x:i,y:a}}function g(t,r,e,n,i){var a=l(i/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(l(e),", ").concat(l(n))}function b(t,r,e,n,i){var a=(t-r)*(i-n)/(e-r)+n;return a<n?n:a>i?i:a}function m(t){return b(t,300,900,70,150)}function w(t){return Math.round(t/m(t))}function y(t,r){var e=t/r;var n=Math.pow(10,Math.floor(Math.log10(e)));var i=e/n;var a;if(i>5){a=10*n}else if(i>3){a=5*n}else if(i>2){a=3*n}else if(i>1.5){a=2*n}else if(i>1){a=1.5*n}else{a=n}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){this.componentWrapperEl.classList.toggle("interactive-popover",!!r.buttonText);r.coords={x:t.clientX,y:t.clientY};z(this.popoverEl,r);H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.componentWrapperEl.classList.toggle("interactive-popover",!!r.buttonText);this.focusedSliceId=r.id;r.coords=a(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;z(this.popoverEl,r);H(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function A(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":B.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function z(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=n(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,r)}function C(){if(this.sliceEls){var t=n(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}S.call(this,r)}}function S(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function B(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function I(t){return __awaiter(this,void 0,void 0,(function(){var r,e,n,i;var a=this;return __generator(this,(function(o){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){var e=parseInt(r.getAttribute("amount")||"0");return t+e}),0);n=__spreadArray([],u[t].colors,true);if(this.chartType==="bar2"){if(e.length<=5){n.splice(1,1)}if(e.length<=4){n.splice(2,1)}}if(t==="bar3"&&e.length===2){n=[n[1],n[3]]}if(t==="doughnut2"&&e.length<5){n.splice(2,1);if(e.length<4){n.shift()}}if(t==="bar5"&&!this.notStartedColor){n.shift()}i=0;e.forEach((function(e,u){var o=e.getAttribute("amount");if(o==null)return;var c=parseInt(o||"0");var f=v(c,a.total,true);var h=u;if(t==="bar6"){h=0}var d={amount:c,visualAmount:c,perc:f,legend:e.getAttribute("legend"),color:n[h]||s.gray,offset:r,id:"".concat(a.uid,"-").concat(i+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:i};r+=c;a.slicesDetails.push(d);i++}));return[2]}))}))}function D(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var n=0;e.filter((function(t){return t.amount>0})).forEach((function(t,i){var a=e[i===0?e.length-1:i-1];var s=e[i===e.length-1?0:i+1];var u=v(a.amount,r,true);var o=v(s.amount,r,true);var c=t.perc===0?8:5;var f=t.perc<4;var h=u<c;var d=o<c;var l=f&&(h||d);t.inSmallCluster=l;t.offset=n;n+=t.amount}));return e}function F(t,r,e){var n=d(r,this.total)-90;var i=t/this.total*360;var a=n+i;var s=i>180?"1 1":"0 1";var u=i>180?"1 0":"0 0";var o=this.chartDetails.size/2;var c=this.chartDetails.thickness;var f=1;var h=e==="doughnut";var v=1.5;var l=h?2.25:3;if(i===360){a-=.01}var b=p(o,f,n+v,a);var m=p(o,c,n+l,a);var w="M ".concat(b.x1,", ").concat(b.y1," ");var y=g(f,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=g(c,u,m.x1,m.y1,this.chartDetails.size);return w+y+x+k+" z"}function T(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function j(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function K(t,r,e){var n=r.map((function(t){return d(t.amount,e)}));var i=n.some((function(r){return r!==0&&r<t}));if(i){var a=n.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var u=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var o=360-u;var c=s-o;var f=c/o;var h=a.map((function(r){return r>t?r-f*r:r==0?0:t}));var v=0;r=r.map((function(t,r){var n=h[r]/360*e;var i=v;v+=n;return Object.assign(Object.assign({},t),{visualAmount:n,offset:i})}))}return r}function N(t){var e=this;var n=this.chartDetails.size+this.chartDetails.padding;var i=t==="doughnut";var a=i?this.slicesDetails:D(this.slicesDetails,this.total);a=K(7,a,this.total);var s=a[0].amount;var u=v(s,this.total,true);if(u===0&&s>0){u="<1%"}else if(u===100&&s<this.total){u=">99%"}else{u=u+"%"}return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:n+"px",height:n+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},j(),a.map((function(r){return E.call(e,r,t)})),G.call(this),i?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},u):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?W.call(e,t):""})))))}function H(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function O(t){t.forEach((function(t){t.classList.remove("faded")}))}function E(t,e){var n=this;var i=v(t.amount,this.total,true)+"%";return!isNaN(t.amount)&&r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.visualAmount?t.color:"transparent",d:F.call(this,t.visualAmount,t.offset,e),onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(i),"data-segmentindex":t.index}))}function G(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function W(t){var e=d(t.offset+t.visualAmount/2,this.total);var n=p(this.chartDetails.size/2,1.4,e-90),i=n.x,a=n.y;var s;if(t.perc===0&&t.amount>0){s="<1%"}else if(t.perc===100&&t.amount<this.total){s=">99%"}else{s=t.perc+"%"}return r("text",{class:"value",x:i+"px",y:a+"px","data-segmentindex":t.index},s)}function q(t){var e=this;var n=t==="bar";var i=this.el.shadowRoot.querySelectorAll(".value");if(i.length>0){requestAnimationFrame((function(){var t=[];var r=4;var n=false;i.forEach((function(e){e.classList.remove("hidden");var i=parseInt(e.dataset.value);if(t.length>0&&i!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var u=i<r?e:t;u.classList.add("hidden");n=true}}))}if(!e.classList.contains("hidden")&&i>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(n)}))}return r("div",{class:"chart-wrapper bar-wrapper"},n?r("div",{class:"single-perc"},v(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(o(this.valueFormat))},!n?r("div",{class:"values ".concat(this.valueFormat)},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return L.call(e,t,5)}))),n?Q.call(this):""),this.chartType==="bar3"?r("div",{class:"bar3-axis-label","aria-hidden":"true"},r("span",null,"0%"),r("span",null,"100%")):"")}function L(t,e){var n=this;var i=v(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var u=i/100*s>=e;var o=u||t.amount==0?"".concat(i,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(v(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(v(t.amount,this.total,false)===0?"zero":""," ").concat(u?"":"fixed-width"),style:{backgroundColor:t.color,width:o},onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function R(t){var e=this;var n=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var u=this.el.getBoundingClientRect().width;var c=u-a-s;var f=w(c);var v=y(n,f);var d=f*v;var l=Math.floor((d-n)/v);f-=l;this.el.style.setProperty("--backgroundSize",100/f+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var p=[];this.slicesDetails.forEach((function(r){r.legend&&p.push(U(r.legend,e.showBarLegend,t));p.push(V.call(e,r,v,f,n))}));var g=[];for(var b=1;b<=f;b++){var m=h(i(b,v));g.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(o(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},p)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),g))}function U(t,e,n){var i=n==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(i)},t)}function V(t,e,n,i){var a=this;var s=this.currentChartType==="bar6"?e*n:i;var u=v(t.amount,s,false);var o=u?u+"%":"1px";var c=h(t.amount);var f=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){f=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){f=(this.total===0?"0":v(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:o},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},f))}function P(t){var e=this;if(this.showLegend){var n=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(n);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(v(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,n){var i=this;if(e===void 0){e=""}if(n===void 0){n=null}var a=function(t){if(n){n.coords={x:t.clientX,y:t.clientY};z(i.popoverEl,n);H(Array.from(i.el.shadowRoot.querySelectorAll("[data-segmentindex")),n)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":n?n.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),f)}function Y(t,r,e,n){if(n===void 0){n=0}switch(e){case"amount":return t.toFixed(n);case"percentage":var i=t/r*100;if(t>0&&i<1)return"<1%";if(i>99&&t!==r)return">99%";return"".concat(Math.round(i).toFixed(0),"%");default:case"none":return""}}function Z(t,r){if(r===void 0){r=[1,1.5,2,2.5,3,5,10]}var e=Math.pow(10,Math.floor(Math.log10(t)));var n=t/e;var i=r.some((function(t){return Math.abs(n-t)<1e-4}));return i}function $(t){if(t===0||!Number.isFinite(t))return 0;var r=15;var e=Math.abs(t);for(var n=0;n<=r;n++){var i=Math.round(e);var a=1e-9;if(Math.abs(e-i)<a){return n}e*=10}return 2}function tt(t){if(t===0||!Number.isFinite(t))return 0;var r=Math.abs(t);var e=r;if(r>=1e6){e=r/1e6}else if(r>=1e3){e=r/1e3}return Math.max($(r),$(e))}function rt(t,r){var e=r!==undefined;if(t>=1e6){var n=t/1e6;if(e){return"".concat(n.toFixed(r),"M")}return"".concat(n.toFixed(t%1e6===0?0:1),"M")}if(t>=1e3){var n=t/1e3;if(e){return"".concat(n.toFixed(r),"K")}return"".concat(n.toFixed(t%1e3===0?0:1),"K")}if(e){return t.toFixed(r)}return t.toString()}function et(t,r){for(var e=t;e>=1;e--){var n=r/e;if(Z(n)){return{numIntervals:e,interval:n}}}return{numIntervals:1,interval:r}}function nt(t){if(t<=0)return 0;var r=[1,1.5,2,2.5,3,5,10];var e=Math.pow(10,Math.floor(Math.log10(t)));var n=t/e;for(var i=0,a=r;i<a.length;i++){var s=a[i];if(s>=n){return s*e}}return 10*e}function it(t){var r=new Set;var e=[];t.forEach((function(t){t.forEach((function(t){if(!r.has(t.barLegend)){r.add(t.barLegend);e.push(t)}}))}));return e}function at(t,r){var e=new Map;t.forEach((function(t){var n=t.groupName;if(!n){n=r}if(!e.has(n)){e.set(n,[])}e.get(n).push(t)}));return e}function st(t){var r=__spreadArray([],t,true);var e=[];r.forEach((function(t){if(t.groupName&&!e.includes(t.groupName)){e.push(t.groupName)}}));var n=r.filter((function(t){return t.groupName===e[0]})).map((function(t){return t.barLegend}));var i=r.sort((function(t,r){var i=e.indexOf(t.groupName||"");var a=e.indexOf(r.groupName||"");if(i!==a){return i-a}var s=n.indexOf(t.barLegend);var u=n.indexOf(r.barLegend);return s-u}));return i}}}}));