@bino-bi/bn-template-engine 1.0.0-next.22 → 1.0.0-next.24

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 (212) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/index.esm.js +1 -0
  3. package/dist/bn-template-engine/{p-a4ea9a79.entry.js → p-03304284.entry.js} +1 -1
  4. package/dist/bn-template-engine/p-0b2e1661.entry.js +1 -0
  5. package/dist/bn-template-engine/{p-2d3ea756.entry.js → p-0fb02c57.entry.js} +1 -1
  6. package/dist/bn-template-engine/p-2fbc2d50.entry.js +1 -0
  7. package/dist/bn-template-engine/p-36f1c5f9.entry.js +1 -0
  8. package/dist/bn-template-engine/{p-2fba7c99.entry.js → p-4419db8f.entry.js} +1 -1
  9. package/dist/bn-template-engine/p-45508f1b.entry.js +1 -0
  10. package/dist/bn-template-engine/p-5d7a3a77.entry.js +1 -0
  11. package/dist/bn-template-engine/p-62cc95b7.entry.js +1 -0
  12. package/dist/bn-template-engine/p-686d8e44.entry.js +1 -0
  13. package/dist/bn-template-engine/{p-C5uvAEKI.js → p-B5Jd_eCX.js} +1 -1
  14. package/dist/bn-template-engine/{p-eEfqksk-.js → p-BbmobTg0.js} +1 -1
  15. package/dist/bn-template-engine/p-BcLsoDrW.js +1 -0
  16. package/dist/bn-template-engine/p-BcaI745G.js +1 -0
  17. package/dist/bn-template-engine/p-C5UYpZUU.js +2 -0
  18. package/dist/bn-template-engine/{p-6lOdN-fB.js → p-CG_Bcm6V.js} +1 -1
  19. package/dist/bn-template-engine/p-CTrNbSXN.js +1 -0
  20. package/dist/bn-template-engine/{p-fFtEvsY-.js → p-CWWWM-XC.js} +1 -1
  21. package/dist/bn-template-engine/{p-D1SJ10zl.js → p-CsJ84YRk.js} +1 -1
  22. package/dist/bn-template-engine/{p-BgIpdpfH.js → p-D5e8I9Qe.js} +1 -1
  23. package/dist/bn-template-engine/p-DVrDYxlh.js +1 -0
  24. package/dist/bn-template-engine/p-DjPXefnq.js +1 -0
  25. package/dist/bn-template-engine/{p-B4JfKvVT.js → p-DtLI_CzV.js} +1 -1
  26. package/dist/bn-template-engine/{p-D75i_YOP.js → p-EtT29btN.js} +1 -1
  27. package/dist/bn-template-engine/{p-DwYUTvvI.js → p-TuLpbB5O.js} +1 -1
  28. package/dist/bn-template-engine/{p-c3383557.entry.js → p-a5867a4c.entry.js} +1 -1
  29. package/dist/bn-template-engine/p-a8eb9ca0.entry.js +1 -0
  30. package/dist/bn-template-engine/{p-de29986f.entry.js → p-b27009eb.entry.js} +1 -1
  31. package/dist/bn-template-engine/{p-28d5c266.entry.js → p-f06c3703.entry.js} +1 -1
  32. package/dist/bn-template-engine/{p-93eaded3.entry.js → p-fcfbb329.entry.js} +1 -1
  33. package/dist/bn-template-engine/{p-CYE0I1Mx.js → p-qRZrT-U3.js} +1 -1
  34. package/dist/cjs/{AxisConfig-D7CAyPLO.js → AxisConfig-DwiNUyYG.js} +1 -1
  35. package/dist/cjs/{LabelCollisionManager-DkdQ9Xdg.js → LabelCollisionManager-Bv-xkeXw.js} +7 -4
  36. package/dist/cjs/{Order-IPfAP0q8.js → Order-2wRydarc.js} +1 -1
  37. package/dist/cjs/{SVGStyle-BD8jApd4.js → SVGStyle-DoxylrEQ.js} +12 -2
  38. package/dist/cjs/{SVGVariancesStyleGroup-BaWzR951.js → SVGVariancesStyleGroup-CiI4GeWe.js} +1 -1
  39. package/dist/cjs/{VarianceMeasure-BBWTgv2e.js → VarianceMeasure-CQlSRzlp.js} +4 -4
  40. package/dist/cjs/{XYChartDataRow-BoR0CTfl.js → XYChartDataRow-C2FdL58s.js} +4 -4
  41. package/dist/cjs/bn-asset_21.cjs.entry.js +1357 -240
  42. package/dist/cjs/bn-chart-bubble.cjs.entry.js +33 -13
  43. package/dist/cjs/bn-chart-bullet.cjs.entry.js +32 -12
  44. package/dist/cjs/bn-chart-scatter.cjs.entry.js +32 -12
  45. package/dist/cjs/bn-grid.cjs.entry.js +84 -7
  46. package/dist/cjs/bn-image.cjs.entry.js +6 -6
  47. package/dist/cjs/bn-internationalization.cjs.entry.js +4 -4
  48. package/dist/cjs/bn-ruleset.cjs.entry.js +4 -4
  49. package/dist/cjs/bn-template-engine.cjs.js +3 -3
  50. package/dist/cjs/bn-template.cjs.entry.js +2 -2
  51. package/dist/cjs/bn-text.cjs.entry.js +7 -7
  52. package/dist/cjs/bn-tree.cjs.entry.js +80 -6
  53. package/dist/cjs/{context-protocol-BBhT9B52.js → context-protocol-DcTEh1rq.js} +3 -1
  54. package/dist/cjs/diagnostics-CTgbq_Gc.js +107 -0
  55. package/dist/cjs/editor-companion.cjs.entry.js +2 -2
  56. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +6 -6
  57. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +6 -6
  58. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +6 -6
  59. package/dist/cjs/{index-CDKG4xmO.js → index-C1Z9vO7z.js} +61 -19
  60. package/dist/cjs/index.cjs.js +15 -0
  61. package/dist/cjs/loader.cjs.js +2 -2
  62. package/dist/cjs/{scaling-B6_M_HWH.js → scaling-Dsb5_NXy.js} +3 -3
  63. package/dist/cjs/svgChartElements-tDA43aYj.js +400 -0
  64. package/dist/cjs/{withBodyObserver-BKUE_ypL.js → withBodyObserver-DJO98AJ-.js} +2 -2
  65. package/dist/cjs/{withHasError-Cl2gTQzA.js → withHasError-BdDmiOXM.js} +1 -1
  66. package/dist/cjs/{withScalingGroup-D5clRvRe.js → withScalingGroup-CFIc5-6s.js} +3 -3
  67. package/dist/cjs/{withStyled-DuwvaDMp.js → withStyled-D0jLwCib.js} +5 -5
  68. package/dist/collection/collection-manifest.json +2 -2
  69. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +60 -1
  70. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +60 -1
  71. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +60 -1
  72. package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +6 -0
  73. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +204 -26
  74. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +101 -28
  75. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +65 -19
  76. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +5 -2
  77. package/dist/collection/components/bn-chart-time/bn-chart-time.js +239 -18
  78. package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +9 -3
  79. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +107 -22
  80. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +98 -15
  81. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +5 -2
  82. package/dist/collection/components/bn-context/bn-context.js +133 -1
  83. package/dist/collection/components/bn-grid/bn-grid.js +129 -1
  84. package/dist/collection/components/bn-table/bn-table.js +149 -5
  85. package/dist/collection/components/bn-table/ibcs-table.js +210 -40
  86. package/dist/collection/components/bn-table/utils/Table.js +21 -7
  87. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +18 -32
  88. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +4 -5
  89. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +4 -0
  90. package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +89 -0
  91. package/dist/collection/components/bn-tree/bn-tree.js +137 -0
  92. package/dist/collection/context/context-protocol.js +1 -1
  93. package/dist/collection/index.js +1 -0
  94. package/dist/collection/utils/autoFit.js +63 -0
  95. package/dist/collection/utils/constants.js +3 -3
  96. package/dist/collection/utils/layoutState/diagnostics.js +17 -0
  97. package/dist/collection/utils/layoutState/generic.js +37 -0
  98. package/dist/collection/utils/layoutState/geometry.js +44 -0
  99. package/dist/collection/utils/layoutState/identity.js +33 -0
  100. package/dist/collection/utils/layoutState/index.js +6 -0
  101. package/dist/collection/utils/layoutState/svgChartElements.js +200 -0
  102. package/dist/collection/utils/layoutState/types.js +13 -0
  103. package/dist/collection/utils/measurementHost.js +58 -0
  104. package/dist/collection/utils/model/styles/FontStyle.js +10 -0
  105. package/dist/components/LabelCollisionManager.js +1 -1
  106. package/dist/components/autoFit.js +1 -0
  107. package/dist/components/bn-chart-bubble.js +1 -1
  108. package/dist/components/bn-chart-bullet.js +1 -1
  109. package/dist/components/bn-chart-scatter.js +1 -1
  110. package/dist/components/bn-chart-structure.js +1 -1
  111. package/dist/components/bn-chart-time.js +1 -1
  112. package/dist/components/bn-context.js +1 -1
  113. package/dist/components/bn-grid.js +1 -1
  114. package/dist/components/bn-internationalization.js +1 -1
  115. package/dist/components/bn-table.js +1 -1
  116. package/dist/components/bn-tree.js +1 -1
  117. package/dist/components/context-protocol.js +1 -1
  118. package/dist/components/diagnostics.js +1 -0
  119. package/dist/components/geometry.js +1 -0
  120. package/dist/components/ibcs-chart-bubble2.js +1 -1
  121. package/dist/components/ibcs-chart-bullet2.js +1 -1
  122. package/dist/components/ibcs-chart-scatter2.js +1 -1
  123. package/dist/components/ibcs-chart-structure2.js +1 -1
  124. package/dist/components/ibcs-chart-time2.js +1 -1
  125. package/dist/components/ibcs-table2.js +1 -1
  126. package/dist/components/index.js +1 -1
  127. package/dist/components/main.js +1 -1
  128. package/dist/components/svgChartElements.js +1 -0
  129. package/dist/components/types.js +1 -0
  130. package/dist/esm/{AxisConfig-ByIP5J-9.js → AxisConfig-KqzWQbML.js} +1 -1
  131. package/dist/esm/{LabelCollisionManager-DaNiDiM9.js → LabelCollisionManager-585bQMtP.js} +7 -4
  132. package/dist/esm/{Order-BQeJE_yi.js → Order-DZVWjEL_.js} +1 -1
  133. package/dist/esm/{SVGStyle-BwBlY3Km.js → SVGStyle-OrPkzjcb.js} +12 -2
  134. package/dist/esm/{SVGVariancesStyleGroup-BpGW4CvN.js → SVGVariancesStyleGroup-DO5QJfRQ.js} +1 -1
  135. package/dist/esm/{VarianceMeasure-CE3N8Bea.js → VarianceMeasure-DDjChp8C.js} +4 -4
  136. package/dist/esm/{XYChartDataRow-DeMI1JKU.js → XYChartDataRow-Dn83Tqh9.js} +4 -4
  137. package/dist/esm/bn-asset_21.entry.js +1350 -233
  138. package/dist/esm/bn-chart-bubble.entry.js +31 -11
  139. package/dist/esm/bn-chart-bullet.entry.js +30 -10
  140. package/dist/esm/bn-chart-scatter.entry.js +30 -10
  141. package/dist/esm/bn-grid.entry.js +84 -7
  142. package/dist/esm/bn-image.entry.js +6 -6
  143. package/dist/esm/bn-internationalization.entry.js +4 -4
  144. package/dist/esm/bn-ruleset.entry.js +4 -4
  145. package/dist/esm/bn-template-engine.js +4 -4
  146. package/dist/esm/bn-template.entry.js +2 -2
  147. package/dist/esm/bn-text.entry.js +7 -7
  148. package/dist/esm/bn-tree.entry.js +80 -6
  149. package/dist/esm/{context-protocol-d8MHrEo8.js → context-protocol-B-vdGKeG.js} +2 -2
  150. package/dist/esm/diagnostics-CiquIw8B.js +99 -0
  151. package/dist/esm/editor-companion.entry.js +2 -2
  152. package/dist/esm/ibcs-chart-bubble.entry.js +6 -6
  153. package/dist/esm/ibcs-chart-bullet.entry.js +6 -6
  154. package/dist/esm/ibcs-chart-scatter.entry.js +6 -6
  155. package/dist/esm/{index-B_d-jp99.js → index-C5UYpZUU.js} +61 -19
  156. package/dist/esm/index.js +14 -0
  157. package/dist/esm/loader.js +3 -3
  158. package/dist/esm/{scaling-Bw8XyrFq.js → scaling-Dggyeqts.js} +3 -3
  159. package/dist/esm/svgChartElements-B3YClivG.js +395 -0
  160. package/dist/esm/{withBodyObserver-IokS6fHD.js → withBodyObserver-Cb9ZC5_J.js} +2 -2
  161. package/dist/esm/{withHasError-DW_vMDUp.js → withHasError-Bh1Viz52.js} +1 -1
  162. package/dist/esm/{withScalingGroup-CC3UcvC5.js → withScalingGroup-DNBSqRC0.js} +3 -3
  163. package/dist/esm/{withStyled-41rsCSM1.js → withStyled-DoNsbwS3.js} +5 -5
  164. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +10 -0
  165. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +10 -0
  166. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +10 -0
  167. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +33 -3
  168. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +9 -3
  169. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +38 -3
  170. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +36 -0
  171. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +10 -3
  172. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +38 -0
  173. package/dist/types/components/bn-context/bn-context.d.ts +14 -0
  174. package/dist/types/components/bn-grid/bn-grid.d.ts +10 -0
  175. package/dist/types/components/bn-table/bn-table.d.ts +26 -2
  176. package/dist/types/components/bn-table/ibcs-table.d.ts +31 -6
  177. package/dist/types/components/bn-table/utils/Table.d.ts +16 -1
  178. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +9 -1
  179. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +2 -0
  180. package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +51 -0
  181. package/dist/types/components/bn-tree/bn-tree.d.ts +10 -0
  182. package/dist/types/components.d.ts +65 -4
  183. package/dist/types/context/context-protocol.d.ts +5 -0
  184. package/dist/types/index.d.ts +1 -0
  185. package/dist/types/stencil-public-runtime.d.ts +1 -0
  186. package/dist/types/utils/autoFit.d.ts +79 -0
  187. package/dist/types/utils/constants.d.ts +3 -3
  188. package/dist/types/utils/layoutState/diagnostics.d.ts +7 -0
  189. package/dist/types/utils/layoutState/generic.d.ts +14 -0
  190. package/dist/types/utils/layoutState/geometry.d.ts +35 -0
  191. package/dist/types/utils/layoutState/identity.d.ts +22 -0
  192. package/dist/types/utils/layoutState/index.d.ts +6 -0
  193. package/dist/types/utils/layoutState/svgChartElements.d.ts +37 -0
  194. package/dist/types/utils/layoutState/types.d.ts +219 -0
  195. package/dist/types/utils/measurementHost.d.ts +9 -0
  196. package/dist/types/utils/model/styles/FontStyle.d.ts +7 -0
  197. package/package.json +1 -1
  198. package/dist/bn-template-engine/p-445c76cd.entry.js +0 -1
  199. package/dist/bn-template-engine/p-687032d5.entry.js +0 -1
  200. package/dist/bn-template-engine/p-7d1083f6.entry.js +0 -1
  201. package/dist/bn-template-engine/p-91e5dddf.entry.js +0 -1
  202. package/dist/bn-template-engine/p-B_d-jp99.js +0 -2
  203. package/dist/bn-template-engine/p-BjBz5cSL.js +0 -1
  204. package/dist/bn-template-engine/p-C8Q0lsaU.js +0 -1
  205. package/dist/bn-template-engine/p-CJThzFZm.js +0 -1
  206. package/dist/bn-template-engine/p-Da6p_F4J.js +0 -1
  207. package/dist/bn-template-engine/p-a8291de2.entry.js +0 -1
  208. package/dist/bn-template-engine/p-cda4322a.entry.js +0 -1
  209. package/dist/bn-template-engine/p-e49f9170.entry.js +0 -1
  210. package/dist/bn-template-engine/p-f275b9fe.entry.js +0 -1
  211. package/dist/cjs/layoutObserver-D8leSb4j.js +0 -199
  212. package/dist/esm/layoutObserver-DtZb2vdM.js +0 -196
@@ -1 +0,0 @@
1
- import{r as t,d as i,f as e,h as s,H as r,g as a}from"./p-B_d-jp99.js";import{a as n}from"./p-BgIpdpfH.js";import{w as l,a as o,g as h,p as u}from"./p-D75i_YOP.js";import{w as c,o as d}from"./p-Da6p_F4J.js";import{i as p,a as v,w as f,b as m,c as g}from"./p-D1SJ10zl.js";import{w as y,a as b}from"./p-B4JfKvVT.js";import{w as _}from"./p-C8Q0lsaU.js";import{r as x,s as w}from"./p-eEfqksk-.js";import{t as $,a as R,b as E,c as S,d as L,e as j,p as A}from"./p-6lOdN-fB.js";import"./p-C5uvAEKI.js";const C={rowGroup:0,category:1,subCategory:2},O=["ac","pp","fc","pl"],z=class{validateX(t){this.validateMeasureSpec("x",t,!0,(t=>$(t)))}validateY(t){this.validateMeasureSpec("y",t,!0,(t=>$(t)))}validateSize(t){this.validateMeasureSpec("size",t,!0,(t=>R(t))),this.validateSizeScaling()}validateShare(t){this.validateMeasureSpec("share",t,!1,(t=>E(t)))}validateCompareWith(t){const i="ERR_compareWith";p(t)||O.includes(t.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`compare-with: invalid value '${t}' — expected ${O.join("/")}; ignored.`})}validateLevel(t){const i="ERR_level",e=["auto","category","subcategory"];p(t)||e.includes(t.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`level: invalid value '${t}' — expected ${e.join("/")}; using 'auto'.`})}validateSeriesLevel(t){const i="ERR_seriesLevel",e=["auto","rowgroup","category","none"];p(t)||e.includes(t.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`series-level: invalid value '${t}' — expected ${e.join("/")}; using 'auto'.`})}validateFacet(t){this.validateObjectSpec("facet",t,(t=>S(t)))}validateLabels(t){this.validateObjectSpec("labels",t,(t=>L(t,this.labelDefaults())))}validateLegend(t){this.validateObjectSpec("legend",t,(t=>j(t)))}validateAspect(t){const i="ERR_aspect";p(t)||null!==this.parseAspect(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`aspect: invalid value '${t}' — expected "w:h" (e.g. "16:9"); using the default.`})}validateLimit(t){const i="ERR_limit";v(t)&&Number(t)>=0?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`limit: invalid value '${t}' — expected a non-negative integer; using 0.`})}validateScale(t){const i="ERR_scale";if(p(t))return void this.errors.remove(i);const{mode:e,factor:s}=u(t);"factor"===e&&(void 0===s||s<=0)?this.errors.addOrReplace({id:i,type:"warning",message:`scale: invalid value '${t}' — expected none/auto or a positive number.`}):this.errors.remove(i)}constructor(i){t(this,i),this.datasetName="",this.dataVersion=0,this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.activeErrors=new Set,this.pixelPerUnitGroupMap=new Map,this.chartTitle="",this.filter="",this.share="",this.compareWith="",this.level="auto",this.seriesLevel="auto",this.facet="",this.labels="",this.legend="",this.aspect="16:9",this.limit=0,this._autoScaleGuard=!1,this._lastObservedWidth=0,this.translateForInner=(t,i)=>this.t(t,i),f(this),y(this),l(this,(t=>{this.datasetName=(null==t?void 0:t.startsWith("$"))?t.substring(1):t||"",this.dataVersion=this.dataVersion+1}),((t,i)=>{this.datasetMeta=i})),this.errors=b(this),_(this),this.componentStyle=m(this),this.ruleSetConfig=c(this),this.t=o(this).t}componentWillLoad(){this.validateX(this.x),this.validateY(this.y),this.validateSize(this.size),this.validateShare(this.share),this.validateCompareWith(this.compareWith),this.validateLevel(this.level),this.validateSeriesLevel(this.seriesLevel),this.validateFacet(this.facet),this.validateLabels(this.labels),this.validateLegend(this.legend),this.validateAspect(this.aspect),this.validateLimit(this.limit),this.validateScale(this.scale)}componentDidRender(){const{mode:t}=u(this.scale);if("auto"!==t&&"empty"!==t){this._autoScaleGuard=!1;const t=h(this.element),i="WARN_overflow";return void(t.width>0&&this.element.scrollWidth>t.width+1?this.errors.addOrReplace({id:i,type:"warning",message:"Chart exceeds available space and will be cut off. Check the scale value."}):this.errors.remove(i))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const e=this.element,{width:s}=h(e);if(s<=0)return;this._lastObservedWidth=s;const r=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333})),a=e.scrollWidth,n=this.appliedScaleFactor;if(!Number.isFinite(a)||a<=s+1)return void this.errors.remove("AUTO_scale");const l=Math.max(.3,n*(s-1)/a);Math.abs(l-n)<.01||(e.style.setProperty("--bn-font-size",r*l+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${l.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,i((()=>{this.appliedScaleFactor=l})))}componentDidLoad(){this.layoutObserver=d(this.element,(()=>{if(this._autoScaleGuard)return;const{width:t}=h(this.element);t>0&&Math.abs(t-this._lastObservedWidth)>2&&(this._lastObservedWidth=t,e(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{width:t}=h(this.element);this._lastObservedWidth=t,e(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}labelDefaults(){return{points:"all",values:!0,max:12}}setBlockingError(t,i){null===i?(this.errors.remove(t),this.activeErrors.delete(t)):(this.errors.addOrReplace({id:t,type:"error",message:i}),this.activeErrors.add(t))}hasBlockingErrors(){return this.activeErrors.size>0}validateSizeScaling(){var t;const i=null===(t=this.prepareSize())||void 0===t?void 0:t.group;this.setBlockingError("ERR_xy_scale_group",void 0===i||this.pixelPerUnitGroupMap.has(i)?null:this.t(".bubble-scale-group-unknown",{group:i}))}validateMeasureSpec(t,i,e,s){var r;const a=`ERR_xy_json_${t}`,n=`ERR_xy_measure_${t}`,l=`WARN_xy_fields_${t}`,{data:o,parseError:h}=A(i,"measure");if(h)return this.setBlockingError(a,this.t(".xy-prop-json",{prop:t})),this.setBlockingError(n,null),void this.errors.remove(l);if(this.setBlockingError(a,null),null===o)return this.setBlockingError(n,e?this.t(".xy-measure-invalid",{prop:t,measure:""}):null),void this.errors.remove(l);const u=null!==(r=o.measure)&&void 0!==r?r:"";g(u)?this.setBlockingError(n,null):this.setBlockingError(n,this.t(".xy-measure-invalid",{prop:t,measure:u})),this.reportSpecIssues(l,t,s(o))}validateObjectSpec(t,i,e){const s=`ERR_xy_json_${t}`,r=`WARN_xy_fields_${t}`,{data:a,parseError:n}=A(i,null);if(n)return this.setBlockingError(s,this.t(".xy-prop-json",{prop:t})),void this.errors.remove(r);this.setBlockingError(s,null),null!==a?this.reportSpecIssues(r,t,e(a)):this.errors.remove(r)}reportSpecIssues(t,i,e){const s=[];null!==e&&e.invalidFields.length>0&&s.push(`invalid: ${e.invalidFields.join(", ")}`),null!==e&&e.unknownKeys.length>0&&s.push(`unknown: ${e.unknownKeys.join(", ")}`),s.length>0?this.errors.addOrReplace({id:t,type:"warning",message:`${i}: ignored sub-fields (${s.join("; ")}).`}):this.errors.remove(t)}prepareAxis(t,i){const{data:e,parseError:s}=A(i,"measure");if(s||null===e)return null;const{config:r}=$(e);return null!==r&&g(r.measure)?(void 0!==r.min&&void 0!==r.max&&r.min>=r.max?(this.errors.addOrReplace({id:`WARN_xy_domain_${t}`,type:"warning",message:`${t}: min must be smaller than max; the override is ignored.`}),r.min=void 0,r.max=void 0):this.errors.remove(`WARN_xy_domain_${t}`),r):null}prepareSize(){const{data:t,parseError:i}=A(this.size,"measure");if(i||null===t)return null;const{config:e}=R(t);return null!==e&&g(e.measure)?e:null}prepareShare(){const{data:t,parseError:i}=A(this.share,"measure");if(i||null===t)return null;const{config:e}=E(t);return null!==e&&g(e.measure)?e:null}prepareCompareFamily(){var t;const i=null===(t=this.compareWith)||void 0===t?void 0:t.trim().toLowerCase();return O.includes(i)?i:null}prepareLabels(){const t=this.labelDefaults(),{data:i,parseError:e}=A(this.labels,null);return e||null===i?{points:t.points,values:t.values,max:t.max}:L(i,t).config}prepareLegend(){const{data:t,parseError:i}=A(this.legend,null);return i||null===t?{show:!0,position:"right"}:j(t).config}prepareFacet(){const{data:t,parseError:i}=A(this.facet,null);return i||null===t?null:S(t).config}preparePointLevel(){var t,i;const e=null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase();if("category"===e)return"category";if("subcategory"===e)return"subCategory";const s=null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel;return"rowGroup"===s||"category"===s||"subCategory"===s?s:"category"}prepareSeriesLevel(t){var i;const e=null===(i=this.seriesLevel)||void 0===i?void 0:i.trim().toLowerCase();return"none"===e?null:"rowgroup"===e?"rowGroup":"category"===e||"subCategory"===t?"category":"category"===t?"rowGroup":null}validateCrossProp(t,i){const e=new Set;let s=!1;for(const i of t){if(void 0===i)continue;const t=x(i);null!==t&&("scenario"===t.kind?e.add(w(t.slot)):s=!0)}this.setBlockingError("ERR_xy_family",e.size>1?this.t(".xy-family-mixed",{families:[...e].join(", ")}):null);const r=this.prepareCompareFamily();this.setBlockingError("ERR_xy_compare_variance",null!==r&&s?this.t(".xy-compare-variance"):null),this.setBlockingError("ERR_xy_compare_family",null!==r&&1===e.size&&e.has(r)?`compare-with: '${r}' is already the primary scenario family.`:null);const a=this.preparePointLevel(),n=this.prepareSeriesLevel(a),l=null!==i?"rowgroup"===i.level?"rowGroup":"category":null;let o=null;if(null!==n&&C[n]>=C[a]&&(o=`series '${n}' vs point '${a}'`),null!==l){const t=null!=n?n:a;C[l]>=C[t]&&(o=`facet '${l}' vs '${t}'`)}this.setBlockingError("ERR_xy_level_order",null!==o?this.t(".xy-level-order",{detail:o}):null)}parseAspect(t){const i=/^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/.exec(null!=t?t:"");if(null===i)return null;const e=Number(i[1]),s=Number(i[2]);return e<=0||s<=0?null:e/s}prepareAspect(){var t;return null!==(t=this.parseAspect(this.aspect))&&void 0!==t?t:16/9}prepareLimit(){const t=Math.floor(Number(this.limit)||0);return t>0?t:0}prepareSizeAreaPerUnit(){var t;const i=null===(t=this.prepareSize())||void 0===t?void 0:t.group;if(void 0===i||!this.pixelPerUnitGroupMap.has(i))return 0;const e=this.pixelPerUnitGroupMap.get(i);if(!(e>0))return 0;const s=this.getEffectiveFontPx();return s*s/e}i18nLocalKeys(){return["no-data","axis.in","legend.title","legend.size","legend.compare"]}prepareI18n(){const t=new Map(this.i18nLocalKeys().map((t=>[t,this.t(".".concat(t))]))),i=new Map(n.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...t.entries()])}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{const e=i.global.fontSizePx*t;return{scaleFactors:i["bn-chart-bubble"].scaleFactors,fontStyles:{font:`${e}px ${i.global.fontFamily}`,size:e,color:i.global.fontColor,background:i.global.fontBackgroundColor,leading:1.8},axisStyles:i["bn-chart-bubble"].axisStyles,seriesColors:i["bn-chart-bubble"].seriesColors,padding:i["bn-chart-bubble"].padding}}))}getEffectiveScaleFactor(){const{mode:t,factor:i}=u(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getEffectiveFontPx(){return this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}))*this.getEffectiveScaleFactor()}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var e,s,r,a;const n=(null===(e=i.global)||void 0===e?void 0:e.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=i.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*t+"px","--bn-font-color":(null===(r=i.global)||void 0===r?void 0:r.fontColor)||"#000000","--bn-font-background":(null===(a=i.global)||void 0===a?void 0:a.fontBackgroundColor)||"#ffffff"}}))}getDataStructure(){const t={};for(const i of["ac","pp","fc","pl"])for(const e of[1,2,3,4])t[`${i}${e}`]={type:"number",isOptional:!0,description:""};const i={x:this.prepareAxis("x",this.x),y:this.prepareAxis("y",this.y),size:this.prepareSize(),share:this.prepareShare()};for(const[e,s]of Object.entries(i)){if(null===s)continue;const i=x(s.measure);null!==i&&("scenario"===i.kind?t[i.slot].description=`${e}: ${void 0!==s.label?s.label:s.measure}`:(t[i.measure.base].description=`${e}: ${s.measure} (base)`,t[i.measure.delta].description=`${e}: ${s.measure} (delta)`))}const e=this.prepareCompareFamily();if(null!==e)for(const[s,r]of Object.entries(i)){if(null===r||"share"===s)continue;const i=x(r.measure);if(null!==i&&"scenario"===i.kind){const r=e+i.slot.replace(/^[a-z]+/,"");""===t[r].description&&(t[r].description=`${s}: compareWith`)}}return{IBubbleChartDataRow:Object.assign({operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!0,description:""},rowGroupIndex:{type:"number",isOptional:!0,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!0,description:""},subCategoryIndex:{type:"number",isOptional:!0,description:""}},t)}}chartTemplate(){const t=this.prepareAxis("x",this.x),i=this.prepareAxis("y",this.y),e=this.prepareSize(),r=this.prepareShare(),a=this.prepareFacet();if(this.validateCrossProp([null==t?void 0:t.measure,null==i?void 0:i.measure,null==e?void 0:e.measure,null==r?void 0:r.measure],a),this.validateSizeScaling(),this.hasBlockingErrors()||null===t||null===i||null===e)return null;const n=this.preparePointLevel(),l=this.prepareI18n(),o=this.prepareStyle(),u=h(this.element).width;return s("ibcs-chart-bubble",{tableName:this.datasetName,dataVersion:this.dataVersion,chartTitle:this.chartTitle,x:t,y:i,size:e,share:r,compareFamily:this.prepareCompareFamily(),labels:this.prepareLabels(),legend:this.prepareLegend(),facet:a,pointLevel:n,seriesLevel:this.prepareSeriesLevel(n),aspect:this.prepareAspect(),limit:this.prepareLimit(),filter:this.filter,sizeAreaPerUnit:this.prepareSizeAreaPerUnit(),styles:o,i18n:l,containerWidth:u,ruleSetConfig:this.ruleSetConfig(),errors:this.errors,translate:this.translateForInner})}render(){return s(r,{key:"24a71177722409772ddf8e68df747d821173bd6d",style:this.getFontStyles()},s("div",{key:"8f36775425c700dc10e2901a964f6c1e23f524be",class:"container"},this.chartTemplate()))}get element(){return a(this)}static get watchers(){return{x:[{validateX:0}],y:[{validateY:0}],size:[{validateSize:0}],share:[{validateShare:0}],compareWith:[{validateCompareWith:0}],level:[{validateLevel:0}],seriesLevel:[{validateSeriesLevel:0}],facet:[{validateFacet:0}],labels:[{validateLabels:0}],legend:[{validateLegend:0}],aspect:[{validateAspect:0}],limit:[{validateLimit:0}],scale:[{validateScale:0}]}}};z.style=":host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column}";export{z as bn_chart_bubble}
@@ -1,2 +0,0 @@
1
- const t="bn-template-engine",e={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,constructableCSS:!0,cssAnnotations:!0,deserializer:!1,devTools:!1,element:!1,event:!1,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",initializeNextTick:!1,invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!0,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!0,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propChangeCallback:!0,propMutable:!0,propNumber:!0,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,serializer:!1,shadowDelegatesFocus:!1,shadowDom:!0,shadowSlotAssignmentManual:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!1,state:!0,style:!0,svg:!0,taskQueue:!0,transformTagName:!1,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0};var n={isDev:!!e.isDev,isBrowser:!0,isServer:!1,isTesting:!!e.isTesting},o=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(o||{}),s=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(s||{}),r="type",i="value",l="serialized:";function c(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var a,u,f=(t,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[s]])=>{if((e.state||e.prop)&&(31&s||32&s)){const e=t[o],s=c(Object.getPrototypeOf(t),o,!0)||Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(t,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.i.has(o)?t[o]=n.i.get(o):void 0!==e&&(t[o]=e)}}))},d=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},h=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.l=t,512&n.o.u&&(e.state||e.prop)&&f(t,n))},p=(t,n)=>{const o={u:0,$hostElement$:t,o:n,i:new Map,p:new Map};e.isDev&&(o.m=0),e.method&&e.lazyLoad&&(o.v=new Promise((t=>o.$=t))),e.asyncLoading&&(o.S=new Promise((t=>o.j=t)),t["s-p"]=[],t["s-rc"]=[]),e.lazyLoad&&(o.O=[]);const s=o;return t.__stencil__getHostRef=()=>s,!e.lazyLoad&&512&n.u&&(e.state||e.prop)&&f(t,o),s},m=(t,e)=>e in t,v=(t,e)=>(a||console.error)(t,e),g=e.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],$=(...t)=>console.error(...g,...t),b=(...t)=>console.warn(...g,...t),y=(...t)=>console.info(...g,...t),S=new Map,w=(t,n,o)=>{const s=t.C.replace(/-/g,"_"),r=t._;if(e.isDev&&"string"!=typeof r)return void $(`Trying to lazily load component <${t.C}> with style mode "${n.N}", but it does not exist.`);if(!r)return;const i=!e.hotModuleReplacement&&S.get(r);return i?i[s]:import(`./${r}.entry.js${e.hotModuleReplacement&&o?"?s-hmr="+o:""}`).then((t=>(e.hotModuleReplacement||S.set(r,t),t[s])),(t=>{v(t,n.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},j=new Map,x=[],O="s-id",C="sty-id",_="c-id",E="_stencilDocData",N={hostIds:0,rootLevelIds:0,staticComponents:new Set},k="slot-fb{display:contents}slot-fb[hidden]{display:none}",T="http://www.w3.org/1999/xlink",L=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],R="undefined"!=typeof window?window:{},M=R.HTMLElement||class{},A={u:0,k:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},D=e.shadowDom,I=t=>Promise.resolve(t),H=!!e.constructableCSS&&(()=>{try{return!!R.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),F=!!H&&(()=>!!R.document&&Object.getOwnPropertyDescriptor(R.document.adoptedStyleSheets,"length").writable)(),P=0,U=!1,B=[],z=[],V=[],W=(t,e)=>n=>{t.push(n),U||(U=!0,e&&4&A.u?q(X):A.raf(X))},Y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){v(t)}t.length=0},J=(t,e)=>{let n=0,o=0;for(;n<t.length&&(o=performance.now())<e;)try{t[n++](o)}catch(t){v(t)}n===t.length?t.length=0:0!==n&&t.splice(0,n)},X=()=>{if(e.asyncQueue&&P++,Y(B),e.asyncQueue){const t=2==(6&A.u)?performance.now()+14*Math.ceil(.1*P):1/0;J(z,t),J(V,t),z.length>0&&(V.push(...z),z.length=0),(U=B.length+z.length+V.length>0)?A.raf(X):P=0}else Y(z),(U=B.length>0)&&A.raf(X)},q=t=>I().then(t),K=W(B,!1),Q=W(z,!0),G=t=>{const e=new URL(t,A.k);return e.origin!==R.location.origin?e.href:e.pathname};function Z(t){const n={mode:"open"};e.shadowDelegatesFocus&&(n.delegatesFocus=!!(16&t.u)),e.shadowSlotAssignmentManual&&1024&t.u&&(n.slotAssignment="manual");const o=this.attachShadow(n);void 0===u&&(u=null),u&&(F?o.adoptedStyleSheets.push(u):o.adoptedStyleSheets=[...o.adoptedStyleSheets,u])}var tt=t=>{const e=Tt(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&nt(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!ot(t,it(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&Tt(t,"childNodes").length&&tt(t)}},et=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e};function nt(t,e,n){let o,s=0,r=[];for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||it(o)===n)&&(r.push(o),void 0!==n))return r;r=[...r,...nt(o.childNodes,e,n)]}return r}var ot=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let s=t;for(;s=s.nextSibling;)it(s)!==e||!n&&s["s-sr"]||o.push(s);return o},st=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,rt=(t,n,o,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const r=document.createTextNode("");if(r["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const i=n["s-cr"].parentNode,l=Tt(i,o?"prepend":"appendChild");if(e.hydrateClientSide&&void 0!==s){r["s-oo"]=s;const t=Tt(i,"childNodes"),e=[r];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>l.call(i,t)))}else l.call(i,r);t["s-ol"]=r,t["s-sh"]=n["s-hn"]},it=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function lt(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:et(s.childNodes)).forEach((t=>{o===it(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function ct(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function at(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=it(t)||"";return{slotNode:nt(Tt(e,"childNodes"),e.tagName,o)[0],slotName:o}}var ut=t=>{ft(t),dt(t),mt(t),pt(t),bt(t),vt(t),gt(t),$t(t),yt(t),St(t),ht(t)},ft=t=>{if(t.__cloneNode)return;const n=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const o=!!e.shadowDom&&this.shadowRoot&&D,s=n.call(this,!!o&&t);if(e.slot&&!o&&t){let t,n,o=0;const r=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],i=this.__childNodes||this.childNodes;for(;o<i.length;o++)t=i[o]["s-nr"],n=r.every((t=>!i[o][t])),t&&(e.appendChildSlotFix&&s.__appendChild?s.__appendChild(t.cloneNode(!0)):s.appendChild(t.cloneNode(!0))),n&&s.appendChild(i[o].cloneNode(!0))}return s}},dt=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:e,slotNode:n}=at(t,this);if(n){rt(t,n);const o=ot(n,e),s=o[o.length-1],r=Tt(s,"parentNode"),i=Tt(r,"insertBefore")(t,s.nextSibling);return ct(n),tt(this),i}return this.__appendChild(t)})},ht=t=>{t.__removeChild||(t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&nt(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void tt(this)):this.__removeChild(t)})},pt=t=>{t.__prepend||(t.__prepend=t.prepend,t.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const n=(e["s-sn"]=it(e))||"",o=nt(Tt(this,"childNodes"),this.tagName,n)[0];if(o){rt(e,o,!0);const t=ot(o,n)[0],s=Tt(t,"parentNode"),r=Tt(s,"insertBefore")(e,Tt(t,"nextSibling"));return ct(o),r}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.__prepend(e)}))})},mt=t=>{t.__append||(t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))})},vt=t=>{if(t.__insertAdjacentHTML)return;const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},gt=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},$t=t=>{t.__insertBefore||t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,e){const{slotName:n,slotNode:o}=at(t,this),s=this.__childNodes?this.childNodes:et(this.childNodes);if(o){let r=!1;if(s.forEach((s=>{if(s!==e&&null!==e);else{if(r=!0,null===e||n!==e["s-sn"])return void this.appendChild(t);if(n===e["s-sn"]){rt(t,o);const n=Tt(e,"parentNode");Tt(n,"insertBefore")(t,e),ct(o)}}})),r)return t}const r=null==e?void 0:e.__parentNode;return r&&!this.isSameNode(r)?this.appendChild(t):this.__insertBefore(t,e)})},bt=t=>{if(t.__insertAdjacentElement)return;const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},yt=t=>{kt("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:et(this.childNodes)).forEach((e=>t+=e.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:et(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},St=t=>{class e extends Array{item(t){return this[t]}}kt("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),kt("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),kt("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),kt("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...et(this.__childNodes)),t}})},wt=t=>{t&&void 0===t.__nextSibling&&globalThis.Node&&(jt(t),Ot(t),_t(t),t.nodeType===Node.ELEMENT_NODE&&(xt(t),Ct(t)))},jt=t=>{t&&!t.__nextSibling&&(kt("nextSibling",t),Object.defineProperty(t,"nextSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextSibling}}))},xt=t=>{t&&!t.__nextElementSibling&&(kt("nextElementSibling",t),Object.defineProperty(t,"nextElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextElementSibling}}))},Ot=t=>{t&&!t.__previousSibling&&(kt("previousSibling",t),Object.defineProperty(t,"previousSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousSibling}}))},Ct=t=>{t&&!t.__previousElementSibling&&(kt("previousElementSibling",t),Object.defineProperty(t,"previousElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousElementSibling}}))},_t=t=>{t&&!t.__parentNode&&(kt("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},Et=["children","nextElementSibling","previousElementSibling"],Nt=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function kt(t,e){if(!globalThis.Node||!globalThis.Element)return;let n;Et.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):Nt.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function Tt(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var Lt=0,Rt=(t,n="")=>{if(e.profile&&performance.mark){const e=`st:${t}:${n}:${Lt++}`;return performance.mark(e),()=>performance.measure(`[Stencil] ${t}() <${n}>`,e)}return()=>{}};function Mt(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var At=new WeakMap,Dt=(t,e,n)=>{let o=j.get(t);H&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,j.set(t,o)},It=(t,n,o)=>{var s,r,i;const l=Ft(n,o),c=j.get(l);if(!e.attachStyles||!R.document)return l;if(t=11===t.nodeType?t:R.document,c)if("string"==typeof c){let o,i=At.get(t=t.head||t);i||At.set(t,i=new Set);const a=(e.hydrateClientSide||e.hotModuleReplacement)&&t.querySelector(`[${C}="${l}"]`);if(a)a.textContent=c;else if(!i.has(l)){o=R.document.createElement("style"),o.textContent=c;const a=null!=(s=A.T)?s:Mt(R.document);if(null!=a&&o.setAttribute("nonce",a),(e.hydrateServerSide||e.hotModuleReplacement)&&(2&n.u||128&n.u||1&n.u)&&o.setAttribute(C,l),!(1&n.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(H){const e=new(null!=(r=t.defaultView)?r:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),F?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n&&!e.hotModuleReplacement?n.textContent=c+n.textContent:t.prepend(o)}else t.append(o);1&n.u&&t.insertBefore(o,null),4&n.u&&(o.textContent+=k),i&&i.add(l)}}else if(e.constructableCSS){let n=At.get(t);if(n||At.set(t,n=new Set),!n.has(l)){const o=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(c.constructor===o.CSSStyleSheet)s=c;else{s=new o.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)s.insertRule(c.cssRules[t].cssText,t)}if(F?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],n.add(l),e.hydrateClientSide&&"host"in t){const e=t.querySelector(`[${C}="${l}"]`);e&&Q((()=>e.remove()))}}}return l},Ht=t=>{const n=t.o,o=t.$hostElement$,s=n.u,r=Rt("attachStyles",n.C),i=It(e.shadowDom&&D&&o.shadowRoot?o.shadowRoot:o.getRootNode(),n,t.N);(e.shadowDom||e.scoped)&&e.cssAnnotations&&10&s&&(o["s-sc"]=i,o.classList.add(i+"-h")),r()},Ft=(t,n)=>"sc-"+(e.mode&&n&&32&t.u?t.C+"-"+n:t.C),Pt=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),Ut=()=>{if(!R.document)return;const t=R.document.querySelectorAll(`[${C}]`);let e=0;for(;e<t.length;e++)Dt(t[e].getAttribute(C),Pt(t[e].innerHTML),!0)},Bt=t=>"object"==(t=typeof t)||"function"===t,zt=(t,n,...o)=>{"string"==typeof t&&(t=Qn(t));let s=null,r=null,i=null,l=!1,c=!1;const a=[],u=n=>{for(let o=0;o<n.length;o++)s=n[o],Array.isArray(s)?u(s):null!=s&&"boolean"!=typeof s&&((l="function"!=typeof t&&!Bt(s))?s+="":e.isDev&&"function"!=typeof t&&void 0===s.u&&$("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),l&&c?a[a.length-1].L+=s:a.push(l?Vt(null,s):s),c=l)};if(u(o),n&&(e.isDev&&"input"===t&&Kt(n),e.vdomKey&&n.key&&(r=n.key),e.slotRelocation&&n.name&&(i=n.name),e.vdomClass)){const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}if(e.isDev&&a.some(Yt)&&$("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),e.vdomFunctional&&"function"==typeof t)return t(null===n?{}:n,a,Jt);const f=Vt(t,null);return f.R=n,a.length>0&&(f.M=a),e.vdomKey&&(f.A=r),e.slotRelocation&&(f.D=i),f},Vt=(t,n)=>{const o={u:0,I:t,L:null!=n?n:null,F:null,M:null};return e.vdomAttribute&&(o.R=null),e.vdomKey&&(o.A=null),e.slotRelocation&&(o.D=null),o},Wt={},Yt=t=>t&&t.I===Wt,Jt={forEach:(t,e)=>t.map(Xt).forEach(e),map:(t,e)=>t.map(Xt).map(e).map(qt)},Xt=t=>({vattrs:t.R,vchildren:t.M,vkey:t.A,vname:t.D,vtag:t.I,vtext:t.L}),qt=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),zt(t.vtag,e,...t.vchildren||[])}const e=Vt(t.vtag,t.vtext);return e.R=t.vattrs,e.M=t.vchildren,e.A=t.vkey,e.D=t.vname,e},Kt=t=>{const e=Object.keys(t),n=e.indexOf("value");if(-1===n)return;const o=e.indexOf("type"),s=e.indexOf("min"),r=e.indexOf("max"),i=e.indexOf("step");(n<o||n<s||n<r||n<i)&&b('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},Qt=(t,n,o,s,r,i,l,c=[])=>{let a,u,f,d;const h=r["s-sc"];if(1===i.nodeType){if(a=i.getAttribute(_),a&&(u=a.split("."),u[0]===l||"0"===u[0])){f=Zt({u:0,P:u[0],U:u[1],B:u[2],V:u[3],I:i.tagName.toLowerCase(),F:i,R:{class:i.className||""}}),n.push(f),i.removeAttribute(_),t.M||(t.M=[]),e.scoped&&h&&u[0]===l&&(i["s-si"]=h,f.R.class+=" "+h);const r=f.F.getAttribute("s-sn");"string"==typeof r&&("slot-fb"===f.I&&(te(r,u[2],f,i,t,n,o,s,c),e.scoped&&h&&i.classList.add(h)),f.F["s-sn"]=r,f.F.removeAttribute("s-sn")),void 0!==f.V&&(t.M[f.V]=f),t=f,s&&"0"===f.B&&(s[f.V]=f.F)}if(i.shadowRoot)for(d=i.shadowRoot.childNodes.length-1;d>=0;d--)Qt(t,n,o,s,r,i.shadowRoot.childNodes[d],l,c);const p=i.__childNodes||i.childNodes;for(d=p.length-1;d>=0;d--)Qt(t,n,o,s,r,p[d],l,c)}else if(8===i.nodeType)u=i.nodeValue.split("."),(u[1]===l||"0"===u[1])&&(a=u[0],f=Zt({P:u[1],U:u[2],B:u[3],V:u[4]||"0",F:i,R:null,M:null,A:null,D:null,I:null,L:null}),"t"===a?(f.F=re(i,3),f.F&&3===f.F.nodeType&&(f.L=f.F.textContent,n.push(f),i.remove(),l===f.P&&(t.M||(t.M=[]),t.M[f.V]=f),s&&"0"===f.B&&(s[f.V]=f.F))):"c"===a?(f.F=re(i,8),f.F&&8===f.F.nodeType&&(n.push(f),i.remove())):f.P===l&&("s"===a?te(i["s-sn"]=u[5]||"",u[2],f,i,t,n,o,s,c):"r"===a&&(e.shadowDom&&s?i.remove():e.slotRelocation&&(r["s-cr"]=i,i["s-cn"]=!0))));else if(t&&"style"===t.I){const e=Vt(null,i.textContent);e.F=i,e.V="0",t.M=[e]}return t},Gt=(t,e)=>{if(1===t.nodeType){const n=t[O]||t.getAttribute(O);n&&e.set(n,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)Gt(t.shadowRoot.childNodes[o],e);const s=t.__childNodes||t.childNodes;for(o=0;o<s.length;o++)Gt(s[o],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Zt=t=>({u:0,P:null,U:null,B:null,V:"0",F:null,R:null,M:null,A:null,D:null,I:null,L:null,...t});function te(t,n,o,s,r,i,l,c,a){s["s-sr"]=!0,o.D=t||null,o.I="slot";const u=(null==r?void 0:r.F)?r.F["s-id"]||r.F.getAttribute("s-id"):"";if(e.shadowDom&&c&&R.document){const e=o.F=R.document.createElement(o.I);o.D&&o.F.setAttribute("name",t),r.F.shadowRoot&&u&&u!==o.P?Tt(r.F,"insertBefore")(e,Tt(r.F,"children")[0]):Tt(Tt(s,"parentNode"),"insertBefore")(e,s),se(a,n,t,s,o.P),s.remove(),"0"===o.B&&(c[o.V]=o.F)}else{const e=o.F,i=u&&u!==o.P&&r.F.shadowRoot;se(a,n,t,s,i?u:o.P),lt(s),i&&r.F.insertBefore(e,r.F.children[0])}i.push(o),l.push(o),r.M||(r.M=[]),r.M[o.V]=o}var ee,ne,oe,se=(t,e,n,o,s)=>{var r,i;let l=o.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:o,node:l,hostId:s})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(i=l.nodeValue)?void 0:i.startsWith("s.")))},re=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},ie=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),le="-shadowcsshost",ce="-shadowcssslotted",ae="-shadowcsscontext",ue=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",fe=RegExp("("+le+ue,"gim"),de=RegExp("("+ae+ue,"gim"),he=RegExp("("+ce+ue,"gim"),pe=le+"-no-combinator",me=/-shadowcsshost-no-combinator([^\s]*)/,ve=[/::shadow/g,/::content/g],ge=/__part-(\d+)__/g,$e=/-shadowcsshost/gim,be=t=>{const e=ie(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")},ye=/\/\*\s*[\s\S]*?\*\//g,Se=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,we=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,je=/([{}])/g,xe=/(^.*?[^\\])??((:+)(.*)|$)/,Oe="%BLOCK%",Ce=(t,e)=>{const n=_e(t);let o=0;return n.escapedString.replace(we,((...t)=>{const s=t[2];let r="",i=t[4],l="";i&&i.startsWith("{"+Oe)&&(r=n.blocks[o++],i=i.substring(8),l="{");const c=e({selector:s,content:r});return`${t[1]}${c.selector}${t[3]}${l}${c.content}${i}`}))},_e=t=>{const e=t.split(je),n=[],o=[];let s=0,r=[];for(let t=0;t<e.length;t++){const i=e[t];"}"===i&&s--,s>0?r.push(i):(r.length>0&&(o.push(r.join("")),n.push(Oe),r=[]),n.push(i)),"{"===i&&s++}return r.length>0&&(o.push(r.join("")),n.push(Oe)),{escapedString:n.join(""),blocks:o}},Ee=(t,e,n)=>t.replace(e,((...t)=>{if(t[2]){const e=t[2].split(","),o=[];for(let s=0;s<e.length;s++){const r=e[s].trim();if(!r)break;o.push(n(pe,r,t[3]))}return o.join(",")}return pe+t[3]})),Ne=(t,e,n)=>t+e.replace(le,"")+n,ke=(t,e,n)=>e.indexOf(le)>-1?Ne(t,e,n):t+e+n+", "+e+" "+t+n,Te=(t,e)=>t.replace(xe,((t,n="",o,s="",r="")=>n+e+s+r)),Le=(t,e,n,o)=>Ce(t,(t=>{let s=t.selector,r=t.content;return"@"!==t.selector[0]?s=((t,e,n,o)=>t.split(",").map((t=>o&&t.indexOf("."+o)>-1?t.trim():((t,e)=>!(t=>(t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),RegExp("^("+t+")([>\\s~+[.,{:][\\s\\S]*)?$","m")))(e).test(t))(t,e)?((t,e,n)=>{const o="."+(e=e.replace(/\[is=([^\]]*)\]/g,((t,...e)=>e[0]))),s=t=>{let s=t.trim();if(!s)return"";if(t.indexOf(pe)>-1)s=((t,e,n)=>{if($e.lastIndex=0,$e.test(t)){const e="."+n;return t.replace(me,((t,n)=>Te(n,e))).replace($e,e+" ")}return e+" "+t})(t,e,n);else{const e=t.replace($e,"");e.length>0&&(s=Te(e,o))}return s},r=(t=>{const e=[];let n=0;return{content:(t=(t=t.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g,((t,o)=>{const s=`__part-${n}__`;return e.push(o),n++,s}))).replace(/(\[[^\]]*\])/g,((t,o)=>{const s=`__ph-${n}__`;return e.push(o),n++,s}))).replace(/(:nth-[-\w]+)(\([^)]+\))/g,((t,o,s)=>{const r=`__ph-${n}__`;return e.push(s),n++,o+r})),placeholders:e}})(t);let i,l="",c=0;const a=/( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;let u=!((t=r.content).indexOf(pe)>-1);for(;null!==(i=a.exec(t));){const e=i[1],n=t.slice(c,i.index).trim();u=u||n.indexOf(pe)>-1,l+=`${u?s(n):n} ${e} `,c=a.lastIndex}const f=t.substring(c);return u=!f.match(ge)&&(u||f.indexOf(pe)>-1),l+=u?s(f):f,((t,e)=>(e=e.replace(/__part-(\d+)__/g,((e,n)=>t[+n]))).replace(/__ph-(\d+)__/g,((e,n)=>t[+n])))(r.placeholders,l)})(t,e,n).trim():t.trim())).join(", "))(t.selector,e,n,o):(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document"))&&(r=Le(t.content,e,n,o)),{selector:s.replace(/\s{2,}/g," ").trim(),content:r}})),Re=(t,e)=>t.replace(/-shadowcsshost-no-combinator/g,"."+e),Me=(t,e)=>{const n=e+"-h",o=e+"-s",s=(t=>t.match(Se)||[])(t);t=(t=>t.replace(ye,""))(t);const r=[];{const e=t=>{const e=`/*!@___${r.length}___*/`;return r.push({placeholder:e,comment:`/*!@${t.selector}*/`}),t.selector=e+t.selector,t};t=Ce(t,(t=>"@"!==t.selector[0]?e(t):t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")?(t.content=Ce(t.content,e),t):t))}const i=((t,e,n,o)=>{const s=((t,e)=>{const n="."+e+" > ",o=[];return t=t.replace(he,((...t)=>{if(t[2]){const e=t[2].trim(),s=n+e+t[3];let r="";for(let e=t[4]-1;e>=0;e--){const n=t[5][e];if("}"===n||","===n)break;r=n+r}const i=(r+s).trim(),l=`${r.trimEnd()}${s.trim()}`.trim();return i!==l&&o.push({orgSelector:i,updatedSelector:`${l}, ${i}`}),s}return pe+t[3]})),{selectors:o,cssText:t}})(t=(t=>Ee(t,de,ke))(t=(t=>Ee(t,fe,Ne))(t=(t=>{const e=[];t=t.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g,((t,n)=>{const o=`__supports_${e.length}__`;return e.push(n),`@supports selector(${o})`}));const n=be("::slotted"),o=be(":host"),s=be(":host-context");return t=t.replace(s,"$1"+ae).replace(o,"$1"+le).replace(n,"$1"+ce),e.forEach(((e,n)=>{t=t.replace(`__supports_${n}__`,e)})),t})(t))),o);return t=(t=>ve.reduce(((t,e)=>t.replace(e," ")),t))(t=s.cssText),e&&(t=Le(t,e,n,o)),{cssText:(t=(t=Re(t,n)).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),slottedSelectors:s.selectors.map((t=>({orgSelector:Re(t.orgSelector,n),updatedSelector:Re(t.updatedSelector,n)})))}})(t,e,n,o);return t=[i.cssText,...s].join("\n"),r.forEach((({placeholder:e,comment:n})=>{t=t.replace(e,n)})),i.slottedSelectors.forEach((e=>{const n=RegExp(ie(e.orgSelector)+"(?=\\s*[,{]|$)","g");t=t.replace(n,e.updatedSelector)})),t=(t=>{const e=/([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;return Ce(t,(t=>{if("@"===t.selector[0])return t;const n=t.selector.split(",").map((n=>{const o=[n.trim()];let s;for(;null!==(s=e.exec(n));){const e=s[1].trimEnd(),r=s[2].trim().split(/\s+/),i=s[3]||"",l=r.flatMap((e=>t.selector.includes(`[part~="${e}"]`)?[]:[`[part~="${e}"]`])).join(""),c=`${e} ${l}${i}`;l&&c!==n.trim()&&o.push(c)}return o.join(", ")}));return t.selector=n.join(", "),t}))})(t)},Ae=t=>x.map((e=>e(t))).find((t=>!!t)),De=class t{static fromLocalValue(e){const n=e[r],o=i in e?e[i]:void 0;switch(n){case"string":case"boolean":return o;case"bigint":return BigInt(o);case"undefined":return;case"null":return null;case"number":return"NaN"===o?NaN:"-0"===o?-0:"Infinity"===o?1/0:"-Infinity"===o?-1/0:o;case"array":return o.map((e=>t.fromLocalValue(e)));case"date":return new Date(o);case"map":const e=new Map;for(const[n,s]of o){const o="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(s);e.set(o,r)}return e;case"object":const s={};for(const[e,n]of o)s[e]=t.fromLocalValue(n);return s;case"regexp":const{pattern:r,flags:i}=o;return RegExp(r,i);case"set":const l=new Set;for(const e of o)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(o);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(r))return!1;const e=t[r];return!!Object.values({...o,...s}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(i))}},Ie=(t,n,o)=>(e.hydrateClientSide||e.hydrateServerSide)&&"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?De.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||Bt(t)?t:e.propBoolean&&4&n?(e.formAssociated&&o&&"string"==typeof t||"false"!==t)&&(""===t||!!t):e.propNumber&&2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:e.propString&&1&n?t+"":t,He=t=>{var n;return e.lazyLoad?null==(n=d(t))?void 0:n.$hostElement$:t},Fe=(t,e,n)=>{const o=A.ce(e,n);return t.dispatchEvent(o),o},Pe=(t,n,o,s,r,i,l)=>{if(o===s)return;let c=m(t,n),a=n.toLowerCase();if(e.vdomClass&&"class"===n){const n=t.classList,r=Be(o);let i=Be(s);if(e.hydrateClientSide&&(t["s-si"]||t["s-sc"])&&l){const e=t["s-sc"]||t["s-si"];i.push(e),r.forEach((t=>{t.startsWith(e)&&i.push(t)})),i=[...new Set(i)].filter((t=>t)),n.add(...i)}else n.remove(...r.filter((t=>t&&!i.includes(t)))),n.add(...i.filter((t=>t&&!r.includes(t))))}else if(e.vdomStyle&&"style"===n){if(e.updatable)for(const n in o)s&&null!=s[n]||(!e.hydrateServerSide&&n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)o&&s[n]===o[n]||(!e.hydrateServerSide&&n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if(e.vdomKey&&"key"===n);else if(e.vdomRef&&"ref"===n)s&&fn(s,t);else if(!e.vdomListener||(e.lazyLoad?c:t.__lookupSetter__(n))||"o"!==n[0]||"n"!==n[1]){if(e.vdomPropOrAttr&&"a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let r;if(e.member){const e=d(t);if(e&&e.o&&e.o.t){const t=e.o.t[o];t&&t[1]&&(r=t[1])}}return r||(r=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(r)||t.removeAttribute(r):t.setAttribute(r,!0===s?"":s))}if(e.vdomPropOrAttr&&"p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}if(e.vdomPropOrAttr){const l=Bt(s);if((c||l&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?c=!1:null!=o&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}let u=!1;e.vdomXlink&&a!==(a=a.replace(/^xlink\:?/,""))&&(n=a,u=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(n)||(e.vdomXlink&&u?t.removeAttributeNS(T,n):t.removeAttribute(n)):(!c||4&i||r)&&!l&&1===t.nodeType&&(s=!0===s?"":s,e.vdomXlink&&u?t.setAttributeNS(T,n,s):t.setAttribute(n,s))}}else if(n="-"===n[2]?n.slice(3):m(R,a)?a.slice(2):a[2]+n.slice(3),o||s){const e=n.endsWith(ze);n=n.replace(Ve,""),o&&A.rel(t,n,o,e),s&&A.ael(t,n,s,e)}},Ue=/\s/,Be=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ue):[]),ze="Capture",Ve=RegExp(ze+"$"),We=(t,n,o,s)=>{const r=11===n.F.nodeType&&n.F.host?n.F.host:n.F,i=t&&t.R||{},l=n.R||{};if(e.updatable)for(const t of Ye(Object.keys(i)))t in l||Pe(r,t,i[t],void 0,o,n.u,s);for(const t of Ye(Object.keys(l)))Pe(r,t,i[t],l[t],o,n.u,s)};function Ye(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Je=!1,Xe=!1,qe=!1,Ke=!1,Qe=[],Ge=[],Ze=(t,n,o)=>{var s;const r=n.M[o];let i,l,c,a=0;if(e.slotRelocation&&!Je&&(qe=!0,"slot"===r.I&&(r.u|=r.M?2:1)),e.isDev&&r.F&&$(`The JSX ${null!==r.L?`"${r.L}" text`:`"${r.I}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),e.vdomText&&null!=r.L)i=r.F=R.document.createTextNode(r.L);else if(e.slotRelocation&&1&r.u)i=r.F=e.isDebug||e.hydrateServerSide?mn(r):R.document.createTextNode(""),e.vdomAttribute&&We(null,r,Ke);else{if(e.svg&&!Ke&&(Ke="svg"===r.I),!R.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(i=r.F=e.svg?R.document.createElementNS(Ke?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Je&&e.slotRelocation&&2&r.u?"slot-fb":r.I):R.document.createElement(!Je&&e.slotRelocation&&2&r.u?"slot-fb":r.I),e.svg&&Ke&&"foreignObject"===r.I&&(Ke=!1),e.vdomAttribute&&We(null,r,Ke),(e.scoped||e.hydrateServerSide)&&null!=ee&&void 0!==ee&&i["s-si"]!==ee&&i.classList.add(i["s-si"]=ee),r.M){const e="template"===r.I?i.content:i;for(a=0;a<r.M.length;++a)l=Ze(t,r,a),l&&e.appendChild(l)}e.svg&&("svg"===r.I?Ke=!1:"foreignObject"===i.tagName&&(Ke=!0))}return i["s-hn"]=oe,e.slotRelocation&&3&r.u&&(i["s-sr"]=!0,i["s-cr"]=ne,i["s-sn"]=r.D||"",i["s-rf"]=null==(s=r.R)?void 0:s.ref,lt(i),c=t&&t.M&&t.M[o],c&&c.I===r.I&&t.F&&tn(t.F),(e.scoped||e.hydrateServerSide)&&hn(ne,i,n.F,null==t?void 0:t.F)),i},tn=t=>{A.u|=1;const e=t.closest(oe.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(dn(e,t,null!=n?n:null),t["s-sh"]=void 0,qe=!0)}A.u&=-2},en=(t,e)=>{A.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===oe&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==oe&&o["s-ol"]&&(dn(rn(o).parentNode,o,rn(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,qe=!0),e&&en(o,e)}A.u&=-2},nn=(t,n,o,s,r,i)=>{let l,c=e.slotRelocation&&t["s-cr"]&&t["s-cr"].parentNode||t;for(e.shadowDom&&c.shadowRoot&&c.tagName===oe&&(c=c.shadowRoot),"template"===o.I&&(c=c.content);r<=i;++r)s[r]&&(l=Ze(null,o,r),l&&(s[r].F=l,dn(c,l,e.slotRelocation?rn(n):n)))},on=(t,n,o)=>{for(let s=n;s<=o;++s){const n=t[s];if(n){const t=n.F;un(n),t&&(e.slotRelocation&&(Xe=!0,t["s-ol"]?t["s-ol"].remove():en(t,!0)),t.remove())}}},sn=(t,n,o=!1)=>t.I===n.I&&(e.slotRelocation&&"slot"===t.I?t.D===n.D:e.vdomKey&&!o?t.A===n.A:(o&&!t.A&&n.A&&(t.A=n.A),!0)),rn=t=>t&&t["s-ol"]||t,ln=(t,n,o=!1)=>{const s=n.F=t.F,r=t.M,i=n.M,l=n.I,c=n.L;let a;e.vdomText&&null!=c?e.vdomText&&e.slotRelocation&&(a=s["s-cr"])?a.parentNode.textContent=c:e.vdomText&&t.L!==c&&(s.data=c):(e.svg&&(Ke="svg"===l||"foreignObject"!==l&&Ke),(e.vdomAttribute||e.reflect)&&(e.slot&&"slot"===l&&!Je&&t.D!==n.D&&(n.F["s-sn"]=n.D||"",tn(n.F.parentElement)),We(t,n,Ke,o)),e.updatable&&null!==r&&null!==i?((t,n,o,s,r=!1)=>{let i,l,c=0,a=0,u=0,f=0,d=n.length-1,h=n[0],p=n[d],m=s.length-1,v=s[0],g=s[m];const $="template"===o.I?t.content:t;for(;c<=d&&a<=m;)if(null==h)h=n[++c];else if(null==p)p=n[--d];else if(null==v)v=s[++a];else if(null==g)g=s[--m];else if(sn(h,v,r))ln(h,v,r),h=n[++c],v=s[++a];else if(sn(p,g,r))ln(p,g,r),p=n[--d],g=s[--m];else if(sn(h,g,r))!e.slotRelocation||"slot"!==h.I&&"slot"!==g.I||en(h.F.parentNode,!1),ln(h,g,r),dn($,h.F,p.F.nextSibling),h=n[++c],g=s[--m];else if(sn(p,v,r))!e.slotRelocation||"slot"!==h.I&&"slot"!==g.I||en(p.F.parentNode,!1),ln(p,v,r),dn($,p.F,h.F),p=n[--d],v=s[++a];else{if(u=-1,e.vdomKey)for(f=c;f<=d;++f)if(n[f]&&null!==n[f].A&&n[f].A===v.A){u=f;break}e.vdomKey&&u>=0?(l=n[u],l.I!==v.I?i=Ze(n&&n[a],o,u):(ln(l,v,r),n[u]=void 0,i=l.F),v=s[++a]):(i=Ze(n&&n[a],o,a),v=s[++a]),i&&(e.slotRelocation?dn(rn(h.F).parentNode,i,rn(h.F)):dn(h.F.parentNode,i,h.F))}c>d?nn(t,null==s[m+1]?null:s[m+1].F,o,s,a,m):e.updatable&&a>m&&on(n,c,d)})(s,r,n,i,o):null!==i?(e.updatable&&e.vdomText&&null!==t.L&&(s.textContent=""),nn(s,null,n,i,0,i.length-1)):!o&&e.updatable&&null!==r?on(r,0,r.length-1):e.hydrateClientSide&&o&&e.updatable&&null!==r&&null===i&&(n.M=r),e.svg&&Ke&&"svg"===l&&(Ke=!1))},cn=[],an=t=>{let e,n,o;const s=t.__childNodes||t.childNodes;for(const t of s){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(st(e,s)){let n=cn.find((t=>t.W===e));Xe=!0,e["s-sn"]=e["s-sn"]||s,n?(n.W["s-sh"]=t["s-hn"],n.Y=t):(e["s-sh"]=t["s-hn"],cn.push({Y:t,W:e})),e["s-sr"]&&cn.map((t=>{st(t.W,e["s-sn"])&&(n=cn.find((t=>t.W===e)),n&&!t.Y&&(t.Y=n.Y))}))}else cn.some((t=>t.W===e))||cn.push({W:e})}1===t.nodeType&&an(t)}},un=t=>{e.vdomRef&&(t.R&&t.R.ref&&Qe.push((()=>t.R.ref(null))),t.M&&t.M.map(un))},fn=(t,n)=>{e.vdomRef&&Ge.push((()=>t(n)))},dn=(t,n,o,s)=>{if(e.slotRelocation)if(e.scoped&&"string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])hn(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){e.experimentalSlotFixes&&11!==t.getRootNode().nodeType&&_t(n),t.insertBefore(n,o);const{slotNode:r}=at(n);return r&&!s&&ct(r),n}return t.__insertBefore?t.__insertBefore(n,o):null==t?void 0:t.insertBefore(n,o)};function hn(t,e,n,o){var s,r;let i;if(t&&"string"==typeof e["s-sn"]&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=e["s-si"]||t.parentNode["s-sc"])){const t=e["s-sn"],l=e["s-hn"];if(null==(s=n.classList)||s.add(i+"-s"),o&&(null==(r=o.classList)?void 0:r.contains(i+"-s"))){let e=(o.__childNodes||o.childNodes)[0],n=!1;for(;e;){if(e["s-sn"]!==t&&e["s-hn"]===l&&e["s-sr"]){n=!0;break}e=e.nextSibling}n||o.classList.remove(i+"-s")}}}var pn=(t,n,o=!1)=>{var s,r,i,l,c;const a=t.$hostElement$,u=t.o,f=t.J||Vt(null,null),d=Yt(n)?n:zt(null,null,n);if(oe=a.tagName,e.isDev&&Array.isArray(n)&&n.some(Yt))throw Error(`The <Host> must be the single root component.\nLooks like the render() function of "${oe.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);if(e.reflect&&u.X&&(d.R=d.R||{},u.X.forEach((([n,o])=>{d.R[o]=e.serializer&&t.p.has(n)?t.p.get(n):a[n]}))),o&&d.R)for(const t of Object.keys(d.R))a.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.R[t]=a[t]);if(d.I=null,d.u|=4,t.J=d,d.F=f.F=e.shadowDom&&a.shadowRoot||a,(e.scoped||e.shadowDom)&&(ee=a["s-sc"]),Je=D&&!!(1&u.u)&&!(128&u.u),e.slotRelocation&&(ne=a["s-cr"],Xe=!1),ln(f,d,o),e.slotRelocation){if(A.u|=1,qe){an(d.F);for(const t of cn){const n=t.W;if(!n["s-ol"]&&R.document){const t=e.isDebug||e.hydrateServerSide?vn(n):R.document.createTextNode("");t["s-nr"]=n,dn(n.parentNode,n["s-ol"]=t,n,o)}}for(const t of cn){const n=t.W,c=t.Y;if(1===n.nodeType&&o&&(n["s-ih"]=null!=(s=n.hidden)&&s),c){const t=c.parentNode;let s=c.nextSibling;if(!e.hydrateServerSide&&s&&1===s.nodeType){let e=null==(r=n["s-ol"])?void 0:r.previousSibling;for(;e;){let o=null!=(i=e["s-nr"])?i:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){s=o;break}}e=e.previousSibling}}if((!s&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==s)&&n!==s){if(dn(t,n,s,o),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=R.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,dn(n.parentNode,t,n,o),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(l=n["s-ih"])&&l)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}Xe&&tt(d.F),A.u&=-2,cn.length=0}if(e.slotRelocation&&!Je&&!(1&u.u)&&a["s-cr"]){const t=d.F.__childNodes||d.F.childNodes;for(const e of t)if(e["s-hn"]!==oe&&!e["s-sh"])if(o&&null==e["s-ih"]&&(e["s-ih"]=null!=(c=e.hidden)&&c),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=R.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],dn(e.parentNode,t,e,o),e.parentNode.removeChild(e)}}ne=void 0,e.vdomRef&&(Qe.forEach((t=>t())),Qe.length=0,Ge.forEach((t=>t())),Ge.length=0)},mn=t=>{var e;return null==(e=R.document)?void 0:e.createComment(`<slot${t.D?' name="'+t.D+'"':""}> (host=${oe.toLowerCase()})`)},vn=t=>{var e;return null==(e=R.document)?void 0:e.createComment("org-location for "+(t.localName?`<${t.localName}> (host=${t["s-hn"]})`:`[${t.textContent}]`))},gn=(t,n)=>{if(e.asyncLoading&&n&&!t.q&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.q=()=>{n["s-p"].splice(e-1,1),o()})))}},$n=(t,n)=>{if(e.taskQueue&&e.updatable&&(t.u|=16),e.asyncLoading&&4&t.u)return void(t.u|=512);gn(t,t.K);const o=()=>bn(t,n);if(!n)return e.taskQueue?Q(o):o();queueMicrotask((()=>{o()}))},bn=(t,n)=>{const o=t.$hostElement$,s=Rt("scheduleUpdate",t.o.C),r=e.lazyLoad?t.l:o;if(!r)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return n?(e.lazyLoad&&(e.slotRelocation&&t.G&&(t.G=!1,En(r,"connectedCallback",void 0,o)),e.hostListener&&(t.u|=256,t.Z&&(t.Z.map((([t,e])=>En(r,t,e,o))),t.Z=void 0)),t.O.length&&t.O.forEach((t=>t(o)))),Nn(o,"componentWillLoad"),i=En(r,"componentWillLoad",void 0,o)):(Nn(o,"componentWillUpdate"),i=En(r,"componentWillUpdate",void 0,o)),Nn(o,"componentWillRender"),i=yn(i,(()=>En(r,"componentWillRender",void 0,o))),s(),yn(i,(()=>wn(t,r,n)))},yn=(t,e)=>Sn(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Sn=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,wn=async(t,n,o)=>{var s;const r=t.$hostElement$,i=Rt("update",t.o.C),l=r["s-rc"];e.style&&o&&Ht(t);const c=Rt("render",t.o.C);if(e.isDev&&(t.u|=1024),e.hydrateServerSide?await xn(t,n,r,o):xn(t,n,r,o),e.isDev&&(t.m=void 0===t.m?1:t.m+1,t.u&=-1025),e.hydrateServerSide)try{Tn(r),o&&(1&t.o.u?r["s-en"]="":2&t.o.u&&(r["s-en"]="c"))}catch(t){v(t,r)}if(e.asyncLoading&&l&&(l.map((t=>t())),r["s-rc"]=void 0),c(),i(),e.asyncLoading){const e=null!=(s=r["s-p"])?s:[],n=()=>On(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}else On(t)},jn=null,xn=(t,n,o,s)=>{const r=!!e.allRenderFn,i=!!e.lazyLoad,l=!!e.taskQueue,c=!!e.updatable;try{if(jn=n,n=(r||n.render)&&n.render(),c&&l&&(t.u&=-17),(c||i)&&(t.u|=2),e.hasRenderFn||e.reflect)if(e.vdomRender||e.reflect){if(e.hydrateServerSide)return Promise.resolve(n).then((e=>pn(t,e,s)));pn(t,n,s)}else 1&t.o.u?o.shadowRoot.textContent=n:o.textContent=n}catch(e){v(e,t.$hostElement$)}return jn=null,null},On=t=>{const n=t.o.C,o=t.$hostElement$,s=Rt("postUpdate",n),r=e.lazyLoad?t.l:o,i=t.K;e.isDev&&(t.u|=1024),En(r,"componentDidRender",void 0,o),e.isDev&&(t.u&=-1025),Nn(o,"componentDidRender"),64&t.u?(e.isDev&&(t.u|=1024),En(r,"componentDidUpdate",void 0,o),e.isDev&&(t.u&=-1025),Nn(o,"componentDidUpdate"),s()):(t.u|=64,e.asyncLoading&&e.cssAnnotations&&kn(o),e.isDev&&(t.u|=2048),En(r,"componentDidLoad",void 0,o),e.isDev&&(t.u&=-2049),Nn(o,"componentDidLoad"),s(),e.asyncLoading&&(t.j(o),i||_n(n))),e.method&&e.lazyLoad&&t.$(o),e.asyncLoading&&(t.q&&(t.q(),t.q=void 0),512&t.u&&q((()=>$n(t,!1))),t.u&=-517)},Cn=t=>{var o;if(e.updatable&&(n.isBrowser||n.isTesting)){const e=d(t),n=null==(o=null==e?void 0:e.$hostElement$)?void 0:o.isConnected;return n&&2==(18&e.u)&&$n(e,!1),n}return!1},_n=n=>{var o;e.asyncQueue&&(A.u|=2),q((()=>Fe(R,"appload",{detail:{namespace:t}}))),e.hydrateClientSide&&(null==(o=A.tt)?void 0:o.size)&&A.tt.clear(),e.profile&&performance.measure&&performance.measure(`[Stencil] ${t} initial load (by ${n})`,"st:app:start")},En=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){v(t,o)}},Nn=(n,o)=>{e.lifecycleDOMEvents&&Fe(n,"stencil_"+o,{bubbles:!0,composed:!0,detail:{namespace:t}})},kn=t=>{var n,o;return e.hydratedClass?t.classList.add(null!=(n=e.hydratedSelectorName)?n:"hydrated"):e.hydratedAttribute?t.setAttribute(null!=(o=e.hydratedSelectorName)?o:"hydrated",""):void 0},Tn=t=>{const e=t.children;if(null!=e)for(let t=0,n=e.length;t<n;t++){const n=e[t];"function"==typeof n.connectedCallback&&n.connectedCallback(),Tn(n)}},Ln=(t,e)=>d(t).i.get(e),Rn=(t,n,o,s)=>{const r=d(t);if(!r)return;if(e.lazyLoad&&!r)throw Error(`Couldn't find host element for "${s.C}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);if(e.serializer&&r.p.has(n)&&r.p.get(n)===o)return;const i=e.lazyLoad?r.$hostElement$:t,l=r.i.get(n),c=r.u,a=e.lazyLoad?r.l:i;if(o=Ie(o,s.t[n][0],e.formAssociated&&!!(64&s.u)),!(e.lazyLoad&&8&c&&void 0!==l||o===l||Number.isNaN(l)&&Number.isNaN(o))){if(r.i.set(n,o),e.serializer&&e.reflect&&s.X&&s.et&&s.et[n]){const t=t=>{let e=o;for(const o of s.et[n]){const[[s]]=Object.entries(o);e=t[s](e,n)}r.p.set(n,e)};a?t(a):r.O.push((()=>{t(r.l)}))}if(e.isDev&&(1024&r.u?b(`The state/prop "${n}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",i,"\nNew value",o,"\nOld value",l):2048&r.u&&b(`The state/prop "${n}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",i,"\nNew value",o,"\nOld value",l)),e.propChangeCallback&&s.nt){const t=s.nt[n];t&&t.map((t=>{try{const[[e,s]]=Object.entries(t);(128&c||1&s)&&(a?a[e](o,l,n):r.O.push((()=>{r.l[e](o,l,n)})))}catch(t){v(t,i)}}))}if(e.updatable&&2&c){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,l,n)&&!(16&c))return;16&c||$n(r,!1)}}},Mn=(t,n,o)=>{var s,r;const i=t.prototype;if(e.isTesting){if(i.__stencilAugmented)return;i.__stencilAugmented=!0}if(e.formAssociated&&64&n.u&&1&o&&L.forEach((t=>{const n=i[t];Object.defineProperty(i,t,{value(...o){var s;const r=d(this),i=e.lazyLoad?null==r?void 0:r.l:this;if(i){const s=e.lazyLoad?i[t]:n;"function"==typeof s&&s.call(i,...o)}else null==(s=null==r?void 0:r.S)||s.then((e=>{const n=e[t];"function"==typeof n&&n.call(e,...o)}))}})})),e.member&&n.t||e.propChangeCallback){e.propChangeCallback&&(t.watchers&&!n.nt&&(n.nt=t.watchers),t.deserializers&&!n.ot&&(n.ot=t.deserializers),t.serializers&&!n.et&&(n.et=t.serializers));const l=Object.entries(null!=(s=n.t)?s:{});if(l.map((([t,[s]])=>{if((e.prop||e.state)&&(31&s||(!e.lazyLoad||2&o)&&32&s)){const{get:r,set:l}=c(i,t)||{};r&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),(1&o||!r)&&Object.defineProperty(i,t,{get(){if(e.lazyLoad){if(!(2048&n.t[t][0]))return Ln(this,t);const e=d(this),o=e?e.l:i;if(!o)return;return o[t]}if(!e.lazyLoad)return r?r.apply(this):Ln(this,t)},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(r){const i=d(this);if(i){if(e.isDev&&(1&o||4096&n.t[t][0]||0!==(i&&8&i.u)||!(31&s)||1024&s||b(`@Prop() "${t}" on <${n.C}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`)),l)return void 0===(32&s?this[t]:i.$hostElement$[t])&&i.i.get(t)&&(r=i.i.get(t)),l.call(this,Ie(r,s,e.formAssociated&&!!(64&n.u))),void Rn(this,t,r=32&s?this[t]:i.$hostElement$[t],n);if(e.lazyLoad){if(e.lazyLoad){if(!(1&o&&4096&n.t[t][0]))return Rn(this,t,r,n),void(1&o&&!i.l&&i.O.push((()=>{4096&n.t[t][0]&&i.l[t]!==i.i.get(t)&&(i.l[t]=r)})));const l=()=>{const o=i.l[t];!i.i.get(t)&&o&&i.i.set(t,o),i.l[t]=Ie(r,s,e.formAssociated&&!!(64&n.u)),Rn(this,t,i.l[t],n)};i.l?l():i.O.push((()=>{l()}))}}else Rn(this,t,r,n)}}})}else e.lazyLoad&&e.method&&1&o&&64&s&&Object.defineProperty(i,t,{value(...e){var n;const o=d(this);return null==(n=null==o?void 0:o.v)?void 0:n.then((()=>{var n;return null==(n=o.l)?void 0:n[t](...e)}))}})})),e.observeAttribute&&(!e.lazyLoad||1&o)){const o=new Map;i.attributeChangedCallback=function(t,s,r){A.jmp((()=>{var c;const a=o.get(t),u=d(this);if(e.serializer&&u.p.has(a)&&u.p.get(a)===r)return;if(this.hasOwnProperty(a)&&e.lazyLoad&&(r=this[a],delete this[a]),e.deserializer&&n.ot&&n.ot[a]){const t=(t,e)=>{const n=null==e?void 0:e[t](r,a);n!==this[a]&&(this[a]=n)};for(const o of n.ot[a]){const[[n]]=Object.entries(o);e.lazyLoad?u.l?t(n,u.l):u.O.push((()=>{t(n,u.l)})):t(n,this)}return}if(i.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==r)return;if(null==a){const o=null==u?void 0:u.u;if(u&&o&&!(8&o)&&r!==s){const i=e.lazyLoad?u.l:e.lazyLoad?u.$hostElement$:this,l=null==(c=n.nt)?void 0:c[t];null==l||l.forEach((e=>{const[[n,l]]=Object.entries(e);null!=i[n]&&(128&o||1&l)&&i[n].call(i,r,s,t)}))}return}const f=l.find((([t])=>t===a));f&&4&f[1][0]&&(r=null!==r&&"false"!==r);const h=Object.getOwnPropertyDescriptor(i,a);r==this[a]||h.get&&!h.set||(this[a]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=n.nt)?r:{}),...l.filter((([t,e])=>31&e[0])).map((([t,s])=>{var r;const i=s[1]||t;return o.set(i,t),e.reflect&&512&s[0]&&(null==(r=n.X)||r.push([t,i])),i}))]))}}return t},An=async(t,n,o,s)=>{let r;try{if(!(32&n.u)){if(n.u|=32,e.lazyLoad&&o._){const i=w(o,n,s);if(i&&"then"in i){const t=((t,n)=>e.profile&&performance.mark?(0===performance.getEntriesByName(t,"mark").length&&performance.mark(t),()=>{0===performance.getEntriesByName(n,"measure").length&&performance.measure(n,t)}):()=>{})(`st:load:${o.C}:${n.N}`,`[Stencil] Load module for <${o.C}>`);r=await i,t()}else r=i;if(!r)throw Error(`Constructor for "${o.C}#${n.N}" was not found`);e.member&&!r.isProxied&&(e.propChangeCallback&&(o.nt=r.watchers,o.et=r.serializers,o.ot=r.deserializers),Mn(r,o,2),r.isProxied=!0);const l=Rt("createInstance",o.C);e.member&&(n.u|=8);try{new r(n)}catch(e){v(e,t)}e.member&&(n.u&=-9),e.propChangeCallback&&(n.u|=128),l(),e.slotRelocation&&4&o.u?n.G=!0:Dn(n.l,t)}else r=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(e.style&&r&&r.style){let i;"string"==typeof r.style?i=r.style:e.mode&&"string"!=typeof r.style&&(n.N=Ae(t),n.N&&(i=r.style[n.N]),e.hydrateServerSide&&n.N&&t.setAttribute("s-mode",n.N));const l=Ft(o,n.N);if(!j.has(l)||e.hotModuleReplacement&&s){const t=Rt("registerStyles",o.C);e.hydrateServerSide&&e.shadowDom&&128&o.u&&(i=Me(i,l)),Dt(l,i,!!(1&o.u)),t()}}}const i=n.K,l=()=>$n(n,!0);e.asyncLoading&&i&&i["s-rc"]?i["s-rc"].push(l):l()}catch(o){v(o,t),e.asyncLoading&&n.q&&(n.q(),n.q=void 0),e.asyncLoading&&n.j&&n.j(t)}},Dn=(t,n)=>{e.lazyLoad&&En(t,"connectedCallback",void 0,n)},In=t=>{if(!(1&A.u)){const n=d(t);if(!n)return;const o=n.o,s=Rt("connectedCallback",o.C);if(e.hostListenerTargetParent&&Vn(t,n,o.st,!0),1&n.u)Vn(t,n,o.st,!1),(null==n?void 0:n.l)?Dn(n.l,t):(null==n?void 0:n.S)&&n.S.then((()=>Dn(n.l,t)));else{let s;if(n.u|=1,e.hydrateClientSide&&(s=t.getAttribute(O),s)){if(e.shadowDom&&D&&1&o.u){const n=e.mode?It(t.shadowRoot,o,t.getAttribute("s-mode")):It(t.shadowRoot,o);t.classList.remove(n+"-h",n+"-s")}else if(e.scoped&&2&o.u){const n=Ft(o,e.mode?t.getAttribute("s-mode"):void 0);t["s-sc"]=n}((t,n,o,s)=>{var r,i,l,c;const a=Rt("hydrateClient",n),u=t.shadowRoot,f=[],h=[],p=[],m=e.shadowDom&&u?[]:null,v=Vt(n,null);let g;if(v.F=t,e.scoped){const e=s.o;e&&10&e.u&&t["s-sc"]?(g=t["s-sc"],t.classList.add(g+"-h")):t["s-sc"]&&delete t["s-sc"]}!R.document||A.tt&&A.tt.size||Gt(R.document.body,A.tt=new Map),t[O]=o,t.removeAttribute(O),s.J=Qt(v,f,h,m,t,t,o,p);let $=0;const b=f.length;let y;for(;$<b;$++){y=f[$];const o=y.P+"."+y.U,s=A.tt.get(o),i=y.F;if(u){if((null==(r=y.I)?void 0:(""+r).includes("-"))&&"slot-fb"!==y.I&&!y.F.shadowRoot){const t=d(y.F);if(t){const n=Ft(t.o,e.mode?y.F.getAttribute("s-mode"):void 0),o=R.document.querySelector(`style[sty-id="${n}"]`);o&&m.unshift(o.cloneNode(!0))}}}else i["s-hn"]=Qn(n).toUpperCase(),"slot"===y.I&&(i["s-cr"]=t["s-cr"]);"slot"===y.I&&(y.D=y.F["s-sn"]||y.F.name||null,y.M?(y.u|=2,y.F.childNodes.length||y.M.forEach((t=>{y.F.appendChild(t.F)}))):y.u|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(i,s.nextSibling),s.parentNode.removeChild(s),u||(i["s-oo"]=parseInt(y.U))),s&&!s["s-id"]&&A.tt.delete(o)}const S=[],w=p.length;let j,x,C,_,E=0,N=0;for(;E<w;E++)if(j=p[E],j&&j.length)for(C=j.length,x=0;x<C;x++){if(_=j[x],S[_.hostId]||(S[_.hostId]=A.tt.get(_.hostId)),!S[_.hostId])continue;const t=S[_.hostId];t.shadowRoot&&_.node.parentElement!==t&&t.insertBefore(_.node,null==(l=null==(i=j[x-1])?void 0:i.node)?void 0:l.nextSibling),t.shadowRoot&&u||(_.slot["s-cr"]||(_.slot["s-cr"]=t["s-cr"],_.slot["s-cr"]=!_.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),rt(_.node,_.slot,!1,_.node["s-oo"]||N),(null==(c=_.node.parentElement)?void 0:c.shadowRoot)&&_.node.getAttribute&&_.node.getAttribute("slot")&&_.node.removeAttribute("slot"),e.experimentalSlotFixes&&wt(_.node)),N=(_.node["s-oo"]||N)+1}if(e.scoped&&g&&h.length&&h.forEach((t=>{t.F.parentElement.classList.add(g+"-s")})),e.shadowDom&&u&&!u.childNodes.length){let e=0;const n=m.length;if(n){for(;e<n;e++){const t=m[e];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t,a()})(t,o.C,s,n)}if(e.slotRelocation&&!s&&(e.hydrateServerSide||(e.slot||e.shadowDom)&&12&o.u)&&Hn(t),e.asyncLoading){let o=t;for(;o=o.parentNode||o.host;)if(e.hydrateClientSide&&1===o.nodeType&&o.hasAttribute("s-id")&&o["s-p"]||o["s-p"]){gn(n,n.K=o);break}}e.prop&&!e.hydrateServerSide&&o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),e.initializeNextTick?q((()=>An(t,n,o))):An(t,n,o)}s()}},Hn=t=>{if(!R.document)return;const n=t["s-cr"]=R.document.createComment(e.isDebug?`content-ref (host=${t.localName})`:"");n["s-cn"]=!0,dn(t,n,t.firstChild)},Fn=(t,n)=>{e.lazyLoad&&En(t,"disconnectedCallback",void 0,n||t)},Pn=async t=>{if(!(1&A.u)){const n=d(t);e.hostListener&&(null==n?void 0:n.rt)&&(n.rt.map((t=>t())),n.rt=void 0),e.lazyLoad?(null==n?void 0:n.l)?Fn(n.l,t):(null==n?void 0:n.S)&&n.S.then((()=>Fn(n.l,t))):Fn(t)}At.has(t)&&At.delete(t),t.shadowRoot&&At.has(t.shadowRoot)&&At.delete(t.shadowRoot)},Un=(t,n)=>{const o={u:n[0],C:n[1]};try{e.member&&(o.t=n[2]),e.hostListener&&(o.st=n[3]),e.propChangeCallback&&(o.nt=t.nt,o.ot=t.ot,o.et=t.et),e.reflect&&(o.X=[]),e.shadowDom&&!D&&1&o.u&&(o.u|=8),!(1&o.u)&&256&o.u?e.experimentalSlotFixes?ut(t.prototype):(e.slotChildNodesFix&&St(t.prototype),e.cloneNodeFix&&ft(t.prototype),e.appendChildSlotFix&&dt(t.prototype),e.scopedSlotTextContentFix&&2&o.u&&yt(t.prototype)):e.cloneNodeFix&&ft(t.prototype),e.hydrateClientSide&&e.shadowDom&&Ut();const s=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){p(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=d(this);if(!t)return;Vn(this,t,o.st,!1),this.__hasHostListenerAttached=!0}In(this),s&&s.call(this)},disconnectedCallback(){Pn(this),r&&r.call(this)},__attachShadow(){if(D)if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.C}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Z.call(this,o);else this.shadowRoot=this}}),Object.defineProperty(t,"is",{value:o.C,configurable:!0}),Mn(t,o,3)}catch(e){return v(e),t}},Bn=(t,n={})=>{var o;if(e.profile&&performance.mark&&performance.mark("st:app:start"),(()=>{if(e.devTools){const t=R.stencil=R.stencil||{},e=t.inspect;t.inspect=t=>{let n=(t=>{const e=d(t);if(!e)return;const n=e.u,o=e.$hostElement$;return{renderCount:e.m,flags:{hasRendered:!!(2&n),hasConnected:!!(1&n),isWaitingForChildren:!!(4&n),isConstructingInstance:!!(8&n),isQueuedForUpdate:!!(16&n),hasInitializedComponent:!!(32&n),hasLoadedComponent:!!(64&n),isWatchReady:!!(128&n),isListenReady:!!(256&n),needsRerender:!!(512&n)},instanceValues:e.i,serializerValues:e.p,ancestorComponent:e.K,hostElement:o,lazyInstance:e.l,vnode:e.J,modeName:e.N,fetchedCbList:e.O,onReadyPromise:e.S,onReadyResolve:e.j,onInstancePromise:e.v,onInstanceResolve:e.$,onRenderResolve:e.q,queuedListeners:e.Z,rmListeners:e.rt,"s-id":o["s-id"],"s-cr":o["s-cr"],"s-lr":o["s-lr"],"s-p":o["s-p"],"s-rc":o["s-rc"],"s-sc":o["s-sc"]}})(t);return n||"function"!=typeof e||(n=e(t)),n}}})(),!R.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const s=Rt("bootstrapLazy"),r=[],i=n.exclude||[],l=R.customElements,c=R.document.head,a=c.querySelector("meta[charset]"),u=R.document.createElement("style"),f=[];let h,m=!0;Object.assign(A,n),A.k=new URL(n.resourcesUrl||"./",R.document.baseURI).href,e.asyncQueue&&n.syncQueue&&(A.u|=4),e.hydrateClientSide&&(A.u|=2),e.hydrateClientSide&&e.shadowDom&&Ut();let v=!1;if(t.map((t=>{t[1].map((o=>{var s,c,a;const u={u:o[0],C:o[1],t:o[2],st:o[3]};4&u.u&&(v=!0),e.member&&(u.t=o[2]),e.hostListener&&(u.st=o[3]),e.reflect&&(u.X=[]),e.propChangeCallback&&(u.nt=null!=(s=o[4])?s:{},u.et=null!=(c=o[5])?c:{},u.ot=null!=(a=o[6])?a:{}),e.shadowDom&&!D&&1&u.u&&(u.u|=8);const g=e.transformTagName&&n.transformTagName?n.transformTagName(u.C):Qn(u.C),$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),p(t=this,u),e.shadowDom&&1&u.u)if(D)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${u.C}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Z.call(t,u);else e.hydrateServerSide||"shadowRoot"in t||(t.shadowRoot=t)}connectedCallback(){const t=d(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Vn(this,t,u.st,!1)),h&&(clearTimeout(h),h=null),m?f.push(this):A.jmp((()=>In(this))))}disconnectedCallback(){A.jmp((()=>Pn(this))),A.raf((()=>{var t;const e=d(this);if(!e)return;const n=f.findIndex((t=>t===this));n>-1&&f.splice(n,1),(null==(t=null==e?void 0:e.J)?void 0:t.F)instanceof Node&&!e.J.F.isConnected&&delete e.J.F}))}componentOnReady(){var t;return null==(t=d(this))?void 0:t.S}};!(1&u.u)&&256&u.u?e.experimentalSlotFixes?ut($.prototype):(e.slotChildNodesFix&&St($.prototype),e.cloneNodeFix&&ft($.prototype),e.appendChildSlotFix&&dt($.prototype),e.scopedSlotTextContentFix&&2&u.u&&yt($.prototype)):e.cloneNodeFix&&ft($.prototype),e.formAssociated&&64&u.u&&($.formAssociated=!0),e.hotModuleReplacement&&($.prototype["s-hmr"]=function(t){((t,e,n)=>{const o=d(t);o&&(o.u=1,An(t,o,e,n))})(this,u,t)}),u._=t[0],i.includes(g)||l.get(g)||(r.push(g),l.define(g,Mn($,u,1)))}))})),r.length>0&&(e.slotRelocation&&v&&(u.textContent+=k),e.invisiblePrehydration&&(e.hydratedClass||e.hydratedAttribute)&&(u.textContent+=r.sort()+"{visibility:hidden}.hydrated{visibility:inherit}"),u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(o=A.T)?o:Mt(R.document);null!=t&&u.setAttribute("nonce",t),c.insertBefore(u,a?a.nextSibling:c.firstChild)}m=!1,f.length?f.map((t=>t.connectedCallback())):A.jmp(e.profile?()=>h=setTimeout(_n,30,"timeout"):()=>h=setTimeout(_n,30)),s()},zn=(t,e)=>e,Vn=(t,n,o,s)=>{e.hostListener&&o&&R.document&&(e.hostListenerTargetParent&&(o=o.filter(s?([t])=>32&t:([t])=>!(32&t))),o.map((([o,s,r])=>{const i=e.hostListenerTarget?Yn(R.document,t,o):t,l=Wn(n,r),c=Jn(o);A.ael(i,s,l,c),(n.rt=n.rt||[]).push((()=>A.rel(i,s,l,c)))})))},Wn=(t,n)=>o=>{var s;try{e.lazyLoad?256&t.u?null==(s=t.l)||s[n](o):(t.Z=t.Z||[]).push([n,o]):t.$hostElement$[n](o)}catch(e){v(e,t.$hostElement$)}},Yn=(t,n,o)=>e.hostListenerTargetDocument&&4&o?t:e.hostListenerTargetWindow&&8&o?R:e.hostListenerTargetBody&&16&o?t.body:e.hostListenerTargetParent&&32&o&&n.parentElement?n.parentElement:n,Jn=t=>({passive:!!(1&t),capture:!!(2&t)}),Xn=e.lazyLoad?class{}:globalThis.HTMLElement||class{},qn=t=>A.T=t,Kn=void 0;function Qn(t){return Kn?Kn(t):t}function Gn(t,e,n){const o=e||{},{children:s,...r}=o;let i=r;return void 0===n||"key"in r||(i={...r,key:n}),i&&0===Object.keys(i).length&&(i=null),void 0!==s?Array.isArray(s)?zt(t,i,...s):zt(t,i,s):zt(t,i)}var Zn=(t,e,n,o)=>{var s;null!=e&&(null!=e["s-nr"]&&o.push(e),1===e.nodeType)&&[...Array.from(e.childNodes),...Array.from((null==(s=e.shadowRoot)?void 0:s.childNodes)||[])].forEach((e=>{const s=d(e);null==s||n.staticComponents.has(e.nodeName.toLowerCase())||to(t,e,s.J,n,{nodeIds:0}),Zn(t,e,n,o)}))},to=(t,e,n,o,s)=>{if(null!=n){const r=++o.hostIds;if(e.setAttribute(O,r),null!=e["s-cr"]&&(e["s-cr"].nodeValue="r."+r),null!=n.M){const e=0;n.M.forEach(((n,o)=>{eo(t,n,s,r,e,o)}))}if(e&&n&&n.F&&!e.hasAttribute(_)){const t=e.parentElement;if(t&&t.childNodes){const o=Array.from(t.childNodes),s=o.find((t=>8===t.nodeType&&t["s-sr"]));if(s){const t=o.indexOf(e)-1;n.F.setAttribute(_,`${s["s-host-id"]}.${s["s-node-id"]}.0.${t}`)}}}}},eo=(t,e,n,o,s,r)=>{const i=e.F;if(null==i)return;const l=n.nodeIds++,c=`${o}.${l}.${s}.${r}`;if(i["s-host-id"]=o,i["s-node-id"]=l,1===i.nodeType)i.setAttribute(_,c),"string"!=typeof i["s-sn"]||i.getAttribute("slot")||i.setAttribute("s-sn",i["s-sn"]);else if(3===i.nodeType){const e=i.parentNode,n=null==e?void 0:e.nodeName;if("STYLE"!==n&&"SCRIPT"!==n){const n=t.createComment("t."+c);dn(e,n,i)}}else 8===i.nodeType&&i["s-sr"]&&(i.nodeValue=`s.${c}.${i["s-sn"]||""}`);if(null!=e.M){const r=s+1;e.M.forEach(((e,s)=>{eo(t,e,n,o,r,s)}))}},no=Object.freeze({__proto__:null,BUILD:e,Build:n,Env:{},Fragment:zn,H:M,HTMLElement:M,HYDRATED_STYLE_ID:C,Host:Wt,Mixin:function(...t){return t.reduceRight(((t,e)=>e(t)),Xn)},NAMESPACE:t,STENCIL_DEV_MODE:g,addHostEventListeners:Vn,bootstrapLazy:Bn,cmpModules:S,connectedCallback:In,consoleDevError:$,consoleDevInfo:y,consoleDevWarn:b,consoleError:v,createEvent:(t,n,o)=>{const s=He(t);return{emit:t=>(e.isDev&&!s.isConnected&&b(`The "${n}" event was emitted, but the dispatcher node is no longer connected to the dom.`),Fe(s,n,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:t}))}},defineCustomElement:(t,e)=>{customElements.define(Qn(e[1]),Un(t,e))},disconnectedCallback:Pn,forceModeUpdate:t=>{if(e.style&&e.mode&&!e.lazyLoad){const e=Ae(t),n=d(t);if(n&&n.N!==e){const o=n.o,s=t["s-sc"],r=Ft(o,e),i=t.constructor.style[e],l=o.u;i&&(j.has(r)||Dt(r,i,!!(1&l)),n.N=e,t.classList.remove(s+"-h",s+"-s"),Ht(n),Cn(t))}}},forceUpdate:Cn,getAssetPath:G,getElement:He,getHostRef:d,getMode:t=>{var e;return null==(e=d(t))?void 0:e.N},getRenderingRef:()=>jn,getValue:Ln,h:zt,insertVdomAnnotations:(t,e)=>{if(null!=t){const n=E in t?t[E]:{...N};n.staticComponents=new Set(e);const o=[];Zn(t,t.body,n,o),o.forEach((e=>{var o;if(null!=e&&e["s-nr"]){const s=e["s-nr"];let r=s["s-host-id"],i=s["s-node-id"],l=`${r}.${i}`;if(null==r)if(r=0,n.rootLevelIds++,i=n.rootLevelIds,l=`${r}.${i}`,1===s.nodeType)s.setAttribute(_,l),"string"!=typeof s["s-sn"]||s.getAttribute("slot")||s.setAttribute("s-sn",s["s-sn"]);else if(3===s.nodeType){if(0===r&&""===(null==(o=s.nodeValue)?void 0:o.trim()))return void e.remove();const n=t.createComment(l);n.nodeValue="t."+l,dn(s.parentNode,n,s)}else if(8===s.nodeType){const e=t.createComment(l);e.nodeValue="c."+l,s.parentNode.insertBefore(e,s)}let c="o."+l;const a=e.parentElement;a&&(""===a["s-en"]?c+=".":"c"===a["s-en"]&&(c+=".c")),e.nodeValue=c}}))}},isMemberInElement:m,jsx:Gn,jsxDEV:function(t,e,n){const o=e||{},{children:s,...r}=o;let i=r;return void 0===n||"key"in r||(i={...r,key:n}),i&&0===Object.keys(i).length&&(i=null),void 0!==s?Array.isArray(s)?zt(t,i,...s):zt(t,i,s):zt(t,i)},jsxs:function(t,e,n){return Gn(t,e,n)},loadModule:w,modeResolutionChain:x,needsScopedSSR:()=>!1,nextTick:q,parsePropertyValue:Ie,plt:A,postUpdateComponent:On,promiseResolve:I,proxyComponent:Mn,proxyCustomElement:Un,readTask:K,registerHost:p,registerInstance:h,render:function(t,e){pn({o:{u:0,C:e.tagName},$hostElement$:e},t)},renderVdom:pn,setAssetPath:t=>A.k=t,setErrorHandler:t=>a=t,setMode:t=>x.push(t),setNonce:qn,setPlatformHelpers:t=>{Object.assign(A,t)},setPlatformOptions:t=>Object.assign(A,t),setScopedSSR:()=>{},setTagTransformer:function(t){Kn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),Kn=t},setValue:Rn,styles:j,supportsConstructableStylesheets:H,supportsListenerOptions:!0,supportsMutableAdoptedStyleSheets:F,supportsShadow:D,transformTag:Qn,win:R,writeTask:Q});export{e as B,zn as F,Wt as H,t as N,no as S,M as a,Bn as b,y as c,Q as d,G as e,Cn as f,He as g,zt as h,I as p,h as r,qn as s,R as w}
@@ -1 +0,0 @@
1
- import{g as r}from"./p-B_d-jp99.js";import{r as t}from"./p-B4JfKvVT.js";const o=(o,s)=>{let a;const e=new MutationObserver((()=>{var r;a&&s(null!==(r=a.textContent)&&void 0!==r?r:"")})),i=o.connectedCallback;o.connectedCallback=()=>{var n;a=r(o),e.observe(a,{childList:!0,subtree:!0,characterData:!0}),s(null!==(n=a.textContent)&&void 0!==n?n:""),t(i,o)};const n=o.disconnectedCallback;o.disconnectedCallback=()=>{e.disconnect(),t(n,o)}};export{o as w}
@@ -1 +0,0 @@
1
- import{g as o,f as t}from"./p-B_d-jp99.js";import{g as s,c as f}from"./p-BgIpdpfH.js";import{r as p}from"./p-B4JfKvVT.js";const n=n=>{let c,r;const i=()=>{"function"==typeof n.validateUnitScaling&&n.validateUnitScaling(n.unitScaling),"function"==typeof n.validatePercentageScaling&&n.validatePercentageScaling(n.percentageScaling),"function"==typeof n.validateSizeScaling&&n.validateSizeScaling()},e=n.connectedCallback;n.connectedCallback=()=>{const f=o(n);r=s(f),(()=>{const o=r.scalingGroups.state;for(const t of Object.keys(o))void 0!==o[t]?n.pixelPerUnitGroupMap.set(t,o[t]):n.pixelPerUnitGroupMap.delete(t)})(),i(),c=r.scalingGroups.on("set",((s,f)=>{void 0!==f?n.pixelPerUnitGroupMap.set(s,f):n.pixelPerUnitGroupMap.delete(s),i(),t(o(n))})),p(e,n)};const a=n.disconnectedCallback;n.disconnectedCallback=()=>{p(c),f(o(n)),p(a,n)}};export{n as w}
@@ -1 +0,0 @@
1
- import{F as t}from"./p-DwYUTvvI.js";import"./p-eEfqksk-.js";class s{constructor(t="",s=1){this.prefix=t,this.value=s}}const e=["pl","fc","pp","ac"];function i(t){return t.replace(/\d+$/,"")}function r(t){return.299*parseInt(t.slice(1,3),16)+.587*parseInt(t.slice(3,5),16)+.114*parseInt(t.slice(5,7),16)>128?"#000000":"#ffffff"}var h;!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"}(h||(h={}));class n{constructor(t,s,e,i,r,n,a,o){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=s,this.y=e,this.value=r,this.group=t.group().id(this.createElementID(t.toString(),i)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=a||h.Top,this.horizontalHookLocation=o||h.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(e=!0,i={percent:2,decimal:1},r=new s){if(this.isEmpty())return this;const h=this.group;let n,a="";if(!1===Number.isNaN(Number(this.value))){let s="percent",e=i.percent,h=i.percent,o=1;!1===this.isRelativeLabel&&(e=i.decimal,h=i.decimal,o=r.value,s="decimal"),n=t.number(Number(this.value),s,e,h,o),this.isVarianceLabel&&Number(this.value)>=0&&(a="+")}else n=""+this.value;const o=this.drawLabel(h,a+n);return!1===e&&(o.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,s){return this.x=t,this.y=s,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,s){const e=this.styles.fontStyles.background||"#ffffff";let i="start";const n=t.text(s);n.move(this.x,this.y);const a=n.bbox().w,o=n.bbox().h;let c=0,l=0;const u=n.x();let f=n.y();return this.horizontalHookLocation===h.Left?(i="left",c=n.x()):this.horizontalHookLocation===h.Center?(i="middle",c=n.x()-(a+2)/2):this.horizontalHookLocation===h.Right&&(i="end",c=n.x()-a),this.verticalHookLocation===h.Center?(f=n.y()-1.2*o/2,l=f+.2*o):this.verticalHookLocation===h.Top?(f-=o/4,l=f+.2*o):this.verticalHookLocation===h.Bottom&&(f-=o,l=f+.2*o),n.move(u,f),n.font({anchor:i}),null!=this.segmentFillColor?n.fill(r(this.segmentFillColor)):t.rect(a+2,.8*o).stroke(e).fill(e).opacity(.9).move(c-1,l).insertBefore(n),n}createElementID(t,s){return t+"_"+s+"_"+this.ID_SCENARIOLABEL}}const a={ac:1,pp:2,fc:3,pl:4};var o;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(o||(o={}));class c{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((s=>this.intersects(t,s)))}getOptimalPlacement(t,s,e,i,r,h,n,o){const c=a[n]||99,l=h/2;for(const h of o){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.hasCollision(n.bounds))return n}for(const h of o){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.collidesWithHigherPriority(n.bounds,c))return n}return null}calculatePlacementForDirection(t,s,e,i,r,n,a,c){let l,u,f,p,b,d;switch(c){case o.Above:l=t,u=s-n-a,f=h.Bottom,p=h.Center,b=t-e/2,d=s-n-a-i;break;case o.Below:l=t,u=s+n+a,f=h.Top,p=h.Center,b=t-e/2,d=s+n+a-i/4;break;case o.Left:l=t-n-a,u=s,f=h.Center,p=h.Right,b=t-n-a-e,d=s-.6*i;break;case o.Right:l=t+n+a,u=s,f=h.Center,p=h.Left,b=t+n+a,d=s-.6*i}return{labelX:l,labelY:u,verticalHook:f,horizontalHook:p,bounds:{x:b,y:d,width:e,height:i,pointIndex:r,preferredHook:f}}}collidesWithHigherPriority(t,s){return this.labels.some((e=>!!e.scenarioType&&((a[e.scenarioType]||99)<s&&this.intersects(t,e))))}shouldHideScenarioLabel(t,s,e,i=20){const r=a[e]||99;return!(r<=1)&&this.scenarioLabels.some((e=>{if((a[e.scenarioType]||99)>=r)return!1;const h=Math.abs(s-e.y),n=Math.abs(t-e.x);return h<i&&n<i}))}registerScenarioLabel(t,s,e){this.scenarioLabels.push({x:t,y:s,scenarioType:e})}intersects(t,s){return!(t.x+t.width<s.x||s.x+s.width<t.x||t.y+t.height<s.y||s.y+s.height<t.y)}getLabelCount(){return this.labels.length}}export{h as H,e as I,c as L,s as S,i as a,n as b,o as c,a as d,r as g}
@@ -1 +0,0 @@
1
- import{f as t,g as e}from"./p-B_d-jp99.js";import{g as s,c as r}from"./p-BgIpdpfH.js";import{r as n}from"./p-B4JfKvVT.js";import{i as o,f as l}from"./p-D75i_YOP.js";import{m as i}from"./p-eEfqksk-.js";const u=u=>{let a,c,f,m,p=null;const v=()=>{const t=c.ruleSets.state;m=i([t._system||{},t._default||{},t[f]||{}])},d=()=>{const s=e(u),r=s.getAttribute("ruleset");if(p&&(p.disconnect(),p=null),r&&o(r)){const e=l(s,r);f=null==e?void 0:e.getAttribute("ruleset"),e&&(p=new MutationObserver((()=>{f=e.getAttribute("ruleset"),v(),t(u)})),p.observe(e,{attributes:!0,attributeFilter:["ruleset"]}))}else f=r},b=new MutationObserver((e=>{e.forEach((e=>{"ruleset"===e.attributeName&&(d(),v(),t(u))}))})),j=u.connectedCallback;u.connectedCallback=()=>{const r=e(u);c=s(r),m=c.ruleSets.state._system,b.observe(r,{attributes:!0,attributeFilter:["ruleset"]}),d(),v(),a=c.ruleSets.on("set",(s=>{s!==f&&"_default"!==s||(d(),v(),t(e(u)))})),n(j,u)};const w=u.disconnectedCallback;return u.disconnectedCallback=()=>{b.disconnect(),p&&(p.disconnect(),p=null),n(a),r(e(u)),n(w,u)},()=>m};function a(t,e,s=80){let r=null,n=!1,o=-1,l=-1;const i=function(t){var e;const s=t.parentElement;return(null===(e=null==s?void 0:s.assignedSlot)||void 0===e?void 0:e.parentElement)?s.assignedSlot.parentElement:s}(t);if(!i)return{disconnect(){}};const u=new ResizeObserver((t=>{var u;if(n)return;let a,c;const f=t[0];if(null===(u=null==f?void 0:f.contentBoxSize)||void 0===u?void 0:u.length){const t=f.contentBoxSize[0];a=t.inlineSize,c=t.blockSize}else a=i.clientWidth,c=i.clientHeight;Math.abs(a-o)<=2&&Math.abs(c-l)<=2||(o=a,l=c,null!=r&&clearTimeout(r),r=setTimeout((()=>{n||e()}),s))}));return u.observe(i),{disconnect(){n=!0,null!=r&&clearTimeout(r),u.disconnect()}}}export{a as o,u as w}
@@ -1 +0,0 @@
1
- import{r as e,h as s,H as t,g as r}from"./p-B_d-jp99.js";import{w as a,a as b}from"./p-B4JfKvVT.js";const c=class{constructor(s){e(this,s),a(this),this.errors=b(this)}render(){return s(t,{key:"d8c7214c5beab0eb52999b596d241ac052bee543"},s("slot",{key:"41cc485bf9666117d449642d3e7948551b5b0701"}))}get element(){return r(this)}};export{c as bn_template}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as s,g as r}from"./p-B_d-jp99.js";import{e as i,w as o,b as n}from"./p-D1SJ10zl.js";import{w as d,a}from"./p-B4JfKvVT.js";import"./p-BgIpdpfH.js";import"./p-eEfqksk-.js";import"./p-C5uvAEKI.js";function l(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);return Array.isArray(e)?e.map(((t,e)=>{var s,r,i;return"string"==typeof t?{label:t,id:String(e)}:"object"==typeof t&&null!==t?{label:null!==(r=null!==(s=t.label)&&void 0!==s?s:t.name)&&void 0!==r?r:String(e),id:null!==(i=t.id)&&void 0!==i?i:String(e)}:{label:String(t),id:String(e)}})):[]}catch(t){return console.error("parseHeaders: failed to parse JSON",t),[]}}function h(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);if(!Array.isArray(e))return["Headers must be an array"];const s=[],r=new Set;return e.forEach(((t,e)=>{"object"==typeof t&&null!==t&&void 0!==t.id&&("string"!=typeof t.id?s.push(`Header[${e}]: 'id' must be a string`):r.has(t.id)?s.push(`Header[${e}]: duplicate id '${t.id}'`):r.add(t.id),void 0!==t.label&&"string"!=typeof t.label&&s.push(`Header[${e}]: 'label' must be a string`))})),s}catch(t){return console.error("validateHeadersJson: failed to parse JSON",t),["Invalid JSON structure"]}}const u=class{validateRowHeaders(t){const e="ERR_rowHeaders",s=h(t);s.length>0?this.errors.addOrReplace({id:e,type:"error",message:`row-headers: ${s.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateColumnHeaders(t){const e="ERR_columnHeaders",s=h(t);s.length>0?this.errors.addOrReplace({id:e,type:"error",message:`column-headers: ${s.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateShowRowHeaders(t){const e="ERR_showRowHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-row-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowColumnHeaders(t){const e="ERR_showColumnHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-column-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowBorders(t){const e="ERR_showBorders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-borders: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.gridConfig={rows:[],columns:[]},this.chartTitle="",this.rowHeaders="[]",this.columnHeaders="[]",this.showRowHeaders="true",this.showColumnHeaders="true",this.showBorders="true",this.rowHeaderWidth="auto",this.cellGap="0px",o(this),d(this),this.errors=a(this),this.componentStyle=n(this)}getGridStyle(){return this.componentStyle((t=>t["bn-grid"]))}componentWillLoad(){this.validateRowHeaders(this.rowHeaders),this.validateColumnHeaders(this.columnHeaders),this.validateShowRowHeaders(this.showRowHeaders),this.validateShowColumnHeaders(this.showColumnHeaders),this.validateShowBorders(this.showBorders)}updateGridConfig(){var t;this.gridConfig=(t=this.columnHeaders,{rows:l(this.rowHeaders),columns:l(t)})}shouldShowRowHeaders(){return"true"===this.showRowHeaders&&this.gridConfig.rows.length>0}shouldShowColumnHeaders(){return"true"===this.showColumnHeaders&&this.gridConfig.columns.length>0}shouldShowBorders(){return"true"===this.showBorders}getGridTemplateColumns(){const t=[];this.shouldShowRowHeaders()&&t.push(this.rowHeaderWidth);const e=this.gridConfig.columns.length||1;for(let s=0;s<e;s++)t.push("auto");return t.join(" ")}getGridTemplateRows(){const t=[];this.chartTitle&&t.push("auto"),this.shouldShowColumnHeaders()&&t.push("auto");const e=this.gridConfig.rows.length||1;for(let s=0;s<e;s++)t.push("auto");return t.join(" ")}renderTitle(){if(!this.chartTitle)return null;const t=(this.shouldShowRowHeaders()?1:0)+this.gridConfig.columns.length;return e("div",{class:"grid-title",style:{"grid-column":`1 / span ${t}`,"grid-row":"1"}},this.chartTitle)}renderColumnHeaders(){if(!this.shouldShowColumnHeaders())return null;const t=this.getGridStyle(),s=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",r=this.shouldShowRowHeaders()?2:1,i=this.chartTitle?2:1;return this.gridConfig.columns.map(((o,n)=>{const d=n>0;return e("div",{key:`col-header-${o.id}`,class:"grid-header grid-header-col",style:{"grid-column":String(r+n),"grid-row":String(i),"border-left":d?s:"none",padding:`${t.cellPadding}px`,"padding-left":d?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},o.label)}))}renderDataCells(){const t=this.getGridStyle(),s=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",r=this.shouldShowRowHeaders()?2:1,i=(this.chartTitle?1:0)+(this.shouldShowColumnHeaders()?1:0)+1,o=[];return this.gridConfig.rows.length>0&&this.gridConfig.columns.length>0&&this.gridConfig.rows.forEach(((n,d)=>{if(this.shouldShowRowHeaders()){const r=d>0;o.push(e("div",{key:`row-header-${n.id}`,class:"grid-header grid-header-row",style:{"grid-column":"1","grid-row":String(i+d),"border-top":r?s:"none",padding:`${t.cellPadding}px`,"padding-top":r?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},n.label))}this.gridConfig.columns.forEach(((a,l)=>{const h=function(t,e){return`${t.id}-${e.id}`}(n,a),u=l>0,c=d>0;o.push(e("div",{key:`cell-${h}`,class:"grid-cell",style:{"grid-column":String(r+l),"grid-row":String(i+d),"border-left":u?s:"none","border-top":c?s:"none","padding-left":u?`${t.cellPadding+4}px`:"0","padding-top":c?`${t.cellPadding+4}px`:"0"}},e("slot",{name:h})))}))})),o}getFontStyles(){return this.componentStyle((t=>{var e,s,r,i;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(s=t.global)||void 0===s?void 0:s.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(r=t.global)||void 0===r?void 0:r.fontColor)||"#000000","--bn-font-background":(null===(i=t.global)||void 0===i?void 0:i.fontBackgroundColor)||"#ffffff"}}))}render(){const t={display:"inline-grid","grid-template-columns":this.getGridTemplateColumns(),"grid-template-rows":this.getGridTemplateRows(),gap:this.cellGap};return e(s,{key:"9522911b83a725994d62b657469bfcdbcae4a795",style:this.getFontStyles()},e("div",{key:"c3d4fe8e552c31b0e10ca930a784867e1f711d01",class:"grid-container",style:t},this.renderTitle(),this.renderColumnHeaders(),this.renderDataCells()),e("slot",{key:"9772d659471df1d3588a1372fedd09d6b3bb459d"}))}get element(){return r(this)}static get watchers(){return{rowHeaders:[{validateRowHeaders:0}],columnHeaders:[{validateColumnHeaders:0}],showRowHeaders:[{validateShowRowHeaders:0}],showColumnHeaders:[{validateShowColumnHeaders:0}],showBorders:[{validateShowBorders:0}]}}};u.style=':host{display:inline-block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.grid-container{display:inline-grid;box-sizing:border-box}.grid-title{font-weight:normal;padding-bottom:8px}.grid-header{display:flex;align-items:flex-end;box-sizing:border-box}.grid-header-row{justify-content:flex-end;padding-right:8px}.grid-header-col{white-space:nowrap;justify-content:flex-start}.grid-cell{position:relative;box-sizing:border-box}';export{u as bn_grid}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as n,g as s}from"./p-B_d-jp99.js";import{f as r,e as i,w as o,b as a}from"./p-D1SJ10zl.js";import{w as l,a as c}from"./p-B4JfKvVT.js";import"./p-BgIpdpfH.js";import"./p-eEfqksk-.js";import"./p-C5uvAEKI.js";const d=["*","/","+","-","x","÷","none"];function u(t){switch(t){case"*":case"x":return"×";case"/":case"÷":return"÷";case"+":return"+";case"-":return"−";default:return""}}function h(t,e,n){return t.find((t=>t.from===e&&t.to===n))}function f(t){return 2*(t-1)+1}function p(t){return 2*(t-1)+1}function g(t,e){const n=t.getBoundingClientRect(),s=n.left-e.left,r=n.top-e.top;return{left:s,top:r,width:n.width,height:n.height,centerX:s+n.width/2,centerY:r+n.height/2}}function v(t,e,n){switch(n){case"ltr":return e?{x:t.left+t.width,y:t.centerY}:{x:t.left,y:t.centerY};case"rtl":return e?{x:t.left,y:t.centerY}:{x:t.left+t.width,y:t.centerY};case"ttb":return e?{x:t.centerX,y:t.top+t.height}:{x:t.centerX,y:t.top};case"btt":return e?{x:t.centerX,y:t.top}:{x:t.centerX,y:t.top+t.height}}}function y(t,e,n,s,r=8){const i=-(s-1)*r/2+n*r;switch(e){case"ltr":return{x:t.left,y:t.centerY+i};case"rtl":return{x:t.left+t.width,y:t.centerY+i};case"ttb":return{x:t.centerX+i,y:t.top};case"btt":return{x:t.centerX+i,y:t.top+t.height}}}function m(t,e,n,s){switch(n){case"straight":return function(t,e){return{path:`M ${t.x} ${t.y} L ${e.x} ${e.y}`,midpoint:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}(t,e);case"curved":return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=(t.x+e.x)/2;s={x:n,y:t.y},r={x:n,y:e.y}}else{const n=(t.y+e.y)/2;s={x:t.x,y:n},r={x:e.x,y:n}}return{path:`M ${t.x} ${t.y} C ${s.x} ${s.y}, ${r.x} ${r.y}, ${e.x} ${e.y}`,midpoint:{x:.125*t.x+.375*s.x+.375*r.x+.125*e.x,y:.125*t.y+.375*s.y+.375*r.y+.125*e.y}}}(t,e,s);default:return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=t.x+.7*(e.x-t.x);s=`M ${t.x} ${t.y} L ${n} ${t.y} L ${n} ${e.y} L ${e.x} ${e.y}`,r={x:n,y:(t.y+e.y)/2}}else{const n=t.y+.7*(e.y-t.y);s=`M ${t.x} ${t.y} L ${t.x} ${n} L ${e.x} ${n} L ${e.x} ${e.y}`,r={x:(t.x+e.x)/2,y:n}}return{path:s,midpoint:r}}(t,e,s)}}function b(t,e,n,s){const r=.7;switch(s){case"ltr":{const s=t.left+t.width;return{x:s+(Math.min(e.left,n.left)-s)*r,y:t.centerY}}case"rtl":{const s=t.left,i=Math.max(e.left+e.width,n.left+n.width);return{x:i+(s-i)*r,y:t.centerY}}case"ttb":{const s=t.top+t.height,i=Math.min(e.top,n.top);return{x:t.centerX,y:s+(i-s)*r}}case"btt":{const s=t.top,i=Math.max(e.top+e.height,n.top+n.height);return{x:t.centerX,y:i+(s-i)*r}}}}function $(t,e,n){var s,r;return Object.assign({stroke:null!==(s=null==n?void 0:n.color)&&void 0!==s?s:t,strokeWidth:null!==(r=null==n?void 0:n.width)&&void 0!==r?r:e},(null==n?void 0:n.dasharray)?{strokeDasharray:n.dasharray}:{})}const x=class{validateEdgesProp(t){const e="ERR_edges",n=function(t){const e=[];if(!t||""===t.trim())return e.push("edges: value is required"),e;let n;try{n=JSON.parse(t)}catch(t){return e.push("edges: invalid JSON structure"),e}if(!Array.isArray(n))return e.push("edges: must be an array"),e;if(0===n.length)return e.push("edges: array must not be empty"),e;const s=new Set,r=new Set;n.forEach(((t,n)=>{if("object"!=typeof t||null===t)return void e.push(`edges[${n}]: must be an object`);const i=t;if("string"!=typeof i.from||""===i.from.trim()?e.push(`edges[${n}]: 'from' is required and must be a non-empty string`):s.add(i.from),"string"!=typeof i.to||""===i.to.trim()?e.push(`edges[${n}]: 'to' is required and must be a non-empty string`):(s.add(i.to),r.add(i.to)),void 0!==i.operator&&("string"==typeof i.operator&&d.includes(i.operator)||e.push(`edges[${n}]: 'operator' must be one of: ${d.join(", ")}`)),void 0!==i.label&&"string"!=typeof i.label&&e.push(`edges[${n}]: 'label' must be a string`),void 0!==i.style)if("object"!=typeof i.style||null===i.style)e.push(`edges[${n}]: 'style' must be an object`);else{const t=i.style;void 0!==t.color&&"string"!=typeof t.color&&e.push(`edges[${n}]: 'style.color' must be a string`),void 0!==t.width&&"number"!=typeof t.width&&e.push(`edges[${n}]: 'style.width' must be a number`),void 0!==t.dasharray&&"string"!=typeof t.dasharray&&e.push(`edges[${n}]: 'style.dasharray' must be a string`)}}));const i=Array.from(s).filter((t=>!r.has(t)));return 0===i.length?e.push("edges: tree has no root node (circular reference detected)"):i.length>1&&e.push(`edges: tree has multiple root nodes: ${i.join(", ")}`),e}(t);n.length>0?(this.errors.addOrReplace({id:e,type:"error",message:`edges: ${n.join("; ")}`}),this.treeConfig=null):(this.errors.remove(e),this.treeConfig=function(t){if(!t||""===t.trim())return null;try{const e=JSON.parse(t);if(!Array.isArray(e))return null;const n=e,s=function(t){const e=new Map;for(const n of t){const t=e.get(n.from)||[];t.push(n.to),e.set(n.from,t)}return e}(n),r=function(t){const e=new Set;for(const n of t)e.add(n.from),e.add(n.to);return e}(n),i=function(t,e){const n=new Set;for(const e of t)n.add(e.to);const s=Array.from(e).filter((t=>!n.has(t)));return 1===s.length?s[0]:null}(n,r);return{edges:n,adjacencyList:s,rootNode:i,allNodes:r}}catch(t){return console.error("parseTreeConfig: failed to parse tree configuration",t),null}}(t)),this.recalculateLayout()}validateDirection(t){const e="ERR_direction",n=["ltr","rtl","ttb","btt"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`direction: invalid value '${t}', must be one of: ${n.join(", ")}`}),this.recalculateLayout()}validateLevelSpacing(t){const e="ERR_levelSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`level-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateNodeSpacing(t){const e="ERR_nodeSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`node-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateEdgeStyle(t){const e="ERR_edgeStyle",n=["straight","orthogonal","curved"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`edge-style: invalid value '${t}', must be one of: ${n.join(", ")}`})}validateShowOperators(t){const e="ERR_showOperators";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-operators: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.treeConfig=null,this.layout=null,this.nodeRects=new Map,this.svgWidth=0,this.svgHeight=0,this.resizeObserver=null,this.gridContainer=null,this.direction="ltr",this.levelSpacing=60,this.nodeSpacing=20,this.edgeStyle="orthogonal",this.showOperators="true",o(this),l(this),this.errors=c(this),this.componentStyle=a(this)}getTreeStyle(){return this.componentStyle((t=>({edgeColor:t["bn-tree"].edgeColor,edgeWidth:t["bn-tree"].edgeWidth,operatorCircleRadius:t["bn-tree"].operatorCircleRadius,operatorFontSize:t.global.fontSizePx*t["bn-tree"].operatorFontSizeScale,operatorColor:t["bn-tree"].operatorColor})))}componentWillLoad(){this.validateEdgesProp(this.edges),this.validateDirection(this.direction),this.validateLevelSpacing(this.levelSpacing),this.validateNodeSpacing(this.nodeSpacing),this.validateEdgeStyle(this.edgeStyle),this.validateShowOperators(this.showOperators)}componentDidLoad(){this.setupResizeObserver(),requestAnimationFrame((()=>{this.updateNodeRects()}))}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}setupResizeObserver(){var t;this.gridContainer=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tree-grid"),this.gridContainer&&(this.resizeObserver=new ResizeObserver((()=>{this.updateNodeRects()})),this.resizeObserver.observe(this.gridContainer),this.element.querySelectorAll("[slot]").forEach((t=>{this.resizeObserver.observe(t)})))}recalculateLayout(){this.layout=this.treeConfig?function(t,e,n,s){if(!t.rootNode)return{positions:new Map,gridTemplateColumns:"",gridTemplateRows:"",maxLevel:0,maxIndex:0};const r=function(t){const e=new Map;if(!t.rootNode)return e;const n=[{node:t.rootNode,level:0}],s=new Set;for(;n.length>0;){const{node:r,level:i}=n.shift();if(s.has(r))continue;s.add(r),e.set(r,i);const o=t.adjacencyList.get(r)||[];for(const t of o)s.has(t)||n.push({node:t,level:i+1})}return e}(t),i=function(t){const e=new Map;if(!t.rootNode)return e;let n=0;return function s(r){const i=e.get(r);if(i)return i;const o=t.adjacencyList.get(r)||[];if(0===o.length){const t={startIndex:n,endIndex:n};return e.set(r,t),n++,t}let a=1/0,l=-1/0;for(const t of o){const e=s(t);a=Math.min(a,e.startIndex),l=Math.max(l,e.endIndex)}const c={startIndex:a,endIndex:l};return e.set(r,c),c}(t.rootNode),e}(t),o=function(t,e,n,s){var r,i;const o=new Map,a=Math.max(...Array.from(e.values()));for(const l of t.allNodes){const t=null!==(r=e.get(l))&&void 0!==r?r:0,c=null!==(i=n.get(l))&&void 0!==i?i:{startIndex:0,endIndex:0};let d,u,h;switch(s){case"ltr":d=t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"rtl":d=a-t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"ttb":u=t+1,d=c.startIndex+1,h=1;break;case"btt":u=a-t+1,d=c.startIndex+1,h=1}o.set(l,{nodeId:l,level:t,index:c.startIndex,gridColumn:d,gridRow:u,gridRowSpan:h})}return o}(t,r,i,e),a=Math.max(...Array.from(r.values())),l=Math.max(...Array.from(i.values()).map((t=>t.endIndex))),{gridTemplateColumns:c,gridTemplateRows:d}=function(t,e,n,s,r){const i=t+1,o=e+1;if("ltr"===n||"rtl"===n){const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:t.join(" "),gridTemplateRows:e.join(" ")}}{const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:e.join(" "),gridTemplateRows:t.join(" ")}}}(a,l,e,n,s);return{positions:o,gridTemplateColumns:c,gridTemplateRows:d,maxLevel:a,maxIndex:l}}(this.treeConfig,this.direction,this.levelSpacing,this.nodeSpacing):null}updateNodeRects(){if(!this.treeConfig||!this.gridContainer)return;const t=this.gridContainer.getBoundingClientRect(),e=new Map;for(const n of this.treeConfig.allNodes){const s=this.element.querySelector(`[slot="${n}"]`);s&&e.set(n,g(s,t))}this.nodeRects=e,this.svgWidth=t.width,this.svgHeight=t.height}getSlotStyle(t){if(!this.layout)return{};const e=this.layout.positions.get(t);return e?"ltr"===this.direction||"rtl"===this.direction?{"grid-column":String(f(e.gridColumn)),"grid-row":`${p(e.gridRow)} / span ${n=e.gridRowSpan,n<=1?1:2*(n-1)+1}`,"align-self":"center"}:{"grid-row":String(p(e.gridRow)),"grid-column":String(f(e.gridColumn)),"justify-self":"center"}:{};var n}renderEdges(){var t;if(!this.treeConfig||0===this.nodeRects.size)return null;const n=this.getTreeStyle(),s=[],r=[],i=new Map;for(const t of this.treeConfig.edges){const e=i.get(t.to)||[];e.push(t.from),i.set(t.to,e)}for(const t of this.treeConfig.edges){const r=this.nodeRects.get(t.from),o=this.nodeRects.get(t.to);if(!r||!o)continue;const a=v(r,!0,this.direction),l=i.get(t.to)||[];let c;if(l.length>1){const e=l.indexOf(t.from);c=y(o,this.direction,e,l.length)}else c=v(o,!1,this.direction);const{path:d}=m(a,c,this.edgeStyle,this.direction),u=$(n.edgeColor,n.edgeWidth,t.style);s.push(e("path",{key:`edge-${t.from}-${t.to}`,d,fill:"none",stroke:u.stroke,"stroke-width":u.strokeWidth,"stroke-dasharray":u.strokeDasharray}))}if("true"===this.showOperators)for(const[s,i]of this.treeConfig.adjacencyList.entries()){const o=this.nodeRects.get(s);if(o)for(let a=0;a<i.length-1;a++){const l=i[a],c=i[a+1],d=h(this.treeConfig.edges,s,l);if(!(null==d?void 0:d.operator)||"none"===d.operator)continue;const f=this.nodeRects.get(l),p=this.nodeRects.get(c);if(!f||!p)continue;const g=null!==(t=d.label)&&void 0!==t?t:u(d.operator),v=b(o,f,p,this.direction);r.push(e("g",{key:`operator-${s}-${l}`,class:"operator-group"},e("circle",{cx:v.x,cy:v.y,r:n.operatorCircleRadius,fill:"white",stroke:n.edgeColor,"stroke-width":n.edgeWidth}),e("text",{x:v.x,y:v.y,"text-anchor":"middle","dominant-baseline":"central",style:{fontSize:`${n.operatorFontSize}px`,fill:n.operatorColor,fontWeight:"bold"}},g)))}}return e("svg",{class:"edge-layer",width:this.svgWidth,height:this.svgHeight,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none"}},s,r)}renderSlots(){return this.treeConfig&&this.layout?Array.from(this.treeConfig.allNodes).map((t=>e("div",{key:t,class:"tree-node",style:this.getSlotStyle(t)},e("slot",{name:t})))):null}getFontStyles(){return this.componentStyle((t=>{var e,n,s,r;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(n=t.global)||void 0===n?void 0:n.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return e(n,{style:t},this.treeConfig&&this.layout?e("div",{class:"tree-container"},e("div",{class:"tree-grid",style:{display:"grid","grid-template-columns":this.layout.gridTemplateColumns,"grid-template-rows":this.layout.gridTemplateRows,position:"relative"}},this.renderEdges(),this.renderSlots())):e("div",{class:"tree-container tree-error"},e("slot",null)))}get element(){return s(this)}static get watchers(){return{edges:[{validateEdgesProp:0}],direction:[{validateDirection:0}],levelSpacing:[{validateLevelSpacing:0}],nodeSpacing:[{validateNodeSpacing:0}],edgeStyle:[{validateEdgeStyle:0}],showOperators:[{validateShowOperators:0}]}}};x.style=':host{display:inline-block;position:relative;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.tree-container{position:relative;display:inline-block}.tree-grid{position:relative;display:grid;align-items:center}.tree-node{position:relative;z-index:1;border:1px solid #404040;background:var(--bn-font-background, white)}.edge-layer{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}.tree-error{display:flex;flex-wrap:wrap;gap:20px}';export{x as bn_tree}
@@ -1 +0,0 @@
1
- import{r as t,d as i,f as e,h as s,H as r,g as a}from"./p-B_d-jp99.js";import{a as n}from"./p-BgIpdpfH.js";import{C as l,r as o,A as u}from"./p-eEfqksk-.js";import{w as h,o as d}from"./p-Da6p_F4J.js";import{O as c,a as p,b as v}from"./p-C5uvAEKI.js";import{w as g,a as m,g as f,p as b}from"./p-D75i_YOP.js";import{v as _,i as y,d as w,a as O,w as R,b as A}from"./p-D1SJ10zl.js";import{w as E,a as $}from"./p-B4JfKvVT.js";import{p as j}from"./p-6lOdN-fB.js";const T=["measure","label","unit"];function N(t){const i=[],e=D(t,"measure",i);if(void 0===e||""===e.trim())return i.push("measure"),{config:null,unknownKeys:U(t,T),invalidFields:i};const s={measure:e.trim()};return s.label=D(t,"label",i),s.unit=D(t,"unit",i),{config:s,unknownKeys:U(t,T),invalidFields:i}}const S=["show","decimals"];function k(t,i){const e=[],s={show:i.show,decimals:i.decimals};return l.isExisting(t.show)&&("auto"===t.show||"none"===t.show?s.show=t.show:e.push("show")),l.isExisting(t.decimals)&&(l.isNumber(t.decimals)&&t.decimals>=0&&t.decimals<=4?s.decimals=Math.floor(t.decimals):e.push("decimals")),{config:s,unknownKeys:U(t,S),invalidFields:e}}function x(t){var i;const e=null!==(i=null==t?void 0:t.trim())&&void 0!==i?i:"";if(""===e||"null"===e)return{ranges:[],parseError:!1,issues:[]};let s;try{s=JSON.parse(e)}catch(t){return{ranges:[],parseError:!0,issues:[]}}if(!Array.isArray(s)||0===s.length)return{ranges:[],parseError:!0,issues:[]};if(!s.every((t=>l.isNumber(t)&&isFinite(t)&&t>0)))return{ranges:[],parseError:!0,issues:[]};const r=[];let a=s;const n=[...a].sort(((t,i)=>t-i));return n.some(((t,i)=>t!==a[i]))&&r.push("not ascending, sorted"),a=n,a.length>2&&(r.push(`${a.length} entries, first 2 kept`),a=a.slice(0,2)),{ranges:a,parseError:!1,issues:r}}function U(t,i){return Object.keys(t).filter((t=>!i.includes(t)))}function D(t,i,e){if(l.isExisting(t[i]))return l.isString(t[i])?t[i]:void e.push(i)}const L=["pl1","pp1","fc1"],z=class{validateActual(t){this.validateMeasureSpec("actual",t)}validateTarget(t){this.validateMeasureSpec("target",t)}validateRanges(t){const i="ERR_bullet_json_ranges",e="WARN_bullet_ranges",s=x(t);if(s.parseError)return this.setBlockingError(i,this.t(".bullet-prop-json",{prop:"ranges"})),void this.errors.remove(e);this.setBlockingError(i,null),s.issues.length>0?this.errors.addOrReplace({id:e,type:"warning",message:this.t(".bullet-ranges-invalid",{detail:s.issues.join("; ")})}):this.errors.remove(e)}validateNormalize(t){this.validateEnum("normalize","ERR_normalize",t,["target","none"],"target")}validateVariances(t){this.validateEnum("variances","ERR_variances",t,["auto","none"],"auto")}validateLevel(t){this.validateEnum("level","ERR_level",t,["auto","rowgroup","category","subcategory"],"auto")}validateOrder(t){const i="ERR_order",e=_(t).filter((t=>""!==t));0===e.length?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`order: invalid value(s) '${e.join(", ")}'; using the dataset order.`})}validateOrderDirection(t){const i="ERR_orderDirection";y(t)||w(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`order-direction: invalid value '${t}' — expected asc/desc; using asc.`})}validateLimit(t){const i="ERR_limit";O(t)&&Number(t)>=0?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`limit: invalid value '${t}' — expected a non-negative integer; using 0.`})}validateLabels(t){const i="ERR_bullet_json_labels",e="WARN_bullet_fields_labels",{data:s,parseError:r}=j(t,null);if(r)return this.setBlockingError(i,this.t(".bullet-prop-json",{prop:"labels"})),void this.errors.remove(e);this.setBlockingError(i,null),null!==s?this.reportSpecIssues(e,"labels",k(s,this.labelDefaults())):this.errors.remove(e)}validateScale(t){const i="ERR_scale";if(y(t))return void this.errors.remove(i);const{mode:e,factor:s}=b(t);"factor"===e&&(void 0===s||s<=0)?this.errors.addOrReplace({id:i,type:"warning",message:`scale: invalid value '${t}' — expected none/auto or a positive number.`}):this.errors.remove(i)}constructor(i){t(this,i),this.datasetName="",this.dataVersion=0,this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.activeErrors=new Set,this.chartTitle="",this.filter="",this.actual="",this.target="",this.ranges="",this.normalize="target",this.variances="auto",this.level="auto",this.order="",this.orderDirection="",this.limit=0,this.labels="",this._autoScaleGuard=!1,this._lastScaledParentHeight=0,this.translateForInner=(t,i)=>this.t(t,i),R(this),E(this),g(this,(t=>{this.datasetName=(null==t?void 0:t.startsWith("$"))?t.substring(1):t||"",this.dataVersion=this.dataVersion+1}),((t,i)=>{this.datasetMeta=i})),this.errors=$(this),this.componentStyle=A(this),this.ruleSetConfig=h(this),this.t=m(this).t}componentWillLoad(){this.validateActual(this.actual),this.validateTarget(this.target),this.validateRanges(this.ranges),this.validateNormalize(this.normalize),this.validateVariances(this.variances),this.validateLevel(this.level),this.validateOrder(this.order),this.validateOrderDirection(this.orderDirection),this.validateLimit(this.limit),this.validateLabels(this.labels),this.validateScale(this.scale)}componentDidRender(){const{mode:t}=b(this.scale);if("auto"!==t&&"empty"!==t)return void(this._autoScaleGuard=!1);if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const e=this.element,{height:s}=f(e);if(s<=0)return;this._lastScaledParentHeight=s;const r=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333})),a=e.scrollHeight,n=this.appliedScaleFactor;if(a<=s+1)return void this.errors.remove("AUTO_scale");const l=Math.max(.3,n*(s-1)/a);Math.abs(l-n)<.01||(e.style.setProperty("--bn-font-size",r*l+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${l.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,i((()=>{this.appliedScaleFactor=l})))}componentDidLoad(){this.layoutObserver=d(this.element,(()=>{if(this._autoScaleGuard)return;const{height:t}=f(this.element);t>0&&Math.abs(t-this._lastScaledParentHeight)>2&&(this._lastScaledParentHeight=t,e(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{height:t}=f(this.element);this._lastScaledParentHeight=t,e(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}labelDefaults(){return{show:"auto",decimals:1}}setBlockingError(t,i){null===i?(this.errors.remove(t),this.activeErrors.delete(t)):(this.errors.addOrReplace({id:t,type:"error",message:i}),this.activeErrors.add(t))}hasBlockingErrors(){return this.activeErrors.size>0}validateMeasureSpec(t,i){var e;const s=`ERR_bullet_json_${t}`,r=`ERR_bullet_measure_${t}`,a=`WARN_bullet_fields_${t}`,{data:n,parseError:l}=j(i,"measure");if(l)return this.setBlockingError(s,this.t(".bullet-prop-json",{prop:t})),this.setBlockingError(r,null),void this.errors.remove(a);if(this.setBlockingError(s,null),null===n)return this.setBlockingError(r,null),void this.errors.remove(a);const u=(null!==(e=n.measure)&&void 0!==e?e:"").trim(),h=o(u);"auto"===u.toLowerCase()||null!==h&&"scenario"===h.kind?this.setBlockingError(r,null):this.setBlockingError(r,this.t(".bullet-measure-invalid",{prop:t,measure:u})),this.reportSpecIssues(a,t,N(n))}validateEnum(t,i,e,s,r){y(e)||s.includes(e.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`${t}: invalid value '${e}' — expected ${s.join("/")}; using '${r}'.`})}reportSpecIssues(t,i,e){const s=[];null!==e&&e.invalidFields.length>0&&s.push(`invalid: ${e.invalidFields.join(", ")}`),null!==e&&e.unknownKeys.length>0&&s.push(`unknown: ${e.unknownKeys.join(", ")}`),s.length>0?this.errors.addOrReplace({id:t,type:"warning",message:`${i}: ignored sub-fields (${s.join("; ")}).`}):this.errors.remove(t)}prepareActual(){var t,i,e,s,r;const{data:a,parseError:n}=j(this.actual,"measure");if(n)return null;const l=null!==a?N(a).config:null;if(null===l||"auto"===l.measure.toLowerCase()){const r=null!==l,a=null!==(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)&&void 0!==i?i:[],n=null!==(s=a.includes("ac1")?"ac1":null!==(e=a.find((t=>t.startsWith("ac"))))&&void 0!==e?e:a[0])&&void 0!==s?s:"ac1";return r||null===this.datasetMeta?this.errors.remove("AUTO_actual"):this.errors.addOrReplace({id:"AUTO_actual",type:"warning",message:`actual: not set, auto-detected: ${n}`}),null===l?{measure:n}:Object.assign(Object.assign({},l),{measure:n})}return this.errors.remove("AUTO_actual"),"scenario"===(null===(r=o(l.measure))||void 0===r?void 0:r.kind)?l:null}prepareTarget(){var t,i,e;const{data:s,parseError:r}=j(this.target,"measure");if(r)return null;const a=null!==s?N(s).config:null;if(null===a||"auto"===a.measure.toLowerCase()){const e=null!==a,s=null!==(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)&&void 0!==i?i:[],r=L.find((t=>s.includes(t)));return void 0===r?(this.errors.remove("AUTO_target"),null!==this.datasetMeta?this.errors.addOrReplace({id:"WARN_bullet_target_unavailable",type:"warning",message:this.t(".bullet-target-none")}):this.errors.remove("WARN_bullet_target_unavailable"),null):(this.errors.remove("WARN_bullet_target_unavailable"),e||null===this.datasetMeta?this.errors.remove("AUTO_target"):this.errors.addOrReplace({id:"AUTO_target",type:"warning",message:`target: not set, auto-detected: ${r}`}),null===a?{measure:r}:Object.assign(Object.assign({},a),{measure:r}))}return this.errors.remove("AUTO_target"),this.errors.remove("WARN_bullet_target_unavailable"),"scenario"===(null===(e=o(a.measure))||void 0===e?void 0:e.kind)?a:null}prepareNormalize(){var t;return"none"===(null===(t=this.normalize)||void 0===t?void 0:t.trim().toLowerCase())?"none":"target"}prepareShowVariances(){var t;return"none"!==(null===(t=this.variances)||void 0===t?void 0:t.trim().toLowerCase())}prepareLevel(){var t,i;const e=null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase();if("rowgroup"===e)return u.ROWGROUP;if("category"===e)return u.CATEGORY;if("subcategory"===e)return u.SUBCATEGORY;const s=null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel;if(void 0!==s&&""!==s){const t=u[s.toUpperCase()];if(void 0!==t)return t}return u.CATEGORY}prepareOrder(){var t,i,e,s;const r="auto"===(null===(t=this.order)||void 0===t?void 0:t.trim().toLowerCase());let a;y(this.order)||r?(null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedOrder)?(r?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${this.datasetMeta.suggestedOrder}`}),a=this.datasetMeta.suggestedOrder):(this.errors.remove("AUTO_order"),a=""):(this.errors.remove("AUTO_order"),a=this.order);const n=null!==(s=c[null===(e=this.orderDirection)||void 0===e?void 0:e.toUpperCase()])&&void 0!==s?s:c.ASC;if(y(a))return new p([v.CATEGORYINDEX],n);const l=a.split(",").map((t=>v[t.trim().toUpperCase()])).filter((t=>void 0!==t));return new p(l.length>0?l:[v.CATEGORYINDEX],n)}prepareLabels(){const t=this.labelDefaults(),{data:i,parseError:e}=j(this.labels,null);return e||null===i?{show:t.show,decimals:t.decimals}:k(i,t).config}prepareLimit(){const t=Math.floor(Number(this.limit)||0);return t>0?t:0}i18nLocalKeys(){return["no-data","target","axis.in"]}prepareI18n(){const t=new Map(this.i18nLocalKeys().map((t=>[t,this.t(".".concat(t))]))),i=new Map(n.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...t.entries()])}prepareStyle(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{const e=i.global.fontSizePx*t;return{scaleFactors:i["bn-chart-bullet"].scaleFactors,fontStyles:{font:`${e}px ${i.global.fontFamily}`,size:e,color:i.global.fontColor,background:i.global.fontBackgroundColor,leading:1.8},axisStyles:i["bn-chart-bullet"].axisStyles,barStyles:i["bn-chart-bullet"].barStyles,varianceStyles:i["bn-chart-bullet"].varianceStyles,rangeColors:i["bn-chart-bullet"].rangeColors,padding:i["bn-chart-bullet"].padding}}))}getEffectiveScaleFactor(){const{mode:t,factor:i}=b(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var e,s,r,a;const n=(null===(e=i.global)||void 0===e?void 0:e.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=i.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*t+"px","--bn-font-color":(null===(r=i.global)||void 0===r?void 0:r.fontColor)||"#000000","--bn-font-background":(null===(a=i.global)||void 0===a?void 0:a.fontBackgroundColor)||"#ffffff"}}))}getDataStructure(){const t={};for(const i of["ac","pp","fc","pl"])for(const e of[1,2,3,4])t[`${i}${e}`]={type:"number",isOptional:!0,description:""};const i={actual:this.prepareActual(),target:this.prepareTarget()};for(const[e,s]of Object.entries(i))null!==s&&void 0!==t[s.measure]&&(t[s.measure].description=`${e}: ${void 0!==s.label?s.label:s.measure}`);return{IBulletChartDataRow:Object.assign({operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!0,description:""},rowGroupIndex:{type:"number",isOptional:!0,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!0,description:""},subCategoryIndex:{type:"number",isOptional:!0,description:""}},t)}}chartTemplate(){const t=this.prepareActual(),i=this.prepareTarget(),e=x(this.ranges).ranges,r=this.prepareNormalize();return this.setBlockingError("ERR_bullet_measure_same",null!==t&&null!==i&&t.measure===i.measure?this.t(".bullet-measure-same",{measure:t.measure}):null),e.length>0&&"target"===r?this.errors.addOrReplace({id:"WARN_bullet_ranges_ignored",type:"warning",message:this.t(".bullet-ranges-ignored")}):this.errors.remove("WARN_bullet_ranges_ignored"),this.hasBlockingErrors()||null===t?null:s("ibcs-chart-bullet",{tableName:this.datasetName,dataVersion:this.dataVersion,chartTitle:this.chartTitle,actual:t,target:i,ranges:e,normalize:r,showVariances:this.prepareShowVariances(),level:this.prepareLevel(),order:this.prepareOrder(),limit:this.prepareLimit(),labels:this.prepareLabels(),filter:this.filter,styles:this.prepareStyle(),i18n:this.prepareI18n(),containerWidth:f(this.element).width,ruleSetConfig:this.ruleSetConfig(),errors:this.errors,translate:this.translateForInner})}render(){return s(r,{key:"9fd8c656471de9582652769edf49b80756575830",style:this.getFontStyles()},s("div",{key:"a6fe8d33dde8912a77a86244db092bb364c1aeaa",class:"container"},this.chartTemplate()))}get element(){return a(this)}static get watchers(){return{actual:[{validateActual:0}],target:[{validateTarget:0}],ranges:[{validateRanges:0}],normalize:[{validateNormalize:0}],variances:[{validateVariances:0}],level:[{validateLevel:0}],order:[{validateOrder:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],labels:[{validateLabels:0}],scale:[{validateScale:0}]}}};z.style=":host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column}";export{z as bn_chart_bullet}
@@ -1,199 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-CDKG4xmO.js');
4
- var contextProtocol = require('./context-protocol-BBhT9B52.js');
5
- var withHasError = require('./withHasError-Cl2gTQzA.js');
6
- var scaling = require('./scaling-B6_M_HWH.js');
7
- var VarianceMeasure = require('./VarianceMeasure-BBWTgv2e.js');
8
-
9
- /**
10
- * Mixin that provides the IBCS rule-set configuration to a Stencil component
11
- * using a three-layer merge strategy.
12
- *
13
- * The effective config is computed by deep-merging three layers in order:
14
- * 1. `_system` -- built-in IBCS defaults (lowest priority)
15
- * 2. `_default` -- user-defined global overrides (a `<bn-ruleset>` without name)
16
- * 3. The value of the host element's `ruleset` attribute (highest priority)
17
- *
18
- * Unlike `withComponentStyle`, the store subscription also reacts to writes on
19
- * the `_default` layer, because a nameless `<bn-ruleset>` is the primary way
20
- * to adjust the rules context-wide.
21
- *
22
- * The `ruleset` attribute supports the `"inherited-closest"` /
23
- * `"inherited-page"` keywords from `withInheritedProps`: the actual name is
24
- * then read from the `ruleset` attribute of the nearest ancestor
25
- * `bn-layout-card` / `bn-layout-page`, which is observed for changes.
26
- *
27
- * @param component - The Stencil component instance
28
- * @returns A function returning the merged {@link RuleSetConfig}
29
- */
30
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- const withRuleSet = (component) => {
32
- let subscription;
33
- let stores;
34
- let selectedRuleset;
35
- let config;
36
- let ancestorObserver = null;
37
- const updateConfig = () => {
38
- const state = stores.ruleSets.state;
39
- config = VarianceMeasure.merge([
40
- state["_system"] || {},
41
- state["_default"] || {},
42
- state[selectedRuleset] || {},
43
- ]);
44
- };
45
- const resolveRulesetName = () => {
46
- const element = index.getElement(component);
47
- const raw = element.getAttribute("ruleset");
48
- if (ancestorObserver) {
49
- ancestorObserver.disconnect();
50
- ancestorObserver = null;
51
- }
52
- if (raw && scaling.isInheritedValue(raw)) {
53
- const ancestor = scaling.findAncestor(element, raw);
54
- selectedRuleset = ancestor === null || ancestor === void 0 ? void 0 : ancestor.getAttribute("ruleset");
55
- if (ancestor) {
56
- ancestorObserver = new MutationObserver(() => {
57
- selectedRuleset = ancestor.getAttribute("ruleset");
58
- updateConfig();
59
- index.forceUpdate(component);
60
- });
61
- ancestorObserver.observe(ancestor, { attributes: true, attributeFilter: ["ruleset"] });
62
- }
63
- }
64
- else {
65
- selectedRuleset = raw;
66
- }
67
- };
68
- const observer = new MutationObserver((mutations) => {
69
- mutations.forEach((mutation) => {
70
- if (mutation.attributeName === "ruleset") {
71
- resolveRulesetName();
72
- updateConfig();
73
- index.forceUpdate(component);
74
- }
75
- });
76
- });
77
- const connectedCallback = component["connectedCallback"];
78
- component["connectedCallback"] = () => {
79
- const element = index.getElement(component);
80
- stores = contextProtocol.getStores(element);
81
- config = stores.ruleSets.state["_system"];
82
- observer.observe(element, { attributes: true, attributeFilter: ["ruleset"] });
83
- resolveRulesetName();
84
- updateConfig();
85
- subscription = stores.ruleSets.on("set", (key) => {
86
- if (key === selectedRuleset || key === "_default") {
87
- resolveRulesetName();
88
- updateConfig();
89
- index.forceUpdate(index.getElement(component));
90
- }
91
- });
92
- withHasError.runIfExisits(connectedCallback, component);
93
- };
94
- const disconnectedCallback = component["disconnectedCallback"];
95
- component["disconnectedCallback"] = () => {
96
- observer.disconnect();
97
- if (ancestorObserver) {
98
- ancestorObserver.disconnect();
99
- ancestorObserver = null;
100
- }
101
- withHasError.runIfExisits(subscription);
102
- contextProtocol.clearStoresCache(index.getElement(component));
103
- withHasError.runIfExisits(disconnectedCallback, component);
104
- };
105
- const ruleSetConfig = () => config;
106
- return ruleSetConfig;
107
- };
108
-
109
- /**
110
- * Shared ResizeObserver utility for visualization components.
111
- *
112
- * Wraps ResizeObserver with debouncing and a size-stability check so
113
- * auto-scaling logic reacts to genuine container size changes (window
114
- * resizes, card relayouts, async sibling loads) without creating
115
- * feedback loops when the component's own scaling changes its content
116
- * dimensions.
117
- */
118
- const DEFAULT_DEBOUNCE_MS = 80;
119
- const SIZE_THRESHOLD_PX = 2;
120
- /**
121
- * Observes the parent container of `element` for size changes.
122
- *
123
- * The callback only fires when the observed target's dimensions change
124
- * by more than {@link SIZE_THRESHOLD_PX} pixels compared to the last
125
- * time the callback was invoked. This prevents feedback loops where
126
- * auto-scaling → font-size change → content reflow → ResizeObserver
127
- * fires again → auto-scaling …
128
- *
129
- * @param element The component's host element
130
- * @param callback Called when the observed parent genuinely resizes
131
- * @param debounceMs Debounce interval (default 80ms)
132
- */
133
- function observeParentResize(element, callback, debounceMs = DEFAULT_DEBOUNCE_MS) {
134
- let timer = null;
135
- let disconnected = false;
136
- let lastWidth = -1;
137
- let lastHeight = -1;
138
- const target = findObservationTarget(element);
139
- if (!target) {
140
- return { disconnect() { } };
141
- }
142
- const observer = new ResizeObserver((entries) => {
143
- var _a;
144
- if (disconnected)
145
- return;
146
- // Use the first entry's contentBoxSize when available, fall back
147
- // to the target's clientWidth/clientHeight.
148
- let w;
149
- let h;
150
- const entry = entries[0];
151
- if ((_a = entry === null || entry === void 0 ? void 0 : entry.contentBoxSize) === null || _a === void 0 ? void 0 : _a.length) {
152
- const box = entry.contentBoxSize[0];
153
- w = box.inlineSize;
154
- h = box.blockSize;
155
- }
156
- else {
157
- w = target.clientWidth;
158
- h = target.clientHeight;
159
- }
160
- // Only fire when the parent genuinely resized — not when the
161
- // child's own scaling caused a sub-pixel content reflow.
162
- if (Math.abs(w - lastWidth) <= SIZE_THRESHOLD_PX && Math.abs(h - lastHeight) <= SIZE_THRESHOLD_PX) {
163
- return;
164
- }
165
- lastWidth = w;
166
- lastHeight = h;
167
- if (timer != null)
168
- clearTimeout(timer);
169
- timer = setTimeout(() => {
170
- if (!disconnected)
171
- callback();
172
- }, debounceMs);
173
- });
174
- observer.observe(target);
175
- return {
176
- disconnect() {
177
- disconnected = true;
178
- if (timer != null)
179
- clearTimeout(timer);
180
- observer.disconnect();
181
- },
182
- };
183
- }
184
- /**
185
- * Finds the best element to observe for size changes.
186
- * Prefers the slot wrapper inside the shadow DOM (the actual layout
187
- * container), falls back to the light DOM parent.
188
- */
189
- function findObservationTarget(element) {
190
- var _a;
191
- const lightParent = element.parentElement;
192
- if ((_a = lightParent === null || lightParent === void 0 ? void 0 : lightParent.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
193
- return lightParent.assignedSlot.parentElement;
194
- }
195
- return lightParent;
196
- }
197
-
198
- exports.observeParentResize = observeParentResize;
199
- exports.withRuleSet = withRuleSet;