@bino-bi/bn-template-engine 1.0.0-alpha.3 → 1.0.0-alpha.5

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 (198) 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-3b4c7425.entry.js +1 -0
  7. package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
  8. package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
  9. package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
  10. package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
  11. package/dist/bn-template-engine/p-7337e03d.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
  13. package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
  14. package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
  15. package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
  16. package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
  17. package/dist/bn-template-engine/{p-B4ySv9KQ.js → p-Bhd_WSML.js} +1 -1
  18. package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
  19. package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
  20. package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
  21. package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
  22. package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
  23. package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
  24. package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
  25. package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
  26. package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
  27. package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
  28. package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
  29. package/dist/bn-template-engine/p-abc0067c.entry.js +1 -0
  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-C0yAPzJz.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-DAmZzqbD.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CcluhpGI.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-BKoDS21t.js → Order-iG11HI4R.js} +8 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-DYYAU-81.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} +1074 -30
  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 +981 -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} +122 -1293
  67. package/dist/cjs/{StringAdapter-Bneo8T4k.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-CW30Bh6c.js → withStyled-CS1Yp4sv.js} +8 -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/Label.js +11 -0
  82. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
  83. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  84. package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
  85. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  86. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  87. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  88. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  89. package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
  90. package/dist/collection/components/bn-table/bn-table.js +20 -21
  91. package/dist/collection/components/bn-table/ibcs-table.js +2 -2
  92. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +58 -41
  93. package/dist/collection/stores/componentStyles.js +2 -0
  94. package/dist/collection/utils/constants.js +8 -5
  95. package/dist/collection/utils/contentDecoder.js +28 -0
  96. package/dist/collection/utils/stackColors.js +2 -2
  97. package/dist/collection/utils/validate.js +1 -1
  98. package/dist/components/DataFormatDigits.js +1 -1
  99. package/dist/components/Order.js +1 -1
  100. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  101. package/dist/components/bn-chart-structure.js +1 -1
  102. package/dist/components/bn-chart-time.js +1 -1
  103. package/dist/components/bn-dataset.js +1 -1
  104. package/dist/components/bn-datasource.js +1 -1
  105. package/dist/components/bn-table.js +1 -1
  106. package/dist/components/contentDecoder.js +1 -0
  107. package/dist/components/context-protocol.js +1 -1
  108. package/dist/components/emotion-hash.esm.js +1 -0
  109. package/dist/components/ibcs-chart-structure2.js +1 -1
  110. package/dist/components/ibcs-chart-time2.js +1 -1
  111. package/dist/components/ibcs-table2.js +1 -1
  112. package/dist/components/ibcs-title2.js +1 -1
  113. package/dist/components/ibcsRuleSet.js +1 -1
  114. package/dist/components/validate.js +1 -1
  115. package/dist/components/withStyled.js +1 -1
  116. package/dist/esm/{DataFormatDigits--qIbKvXa.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  117. package/dist/esm/{DateStringFactory-XWdUjsn8.js → DateStringFactory-CSGz6TDk.js} +1 -1
  118. package/dist/esm/{Order-sqjrku2z.js → Order-Bnhh02CF.js} +9 -6
  119. package/dist/esm/{SVGVariancesStyleGroup-ibg3sLjM.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  120. package/dist/esm/bn-asset.entry.js +5 -4
  121. package/dist/esm/bn-body_4.entry.js +11 -9
  122. package/dist/esm/bn-card.entry.js +5 -4
  123. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1064 -24
  124. package/dist/esm/bn-chart-time.entry.js +38 -12
  125. package/dist/esm/bn-component-style.entry.js +5 -4
  126. package/dist/esm/bn-dataset.entry.js +35 -6
  127. package/dist/esm/bn-grid.entry.js +9 -7
  128. package/dist/esm/bn-image.entry.js +9 -7
  129. package/dist/esm/bn-internationalization.entry.js +5 -4
  130. package/dist/esm/bn-layout-card.entry.js +3 -2
  131. package/dist/esm/bn-layout-page.entry.js +2 -1
  132. package/dist/esm/bn-message.entry.js +5 -4
  133. package/dist/esm/bn-table.entry.js +979 -0
  134. package/dist/esm/bn-template-engine.js +1 -1
  135. package/dist/esm/bn-template.entry.js +3 -2
  136. package/dist/esm/bn-text.entry.js +11 -9
  137. package/dist/esm/bn-tree.entry.js +9 -7
  138. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  139. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  140. package/dist/esm/editor-companion.entry.js +1 -1
  141. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  142. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  143. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +69 -1236
  144. package/dist/esm/{StringAdapter-BCLJpQQ8.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  145. package/dist/esm/index-DHezf8pZ.js +65 -0
  146. package/dist/esm/loader.js +1 -1
  147. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  148. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  149. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  150. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  151. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  152. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  153. package/dist/esm/{withStyled-D1fAWJ3g.js → withStyled--qQWquTH.js} +6 -59
  154. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  155. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  156. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  157. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
  158. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  159. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  160. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  161. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  162. package/dist/types/components/bn-table/bn-table.d.ts +10 -8
  163. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +0 -2
  164. package/dist/types/components.d.ts +102 -38
  165. package/dist/types/stores/componentStyles.d.ts +2 -0
  166. package/dist/types/utils/constants.d.ts +8 -5
  167. package/dist/types/utils/contentDecoder.d.ts +12 -0
  168. package/package.json +2 -1
  169. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  170. package/dist/bn-template-engine/p-1970906d.entry.js +0 -1
  171. package/dist/bn-template-engine/p-1dbd339c.entry.js +0 -1
  172. package/dist/bn-template-engine/p-2e68cf09.entry.js +0 -1
  173. package/dist/bn-template-engine/p-31cc6a2d.entry.js +0 -1
  174. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  175. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  176. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  177. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  178. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  179. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  180. package/dist/bn-template-engine/p-8tsCnxIz.js +0 -1
  181. package/dist/bn-template-engine/p-997b2fe4.entry.js +0 -1
  182. package/dist/bn-template-engine/p-BL8gyUwE.js +0 -1
  183. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  184. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  185. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  186. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  187. package/dist/bn-template-engine/p-DtdQCMzj.js +0 -1
  188. package/dist/bn-template-engine/p-a90f1cbe.entry.js +0 -1
  189. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  190. package/dist/bn-template-engine/p-d7f0cbaf.entry.js +0 -1
  191. package/dist/bn-template-engine/p-dfb61aa5.entry.js +0 -1
  192. package/dist/bn-template-engine/p-ece17f84.entry.js +0 -1
  193. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  194. package/dist/bn-template-engine/p-fd427179.entry.js +0 -1
  195. package/dist/bn-template-engine/p-sqjrku2z.js +0 -1
  196. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  197. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  198. package/dist/esm/bn-chart-structure.entry.js +0 -698
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,g as e}from"./p-JNHhIe7t.js";import{v as h,a as n,i as r,c as a,d as o,e as l,b as c,j as d,k as u,g as p,w as f,l as g}from"./p-Bka-Z6jo.js";import{w as v,g as m,p as w}from"./p-DlppAFq9.js";import{w as b}from"./p-BfXY5dsy.js";import{w as y}from"./p-BgnHJQ9Q.js";import{a as S,b as x,g as P}from"./p-CL1RYuNU.js";import{w as k}from"./p-DvDDgmcV.js";import{w as L}from"./p-C7dQL8CS.js";import{j as O,O as _,a as M,S as T,b as R,c as C,f as A,g as $,l as E}from"./p-Bnhh02CF.js";import{w as N}from"./p-P7pGJBgc.js";import{c as W,d as D}from"./p-CYwd_ZNM.js";import{S as U,g as B,a as Y,I as H,F as V,b as z,c as X,d as F,P as G}from"./p-u8igQLRZ.js";import{D as j,S as I,b as K}from"./p-5KQYRQLK.js";import{F as Q,C as J,V as Z}from"./p-1jFf17Vj.js";import{a as q}from"./p-BYmPQYxx.js";import{S as tt,I as it}from"./p-ChlK-T9I.js";import"./p-BYBpC0EO.js";import"./p-Bhd_WSML.js";import"./p-DvvwfRQG.js";import"./p-BFTU3MAI.js";const st=class{validateScenario(t){const i=h(t),s="ERR_scenarios";i.length>0?this.errors.addOrReplace({id:s,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(s)}validateVariances(t){const i="ERR_variances",s=n(t);s.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(s)+"' are not supported."}):this.errors.remove(i)}validateUnitScaling(t){const i="ERR_unitScaling";r(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"unitScaling: invalid value(s) '"+t+"' are not supported."})}validatePercentageScaling(t){const i="ERR_percentageScaling";r(t)||this.pixelPerUnitGroupMap.has(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"percentageScaling: invalid value(s) '"+t+"' are not supported."})}validateLevel(t){const i="ERR_level";a(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"level: invalid value(s) '"+t+"' are not supported."})}validateOrderList(t){const i=o(t),s="ERR_order";i.length>0?this.errors.addOrReplace({id:s,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(s)}validateOrderDirection(t){const i="ERR_orderDirection";l(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."})}validateLimit(t){const i="ERR_limit";c(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"limit: invalid value '"+(null==t?void 0:t.toString())+"' is not supported."})}validateShowCategories(t){const i="ERR_showCategories";d(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:"showCategories: invalid value(s) '"+(null==t?void 0:t.toString())+"' are not supported."})}validateMeasureScale(t){const i="ERR_measureScale";u(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."})}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."})}validateStack(t){const i="ERR_stack",s=p(t);s.length>0?this.errors.addOrReplace({id:i,type:"warning",message:s.join("; ")}):this.errors.remove(i)}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.chartTitle="",this.filter="",this.limit=0,this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.measureUnit="",this.stack="",this.scenariosArray=[""],this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,f(this),b(this),v(this,((t,i)=>{this.data=i||[]}),((t,i)=>{this.datasetMeta=i})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=L(this),this.componentStyle=k(this),this.t=y(this).t}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){var t,i;const{mode:s}=w(this.scale);if("auto"!==s&&"empty"!==s)return this._autoScaleGuard=!1,void this.checkWidthOverflow();if(this._autoScaleGuard)return this._autoScaleGuard=!1,void this.checkWidthOverflow();const e=this.element,{height:h}=m(e);if(h<=0)return void this.checkWidthOverflow();const n=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}));e.style.setProperty("--bn-font-size",`${n}px`);const r=null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector(".container"),a=null!==(i=null==r?void 0:r.scrollHeight)&&void 0!==i?i:e.scrollHeight;if(a<=h+1)return this.errors.remove("AUTO_scale"),1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1),void this.checkWidthOverflow();const o=(h-1)/a;e.style.setProperty("--bn-font-size",n*o+"px"),"empty"===s?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),Math.abs(o-this.appliedScaleFactor)>.001&&(this._autoScaleGuard=!0,this.appliedScaleFactor=o),this.checkWidthOverflow()}checkWidthOverflow(){var t;const i="WARN_overflow",s=String(null!==(t=this.unitScaling)&&void 0!==t?t:"").trim().toLowerCase();if(""===s||"auto"===s)return void this.errors.remove(i);const e=m(this.element);e.width>0&&this.element.scrollWidth>e.width+1?this.errors.addOrReplace({id:i,type:"error",message:`Chart exceeds available width (${this.element.scrollWidth}px > ${Math.round(e.width)}px). Reduce unit-scaling or set to "auto".`}):this.errors.remove(i)}prepareDimension(){const t=m(this.element);return this.canvasWidthSegmented=t.width/this.scenariosArray.length,{width:this.canvasWidthSegmented,height:t.height}}prepareScenarios(){var t,i,s,e;const h="auto"===(null===(t=this.scenarios)||void 0===t?void 0:t.trim().toLowerCase());return g(this.scenarios)||h?(null===(s=null===(i=this.datasetMeta)||void 0===i?void 0:i.availableScenarios)||void 0===s?void 0:s.length)>0?(h?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):[]:(this.errors.remove("AUTO_scenarios"),null===(e=this.scenarios)||void 0===e?void 0:e.split(",").map((t=>t.trim())))}prepareVariances(){var t;return g(this.variances)?[]:null===(t=this.variances)||void 0===t?void 0:t.split(",").map((t=>t.trim()))}prepareHideCategories(t){return t>=1||"true"!==this.showCategories}prepareI18n(){const t=S,i=new Map([].map((t=>[t,this.t(".".concat(t))]))),s=new Map(t.map((t=>[t,this.t("global.".concat(t))])));return new Map([...s.entries(),...i.entries()])}preparePixelPerUnit(){var t;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(t=this.unitScaling)||void 0===t?void 0:t.toString().trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const i=Number(this.unitScaling);return!isNaN(i)&&i>0?(this.errors.remove("AUTO_unitScaling"),i):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):100*Number(this.percentageScaling)}prepareLevel(){var t,i,s;const e="auto"===(null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase());return g(this.level)||e?(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel)?(e?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:`level: not set, auto-detected: ${this.datasetMeta.suggestedLevel}`}),O[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),O[null===(s=this.level)||void 0===s?void 0:s.toUpperCase()])}prepareOrder(){var t,i,s;const e="auto"===(null===(t=this.order)||void 0===t?void 0:t.trim().toLowerCase());let h;return g(this.order)||e?(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedOrder)?(e?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${this.datasetMeta.suggestedOrder}`}),h=this.datasetMeta.suggestedOrder):h=this.order:(this.errors.remove("AUTO_order"),h=this.order),{hierarchy:null==h?void 0:h.split(",").map((t=>M[null==t?void 0:t.toUpperCase()])),direction:_[null===(s=this.orderDirection)||void 0===s?void 0:s.toUpperCase()]}}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{const s=i.global.fontSizePx*t;return{scaleFactors:{scenarioOffset:i["bn-chart-structure"].scaleFactors.scenarioOffset,scenarioLabelToBar:i["bn-chart-structure"].scaleFactors.scenarioLabelToBar,labelToBar:i["bn-chart-structure"].scaleFactors.labelToBar,labelToAxis:i["bn-chart-structure"].scaleFactors.labelToAxis,needleWidth:i["bn-chart-structure"].scaleFactors.needleWidth,needleHeadWidth:i["bn-chart-structure"].scaleFactors.needleHeadWidth,barWidth:i["bn-chart-structure"].scaleFactors.barWidth,varianceAxisLineWidth:i["bn-chart-structure"].scaleFactors.varianceAxisLineWidth,axisLineWidth:i["bn-chart-structure"].scaleFactors.axisLineWidth,auxiliaryLineWidth:i["bn-chart-structure"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:i["bn-chart-structure"].scaleFactors.scenarioLineWidth,markerWidth:i["bn-chart-structure"].scaleFactors.markerWidth,markerOffset:i["bn-chart-structure"].scaleFactors.markerOffset,categoryWidth:i["bn-chart-structure"].scaleFactors.categoryWidth,axisTickLength:i["bn-chart-structure"].scaleFactors.axisTickLength},fontStyles:{font:`${s}px ${i.global.fontFamily}`,size:s,color:i.global.fontColor,background:i.global.fontBackgroundColor,leading:1.8},axisStyles:i["bn-chart-structure"].axisStyles,barStyles:i["bn-chart-structure"].barStyles,varianceStyles:i["bn-chart-structure"].varianceStyles,padding:i["bn-chart-structure"].padding,pattern:null}}))}prepareChartTitle(t){return t>=1?"":this.chartTitle}prepareStackConfig(){if(g(this.stack))return this.errors.remove("WARN_stack_dimensions_scenarios"),null;try{const t=JSON.parse(this.stack),i=t.by,s="WARN_stack_dimensions_scenarios";if(i===T.DIMENSIONS){const t=this.prepareScenarios();t.length>1?this.errors.addOrReplace({id:s,type:"warning",message:`stack by dimensions: only the first scenario "${t[0]}" is used, the rest (${t.slice(1).join(", ")}) are discarded.`}):this.errors.remove(s)}else this.errors.remove(s);return{by:i,mode:t.mode||C.ABSOLUTE,order:t.order||R.DATASET}}catch(t){return this.errors.remove("WARN_stack_dimensions_scenarios"),null}}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareLimit(){return Math.floor(Number(this.limit)||0)}getDataStructure(){return{IStructureChartDataRow:{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:""}}}}prepareMeasureScale(){return g(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"}prepareShowMeasureScale(t){return 0===t&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}chartTemplate(t,s){const e=this.getEffectiveScaleFactor(),h=this.preparePixelPerUnit(),n=this.preparePixelPerPercentage(),r=this.prepareStackConfig(),a=this.prepareScenarios(),o=(null==r?void 0:r.by)===T.DIMENSIONS?a.slice(0,1):a;return i("ibcs-chart-structure",{data:this.data,chartTitle:this.prepareChartTitle(s),scenarios:o,variances:[t],hideCategories:this.prepareHideCategories(s),pixelPerUnit:h>0?h*e:0,pixelPerPercentage:n>0?n*e:0,limit:this.prepareLimit(),styles:this.prepareStyle(),i18n:this.prepareI18n(),order:this.prepareOrder(),level:this.prepareLevel(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(s),stackConfig:r,parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:t,factor:i}=w(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var s,e,h,n;const r=(null===(s=i.global)||void 0===s?void 0:s.fontSizePx)||13.3333;return{"--bn-font-family":(null===(e=i.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":r*t+"px","--bn-font-color":(null===(h=i.global)||void 0===h?void 0:h.fontColor)||"#000000","--bn-font-background":(null===(n=i.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){let t=[""];const e=this.prepareVariances();e.length>0&&(t=[...t,...e]);const h=this.getFontStyles();return i(s,{key:"570fb741ddf481be0f3055d346314ad39a455361",style:h},i("div",{key:"e84cfe2e00dd2f960f038844e00449431efa6ce0",class:"container"},t.map(this.chartTemplate)))}get element(){return e(this)}static get watchers(){return{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}]}}};st.style=':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';const et=class{constructor(i){t(this,i),this.currentPageUpdate=void 0,b(this),this.errors=L(this)}setLocale(t){this.stores.context.state.locale=t}connectedCallback(){this.stores=x(this.element),this.locale&&(this.stores.context.state.locale=this.locale),this.currentPageUpdate=setTimeout((()=>{this.element.querySelectorAll("bn-page, bn-layout-page").forEach(((t,i)=>{if("bn-layout-page"===t.localName)t.setAttribute("page-number",(i+1).toString());else{const s=t.querySelector("bn-footer");s&&s.setAttribute("page-number",(i+1).toString())}}))}),250)}disconnectedCallback(){this.currentPageUpdate&&clearTimeout(this.currentPageUpdate)}componentWillLoad(){}componentDidLoad(){}componentShouldUpdate(){}componentWillRender(){}componentDidRender(){}componentWillUpdate(){}componentDidUpdate(){}render(){return i(s,{key:"b92019b909e271225baca2cf740c8301e324164e"},i("slot",{key:"87bac4bb29bca32d961afe31355dc1bd48fff0f8"}))}get element(){return e(this)}static get watchers(){return{locale:[{setLocale:0}]}}};et.style=":host{display:block}";const ht=class{constructor(i){t(this,i),this.raw=!0,this.lastHash=null,b(this),this.errors=L(this),N(this,(t=>{this.stores||(this.stores=P(this.element));try{let i,s;if(this.raw)i=W(t),s=t;else{const e=D(t);i=e.hash,s=e.json}if(i===this.lastHash)return;this.lastHash=i;const e=JSON.parse(s);this.stores.datasources.set(this.name,e)}catch(i){console.error("Error parsing datasource",i,String(t).slice(0,200)),this.stores.datasources.set(this.name,[])}}))}render(){return i(s,{key:"43b691b07f63d12ad6c835dfb5d5bf6053b3bbf4"})}get element(){return e(this)}};ht.style="bn-datasource{display:none}";const nt=["xga","hd","full-hd","4k","4k2k","a4","a3","a2","a1","a0","letter","legal"],rt=["landscape","portrait"],at=class{constructor(i){t(this,i),b(this),this.errors=L(this),this.componentStyle=k(this)}validateFormat(t){const i="ERR_format";g(t)||nt.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`format: invalid value '${t}' is not supported. Valid values: ${nt.join(", ")}`})}validateOrientation(t){const i="ERR_orientation";g(t)||rt.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`orientation: invalid value '${t}' is not supported. Valid values: ${rt.join(", ")}`})}render(){return i(s,{key:"b4d682a8f6e83f77c58236265eaf9d1327809c6f",format:this.format,orientation:this.orientation,style:this.prepareStyle()},i("slot",{key:"ef49c43c1f8926c4c968b752608627adbe330d6c"}))}prepareStyle(){return{"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"}}get element(){return e(this)}static get watchers(){return{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}}};at.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}:host([format=xga]){height:768px;width:1024px}:host([format=xga][orientation=portrait]){height:1024px;width:768px}:host([format=xga][orientation=landscape]){height:768px;width:1024px}:host([format=hd]){height:720px;width:1280px}:host([format=hd][orientation=portrait]){height:1280px;width:720px}:host([format=hd][orientation=landscape]){height:720px;width:1280px}:host([format=full_hd]){height:1080px;width:1920px}:host([format=full_hd][orientation=portrait]){height:1920px;width:1080px}:host([format=full_hd][orientation=landscape]){height:1080px;width:1920px}:host([format="4k"]){height:2160px;width:3840px}:host([format="4k"][orientation=portrait]){height:3840px;width:2160px}:host([format="4k"][orientation=landscape]){height:2160px;width:3840px}:host([format="4k2k"]){height:2160px;width:4096px}:host([format="4k2k"][orientation=portrait]){height:4096px;width:2160px}:host([format="4k2k"][orientation=landscape]){height:2160px;width:4096px}:host([format=a6]){height:5.83in;width:4.13in}:host([format=a6][orientation=portrait]){height:5.83in;width:4.13in}:host([format=a6][orientation=landscape]){height:4.13in;width:5.83in}:host([format=a5]){height:8.27in;width:5.83in}:host([format=a5][orientation=portrait]){height:8.27in;width:5.83in}:host([format=a5][orientation=landscape]){height:5.83in;width:8.27in}:host([format=a4]){height:11.6in;width:8.17in}:host([format=a4][orientation=portrait]){height:11.6in;width:8.17in}:host([format=a4][orientation=landscape]){height:8.17in;width:11.6in}:host([format=a3]){height:16.54in;width:11.7in}:host([format=a3][orientation=portrait]){height:16.54in;width:11.7in}:host([format=a3][orientation=landscape]){height:11.7in;width:16.54in}:host([format=a2]){height:23.4in;width:16.54in}:host([format=a2][orientation=portrait]){height:23.4in;width:16.54in}:host([format=a2][orientation=landscape]){height:16.54in;width:23.4in}:host([format=a1]){height:33.1in;width:23.4in}:host([format=a1][orientation=portrait]){height:33.1in;width:23.4in}:host([format=a1][orientation=landscape]){height:23.4in;width:33.1in}:host([format=a0]){height:46.8in;width:33.1in}:host([format=a0][orientation=portrait]){height:46.8in;width:33.1in}:host([format=a0][orientation=landscape]){height:33.1in;width:46.8in}:host([format=letter]){height:11in;width:8.5in}:host([format=letter][orientation=portrait]){height:11in;width:8.5in}:host([format=letter][orientation=landscape]){height:8.5in;width:11in}:host([format=legal]){height:14in;width:8.5in}:host([format=legal][orientation=portrait]){height:14in;width:8.5in}:host([format=legal][orientation=landscape]){height:8.5in;width:14in}:host([format=tabloid]){height:17in;width:11in}:host([format=tabloid][orientation=portrait]){height:17in;width:11in}:host([format=tabloid][orientation=landscape]){height:11in;width:17in}:host([format=ledger]){height:11in;width:17in}:host([format=ledger][orientation=portrait]){height:17in;width:11in}:host([format=ledger][orientation=landscape]){height:11in;width:17in}';class ot{constructor(t,i,s,e,h,n,r,a){this.categoryPosition={x:0,y:0},this.spacings={scenarioOffset:0,markerOffset:0,scenarioLabelToBar:0,labelToBar:0,labelToAxis:0,needleWidth:0,needleHeadWidth:0,barWidth:0,varianceAxisLineWidth:0,axisLineWidth:0,auxiliaryLineWidth:0,scenarioLineWidth:0,markerWidth:0,categoryWidth:0,axisTickLength:0},this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontSize=s,this.axisPosition={x:0,y:0},this.numberOfColumns=e,this.leftSideLengthSync=h,this.topSideLabelHeight=n>0?this.fontSize:0,this.leftSideLabelLength=this.calculateSideLabelLength(n,r,a),this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}getBarPositionX(){return this.axisPosition.x}getBarCenterPositionY(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth}getBarPositionY(t,i){return i?this.getBarCenterPositionY(t):this.getBarCenterPositionY(t)-this.spacings.scenarioOffset}getCategoryPositionX(t){let i=this.spacings.labelToAxis;return t&&(i=-this.spacings.labelToAxis),this.getAxisPositionX()+i}getAxisTitlePositionX(){return this.axisPosition.x}getAxisTitlePositionY(){return this.axisPosition.y-this.spacings.labelToAxis}getNeedleWidth(){return this.spacings.needleWidth}getAxisPositionX(){return this.leftSideLabelLength+this.padding.left+this.spacings.labelToAxis}getAxisPositionY(){return this.padding.top+this.getAxisTitleOffset()}loadCategoriesBox(t){this.categoriesBoxOffset=t,this.calculateAxisPosition()}addOffsetByNegativeDataPoints(t,i,s,e){null!=t&&null!=t.value&&t.value<0&&(s&&t.isClipped()?this.axisPosition.x+=Math.abs(t.getClippedValue()*t.pixelPerUnit):this.axisPosition.x+=Math.abs(t.value*t.pixelPerUnit),this.axisPosition.x+=i,this.axisPosition.x+=this.spacings.labelToBar),this.axisPosition.x<e/2&&(this.axisPosition.x=e/2+this.spacings.labelToBar)}getLabelPositionX(t){let i=this.spacings.labelToBar;return t<0&&(i*=-1),this.axisPosition.x+t+i}getLabelPositionY(t){return this.axisPosition.y+t+this.spacings.labelToBar}getCategoryToAxisSpaceing(){return this.spacings.labelToAxis}getCategoryToTopSpaceing(){return this.spacings.scenarioOffset}getCategoryToBottomSpaceing(){return this.spacings.scenarioOffset}getAxisEndPositionY(){return this.getAxisPositionY()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getScenarioLabelPositionOffsetY(t){return t?.5*this.getBarWidth()+this.spacings.scenarioLabelToBar:-(.5*this.getBarWidth()+this.spacings.scenarioLabelToBar)}getBarWidth(){return this.spacings.barWidth}getMarkerPositionY(t,i){return i?this.getBarCenterPositionY(t)-this.spacings.markerOffset-.5*this.getBarWidth():this.getBarCenterPositionY(t)+this.spacings.markerOffset+.5*this.getBarWidth()}getMarkerPositionX(){return this.getBarPositionX()}getMarkerScenarioLabelPositionOffsetY(t){return t?-(.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar):this.spacings.scenarioLabelToBar+.5*this.spacings.markerWidth}getAxisEndPositionX(){return this.getAxisPositionX()}calculateSpacings(){this.spacings={scenarioOffset:this.fontSize*this.scaleFactors.scenarioOffset,markerOffset:this.fontSize*this.scaleFactors.markerOffset,scenarioLabelToBar:this.fontSize*this.scaleFactors.scenarioLabelToBar,labelToBar:this.fontSize*this.scaleFactors.labelToBar,labelToAxis:this.fontSize*this.scaleFactors.labelToAxis,needleWidth:this.fontSize*this.scaleFactors.needleWidth,needleHeadWidth:this.fontSize*this.scaleFactors.needleHeadWidth,barWidth:this.fontSize*this.scaleFactors.barWidth,varianceAxisLineWidth:this.fontSize*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontSize*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontSize*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontSize*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontSize*this.scaleFactors.markerWidth,categoryWidth:this.fontSize*this.scaleFactors.categoryWidth,axisTickLength:this.fontSize*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left,y:this.getAxisPositionY()+.5*this.spacings.categoryWidth}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY()}}recalculatePositions(){this.calculateCategoryPosition(),this.calculateAxisPosition()}getAxisTitleOffset(){return this.topSideLabelHeight}calculateSideLabelLength(t,i,s){if(this.leftSideLengthSync)return this.leftSideLengthSync;const e=t/2;let h=i;return e>h&&(h=e),s>h&&(h=s),h}}class lt{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 ct{constructor(t){const i=1*t,s=.7*t;this.bgOffset=(i-s)/2,this.markerUp={top:s/2+",0",left:"0,"+s,right:s+","+s},this.markerUpBackground={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerDown={bottom:s/2+","+s,left:"0,0",right:s+",0"},this.markerDownBackground={bottom:i/2+","+i,left:"0,0",right:i+",0"}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t}}class dt{constructor(t){this.container=new U,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let i=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(i=t.fontStyles.size),this.bgOffset=(1*i-.7*i)/2}createFCPattern(t,i){const s=i;return t.pattern(10,10,(function(t){t.rect(10,10).fill(s.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"})})).id("pattern-structure-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var ut,pt,ft,gt,vt;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(ut||(ut={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(pt||(pt={}));class mt{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new E(new tt).default(),this.level=O.CATEGORY,this.filter="",this.measureScale=new I,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.stackConfig=null}}class wt{constructor(t,i,s,e,h){this.dataRowAdapter=t,this.orderAdapter=i,this.stringAdapter=s,this.dataFormatDigitsAdapter=e,this.dataSet=h}adapt(t){const i=A.adaptArray(t.data,this.dataRowAdapter),s=A.adaptArray(t.scenarios,this.stringAdapter),e=new mt(i,s);return $.isArray(t.variances)&&(e.variances=A.adaptArray(t.variances,this.stringAdapter)),$.isString(t.title)&&(e.title=t.title),$.isBoolean(t.hideCategories)&&(e.hideCategories=t.hideCategories),$.isNumber(t.pixelPerUnit)&&(e.pixelPerUnit=t.pixelPerUnit),$.isNumber(t.pixelPerPercentage)&&(e.pixelPerPercentage=t.pixelPerPercentage),$.isNumber(t.limit)&&(e.limit=t.limit),$.isExisting(t.sortOrder)&&(e.sortOrder=this.orderAdapter.adapt(t.sortOrder)),$.isExisting(t.level)&&(e.level=t.level),$.isString(t.filter)&&(e.filter=t.filter.trim()),$.isExisting(t.measureScale)&&(e.measureScale=j.calculateMeasureScale(this.dataSet,e.scenarios,t.measureScale)),$.isString(t.measureUnit)&&(e.measureUnit=t.measureUnit),$.isBoolean(t.showMeasureScale)&&(e.showMeasureScale=t.showMeasureScale),$.isExisting(t.dataFormatDigits)&&(e.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),$.isExisting(t.stackConfig)&&(e.stackConfig=t.stackConfig),e}default(){return new mt([],[])}}class bt{constructor(t,i,s,e){this.value=t,this.scenario=i,this.pixelPerUnit=s||1,this.variance="neg"===e||e===ft.NEG?ft.NEG:"pos"===e||e===ft.POS?ft.POS:ft.NEU}isEmpty(){return null==this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:Math.abs(this.value)>1.45?this.value>=0?1.45*this.pixelPerUnit:-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:ft.NEU===this.variance?ft.NEU:ft.POS===this.variance?ft.NEG:ft.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 yt{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 St{constructor(){}adapt(t){const i=new yt;return $.isOperator(t.operation)&&(i.operation=t.operation),$.isNumber(t.rowGroupIndex)&&$.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),$.isNumber(t.categoryIndex)&&$.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),$.isNumber(t.subCategoryIndex)&&$.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),$.isNumber(t.columnGroupIndex)&&$.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),$.isNumber(t.columnSubGroupIndex)&&$.isString(t.columnSubGroup)&&i.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,i),this.setPlanValues(t,i),this.setPreviousPeriodValues(t,i),this.setForecastValues(t,i),i}default(){return new yt}setActualValues(t,i){$.isNumber(t.ac1)&&(i.ac1=t.ac1),$.isNumber(t.ac2)&&(i.ac2=t.ac2),$.isNumber(t.ac3)&&(i.ac3=t.ac3),$.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){$.isNumber(t.pl1)&&(i.pl1=t.pl1),$.isNumber(t.pl2)&&(i.pl2=t.pl2),$.isNumber(t.pl3)&&(i.pl3=t.pl3),$.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){$.isNumber(t.pp1)&&(i.pp1=t.pp1),$.isNumber(t.pp2)&&(i.pp2=t.pp2),$.isNumber(t.pp3)&&(i.pp3=t.pp3),$.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){$.isNumber(t.fc1)&&(i.fc1=t.fc1),$.isNumber(t.fc2)&&(i.fc2=t.fc2),$.isNumber(t.fc3)&&(i.fc3=t.fc3),$.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class xt{constructor(t,i,s,e,h,n){this.scaleFactors=t,this.fontStyles=i,this.axisStyles=s,this.barStyles=e,this.varianceStyles=h,this.padding=n,this.pattern=new Map,this.stackColors=["#000000","#c0c0c0","#808080"]}}class Pt{constructor(t,i,s,e,h){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=i,this.svgStyleGroupAdapter=s,this.svgVariancesStyleGroupAdapter=e,this.paddingadapter=h}adapt(t){const i=new xt(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return $.isExisting(t)&&($.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),$.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),$.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),$.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),$.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),$.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 ct(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new xt(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}class kt{constructor(){this.scenarioOffset=.3,this.scenarioLabelToBar=.1,this.labelToBar=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.barWidth=1.2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=1.9,this.axisTickLength=.3}}class Lt{adapt(t){const i=new kt;return $.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),$.isNumber(t.scenarioLabelToBar)&&(i.scenarioLabelToBar=t.scenarioLabelToBar),$.isNumber(t.labelToBar)&&(i.labelToBar=t.labelToBar),$.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),$.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),$.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),$.isNumber(t.barWidth)&&(i.barWidth=t.barWidth),$.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),$.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),$.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),$.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),$.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),$.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),$.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),$.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new kt}}!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"}(ft||(ft={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(gt||(gt={})),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"}(vt||(vt={}));class Ot{constructor(t,i,s,e,h,n,r,a){this.group=null,this.segmentFillColor=null,this.maxWidth=null,this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.x=i,this.y=s,this.value=h,null!=t&&(this.group=t.group().id(this.createElementID(t.toString(),e))),this.styles=n,this.isVarianceLabel=!1,this.isRelativeLabel=!1,this.verticalHookLocation=r||vt.Top,this.horizontalHookLocation=a||vt.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}setMaxWidth(t){return this.maxWidth=t,this}updateGroup(t){return this.group=t,this}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}draw(t={percent:2,decimal:1},i=new I){var s;if(this.isEmpty())return this;const e=this.group;let h;const n=this.styles.fontStyles.background||"#ffffff";let r="",a="start";if(!1===Number.isNaN(Number(this.value))){let s=t.percent,e=t.percent,n=1,o="percent";!1===this.isRelativeLabel&&(s=t.decimal,e=t.decimal,n=i.value,o="decimal"),h=Q.number(Number(this.value),o,s,e,n),Number(this.value)<0&&(a="end"),this.isVarianceLabel&&Number(this.value)>=0&&(r="+")}else h=""+this.value,a="start";const o=e.text(r+h);o.move(this.x,this.y);const l=o.bbox().w,c=o.bbox().h;return null!=this.maxWidth&&l>this.maxWidth?(null===(s=this.group)||void 0===s||s.remove(),this.group=null,this):(this.horizontalHookLocation===vt.Right?(a="end",o.move(o.x()-o.length(),o.y())):this.horizontalHookLocation===vt.Center&&(a="middle",o.move(o.x()-o.length()/2,o.y())),this.verticalHookLocation===vt.Center?o.move(o.x(),o.y()-c/2):this.verticalHookLocation===vt.Bottom&&o.move(o.x(),o.y()-c),o.font({anchor:a}),null!=this.segmentFillColor?o.fill(B(this.segmentFillColor)):null==e||e.rect(l,.9*c).stroke(n).fill(n).opacity(.7).move(o.x(),o.y()+.1*c).insertBefore(o),this)}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}}class _t{constructor(t,i,s,e){this.height=0,this.ID_AXIS="axis",this.ID_AXIS_TITLE="axis-title",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.position=i,this.style=e,this.label=new Ot(s,this.position.getAxisTitlePositionX(),this.position.getAxisTitlePositionY(),this.ID_AXIS_TITLE,this.labelText,this.style,vt.Bottom,vt.Center),this.svgGroup=s.group().id(this.ID_AXIS)}draw(){return this.labelText&&this.label.draw(),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(),this.position.getAxisEndPositionX(),this.position.getAxisEndPositionY()).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this.height=this.svgGroup.height(),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class Mt{constructor(t,i,s,e,h,n,r,a=null){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.barGroup=null,this.isVarianceBar=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveWidth=0,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=e,this.isPrimaryBar=h,this.position=t,this.barStyles=i.barStyles,this.overflowConfig=a,this.scenarioGroup=n,this.styles=i,null!=n&&(this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT)),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0;let i=vt.Left;s.value<0&&(i=vt.Right),this.dimensions=this.createDimensions(t,s,e,h),this.label=new Ot(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,vt.Center,i),this.scenarioLabel=this.getScenarioLabel(r)}}setAsVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}isRelativeVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToRelativeVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new I){if(this.isEmpty()||null==this.dataPoint.getScenario())return this;let s=this.barStyles.getSVGStyle(this.dataPoint.getScenario());this.isVarianceBar&&(s=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()));const e=this.convertToSVGStyle(s,"stroke");let h=this.convertToSVGStyle(s,"fill");const n=this.barStyles.getSVGStyle(this.dataPoint.getScenario()).fillpattern;if(null!=n){const t=this.styles.pattern.get(n);null!=t&&(h=t.pattern)}null!=this.barGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(h,e):this.barGroup.rect(this.dimensions.barLength,this.position.getBarWidth()).fill(h).stroke(e).cy(this.dimensions.yPos).x(this.dimensions.xPos)),this.drawBarDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.barGroup||!this.overflowConfig)return;const s=this.position.getBarPositionX(),e=this.position.getBarWidth(),h=this.dimensions.barLength,{breakGap:n}=this.overflowConfig;this.dataPoint.getScaledUnit()<0?(this.barGroup.rect(h,e).fill(t).stroke(i).x(s-h).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,e).fill(t).stroke(i).x(s-h-n-this.overdriveWidth).cy(this.dimensions.yPos),this.drawBreakIndicator(s-h-n,n)):(this.barGroup.rect(h,e).fill(t).stroke(i).x(s).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,e).fill(t).stroke(i).x(s+h+n).cy(this.dimensions.yPos),this.drawBreakIndicator(s+h,n))}drawBreakIndicator(t,i){if(!this.barGroup)return;const s=this.position.getBarWidth(),e=this.dimensions.yPos-s/2,h=t+i/2,n=.35*i,r=s/3;let a=`M ${h-n} ${e}`;for(let t=0;t<3;t++)a+=` L ${h-n-.3*i} ${e+r*(t+.5)} L ${h-n} ${e+r*(t+1)}`;let o=`M ${h+n} ${e}`;for(let t=0;t<3;t++)o+=` L ${h+n+.3*i} ${e+r*(t+.5)} L ${h+n} ${e+r*(t+1)}`;this.barGroup.rect(i,s+2).fill("#ffffff").stroke("none").x(t).cy(this.dimensions.yPos),this.barGroup.path(a).fill("none").stroke({color:"#000000",width:1}),this.barGroup.path(o).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s,e){const h=i.getScaledUnit(),n=Math.abs(h);if(this.overflowConfig&&n>0){const r="ac"===i.getScenario()?this.overflowConfig.cutWidth:this.overflowConfig.cutWidth-this.overflowConfig.scenarioCutOffset;if(n>r){this.isOverflowing=!0;const{breakGap:i,overdriveZoneWidth:a,maxOverflow:o}=this.overflowConfig;this.overdriveWidth=o>0?(n-r)/o*a:0;const l=r+i+this.overdriveWidth;return h<0?{clipped:!1,barLength:r,xPos:t.getBarPositionX()-r,yPos:t.getBarPositionY(s,e),labelXPos:t.getLabelPositionX(-l),scenarioLabelXPos:t.getBarPositionX()-.5*r,scenarioLabelYPos:t.getBarPositionY(s,e)+t.getScenarioLabelPositionOffsetY(e)}:{clipped:!1,barLength:r,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,e),labelXPos:t.getLabelPositionX(l),scenarioLabelXPos:t.getBarPositionX()+.5*r,scenarioLabelYPos:t.getBarPositionY(s,e)+t.getScenarioLabelPositionOffsetY(e)}}}return h<0?{clipped:!1,barLength:n,xPos:t.getBarPositionX()+h,yPos:t.getBarPositionY(s,e),labelXPos:this.position.getLabelPositionX(h),scenarioLabelXPos:this.position.getBarPositionX()-.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,e)+this.position.getScenarioLabelPositionOffsetY(e)}:{clipped:!1,barLength:h,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,e),labelXPos:this.position.getLabelPositionX(h),scenarioLabelXPos:this.position.getBarPositionX()+.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,e)+this.position.getScenarioLabelPositionOffsetY(e)}}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceBar||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw()}drawBarDataLabel(t,i=new I){var s;this.isPrimaryBar&&(null===(s=this.label)||void 0===s||s.draw(t,i))}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getScenarioLabel(t){return new Ot(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,this.isPrimaryBar?vt.Top:vt.Bottom,vt.Center)}}class Tt{constructor(t,i,s,e,h,n,r,a,o){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=i||null,this.markerPattern=s||this._defaultMarkerPattern,this.styles=h,this.barStyles=h?h.barStyles:null,this.scenario=e,!0!==(null==n?void 0:n.isEmpty())&&(this.hasData=!0,this.dimensions=this.createMarkerDimensions(n,r,o),this.scenarioLabel=this.getScenarioLabel(a,h,o))}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelXPos:0,barLength:Math.abs(t.getScaledUnit()),xPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}:{clipped:!1,labelXPos:0,barLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX()+t.getScaledUnit(),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()+t.getScaledUnit(),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new Ot(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,s?vt.Bottom:vt.Top,vt.Center)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let i=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const s=this.barStyles[this.getScenario()];if(null!=s&&s.fillpattern){const t=this.styles.pattern.get(s.fillpattern);null!=t&&(i=t.pattern)}return this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class Rt{constructor(t,i,s,e,h){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=e,this.position=t,this.barStyles=i.barStyles,this.scenarioGroup=h,this.styles=i,this.barGroup=h.group().id(h.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0,this.dimensions=this.createDimensions(t,s,e);let i=vt.Left;s.value<0&&(i=vt.Right),this.label=new Ot(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,vt.Center,i),this.label.setToRelativeVarianceLabel()}}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;if(null==this.dimensions)return this;const i=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()),s=i.stroke;let e=i.fill;const h=this.barStyles[this.dataPoint.getScenario()];if(null!=h&&h.fillpattern){const t=this.styles.pattern.get(h.fillpattern);null!=t&&null!=t.pattern&&(e=t.pattern)}this.drawNeedleHead(e,s),this.barGroup.rect(this.dimensions.barLength,this.position.getNeedleWidth()).fill(e).stroke(s).cy(this.dimensions.yPos).x(this.dimensions.xPos),null===(t=this.label)||void 0===t||t.draw()}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{barLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getBarPositionX()+i.getScaledPercentUnit(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()-this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}:{barLength:i.getScaledPercentUnit(),xPos:t.getBarPositionX(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()+this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}}drawNeedleHead(t,i){if(null===this.dimensions)return;const s=this.styles.varianceStyles.needleHeadColour,e=this.styles.varianceStyles.needleHeadColour;if(this.dimensions.clipped){let s="13,0 4,-5 4,5 13,0 8,0 0,-5 0,5 8,0";null!=this.dataPoint.value&&this.dataPoint.value<0&&(s="0,0 9,-5 9,5 0,0 5,0 13,-5 13,5 5,0"),this.barGroup.polygon(s).fill(t).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(t).stroke(i)}else this.barGroup.rect(2*this.position.getNeedleWidth(),2*this.position.getNeedleWidth()).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(s).stroke(e)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadXPosition(){let t=this.dimensions.xPos;return null!=this.dataPoint.value&&this.dataPoint.value>0&&(t+=this.dimensions.barLength),t}}class Ct{constructor(t,i,s,e,h,n,r,a,o,l,c){this.hasData=!1,this.position=t,this.styles=i,this.dataPoint=s,this.index=e,this.baselineValue=h,this.segmentIndex=r,this.stackMode=a,this.totalValue=o,this.group=c,this.barGroup=c.group().id(`stacked_bar_${e}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new I){if(!this.hasData||null==this.dataPoint.value)return;const s=this.dataPoint.value,e=this.dataPoint.pixelPerUnit,h=this.position.getBarPositionX(),n=this.position.getBarWidth();let r,a;if(this.stackMode===C.RELATIVE){const t=e;r=(0!==this.totalValue?Math.abs(s)/Math.abs(this.totalValue):0)*t,a=h+this.baselineValue/Math.abs(this.totalValue)*t}else r=Math.abs(s*e),a=h+this.baselineValue*e;const o=this.position.getBarPositionY(this.index,!0),l=this.styles.stackColors,c=l[this.segmentIndex%l.length],d={color:c},u={color:c,width:.5};this.barGroup.rect(Math.max(r,.5),n).fill(d).stroke(u).cy(o).x(a);const p=r-6;if(p>0){const e=a+r/2;if(this.stackMode===C.RELATIVE||this.stackMode===C.ABSOLUTE_RELATIVE){const i=(0!==this.totalValue?s/this.totalValue*100:0).toFixed(t.percent)+"%";new Ot(this.group,e,o,"STACK_SEG",i,this.styles,vt.Center,vt.Center).setSegmentFill(c).setMaxWidth(p).draw()}else new Ot(this.group,e,o,"STACK_SEG",s,this.styles,vt.Center,vt.Center).setSegmentFill(c).setMaxWidth(p).draw(t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new I){if(this.stackMode===C.RELATIVE)return;const s=this.position.getBarPositionX()+this.totalValue*this.dataPoint.pixelPerUnit+this.position.spacings.labelToBar,e=this.position.getBarPositionY(this.index,!0);new Ot(this.group,s,e,"STACK_TOTAL",this.totalValue,this.styles,vt.Center,vt.Left).draw(t,i)}}class At{constructor(t,i,s,e,h){this.overflowConfig=null,this.i18n=h;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=e}setOverflowConfig(t){this.overflowConfig=t}isLastDataPoint(t){return this.elementCnt-1===t}isFirsttDataPoint(t){return 0===t}createPrimaryBar(t,i){var s,e,h,n;const r=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===e?void 0:e.group().id(""+i),a=null===(n=null===(h=this.svgGroups)||void 0===h?void 0:h.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let o=null;return this.isLastDataPoint(i)&&(o=`${this.i18n.get(t.scenario)||t.scenario}`),new Mt(this.position,this.styles,t,i,!0,r,o,this.overflowConfig).updateLabelGroup(a)}createVarianceBar(t,i){var s,e,h,n;const r=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===e?void 0:e.group().id(""+i),a=null===(n=null===(h=this.svgGroups)||void 0===h?void 0:h.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let o=null;return this.isLastDataPoint(i)&&(o=`${this.i18n.get(t.scenario)||t.scenario}`),new Mt(this.position,this.styles,t,i,!0,r,o,this.overflowConfig).updateLabelGroup(a).setAsVariance()}createRelativeVarianceBar(t,i){var s,e,h,n;const r=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===e?void 0:e.group().id(""+i),a=null===(n=null===(h=this.svgGroups)||void 0===h?void 0:h.scenario1Label)||void 0===n?void 0:n.group().id(""+i);return new Rt(this.position,this.styles,t,i,r).updateLabelGroup(a)}createSecondaryBar(t,i){var s,e;const h=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario2)||void 0===e?void 0:e.group().id(""+i);let n=null;return this.isFirsttDataPoint(i)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new Mt(this.position,this.styles,t,i,!1,h,n,this.overflowConfig)}createPrimaryMarker(t,i){var s,e;const h=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario3)||void 0===e?void 0:e.group().id(""+i),n=this.styles.pattern.get("marker-down")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isFirstDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new Tt(this.position,h,n,t.scenario,this.styles,t,i,r,!0)}createSecondaryMarker(t,i){var s,e;const h=null===(e=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario4)||void 0===e?void 0:e.group().id(""+i),n=this.styles.pattern.get("marker-up")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isLastDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new Tt(this.position,h,n,t.scenario,this.styles,t,i,r,!1)}isFirstDataPoint(t){return 0===t}}class $t{constructor(t,i,s){this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new bt(0,ft.AC1,1,ft.NEU),this.highestDataPointValue=new bt(0,ft.AC1,1,ft.NEU),this.smallestVarianceDataPointValue=new bt(0,ft.AC1,1,ft.NEU),this.highestVarianceDataPointValue=new bt(0,ft.AC1,1,ft.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideCategories=!1,this.axisScenario=ft.AC1,this.CSS_CATEGORIES="categories",this.preparedDataSet=[],this.state=ut.DIRTY,this.titleLength=0,this.leftSideOffsetForHorizontalSync=0,this.limit=0,this.measureScale=new I,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.overflowConfig=null,this.highestStackedTotal=0,this.initSQLFunctions(),this.ruleSet=t||new it,this.i18n=this.createI18n(new Map),this.styles=s,this.setConfig(i),this.position=this.createElementPosition()}updatePosition(){this.position=this.createElementPosition()}createElementPosition(){this.titleLength=this.calculateTitleLength(0);let t=this.calculateLeftSideWidth(this.getVarianceType());const i=this.calculateCategoryWidth();return this.titleLength>t&&(t=this.titleLength),new ot(new lt(this.styles.padding),this.styles.scaleFactors,this.styles.fontStyles.size,this.dataModel.length,this.leftSideOffsetForHorizontalSync,this.titleLength,t,i)}initSQLFunctions(){q.fn.transformOperator=function(t){return"-"===t?-1:1}}setStyles(t){this.styles=t}setConfig(t){var i;this.state=ut.DIRTY,this.sortScenariosbyVisualisationRules(t),this.hideCategories=t.hideCategories||!1,this.limit=t.limit,this.pixelPerUnit=t.pixelPerUnit||1,this.pixelPerPercentage=t.pixelPerPercentage||100,this.setData([...t.data],t.filter),this.dataModel=this.populateModel(t.scenarios,t.level,t.sortOrder),t.stackConfig&&t.stackConfig.by!==T.SCENARIOS&&this.populateDimensionStackSegments(t.scenarios,t.stackConfig,t.level),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||Q.translateScenarioLabel(null===(i=null==t?void 0:t.variances)||void 0===i?void 0:i.toString(),this.i18n),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.stackConfig=t.stackConfig,this.highestStackedTotal=this.findHighestStackedRowTotal(this.dataModel),this.updatePosition()}sortScenariosbyVisualisationRules(t){const i=this;t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))).reverse()}setI18n(t){this.i18n=this.createI18n(t)}createI18n(t){this.state=ut.DIRTY;const i=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...i,...t])}setData(t,i){if(null!=t)if(this.state=ut.DIRTY,this.preparedDataSet.length=0,null!=i&&i.length>0)try{this.preparedDataSet=q(`SELECT * FROM ? WHERE ${i}`,[t])}catch(s){console.error("StructureChart: filter query failed, using unfiltered data",i,s),this.preparedDataSet=t}else this.preparedDataSet=t}getMaxBarValue(){var t,i;if(null!=this.stackConfig&&this.highestStackedTotal>0)return this.stackConfig.mode===C.RELATIVE?1:this.highestStackedTotal;const s=this.getVarianceType();return s===pt.NONE&&null!=(null===(t=this.highestDataPointValue)||void 0===t?void 0:t.value)?Math.abs(this.highestDataPointValue.value):s===pt.ABSOLUTE&&null!=(null===(i=this.highestVarianceDataPointValue)||void 0===i?void 0:i.value)?Math.abs(this.highestVarianceDataPointValue.value):0}getAllocatedCanvasWidth(){const t=this.position.getAxisPositionX(),i=this.calculateRightSideWidth(this.getVarianceType());let s=t+i+ +this.styles.padding.left+this.styles.padding.right;return i<this.titleLength/2&&(s+=this.titleLength/2),t<this.titleLength/2&&(s+=this.titleLength/2),s}getAllocatedCanvasHeight(){return(this.dataModel.length+1)*this.position.spacings.categoryWidth+this.styles.padding.top+this.styles.padding.bottom}patternToString(){return"<svg></svg>"}toString(){const t=new U;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===ut.DIRTY&&(this.state=ut.UP_TO_DATE),this.variancesDataModel&&this.variancesDataModel.length>0?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}setPattern(t,i){this.styles.pattern.set(t,i)}calculateTitleLength(t){const i=J(this.title.length>7?this.title:"_______",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return i<t?t:i/2}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":Q.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}setAxisScenario(t){let i=ft.AC1;if(null!=t&&t.length>0){const s=new Z(t.toString());s.isValid&&(i=s.delta)}return null===i&&(i=ft.AC1),i}populateModel(t,i,s){var e;if(0===(null===(e=this.preparedDataSet)||void 0===e?void 0:e.length))return[];const h=[],n=this.createOrderStr(i,s),r=this.createSelectString(i,s),a=this.createGroupByStr(i,s),o=q(`SELECT ${r} ${t.length>0?","+t.map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(","):""} \n FROM ?\n GROUP BY ${a}\n ORDER BY ${n}`,[this.preparedDataSet]);return this.detectNaNCells(t,o),this.createDataRows(o,h,t),this.crateRESTRow(o,t,h),h}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new Z(t);!0===s.isValid?0!==i[s.base+"_cnt"]&&0!==i[s.delta+"_cnt"]||(i[t]=Number.NaN):0===i[t+"_cnt"]&&(i[t]=Number.NaN)})),i)))}crateRESTRow(t,i,s){if(0===this.limit||this.limit>t.length)return;const e=[],h=t.slice(this.limit,t.length);this.createDataRows(h,e,i);const n=e.reduce((function(t,s){return{id:t.id,category:t.category,type:t.type,scenario1:new bt(t.scenario1.value+s.scenario1.value,i[0],t.scenario1.pixelPerUnit,ft.NEU),scenario2:new bt(t.scenario2.value+s.scenario2.value,i[1],t.scenario2.pixelPerUnit,ft.NEU),scenario3:new bt(t.scenario3.value+s.scenario3.value,i[2],t.scenario3.pixelPerUnit,ft.NEU),scenario4:new bt(t.scenario4.value+s.scenario4.value,i[3],t.scenario4.pixelPerUnit,ft.NEU)}}),{id:9999,category:"REST",type:pt.NONE,scenario1:new bt(0,i[0],this.pixelPerUnit,ft.NEU),scenario2:new bt(0,i[1],this.pixelPerUnit,ft.NEU),scenario3:new bt(0,i[2],this.pixelPerUnit,ft.NEU),scenario4:new bt(0,i[3],this.pixelPerUnit,ft.NEU)});s.push(n)}createDataRows(t,i,s){let e=t;this.limit>0&&(e=t.slice(0,this.limit)),e.forEach(((t,e)=>{i.push({id:e,category:t.category,type:pt.NONE,scenario1:new bt(t[s[0]],s[0],this.pixelPerUnit,ft.NEU),scenario2:new bt(t[s[1]],s[1],this.pixelPerUnit,ft.NEU),scenario3:new bt(t[s[2]],s[2],this.pixelPerUnit,ft.NEU),scenario4:new bt(t[s[3]],s[3],this.pixelPerUnit,ft.NEU)})}))}createOrderStr(t,i){let s=`${t.toLowerCase()}`;return i.hierarchy.length>=1&&(s=`${i.hierarchy.toString()} ${null==i?void 0:i.direction}`),s}createSelectString(t,i){return t===O.CATEGORY&&i.hierarchy.includes(M.CATEGORYINDEX)?`${M.CATEGORYINDEX}, ${O.CATEGORY} as category`:t===O.ROWGROUP&&i.hierarchy.includes(M.ROWGROUPINDEX)?`${M.ROWGROUPINDEX}, ${O.ROWGROUP} as category`:t===O.SUBCATEGORY&&i.hierarchy.includes(M.SUBCATEGORYINDEX)?`${M.SUBCATEGORYINDEX}, ${O.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,i){return t===O.CATEGORY&&i.hierarchy.includes(M.CATEGORYINDEX)?`${M.CATEGORYINDEX}, ${O.CATEGORY}`:t===O.ROWGROUP&&i.hierarchy.includes(M.ROWGROUPINDEX)?`${M.ROWGROUPINDEX}, ${O.ROWGROUP}`:t===O.SUBCATEGORY&&i.hierarchy.includes(M.SUBCATEGORYINDEX)?`${M.SUBCATEGORYINDEX}, ${O.SUBCATEGORY}`:`${t.toString()}`}calculateCategoryWidth(){if(this.hideCategories)return 5;let t=0;for(const i of this.dataModel){const s=J(i.category,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"});s.width>t&&(t=s.width)}return 1.1125*t}findSmallestDataPointValue(t){let i=new bt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value<i.value&&(i=t);return i}findHighestDataPointValue(t){let i=new bt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value>i.value&&(i=t);return i}findHighestStackedRowTotal(t){if(!this.stackConfig||0===t.length)return 0;const i=this.stackConfig.by===T.SCENARIOS;let s=0;for(const e of t){let t=0;if(i){const i=["scenario1","scenario2","scenario3","scenario4"],s=[];for(const t of i){const i=e[t];i&&!i.isEmpty()&&null!=i.value&&s.push({value:i.value,scenario:i.scenario})}if(new Set(s.map((t=>Y(t.scenario)))).size>1){const i=new Map;for(const t of s){const s=Y(t.scenario);i.set(s,(i.get(s)||0)+Math.abs(t.value))}t=Math.max(...i.values())}else t=s.reduce(((t,i)=>t+Math.abs(i.value)),0)}else e.stackSegments&&e.stackSegments.length>0&&(t=e.stackSegments.reduce(((t,i)=>t+Math.abs(i.value)),0));t>s&&(s=t)}return s}populateVarianceModel(t,i){const s=[];if(0===t.length)return s;let e=null;null!=i&&i.length>0&&(e=i[0]);for(const h in t){const n=new Z(t[h]);if(n.isValid){const t=this.mapScenarios(n,e),h=n.direction;let r=this.pixelPerUnit;"dr"===n.type&&(r=this.pixelPerPercentage);for(const e in i)s.push({id:Number(e),category:i[e].category,type:"dr"===n.type?pt.RELATIVE:pt.ABSOLUTE,scenario1:new bt(this.calculateVariance(n,i[e],t),n.base,r,h),scenario2:new bt(null,null,null,null),scenario3:new bt(null,null,null,null),scenario4:new bt(null,null,null,null)})}}return s}calculateVariance(t,i,s){const e=s.get(t.base),h=s.get(t.delta);return null==e||null==h?null:t.type===pt.RELATIVE?(i[e].value-i[h].value)/i[h].value:i[e].value-i[h].value}mapScenarios(t,i){const s=new Map;return null==i||["scenario1","scenario2","scenario3","scenario4"].forEach((e=>{i[e].scenario===t.delta?s.set(t.delta,e):i[e].scenario===t.base&&s.set(t.base,e)})),s}calculateTextBoxWidth(t){return J(Q.number(t,"decimal",1,0),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}calculatePercentageTextBoxWidth(t){let i=0;return t>=0&&(i+=J("+",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width),i+=J(" %",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,J(Q.number(t,"decimal",1,1),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width+i+i}cleanSVGforRedraw(t){t.clear()}drawAxisAndLabels(t,i){const s=i.group().id("AxisAndDateLables");let e=!1;this.hideCategories||t.forEach(((t,i)=>{t.type===pt.RELATIVE&&(e=!0);let h=vt.Right,n=!0;t.scenario1.value<0&&(h=vt.Left,n=!1),new Ot(s,this.position.getCategoryPositionX(n),this.position.getBarCenterPositionY(i),"",t.category,this.styles,vt.Center,h).draw()})),new _t({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,s,this.styles).draw()}drawScenarios(t,i){const s=i.group().id("Scenarios"),e=new At(this.position,s,this.styles,t.length,this.i18n);e.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{e.createPrimaryBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale),e.createSecondaryBar(t.scenario2,i).draw(),e.createPrimaryMarker(t.scenario3,i).draw(),e.createSecondaryMarker(t.scenario4,i).draw()}))}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),e=new At(this.position,s,this.styles,t.length,this.i18n);return e.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===pt.RELATIVE?e.createRelativeVarianceBar(t.scenario1,i).draw():e.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),s}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),e=this.stackConfig.by===T.SCENARIOS;t.forEach(((t,i)=>{const h=["scenario1","scenario2","scenario3","scenario4"],n=[];if(e)for(const i of h){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((e?new Set(n.map((t=>Y(t.scenario)))):new Set).size>1){const t=new Map;for(const i of n){const s=Y(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const e=[];for(const i of H)t.has(i)&&(e.push({prefix:i,segments:t.get(i)}),t.delete(i));for(const[i,s]of t)e.push({prefix:i,segments:s});e.forEach(((t,h)=>{const n=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),r=e.length-1-h;let a=0,o=null;t.segments.forEach((t=>{const e=new Ct(this.position,this.styles,t.dataPoint,i,a,t.scenario,r,this.stackConfig.mode,n,!0,s);e.draw(this.dataFormatDigits,this.measureScale),a+=Math.abs(t.value),o=e})),o&&o.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{let h=n;!e&&t.stackSegments&&t.stackSegments.length>0&&(h=t.stackSegments.map((t=>({value:t.value,scenario:t.label,dataPoint:t.dataPoint})))),"asc"===this.stackConfig.order?h.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&h.sort(((t,i)=>i.value-t.value));const r=h.reduce(((t,i)=>t+Math.abs(i.value)),0);let a=0,o=null;h.forEach(((t,h)=>{const n=new Ct(this.position,this.styles,t.dataPoint,i,a,t.scenario,h,this.stackConfig.mode,r,e,s);n.draw(this.dataFormatDigits,this.measureScale),a+=Math.abs(t.value),o=n})),o&&o.drawTotalLabel(this.dataFormatDigits,this.measureScale)}}))}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;const s=this.stackConfig.by===T.SCENARIOS,e=i.group().id("StackedHeaders"),h=t[0];if(!s){const t=h.stackSegments;if(!t||0===t.length)return;const i=[...t];"asc"===this.stackConfig.order?i.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&i.sort(((t,i)=>i.value-t.value));const s=i.reduce(((t,i)=>t+Math.abs(i.value)),0),n=this.position.getBarPositionX(),r=this.position.getAxisTitlePositionY();let a=0;return void i.forEach((t=>{const i=t.dataPoint.pixelPerUnit;let h;h=this.stackConfig.mode===C.RELATIVE?(0!==s?Math.abs(t.value)/s:0)*i:Math.abs(t.value*i);const o=n+a+h/2,l=this.i18n.get(t.label)||t.label;new Ot(e,o,r,"STACK_HEADER",l,this.styles,vt.Bottom,vt.Center).draw(),a+=h}))}const n=["scenario1","scenario2","scenario3","scenario4"],r=[];for(const t of n){const i=h[t];i&&!i.isEmpty()&&null!=i.value&&r.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===r.length)return;const a=new Set(r.map((t=>Y(t.scenario)))),o=this.position.getBarPositionX(),l=this.position.getAxisTitlePositionY();if(a.size>1){const t=new Map;for(const i of r){const s=Y(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const i=[];for(const s of H)t.has(s)&&(i.push({prefix:s,segments:t.get(s)}),t.delete(s));for(const[s,e]of t)i.push({prefix:s,segments:e});i.forEach((t=>{const i=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),s=t.segments[0].dataPoint.pixelPerUnit,h=o+(this.stackConfig.mode===C.RELATIVE?s:i*s)/2,n=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new Ot(e,h,l,"STACK_HEADER",n,this.styles,vt.Bottom,vt.Center).draw()}))}else{"asc"===this.stackConfig.order?r.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&r.sort(((t,i)=>i.value-t.value));const t=r.reduce(((t,i)=>t+Math.abs(i.value)),0);let i=0;r.forEach((s=>{const h=s.dataPoint.pixelPerUnit;let n;n=this.stackConfig.mode===C.RELATIVE?(0!==t?Math.abs(s.value)/t:0)*h:Math.abs(s.value*h);const r=o+i+n/2,a=this.i18n.get(s.scenario)||s.scenario;new Ot(e,r,l,"STACK_HEADER",a,this.styles,vt.Bottom,vt.Center).draw(),i+=n}))}}getVarianceType(){return this.variancesDataModel.length>0?this.variancesDataModel[0].type:pt.NONE}calculateLeftSideWidth(t){var i,s,e;let h=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(pt.NONE===t&&null!=(null===(i=this.smallestDataPointValue)||void 0===i?void 0:i.value)&&this.smallestDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestDataPointValue.value);h=Math.abs(this.smallestDataPointValue.getScaledUnit())+n+t}else if(pt.RELATIVE===t&&null!=(null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculatePercentageTextBoxWidth(this.smallestVarianceDataPointValue.value);h=Math.abs(this.smallestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(pt.ABSOLUTE===t&&null!=(null===(e=this.smallestVarianceDataPointValue)||void 0===e?void 0:e.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestVarianceDataPointValue.value);h=Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())+n+t}return h<=this.titleLength?this.titleLength:h}calculateRightSideWidth(t){var i,s,e;if(null!=this.stackConfig&&this.highestStackedTotal>0){const t=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;let i;i=this.stackConfig.mode===C.RELATIVE?this.pixelPerUnit:this.highestStackedTotal*this.pixelPerUnit;const s=this.calculateTextBoxWidth(this.highestStackedTotal);return Math.max(i+t+s,this.titleLength)}let h=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(pt.NONE===t&&null!=(null===(i=this.highestDataPointValue)||void 0===i?void 0:i.value)&&this.highestDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestDataPointValue.value);h=Math.abs(this.highestDataPointValue.getScaledUnit())+n+t}else if(pt.RELATIVE===t&&null!=(null===(s=this.highestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculatePercentageTextBoxWidth(this.highestVarianceDataPointValue.value);h=Math.abs(this.highestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(pt.ABSOLUTE===t&&null!=(null===(e=this.highestVarianceDataPointValue)||void 0===e?void 0:e.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestVarianceDataPointValue.value);h=Math.abs(this.highestVarianceDataPointValue.getScaledUnit())+n+t}return h<=this.titleLength?this.titleLength:h}populateDimensionStackSegments(t,i,s){var e;if(0===(null===(e=this.preparedDataSet)||void 0===e?void 0:e.length)||0===t.length)return;const h={[O.ROWGROUP]:"category",[O.ROWGROUPINDEX]:"category",[O.CATEGORY]:"subCategory",[O.CATEGORYINDEX]:"subCategory"}[s];if(!h)return;const n=s.toString(),r=t[0],a=q(`SELECT [${n}] as displayGroup, [${h}] as stackLabel, SUM([${r}] * transformOperator(operation)) as stackValue FROM ? GROUP BY [${n}], [${h}]`,[this.preparedDataSet]),o=new Map;for(const t of a){const i=t.displayGroup;o.has(i)||o.set(i,[]),null!=t.stackValue&&null!=t.stackLabel&&o.get(i).push({label:t.stackLabel,value:t.stackValue})}for(const t of this.dataModel){const i=o.get(t.category);t.stackSegments=i&&i.length>0?i.map((t=>({label:t.label,value:t.value,dataPoint:new bt(t.value,r,this.pixelPerUnit,ft.NEU)}))):[]}}hasNoData(){return 0===this.dataModel.length}setAvailableWidth(t){if(this.pixelPerUnit<=0||t<=0)this.overflowConfig=null;else if(null==this.stackConfig){if(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig){const{cutWidth:t,overdriveZoneWidth:i,breakGap:s}=this.overflowConfig,e=t+i+s;this.variancesDataModel&&this.variancesDataModel.length>0?(this.highestVarianceDataPointValue.getScaledUnit()>t&&(this.highestVarianceDataPointValue=new bt(e,this.highestVarianceDataPointValue.scenario,1,this.highestVarianceDataPointValue.variance)),null!=this.smallestVarianceDataPointValue.value&&Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())>t&&(this.smallestVarianceDataPointValue=new bt(-e,this.smallestVarianceDataPointValue.scenario,1,this.smallestVarianceDataPointValue.variance))):(this.highestDataPointValue.getScaledUnit()>t&&(this.highestDataPointValue=new bt(e,this.highestDataPointValue.scenario,1,this.highestDataPointValue.variance)),null!=this.smallestDataPointValue.value&&Math.abs(this.smallestDataPointValue.getScaledUnit())>t&&(this.smallestDataPointValue=new bt(-e,this.smallestDataPointValue.scenario,1,this.smallestDataPointValue.variance))),this.updatePosition()}}else this.overflowConfig=null}calculateOverflowConfig(t){const i=this.variancesDataModel&&this.variancesDataModel.length>0;if(this.getVarianceType()===pt.RELATIVE)return null;const s=i?this.highestVarianceDataPointValue:this.highestDataPointValue,e=i?this.smallestVarianceDataPointValue:this.smallestDataPointValue,h=s.getScaledUnit(),n=null!=e.value?Math.abs(e.getScaledUnit()):0,r=Math.max(h,n);if(r<=0)return null;const a=this.styles.fontStyles.size,o=a*this.styles.scaleFactors.labelToBar,l=1.5*a,c=.3*a,d=.8*a,u=t-this.position.getAxisPositionX()-this.styles.padding.left-this.styles.padding.right-o-this.calculateTextBoxWidth(s.value||0)-l-c;if(u<=d)return null;const p=u-d;return r<=p?null:{cutWidth:u,overdriveZoneWidth:l,breakGap:c,maxOverflow:r-p,scenarioCutOffset:d}}}const Et=class{constructor(i){t(this,i),this.data=[],this.chartTitle="",this.scenarios=[],this.variances=[],this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.i18n=new Map,this.order={hierarchy:[],direction:_.ASC},this.level=O.CATEGORY,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.parentDimensions={width:0,height:0}}render(){var t,e,h;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===(e=this.chart)||void 0===e?void 0:e.getFooter()),i("div",{innerHTML:null===(h=this.chart)||void 0===h?void 0:h.toString()}))}async componentWillLoad(){var t;const i=this.prepareConfig(),s=this.prepareStyle();this.chart=new $t(new it,i,s),this.chart.setI18n(this.i18n),this.autoFitScaling(i,s),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new dt(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}async componentWillUpdate(){var t;if(null==this.chart)return;const i=this.prepareConfig(),s=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(s),this.chart.setConfig(i),this.autoFitScaling(i,s),this.chart.setAvailableWidth((null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new dt(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}autoFitScaling(t,i){var s;if(t.pixelPerUnit>0)return;const e=null===(s=this.parentDimensions)||void 0===s?void 0:s.width;if(!e||e<=0)return t.pixelPerUnit=1,this.chart=new $t(new it,t,i),void this.chart.setI18n(this.i18n);t.pixelPerUnit=1,this.chart=new $t(new it,t,i),this.chart.setI18n(this.i18n),this.chart.toString();const h=this.chart.getAllocatedCanvasWidth();if(h<=0)return;const n=this.chart.getMaxBarValue();t.pixelPerUnit=n>0?Math.max(.001,(e-(h-n))/n):.9*e/h,this.chart=new $t(new it,t,i),this.chart.setI18n(this.i18n)}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new wt(new St,new E(new tt),new tt,new K,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideCategories:this.hideCategories,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,limit:this.limit,sortOrder:this.order,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,stackConfig:this.stackConfig})}prepareStyle(){return new Pt(new Lt,new V,new z(new X),new F(new X),new G).adapt(this.styles)}get element(){return e(this)}};Et.style=':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';export{st as bn_chart_structure,et as bn_context,ht as bn_datasource,at as bn_page,Et as ibcs_chart_structure}
@@ -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}
@@ -0,0 +1 @@
1
+ function a(a){for(var c,e=0,r=0,s=a.length;s>=4;++r,s-=4)c=1540483477*(65535&(c=255&a.charCodeAt(r)|(255&a.charCodeAt(++r))<<8|(255&a.charCodeAt(++r))<<16|(255&a.charCodeAt(++r))<<24))+(59797*(c>>>16)<<16),e=1540483477*(65535&(c^=c>>>24))+(59797*(c>>>16)<<16)^1540483477*(65535&e)+(59797*(e>>>16)<<16);switch(s){case 3:e^=(255&a.charCodeAt(r+2))<<16;case 2:e^=(255&a.charCodeAt(r+1))<<8;case 1:e=1540483477*(65535&(e^=255&a.charCodeAt(r)))+(59797*(e>>>16)<<16)}return(((e=1540483477*(65535&(e^=e>>>13))+(59797*(e>>>16)<<16))^e>>>15)>>>0).toString(36)}export{a as m}
@@ -0,0 +1 @@
1
+ import{g as n,r as e}from"./p-DvvwfRQG.js";var s,o;!function(n){n[n.RUNNING=0]="RUNNING",n[n.SUCCESSFUL=1]="SUCCESSFUL",n[n.ERROR=2]="ERROR"}(s||(s={})),function(n){let e;const o=new Map,r={running:0,successful:0,error:0},t=n=>{switch(n){case s.RUNNING:return"running";case s.SUCCESSFUL:return"successful";default:return"error"}};n.updateStatus=(s,c)=>{e&&clearTimeout(e);const u=o.get(s);void 0!==u&&r[t(u)]--,r[t(c)]++,o.set(s,c),e=setTimeout((()=>{window.componentRegisterIsRenderedResult=n.componentRegisterIsRendered(),console.log("componentRegisterIsRendered:",window.componentRegisterIsRenderedResult)}),500)},n.componentRegisterIsRendered=()=>0===r.running,n.componentRegisterStatus=()=>Object.assign({},r)}(o||(o={}));const r=r=>{const t=n(),c=r.connectedCallback;r.connectedCallback=()=>{o.updateStatus(t,s.RUNNING),e(c,r)};const u=r.componentWillRender;r.componentWillRender=()=>{o.updateStatus(t,s.RUNNING),e(u,r)};const i=r.componentDidRender;r.componentDidRender=()=>{o.updateStatus(t,s.SUCCESSFUL),e(i,r)}};export{r as w}
@@ -0,0 +1 @@
1
+ import{g as t,c as s}from"./p-CL1RYuNU.js";import{g as e,f as r}from"./p-JNHhIe7t.js";import{r as a}from"./p-DvvwfRQG.js";const n=n=>{let o,i,l;const u=new MutationObserver((t=>{t.forEach((t=>{"namespace"===t.attributeName&&(i=e(n).getAttribute("namespace"),r(n))}))})),m=n.connectedCallback;n.connectedCallback=()=>{const s=e(n);l=t(s),u.observe(s,{attributes:!0,attributeFilter:["namespace"]}),i=e(n).getAttribute("namespace"),o=l.internationalization.on("set",(t=>{t===i&&r(n)})),a(m,n)};const p=n.disconnectedCallback;return n.disconnectedCallback=()=>{u.disconnect(),a(o),s(e(n)),a(p,n)},{t:(t,s)=>{var r,a;t.startsWith(".")&&(t=e(n).localName+t);const o=l.internationalization.state,u=l.context.state.locale;let m=i;return null==(null===(a=null===(r=o[m])||void 0===r?void 0:r[u])||void 0===a?void 0:a[t])&&(m="_system"),o[m][u][t].replace(/{{([\s\S]+?)}}/g,((t,e)=>{var r;return null!==(r=null==s?void 0:s[e.trim()])&&void 0!==r?r:""}))}}};export{n as w}
@@ -1 +1 @@
1
- import{D as t}from"./p-sqjrku2z.js";var e,s;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(e||(e={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(s||(s={}));class r{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW yyyy",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t}setDateFormatShort(t){this.dateFormatShort=t}setLocale(t){this.locale=t}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,s){switch(s){case e.DAY:return this.getFormatedDayDate(t);case e.MONTH:return this.getFormatedMonthDate(t);case e.QUARTER:return this.getFormatedQuarterDate(t);case e.WEEK:return this.getFormatedWeekDate(t);case e.HOUR:return this.getFormatedHourDate(t);case e.MINUTE:return this.getFormatedMinuteDate(t);case e.SECOND:return this.getFormatedSecondDate(t);case e.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,s)}}calculateDistanceType(s,r,i=32){if(null==r)return e.DAY;const a="number"==typeof s?t.fromMillis(s):s,n="number"==typeof r?t.fromMillis(r):r;return 0===n.diff(a).as("milliseconds")?e.DAY:n.diff(a).as("milliseconds")<i?e.MILLISECOND:n.diff(a).as("seconds")<i?e.SECOND:n.diff(a).as("minutes")<i?e.MINUTE:n.diff(a).as("hours")<i?e.HOUR:n.diff(a).as("days")<i?e.DAY:n.diff(a).as("weeks")<i?e.WEEK:n.diff(a).as("months")<i?e.MONTH:n.diff(a).as("quarters")<i?e.QUARTER:e.YEAR}datesBetween(t,e,s,r){const i=this.convertDateDistanceToMomentunitOfTime(s),a=t.startOf(i),n=e.endOf(i);let h=n.diff(a).as(i);const u=[];h>=r&&(h=r);let o=a;do{u.push(o),o=o.plus(this.createDiratonLike(i,1))}while(o<=n&&u.length<h);return u}getDateLinkString(r,i,a,n,h){if(null==r&&null==i)return"";if(null==r&&a!==s.END&&a!==s.YTD)return"";if(null==i&&(s.INTERVAL===a||s.CUM===a||s.END===a||s.YTD===a))return"";const u=r||t.now(),o=i;n===e.AUTO&&(n=this.calculateDistanceType(u,o,h));let c=this.getDateString(u,n),l="",d=s.NONE;return null!=o&&(l=this.getDateString(o,n),d=s.INTERVAL,c===l&&a===s.INTERVAL&&(a=s.NONE),c===l&&a===s.AVG&&(d=s.NONE),s.END!==a&&s.YTD!==a||(c=l),(a===s.INTERVAL||a===s.CUM||s.AVG)&&(n===e.QUARTER?u.quarter===o.quarter&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.MONTH?u.month===o.month&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.WEEK&&(u.weekNumber===o.weekNumber&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,""))))),this.dateLinkFormat[a].replace("[LINK]",this.dateLinkFormat[d]).replace("[DATE]",c).replace("[DATE2]",l)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let s;switch(t){case e.YEAR:s="year";break;case e.MONTH:s="month";break;case e.QUARTER:s="quarter";break;case e.WEEK:s="week";break;case e.DAY:s="day";break;case e.HOUR:s="hour";break;case e.MINUTE:s="minute";break;case e.SECOND:s="second";break;case e.MILLISECOND:s="millisecond";break;default:s="day"}return s}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}export{e as D,s as a,r as b}
1
+ import{D as t}from"./p-Bnhh02CF.js";var e,s;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(e||(e={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(s||(s={}));class r{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW yyyy",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t}setDateFormatShort(t){this.dateFormatShort=t}setLocale(t){this.locale=t}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,s){switch(s){case e.DAY:return this.getFormatedDayDate(t);case e.MONTH:return this.getFormatedMonthDate(t);case e.QUARTER:return this.getFormatedQuarterDate(t);case e.WEEK:return this.getFormatedWeekDate(t);case e.HOUR:return this.getFormatedHourDate(t);case e.MINUTE:return this.getFormatedMinuteDate(t);case e.SECOND:return this.getFormatedSecondDate(t);case e.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,s)}}calculateDistanceType(s,r,i=32){if(null==r)return e.DAY;const a="number"==typeof s?t.fromMillis(s):s,n="number"==typeof r?t.fromMillis(r):r;return 0===n.diff(a).as("milliseconds")?e.DAY:n.diff(a).as("milliseconds")<i?e.MILLISECOND:n.diff(a).as("seconds")<i?e.SECOND:n.diff(a).as("minutes")<i?e.MINUTE:n.diff(a).as("hours")<i?e.HOUR:n.diff(a).as("days")<i?e.DAY:n.diff(a).as("weeks")<i?e.WEEK:n.diff(a).as("months")<i?e.MONTH:n.diff(a).as("quarters")<i?e.QUARTER:e.YEAR}datesBetween(t,e,s,r){const i=this.convertDateDistanceToMomentunitOfTime(s),a=t.startOf(i),n=e.endOf(i);let h=n.diff(a).as(i);const u=[];h>=r&&(h=r);let o=a;do{u.push(o),o=o.plus(this.createDiratonLike(i,1))}while(o<=n&&u.length<h);return u}getDateLinkString(r,i,a,n,h){if(null==r&&null==i)return"";if(null==r&&a!==s.END&&a!==s.YTD)return"";if(null==i&&(s.INTERVAL===a||s.CUM===a||s.END===a||s.YTD===a))return"";const u=r||t.now(),o=i;n===e.AUTO&&(n=this.calculateDistanceType(u,o,h));let c=this.getDateString(u,n),l="",d=s.NONE;return null!=o&&(l=this.getDateString(o,n),d=s.INTERVAL,c===l&&a===s.INTERVAL&&(a=s.NONE),c===l&&a===s.AVG&&(d=s.NONE),s.END!==a&&s.YTD!==a||(c=l),(a===s.INTERVAL||a===s.CUM||s.AVG)&&(n===e.QUARTER?u.quarter===o.quarter&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.MONTH?u.month===o.month&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.WEEK&&(u.weekNumber===o.weekNumber&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,""))))),this.dateLinkFormat[a].replace("[LINK]",this.dateLinkFormat[d]).replace("[DATE]",c).replace("[DATE2]",l)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let s;switch(t){case e.YEAR:s="year";break;case e.MONTH:s="month";break;case e.QUARTER:s="quarter";break;case e.WEEK:s="week";break;case e.DAY:s="day";break;case e.HOUR:s="hour";break;case e.MINUTE:s="minute";break;case e.SECOND:s="second";break;case e.MILLISECOND:s="millisecond";break;default:s="day"}return s}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}export{e as D,s as a,r as b}
@@ -0,0 +1 @@
1
+ import{m as t}from"./p-BYBpC0EO.js";import{h as n,i as r,j as s,a as e,O as a,A as o,e as i,d as u,k as c,M as l,T as f}from"./p-Bnhh02CF.js";import{D as m,a as d}from"./p-Bhd_WSML.js";import{f as N,g as p}from"./p-JNHhIe7t.js";import{r as v}from"./p-DvvwfRQG.js";function h(t){return null==t||""===t||"null"===t}function b(t){return h(t)||"auto"===t.trim().toLowerCase()?[]:y((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in n)))).toString())}function y(t){return h(t)?[]:t.replace(";",",").split(",").filter((t=>{var s,e,a;const o=t.split("_"),i=null===(s=o[0])||void 0===s?void 0:s.replace(/^dr|^d/,"").toUpperCase().trim(),u=null===(e=o[1])||void 0===e?void 0:e.toUpperCase().trim(),c=null===(a=o[2])||void 0===a?void 0:a.toUpperCase().trim();return 3!==o.length||!(i in n)||!(u in n)||!(c in r)}))}function g(t){return h(t)||"auto"===t.trim().toLowerCase()?[]:y(t.split(",").filter((t=>!(t.toUpperCase()in e))).toString())}function O(t){return!h(t)&&Number.isInteger(Number(t))}function S(t){return!h(t)&&!Number.isNaN(Number(t))}function J(t){return!h(t)&&(null==t?void 0:t.toUpperCase())in a}function w(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in s}function j(t){if(h(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function k(t){const n=Date.parse(t);return Number.isInteger(n)}function A(t){return(null==t?void 0:t.toUpperCase())in d}function $(t){return(null==t?void 0:t.toUpperCase())in m}function T(t){return(null==t?void 0:t.toUpperCase())in o}function M(t){return!h(t)&&(null==t?void 0:t.toUpperCase())in u}function E(t){return!h(t)&&["true","false",!0,!1].some((n=>n===t))}function G(t){return!h(t)&&(null==t?void 0:t.toUpperCase())in c}function C(t){if(h(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function I(t){if(h(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function x(t){return(null==t?void 0:t.trim().toUpperCase())in l}function z(t){return["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(null==t?void 0:t.trim())||["GREATEST","LEAST"].includes(null==t?void 0:t.trim().toUpperCase())}function B(t){return(null==t?void 0:t.toUpperCase().trim())in f}function L(t){return(null==t?void 0:t.toUpperCase().trim())in i}function _(t){if(h(t))return[];try{return JSON.parse(t).filter((t=>!(t.hasOwnProperty("scenario")&&t.hasOwnProperty("name")&&t.hasOwnProperty("subGroups"))))}catch(t){console.error("validateColumnThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function D(t){if(h(t))return[];try{const n=JSON.parse(t);if("object"!=typeof n||null===n||Array.isArray(n))return["stack: must be a JSON object"];const r=[];if(n.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(n.by)||r.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else r.push("stack: 'by' is required");if(n.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(n.mode)||r.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(n.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(n.order)||r.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return r}catch(t){return["stack: invalid JSON"]}}class P{constructor(){this.cache=new Map,this.tag=P.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.innerHTML=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const q=new P,F=t=>S(t)?`${t}px`:t,R={width:{className:"w",cssName:"width",attrName:"width",transform:F},height:{className:"h",cssName:"height",attrName:"height",transform:F},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:F},right:{className:"rgt",cssName:"right",attrName:"right",transform:F},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:F},left:{className:"lft",cssName:"left",attrName:"left",transform:F},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:F},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},Y=Object.keys(R);function H(n,r){const s=function(n,r){const s=t(r);return`bn-c-${n.className}_${s}`}(n,r),e=function(t,n,r){return`.${n} {${t.cssName}: ${r};}`}(n,s,r);return{className:s,style:e}}const Q=t=>{const n=new Map;return Y.forEach((r=>{const s=t.getAttribute(r);s&&(["top","left","right","bottom"].includes(r)&&n.set("position",H(R.position,"absolute")),n.set(r,H(R[r],(R[r].transform||function(t){return t})(s))))})),n},W=new MutationObserver((t=>{for(const n of t){const t=n.target,r=Q(t);q.apply(r);const s=Array.from(r.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...s).join(" "),N(t)}})),Z=t=>{const n=t.connectedCallback,r=t.disconnectedCallback;t.connectedCallback=()=>{const r=p(t);if(!r)throw new Error("Can't find element field in component undefined");(t=>{const n=Q(t);q.apply(n);const r=Array.from(n.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...r).join(" "),W.observe(t,{attributes:!0,attributeFilter:Y,childList:!1,subtree:!1})})(r),v(n,t)},t.disconnectedCallback=()=>{v(r,t)}};export{y as a,O as b,w as c,g as d,J as e,$ as f,D as g,T as h,S as i,E as j,z as k,h as l,L as m,M as n,G as o,C as p,I as q,x as r,B as s,_ as t,j as u,b as v,Z as w,k as x,A as y}
@@ -0,0 +1 @@
1
+ var t,e,n,r,s,i,u,a;!function(t){t.ALL="all",t.META="meta"}(t||(t={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(e||(e={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(n||(n={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(r||(r={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(s||(s={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(i||(i={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(u||(u={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(a||(a={}));const o={[a.W5]:5,[a.W10]:10,[a.W15]:15,[a.W20]:20,[a.W25]:25,[a.W30]:30,[a.W40]:40,[a.W60]:60,[a.W80]:80,[a.W100]:100};var c,l,h,d,m,f,y;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(c||(c={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(l||(l={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(h||(h={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(d||(d={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(m||(m={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(f||(f={})),function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(y||(y={}));class g extends Error{}class w extends g{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class p extends g{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class M extends g{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class S extends g{}class k extends g{constructor(t){super(`Invalid unit ${t}`)}}class b extends g{}class N extends g{constructor(){super("Zone is an abstract class")}}const T="numeric",v="short",E="long",O={year:T,month:T,day:T},D={year:T,month:v,day:T},I={year:T,month:v,day:T,weekday:v},$={year:T,month:E,day:T},x={year:T,month:E,day:T,weekday:E},F={hour:T,minute:T},Z={hour:T,minute:T,second:T},L={hour:T,minute:T,second:T,timeZoneName:v},W={hour:T,minute:T,second:T,timeZoneName:E},C={hour:T,minute:T,hourCycle:"h23"},A={hour:T,minute:T,second:T,hourCycle:"h23"},_={hour:T,minute:T,second:T,hourCycle:"h23",timeZoneName:v},j={hour:T,minute:T,second:T,hourCycle:"h23",timeZoneName:E},q={year:T,month:T,day:T,hour:T,minute:T},H={year:T,month:T,day:T,hour:T,minute:T,second:T},z={year:T,month:v,day:T,hour:T,minute:T},R={year:T,month:v,day:T,hour:T,minute:T,second:T},U={year:T,month:v,day:T,weekday:v,hour:T,minute:T},J={year:T,month:E,day:T,hour:T,minute:T,timeZoneName:v},G={year:T,month:E,day:T,hour:T,minute:T,second:T,timeZoneName:v},P={year:T,month:E,day:T,weekday:E,hour:T,minute:T,timeZoneName:E},Y={year:T,month:E,day:T,weekday:E,hour:T,minute:T,second:T,timeZoneName:E};class V{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(t,e){throw new N}formatOffset(t,e){throw new N}offset(t){throw new N}equals(t){throw new N}get isValid(){throw new N}}let B=null;class Q extends V{static get instance(){return null===B&&(B=new Q),B}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return we(t,e,n)}formatOffset(t,e){return ke(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}const K=new Map,X={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},tt=new Map;class et extends V{static create(t){let e=tt.get(t);return void 0===e&&tt.set(t,e=new et(t)),e}static resetCache(){tt.clear(),K.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=et.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return we(t,e,n,this.name)}formatOffset(t,e){return ke(this.offset(t),e)}offset(t){if(!this.valid)return NaN;const e=new Date(t);if(isNaN(e))return NaN;const n=function(t){let e=K.get(t);return void 0===e&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),K.set(t,e)),e}(this.name);let[r,s,i,u,a,o,c]=n.formatToParts?function(t,e){const n=t.formatToParts(e),r=[];for(let t=0;t<n.length;t++){const{type:e,value:s}=n[t],i=X[e];"era"===e?r[i]=s:Bt(i)||(r[i]=parseInt(s,10))}return r}(n,e):function(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,u,a,o,c,l]=r;return[u,s,i,a,o,c,l]}(n,e);"BC"===u&&(r=1-Math.abs(r));let l=+e;const h=l%1e3;return l-=h>=0?h:1e3+h,(me({year:r,month:s,day:i,hour:24===a?0:a,minute:o,second:c,millisecond:0})-l)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nt={};const rt=new Map;function st(t,e={}){const n=JSON.stringify([t,e]);let r=rt.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(t,e),rt.set(n,r)),r}const it=new Map,ut=new Map;let at=null;const ot=new Map;function ct(t){let e=ot.get(t);return void 0===e&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),ot.set(t,e)),e}const lt=new Map;function ht(t,e,n,r){const s=t.listingMode();return"error"===s?null:"en"===s?n(e):r(e)}class dt{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!e||Object.keys(i).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let r=it.get(n);return void 0===r&&(r=new Intl.NumberFormat(t,e),it.set(n,r)),r}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return ie(this.floor?Math.floor(t):ce(t,3),this.padTo)}}class mt{constructor(t,e,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&et.create(n).valid?(r=n,this.dt=t):(r="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,r=t.zone.name):(r="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=st(e,s)}format(){return this.originalZone?this.formatToParts().map((({value:t})=>t)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t})):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class ft{constructor(t,e,n){this.opts={style:"long",...n},!e&&Xt()&&(this.rtf=function(t,e={}){const{base:n,...r}=e,s=JSON.stringify([t,r]);let i=ut.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(t,e),ut.set(s,i)),i}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&i){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${s[t][0]}`;case-1:return n?"yesterday":`last ${s[t][0]}`;case 0:return n?"today":`this ${s[t][0]}`}}const u=Object.is(e,-0)||e<0,a=Math.abs(e),o=1===a,c=s[t],l=r?o?c[1]:c[2]||c[1]:o?s[t][0]:t;return u?`${a} ${l} ago`:`in ${a} ${l}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const yt={firstDay:1,minimalDays:4,weekend:[6,7]};class gt{static fromOpts(t){return gt.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,r,s=!1){const i=t||Lt.defaultLocale,u=i||(s?"en-US":at||(at=(new Intl.DateTimeFormat).resolvedOptions().locale,at)),a=e||Lt.defaultNumberingSystem,o=n||Lt.defaultOutputCalendar,c=re(r)||Lt.defaultWeekSettings;return new gt(u,a,o,c,i)}static resetCache(){at=null,rt.clear(),it.clear(),ut.clear(),ot.clear(),lt.clear()}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:r}={}){return gt.create(t,e,n,r)}constructor(t,e,n,r,s){const[i,u,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,r;try{e=st(t).resolvedOptions(),r=t}catch(s){const i=t.substring(0,n);e=st(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=e;return[r,s,i]}}(t);this.locale=i,this.numberingSystem=e||u||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===ct(t.locale).numberingSystem)),this.fastNumbersCached}listingMode(){return this.isEnglish()&&!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar)?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?gt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,re(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return ht(this,t,Ee,(()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(e&=!n)?{month:t,day:"numeric"}:{month:t},s=e?"format":"standalone";return this.monthsCache[s][t]||(this.monthsCache[s][t]=function(t){const e=[];for(let n=1;n<=12;n++){const r=Ir.utc(2009,n,1);e.push(t(r))}return e}(n?t=>this.dtFormatter(t,r).format():t=>this.extract(t,r,"month"))),this.monthsCache[s][t]}))}weekdays(t,e=!1){return ht(this,t,$e,(()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},r=e?"format":"standalone";return this.weekdaysCache[r][t]||(this.weekdaysCache[r][t]=function(t){const e=[];for(let n=1;n<=7;n++){const r=Ir.utc(2016,11,13+n);e.push(t(r))}return e}((t=>this.extract(t,n,"weekday")))),this.weekdaysCache[r][t]}))}meridiems(){return ht(this,void 0,(()=>xe),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ir.utc(2016,11,13,9),Ir.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t){return ht(this,t,We,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ir.utc(-40,1,1),Ir.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,n){const r=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===n));return r?r.value:null}numberFormatter(t={}){return new dt(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new mt(t,this.intl,e)}relFormatter(t={}){return new ft(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let r=nt[n];return r||(r=new Intl.ListFormat(t,e),nt[n]=r),r}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||ct(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:te()?function(t){let e=lt.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...yt,...e}),lt.set(t,e)}return e}(this.locale):yt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let wt=null;class pt extends V{static get utcInstance(){return null===wt&&(wt=new pt(0)),wt}static instance(t){return 0===t?pt.utcInstance:new pt(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new pt(pe(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${ke(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${ke(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return ke(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class Mt extends V{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function St(t,e){if(Bt(t)||null===t)return e;if(t instanceof V)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?Q.instance:"utc"===n||"gmt"===n?pt.utcInstance:pt.parseSpecifier(n)||et.create(t)}return Qt(t)?pt.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new Mt(t)}const kt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},bt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Nt=kt.hanidec.replace(/[\[|\]]/g,"").split(""),Tt=new Map;function vt({numberingSystem:t},e=""){const n=t||"latn";let r=Tt.get(n);void 0===r&&(r=new Map,Tt.set(n,r));let s=r.get(e);return void 0===s&&(s=new RegExp(`${kt[n]}${e}`),r.set(e,s)),s}let Et,Ot=()=>Date.now(),Dt="system",It=null,$t=null,xt=null,Ft=60,Zt=null;class Lt{static get now(){return Ot}static set now(t){Ot=t}static set defaultZone(t){Dt=t}static get defaultZone(){return St(Dt,Q.instance)}static get defaultLocale(){return It}static set defaultLocale(t){It=t}static get defaultNumberingSystem(){return $t}static set defaultNumberingSystem(t){$t=t}static get defaultOutputCalendar(){return xt}static set defaultOutputCalendar(t){xt=t}static get defaultWeekSettings(){return Zt}static set defaultWeekSettings(t){Zt=re(t)}static get twoDigitCutoffYear(){return Ft}static set twoDigitCutoffYear(t){Ft=t%100}static get throwOnInvalid(){return Et}static set throwOnInvalid(t){Et=t}static resetCaches(){gt.resetCache(),et.resetCache(),Ir.resetCache(),Tt.clear()}}class Wt{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ct=[0,31,59,90,120,151,181,212,243,273,304,334],At=[0,31,60,91,121,152,182,213,244,274,305,335];function _t(t,e){return new Wt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function jt(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function qt(t,e,n){return n+(le(t)?At:Ct)[e-1]}function Ht(t,e){const n=le(t)?At:Ct,r=n.findIndex((t=>t<e));return{month:r+1,day:e-n[r]}}function zt(t,e){return(t-e+7)%7+1}function Rt(t,e=4,n=1){const{year:r,month:s,day:i}=t,u=qt(r,s,i),a=zt(jt(r,s,i),n);let o,c=Math.floor((u-a+14-e)/7);return c<1?(o=r-1,c=ye(o,e,n)):c>ye(r,e,n)?(o=r+1,c=1):o=r,{weekYear:o,weekNumber:c,weekday:a,...be(t)}}function Ut(t,e=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=t,u=zt(jt(r,1,e),n),a=he(r);let o,c=7*s+i-u-7+e;c<1?(o=r-1,c+=he(o)):c>a?(o=r+1,c-=he(r)):o=r;const{month:l,day:h}=Ht(o,c);return{year:o,month:l,day:h,...be(t)}}function Jt(t){const{year:e,month:n,day:r}=t;return{year:e,ordinal:qt(e,n,r),...be(t)}}function Gt(t){const{year:e,ordinal:n}=t,{month:r,day:s}=Ht(e,n);return{year:e,month:r,day:s,...be(t)}}function Pt(t,e){if(!Bt(t.localWeekday)||!Bt(t.localWeekNumber)||!Bt(t.localWeekYear)){if(!Bt(t.weekday)||!Bt(t.weekNumber)||!Bt(t.weekYear))throw new S("Cannot mix locale-based week fields with ISO-based week fields");return Bt(t.localWeekday)||(t.weekday=t.localWeekday),Bt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Bt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Yt(t){const e=Kt(t.year),n=se(t.month,1,12),r=se(t.day,1,de(t.year,t.month));return e?n?!r&&_t("day",t.day):_t("month",t.month):_t("year",t.year)}function Vt(t){const{hour:e,minute:n,second:r,millisecond:s}=t,i=se(e,0,23)||24===e&&0===n&&0===r&&0===s,u=se(n,0,59),a=se(r,0,59),o=se(s,0,999);return i?u?a?!o&&_t("millisecond",s):_t("second",r):_t("minute",n):_t("hour",e)}function Bt(t){return void 0===t}function Qt(t){return"number"==typeof t}function Kt(t){return"number"==typeof t&&t%1==0}function Xt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function te(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function ee(t,e,n){if(0!==t.length)return t.reduce(((t,r)=>{const s=[e(r),r];return t&&n(t[0],s[0])===t[0]?t:s}),null)[1]}function ne(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function re(t){if(null==t)return null;if("object"!=typeof t)throw new b("Week settings must be an object");if(!se(t.firstDay,1,7)||!se(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some((t=>!se(t,1,7))))throw new b("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function se(t,e,n){return Kt(t)&&t>=e&&t<=n}function ie(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function ue(t){return Bt(t)||null===t||""===t?void 0:parseInt(t,10)}function ae(t){return Bt(t)||null===t||""===t?void 0:parseFloat(t)}function oe(t){if(!Bt(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function ce(t,e,n="round"){const r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function le(t){return t%4==0&&(t%100!=0||t%400==0)}function he(t){return le(t)?366:365}function de(t,e){const n=(r=e-1)-12*Math.floor(r/12)+1;var r;return 2===n?le(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function me(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function fe(t,e,n){return-zt(jt(t,1,e),n)+e-1}function ye(t,e=4,n=1){const r=fe(t,e,n),s=fe(t+1,e,n);return(he(t)-r+s)/7}function ge(t){return t>99?t:t>Lt.twoDigitCutoffYear?1900+t:2e3+t}function we(t,e,n,r=null){const s=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const u={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,u).formatToParts(s).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function pe(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function Me(t){const e=Number(t);if("boolean"==typeof t||""===t||!Number.isFinite(e))throw new b(`Invalid unit value ${t}`);return e}function Se(t,e){const n={};for(const r in t)if(ne(t,r)){const s=t[r];if(null==s)continue;n[e(r)]=Me(s)}return n}function ke(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${ie(n,2)}:${ie(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${ie(n,2)}${ie(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function be(t){return function(t){return["hour","minute","second","millisecond"].reduce(((e,n)=>(e[n]=t[n],e)),{})}(t)}const Ne=["January","February","March","April","May","June","July","August","September","October","November","December"],Te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ve=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ee(t){switch(t){case"narrow":return[...ve];case"short":return[...Te];case"long":return[...Ne];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Oe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],De=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ie=["M","T","W","T","F","S","S"];function $e(t){switch(t){case"narrow":return[...Ie];case"short":return[...De];case"long":return[...Oe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xe=["AM","PM"],Fe=["Before Christ","Anno Domini"],Ze=["BC","AD"],Le=["B","A"];function We(t){switch(t){case"narrow":return[...Le];case"short":return[...Ze];case"long":return[...Fe];default:return null}}function Ce(t,e){let n="";for(const r of t)n+=r.literal?r.val:e(r.val);return n}const Ae={D:O,DD:D,DDD:$,DDDD:x,t:F,tt:Z,ttt:L,tttt:W,T:C,TT:A,TTT:_,TTTT:j,f:q,ff:z,fff:J,ffff:P,F:H,FF:R,FFF:G,FFFF:Y};class _e{static create(t,e={}){return new _e(t,e)}static parseFormat(t){let e=null,n="",r=!1;const s=[];for(let i=0;i<t.length;i++){const u=t.charAt(i);"'"===u?((n.length>0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),e=null,n="",r=!r):r||u===e?n+=u:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=u,e=u)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(t){return Ae[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0,n){if(this.opts.forceSimple)return ie(t,e);const r={...this.opts};return e>0&&(r.padTo=e),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(e,n)=>this.loc.extract(t,e,n),i=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",u=(e,r)=>n?function(t,e){return Ee(e)[t.month-1]}(t,e):s(r?{month:e}:{month:e,day:"numeric"},"month"),a=(e,r)=>n?function(t,e){return $e(e)[t.weekday-1]}(t,e):s(r?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),o=e=>{const n=_e.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},c=e=>n?function(t,e){return We(e)[t.year<0?0:1]}(t,e):s({era:e},"era");return Ce(_e.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return n?function(t){return xe[t.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?s({day:"numeric"},"day"):this.num(t.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(t.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(t.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return o(e)}}))}formatDurationFromString(t,e){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=t=>{switch(t[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=_e.parseFormat(e),i=s.reduce(((t,{literal:e,val:n})=>e?t:t.concat(n)),[]),u=t.shiftTo(...i.map(r).filter((t=>t)));return Ce(s,((t,e)=>s=>{const i=r(s);if(i){const r=e.isNegativeDuration&&i!==e.largestUnit?n:1;let u;return u="negativeLargestOnly"===this.opts.signMode&&i!==e.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(t.get(i)*r,s.length,u)}return s})(u,{isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]}))}}const je=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function qe(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function He(...t){return e=>t.reduce((([t,n,r],s)=>{const[i,u,a]=s(e,r);return[{...t,...i},u||n,a]}),[{},null,1]).slice(0,2)}function ze(t,...e){if(null==t)return[null,null];for(const[n,r]of e){const e=n.exec(t);if(e)return r(e)}return[null,null]}function Re(...t){return(e,n)=>{const r={};let s;for(s=0;s<t.length;s++)r[t[s]]=ue(e[n+s]);return[r,null,n+s]}}const Ue=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Je=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ge=RegExp(`${Je.source}(?:${Ue.source}?(?:\\[(${je.source})\\])?)?`),Pe=RegExp(`(?:[Tt]${Ge.source})?`),Ye=Re("weekYear","weekNumber","weekDay"),Ve=Re("year","ordinal"),Be=RegExp(`${Je.source} ?(?:${Ue.source}|(${je.source}))?`),Qe=RegExp(`(?: ${Be.source})?`);function Ke(t,e,n){const r=t[e];return Bt(r)?n:ue(r)}function Xe(t,e){return[{hours:Ke(t,e,0),minutes:Ke(t,e+1,0),seconds:Ke(t,e+2,0),milliseconds:oe(t[e+3])},null,e+4]}function tn(t,e){const n=!t[e]&&!t[e+1],r=pe(t[e+1],t[e+2]);return[{},n?null:pt.instance(r),e+3]}function en(t,e){return[{},t[e]?et.create(t[e]):null,e+1]}const nn=RegExp(`^T?${Je.source}$`),rn=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function sn(t){const[e,n,r,s,i,u,a,o,c]=t,l="-"===e[0],h=o&&"-"===o[0],d=(t,e=!1)=>void 0!==t&&(e||t&&l)?-t:t;return[{years:d(ae(n)),months:d(ae(r)),weeks:d(ae(s)),days:d(ae(i)),hours:d(ae(u)),minutes:d(ae(a)),seconds:d(ae(o),"-0"===o),milliseconds:d(oe(c),h)}]}const un={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function an(t,e,n,r,s,i,u){const a={year:2===e.length?ge(ue(e)):ue(e),month:Te.indexOf(n)+1,day:ue(r),hour:ue(s),minute:ue(i)};return u&&(a.second=ue(u)),t&&(a.weekday=t.length>3?Oe.indexOf(t)+1:De.indexOf(t)+1),a}const on=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function cn(t){const[,e,n,r,s,i,u,a,o,c,l,h]=t,d=an(e,s,r,n,i,u,a);let m;return m=o?un[o]:c?0:pe(l,h),[d,new pt(m)]}const ln=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,dn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function mn(t){const[,e,n,r,s,i,u,a]=t;return[an(e,s,r,n,i,u,a),pt.utcInstance]}function fn(t){const[,e,n,r,s,i,u,a]=t;return[an(e,a,n,r,s,i,u),pt.utcInstance]}const yn=qe(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Pe),gn=qe(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Pe),wn=qe(/(\d{4})-?(\d{3})/,Pe),pn=qe(Ge),Mn=He((function(t,e){return[{year:Ke(t,e),month:Ke(t,e+1,1),day:Ke(t,e+2,1)},null,e+3]}),Xe,tn,en),Sn=He(Ye,Xe,tn,en),kn=He(Ve,Xe,tn,en),bn=He(Xe,tn,en),Nn=He(Xe),Tn=qe(/(\d{4})-(\d\d)-(\d\d)/,Qe),vn=qe(Be),En=He(Xe,tn,en),On="Invalid Duration",Dn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},In={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Dn},$n={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Dn},xn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Fn=xn.slice(0).reverse();function Zn(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new An(r)}function Ln(t,e){let n=e.milliseconds??0;for(const r of Fn.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function Wn(t,e){const n=Ln(t,e)<0?-1:1;xn.reduceRight(((r,s)=>{if(Bt(e[s]))return r;if(r){const i=t[s][r],u=Math.floor(e[r]*n/i);e[s]+=u*n,e[r]-=u*i*n}return s}),null),xn.reduce(((n,r)=>{if(Bt(e[r]))return n;if(n){const s=e[n]%1;e[n]-=s,e[r]+=s*t[n][r]}return r}),null)}function Cn(t){const e={};for(const[n,r]of Object.entries(t))0!==r&&(e[n]=r);return e}class An{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?$n:In;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||gt.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return An.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new b("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new An({values:Se(t,An.normalizeUnit),loc:gt.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Qt(t))return An.fromMillis(t);if(An.isDuration(t))return t;if("object"==typeof t)return An.fromObject(t);throw new b(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return ze(t,[rn,sn])}(t);return n?An.fromObject(n,e):An.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return ze(t,[nn,Nn])}(t);return n?An.fromObject(n,e):An.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new b("need to specify a reason the Duration is invalid");const n=t instanceof Wt?t:new Wt(t,e);if(Lt.throwOnInvalid)throw new M(n);return new An({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new k(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?_e.create(this.loc,n).formatDurationFromString(this,t):On}toHuman(t={}){if(!this.isValid)return On;const e=!1!==t.showZeros,n=xn.map((n=>{const r=this.values[n];return Bt(r)||0===r&&!e?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:n.slice(0,-1)}).format(r)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=ce(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();return e<0||e>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Ir.fromMillis(e,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Ln(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=An.fromDurationLike(t),n={};for(const t of xn)(ne(e.values,t)||ne(this.values,t))&&(n[t]=e.get(t)+this.get(t));return Zn(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=An.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=Me(t(this.values[n],n));return Zn(this,{values:e},!0)}get(t){return this[An.normalizeUnit(t)]}set(t){return this.isValid?Zn(this,{values:{...this.values,...Se(t,An.normalizeUnit)}}):this}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:r}={}){return Zn(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:r,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Wn(this.matrix,t),Zn(this,{values:t},!0)}rescale(){return this.isValid?Zn(this,{values:Cn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>An.normalizeUnit(t)));const e={},n={},r=this.toObject();let s;for(const i of xn)if(t.indexOf(i)>=0){s=i;let t=0;for(const e in n)t+=this.matrix[e][i]*n[e],n[e]=0;Qt(r[i])&&(t+=r[i]);const u=Math.trunc(t);e[i]=u,n[i]=(1e3*t-1e3*u)/1e3}else Qt(r[i])&&(n[i]=r[i]);for(const t in n)0!==n[t]&&(e[s]+=t===s?n[t]:n[t]/this.matrix[s][t]);return Wn(this.matrix,e),Zn(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return Zn(this,{values:t},!0)}removeZeros(){return this.isValid?Zn(this,{values:Cn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const r of xn)if(n=t.values[r],!(void 0===(e=this.values[r])||0===e?void 0===n||0===n:e===n))return!1;var e,n;return!0}}const _n="Invalid Interval";class jn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new b("need to specify a reason the Interval is invalid");const n=t instanceof Wt?t:new Wt(t,e);if(Lt.throwOnInvalid)throw new p(n);return new jn({invalid:n})}static fromDateTimes(t,e){const n=$r(t),r=$r(e),s=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?jn.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:jn.invalid("missing or invalid end"):jn.invalid("missing or invalid start")}(n,r);return null==s?new jn({start:n,end:r}):s}static after(t,e){const n=An.fromDurationLike(e),r=$r(t);return jn.fromDateTimes(r,r.plus(n))}static before(t,e){const n=An.fromDurationLike(e),r=$r(t);return jn.fromDateTimes(r.minus(n),r)}static fromISO(t,e){const[n,r]=(t||"").split("/",2);if(n&&r){let t,s,i,u;try{t=Ir.fromISO(n,e),s=t.isValid}catch(r){s=!1}try{i=Ir.fromISO(r,e),u=i.isValid}catch(r){u=!1}if(s&&u)return jn.fromDateTimes(t,i);if(s){const n=An.fromISO(r,e);if(n.isValid)return jn.after(t,n)}else if(u){const t=An.fromISO(n,e);if(t.isValid)return jn.before(i,t)}}return jn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",e){if(!this.isValid)return NaN;const n=this.start.startOf(t,e);let r;return r=e?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(t,e),Math.floor(r.diff(n,t).get(t))+(r.valueOf()!==this.end.valueOf())}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&this.s<=t&&this.e>t}set({start:t,end:e}={}){return this.isValid?jn.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map($r).filter((t=>this.contains(t))).sort(((t,e)=>t.toMillis()-e.toMillis())),n=[];let{s:r}=this,s=0;for(;r<this.e;){const t=e[s]||this.e,i=+t>+this.e?this.e:t;n.push(jn.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(t){const e=An.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;r<this.e;){const t=this.start.plus(e.mapUnits((t=>t*s)));n=+t>+this.e?this.e:t,i.push(jn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&this.s<=t.s&&this.e>=t.e}equals(t){return!(!this.isValid||!t.isValid)&&this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return e>=n?null:jn.fromDateTimes(e,n)}union(t){return this.isValid?jn.fromDateTimes(this.s<t.s?this.s:t.s,this.e>t.e?this.e:t.e):this}static merge(t){const[e,n]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n]),[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const r=[],s=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),i=Array.prototype.concat(...s).sort(((t,e)=>t.time-e.time));for(const t of i)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!=+t.time&&r.push(jn.fromDateTimes(e,t.time)),e=null);return jn.merge(r)}difference(...t){return jn.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:_n}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=O,e={}){return this.isValid?_e.create(this.s.loc.clone(e),t).formatInterval(this):_n}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:_n}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:_n}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:_n}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:_n}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):An.invalid(this.invalidReason)}mapEndpoints(t){return jn.fromDateTimes(t(this.s),t(this.e))}}class qn{static hasDST(t=Lt.defaultZone){const e=Ir.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return et.isValidZone(t)}static normalizeZone(t){return St(t,Lt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||gt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||gt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||gt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||gt.create(e,n,s)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||gt.create(e,n,s)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:r=null}={}){return(r||gt.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:r=null}={}){return(r||gt.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return gt.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return gt.create(e,null,"gregory").eras(t)}static features(){return{relative:Xt(),localeWeek:te()}}}function Hn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(An.fromMillis(r).as("days"))}function zn(t,e=t=>t){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(-1!==t[n].search(kt.hanidec))e+=Nt.indexOf(t[n]);else for(const t in bt){const[n,s]=bt[t];r>=n&&r<=s&&(e+=r-n)}}return parseInt(e,10)}return e}(t))}}const Rn=`[ ${String.fromCharCode(160)}]`,Un=new RegExp(Rn,"g");function Jn(t){return t.replace(/\./g,"\\.?").replace(Un,Rn)}function Gn(t){return t.replace(/\./g,"").replace(Un," ").toLowerCase()}function Pn(t,e){return null===t?null:{regex:RegExp(t.map(Jn).join("|")),deser:([n])=>t.findIndex((t=>Gn(n)===Gn(t)))+e}}function Yn(t,e){return{regex:t,deser:([,t,e])=>pe(t,e),groups:e}}function Vn(t){return{regex:t,deser:([t])=>t}}const Bn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Qn=null;function Kn(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const n=er(_e.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e))))}class Xn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Kn(_e.parseFormat(e),t),this.units=this.tokens.map((e=>function(t,e){const n=vt(e),r=vt(e,"{2}"),s=vt(e,"{3}"),i=vt(e,"{4}"),u=vt(e,"{6}"),a=vt(e,"{1,2}"),o=vt(e,"{1,3}"),c=vt(e,"{1,6}"),l=vt(e,"{1,9}"),h=vt(e,"{2,4}"),d=vt(e,"{4,6}"),m=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},f=(f=>{if(t.literal)return m(f);switch(f.val){case"G":return Pn(e.eras("short"),0);case"GG":return Pn(e.eras("long"),0);case"y":return zn(c);case"yy":case"kk":return zn(h,ge);case"yyyy":case"kkkk":return zn(i);case"yyyyy":return zn(d);case"yyyyyy":return zn(u);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return zn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return zn(r);case"MMM":return Pn(e.months("short",!0),1);case"MMMM":return Pn(e.months("long",!0),1);case"LLL":return Pn(e.months("short",!1),1);case"LLLL":return Pn(e.months("long",!1),1);case"o":case"S":return zn(o);case"ooo":case"SSS":return zn(s);case"u":return Vn(l);case"uu":return Vn(a);case"uuu":case"E":case"c":return zn(n);case"a":return Pn(e.meridiems(),0);case"EEE":return Pn(e.weekdays("short",!1),1);case"EEEE":return Pn(e.weekdays("long",!1),1);case"ccc":return Pn(e.weekdays("short",!0),1);case"cccc":return Pn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Yn(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return Yn(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return Vn(/[a-z_+-/]{1,256}?/i);case" ":return Vn(/[^\S\n\r]/);default:return m(f)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=t,f}(e,t))),this.disqualifyingUnit=this.units.find((t=>t.invalidReason)),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const r=t.match(e);if(r){const t={};let e=1;for(const s in n)if(ne(n,s)){const i=n[s],u=i.groups?i.groups+1:1;!i.literal&&i.token&&(t[i.token.val[0]]=i.deser(r.slice(e,e+u))),e+=u}return[r,t]}return[r,{}]}(t,this.regex,this.handlers),[r,s,i]=n?function(t){let e,n=null;return Bt(t.z)||(n=et.create(t.z)),Bt(t.Z)||(n||(n=new pt(t.Z)),e=t.Z),Bt(t.q)||(t.M=3*(t.q-1)+1),Bt(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Bt(t.u)||(t.S=oe(t.u)),[Object.keys(t).reduce(((e,n)=>{const r=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(e[r]=t[n]),e}),{}),n,e]}(n):[null,null,void 0];if(ne(n,"a")&&ne(n,"H"))throw new S("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:r,zone:s,specificOffset:i}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function tr(t,e,n){return new Xn(t,n).explainFromTokens(e)}function er(t,e){if(!t)return null;const n=_e.create(e,t).dtFormatter((Qn||(Qn=Ir.fromMillis(1555555555555)),Qn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map((e=>function(t,e,n){const{type:r,value:s}=t;if("literal"===r){const t=/^\s+$/.test(s);return{literal:!t,val:t?" ":s}}let i=r;"hour"===r&&(i=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let u=Bn[i];if("object"==typeof u&&(u=u[e[r]]),u)return{literal:!1,val:u}}(e,t,s)))}const nr="Invalid DateTime",rr=864e13;function sr(t){return new Wt("unsupported zone",`the zone "${t.name}" is not supported`)}function ir(t){return null===t.weekData&&(t.weekData=Rt(t.c)),t.weekData}function ur(t){return null===t.localWeekData&&(t.localWeekData=Rt(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function ar(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ir({...n,...e,old:n})}function or(t,e,n){let r=t-60*e*1e3;const s=n.offset(r);if(e===s)return[r,e];r-=60*(s-e)*1e3;const i=n.offset(r);return s===i?[r,s]:[t-60*Math.min(s,i)*1e3,Math.max(s,i)]}function cr(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function lr(t,e,n){return or(me(t),e,n)}function hr(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),i={...t.c,year:r,month:s,day:Math.min(t.c.day,de(r,s))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},u=An.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=me(i);let[o,c]=or(a,n,t.zone);return 0!==u&&(o+=u,c=t.zone.offset(o)),{ts:o,o:c}}function dr(t,e,n,r,s,i){const{setZone:u,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const r=e||a,s=Ir.fromObject(t,{...n,zone:r,specificOffset:i});return u?s:s.setZone(a)}return Ir.invalid(new Wt("unparsable",`the input "${s}" can't be parsed as ${r}`))}function mr(t,e,n=!0){return t.isValid?_e.create(gt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function fr(t,e,n){const r=t.c.year>9999||t.c.year<0;let s="";if(r&&t.c.year>=0&&(s+="+"),s+=ie(t.c.year,r?6:4),"year"===n)return s;if(e){if(s+="-",s+=ie(t.c.month),"month"===n)return s;s+="-"}else if(s+=ie(t.c.month),"month"===n)return s;return s+=ie(t.c.day),s}function yr(t,e,n,r,s,i,u){let a=!n||0!==t.c.millisecond||0!==t.c.second,o="";switch(u){case"day":case"month":case"year":break;default:if(o+=ie(t.c.hour),"hour"===u)break;if(e){if(o+=":",o+=ie(t.c.minute),"minute"===u)break;a&&(o+=":",o+=ie(t.c.second))}else{if(o+=ie(t.c.minute),"minute"===u)break;a&&(o+=ie(t.c.second))}if("second"===u)break;!a||r&&0===t.c.millisecond||(o+=".",o+=ie(t.c.millisecond,3))}return s&&(t.isOffsetFixed&&0===t.offset&&!i?o+="Z":t.o<0?(o+="-",o+=ie(Math.trunc(-t.o/60)),o+=":",o+=ie(Math.trunc(-t.o%60))):(o+="+",o+=ie(Math.trunc(t.o/60)),o+=":",o+=ie(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const gr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},pr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Mr=["year","month","day","hour","minute","second","millisecond"],Sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],kr=["year","ordinal","hour","minute","second","millisecond"];function br(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new k(t);return e}function Nr(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return br(t)}}function Tr(t,e){const n=St(e.zone,Lt.defaultZone);if(!n.isValid)return Ir.invalid(sr(n));const r=gt.fromObject(e);let s,i;if(Bt(t.year))s=Lt.now();else{for(const e of Mr)Bt(t[e])&&(t[e]=gr[e]);const e=Yt(t)||Vt(t);if(e)return Ir.invalid(e);const r=function(t){if(void 0===Or&&(Or=Lt.now()),"iana"!==t.type)return t.offset(Or);const e=t.name;let n=Dr.get(e);return void 0===n&&(n=t.offset(Or),Dr.set(e,n)),n}(n);[s,i]=lr(t,r,n)}return new Ir({ts:s,zone:n,loc:r,o:i})}function vr(t,e,n){const r=!!Bt(n.round)||n.round,s=Bt(n.rounding)?"trunc":n.rounding,i=(t,i)=>(t=ce(t,r||n.calendary?0:2,n.calendary?"round":s),e.loc.clone(n).relFormatter(n).format(t,i)),u=r=>n.calendary?e.hasSame(t,r)?0:e.startOf(r).diff(t.startOf(r),r).get(r):e.diff(t,r).get(r);if(n.unit)return i(u(n.unit),n.unit);for(const t of n.units){const e=u(t);if(Math.abs(e)>=1)return i(e,t)}return i(t>e?-0:0,n.units[n.units.length-1])}function Er(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let Or;const Dr=new Map;class Ir{constructor(t){const e=t.zone||Lt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new Wt("invalid input"):null)||(e.isValid?null:sr(e));this.ts=Bt(t.ts)?Lt.now():t.ts;let r=null,s=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[r,s]=[t.old.c,t.old.o];else{const i=Qt(t.o)&&!t.old?t.o:e.offset(this.ts);r=cr(this.ts,i),n=Number.isNaN(r.year)?new Wt("invalid input"):null,r=n?null:r,s=n?null:i}this._zone=e,this.loc=t.loc||gt.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new Ir({})}static local(){const[t,e]=Er(arguments),[n,r,s,i,u,a,o]=e;return Tr({year:n,month:r,day:s,hour:i,minute:u,second:a,millisecond:o},t)}static utc(){const[t,e]=Er(arguments),[n,r,s,i,u,a,o]=e;return t.zone=pt.utcInstance,Tr({year:n,month:r,day:s,hour:i,minute:u,second:a,millisecond:o},t)}static fromJSDate(t,e={}){const n="[object Date]"===Object.prototype.toString.call(t)?t.valueOf():NaN;if(Number.isNaN(n))return Ir.invalid("invalid input");const r=St(e.zone,Lt.defaultZone);return r.isValid?new Ir({ts:n,zone:r,loc:gt.fromObject(e)}):Ir.invalid(sr(r))}static fromMillis(t,e={}){if(Qt(t))return t<-rr||t>rr?Ir.invalid("Timestamp out of range"):new Ir({ts:t,zone:St(e.zone,Lt.defaultZone),loc:gt.fromObject(e)});throw new b(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Qt(t))return new Ir({ts:1e3*t,zone:St(e.zone,Lt.defaultZone),loc:gt.fromObject(e)});throw new b("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=St(e.zone,Lt.defaultZone);if(!n.isValid)return Ir.invalid(sr(n));const r=gt.fromObject(e),s=Se(t,Nr),{minDaysInFirstWeek:i,startOfWeek:u}=Pt(s,r),a=Lt.now(),o=Bt(e.specificOffset)?n.offset(a):e.specificOffset,c=!Bt(s.ordinal),l=!Bt(s.year),h=!Bt(s.month)||!Bt(s.day),d=l||h,m=s.weekYear||s.weekNumber;if((d||c)&&m)throw new S("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new S("Can't mix ordinal dates with month/day");const f=m||s.weekday&&!d;let y,g,w=cr(a,o);f?(y=Sr,g=wr,w=Rt(w,i,u)):c?(y=kr,g=pr,w=Jt(w)):(y=Mr,g=gr);let p=!1;for(const t of y)Bt(s[t])?s[t]=p?g[t]:w[t]:p=!0;const M=f?function(t,e=4,n=1){const r=Kt(t.weekYear),s=se(t.weekNumber,1,ye(t.weekYear,e,n)),i=se(t.weekday,1,7);return r?s?!i&&_t("weekday",t.weekday):_t("week",t.weekNumber):_t("weekYear",t.weekYear)}(s,i,u):c?function(t){const e=Kt(t.year),n=se(t.ordinal,1,he(t.year));return e?!n&&_t("ordinal",t.ordinal):_t("year",t.year)}(s):Yt(s),k=M||Vt(s);if(k)return Ir.invalid(k);const b=f?Ut(s,i,u):c?Gt(s):s,[N,T]=lr(b,o,n),v=new Ir({ts:N,zone:n,o:T,loc:r});return s.weekday&&d&&t.weekday!==v.weekday?Ir.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${v.toISO()}`):v.isValid?v:Ir.invalid(v.invalid)}static fromISO(t,e={}){const[n,r]=function(t){return ze(t,[yn,Mn],[gn,Sn],[wn,kn],[pn,bn])}(t);return dr(n,r,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,r]=function(t){return ze(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[on,cn])}(t);return dr(n,r,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,r]=function(t){return ze(t,[ln,mn],[hn,mn],[dn,fn])}(t);return dr(n,r,e,"HTTP",e)}static fromFormat(t,e,n={}){if(Bt(t)||Bt(e))throw new b("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=gt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[u,a,o,c]=function(t,e,n){const{result:r,zone:s,specificOffset:i,invalidReason:u}=tr(t,e,n);return[r,s,i,u]}(i,t,e);return c?Ir.invalid(c):dr(u,a,n,`format ${e}`,t,o)}static fromString(t,e,n={}){return Ir.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,r]=function(t){return ze(t,[Tn,Mn],[vn,En])}(t);return dr(n,r,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new b("need to specify a reason the DateTime is invalid");const n=t instanceof Wt?t:new Wt(t,e);if(Lt.throwOnInvalid)throw new w(n);return new Ir({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=er(t,gt.fromObject(e));return n?n.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){return Kn(_e.parseFormat(t),gt.fromObject(e)).map((t=>t.val)).join("")}static resetCache(){Or=void 0,Dr.clear()}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ir(this).weekYear:NaN}get weekNumber(){return this.isValid?ir(this).weekNumber:NaN}get weekday(){return this.isValid?ir(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ur(this).weekday:NaN}get localWeekNumber(){return this.isValid?ur(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ur(this).weekYear:NaN}get ordinal(){return this.isValid?Jt(this.c).ordinal:NaN}get monthShort(){return this.isValid?qn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?qn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?qn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?qn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=me(this.c),r=this.zone.offset(n-t),s=this.zone.offset(n+t),i=this.zone.offset(n-r*e),u=this.zone.offset(n-s*e);if(i===u)return[this];const a=n-i*e,o=n-u*e,c=cr(a,i),l=cr(o,u);return c.hour===l.hour&&c.minute===l.minute&&c.second===l.second&&c.millisecond===l.millisecond?[ar(this,{ts:a}),ar(this,{ts:o})]:[this]}get isInLeapYear(){return le(this.year)}get daysInMonth(){return de(this.year,this.month)}get daysInYear(){return this.isValid?he(this.year):NaN}get weeksInWeekYear(){return this.isValid?ye(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ye(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:r}=_e.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:r}}toUTC(t=0,e={}){return this.setZone(pt.instance(t),e)}toLocal(){return this.setZone(Lt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=St(t,Lt.defaultZone)).equals(this.zone))return this;if(t.isValid){let r=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[r]=lr(n,e,t)}return ar(this,{ts:r,zone:t})}return Ir.invalid(sr(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return ar(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Se(t,Nr),{minDaysInFirstWeek:n,startOfWeek:r}=Pt(e,this.loc),s=!Bt(e.weekYear)||!Bt(e.weekNumber)||!Bt(e.weekday),i=!Bt(e.ordinal),u=!Bt(e.year),a=!Bt(e.month)||!Bt(e.day);if((u||a||i)&&(e.weekYear||e.weekNumber))throw new S("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new S("Can't mix ordinal dates with month/day");let o;s?o=Ut({...Rt(this.c,n,r),...e},n,r):Bt(e.ordinal)?(o={...this.toObject(),...e},Bt(e.day)&&(o.day=Math.min(de(o.year,o.month),o.day))):o=Gt({...Jt(this.c),...e});const[c,l]=lr(o,this.o,this.zone);return ar(this,{ts:c,o:l})}plus(t){return this.isValid?ar(this,hr(this,An.fromDurationLike(t))):this}minus(t){return this.isValid?ar(this,hr(this,An.fromDurationLike(t).negate())):this}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},r=An.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;e<t&&(n.weekNumber=this.weekNumber-1),n.weekday=t}else n.weekday=1;if("quarters"===r){const t=Math.ceil(this.month/3);n.month=3*(t-1)+1}return this.set(n)}endOf(t,e){return this.isValid?this.plus({[t]:1}).startOf(t,e).minus(1):this}toFormat(t,e={}){return this.isValid?_e.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):nr}toLocaleString(t=O,e={}){return this.isValid?_e.create(this.loc.clone(e),t).formatDateTime(this):nr}toLocaleParts(t={}){return this.isValid?_e.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const u="extended"===t;let a=fr(this,u,i=br(i));return Mr.indexOf(i)>=3&&(a+="T"),a+=yr(this,u,e,n,r,s,i),a}toISODate({format:t="extended",precision:e="day"}={}){return this.isValid?fr(this,"extended"===t,br(e)):null}toISOWeekDate(){return mr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:u="milliseconds"}={}){return this.isValid?(u=br(u),(r&&Mr.indexOf(u)>=3?"T":"")+yr(this,"extended"===i,e,t,n,s,u)):null}toRFC2822(){return mr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?fr(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(e||t)&&(n&&(r+=" "),e?r+="z":t&&(r+="ZZ")),mr(this,r,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():nr}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",n={}){if(!this.isValid||!t.isValid)return An.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(a=e,Array.isArray(a)?a:[a]).map(An.normalizeUnit),i=t.valueOf()>this.valueOf(),u=function(t,e,n,r){let[s,i,u,a]=function(t,e,n){const r=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Hn(t,e);return(n-n%7)/7}],["days",Hn]],s={},i=t;let u,a;for(const[o,c]of r)n.indexOf(o)>=0&&(u=o,s[o]=c(t,e),a=i.plus(s),a>e?(s[o]--,(t=i.plus(s))>e&&(a=t,s[o]--,t=i.plus(s))):t=a);return[t,s,a,u]}(t,e,n);const o=e-s,c=n.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(u<e&&(u=s.plus({[a]:1})),u!==s&&(i[a]=(i[a]||0)+o/(u-s)));const l=An.fromObject(i,r);return c.length>0?An.fromMillis(o,r).shiftTo(...c).plus(l):l}(i?this:t,i?t:this,s,r);var a;return i?u.negate():u}diffNow(t="milliseconds",e={}){return this.diff(Ir.now(),t,e)}until(t){return this.isValid?jn.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const r=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(e,n)<=r&&r<=s.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ir.fromObject({},{zone:this.zone}),n=t.padding?this<e?-t.padding:t.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(r=t.unit,s=void 0),vr(e,this.plus(n),{...t,numeric:"always",units:r,unit:s})}toRelativeCalendar(t={}){return this.isValid?vr(t.base||Ir.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ir.isDateTime))throw new b("min requires all arguments be DateTimes");return ee(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ir.isDateTime))throw new b("max requires all arguments be DateTimes");return ee(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:r=null,numberingSystem:s=null}=n;return tr(gt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return Ir.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:r=null}=e,s=gt.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Xn(s,t)}static fromFormatParser(t,e,n={}){if(Bt(t)||Bt(e))throw new b("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=gt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(e.locale))throw new b(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${e.locale}`);const{result:u,zone:a,specificOffset:o,invalidReason:c}=e.explainFromTokens(t);return c?Ir.invalid(c):dr(u,a,n,`format ${e.format}`,t,o)}static get DATE_SHORT(){return O}static get DATE_MED(){return D}static get DATE_MED_WITH_WEEKDAY(){return I}static get DATE_FULL(){return $}static get DATE_HUGE(){return x}static get TIME_SIMPLE(){return F}static get TIME_WITH_SECONDS(){return Z}static get TIME_WITH_SHORT_OFFSET(){return L}static get TIME_WITH_LONG_OFFSET(){return W}static get TIME_24_SIMPLE(){return C}static get TIME_24_WITH_SECONDS(){return A}static get TIME_24_WITH_SHORT_OFFSET(){return _}static get TIME_24_WITH_LONG_OFFSET(){return j}static get DATETIME_SHORT(){return q}static get DATETIME_SHORT_WITH_SECONDS(){return H}static get DATETIME_MED(){return z}static get DATETIME_MED_WITH_SECONDS(){return R}static get DATETIME_MED_WITH_WEEKDAY(){return U}static get DATETIME_FULL(){return J}static get DATETIME_FULL_WITH_SECONDS(){return G}static get DATETIME_HUGE(){return P}static get DATETIME_HUGE_WITH_SECONDS(){return Y}}function $r(t){if(Ir.isDateTime(t))return t;if(t&&t.valueOf&&Qt(t.valueOf()))return Ir.fromJSDate(t);if(t&&"object"==typeof t)return Ir.fromObject(t);throw new b(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class xr{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(t){return t instanceof Ir&&t.isValid}}class Fr{static adaptDefaultString(t){return xr.isString(t)?t.trim():""}static adaptArray(t,e){const n=[];return xr.isArray(t)&&t.forEach((t=>{n.push(e.adapt(t))})),n}}var Zr,Lr;!function(t){t.ASC="asc",t.DESC="desc"}(Zr||(Zr={})),function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(Lr||(Lr={}));class Wr{constructor(t=["category"],e=Zr.ASC){this.hierarchy=t,this.direction=e}}class Cr{constructor(t){this.stringAdapter=t}adapt(t){var e;const n=Fr.adaptArray(t.hierarchy,this.stringAdapter),r=Zr[null===(e=t.direction)||void 0===e?void 0:e.toUpperCase()]||Zr.ASC;return new Wr(n.map((t=>Lr[t.toUpperCase()]||Lr.CATEGORY)),r)}default(){return new Wr(["category"],Zr.ASC)}}export{l as A,o as B,d as C,Ir as D,t as I,e as M,Zr as O,m as S,u as T,Lr as a,y as b,f as c,s as d,a as e,Fr as f,xr as g,n as h,r as i,c as j,i as k,Cr as l}
@@ -0,0 +1 @@
1
+ import{g as r}from"./p-JNHhIe7t.js";import{a as e}from"./p-DvvwfRQG.js";let o=(r=21)=>{let e="",o=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[r]];return e};const t=t=>{const{set:s,modify:a}=e([],(e=>{const o=r(t);0===e.length?o.removeAttribute("has-error"):o.setAttribute("has-error",JSON.stringify(e))}));return{clear:()=>{s([])},replace:r=>{s(r.map((r=>(r.id||(r.id=o()),r))))},add:r=>(r.id||(r.id=o()),a((e=>[...e,r])),r.id),addOrReplace:r=>{if(void 0===r.id)throw"missing";return a((e=>[...e.filter((e=>e.id!==r.id)),r])),r.id},remove:r=>{a((e=>e.filter((e=>e.id!==r))))}}};export{t as w}
@@ -0,0 +1 @@
1
+ import{S as e}from"./p-JNHhIe7t.js";const t=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys()){const o=e.get(t).filter((e=>{const t=e.deref();return t&&(!("isConnected"in(o=t))||o.isConnected);var o}));e.set(t,o)}})(...t)}),2e3)}})(),o=e.forceUpdate,n=e.getRenderingRef,i=(e,t)=>{const o=e.indexOf(t);o>=0&&(e[o]=e[e.length-1],e.length--)},r=(e,r)=>{const a=((e,t=(e,t)=>e!==t)=>{const o=()=>{return("function"==typeof(t=e)?t():t)??{};var t},n=o();let r=new Map(Object.entries(n));const a="undefined"!=typeof Proxy,s=a?null:{},l={dispose:[],get:[],set:[],reset:[]},f=new Map,c=()=>{r=new Map(Object.entries(o())),a||_(),l.reset.forEach((e=>e()))},d=e=>(l.get.forEach((t=>t(e))),r.get(e)),p=(e,o)=>{const n=r.get(e);t(o,n,e)&&(r.set(e,o),a||u(e),l.set.forEach((t=>t(e,o,n))))},b=a?new Proxy(n,{get:(e,t)=>d(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,o)=>(p(t,o),!0)}):(_(),s),h=(e,t)=>(l[e].push(t),()=>{i(l[e],t)});function u(e){!a&&s&&(Object.prototype.hasOwnProperty.call(s,e)||Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:()=>d(e),set(t){p(e,t)}}))}function _(){if(a||!s)return;const e=new Set(r.keys());for(const t of Object.keys(s))e.has(t)||delete s[t];for(const t of e)u(t)}return{state:b,get:d,set:p,on:h,onChange:(e,t)=>{const n=(o,n)=>{o===e&&t(n)},i=()=>{const n=o();t(n[e])},r=h("set",n),a=h("reset",i);return f.set(t,{setHandler:n,resetHandler:i,propName:e}),()=>{r(),a(),f.delete(t)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(h("set",t.set)),t.get&&e.push(h("get",t.get)),t.reset&&e.push(h("reset",t.reset)),t.dispose&&e.push(h("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{l.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=r.get(e);l.set.forEach((o=>o(e,t,t)))},removeListener:(e,t)=>{const o=f.get(t);o&&o.propName===e&&(i(l.set,o.setHandler),i(l.reset,o.resetHandler),f.delete(t))}}})(e,r);return a.use((()=>{if("function"!=typeof n||"function"!=typeof o)return{};const e=o,i=n,r=new Map;return{dispose:()=>r.clear(),get:e=>{const t=i();t&&((e,t,o)=>{let n=e.get(t);n||(n=[],e.set(t,n)),n.some((e=>e.deref()===o))||n.push(new WeakRef(o))})(r,e,t)},set:o=>{const n=r.get(o);if(n){const t=n.filter((t=>{const o=t.deref();return!!o&&e(o)}));r.set(o,t)}t(r)},reset:()=>{r.forEach((t=>{t.forEach((t=>{const o=t.deref();o&&e(o)}))})),t(r)}}})()),a},a={global:{fontFamily:"'Noto Sans', sans-serif",fontSizePx:13.3333,fontColor:"#000000",fontBackgroundColor:"#ffffff"},"bn-text":{},"bn-chart-time":{scaleFactors:{scenarioOffset:.3,scenarioLabelToColumn:.3,labelToColumn:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,columnWidth:2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:3,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-chart-structure":{scaleFactors:{scenarioOffset:.3,scenarioLabelToBar:.1,labelToBar:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,barWidth:1.2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:1.9,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-tree":{edgeColor:"#404040",edgeWidth:1,operatorCircleRadius:10,operatorFontSizeScale:.9,operatorColor:"#404040"},"bn-grid":{headerBackground:"transparent",borderColor:"#A6A6A6",borderWidth:1,cellPadding:4}};function s(e,t,o=null){o=o||{},t=t?t+".":"";for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]&&null!==e[n]?s(e[n],t+n,o):o[t+n]=e[n]);return o}const l=["ORDER_asc","ORDER_desc","ac1","pp1","fc1","pl1","ac2","pp2","fc2","pl2","ac3","pp3","fc3","pl3","ac4","pp4","fc4","pl4","ibcssymbol_delta_ac","ibcssymbol_delta_generic","ibcssymbol_delta_ac_relative","ibcssymbol_delta_generic_relative"],f=s({global:{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",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" und ",in:"in"},"bn-chart":{},"bn-table":{in:"in",category:" ",operation:" ",there_of:"davon",part_of:"in % von",SUM_TOTAL:"❖",REST:"REST"}}),c=s({global:{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",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" and ",in:"in"},"bn-chart":{},"bn-table":{category:" ",operation:" ",there_of:"there of",part_of:"in % of",SUM_TOTAL:"❖",REST:"REST"}}),d=Object.keys(f||{}),p={_system:{de:f,en:c}},b=new WeakMap;function h(e){let t=b.get(e);return t||(t={datasources:r({}),datasets:r({}),datasetsMeta:r({}),componentStyles:r({_system:a}),internationalization:r(Object.assign({},p)),assets:r({}),context:r({locale:"en"})},b.set(e,t)),t}const u=new WeakMap;function _(e){const t=u.get(e);if(t)return t;const o=function(e){var t;let o=e.parentNode;for(;o;){if(o instanceof HTMLElement&&"bn-context"===(null===(t=o.nodeName)||void 0===t?void 0:t.toLowerCase()))return o;if(o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}}(e);if(!o)throw new Error(`[bn] <${e.localName}> must be inside a <bn-context>. No ancestor <bn-context> found.`);const n=h(o);return u.set(e,n),n}function y(e){u.delete(e)}export{d as B,l as a,h as b,y as c,s as f,_ as g}
@@ -0,0 +1 @@
1
+ import{m as r}from"./p-BYBpC0EO.js";var n=Uint8Array,a=Uint16Array,e=Int32Array,i=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),o=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),t=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,n){for(var i=new a(31),o=0;o<31;++o)i[o]=n+=1<<r[o-1];var t=new e(i[30]);for(o=1;o<30;++o)for(var f=i[o];f<i[o+1];++f)t[f]=f-i[o]<<5|o;return{b:i,r:t}},v=f(i,2),l=v.b,u=v.r;l[28]=258,u[258]=28;for(var c=f(o,0).b,w=new a(32768),d=0;d<32768;++d){var s=(43690&d)>>1|(21845&d)<<1;w[d]=((65280&(s=(61680&(s=(52428&s)>>2|(13107&s)<<2))>>4|(3855&s)<<4))>>8|(255&s)<<8)>>1}var h=function(r,n,e){for(var i=r.length,o=0,t=new a(n);o<i;++o)r[o]&&++t[r[o]-1];var f,v=new a(n);for(o=1;o<n;++o)v[o]=v[o-1]+t[o-1]<<1;if(e){f=new a(1<<n);var l=15-n;for(o=0;o<i;++o)if(r[o])for(var u=o<<4|r[o],c=n-r[o],d=v[r[o]-1]++<<c,s=d|(1<<c)-1;d<=s;++d)f[w[d]>>l]=u}else for(f=new a(i),o=0;o<i;++o)r[o]&&(f[o]=w[v[r[o]-1]++]>>15-r[o]);return f},p=new n(288);for(d=0;d<144;++d)p[d]=8;for(d=144;d<256;++d)p[d]=9;for(d=256;d<280;++d)p[d]=7;for(d=280;d<288;++d)p[d]=8;var m=new n(32);for(d=0;d<32;++d)m[d]=5;var b=h(p,9,1),g=h(m,5,1),k=function(r){for(var n=r[0],a=1;a<r.length;++a)r[a]>n&&(n=r[a]);return n},y=function(r,n,a){var e=n/8|0;return(r[e]|r[e+1]<<8)>>(7&n)&a},x=function(r,n){var a=n/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(7&n)},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],A=function(r,n,a){var e=new Error(n||E[r]);if(e.code=r,Error.captureStackTrace&&Error.captureStackTrace(e,A),!a)throw e;return e},T=new n(0);function U(r,a){var e,f,v=function(r){31==r[0]&&139==r[1]&&8==r[2]||A(6,"invalid gzip data");var n=r[3],a=10;4&n&&(a+=2+(r[10]|r[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!r[a++]);return a+(2&n)}(r);return v+8>r.length&&A(6,"invalid gzip data"),function(r,a,e,f){var v=r.length;if(!v||a.f&&!a.l)return e||new n(0);var u=!e,w=u||2!=a.i;u&&(e=new n(3*v));var d,s,p=function(r){var a=e.length;if(r>a){var i=new n(Math.max(2*a,r));i.set(e),e=i}},m=a.f||0,E=a.p||0,T=a.b||0,U=a.l,z=a.d,D=a.m,j=a.n,B=8*v;do{if(!U){m=y(r,E,1);var F=y(r,E+1,3);if(E+=3,!F){var I=r[(N=4+((E+7)/8|0))-4]|r[N-3]<<8,M=N+I;if(M>v){A(0);break}w&&p(T+I),e.set(r.subarray(N,M),T),a.b=T+=I,a.p=E=8*M,a.f=m;continue}if(1==F)U=b,z=g,D=9,j=5;else if(2==F){var O=y(r,E,31)+257,C=y(r,E+10,15)+4,Y=O+y(r,E+5,31)+1;E+=14;for(var q=new n(Y),G=new n(19),H=0;H<C;++H)G[t[H]]=y(r,E+3*H,7);E+=3*C;var J=k(G),K=(1<<J)-1,L=h(G,J,1);for(H=0;H<Y;){var N,P=L[y(r,E,K)];if(E+=15&P,(N=P>>4)<16)q[H++]=N;else{var Q=0,R=0;for(16==N?(R=3+y(r,E,3),E+=2,Q=q[H-1]):17==N?(R=3+y(r,E,7),E+=3):18==N&&(R=11+y(r,E,127),E+=7);R--;)q[H++]=Q}}var S=q.subarray(0,O),V=q.subarray(O);D=k(S),j=k(V),U=h(S,D,1),z=h(V,j,1)}else A(1);if(E>B){A(0);break}}w&&p(T+131072);for(var W=(1<<D)-1,X=(1<<j)-1,Z=E;;Z=E){var $=(Q=U[x(r,E)&W])>>4;if((E+=15&Q)>B){A(0);break}if(Q||A(2),$<256)e[T++]=$;else{if(256==$){Z=E,U=null;break}var _=$-254;$>264&&(_=y(r,E,(1<<(ar=i[H=$-257]))-1)+l[H],E+=ar);var rr=z[x(r,E)&X],nr=rr>>4;if(rr||A(3),E+=15&rr,V=c[nr],nr>3){var ar=o[nr];V+=x(r,E)&(1<<ar)-1,E+=ar}if(E>B){A(0);break}w&&p(T+131072);var er=T+_;if(T<V){var ir=0-V,or=Math.min(V,er);for(ir+T<0&&A(3);T<or;++T)e[T]=f[ir+T]}for(;T<er;++T)e[T]=e[T-V]}}a.l=U,a.p=Z,a.b=T,a.f=m,U&&(m=1,a.m=D,a.d=z,a.n=j)}while(!m);return T!=e.length&&u?(d=e,(null==(s=T)||s>d.length)&&(s=d.length),new n(d.subarray(0,s))):e.subarray(0,T)}(r.subarray(v,-8),{i:2},new n(((e=r)[(f=e.length)-4]|e[f-3]<<8|e[f-2]<<16|e[f-1]<<24)>>>0),a)}var z="undefined"!=typeof TextDecoder&&new TextDecoder;try{z.decode(T,{stream:!0})}catch(r){}function D(n){return r(n)}function j(r){const n=r.indexOf(":");if(-1===n)throw new Error("Invalid compressed format: missing ':' separator");const a=r.slice(0,n),e=r.slice(n+1),i=atob(e),o=new Uint8Array(i.length);for(let r=0;r<i.length;r++)o[r]=i.charCodeAt(r);const t=U(o);return{hash:a,json:(new TextDecoder).decode(t)}}export{D as c,j as d}
@@ -0,0 +1 @@
1
+ import{f as t}from"./p-Bnhh02CF.js";import{V as r}from"./p-1jFf17Vj.js";class s{adapt(r){return t.adaptDefaultString(r)}default(){return""}}class i{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,s,i){const e=r,h=s;[1,2,3,4].forEach((s=>{this._scenarioMap.set(t+s,{name:r+s,group:e,colorIndex:h,sortIndex:i+10*s})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(t){if(null==t)return"";const s=new r(t);return s.isValid?s.type+s.delta:t}}export{i as I,s as S}
@@ -0,0 +1 @@
1
+ var E,t,n,o,R;!function(E){E[E.ALL=-1]="ALL"}(E||(E={})),function(E){E[E.UP_TO_DATE=0]="UP_TO_DATE",E[E.DIRTY=1]="DIRTY"}(t||(t={})),function(E){E.LIST="list",E.SUM="sum",E.SUMNOTOTAL="sumnototal",E.OPT="opt",E.OPTNOTOTAL="optnototal"}(n||(n={})),function(E){E.ASC="asc",E.DESC="desc"}(o||(o={})),function(E){E.HEADER="HEADER",E.GROUPHEAD="GROUPHEAD",E.SEPERATORLINE="SEPERATORLINE",E.SUM="SUM",E.GROUPSUM="GROUP_SUM",E.DRILLELEMENT="DRILLELEMENT",E.STANDARD="STANDARD",E.PARTELEMENT="PARTELEMENT",E.ENTRY="ENTRY"}(R||(R={}));export{t as F,o as O,n as T,R as a}
@@ -1 +1 @@
1
- import{g as t,c as e}from"./p-DRikHQE-.js";import{r as s}from"./p-tzFCK9qn.js";import{g as a}from"./p-JNHhIe7t.js";const o=(t,e)=>{const s=[],a=[];for(const o of e)(t(o)?s:a).push(o);return[s,a]},r="WARN_use_dataset",n=(t,e)=>{const s=t.errors;if(s)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");s.addOrReplace({id:r,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else s.remove(r)},i=(r,i,u)=>{let d,f,c,p,l=[],m=[];const g=t=>{if(u){const e=p.datasetsMeta.get(t);e&&u(t,e)}},h=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,l]=o((t=>t.startsWith("$")),a(r).getAttribute("datasets").split(",")),n(r,m),l.forEach((t=>{i(t,p.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,p.datasources.get(t.substring(1)))})))}))})),w=r.connectedCallback;r.connectedCallback=()=>{const e=a(r);p=t(e),[m,l]=o((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),n(r,m),l.forEach((t=>{i(t,p.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,p.datasources.get(t.substring(1)))})),h.observe(e,{attributes:!0,attributeFilter:["datasets"]}),d=p.datasets.on("set",((t,e)=>{l.includes(t)&&i(t,e)})),f=p.datasources.on("set",((t,e)=>{m.includes("$"+t)&&i("$"+t,e)})),u&&(c=p.datasetsMeta.on("set",((t,e)=>{l.includes(t)&&u(t,e)}))),s(w,r)};const F=r.disconnectedCallback;return r.disconnectedCallback=()=>{h.disconnect(),s(d),s(f),s(c),e(a(r)),s(F,r)},t=>{l=t,t.forEach((t=>{i(t,p.datasets.get(t)),g(t)}))}};function u(t){const e=t.parentElement;if(!e)return{width:0,height:0};const s=getComputedStyle(e),a=e.clientWidth-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight),o=function(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e),s=t.overflowY;if("hidden"===s||"scroll"===s||"auto"===s)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const s=parseFloat(t.maxHeight);if(!isNaN(s)&&s>0)return Math.min(s,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=e.parentElement}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,a),height:Math.max(0,o)}}function d(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{u as g,d as p,i as w}
1
+ import{g as t,c as e}from"./p-CL1RYuNU.js";import{r as s}from"./p-DvvwfRQG.js";import{g as a}from"./p-JNHhIe7t.js";const o=(t,e)=>{const s=[],a=[];for(const o of e)(t(o)?s:a).push(o);return[s,a]},r="WARN_use_dataset",n=(t,e)=>{const s=t.errors;if(s)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");s.addOrReplace({id:r,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else s.remove(r)},i=(r,i,u)=>{let d,f,c,p,l=[],m=[];const g=t=>{if(u){const e=p.datasetsMeta.get(t);e&&u(t,e)}},h=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,l]=o((t=>t.startsWith("$")),a(r).getAttribute("datasets").split(",")),n(r,m),l.forEach((t=>{i(t,p.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,p.datasources.get(t.substring(1)))})))}))})),w=r.connectedCallback;r.connectedCallback=()=>{const e=a(r);p=t(e),[m,l]=o((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),n(r,m),l.forEach((t=>{i(t,p.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,p.datasources.get(t.substring(1)))})),h.observe(e,{attributes:!0,attributeFilter:["datasets"]}),d=p.datasets.on("set",((t,e)=>{l.includes(t)&&i(t,e)})),f=p.datasources.on("set",((t,e)=>{m.includes("$"+t)&&i("$"+t,e)})),u&&(c=p.datasetsMeta.on("set",((t,e)=>{l.includes(t)&&u(t,e)}))),s(w,r)};const y=r.disconnectedCallback;return r.disconnectedCallback=()=>{h.disconnect(),s(d),s(f),s(c),e(a(r)),s(y,r)},t=>{l=t,t.forEach((t=>{i(t,p.datasets.get(t)),g(t)}))}};function u(t){const e=t.parentElement;if(!e)return{width:0,height:0};const s=getComputedStyle(e),a=e.clientWidth-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight),o=function(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e),s=t.overflowY;if("hidden"===s||"scroll"===s||"auto"===s)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const s=parseFloat(t.maxHeight);if(!isNaN(s)&&s>0)return Math.min(s,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=e.parentElement}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,a),height:Math.max(0,o)}}function d(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{u as g,d as p,i as w}