@bino-bi/bn-template-engine 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (205) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-1265d8d3.entry.js +1 -0
  3. package/dist/bn-template-engine/p-15516dac.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1c716641.entry.js +1 -0
  5. package/dist/bn-template-engine/p-27cc8dc0.entry.js +1 -0
  6. package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
  7. package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
  8. package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
  9. package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
  10. package/dist/bn-template-engine/p-745f4596.entry.js +1 -0
  11. package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
  12. package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
  13. package/dist/bn-template-engine/p-7ea7c325.entry.js +1 -0
  14. package/dist/bn-template-engine/p-945cc95d.entry.js +1 -0
  15. package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
  16. package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
  17. package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
  18. package/dist/bn-template-engine/{p-DgfL-ffj.js → p-Bhd_WSML.js} +1 -1
  19. package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
  20. package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
  21. package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
  22. package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
  23. package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
  24. package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
  25. package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
  26. package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
  27. package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
  28. package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
  29. package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
  30. package/dist/bn-template-engine/p-b34eaf86.entry.js +1 -0
  31. package/dist/bn-template-engine/p-bdb8b44c.entry.js +1 -0
  32. package/dist/bn-template-engine/p-c44fcb8e.entry.js +1 -0
  33. package/dist/bn-template-engine/p-c7e1a49b.entry.js +1 -0
  34. package/dist/bn-template-engine/p-d9003041.entry.js +1 -0
  35. package/dist/bn-template-engine/p-daa7ffa3.entry.js +1 -0
  36. package/dist/bn-template-engine/p-e084f50a.entry.js +1 -0
  37. package/dist/bn-template-engine/p-eaba6658.entry.js +1 -0
  38. package/dist/bn-template-engine/{p-CvXqez4D.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-CbIVfGEH.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CfkXYAMN.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-DtpbD8mQ.js → Order-iG11HI4R.js} +36 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-D-rTWlDo.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
  43. package/dist/cjs/bn-asset.cjs.entry.js +5 -4
  44. package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
  45. package/dist/cjs/bn-card.cjs.entry.js +5 -4
  46. package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +1058 -28
  47. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -12
  48. package/dist/cjs/bn-component-style.cjs.entry.js +5 -4
  49. package/dist/cjs/bn-dataset.cjs.entry.js +38 -9
  50. package/dist/cjs/bn-grid.cjs.entry.js +9 -7
  51. package/dist/cjs/bn-image.cjs.entry.js +9 -7
  52. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -4
  53. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -2
  54. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -1
  55. package/dist/cjs/bn-message.cjs.entry.js +5 -4
  56. package/dist/cjs/bn-table.cjs.entry.js +979 -0
  57. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  58. package/dist/cjs/bn-template.cjs.entry.js +3 -2
  59. package/dist/cjs/bn-text.cjs.entry.js +11 -9
  60. package/dist/cjs/bn-tree.cjs.entry.js +9 -7
  61. package/dist/cjs/contentDecoder-JxOldq1e.js +419 -0
  62. package/dist/cjs/{context-protocol-CRPmux5D.js → context-protocol-DRQWrwsA.js} +2 -0
  63. package/dist/cjs/editor-companion.cjs.entry.js +1 -1
  64. package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +57 -0
  65. package/dist/cjs/ibcs-chart-time.cjs.entry.js +22 -18
  66. package/dist/cjs/{bn-context_5.cjs.entry.js → ibcs-table.cjs.entry.js} +159 -1259
  67. package/dist/cjs/{StringAdapter-ByCHdlDO.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
  68. package/dist/cjs/index-Dm85hG6t.js +65 -0
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
  71. package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
  72. package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
  73. package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
  74. package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
  75. package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
  76. package/dist/cjs/{withStyled-BBtMesx3.js → withStyled-CS1Yp4sv.js} +12 -61
  77. package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
  78. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
  79. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
  80. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  81. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +3 -4
  82. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  83. package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
  84. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  85. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  86. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  87. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  88. package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
  89. package/dist/collection/components/bn-table/bn-table.js +60 -12
  90. package/dist/collection/components/bn-table/ibcs-table.css +7 -5
  91. package/dist/collection/components/bn-table/ibcs-table.js +22 -1
  92. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
  93. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
  94. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
  95. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
  96. package/dist/collection/stores/componentStyles.js +2 -0
  97. package/dist/collection/utils/constants.js +35 -5
  98. package/dist/collection/utils/contentDecoder.js +28 -0
  99. package/dist/collection/utils/stackColors.js +2 -2
  100. package/dist/collection/utils/validate.js +5 -2
  101. package/dist/components/DataFormatDigits.js +1 -1
  102. package/dist/components/DateStringFactory.js +1 -1
  103. package/dist/components/Order.js +1 -1
  104. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  105. package/dist/components/bn-chart-structure.js +1 -1
  106. package/dist/components/bn-chart-time.js +1 -1
  107. package/dist/components/bn-dataset.js +1 -1
  108. package/dist/components/bn-datasource.js +1 -1
  109. package/dist/components/bn-table.js +1 -1
  110. package/dist/components/bn-title2.js +1 -1
  111. package/dist/components/contentDecoder.js +1 -0
  112. package/dist/components/context-protocol.js +1 -1
  113. package/dist/components/emotion-hash.esm.js +1 -0
  114. package/dist/components/ibcs-chart-structure2.js +1 -1
  115. package/dist/components/ibcs-chart-time2.js +1 -1
  116. package/dist/components/ibcs-table2.js +1 -1
  117. package/dist/components/ibcs-title2.js +1 -1
  118. package/dist/components/ibcsRuleSet.js +1 -1
  119. package/dist/components/validate.js +1 -1
  120. package/dist/components/withStyled.js +1 -1
  121. package/dist/esm/{DataFormatDigits-DYdbRX-1.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  122. package/dist/esm/{DateStringFactory-DRcbojUT.js → DateStringFactory-CSGz6TDk.js} +1 -1
  123. package/dist/esm/{Order-DdexOqTs.js → Order-Bnhh02CF.js} +36 -6
  124. package/dist/esm/{SVGVariancesStyleGroup-D0Cwprv1.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  125. package/dist/esm/bn-asset.entry.js +5 -4
  126. package/dist/esm/bn-body_4.entry.js +11 -9
  127. package/dist/esm/bn-card.entry.js +5 -4
  128. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1048 -22
  129. package/dist/esm/bn-chart-time.entry.js +38 -12
  130. package/dist/esm/bn-component-style.entry.js +5 -4
  131. package/dist/esm/bn-dataset.entry.js +35 -6
  132. package/dist/esm/bn-grid.entry.js +9 -7
  133. package/dist/esm/bn-image.entry.js +9 -7
  134. package/dist/esm/bn-internationalization.entry.js +5 -4
  135. package/dist/esm/bn-layout-card.entry.js +3 -2
  136. package/dist/esm/bn-layout-page.entry.js +2 -1
  137. package/dist/esm/bn-message.entry.js +5 -4
  138. package/dist/esm/bn-table.entry.js +977 -0
  139. package/dist/esm/bn-template-engine.js +1 -1
  140. package/dist/esm/bn-template.entry.js +3 -2
  141. package/dist/esm/bn-text.entry.js +11 -9
  142. package/dist/esm/bn-tree.entry.js +9 -7
  143. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  144. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  145. package/dist/esm/editor-companion.entry.js +1 -1
  146. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  147. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  148. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +106 -1202
  149. package/dist/esm/{StringAdapter-CTL-Dvzp.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  150. package/dist/esm/index-DHezf8pZ.js +65 -0
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  153. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  154. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  155. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  156. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  157. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  158. package/dist/esm/{withStyled-DCipbf2O.js → withStyled--qQWquTH.js} +9 -59
  159. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  160. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  161. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  162. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  163. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  164. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  165. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  166. package/dist/types/components/bn-table/bn-table.d.ts +12 -8
  167. package/dist/types/components/bn-table/ibcs-table.d.ts +1 -0
  168. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
  169. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
  170. package/dist/types/components.d.ts +118 -34
  171. package/dist/types/stores/componentStyles.d.ts +2 -0
  172. package/dist/types/utils/constants.d.ts +23 -5
  173. package/dist/types/utils/contentDecoder.d.ts +12 -0
  174. package/dist/types/utils/validate.d.ts +1 -0
  175. package/package.json +2 -1
  176. package/dist/bn-template-engine/p--PSoPbDM.js +0 -1
  177. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  178. package/dist/bn-template-engine/p-0ca8dc17.entry.js +0 -1
  179. package/dist/bn-template-engine/p-1d9a3be9.entry.js +0 -1
  180. package/dist/bn-template-engine/p-35638ad0.entry.js +0 -1
  181. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  182. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  183. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  184. package/dist/bn-template-engine/p-60a7fc59.entry.js +0 -1
  185. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  186. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  187. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  188. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  189. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  190. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  191. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  192. package/dist/bn-template-engine/p-DVo6aZUE.js +0 -1
  193. package/dist/bn-template-engine/p-DdexOqTs.js +0 -1
  194. package/dist/bn-template-engine/p-DyRaC0MB.js +0 -1
  195. package/dist/bn-template-engine/p-a95ccc16.entry.js +0 -1
  196. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  197. package/dist/bn-template-engine/p-bc59ea5c.entry.js +0 -1
  198. package/dist/bn-template-engine/p-d279b578.entry.js +0 -1
  199. package/dist/bn-template-engine/p-dd9dd407.entry.js +0 -1
  200. package/dist/bn-template-engine/p-e102a490.entry.js +0 -1
  201. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  202. package/dist/bn-template-engine/p-f89e55c6.entry.js +0 -1
  203. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  204. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  205. package/dist/esm/bn-chart-structure.entry.js +0 -698
@@ -1 +1 @@
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
+ 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-daa7ffa3",[[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-bdb8b44c",[[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-b34eaf86",[[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-745f4596",[[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"barColumnWidth":[1,"bar-column-width"],"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}],"barColumnWidth":[{"validateBarColumnWidth":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}]}]]],["p-1c716641",[[1,"bn-asset",{"name":[1]}]]],["p-c44fcb8e",[[0,"bn-component-style",{"name":[1]}]]],["p-15516dac",[[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4],"raw":[4]},null,{"name":[{"nameUpdated":0}]}]]],["p-4426d484",[[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-d9003041",[[1,"bn-image",{"source":[1]}]]],["p-e084f50a",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-eaba6658",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-7a560278",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-27cc8dc0",[[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-75e97c87",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-c7e1a49b",[[257,"bn-card"]]],["p-51f8dc9e",[[1,"bn-message",{"text":[1025],"image":[1]}]]],["p-1265d8d3",[[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-945cc95d",[[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],"barColumnMaxWidth":[2,"bar-column-max-width"],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}]]],["p-7ea7c325",[[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}]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-datasource",{"name":[1],"raw":[4]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[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-53d4e690",[[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))));
@@ -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,I as o,F as l,b as a,c,d as u,P as d}from"./p-u8igQLRZ.js";import{g as f,D as p,c as w,A as v,C as b,S as g,f as m,l as L,j as P,O as S}from"./p-Bnhh02CF.js";import{C as y,F as k,V as M}from"./p-1jFf17Vj.js";import{S as C,D as x,b as A}from"./p-5KQYRQLK.js";import{a as O}from"./p-BYmPQYxx.js";import{D as T,b as $}from"./p-Bhd_WSML.js";import{I as _,S as D}from"./p-ChlK-T9I.js";import"./p-BFTU3MAI.js";class Y{constructor(){this.scenarioOffset=.3,this.scenarioLabelToColumn=.3,this.labelToColumn=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.columnWidth=2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=3,this.axisTickLength=.3}}class E{adapt(t){const i=new Y;return f.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),f.isNumber(t.scenarioLabelToColumn)&&(i.scenarioLabelToColumn=t.scenarioLabelToColumn),f.isNumber(t.labelToColumn)&&(i.labelToColumn=t.labelToColumn),f.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),f.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),f.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),f.isNumber(t.columnWidth)&&(i.columnWidth=t.columnWidth),f.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),f.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),f.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),f.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),f.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),f.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),f.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),f.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new Y}}class N{constructor(t,i,s,h,e,n,r){this.categoryPosition={x:0,y:0},this.spacings=new Y,this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontStlye=s,this.dataLabelHeight=this.caluculateDataLabelHeight(),this.axisPosition={x:0,y:0},this.columnValue={min:h,max:e},this.numberOfColumns=n,this.leftSideLabelLength=r,this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}caluculateDataLabelHeight(){return 1.1*y("123456789",{font:this.fontStlye.font,fontSize:this.fontStlye.size+"px"}).height}getColumnCenterPositionX(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth+this.leftSideLabelLength+.5*this.spacings.columnWidth}getAxisPositionY(t){let i=this.columnValue.max.getScaledUnit();return t&&(i=this.columnValue.max.getScaledPercentUnit()+this.getNeedleWidth()),i+this.dataLabelHeight+this.spacings.labelToAxis+this.padding.top}getAxisPositionX(){return this.padding.left+this.leftSideLabelLength}getColumnPositionX(t,i){return i?this.getColumnCenterPositionX(t):this.getColumnCenterPositionX(t)-this.spacings.scenarioOffset}getColumnPositionY(){return this.columnValue.max.getScaledUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.padding.top}getNeedlePositionY(){return this.columnValue.max.getScaledPercentUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.getNeedleWidth()+this.padding.top}getMarkerPositionX(t,i){return i?this.getColumnCenterPositionX(t)-this.spacings.markerOffset-.5*this.getColumnWidth():this.getColumnCenterPositionX(t)+this.spacings.markerOffset+.5*this.getColumnWidth()}getMarkerPositionY(){return this.getColumnPositionY()}getAxisTitlePositionX(t){const i=t.width();return this.axisPosition.x-i}getAxisTitlePositionY(t,i){let s=this.columnValue.max.getScaledUnit();return i&&(s=this.columnValue.max.getScaledPercentUnit()),t?s+this.dataLabelHeight+this.spacings.labelToAxis:s}getColumnDataLabelPositionY(t){const i=this.spacings.labelToColumn;return t<0?this.getColumnPositionY()+Math.abs(t)+i:this.getColumnPositionY()-t-i}getNeedleDataLabelPositionY(t){const i=this.spacings.labelToColumn;return t<0?this.getNeedlePositionY()+Math.abs(t)+i+2*this.getNeedleWidth():this.getNeedlePositionY()-t-i-2*this.getNeedleWidth()}getAxisEndPositionX(){return this.getAxisPositionX()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getColumnWidth(){return this.spacings.columnWidth}getNeedleWidth(){return this.spacings.needleWidth}getNeedleHeadWidth(){return this.spacings.needleHeadWidth}getScenarioLabelPositionOffsetX(t){return t?.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn:-(.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn)}calculateSpacings(){this.spacings={scenarioOffset:this.fontStlye.size*this.scaleFactors.scenarioOffset,scenarioLabelToColumn:this.fontStlye.size*this.scaleFactors.scenarioLabelToColumn,markerOffset:this.fontStlye.size*this.scaleFactors.markerOffset,labelToColumn:this.fontStlye.size*this.scaleFactors.labelToColumn,labelToAxis:this.fontStlye.size*this.scaleFactors.labelToAxis,needleWidth:this.fontStlye.size*this.scaleFactors.needleWidth,needleHeadWidth:this.fontStlye.size*this.scaleFactors.needleHeadWidth,columnWidth:this.fontStlye.size*this.scaleFactors.columnWidth,varianceAxisLineWidth:this.fontStlye.size*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontStlye.size*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontStlye.size*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontStlye.size*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontStlye.size*this.scaleFactors.markerWidth,categoryWidth:this.fontStlye.size*this.scaleFactors.categoryWidth,axisTickLength:this.fontStlye.size*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left+.5*this.spacings.columnWidth,y:this.padding.top}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY(!1)}}getMarkerScenarioLabelPositionOffsetX(t){return t?this.spacings.labelToColumn-this.fontStlye.size:this.spacings.labelToColumn+.5*this.spacings.markerWidth}}class R{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 F{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"},this.markerRight={bottom:"0,"+s,top:"0,0",right:s+","+s/2},this.markerRightBackground={bottom:"0,"+i,top:"0,0",right:i+","+i/2},this.markerLeft={bottom:s+","+s,top:s+",0",left:"0,"+s/2},this.markerLeftBackground={bottom:i+","+i,top:i+",0",Left:"0,"+i/2}}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}}rightMarkerPatternStrings(){return{background:this.markerRightBackground.top+" "+this.markerRightBackground.right+" "+this.markerRightBackground.bottom+" "+this.markerRightBackground.top,foreground:this.markerRight.top+" "+this.markerRight.right+" "+this.markerRight.bottom+" "+this.markerRight.top,bgOffset:this.bgOffset}}leftMarkerPatternStrings(){return{background:this.markerLeftBackground.top+" "+this.markerLeftBackground.Left+" "+this.markerLeftBackground.bottom+" "+this.markerLeftBackground.top,foreground:this.markerLeft.top+" "+this.markerLeft.left+" "+this.markerLeft.bottom+" "+this.markerLeft.top,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t.set("marker-right",this.rightMarkerPatternStrings()),t.set("marker-left",this.leftMarkerPatternStrings()),t}}class H{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-time-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var j;!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"}(j||(j={}));class V{constructor(t,i,s,h,e,n,r,o){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=i,this.y=s,this.value=e,this.group=t.group().id(this.createElementID(t.toString(),h)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=r||j.Top,this.horizontalHookLocation=o||j.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}draw(t=!0,i={percent:2,decimal:1},s=new C){if(this.isEmpty())return this;const h=this.group;let e,n="";if(!1===Number.isNaN(Number(this.value))){let t="percent",h=i.percent,r=i.percent,o=1;!1===this.isRelativeLabel&&(h=i.decimal,r=i.decimal,o=s.value,t="decimal"),e=k.number(Number(this.value),t,h,r,o),this.isVarianceLabel&&Number(this.value)>=0&&(n="+")}else e=""+this.value;const r=this.drawLabel(h,n+e);return!1===t&&(r.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,i){const s=this.styles.fontStyles.background||"#ffffff";let h="start";const e=t.text(i);e.move(this.x,this.y);const r=e.bbox().w,o=e.bbox().h;let l=0,a=0;const c=e.x();let u=e.y();return this.horizontalHookLocation===j.Left?(h="left",l=e.x()):this.horizontalHookLocation===j.Center?(h="middle",l=e.x()-(r+2)/2):this.horizontalHookLocation===j.Right&&(h="end",l=e.x()-r),this.verticalHookLocation===j.Center?(u=e.y()-1.2*o/2,a=u+.2*o):this.verticalHookLocation===j.Top?(u-=o/4,a=u+.2*o):this.verticalHookLocation===j.Bottom&&(u-=o,a=u+.2*o),e.move(c,u),e.font({anchor:h}),null!=this.segmentFillColor?e.fill(n(this.segmentFillColor)):t.rect(r+2,.8*o).stroke(s).fill(s).opacity(.9).move(l-1,a).insertBefore(e),e}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}}const I={ac:1,pp:2,fc:3,pl:4};var X,W,B;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(X||(X={}));class G{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((i=>this.intersects(t,i)))}getOptimalPlacement(t,i,s,h,e,n,r,o){const l=I[r]||99,a=n/2;for(const n of o){const r=this.calculatePlacementForDirection(t,i,s,h,e,a,8,n);if(!this.hasCollision(r.bounds))return r}for(const n of o){const r=this.calculatePlacementForDirection(t,i,s,h,e,a,8,n);if(!this.collidesWithHigherPriority(r.bounds,l))return r}return null}calculatePlacementForDirection(t,i,s,h,e,n,r,o){let l,a,c,u,d,f;switch(o){case X.Above:l=t,a=i-n-r,c=j.Bottom,u=j.Center,d=t-s/2,f=i-n-r-h;break;case X.Below:l=t,a=i+n+r,c=j.Top,u=j.Center,d=t-s/2,f=i+n+r-h/4;break;case X.Left:l=t-n-r,a=i,c=j.Center,u=j.Right,d=t-n-r-s,f=i-.6*h;break;case X.Right:l=t+n+r,a=i,c=j.Center,u=j.Left,d=t+n+r,f=i-.6*h}return{labelX:l,labelY:a,verticalHook:c,horizontalHook:u,bounds:{x:d,y:f,width:s,height:h,pointIndex:e,preferredHook:c}}}collidesWithHigherPriority(t,i){return this.labels.some((s=>!!s.scenarioType&&((I[s.scenarioType]||99)<i&&this.intersects(t,s))))}shouldHideScenarioLabel(t,i,s,h=20){const e=I[s]||99;return!(e<=1)&&this.scenarioLabels.some((s=>{if((I[s.scenarioType]||99)>=e)return!1;const n=Math.abs(i-s.y),r=Math.abs(t-s.x);return n<h&&r<h}))}registerScenarioLabel(t,i,s){this.scenarioLabels.push({x:t,y:i,scenarioType:s})}intersects(t,i){return!(t.x+t.width<i.x||i.x+i.width<t.x||t.y+t.height<i.y||i.y+i.height<t.y)}getLabelCount(){return this.labels.length}}class U{constructor(t,i,s,h){this.value=t,this.scenario=i,this.pixelPerUnit=s||1,this.variance="neg"===h||h===W.NEG?W.NEG:"pos"===h||h===W.POS?W.POS:W.NEU}isEmpty(){return void 0===this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:this.value>1.45?1.45*this.pixelPerUnit:this.value<-1.45?-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:W.NEU===this.variance?W.NEU:W.POS===this.variance?W.NEG:W.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 z{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 K{constructor(){}adapt(t){const i=new z;return f.isString(t.date)&&(i.date=this.parseDateString(t.date)),f.isOperator(t.operation)&&(i.operation=t.operation),f.isNumber(t.rowGroupIndex)&&f.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),f.isNumber(t.categoryIndex)&&f.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),f.isNumber(t.subCategoryIndex)&&f.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),f.isNumber(t.columnGroupIndex)&&f.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),f.isNumber(t.columnSubGroupIndex)&&f.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}parseDateString(t){const i=p.fromISO(t);if(i.isValid)return i;console.warn(`TimeChartDataRow: invalid date value '${t}' — skipping row`)}default(){return new z}setActualValues(t,i){f.isNumber(t.ac1)&&(i.ac1=t.ac1),f.isNumber(t.ac2)&&(i.ac2=t.ac2),f.isNumber(t.ac3)&&(i.ac3=t.ac3),f.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){f.isNumber(t.pl1)&&(i.pl1=t.pl1),f.isNumber(t.pl2)&&(i.pl2=t.pl2),f.isNumber(t.pl3)&&(i.pl3=t.pl3),f.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){f.isNumber(t.pp1)&&(i.pp1=t.pp1),f.isNumber(t.pp2)&&(i.pp2=t.pp2),f.isNumber(t.pp3)&&(i.pp3=t.pp3),f.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){f.isNumber(t.fc1)&&(i.fc1=t.fc1),f.isNumber(t.fc2)&&(i.fc2=t.fc2),f.isNumber(t.fc3)&&(i.fc3=t.fc3),f.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class q{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,this.stackColors=["#000000","#c0c0c0","#808080"]}}class Q{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 q(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return f.isExisting(t)&&(f.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),f.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),f.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),f.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),f.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),f.isExisting(t.padding)&&(i.padding=this.paddingadapter.adapt(t.padding)),Array.isArray(t.stackColors)&&t.stackColors.length>0&&(i.stackColors=t.stackColors),i.pattern=new F(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new q(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}!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"}(W||(W={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(B||(B={}));class Z{constructor(t,i,s){this.ID_AXIS="axis",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.isRelative=t.isRelative||!1,this.position=i,this.svgGroup=s.group().id(this.ID_AXIS)}drawAxisTitle(t,i){null==i&&(i=""),t.text(i).addClass(this.CSS_AXIS_TITLE).attr("text-anchor","middle").move(this.position.getAxisTitlePositionX(t),this.position.getAxisTitlePositionY(!0,this.isRelative))}draw(){return this.labelText&&this.drawAxisTitle(this.svgGroup,this.labelText),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(this.isRelative),this.position.getAxisEndPositionX(),this.position.getAxisPositionY(this.isRelative)).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class J{constructor(t,i,s,h,e,n,r,o=null){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.isVarianceColumn=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveHeight=0,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.isPrimaryColumn=e,this.position=t,this.columnBarStyles=i.barStyles,this.overflowConfig=o,this.scenarioGroup=n,this.styles=i,this.columnGroup=n.group().id(n.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(s,h,e),this.label=this.getDataLabel(s),this.scenarioLabel=this.getScenarioLabel(r))}setAsVariance(){var t;return this.isVarianceColumn=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new C){if(this.isEmpty())return this;const s=this.getScenarioStyle(),h=this.convertToSVGStyle(s,"stroke"),e=this.getFillStyle(s);null!=this.columnGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(e,h):this.columnGroup.rect(this.position.getColumnWidth(),this.dimensions.columnLength).fill(e).stroke(h).y(this.dimensions.yPos).cx(this.dimensions.xPos)),this.drawColumnDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.columnGroup||!this.overflowConfig)return;const s=this.position.getColumnPositionY(),h=this.position.getColumnWidth(),e=this.dimensions.columnLength,{breakGap:n}=this.overflowConfig,r=s-e;this.columnGroup.rect(h,e).fill(t).stroke(i).y(r).cx(this.dimensions.xPos);const o=r-n-this.overdriveHeight;this.columnGroup.rect(h,this.overdriveHeight).fill(t).stroke(i).y(o).cx(this.dimensions.xPos),this.drawBreakIndicator(r,n)}drawBreakIndicator(t,i){if(!this.columnGroup)return;const s=this.position.getColumnWidth(),h=this.dimensions.xPos-s/2,e=t-i/2,n=.35*i,r=s/3;let o=`M ${h} ${e-n}`;for(let t=0;t<3;t++)o+=` L ${h+r*(t+.5)} ${e-n-.3*i} L ${h+r*(t+1)} ${e-n}`;let l=`M ${h} ${e+n}`;for(let t=0;t<3;t++)l+=` L ${h+r*(t+.5)} ${e+n+.3*i} L ${h+r*(t+1)} ${e+n}`;this.columnGroup.rect(s+2,i).fill("#ffffff").stroke("none").y(t-i).cx(this.dimensions.xPos),this.columnGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.columnGroup.path(l).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s){const h=t.getScaledUnit();if(this.overflowConfig&&h>0){const e="ac"===t.getScenario()?this.overflowConfig.cutHeight:this.overflowConfig.cutHeight-this.overflowConfig.scenarioCutOffset;if(h>e){this.isOverflowing=!0;const{breakGap:t,overdriveZoneHeight:n,maxOverflow:r}=this.overflowConfig;this.overdriveHeight=r>0?(h-e)/r*n:0;const o=e+t+this.overdriveHeight,l=this.position.getColumnPositionY();return{clipped:!1,columnLength:e,xPos:this.position.getColumnPositionX(i,s),yPos:l-e,labelYPos:l-o-this.position.spacings.labelToColumn,scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:l-.5*e}}}return h<0?{clipped:!1,columnLength:Math.abs(h),xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY(),labelYPos:this.position.getColumnDataLabelPositionY(h),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()+.5*Math.abs(h)}:{clipped:!1,columnLength:h,xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY()-h,labelYPos:this.position.getColumnDataLabelPositionY(h),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()-.5*Math.abs(h)}}getDataLabel(t){let i=j.Bottom;null!=t.value&&t.value<0&&(i=j.Top);const s=this.isOverflowing?this.dimensions.labelYPos:this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit());return new V(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),s,this.ID_DATA_PREFIX,t.value,this.styles,i,j.Center)}getScenarioLabel(t){return new V(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,j.Center,this.isPrimaryColumn?j.Left:j.Right)}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.isVarianceColumn||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawColumnDataLabel(t,i=new C){var s;null===(s=this.label)||void 0===s||s.draw(this.isPrimaryColumn,t,i)}getFillStyle(t){var i,s,h,e;const n=this.columnBarStyles[this.dataPoint.getScenario()];return(null==n?void 0:n.fillpattern)&&(null===(i=this.styles.pattern.get(n.fillpattern))||void 0===i?void 0:i.pattern)?null===(e=null===(h=null===(s=this.styles)||void 0===s?void 0:s.pattern)||void 0===h?void 0:h.get(n.fillpattern))||void 0===e?void 0:e.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceColumn?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.columnBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class tt{constructor(t,i,s,h,e,n,r,o,l){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos: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,l),this.scenarioLabel=this.getScenarioLabel(o,e,l))}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-this.dimensions.columnLength).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos-this.dimensions.columnLength).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(i,s),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(i,s)+this.position.getMarkerScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getMarkerPositionY()+Math.abs(t.getScaledUnit())}:{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(i,s),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(i,s)+this.position.getMarkerScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getMarkerPositionY()-Math.abs(t.getScaledUnit())}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new V(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,j.Center,s?j.Right:j.Left)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class it{constructor(t,i,s,h,e){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.dataLabel=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos: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())&&(this.hasData=!0,this.dimensions=this.createDimensions(t,s,h),this.dataLabel=new V(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getNeedleDataLabelPositionY(this.dataPoint.getScaledPercentUnit()),this.ID_DATA_PREFIX,s.value,this.styles,j.Center,j.Center),this.dataLabel.setToRelativeVarianceLabel())}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.dataLabel)||void 0===i||i.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;const i=this.styles.varianceStyles[this.dataPoint.getVarianceStyle()],s=this.convertToSVGStyle(i,"stroke");let h=this.convertToSVGStyle(i,"fill");const e=this.convertToSVGStyle(this.styles.varianceStyles.ac,"stroke"),n=this.convertToSVGStyle(this.styles.varianceStyles.ac,"fill"),r=this.barStyles[this.dataPoint.getScenario()];if(null!=r&&r.fillpattern){const t=this.styles.pattern.get(r.fillpattern);null!=t&&(h=t.pattern)}this.dimensions.clipped?this.createClippedNeedleHead(h,s):this.createNeedleHead(e,n),this.barGroup.rect(this.position.getNeedleWidth(),this.dimensions.columnLength).cx(this.dimensions.xPos).y(this.dimensions.yPos).fill(h).stroke(s),null===(t=this.dataLabel)||void 0===t||t.draw()}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,columnLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getColumnCenterPositionX(s),yPos:t.getNeedlePositionY(),clipped:i.isClipped()}:{columnLength:i.getScaledPercentUnit(),xPos:t.getColumnCenterPositionX(s),yPos:t.getNeedlePositionY()-i.getScaledPercentUnit(),labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:i.isClipped()}}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}createClippedNeedleHead(t,i){const s=this.barGroup.polygon("0,0 5,9 -5,9 0,0 0,5 5,13 -5,13 0,5").fill(t).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(i);null!=this.dataPoint.value&&this.dataPoint.value<0&&s.flip("y")}createNeedleHead(t,i){this.barGroup.rect(2*this.position.getNeedleWidth(),this.position.getNeedleHeadWidth()).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(i)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadYPosition(){let t=this.dimensions.yPos;return null!=this.dataPoint.value&&this.dataPoint.value<0&&(t+=this.dimensions.columnLength),t}}const st={ac:{markerFill:"#000000",markerStroke:"#000000",lineColor:"#000000"},pp:{markerFill:"#999999",markerStroke:"#999999",lineColor:"#999999"},fc:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000",lineDashArray:"4,4"},pl:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000"}};class ht{constructor(t,i,s,h,e,n,r,o,l=null){this.MARKER_SIZE=8,this.LINE_WIDTH=2,this.ID_LINE_PREFIX="LINE",this.ID_MARKER_PREFIX="MARKER",this.ID_LABEL_PREFIX="LABEL",this.ESTIMATED_LABEL_WIDTH=56,this.ESTIMATED_LABEL_HEIGHT=24,this.position=t,this.styles=i,this.dataPoints=s,this.scenarioGroup=h,this.labelGroup=e,this.scenarioName=n,this.scenarioLabel=r,this.collisionManager=l}draw(t={percent:2,decimal:1},i=new C){return this.drawGeometry(),this.drawLabels(t,i),this}drawGeometry(){if(0===this.dataPoints.length)return this;const t=this.getLineStyle();return this.drawLines(t),this.drawMarkers(t),this}drawLabels(t={percent:2,decimal:1},i=new C){return 0===this.dataPoints.length||(this.drawScenarioLabel(),this.drawValueLabels(t,i)),this}getLineStyle(){var t,i;const s=(null===(i=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===i?void 0:i.toLowerCase())||"ac";return st[s]||st.ac}getScenarioVariant(){var t;const i=parseInt((null===(t=this.scenarioName)||void 0===t?void 0:t.slice(-1))||"1",10);return isNaN(i)?1:Math.min(Math.max(i,1),4)}drawSquareMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.rect(this.MARKER_SIZE,this.MARKER_SIZE).fill(h.markerFill).stroke({color:h.markerStroke,width:1}).move(i-e,s-e)}drawCircleMarker(t,i,s,h){t.circle(this.MARKER_SIZE).fill(h.markerFill).stroke({color:h.markerStroke,width:1}).center(i,s)}drawTriangleMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.polygon(`${i},${s-e} ${i-e},${s+e} ${i+e},${s+e}`).fill(h.markerFill).stroke({color:h.markerStroke,width:1})}drawDiamondMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.polygon(`${i},${s-e} ${i+e},${s} ${i},${s+e} ${i-e},${s}`).fill(h.markerFill).stroke({color:h.markerStroke,width:1})}drawLines(t){const i=this.scenarioGroup.group().id(this.ID_LINE_PREFIX);for(let s=1;s<this.dataPoints.length;s++){const h=this.dataPoints[s-1],e=this.dataPoints[s];if(h.dataPoint.isEmpty()||e.dataPoint.isEmpty())continue;const n=this.position.getColumnCenterPositionX(h.index),r=this.position.getColumnPositionY()-h.dataPoint.getScaledUnit(),o=this.position.getColumnCenterPositionX(e.index),l=this.position.getColumnPositionY()-e.dataPoint.getScaledUnit(),a=i.line([[n,r],[o,l]]).stroke({color:t.lineColor,width:this.LINE_WIDTH,linecap:"round"}).fill("none");t.lineDashArray&&a.attr("stroke-dasharray",t.lineDashArray)}}drawMarkers(t){const i=this.scenarioGroup.group().id(this.ID_MARKER_PREFIX),s=this.getScenarioVariant();for(const h of this.dataPoints){if(h.dataPoint.isEmpty())continue;const e=this.position.getColumnCenterPositionX(h.index),n=this.position.getColumnPositionY()-h.dataPoint.getScaledUnit();switch(s){case 2:this.drawCircleMarker(i,e,n,t);break;case 3:this.drawTriangleMarker(i,e,n,t);break;case 4:this.drawDiamondMarker(i,e,n,t);break;default:this.drawSquareMarker(i,e,n,t)}}}getLabelPositionPriority(t){const i=this.dataPoints[t];let s=null;for(let i=t+1;i<this.dataPoints.length;i++)if(!this.dataPoints[i].dataPoint.isEmpty()){s=this.dataPoints[i];break}let h=null;for(let i=t-1;i>=0;i--)if(!this.dataPoints[i].dataPoint.isEmpty()){h=this.dataPoints[i];break}const e=i.dataPoint.getScaledUnit();return h&&s&&h.dataPoint.getScaledUnit()>e&&s.dataPoint.getScaledUnit()>e?[X.Below,X.Left,X.Right,X.Above]:[X.Above,X.Left,X.Right,X.Below]}getScenarioType(){var t,i;return(null===(i=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===i?void 0:i.toLowerCase())||"ac"}drawValueLabels(t,i){const s=this.getScenarioType();for(let h=0;h<this.dataPoints.length;h++){const e=this.dataPoints[h];if(e.dataPoint.isEmpty()||null===e.dataPoint.value)continue;const n=this.position.getColumnCenterPositionX(e.index),r=this.position.getColumnPositionY()-e.dataPoint.getScaledUnit();let o=n,l=r-this.MARKER_SIZE/2-2,a=j.Bottom,c=j.Center;if(this.collisionManager){const t=this.getLabelPositionPriority(h),i=this.collisionManager.getOptimalPlacement(n,r,this.ESTIMATED_LABEL_WIDTH,this.ESTIMATED_LABEL_HEIGHT,e.index,this.MARKER_SIZE,s,t);if(null===i)continue;o=i.labelX,l=i.labelY,a=i.verticalHook,c=i.horizontalHook;const u=Object.assign(Object.assign({},i.bounds),{scenarioType:s});this.collisionManager.register(u)}new V(this.labelGroup,o,l,this.ID_LABEL_PREFIX,e.dataPoint.value,this.styles,a,c).draw(!0,t,i)}}drawScenarioLabel(){if(!this.scenarioLabel)return;let t=null;for(let i=this.dataPoints.length-1;i>=0;i--)if(!this.dataPoints[i].dataPoint.isEmpty()){t=this.dataPoints[i];break}if(!t)return;const i=this.position.getColumnCenterPositionX(t.index)+this.MARKER_SIZE+4,s=this.position.getColumnPositionY()-t.dataPoint.getScaledUnit(),h=this.getScenarioType();if(this.collisionManager){if(this.collisionManager.shouldHideScenarioLabel(i,s,h))return;this.collisionManager.registerScenarioLabel(i,s,h)}new V(this.labelGroup,i,s,"SCENARIO_LABEL",this.scenarioLabel,this.styles,j.Center,j.Left).forceStringTypeDraw()}}class et{constructor(t,i,s,h,e,n,r,o,l,a,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=l,this.group=c,this.columnGroup=c.group().id(`stacked_col_${h}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new C){if(!this.hasData||null==this.dataPoint.value)return;const s=this.dataPoint.value,h=this.dataPoint.pixelPerUnit;let e,n;const r=this.position.getColumnPositionY();if(this.stackMode===w.RELATIVE){const t=h;e=(0!==this.totalValue?Math.abs(s)/Math.abs(this.totalValue):0)*t,n=r-this.baselineValue/Math.abs(this.totalValue)*t-e}else e=Math.abs(s*h),n=r-this.baselineValue*h-e;const o=this.position.getColumnCenterPositionX(this.index),l=this.position.getColumnWidth(),a=this.styles.stackColors,c=a[this.segmentIndex%a.length],u={color:c},d={color:c,width:.5};if(this.columnGroup.rect(l,Math.max(e,.5)).fill(u).stroke(d).y(n).cx(o),e>=18){const h=n+e/2;if(this.stackMode===w.RELATIVE||this.stackMode===w.ABSOLUTE_RELATIVE){const i=(0!==this.totalValue?s/this.totalValue*100:0).toFixed(t.percent)+"%";new V(this.group,o,h,"STACK_SEG",i,this.styles,j.Center,j.Center).setSegmentFill(c).forceStringTypeDraw()}else new V(this.group,o,h,"STACK_SEG",s,this.styles,j.Center,j.Center).setSegmentFill(c).draw(!0,t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new C){if(this.stackMode===w.RELATIVE)return;const s=this.position.getColumnCenterPositionX(this.index),h=this.position.getColumnPositionY();new V(this.group,s,h-this.totalValue*this.dataPoint.pixelPerUnit-this.position.spacings.labelToColumn,"STACK_TOTAL",this.totalValue,this.styles,j.Bottom,j.Center).draw(!0,t,i)}}const nt={ac:{fill:"#000000",opacity:.3,lineColor:"#000000"},pp:{fill:"#999999",opacity:.3,lineColor:"#999999"},fc:{fill:"#000000",opacity:.2,lineColor:"#000000",dashArray:"4,4"},pl:{fill:"#000000",opacity:.1,lineColor:"#000000"}},rt=[{fill:"#000000",opacity:.3},{fill:"#555555",opacity:.25},{fill:"#999999",opacity:.2},{fill:"#bbbbbb",opacity:.15},{fill:"#dddddd",opacity:.1}];class ot{constructor(t,i,s,h,e,n){this.group=t.group().id(`area_fill_${e}`),this.upperPoints=i,this.lowerPoints=s,this.scenarioType=h,this.segmentIndex=e,this.isScenarioStack=n}draw(){if(this.upperPoints.length<2||this.lowerPoints.length<2)return;let t,i,s=`M ${this.upperPoints[0].x},${this.upperPoints[0].y}`;for(let t=1;t<this.upperPoints.length;t++)s+=` L ${this.upperPoints[t].x},${this.upperPoints[t].y}`;for(let t=this.lowerPoints.length-1;t>=0;t--)s+=` L ${this.lowerPoints[t].x},${this.lowerPoints[t].y}`;if(s+=" Z",this.isScenarioStack&&this.scenarioType){const s=this.scenarioType.slice(0,2).toLowerCase(),h=nt[s]||nt.ac;t=h.fill,i=h.opacity}else{const s=Math.min(this.segmentIndex,rt.length-1);t=rt[s].fill,i=rt[s].opacity}this.group.path(s).fill(t).opacity(i).stroke("none")}drawBoundaryLine(){if(this.upperPoints.length<2)return;let t,i="#000000";if(this.isScenarioStack&&this.scenarioType){const s=this.scenarioType.slice(0,2).toLowerCase(),h=nt[s]||nt.ac;i=h.lineColor,t=h.dashArray}const s=this.group.polyline(this.upperPoints.map((t=>[t.x,t.y]))).fill("none").stroke({color:i,width:1.5});t&&s.attr("stroke-dasharray",t)}}class lt{constructor(t,i,s,h,e,n,r,o){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.isVarianceLine=!1,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.previousDimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=e,this.isPrimaryLine=n,this.position=t,this.LineBarStyles=i.barStyles,this.scenarioGroup=r,this.styles=i,this.LineGroup=r.group().id(r.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(s,e,n),this.label=this.getDataLabel(s),this.scenarioLabel=this.getScenarioLabel(o)),this.previousDimensions=this.createDimensions(h,e-1,n)}setAsVariance(){var t;return this.isVarianceLine=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new C){if(this.isEmpty())return this;const s=this.getScenarioStyle(),h=this.getFillStyle(s);null!=this.LineGroup&&this.LineGroup.line([[this.previousDimensions.xPos,this.previousDimensions.yPos],[this.dimensions.xPos,this.dimensions.yPos]]).fill(h).stroke({color:"#f06",width:3,linecap:"round"}),this.drawLineDataLabel(t,i),this.drawScenarioLabel()}createDimensions(t,i,s){return{clipped:!1,columnLength:t.getScaledUnit(),xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY()-t.getScaledUnit(),labelYPos:this.position.getColumnDataLabelPositionY(t.getScaledUnit()),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()-t.getScaledUnit()}}getDataLabel(t){let i=j.Bottom;return null!=t.value&&t.value<0&&(i=j.Top),new V(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit()),this.ID_DATA_PREFIX,t.value,this.styles,i,j.Center)}getScenarioLabel(t){return new V(this.scenarioGroup,0,0,this.ID_SCENARIO_PREFIX,t,this.styles,j.Bottom,j.Left)}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.isVarianceLine||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawLineDataLabel(t,i=new C){var s;null===(s=this.label)||void 0===s||s.draw(this.isPrimaryLine,t,i)}getFillStyle(t){var i,s,h,e;const n=this.LineBarStyles[this.dataPoint.getScenario()];return(null==n?void 0:n.fillpattern)&&(null===(i=this.styles.pattern.get(n.fillpattern))||void 0===i?void 0:i.pattern)?null===(e=null===(h=null===(s=this.styles)||void 0===s?void 0:s.pattern)||void 0===h?void 0:h.get(n.fillpattern))||void 0===e?void 0:e.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceLine?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.LineBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class at{constructor(t,i,s,h,e){this.pixelPerUnit=1,this.collisionManager=null,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}createLine(t,i,s,h){const e=this.svgGroups.scenario1.group().id(""+h),n=this.svgGroups.scenario1Label.group().id(""+h);let r=null;return this.isLastDataPoint(h-1)&&(r=t),new lt(this.position,this.styles,i,s,h,!1,e,r).updateLabelGroup(n)}createPrimaryBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new J(this.position,this.styles,t,i,!0,s,e,this.overflowConfig).updateLabelGroup(h)}createVarianceBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new J(this.position,this.styles,t,i,!0,s,e,this.overflowConfig).updateLabelGroup(h).setAsVariance()}createRelativeVarianceBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);return new it(this.position,this.styles,t,i,s).updateLabelGroup(h)}createSecondaryBar(t,i){const s=this.svgGroups.scenario2.group().id(""+i);let h=null;return this.isFirstDataPoint(i)&&(h=`${this.i18n.get(t.scenario)||t.scenario}`),new J(this.position,this.styles,t,i,!1,s,h,this.overflowConfig)}createPrimaryMarker(t,i){const s=this.svgGroups.scenario3.group().id(""+i),h=this.styles.pattern.get("marker-right")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let e=null;return this.isFirstDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new tt(this.position,s,h,t.scenario,this.styles,t,i,e,!0)}createSecondaryMarker(t,i){const s=this.svgGroups.scenario4.group().id(""+i),h=this.styles.pattern.get("marker-left")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new tt(this.position,s,h,t.scenario,this.styles,t,i,e,!1)}isLastDataPoint(t){return this.elementCnt-1===t}isFirstDataPoint(t){return 0===t}setCollisionManager(t){this.collisionManager=t}moveLabelsToFront(){this.svgGroups.scenario1Label.front()}createLineSeries(t,i){const s=this.svgGroups.parent.group().id("LineSeries_"+i),h=this.svgGroups.scenario1Label.group().id("LineSeries_Label_"+i),e=`${this.i18n.get(i)||i}`;return new ht(this.position,this.styles,t,s,h,i,e,this.i18n,this.collisionManager)}}var ct,ut;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(ct||(ct={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(ut||(ut={}));class dt{constructor(t,i,s,h=0){this.CSS_CATEGORIES="categories",this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new U(0,W.AC1,1,W.NEU),this.highestDataPointValue=new U(0,W.AC1,1,W.NEU),this.smallestVarianceDataPointValue=new U(0,W.AC1,1,W.NEU),this.highestVarianceDataPointValue=new U(0,W.AC1,1,W.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideAxisLabels=!1,this.axisScenario=W.AC1,this.preparedDataSet=[],this.axisCategoryArea={width:0,height:0},this.scenariosArea={width:0,height:0},this.state=ct.DIRTY,this.i18n=new Map,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=T.DAY,this.locale="de",this.axisLabelsMode=v.SMART,this.intervalSpanLimit=32,this.measureScale=new C,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=b.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.availableWidth=0,this.overflowConfig=null,this.lastScenarios=[],this.initSQLFunctions(),this.ruleSet=t||new _,this.i18n=this.createI18n(new Map),this.styles=s,this.availableWidth=h,this.setConfig(i),this.position=this.createElementPosition(i.scenarios)}updatePosition(t){this.position=this.createElementPosition(t)}initSQLFunctions(){O.fn.transformOperator=function(t){return"-"===t?-1:1},O.fn.normalizeDate=function(t,i){if(void 0!==t&&t.isValid)return t.startOf(i)}}setStyles(t){this.styles=t}setAvailableWidth(t){this.availableWidth=t}setAvailableHeight(t){this.pixelPerUnit<=0||t<=0?this.overflowConfig=null:null==this.stackConfig&&this.determineEffectiveChartMode()===b.BAR?(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig&&this.updatePosition(this.lastScenarios)):this.overflowConfig=null}calculateOverflowConfig(t){const i=(this.isVarianceChart()?this.highestVarianceDataPointValue:this.highestDataPointValue).getScaledUnit();if(i<=0)return null;const s=this.styles.fontStyles.size,h=1.5*s,e=.3*s,n=t-(this.position.dataLabelHeight+this.position.spacings.labelToColumn+this.position.padding.top+this.position.padding.bottom+this.position.spacings.labelToAxis+s)-h-e,r=.8*s;if(n<=r)return null;const o=n-r;return i<=o?null:{cutHeight:n,overdriveZoneHeight:h,breakGap:e,maxOverflow:i-o,scenarioCutOffset:r}}setConfig(t){var i;this.state=ct.DIRTY,this.sortScenariosbyVisualisationRules(t),this.setData([...t.data],t.filter),this.hideAxisLabels=t.hideAxisLabels||!1,this.pixelPerUnit=t.pixelPerUnit,this.pixelPerPercentage=t.pixelPerPercentage,this.axisLabelsMode=t.axisLabelsMode,this.intervalSpanLimit=t.intervalSpanLimit,this.dateInterval=this.findDateInterval(t.dateInterval),this.dataModel=this.populateModel(t.scenarios,this.dateInterval,t.level,t.sortOrder),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||k.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.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync,this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.showOverlayMedian=t.showOverlayMedian,this.showOverlayAvg=t.showOverlayAvg,this.chartMode=t.chartMode,this.maxBars=t.maxBars,this.stackConfig=t.stackConfig,this.lineFullWidth=t.lineFullWidth,this.lastScenarios=t.scenarios,this.updatePosition(t.scenarios)}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":k.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}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)}setData(t,i){if(null!=t)if(this.state=ct.DIRTY,this.preparedDataSet.length=0,null!=i&&i.length>0)try{this.preparedDataSet=O(`SELECT * FROM ? WHERE ${i}`,[t])}catch(s){console.error("TimeChart: filter query failed, using unfiltered data",i,s),this.preparedDataSet=t}else this.preparedDataSet=t}getAllocatedCanvasWidth(){const t=this.position.getAxisEndPositionX(),i=3*this.styles.fontStyles.size,s=Math.max(this.axisCategoryArea.width,this.scenariosArea.width);return Math.max(t+i,s>0?s+this.position.leftSideLabelLength:0)}getAllocatedCanvasHeight(){if(null==this.smallestVarianceDataPointValue.value||null==this.highestVarianceDataPointValue.value||null==this.smallestDataPointValue.value||null==this.highestDataPointValue.value)return 0;const t=this.isVarianceChart()&&this.variancesDataModel.some((t=>t.type===ut.RELATIVE)),i=this.position.getAxisPositionY(t),s=this.position.spacings.labelToAxis+this.position.dataLabelHeight+this.styles.padding.bottom;let h;if(this.isOnSameAxisSide())h=i+s;else{const t=this.isVarianceChart()?this.smallestVarianceDataPointValue:this.smallestDataPointValue;h=i+Math.abs(t.getScaledUnit())+this.position.spacings.labelToColumn+this.position.dataLabelHeight+s}const e=this.isOnSameAxisSide();return Math.max(h,e?this.axisCategoryArea.height+this.scenariosArea.height:this.scenariosArea.height)}toString(){const t=new e;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===ct.DIRTY&&(this.state=ct.UP_TO_DATE),this.isVarianceChart()?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?this.determineEffectiveChartMode()===b.LINE?(this.drawStackedAreaScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):this.determineEffectiveChartMode()===b.LINE?(this.drawLineScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawOverlayLayer(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}determineEffectiveChartMode(){return this.chartMode===b.LINE||this.chartMode===b.AUTO&&this.dataModel.length>this.maxBars?b.LINE:b.BAR}setPattern(t,i){this.styles.pattern.set(t,i)}hasNoData(){return 0===this.dataModel.length}isOnSameAxisSide(){return null!=this.smallestVarianceDataPointValue.value&&null!=this.highestVarianceDataPointValue.value&&null!=this.smallestDataPointValue.value&&null!=this.highestDataPointValue.value&&(this.isVarianceChart()?Math.sign(this.smallestVarianceDataPointValue.value)===Math.sign(this.highestVarianceDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value):Math.sign(this.smallestDataPointValue.value)===Math.sign(this.highestDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value))}createI18n(t){this.state=ct.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])}createElementPosition(t){let i;const s=y(t.filter(((t,i)=>1===i||2===i)).map((t=>k.translateScenarioLabel(t,this.i18n))).reduce(((t,i)=>t.length<i.length?i:t),""),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,h=this.calculateTitleLength(this.leftSideOffsetForHorizontalSync);let e,n;if(i=s>h?s:h,null!=this.position&&(i+=this.position.spacings.labelToColumn),this.leftSideOffsetForHorizontalSync>-1&&(i=this.leftSideOffsetForHorizontalSync),this.isVarianceChart()?(e=this.smallestVarianceDataPointValue,n=this.highestVarianceDataPointValue):(e=this.smallestDataPointValue,n=this.highestDataPointValue),this.overflowConfig){const{cutHeight:t,overdriveZoneHeight:i,breakGap:s}=this.overflowConfig;n=new U(t+i+s,n.scenario,1,n.variance)}let r=this.styles.scaleFactors;const o=this.determineEffectiveChartMode();if(this.lineFullWidth&&this.availableWidth>0&&this.dataModel.length>0&&!this.isVarianceChart()&&o===b.LINE){const t=this.styles.fontStyles.size,s=this.styles.padding,h=this.styles.scaleFactors,e=this.availableWidth-(s.left+s.right+t*h.scenarioOffset+i+t*h.columnWidth);if(e>0){const i=Math.max(e/this.dataModel.length/t,1.2*h.columnWidth),s=new Y;Object.assign(s,h),s.categoryWidth=i,r=s}}return new N(new R(this.styles.padding),r,this.styles.fontStyles,e,n,this.dataModel.length,i)}calculateTitleLength(t){let i="_______";i.length<this.title.length&&(i=this.title);const s=y(i,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return s<t?t:s}setAxisScenario(t){let i=W.AC1;if(null!=t&&t.length>0){const s=new M(t.toString());s.isValid&&(i=s.delta)}return null===i&&(i=W.AC1),i}populateModel(t,i,s,h){var e;if(0===(null===(e=this.preparedDataSet)||void 0===e?void 0:e.length))return[];let n=this.queryDataSet(i,"","");return this.detectNaNCells(t,n),n=this.leftOuterJoinDates(n,i),this.createDataRows(n,t)}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new M(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)))}findDateInterval(t){var i,s,h;if(t!==T.AUTO)return t;const e=this.queryMinMaxDates();let n=T.DAY;return null!=(null===(i=e[0])||void 0===i?void 0:i.mindate)&&(n=(new $).calculateDistanceType(null===(s=e[0])||void 0===s?void 0:s.mindate,null===(h=e[0])||void 0===h?void 0:h.maxdate,this.intervalSpanLimit)),n}queryMinMaxDates(){var t,i,s,h;const e=O("SELECT MAX(date) as maxdate, MIN(date) as mindate FROM ?",[this.preparedDataSet]);return null!=(null===(t=e[0])||void 0===t?void 0:t.mindate)&&(e[0].mindate=p.fromMillis(null===(i=e[0])||void 0===i?void 0:i.mindate)),null!=(null===(s=e[0])||void 0===s?void 0:s.maxdate)&&(e[0].maxdate=p.fromMillis(null===(h=e[0])||void 0===h?void 0:h.maxdate)),e}queryDataSet(t,i,s){const h=`normalizeDate([date], '${t}' , '${this.locale}') as calcdate`;return O(`SELECT p.calcdate ${i},\n ${["ac1","ac2","ac3","ac4","pp1","pp2","pp3","pp4","fc1","fc2","fc3","fc4","pl1","pl2","pl3","pl4"].map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(",")} \n \n FROM (SELECT ${h} ${i},\n ac1,\n ac2,\n ac3,\n ac4,\n pp1,\n pp2,\n pp3,\n pp4,\n fc1,\n fc2,\n fc3,\n fc4,\n pl1,\n pl2,\n pl3,\n pl4\n FROM ?) as p\n GROUP BY calcdate ${s}\n ORDER BY calcdate asc`,[this.preparedDataSet])}createDataRows(t,i){const s=[];return t.forEach(((t,h)=>{s.push({id:h,category:t.category,type:ut.NONE,date:t.calcdate,scenario1:new U(t[i[0]],i[0],this.pixelPerUnit,W.NEU),scenario2:new U(t[i[1]],i[1],this.pixelPerUnit,W.NEU),scenario3:new U(t[i[2]],i[2],this.pixelPerUnit,W.NEU),scenario4:new U(t[i[3]],i[3],this.pixelPerUnit,W.NEU)})})),s}findSmallestDataPointValue(t){const i=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let s=new U(0,"default",i,W.NEU);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])t&&null!=t.value&&t.value<Number(s.value)&&(s=t);return s}findHighestDataPointValue(t){const i=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let s=new U(0,"default",i,W.NEU);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])null!=t&&t.value>Number(s.value)&&(s=t);return s}populateVarianceModel(t,i){const s=[];if(null==t||0===t.length)return s;let h=null;null!=i&&i.length>0&&(h=i[0]);for(const e in t){const n=new M(t[e]);if(n.isValid){const t=this.mapScenarios(n,h),e=n.direction,r="dr"===n.type?this.pixelPerPercentage:this.pixelPerUnit;for(const h in i)s.push({id:Number(h),category:i[h].category,type:"dr"===n.type?ut.RELATIVE:ut.ABSOLUTE,date:i[h].date,scenario1:new U(this.calculateVariance(n,i[h],t),n.delta,r,e),scenario2:new U(null,null,null,null),scenario3:new U(null,null,null,null),scenario4:new U(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==i[h].value||null==i[e].value?null:t.type===ut.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}cleanSVGforRedraw(t){t.clear()}isVarianceChart(){return this.variancesDataModel&&this.variancesDataModel.length>0}createDateFactory(){return new $}drawAxisAndLabels(t,i){const s=this.createDateFactory(),h=i.group().id("AxisAndDateLables");let e=!1;if(!1===this.hideAxisLabels)t.forEach(((t,i)=>{let n=j.Top,r=this.position.spacings.labelToAxis;t.scenario1.value<0&&(n=j.Bottom,r*=-1),t.type===ut.RELATIVE&&(e=!0);let o=s.getDateString(t.date,this.dateInterval);this.axisLabelsMode===v.SMART?(o=s.getSmartDateString(t.date,this.dateInterval),0===i&&this.dateInterval!==T.YEAR&&(o=s.getShortDateString(t.date,this.dateInterval))):this.axisLabelsMode===v.SHORT&&(o=s.getShortDateString(t.date,this.dateInterval)),new V(h,this.position.getColumnCenterPositionX(i),this.position.getAxisPositionY(e)+r,"",o,this.styles,n,j.Center).forceStringTypeDraw()}));else{const i=null==t?void 0:t[0];i&&i.type===ut.RELATIVE&&(e=!0)}new Z({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h).draw(),this.axisCategoryArea={height:h.height(),width:h.width()}}drawScenarios(t,i){const s=i.group().id("Scenarios"),h=new at(this.position,s,this.styles,t.length,this.i18n);h.setOverflowConfig(this.overflowConfig);let e=!1;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(),!1===t.scenario1.isEmpty()&&(e=!0)}));let n=0;!1===e&&(n=this.isOnSameAxisSide()?this.position.dataLabelHeight:2*this.position.dataLabelHeight),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom+n,width:s.width()+this.position.spacings.columnWidth}}drawLineScenarios(t,i){var s,h;const e=i.group().id("LineScenarios"),n=new G,r=new at(this.position,e,this.styles,t.length,this.i18n);r.setCollisionManager(n);const o=["ac1","pp1","fc1","pl1"],l=[[],[],[],[]];t.forEach(((t,i)=>{["scenario1","scenario2","scenario3","scenario4"].forEach(((s,h)=>{t[s]&&l[h].push({dataPoint:t[s],index:i})}))}));const a=[];for(let t=0;t<l.length;t++){const i=l[t];if(i.length>0&&i.some((t=>!t.dataPoint.isEmpty()))){const e=(null===(h=null===(s=i[0])||void 0===s?void 0:s.dataPoint)||void 0===h?void 0:h.scenario)||o[t],n=e.slice(0,2).toLowerCase();a.push({points:i,scenarioName:e,scenarioType:n})}}a.sort(((t,i)=>(I[i.scenarioType]||99)-(I[t.scenarioType]||99)));const c=[];for(const t of a){const i=r.createLineSeries(t.points,t.scenarioName);c.push({series:i,scenarioType:t.scenarioType})}for(const t of c)t.series.drawGeometry();r.moveLabelsToFront();const u=[...c].sort(((t,i)=>(I[t.scenarioType]||99)-(I[i.scenarioType]||99)));for(const t of u)t.series.drawLabels(this.dataFormatDigits,this.measureScale);const d=this.position.getColumnPositionY();this.scenariosArea={height:Math.max(e.height()+this.styles.padding.top,d)+this.styles.padding.bottom,width:e.width()+this.position.spacings.columnWidth}}drawAxisAndLabelsForLineChart(t,i){const s=this.createDateFactory(),h=i.group().id("AxisAndDateLabelsLine"),e=!1,n=t.length-1;!1===this.hideAxisLabels&&t.forEach(((i,r)=>{if(!this.shouldShowLineChartAxisLabel(t,r))return;let o,l=j.Top,a=this.position.spacings.labelToAxis;i.scenario1.value<0&&(l=j.Bottom,a*=-1),this.lineFullWidth&&this.availableWidth>0?this.axisLabelsMode===v.SMART?(o=s.getSmartDateString(i.date,this.dateInterval),0===r&&this.dateInterval!==T.YEAR&&(o=s.getShortDateString(i.date,this.dateInterval))):o=this.axisLabelsMode===v.SHORT?s.getShortDateString(i.date,this.dateInterval):s.getDateString(i.date,this.dateInterval):o=s.getShortDateString(i.date,this.dateInterval),new V(h,this.position.getColumnCenterPositionX(r),this.position.getAxisPositionY(e)+a,"",o,this.styles,l,j.Center).forceStringTypeDraw(),r>0&&r<n&&this.isYearChange(t,r)&&this.drawYearSeparatorLine(h,r,e)})),new Z({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h).draw(),this.axisCategoryArea={height:h.height(),width:h.width()}}shouldShowLineChartAxisLabel(t,i){return!!(this.lineFullWidth&&this.availableWidth>0)||(0===i||i===t.length-1||this.isYearChange(t,i))}isYearChange(t,i){var s,h;if(0===i)return!1;const e=null===(s=t[i])||void 0===s?void 0:s.date,n=null===(h=t[i-1])||void 0===h?void 0:h.date;return!(!e||!n)&&e.year!==n.year}drawYearSeparatorLine(t,i,s){const h=this.position.getColumnCenterPositionX(i)-this.position.spacings.columnWidth/2,e=this.position.columnValue.max.getScaledUnit()+this.position.dataLabelHeight,n=this.position.getAxisPositionY(s)-e,r=this.position.getAxisPositionY(s);t.line([[h,n],[h,r]]).stroke({color:"#999999",width:1,dasharray:"4,4"}).attr("stroke-dasharray","4,4")}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),h=new at(this.position,s,this.styles,t.length,this.i18n);return h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===ut.RELATIVE?h.createRelativeVarianceBar(t.scenario1,i).draw():h.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth},s}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),h=this.stackConfig.by===g.SCENARIOS;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=>r(t.scenario)))):new Set).size>1){const t=new Map;for(const i of n){const s=r(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const h=[];for(const i of o)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,l=null;t.segments.forEach((t=>{const h=new et(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),l=h})),l&&l.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{"asc"===this.stackConfig.order?n.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&n.sort(((t,i)=>i.value-t.value));const t=n.reduce(((t,i)=>t+Math.abs(i.value)),0);let e=0,r=null;n.forEach(((n,o)=>{const l=new et(this.position,this.styles,n.dataPoint,i,e,n.scenario,o,this.stackConfig.mode,t,h,s);l.draw(this.dataFormatDigits,this.measureScale),e+=Math.abs(n.value),r=l})),r&&r.drawTotalLabel(this.dataFormatDigits,this.measureScale)}})),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth}}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;if(this.stackConfig.by!==g.SCENARIOS)return;const s=i.group().id("StackedHeaders"),h=t[0],e=["scenario1","scenario2","scenario3","scenario4"],n=[];for(const t of e){const i=h[t];i&&!i.isEmpty()&&null!=i.value&&n.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===n.length)return;const l=new Set(n.map((t=>r(t.scenario)))),a=this.position.getColumnPositionY(),c=this.position.getColumnCenterPositionX(0)-this.position.getColumnWidth()/2-this.position.spacings.labelToColumn;if(l.size>1){const t=new Map;for(const i of n){const s=r(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const i=[];for(const s of o)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),h=t.segments[0].dataPoint.pixelPerUnit,e=a-(this.stackConfig.mode===w.RELATIVE?h:i*h)/2,n=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new V(s,c,e,"STACK_HEADER",n,this.styles,j.Center,j.Right).forceStringTypeDraw()}))}else{"asc"===this.stackConfig.order?n.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&n.sort(((t,i)=>i.value-t.value));const t=n.reduce(((t,i)=>t+Math.abs(i.value)),0),i=n[0].dataPoint.pixelPerUnit;let h=0;n.forEach((e=>{let n;n=this.stackConfig.mode===w.RELATIVE?(0!==t?Math.abs(e.value)/t:0)*i:Math.abs(e.value*i);const r=a-h-n/2,o=this.i18n.get(e.scenario)||e.scenario;new V(s,c,r,"STACK_HEADER",o,this.styles,j.Center,j.Right).forceStringTypeDraw(),h+=n}))}}drawStackedAreaScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedAreaScenarios"),h=this.stackConfig.by===g.SCENARIOS,e=this.stackConfig.mode,n=["scenario1","scenario2","scenario3","scenario4"];if(0===(h?n.filter((i=>t.some((t=>t[i]&&!t[i].isEmpty())))).length:1))return;const r=[],o=[],l=[];for(const i of n)t.some((t=>t[i]&&!t[i].isEmpty()))&&l.push(i);for(let i=0;i<l.length;i++){const s=l[i],h=[];for(let n=0;n<t.length;n++){const o=t[n][s],a=o&&!o.isEmpty()&&null!=o.value?o.value:0,c=i>0?r[i-1][n]:0;if(e===w.RELATIVE){const i=l.reduce(((i,s)=>{const h=t[n][s];return i+(h&&!h.isEmpty()&&null!=h.value?Math.abs(h.value):0)}),0),s=0!==i?Math.abs(a)/i:0;h.push(c+s)}else h.push(c+a)}r.push(h);const n=t[0][s];o.push((null==n?void 0:n.scenario)||"ac1")}const a=this.position.getColumnPositionY(),c=this.pixelPerUnit,u=t=>t.map(((t,i)=>({x:this.position.getColumnCenterPositionX(i),y:a-t*c}))),d=t.map(((t,i)=>({x:this.position.getColumnCenterPositionX(i),y:a})));for(let t=0;t<r.length;t++){const i=u(r[t]),e=0===t?d:u(r[t-1]),n=new ot(s,i,e,h?o[t]:null,t,h);n.draw(),n.drawBoundaryLine()}this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth}}drawOverlayLayer(t,i){const s=i.group().id("Overlay"),h=new at(this.position,s,this.styles,t.length,this.i18n);if(!0===this.showOverlayAvg){let i=null;const s=function(t){const i=t.reduce(((t,i)=>{var s;return t+((null===(s=i.scenario1)||void 0===s?void 0:s.value)||0)}),0),s=t.filter((t=>{var i;return void 0!==(null===(i=t.scenario1)||void 0===i?void 0:i.value)})).length,h=s>0?i/s:0,e=Object.assign(Object.assign({},t[0]),{scenario1:new U(h,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),n=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new U(h,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[e,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new U(h,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),n]}(t);s.forEach(((t,s)=>{null!=i&&h.createLine(`Ø ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,i,s-1).draw(this.dataFormatDigits,this.measureScale),i=t.scenario1}))}if(!0===this.showOverlayMedian){let i=null;const s=function(t){const i=t.map((t=>{var i;return null===(i=t.scenario1)||void 0===i?void 0:i.value})).filter((t=>void 0!==t)).sort(((t,i)=>t-i)),s=i.length%2==0?(i[i.length/2-1]+i[i.length/2])/2:i[Math.floor(i.length/2)],h=Object.assign(Object.assign({},t[0]),{scenario1:new U(s,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),e=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new U(s,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[h,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new U(s,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),e]}(t);s.forEach(((t,s)=>{null!=i&&h.createLine(`Mdn ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,i,s-1).draw(this.dataFormatDigits,this.measureScale),i=t.scenario1}))}}leftOuterJoinDates(t,i){const s=p.max(...t.map((function(t){return t.calcdate}))),h=p.min(...t.map((function(t){return t.calcdate}))),e=(new $).datesBetween(h,s,i,this.intervalSpanLimit),n=new Map;return e.forEach(((t,i)=>{n.set(t.toISO(),{id:i,calcdate:t,category:null,ac1:null,ac2:null,ac3:null,ac4:null,pp1:null,pp2:null,pp3:null,pp4:null,fc1:null,fc2:null,fc3:null,fc4:null,pl1:null,pl2:null,pl3:null,pl4:null,isEmpty:!0})})),t.forEach((t=>{const i=t.calcdate.toISO(),s=n.get(i);s&&s.isEmpty&&n.set(i,{id:s.id,calcdate:t.calcdate,category:t.category,ac1:t.ac1,ac2:t.ac2,ac3:t.ac3,ac4:t.ac4,pp1:t.pp1,pp2:t.pp2,pp3:t.pp3,pp4:t.pp4,fc1:t.fc1,fc2:t.fc2,fc3:t.fc3,fc4:t.fc4,pl1:t.pl1,pl2:t.pl2,pl3:t.pl3,pl4:t.pl4,isEmpty:!1})})),Array.from(n.values())}}class ft{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideAxisLabels=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new L(new D).default(),this.level=P.CATEGORY,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=T.AUTO,this.axisLabelsMode=v.SMART,this.intervalSpanLimit=28,this.filter="",this.measureScale=new C,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.showOverlayMedian=!0,this.showOverlayAvg=!0,this.chartMode=b.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0}}class pt{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=m.adaptArray(t.data,this.dataRowAdapter),s=m.adaptArray(t.scenarios,this.stringAdapter),h=new ft(i,s);return f.isArray(t.variances)&&(h.variances=m.adaptArray(t.variances,this.stringAdapter)),f.isString(t.title)&&(h.title=t.title),f.isBoolean(t.hideAxisLabels)&&(h.hideAxisLabels=t.hideAxisLabels),f.isNumber(t.pixelPerUnit)&&(h.pixelPerUnit=t.pixelPerUnit),f.isNumber(t.pixelPerPercentage)&&(h.pixelPerPercentage=t.pixelPerPercentage),f.isNumber(t.limit)&&(h.limit=t.limit),f.isExisting(t.sortOrder)&&(h.sortOrder=this.orderAdapter.adapt(t.sortOrder)),f.isExisting(t.level)&&(h.level=t.level),f.isExisting(t.dateInterval)&&(h.dateInterval=t.dateInterval),f.isExisting(t.axisLabelsMode)&&(h.axisLabelsMode=t.axisLabelsMode),f.isNumber(t.leftSideOffsetForHorizontalSync)&&(h.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync),f.isNumber(t.intervalSpanLimit)&&(h.intervalSpanLimit=t.intervalSpanLimit),f.isString(t.filter)&&(h.filter=t.filter),f.isExisting(t.measureScale)&&(h.measureScale=x.calculateMeasureScale(this.dataSet,h.scenarios,t.measureScale)),f.isString(t.measureUnit)&&(h.measureUnit=t.measureUnit),f.isBoolean(t.showMeasureScale)&&(h.showMeasureScale=t.showMeasureScale),f.isExisting(t.dataFormatDigits)&&(h.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),f.isBoolean(t.showOverlayAvg)&&(h.showOverlayAvg=t.showOverlayAvg),f.isBoolean(t.showOverlayMedian)&&(h.showOverlayMedian=t.showOverlayMedian),f.isExisting(t.chartMode)&&(h.chartMode=t.chartMode),f.isNumber(t.maxBars)&&(h.maxBars=t.maxBars),f.isExisting(t.stackConfig)&&(h.stackConfig=t.stackConfig),f.isBoolean(t.lineFullWidth)&&(h.lineFullWidth=t.lineFullWidth),h}default(){return new ft([],[])}}const wt=class{constructor(i){t(this,i),this.data=[],this.scenarios=[],this.variances=[],this.hideAxisLabels=!1,this.pixelPerUnit=2,this.pixelPerPercentage=50,this.limit=0,this.leftSideOffsetForHorizontalSync=-1,this.i18n=new Map,this.order={hierarchy:[],direction:S.ASC},this.level=P.CATEGORY,this.dateInterval=T.AUTO,this.intervalSpanLimit=28,this.axisLabelsMode=v.SMART,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=b.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.containerWidth=0,this.dataFormatDigits={percent:2,decimal:1},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(),h=this.containerWidth||0;this.chart=new dt(new _,i,s,h),this.chart.setI18n(this.i18n),this.autoFitScaling(i,s),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new H(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.setAvailableWidth(this.containerWidth||0),this.chart.setConfig(i),this.autoFitScaling(i,s),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new H(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.height,e=this.containerWidth||0;if(!h||h<=0)return t.pixelPerUnit=1,this.chart=new dt(new _,t,i,e),void this.chart.setI18n(this.i18n);t.pixelPerUnit=1,this.chart=new dt(new _,t,i,e),this.chart.setI18n(this.i18n),this.chart.toString();const n=this.chart.getAllocatedCanvasHeight();n<=0||(t.pixelPerUnit=.9*h/n,this.chart=new dt(new _,t,i,e),this.chart.setI18n(this.i18n))}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new pt(new K,new L(new D),new D,new A,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideAxisLabels:this.hideAxisLabels,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,dateInterval:this.dateInterval,axisLabelsMode:this.axisLabelsMode,limit:this.limit,sortOrder:this.order,leftSideOffsetForHorizontalSync:this.leftSideOffsetForHorizontalSync,intervalSpanLimit:this.intervalSpanLimit,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,showOverlayMedian:this.showOverlayMedian,showOverlayAvg:this.showOverlayAvg,chartMode:this.chartMode,maxBars:this.maxBars,stackConfig:this.stackConfig,lineFullWidth:this.lineFullWidth})}prepareStyle(){return new Q(new E,new l,new a(new c),new u(new c),new d).adapt(this.styles)}get element(){return h(this)}};wt.style=':host{position:relative;display:inline-block}.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-default{stroke:black;stroke-width:0.1em}.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}.hide{opacity:0}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';export{wt as ibcs_chart_time}
@@ -0,0 +1 @@
1
+ import{g as t,r as s,h as e,H as o}from"./p-JNHhIe7t.js";import{g as a,c as r}from"./p-CL1RYuNU.js";import{r as n}from"./p-DvvwfRQG.js";import{w as i}from"./p-P7pGJBgc.js";import{a as c}from"./p-BYmPQYxx.js";import{w as u}from"./p-BfXY5dsy.js";import{w as l}from"./p-C7dQL8CS.js";import{d as p,c as h}from"./p-CYwd_ZNM.js";import"./p-BFTU3MAI.js";import"./p-BYBpC0EO.js";const d=["ac1","ac2","ac3","ac4","pp1","pp2","pp3","pp4","fc1","fc2","fc3","fc4","pl1","pl2","pl3","pl4"],f=["rowGroup","category","subCategory","columnGroup","columnSubGroup"];function m(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function g(t){const s=Array.from(t);return{distinctValues:s,count:s.length,hasData:s.length>0}}const b=class{constructor(e){s(this,e),this.datasources="",this.static=!1,this.raw=!0,this.lastBodyHash=null,u(this),this.errors=l(this),this.database=new c.Database,((s,e)=>{let o,i,c=[];const u=new MutationObserver((o=>{o.forEach((o=>{"datasources"===o.attributeName&&(c=(t(s).getAttribute("datasources")||"").split(","),c.forEach((t=>{e(t,i.datasources.get(t))})))}))})),l=s.connectedCallback;s.connectedCallback=()=>{const r=t(s);i=a(r),c=(r.getAttribute("datasources")||"").split(","),c.forEach((t=>{e(t,i.datasources.get(t))})),u.observe(r,{attributes:!0,attributeFilter:["datasources"]}),o=i.datasources.on("set",((t,s)=>{c.includes(t)&&e(t,s)})),n(l,s)};const p=s.disconnectedCallback;s.disconnectedCallback=()=>{u.disconnect(),n(o),r(t(s)),n(p,s)}})(this,((t,s)=>{this.database.tables[t]={data:s},this.executeQuery()})),i(this,(t=>{let s,e;if(!this.raw&&this.static)try{const o=p(t);s=o.hash,e=o.json}catch(s){return void console.error("Error decoding compressed dataset",s,String(t).slice(0,200))}else s=h(t),e=t;s!==this.lastBodyHash&&(this.lastBodyHash=s,this.query=e,this.executeQuery())}))}executeQuery(){if(this.stores||(this.stores=a(this.element)),this.query&&this.name){let t;if(this.static)try{t=JSON.parse(this.query)}catch(s){console.error("Failed to parse static dataset",s),t=[]}else t=this.database.exec(this.query);this.latestResult!==t&&(this.latestResult=t,this.stores.datasets.set(this.name,t),this.stores.datasetsMeta.set(this.name,function(t){const s={};for(const t of f)s[t]=new Set;const e={};for(const t of d)e[t]={hasData:!1,min:null,max:null};const o=new Set;let a=null,r=null;const n=Array.isArray(t)?t:[];for(let t=0;t<n.length;t++){const i=n[t];if(null==i)continue;for(const t of f){const e=i[t];null!=e&&""!==e&&s[t].add(String(e))}for(const t of d){const s=i[t];if(m(s)){const o=e[t];o.hasData=!0,(null===o.min||s<o.min)&&(o.min=s),(null===o.max||s>o.max)&&(o.max=s)}}const c=i.date;if(null!=c&&""!==c){const t=String(c);o.add(t),(null===a||t<a)&&(a=t),(null===r||t>r)&&(r=t)}}const i=d.map((t=>({key:t,hasData:e[t].hasData,min:e[t].min,max:e[t].max}))),c=i.filter((t=>t.hasData)).map((t=>t.key)),u=g(s.rowGroup),l=g(s.category),p=g(s.subCategory),h=g(s.columnGroup),b=g(s.columnSubGroup),y={min:a,max:r,hasData:o.size>0,distinctCount:o.size};let w="category";return p.hasData?w="subCategory":l.hasData?w="category":u.hasData&&(w="rowGroup"),{rowCount:n.length,scenarios:i,availableScenarios:c,rowGroup:u,category:l,subCategory:p,columnGroup:h,columnSubGroup:b,dateRange:y,suggestedLevel:w,suggestedOrder:w,suggestedDateInterval:y.hasData?"auto":null,calculatedAt:Date.now()}}(t)))}}nameUpdated(){this.executeQuery()}render(){return e(o,{key:"3e8b6fbc52b5b5cbe0ae88d7aa1d259f86d63e1b"})}get element(){return t(this)}static get watchers(){return{name:[{nameUpdated:0}]}}};b.style="bn-dataset{display:none}";export{b as bn_dataset}
@@ -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-BfXY5dsy.js";import{g as a}from"./p-CL1RYuNU.js";import{w as e}from"./p-P7pGJBgc.js";import{w as h}from"./p-C7dQL8CS.js";import"./p-DvvwfRQG.js";const p=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)}};p.style=":host{display:none}";export{p as bn_asset}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as n,g as s}from"./p-JNHhIe7t.js";import{i as r,j as i,w as o}from"./p-Bka-Z6jo.js";import{w as a}from"./p-BfXY5dsy.js";import{w as l}from"./p-DvDDgmcV.js";import{w as c}from"./p-C7dQL8CS.js";import"./p-BYBpC0EO.js";import"./p-Bnhh02CF.js";import"./p-Bhd_WSML.js";import"./p-DvvwfRQG.js";import"./p-CL1RYuNU.js";const d=["*","/","+","-","x","÷","none"];function u(t){switch(t){case"*":case"x":return"×";case"/":case"÷":return"÷";case"+":return"+";case"-":return"−";default:return""}}function h(t,e,n){return t.find((t=>t.from===e&&t.to===n))}function f(t){return 2*(t-1)+1}function p(t){return 2*(t-1)+1}function g(t,e){const n=t.getBoundingClientRect(),s=n.left-e.left,r=n.top-e.top;return{left:s,top:r,width:n.width,height:n.height,centerX:s+n.width/2,centerY:r+n.height/2}}function v(t,e,n){switch(n){case"ltr":return e?{x:t.left+t.width,y:t.centerY}:{x:t.left,y:t.centerY};case"rtl":return e?{x:t.left,y:t.centerY}:{x:t.left+t.width,y:t.centerY};case"ttb":return e?{x:t.centerX,y:t.top+t.height}:{x:t.centerX,y:t.top};case"btt":return e?{x:t.centerX,y:t.top}:{x:t.centerX,y:t.top+t.height}}}function y(t,e,n,s,r=8){const i=-(s-1)*r/2+n*r;switch(e){case"ltr":return{x:t.left,y:t.centerY+i};case"rtl":return{x:t.left+t.width,y:t.centerY+i};case"ttb":return{x:t.centerX+i,y:t.top};case"btt":return{x:t.centerX+i,y:t.top+t.height}}}function m(t,e,n,s){switch(n){case"straight":return function(t,e){return{path:`M ${t.x} ${t.y} L ${e.x} ${e.y}`,midpoint:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}(t,e);case"curved":return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=(t.x+e.x)/2;s={x:n,y:t.y},r={x:n,y:e.y}}else{const n=(t.y+e.y)/2;s={x:t.x,y:n},r={x:e.x,y:n}}return{path:`M ${t.x} ${t.y} C ${s.x} ${s.y}, ${r.x} ${r.y}, ${e.x} ${e.y}`,midpoint:{x:.125*t.x+.375*s.x+.375*r.x+.125*e.x,y:.125*t.y+.375*s.y+.375*r.y+.125*e.y}}}(t,e,s);default:return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=t.x+.7*(e.x-t.x);s=`M ${t.x} ${t.y} L ${n} ${t.y} L ${n} ${e.y} L ${e.x} ${e.y}`,r={x:n,y:(t.y+e.y)/2}}else{const n=t.y+.7*(e.y-t.y);s=`M ${t.x} ${t.y} L ${t.x} ${n} L ${e.x} ${n} L ${e.x} ${e.y}`,r={x:(t.x+e.x)/2,y:n}}return{path:s,midpoint:r}}(t,e,s)}}function b(t,e,n,s){const r=.7;switch(s){case"ltr":{const s=t.left+t.width;return{x:s+(Math.min(e.left,n.left)-s)*r,y:t.centerY}}case"rtl":{const s=t.left,i=Math.max(e.left+e.width,n.left+n.width);return{x:i+(s-i)*r,y:t.centerY}}case"ttb":{const s=t.top+t.height,i=Math.min(e.top,n.top);return{x:t.centerX,y:s+(i-s)*r}}case"btt":{const s=t.top,i=Math.max(e.top+e.height,n.top+n.height);return{x:t.centerX,y:i+(s-i)*r}}}}function $(t,e,n){var s,r;return Object.assign({stroke:null!==(s=null==n?void 0:n.color)&&void 0!==s?s:t,strokeWidth:null!==(r=null==n?void 0:n.width)&&void 0!==r?r:e},(null==n?void 0:n.dasharray)?{strokeDasharray:n.dasharray}:{})}const x=class{validateEdgesProp(t){const e="ERR_edges",n=function(t){const e=[];if(!t||""===t.trim())return e.push("edges: value is required"),e;let n;try{n=JSON.parse(t)}catch(t){return e.push("edges: invalid JSON structure"),e}if(!Array.isArray(n))return e.push("edges: must be an array"),e;if(0===n.length)return e.push("edges: array must not be empty"),e;const s=new Set,r=new Set;n.forEach(((t,n)=>{if("object"!=typeof t||null===t)return void e.push(`edges[${n}]: must be an object`);const i=t;if("string"!=typeof i.from||""===i.from.trim()?e.push(`edges[${n}]: 'from' is required and must be a non-empty string`):s.add(i.from),"string"!=typeof i.to||""===i.to.trim()?e.push(`edges[${n}]: 'to' is required and must be a non-empty string`):(s.add(i.to),r.add(i.to)),void 0!==i.operator&&("string"==typeof i.operator&&d.includes(i.operator)||e.push(`edges[${n}]: 'operator' must be one of: ${d.join(", ")}`)),void 0!==i.label&&"string"!=typeof i.label&&e.push(`edges[${n}]: 'label' must be a string`),void 0!==i.style)if("object"!=typeof i.style||null===i.style)e.push(`edges[${n}]: 'style' must be an object`);else{const t=i.style;void 0!==t.color&&"string"!=typeof t.color&&e.push(`edges[${n}]: 'style.color' must be a string`),void 0!==t.width&&"number"!=typeof t.width&&e.push(`edges[${n}]: 'style.width' must be a number`),void 0!==t.dasharray&&"string"!=typeof t.dasharray&&e.push(`edges[${n}]: 'style.dasharray' must be a string`)}}));const i=Array.from(s).filter((t=>!r.has(t)));return 0===i.length?e.push("edges: tree has no root node (circular reference detected)"):i.length>1&&e.push(`edges: tree has multiple root nodes: ${i.join(", ")}`),e}(t);n.length>0?(this.errors.addOrReplace({id:e,type:"error",message:`edges: ${n.join("; ")}`}),this.treeConfig=null):(this.errors.remove(e),this.treeConfig=function(t){if(!t||""===t.trim())return null;try{const e=JSON.parse(t);if(!Array.isArray(e))return null;const n=e,s=function(t){const e=new Map;for(const n of t){const t=e.get(n.from)||[];t.push(n.to),e.set(n.from,t)}return e}(n),r=function(t){const e=new Set;for(const n of t)e.add(n.from),e.add(n.to);return e}(n),i=function(t,e){const n=new Set;for(const e of t)n.add(e.to);const s=Array.from(e).filter((t=>!n.has(t)));return 1===s.length?s[0]:null}(n,r);return{edges:n,adjacencyList:s,rootNode:i,allNodes:r}}catch(t){return console.error("parseTreeConfig: failed to parse tree configuration",t),null}}(t)),this.recalculateLayout()}validateDirection(t){const e="ERR_direction",n=["ltr","rtl","ttb","btt"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`direction: invalid value '${t}', must be one of: ${n.join(", ")}`}),this.recalculateLayout()}validateLevelSpacing(t){const e="ERR_levelSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`level-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateNodeSpacing(t){const e="ERR_nodeSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`node-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateEdgeStyle(t){const e="ERR_edgeStyle",n=["straight","orthogonal","curved"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`edge-style: invalid value '${t}', must be one of: ${n.join(", ")}`})}validateShowOperators(t){const e="ERR_showOperators";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-operators: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.treeConfig=null,this.layout=null,this.nodeRects=new Map,this.svgWidth=0,this.svgHeight=0,this.resizeObserver=null,this.gridContainer=null,this.direction="ltr",this.levelSpacing=60,this.nodeSpacing=20,this.edgeStyle="orthogonal",this.showOperators="true",o(this),a(this),this.errors=c(this),this.componentStyle=l(this)}getTreeStyle(){return this.componentStyle((t=>({edgeColor:t["bn-tree"].edgeColor,edgeWidth:t["bn-tree"].edgeWidth,operatorCircleRadius:t["bn-tree"].operatorCircleRadius,operatorFontSize:t.global.fontSizePx*t["bn-tree"].operatorFontSizeScale,operatorColor:t["bn-tree"].operatorColor})))}componentWillLoad(){this.validateEdgesProp(this.edges),this.validateDirection(this.direction),this.validateLevelSpacing(this.levelSpacing),this.validateNodeSpacing(this.nodeSpacing),this.validateEdgeStyle(this.edgeStyle),this.validateShowOperators(this.showOperators)}componentDidLoad(){this.setupResizeObserver(),this.updateNodeRects()}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}setupResizeObserver(){var t;this.gridContainer=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tree-grid"),this.gridContainer&&(this.resizeObserver=new ResizeObserver((()=>{this.updateNodeRects()})),this.resizeObserver.observe(this.gridContainer),this.element.querySelectorAll("[slot]").forEach((t=>{this.resizeObserver.observe(t)})))}recalculateLayout(){this.layout=this.treeConfig?function(t,e,n,s){if(!t.rootNode)return{positions:new Map,gridTemplateColumns:"",gridTemplateRows:"",maxLevel:0,maxIndex:0};const r=function(t){const e=new Map;if(!t.rootNode)return e;const n=[{node:t.rootNode,level:0}],s=new Set;for(;n.length>0;){const{node:r,level:i}=n.shift();if(s.has(r))continue;s.add(r),e.set(r,i);const o=t.adjacencyList.get(r)||[];for(const t of o)s.has(t)||n.push({node:t,level:i+1})}return e}(t),i=function(t){const e=new Map;if(!t.rootNode)return e;let n=0;return function s(r){const i=e.get(r);if(i)return i;const o=t.adjacencyList.get(r)||[];if(0===o.length){const t={startIndex:n,endIndex:n};return e.set(r,t),n++,t}let a=1/0,l=-1/0;for(const t of o){const e=s(t);a=Math.min(a,e.startIndex),l=Math.max(l,e.endIndex)}const c={startIndex:a,endIndex:l};return e.set(r,c),c}(t.rootNode),e}(t),o=function(t,e,n,s){var r,i;const o=new Map,a=Math.max(...Array.from(e.values()));for(const l of t.allNodes){const t=null!==(r=e.get(l))&&void 0!==r?r:0,c=null!==(i=n.get(l))&&void 0!==i?i:{startIndex:0,endIndex:0};let d,u,h;switch(s){case"ltr":d=t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"rtl":d=a-t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"ttb":u=t+1,d=c.startIndex+1,h=1;break;case"btt":u=a-t+1,d=c.startIndex+1,h=1}o.set(l,{nodeId:l,level:t,index:c.startIndex,gridColumn:d,gridRow:u,gridRowSpan:h})}return o}(t,r,i,e),a=Math.max(...Array.from(r.values())),l=Math.max(...Array.from(i.values()).map((t=>t.endIndex))),{gridTemplateColumns:c,gridTemplateRows:d}=function(t,e,n,s,r){const i=t+1,o=e+1;if("ltr"===n||"rtl"===n){const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:t.join(" "),gridTemplateRows:e.join(" ")}}{const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:e.join(" "),gridTemplateRows:t.join(" ")}}}(a,l,e,n,s);return{positions:o,gridTemplateColumns:c,gridTemplateRows:d,maxLevel:a,maxIndex:l}}(this.treeConfig,this.direction,this.levelSpacing,this.nodeSpacing):null}updateNodeRects(){if(!this.treeConfig||!this.gridContainer)return;const t=this.gridContainer.getBoundingClientRect(),e=new Map;for(const n of this.treeConfig.allNodes){const s=this.element.querySelector(`[slot="${n}"]`);s&&e.set(n,g(s,t))}this.nodeRects=e,this.svgWidth=t.width,this.svgHeight=t.height}getSlotStyle(t){if(!this.layout)return{};const e=this.layout.positions.get(t);return e?"ltr"===this.direction||"rtl"===this.direction?{"grid-column":String(f(e.gridColumn)),"grid-row":`${p(e.gridRow)} / span ${n=e.gridRowSpan,n<=1?1:2*(n-1)+1}`,"align-self":"center"}:{"grid-row":String(p(e.gridRow)),"grid-column":String(f(e.gridColumn)),"justify-self":"center"}:{};var n}renderEdges(){var t;if(!this.treeConfig||0===this.nodeRects.size)return null;const n=this.getTreeStyle(),s=[],r=[],i=new Map;for(const t of this.treeConfig.edges){const e=i.get(t.to)||[];e.push(t.from),i.set(t.to,e)}for(const t of this.treeConfig.edges){const r=this.nodeRects.get(t.from),o=this.nodeRects.get(t.to);if(!r||!o)continue;const a=v(r,!0,this.direction),l=i.get(t.to)||[];let c;if(l.length>1){const e=l.indexOf(t.from);c=y(o,this.direction,e,l.length)}else c=v(o,!1,this.direction);const{path:d}=m(a,c,this.edgeStyle,this.direction),u=$(n.edgeColor,n.edgeWidth,t.style);s.push(e("path",{key:`edge-${t.from}-${t.to}`,d,fill:"none",stroke:u.stroke,"stroke-width":u.strokeWidth,"stroke-dasharray":u.strokeDasharray}))}if("true"===this.showOperators)for(const[s,i]of this.treeConfig.adjacencyList.entries()){const o=this.nodeRects.get(s);if(o)for(let a=0;a<i.length-1;a++){const l=i[a],c=i[a+1],d=h(this.treeConfig.edges,s,l);if(!(null==d?void 0:d.operator)||"none"===d.operator)continue;const f=this.nodeRects.get(l),p=this.nodeRects.get(c);if(!f||!p)continue;const g=null!==(t=d.label)&&void 0!==t?t:u(d.operator),v=b(o,f,p,this.direction);r.push(e("g",{key:`operator-${s}-${l}`,class:"operator-group"},e("circle",{cx:v.x,cy:v.y,r:n.operatorCircleRadius,fill:"white",stroke:n.edgeColor,"stroke-width":n.edgeWidth}),e("text",{x:v.x,y:v.y,"text-anchor":"middle","dominant-baseline":"central",style:{fontSize:`${n.operatorFontSize}px`,fill:n.operatorColor,fontWeight:"bold"}},g)))}}return e("svg",{class:"edge-layer",width:this.svgWidth,height:this.svgHeight,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none"}},s,r)}renderSlots(){return this.treeConfig&&this.layout?Array.from(this.treeConfig.allNodes).map((t=>e("div",{key:t,class:"tree-node",style:this.getSlotStyle(t)},e("slot",{name:t})))):null}getFontStyles(){return this.componentStyle((t=>{var e,n,s,r;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(n=t.global)||void 0===n?void 0:n.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return e(n,{style:t},this.treeConfig&&this.layout?e("div",{class:"tree-container"},e("div",{class:"tree-grid",style:{display:"grid","grid-template-columns":this.layout.gridTemplateColumns,"grid-template-rows":this.layout.gridTemplateRows,position:"relative"}},this.renderEdges(),this.renderSlots())):e("div",{class:"tree-container tree-error"},e("slot",null)))}get element(){return s(this)}static get watchers(){return{edges:[{validateEdgesProp:0}],direction:[{validateDirection:0}],levelSpacing:[{validateLevelSpacing:0}],nodeSpacing:[{validateNodeSpacing:0}],edgeStyle:[{validateEdgeStyle:0}],showOperators:[{validateShowOperators:0}]}}};x.style=':host{display:inline-block;position:relative;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.tree-container{position:relative;display:inline-block}.tree-grid{position:relative;display:grid;align-items:center}.tree-node{position:relative;z-index:1;border:1px solid #404040;background:var(--bn-font-background, white)}.edge-layer{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}.tree-error{display:flex;flex-wrap:wrap;gap:20px}';export{x as bn_tree}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as r,g as s}from"./p-JNHhIe7t.js";import{j as i,w as o}from"./p-Bka-Z6jo.js";import{w as n}from"./p-BfXY5dsy.js";import{w as a}from"./p-DvDDgmcV.js";import{w as d}from"./p-C7dQL8CS.js";import"./p-BYBpC0EO.js";import"./p-Bnhh02CF.js";import"./p-Bhd_WSML.js";import"./p-DvvwfRQG.js";import"./p-CL1RYuNU.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,p=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":p?r:"none","padding-left":u?`${t.cellPadding+4}px`:"0","padding-top":p?`${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 s,h as t,H as e,g as i}from"./p-JNHhIe7t.js";import{w as o}from"./p-BfXY5dsy.js";import{w as a}from"./p-DvDDgmcV.js";import{g as n}from"./p-CL1RYuNU.js";import{w as r}from"./p-C7dQL8CS.js";import"./p-DvvwfRQG.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 t,h as s,H as i,g as e,d as n}from"./p-JNHhIe7t.js";import{w as a}from"./p-BfXY5dsy.js";import{w as r}from"./p-DvDDgmcV.js";import{w as o}from"./p-C7dQL8CS.js";import{w as d,v as l,a as h,d as c,e as p,u,x as f,l as v,f as b,y as m}from"./p-Bka-Z6jo.js";import{I as g,O as y,D as w,g as R,f as _,l as S}from"./p-Bnhh02CF.js";import{w as E}from"./p-BgnHJQ9Q.js";import{a as k}from"./p-CL1RYuNU.js";import{a as D,D as x,b as O}from"./p-Bhd_WSML.js";import{F as C}from"./p-1jFf17Vj.js";import{I as M,S as j}from"./p-ChlK-T9I.js";import"./p-DvvwfRQG.js";import"./p-BYBpC0EO.js";import"./p-BFTU3MAI.js";const z=class{constructor(s){t(this,s),a(this),this.errors=o(this),this.componentStyle=r(this)}getFontStyles(){return this.componentStyle((t=>{var s,i,e,n;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(e=t.global)||void 0===e?void 0:e.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){return s(i,{key:"f43978af1c6658c6fa165093c3ada6b5f3b5986d",style:this.getFontStyles()},s("slot",{key:"b9c97432089676fc373b1d5ee59573ef5681a5c5"}))}get element(){return e(this)}};z.style=':host{flex:1;position:relative;overflow:hidden;display: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)}';const F=class{constructor(s){t(this,s),this.pageNumber=null,this.displayPageNumber=!0,a(this),this.errors=o(this),this.componentStyle=r(this)}getFontStyles(){return this.componentStyle((t=>{var s,i,e,n;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(e=t.global)||void 0===e?void 0:e.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}isValidHttpUrl(t){let s;try{s=new URL(t)}catch(t){return!1}return"http:"===s.protocol||"https:"===s.protocol}prepareAssetUrl(t){return this.isValidHttpUrl(t)?t:`./assets/${t}.png`}render(){return s(i,{key:"c445ca8c8abde56b46564932a6fcd079aa1e640d",id:this.displayPageNumber||this.text||this.code?"container-page-footer":"container",style:this.getFontStyles()},s("div",{key:"2e5829597d228c78acbbbf130bfc440092456cb4",id:"footer-text"},null!=this.text?s("span",{class:"note"},this.text):""),s("div",{key:"a2c98bf85fc41fa0aebc35fded0528cd8ba4948f",id:"code"},null!=this.code?s("img",{class:"image",src:n(`${this.prepareAssetUrl(this.code)}`)}):""),s("div",{key:"e879c6ed16996d8b505d64426e2253f3057863f5",id:"page-number"},this.displayPageNumber?s("span",{class:"page"},this.pageNumber):""))}static get assetsDirs(){return["assets"]}get element(){return e(this)}};F.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-footer){box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em solid #ddd}div#footer-text{font-size:0.6em;display:inline}div#code{flex:1;display:inline;text-align:right;padding-right:1em}div#page-number{font-size:0.6em;display:inline}.image{z-index:2;background-color:transparent;border:transparent;height:1.2em;width:auto}';const L=class{constructor(s){t(this,s),this.businessUnit="",this.order="category",this.orderDirection="asc",this.dateFormat="none",this.dateLink="none",d(this),a(this),this.t=E(this).t,this.errors=o(this),this.componentStyle=r(this)}validateScenario(t){const s="ERR_scenarios",i=l(t);i.length>0?this.errors.addOrReplace({id:s,type:"warning",message:"scenarios: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."}):this.errors.remove(s)}validateVariances(t){const s="ERR_variances",i=h(t);i.length>0?this.errors.addOrReplace({id:s,type:"warning",message:"variances: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."}):this.errors.remove(s)}validateOrder(t){const s=c(t),i="ERR_order";s.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value(s) '"+(null==s?void 0:s.toString())+"' are not supported."}):this.errors.remove(i)}validateOrderDirection(t){const s="ERR_orderDirection";p(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:"orderDirection: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateMeasures(t){const s="ERR_measures",i=u(t);i.length>0?this.errors.addOrReplace({id:s,type:"warning",message:"measures: invalid value(s) '"+(null==i?void 0:i.toString())+'\' are not supported. Valid format example: [{"name": "Bruttoumsatz", "unit": "mEUR"}]'}):this.errors.remove(s)}validateDateStart(t){const s="ERR_dateStart";f(t)||v(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:"dateStart: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateEnd(t){const s="ERR_dateEnd";f(t)||v(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:"dateStart: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateFormat(t){const s="ERR_dateFormat";b(t)||v(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:"dateFormat: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateDateLink(t){const s="ERR_dateLink";m(t)||v(t)?this.errors.remove(s):this.errors.addOrReplace({id:s,type:"warning",message:"dateLink: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateMeasures(this.measures),this.validateDateStart(this.dateStart),this.validateDateEnd(this.dateEnd),this.validateDateFormat(this.dateFormat),this.validateDateLink(this.dateLink),this.validateOrderDirection(this.orderDirection),this.validateOrder(this.order)}prepareI18n(){const t=k,s=new Map(["SEPERATOR_WS","in","CONNECTOR_WS"].map((t=>[t,this.t(".".concat(t))]))),i=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...s.entries()])}prepareI18nMode(){return g.META}prepareTitleOrder(){var t;return v(this.order)||v(this.orderDirection)?null:{hierarchy:this.order.split(",").map((t=>t.trim())),direction:y[null===(t=this.orderDirection)||void 0===t?void 0:t.toUpperCase()]}}prepareTitleTimePeriod(){var t,s;return v(this.dateStart)&&v(this.dateEnd)||v(this.dateLink)?null:{start:w.fromISO(this.dateStart),end:w.fromISO(this.dateEnd),format:x[null===(t=this.dateFormat)||void 0===t?void 0:t.toUpperCase()],link:D[null===(s=this.dateLink)||void 0===s?void 0:s.toUpperCase()]}}prepareMeasures(){return v(this.measures)?[]:JSON.parse(this.measures)}prepareScenarios(){var t,s,i,e;if(v(this.scenarios)&&v(this.variances))return[];let n=[];return(null===(t=this.scenarios)||void 0===t?void 0:t.trim().length)>0&&(n=n.concat(null===(s=this.scenarios)||void 0===s?void 0:s.split(","))),(null===(i=this.variances)||void 0===i?void 0:i.trim().length)>0&&(n=n.concat(null===(e=this.variances)||void 0===e?void 0:e.split(","))),n.map((t=>t.trim()))}prepareBusinessUnit(){return v(this.businessUnit)||"null"===this.businessUnit?null:this.businessUnit}getFontStyles(){return this.componentStyle((t=>{var s,i,e,n;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(e=t.global)||void 0===e?void 0:e.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return s(i,{key:"029abd8096c5274f94123da2dc1c1e88e76be922",style:t},s("ibcs-title",{key:"c8b128a6ea36d44d8a0730898b35fa3f944e23ae",businessUnit:this.prepareBusinessUnit(),scenarios:this.prepareScenarios(),measures:this.prepareMeasures(),timeperiod:this.prepareTitleTimePeriod(),order:this.prepareTitleOrder(),i18n:this.prepareI18n(),"i18n-mode":this.prepareI18nMode()}))}get element(){return e(this)}static get watchers(){return{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}]}}};L.style=':host{padding:0.5em;margin-bottom:0.5em;box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;display: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)}';class T{constructor(){}createMeasures(t,s,i){if(this.allMeasuresUseSameUnit(t)){const e=t.length;let n="",a="";for(let r=0;r<e;r++){let o="";r>0&&(o=s.get("SEPERATOR_WS")),e>1&&r===e-1&&(o=s.get("CONNECTOR_WS")),i===g.ALL?(n=(s.get(n)||n)+o+(s.get(t[r].name)||t[r].name),a=s.get(t[r].unit)||t[r].unit):(n=n+o+t[r].name,a=t[r].unit)}return[{name:n,unit:a}]}return t}createDimension(t,s,i,e,n){let a="";return void 0!==s&&(a=(new O).getDateLinkString(s.start,s.end,s.link,s.format,n)),a+t.map((t=>{let s="";return null!=i&&null!=i.hierarchy&&i.hierarchy.find((s=>s===t))&&(s=e.get("asc"===i.direction?"ORDER_asc":"ORDER_desc")),"".concat(" ",C.translateScenarioLabel(t,e),s)})).toString()}allMeasuresUseSameUnit(t){const s=new Map;return t.forEach((function(t){s.set(t.unit,!0)})),1===s.size}}class N{constructor(){this.businessunit="",this.measures=[],this.scenarios=[],this.i18nMode=g.ALL,this.intervalSpanLimit=32}}class P{constructor(t,s,i,e){this.measureEntryAdapter=t,this.timePeriodAdapter=s,this.orderAdapter=i,this.stringAdapter=e}adapt(t){const s=new N;return R.isString(t.businessunit)&&(s.businessunit=t.businessunit),R.isArray(t.measures)&&(s.measures=_.adaptArray(t.measures,this.measureEntryAdapter)),R.isArray(t.scenarios)&&(s.scenarios=_.adaptArray(t.scenarios,this.stringAdapter)),R.isExisting(t.timeperiod)&&(s.timeperiod=this.timePeriodAdapter.adapt(t.timeperiod)),R.isNumber(t.intervalSpanLimit)&&(s.intervalSpanLimit=t.intervalSpanLimit),R.isExisting(t.i18nMode)&&(s.i18nMode=t.i18nMode),R.isExisting(t.order)&&(s.order=this.orderAdapter.adapt(t.order)),s}default(){return new N}}var U;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(U||(U={}));class A{constructor(t){this.i18n=new Map,this.unit="",this.measures=[],this.dimension="",this.config=new N,this.state=U.DIRTY,this.ruleSet=t||new M,this.dataSetFactory=new T,this.state=U.DIRTY,this.setI18n(new Map)}setI18n(t){this.state=U.DIRTY;const s=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"],["pp3","PL3"],["ac4","AC4"],["py4","PY4"],["fc4","FC4"],["pp4","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","❖"],["CONNECTOR_WS"," und "]]);this.i18n=new Map([...s,...t||new Map])}update(){return U.DIRTY===this.state&&(this.unit=this.config.businessunit,this.measures=this.dataSetFactory.createMeasures(this.config.measures,this.i18n,this.config.i18nMode),this.dimension=this.dataSetFactory.createDimension(this.config.scenarios,this.config.timeperiod,this.config.order,this.i18n,this.config.intervalSpanLimit),this.state=U.UP_TO_DATE),this}setConfig(t){this.config=this.initConfig(t)}initConfig(t){this.state=U.DIRTY;const s=t,i=this;return t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))),s}}class W{constructor(t="",s=""){this.name=t,this.unit=s}}class B{construnctor(){}adapt(t){const s=new W;return R.isString(t.name)&&(s.name=t.name),R.isString(t.unit)&&(s.unit=t.unit),s}default(){return new W("","")}}class I{constructor(t=w.now(),s=w.now(),i=x.AUTO,e=D.AUTO){this.start=t,this.end=s,this.format=i,this.link=e}}class Y{construnctor(){}adapt(t){const s=new I;return R.isDate(t.start)&&(s.start=t.start),R.isDate(t.end)&&(s.end=t.end),R.isExisting(t.format)&&(s.format=t.format),R.isExisting(t.link)&&(s.link=t.link),s}default(){return new I}}const V=class{constructor(s){t(this,s),this.businessUnit="",this.scenarios=[],this.measures=[],this.intervalSpanLimit=28,this.order={hierarchy:[],direction:y.ASC},this.i18n=new Map,this.i18nMode=g.ALL,this.title=new A(new M)}async setBusinessUnit(t){this.businessUnit=t}async setProps(t){Object.keys(t).forEach((s=>{this[s]=t[s]}))}render(){return s("div",{key:"08439c867ae47a9ee17ef8280801896a823c8826"},s("div",{key:"bb5b7325de2ae2f2e0bdba8d7f7f36511835efa9"},this.title.unit),s("div",{key:"3edb730c95280ca0c47db70e32dd8e471747d989"},this.title.measures.map(((t,i)=>s("span",null,this.isFirstElement(i)?this.title.i18n.get("SEPERATOR_WS"):"",s("span",{class:"measure"},t.name)," ",t.unit?this.title.i18n.get("in"):""," ",t.unit)))),s("div",{key:"3bae51f2fddef6b2195d1c24915512b6255c9a75"},this.title.dimension))}componentWillLoad(){const t=this.prepareConfig();this.title=new A(new M),this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillUpdate(){const t=this.prepareConfig();this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillRender(){this.title.update()}isFirstElement(t){return 0!==t}prepareConfig(){return new P(new B,new Y,new S(new j),new j).adapt({businessunit:this.businessUnit,measures:this.measures,scenarios:this.scenarios,timeperiod:this.timeperiod,intervalSpanLimit:this.intervalSpanLimit,i18nMode:this.i18nMode,order:this.order})}};V.style=':host{display: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)}.measure{font-weight:bold}div{background-color:var(--bn-font-background, white);color:var(--bn-font-color, black)}';export{z as bn_body,F as bn_footer,L as bn_title,V as ibcs_title}
@@ -0,0 +1 @@
1
+ import{a as e}from"./p-BYmPQYxx.js";import{g as t}from"./p-Bnhh02CF.js";class a{constructor(e="",t=1){this.prefix=e,this.value=t}}var s;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(s||(s={}));class r{static calculateMeasureScale(t,s,r){var n;if("_"===r)return new a;if(null!=r&&[...this.unitsLeast,...this.unitsGreat].includes(r))return this.lookupPrefix(r);if(0===s.length)return new a;const i=`SELECT MAX(GREATEST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`,u=`SELECT MIN(LEAST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`;let c=i;"LEAST"===(null==r?void 0:r.toUpperCase())&&(c=u);const h=null===(n=e(c,[t])[0])||void 0===n?void 0:n.prefixvalue;return this.determinePrefix(Math.abs(h))}static determinePrefix(e){if(e>=1e3){const t=Math.floor(Math.floor(Math.abs(e)).toString().length/3),s=+Math.pow(1e3,t);return new a(this.unitsGreat[t-1],s)}if(e<=.001){const t=Math.floor(Math.abs(e).toString().length/3),s=1/Math.pow(1e3,t);return new a(this.unitsLeast[t-1],s)}return new a}static lookupPrefix(e){return new a(e,s[e])}}r.unitsGreat=["k","M","G","T","P","E","Z","Y"],r.unitsLeast=["m","my","n","p","P","f","a","z","y"];class n{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class i{adapt(e){const a=new n;return t.isNumber(e.percent)&&(a.percent=e.percent),t.isNumber(e.decimal)&&(a.decimal=e.decimal),a}default(){return new n}}export{r as D,a as S,n as a,i as b}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as e,g as s}from"./p-JNHhIe7t.js";import{w as a,v as r,a as n,l as o,m as l,i as p,n as h,j as d,o as u,b as c,p as v,q as m,d as g,e as y,r as f,k as b,s as O,t as w}from"./p-Bka-Z6jo.js";import{w as S,g as R,p as T}from"./p-DlppAFq9.js";import{w as _}from"./p-BfXY5dsy.js";import{a as D}from"./p-CL1RYuNU.js";import{w as E}from"./p-BgnHJQ9Q.js";import{w as C}from"./p-DvDDgmcV.js";import{w as M}from"./p-C7dQL8CS.js";import{d as F,O as G,a as N,I as j,T as U,M as A,B as W,e as B}from"./p-Bnhh02CF.js";import{T as P}from"./p-DHezf8pZ.js";import"./p-BYBpC0EO.js";import"./p-Bhd_WSML.js";import"./p-DvvwfRQG.js";const L=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.barColumnWidth="w10",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,a(this),_(this),this.errors=M(this),this.componentStyle=C(this),S(this,((t,i)=>{this.data=i||[]}),((t,i)=>{this.datasetMeta=i})),this.t=E(this).t}validateScenario(t){const i="ERR_scenarios",e=r(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=n(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(o(t))return void this.errors.remove(i);const e=n(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)}validateBarColumnWidth(t){const i="ERR_barColumnWidth";l(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"barColumnWidth: invalid value '"+t+"' is not supported."})}validateUnitScaling(t){const i="ERR_unitScaling";p(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";p(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";h(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";d(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";d(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";d(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";u(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";c(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=v(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=m(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=g(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";y(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";f(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";b(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";c(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";c(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";O(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=w(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.validateBarColumnWidth(this.barColumnWidth),this.validateUnitScaling(this.unitScaling),this.validatePercentageScaling(this.percentageScaling),this.validateScaling(this.scale)}disconnectedCallback(){this.unsubscribe()}componentDidRender(){var t,i;const{mode:e}=T(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:a}=R(s);if(a<=0)return;const r=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",`${r}px`);const n=null===(t=s.shadowRoot)||void 0===t?void 0:t.querySelector("div"),o=null!==(i=null==n?void 0:n.scrollWidth)&&void 0!==i?i:s.scrollWidth;if(o<=a+1)return this.errors.remove("AUTO_scale"),void(1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1));const l=(a-1)/o;s.style.setProperty("--bn-font-size",r*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 F[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 P[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 a=this.order;return s&&(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedOrder)&&(a=this.datasetMeta.suggestedOrder),{hierarchy:a.split(",").map((t=>N[null==t?void 0:t.toUpperCase()])),direction:G[null===(e=this.orderDirection)||void 0===e?void 0:e.toUpperCase()]}}prepareI18nMode(){return j.META}prepareI18n(){const t=D,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,a,r,n,l;const p="auto"===(null===(t=this.scenarios)||void 0===t?void 0:t.trim().toLowerCase());if((o(this.scenarios)||p)&&o(this.variances))return(null===(e=null===(i=this.datasetMeta)||void 0===i?void 0:i.availableScenarios)||void 0===e?void 0:e.length)>0?(p?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 p||o(this.scenarios)?(null===(a=null===(s=this.datasetMeta)||void 0===s?void 0:s.availableScenarios)||void 0===a?void 0:a.length)>0&&(p?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===(r=this.scenarios)||void 0===r?void 0:r.split(","))),(null===(n=this.variances)||void 0===n?void 0:n.trim().length)>0&&(h=h.concat(null===(l=this.variances)||void 0===l?void 0:l.split(","))),h.map((t=>t.trim()))}prepareCategoryWidth(){var t;return o(this.categoryWidth)?U.INF:U[null===(t=this.categoryWidth)||void 0===t?void 0:t.toUpperCase()]}prepareMeasureScale(){return o(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 o(this.measureType)?A.VOLUME:A[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}prepareBarColumnWidth(){var t;const i=null===(t=this.barColumnWidth)||void 0===t?void 0:t.toUpperCase(),e=B[i];return e?W[e]:W[B.W10]}prepareBarColumns(){return o(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}=T(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,a,r;const n=(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":n*t+"px","--bn-font-color":(null===(a=i.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(r=i.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles(),s=this.getEffectiveScaleFactor();return i(e,{key:"788f67af1bbc37c0ffe1467503e0708ec52a7f53",style:t},i("div",{key:"3f9bcc8cddc8bbdf88681ca3d0ee35e67aa1a04f"},i("ibcs-table",{key:"74657d8bca08c78313db7f497c0d7267eee97d00",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(),barColumnMaxWidth:this.prepareBarColumnWidth(),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}],barColumnWidth:[{validateBarColumnWidth: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}]}}};L.style=":host{display:inline-block;position:relative;overflow:hidden}";export{L as bn_table}
@@ -1 +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}
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-CL1RYuNU.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 o,H as i,g as e}from"./p-JNHhIe7t.js";import{w as n,g as s,p as a}from"./p-DlppAFq9.js";import{w as r}from"./p-BgnHJQ9Q.js";import{w as l}from"./p-BfXY5dsy.js";import{w as d}from"./p-Bka-Z6jo.js";import{w as c}from"./p-DvDDgmcV.js";import{w as h}from"./p-C7dQL8CS.js";import"./p-CL1RYuNU.js";import"./p-DvvwfRQG.js";import"./p-BYBpC0EO.js";import"./p-Bnhh02CF.js";import"./p-Bhd_WSML.js";const f=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(f.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=h(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,h,f,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!==(f=null!==(c=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==c?c:null===(h=t.global)||void 0===h?void 0:h.fontSizePx)&&void 0!==f?f: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,h=l>0&&o.scrollHeight>l+1,f=c||h;if(d<=0&&l<=0)return;if("none"===i){if(f){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),h&&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(f){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),h&&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}