@bino-bi/bn-template-engine 1.0.0-alpha.0 → 1.0.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 (278) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/{p-_LBTIfNN.js → p--PSoPbDM.js} +1 -1
  3. package/dist/bn-template-engine/p-05a82a77.entry.js +1 -0
  4. package/dist/bn-template-engine/p-0ca8dc17.entry.js +1 -0
  5. package/dist/bn-template-engine/p-0f1504f3.entry.js +1 -0
  6. package/dist/bn-template-engine/p-1d9a3be9.entry.js +1 -0
  7. package/dist/bn-template-engine/p-35638ad0.entry.js +1 -0
  8. package/dist/bn-template-engine/p-37881d05.entry.js +1 -0
  9. package/dist/bn-template-engine/{p-65f8962a.entry.js → p-3b894997.entry.js} +1 -1
  10. package/dist/bn-template-engine/p-50e49732.entry.js +1 -0
  11. package/dist/bn-template-engine/p-60a7fc59.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-ad94cf63.entry.js → p-6c7c0455.entry.js} +1 -1
  13. package/dist/bn-template-engine/p-6da93eae.entry.js +1 -0
  14. package/dist/bn-template-engine/p-701e1578.entry.js +1 -0
  15. package/dist/bn-template-engine/p-BSfqOkN_.js +1 -0
  16. package/dist/bn-template-engine/{p--TeDldm8.js → p-CRLgp9-v.js} +1 -1
  17. package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
  18. package/dist/bn-template-engine/{p-Cp4MVxCu.js → p-CvXqez4D.js} +1 -1
  19. package/dist/bn-template-engine/p-DG-1MR_T.js +1 -0
  20. package/dist/bn-template-engine/{p-CnI71OA9.js → p-DRikHQE-.js} +1 -1
  21. package/dist/bn-template-engine/p-DVMu6dEy.js +1 -0
  22. package/dist/bn-template-engine/p-DVo6aZUE.js +1 -0
  23. package/dist/bn-template-engine/p-DdexOqTs.js +1 -0
  24. package/dist/bn-template-engine/p-DgfL-ffj.js +1 -0
  25. package/dist/bn-template-engine/p-DyRaC0MB.js +1 -0
  26. package/dist/bn-template-engine/p-JNHhIe7t.js +2 -0
  27. package/dist/bn-template-engine/p-a95ccc16.entry.js +1 -0
  28. package/dist/bn-template-engine/p-b7bec050.entry.js +1 -0
  29. package/dist/bn-template-engine/p-bc59ea5c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-d279b578.entry.js +1 -0
  31. package/dist/bn-template-engine/p-dd9dd407.entry.js +1 -0
  32. package/dist/bn-template-engine/p-e102a490.entry.js +1 -0
  33. package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
  34. package/dist/bn-template-engine/p-f89e55c6.entry.js +1 -0
  35. package/dist/bn-template-engine/{p-CY1RzLjU.js → p-tzFCK9qn.js} +1 -1
  36. package/dist/cjs/{DataFormatDigits-DmTbhF8q.js → DataFormatDigits-CbIVfGEH.js} +1 -1
  37. package/dist/cjs/{DateStringFactory-Dn0aRj2Y.js → DateStringFactory-CfkXYAMN.js} +4 -5
  38. package/dist/cjs/{luxon-8hyy5YD7.js → Order-DtpbD8mQ.js} +282 -0
  39. package/dist/cjs/{SVGVariancesStyleGroup-Czizhngt.js → SVGVariancesStyleGroup-D-rTWlDo.js} +1 -1
  40. package/dist/cjs/{StringAdapter-0EbYMkR0.js → StringAdapter-ByCHdlDO.js} +1 -1
  41. package/dist/cjs/bn-asset.cjs.entry.js +5 -6
  42. package/dist/cjs/{bn-body_3.cjs.entry.js → bn-body_4.cjs.entry.js} +360 -27
  43. package/dist/cjs/bn-card.cjs.entry.js +5 -6
  44. package/dist/cjs/bn-chart-structure.cjs.entry.js +17 -22
  45. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -51
  46. package/dist/cjs/bn-component-style.cjs.entry.js +5 -6
  47. package/dist/cjs/bn-context_5.cjs.entry.js +36 -40
  48. package/dist/cjs/bn-dataset.cjs.entry.js +5 -6
  49. package/dist/cjs/bn-grid.cjs.entry.js +8 -11
  50. package/dist/cjs/bn-image.cjs.entry.js +8 -11
  51. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -6
  52. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -3
  53. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -2
  54. package/dist/cjs/bn-message.cjs.entry.js +6 -7
  55. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  56. package/dist/cjs/bn-template.cjs.entry.js +4 -5
  57. package/dist/cjs/bn-text.cjs.entry.js +12 -16
  58. package/dist/cjs/bn-tree.cjs.entry.js +8 -11
  59. package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-CRPmux5D.js} +1 -1
  60. package/dist/cjs/editor-companion.cjs.entry.js +3 -3
  61. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +31 -33
  62. package/dist/cjs/ibcs-chart-time.cjs.entry.js +42 -44
  63. package/dist/cjs/{index-CScBFiS1.js → index-Cjw0q6gP.js} +1 -2
  64. package/dist/cjs/loader.cjs.js +2 -2
  65. package/dist/cjs/{withDataset-ZdN-RRTx.js → scaling-D8sIIKft.js} +68 -3
  66. package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-C6gLgq_e.js} +2 -2
  67. package/dist/cjs/{componentRegister-C17UFNPh.js → withComponentStatus-_x4LQZ0N.js} +43 -6
  68. package/dist/cjs/{withComponentStyle-C6KHnZHt.js → withComponentStyle-DMtic_9Y.js} +3 -3
  69. package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-B8gHkfV2.js} +1 -1
  70. package/dist/cjs/{withStyled-Bf-stJTR.js → withStyled-BBtMesx3.js} +14 -63
  71. package/dist/cjs/{withTranslation-Cz0M5maV.js → withTranslation-CWPAIRjh.js} +3 -3
  72. package/dist/collection/collection-manifest.json +1 -10
  73. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +2 -3
  74. package/dist/collection/components/bn-chart-time/bn-chart-time.js +21 -30
  75. package/dist/collection/components/bn-message/bn-message.js +1 -1
  76. package/dist/collection/components/bn-page/bn-page.js +1 -1
  77. package/dist/collection/components/bn-table/bn-table.js +1 -1
  78. package/dist/collection/components/bn-template/bn-template.js +1 -1
  79. package/dist/collection/components/bn-text/bn-text.js +1 -1
  80. package/dist/collection/components/bn-title/bn-title.js +1 -9
  81. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -1
  82. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  83. package/dist/collection/utils/DateStringFactory.js +0 -1
  84. package/dist/components/DateStringFactory.js +1 -1
  85. package/dist/components/bn-chart-structure.js +1 -1
  86. package/dist/components/bn-chart-time.js +1 -1
  87. package/dist/components/bn-message2.js +1 -1
  88. package/dist/components/bn-page2.js +1 -1
  89. package/dist/components/bn-table.js +1 -1
  90. package/dist/components/bn-template.js +1 -1
  91. package/dist/components/bn-text.js +1 -1
  92. package/dist/components/bn-title2.js +1 -1
  93. package/dist/components/editor-companion.js +1 -1
  94. package/dist/components/ibcs-title2.js +1 -1
  95. package/dist/components/scaling.js +1 -1
  96. package/dist/components/validate.js +1 -1
  97. package/dist/components/withHasError.js +1 -1
  98. package/dist/esm/{DataFormatDigits-Dt6gpIiZ.js → DataFormatDigits-DYdbRX-1.js} +1 -1
  99. package/dist/esm/{DateStringFactory-_Qiv0IvF.js → DateStringFactory-DRcbojUT.js} +1 -2
  100. package/dist/esm/{luxon-DbyXf6dF.js → Order-DdexOqTs.js} +280 -1
  101. package/dist/esm/{SVGVariancesStyleGroup-DlWgvpzs.js → SVGVariancesStyleGroup-D0Cwprv1.js} +1 -1
  102. package/dist/esm/{StringAdapter-BLvo1Krl.js → StringAdapter-CTL-Dvzp.js} +1 -1
  103. package/dist/esm/bn-asset.entry.js +5 -6
  104. package/dist/esm/{bn-body_3.entry.js → bn-body_4.entry.js} +356 -24
  105. package/dist/esm/bn-card.entry.js +5 -6
  106. package/dist/esm/bn-chart-structure.entry.js +12 -17
  107. package/dist/esm/bn-chart-time.entry.js +31 -44
  108. package/dist/esm/bn-component-style.entry.js +5 -6
  109. package/dist/esm/bn-context_5.entry.js +15 -19
  110. package/dist/esm/bn-dataset.entry.js +5 -6
  111. package/dist/esm/bn-grid.entry.js +8 -11
  112. package/dist/esm/bn-image.entry.js +8 -11
  113. package/dist/esm/bn-internationalization.entry.js +5 -6
  114. package/dist/esm/bn-layout-card.entry.js +3 -3
  115. package/dist/esm/bn-layout-page.entry.js +2 -2
  116. package/dist/esm/bn-message.entry.js +6 -7
  117. package/dist/esm/bn-template-engine.js +3 -3
  118. package/dist/esm/bn-template.entry.js +4 -5
  119. package/dist/esm/bn-text.entry.js +11 -15
  120. package/dist/esm/bn-tree.entry.js +8 -11
  121. package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-Bz5klD-F.js} +1 -1
  122. package/dist/esm/editor-companion.entry.js +3 -3
  123. package/dist/esm/ibcs-chart-structure.entry.js +5 -7
  124. package/dist/esm/ibcs-chart-time.entry.js +6 -8
  125. package/dist/esm/{index-B27Ax6P_.js → index-JNHhIe7t.js} +2 -2
  126. package/dist/esm/loader.js +3 -3
  127. package/dist/esm/{withDataset-BT2VQCsG.js → scaling-C6K8FYSF.js} +67 -4
  128. package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-DczL5ia8.js} +2 -2
  129. package/dist/esm/{componentRegister-BtVfu16B.js → withComponentStatus-DodoSXe-.js} +36 -1
  130. package/dist/esm/{withComponentStyle-NaxfakAG.js → withComponentStyle-BerJY64r.js} +3 -3
  131. package/dist/esm/{withHasError-C48fTE2k.js → withHasError-B3QX2emi.js} +1 -1
  132. package/dist/esm/{withStyled-CpUTv74m.js → withStyled-DCipbf2O.js} +5 -51
  133. package/dist/esm/{withTranslation-Do4GhleK.js → withTranslation-mimbJdER.js} +3 -3
  134. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +1 -2
  135. package/dist/types/components/bn-title/bn-title.d.ts +0 -1
  136. package/dist/types/components.d.ts +0 -401
  137. package/package.json +2 -3
  138. package/readme.md +0 -1
  139. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
  140. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  141. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  142. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  143. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  144. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  145. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  146. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  147. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  148. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  149. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  150. package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
  151. package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
  152. package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
  153. package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
  154. package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
  155. package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
  156. package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
  157. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
  158. package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
  159. package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
  160. package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
  161. package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
  162. package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
  163. package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
  164. package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
  165. package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
  166. package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
  167. package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
  168. package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
  169. package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
  170. package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
  171. package/dist/bn-template-engine/p-BQp6ZPYW.js +0 -1
  172. package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
  173. package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
  174. package/dist/bn-template-engine/p-CfWnag33.js +0 -1
  175. package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
  176. package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
  177. package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
  178. package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
  179. package/dist/bn-template-engine/p-c9f050bf.entry.js +0 -1
  180. package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
  181. package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
  182. package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
  183. package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
  184. package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
  185. package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
  186. package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
  187. package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
  188. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
  189. package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
  190. package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
  191. package/dist/cjs/Order-B4NIqQWe.js +0 -129
  192. package/dist/cjs/bn-map.cjs.entry.js +0 -425
  193. package/dist/cjs/constants-DHqQXSSd.js +0 -158
  194. package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
  195. package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
  196. package/dist/cjs/scaling-B23eOtsC.js +0 -67
  197. package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
  198. package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
  199. package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
  200. package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
  201. package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
  202. package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
  203. package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
  204. package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
  205. package/dist/collection/components/bn-map/bn-map.css +0 -4
  206. package/dist/collection/components/bn-map/bn-map.js +0 -725
  207. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
  208. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  209. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  210. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  211. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  212. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  213. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  214. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  215. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  216. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  217. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  218. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
  219. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
  220. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
  221. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
  222. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
  223. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
  224. package/dist/collection/test-runner/test-runner-card.js +0 -36
  225. package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
  226. package/dist/collection/test-runner/test-runner-chart.js +0 -364
  227. package/dist/collection/test-runner/test-runner-map.js +0 -1901
  228. package/dist/collection/test-runner/test-runner-table.js +0 -469
  229. package/dist/collection/test-runner/test-runner-time.js +0 -399
  230. package/dist/collection/test-runner/test-runner-title.js +0 -108
  231. package/dist/components/bn-map.d.ts +0 -11
  232. package/dist/components/bn-map.js +0 -1
  233. package/dist/components/componentRegister.js +0 -1
  234. package/dist/components/ibcs-map.d.ts +0 -11
  235. package/dist/components/ibcs-map.js +0 -1
  236. package/dist/components/ibcs-map2.js +0 -1
  237. package/dist/components/test-runner-card.d.ts +0 -11
  238. package/dist/components/test-runner-card.js +0 -1
  239. package/dist/components/test-runner-chart-time.d.ts +0 -11
  240. package/dist/components/test-runner-chart-time.js +0 -1
  241. package/dist/components/test-runner-chart.d.ts +0 -11
  242. package/dist/components/test-runner-chart.js +0 -1
  243. package/dist/components/test-runner-map.d.ts +0 -11
  244. package/dist/components/test-runner-map.js +0 -1
  245. package/dist/components/test-runner-table.d.ts +0 -11
  246. package/dist/components/test-runner-table.js +0 -1
  247. package/dist/components/test-runner-time.d.ts +0 -11
  248. package/dist/components/test-runner-time.js +0 -1
  249. package/dist/components/test-runner-title.d.ts +0 -11
  250. package/dist/components/test-runner-title.js +0 -1
  251. package/dist/components/withDataset.js +0 -1
  252. package/dist/esm/Order-B4fpLe_f.js +0 -125
  253. package/dist/esm/bn-map.entry.js +0 -423
  254. package/dist/esm/constants-kMyLevYy.js +0 -158
  255. package/dist/esm/ibcs-map.entry.js +0 -1073
  256. package/dist/esm/ibcs-title.entry.js +0 -350
  257. package/dist/esm/scaling-BBd0ZVLL.js +0 -64
  258. package/dist/esm/test-runner-card.entry.js +0 -25
  259. package/dist/esm/test-runner-chart-time.entry.js +0 -228
  260. package/dist/esm/test-runner-chart.entry.js +0 -324
  261. package/dist/esm/test-runner-map.entry.js +0 -1860
  262. package/dist/esm/test-runner-table.entry.js +0 -475
  263. package/dist/esm/test-runner-time.entry.js +0 -379
  264. package/dist/esm/test-runner-title.entry.js +0 -113
  265. package/dist/esm/withComponentStatus-elELReKt.js +0 -37
  266. package/dist/types/components/bn-map/bn-map.d.ts +0 -122
  267. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
  268. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
  269. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
  270. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
  271. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
  272. package/dist/types/test-runner/test-runner-card.d.ts +0 -3
  273. package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
  274. package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
  275. package/dist/types/test-runner/test-runner-map.d.ts +0 -3
  276. package/dist/types/test-runner/test-runner-table.d.ts +0 -3
  277. package/dist/types/test-runner/test-runner-time.d.ts +0 -3
  278. package/dist/types/test-runner/test-runner-title.d.ts +0 -3
@@ -1 +1 @@
1
- import{p as e,B as a,c as t,w as i,N as r,a as l,b as o}from"./p-B27Ax6P_.js";export{s as setNonce}from"./p-B27Ax6P_.js";import{g as n}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,o=import.meta.url,n=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((async e=>(await n(),o(JSON.parse('[["p-65f8962a",[[257,"bn-layout-page",{"styles":[1],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}]]],["p-ad94cf63",[[257,"bn-layout-card",{"styles":[1],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}]]],["p-e81e116a",[[0,"test-runner-card"]]],["p-0e7dc113",[[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}]]],["p-8014b1ac",[[1,"bn-chart-time",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}]]],["p-a342cd3c",[[1,"bn-map",{"markersDatasetName":[1,"markers-dataset-name"],"gpxsDatasetName":[1,"gpxs-dataset-name"],"latitude":[1026],"longitude":[1026],"scale":[1026],"manualPosOverride":[1028,"manual-pos-override"],"showScale":[4,"show-scale"],"attribution":[1],"tileLayer":[1,"tile-layer"],"markers":[1],"gpxs":[1],"geojsons":[1],"gpxData":[32],"geojsonData":[32],"markerData":[32],"data":[32]},[[0,"stateUpdated","stateUpdated"],[0,"dragZoomEnded","dragZoomEnded"]],{"markersDatasetName":[{"validateMarkerDatasetName":0}],"gpxsDatasetName":[{"validateGpxsDatasetName":0}],"latitude":[{"validateLatitude":0}],"longitude":[{"validateLongitude":0}],"scale":[{"validateScale":0}],"manualPosOverride":[{"validateManualPosOverride":0}],"showScale":[{"validateShowScale":0}],"attribution":[{"validateAttribution":0}],"tileLayer":[{"validateTileLayer":0}],"markers":[{"validateMarkers":0}],"gpxs":[{"validateGpx":0}],"geojsons":[{"validateGeojson":0}]}]]],["p-efe0ef1e",[[0,"test-runner-chart"]]],["p-fe573a1a",[[0,"test-runner-chart-time"]]],["p-5905cc43",[[0,"test-runner-map"]]],["p-5d155a72",[[0,"test-runner-table"]]],["p-7995acb2",[[0,"test-runner-time"]]],["p-6b8d1ebf",[[0,"test-runner-title"]]],["p-ee6de950",[[1,"bn-asset",{"name":[1]}]]],["p-264c6bad",[[0,"bn-component-style",{"name":[1]}]]],["p-d07a0ca3",[[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4]},null,{"name":[{"nameUpdated":0}]}]]],["p-38a8bde3",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-930a9e29",[[1,"bn-image",{"source":[1]}]]],["p-80423fc8",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-f034f1b8",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-e5f372af",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-f1c1a8a3",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-c9f050bf",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-326a0902",[[257,"bn-card"]]],["p-bc37d750",[[1,"bn-message",{"text":[1025],"image":[1]}]]],["p-eca98070",[[1,"ibcs-map",{"tileLayer":[1537,"tile-layer"],"manualPosOverride":[1540,"manual-pos-override"],"latitude":[1538],"longitude":[1538],"scale":[1538],"customView":[1540,"custom-view"],"showScale":[1540,"show-scale"],"showZoom":[1540,"show-zoom"],"attribution":[1537],"gpxs":[1537],"markers":[1537],"geojsons":[1537],"setProps":[64],"unSetProps":[64]},null,{"tileLayer":[{"parseTileLayer":0}],"manualPosOverride":[{"parseManualPosOverride":0}],"latitude":[{"parseLatitude":0}],"longitude":[{"parseLongitude":0}],"scale":[{"parseScale":0}],"customView":[{"parseCustomView":0}],"showScale":[{"parseShowScale":0}],"showZoom":[{"parseShowZoom":0}],"attribution":[{"parseAttribution":0}],"gpxs":[{"parseGpxLayers":0}],"markers":[{"parseMarkers":0}],"geojsons":[{"parseGeoJson":0}]}]]],["p-7afe431e",[[1,"ibcs-chart-structure",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16]}]]],["p-e620028c",[[1,"ibcs-chart-time",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16]}]]],["p-91e74d42",[[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-datasource",{"name":[1]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-table",{"data":[16],"tableTitle":[1,"table-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}]]],["p-93ff8584",[[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"setBusinessUnit":[64],"setProps":[64]}]]],["p-577eafcd",[[1,"bn-title",{"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}]]]]'),e))));
1
+ import{p as e,B as a,c as t,w as i,N as r,a as l,b as n}from"./p-JNHhIe7t.js";export{s as setNonce}from"./p-JNHhIe7t.js";import{g as o}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,n=import.meta.url,o=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(o.resourcesUrl=new URL(".",n).href),e(o)})().then((async e=>(await o(),n(JSON.parse('[["p-3b894997",[[257,"bn-layout-page",{"styles":[1],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}]]],["p-6c7c0455",[[257,"bn-layout-card",{"styles":[1],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}]]],["p-e102a490",[[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}]]],["p-dd9dd407",[[1,"bn-chart-time",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}]]],["p-701e1578",[[1,"bn-asset",{"name":[1]}]]],["p-37881d05",[[0,"bn-component-style",{"name":[1]}]]],["p-b7bec050",[[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4]},null,{"name":[{"nameUpdated":0}]}]]],["p-35638ad0",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-f89e55c6",[[1,"bn-image",{"source":[1]}]]],["p-05a82a77",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-f27995c9",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-0ca8dc17",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-bc59ea5c",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-0f1504f3",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-50e49732",[[257,"bn-card"]]],["p-6da93eae",[[1,"bn-message",{"text":[1025],"image":[1]}]]],["p-1d9a3be9",[[1,"ibcs-chart-structure",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16]}]]],["p-a95ccc16",[[1,"ibcs-chart-time",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16]}]]],["p-60a7fc59",[[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-datasource",{"name":[1]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-table",{"data":[16],"tableTitle":[1,"table-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}]]],["p-d279b578",[[1,"bn-title",{"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}],[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"setBusinessUnit":[64],"setProps":[64]}]]]]'),e))));
@@ -1 +1 @@
1
- import{V as t}from"./p-1jFf17Vj.js";import{A as r}from"./p-B79VcHiT.js";class s{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,s,i){const e=r,h=s;[1,2,3,4].forEach((s=>{this._scenarioMap.set(t+s,{name:r+s,group:e,colorIndex:h,sortIndex:i+10*s})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(r){if(null==r)return"";const s=new t(r);return s.isValid?s.type+s.delta:r}}class i{adapt(t){return r.adaptDefaultString(t)}default(){return""}}export{s as I,i as S}
1
+ import{V as t}from"./p-1jFf17Vj.js";import{d as r}from"./p-DdexOqTs.js";class s{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,s,i){const e=r,d=s;[1,2,3,4].forEach((s=>{this._scenarioMap.set(t+s,{name:r+s,group:e,colorIndex:d,sortIndex:i+10*s})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(r){if(null==r)return"";const s=new t(r);return s.isValid?s.type+s.delta:r}}class i{adapt(t){return r.adaptDefaultString(t)}default(){return""}}export{s as I,i as S}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as i,g as r}from"./p-JNHhIe7t.js";import{w as o}from"./p-DG-1MR_T.js";import{g as n,f as a}from"./p-DRikHQE-.js";import{w as e}from"./p-CYjZRKdI.js";import{w as h}from"./p-tzFCK9qn.js";const c=class{constructor(s){t(this,s),e(this),this.errors=h(this),o(this,(t=>{this.stores||(this.stores=n(this.element));try{const s=a(JSON.parse(t)),i=Object.assign({},this.stores.internationalization.get(this.namespace));i[this.code]=s,this.stores.internationalization.set(this.namespace,i)}catch(t){console.error(t)}}))}render(){return s(i,{key:"dd384ecf77e4fd5d46ed04b04c4395fba8bac4e1"})}get element(){return r(this)}};c.style="bn-internationalization{display:none}";export{c as bn_internationalization}
@@ -0,0 +1 @@
1
+ import{r as t,h as o,H as i,g as e}from"./p-JNHhIe7t.js";import{w as n,g as s,p as a}from"./p-DVMu6dEy.js";import{w as r}from"./p-CRLgp9-v.js";import{w as l}from"./p-CYjZRKdI.js";import{w as d}from"./p-DyRaC0MB.js";import{w as c}from"./p-BSfqOkN_.js";import{w as f}from"./p-tzFCK9qn.js";import"./p-DRikHQE-.js";import"./p-DdexOqTs.js";import"./p-DgfL-ffj.js";const h=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img"]),v=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),u=/\b(__proto__|globalThis)\b|\.constructor\b/;function p(t){const o=document.createElement("div");return o.innerHTML=t,m(o),o.innerHTML}function m(t){for(const o of Array.from(t.childNodes)){if(o.nodeType!==Node.ELEMENT_NODE)continue;const i=o;if(h.has(i.tagName.toLowerCase())){for(const t of Array.from(i.attributes)){const o=t.name.toLowerCase();o.startsWith("on")||!v.has(o)?i.removeAttribute(t.name):"href"!==o&&"src"!==o||!/^\s*javascript:/i.test(t.value)?"style"===o&&/expression|javascript/i.test(t.value)&&i.removeAttribute(t.name):i.removeAttribute(t.name)}m(i)}else t.replaceChild(document.createTextNode(i.textContent||""),i)}}const b=class{constructor(o){t(this,o),this.data={},d(this),l(this),this.errors=f(this),this.t=r(this).t,n(this,((t,o)=>{this.data=Object.assign(Object.assign({},this.data),{[t]:o})})),this.componentStyle=c(this)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"no_value",type:"warning",message:"Empty value"}):this.errors.remove("no_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const o=Number(t);isNaN(o)||o<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}evalTemplate(t){if(!t)return"";if(u.test(t))return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:"Template contains forbidden pattern"}),"";try{const o=new Proxy({data:this.data,t:this.t},{has:()=>!0,get:(t,o)=>o===Symbol.unscopables?void 0:t[o],set:()=>!0}),i=new Function("sandbox","with(sandbox){try{return`"+t+'`}catch(e){return""}}').call(o,o);return this.errors.remove("ERR_value_eval"),null!=i?String(i):""}catch(t){return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:`Template evaluation failed: ${t instanceof Error?t.message:String(t)}`}),""}}prepareStyle(){return this.componentStyle((t=>{var o,i,e,n,s,a,r,l,d,c,f,h,v,u,p,m,b,g,y,w,_,R;return{fontStyles:{font:`${null!==(n=null!==(i=null===(o=t["bn-text"])||void 0===o?void 0:o.fontSizePx)&&void 0!==i?i:null===(e=t.global)||void 0===e?void 0:e.fontSizePx)&&void 0!==n?n:13.3333}px ${null!==(l=null!==(a=null===(s=t["bn-text"])||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:null===(r=t.global)||void 0===r?void 0:r.fontFamily)&&void 0!==l?l:"'Noto Sans', sans-serif"}`,size:null!==(h=null!==(c=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==c?c:null===(f=t.global)||void 0===f?void 0:f.fontSizePx)&&void 0!==h?h:13.3333,color:null!==(m=null!==(u=null===(v=t["bn-text"])||void 0===v?void 0:v.fontColor)&&void 0!==u?u:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==m?m:"#000000",background:null!==(w=null!==(g=null===(b=t["bn-text"])||void 0===b?void 0:b.fontBackgroundColor)&&void 0!==g?g:null===(y=t.global)||void 0===y?void 0:y.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==(R=null===(_=t["bn-text"])||void 0===_?void 0:_.leading)&&void 0!==R?R:1.8}}}))}applyScaling(t){const o=this.element,{mode:i,factor:e}=a(this.scale),{width:n,height:r}=s(o),l=o.scrollHeight>o.clientHeight+1?o.clientHeight:r,d=n,c=d>0&&o.scrollWidth>d+1,f=l>0&&o.scrollHeight>l+1,h=c||f;if(d<=0&&l<=0)return;if("none"===i){if(h){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===i){if(h){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${e} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}o.style.setProperty("--bn-font-size",`${t}px`);const v=o.scrollWidth,u=o.scrollHeight,p=o.clientHeight,m=u>p+1?p:r,b=d<=0||v<=d+1,g=m<=0||u<=m+1;if(b&&g)return void this.errors.remove("AUTO_scale");const y=Math.min(1,!b&&d>0?d/v:1,!g&&m>0?m/u:1);o.style.setProperty("--bn-font-size",t*y+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${y.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){this.container.innerHTML=p(this.evalTemplate(this.value)),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:e,factor:n}=a(this.scale),s="factor"===e?t.size*n+"px":`${t.size}px`,r={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":s,"--bn-font-color":t.color,"--bn-font-background":t.background};return o(i,{key:"49a4060ebb36623a64a41efbdefcdcc9060457c3",style:r},o("div",{key:"19f66b3d17d38d3c8119f9cb6b046e0d18c0f022"},o("span",{key:"3b8cf9f75aeb668cb0c32a7a3540e0ed8f336050",class:"container",ref:t=>{this.container=t}})))}get element(){return e(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};b.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{b as bn_text}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,F as s,g as i}from"./p-JNHhIe7t.js";import{g as r,B as n}from"./p-DRikHQE-.js";const o=class{constructor(e){t(this,e),this.distinctCache=new Map}connectedCallback(){this.stores=r(this.element)}internationalizationKeys(){return Promise.resolve(n)}getDistinctFromDataSource(t,e){const s=`datasource:${t}:${e}`;if(this.distinctCache.has(s))return Promise.resolve(this.distinctCache.get(s));const i=this.distinct(this.stores.datasources.get(t)||[],e);return this.distinctCache.set(s,i),Promise.resolve(i)}getDistinctFromDataset(t,e){const s=`dataset:${t}:${e}`;if(this.distinctCache.has(s))return Promise.resolve(this.distinctCache.get(s));const i=this.distinct(this.stores.datasets.get(t)||[],e);return this.distinctCache.set(s,i),Promise.resolve(i)}render(){return e(s,{key:"ee282c29dd433c77fddae8e99e844bf299ebfa29"})}distinct(t,e){return[...new Set(t.map((t=>t[e])))].filter((t=>null!=t))}get element(){return i(this)}};o.style="editor-companion{display:none}";export{o as editor_companion}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,g as h}from"./p-JNHhIe7t.js";import{S as e,g as n,a as r,b as o,c as a,I as l,F as c,d as u,e as d,f,P as p}from"./p-CvXqez4D.js";import{d as v,e as g,j as w,A as b,b as P,k as m,a as S,O as L}from"./p-DdexOqTs.js";import{D as y,S as x,b as M}from"./p-DVo6aZUE.js";import{F as T,C as k,V as C}from"./p-1jFf17Vj.js";import{a as A}from"./p-BYmPQYxx.js";import{S as $,I as _}from"./p--PSoPbDM.js";import"./p-BFTU3MAI.js";class O{constructor(t,i,s,h,e,n,r,o){this.categoryPosition={x:0,y:0},this.spacings={scenarioOffset:0,markerOffset:0,scenarioLabelToBar:0,labelToBar:0,labelToAxis:0,needleWidth:0,needleHeadWidth:0,barWidth:0,varianceAxisLineWidth:0,axisLineWidth:0,auxiliaryLineWidth:0,scenarioLineWidth:0,markerWidth:0,categoryWidth:0,axisTickLength:0},this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontSize=s,this.axisPosition={x:0,y:0},this.numberOfColumns=h,this.leftSideLengthSync=e,this.topSideLabelHeight=n>0?this.fontSize:0,this.leftSideLabelLength=this.calculateSideLabelLength(n,r,o),this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}getBarPositionX(){return this.axisPosition.x}getBarCenterPositionY(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth}getBarPositionY(t,i){return i?this.getBarCenterPositionY(t):this.getBarCenterPositionY(t)-this.spacings.scenarioOffset}getCategoryPositionX(t){let i=this.spacings.labelToAxis;return t&&(i=-this.spacings.labelToAxis),this.getAxisPositionX()+i}getAxisTitlePositionX(){return this.axisPosition.x}getAxisTitlePositionY(){return this.axisPosition.y-this.spacings.labelToAxis}getNeedleWidth(){return this.spacings.needleWidth}getAxisPositionX(){return this.leftSideLabelLength+this.padding.left+this.spacings.labelToAxis}getAxisPositionY(){return this.padding.top+this.getAxisTitleOffset()}loadCategoriesBox(t){this.categoriesBoxOffset=t,this.calculateAxisPosition()}addOffsetByNegativeDataPoints(t,i,s,h){null!=t&&null!=t.value&&t.value<0&&(s&&t.isClipped()?this.axisPosition.x+=Math.abs(t.getClippedValue()*t.pixelPerUnit):this.axisPosition.x+=Math.abs(t.value*t.pixelPerUnit),this.axisPosition.x+=i,this.axisPosition.x+=this.spacings.labelToBar),this.axisPosition.x<h/2&&(this.axisPosition.x=h/2+this.spacings.labelToBar)}getLabelPositionX(t){let i=this.spacings.labelToBar;return t<0&&(i*=-1),this.axisPosition.x+t+i}getLabelPositionY(t){return this.axisPosition.y+t+this.spacings.labelToBar}getCategoryToAxisSpaceing(){return this.spacings.labelToAxis}getCategoryToTopSpaceing(){return this.spacings.scenarioOffset}getCategoryToBottomSpaceing(){return this.spacings.scenarioOffset}getAxisEndPositionY(){return this.getAxisPositionY()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getScenarioLabelPositionOffsetY(t){return t?.5*this.getBarWidth()+this.spacings.scenarioLabelToBar:-(.5*this.getBarWidth()+this.spacings.scenarioLabelToBar)}getBarWidth(){return this.spacings.barWidth}getMarkerPositionY(t,i){return i?this.getBarCenterPositionY(t)-this.spacings.markerOffset-.5*this.getBarWidth():this.getBarCenterPositionY(t)+this.spacings.markerOffset+.5*this.getBarWidth()}getMarkerPositionX(){return this.getBarPositionX()}getMarkerScenarioLabelPositionOffsetY(t){return t?-(.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar):this.spacings.scenarioLabelToBar+.5*this.spacings.markerWidth}getAxisEndPositionX(){return this.getAxisPositionX()}calculateSpacings(){this.spacings={scenarioOffset:this.fontSize*this.scaleFactors.scenarioOffset,markerOffset:this.fontSize*this.scaleFactors.markerOffset,scenarioLabelToBar:this.fontSize*this.scaleFactors.scenarioLabelToBar,labelToBar:this.fontSize*this.scaleFactors.labelToBar,labelToAxis:this.fontSize*this.scaleFactors.labelToAxis,needleWidth:this.fontSize*this.scaleFactors.needleWidth,needleHeadWidth:this.fontSize*this.scaleFactors.needleHeadWidth,barWidth:this.fontSize*this.scaleFactors.barWidth,varianceAxisLineWidth:this.fontSize*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontSize*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontSize*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontSize*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontSize*this.scaleFactors.markerWidth,categoryWidth:this.fontSize*this.scaleFactors.categoryWidth,axisTickLength:this.fontSize*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left,y:this.getAxisPositionY()+.5*this.spacings.categoryWidth}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY()}}recalculatePositions(){this.calculateCategoryPosition(),this.calculateAxisPosition()}getAxisTitleOffset(){return this.topSideLabelHeight}calculateSideLabelLength(t,i,s){if(this.leftSideLengthSync)return this.leftSideLengthSync;const h=t/2;let e=i;return h>e&&(e=h),s>e&&(e=s),e}}class E{constructor(t){this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right}addBoxTopLeft(t){return this.top+=t.height|this.top,this.left+=t.width|this.top,this}}class D{constructor(t){const i=1*t,s=.7*t;this.bgOffset=(i-s)/2,this.markerUp={top:s/2+",0",left:"0,"+s,right:s+","+s},this.markerUpBackground={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerDown={bottom:s/2+","+s,left:"0,0",right:s+",0"},this.markerDownBackground={bottom:i/2+","+i,left:"0,0",right:i+",0"}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t}}class R{constructor(t){this.container=new e,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let i=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(i=t.fontStyles.size),this.bgOffset=(1*i-.7*i)/2}createFCPattern(t,i){const s=i;return t.pattern(10,10,(function(t){t.rect(10,10).fill(s.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"})})).id("pattern-structure-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var W,X,N,Y,B;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(W||(W={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(X||(X={}));class V{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new w(new $).default(),this.level=b.CATEGORY,this.filter="",this.measureScale=new x,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.stackConfig=null}}class F{constructor(t,i,s,h,e){this.dataRowAdapter=t,this.orderAdapter=i,this.stringAdapter=s,this.dataFormatDigitsAdapter=h,this.dataSet=e}adapt(t){const i=v.adaptArray(t.data,this.dataRowAdapter),s=v.adaptArray(t.scenarios,this.stringAdapter),h=new V(i,s);return g.isArray(t.variances)&&(h.variances=v.adaptArray(t.variances,this.stringAdapter)),g.isString(t.title)&&(h.title=t.title),g.isBoolean(t.hideCategories)&&(h.hideCategories=t.hideCategories),g.isNumber(t.pixelPerUnit)&&(h.pixelPerUnit=t.pixelPerUnit),g.isNumber(t.pixelPerPercentage)&&(h.pixelPerPercentage=t.pixelPerPercentage),g.isNumber(t.limit)&&(h.limit=t.limit),g.isExisting(t.sortOrder)&&(h.sortOrder=this.orderAdapter.adapt(t.sortOrder)),g.isExisting(t.level)&&(h.level=t.level),g.isString(t.filter)&&(h.filter=t.filter.trim()),g.isExisting(t.measureScale)&&(h.measureScale=y.calculateMeasureScale(this.dataSet,h.scenarios,t.measureScale)),g.isString(t.measureUnit)&&(h.measureUnit=t.measureUnit),g.isBoolean(t.showMeasureScale)&&(h.showMeasureScale=t.showMeasureScale),g.isExisting(t.dataFormatDigits)&&(h.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),g.isExisting(t.stackConfig)&&(h.stackConfig=t.stackConfig),h}default(){return new V([],[])}}class H{constructor(t,i,s,h){this.value=t,this.scenario=i,this.pixelPerUnit=s||1,this.variance="neg"===h||h===N.NEG?N.NEG:"pos"===h||h===N.POS?N.POS:N.NEU}isEmpty(){return null==this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:Math.abs(this.value)>1.45?this.value>=0?1.45*this.pixelPerUnit:-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:N.NEU===this.variance?N.NEU:N.POS===this.variance?N.NEG:N.POS}isClipped(){return null!=this.value&&Math.abs(this.value)>1.45}getClippedValue(){return 145}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class G{constructor(){this.operation="+"}addRowGroup(t,i){this.rowGroup=t,this.rowGroupIndex=i}addCategory(t,i){this.category=t,this.categoryIndex=i}addSubCategory(t,i){this.subCategory=t,this.subCategoryIndex=i}addColumnGroup(t,i){this.columnGroup=t,this.columnGroupIndex=i}addSubColumnGroup(t,i){this.columnSubGroup=t,this.columnSubGroupIndex=i}}class U{constructor(){}adapt(t){const i=new G;return g.isOperator(t.operation)&&(i.operation=t.operation),g.isNumber(t.rowGroupIndex)&&g.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),g.isNumber(t.categoryIndex)&&g.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),g.isNumber(t.subCategoryIndex)&&g.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),g.isNumber(t.columnGroupIndex)&&g.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),g.isNumber(t.columnSubGroupIndex)&&g.isString(t.columnSubGroup)&&i.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,i),this.setPlanValues(t,i),this.setPreviousPeriodValues(t,i),this.setForecastValues(t,i),i}default(){return new G}setActualValues(t,i){g.isNumber(t.ac1)&&(i.ac1=t.ac1),g.isNumber(t.ac2)&&(i.ac2=t.ac2),g.isNumber(t.ac3)&&(i.ac3=t.ac3),g.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){g.isNumber(t.pl1)&&(i.pl1=t.pl1),g.isNumber(t.pl2)&&(i.pl2=t.pl2),g.isNumber(t.pl3)&&(i.pl3=t.pl3),g.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){g.isNumber(t.pp1)&&(i.pp1=t.pp1),g.isNumber(t.pp2)&&(i.pp2=t.pp2),g.isNumber(t.pp3)&&(i.pp3=t.pp3),g.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){g.isNumber(t.fc1)&&(i.fc1=t.fc1),g.isNumber(t.fc2)&&(i.fc2=t.fc2),g.isNumber(t.fc3)&&(i.fc3=t.fc3),g.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class z{constructor(t,i,s,h,e,n){this.scaleFactors=t,this.fontStyles=i,this.axisStyles=s,this.barStyles=h,this.varianceStyles=e,this.padding=n,this.pattern=new Map}}class j{constructor(t,i,s,h,e){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=i,this.svgStyleGroupAdapter=s,this.svgVariancesStyleGroupAdapter=h,this.paddingadapter=e}adapt(t){const i=new z(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return g.isExisting(t)&&(g.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),g.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),g.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),g.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),g.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),g.isExisting(t.padding)&&(i.padding=this.paddingadapter.adapt(t.padding)),i.pattern=new D(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new z(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}class I{constructor(){this.scenarioOffset=.3,this.scenarioLabelToBar=.1,this.labelToBar=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.barWidth=1.2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=1.9,this.axisTickLength=.3}}class K{adapt(t){const i=new I;return g.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),g.isNumber(t.scenarioLabelToBar)&&(i.scenarioLabelToBar=t.scenarioLabelToBar),g.isNumber(t.labelToBar)&&(i.labelToBar=t.labelToBar),g.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),g.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),g.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),g.isNumber(t.barWidth)&&(i.barWidth=t.barWidth),g.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),g.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),g.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),g.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),g.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),g.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),g.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),g.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new I}}!function(t){t.AC1="ac1",t.PP1="pp1",t.FC1="fc1",t.PL1="pl1",t.AC2="ac2",t.PP2="pp2",t.FC2="fc2",t.PL2="pl2",t.AC3="ac3",t.PP3="pp3",t.FC3="fc3",t.PL3="pl3",t.AC4="ac4",t.PP4="pp4",t.FC4="fc4",t.PL4="pl4",t.POS="pos",t.NEG="neg",t.NEU="neu"}(N||(N={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(Y||(Y={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(B||(B={}));class q{constructor(t,i,s,h,e,n,r,o){this.group=null,this.segmentFillColor=null,this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.x=i,this.y=s,this.value=e,null!=t&&(this.group=t.group().id(this.createElementID(t.toString(),h))),this.styles=n,this.isVarianceLabel=!1,this.isRelativeLabel=!1,this.verticalHookLocation=r||B.Top,this.horizontalHookLocation=o||B.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}draw(t={percent:2,decimal:1},i=new x){if(this.isEmpty())return this;const s=this.group;let h;const e=this.styles.fontStyles.background||"#ffffff";let r="",o="start";if(!1===Number.isNaN(Number(this.value))){let s=t.percent,e=t.percent,n=1,a="percent";!1===this.isRelativeLabel&&(s=t.decimal,e=t.decimal,n=i.value,a="decimal"),h=T.number(Number(this.value),a,s,e,n),Number(this.value)<0&&(o="end"),this.isVarianceLabel&&Number(this.value)>=0&&(r="+")}else h=""+this.value,o="start";const a=s.text(r+h);a.move(this.x,this.y);const l=a.bbox().w,c=a.bbox().h;return this.horizontalHookLocation===B.Right?(o="end",a.move(a.x()-a.length(),a.y())):this.horizontalHookLocation===B.Center&&(o="middle",a.move(a.x()-a.length()/2,a.y())),this.verticalHookLocation===B.Center?a.move(a.x(),a.y()-c/2):this.verticalHookLocation===B.Bottom&&a.move(a.x(),a.y()-c),a.font({anchor:o}),null!=this.segmentFillColor?a.fill(n(this.segmentFillColor)):null==s||s.rect(l,.9*c).stroke(e).fill(e).opacity(.7).move(a.x(),a.y()+.1*c).insertBefore(a),this}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}}class Z{constructor(t,i,s,h){this.height=0,this.ID_AXIS="axis",this.ID_AXIS_TITLE="axis-title",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.position=i,this.style=h,this.label=new q(s,this.position.getAxisTitlePositionX(),this.position.getAxisTitlePositionY(),this.ID_AXIS_TITLE,this.labelText,this.style,B.Bottom,B.Center),this.svgGroup=s.group().id(this.ID_AXIS)}draw(){return this.labelText&&this.label.draw(),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(),this.position.getAxisEndPositionX(),this.position.getAxisEndPositionY()).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this.height=this.svgGroup.height(),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class Q{constructor(t,i,s,h,e,n,r,o=null){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.barGroup=null,this.isVarianceBar=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveWidth=0,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.isPrimaryBar=e,this.position=t,this.barStyles=i.barStyles,this.overflowConfig=o,this.scenarioGroup=n,this.styles=i,null!=n&&(this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT)),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0;let i=B.Left;s.value<0&&(i=B.Right),this.dimensions=this.createDimensions(t,s,h,e),this.label=new q(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,B.Center,i),this.scenarioLabel=this.getScenarioLabel(r)}}setAsVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}isRelativeVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToRelativeVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new x){if(this.isEmpty()||null==this.dataPoint.getScenario())return this;let s=this.barStyles.getSVGStyle(this.dataPoint.getScenario());this.isVarianceBar&&(s=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()));const h=this.convertToSVGStyle(s,"stroke");let e=this.convertToSVGStyle(s,"fill");const n=this.barStyles.getSVGStyle(this.dataPoint.getScenario()).fillpattern;if(null!=n){const t=this.styles.pattern.get(n);null!=t&&(e=t.pattern)}null!=this.barGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(e,h):this.barGroup.rect(this.dimensions.barLength,this.position.getBarWidth()).fill(e).stroke(h).cy(this.dimensions.yPos).x(this.dimensions.xPos)),this.drawBarDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.barGroup||!this.overflowConfig)return;const s=this.position.getBarPositionX(),h=this.position.getBarWidth(),e=this.dimensions.barLength,{breakGap:n}=this.overflowConfig;this.dataPoint.getScaledUnit()<0?(this.barGroup.rect(e,h).fill(t).stroke(i).x(s-e).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s-e-n-this.overdriveWidth).cy(this.dimensions.yPos),this.drawBreakIndicator(s-e-n,n)):(this.barGroup.rect(e,h).fill(t).stroke(i).x(s).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s+e+n).cy(this.dimensions.yPos),this.drawBreakIndicator(s+e,n))}drawBreakIndicator(t,i){if(!this.barGroup)return;const s=this.position.getBarWidth(),h=this.dimensions.yPos-s/2,e=t+i/2,n=.35*i,r=s/3;let o=`M ${e-n} ${h}`;for(let t=0;t<3;t++)o+=` L ${e-n-.3*i} ${h+r*(t+.5)} L ${e-n} ${h+r*(t+1)}`;let a=`M ${e+n} ${h}`;for(let t=0;t<3;t++)a+=` L ${e+n+.3*i} ${h+r*(t+.5)} L ${e+n} ${h+r*(t+1)}`;this.barGroup.rect(i,s+2).fill("#ffffff").stroke("none").x(t).cy(this.dimensions.yPos),this.barGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.barGroup.path(a).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s,h){const e=i.getScaledUnit(),n=Math.abs(e);if(this.overflowConfig&&n>0){const r="ac"===i.getScenario()?this.overflowConfig.cutWidth:this.overflowConfig.cutWidth-this.overflowConfig.scenarioCutOffset;if(n>r){this.isOverflowing=!0;const{breakGap:i,overdriveZoneWidth:o,maxOverflow:a}=this.overflowConfig;this.overdriveWidth=a>0?(n-r)/a*o:0;const l=r+i+this.overdriveWidth;return e<0?{clipped:!1,barLength:r,xPos:t.getBarPositionX()-r,yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(-l),scenarioLabelXPos:t.getBarPositionX()-.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:r,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(l),scenarioLabelXPos:t.getBarPositionX()+.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}}}return e<0?{clipped:!1,barLength:n,xPos:t.getBarPositionX()+e,yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()-.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:e,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()+.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceBar||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw()}drawBarDataLabel(t,i=new x){var s;this.isPrimaryBar&&(null===(s=this.label)||void 0===s||s.draw(t,i))}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getScenarioLabel(t){return new q(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,this.isPrimaryBar?B.Top:B.Bottom,B.Center)}}class J{constructor(t,i,s,h,e,n,r,o,a){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=i||null,this.markerPattern=s||this._defaultMarkerPattern,this.styles=e,this.barStyles=e?e.barStyles:null,this.scenario=h,!0!==(null==n?void 0:n.isEmpty())&&(this.hasData=!0,this.dimensions=this.createMarkerDimensions(n,r,a),this.scenarioLabel=this.getScenarioLabel(o,e,a))}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelXPos:0,barLength:Math.abs(t.getScaledUnit()),xPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}:{clipped:!1,labelXPos:0,barLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX()+t.getScaledUnit(),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()+t.getScaledUnit(),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new q(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,s?B.Bottom:B.Top,B.Center)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let i=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const s=this.barStyles[this.getScenario()];if(null!=s&&s.fillpattern){const t=this.styles.pattern.get(s.fillpattern);null!=t&&(i=t.pattern)}return this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class tt{constructor(t,i,s,h,e){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.position=t,this.barStyles=i.barStyles,this.scenarioGroup=e,this.styles=i,this.barGroup=e.group().id(e.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0,this.dimensions=this.createDimensions(t,s,h);let i=B.Left;s.value<0&&(i=B.Right),this.label=new q(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,B.Center,i),this.label.setToRelativeVarianceLabel()}}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;if(null==this.dimensions)return this;const i=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()),s=i.stroke;let h=i.fill;const e=this.barStyles[this.dataPoint.getScenario()];if(null!=e&&e.fillpattern){const t=this.styles.pattern.get(e.fillpattern);null!=t&&null!=t.pattern&&(h=t.pattern)}this.drawNeedleHead(h,s),this.barGroup.rect(this.dimensions.barLength,this.position.getNeedleWidth()).fill(h).stroke(s).cy(this.dimensions.yPos).x(this.dimensions.xPos),null===(t=this.label)||void 0===t||t.draw()}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{barLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getBarPositionX()+i.getScaledPercentUnit(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()-this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}:{barLength:i.getScaledPercentUnit(),xPos:t.getBarPositionX(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()+this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}}drawNeedleHead(t,i){if(null===this.dimensions)return;const s=this.styles.varianceStyles.needleHeadColour,h=this.styles.varianceStyles.needleHeadColour;if(this.dimensions.clipped){let s="13,0 4,-5 4,5 13,0 8,0 0,-5 0,5 8,0";null!=this.dataPoint.value&&this.dataPoint.value<0&&(s="0,0 9,-5 9,5 0,0 5,0 13,-5 13,5 5,0"),this.barGroup.polygon(s).fill(t).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(t).stroke(i)}else this.barGroup.rect(2*this.position.getNeedleWidth(),2*this.position.getNeedleWidth()).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(s).stroke(h)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadXPosition(){let t=this.dimensions.xPos;return null!=this.dataPoint.value&&this.dataPoint.value>0&&(t+=this.dimensions.barLength),t}}class it{constructor(t,i,s,h,e,n,r,o,a,l,c){this.hasData=!1,this.position=t,this.styles=i,this.dataPoint=s,this.index=h,this.baselineValue=e,this.segmentIndex=r,this.stackMode=o,this.totalValue=a,this.group=c,this.barGroup=c.group().id(`stacked_bar_${h}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new x){if(!this.hasData||null==this.dataPoint.value)return;const s=this.dataPoint.value,h=this.dataPoint.pixelPerUnit,e=this.position.getBarPositionX(),n=this.position.getBarWidth();let a,l;if(this.stackMode===P.RELATIVE){const t=h;a=(0!==this.totalValue?Math.abs(s)/Math.abs(this.totalValue):0)*t,l=e+this.baselineValue/Math.abs(this.totalValue)*t}else a=Math.abs(s*h),l=e+this.baselineValue*h;const c=this.position.getBarPositionY(this.index,!0),u=r(this.segmentIndex),d={color:u},f={color:o(this.segmentIndex),width:.5};if(this.barGroup.rect(Math.max(a,.5),n).fill(d).stroke(f).cy(c).x(l),a>=30){const h=l+a/2;if(this.stackMode===P.RELATIVE||this.stackMode===P.ABSOLUTE_RELATIVE){const i=(0!==this.totalValue?s/this.totalValue*100:0).toFixed(t.percent)+"%";new q(this.group,h,c,"STACK_SEG",i,this.styles,B.Center,B.Center).setSegmentFill(u).draw()}else new q(this.group,h,c,"STACK_SEG",s,this.styles,B.Center,B.Center).setSegmentFill(u).draw(t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new x){if(this.stackMode===P.RELATIVE)return;const s=this.position.getBarPositionX()+this.totalValue*this.dataPoint.pixelPerUnit+this.position.spacings.labelToBar,h=this.position.getBarPositionY(this.index,!0);new q(this.group,s,h,"STACK_TOTAL",this.totalValue,this.styles,B.Center,B.Left).draw(t,i)}}class st{constructor(t,i,s,h,e){this.overflowConfig=null,this.i18n=e;const n=i.group().id("Scenario1"),r=i.group().id("Scenario2").insertBefore(n);this.svgGroups={parent:i,scenario1:n,scenario2:r,scenario3:i.group().id("Scenario3"),scenario4:i.group().id("Scenario4"),scenario1Label:i.group().id("label")},this.styles=s,this.position=t,this.elementCnt=h}setOverflowConfig(t){this.overflowConfig=t}isLastDataPoint(t){return this.elementCnt-1===t}isFirsttDataPoint(t){return 0===t}createPrimaryBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o)}createVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o).setAsVariance()}createRelativeVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);return new tt(this.position,this.styles,t,i,r).updateLabelGroup(o)}createSecondaryBar(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario2)||void 0===h?void 0:h.group().id(""+i);let n=null;return this.isFirsttDataPoint(i)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!1,e,n,this.overflowConfig)}createPrimaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario3)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-down")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isFirstDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new J(this.position,e,n,t.scenario,this.styles,t,i,r,!0)}createSecondaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario4)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-up")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isLastDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new J(this.position,e,n,t.scenario,this.styles,t,i,r,!1)}isFirstDataPoint(t){return 0===t}}class ht{constructor(t,i,s){this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new H(0,N.AC1,1,N.NEU),this.highestDataPointValue=new H(0,N.AC1,1,N.NEU),this.smallestVarianceDataPointValue=new H(0,N.AC1,1,N.NEU),this.highestVarianceDataPointValue=new H(0,N.AC1,1,N.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideCategories=!1,this.axisScenario=N.AC1,this.CSS_CATEGORIES="categories",this.preparedDataSet=[],this.state=W.DIRTY,this.titleLength=0,this.leftSideOffsetForHorizontalSync=0,this.limit=0,this.measureScale=new x,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.overflowConfig=null,this.initSQLFunctions(),this.ruleSet=t||new _,this.i18n=this.createI18n(new Map),this.styles=s,this.setConfig(i),this.position=this.createElementPosition()}updatePosition(){this.position=this.createElementPosition()}createElementPosition(){this.titleLength=this.calculateTitleLength(0);let t=this.calculateLeftSideWidth(this.getVarianceType());const i=this.calculateCategoryWidth();return this.titleLength>t&&(t=this.titleLength),new O(new E(this.styles.padding),this.styles.scaleFactors,this.styles.fontStyles.size,this.dataModel.length,this.leftSideOffsetForHorizontalSync,this.titleLength,t,i)}initSQLFunctions(){A.fn.transformOperator=function(t){return"-"===t?-1:1}}setStyles(t){this.styles=t}setConfig(t){var i;this.state=W.DIRTY,this.sortScenariosbyVisualisationRules(t),this.hideCategories=t.hideCategories||!1,this.limit=t.limit,this.pixelPerUnit=t.pixelPerUnit||1,this.pixelPerPercentage=t.pixelPerPercentage||100,this.setData([...t.data],t.filter),this.dataModel=this.populateModel(t.scenarios,t.level,t.sortOrder),t.stackConfig&&t.stackConfig.by!==m.SCENARIO&&this.populateDimensionStackSegments(t.scenarios,t.stackConfig,t.level),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||T.translateScenarioLabel(null===(i=null==t?void 0:t.variances)||void 0===i?void 0:i.toString(),this.i18n),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.stackConfig=t.stackConfig,this.updatePosition()}sortScenariosbyVisualisationRules(t){const i=this;t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))).reverse()}setI18n(t){this.i18n=this.createI18n(t)}createI18n(t){this.state=W.DIRTY;const i=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...i,...t])}setData(t,i){if(null!=t)if(this.state=W.DIRTY,this.preparedDataSet.length=0,null!=i&&i.length>0)try{this.preparedDataSet=A(`SELECT * FROM ? WHERE ${i}`,[t])}catch(s){console.error("StructureChart: filter query failed, using unfiltered data",i,s),this.preparedDataSet=t}else this.preparedDataSet=t}getAllocatedCanvasWidth(){const t=this.position.getAxisPositionX(),i=this.calculateRightSideWidth(this.getVarianceType());let s=t+i+ +this.styles.padding.left+this.styles.padding.right;return i<this.titleLength/2&&(s+=this.titleLength/2),t<this.titleLength/2&&(s+=this.titleLength/2),s}getAllocatedCanvasHeight(){return(this.dataModel.length+1)*this.position.spacings.categoryWidth+this.styles.padding.top+this.styles.padding.bottom}patternToString(){return"<svg></svg>"}toString(){const t=new e;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===W.DIRTY&&(this.state=W.UP_TO_DATE),this.variancesDataModel&&this.variancesDataModel.length>0?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}setPattern(t,i){this.styles.pattern.set(t,i)}calculateTitleLength(t){const i=k(this.title.length>7?this.title:"_______",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return i<t?t:i/2}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":T.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}setAxisScenario(t){let i=N.AC1;if(null!=t&&t.length>0){const s=new C(t.toString());s.isValid&&(i=s.delta)}return null===i&&(i=N.AC1),i}populateModel(t,i,s){var h;if(0===(null===(h=this.preparedDataSet)||void 0===h?void 0:h.length))return[];const e=[],n=this.createOrderStr(i,s),r=this.createSelectString(i,s),o=this.createGroupByStr(i,s),a=A(`SELECT ${r} ${t.length>0?","+t.map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(","):""} \n FROM ?\n GROUP BY ${o}\n ORDER BY ${n}`,[this.preparedDataSet]);return this.detectNaNCells(t,a),this.createDataRows(a,e,t),this.crateRESTRow(a,t,e),e}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new C(t);!0===s.isValid?0!==i[s.base+"_cnt"]&&0!==i[s.delta+"_cnt"]||(i[t]=Number.NaN):0===i[t+"_cnt"]&&(i[t]=Number.NaN)})),i)))}crateRESTRow(t,i,s){if(0===this.limit||this.limit>t.length)return;const h=[],e=t.slice(this.limit,t.length);this.createDataRows(e,h,i);const n=h.reduce((function(t,s){return{id:t.id,category:t.category,type:t.type,scenario1:new H(t.scenario1.value+s.scenario1.value,i[0],t.scenario1.pixelPerUnit,N.NEU),scenario2:new H(t.scenario2.value+s.scenario2.value,i[1],t.scenario2.pixelPerUnit,N.NEU),scenario3:new H(t.scenario3.value+s.scenario3.value,i[2],t.scenario3.pixelPerUnit,N.NEU),scenario4:new H(t.scenario4.value+s.scenario4.value,i[3],t.scenario4.pixelPerUnit,N.NEU)}}),{id:9999,category:"REST",type:X.NONE,scenario1:new H(0,i[0],this.pixelPerUnit,N.NEU),scenario2:new H(0,i[1],this.pixelPerUnit,N.NEU),scenario3:new H(0,i[2],this.pixelPerUnit,N.NEU),scenario4:new H(0,i[3],this.pixelPerUnit,N.NEU)});s.push(n)}createDataRows(t,i,s){let h=t;this.limit>0&&(h=t.slice(0,this.limit)),h.forEach(((t,h)=>{i.push({id:h,category:t.category,type:X.NONE,scenario1:new H(t[s[0]],s[0],this.pixelPerUnit,N.NEU),scenario2:new H(t[s[1]],s[1],this.pixelPerUnit,N.NEU),scenario3:new H(t[s[2]],s[2],this.pixelPerUnit,N.NEU),scenario4:new H(t[s[3]],s[3],this.pixelPerUnit,N.NEU)})}))}createOrderStr(t,i){let s=`${t.toLowerCase()}`;return i.hierarchy.length>=1&&(s=`${i.hierarchy.toString()} ${null==i?void 0:i.direction}`),s}createSelectString(t,i){return t===b.CATEGORY&&i.hierarchy.includes(S.CATEGORYINDEX)?`${S.CATEGORYINDEX}, ${b.CATEGORY} as category`:t===b.ROWGROUP&&i.hierarchy.includes(S.ROWGROUPINDEX)?`${S.ROWGROUPINDEX}, ${b.ROWGROUP} as category`:t===b.SUBCATEGORY&&i.hierarchy.includes(S.SUBCATEGORYINDEX)?`${S.SUBCATEGORYINDEX}, ${b.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,i){return t===b.CATEGORY&&i.hierarchy.includes(S.CATEGORYINDEX)?`${S.CATEGORYINDEX}, ${b.CATEGORY}`:t===b.ROWGROUP&&i.hierarchy.includes(S.ROWGROUPINDEX)?`${S.ROWGROUPINDEX}, ${b.ROWGROUP}`:t===b.SUBCATEGORY&&i.hierarchy.includes(S.SUBCATEGORYINDEX)?`${S.SUBCATEGORYINDEX}, ${b.SUBCATEGORY}`:`${t.toString()}`}calculateCategoryWidth(){if(this.hideCategories)return 5;let t=0;for(const i of this.dataModel){const s=k(i.category,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"});s.width>t&&(t=s.width)}return 1.1125*t}findSmallestDataPointValue(t){let i=new H(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value<i.value&&(i=t);return i}findHighestDataPointValue(t){let i=new H(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value>i.value&&(i=t);return i}populateVarianceModel(t,i){const s=[];if(0===t.length)return s;let h=null;null!=i&&i.length>0&&(h=i[0]);for(const e in t){const n=new C(t[e]);if(n.isValid){const t=this.mapScenarios(n,h),e=n.direction;let r=this.pixelPerUnit;"dr"===n.type&&(r=this.pixelPerPercentage);for(const h in i)s.push({id:Number(h),category:i[h].category,type:"dr"===n.type?X.RELATIVE:X.ABSOLUTE,scenario1:new H(this.calculateVariance(n,i[h],t),n.base,r,e),scenario2:new H(null,null,null,null),scenario3:new H(null,null,null,null),scenario4:new H(null,null,null,null)})}}return s}calculateVariance(t,i,s){const h=s.get(t.base),e=s.get(t.delta);return null==h||null==e?null:t.type===X.RELATIVE?(i[h].value-i[e].value)/i[e].value:i[h].value-i[e].value}mapScenarios(t,i){const s=new Map;return null==i||["scenario1","scenario2","scenario3","scenario4"].forEach((h=>{i[h].scenario===t.delta?s.set(t.delta,h):i[h].scenario===t.base&&s.set(t.base,h)})),s}calculateTextBoxWidth(t){return k(T.number(t,"decimal",1,0),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}calculatePercentageTextBoxWidth(t){let i=0;return t>=0&&(i+=k("+",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width),i+=k(" %",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,k(T.number(t,"decimal",1,1),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width+i+i}cleanSVGforRedraw(t){t.clear()}drawAxisAndLabels(t,i){const s=i.group().id("AxisAndDateLables");let h=!1;this.hideCategories||t.forEach(((t,i)=>{t.type===X.RELATIVE&&(h=!0);let e=B.Right,n=!0;t.scenario1.value<0&&(e=B.Left,n=!1),new q(s,this.position.getCategoryPositionX(n),this.position.getBarCenterPositionY(i),"",t.category,this.styles,B.Center,e).draw()})),new Z({scenarioType:this.axisScenario,labelText:this.title,isRelative:h},this.position,s,this.styles).draw()}drawScenarios(t,i){const s=i.group().id("Scenarios"),h=new st(this.position,s,this.styles,t.length,this.i18n);h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{h.createPrimaryBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale),h.createSecondaryBar(t.scenario2,i).draw(),h.createPrimaryMarker(t.scenario3,i).draw(),h.createSecondaryMarker(t.scenario4,i).draw()}))}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),h=new st(this.position,s,this.styles,t.length,this.i18n);return h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===X.RELATIVE?h.createRelativeVarianceBar(t.scenario1,i).draw():h.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),s}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),h=this.stackConfig.by===m.SCENARIO;t.forEach(((t,i)=>{const e=["scenario1","scenario2","scenario3","scenario4"],n=[];if(h)for(const i of e){const s=t[i];s&&!s.isEmpty()&&null!=s.value&&n.push({value:s.value,scenario:s.scenario,dataPoint:s})}else{const i=t.scenario1;i&&!i.isEmpty()&&null!=i.value&&n.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0!==n.length)if((h?new Set(n.map((t=>a(t.scenario)))):new Set).size>1){const t=new Map;for(const i of n){const s=a(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const h=[];for(const i of l)t.has(i)&&(h.push({prefix:i,segments:t.get(i)}),t.delete(i));for(const[i,s]of t)h.push({prefix:i,segments:s});h.forEach(((t,e)=>{const n=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),r=h.length-1-e;let o=0,a=null;t.segments.forEach((t=>{const h=new it(this.position,this.styles,t.dataPoint,i,o,t.scenario,r,this.stackConfig.mode,n,!0,s);h.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),a=h})),a&&a.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{let e=n;!h&&t.stackSegments&&t.stackSegments.length>0&&(e=t.stackSegments.map((t=>({value:t.value,scenario:t.label,dataPoint:t.dataPoint})))),"asc"===this.stackConfig.order?e.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&e.sort(((t,i)=>i.value-t.value));const r=e.reduce(((t,i)=>t+Math.abs(i.value)),0);let o=0,a=null;e.forEach(((t,e)=>{const n=new it(this.position,this.styles,t.dataPoint,i,o,t.scenario,e,this.stackConfig.mode,r,h,s);n.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),a=n})),a&&a.drawTotalLabel(this.dataFormatDigits,this.measureScale)}}))}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;const s=this.stackConfig.by===m.SCENARIO,h=i.group().id("StackedHeaders"),e=t[0];if(!s){const t=e.stackSegments;if(!t||0===t.length)return;const i=[...t];"asc"===this.stackConfig.order?i.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&i.sort(((t,i)=>i.value-t.value));const s=i.reduce(((t,i)=>t+Math.abs(i.value)),0),n=this.position.getBarPositionX(),r=this.position.getAxisTitlePositionY();let o=0;return void i.forEach((t=>{const i=t.dataPoint.pixelPerUnit;let e;e=this.stackConfig.mode===P.RELATIVE?(0!==s?Math.abs(t.value)/s:0)*i:Math.abs(t.value*i);const a=n+o+e/2,l=this.i18n.get(t.label)||t.label;new q(h,a,r,"STACK_HEADER",l,this.styles,B.Bottom,B.Center).draw(),o+=e}))}const n=["scenario1","scenario2","scenario3","scenario4"],r=[];for(const t of n){const i=e[t];i&&!i.isEmpty()&&null!=i.value&&r.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===r.length)return;const o=new Set(r.map((t=>a(t.scenario)))),c=this.position.getBarPositionX(),u=this.position.getAxisTitlePositionY();if(o.size>1){const t=new Map;for(const i of r){const s=a(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const i=[];for(const s of l)t.has(s)&&(i.push({prefix:s,segments:t.get(s)}),t.delete(s));for(const[s,h]of t)i.push({prefix:s,segments:h});i.forEach((t=>{const i=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),s=t.segments[0].dataPoint.pixelPerUnit,e=c+(this.stackConfig.mode===P.RELATIVE?s:i*s)/2,n=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new q(h,e,u,"STACK_HEADER",n,this.styles,B.Bottom,B.Center).draw()}))}else{"asc"===this.stackConfig.order?r.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&r.sort(((t,i)=>i.value-t.value));const t=r.reduce(((t,i)=>t+Math.abs(i.value)),0);let i=0;r.forEach((s=>{const e=s.dataPoint.pixelPerUnit;let n;n=this.stackConfig.mode===P.RELATIVE?(0!==t?Math.abs(s.value)/t:0)*e:Math.abs(s.value*e);const r=c+i+n/2,o=this.i18n.get(s.scenario)||s.scenario;new q(h,r,u,"STACK_HEADER",o,this.styles,B.Bottom,B.Center).draw(),i+=n}))}}getVarianceType(){return this.variancesDataModel.length>0?this.variancesDataModel[0].type:X.NONE}calculateLeftSideWidth(t){var i,s,h;let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(X.NONE===t&&null!=(null===(i=this.smallestDataPointValue)||void 0===i?void 0:i.value)&&this.smallestDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestDataPointValue.value);e=Math.abs(this.smallestDataPointValue.getScaledUnit())+n+t}else if(X.RELATIVE===t&&null!=(null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculatePercentageTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(X.ABSOLUTE===t&&null!=(null===(h=this.smallestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}calculateRightSideWidth(t){var i,s,h;let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(X.NONE===t&&null!=(null===(i=this.highestDataPointValue)||void 0===i?void 0:i.value)&&this.highestDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestDataPointValue.value);e=Math.abs(this.highestDataPointValue.getScaledUnit())+n+t}else if(X.RELATIVE===t&&null!=(null===(s=this.highestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculatePercentageTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(X.ABSOLUTE===t&&null!=(null===(h=this.highestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}populateDimensionStackSegments(t,i,s){var h;if(0===(null===(h=this.preparedDataSet)||void 0===h?void 0:h.length)||0===t.length)return;const e={[m.CATEGORY]:"category",[m.SUBCATEGORY]:"subCategory",[m.ROWGROUP]:"rowGroup"}[i.by];if(!e)return;const n=s.toString(),r=t[0],o=A(`SELECT [${n}] as displayGroup, [${e}] as stackLabel, SUM([${r}] * transformOperator(operation)) as stackValue FROM ? GROUP BY [${n}], [${e}]`,[this.preparedDataSet]),a=new Map;for(const t of o){const i=t.displayGroup;a.has(i)||a.set(i,[]),null!=t.stackValue&&null!=t.stackLabel&&a.get(i).push({label:t.stackLabel,value:t.stackValue})}for(const t of this.dataModel){const i=a.get(t.category);t.stackSegments=i&&i.length>0?i.map((t=>({label:t.label,value:t.value,dataPoint:new H(t.value,r,this.pixelPerUnit,N.NEU)}))):[]}}hasNoData(){return 0===this.dataModel.length}setAvailableWidth(t){if(this.pixelPerUnit<=0||t<=0)this.overflowConfig=null;else if(null==this.stackConfig){if(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig){const{cutWidth:t,overdriveZoneWidth:i,breakGap:s}=this.overflowConfig,h=t+i+s;this.variancesDataModel&&this.variancesDataModel.length>0?(this.highestVarianceDataPointValue.getScaledUnit()>t&&(this.highestVarianceDataPointValue=new H(h,this.highestVarianceDataPointValue.scenario,1,this.highestVarianceDataPointValue.variance)),null!=this.smallestVarianceDataPointValue.value&&Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())>t&&(this.smallestVarianceDataPointValue=new H(-h,this.smallestVarianceDataPointValue.scenario,1,this.smallestVarianceDataPointValue.variance))):(this.highestDataPointValue.getScaledUnit()>t&&(this.highestDataPointValue=new H(h,this.highestDataPointValue.scenario,1,this.highestDataPointValue.variance)),null!=this.smallestDataPointValue.value&&Math.abs(this.smallestDataPointValue.getScaledUnit())>t&&(this.smallestDataPointValue=new H(-h,this.smallestDataPointValue.scenario,1,this.smallestDataPointValue.variance))),this.updatePosition()}}else this.overflowConfig=null}calculateOverflowConfig(t){const i=this.variancesDataModel&&this.variancesDataModel.length>0;if(this.getVarianceType()===X.RELATIVE)return null;const s=i?this.highestVarianceDataPointValue:this.highestDataPointValue,h=i?this.smallestVarianceDataPointValue:this.smallestDataPointValue,e=s.getScaledUnit(),n=null!=h.value?Math.abs(h.getScaledUnit()):0,r=Math.max(e,n);if(r<=0)return null;const o=this.styles.fontStyles.size,a=o*this.styles.scaleFactors.labelToBar,l=1.5*o,c=.3*o,u=.8*o,d=t-this.position.getAxisPositionX()-this.styles.padding.left-this.styles.padding.right-a-this.calculateTextBoxWidth(s.value||0)-l-c;if(d<=u)return null;const f=d-u;return r<=f?null:{cutWidth:d,overdriveZoneWidth:l,breakGap:c,maxOverflow:r-f,scenarioCutOffset:u}}}const et=class{constructor(i){t(this,i),this.data=[],this.chartTitle="",this.scenarios=[],this.variances=[],this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.i18n=new Map,this.order={hierarchy:[],direction:L.ASC},this.level=b.CATEGORY,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.parentDimensions={width:0,height:0}}render(){var t,h,e;if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:null===(t=this.pattern)||void 0===t?void 0:t.toString(),class:"hidePatternContainer"}),i("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(h=this.chart)||void 0===h?void 0:h.getFooter()),i("div",{innerHTML:null===(e=this.chart)||void 0===e?void 0:e.toString()}))}async componentWillLoad(){var t;const i=this.prepareConfig(),s=this.prepareStyle();this.chart=new ht(new _,i,s),this.chart.setI18n(this.i18n),this.autoFitScaling(i,s),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new R(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}async componentWillUpdate(){var t;if(null==this.chart)return;const i=this.prepareConfig(),s=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(s),this.chart.setConfig(i),this.autoFitScaling(i,s),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new R(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}autoFitScaling(t,i){var s;if(t.pixelPerUnit>0)return;const h=null===(s=this.parentDimensions)||void 0===s?void 0:s.width;if(!h||h<=0)return t.pixelPerUnit=1,this.chart=new ht(new _,t,i),void this.chart.setI18n(this.i18n);t.pixelPerUnit=1,this.chart=new ht(new _,t,i),this.chart.setI18n(this.i18n),this.chart.toString();const e=this.chart.getAllocatedCanvasWidth();e<=0||(t.pixelPerUnit=.9*h/e,this.chart=new ht(new _,t,i),this.chart.setI18n(this.i18n))}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new F(new U,new w(new $),new $,new M,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideCategories:this.hideCategories,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,limit:this.limit,sortOrder:this.order,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,stackConfig:this.stackConfig})}prepareStyle(){return new j(new K,new c,new u(new d),new f(new d),new p).adapt(this.styles)}get element(){return h(this)}};et.style=':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';export{et as ibcs_chart_structure}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as r,g as s}from"./p-JNHhIe7t.js";import{f as i,w as o}from"./p-DyRaC0MB.js";import{w as n}from"./p-CYjZRKdI.js";import{w as a}from"./p-BSfqOkN_.js";import{w as d}from"./p-tzFCK9qn.js";import"./p-DdexOqTs.js";import"./p-DgfL-ffj.js";import"./p-DRikHQE-.js";function l(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);return Array.isArray(e)?e.map(((t,e)=>{var r,s,i;return"string"==typeof t?{label:t,id:String(e)}:"object"==typeof t&&null!==t?{label:null!==(s=null!==(r=t.label)&&void 0!==r?r:t.name)&&void 0!==s?s:String(e),id:null!==(i=t.id)&&void 0!==i?i:String(e)}:{label:String(t),id:String(e)}})):[]}catch(t){return console.error("parseHeaders: failed to parse JSON",t),[]}}function h(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);if(!Array.isArray(e))return["Headers must be an array"];const r=[],s=new Set;return e.forEach(((t,e)=>{"object"==typeof t&&null!==t&&void 0!==t.id&&("string"!=typeof t.id?r.push(`Header[${e}]: 'id' must be a string`):s.has(t.id)?r.push(`Header[${e}]: duplicate id '${t.id}'`):s.add(t.id),void 0!==t.label&&"string"!=typeof t.label&&r.push(`Header[${e}]: 'label' must be a string`))})),r}catch(t){return console.error("validateHeadersJson: failed to parse JSON",t),["Invalid JSON structure"]}}const u=class{validateRowHeaders(t){const e="ERR_rowHeaders",r=h(t);r.length>0?this.errors.addOrReplace({id:e,type:"error",message:`row-headers: ${r.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateColumnHeaders(t){const e="ERR_columnHeaders",r=h(t);r.length>0?this.errors.addOrReplace({id:e,type:"error",message:`column-headers: ${r.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateShowRowHeaders(t){const e="ERR_showRowHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-row-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowColumnHeaders(t){const e="ERR_showColumnHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-column-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowBorders(t){const e="ERR_showBorders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-borders: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.gridConfig={rows:[],columns:[]},this.chartTitle="",this.rowHeaders="[]",this.columnHeaders="[]",this.showRowHeaders="true",this.showColumnHeaders="true",this.showBorders="true",this.rowHeaderWidth="auto",this.cellGap="0px",o(this),n(this),this.errors=d(this),this.componentStyle=a(this)}getGridStyle(){return this.componentStyle((t=>t["bn-grid"]))}componentWillLoad(){this.validateRowHeaders(this.rowHeaders),this.validateColumnHeaders(this.columnHeaders),this.validateShowRowHeaders(this.showRowHeaders),this.validateShowColumnHeaders(this.showColumnHeaders),this.validateShowBorders(this.showBorders)}updateGridConfig(){var t;this.gridConfig=(t=this.columnHeaders,{rows:l(this.rowHeaders),columns:l(t)})}shouldShowRowHeaders(){return"true"===this.showRowHeaders&&this.gridConfig.rows.length>0}shouldShowColumnHeaders(){return"true"===this.showColumnHeaders&&this.gridConfig.columns.length>0}shouldShowBorders(){return"true"===this.showBorders}getGridTemplateColumns(){const t=[];this.shouldShowRowHeaders()&&t.push(this.rowHeaderWidth);const e=this.gridConfig.columns.length||1;for(let r=0;r<e;r++)t.push("auto");return t.join(" ")}getGridTemplateRows(){const t=[];this.chartTitle&&t.push("auto"),this.shouldShowColumnHeaders()&&t.push("auto");const e=this.gridConfig.rows.length||1;for(let r=0;r<e;r++)t.push("auto");return t.join(" ")}renderTitle(){if(!this.chartTitle)return null;const t=(this.shouldShowRowHeaders()?1:0)+this.gridConfig.columns.length;return e("div",{class:"grid-title",style:{"grid-column":`1 / span ${t}`,"grid-row":"1"}},this.chartTitle)}renderColumnHeaders(){if(!this.shouldShowColumnHeaders())return null;const t=this.getGridStyle(),r=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,i=this.chartTitle?2:1;return this.gridConfig.columns.map(((o,n)=>{const a=n>0;return e("div",{key:`col-header-${o.id}`,class:"grid-header grid-header-col",style:{"grid-column":String(s+n),"grid-row":String(i),"border-left":a?r:"none",padding:`${t.cellPadding}px`,"padding-left":a?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},o.label)}))}renderDataCells(){const t=this.getGridStyle(),r=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,i=(this.chartTitle?1:0)+(this.shouldShowColumnHeaders()?1:0)+1,o=[];return this.gridConfig.rows.length>0&&this.gridConfig.columns.length>0&&this.gridConfig.rows.forEach(((n,a)=>{if(this.shouldShowRowHeaders()){const s=a>0;o.push(e("div",{key:`row-header-${n.id}`,class:"grid-header grid-header-row",style:{"grid-column":"1","grid-row":String(i+a),"border-top":s?r:"none",padding:`${t.cellPadding}px`,"padding-top":s?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},n.label))}this.gridConfig.columns.forEach(((d,l)=>{const h=function(t,e){return`${t.id}-${e.id}`}(n,d),u=l>0,c=a>0;o.push(e("div",{key:`cell-${h}`,class:"grid-cell",style:{"grid-column":String(s+l),"grid-row":String(i+a),"border-left":u?r:"none","border-top":c?r:"none","padding-left":u?`${t.cellPadding+4}px`:"0","padding-top":c?`${t.cellPadding+4}px`:"0"}},e("slot",{name:h})))}))})),o}getFontStyles(){return this.componentStyle((t=>{var e,r,s,i;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(r=t.global)||void 0===r?void 0:r.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(i=t.global)||void 0===i?void 0:i.fontBackgroundColor)||"#ffffff"}}))}render(){const t={display:"inline-grid","grid-template-columns":this.getGridTemplateColumns(),"grid-template-rows":this.getGridTemplateRows(),gap:this.cellGap};return e(r,{key:"e84402bafd778e7069cd17bd86687a6648dbafe0",style:this.getFontStyles()},e("div",{key:"91941a42bc41fbbaf53c66551035bf97765a9f88",class:"grid-container",style:t},this.renderTitle(),this.renderColumnHeaders(),this.renderDataCells()),e("slot",{key:"349958090f4bf35b9ec768c8994bdf5a96636a36"}))}get element(){return s(this)}static get watchers(){return{rowHeaders:[{validateRowHeaders:0}],columnHeaders:[{validateColumnHeaders:0}],showRowHeaders:[{validateShowRowHeaders:0}],showColumnHeaders:[{validateShowColumnHeaders:0}],showBorders:[{validateShowBorders:0}]}}};u.style=':host{display:inline-block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.grid-container{display:inline-grid;box-sizing:border-box}.grid-title{font-weight:normal;padding-bottom:8px}.grid-header{display:flex;align-items:flex-end;box-sizing:border-box}.grid-header-row{justify-content:flex-end;padding-right:8px}.grid-header-col{white-space:nowrap;justify-content:flex-start}.grid-cell{position:relative;box-sizing:border-box}';export{u as bn_grid}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as e,g as o}from"./p-JNHhIe7t.js";import{w as r}from"./p-DG-1MR_T.js";import{g as i}from"./p-DRikHQE-.js";import{w as n}from"./p-CYjZRKdI.js";import{w as p}from"./p-tzFCK9qn.js";const h=class{constructor(s){t(this,s),this.name="_default",n(this),this.errors=p(this),r(this,(t=>{this.stores||(this.stores=i(this.element));try{const s=JSON.parse(t);this.stores.componentStyles.set(this.name,s),this.errors.remove("JSON_PARSE")}catch(t){this.errors.addOrReplace({id:"JSON_PARSE",type:"error",message:`bn-component-style: Failed to parse JSON body — ${t.message}`}),console.error(t)}}))}render(){return s(e,{key:"e9298c6ce5b0b51260165e78dcf19efdef0646f9"})}get element(){return o(this)}};h.style="bn-component-style{display:none}";export{h as bn_component_style}
@@ -1 +1 @@
1
- import{r as t,h as e,F as s,g as a}from"./p-B27Ax6P_.js";import{w as i}from"./p-CY1RzLjU.js";const r=class{constructor(e){t(this,e),this.messageText="",this.messageImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerDisplayPageNumber=!0,this.pageLayout="full",this.pageCustomTemplate='"a b" "c d"',this.pageGridGap="0",this.pageFitToContent=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=i(this)}getCommonStyles(){let t="100%",e="100%";return!0===this.pageFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.pageGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplateAreas(this.pageLayout),"grid-template-columns":this.getGridTemplateColumns(this.pageLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const a=this.createDivAreaStyles(t);return e(s,null,a.map(((t,s)=>e("div",{style:t},e("slot",{name:"slot-"+s})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplateAreas(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t)}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){if(!1===this.templateMap.has(t)&&"custom-template"!==t)return"100%";let e;e="custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t);const s=e.match(/"[\w\d\s.]+"/g);return this.calculatePercentages(s[0])}async getNumberOfSlot(t){const e=this.getTemplateAreas(t);return this.extractSlotNames(e).length}componentDidUpdate(){const t=this.element.closest("bn-context").getAttribute("render-orientation");if(t&&t!==this.pageOrientation){const t=this.element.shadowRoot.querySelector("bn-page"),e=this.element.closest("bn-layout-page");e&&t&&(t.style.transform="rotate(-90deg) translate(-100%)",t.style.transformOrigin="top left",e.style.width=`${t.clientHeight}px`,e.style.height=`${t.clientWidth}px`)}}render(){const t=this.getLayoutStyle(),s=this.extractSlotNames(t["grid-template-areas"]);return e("bn-page",{key:"2f67c9b949ab18de247ea492c95b1e53e450fcca",styles:this.styles,format:this.pageFormat,orientation:this.pageOrientation},e("bn-message",{key:"6fb865fe6cf9785c6a3932967d9969d5e0a4eda5",text:this.messageText,image:this.messageImage}),e("bn-title",{key:"3ba10325d834b364d0a68012f589ba5508877652",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),e("bn-body",{key:"16bcb1e231d65b2f0e90c82d8e3ec1a84cc79c59"},e("div",{key:"1408692a37d04686e5d9ad00bca7f1d24787b595",style:t},this.getSlots(s))),e("bn-footer",{key:"83e924e38db44fb678490a8a4d12b264699fc3e2",text:this.footerText,"page-number":this.pageNumber,"display-page-number":this.footerDisplayPageNumber}))}get element(){return a(this)}};r.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}';export{r as bn_layout_page}
1
+ import{r as t,h as e,F as s,g as a}from"./p-JNHhIe7t.js";import{w as i}from"./p-tzFCK9qn.js";const r=class{constructor(e){t(this,e),this.messageText="",this.messageImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerDisplayPageNumber=!0,this.pageLayout="full",this.pageCustomTemplate='"a b" "c d"',this.pageGridGap="0",this.pageFitToContent=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=i(this)}getCommonStyles(){let t="100%",e="100%";return!0===this.pageFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.pageGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplateAreas(this.pageLayout),"grid-template-columns":this.getGridTemplateColumns(this.pageLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const a=this.createDivAreaStyles(t);return e(s,null,a.map(((t,s)=>e("div",{style:t},e("slot",{name:"slot-"+s})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplateAreas(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t)}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){if(!1===this.templateMap.has(t)&&"custom-template"!==t)return"100%";let e;e="custom-template"===t?this.pageCustomTemplate:this.templateMap.get(t);const s=e.match(/"[\w\d\s.]+"/g);return this.calculatePercentages(s[0])}async getNumberOfSlot(t){const e=this.getTemplateAreas(t);return this.extractSlotNames(e).length}componentDidUpdate(){const t=this.element.closest("bn-context").getAttribute("render-orientation");if(t&&t!==this.pageOrientation){const t=this.element.shadowRoot.querySelector("bn-page"),e=this.element.closest("bn-layout-page");e&&t&&(t.style.transform="rotate(-90deg) translate(-100%)",t.style.transformOrigin="top left",e.style.width=`${t.clientHeight}px`,e.style.height=`${t.clientWidth}px`)}}render(){const t=this.getLayoutStyle(),s=this.extractSlotNames(t["grid-template-areas"]);return e("bn-page",{key:"2f67c9b949ab18de247ea492c95b1e53e450fcca",styles:this.styles,format:this.pageFormat,orientation:this.pageOrientation},e("bn-message",{key:"6fb865fe6cf9785c6a3932967d9969d5e0a4eda5",text:this.messageText,image:this.messageImage}),e("bn-title",{key:"3ba10325d834b364d0a68012f589ba5508877652",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),e("bn-body",{key:"16bcb1e231d65b2f0e90c82d8e3ec1a84cc79c59"},e("div",{key:"1408692a37d04686e5d9ad00bca7f1d24787b595",style:t},this.getSlots(s))),e("bn-footer",{key:"83e924e38db44fb678490a8a4d12b264699fc3e2",text:this.footerText,"page-number":this.pageNumber,"display-page-number":this.footerDisplayPageNumber}))}get element(){return a(this)}};r.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}';export{r as bn_layout_page}
@@ -0,0 +1 @@
1
+ import{r as o,h as t,H as s,g as r}from"./p-JNHhIe7t.js";import{w as n}from"./p-CYjZRKdI.js";import{w as i}from"./p-BSfqOkN_.js";import{w as e}from"./p-tzFCK9qn.js";import"./p-DRikHQE-.js";const a=class{constructor(t){o(this,t),n(this),this.errors=e(this),this.componentStyle=i(this)}render(){return t(s,{key:"92bcbc010336d3a542c86e182831bbfddda2aa9b",style:this.prepareStyle()},t("slot",{key:"d836aa5443283df158dcb50345aee0df97f74a6e"}))}prepareStyle(){return{"font-family":this.componentStyle((o=>o.global.fontFamily)),"font-size":`${this.componentStyle((o=>o.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((o=>o.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((o=>o.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((o=>o.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((o=>o.global.fontBackgroundColor))||"#ffffff"}}get element(){return r(this)}};a.style=':host{display:flex;flex-direction:column;justify-content:space-between;padding:0.25em;margin:0.5em;background-origin:content-box;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(.border){box-sizing:border-box;-webkit-box-sizing:border-box;border:0.1em solid #ddd}div{color:var(--bn-font-color, black)}';export{a as bn_card}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as e,g as s}from"./p-JNHhIe7t.js";import{b as o,g as n,a as r}from"./p-DRikHQE-.js";import{w as a}from"./p-CYjZRKdI.js";import{w as l}from"./p-tzFCK9qn.js";import{w as h}from"./p-DG-1MR_T.js";import{j as d,w as c,v as p,a as u,i as f,p as m,f as v,q as g,e as w,r as b,s as $,c as y,d as R,t as O,g as S,u as E,x as M}from"./p-DyRaC0MB.js";import{w as T}from"./p-BSfqOkN_.js";import{w as U,g as _,p as G}from"./p-DVMu6dEy.js";import{w as x}from"./p-CRLgp9-v.js";import{h as C,O as N,a as D,I as L,i as P,M as k,e as A,d as F,j as B}from"./p-DdexOqTs.js";import{F as W,Q as Y,V as H}from"./p-1jFf17Vj.js";import{a as I}from"./p-BYmPQYxx.js";import{I as j,S as z}from"./p--PSoPbDM.js";import{D as V,S as J,a as Q,b as q}from"./p-DVo6aZUE.js";import"./p-DgfL-ffj.js";import"./p-BFTU3MAI.js";const K=class{constructor(i){t(this,i),this.currentPageUpdate=void 0,a(this),this.errors=l(this)}setLocale(t){this.stores.context.state.locale=t}connectedCallback(){this.stores=o(this.element),this.locale&&(this.stores.context.state.locale=this.locale),this.currentPageUpdate=setTimeout((()=>{this.element.querySelectorAll("bn-page, bn-layout-page").forEach(((t,i)=>{if("bn-layout-page"===t.localName)t.setAttribute("page-number",(i+1).toString());else{const e=t.querySelector("bn-footer");e&&e.setAttribute("page-number",(i+1).toString())}}))}),250)}disconnectedCallback(){this.currentPageUpdate&&clearTimeout(this.currentPageUpdate)}componentWillLoad(){}componentDidLoad(){}componentShouldUpdate(){}componentWillRender(){}componentDidRender(){}componentWillUpdate(){}componentDidUpdate(){}render(){return i(e,{key:"b92019b909e271225baca2cf740c8301e324164e"},i("slot",{key:"87bac4bb29bca32d961afe31355dc1bd48fff0f8"}))}get element(){return s(this)}static get watchers(){return{locale:[{setLocale:0}]}}};K.style=":host{display:block}";const Z=class{constructor(i){t(this,i),a(this),this.errors=l(this),h(this,(t=>{this.stores||(this.stores=n(this.element));try{const i=JSON.parse(t);this.stores.datasources.set(this.name,i)}catch(i){console.error("Error parsing datasource",i,t),this.stores.datasources.set(this.name,[])}}))}render(){return i(e,{key:"e47e62c941bb7954cabe331cb500a7d2fdd7c487"})}get element(){return s(this)}};Z.style="bn-datasource{display:none}";const X=["xga","hd","full-hd","4k","4k2k","a4","a3","a2","a1","a0","letter","legal"],tt=["landscape","portrait"],it=class{constructor(i){t(this,i),a(this),this.errors=l(this),this.componentStyle=T(this)}validateFormat(t){const i="ERR_format";d(t)||X.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`format: invalid value '${t}' is not supported. Valid values: ${X.join(", ")}`})}validateOrientation(t){const i="ERR_orientation";d(t)||tt.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`orientation: invalid value '${t}' is not supported. Valid values: ${tt.join(", ")}`})}render(){return i(e,{key:"b4d682a8f6e83f77c58236265eaf9d1327809c6f",format:this.format,orientation:this.orientation,style:this.prepareStyle()},i("slot",{key:"ef49c43c1f8926c4c968b752608627adbe330d6c"}))}prepareStyle(){return{"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"}}get element(){return s(this)}static get watchers(){return{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}}};var et,st,ot,nt,rt;it.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}:host([format=xga]){height:768px;width:1024px}:host([format=xga][orientation=portrait]){height:1024px;width:768px}:host([format=xga][orientation=landscape]){height:768px;width:1024px}:host([format=hd]){height:720px;width:1280px}:host([format=hd][orientation=portrait]){height:1280px;width:720px}:host([format=hd][orientation=landscape]){height:720px;width:1280px}:host([format=full_hd]){height:1080px;width:1920px}:host([format=full_hd][orientation=portrait]){height:1920px;width:1080px}:host([format=full_hd][orientation=landscape]){height:1080px;width:1920px}:host([format="4k"]){height:2160px;width:3840px}:host([format="4k"][orientation=portrait]){height:3840px;width:2160px}:host([format="4k"][orientation=landscape]){height:2160px;width:3840px}:host([format="4k2k"]){height:2160px;width:4096px}:host([format="4k2k"][orientation=portrait]){height:4096px;width:2160px}:host([format="4k2k"][orientation=landscape]){height:2160px;width:4096px}:host([format=a6]){height:5.83in;width:4.13in}:host([format=a6][orientation=portrait]){height:5.83in;width:4.13in}:host([format=a6][orientation=landscape]){height:4.13in;width:5.83in}:host([format=a5]){height:8.27in;width:5.83in}:host([format=a5][orientation=portrait]){height:8.27in;width:5.83in}:host([format=a5][orientation=landscape]){height:5.83in;width:8.27in}:host([format=a4]){height:11.6in;width:8.17in}:host([format=a4][orientation=portrait]){height:11.6in;width:8.17in}:host([format=a4][orientation=landscape]){height:8.17in;width:11.6in}:host([format=a3]){height:16.54in;width:11.7in}:host([format=a3][orientation=portrait]){height:16.54in;width:11.7in}:host([format=a3][orientation=landscape]){height:11.7in;width:16.54in}:host([format=a2]){height:23.4in;width:16.54in}:host([format=a2][orientation=portrait]){height:23.4in;width:16.54in}:host([format=a2][orientation=landscape]){height:16.54in;width:23.4in}:host([format=a1]){height:33.1in;width:23.4in}:host([format=a1][orientation=portrait]){height:33.1in;width:23.4in}:host([format=a1][orientation=landscape]){height:23.4in;width:33.1in}:host([format=a0]){height:46.8in;width:33.1in}:host([format=a0][orientation=portrait]){height:46.8in;width:33.1in}:host([format=a0][orientation=landscape]){height:33.1in;width:46.8in}:host([format=letter]){height:11in;width:8.5in}:host([format=letter][orientation=portrait]){height:11in;width:8.5in}:host([format=letter][orientation=landscape]){height:8.5in;width:11in}:host([format=legal]){height:14in;width:8.5in}:host([format=legal][orientation=portrait]){height:14in;width:8.5in}:host([format=legal][orientation=landscape]){height:8.5in;width:14in}:host([format=tabloid]){height:17in;width:11in}:host([format=tabloid][orientation=portrait]){height:17in;width:11in}:host([format=tabloid][orientation=landscape]){height:11in;width:17in}:host([format=ledger]){height:11in;width:17in}:host([format=ledger][orientation=portrait]){height:17in;width:11in}:host([format=ledger][orientation=landscape]){height:11in;width:17in}',function(t){t[t.ALL=-1]="ALL"}(et||(et={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(st||(st={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(ot||(ot={})),function(t){t.ASC="asc",t.DESC="desc"}(nt||(nt={})),function(t){t.HEADER="HEADER",t.GROUPHEAD="GROUPHEAD",t.SEPERATORLINE="SEPERATORLINE",t.SUM="SUM",t.GROUPSUM="GROUP_SUM",t.DRILLELEMENT="DRILLELEMENT",t.STANDARD="STANDARD",t.PARTELEMENT="PARTELEMENT",t.ENTRY="ENTRY"}(rt||(rt={}));const at=class{validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const i=Number(t);isNaN(i)||i<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}constructor(i){t(this,i),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.tableTitle="",this.filter="",this.measureUnit="",this.unitScaling=.01,this.percentageScaling=.5,this.pixelPerUnitGroupMap=new Map,this.dataFormat="decimal",this.grouped="false",this.showMeasureScale="false",this.showGroupTitle="true",this.type="list",this.limit=0,this.thereof="[]",this.partof="[]",this.order="category",this.orderDirection="asc",this.measureType="volume",this.measureScale="greatest",this.dataFormatDigitsDecimal=1,this.dataFormatDigitsPercent=2,this.categoryWidth="w15",this.columnthereof=null,this._autoScaleGuard=!1,c(this),a(this),this.errors=l(this),this.componentStyle=T(this),U(this,((t,i)=>{this.data=i||[]}),((t,i)=>{this.datasetMeta=i})),this.t=x(this).t}validateScenario(t){const i="ERR_scenarios",e=p(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"scenarios: invalid value(s) '"+(null==e?void 0:e.toString())+"' are not supported."}):this.errors.remove(i)}validateVariances(t){const i="ERR_variances",e=u(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}validateBarColumns(t){const i="ERR_barColumns";if(d(t))return void this.errors.remove(i);const e=u(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"barColumns: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}validateUnitScaling(t){const i="ERR_unitScaling";f(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"unitScaling: invalid value '"+t+"' is not supported."})}validatePercentageScaling(t){const i="ERR_percentageScaling";f(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"percentageScaling: invalid value '"+t+"' is not supported."})}validateDataFormat(t){const i="ERR_dataFormat";m(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"dataFormat: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateGrouped(t){const i="ERR_grouped";v(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"grouped: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowMeasureScale(t){const i="ERR_grouped";v(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateShowGroupTitle(t){const i="ERR_showGroupTitle";v(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"showGroupTitle: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateType(t){const i="ERR_type";g(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"type: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateLimit(t){const i="ERR_limit";w(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateThereOf(t){const i="ERR_thereof",e=b(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"ThereOf: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}validatePartOf(t){const i="ERR_partof",e=$(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"partof: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}validateOrderList(t){const i="ERR_order",e=y(t);e.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(i)}validateOrderDirection(t){const i="ERR_orderDirection";R(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasureType(t){const i="ERR_measureType";O(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"measureType: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasureScale(t){const i="ERR_measureScale";S(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"measureScale: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDataFormatDigitsDecimal(t){const i="ERR_dataFormatDigitsDecimal";w(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"dataFormatDigitsDecimal: invalid value(s) '"+t+"' are not supported."})}validateDateFormatDigitsPercent(t){const i="ERR_dataFormatDigitsPercent";w(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"dataFormatDigitsPercent: invalid value(s) '"+t+"' are not supported."})}validateCategoryWidth(t){const i="ERR_categoryWidth";E(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"categoryWidth: invalid value(s) '"+t+"' are not supported."})}validateColumnThereOf(t){const i=M(t),e="ERR_categorythereof";i.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"columnthereof: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(e)}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateDataFormat(this.dataFormat),this.validateGrouped(this.grouped),this.validateShowGroupTitle(this.showGroupTitle),this.validateType(this.type),this.validateLimit(this.limit),this.validateThereOf(this.thereof),this.validatePartOf(this.partof),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateDataFormatDigitsDecimal(this.dataFormatDigitsDecimal),this.validateDateFormatDigitsPercent(this.dataFormatDigitsPercent),this.validateCategoryWidth(this.categoryWidth),this.validateMeasureType(this.measureType),this.validateMeasureScale(this.measureScale),this.validateColumnThereOf(this.columnthereof),this.validateShowMeasureScale(this.showMeasureScale),this.validateBarColumns(this.barColumns),this.validateUnitScaling(this.unitScaling),this.validatePercentageScaling(this.percentageScaling),this.validateScaling(this.scale)}disconnectedCallback(){this.unsubscribe()}componentDidRender(){var t,i;const{mode:e}=G(this.scale);if("auto"!==e&&"empty"!==e)return void(this._autoScaleGuard=!1);if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const s=this.element,{width:o}=_(s);if(o<=0)return;const n=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}));s.style.setProperty("--bn-font-size",`${n}px`);const r=null===(t=s.shadowRoot)||void 0===t?void 0:t.querySelector("div"),a=null!==(i=null==r?void 0:r.scrollWidth)&&void 0!==i?i:s.scrollWidth;if(a<=o+1)return this.errors.remove("AUTO_scale"),void(1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1));const l=(o-1)/a;s.style.setProperty("--bn-font-size",n*l+"px"),"empty"===e?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled table by factor ${l.toFixed(3)}`}):this.errors.remove("AUTO_scale"),Math.abs(l-this.appliedScaleFactor)>.001&&(this._autoScaleGuard=!0,this.appliedScaleFactor=l)}prepareDataFormat(){var t;return C[null===(t=this.dataFormat)||void 0===t?void 0:t.toUpperCase()]}prepareGrouped(){return"true"===this.grouped}prepareShowGroupTitle(){return"true"===this.showGroupTitle}prepareTableType(){var t;return ot[null===(t=this.type)||void 0===t?void 0:t.toUpperCase()]}prepareLimit(){return Math.floor(Number(this.limit)||0)}prepareThereOf(){return null==this.thereof||""===this.thereof.trim()?[]:JSON.parse(this.thereof)}preparePartOf(){return null==this.partof||""===this.partof.trim()?[]:JSON.parse(this.partof)}prepareOrder(){var t,i,e;const s="auto"===(null===(t=this.order)||void 0===t?void 0:t.trim().toLowerCase());let o=this.order;return s&&(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedOrder)&&(o=this.datasetMeta.suggestedOrder),{hierarchy:o.split(",").map((t=>D[null==t?void 0:t.toUpperCase()])),direction:N[null===(e=this.orderDirection)||void 0===e?void 0:e.toUpperCase()]}}prepareI18nMode(){return L.META}prepareI18n(){const t=r,i=new Map(["in","category","operation","there_of","part_of","SUM_TOTAL"].map((t=>[t,this.t(".".concat(t))]))),e=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...e.entries(),...i.entries()])}prepareDataFormatDigits(){return{percent:this.dataFormatDigitsPercent,decimal:this.dataFormatDigitsDecimal}}prepareScenarios(){var t,i,e,s,o,n,r,a;const l="auto"===(null===(t=this.scenarios)||void 0===t?void 0:t.trim().toLowerCase());if((d(this.scenarios)||l)&&d(this.variances))return(null===(e=null===(i=this.datasetMeta)||void 0===i?void 0:i.availableScenarios)||void 0===e?void 0:e.length)>0?(l?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),this.datasetMeta.availableScenarios):[];let h=[];return l||d(this.scenarios)?(null===(o=null===(s=this.datasetMeta)||void 0===s?void 0:s.availableScenarios)||void 0===o?void 0:o.length)>0&&(l?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),h=h.concat(this.datasetMeta.availableScenarios)):(this.errors.remove("AUTO_scenarios"),h=h.concat(null===(n=this.scenarios)||void 0===n?void 0:n.split(","))),(null===(r=this.variances)||void 0===r?void 0:r.trim().length)>0&&(h=h.concat(null===(a=this.variances)||void 0===a?void 0:a.split(","))),h.map((t=>t.trim()))}prepareCategoryWidth(){var t;return d(this.categoryWidth)?P.INF:P[null===(t=this.categoryWidth)||void 0===t?void 0:t.toUpperCase()]}prepareMeasureScale(){return d(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareMeasureType(){var t;return d(this.measureType)?k.VOLUME:k[null===(t=this.measureType)||void 0===t?void 0:t.toUpperCase()]}prepareColumnThereOf(){if(null==this.columnthereof||""===this.columnthereof.trim())return new Map;const t=JSON.parse(this.columnthereof),i=new Map;for(const[e,s]of Object.entries(t))!1===i.has(s.scenario)&&i.set(s.scenario,[]),i.get(s.scenario).push(s);return i}prepareTableTitle(){return""===this.tableTitle||null==this.tableTitle?"SUM_TOTAL":this.tableTitle}prepareShowMeasureScale(){return"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareBarColumns(){return d(this.barColumns)?[]:this.barColumns.split(",").map((t=>t.trim()))}prepareUnitScaling(){return this.pixelPerUnitGroupMap.has(this.unitScaling)?this.pixelPerUnitGroupMap.get(this.unitScaling):Number(this.unitScaling)}preparePercentageScaling(){return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):Number(this.percentageScaling)}getDataStructure(){return{ITableDataRow:{setName:{type:"string",isOptional:!1,description:""},date:{type:"string",isOptional:!1,description:""},operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}getEffectiveScaleFactor(){const{mode:t,factor:i}=G(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var e,s,o,n;const r=(null===(e=i.global)||void 0===e?void 0:e.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=i.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":r*t+"px","--bn-font-color":(null===(o=i.global)||void 0===o?void 0:o.fontColor)||"#000000","--bn-font-background":(null===(n=i.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles(),s=this.getEffectiveScaleFactor();return i(e,{key:"5434656c0626dc8aceea109e4f6ab795443a7c7b",style:t},i("div",{key:"a3d90ae3bce33b025bac95cc486aba1778907762"},i("ibcs-table",{key:"fbff577c7d0bf23f63f6d06edafd75e32a183b49",data:this.data,"table-title":this.prepareTableTitle(),scenarios:this.prepareScenarios(),"scenarios-data-format":this.prepareDataFormat(),grouped:this.prepareGrouped(),limit:this.prepareLimit(),showGroupTitle:this.prepareShowGroupTitle(),thereof:this.prepareThereOf(),partof:this.preparePartOf(),order:this.prepareOrder(),categorythereof:this.prepareColumnThereOf(),type:this.prepareTableType(),"category-width":this.prepareCategoryWidth(),dataFormatDigits:this.prepareDataFormatDigits(),i18n:this.prepareI18n(),"i18n-mode":this.prepareI18nMode(),"measure-scale":this.prepareMeasureScale(),"measure-type":this.prepareMeasureType(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(),filter:this.prepareFilter(),barColumns:this.prepareBarColumns(),unitScaling:this.prepareUnitScaling(),percentageScaling:this.preparePercentageScaling(),scaleFactor:s})))}get element(){return s(this)}static get watchers(){return{scale:[{validateScaling:0}],scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],barColumns:[{validateBarColumns:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],dataFormat:[{validateDataFormat:0}],grouped:[{validateGrouped:0}],showMeasureScale:[{validateShowMeasureScale:0}],showGroupTitle:[{validateShowGroupTitle:0}],type:[{validateType:0}],limit:[{validateLimit:0}],thereof:[{validateThereOf:0}],partof:[{validatePartOf:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],measureType:[{validateMeasureType:0}],measureScale:[{validateMeasureScale:0}],dataFormatDigitsDecimal:[{validateDataFormatDigitsDecimal:0}],dataFormatDigitsPercent:[{validateDateFormatDigitsPercent:0}],categoryWidth:[{validateCategoryWidth:0}],columnthereof:[{validateColumnThereOf:0}]}}};at.style=":host{display:inline-block;position:relative;overflow:hidden}";class lt{constructor(t,i,e,s,o,n,r,a,l){this.prefixStyle="prefix",this.isBarChart=!1,this.key=t,this.index=i,this.value=e,this.prefix=n||"",this.cssStyle=s||"",this.prefixStyle=r||"prefix",this.type=o,this.mark=void 0,this.colSpan=a||1,this.measureScale=l||1}getAsHeaderList(){if(null==this.value)return[""];const t=[];for(const i of this.value.toString().split("<br/>"))t.push(i);return t}draw(t){let i=this.value;if("undefined"===i||void 0===i||null==i)return"";if(Number.isNaN(Number(i)))return i;if(""===this.type||void 0===this.type||null==this.type)return i;let e=t.percent,s=t.percent;return"decimal"===this.type&&(i=+i/this.measureScale,e=t.decimal,s=t.decimal),W.number(Number(i),this.type,e,s)}drawPrefix(){return null==this.prefix?"":this.prefix}}class ht{constructor(t,i,e){this.index=t,this.groupindex=i,this.type=e,this.cssStyle=this.initCssStyle(),this.elements=[]}initCssStyle(){switch(this.type){case rt.HEADER:return"groupheader";case rt.SEPERATORLINE:return"";case rt.DRILLELEMENT:return"ofit";case rt.PARTELEMENT:return"partof";case rt.STANDARD:return"";case rt.SUM:return"sum";default:return""}}getCells(){return this.elements}createElement(t,i,e,s,o,n,r,a,l,h=!1,d){let c=n;"category"===i&&null!=a&&(c=`category-${a.toString()}`),this.type===rt.HEADER?c="headerlabel":this.type===rt.SEPERATORLINE&&(c=i),this.type===rt.PARTELEMENT&&("percent"===s&&(t="-"),"category"!==i&&"operation"!==i&&(s="percent",c="")),"-"===t&&(c="");let p="prefix-first";r&&(p="prefix-second"),c=`${c} ${e}`;const u=new lt(i,this.elements.length,t,c,s,o,p,1,l);u.isBarChart=h,u.columnStats=d,this.elements.push(u)}}const dt={positive:{stroke:"#008f96",fill:"#008f96",fillpattern:"solid"},negative:{stroke:"#ff0000",fill:"#ff0000",fillpattern:"solid"},neutral:{stroke:"#808080",fill:"#808080",fillpattern:"outlined"},scenarios:{ac:{stroke:"#404040",fill:"#404040",fillpattern:"solid"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",fillpattern:"solid"},fc:{stroke:"#404040",fill:"#ffffff",fillpattern:"hatched"},pl:{stroke:"#404040",fill:"#ffffff",fillpattern:"outlined"}},fontColor:"#000000",fontSize:11,fontFamily:"'Noto Sans', sans-serif",unitScaling:.01,percentageScaling:.5,scaleFactor:1},ct="#666666";function pt(t,i){return`pattern-${t}-${i.replace("#","")}`}const ut=({styles:t})=>{const e=t.scaleFactor,s=6*e,o=[{id:pt("pos",t.positive.stroke),stroke:t.positive.stroke,fill:t.positive.fill},{id:pt("neg",t.negative.stroke),stroke:t.negative.stroke,fill:t.negative.fill},{id:pt("neu",t.neutral.stroke),stroke:t.neutral.stroke,fill:t.neutral.fill}];return i("defs",null,o.map((t=>i("pattern",{id:t.id,patternUnits:"userSpaceOnUse",width:s,height:s},i("rect",{width:s,height:s,fill:"#ffffff"}),i("line",{x1:"0",y1:s,x2:s,y2:"0",stroke:t.stroke,"stroke-width":1.5*e})))))};function ft(t,i,e=1){let s,o;const n=t>=0?"+":"";if(i)return s=100*t,n+Math.round(s).toString()+"%";{let i;return s=t/e,o=Math.abs(s),i=o>=1e9?(s/1e9).toFixed(o>=1e10?0:1)+"B":o>=1e6?(s/1e6).toFixed(o>=1e7?0:1)+"M":o>=1e3?(s/1e3).toFixed(o>=1e4?0:1)+"K":s.toFixed(o>=10?0:1),i=i.replace(/\.0([KMB]?)$/,"$1"),n+i}}function mt(t){const i=t.slice(0,2).toLowerCase();return["ac","pp","fc","pl"].includes(i)}function vt(t){const i=t.slice(0,2).toLowerCase();return"pp"===i?"pp":"fc"===i?"fc":"pl"===i?"pl":"ac"}function gt(t,i,e,s){return mt(t)?function(t,i){const e=vt(t);return i.scenarios[e]}(t,s):function(t,i,e){const s=t>=0;return i?s?e.positive:e.negative:s?e.negative:e.positive}(i,e,s)}const wt=t=>{const{value:e,scenario:s,height:o,isPositiveGood:n,formattedValue:r,measureScale:a,styles:l=dt}=t,h=l.scaleFactor,d=50*h,c=40*h,p=d+2*c+d,u=2*h,f=o-2*u,m=d+c,v=Math.abs(e)*l.unitScaling*h,g=Math.min(v,c),w=e>=0,b=w?m:m-g,$=u,y=gt(s,e,n,l),R=function(t,i){const e=t.fillpattern;return"hatched"===e?`url(#${pt(i,t.stroke)})`:"outlined"===e?"transparent":t.fill}(y,mt(s)?vt(s):n?w?"pos":"neg":w?"neg":"pos"),{stroke:O,strokeWidth:S}="outlined"===(E=y).fillpattern?{stroke:E.stroke,strokeWidth:1.5}:{stroke:"none",strokeWidth:0};var E;const M=r||ft(e,!1,a),T=w?m+g+4*h:m-g-4*h,U=w?"start":"end";return i("svg",{width:p,height:o,class:"cell-bar-chart absolute-variance",style:{overflow:"visible"}},i(ut,{styles:l}),i("line",{x1:m,y1:0,x2:m,y2:o,stroke:ct,"stroke-width":1*h}),g>0&&i("rect",{x:b,y:$,width:g,height:f,fill:R,stroke:O,"stroke-width":S*h}),i("text",{x:T,y:o/2,dy:"0.35em","text-anchor":U,fill:l.fontColor,"font-size":l.fontSize,"font-family":l.fontFamily},M))},bt=t=>{const{value:e,scenario:s,height:o,isPositiveGood:n,formattedValue:r,measureScale:a,styles:l=dt}=t,h=l.scaleFactor,d=25*h,c=2*d+10*h,p=c+70*h,u=c/2,f=o/2,m=100*Math.abs(e)*l.percentageScaling*h,v=Math.min(m,d),g=e>=0,w=g?u+v:u-v,b=gt(s,e,n,l),$=3*h,y=m>d,R=r||ft(e,!0,a),O=c+4*h;return i("svg",{width:p,height:o,class:"cell-bar-chart relative-variance",style:{overflow:"visible"}},i("line",{x1:u,y1:0,x2:u,y2:o,stroke:ct,"stroke-width":1*h}),!y&&i("circle",{cx:w,cy:f,r:$,fill:l.fontColor}),i("line",{x1:u,y1:f,x2:w,y2:f,stroke:b.fill,"stroke-width":2*h}),y&&g&&i("polygon",{points:`${c-2*h},${f} ${c-8*h},${f-3*h} ${c-8*h},${f+3*h}`,fill:b.fill}),y&&!g&&i("polygon",{points:`${2*h},${f} ${8*h},${f-3*h} ${8*h},${f+3*h}`,fill:b.fill}),i("text",{x:O,y:o/2,dy:"0.35em","text-anchor":"start",fill:l.fontColor,"font-size":l.fontSize,"font-style":"italic","font-family":l.fontFamily},R))},$t=t=>{const{value:e,columnStats:s,isRelative:o,styles:n=dt}=t;return null==e||isNaN(e)||!s||0===s.absMax?i("span",{class:"bar-chart-empty",style:{color:n.fontColor,fontStyle:"italic"}},"-"):i(o?bt:wt,Object.assign({},t))};class yt{constructor(t){I.fn.transformOperator=function(t){return"-"===t?-1:1},this.groups=[Y.CATEGORY,Y.CATEGORYINDEX],ot.OPT!==t.type&&ot.OPTNOTOTAL!==t.type||this.groups.unshift(Y.OPERATION),t.grouped&&(this.groups.push(Y.ROWGROUP),this.groups.push(Y.ROWGROUPINDEX))}toString(){return this.groups.map((t=>`${t}`)).toString()}noCategory(){return this.groups.filter((t=>t!==Y.CATEGORY))}toArray(){return this.groups}}class Rt{constructor(t,i){this.hasPartOf=!1,this.config=t,this.i18n=i}execute(t){if(0===t.length)return[];const i=[],e=[],s=[],o=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!1,this.config.type))).toString(),n=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!0,this.config.type))).toString(),r=this.getRelativeScenarios(),a=new yt(this.config),l=this.config.grouped?[Y.ROWGROUP,Y.ROWGROUPINDEX]:[];let h=["",""];return this.config.sortOrder.hierarchy.length>0&&(h=this.createOrderString(this.config.sortOrder)),this.hasPartOf=this.checkConfigForPartOf(),I(`SELECT COUNT(DISTINCT ${Y.CATEGORY}) as ${Y.TOTALROWCOUNT} ${l.length>0?","+l:""}\n FROM ? ${l.length>0?"GROUP BY "+l:""} \n ORDER BY ${h[0]}`,[t]).forEach((t=>{const s=t.rowGroup&&t.rowGroup.length>0?`WHERE ${Y.ROWGROUP} = '${t.rowGroup}'`:"";let r="";this.config.limit&&(r=`LIMIT ${this.config.limit}`),this.createGroupHeaderRow(t,i),this.createDataRow(i,t,a,o,s,h,r),this.createRestRow(t,i,a,o,s,h),this.createGroupSumRow(i,e,t,n,h)})),this.createTotalSumRow(i,e,n),i.forEach((i=>{try{s.push(I(i,[t]))}catch(t){console.error("DataQuery: SQL query execution failed",i,t)}})),this.detectNaNCells(this.config.scenarios,s),this.createThereOfDrillRows(o,h,t,s),this.createPartOfDrillRows(o,h,e,t,s),this.createThereOfDrillColumns(this.config.categoryThereOf,t,s),this.calculateColumnGroupRest(s,this.config.categoryThereOf),this.calculateRelativeVariances(s,r),s}detectNaNCells(t,i){i.forEach((i=>{i.map((i=>(t.forEach((t=>{const e=new H(t);!0===e.isValid?0!==i[e.base+"_cnt"]&&0!==i[e.delta+"_cnt"]||(i[t]=Number.NaN):0===i[t+"_cnt"]&&(i[t]=Number.NaN)})),i)))}))}createPartOfDrillRows(t,i,e,s,o){if(null==this.config.partOf||0===this.config.partOf.length||this.config.type===ot.LIST||null==s||0===s.length)return;const n=this.createPartOfQuery(t,i);let r=[];n.forEach((function(t){r.push(...I(t,[s]))}));const a=this.exctractScenarioNames(t),l=[];e.forEach((function(t){l.push(...I(t,[s]))}));const h=new Map;l.forEach((t=>h.set(t[Y.ROWGROUP],t))),r=this.reduceResDrillByCategoryGroups(r,a),r.forEach((function(t){a.forEach((i=>{try{t[i]=t[i]/h.get(t[Y.ROWGROUP])[i]}catch(e){console.error("DataQuery: partOf drill row calculation failed",i,e),t[i]=Number.NaN}}))})),this.injectDrillRowsToResultRows(r,o)}createRestRow(t,i,e,s,o,n){t.totalRowCnt-this.config.limit>0&&0!==this.config.limit&&i.push(`SELECT ${Y.ROWNR}, 1 as ${Y.ROWGROUPINDEX} , 'ENTRY' as ${Y.TYPE}, 'NO_GROUP' as ${Y.ROWGROUP}, 'REST' as ${Y.CATEGORY} , SUM(ac1) as ac1, SUM(pp1) as pp1, SUM(dpp1_ac1_pos) as dpp1_ac1_pos, SUM(drpp1_ac1_pos) as drpp1_ac1_pos, SUM(dr_pp1) as dr_pp1 FROM (SELECT ROWNUM() AS ${Y.ROWNR}, ${i.length} as ${Y.ROWGROUPINDEX} , 'ENTRY' as ${Y.TYPE}, '${t.rowGroup||"NO_GROUP"}' as ${Y.ROWGROUP}, ${e} ${s.length>0?",".concat(s):""} FROM ? ${o} GROUP BY ${e} ORDER BY ${n[0]}) t WHERE t.rowNr > ${this.config.limit}`)}createDataRow(t,i,e,s,o,n,r){t.push(`SELECT ROWNUM() AS ${Y.ROWNR},\n ${t.length} as ${Y.ROWGROUPINDEX},\n 'ENTRY' as ${Y.TYPE},\n '${i.rowGroup||"NO_GROUP"}' as ${Y.ROWGROUP},\n '${Y.CATEGORYINDEX}',\n ${e} ${s.length>0?",".concat(s):""}\n FROM ? ${o}\n GROUP BY ${e}\n ORDER BY ${n[0]} ${r}`)}createGroupHeaderRow(t,i){!0===this.config.grouped&&i.push(`SELECT ROWNUM() AS ${Y.ROWNR},\n ${i.length} as ${Y.ROWGROUPINDEX},\n 'GROUPHEAD' as ${Y.TYPE},\n '${t.rowGroup}' as ${Y.ROWGROUP} ${this.config.showGroupTitle?`,'${t.rowGroup}' as ${Y.CATEGORY}`:""}\n FROM ?\n GROUP BY '1'`)}createGroupSumRow(t,i,e,s,o){!0!==this.config.grouped||ot.SUM!==this.config.type&&ot.SUMNOTOTAL!==this.config.type&&ot.OPT!==this.config.type&&ot.OPTNOTOTAL!==this.config.type||(t.push(`SELECT ${t.length} as ${Y.ROWGROUPINDEX},\n '=' as ${Y.OPERATION},\n '${e.rowGroup}' as ${Y.ROWGROUP},\n ROWNUM() AS ${Y.ROWNR},\n 'GROUP_SUM' as ${Y.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${Y.ROWGROUP} = '${e.rowGroup}'\n ORDER BY ${o[0]} `),i.push(`SELECT ${t.length} as ${Y.ROWGROUPINDEX},\n '=' as ${Y.OPERATION},\n '${e.rowGroup}' as ${Y.ROWGROUP},\n ROWNUM() AS ${Y.ROWNR},\n 'GROUP_SUM' as ${Y.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${Y.ROWGROUP} = '${e.rowGroup}'\n ORDER BY ${o[0]} `))}createTotalSumRow(t,i,e){if(ot.SUM===this.config.type||ot.OPT===this.config.type){const i=`${this.hasPartOf&&!1===this.config.grouped?`${this.i18n.get("SUM_TOTAL")||"SUM_TOTAL"} `:""}${this.config.title}`;t.push(`SELECT ${t.length} as ${Y.ROWGROUPINDEX},\n '${i}' as ${Y.ROWGROUP},\n '=' as ${Y.OPERATION},\n 'SUM' as ${Y.TYPE} ${e.length>0?",".concat(e):""}\n FROM ? `)}i.push(`SELECT ${t.length} as ${Y.ROWGROUPINDEX},\n 'SUM_TOTAL' as ${Y.ROWGROUP},\n '=' as ${Y.OPERATION},\n 'SUM' as ${Y.TYPE} ${e.length>0?",".concat(e):""}\n FROM ? `)}reduceResDrillByCategoryGroups(t,i){const e=new Map;return t.forEach((function(t){const s=t.rowNr+t.rowGroup+t.type+t.category;if(e.has(s)){const o=e.get(s);i.forEach((i=>{try{o[i]+=t[i]}catch(t){console.error("DataQuery: drill row aggregation failed",i,t)}}))}else e.set(s,t)})),[...e.values()]}injectDrillRowsToResultRows(t,i){const e=new Map;if(!0===this.config.grouped)t.forEach((function(t){i.forEach((function(i){const s=i.findIndex((i=>i.category===t.category&&i.rowGroup===t.rowGroup));if(s>=0){if(e.has(`${t.category}_${t.rowGroup}`)){const i=e.get(`${t.category}_${t.rowGroup}`)||0;e.set(`${t.category}_${t.rowGroup}`,i+1)}else e.set(`${t.category}_${t.rowGroup}`,1);t[Y.ROWNR]=e.get(`${t.category}_${t.rowGroup}`),i.splice(s+t[Y.ROWNR],0,t)}}))}));else{const s=this.findDuplicateSubCategories(t);t.forEach((function(t){i.forEach((function(i){const o=i.findIndex((i=>null!=i.category&&i.category===t.category));if(o>=0){if(e.has(`${t.category}`)){const i=e.get(`${t.category}`)||0;e.set(`${t.category}`,i+1)}else e.set(`${t.category}`,1);(1===t[Y.ROWNR]||s.includes(t.subCategory))&&(t.subCategory=`${t.subCategory} (${t.rowGroup})`),i.splice(o+t[Y.ROWNR],0,t)}}))}))}}createThereOfDrillRows(t,i,e,s){if(void 0===this.config.thereOf||0===this.config.thereOf.length)return;const o=[],n=[];this.config.thereOf.forEach((e=>{let s=!0,n="1 <> 1 OR ( ";null!=e.category&&0!==e.category.length&&e.category.trim()&&(n+=` ${Y.CATEGORY} = '${e.category}'`,s=!1),null!=e.rowGroup&&0!==e.rowGroup.length&&e.rowGroup.trim()&&(n+=` ${s?"":"AND"} ${Y.ROWGROUP} = '${e.rowGroup}'`,s=!1),null!=e.subCategory&&0!==e.subCategory.length&&e.subCategory.trim()&&(n+=` ${s?"":"AND"} ${Y.SUBCATEGORY} = '${e.subCategory}'`),n+=")",o.push(`SELECT ROWNUM() AS ${Y.ROWNR},\n null as operation,\n 'DRILLELEMENT' as ${Y.TYPE},\n ${Y.CATEGORY},\n ${Y.SUBCATEGORY},\n ${Y.ROWGROUP} as ${Y.ROWGROUP},\n ${t}\n FROM ?\n WHERE ${n}\n GROUP BY ${Y.ROWGROUP}, ${Y.CATEGORY}, ${Y.SUBCATEGORY}\n ORDER BY ${i[1]}`)})),o.forEach((function(t){n.push(...I(t,[e]))})),this.injectDrillRowsToResultRows(n,s)}calculateRelativeVariances(t,i){t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[Y.TYPE]&&i.forEach(((i,e)=>{t[e]=t[e]/t[i]}))}))}))}calculateColumnGroupRest(t,i){if(null==i||0===i.size)return;const e=new Map,s=new Map;i.forEach(((t,i)=>{const o=t,n=[];for(const t of o)n.push(`${i}##${t.name}`);e.set(i,n),s.set(`${i}##REST`,!1)})),t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[Y.TYPE]&&e.forEach(((i,e)=>{let o=0;i.forEach((i=>{void 0!==t[i]&&(o+=t[i])})),t[`${e}##REST`]=t[e]-o,0!==t[`${e}##REST`]&&s.set(`${e}##REST`,!0)}))}))}));const o=Array.from(s.entries()).filter((([t,i])=>!i)).map((([t])=>t));t.forEach((t=>{t.forEach((t=>{for(const i of o)delete t[i]}))}))}getRelativeScenarios(){const t=new Map;return this.config.scenarios.forEach((i=>{const e=this.createRelativeScenario(i);null!=e&&t.set(e.key,e.value)})),t}translateScenarioSQL(t,i,e){const s=new H(t);return ot.OPT===e||ot.OPTNOTOTAL===e?s.isValid?"dr"===s.type?`SUM(${s.base} - ${s.delta}) as ${t}, SUM(${s.delta}) as dr_${s.delta}`:`SUM(${s.base} - ${s.delta}) as ${t}`:i?`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:`SUM(${t}) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:s.isValid?"dr"===s.type?`SUM((${s.base} * transformOperator(operation)) - (${s.delta} * transformOperator(operation))) as ${t}, SUM(${s.delta} * transformOperator(operation)) as dr_${s.delta}`:`SUM((${s.base} * transformOperator(operation))- (${s.delta} * transformOperator(operation))) as ${t}`:`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`}createOrderString(t){return[`${t.hierarchy.toString()} ${t.direction}`,`${t.hierarchy.toString()} ${nt.ASC===t.direction?nt.DESC:nt.ASC}`]}createRelativeScenario(t){const i=new H(t);return i.isValid&&"dr"===i.type?{key:`${t}`,value:`dr_${i.delta}`}:null}exctractScenarioNames(t){const i=[];return t.split(",").forEach((t=>t.length>=2?i.push(t.split("as")[1].trim()):null)),i}findDuplicateSubCategories(t){const i=t.map((t=>({count:1,subCategory:t.subCategory}))).reduce(((t,i)=>(t[i.subCategory]=(t[i.subCategory]||0)+i.count,t)),{});return Object.keys(i).filter((t=>i[t]>1))}createPartOfQuery(t,i){var e;const s=[];let o="1 <> 1 ",n=` ${Y.ROWGROUP}`,r="ROWNUM()";return null===(e=this.config.partOf)||void 0===e||e.forEach((t=>{o+=`OR (${Y.CATEGORY} = '${t.category}'`,null!=t.rowGroup&&0!==t.rowGroup.length&&t.rowGroup.trim()&&(o+=`and ${Y.ROWGROUP} = '${t.rowGroup}'`),!1===this.config.grouped&&(n=` 'SUM_TOTAL' as ${Y.ROWGROUP} `,r="1"),o+=")"})),s.push(`SELECT ${r} AS ${Y.ROWNR},\n 'PARTELEMENT' as ${Y.TYPE},\n ${Y.CATEGORY},\n ${n},\n ${t}\n FROM ?\n WHERE ${o}\n GROUP BY ${Y.ROWGROUP}, ${Y.CATEGORY}, ${Y.TYPE}\n ORDER BY ${i[1]}`),s}checkConfigForPartOf(){return null!=this.config.partOf&&0!==this.config.partOf.length}createThereOfDrillColumns(t,i,e){if(null==t||0===t.size)return;const s=[],o=[];t.forEach(((t,i)=>{let e="1 <> 1 ";t.forEach((t=>{e+=` or columnGroup = '${t.name}' `})),s.push(`SELECT 'ENTRY' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, category, columnGroup, scenario`),s.push(`SELECT 'ENTRY' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n columnSubGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, category, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n columnSubGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, columnGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n columnSubGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, rowGroup, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n columnGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, columnGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n columnGroup,\n columnSubGroup,\n '${i}' as scenario,\n sum(${i} * transformOperator(operation)) as val\n FROM ?\n WHERE ${e}\n GROUP BY rowlevel, columnGroup, columnSubGroup, scenario`)}));for(const t of s)o.push(...I(t,[i]));this.injectDrillColumnsToResultRows(o,e)}injectDrillColumnsToResultRows(t,i){const e="##";for(const s of t)for(const t of i)for(const i of t)i.type===s.rowlevel&&("ENTRY"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&i.category===s.category?i[s.scenario+e+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&i.category===s.category&&(i[s.scenario+e+s.columnGroup+e+s.columnSubGroup]=s.val):"DRILLELEMENT"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===s.subCategory?i[s.scenario+e+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===s.subCategory?i[s.scenario+e+s.columnGroup+e+s.columnSubGroup]=s.val:"COLUMNGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===`${s.subCategory} (${s.rowGroup})`?i[s.scenario+e+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===`${s.subCategory} (${s.rowGroup})`&&(i[s.scenario+e+s.columnGroup+e+s.columnSubGroup]=s.val):("SUM"===s.rowlevel||"GROUP_SUM"===s.rowlevel)&&("COLUMNGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===s.subCategory&&(i[s.scenario+e+s.columnGroup]=s.val),"SUBGROUP"===s.columnlevel&&i.category===s.category&&i.subCategory===s.subCategory&&(i[s.scenario+e+s.columnGroup+e+s.columnSubGroup]=s.val)))}}class Ot{constructor(){this.normalizedHeader=[]}createHeader(t,i,e,s,o,n){const r=[];this.normalizedHeader=this.normalizeHeader(t,i);const a=new ht(0,0,rt.HEADER),l=new ht(1,0,rt.SEPERATORLINE);for(const t of this.normalizedHeader)a.createElement(W.translateScenarioLabel(t.name,e),t.type,this.createColumnType(t),null,this.setHeaderPrefix(t,e,s,o,n),null,null,null,null),l.createElement(null,t.type,this.createColumnType(t),null,null,null,null,null,null);return r.push(a),r.push(l),r}setHeaderPrefix(t,i,e,s,o){let n="";return"category"===t.name&&o&&(0===e.prefix.length&&0===s.length||(n=W.translateScenarioLabel("in",i)+" "+e.prefix+s)),t.order&&(n+=W.translateScenarioLabel("ORDER_"+t.order,i)),n}normalizeHeader(t,i){let e=[{name:Y.CATEGORY,group:Y.CATEGORY,type:Y.CATEGORY,order:void 0}];return ot.OPT!==t&&ot.OPTNOTOTAL!==t||(e=[{name:Y.OPERATION,group:Y.OPERATION,type:Y.OPERATION,order:void 0},{name:Y.CATEGORY,group:Y.CATEGORY,type:Y.CATEGORY,order:void 0}]),[...e,...i]}createBodyRows(t,i,e){const s=[];let o=-1;const n=new Rt(t,i).execute(e),r=this.calculateColumnStatistics(n,t.barColumns);for(const e of n)o+=1,s.push(...this.createRow(t.i18n,i,t.scenariosUnitType,e,o,-1,t.categoryWidth,t.measureScale,t.barColumns,r));return s}calculateColumnStatistics(t,i){const e=new Map;if(!i||0===i.length)return e;for(const t of i)e.set(t,{min:1/0,max:-1/0,absMax:0});for(const s of t)for(const t of s)for(const s of i){const i=this.extractColumnValue(t,s);if(null!==i&&!isNaN(i)){const t=e.get(s);t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}}for(const[t,i]of e)i.min!==1/0&&i.max!==-1/0||(i.min=0,i.max=0),i.absMax=Math.max(Math.abs(i.min),Math.abs(i.max)),e.set(t,i);return e}extractColumnValue(t,i){if(void 0!==t[i]){const e=Number(t[i]);return isNaN(e)?null:e}for(const e of Object.keys(t))if(e===i||e.endsWith("##"+i)||e===i+"##"+i){const i=Number(t[e]);if(!isNaN(i))return i}return null}createRow(t,i,e,s,o,n,r,a,l,h){var d;const c=[];for(const p of s){const u=p[Y.ROWGROUP],f=p[Y.SUBCATEGORY],m=p[Y.TYPE],v=p[Y.ROWNR]>=2,g=this.createDetailRow(m,n+=1,o,s.length);for(const s of this.normalizedHeader){const o=this.getRawDataRowElement(p,s),n=null!==(d=null==l?void 0:l.includes(s.type))&&void 0!==d&&d,c=n?null==h?void 0:h.get(s.type):void 0;g.createElement(this.translateSumCellLabel(t,i,o,u,f,m,s.type),s.type,this.createColumnType(s),this.setCellType(s.type,e),this.translateCellPrefix(i,m,s.type),this.translateScenarioCSS(s.type,o),v,r,null==a?void 0:a.value,n,c)}c.push(g)}return c}getRawDataRowElement(t,i){return i.name===i.group&&i.name===i.type?t[i.name]:i.name===i.group&&i.name!==i.type?t[i.type+"##"+i.name]:t[i.type+"##"+i.group+"##"+i.name]}createDetailRow(t,i,e,s){switch(t){case rt.GROUPHEAD:return new ht(i,e,rt.HEADER);case rt.SUM:case rt.GROUPSUM:return new ht(s+2,e,rt.SUM);case rt.DRILLELEMENT:return new ht(s+2,e,rt.DRILLELEMENT);case rt.PARTELEMENT:return new ht(s+2,e,rt.PARTELEMENT);default:return new ht(i,e,rt.STANDARD)}}translateSumCellLabel(t,i,e,s,o,n,r){return!1===Number.isNaN(Number(e))||this.isOperationColumn(r)?e:this.isGroupHeadCategory(n,r)||this.isEntryCategory(n,r)?t===L.ALL?`${i.get(e)||e}`:e:this.isDrillElementCategory(n,r)?t===L.ALL?`${i.get(o)||o}`:`${o}`:this.isPartElementCategory(n,r)?t===L.ALL||"SUM_TOTAL"===s?`${i.get(s)||s}`:`${s}`:this.isSumElementCategory(n,r)?t===L.ALL||"SUM_TOTAL"===s?`${i.get(s)||s}`:s:"GROUPHEAD"===n&&null==e?e:Number.isNaN(Number(e))?"-":Number(e)}isOperationColumn(t){return"operation"===t}translateScenarioCSS(t,i){const e=new H(t);let s="pos";return i<0&&(s="neg"),e.isValid?s+"_"+e.direction+("dr"===e.type?" relative_variance":""):t}setCellType(t,i){if("category"===t)return"";let e;const s=new H(t);return i===C.PERCENT?(e="percent",s.isValid&&"d"===s.type&&(e="decimal")):(e="decimal",s.isValid&&"dr"===s.type&&(e="percent")),e}isDrillElementCategory(t,i){return"DRILLELEMENT"===t&&"category"===i}isPartElementCategory(t,i){return"PARTELEMENT"===t&&"category"===i}isSumElementCategory(t,i){return("GROUP_SUM"===t||"SUM"===t)&&"category"===i}isEntryCategory(t,i){return"ENTRY"===t&&"category"===i}isGroupHeadCategory(t,i){return"GROUPHEAD"===t&&"category"===i}translateCellPrefix(t,i,e){return this.isOperationColumn(e)||this.isGroupHeadCategory(i,e)||this.isEntryCategory(i,e)?null:this.isDrillElementCategory(i,e)?`${t.get("there_of")} `:this.isPartElementCategory(i,e)?`${t.get("part_of")} `:null}createColumnType(t){return t.name===t.group&&t.name===t.type?"base":t.name===t.group?"columnGroup":"columnSubGroup"}}class St{constructor(t,i,e){this.data=[],this.headerRows=[],this.bodyRows=[],this.ruleSet=t||new j,this.dataSetFactory=new Ot,this.config=this.initConfig(e),this.i18n=this.initI18n(new Map),this.setData(i,e.filter),this.state=st.DIRTY}setI18n(t){this.i18n=this.initI18n(t)}initI18n(t){const i=new Map([["",""],["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["in","in"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return this.state=st.DIRTY,new Map([...i,...t||new Map])}initConfig(t){this.state=st.DIRTY;const i=t,e=this;return t.scenarios.sort(((t,i)=>e.ruleSet.getScenarioSorIndex(t)-e.ruleSet.getScenarioSorIndex(i))),i}setConfig(t){this.config=this.initConfig(t)}setData(t,i){if(null==t)return;if(null!=i&&i.length>0)try{this.data=I(`SELECT * FROM ? WHERE ${i}`,[t])}catch(e){console.error("Table: filter query failed, using unfiltered data",i,e),this.data=t}else this.data=t;const e=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,e,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=st.UP_TO_DATE}update(){const t=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,t,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=st.UP_TO_DATE}getHeader(){return this.state===st.DIRTY&&this.update(),this.headerRows}getBody(){return this.state===st.DIRTY&&this.update(),this.bodyRows}normalizeScenarios(t,i,e){var s;const o=[];for(const n of t){if(null==i?void 0:i.has(n)){const t=i.get(n);for(const i of t){o.push({name:i.name,group:i.name,type:n,order:void 0});for(const t of i.subGroups)o.push({name:t,group:i.name,type:n,order:void 0})}o.push({name:"REST",group:"REST",type:n,order:void 0})}let t;(null===(s=null==e?void 0:e.hierarchy)||void 0===s?void 0:s.at(0))===n&&(t=e.direction),o.push({name:n,group:n,type:n,order:t})}return o}hasNoData(){return 0===this.data.length}}class Et{constructor(){this.title="",this.scenarios=[],this.scenariosUnitType=C.DECIMAL,this.grouped=!1,this.showGroupTitle=!0,this.thereOf=[],this.categoryThereOf=new Map,this.partOf=[],this.sortOrder=new B(new z).default(),this.type=ot.LIST,this.limit=0,this.i18n=L.ALL,this.categoryWidth=P.W25,this.measureScale=new J,this.measureUnit="",this.measureType=k.VOLUME,this.showMeasureScale=!0,this.filter="",this.barColumns=[]}}class Mt{constructor(t,i,e,s){this.tableDrillGroupAdapter=t,this.stringAdapter=i,this.orderAdapter=e,this.dataSet=s}adapt(t){const i=new Et;return A.isString(t.title)&&(i.title=t.title),A.isArray(t.scenarios)&&(i.scenarios=F.adaptArray(t.scenarios,this.stringAdapter)),A.isExisting(t.scenariosUnitType)&&(i.scenariosUnitType=t.scenariosUnitType),A.isBoolean(t.grouped)&&(i.grouped=t.grouped),A.isBoolean(t.showGroupTitle)&&(i.showGroupTitle=t.showGroupTitle),A.isBoolean(t.showMeasureScale)&&(i.showMeasureScale=t.showMeasureScale),A.isArray(t.thereOf)&&(i.thereOf=F.adaptArray(t.thereOf,this.tableDrillGroupAdapter)),A.isExisting(t.categoryThereOf)&&(i.categoryThereOf=t.categoryThereOf),A.isArray(t.partOf)&&(i.partOf=F.adaptArray(t.partOf,this.tableDrillGroupAdapter)),A.isExisting(t.order)&&(i.sortOrder=this.orderAdapter.adapt(t.order)),A.isExisting(t.type)&&(i.type=t.type),A.isNumber(t.limit)&&(i.limit=t.limit),A.isExisting(t.i18n)&&(i.i18n=t.i18n),A.isExisting(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),A.isExisting(t.measureScale)&&(i.measureScale=V.calculateMeasureScale(this.dataSet,i.scenarios,t.measureScale)),A.isExisting(t.measureType)&&(i.measureType=t.measureType),A.isString(t.measureUnit)&&(i.measureUnit=t.measureUnit),A.isString(t.filter)&&(i.filter=t.filter.trim()),A.isArray(t.barColumns)&&(i.barColumns=t.barColumns),i}default(){return new Et}}class Tt{constructor(){this.rowGroup="",this.category="",this.subCategory="",this.partOf=""}}class Ut{constructor(){}adapt(t){const i=new Tt;return A.isString(t.rowGroup)&&(i.rowGroup=t.rowGroup),A.isString(t.category)&&(i.category=t.category),A.isString(t.subCategory)&&(i.subCategory=t.subCategory),A.isString(t.partOf)&&(i.partOf=t.partOf),i}default(){return new Tt}}class _t{constructor(){this.operation="+"}addRowGroup(t,i){this.rowGroup=t,this.rowGroupIndex=i}addCategory(t,i){this.category=t,this.categoryIndex=i}addSubCategory(t,i){this.subCategory=t,this.subCategoryIndex=i}addColumnGroup(t,i){this.columnGroup=t,this.columnGroupIndex=i}addSubColumnGroup(t,i){this.columnSubGroup=t,this.columnSubGroupIndex=i}}class Gt{constructor(){}adapt(t){const i=new _t;return A.isOperator(t.operation)&&(i.operation=t.operation),A.isNumber(t.rowGroupIndex)&&A.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),A.isNumber(t.categoryIndex)&&A.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),A.isNumber(t.subCategoryIndex)&&A.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),A.isNumber(t.columnGroupIndex)&&A.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),A.isNumber(t.columnSubGroupIndex)&&A.isString(t.columnSubGroup)&&i.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,i),this.setPlanValues(t,i),this.setPreviousPeriodValues(t,i),this.setForecastValues(t,i),i}default(){return new _t}setActualValues(t,i){A.isNumber(t.ac1)&&(i.ac1=t.ac1),A.isNumber(t.ac2)&&(i.ac2=t.ac2),A.isNumber(t.ac3)&&(i.ac3=t.ac3),A.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){A.isNumber(t.pp1)&&(i.pp1=t.pp1),A.isNumber(t.pp2)&&(i.pp2=t.pp2),A.isNumber(t.pp3)&&(i.pp3=t.pp3),A.isNumber(t.pp4)&&(i.pp4=t.pp4)}setPreviousPeriodValues(t,i){A.isNumber(t.pl1)&&(i.pl1=t.pl1),A.isNumber(t.pl2)&&(i.pl2=t.pl2),A.isNumber(t.pl3)&&(i.pl3=t.pl3),A.isNumber(t.pl4)&&(i.pl4=t.pl4)}setForecastValues(t,i){A.isNumber(t.fc1)&&(i.fc1=t.fc1),A.isNumber(t.fc2)&&(i.fc2=t.fc2),A.isNumber(t.fc3)&&(i.fc3=t.fc3),A.isNumber(t.fc4)&&(i.fc4=t.fc4)}}const xt=class{constructor(i){t(this,i),this.data=[],this.tableTitle="SUM_TOTAL",this.scenarios=[],this.scenariosDataFormat=C.DECIMAL,this.grouped=!1,this.limit=0,this.showGroupTitle=!0,this.thereof=[],this.partof=[],this.order={hierarchy:[],direction:nt.ASC},this.categorythereof=new Map,this.type=ot.LIST,this.categoryWidth=P.INF,this.dataFormatDigits={percent:2,decimal:1},this.i18n=new Map,this.i18nMode=L.ALL,this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.measureType=k.VOLUME,this.filter="",this.barColumns=[],this.unitScaling=.01,this.percentageScaling=.5,this.scaleFactor=1,this.componentDataFormatDigits=new Q,this.componentStyle=T(this)}render(){return i(e,null,(()=>{if(void 0!==this.table){if(this.table.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return i("p",{class:"warning"},t)}return i("table",null,i("thead",null,this.table.getHeader().map((t=>i("tr",{class:t.cssStyle},t.getCells().map((t=>i("th",{colSpan:t.colSpan,class:t.cssStyle},t.getAsHeaderList().map(((e,s,o)=>i("span",null,s===o.length-1?i("span",{class:" "===e?"table-footer":""},e,t.drawPrefix()," "):i("span",null,e,t.drawPrefix(),i("br",null)))))))))))),i("tbody",null,this.table.getBody().map((t=>i("tr",{class:t.cssStyle},null==t?void 0:t.getCells().map((t=>i("td",{colSpan:t.colSpan,class:t.cssStyle+" "+t.type},null!=t.prefix?i("span",{class:t.cssStyle+" "+t.prefixStyle},t.drawPrefix()):"",t.isBarChart&&t.columnStats?i($t,{value:t.value,scenario:t.key,columnStats:t.columnStats,height:18*this.scaleFactor,isRelative:t.key.startsWith("dr"),isPositiveGood:t.key.endsWith("_pos"),measureScale:t.measureScale,styles:this.barChartStyles}):t.draw(this.componentDataFormatDigits)))))))))}})())}componentWillRender(){const t=this.prepareConfig(),i=this.prepareData();this.componentDataFormatDigits=(new q).adapt(this.dataFormatDigits),this.barChartStyles=this.prepareBarChartStyles(),this.table=new St(new j,i,t),this.table.setI18n(this.i18n)}prepareConfig(){return new Mt(new Ut,new z,new B(new z),this.data).adapt({title:this.tableTitle,scenarios:this.scenarios,scenariosUnitType:this.scenariosDataFormat,grouped:this.grouped,showGroupTitle:this.showGroupTitle,thereOf:this.thereof,partOf:this.partof,categoryThereOf:this.categorythereof,order:this.order,type:this.type,limit:this.limit,i18n:this.i18nMode,categoryWidth:this.categoryWidth,measureScale:this.measureScale,measureUnit:this.measureUnit,measureType:this.measureType,showMeasureScale:this.showMeasureScale,filter:this.filter,barColumns:this.barColumns})}prepareData(){return F.adaptArray(this.data,new Gt)}prepareBarChartStyles(){return this.componentStyle((t=>{var i,e,s,o,n,r,a,l,h,d,c,p,u,f,m,v,g,w,b,$,y,R,O,S,E,M;const T=null===(i=t["bn-chart-time"])||void 0===i?void 0:i.varianceStyles,U=null===(e=t["bn-chart-time"])||void 0===e?void 0:e.barStyles;return{positive:{stroke:(null===(s=null==T?void 0:T.pos)||void 0===s?void 0:s.stroke)||"#008f96",fill:(null===(o=null==T?void 0:T.pos)||void 0===o?void 0:o.fill)||"#008f96",fillpattern:(null===(n=null==T?void 0:T.pos)||void 0===n?void 0:n.fillpattern)||"solid"},negative:{stroke:(null===(r=null==T?void 0:T.neg)||void 0===r?void 0:r.stroke)||"#ff0000",fill:(null===(a=null==T?void 0:T.neg)||void 0===a?void 0:a.fill)||"#ff0000",fillpattern:(null===(l=null==T?void 0:T.neg)||void 0===l?void 0:l.fillpattern)||"solid"},neutral:{stroke:(null===(h=null==T?void 0:T.neu)||void 0===h?void 0:h.stroke)||"#808080",fill:(null===(d=null==T?void 0:T.neu)||void 0===d?void 0:d.fill)||"#808080",fillpattern:(null===(c=null==T?void 0:T.neu)||void 0===c?void 0:c.fillpattern)||"outlined"},scenarios:{ac:{stroke:(null===(p=null==U?void 0:U.ac)||void 0===p?void 0:p.stroke)||"#404040",fill:(null===(u=null==U?void 0:U.ac)||void 0===u?void 0:u.fill)||"#404040",fillpattern:(null===(f=null==U?void 0:U.ac)||void 0===f?void 0:f.fillpattern)||"solid"},pp:{stroke:(null===(m=null==U?void 0:U.pp)||void 0===m?void 0:m.stroke)||"#A6A6A6",fill:(null===(v=null==U?void 0:U.pp)||void 0===v?void 0:v.fill)||"#A6A6A6",fillpattern:(null===(g=null==U?void 0:U.pp)||void 0===g?void 0:g.fillpattern)||"solid"},fc:{stroke:(null===(w=null==U?void 0:U.fc)||void 0===w?void 0:w.stroke)||"#404040",fill:(null===(b=null==U?void 0:U.fc)||void 0===b?void 0:b.fill)||"#ffffff",fillpattern:(null===($=null==U?void 0:U.fc)||void 0===$?void 0:$.fillpattern)||"hatched"},pl:{stroke:(null===(y=null==U?void 0:U.pl)||void 0===y?void 0:y.stroke)||"#404040",fill:(null===(R=null==U?void 0:U.pl)||void 0===R?void 0:R.fill)||"#ffffff",fillpattern:(null===(O=null==U?void 0:U.pl)||void 0===O?void 0:O.fillpattern)||"outlined"}},fontColor:(null===(S=t.global)||void 0===S?void 0:S.fontColor)||"#000000",fontSize:.85*((null===(E=t.global)||void 0===E?void 0:E.fontSizePx)||13.3333)*this.scaleFactor,fontFamily:(null===(M=t.global)||void 0===M?void 0:M.fontFamily)||"'Noto Sans', sans-serif",unitScaling:this.unitScaling,percentageScaling:this.percentageScaling,scaleFactor:this.scaleFactor}}))}get element(){return s(this)}};xt.style=':host{position:relative;display:inline-block}table{background-color:var(--bn-font-background, white);font-size:var(--bn-font-size, 1em);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);border-spacing:0.3em 0}thead{border-style:none}tr:first-child td{border-top:none;padding-top:0.5em}td.ac1,td.ac2,td.ac3,td.ac4,td.pp1,td.pp2,td.pp3,td.pp4,td.pl1,td.pl2,td.pl3,td.pl4,td.fc1,td.fc2,td.fc3,td.fc4,td.share,td.variance,td.pos_pos,td.pos_neg,td.neg_pos,td.neg_neg,td.pos_neutral,td.neg_neutral{text-align:right}.category-inf{max-width:1000em}.category-w100{max-width:100em}.category-w50{max-width:50em}.category-w25{max-width:25em}.category-w20{max-width:20em}.category-w15{max-width:15em}.category-w10{max-width:10em}.category-w5{max-width:5em}.prefix-second{color:transparent;font-style:normal}.prefix-first{font-style:normal}th{border-bottom:0.1em solid black;text-align:right;font-weight:normal;vertical-align:text-top}td.columnGroup,th.columnGroup{font-size:0.6em}td.columnSubGroup,th.columnSubGroup{font-size:0.6em;border-spacing:0em 0;font-style:italic}td.base,th.base{font-style:normal}th.ofit,td.ofit,tr.ofit,th.partof,td.partof,tr.partof{font-size:0.6em;font-style:italic}td.ofit,td.partof{font-size:0.6em;font-style:italic}th.ofit td,tr.ofit td,th.partof td,tr.partof td{border-top:0em solid black;padding-left:1em}th.ofit share,th.partof share,tr.share td{border-top:0em solid black}th.share,tr.share,td.share{font-size:0.6em;font-style:italic}th.filler{border-bottom:0em solid black;text-align:right}td.filler{border-top:0em none !important;border-bottom:0em none;text-align:right}th.group{text-align:center;border-spacing:1em 0}th.headerlabel{border-bottom:0em none black;padding-bottom:0em}td.variance:after{content:"%"}td.relative_variance{font-style:italic}td.percent{font-style:italic;text-align:right}td.decimal{text-align:right}td.pos_pos{color:#008f96}td.neg_pos{color:#ff0000}td.pos_neg{color:#ff0000}td.neg_neg{color:#008f96}td.pos_pos:before{content:"+"}td.pos_neg:before{content:"+"}td.pos_neu:before{content:"+"}th.ac1,th.ac2,th.ac3,th.ac4{padding-top:0em;border-bottom:0.3em solid black}th.pp1,th.pp2,th.pp3,th.pp4{padding-top:0em;border-bottom:0.3em solid grey}th.pl1,th.pl2,th.pl3,th.pl4{padding-top:0em;border-bottom:0.3em double black}th.fc1,th.fc2,th.fc3,th.fc4{border-bottom:0.3em solid;border-image:repeating-linear-gradient(-45deg, white, white, black, white, white 0.3em) 2}td.colsum{font-weight:bold}th.colsum{padding-top:0em;font-weight:bold}tr.sum td{border-top:0.1em solid black;font-weight:bold;padding-bottom:0.5em}tr.groupheader td{border-top:0em dotted #ddd;padding-top:0.5em;font-weight:bold;font-style:italic}tr.begingroup td{border-top:0em dotted #ddd;padding-top:0.5em}th.begin-group{padding-left:0.75em}th.end-group{padding-left:0.75em}td{box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em dashed #ddd;padding-left:0.5em;max-width:15em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-footer{font-size:0.6em}.cell-bar-chart{display:inline-block;vertical-align:middle}.bar-chart-empty{color:#999}td:has(.cell-bar-chart){padding:0 0.25em;vertical-align:middle}td:has(.cell-bar-chart).pos_pos:before,td:has(.cell-bar-chart).pos_neg:before,td:has(.cell-bar-chart).pos_neu:before{content:none}td:has(.cell-bar-chart).variance:after{content:none}';export{K as bn_context,Z as bn_datasource,it as bn_page,at as bn_table,xt as ibcs_table}
@@ -1 +1 @@
1
- import{r as t,h as e,F as a,g as s}from"./p-B27Ax6P_.js";import{g as i}from"./p-CnI71OA9.js";import{w as r}from"./p-CY1RzLjU.js";const n=class{constructor(e){t(this,e),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!0,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=r(this)}connectedCallback(){this.stores=i(this.element)}getCommonStyles(){let t="100%",e="100%";return!0===this.cardFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.cardGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({overflow:"hidden","grid-area":t})))}getSlots(t){const s=this.createDivAreaStyles(t);return e(a,null,s.map(((t,a)=>e("div",{style:t},e("slot",{name:"card-slot-"+a})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return console.warn("getTemplatePattern",{name:t}),!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){const t=this.getLayoutStyle(),a=this.extractSlotNames(t["grid-template-areas"]);return e("bn-card",{key:"cdc04f3414fa80148fc8be40cbaf0cac1035fca1",styles:this.styles,class:this.setCardClass()},e("div",{key:"3374b14ec8a8a73de58f866b0c6a691ee0b8d2ae",class:"cardtitle"},e("bn-title",{key:"23a6f991ad6b1a8b74066943b108f3666ae0c863",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),null!=this.titleImage&&""!==this.titleImage?e("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),e("bn-body",{key:"06d86283489ea2db12d448b1d4b72b540ad352f8"},e("div",{key:"659cfb06f4d756ffd4e1d08910c66a0751d71f9d",style:t},this.getSlots(a))),e("bn-footer",{key:"8aa67fdf3bcbb465c7861f83f6371bc7f73ae75e",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return s(this)}};n.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';export{n as bn_layout_card}
1
+ import{r as t,h as e,F as a,g as s}from"./p-JNHhIe7t.js";import{g as i}from"./p-DRikHQE-.js";import{w as r}from"./p-tzFCK9qn.js";const n=class{constructor(e){t(this,e),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!0,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=r(this)}connectedCallback(){this.stores=i(this.element)}getCommonStyles(){let t="100%",e="100%";return!0===this.cardFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.cardGridGap+"px"}}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({overflow:"hidden","grid-area":t})))}getSlots(t){const s=this.createDivAreaStyles(t);return e(a,null,s.map(((t,a)=>e("div",{style:t},e("slot",{name:"card-slot-"+a})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return console.warn("getTemplatePattern",{name:t}),!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){const t=this.getLayoutStyle(),a=this.extractSlotNames(t["grid-template-areas"]);return e("bn-card",{key:"cdc04f3414fa80148fc8be40cbaf0cac1035fca1",styles:this.styles,class:this.setCardClass()},e("div",{key:"3374b14ec8a8a73de58f866b0c6a691ee0b8d2ae",class:"cardtitle"},e("bn-title",{key:"23a6f991ad6b1a8b74066943b108f3666ae0c863",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),null!=this.titleImage&&""!==this.titleImage?e("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),e("bn-body",{key:"06d86283489ea2db12d448b1d4b72b540ad352f8"},e("div",{key:"659cfb06f4d756ffd4e1d08910c66a0751d71f9d",style:t},this.getSlots(a))),e("bn-footer",{key:"8aa67fdf3bcbb465c7861f83f6371bc7f73ae75e",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return s(this)}};n.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';export{n as bn_layout_card}
@@ -0,0 +1 @@
1
+ import{r as s,h as t,H as e,g as i}from"./p-JNHhIe7t.js";import{w as o}from"./p-CYjZRKdI.js";import{w as a}from"./p-BSfqOkN_.js";import{g as n}from"./p-DRikHQE-.js";import{w as r}from"./p-tzFCK9qn.js";const d=class{constructor(t){s(this,t),o(this),this.errors=r(this),this.componentStyle=a(this)}connectedCallback(){this.stores=n(this.element)}getFontStyles(){return this.componentStyle((s=>{var t,e,i,o;return{"--bn-font-family":(null===(t=s.global)||void 0===t?void 0:t.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(e=s.global)||void 0===e?void 0:e.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(i=s.global)||void 0===i?void 0:i.fontColor)||"#000000","--bn-font-background":(null===(o=s.global)||void 0===o?void 0:o.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(s){if(null==s||""===s)return"";const t=this.stores.assets.state;return s.startsWith("asset:")?t[s.substring(6)]:t[s]||s}render(){return t(e,{key:"bbe7f6098aa6f3a5495b36557b218a82ec2ccbca",id:this.text||this.image?"container-page-message":"container",style:this.getFontStyles()},t("div",{key:"d89297da5605b0ee1cc757b1771b6a48525a24e5",id:"message-text"},null!=this.text&&""!==this.text?t("span",{class:"note"},this.text):""),t("div",{key:"70bc74b0a8a5a39fdd2931cf86faada294142a26",id:"page-image"},null!=this.image&&""!==this.image?t("img",{class:"image",src:this.prepareAssetUrl(this.image)}):""))}static get assetsDirs(){return["assets"]}get element(){return i(this)}};d.style=':host{padding:0.2em 0.5em;display:flex;flex-direction:row;justify-content:space-between;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(#container-page-message){height:4.55em;box-sizing:border-box;-webkit-box-sizing:border-box;border-bottom:0.1em solid #ddd}div#message-text{font-size:1.4em;overflow:clip;display:inline}.image{z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';export{d as bn_message}
@@ -0,0 +1 @@
1
+ import{r as s,h as t,H as r,g as i}from"./p-JNHhIe7t.js";import{w as o}from"./p-CYjZRKdI.js";import{g as a}from"./p-DRikHQE-.js";import{w as e}from"./p-DG-1MR_T.js";import{w as h}from"./p-tzFCK9qn.js";const n=class{constructor(t){s(this,t),o(this),this.errors=h(this),e(this,(s=>{this.stores||(this.stores=a(this.element));try{const t=s.replace(/\s/g,"");this.stores.assets.set(this.name,t)}catch(t){console.error("Error parsing asset",t,s),this.stores.assets.set(this.name,void 0)}}))}render(){return t(r,{key:"dfec9f90136278bddab194479301aa3fa5bc1e72"})}get element(){return i(this)}};n.style=":host{display:none}";export{n as bn_asset}
@@ -0,0 +1 @@
1
+ import{g as e,f as t}from"./p-JNHhIe7t.js";import{g as r,c as s}from"./p-DRikHQE-.js";import{r as c}from"./p-tzFCK9qn.js";const n=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},o=(e,t)=>t,a=(e,t)=>[...new Set([...e,...t])],l=(e,t)=>{const r=(e=>{return{arrayMergeType:"combine",arrayMerge:(t=e?e.arrayMergeType:"combine","overwrite"===t?o:a),...e};var t})(t);return e.reduce(((e,t)=>(Object.keys(t).forEach((s=>{Array.isArray(e[s])&&Array.isArray(t[s])?r&&r.arrayMerge&&(e[s]=r.arrayMerge(e[s],t[s])):e[s]=n(e[s])&&n(t[s])?l([e[s],t[s]],r):t[s]})),e)),{})},i=n=>{let o,a,i,b;const u=()=>{const e=a.componentStyles.state;b=l([e._system||{},e._default||{},e[i]||{}])},y=new MutationObserver((r=>{r.forEach((r=>{"selected-style"===r.attributeName&&(i=e(n).getAttribute("selected-style"),u(),t(n))}))})),j=n.connectedCallback;n.connectedCallback=()=>{const s=e(n);a=r(s),b=a.componentStyles.state._system,y.observe(s,{attributes:!0,attributeFilter:["selected-style"]}),i=e(n).getAttribute("selected-style"),u(),o=a.componentStyles.on("set",(r=>{r===i&&(i=e(n).getAttribute("selected-style"),u(),t(e(n)))})),c(j,n)};const p=n.disconnectedCallback;return n.disconnectedCallback=()=>{y.disconnect(),c(o),s(e(n)),c(p,n)},e=>e(b)};export{i as w}
@@ -1 +1 @@
1
- import{g as t,c as s}from"./p-CnI71OA9.js";import{g as e,f as r}from"./p-B27Ax6P_.js";import{r as n}from"./p-CY1RzLjU.js";const a=a=>{let o,i,l;const m=new MutationObserver((t=>{t.forEach((t=>{"namespace"===t.attributeName&&(i=e(a).getAttribute("namespace"),r(a))}))})),p=a.connectedCallback;a.connectedCallback=()=>{const s=e(a);l=t(s),m.observe(s,{attributes:!0,attributeFilter:["namespace"]}),i=e(a).getAttribute("namespace"),o=l.internationalization.on("set",(t=>{t===i&&r(a)})),n(p,a)};const u=a.disconnectedCallback;return a.disconnectedCallback=()=>{m.disconnect(),n(o),s(e(a)),n(u,a)},{t:(t,s)=>{var r,n;t.startsWith(".")&&(t=e(a).localName+t);const o=l.internationalization.state,m=l.context.state.locale;let p=i;return null==(null===(n=null===(r=o[p])||void 0===r?void 0:r[m])||void 0===n?void 0:n[t])&&(p="_system"),o[p][m][t].replace(/{{([\s\S]+?)}}/g,((t,e)=>{var r;return null!==(r=null==s?void 0:s[e.trim()])&&void 0!==r?r:""}))}}};export{a as w}
1
+ import{g as t,c as s}from"./p-DRikHQE-.js";import{g as e,f as r}from"./p-JNHhIe7t.js";import{r as n}from"./p-tzFCK9qn.js";const a=a=>{let o,i,l;const m=new MutationObserver((t=>{t.forEach((t=>{"namespace"===t.attributeName&&(i=e(a).getAttribute("namespace"),r(a))}))})),p=a.connectedCallback;a.connectedCallback=()=>{const s=e(a);l=t(s),m.observe(s,{attributes:!0,attributeFilter:["namespace"]}),i=e(a).getAttribute("namespace"),o=l.internationalization.on("set",(t=>{t===i&&r(a)})),n(p,a)};const u=a.disconnectedCallback;return a.disconnectedCallback=()=>{m.disconnect(),n(o),s(e(a)),n(u,a)},{t:(t,s)=>{var r,n;t.startsWith(".")&&(t=e(a).localName+t);const o=l.internationalization.state,m=l.context.state.locale;let p=i;return null==(null===(n=null===(r=o[p])||void 0===r?void 0:r[m])||void 0===n?void 0:n[t])&&(p="_system"),o[p][m][t].replace(/{{([\s\S]+?)}}/g,((t,e)=>{var r;return null!==(r=null==s?void 0:s[e.trim()])&&void 0!==r?r:""}))}}};export{a as w}
@@ -0,0 +1 @@
1
+ import{g as n,r as e}from"./p-tzFCK9qn.js";var s,t;!function(n){n[n.RUNNING=0]="RUNNING",n[n.SUCCESSFUL=1]="SUCCESSFUL",n[n.ERROR=2]="ERROR"}(s||(s={})),function(n){let e;const t=new Map,o={running:0,successful:0,error:0},r=n=>{switch(n){case s.RUNNING:return"running";case s.SUCCESSFUL:return"successful";default:return"error"}};n.updateStatus=(s,c)=>{e&&clearTimeout(e);const u=t.get(s);void 0!==u&&o[r(u)]--,o[r(c)]++,t.set(s,c),e=setTimeout((()=>{window.componentRegisterIsRenderedResult=n.componentRegisterIsRendered(),console.log("componentRegisterIsRendered:",window.componentRegisterIsRenderedResult)}),500)},n.componentRegisterIsRendered=()=>0===o.running,n.componentRegisterStatus=()=>Object.assign({},o)}(t||(t={}));const o=o=>{const r=n(),c=o.connectedCallback;o.connectedCallback=()=>{t.updateStatus(r,s.RUNNING),e(c,o)};const u=o.componentWillRender;o.componentWillRender=()=>{t.updateStatus(r,s.RUNNING),e(u,o)};const i=o.componentDidRender;o.componentDidRender=()=>{t.updateStatus(r,s.SUCCESSFUL),e(i,o)}};export{o as w}