@watermarkinsights/ripple 5.0.0 → 5.1.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 (244) hide show
  1. package/dist/cjs/{app-globals-d6c37251.js → app-globals-aad9863d.js} +2 -2
  2. package/dist/cjs/{chartFunctions-b32ecbeb.js → chartFunctions-e86ed63c.js} +8 -4
  3. package/dist/cjs/{index-0f1bacce.js → index-4853a7b4.js} +537 -494
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  6. package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-navigator-button.cjs.entry.js +1 -1
  8. package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
  9. package/dist/cjs/ripple.cjs.js +3 -3
  10. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  12. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  13. package/dist/cjs/wm-chart.cjs.entry.js +2 -2
  14. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-file-list.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  17. package/dist/cjs/wm-input.cjs.entry.js +1 -1
  18. package/dist/cjs/wm-line-chart.cjs.entry.js +2 -2
  19. package/dist/cjs/wm-modal-footer.cjs.entry.js +1 -1
  20. package/dist/cjs/wm-modal-header.cjs.entry.js +1 -1
  21. package/dist/cjs/wm-modal.cjs.entry.js +1 -1
  22. package/dist/cjs/wm-navigation_3.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  24. package/dist/cjs/wm-option_2.cjs.entry.js +1 -1
  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 +1 -1
  30. package/dist/cjs/wm-tag-input.cjs.entry.js +1 -1
  31. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  32. package/dist/cjs/wm-textarea.cjs.entry.js +1 -1
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  35. package/dist/cjs/wm-uploader.cjs.entry.js +1 -1
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  37. package/dist/collection/collection-manifest.json +2 -2
  38. package/dist/collection/components/charts/chartFunctions.js +7 -3
  39. package/dist/esm/{app-globals-2df700e6.js → app-globals-4e667854.js} +2 -2
  40. package/dist/esm/{chartFunctions-e43ec877.js → chartFunctions-8098e455.js} +8 -4
  41. package/dist/esm/{index-5815b978.js → index-7923308f.js} +537 -494
  42. package/dist/esm/loader.js +3 -3
  43. package/dist/esm/priv-chart-popover.entry.js +1 -1
  44. package/dist/esm/priv-datepicker.entry.js +1 -1
  45. package/dist/esm/priv-navigator-button.entry.js +1 -1
  46. package/dist/esm/priv-navigator-item.entry.js +1 -1
  47. package/dist/esm/ripple.js +4 -4
  48. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  49. package/dist/esm/wm-button.entry.js +1 -1
  50. package/dist/esm/wm-chart-slice.entry.js +1 -1
  51. package/dist/esm/wm-chart.entry.js +2 -2
  52. package/dist/esm/wm-datepicker.entry.js +1 -1
  53. package/dist/esm/wm-file-list.entry.js +1 -1
  54. package/dist/esm/wm-file.entry.js +1 -1
  55. package/dist/esm/wm-input.entry.js +1 -1
  56. package/dist/esm/wm-line-chart.entry.js +2 -2
  57. package/dist/esm/wm-modal-footer.entry.js +1 -1
  58. package/dist/esm/wm-modal-header.entry.js +1 -1
  59. package/dist/esm/wm-modal.entry.js +1 -1
  60. package/dist/esm/wm-navigation_3.entry.js +1 -1
  61. package/dist/esm/wm-navigator.entry.js +1 -1
  62. package/dist/esm/wm-option_2.entry.js +1 -1
  63. package/dist/esm/wm-pagination.entry.js +1 -1
  64. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  65. package/dist/esm/wm-search.entry.js +1 -1
  66. package/dist/esm/wm-snackbar.entry.js +1 -1
  67. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  68. package/dist/esm/wm-tag-input.entry.js +1 -1
  69. package/dist/esm/wm-tag-option.entry.js +1 -1
  70. package/dist/esm/wm-textarea.entry.js +1 -1
  71. package/dist/esm/wm-timepicker.entry.js +1 -1
  72. package/dist/esm/wm-toggletip.entry.js +1 -1
  73. package/dist/esm/wm-uploader.entry.js +1 -1
  74. package/dist/esm/wm-wrapper.entry.js +1 -1
  75. package/dist/esm-es5/{app-globals-2df700e6.js → app-globals-4e667854.js} +1 -1
  76. package/dist/esm-es5/chartFunctions-8098e455.js +1 -0
  77. package/dist/esm-es5/index-7923308f.js +1 -0
  78. package/dist/esm-es5/loader.js +1 -1
  79. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  80. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  81. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  82. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  83. package/dist/esm-es5/ripple.js +1 -1
  84. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  85. package/dist/esm-es5/wm-button.entry.js +1 -1
  86. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  87. package/dist/esm-es5/wm-chart.entry.js +1 -1
  88. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  89. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  90. package/dist/esm-es5/wm-file.entry.js +1 -1
  91. package/dist/esm-es5/wm-input.entry.js +1 -1
  92. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  93. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  94. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  95. package/dist/esm-es5/wm-modal.entry.js +1 -1
  96. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  97. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  98. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  99. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  100. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  101. package/dist/esm-es5/wm-search.entry.js +1 -1
  102. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  103. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  104. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  105. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  106. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  107. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  108. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  109. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  110. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  111. package/dist/loader/index.d.ts +3 -0
  112. package/dist/ripple/{p-df4ab5de.system.entry.js → p-00f8637e.system.entry.js} +1 -1
  113. package/dist/ripple/{p-0a05e6d7.system.entry.js → p-06c018cf.system.entry.js} +1 -1
  114. package/dist/ripple/{p-411f0d1d.entry.js → p-0707b4c2.entry.js} +1 -1
  115. package/dist/ripple/{p-e14c3721.entry.js → p-0bb464b1.entry.js} +1 -1
  116. package/dist/ripple/{p-6f47d86c.system.entry.js → p-0d0e0a1e.system.entry.js} +1 -1
  117. package/dist/ripple/{p-9b894527.entry.js → p-0e7025db.entry.js} +1 -1
  118. package/dist/ripple/{p-d65e9846.entry.js → p-0ec1e075.entry.js} +1 -1
  119. package/dist/ripple/{p-9a977fbd.entry.js → p-0f72ed3a.entry.js} +1 -1
  120. package/dist/ripple/{p-b5729148.system.entry.js → p-186a4d76.system.entry.js} +1 -1
  121. package/dist/ripple/{p-9433f29c.entry.js → p-18c1593b.entry.js} +1 -1
  122. package/dist/ripple/{p-194c06e1.entry.js → p-19f29a48.entry.js} +1 -1
  123. package/dist/ripple/{p-85e59e6a.system.entry.js → p-1ee68e06.system.entry.js} +1 -1
  124. package/dist/ripple/{p-46584e7e.system.entry.js → p-1fcc8007.system.entry.js} +1 -1
  125. package/dist/ripple/{p-87eb2f99.system.entry.js → p-28119849.system.entry.js} +1 -1
  126. package/dist/ripple/{p-0c218ac2.system.entry.js → p-2849847d.system.entry.js} +1 -1
  127. package/dist/ripple/{p-70c459b2.entry.js → p-2f39732e.entry.js} +1 -1
  128. package/dist/ripple/{p-ac727a0a.system.entry.js → p-30ee0f5c.system.entry.js} +1 -1
  129. package/dist/ripple/{p-44f2e1a7.entry.js → p-340f96b5.entry.js} +1 -1
  130. package/dist/ripple/{p-74565577.system.entry.js → p-3639dbbc.system.entry.js} +1 -1
  131. package/dist/ripple/{p-1b8584f9.entry.js → p-3e605541.entry.js} +1 -1
  132. package/dist/ripple/{p-440571f7.system.entry.js → p-439d839b.system.entry.js} +1 -1
  133. package/dist/ripple/{p-e80009db.entry.js → p-445d6915.entry.js} +1 -1
  134. package/dist/ripple/{p-1435a717.entry.js → p-48ed56a0.entry.js} +1 -1
  135. package/dist/ripple/{p-4a8016fb.entry.js → p-49f94f8a.entry.js} +1 -1
  136. package/dist/ripple/{p-764cee74.system.js → p-4ba32e58.system.js} +1 -1
  137. package/dist/ripple/{p-0bf7cdda.system.entry.js → p-510fab1c.system.entry.js} +1 -1
  138. package/dist/ripple/p-539b7be9.system.js +2 -0
  139. package/dist/ripple/{p-7ffb6f07.entry.js → p-57694990.entry.js} +1 -1
  140. package/dist/ripple/{p-e9d29b5b.system.entry.js → p-58a286e8.system.entry.js} +1 -1
  141. package/dist/ripple/{p-ef0854e6.entry.js → p-5ff41948.entry.js} +1 -1
  142. package/dist/ripple/{p-76740c92.entry.js → p-636ca7f2.entry.js} +1 -1
  143. package/dist/ripple/{p-0bef5c1b.system.entry.js → p-66a57d81.system.entry.js} +1 -1
  144. package/dist/ripple/p-681c1853.js +1 -0
  145. package/dist/ripple/{p-7d2bd039.entry.js → p-6b71806b.entry.js} +1 -1
  146. package/dist/ripple/{p-5c4245d9.system.entry.js → p-7afa2fdc.system.entry.js} +1 -1
  147. package/dist/ripple/{p-ce492826.js → p-7c12ac23.js} +1 -1
  148. package/dist/ripple/{p-5297476b.entry.js → p-7cb98aa5.entry.js} +1 -1
  149. package/dist/ripple/{p-87c85aac.system.entry.js → p-7dbc4abc.system.entry.js} +1 -1
  150. package/dist/ripple/{p-6f61a5f1.entry.js → p-8c7b9bad.entry.js} +1 -1
  151. package/dist/ripple/p-94a54d68.system.js +1 -0
  152. package/dist/ripple/{p-b878d9c7.entry.js → p-950edf62.entry.js} +1 -1
  153. package/dist/ripple/{p-6a231093.system.entry.js → p-96f3d9e7.system.entry.js} +1 -1
  154. package/dist/ripple/{p-47441a2a.system.entry.js → p-9bda128e.system.entry.js} +1 -1
  155. package/dist/ripple/{p-eab22c94.entry.js → p-9ca027b7.entry.js} +1 -1
  156. package/dist/ripple/{p-6372934d.entry.js → p-9d4ea9f8.entry.js} +1 -1
  157. package/dist/ripple/{p-49632308.system.entry.js → p-9d8817a7.system.entry.js} +1 -1
  158. package/dist/ripple/{p-9936c43c.system.entry.js → p-a0098136.system.entry.js} +1 -1
  159. package/dist/ripple/p-a431d6e5.js +2 -0
  160. package/dist/ripple/{p-7ade6e66.system.entry.js → p-a6119885.system.entry.js} +1 -1
  161. package/dist/ripple/{p-25cf3ccb.entry.js → p-a77f2168.entry.js} +1 -1
  162. package/dist/ripple/{p-3cc9b812.entry.js → p-adfaeeea.entry.js} +1 -1
  163. package/dist/ripple/{p-66960670.system.entry.js → p-b02c0c41.system.entry.js} +1 -1
  164. package/dist/ripple/{p-1166513e.system.entry.js → p-bbb8c02f.system.entry.js} +1 -1
  165. package/dist/ripple/{p-3b9a9d73.entry.js → p-bd7e892d.entry.js} +1 -1
  166. package/dist/ripple/{p-441354a5.system.entry.js → p-c9552e88.system.entry.js} +1 -1
  167. package/dist/ripple/{p-018498a7.system.entry.js → p-cd0a862f.system.entry.js} +1 -1
  168. package/dist/ripple/{p-25e011a6.entry.js → p-d344e490.entry.js} +1 -1
  169. package/dist/ripple/{p-dabff389.system.entry.js → p-d87e105b.system.entry.js} +1 -1
  170. package/dist/ripple/{p-44d8f4b2.system.entry.js → p-e0ff556b.system.entry.js} +1 -1
  171. package/dist/ripple/{p-8edd4ce6.system.entry.js → p-e19e1ece.system.entry.js} +1 -1
  172. package/dist/ripple/{p-c53f1dcb.entry.js → p-e3d8f2f6.entry.js} +1 -1
  173. package/dist/ripple/{p-116477b7.entry.js → p-e8eef357.entry.js} +1 -1
  174. package/dist/ripple/{p-e0ca71d3.entry.js → p-eb596891.entry.js} +1 -1
  175. package/dist/ripple/{p-35627044.system.entry.js → p-ec384895.system.entry.js} +1 -1
  176. package/dist/ripple/{p-5356db9b.entry.js → p-eccb5aaf.entry.js} +1 -1
  177. package/dist/ripple/{p-567c5edd.system.entry.js → p-edcb8f48.system.entry.js} +1 -1
  178. package/dist/ripple/{p-d8f1fd76.entry.js → p-f963be6d.entry.js} +1 -1
  179. package/dist/ripple/{p-838d75c2.system.js → p-fde81b94.system.js} +1 -1
  180. package/dist/ripple/{p-d37a720b.system.entry.js → p-ff7dac66.system.entry.js} +1 -1
  181. package/dist/ripple/ripple.esm.js +1 -1
  182. package/dist/ripple/ripple.js +1 -1
  183. package/dist/types/stencil-public-runtime.d.ts +0 -2
  184. package/package.json +2 -2
  185. package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
  186. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
  187. package/dist/collection/components/charts/screenshots.e2e.js +0 -96
  188. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
  189. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
  190. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
  191. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
  192. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
  193. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
  194. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
  195. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
  196. package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
  197. package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
  198. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +0 -76
  199. package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +0 -382
  200. package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +0 -21
  201. package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
  202. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
  203. package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
  204. package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
  205. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
  206. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
  207. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
  208. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
  209. package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
  210. package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
  211. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
  212. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
  213. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
  214. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
  215. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
  216. package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
  217. package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
  218. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
  219. package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
  220. package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
  221. package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
  222. package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
  223. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
  224. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
  225. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
  226. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
  227. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
  228. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
  229. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
  230. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
  231. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
  232. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
  233. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
  234. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
  235. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
  236. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
  237. package/dist/collection/global/functions.spec.js +0 -126
  238. package/dist/collection/lang/lang.spec.js +0 -20
  239. package/dist/esm-es5/chartFunctions-e43ec877.js +0 -1
  240. package/dist/esm-es5/index-5815b978.js +0 -1
  241. package/dist/ripple/p-1eb84629.system.js +0 -2
  242. package/dist/ripple/p-7bf00a52.js +0 -2
  243. package/dist/ripple/p-9bf31e42.js +0 -1
  244. package/dist/ripple/p-aa41cf09.system.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t}from"./p-7bf00a52.js";import{i as s,c as i,e,f as n}from"./p-fc710a30.js";const a="#ff5f4e",r="#19a1a9",o="#088000",h="#2e1b46",c="#8b86ca",d="#575195",l="#6b6b6b",u={doughnut:{size:155,colors:[o,l],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[c,h,l],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[r,a,l],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[d,r,a,l],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,l],padding:0,category:"stackedBar"},bar2:{size:400,colors:[l,d,r,a],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[l,d,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,d],padding:0,category:"stackedBar"},bar5:{size:400,colors:[l,c,h,"#0089e4",o,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[c],padding:0,category:"simpleBar"},bar7:{size:400,colors:[d,r,a,l],padding:0,category:"simpleBar"}};function f(t){return"percentage"===t||"amount"===t?"show-values":""}const g=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),p=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,i){return i?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,i,e){var n=x(t+t*s*Math.cos(Math.PI*i/180)),a=x(t+t*s*Math.sin(Math.PI*i/180));return void 0!==e?{x1:n,y1:a,x2:x(t+t*s*Math.cos(Math.PI*e/180)),y2:x(t+t*s*Math.sin(Math.PI*e/180))}:{x:n,y:a}}function k(t,s,i,e,n){var a=x(n/2*t);return`A ${a}, ${a} 0 ${s} ${x(i)}, ${x(e)}`}function y(t,s){const i=t/s,e=10**Math.floor(Math.log10(i)),n=i/e;let a;return a=n>5?10*e:n>3?5*e:n>2?3*e:n>1.5?2*e:n>1?1.5*e:e,a}function $(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function M(t,s){this.popoverEl&&!this.isTabbing&&(s.coords={x:t.clientX,y:t.clientY},A(this.popoverEl,s),K(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),s))}function z(t,s){this.popoverEl&&this.isTabbing&&(this.focusedSliceId=s.id,s.coords=e(t.target),s.coords.x=s.coords.x+30,s.coords.y=s.coords.y+30,A(this.popoverEl,s),K(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,B.call(this);break;case"Tab":j.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function A(t,s){t.open=!1,s.title&&s.text&&(t.sliceDetails=Object.assign({},s),window.setTimeout((()=>t.open=!0),30))}function B(){const t=n(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;F.call(this,s)}function D(){if(this.sliceEls){const t=n(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 j(){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 I(t){this.slicesDetails=[];let s=0;const i=Array.from(this.el.children);this.total=i.reduce(((t,s)=>t+parseInt(s.getAttribute("amount")||"0")),0),i.forEach(((i,e)=>{const n=parseInt(i.getAttribute("amount")||"0"),a=m(n,this.total,!0);let r=e;"bar5"===t&&(r=this.notStartedColor?e:e+1),"bar6"===t&&(r=0);const o=u[t].colors[r],h={amount:n,perc:a,legend:i.getAttribute("legend"),color:o||l,offset:s,id:`${this.uid}-${e+1}`,title:i.getAttribute("popover-title"),text:i.getAttribute("popover-text"),buttonText:i.getAttribute("popover-button-text"),sliceRef:i,inSmallCluster:!1,index:e};s+=n,this.slicesDetails.push(h)}))}function S(t,s,i){const e=v(s,this.total)-90,n=t/this.total*360;let a=e+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,d="doughnut"===i?2.25:3;360===n&&(a-=.01);const l=w(h,1,e+1.5,a),u=w(h,c,e+d,a);return`M ${l.x1}, ${l.y1} `+k(1,r,l.x2,l.y2,this.chartDetails.size)+` L ${u.x2}, ${u.y2} `+k(c,o,u.x1,u.y1,this.chartDetails.size)+" z"}function T(){const i=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"},i)}function H(s){const i=this.chartDetails.size+this.chartDetails.padding,e="doughnut"===s;let n=e?this.slicesDetails:function(t,s){let i=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),e=0;return i.filter((t=>t.amount>0)).forEach(((t,n)=>{const a=i[n===i.length-1?0:n+1],r=m(i[0===n?i.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=e,e+=t.amount})),i}(this.slicesDetails,this.total);return n=function(t,s,i){const e=s.map((t=>v(t.amount,i)));if(e.some((t=>0!==t&&t<7))){const t=e.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 e=o[s]/360*i,n=h;return h+=e,Object.assign(Object.assign({},t),{amount:e,offset:n})}))}return s}(0,n,this.total),t("div",{class:"chart-wrapper doughnut-wrapper"},t("svg",{width:i+"px",height:i+"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))),E.call(this),e?t("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},m(n[0].amount,this.total,!0)+"%"):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?G.call(this,t):"")))))}function K(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,i){const e=m(s.amount,this.total,!0)+"%";return t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.amount?s.color:"transparent",d:S.call(this,s.amount,s.offset,i),onClick:t=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>$.call(this,t),role:"img","aria-label":`${s.legend}, ${e}`,"data-segmentindex":s.index}))}function E(){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 G(s){const i=v(s.offset+s.amount/2,this.total);let{x:e,y:n}=w(this.chartDetails.size/2,1.4,i-90);return t("text",{class:"value",x:e+"px",y:n+"px","data-segmentindex":s.index},`${s.perc>0?s.perc:"<1"}%`)}function L(s){const i="bar"===s,e=this.el.shadowRoot.querySelectorAll(".value");return e.length>0&&requestAnimationFrame((()=>{let t=[],s=!1;e.forEach((i=>{i.classList.remove("hidden");const e=parseInt(i.dataset.value);if(t.length>0&&0!=e){const n=i.getBoundingClientRect().left-4;t.forEach((t=>{const a=parseInt(t.dataset.value);t.getBoundingClientRect().right>n&&((e<a?i:t).classList.add("hidden"),s=!0)}))}!i.classList.contains("hidden")&&e>0&&t.push(i)})),(this.isBar||this.isDoughnut)&&this.showHiddenValuesMessage(s)})),t("div",{class:"chart-wrapper bar-wrapper"},i?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)}`},i?"":t("div",{class:"values"},this.slicesDetails.map((t=>this.renderBarText(t,5)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((t=>N.call(this,t,5)))),i?J.call(this):""))}function N(s,i){const e=m(s.amount,this.total,!1),n=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper"),a=e/100*(n?n.offsetWidth:this.el.offsetWidth)>=i,r=a||0==s.amount?`${e}%`:`${i}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=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>$.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=(r=this.el.getBoundingClientRect().width-n-48,Math.round(r/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(r)));var r;let o=y(e,a);const h=Math.floor((a*o-e)/o);a-=h,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 c=[];this.slicesDetails.forEach((i=>{i.legend&&c.push(function(s,i,e){return t("label",{class:`label${"bar7"!==e||i?"":" hidden"}`},s)}(i.legend,this.showBarLegend,s)),c.push(U.call(this,i,o,a,e))}));const d=[];for(let s=1;s<=a;s++){const e=b(i(s,o));d.push(t("div",{class:"tick"},t("span",null,e)))}const l="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)}`},l&&t("div",{class:"gridlines"}),t("div",{class:"rows"},c)),l&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),d))}function U(s,i,e,n){const a=m(s.amount,"bar6"===this.currentChartType?i*e: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=>M.call(this,t,s),onFocus:t=>z.call(this,t,s),onKeyDown:t=>$.call(this,t),"data-segmentindex":s.index},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const i=this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return this.isDoughnut&&this.showHiddenValuesMessage(i),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 q.call(this,{key:t.legend,color:t.color},s,t)}))),this.isDoughnut&&!this.printMode&&P())}}function q(s,i="",e=null){const n=t=>{e&&(e.coords={x:t.clientX,y:t.clientY},A(this.popoverEl,e),K(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),e))};return t("div",{class:"legend-item",onClick:t=>n(t),"data-segmentindex":e?e.index:null},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key,i&&t("span",{class:"print-value "+(this.printMode?"force-visible":"")},": ",i)))}function J(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function P(){return t("div",{class:"hidden-values-warning hidden"},g,t("br",null),p)}export{u as a,R as b,L as c,H as d,T as e,V as f,I as g,C as h,P as i,j,m as k,J as l,q as m,b as n,y as o,O as r}
@@ -1 +0,0 @@
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{u(n.next(t))}catch(t){a(t)}}function o(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):i(t.value).then(s,o)}u((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:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(n=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;i=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];i=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[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-1eb84629.system.js","./p-4c3f4047.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:U,c:N,d:K,e:j,f:P,g:D,h:z,i:X,j:S,k:d,l:Q,m:J,n:f,o:w,r:E});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=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.cyan,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[s.periwinkle,s.cyan,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.periwinkle,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[s.gray,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 u(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 h=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 f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,n){var i=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(n!==undefined){var s=v(t+t*r*Math.cos(Math.PI*n/180));var o=v(t+t*r*Math.sin(Math.PI*n/180));return{x1:i,y1:a,x2:s,y2:o}}return{x:i,y:a}}function p(t,r,e,n,i){var a=v(i/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(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 y(t){return Math.round(t/m(t))}function w(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){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=i(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(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":S.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(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=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;B.call(this,r)}function C(){if(this.sliceEls){var t=a(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}B.call(this,r)}}function B(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 S(){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 D(t){return __awaiter(this,void 0,void 0,(function(){var r,e;var n=this;return __generator(this,(function(i){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);e.forEach((function(e,i){var a=parseInt(e.getAttribute("amount")||"0");var u=d(a,n.total,true);var c=i;if(t==="bar5"){c=n.notStartedColor?i:i+1}if(t==="bar6"){c=0}var h=o[t].colors[c];var f={amount:a,perc:u,legend:e.getAttribute("legend"),color:h||s.gray,offset:r,id:"".concat(n.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+=a;n.slicesDetails.push(f)}));return[2]}))}))}function F(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 o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=n;n+=t.amount}));return e}function T(t,r,e){var n=l(r,this.total)-90;var i=t/this.total*360;var a=n+i;var s=i>180?"1 1":"0 1";var o=i>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(i===360){a-=.01}var b=g(u,h,n+d,a);var m=g(u,c,n+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){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 I(){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 H(t,r,e){var n=r.map((function(t){return l(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 o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var n=f[r]/360*e;var i=d;d+=n;return Object.assign(Object.assign({},t),{amount:n,offset:i})}))}return r}function K(t){var e=this;var n=this.chartDetails.size+this.chartDetails.padding;var i=t==="doughnut";var a=i?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:n+"px",height:n+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return G.call(e,r,t)})),W.call(this),i?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):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?L.call(e,t):""})))))}function O(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 E(t){t.forEach((function(t){t.classList.remove("faded")}))}function G(t,e){var n=this;var i=d(t.amount,this.total,true)+"%";return 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.amount?t.color:"transparent",d:T.call(this,t.amount,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 W(){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 L(t){var e=l(t.offset+t.amount/2,this.total);var n=g(this.chartDetails.size/2,1.4,e-90),i=n.x,a=n.y;return r("text",{class:"value",x:i+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function N(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 o=i<r?e:t;o.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"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!n?r("div",{class:"values"},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),n?Q.call(this):""))}function R(t,e){var n=this;var i=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=i/100*s>=e;var u=o||t.amount==0?"".concat(i,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},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 U(t){var e=this;var i=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 o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(i,h);var l=h*d;var v=Math.floor((l-i)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,i))}));var p=[];for(var b=1;b<=h;b++){var m=f(n(b,d));p.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(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,n){var i=n==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(i)},t)}function q(t,e,n,i){var a=this;var s=this.currentChartType==="bar6"?e*n:i;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},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"},h))}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(d(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};A(i.popoverEl,n);O(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),h)}}}}));