@bino-bi/bn-template-engine 1.0.0-next.30 → 1.0.0-next.31

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 (143) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/{p-64803a42.entry.js → p-14d021be.entry.js} +1 -1
  3. package/dist/bn-template-engine/p-58b10778.entry.js +1 -0
  4. package/dist/bn-template-engine/p-680fbcff.entry.js +1 -0
  5. package/dist/bn-template-engine/p-6a446e0b.entry.js +1 -0
  6. package/dist/bn-template-engine/{p-40ba7f43.entry.js → p-7d475277.entry.js} +1 -1
  7. package/dist/bn-template-engine/p-9f3cbc5f.entry.js +1 -0
  8. package/dist/bn-template-engine/p-BNCLKXjM.js +1 -0
  9. package/dist/bn-template-engine/{p-B8AjeKja.js → p-BTbeDWM9.js} +1 -1
  10. package/dist/bn-template-engine/{p-Z2rUaSh_.js → p-BjR3nkhl.js} +1 -1
  11. package/dist/bn-template-engine/p-CHZ50kEY.js +1 -0
  12. package/dist/bn-template-engine/p-CJfJQT0m.js +1 -0
  13. package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +189 -66
  14. package/dist/cjs/bn-grid.cjs.entry.js +459 -28
  15. package/dist/cjs/bn-image.cjs.entry.js +2 -2
  16. package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
  17. package/dist/cjs/bn-ruleset.cjs.entry.js +2 -2
  18. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  19. package/dist/cjs/bn-text.cjs.entry.js +3 -3
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/{diagnostics-C4Ggts3w.js → localFrame-P5SDUOto.js} +90 -1
  22. package/dist/cjs/{withBodyObserver-BK4idxqG.js → withBodyObserver-B1_hmuUz.js} +1 -1
  23. package/dist/cjs/{withHasError-CqvcS23z.js → withHasError-3kR2tdhJ.js} +4 -0
  24. package/dist/cjs/{withStyled-70D4Isgt.js → withStyled-Ds3e64Nz.js} +1 -1
  25. package/dist/cjs/{withTranslation-C6Pye2CM.js → withTranslation-Cjvvs3gL.js} +2 -2
  26. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +32 -2
  27. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +32 -2
  28. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +3 -1
  29. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +32 -2
  30. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +33 -2
  31. package/dist/collection/components/bn-chart-time/bn-chart-time.js +33 -2
  32. package/dist/collection/components/bn-grid/bn-grid.js +448 -20
  33. package/dist/collection/components/bn-grid/utils/cellLayout.js +111 -0
  34. package/dist/collection/components/bn-table/bn-table.js +39 -2
  35. package/dist/collection/stores/componentStyles.js +4 -0
  36. package/dist/collection/utils/layoutState/baseline.js +67 -0
  37. package/dist/collection/utils/layoutState/index.js +2 -0
  38. package/dist/collection/utils/layoutState/localFrame.js +87 -0
  39. package/dist/collection/utils/layoutState/svgChartElements.js +6 -2
  40. package/dist/collection/utils/xy/XYFrame.js +3 -1
  41. package/dist/components/bn-annotation-layer.js +1 -1
  42. package/dist/components/bn-annotation-list.js +1 -1
  43. package/dist/components/bn-asset.js +1 -1
  44. package/dist/components/bn-body.js +1 -1
  45. package/dist/components/bn-card.js +1 -1
  46. package/dist/components/bn-chart-bubble-renderer.js +1 -1
  47. package/dist/components/bn-chart-bubble.js +1 -1
  48. package/dist/components/bn-chart-bullet-renderer.js +1 -1
  49. package/dist/components/bn-chart-bullet.js +1 -1
  50. package/dist/components/bn-chart-scatter-renderer.js +1 -1
  51. package/dist/components/bn-chart-scatter.js +1 -1
  52. package/dist/components/bn-chart-structure-renderer.js +1 -1
  53. package/dist/components/bn-chart-structure.js +1 -1
  54. package/dist/components/bn-chart-time-renderer.js +1 -1
  55. package/dist/components/bn-chart-time.js +1 -1
  56. package/dist/components/bn-component-style.js +1 -1
  57. package/dist/components/bn-context.js +1 -1
  58. package/dist/components/bn-dataset.js +1 -1
  59. package/dist/components/bn-datasource.js +1 -1
  60. package/dist/components/bn-footer.js +1 -1
  61. package/dist/components/bn-grid.js +1 -1
  62. package/dist/components/bn-image.js +1 -1
  63. package/dist/components/bn-internationalization.js +1 -1
  64. package/dist/components/bn-layout-card.js +1 -1
  65. package/dist/components/bn-layout-page.js +1 -1
  66. package/dist/components/bn-message.js +1 -1
  67. package/dist/components/bn-page.js +1 -1
  68. package/dist/components/bn-ruleset.js +1 -1
  69. package/dist/components/bn-scaling-group.js +1 -1
  70. package/dist/components/bn-table-renderer.js +1 -1
  71. package/dist/components/bn-table.js +1 -1
  72. package/dist/components/bn-text.js +1 -1
  73. package/dist/components/bn-title.js +1 -1
  74. package/dist/components/bn-tree.js +1 -1
  75. package/dist/components/{p-Ba9PUiBp.js → p--PXNTEGy.js} +1 -1
  76. package/dist/components/p-0gehv1XG.js +1 -0
  77. package/dist/components/{p-Bs-YxJEt.js → p-8a2-IS-y.js} +1 -1
  78. package/dist/components/p-B2jqpOF9.js +1 -0
  79. package/dist/components/{p-BWBHlztH.js → p-BPJsmv3o.js} +1 -1
  80. package/dist/components/{p-BXrPfAvP.js → p-BVtD8O36.js} +1 -1
  81. package/dist/components/p-BcOud3dQ.js +1 -0
  82. package/dist/components/{p-DsOaqeTN.js → p-BoUkFdpu.js} +1 -1
  83. package/dist/components/p-BohXdw3-.js +1 -0
  84. package/dist/components/p-C6XrNN2m.js +1 -0
  85. package/dist/components/p-CMCnX0iM.js +1 -0
  86. package/dist/components/{p-Dm55bMs2.js → p-CZgGAHDo.js} +1 -1
  87. package/dist/components/{p-Ds_BSK8v.js → p-ClGOhg6P.js} +1 -1
  88. package/dist/components/p-CujsXn-l.js +1 -0
  89. package/dist/components/{p-DIyUaSBg.js → p-D6cWoDk1.js} +1 -1
  90. package/dist/components/p-D7X69xMg.js +1 -0
  91. package/dist/components/{p-B1nL0yOa.js → p-DSkyHSIL.js} +1 -1
  92. package/dist/components/{p-BSV_vyqs.js → p-De82WP7z.js} +1 -1
  93. package/dist/components/p-DyO09Jk6.js +1 -0
  94. package/dist/components/{p-WzaayhTX.js → p-Ku08TQL1.js} +1 -1
  95. package/dist/components/p-t4xPltK2.js +1 -0
  96. package/dist/components/{p-ey23VlID.js → p-yH-XxIy9.js} +1 -1
  97. package/dist/components/{p-X9hpquOX.js → p-z56_ZQ42.js} +1 -1
  98. package/dist/components/{p-B7uwck1J.js → p-zf8cTH63.js} +1 -1
  99. package/dist/esm/bn-annotation-layer_30.entry.js +138 -15
  100. package/dist/esm/bn-grid.entry.js +450 -19
  101. package/dist/esm/bn-image.entry.js +2 -2
  102. package/dist/esm/bn-internationalization.entry.js +2 -2
  103. package/dist/esm/bn-ruleset.entry.js +2 -2
  104. package/dist/esm/bn-template-engine.js +1 -1
  105. package/dist/esm/bn-text.entry.js +3 -3
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/{diagnostics-Cyqy1zDT.js → localFrame-IW84cmdb.js} +90 -2
  108. package/dist/esm/{withBodyObserver-JcRB9OPQ.js → withBodyObserver-CAnnvrE_.js} +1 -1
  109. package/dist/esm/{withHasError-l3cMN-oP.js → withHasError-Cj_MzZ8Q.js} +4 -0
  110. package/dist/esm/{withStyled-DGOiR00Q.js → withStyled-B-cbWCe2.js} +1 -1
  111. package/dist/esm/{withTranslation-BpO8BC5B.js → withTranslation-_8q-7Y9C.js} +2 -2
  112. package/dist/schemas/theme.schema.json +14 -0
  113. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +6 -1
  114. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +6 -1
  115. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +6 -1
  116. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +6 -1
  117. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +6 -1
  118. package/dist/types/components/bn-grid/bn-grid.d.ts +78 -3
  119. package/dist/types/components/bn-grid/utils/cellLayout.d.ts +47 -0
  120. package/dist/types/components/bn-table/bn-table.d.ts +8 -1
  121. package/dist/types/components.d.ts +94 -7
  122. package/dist/types/stores/componentStyles.d.ts +6 -0
  123. package/dist/types/utils/layoutState/baseline.d.ts +17 -0
  124. package/dist/types/utils/layoutState/index.d.ts +2 -0
  125. package/dist/types/utils/layoutState/localFrame.d.ts +17 -0
  126. package/dist/types/utils/layoutState/svgChartElements.d.ts +3 -1
  127. package/dist/types/utils/layoutState/types.d.ts +12 -2
  128. package/package.json +1 -1
  129. package/dist/bn-template-engine/p-132ad556.entry.js +0 -1
  130. package/dist/bn-template-engine/p-17d71782.entry.js +0 -1
  131. package/dist/bn-template-engine/p-467871f3.entry.js +0 -1
  132. package/dist/bn-template-engine/p-CrT83eO4.js +0 -1
  133. package/dist/bn-template-engine/p-D_DzKxRV.js +0 -1
  134. package/dist/bn-template-engine/p-c41c0a1b.entry.js +0 -1
  135. package/dist/bn-template-engine/p-yc69rwuH.js +0 -1
  136. package/dist/components/p-BDS_jiow.js +0 -1
  137. package/dist/components/p-BIIDTtcR.js +0 -1
  138. package/dist/components/p-BVKLCz2k.js +0 -1
  139. package/dist/components/p-CkW23yp2.js +0 -1
  140. package/dist/components/p-DUHp_9X-.js +0 -1
  141. package/dist/components/p-Dq1AzGKX.js +0 -1
  142. package/dist/components/p-U3zkcEJZ.js +0 -1
  143. package/dist/components/p-jbp6YiHf.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,h as i,a as e,g as s}from"./p-CCZcKl0Q.js";import{LAYOUT_STATE_VERSION as o}from"./index.esm.js";import{l as n,o as l,r,m as a,a as d}from"./p-CHZ50kEY.js";import{w as h,a as c}from"./p-CJfJQT0m.js";import{w as u,a as v}from"./p-BjR3nkhl.js";function g(t){if(!t||""===t.trim()||"[]"===t)return[];try{const i=JSON.parse(t);return Array.isArray(i)?i.map(((t,i)=>{var e,s,o;return"string"==typeof t?{label:t,id:String(i)}:"object"==typeof t&&null!==t?{label:null!==(s=null!==(e=t.label)&&void 0!==e?e:t.name)&&void 0!==s?s:String(i),id:null!==(o=t.id)&&void 0!==o?o:String(i)}:{label:String(t),id:String(i)}})):[]}catch(t){return console.error("parseHeaders: failed to parse JSON",t),[]}}function f(t,i){return`${t.id}-${i.id}`}function p(t){if(!t||""===t.trim()||"[]"===t)return[];try{const i=JSON.parse(t);if(!Array.isArray(i))return["Headers must be an array"];const e=[],s=new Set;return i.forEach(((t,i)=>{"object"==typeof t&&null!==t&&void 0!==t.id&&("string"!=typeof t.id?e.push(`Header[${i}]: 'id' must be a string`):s.has(t.id)?e.push(`Header[${i}]: duplicate id '${t.id}'`):s.add(t.id),void 0!==t.label&&"string"!=typeof t.label&&e.push(`Header[${i}]: 'label' must be a string`))})),e}catch(t){return console.error("validateHeadersJson: failed to parse JSON",t),["Invalid JSON structure"]}}const b=["auto","equal"],m=["top","center","bottom","baseline"],y=["left","center","right","baseline"],w={top:"flex-start",center:"center",bottom:"flex-end",baseline:"flex-start"},x={left:"stretch",center:"center",right:"flex-end",baseline:"stretch"},C=t=>Math.round(100*t)/100,S=new Set(["bn-asset","bn-component-style","bn-dataset","bn-datasource","bn-internationalization","bn-ruleset","bn-scaling-group"]),$=class{validateRowHeaders(t){const i="ERR_rowHeaders",e=p(t);e.length>0?this.errors.addOrReplace({id:i,type:"error",message:`row-headers: ${e.join("; ")}`}):this.errors.remove(i),this.updateGridConfig()}validateColumnHeaders(t){const i="ERR_columnHeaders",e=p(t);e.length>0?this.errors.addOrReplace({id:i,type:"error",message:`column-headers: ${e.join("; ")}`}):this.errors.remove(i),this.updateGridConfig()}validateCellHeight(t){this.resolvedHeight=this.validateChoice("cell-height","ERR_cellHeight",t,b,"auto")}validateCellWidth(t){this.resolvedWidth=this.validateChoice("cell-width","ERR_cellWidth",t,b,"auto")}validateCellVerticalAlign(t){this.resolvedVertical=this.validateChoice("cell-vertical-align","ERR_cellVerticalAlign",t,m,"top"),this.schedule()}validateCellHorizontalAlign(t){this.resolvedHorizontal=this.validateChoice("cell-horizontal-align","ERR_cellHorizontalAlign",t,y,"left"),this.schedule()}validateCellCaptions(t){const i=function(t){if(void 0===t||""===t.trim())return{};let i;try{i=JSON.parse(t)}catch(t){return}if("object"!=typeof i||null===i||Array.isArray(i))return;const e={};for(const[t,s]of Object.entries(i)){if("string"!=typeof s)return;""!==s&&(e[t]=s)}return e}(t);i?this.errors.remove("ERR_cellCaptions"):this.errors.addOrReplace({id:"ERR_cellCaptions",type:"error",message:"cell-captions: not a JSON object from slot name to text."}),this.captions=null!=i?i:{}}constructor(i){t(this,i),this.gridConfig={rows:[],columns:[]},this.resolvedHeight="auto",this.resolvedWidth="auto",this.resolvedVertical="top",this.resolvedHorizontal="left",this.captions={},this.offsets={},this.observed=new WeakSet,this.scheduled=!1,this.run=0,this.adjustments=0,this.chartTitle="",this.rowHeaders="[]",this.columnHeaders="[]",this.showRowHeaders=!0,this.showColumnHeaders=!0,this.showBorders=!0,this.rowHeaderWidth="auto",this.cellGap="0px",this.cellHeight="auto",this.cellWidth="auto",this.cellVerticalAlign="top",this.cellHorizontalAlign="left",this.cellCaptions="",this.schedule=()=>{if(!this.isBaselineMode())return this.run++,void(Object.keys(this.offsets).length>0&&(this.offsets={}));this.scheduled||(this.scheduled=!0,this.holdStatus(new Promise((t=>{requestAnimationFrame((()=>{this.scheduled=!1,this.align().catch((t=>console.error("bn-grid: aligning the baselines failed",t))).finally(t)}))}))))},u(this),this.holdStatus=h(this),this.errors=c(this),this.componentStyle=v(this)}connectedCallback(){var t;this.observed=new WeakSet,this.resizeObserver=new ResizeObserver(this.schedule),this.mutationObserver=new MutationObserver(this.schedule),this.mutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}),null===(t=document.fonts)||void 0===t||t.addEventListener("loadingdone",this.schedule)}disconnectedCallback(){var t,i,e;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(e=document.fonts)||void 0===e||e.removeEventListener("loadingdone",this.schedule),this.run++}componentDidRender(){this.schedule()}validateChoice(t,i,e,s,o){return null==e||""===e?(this.errors.remove(i),o):s.includes(e)?(this.errors.remove(i),e):(this.errors.addOrReplace({id:i,type:"error",message:`${t}: "${e}" is not one of ${s.join(", ")}.`}),o)}isBaselineMode(){return"baseline"===this.resolvedVertical||"baseline"===this.resolvedHorizontal}visualIn(t){var i;const e=Array.from(this.element.children).find((i=>i.getAttribute("slot")===t));if(!e)return;const s=t=>t.localName.startsWith("bn-")&&!S.has(t.localName);return s(e)?e:null!==(i=Array.from(e.querySelectorAll("*")).find(s))&&void 0!==i?i:void 0}async align(){var t;const i=++this.run;if(!this.element.isConnected||!this.isBaselineMode())return;const{rows:e,columns:s}=this.gridConfig,o=e.flatMap(((t,i)=>s.map(((e,s)=>({slot:f(t,e),row:i,column:s}))))),l=o.map((({slot:t})=>this.visualIn(t)));if(await Promise.all(l.map((t=>{var i;return null===(i=null==t?void 0:t.componentOnReady)||void 0===i?void 0:i.call(t)}))),i!==this.run)return;l.forEach((t=>t&&this.observe(t)));const r=await Promise.all(l.map((t=>"function"==typeof(null==t?void 0:t.getBaseline)?t.getBaseline().catch((()=>({}))):Promise.resolve({}))));if(i!==this.run)return;const a=n(this.element),d=new Map;null===(t=this.element.shadowRoot)||void 0===t||t.querySelectorAll(".grid-slot").forEach((t=>{var i;d.set(null!==(i=t.getAttribute("data-slot"))&&void 0!==i?i:"",t)}));const h=function(t,i,e){const s={};for(const i of t)s[i.slot]={};const o=(i,e,o,n)=>{var l;const r=new Map;for(const e of t)r.set(e[i],[...null!==(l=r.get(e[i]))&&void 0!==l?l:[],e]);for(const t of r.values()){const i=t.map((t=>{const i=e(t);return void 0===i?void 0:i-o(t)})),l=i.filter((t=>void 0!==t)),r=l.length>0?Math.max(...l):0,a=i.map((t=>void 0===t?void 0:C(r-t))),d=Math.max(0,...a.filter((t=>void 0!==t)));t.forEach(((t,i)=>n(s[t.slot],a[i],d)))}};return i&&o("row",(t=>t.y),(t=>t.top),((t,i)=>{void 0===i?t.bottom=!0:t.top=i})),e&&o("column",(t=>t.x),(t=>t.left),((t,i,e)=>{void 0!==i&&(t.left=i);const s=C(e-(null!=i?i:0));s>0&&(t.right=s)})),s}(o.map((({slot:t,row:i,column:e},s)=>{const o=l[s],n=r[s],h=d.get(t),c=t=>parseFloat((null==h?void 0:h.style.getPropertyValue(t))||"0")||0,u={slot:t,row:i,column:e,top:c("padding-top"),left:c("margin-left")};if(o){const t=a.toLocal(o.getBoundingClientRect());void 0!==n.y&&(u.y=t.y+n.y),void 0!==n.x&&(u.x=t.x+n.x)}return u})),"baseline"===this.resolvedVertical,"baseline"===this.resolvedHorizontal);if(function(t,i){var e,s,o,n,l,r,a,d;const h=new Set([...Object.keys(t),...Object.keys(i)]);for(const c of h){const h=null!==(e=t[c])&&void 0!==e?e:{},u=null!==(s=i[c])&&void 0!==s?s:{};if(Boolean(h.bottom)!==Boolean(u.bottom))return!1;if(Math.abs((null!==(o=h.top)&&void 0!==o?o:0)-(null!==(n=u.top)&&void 0!==n?n:0))>=.5)return!1;if(Math.abs((null!==(l=h.left)&&void 0!==l?l:0)-(null!==(r=u.left)&&void 0!==r?r:0))>=.5)return!1;if(Math.abs((null!==(a=h.right)&&void 0!==a?a:0)-(null!==(d=u.right)&&void 0!==d?d:0))>=.5)return!1}return!0}(h,this.offsets))this.adjustments=0;else{if(this.adjustments>=5)return console.warn("bn-grid: the baselines did not settle; the cells keep their last alignment."),void(this.adjustments=0);this.adjustments++,this.offsets=h,this.schedule()}}observe(t){var i;this.observed.has(t)||(this.observed.add(t),null===(i=this.resizeObserver)||void 0===i||i.observe(t));const e=t=>{var i;t&&(this.observed.has(t)||(this.observed.add(t),null===(i=this.mutationObserver)||void 0===i||i.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["x1","y1","x2","y2","x","y","width","height","transform","style","class"]})),t.querySelectorAll("*").forEach((t=>e(t.shadowRoot))))};e(t.shadowRoot)}async getLayoutState(t){var i,e,s,n;const h=null!==(i=null==t?void 0:t.detail)&&void 0!==i?i:"summary",c=l(this.element),u=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333})),{rows:v,columns:g}=this.gridConfig,f={version:o,tag:this.element.localName,id:d(this.element),slot:null!==(e=this.element.getAttribute("slot"))&&void 0!==e?e:void 0,rect:a(this.element,c),em:{fontSizePx:u,appliedScaleFactor:1},regions:[],metadata:{title:this.chartTitle||void 0,rowCount:v.length,columnCount:g.length,cellCount:v.length*g.length},diagnostics:r(this.element)},p=null===(s=this.element.shadowRoot)||void 0===s?void 0:s.querySelector(".grid-container");if(p&&f.regions.push({id:"grid",rect:a(p,c)}),"full"!==h||!p)return f;const b=[],m=t=>b.push(t),y=p.querySelector(".grid-title");return y&&m({kind:"gridTitle",label:(null===(n=y.textContent)||void 0===n?void 0:n.trim())||void 0,rect:a(y,c)}),p.querySelectorAll(".grid-header-col").forEach(((t,i)=>{var e,s;m({kind:"gridHeader",columnId:null===(e=g[i])||void 0===e?void 0:e.id,label:(null===(s=t.textContent)||void 0===s?void 0:s.trim())||void 0,rect:a(t,c)})})),p.querySelectorAll(".grid-header-row").forEach(((t,i)=>{var e,s;m({kind:"gridHeader",rowId:null===(e=v[i])||void 0===e?void 0:e.id,label:(null===(s=t.textContent)||void 0===s?void 0:s.trim())||void 0,rect:a(t,c)})})),p.querySelectorAll(".grid-cell").forEach(((t,i)=>{var e,s,o,n;m({kind:"gridCell",rowId:g.length>0?null===(e=v[Math.floor(i/g.length)])||void 0===e?void 0:e.id:void 0,columnId:g.length>0?null===(s=g[i%g.length])||void 0===s?void 0:s.id:void 0,slot:null!==(n=null===(o=t.querySelector("slot"))||void 0===o?void 0:o.getAttribute("name"))&&void 0!==n?n:void 0,rect:a(t,c)})})),p.querySelectorAll(".grid-caption").forEach((t=>{var i,e,s,o;m({kind:"gridCaption",slot:null!==(s=null===(e=null===(i=t.parentElement)||void 0===i?void 0:i.querySelector("slot"))||void 0===e?void 0:e.getAttribute("name"))&&void 0!==s?s:void 0,label:(null===(o=t.textContent)||void 0===o?void 0:o.trim())||void 0,rect:a(t,c)})})),f.elements=b,f}getGridStyle(){return this.componentStyle((t=>t["bn-grid"]))}componentWillLoad(){this.validateRowHeaders(this.rowHeaders),this.validateColumnHeaders(this.columnHeaders),this.validateCellHeight(this.cellHeight),this.validateCellWidth(this.cellWidth),this.validateCellVerticalAlign(this.cellVerticalAlign),this.validateCellHorizontalAlign(this.cellHorizontalAlign),this.validateCellCaptions(this.cellCaptions)}updateGridConfig(){var t;this.gridConfig=(t=this.columnHeaders,{rows:g(this.rowHeaders),columns:g(t)})}shouldShowRowHeaders(){return this.showRowHeaders&&this.gridConfig.rows.length>0}shouldShowColumnHeaders(){return this.showColumnHeaders&&this.gridConfig.columns.length>0}shouldShowBorders(){return this.showBorders}getGridTemplateColumns(){const t=[];this.shouldShowRowHeaders()&&t.push(this.rowHeaderWidth);const i=this.gridConfig.columns.length||1;for(let e=0;e<i;e++)t.push("equal"===this.resolvedWidth?"1fr":"auto");return t.join(" ")}getGridTemplateRows(){const t=[];this.chartTitle&&t.push("auto"),this.shouldShowColumnHeaders()&&t.push("auto");const i=this.gridConfig.rows.length||1;for(let e=0;e<i;e++)t.push("equal"===this.resolvedHeight?"1fr":"auto");return t.join(" ")}renderTitle(){if(!this.chartTitle)return null;const t=(this.shouldShowRowHeaders()?1:0)+this.gridConfig.columns.length;return i("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(),e=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,o=this.chartTitle?2:1;return this.gridConfig.columns.map(((n,l)=>{const r=l>0;return i("div",{key:`col-header-${n.id}`,class:"grid-header grid-header-col",style:{"grid-column":String(s+l),"grid-row":String(o),"border-left":r?e:"none",padding:`${t.cellPadding}px`,"padding-left":r?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},n.label)}))}renderDataCells(){const t=this.getGridStyle(),e=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",s=this.shouldShowRowHeaders()?2:1,o=(this.chartTitle?1:0)+(this.shouldShowColumnHeaders()?1:0)+1,n=[];return this.gridConfig.rows.length>0&&this.gridConfig.columns.length>0&&this.gridConfig.rows.forEach(((l,r)=>{if(this.shouldShowRowHeaders()){const s=r>0;n.push(i("div",{key:`row-header-${l.id}`,class:"grid-header grid-header-row",style:{"grid-column":"1","grid-row":String(o+r),"border-top":s?e:"none",padding:`${t.cellPadding}px`,"padding-top":s?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},l.label))}this.gridConfig.columns.forEach(((a,d)=>{const h=f(l,a),c=d>0,u=r>0;n.push(i("div",{key:`cell-${h}`,class:"grid-cell",style:Object.assign({"grid-column":String(s+d),"grid-row":String(o+r),"border-left":c?e:"none","border-top":u?e:"none","padding-left":c?`${t.cellPadding+4}px`:"0","padding-top":u?`${t.cellPadding+4}px`:"0"},this.cellAlignStyle())},this.renderCellContent(h,t)))}))})),n}cellAlignStyle(){return"top"===this.resolvedVertical&&"left"===this.resolvedHorizontal?{}:{display:"flex","flex-direction":"column","justify-content":w[this.resolvedVertical],"align-items":x[this.resolvedHorizontal]}}renderCellContent(t,e){const s=this.captions[t],o=void 0!==s?i("div",{class:"grid-caption",style:{"font-size":`${e.captionFontSize}px`,"font-weight":String(e.captionFontWeight),color:e.captionColor,"margin-bottom":`${e.captionGap}px`,"align-self":"flex-start"}},s):null,n={};"top"===this.resolvedVertical&&"left"===this.resolvedHorizontal||(n["align-self"]="stretch","center"!==this.resolvedHorizontal&&"right"!==this.resolvedHorizontal||(n.display="flex",n["flex-direction"]="column",n["align-items"]=x[this.resolvedHorizontal])),"center"===this.resolvedVertical?(n["margin-top"]="auto",n["margin-bottom"]="auto"):"bottom"===this.resolvedVertical&&(n["margin-top"]="auto");const l=this.offsets[t];return(null==l?void 0:l.bottom)&&(n["margin-top"]="auto"),(null==l?void 0:l.top)&&(n["padding-top"]=`${l.top}px`),(null==l?void 0:l.left)&&(n["margin-left"]=`${l.left}px`),(null==l?void 0:l.right)&&(n["margin-right"]=`${l.right}px`),[o,i("div",{class:"grid-slot","data-slot":t,style:n},i("slot",{name:t}))]}getFontStyles(){return this.componentStyle((t=>{var i,e,s,o;return{"--bn-font-family":(null===(i=t.global)||void 0===i?void 0:i.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(o=t.global)||void 0===o?void 0:o.fontBackgroundColor)||"#ffffff"}}))}render(){const t={display:"inline-grid","grid-template-columns":this.getGridTemplateColumns(),"grid-template-rows":this.getGridTemplateRows(),gap:this.cellGap};return i(e,{key:"bf650566a63dea5dc5a3cc6a79379c849b694285",style:this.getFontStyles()},i("div",{key:"489acff54722d2d92b66842205beacd06c816f51",class:"grid-container",style:t},this.renderTitle(),this.renderColumnHeaders(),this.renderDataCells()),i("slot",{key:"35949a9ed0b3fa851ec66f1eb9a9dcb88ed59aae"}))}get element(){return s(this)}static get watchers(){return{rowHeaders:[{validateRowHeaders:0}],columnHeaders:[{validateColumnHeaders:0}],cellHeight:[{validateCellHeight:0}],cellWidth:[{validateCellWidth:0}],cellVerticalAlign:[{validateCellVerticalAlign:0}],cellHorizontalAlign:[{validateCellHorizontalAlign:0}],cellCaptions:[{validateCellCaptions:0}]}}};$.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{$ as bn_grid}
@@ -1 +1 @@
1
- import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as r}from"./p-CrT83eO4.js";import{w as e,a,g as n,f as h,R as c}from"./p-yc69rwuH.js";import{e as b}from"./p-ClruFZD_.js";const f=class{constructor(s){t(this,s),this.namespace="_system",e(this),this.errors=a(this),r(this,(t=>{if(this.stores||(this.stores=n(this.element)),""!==t.trim())try{const s=JSON.parse(t);if(null===s||"object"!=typeof s||Array.isArray(s))throw new Error("not a JSON object.");const i=h(s);for(const[t,s]of Object.entries(c))t in i&&!(s in i)&&(i[s]=i[t]);const o=this.namespace||"_system",r=Object.assign({},this.stores.internationalization.get(o));r[this.code]=Object.assign(Object.assign({},r[this.code]),i),this.stores.internationalization.set(o,r),this.errors.remove("ERR_body")}catch(t){this.errors.addOrReplace({id:"ERR_body",type:"error",message:`Body: ${b(t)}`})}else this.errors.remove("ERR_body")}))}render(){return s(i,{key:"7e7454bf0b02ea746a736daaabb09c9ff52b3775"})}get element(){return o(this)}};f.style="bn-internationalization{display:none}";export{f as bn_internationalization}
1
+ import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as e}from"./p-BNCLKXjM.js";import{w as r,a,g as n,f as h,R as c}from"./p-CJfJQT0m.js";import{e as b}from"./p-ClruFZD_.js";const f=class{constructor(s){t(this,s),this.namespace="_system",r(this),this.errors=a(this),e(this,(t=>{if(this.stores||(this.stores=n(this.element)),""!==t.trim())try{const s=JSON.parse(t);if(null===s||"object"!=typeof s||Array.isArray(s))throw new Error("not a JSON object.");const i=h(s);for(const[t,s]of Object.entries(c))t in i&&!(s in i)&&(i[s]=i[t]);const o=this.namespace||"_system",e=Object.assign({},this.stores.internationalization.get(o));e[this.code]=Object.assign(Object.assign({},e[this.code]),i),this.stores.internationalization.set(o,e),this.errors.remove("ERR_body")}catch(t){this.errors.addOrReplace({id:"ERR_body",type:"error",message:`Body: ${b(t)}`})}else this.errors.remove("ERR_body")}))}render(){return s(i,{key:"7e7454bf0b02ea746a736daaabb09c9ff52b3775"})}get element(){return o(this)}};f.style="bn-internationalization{display:none}";export{f as bn_internationalization}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,a as i,g as n}from"./p-CCZcKl0Q.js";import{w as o,a as e}from"./p-BjR3nkhl.js";import{w as r,a as l,g as a}from"./p-CJfJQT0m.js";const h=class{constructor(s){t(this,s),o(this),r(this),this.errors=l(this),this.componentStyle=e(this)}connectedCallback(){this.stores=a(this.element)}getFontStyles(){return this.componentStyle((t=>{var s,i,n,o;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(n=t.global)||void 0===n?void 0:n.fontColor)||"#000000","--bn-font-background":(null===(o=t.global)||void 0===o?void 0:o.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(t){if(null==t||""===t)return"";const s=this.stores.assets.state;return t.startsWith("asset:")?s[t.substring(6)]:s[t]||t}render(){return s(i,{key:"b303581057c183cc27eb13cfdc389c6b008e9172",style:this.getFontStyles()},null!=this.source&&""!==this.source?s("img",{src:this.prepareAssetUrl(this.source)}):"")}get element(){return n(this)}};h.style=":host{display:inline-block;position:relative;overflow:hidden}img{max-width:100%;height:auto}";export{h as bn_image}
@@ -0,0 +1 @@
1
+ import{g as r}from"./p-CCZcKl0Q.js";import{r as t}from"./p-CJfJQT0m.js";const o=(o,s)=>{let a;const e=new MutationObserver((()=>{var r;a&&s(null!==(r=a.textContent)&&void 0!==r?r:"")})),c=o.connectedCallback;o.connectedCallback=()=>{var i;a=r(o),e.observe(a,{childList:!0,subtree:!0,characterData:!0}),s(null!==(i=a.textContent)&&void 0!==i?i:""),t(c,o)};const i=o.disconnectedCallback;o.disconnectedCallback=()=>{e.disconnect(),t(i,o)}};export{o as w}
@@ -1 +1 @@
1
- import{g as t,r as n,c as e,R as o}from"./p-yc69rwuH.js";import{g as r,f as i}from"./p-CCZcKl0Q.js";import{i as s}from"./p-Z2rUaSh_.js";const a=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img","code","pre","blockquote","del"]),l=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),u=new Set(["http:","https:","mailto:"]),c=/^\s*text-align:\s*(left|center|right)\s*;?\s*$/i;function d(t){if(!t)return"";const n=(new DOMParser).parseFromString(t,"text/html").body;return f(n),n.innerHTML}function f(t){for(const n of Array.from(t.childNodes)){if(n.nodeType===Node.TEXT_NODE)continue;const e=n;if(n.nodeType!==Node.ELEMENT_NODE||!a.has(e.localName)){t.removeChild(n);continue}for(const t of Array.from(e.attributes)){const n=t.name.toLowerCase();l.has(n)&&("href"!==n&&"src"!==n||v(n,t.value))||e.removeAttribute(t.name)}const o=e.getAttribute("style");null===o||c.test(o)||e.removeAttribute("style"),f(e)}}function v(t,n){try{const{protocol:e}=new URL(n,"http://a");return u.has(e)||"src"===t&&"data:"===e}catch(t){return!1}}function h(t,n=!1){const e=p(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=p(t),o=0,r=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),r=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=m(e),o++;continue}const t=getComputedStyle(e),s=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${s} clientH=${e.clientHeight} h=${t.height}`),null===r)if("hidden"===s||"scroll"===s||"auto"===s)r=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(r)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(r=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=m(e),o++}return null!==r?r/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(r)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,r),height:Math.max(0,i)}}function p(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function m(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}function b(t,n){const e=t.getBoundingClientRect(),o=t.offsetHeight>0?e.height/t.offsetHeight:0;if(!(o>0)||Math.abs(o-(t.offsetWidth>0?e.width/t.offsetWidth:0))>.01*o)return 0;const r=e.top+n*o;let i=0;for(let n=t;n;n=m(n)){const t=getComputedStyle(n).overflowY;if("hidden"===t||"clip"===t)i=Math.max(i,r-n.getBoundingClientRect().bottom);else if(("auto"===t||"scroll"===t)&&n.scrollHeight>n.clientHeight+1)break}return i/o}const g=(t,n)=>Math.round(t*n*100)/100;function w(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const n=Number(t);return!isNaN(n)&&n>0?{mode:"factor",factor:n}:{mode:"empty"}}const y={k:1e3,K:1e3,M:1e6,G:1e9,T:1e12},$=/^(\d+(?:\.\d+)?|\.\d+)\s*([kKMGT])?$/;function M(t){var n;if("number"==typeof t)return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"invalid",raw:String(t)};const e=null!==(n=null==t?void 0:t.toString().trim())&&void 0!==n?n:"";if("auto"===e.toLowerCase())return{kind:"auto"};const o=$.exec(e);if(o){const t=Number(o[1])*(o[2]?y[o[2]]:1);if(Number.isFinite(t)&&t>0)return{kind:"number",value:t}}return{kind:"invalid",raw:e}}function k(t,n){const e=M(t);if("auto"===e.kind)return{kind:"auto"};if("string"==typeof t){const e=t.trim();if(n.has(e))return{kind:"value",value:n.get(e)}}return"number"===e.kind?{kind:"value",value:e.value}:{kind:"invalid",raw:e.raw}}const N=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"]];function S(t){if(!Number.isFinite(t)||t<=0)return String(t);const n=t=>String(Number(t.toPrecision(3)));for(const[e,o]of N)if(t>=e)return`${n(t/e)}${o}`;return n(t)}const F="WARN_datasets",R=(o,i,s)=>{let a,l,u=[],c=[],d=[],f="";const v=()=>{const t=f;f=o.datasets||"",""!==t&&t!==f&&i("",[]),[d,c]=((t,n)=>{const e=[],o=[];for(const t of n)(r=t,r.startsWith("$")?e:o).push(t);var r;return[e,o]})(0,f.split(",")),((t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:F,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(F)})(o,d),p()},h=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=l.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}i(t,o)},p=()=>{u.forEach((t=>t())),u=[],c.forEach((t=>{t&&(u.push(l.db.subscribe(t,(()=>h(t,!1)))),h(t,!1),(t=>{if(s){const n=l.datasetsMeta.get(t);n&&s(t,n)}})(t))})),d.forEach((t=>{t&&(u.push(l.db.subscribe(t.substring(1),(()=>h(t,!0)))),h(t,!0))}))},m=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&(o.datasets||"")!==f&&v()}))})),b=o.connectedCallback;o.connectedCallback=()=>{const e=r(o);l=t(e),v(),m.observe(e,{attributes:!0,attributeFilter:["datasets"]}),s&&(a=l.datasetsMeta.on("set",((t,n)=>{c.includes(t)&&s(t,n)}))),n(b,o)};const g=o.disconnectedCallback;return o.disconnectedCallback=()=>{m.disconnect(),u.forEach((t=>t())),u=[],n(a),e(r(o)),n(g,o)},t=>{c=t,p()}},O="inherited-page",C="bn-layout-page";function j(t){return"inherited-closest"===t||t===O}function T(t,n){const e=[];let o=t.parentNode;for(;o;){const t=o.nodeName.toLowerCase();if(t===C){e.push(o);break}if("bn-layout-card"===t&&n!==O&&e.push(o),o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}return e}function _(t,n){var e;const o=t=>{const e=t.getAttribute(n),o=null==e?void 0:e.trim();return s(o)||j(o)?void 0:e};for(const r of t){if((null===(e=r.getAttribute(n))||void 0===e?void 0:e.trim())===O){const n=t.find((t=>t.nodeName.toLowerCase()===C)),e=n&&o(n);if(void 0!==e)return e;continue}const i=o(r);if(void 0!==i)return i}}const x=(t,e,o)=>{const s=new Map,a=new Map;let l=null;const u=()=>{var n;const o=r(t);s.clear(),a.clear(),l&&(l.disconnect(),l=null);const c=new Map;for(const r of e){const e=t[r.propName];if("string"!=typeof e||!j(e))continue;a.set(r.propName,e);const i=T(o,e),l=_(i,r.ancestorAttr);void 0!==l&&s.set(r.propName,l);for(const t of i)c.set(t,[...null!==(n=c.get(t))&&void 0!==n?n:[],r.ancestorAttr])}if(c.size>0){l=new MutationObserver((()=>{u(),i(t)}));for(const[t,n]of c)l.observe(t,{attributes:!0,attributeFilter:n})}},c=t.connectedCallback;t.connectedCallback=()=>{u(),n(c,t)};const d=t.disconnectedCallback;t.disconnectedCallback=()=>{l&&(l.disconnect(),l=null),s.clear(),a.clear(),n(d,t)};const f=t=>{var n;return null===(n=e.find((n=>n.propName===t)))||void 0===n?void 0:n.ancestorAttr.replace(/-(\w)/g,((t,n)=>n.toUpperCase()))};return(t,n,e)=>{const r=`WARN_inherited_${t}`,i=j(n);i&&a.get(t)!==n&&u();const l=i?s.get(t):void 0;return i&&void 0===l?(null==o||o.addOrReplace({id:r,type:"warning",message:`${t}: '${n}' could not be resolved, no surrounding ${n===O?"page":"card or page"} sets ${f(t)}`}),{value:e,inherited:!1,unresolved:!0}):(null==o||o.remove(r),{value:null!=l?l:n,inherited:void 0!==l,unresolved:!1})}},A=s=>{let a,l,u,c,d=null;const f=()=>{const t=r(s);if(d&&(d.disconnect(),d=null),u=s.i18nNamespace,l=u,null!=l)return;const n=function(t){let n=t.parentNode;for(;n;){if(n instanceof HTMLElement&&n.hasAttribute("i18n-namespace"))return n;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof ShadowRoot))break;n=n.host}}}(t);n&&(l=n.getAttribute("i18n-namespace"),d=new MutationObserver((()=>{f(),i(s)})),d.observe(n,{attributes:!0,attributeFilter:["i18n-namespace"]}))},v=s.connectedCallback;s.connectedCallback=()=>{const e=r(s);c=t(e),f(),a=c.internationalization.on("set",(t=>{t!==l&&"_system"!==t||i(s)})),n(v,s)};const h=s.disconnectedCallback;return s.disconnectedCallback=()=>{d&&(d.disconnect(),d=null),n(a),e(r(s)),n(h,s)},{t:(t,n)=>{var e,i,a,d,v;void 0!==c&&s.i18nNamespace!==u&&f(),t.startsWith(".")&&(t=r(s).localName+t),Object.prototype.hasOwnProperty.call(o,t)&&(t=o[t]);const h=c.internationalization.state,p=c.context.state.locale,m=null!==(a=null===(i=null===(e=h[l])||void 0===e?void 0:e[p])||void 0===i?void 0:i[t])&&void 0!==a?a:null===(v=null===(d=h._system)||void 0===d?void 0:d[p])||void 0===v?void 0:v[t];return null==m?t:m.replace(/{{([\s\S]+?)}}/g,((t,e)=>{var o;return null!==(o=null==n?void 0:n[e.trim()])&&void 0!==o?o:""}))}}};export{R as a,b,g as c,k as d,S as e,T as f,h as g,x as h,j as i,M as j,w as p,_ as r,d as s,A as w}
1
+ import{g as t,r as n,c as e,R as o}from"./p-CJfJQT0m.js";import{g as r,f as i}from"./p-CCZcKl0Q.js";import{i as s}from"./p-BjR3nkhl.js";const a=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img","code","pre","blockquote","del"]),l=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),u=new Set(["http:","https:","mailto:"]),c=/^\s*text-align:\s*(left|center|right)\s*;?\s*$/i;function d(t){if(!t)return"";const n=(new DOMParser).parseFromString(t,"text/html").body;return f(n),n.innerHTML}function f(t){for(const n of Array.from(t.childNodes)){if(n.nodeType===Node.TEXT_NODE)continue;const e=n;if(n.nodeType!==Node.ELEMENT_NODE||!a.has(e.localName)){t.removeChild(n);continue}for(const t of Array.from(e.attributes)){const n=t.name.toLowerCase();l.has(n)&&("href"!==n&&"src"!==n||v(n,t.value))||e.removeAttribute(t.name)}const o=e.getAttribute("style");null===o||c.test(o)||e.removeAttribute("style"),f(e)}}function v(t,n){try{const{protocol:e}=new URL(n,"http://a");return u.has(e)||"src"===t&&"data:"===e}catch(t){return!1}}function h(t,n=!1){const e=p(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=p(t),o=0,r=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),r=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=m(e),o++;continue}const t=getComputedStyle(e),s=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${s} clientH=${e.clientHeight} h=${t.height}`),null===r)if("hidden"===s||"scroll"===s||"auto"===s)r=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(r)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(r=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=m(e),o++}return null!==r?r/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(r)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,r),height:Math.max(0,i)}}function p(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function m(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}function b(t,n){const e=t.getBoundingClientRect(),o=t.offsetHeight>0?e.height/t.offsetHeight:0;if(!(o>0)||Math.abs(o-(t.offsetWidth>0?e.width/t.offsetWidth:0))>.01*o)return 0;const r=e.top+n*o;let i=0;for(let n=t;n;n=m(n)){const t=getComputedStyle(n).overflowY;if("hidden"===t||"clip"===t)i=Math.max(i,r-n.getBoundingClientRect().bottom);else if(("auto"===t||"scroll"===t)&&n.scrollHeight>n.clientHeight+1)break}return i/o}const g=(t,n)=>Math.round(t*n*100)/100;function w(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const n=Number(t);return!isNaN(n)&&n>0?{mode:"factor",factor:n}:{mode:"empty"}}const y={k:1e3,K:1e3,M:1e6,G:1e9,T:1e12},$=/^(\d+(?:\.\d+)?|\.\d+)\s*([kKMGT])?$/;function M(t){var n;if("number"==typeof t)return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"invalid",raw:String(t)};const e=null!==(n=null==t?void 0:t.toString().trim())&&void 0!==n?n:"";if("auto"===e.toLowerCase())return{kind:"auto"};const o=$.exec(e);if(o){const t=Number(o[1])*(o[2]?y[o[2]]:1);if(Number.isFinite(t)&&t>0)return{kind:"number",value:t}}return{kind:"invalid",raw:e}}function k(t,n){const e=M(t);if("auto"===e.kind)return{kind:"auto"};if("string"==typeof t){const e=t.trim();if(n.has(e))return{kind:"value",value:n.get(e)}}return"number"===e.kind?{kind:"value",value:e.value}:{kind:"invalid",raw:e.raw}}const N=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"]];function S(t){if(!Number.isFinite(t)||t<=0)return String(t);const n=t=>String(Number(t.toPrecision(3)));for(const[e,o]of N)if(t>=e)return`${n(t/e)}${o}`;return n(t)}const F="WARN_datasets",R=(o,i,s)=>{let a,l,u=[],c=[],d=[],f="";const v=()=>{const t=f;f=o.datasets||"",""!==t&&t!==f&&i("",[]),[d,c]=((t,n)=>{const e=[],o=[];for(const t of n)(r=t,r.startsWith("$")?e:o).push(t);var r;return[e,o]})(0,f.split(",")),((t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:F,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(F)})(o,d),p()},h=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=l.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}i(t,o)},p=()=>{u.forEach((t=>t())),u=[],c.forEach((t=>{t&&(u.push(l.db.subscribe(t,(()=>h(t,!1)))),h(t,!1),(t=>{if(s){const n=l.datasetsMeta.get(t);n&&s(t,n)}})(t))})),d.forEach((t=>{t&&(u.push(l.db.subscribe(t.substring(1),(()=>h(t,!0)))),h(t,!0))}))},m=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&(o.datasets||"")!==f&&v()}))})),b=o.connectedCallback;o.connectedCallback=()=>{const e=r(o);l=t(e),v(),m.observe(e,{attributes:!0,attributeFilter:["datasets"]}),s&&(a=l.datasetsMeta.on("set",((t,n)=>{c.includes(t)&&s(t,n)}))),n(b,o)};const g=o.disconnectedCallback;return o.disconnectedCallback=()=>{m.disconnect(),u.forEach((t=>t())),u=[],n(a),e(r(o)),n(g,o)},t=>{c=t,p()}},C="inherited-page",O="bn-layout-page";function j(t){return"inherited-closest"===t||t===C}function T(t,n){const e=[];let o=t.parentNode;for(;o;){const t=o.nodeName.toLowerCase();if(t===O){e.push(o);break}if("bn-layout-card"===t&&n!==C&&e.push(o),o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}return e}function x(t,n){var e;const o=t=>{const e=t.getAttribute(n),o=null==e?void 0:e.trim();return s(o)||j(o)?void 0:e};for(const r of t){if((null===(e=r.getAttribute(n))||void 0===e?void 0:e.trim())===C){const n=t.find((t=>t.nodeName.toLowerCase()===O)),e=n&&o(n);if(void 0!==e)return e;continue}const i=o(r);if(void 0!==i)return i}}const A=(t,e,o)=>{const s=new Map,a=new Map;let l=null;const u=()=>{var n;const o=r(t);s.clear(),a.clear(),l&&(l.disconnect(),l=null);const c=new Map;for(const r of e){const e=t[r.propName];if("string"!=typeof e||!j(e))continue;a.set(r.propName,e);const i=T(o,e),l=x(i,r.ancestorAttr);void 0!==l&&s.set(r.propName,l);for(const t of i)c.set(t,[...null!==(n=c.get(t))&&void 0!==n?n:[],r.ancestorAttr])}if(c.size>0){l=new MutationObserver((()=>{u(),i(t)}));for(const[t,n]of c)l.observe(t,{attributes:!0,attributeFilter:n})}},c=t.connectedCallback;t.connectedCallback=()=>{u(),n(c,t)};const d=t.disconnectedCallback;t.disconnectedCallback=()=>{l&&(l.disconnect(),l=null),s.clear(),a.clear(),n(d,t)};const f=t=>{var n;return null===(n=e.find((n=>n.propName===t)))||void 0===n?void 0:n.ancestorAttr.replace(/-(\w)/g,((t,n)=>n.toUpperCase()))};return(t,n,e)=>{const r=`WARN_inherited_${t}`,i=j(n);i&&a.get(t)!==n&&u();const l=i?s.get(t):void 0;return i&&void 0===l?(null==o||o.addOrReplace({id:r,type:"warning",message:`${t}: '${n}' could not be resolved, no surrounding ${n===C?"page":"card or page"} sets ${f(t)}`}),{value:e,inherited:!1,unresolved:!0}):(null==o||o.remove(r),{value:null!=l?l:n,inherited:void 0!==l,unresolved:!1})}},_=s=>{let a,l,u,c,d=null;const f=()=>{const t=r(s);if(d&&(d.disconnect(),d=null),u=s.i18nNamespace,l=u,null!=l)return;const n=function(t){let n=t.parentNode;for(;n;){if(n instanceof HTMLElement&&n.hasAttribute("i18n-namespace"))return n;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof ShadowRoot))break;n=n.host}}}(t);n&&(l=n.getAttribute("i18n-namespace"),d=new MutationObserver((()=>{f(),i(s)})),d.observe(n,{attributes:!0,attributeFilter:["i18n-namespace"]}))},v=s.connectedCallback;s.connectedCallback=()=>{const e=r(s);c=t(e),f(),a=c.internationalization.on("set",(t=>{t!==l&&"_system"!==t||i(s)})),n(v,s)};const h=s.disconnectedCallback;return s.disconnectedCallback=()=>{d&&(d.disconnect(),d=null),n(a),e(r(s)),n(h,s)},{t:(t,n)=>{var e,i,a,d,v;void 0!==c&&s.i18nNamespace!==u&&f(),t.startsWith(".")&&(t=r(s).localName+t),Object.prototype.hasOwnProperty.call(o,t)&&(t=o[t]);const h=c.internationalization.state,p=c.context.state.locale,m=null!==(a=null===(i=null===(e=h[l])||void 0===e?void 0:e[p])||void 0===i?void 0:i[t])&&void 0!==a?a:null===(v=null===(d=h._system)||void 0===d?void 0:d[p])||void 0===v?void 0:v[t];return null==m?t:m.replace(/{{([\s\S]+?)}}/g,((t,e)=>{var o;return null!==(o=null==n?void 0:n[e.trim()])&&void 0!==o?o:""}))}}};export{R as a,b,g as c,k as d,S as e,T as f,h as g,A as h,j as i,M as j,w as p,x as r,d as s,_ as w}
@@ -1 +1 @@
1
- import{g as t,f as e}from"./p-CCZcKl0Q.js";import{g as n,r,c as s,D as a}from"./p-yc69rwuH.js";const i=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},o=(t,e)=>e,u=(t,e)=>[...new Set([...t,...e])],c=(t,e)=>{const n=(t=>{return{arrayMergeType:"combine",arrayMerge:(e=t?t.arrayMergeType:"combine","overwrite"===e?o:u),...t};var e})(e);return t.reduce(((t,e)=>(Object.keys(e).forEach((r=>{Array.isArray(t[r])&&Array.isArray(e[r])?n&&n.arrayMerge&&(t[r]=n.arrayMerge(t[r],e[r])):t[r]=i(t[r])&&i(e[r])?c([t[r],e[r]],n):e[r]})),t)),{})},l=a=>{let i,o,u,l;const f=()=>{const t=o.componentStyles.state;l=c([t._system||{},t._default||{},t[u]||{}],{arrayMergeType:"overwrite"})},d=a.connectedCallback;a.connectedCallback=()=>{const s=t(a);o=n(s),l=o.componentStyles.state._system,u=a.selectedStyle,f(),i=o.componentStyles.on("set",(n=>{n!==u&&"_default"!==n||(u=a.selectedStyle,f(),e(t(a)))})),r(d,a)};const h=a.disconnectedCallback;return a.disconnectedCallback=()=>{r(i),s(t(a)),r(h,a)},t=>(void 0!==o&&a.selectedStyle!==u&&(u=a.selectedStyle,f()),t(l))};var f,d,h,m,y,p,b,g;!function(t){t.ALL="all",t.META="meta"}(f||(f={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(d||(d={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(h||(h={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(m||(m={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(y||(y={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(p||(p={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(b||(b={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(g||(g={}));const v={[g.W5]:5,[g.W10]:10,[g.W15]:15,[g.W20]:20,[g.W25]:25,[g.W30]:30,[g.W40]:40,[g.W60]:60,[g.W80]:80,[g.W100]:100};var w,N,k,S,O,D;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(w||(w={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(N||(N={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(k||(k={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(S||(S={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(O||(O={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(D||(D={}));const T=100;var M;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(M||(M={}));const A=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,j=/^[A-Za-z_][A-Za-z0-9_]*$/,J=["min","max","avg","sum"];class F{constructor(t,e,n,r){this.label=t,this.alias=e,this.fn=n,this.arg=r}get isNumeric(){return J.includes(this.fn)}}function E(t){if("string"!=typeof t)return!1;const e=A.exec(t);if(!e)return!1;const[,n,r]=e;return"lit"===n?r.length>0:j.test(r)}function $(t,e,n){if(!E(n))return null;const[,r,s]=A.exec(n);return new F(t,e,r,s)}var L,I,W,x;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(L||(L={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(I||(I={}));class _{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW kkkk",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormatPinned=!1,this.dateFormatShortPinned=!1,this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t,this.dateFormatPinned=!0}setDateFormatShort(t){this.dateFormatShort=t,this.dateFormatShortPinned=!0}setLocale(t){this.locale=t,this.dateFormatPinned||(this.dateFormat=Object.assign(Object.assign({},this._dateFormat),_.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),_.LOCALE_DATE_FORMAT_SHORT[t]||{}))}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,e){switch(e){case L.DAY:return this.getFormatedDayDate(t);case L.MONTH:return this.getFormatedMonthDate(t);case L.QUARTER:return this.getFormatedQuarterDate(t);case L.WEEK:return this.getFormatedWeekDate(t);case L.HOUR:return this.getFormatedHourDate(t);case L.MINUTE:return this.getFormatedMinuteDate(t);case L.SECOND:return this.getFormatedSecondDate(t);case L.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,e)}}calculateDistanceType(t,e,n=32){if(null==e)return L.DAY;const r="number"==typeof t?a.fromMillis(t):t,s="number"==typeof e?a.fromMillis(e):e;return 0===s.diff(r).as("milliseconds")?L.DAY:s.diff(r).as("milliseconds")<n?L.MILLISECOND:s.diff(r).as("seconds")<n?L.SECOND:s.diff(r).as("minutes")<n?L.MINUTE:s.diff(r).as("hours")<n?L.HOUR:s.diff(r).as("days")<n?L.DAY:s.diff(r).as("weeks")<n?L.WEEK:s.diff(r).as("months")<n?L.MONTH:s.diff(r).as("quarters")<n?L.QUARTER:L.YEAR}datesBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n),s=t.startOf(r),a=e.endOf(r),i=[];let o=s;do{i.push(o),o=o.plus(this.createDiratonLike(r,1))}while(o<=a);return i}countBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n);return Math.floor(e.startOf(r).diff(t.startOf(r),r).as(r))+1}getDateLinkString(t,e,n,r,s){if(null==t&&null==e)return"";if(null==t&&n!==I.END&&n!==I.YTD)return"";if(null==e&&(I.INTERVAL===n||I.CUM===n||I.END===n||I.YTD===n))return"";const i=t||a.now(),o=e;r===L.AUTO&&(r=this.calculateDistanceType(i,o,s));let u=this.getDateString(i,r),c="",l=I.NONE;return null!=o&&(c=this.getDateString(o,r),l=I.INTERVAL,u===c&&n===I.INTERVAL&&(n=I.NONE),u===c&&n===I.AVG&&(l=I.NONE),I.END!==n&&I.YTD!==n||(u=c),n!==I.INTERVAL&&n!==I.CUM&&n!==I.AVG||(r===L.QUARTER?i.quarter===o.quarter&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===L.MONTH?i.month===o.month&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===L.WEEK&&(i.weekNumber===o.weekNumber&&i.weekYear===o.weekYear?c=c.replace(" "+o.weekYear,""):i.weekYear===o.weekYear&&(u=u.replace(" "+i.weekYear,""))))),this.dateLinkFormat[n].replace("[LINK]",this.dateLinkFormat[l]).replace("[DATE]",u).replace("[DATE2]",c)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" kk"),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let e;switch(t){case L.YEAR:e="year";break;case L.MONTH:e="month";break;case L.QUARTER:e="quarter";break;case L.WEEK:e="week";break;case L.DAY:e="day";break;case L.HOUR:e="hour";break;case L.MINUTE:e="minute";break;case L.SECOND:e="second";break;case L.MILLISECOND:e="millisecond";break;default:e="day"}return e}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}_.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},_.LOCALE_DATE_FORMAT_SHORT={en:{week:"'W'WW",fallback:"MM/dd/yyyy"}};class q{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(t){return t instanceof a&&t.isValid}}class C{static adaptDefaultString(t){return q.isString(t)?t.trim():""}static adaptArray(t,e){const n=[];return q.isArray(t)&&t.forEach((t=>{n.push(e.adapt(t))})),n}}!function(t){t.ASC="asc",t.DESC="desc"}(W||(W={})),function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(x||(x={}));class G{constructor(t=["category"],e=W.ASC){this.hierarchy=t,this.direction=e}}class z{constructor(t){this.stringAdapter=t}adapt(t){var e;const n=C.adaptArray(t.hierarchy,this.stringAdapter),r=W[null===(e=t.direction)||void 0===e?void 0:e.toUpperCase()]||W.ASC;return new G(n.map((t=>x[t.toUpperCase()]||x.CATEGORY)),r)}default(){return new G(["category"],W.ASC)}}const K="n/a";function Q(t,e){if(!(Math.abs(e)<=1e-9*Math.abs(t)))return t/Math.abs(e)}const Z=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu))?$/;class B{constructor(t,e,n){this.type=t,this.base=e,this.delta=n}static parse(t){const e=Z.exec(t);return null===e?null:new B(e[1],e[2],e[3])}compute(t,e){var n;return null==t||null==e?null:"dr"===this.type?0===e?null:null!==(n=Q(t-e,e))&&void 0!==n?n:null:t-e}}function H(t){const e=t.trim();if(Object.values(h).includes(e))return{kind:"scenario",slot:e};const n=B.parse(e);return null!==n?{kind:"variance",measure:n}:null}function P(t){return t.replace(/\d+$/,"")}function R(t){return t.replace(/^[a-z]+/,"")}function Y(t){var e;return"dr"===(null===(e=B.parse(t.trim()))||void 0===e?void 0:e.type)}function U(t){if(!Y(t.measure))return t;const e=t=>void 0===t?void 0:t/100;return Object.assign(Object.assign({},t),{min:e(t.min),max:e(t.max),refLine:e(t.refLine),highlight:t.highlight&&{from:e(t.highlight.from),to:e(t.highlight.to)}})}function V(t){return null==t||""===t||"null"===t}function X(t){return V(t)||"auto"===t.trim().toLowerCase()?[]:tt((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in h)))).toString())}function tt(t){return V(t)?[]:t.replace(";",",").split(",").filter((t=>{var e,n,r;const s=t.split("_"),a=null===(e=s[0])||void 0===e?void 0:e.replace(/^dr|^d/,"").toUpperCase().trim(),i=null===(n=s[1])||void 0===n?void 0:n.toUpperCase().trim(),o=null===(r=s[2])||void 0===r?void 0:r.toUpperCase().trim();return 3!==s.length||!(a in h)||!(i in h)||!(o in m)}))}function et(t){return V(t)?[]:tt(t.split(",").filter((t=>!(t.toUpperCase().trim()in h))).toString())}function nt(t){return V(t)||"auto"===t.trim().toLowerCase()?[]:tt(t.split(",").filter((t=>!(t.toUpperCase()in x))).toString())}function rt(t){return!V(t)&&Number.isInteger(Number(t))}function st(t){return!V(t)&&!Number.isNaN(Number(t))}function at(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in W}function it(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in w}function ot(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function ut(t){const e=Date.parse(t);return Number.isInteger(e)}function ct(t){return(null==t?void 0:t.toUpperCase())in I}function lt(t){return(null==t?void 0:t.toUpperCase())in L}function ft(t){return(null==t?void 0:t.toUpperCase())in N}function dt(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in y}function ht(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in p}function mt(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function yt(t){if(V(t))return[];try{const e=JSON.parse(t);if(null!==e&&"object"==typeof e&&!(e instanceof Array))return Object.entries(e).filter((([,t])=>"string"!=typeof t||!E(t))).map((([t,e])=>`${t}: ${e}`))}catch(t){console.error("validateAttributesJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function pt(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function bt(t){return(null==t?void 0:t.trim().toUpperCase())in d}function gt(t){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==t?void 0:t.trim())||["GREATEST","LEAST"].includes(null==t?void 0:t.trim().toUpperCase())}function vt(t){return(null==t?void 0:t.toUpperCase().trim())in b}function wt(t){return(null==t?void 0:t.toUpperCase().trim())in g}function Nt(t){if(V(t))return[];try{return JSON.parse(t).filter((t=>!(t.hasOwnProperty("scenario")&&t.hasOwnProperty("name")&&t.hasOwnProperty("subGroups"))))}catch(t){console.error("validateColumnThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function kt(t){if(V(t))return[];try{const e=JSON.parse(t);if("object"!=typeof e||null===e||Array.isArray(e))return["stack: must be a JSON object"];const n=[];if(e.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(e.by)||n.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else n.push("stack: 'by' is required");if(e.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(e.mode)||n.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(e.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(e.order)||n.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return n}catch(t){return["stack: invalid JSON"]}}function St(t){return!V(t)&&null!==H(t)}class Ot{constructor(){this.cache=new Map,this.tag=Ot.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.textContent=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const Dt=new Ot;function Tt(t){for(var e,n=0,r=0,s=t.length;s>=4;++r,s-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(s){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}const Mt=t=>st(t)?`${t}px`:t,At={width:{className:"w",cssName:"width",attrName:"width",transform:Mt},height:{className:"h",cssName:"height",attrName:"height",transform:Mt},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:Mt},right:{className:"rgt",cssName:"right",attrName:"right",transform:Mt},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:Mt},left:{className:"lft",cssName:"left",attrName:"left",transform:Mt},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:Mt},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},jt=Object.keys(At);function Jt(t,e,n){return`.${e} {${t.cssName}: ${n};}`}function Ft(t,e){const n=document.createElement("div").style;n.setProperty(t.cssName,e);const r=n.getPropertyValue(t.cssName);if(n.cssText=`${t.cssName}:${r};--bn-end:1`,!r||r.includes("<")||"1"!==n.getPropertyValue("--bn-end"))return;const s=function(t,e){const n=Tt(e);return`bn-c-${t.className}_${n}`}(t,e);return{className:s,style:Jt(t,s,r)}}const Et=t=>{const e=new Map;return jt.forEach((n=>{const r=t.getAttribute(n);if(r){["top","left","right","bottom"].includes(n)&&e.set("position",Ft(At.position,"absolute"));const t=Ft(At[n],(At[n].transform||function(t){return t})(r));t&&e.set(n,t)}})),e},$t=new MutationObserver((t=>{for(const n of t){const t=n.target,r=Et(t);Dt.apply(r);const s=Array.from(r.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...s).join(" "),e(t)}})),Lt=e=>{const n=e.connectedCallback,s=e.disconnectedCallback;e.connectedCallback=()=>{const s=t(e);if(!s)throw new Error("Can't find element field in component undefined");(t=>{const e=Et(t);Dt.apply(e);const n=Array.from(e.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...n).join(" "),$t.observe(t,{attributes:!0,attributeFilter:jt,childList:!1,subtree:!1})})(s),r(n,e)},e.disconnectedCallback=()=>{r(s,e)}};export{$,w as A,lt as B,q as C,ft as D,L as E,N as F,S as G,_ as H,Tt as I,et as J,wt as K,dt as L,ht as M,K as N,W as O,mt as P,pt as Q,T as R,O as S,bt as T,vt as U,Nt as V,yt as W,y as X,f as Y,b as Z,d as _,l as a,v as a0,g as a1,j as a2,h as a3,ot as a4,ut as a5,ct as a6,I as a7,rt as b,St as c,R as d,U as e,Y as f,at as g,G as h,V as i,x as j,X as k,tt as l,c as m,it as n,gt as o,kt as p,M as q,H as r,P as s,D as t,C as u,nt as v,Lt as w,z as x,Q as y,st as z}
1
+ import{g as t,f as e}from"./p-CCZcKl0Q.js";import{g as n,r,c as s,D as a}from"./p-CJfJQT0m.js";const i=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},o=(t,e)=>e,u=(t,e)=>[...new Set([...t,...e])],c=(t,e)=>{const n=(t=>{return{arrayMergeType:"combine",arrayMerge:(e=t?t.arrayMergeType:"combine","overwrite"===e?o:u),...t};var e})(e);return t.reduce(((t,e)=>(Object.keys(e).forEach((r=>{Array.isArray(t[r])&&Array.isArray(e[r])?n&&n.arrayMerge&&(t[r]=n.arrayMerge(t[r],e[r])):t[r]=i(t[r])&&i(e[r])?c([t[r],e[r]],n):e[r]})),t)),{})},l=a=>{let i,o,u,l;const f=()=>{const t=o.componentStyles.state;l=c([t._system||{},t._default||{},t[u]||{}],{arrayMergeType:"overwrite"})},d=a.connectedCallback;a.connectedCallback=()=>{const s=t(a);o=n(s),l=o.componentStyles.state._system,u=a.selectedStyle,f(),i=o.componentStyles.on("set",(n=>{n!==u&&"_default"!==n||(u=a.selectedStyle,f(),e(t(a)))})),r(d,a)};const h=a.disconnectedCallback;return a.disconnectedCallback=()=>{r(i),s(t(a)),r(h,a)},t=>(void 0!==o&&a.selectedStyle!==u&&(u=a.selectedStyle,f()),t(l))};var f,d,h,m,y,p,b,g;!function(t){t.ALL="all",t.META="meta"}(f||(f={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(d||(d={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(h||(h={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(m||(m={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(y||(y={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(p||(p={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(b||(b={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(g||(g={}));const v={[g.W5]:5,[g.W10]:10,[g.W15]:15,[g.W20]:20,[g.W25]:25,[g.W30]:30,[g.W40]:40,[g.W60]:60,[g.W80]:80,[g.W100]:100};var w,N,k,S,O,D;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(w||(w={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(N||(N={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(k||(k={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(S||(S={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(O||(O={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(D||(D={}));const T=100;var M;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(M||(M={}));const A=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,J=/^[A-Za-z_][A-Za-z0-9_]*$/,j=["min","max","avg","sum"];class F{constructor(t,e,n,r){this.label=t,this.alias=e,this.fn=n,this.arg=r}get isNumeric(){return j.includes(this.fn)}}function E(t){if("string"!=typeof t)return!1;const e=A.exec(t);if(!e)return!1;const[,n,r]=e;return"lit"===n?r.length>0:J.test(r)}function $(t,e,n){if(!E(n))return null;const[,r,s]=A.exec(n);return new F(t,e,r,s)}var L,I,W,x;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(L||(L={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(I||(I={}));class _{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW kkkk",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormatPinned=!1,this.dateFormatShortPinned=!1,this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t,this.dateFormatPinned=!0}setDateFormatShort(t){this.dateFormatShort=t,this.dateFormatShortPinned=!0}setLocale(t){this.locale=t,this.dateFormatPinned||(this.dateFormat=Object.assign(Object.assign({},this._dateFormat),_.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),_.LOCALE_DATE_FORMAT_SHORT[t]||{}))}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,e){switch(e){case L.DAY:return this.getFormatedDayDate(t);case L.MONTH:return this.getFormatedMonthDate(t);case L.QUARTER:return this.getFormatedQuarterDate(t);case L.WEEK:return this.getFormatedWeekDate(t);case L.HOUR:return this.getFormatedHourDate(t);case L.MINUTE:return this.getFormatedMinuteDate(t);case L.SECOND:return this.getFormatedSecondDate(t);case L.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,e)}}calculateDistanceType(t,e,n=32){if(null==e)return L.DAY;const r="number"==typeof t?a.fromMillis(t):t,s="number"==typeof e?a.fromMillis(e):e;return 0===s.diff(r).as("milliseconds")?L.DAY:s.diff(r).as("milliseconds")<n?L.MILLISECOND:s.diff(r).as("seconds")<n?L.SECOND:s.diff(r).as("minutes")<n?L.MINUTE:s.diff(r).as("hours")<n?L.HOUR:s.diff(r).as("days")<n?L.DAY:s.diff(r).as("weeks")<n?L.WEEK:s.diff(r).as("months")<n?L.MONTH:s.diff(r).as("quarters")<n?L.QUARTER:L.YEAR}datesBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n),s=t.startOf(r),a=e.endOf(r),i=[];let o=s;do{i.push(o),o=o.plus(this.createDiratonLike(r,1))}while(o<=a);return i}countBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n);return Math.floor(e.startOf(r).diff(t.startOf(r),r).as(r))+1}getDateLinkString(t,e,n,r,s){if(null==t&&null==e)return"";if(null==t&&n!==I.END&&n!==I.YTD)return"";if(null==e&&(I.INTERVAL===n||I.CUM===n||I.END===n||I.YTD===n))return"";const i=t||a.now(),o=e;r===L.AUTO&&(r=this.calculateDistanceType(i,o,s));let u=this.getDateString(i,r),c="",l=I.NONE;return null!=o&&(c=this.getDateString(o,r),l=I.INTERVAL,u===c&&n===I.INTERVAL&&(n=I.NONE),u===c&&n===I.AVG&&(l=I.NONE),I.END!==n&&I.YTD!==n||(u=c),n!==I.INTERVAL&&n!==I.CUM&&n!==I.AVG||(r===L.QUARTER?i.quarter===o.quarter&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===L.MONTH?i.month===o.month&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===L.WEEK&&(i.weekNumber===o.weekNumber&&i.weekYear===o.weekYear?c=c.replace(" "+o.weekYear,""):i.weekYear===o.weekYear&&(u=u.replace(" "+i.weekYear,""))))),this.dateLinkFormat[n].replace("[LINK]",this.dateLinkFormat[l]).replace("[DATE]",u).replace("[DATE2]",c)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" kk"),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let e;switch(t){case L.YEAR:e="year";break;case L.MONTH:e="month";break;case L.QUARTER:e="quarter";break;case L.WEEK:e="week";break;case L.DAY:e="day";break;case L.HOUR:e="hour";break;case L.MINUTE:e="minute";break;case L.SECOND:e="second";break;case L.MILLISECOND:e="millisecond";break;default:e="day"}return e}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}_.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},_.LOCALE_DATE_FORMAT_SHORT={en:{week:"'W'WW",fallback:"MM/dd/yyyy"}};class q{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(t){return t instanceof a&&t.isValid}}class C{static adaptDefaultString(t){return q.isString(t)?t.trim():""}static adaptArray(t,e){const n=[];return q.isArray(t)&&t.forEach((t=>{n.push(e.adapt(t))})),n}}!function(t){t.ASC="asc",t.DESC="desc"}(W||(W={})),function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(x||(x={}));class G{constructor(t=["category"],e=W.ASC){this.hierarchy=t,this.direction=e}}class z{constructor(t){this.stringAdapter=t}adapt(t){var e;const n=C.adaptArray(t.hierarchy,this.stringAdapter),r=W[null===(e=t.direction)||void 0===e?void 0:e.toUpperCase()]||W.ASC;return new G(n.map((t=>x[t.toUpperCase()]||x.CATEGORY)),r)}default(){return new G(["category"],W.ASC)}}const Q="n/a";function K(t,e){if(!(Math.abs(e)<=1e-9*Math.abs(t)))return t/Math.abs(e)}const Z=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu))?$/;class B{constructor(t,e,n){this.type=t,this.base=e,this.delta=n}static parse(t){const e=Z.exec(t);return null===e?null:new B(e[1],e[2],e[3])}compute(t,e){var n;return null==t||null==e?null:"dr"===this.type?0===e?null:null!==(n=K(t-e,e))&&void 0!==n?n:null:t-e}}function H(t){const e=t.trim();if(Object.values(h).includes(e))return{kind:"scenario",slot:e};const n=B.parse(e);return null!==n?{kind:"variance",measure:n}:null}function P(t){return t.replace(/\d+$/,"")}function R(t){return t.replace(/^[a-z]+/,"")}function Y(t){var e;return"dr"===(null===(e=B.parse(t.trim()))||void 0===e?void 0:e.type)}function U(t){if(!Y(t.measure))return t;const e=t=>void 0===t?void 0:t/100;return Object.assign(Object.assign({},t),{min:e(t.min),max:e(t.max),refLine:e(t.refLine),highlight:t.highlight&&{from:e(t.highlight.from),to:e(t.highlight.to)}})}function V(t){return null==t||""===t||"null"===t}function X(t){return V(t)||"auto"===t.trim().toLowerCase()?[]:tt((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in h)))).toString())}function tt(t){return V(t)?[]:t.replace(";",",").split(",").filter((t=>{var e,n,r;const s=t.split("_"),a=null===(e=s[0])||void 0===e?void 0:e.replace(/^dr|^d/,"").toUpperCase().trim(),i=null===(n=s[1])||void 0===n?void 0:n.toUpperCase().trim(),o=null===(r=s[2])||void 0===r?void 0:r.toUpperCase().trim();return 3!==s.length||!(a in h)||!(i in h)||!(o in m)}))}function et(t){return V(t)?[]:tt(t.split(",").filter((t=>!(t.toUpperCase().trim()in h))).toString())}function nt(t){return V(t)||"auto"===t.trim().toLowerCase()?[]:tt(t.split(",").filter((t=>!(t.toUpperCase()in x))).toString())}function rt(t){return!V(t)&&Number.isInteger(Number(t))}function st(t){return!V(t)&&!Number.isNaN(Number(t))}function at(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in W}function it(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in w}function ot(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function ut(t){const e=Date.parse(t);return Number.isInteger(e)}function ct(t){return(null==t?void 0:t.toUpperCase())in I}function lt(t){return(null==t?void 0:t.toUpperCase())in L}function ft(t){return(null==t?void 0:t.toUpperCase())in N}function dt(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in y}function ht(t){return!V(t)&&(null==t?void 0:t.toUpperCase())in p}function mt(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function yt(t){if(V(t))return[];try{const e=JSON.parse(t);if(null!==e&&"object"==typeof e&&!(e instanceof Array))return Object.entries(e).filter((([,t])=>"string"!=typeof t||!E(t))).map((([t,e])=>`${t}: ${e}`))}catch(t){console.error("validateAttributesJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function pt(t){if(V(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function bt(t){return(null==t?void 0:t.trim().toUpperCase())in d}function gt(t){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==t?void 0:t.trim())||["GREATEST","LEAST"].includes(null==t?void 0:t.trim().toUpperCase())}function vt(t){return(null==t?void 0:t.toUpperCase().trim())in b}function wt(t){return(null==t?void 0:t.toUpperCase().trim())in g}function Nt(t){if(V(t))return[];try{return JSON.parse(t).filter((t=>!(t.hasOwnProperty("scenario")&&t.hasOwnProperty("name")&&t.hasOwnProperty("subGroups"))))}catch(t){console.error("validateColumnThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function kt(t){if(V(t))return[];try{const e=JSON.parse(t);if("object"!=typeof e||null===e||Array.isArray(e))return["stack: must be a JSON object"];const n=[];if(e.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(e.by)||n.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else n.push("stack: 'by' is required");if(e.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(e.mode)||n.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(e.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(e.order)||n.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return n}catch(t){return["stack: invalid JSON"]}}function St(t){return!V(t)&&null!==H(t)}class Ot{constructor(){this.cache=new Map,this.tag=Ot.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.textContent=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const Dt=new Ot;function Tt(t){for(var e,n=0,r=0,s=t.length;s>=4;++r,s-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(s){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}const Mt=t=>st(t)?`${t}px`:t,At={width:{className:"w",cssName:"width",attrName:"width",transform:Mt},height:{className:"h",cssName:"height",attrName:"height",transform:Mt},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:Mt},right:{className:"rgt",cssName:"right",attrName:"right",transform:Mt},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:Mt},left:{className:"lft",cssName:"left",attrName:"left",transform:Mt},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:Mt},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},Jt=Object.keys(At);function jt(t,e,n){return`.${e} {${t.cssName}: ${n};}`}function Ft(t,e){const n=document.createElement("div").style;n.setProperty(t.cssName,e);const r=n.getPropertyValue(t.cssName);if(n.cssText=`${t.cssName}:${r};--bn-end:1`,!r||r.includes("<")||"1"!==n.getPropertyValue("--bn-end"))return;const s=function(t,e){const n=Tt(e);return`bn-c-${t.className}_${n}`}(t,e);return{className:s,style:jt(t,s,r)}}const Et=t=>{const e=new Map;return Jt.forEach((n=>{const r=t.getAttribute(n);if(r){["top","left","right","bottom"].includes(n)&&e.set("position",Ft(At.position,"absolute"));const t=Ft(At[n],(At[n].transform||function(t){return t})(r));t&&e.set(n,t)}})),e},$t=new MutationObserver((t=>{for(const n of t){const t=n.target,r=Et(t);Dt.apply(r);const s=Array.from(r.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...s).join(" "),e(t)}})),Lt=e=>{const n=e.connectedCallback,s=e.disconnectedCallback;e.connectedCallback=()=>{const s=t(e);if(!s)throw new Error("Can't find element field in component undefined");(t=>{const e=Et(t);Dt.apply(e);const n=Array.from(e.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...n).join(" "),$t.observe(t,{attributes:!0,attributeFilter:Jt,childList:!1,subtree:!1})})(s),r(n,e)},e.disconnectedCallback=()=>{r(s,e)}};export{$,w as A,lt as B,q as C,ft as D,L as E,N as F,S as G,_ as H,Tt as I,et as J,wt as K,dt as L,ht as M,Q as N,W as O,mt as P,pt as Q,T as R,O as S,bt as T,vt as U,Nt as V,yt as W,y as X,f as Y,b as Z,d as _,l as a,v as a0,g as a1,J as a2,h as a3,ot as a4,ut as a5,ct as a6,I as a7,rt as b,St as c,R as d,U as e,Y as f,at as g,G as h,V as i,x as j,X as k,tt as l,c as m,it as n,gt as o,kt as p,M as q,H as r,P as s,D as t,C as u,nt as v,Lt as w,z as x,K as y,st as z}
@@ -0,0 +1 @@
1
+ import{b as t}from"./p-CJfJQT0m.js";const n=t=>Math.round(100*t)/100;function o(t){return{x:n(t.left),y:n(t.top),width:n(t.width),height:n(t.height)}}function r(t,o){const r=n(t.width),e=n(t.height);return{context:{x:n(t.left-o.context.x),y:n(t.top-o.context.y),width:r,height:e},component:{x:n(t.left-o.component.x),y:n(t.top-o.component.y),width:r,height:e}}}function e(t,n){return r(t.getBoundingClientRect(),n)}function i(t){const n=getComputedStyle(t,"::before").content;if(!n||"none"===n||"normal"===n)return 0;const o=t.ownerDocument.createElement("canvas").getContext("2d");if(!o)return 0;const{fontStyle:r,fontWeight:e,fontSize:i,fontFamily:u}=getComputedStyle(t);return o.font=`${r} ${e} ${i} ${u}`,o.measureText(n.replace(/^"|"$/g,"")).width}function u(t,n){var o,e;const i=null===(e=null===(o=t.ownerDocument)||void 0===o?void 0:o.createRange)||void 0===e?void 0:e.call(o);if(!i)return;const u=t.getBoundingClientRect(),c=t.querySelector("svg text");let a;if(c)a=c.getBoundingClientRect();else{i.selectNodeContents(t);const n=t.querySelector(".prefix-second");n&&i.setStartAfter(n),a=i.getBoundingClientRect()}const l=Math.max(a.left,u.left),s=Math.max(a.top,u.top),f=Math.min(a.right,u.right)-l,h=Math.min(a.bottom,u.bottom)-s;return f>0&&h>0?r({left:l,top:s,width:f,height:h},n):void 0}function c(n){const o=n.getBoundingClientRect(),r=t(n),e=r?r.getBoundingClientRect():o;return{context:{x:e.left,y:e.top},component:{x:o.left,y:o.top}}}function a(t){var n,o;return null!==(o=null!==(n=t.getAttribute("id"))&&void 0!==n?n:t.getAttribute("name"))&&void 0!==o?o:void 0}function l(t){var n;return null!==(n=a(t))&&void 0!==n?n:t.localName}function s(t){const n=new Map;return t.map((({tag:t,explicitId:o})=>{var r;const e=null!==(r=n.get(t))&&void 0!==r?r:0;return n.set(t,e+1),null!=o?o:`${t}[${e}]`}))}function f(t){const n=t.getAttribute("has-error");if(!n)return[];try{const t=JSON.parse(n);return Array.isArray(t)?t:[]}catch(t){return[]}}const h=[1,0,0,1],d=([t,n,o,r],[e,i,u,c])=>[t*e+o*i,n*e+r*i,t*u+o*c,n*u+r*c];function v(t){if("function"!=typeof getComputedStyle||"function"!=typeof DOMMatrix)return h;const n=getComputedStyle(t).transform;if(!n||"none"===n)return h;try{const{a:t,b:o,c:r,d:e}=new DOMMatrix(n);return[t,o,r,e]}catch(t){return h}}function y(t){var n,o,r;return null!==(r=null!==(o=null!==(n=t.assignedSlot)&&void 0!==n?n:t.parentElement)&&void 0!==o?o:t.getRootNode().host)&&void 0!==r?r:null}function x(t){var n,o;const[r,e,i,u]=function(t){let n=h;for(let o=t;o;o=y(o))n=d(v(o),n);return n}(t),c=r*u-e*i;if(0===c){const n=t.getBoundingClientRect();return{toLocal:t=>({x:t.left-n.left,y:t.top-n.top,width:t.width,height:t.height})}}const a=(t,n)=>({x:r*t+i*n,y:e*t+u*n}),l=t,s=t.getBoundingClientRect(),f=null!==(n=l.offsetWidth)&&void 0!==n?n:s.width,x=null!==(o=l.offsetHeight)&&void 0!==o?o:s.height,M=[a(0,0),a(f,0),a(0,x),a(f,x)],p=s.left-Math.min(...M.map((t=>t.x))),g=s.top-Math.min(...M.map((t=>t.y))),m=(t,n)=>{const o=t-p,a=n-g;return{x:(u*o-i*a)/c,y:(-e*o+r*a)/c}};return{toLocal:t=>{const n=[m(t.left,t.top),m(t.left+t.width,t.top),m(t.left,t.top+t.height),m(t.left+t.width,t.top+t.height)],o=Math.min(...n.map((t=>t.x))),r=Math.min(...n.map((t=>t.y)));return{x:o,y:r,width:Math.max(...n.map((t=>t.x)))-o,height:Math.max(...n.map((t=>t.y)))-r}}}}export{l as a,s as b,a as c,u as d,i as e,x as l,e as m,c as o,f as r,o as t}