scb-wc-test 0.1.327 → 0.1.328

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.
@@ -1,4 +1,4 @@
1
- import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../vendor/vendor.js";import"../scb-chip/scb-chip.js";import"../scb-segmented-button/scb-segmented-button.js";import"../scb-segmented-button/scb-segmented-item.js";import"../scb-accordion/scb-accordion.js";import"../scb-divider/scb-divider.js";import"../scb-horizontal-scroller/scb-horizontal-scroller.js";import"../scb-icon-button/scb-icon-button.js";import{a as ft,g as ut,b as mt}from"./scb-viz-series-differentiation-registry.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.js";import"../scb-chevron/scb-chevron.js";import"../scb-button/scb-button.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,a,s){try{customElements.get(i)||e(i,a,s)}catch(n){var r=String(n||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var bt=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,U=t=>{throw TypeError(t)},u=(t,e,i,a)=>{for(var s=a>1?void 0:a?vt(e,i):e,r=t.length-1,n;r>=0;r--)(n=t[r])&&(s=(a?n(e,i,s):n(s))||s);return a&&s&&bt(e,i,s),s},yt=(t,e,i)=>e.has(t)||U("Cannot "+i),_t=(t,e,i)=>e.has(t)?U("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),c=(t,e,i)=>(yt(t,e,"access private method"),i),l,L,F,N,M,A,I,K,D,j,k,J,X,Y,$,E,v,Z,Q,tt,et,it,st,at,nt,O,rt,T,R,ot,lt,q,B,H,x,V;const ct=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
1
+ import{a as dt,n as m,r as P,i as pt,x as f,k as W,l as ft,t as gt}from"../../vendor/vendor.js";import"../scb-chip/scb-chip.js";import"../scb-segmented-button/scb-segmented-button.js";import"../scb-segmented-button/scb-segmented-item.js";import"../scb-accordion/scb-accordion.js";import"../scb-divider/scb-divider.js";import"../scb-horizontal-scroller/scb-horizontal-scroller.js";import"../scb-icon-button/scb-icon-button.js";import{a as ut,g as mt,b as bt}from"./scb-viz-series-differentiation-registry.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.js";import"../scb-chevron/scb-chevron.js";import"../scb-button/scb-button.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,a,s){try{customElements.get(i)||e(i,a,s)}catch(n){var r=String(n||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var vt=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,U=t=>{throw TypeError(t)},u=(t,e,i,a)=>{for(var s=a>1?void 0:a?yt(e,i):e,r=t.length-1,n;r>=0;r--)(n=t[r])&&(s=(a?n(e,i,s):n(s))||s);return a&&s&&vt(e,i,s),s},_t=(t,e,i)=>e.has(t)||U("Cannot "+i),wt=(t,e,i)=>e.has(t)?U("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),c=(t,e,i)=>(_t(t,e,"access private method"),i),l,L,F,N,M,A,I,K,D,j,k,J,X,Y,$,E,v,Z,Q,tt,et,it,st,at,nt,rt,q,ot,T,R,lt,ct,O,B,H,x,V;const ht=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
2
2
  viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
3
3
  <style type="text/css">
4
4
  .st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
@@ -113,7 +113,7 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
113
113
  <path d="M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z"/>
114
114
  <path d="M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z"/>
115
115
  </svg>
116
- `;let g=class extends dt{constructor(){super(...arguments),_t(this,l),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth="",this.containerMaxWidth="",this.contentHeight="",this.toggleHeightMode="stable",this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._chartConfigSyncFrame=0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentPointerDown=t=>{if(!this._actionsMenuOpen)return;const e=t.composedPath(),i=this.shadowRoot?.querySelector(".actions-menu");i&&e.includes(i)||this._closeActionsMenu()},this._onDocumentKeyDown=t=>{this._actionsMenuOpen&&t.key==="Escape"&&(t.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await c(this,l,it).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),c(this,l,st).call(this))},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),c(this,l,$).call(this)}}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}get actionsMenuLabel(){return this.lang==="en"?"Open menu":"Öppna meny"}get printLabel(){return this.lang==="en"?"Print":"Skriv ut"}get downloadPngLabel(){return this.lang==="en"?"Download PNG":"Ladda ner PNG"}get downloadJpgLabel(){return this.lang==="en"?"Download JPG":"Ladda ner JPG"}get downloadCsvLabel(){return this.lang==="en"?"Download CSV":"Ladda ner CSV"}get enableSeriesDifferentiationLabel(){return this.lang==="en"?"Show symbols and patterns":"Visa symboler och mönster"}get disableSeriesDifferentiationLabel(){return this.lang==="en"?"Hide symbols and patterns":"Dölj symboler och mönster"}_getImageAltText(){return[this.title,this.subtitle,this.description].map(e=>typeof e=="string"?e.trim():"").filter(Boolean).join(". ")||(this.lang==="en"?"Image figure":"Bildfigur")}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown)}firstUpdated(t){this._readTableDataFromSlot(),c(this,l,H).call(this),c(this,l,V).call(this),c(this,l,D).call(this),this._syncChipClass(),c(this,l,L).call(this),c(this,l,M).call(this)}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&(this._syncChipClass(),this._closeActionsMenu()),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&c(this,l,H).call(this),t.has("containerMaxWidth")&&c(this,l,V).call(this),t.has("variant")&&c(this,l,L).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&c(this,l,D).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&c(this,l,M).call(this),(t.has("selectedChip")||t.has("variant"))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),(t.has("valueFormat")||t.has("timeFormat")||t.has("yAxisSettings")||t.has("selectedChip")||t.has("variant"))&&c(this,l,k).call(this)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),c(this,l,F).call(this),c(this,l,N).call(this),c(this,l,j).call(this)}_onTableSlotChange(t){const e=t.target;e&&(this._readTableDataFromSlot(e),this.requestUpdate())}_onDiagramSlotChange(){c(this,l,D).call(this),c(this,l,M).call(this),c(this,l,k).call(this),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),this.requestUpdate()}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const i=e.assignedElements({flatten:!0}),a=[];i.forEach(p=>{if(p.tagName==="TABLE"){a.push(p);return}p.querySelectorAll("table").forEach(y=>a.push(y))});const s=a[0];if(!s){this._slottedTableData=void 0;return}const r=[],n=[],o=[],h=p=>p?(p.textContent??"").replace(/\s+/g," ").trim():"",d=p=>p?{html:(p.innerHTML??"").trim(),text:h(p)}:{html:"",text:""},b=s.querySelector("thead tr");b&&Array.from(b.querySelectorAll("th, td")).forEach(y=>r.push(d(y)));const _=Array.from(s.querySelectorAll("tbody tr")),w=_.length>0?_:Array.from(s.querySelectorAll("tr")).filter(p=>p.closest("thead")===null);if(w.forEach(p=>{const y=Array.from(p.querySelectorAll("th, td"));if(y.length===0)return;const z=y[0].tagName==="TH"&&p.closest("thead")===null&&p.closest("tfoot")===null;o.push(z);const S=[];y.forEach(C=>S.push(d(C))),n.push(S)}),!b&&n.length>0){const p=n[0],y=w[0],z=Array.from(y?.querySelectorAll("th, td")??[]);z.length>0&&z.every(C=>C.tagName==="TH")&&y?.closest("tbody")===null&&(r.splice(0,r.length,...p),n.shift(),o.shift())}this._slottedTableData={headers:r.length>0?r:void 0,rows:n,rowHeaderRows:o.length>0?o:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(s=>s.length)),i=s=>{if(s==null)return!1;if(typeof s=="number")return!0;const r=String(s).replace(/[\u00A0\u202F\s]+/g,"").trim();return r?/^-?\d+(?:[.,]\d+)?$/.test(r):!1},a=[];for(let s=0;s<e;s+=1){if(s===0){a.push("left");continue}const r=t.rows.map(o=>this._normalizeRenderableCell(o[s]).text).filter(o=>o!==""&&o!==null&&o!==void 0),n=r.length>0&&r.every(i);a.push(n?"right":"left")}return a}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()||"720px"}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"600px"}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getDiagramAssignedElements(){const t=this.shadowRoot?.querySelector('slot[name="diagram"]');return t?t.assignedElements({flatten:!0}):[]}_findExportableVisualElement(t){for(const e of t){if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e;const i=e.querySelector("svg, canvas, img");if(i instanceof SVGSVGElement||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement)return i}return null}_getExportableVisualElement(){if(this.variant==="Table")return null;if(this.variant==="Image"){const t=this.shadowRoot?.querySelector(".image-content img");return t instanceof HTMLImageElement?t:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:"number",scale:"auto",decimals:0}}_normalizeValueFormat(t){const e=this._getDefaultValueFormat(),i=t&&typeof t=="object"?t:{},a=["number","currency","percent"].includes(String(i.type))?String(i.type):e.type,s=["auto","raw","thousands","millions","billions"].includes(String(i.scale))?String(i.scale):e.scale,r=Number.isFinite(Number(i.decimals))?Math.max(0,Math.min(20,Number(i.decimals))):e.decimals;return{type:a,scale:s,decimals:r}}_normalizeTimeFormat(t){const e={mode:"raw",display:"raw"},i=t&&typeof t=="object"?t:{},a=["raw","year","monthCode","quarterCode","weekCode","tertialCode"];let s=typeof i.mode=="string"?i.mode:e.mode,r=typeof i.display=="string"?i.display:e.display;a.includes(s)||(s=e.mode);const n={raw:["raw"],year:["raw","year"],monthCode:["raw","iso-month","short-month","long-month"],quarterCode:["raw","quarter-compact","quarter-short","quarter-long"],weekCode:["raw","week-compact","week-long"],tertialCode:["raw","tertial-compact","tertial-short","tertial-long"]};return n[s].includes(r)||(r=n[s][0]),s==="raw"&&(r="raw"),{mode:s,display:r}}_normalizeYAxisSettings(t){const e=t&&typeof t=="object"?t:{},i=Number.isFinite(Number(e.referenceLineValue))?Number(e.referenceLineValue):null;return{startAtZero:!!e.startAtZero,referenceLineEnabled:!!e.referenceLineEnabled&&Number.isFinite(i),referenceLineValue:i,referenceLineLabel:typeof e.referenceLineLabel=="string"?e.referenceLineLabel:""}}_getShortMonthNames(){return["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"]}_getLongMonthNames(){return["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]}_formatCategoryTimeLabel(t,e){if(!t||e.mode==="raw"||e.display==="raw")return null;if(e.mode==="year"){const i=/^\s*(\d{4})\s*$/.exec(t);return i?i[1]:null}if(e.mode==="monthCode"){const i=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2])-1,s=i[1],r=String(a+1).padStart(2,"0");return e.display==="iso-month"?`${s}-${r}`:e.display==="short-month"?`${this._getShortMonthNames()[a]} ${s}`:e.display==="long-month"?`${this._getLongMonthNames()[a]} ${s}`:t}if(e.mode==="quarterCode"){const i=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(t);if(!i)return null;const a=Number(i[3]),s=i[1],r=["första","andra","tredje","fjärde"];return e.display==="quarter-compact"?`${s} K${a}`:e.display==="quarter-short"?`kv ${a} ${s}`:e.display==="quarter-long"?`${r[a-1]} kvartalet ${s}`:t}if(e.mode==="weekCode"){const i=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2]),s=i[1];return e.display==="week-compact"?`${s} v. ${a}`:e.display==="week-long"?`vecka ${a} ${s}`:t}if(e.mode==="tertialCode"){const i=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2]),s=i[1],r=["första","andra","tredje"];return e.display==="tertial-compact"?`${s} T${a}`:e.display==="tertial-short"?`tertial ${a} ${s}`:e.display==="tertial-long"?`${r[a-1]} tertialet ${s}`:t}return null}_formatLocalizedNumber(t,e){return new Intl.NumberFormat(this.lang==="en"?"en-GB":"sv-SE",{minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}_formatValueForDisplay(t,e,i){if(!Number.isFinite(t))return null;const a={raw:1,thousands:1e3,millions:1e6,billions:1e9},s={raw:"",thousands:this.lang==="en"?"k":"t",millions:this.lang==="en"?"M":"mn",billions:this.lang==="en"?"B":"md"};let r=e.scale;if(r==="auto"){const d=Math.abs(t);d>=1e9?r="billions":d>=1e6?r="millions":d>=1e3?r="thousands":r="raw"}const n=t/(a[r]||1);let o=this._formatLocalizedNumber(n,e.decimals);e.type==="percent"?o=`${o} %`:e.type==="currency"&&(o=i?`${o} kr`:o);const h=s[r]||"";return h&&(o=`${o} ${h}`),o}_isCategoryAxis(t){return t?.categories?.length>0||t?.options?.type==="category"}_getTooltipXAxisLabel(t,e){const i=t?.point||t,a=i?.series?.xAxis||t?.series?.xAxis;let s="";if(a&&Array.isArray(a.categories)){const r=Number.isFinite(i?.x)?Number(i.x):Number.isFinite(t?.x)?Number(t.x):null;if(r!==null){const n=a.categories[r];typeof n<"u"&&n!==null&&(s=String(n))}}return!s&&typeof i?.category=="string"&&i.category.trim()&&Number.isNaN(Number(i.category))&&(s=i.category),!s&&typeof t?.key=="string"&&t.key.trim()&&Number.isNaN(Number(t.key))&&(s=t.key),!s&&typeof t?.x=="string"&&t.x.trim()&&Number.isNaN(Number(t.x))&&(s=t.x),s?this._formatCategoryTimeLabel(s,e)??s:""}_applyTimeFormatToLiveChart(t){const e=this._normalizeTimeFormat(this.timeFormat);if(e.mode==="raw"||e.display==="raw")return;const i=this._formatCategoryTimeLabel.bind(this);[...t?.xAxis||[],...t?.yAxis||[]].forEach(a=>{if(!this._isCategoryAxis(a))return;const s=a.options?.labels&&typeof a.options.labels=="object"?{...a.options.labels}:{},r=typeof s.formatter=="function"?s.formatter:null;s.formatter=function(){let n="";if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos=="number"){const h=this.axis.categories[this.pos];typeof h<"u"&&h!==null&&(n=String(h))}else typeof this?.value<"u"&&this.value!==null&&(n=String(this.value));const o=i(n,e);return o!==null?o:r?r.call(this):n},delete s.format,a.update({labels:s},!1)})}_applyValueFormatToLiveChart(t){const e=this._normalizeValueFormat(this.valueFormat),i=this._normalizeTimeFormat(this.timeFormat),a=this._formatValueForDisplay.bind(this),s=this._getTooltipXAxisLabel.bind(this);t.update({tooltip:{...t.options?.tooltip||{},valueDecimals:e.decimals,formatter:function(){const r=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],n=s(this,i),o=[];return r.forEach(h=>{const d=h?.point||h,b=Number.isFinite(h?.y)?h.y:d?.y,_=a(b,e,!0);if(_===null)return;const w=d?.name||d?.series?.name||"";o.push(`${w?`${String(w)}: `:""}<b>${_}</b><br/>`)}),`${n?`<span>${String(n)}</span><br/>`:""}${o.join("")}`}},plotOptions:{...t.options?.plotOptions||{},series:{...t.options?.plotOptions?.series||{},dataLabels:{...t.options?.plotOptions?.series?.dataLabels||{},formatter:function(){const r=Number.isFinite(this?.y)?this.y:this?.point?.y;return a(r,e,e.type==="percent")??null}}}}},!1,!1,!1),(t?.yAxis||[]).forEach(r=>{const n=r.options?.labels&&typeof r.options.labels=="object"?{...r.options.labels}:{},o=typeof n.formatter=="function"?n.formatter:null,h=!(r.options?.title&&typeof r.options.title.text=="string"&&r.options.title.text.trim());n.formatter=function(){const d=a(this?.value,e,h);return d!==null?d:o?o.call(this):this?.value},(e.type==="percent"||e.scale!=="auto")&&delete n.format,r.update({labels:n},!1)})}_applyYAxisSettingsToLiveChart(t){const e=this._normalizeYAxisSettings(this.yAxisSettings),i=t?.yAxis||[];i.length&&i.forEach((a,s)=>{const r=a.options&&typeof a.options=="object"?a.options:{},n={},o=typeof r.min<"u"&&r.min!==null&&r.min!=="";s===0&&e.startAtZero&&!o&&(n.min=0);const h=Array.isArray(r.plotLines)?r.plotLines.filter(d=>d?.id!=="scb-viz-reference-line"):[];s===0&&e.referenceLineEnabled&&Number.isFinite(e.referenceLineValue)&&h.push({id:"scb-viz-reference-line",className:"scb-axis-plotline scb-viz-reference-line",value:e.referenceLineValue,label:e.referenceLineLabel?{text:e.referenceLineLabel,className:"scb-viz-reference-line-label"}:void 0}),h.length?n.plotLines=h:Array.isArray(r.plotLines)&&(n.plotLines=[]),a.update(n,!1)})}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!=="diagram")return;const t=c(this,l,I).call(this,this._getDiagramAssignedElements());return t===void 0?void 0:window.Highcharts?.charts?.[t]}_getSeriesDifferentiationGroup(t,e){const i=String(t?.type||t?.options?.type||e?.options?.chart?.type||"").trim().toLowerCase();return["line","spline","scatter"].includes(i)?"line":["area","areaspline"].includes(i)?"area":["column","bar"].includes(i)?"fill":["pie","variablepie"].includes(i)?"point-fill":null}_shouldShowSeriesDifferentiationAction(){if(this._getCurrentPrintableView()!=="diagram")return!1;const t=this._getCurrentHighchartsChart();return!t?.series?.length||!this._isHighchartsStyledMode(t)?!1:t.series.some(e=>this._getSeriesDifferentiationGroup(e,t)!==null)}_getSeriesDifferentiationSnapshotStore(t){let e=this._seriesDifferentiationSnapshots.get(t);return e||(e=new Map,this._seriesDifferentiationSnapshots.set(t,e)),e}_cloneSeriesOptionValue(t){return Array.isArray(t)?t.map(e=>this._cloneSeriesOptionValue(e)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,i])=>[e,this._cloneSeriesOptionValue(i)])):t}_captureSeriesDifferentiationSnapshot(t){const e=this._cloneSeriesOptionValue(t?.options?.marker);return{marker:e&&Object.keys(e).length>0?e:{enabled:!1}}}_getHighchartsSvgElement(t){const e=t?.element??t;return e instanceof SVGElement?e:null}_isHighchartsStyledMode(t){return!!(t?.styledMode||t?.renderer?.styledMode||t?.options?.chart?.styledMode)}_getHighchartsSvgRoot(t){if(t?.container instanceof SVGSVGElement)return t.container;const e=t?.renderTo?.querySelector("svg")??t?.container?.querySelector?.("svg");return e instanceof SVGSVGElement?e:null}_getHighchartsColorClassName(t,e){const i=this._getHighchartsSvgElement(t);return Array.from(i?.classList??[]).find(s=>/^highcharts-color-\d+$/.test(s))??`highcharts-color-${e}`}_setSeriesDifferentiationMetadata(t,e){const i=this._getHighchartsSvgElement(t);i&&(i.setAttribute("data-scb-viz-role",e.role),e.dashStyle?i.setAttribute("data-scb-viz-dash-style",e.dashStyle):i.removeAttribute("data-scb-viz-dash-style"),e.patternKind?i.setAttribute("data-scb-viz-pattern-kind",e.patternKind):i.removeAttribute("data-scb-viz-pattern-kind"))}_clearSeriesDifferentiationMetadata(t){const e=this._getHighchartsSvgElement(t);e&&(e.removeAttribute("data-scb-viz-role"),e.removeAttribute("data-scb-viz-dash-style"),e.removeAttribute("data-scb-viz-pattern-kind"))}_setSeriesDifferentiationColorClass(t,e){const i=this._getHighchartsSvgElement(t);if(!i||!e)return;const a=Array.from(i.classList).find(s=>/^highcharts-color-\d+$/.test(s));a!==e&&(a&&(i.classList.remove(a),i.setAttribute("data-scb-viz-prev-color-class",a)),i.classList.add(e),i.setAttribute("data-scb-viz-added-color-class",e))}_clearSeriesDifferentiationColorClass(t){const e=this._getHighchartsSvgElement(t);if(!e)return;const i=e.getAttribute("data-scb-viz-added-color-class"),a=e.getAttribute("data-scb-viz-prev-color-class");i&&(e.classList.remove(i),e.removeAttribute("data-scb-viz-added-color-class")),a&&(e.classList.add(a),e.removeAttribute("data-scb-viz-prev-color-class"))}_getLegendSeriesDifferentiationTargets(t){const e=[],i=[],a=this._getHighchartsSvgElement(t?.legendItem?.group),s=(n,o)=>{const h=this._getHighchartsSvgElement(o);!h||n.includes(h)||n.push(h)};if(s(e,t?.legendLine),s(e,t?.legendItem?.line),s(i,t?.legendSymbol),s(i,t?.legendItem?.symbol),s(i,t?.legendArea),s(i,t?.legendItem?.area),a){const n=a.querySelector(".highcharts-graph, .highcharts-legend-graph, line, path");n&&s(e,n),a.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach(o=>{s(i,o)})}const r=i.filter(n=>!e.includes(n));return{graphTargets:e,fillTargets:r}}_ensureStyledModeSeriesPattern(t,e,i){const a=this._getHighchartsSvgRoot(t);if(!a)return;const s="http://www.w3.org/2000/svg";let r=a.querySelector("defs");r instanceof SVGDefsElement||(r=document.createElementNS(s,"defs"),a.insertBefore(r,a.firstChild));const n=`scb-viz-pattern-${e}-${i}`;if(r.querySelector(`#${n}`))return;const o=document.createElementNS(s,"pattern");o.setAttribute("id",n),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","10"),o.setAttribute("height","10"),o.classList.add(e);const h=document.createElementNS(s,"rect");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","10"),h.setAttribute("height","10"),h.setAttribute("class","scb-viz-highcharts-pattern__background"),o.appendChild(h),ft(o,s,i),r.appendChild(o)}_applyStyledModeSeriesDifferentiation(t){const e=this._getHighchartsSvgRoot(t);if(!e)return;e.classList.add("scb-viz-series-differentiation-enabled");const i=ut(),a=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((s,r)=>{const n=this._getSeriesDifferentiationGroup(s,t);if(!n)return;const o=String(s?.index??r);a.has(o)||a.set(o,this._captureSeriesDifferentiationSnapshot(s));const{dashStyle:h,markerSymbol:d,patternKind:b}=mt(r),_=this._getHighchartsColorClassName(s?.graph??s?.area??s?.group,r),w=this._getLegendSeriesDifferentiationTargets(s);this._setSeriesDifferentiationMetadata(s?.graph,{role:"graph",dashStyle:h}),n==="area"&&(this._setSeriesDifferentiationMetadata(s?.area,{role:"area",patternKind:b}),this._setSeriesDifferentiationColorClass(s?.area,_),this._ensureStyledModeSeriesPattern(t,_,b)),n==="fill"&&(s.points?.forEach(p=>{this._setSeriesDifferentiationMetadata(p?.graphic,{role:"fill",patternKind:b}),this._setSeriesDifferentiationColorClass(p?.graphic,_)}),this._ensureStyledModeSeriesPattern(t,_,b)),n==="point-fill"&&s.points?.forEach((p,y)=>{const z=i[y%i.length],S=this._getHighchartsColorClassName(p?.graphic??p?.legendSymbol??p?.legendItem?.symbol??p?.legendItem?.group,y),C=this._getLegendSeriesDifferentiationTargets(p);this._setSeriesDifferentiationMetadata(p?.graphic,{role:"fill",patternKind:z}),this._setSeriesDifferentiationColorClass(p?.graphic,S),this._ensureStyledModeSeriesPattern(t,S,z),C.fillTargets.forEach(G=>{this._setSeriesDifferentiationMetadata(G,{role:"legend-fill",patternKind:z}),this._setSeriesDifferentiationColorClass(G,S)})}),(n==="line"||n==="area")&&w.graphTargets.forEach(p=>{this._setSeriesDifferentiationMetadata(p,{role:"legend-symbol",dashStyle:h})}),(n==="area"||n==="fill")&&w.fillTargets.forEach(p=>{this._setSeriesDifferentiationMetadata(p,{role:"legend-fill",patternKind:b}),this._setSeriesDifferentiationColorClass(p,_)}),(n==="line"||n==="area")&&s.update({marker:{enabled:!0,symbol:d}},!1)}),t.redraw(!1)}_restoreStyledModeSeriesDifferentiation(t){this._getHighchartsSvgRoot(t)?.classList.remove("scb-viz-series-differentiation-enabled");const i=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((a,s)=>{const r=this._getSeriesDifferentiationGroup(a,t);if(!r)return;const n=this._getLegendSeriesDifferentiationTargets(a);if(this._clearSeriesDifferentiationMetadata(a?.graph),this._clearSeriesDifferentiationMetadata(a?.area),this._clearSeriesDifferentiationColorClass(a?.area),a.points?.forEach(o=>{const h=this._getLegendSeriesDifferentiationTargets(o);this._clearSeriesDifferentiationMetadata(o?.graphic),this._clearSeriesDifferentiationColorClass(o?.graphic),h.graphTargets.forEach(d=>{this._clearSeriesDifferentiationMetadata(d)}),h.fillTargets.forEach(d=>{this._clearSeriesDifferentiationMetadata(d),this._clearSeriesDifferentiationColorClass(d)})}),n.graphTargets.forEach(o=>{this._clearSeriesDifferentiationMetadata(o)}),n.fillTargets.forEach(o=>{this._clearSeriesDifferentiationMetadata(o),this._clearSeriesDifferentiationColorClass(o)}),r==="line"||r==="area"){const o=i.get(String(a?.index??s));a.update({marker:this._cloneSeriesOptionValue(o?.marker)},!1)}}),t.redraw(!1)}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getExportBaseFileName(){const t=this.lang==="en"?"visualization":"visualisering";return(this.title||t).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}_buildExportFileName(t){const e=t==="csv"?this.lang==="en"?"-table":"-tabell":"";return`${this._getExportBaseFileName()}${e}.${t}`}_renderActionsMenu(){const t=this._getCurrentPrintableView(),e=this._canExportRaster(),i=this._canExportCsv(),a=e&&(t==="diagram"||t==="image"),s=i&&t==="table",r=this._shouldShowSeriesDifferentiationAction();return f`
116
+ `;let g=class extends pt{constructor(){super(...arguments),wt(this,l),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth="",this.containerMaxWidth="",this.contentHeight="",this.toggleHeightMode="stable",this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._chartConfigSyncFrame=0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentPointerDown=t=>{if(!this._actionsMenuOpen)return;const e=t.composedPath(),i=this.shadowRoot?.querySelector(".actions-menu");i&&e.includes(i)||this._closeActionsMenu()},this._onDocumentKeyDown=t=>{this._actionsMenuOpen&&t.key==="Escape"&&(t.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await c(this,l,st).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),c(this,l,at).call(this))},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),c(this,l,$).call(this)}}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}get actionsMenuLabel(){return this.lang==="en"?"Open menu":"Öppna meny"}get printLabel(){return this.lang==="en"?"Print":"Skriv ut"}get downloadPngLabel(){return this.lang==="en"?"Download PNG":"Ladda ner PNG"}get downloadJpgLabel(){return this.lang==="en"?"Download JPG":"Ladda ner JPG"}get downloadCsvLabel(){return this.lang==="en"?"Download CSV":"Ladda ner CSV"}get enableSeriesDifferentiationLabel(){return this.lang==="en"?"Show symbols and patterns":"Visa symboler och mönster"}get disableSeriesDifferentiationLabel(){return this.lang==="en"?"Hide symbols and patterns":"Dölj symboler och mönster"}_getImageAltText(){return[this.title,this.subtitle,this.description].map(e=>typeof e=="string"?e.trim():"").filter(Boolean).join(". ")||(this.lang==="en"?"Image figure":"Bildfigur")}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown)}firstUpdated(t){this._readTableDataFromSlot(),c(this,l,H).call(this),c(this,l,V).call(this),c(this,l,D).call(this),this._syncChipClass(),c(this,l,L).call(this),c(this,l,M).call(this)}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&(this._syncChipClass(),this._closeActionsMenu()),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&c(this,l,H).call(this),t.has("containerMaxWidth")&&c(this,l,V).call(this),t.has("variant")&&c(this,l,L).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&c(this,l,D).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&c(this,l,M).call(this),(t.has("selectedChip")||t.has("variant"))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),(t.has("valueFormat")||t.has("timeFormat")||t.has("yAxisSettings")||t.has("selectedChip")||t.has("variant"))&&c(this,l,k).call(this)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),c(this,l,F).call(this),c(this,l,N).call(this),c(this,l,j).call(this)}_onTableSlotChange(t){const e=t.target;e&&(this._readTableDataFromSlot(e),this.requestUpdate())}_onDiagramSlotChange(){c(this,l,D).call(this),c(this,l,M).call(this),c(this,l,k).call(this),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),this.requestUpdate()}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const i=e.assignedElements({flatten:!0}),a=[];i.forEach(p=>{if(p.tagName==="TABLE"){a.push(p);return}p.querySelectorAll("table").forEach(y=>a.push(y))});const s=a[0];if(!s){this._slottedTableData=void 0;return}const r=[],n=[],o=[],h=p=>p?(p.textContent??"").replace(/\s+/g," ").trim():"",d=p=>p?{html:(p.innerHTML??"").trim(),text:h(p)}:{html:"",text:""},b=s.querySelector("thead tr");b&&Array.from(b.querySelectorAll("th, td")).forEach(y=>r.push(d(y)));const _=Array.from(s.querySelectorAll("tbody tr")),w=_.length>0?_:Array.from(s.querySelectorAll("tr")).filter(p=>p.closest("thead")===null);if(w.forEach(p=>{const y=Array.from(p.querySelectorAll("th, td"));if(y.length===0)return;const z=y[0].tagName==="TH"&&p.closest("thead")===null&&p.closest("tfoot")===null;o.push(z);const S=[];y.forEach(C=>S.push(d(C))),n.push(S)}),!b&&n.length>0){const p=n[0],y=w[0],z=Array.from(y?.querySelectorAll("th, td")??[]);z.length>0&&z.every(C=>C.tagName==="TH")&&y?.closest("tbody")===null&&(r.splice(0,r.length,...p),n.shift(),o.shift())}this._slottedTableData={headers:r.length>0?r:void 0,rows:n,rowHeaderRows:o.length>0?o:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(s=>s.length)),i=s=>{if(s==null)return!1;if(typeof s=="number")return!0;const r=String(s).replace(/[\u00A0\u202F\s]+/g,"").trim();return r?/^-?\d+(?:[.,]\d+)?$/.test(r):!1},a=[];for(let s=0;s<e;s+=1){if(s===0){a.push("left");continue}const r=t.rows.map(o=>this._normalizeRenderableCell(o[s]).text).filter(o=>o!==""&&o!==null&&o!==void 0),n=r.length>0&&r.every(i);a.push(n?"right":"left")}return a}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"600px"}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getDiagramAssignedElements(){const t=this.shadowRoot?.querySelector('slot[name="diagram"]');return t?t.assignedElements({flatten:!0}):[]}_findExportableVisualElement(t){for(const e of t){if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e;const i=e.querySelector("svg, canvas, img");if(i instanceof SVGSVGElement||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement)return i}return null}_getExportableVisualElement(){if(this.variant==="Table")return null;if(this.variant==="Image"){const t=this.shadowRoot?.querySelector(".image-content img");return t instanceof HTMLImageElement?t:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:"number",scale:"auto",decimals:0}}_normalizeValueFormat(t){const e=this._getDefaultValueFormat(),i=t&&typeof t=="object"?t:{},a=["number","currency","percent"].includes(String(i.type))?String(i.type):e.type,s=["auto","raw","thousands","millions","billions"].includes(String(i.scale))?String(i.scale):e.scale,r=Number.isFinite(Number(i.decimals))?Math.max(0,Math.min(20,Number(i.decimals))):e.decimals;return{type:a,scale:s,decimals:r}}_normalizeTimeFormat(t){const e={mode:"raw",display:"raw"},i=t&&typeof t=="object"?t:{},a=["raw","year","monthCode","quarterCode","weekCode","tertialCode"];let s=typeof i.mode=="string"?i.mode:e.mode,r=typeof i.display=="string"?i.display:e.display;a.includes(s)||(s=e.mode);const n={raw:["raw"],year:["raw","year"],monthCode:["raw","iso-month","short-month","long-month"],quarterCode:["raw","quarter-compact","quarter-short","quarter-long"],weekCode:["raw","week-compact","week-long"],tertialCode:["raw","tertial-compact","tertial-short","tertial-long"]};return n[s].includes(r)||(r=n[s][0]),s==="raw"&&(r="raw"),{mode:s,display:r}}_normalizeYAxisSettings(t){const e=t&&typeof t=="object"?t:{},i=Number.isFinite(Number(e.referenceLineValue))?Number(e.referenceLineValue):null;return{startAtZero:!!e.startAtZero,referenceLineEnabled:!!e.referenceLineEnabled&&Number.isFinite(i),referenceLineValue:i,referenceLineLabel:typeof e.referenceLineLabel=="string"?e.referenceLineLabel:""}}_getShortMonthNames(){return["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"]}_getLongMonthNames(){return["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]}_formatCategoryTimeLabel(t,e){if(!t||e.mode==="raw"||e.display==="raw")return null;if(e.mode==="year"){const i=/^\s*(\d{4})\s*$/.exec(t);return i?i[1]:null}if(e.mode==="monthCode"){const i=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2])-1,s=i[1],r=String(a+1).padStart(2,"0");return e.display==="iso-month"?`${s}-${r}`:e.display==="short-month"?`${this._getShortMonthNames()[a]} ${s}`:e.display==="long-month"?`${this._getLongMonthNames()[a]} ${s}`:t}if(e.mode==="quarterCode"){const i=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(t);if(!i)return null;const a=Number(i[3]),s=i[1],r=["första","andra","tredje","fjärde"];return e.display==="quarter-compact"?`${s} K${a}`:e.display==="quarter-short"?`kv ${a} ${s}`:e.display==="quarter-long"?`${r[a-1]} kvartalet ${s}`:t}if(e.mode==="weekCode"){const i=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2]),s=i[1];return e.display==="week-compact"?`${s} v. ${a}`:e.display==="week-long"?`vecka ${a} ${s}`:t}if(e.mode==="tertialCode"){const i=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(t);if(!i)return null;const a=Number(i[2]),s=i[1],r=["första","andra","tredje"];return e.display==="tertial-compact"?`${s} T${a}`:e.display==="tertial-short"?`tertial ${a} ${s}`:e.display==="tertial-long"?`${r[a-1]} tertialet ${s}`:t}return null}_formatLocalizedNumber(t,e){return new Intl.NumberFormat(this.lang==="en"?"en-GB":"sv-SE",{minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}_formatValueForDisplay(t,e,i){if(!Number.isFinite(t))return null;const a={raw:1,thousands:1e3,millions:1e6,billions:1e9},s={raw:"",thousands:this.lang==="en"?"k":"t",millions:this.lang==="en"?"M":"mn",billions:this.lang==="en"?"B":"md"};let r=e.scale;if(r==="auto"){const d=Math.abs(t);d>=1e9?r="billions":d>=1e6?r="millions":d>=1e3?r="thousands":r="raw"}const n=t/(a[r]||1);let o=this._formatLocalizedNumber(n,e.decimals);e.type==="percent"?o=`${o} %`:e.type==="currency"&&(o=i?`${o} kr`:o);const h=s[r]||"";return h&&(o=`${o} ${h}`),o}_isCategoryAxis(t){return t?.categories?.length>0||t?.options?.type==="category"}_getTooltipXAxisLabel(t,e){const i=t?.point||t,a=i?.series?.xAxis||t?.series?.xAxis;let s="";if(a&&Array.isArray(a.categories)){const r=Number.isFinite(i?.x)?Number(i.x):Number.isFinite(t?.x)?Number(t.x):null;if(r!==null){const n=a.categories[r];typeof n<"u"&&n!==null&&(s=String(n))}}return!s&&typeof i?.category=="string"&&i.category.trim()&&Number.isNaN(Number(i.category))&&(s=i.category),!s&&typeof t?.key=="string"&&t.key.trim()&&Number.isNaN(Number(t.key))&&(s=t.key),!s&&typeof t?.x=="string"&&t.x.trim()&&Number.isNaN(Number(t.x))&&(s=t.x),s?this._formatCategoryTimeLabel(s,e)??s:""}_applyTimeFormatToLiveChart(t){const e=this._normalizeTimeFormat(this.timeFormat);if(e.mode==="raw"||e.display==="raw")return;const i=this._formatCategoryTimeLabel.bind(this);[...t?.xAxis||[],...t?.yAxis||[]].forEach(a=>{if(!this._isCategoryAxis(a))return;const s=a.options?.labels&&typeof a.options.labels=="object"?{...a.options.labels}:{},r=typeof s.formatter=="function"?s.formatter:null;s.formatter=function(){let n="";if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos=="number"){const h=this.axis.categories[this.pos];typeof h<"u"&&h!==null&&(n=String(h))}else typeof this?.value<"u"&&this.value!==null&&(n=String(this.value));const o=i(n,e);return o!==null?o:r?r.call(this):n},delete s.format,a.update({labels:s},!1)})}_applyValueFormatToLiveChart(t){const e=this._normalizeValueFormat(this.valueFormat),i=this._normalizeTimeFormat(this.timeFormat),a=this._formatValueForDisplay.bind(this),s=this._getTooltipXAxisLabel.bind(this);t.update({tooltip:{...t.options?.tooltip||{},valueDecimals:e.decimals,formatter:function(){const r=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],n=s(this,i),o=[];return r.forEach(h=>{const d=h?.point||h,b=Number.isFinite(h?.y)?h.y:d?.y,_=a(b,e,!0);if(_===null)return;const w=d?.name||d?.series?.name||"";o.push(`${w?`${String(w)}: `:""}<b>${_}</b><br/>`)}),`${n?`<span>${String(n)}</span><br/>`:""}${o.join("")}`}},plotOptions:{...t.options?.plotOptions||{},series:{...t.options?.plotOptions?.series||{},dataLabels:{...t.options?.plotOptions?.series?.dataLabels||{},formatter:function(){const r=Number.isFinite(this?.y)?this.y:this?.point?.y;return a(r,e,e.type==="percent")??null}}}}},!1,!1,!1),(t?.yAxis||[]).forEach(r=>{const n=r.options?.labels&&typeof r.options.labels=="object"?{...r.options.labels}:{},o=typeof n.formatter=="function"?n.formatter:null,h=!(r.options?.title&&typeof r.options.title.text=="string"&&r.options.title.text.trim());n.formatter=function(){const d=a(this?.value,e,h);return d!==null?d:o?o.call(this):this?.value},(e.type==="percent"||e.scale!=="auto")&&delete n.format,r.update({labels:n},!1)})}_applyYAxisSettingsToLiveChart(t){const e=this._normalizeYAxisSettings(this.yAxisSettings),i=t?.yAxis||[];i.length&&i.forEach((a,s)=>{const r=a.options&&typeof a.options=="object"?a.options:{},n={},o=typeof r.min<"u"&&r.min!==null&&r.min!=="";s===0&&e.startAtZero&&!o&&(n.min=0);const h=Array.isArray(r.plotLines)?r.plotLines.filter(d=>d?.id!=="scb-viz-reference-line"):[];s===0&&e.referenceLineEnabled&&Number.isFinite(e.referenceLineValue)&&h.push({id:"scb-viz-reference-line",className:"scb-axis-plotline scb-viz-reference-line",value:e.referenceLineValue,label:e.referenceLineLabel?{text:e.referenceLineLabel,className:"scb-viz-reference-line-label"}:void 0}),h.length?n.plotLines=h:Array.isArray(r.plotLines)&&(n.plotLines=[]),a.update(n,!1)})}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!=="diagram")return;const t=c(this,l,I).call(this,this._getDiagramAssignedElements());return t===void 0?void 0:window.Highcharts?.charts?.[t]}_getSeriesDifferentiationGroup(t,e){const i=String(t?.type||t?.options?.type||e?.options?.chart?.type||"").trim().toLowerCase();return["line","spline","scatter"].includes(i)?"line":["area","areaspline"].includes(i)?"area":["column","bar"].includes(i)?"fill":["pie","variablepie"].includes(i)?"point-fill":null}_shouldShowSeriesDifferentiationAction(){if(this._getCurrentPrintableView()!=="diagram")return!1;const t=this._getCurrentHighchartsChart();return!t?.series?.length||!this._isHighchartsStyledMode(t)?!1:t.series.some(e=>this._getSeriesDifferentiationGroup(e,t)!==null)}_getSeriesDifferentiationSnapshotStore(t){let e=this._seriesDifferentiationSnapshots.get(t);return e||(e=new Map,this._seriesDifferentiationSnapshots.set(t,e)),e}_cloneSeriesOptionValue(t){return Array.isArray(t)?t.map(e=>this._cloneSeriesOptionValue(e)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,i])=>[e,this._cloneSeriesOptionValue(i)])):t}_captureSeriesDifferentiationSnapshot(t){const e=this._cloneSeriesOptionValue(t?.options?.marker);return{marker:e&&Object.keys(e).length>0?e:{enabled:!1}}}_getHighchartsSvgElement(t){const e=t?.element??t;return e instanceof SVGElement?e:null}_isHighchartsStyledMode(t){return!!(t?.styledMode||t?.renderer?.styledMode||t?.options?.chart?.styledMode)}_getHighchartsSvgRoot(t){if(t?.container instanceof SVGSVGElement)return t.container;const e=t?.renderTo?.querySelector("svg")??t?.container?.querySelector?.("svg");return e instanceof SVGSVGElement?e:null}_getHighchartsColorClassName(t,e){const i=this._getHighchartsSvgElement(t);return Array.from(i?.classList??[]).find(s=>/^highcharts-color-\d+$/.test(s))??`highcharts-color-${e}`}_setSeriesDifferentiationMetadata(t,e){const i=this._getHighchartsSvgElement(t);i&&(i.setAttribute("data-scb-viz-role",e.role),e.dashStyle?i.setAttribute("data-scb-viz-dash-style",e.dashStyle):i.removeAttribute("data-scb-viz-dash-style"),e.patternKind?i.setAttribute("data-scb-viz-pattern-kind",e.patternKind):i.removeAttribute("data-scb-viz-pattern-kind"))}_clearSeriesDifferentiationMetadata(t){const e=this._getHighchartsSvgElement(t);e&&(e.removeAttribute("data-scb-viz-role"),e.removeAttribute("data-scb-viz-dash-style"),e.removeAttribute("data-scb-viz-pattern-kind"))}_setSeriesDifferentiationColorClass(t,e){const i=this._getHighchartsSvgElement(t);if(!i||!e)return;const a=Array.from(i.classList).find(s=>/^highcharts-color-\d+$/.test(s));a!==e&&(a&&(i.classList.remove(a),i.setAttribute("data-scb-viz-prev-color-class",a)),i.classList.add(e),i.setAttribute("data-scb-viz-added-color-class",e))}_clearSeriesDifferentiationColorClass(t){const e=this._getHighchartsSvgElement(t);if(!e)return;const i=e.getAttribute("data-scb-viz-added-color-class"),a=e.getAttribute("data-scb-viz-prev-color-class");i&&(e.classList.remove(i),e.removeAttribute("data-scb-viz-added-color-class")),a&&(e.classList.add(a),e.removeAttribute("data-scb-viz-prev-color-class"))}_getLegendSeriesDifferentiationTargets(t){const e=[],i=[],a=this._getHighchartsSvgElement(t?.legendItem?.group),s=(n,o)=>{const h=this._getHighchartsSvgElement(o);!h||n.includes(h)||n.push(h)};if(s(e,t?.legendLine),s(e,t?.legendItem?.line),s(i,t?.legendSymbol),s(i,t?.legendItem?.symbol),s(i,t?.legendArea),s(i,t?.legendItem?.area),a){const n=a.querySelector(".highcharts-graph, .highcharts-legend-graph, line, path");n&&s(e,n),a.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach(o=>{s(i,o)})}const r=i.filter(n=>!e.includes(n));return{graphTargets:e,fillTargets:r}}_ensureStyledModeSeriesPattern(t,e,i){const a=this._getHighchartsSvgRoot(t);if(!a)return;const s="http://www.w3.org/2000/svg";let r=a.querySelector("defs");r instanceof SVGDefsElement||(r=document.createElementNS(s,"defs"),a.insertBefore(r,a.firstChild));const n=`scb-viz-pattern-${e}-${i}`;if(r.querySelector(`#${n}`))return;const o=document.createElementNS(s,"pattern");o.setAttribute("id",n),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","10"),o.setAttribute("height","10"),o.classList.add(e);const h=document.createElementNS(s,"rect");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","10"),h.setAttribute("height","10"),h.setAttribute("class","scb-viz-highcharts-pattern__background"),o.appendChild(h),ut(o,s,i),r.appendChild(o)}_applyStyledModeSeriesDifferentiation(t){const e=this._getHighchartsSvgRoot(t);if(!e)return;e.classList.add("scb-viz-series-differentiation-enabled");const i=mt(),a=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((s,r)=>{const n=this._getSeriesDifferentiationGroup(s,t);if(!n)return;const o=String(s?.index??r);a.has(o)||a.set(o,this._captureSeriesDifferentiationSnapshot(s));const{dashStyle:h,markerSymbol:d,patternKind:b}=bt(r),_=this._getHighchartsColorClassName(s?.graph??s?.area??s?.group,r),w=this._getLegendSeriesDifferentiationTargets(s);this._setSeriesDifferentiationMetadata(s?.graph,{role:"graph",dashStyle:h}),n==="area"&&(this._setSeriesDifferentiationMetadata(s?.area,{role:"area",patternKind:b}),this._setSeriesDifferentiationColorClass(s?.area,_),this._ensureStyledModeSeriesPattern(t,_,b)),n==="fill"&&(s.points?.forEach(p=>{this._setSeriesDifferentiationMetadata(p?.graphic,{role:"fill",patternKind:b}),this._setSeriesDifferentiationColorClass(p?.graphic,_)}),this._ensureStyledModeSeriesPattern(t,_,b)),n==="point-fill"&&s.points?.forEach((p,y)=>{const z=i[y%i.length],S=this._getHighchartsColorClassName(p?.graphic??p?.legendSymbol??p?.legendItem?.symbol??p?.legendItem?.group,y),C=this._getLegendSeriesDifferentiationTargets(p);this._setSeriesDifferentiationMetadata(p?.graphic,{role:"fill",patternKind:z}),this._setSeriesDifferentiationColorClass(p?.graphic,S),this._ensureStyledModeSeriesPattern(t,S,z),C.fillTargets.forEach(G=>{this._setSeriesDifferentiationMetadata(G,{role:"legend-fill",patternKind:z}),this._setSeriesDifferentiationColorClass(G,S)})}),(n==="line"||n==="area")&&w.graphTargets.forEach(p=>{this._setSeriesDifferentiationMetadata(p,{role:"legend-symbol",dashStyle:h})}),(n==="area"||n==="fill")&&w.fillTargets.forEach(p=>{this._setSeriesDifferentiationMetadata(p,{role:"legend-fill",patternKind:b}),this._setSeriesDifferentiationColorClass(p,_)}),(n==="line"||n==="area")&&s.update({marker:{enabled:!0,symbol:d}},!1)}),t.redraw(!1)}_restoreStyledModeSeriesDifferentiation(t){this._getHighchartsSvgRoot(t)?.classList.remove("scb-viz-series-differentiation-enabled");const i=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((a,s)=>{const r=this._getSeriesDifferentiationGroup(a,t);if(!r)return;const n=this._getLegendSeriesDifferentiationTargets(a);if(this._clearSeriesDifferentiationMetadata(a?.graph),this._clearSeriesDifferentiationMetadata(a?.area),this._clearSeriesDifferentiationColorClass(a?.area),a.points?.forEach(o=>{const h=this._getLegendSeriesDifferentiationTargets(o);this._clearSeriesDifferentiationMetadata(o?.graphic),this._clearSeriesDifferentiationColorClass(o?.graphic),h.graphTargets.forEach(d=>{this._clearSeriesDifferentiationMetadata(d)}),h.fillTargets.forEach(d=>{this._clearSeriesDifferentiationMetadata(d),this._clearSeriesDifferentiationColorClass(d)})}),n.graphTargets.forEach(o=>{this._clearSeriesDifferentiationMetadata(o)}),n.fillTargets.forEach(o=>{this._clearSeriesDifferentiationMetadata(o),this._clearSeriesDifferentiationColorClass(o)}),r==="line"||r==="area"){const o=i.get(String(a?.index??s));a.update({marker:this._cloneSeriesOptionValue(o?.marker)},!1)}}),t.redraw(!1)}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getExportBaseFileName(){const t=this.lang==="en"?"visualization":"visualisering";return(this.title||t).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}_buildExportFileName(t){const e=t==="csv"?this.lang==="en"?"-table":"-tabell":"";return`${this._getExportBaseFileName()}${e}.${t}`}_renderActionsMenu(){const t=this._getCurrentPrintableView(),e=this._canExportRaster(),i=this._canExportCsv(),a=e&&(t==="diagram"||t==="image"),s=i&&t==="table",r=this._shouldShowSeriesDifferentiationAction();return f`
117
117
  <div class="actions-menu">
118
118
  <scb-icon-button
119
119
  icon="more_vert"
@@ -281,7 +281,7 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
281
281
  aria-label="${this.officialStatisticsAlt}"
282
282
  >
283
283
  <span class="sos-logotype-small" aria-hidden="true">
284
- ${pt(ct)}
284
+ ${ft(ht)}
285
285
  </span>
286
286
  </a>
287
287
  `:""}
@@ -351,7 +351,14 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
351
351
  ></slot>
352
352
  <slot></slot>
353
353
  </div>
354
- `;default:return f`
354
+ `;default:{const t=this._getResolvedContentMaxWidth(),e=f`
355
+ <div
356
+ class="diagram-content"
357
+ style=${t?`--scb-viz-content-max-width: ${t};`:""}
358
+ >
359
+ <slot name="diagram" @slotchange=${this._onDiagramSlotChange}></slot>
360
+ </div>
361
+ `;return f`
355
362
  <div part="container" class="viz-container">
356
363
  ${this._renderHeader()}
357
364
  ${this._renderActions()}
@@ -362,19 +369,16 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
362
369
  <div
363
370
  class=${`standard-content-panel standard-content-panel--diagram ${this.selectedChip==="Diagram"?"standard-content-panel--active":""}`}
364
371
  >
365
- <scb-horizontal-scroller
366
- width=${this._getResolvedDiagramScrollerWidth()}
367
- class="standard-diagram-scroller"
368
- variant="inline"
369
- show-scrollbar
370
- >
371
- <div
372
- class="diagram-content"
373
- style=${this._getResolvedContentMaxWidth()?`--scb-viz-content-max-width: ${this._getResolvedContentMaxWidth()};`:""}
374
- >
375
- <slot name="diagram" @slotchange=${this._onDiagramSlotChange}></slot>
376
- </div>
377
- </scb-horizontal-scroller>
372
+ ${t?f`
373
+ <scb-horizontal-scroller
374
+ width=${this._getResolvedDiagramScrollerWidth()}
375
+ class="standard-diagram-scroller"
376
+ variant="inline"
377
+ show-scrollbar
378
+ >
379
+ ${e}
380
+ </scb-horizontal-scroller>
381
+ `:f`<div class="standard-diagram-scroller">${e}</div>`}
378
382
  </div>
379
383
  <div
380
384
  class=${`standard-content-panel standard-content-panel--table ${this.selectedChip==="Table"?"standard-content-panel--active":""}`}
@@ -396,11 +400,11 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
396
400
  <slot
397
401
  name="table"
398
402
  class="table-source"
399
- @slotchange=${t=>this._onTableSlotChange(t)}
403
+ @slotchange=${i=>this._onTableSlotChange(i)}
400
404
  ></slot>
401
405
  <slot></slot>
402
406
  </div>
403
- `}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}_toggleActionsMenu(t){t.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){this.shadowRoot?.querySelector(".actions-menu scb-icon-button")?.focus()}_focusFirstMenuItem(){this.shadowRoot?.querySelector(".actions-menu-item")?.focus()}_getCurrentPrintableView(){return this.variant==="Table"?"table":this.variant==="Image"?"image":this.selectedChip==="Table"?"table":"diagram"}};l=new WeakSet;L=function(){if(c(this,l,F).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{c(this,l,M).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};F=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};N=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};M=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(c(this,l,N).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,c(this,l,K).call(this)})}))};A=function(t){const e=t?.getAttribute("data-highcharts-chart");if(!e)return;const i=Number.parseInt(e,10);return Number.isNaN(i)?void 0:i};I=function(t){for(const e of t){const i=c(this,l,A).call(this,e);if(i!==void 0)return i;const a=e.querySelector("[data-highcharts-chart]"),s=c(this,l,A).call(this,a);if(s!==void 0)return s}};K=function(){if(this.variant!=="Standard"||this.selectedChip!=="Diagram")return;const t=this.shadowRoot?.querySelector('slot[name="diagram"]');if(!t)return;const e=t.assignedElements({flatten:!0});if(e.length===0)return;const i=c(this,l,I).call(this,e);if(i===void 0)return;const s=window.Highcharts?.charts?.[i];s&&(s.setSize?.(null,null,!1),s.reflow?.(),this._seriesDifferentiationEnabled&&c(this,l,$).call(this))};D=function(){const t=this.variant==="Standard"?this._getResolvedDiagramHeight():"",e=this.variant==="Standard"&&this._getResolvedToggleHeightMode()==="stable"?this._getResolvedStandardContentHeight():"";this.variant==="Standard"?this.style.setProperty("--scb-viz-diagram-min-height",t||"600px"):this.style.removeProperty("--scb-viz-diagram-min-height"),t?(this.style.setProperty("--scb-viz-diagram-height",t),this.style.setProperty("--scb-viz-diagram-overflow","hidden")):(this.style.removeProperty("--scb-viz-diagram-height"),this.style.removeProperty("--scb-viz-diagram-overflow")),e?this.style.setProperty("--scb-viz-standard-content-height",e):this.style.removeProperty("--scb-viz-standard-content-height")};j=function(){this._chartConfigSyncFrame&&(cancelAnimationFrame(this._chartConfigSyncFrame),this._chartConfigSyncFrame=0)};k=function(){c(this,l,j).call(this),this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=0,c(this,l,J).call(this)})})};J=function(){const t=this._getCurrentHighchartsChart();if(!t)return;let e=!1;typeof this.timeFormat<"u"&&(this._applyTimeFormatToLiveChart(t),e=!0),typeof this.valueFormat<"u"&&(this._applyValueFormatToLiveChart(t),e=!0),typeof this.yAxisSettings<"u"&&(this._applyYAxisSettingsToLiveChart(t),e=!0),e&&t.redraw(!1)};X=function(t){this._isHighchartsStyledMode(t)&&this._applyStyledModeSeriesDifferentiation(t)};Y=function(t){this._isHighchartsStyledMode(t)&&this._restoreStyledModeSeriesDifferentiation(t)};$=function(){const t=this._getCurrentHighchartsChart();if(t){if(this._seriesDifferentiationEnabled){c(this,l,X).call(this,t);return}c(this,l,Y).call(this,t)}};E=async function(t){const e=this._getExportableVisualElement();if(!e)return;const i=await c(this,l,at).call(this,e,t);i&&c(this,l,B).call(this,i,this._buildExportFileName(t==="jpeg"?"jpg":"png"))};v=function(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};Z=function(t){const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(h=>h.length)),a=(t.headers??[]).map(h=>this._normalizeRenderableCell(h)),s=t.rows.map(h=>{const d=h.map(b=>this._normalizeRenderableCell(b));for(;d.length<i;)d.push({html:"",text:""});return d}),r=t.rowHeaderRows??[],n=a.length?`<thead><tr>${a.map((h,d)=>`<th scope="col" class="${e[d]==="right"?"align-right":"align-left"}">${h.html||c(this,l,v).call(this,h.text)}</th>`).join("")}</tr></thead>`:"",o=`<tbody>${s.map((h,d)=>{const b=r[d]===!0;return`<tr>${h.map((w,p)=>{const y=e[p]==="right"?"align-right":"align-left",z=w.html||c(this,l,v).call(this,w.text);return p===0&&b?`<th scope="row" class="${y}">${z}</th>`:`<td class="${y}">${z}</td>`}).join("")}</tr>`}).join("")}</tbody>`;return`<table class="scb-viz-print-table">${n}${o}</table>`};Q=function(){const t=[];if(this.description&&t.push(`
407
+ `}}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}_toggleActionsMenu(t){t.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){this.shadowRoot?.querySelector(".actions-menu scb-icon-button")?.focus()}_focusFirstMenuItem(){this.shadowRoot?.querySelector(".actions-menu-item")?.focus()}_getCurrentPrintableView(){return this.variant==="Table"?"table":this.variant==="Image"?"image":this.selectedChip==="Table"?"table":"diagram"}};l=new WeakSet;L=function(){if(c(this,l,F).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{c(this,l,M).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};F=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};N=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};M=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(c(this,l,N).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,c(this,l,K).call(this)})}))};A=function(t){const e=t?.getAttribute("data-highcharts-chart");if(!e)return;const i=Number.parseInt(e,10);return Number.isNaN(i)?void 0:i};I=function(t){for(const e of t){const i=c(this,l,A).call(this,e);if(i!==void 0)return i;const a=e.querySelector("[data-highcharts-chart]"),s=c(this,l,A).call(this,a);if(s!==void 0)return s}};K=function(){if(this.variant!=="Standard"||this.selectedChip!=="Diagram")return;const t=this.shadowRoot?.querySelector('slot[name="diagram"]');if(!t)return;const e=t.assignedElements({flatten:!0});if(e.length===0)return;const i=c(this,l,I).call(this,e);if(i===void 0)return;const s=window.Highcharts?.charts?.[i];s&&(s.setSize?.(null,null,!1),s.reflow?.(),this._seriesDifferentiationEnabled&&c(this,l,$).call(this))};D=function(){const t=this.variant==="Standard"?this._getResolvedDiagramHeight():"",e=this.variant==="Standard"&&this._getResolvedToggleHeightMode()==="stable"?this._getResolvedStandardContentHeight():"";this.variant==="Standard"?this.style.setProperty("--scb-viz-diagram-min-height",t||"600px"):this.style.removeProperty("--scb-viz-diagram-min-height"),t?(this.style.setProperty("--scb-viz-diagram-height",t),this.style.setProperty("--scb-viz-diagram-overflow","hidden")):(this.style.removeProperty("--scb-viz-diagram-height"),this.style.removeProperty("--scb-viz-diagram-overflow")),e?this.style.setProperty("--scb-viz-standard-content-height",e):this.style.removeProperty("--scb-viz-standard-content-height")};j=function(){this._chartConfigSyncFrame&&(cancelAnimationFrame(this._chartConfigSyncFrame),this._chartConfigSyncFrame=0)};k=function(){c(this,l,j).call(this),this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=0,c(this,l,J).call(this)})})};J=function(){const t=this._getCurrentHighchartsChart();if(!t)return;let e=!1;typeof this.timeFormat<"u"&&(this._applyTimeFormatToLiveChart(t),e=!0),typeof this.valueFormat<"u"&&(this._applyValueFormatToLiveChart(t),e=!0),typeof this.yAxisSettings<"u"&&(this._applyYAxisSettingsToLiveChart(t),e=!0),e&&t.redraw(!1)};X=function(t){this._isHighchartsStyledMode(t)&&this._applyStyledModeSeriesDifferentiation(t)};Y=function(t){this._isHighchartsStyledMode(t)&&this._restoreStyledModeSeriesDifferentiation(t)};$=function(){const t=this._getCurrentHighchartsChart();if(t){if(this._seriesDifferentiationEnabled){c(this,l,X).call(this,t);return}c(this,l,Y).call(this,t)}};E=async function(t){const e=this._getExportableVisualElement();if(!e)return;const i=await c(this,l,nt).call(this,e,t);i&&c(this,l,B).call(this,i,this._buildExportFileName(t==="jpeg"?"jpg":"png"))};v=function(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};Z=function(t){const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(h=>h.length)),a=(t.headers??[]).map(h=>this._normalizeRenderableCell(h)),s=t.rows.map(h=>{const d=h.map(b=>this._normalizeRenderableCell(b));for(;d.length<i;)d.push({html:"",text:""});return d}),r=t.rowHeaderRows??[],n=a.length?`<thead><tr>${a.map((h,d)=>`<th scope="col" class="${e[d]==="right"?"align-right":"align-left"}">${h.html||c(this,l,v).call(this,h.text)}</th>`).join("")}</tr></thead>`:"",o=`<tbody>${s.map((h,d)=>{const b=r[d]===!0;return`<tr>${h.map((w,p)=>{const y=e[p]==="right"?"align-right":"align-left",z=w.html||c(this,l,v).call(this,w.text);return p===0&&b?`<th scope="row" class="${y}">${z}</th>`:`<td class="${y}">${z}</td>`}).join("")}</tr>`}).join("")}</tbody>`;return`<table class="scb-viz-print-table">${n}${o}</table>`};Q=function(){const t=[];if(this.description&&t.push(`
404
408
  <section class="print-section">
405
409
  <h2>${c(this,l,v).call(this,this.descriptionLabel)}</h2>
406
410
  <div>${c(this,l,v).call(this,this.description)}</div>
@@ -421,7 +425,7 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
421
425
  <div>${c(this,l,v).call(this,this.footnote)}</div>
422
426
  </section>
423
427
  `),this.officialStatistics&&e.push(`
424
- <div class="print-sos">${ct}</div>
428
+ <div class="print-sos">${ht}</div>
425
429
  `),t.push(`
426
430
  <section class="print-section print-more-about-stats">
427
431
  <h2>${c(this,l,v).call(this,this.moreAboutStatsLabel)}</h2>
@@ -459,8 +463,18 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
459
463
  .print-sos svg { height: 24px; width: auto; display: block; }
460
464
  .scb-viz-print-table { border-collapse: collapse; width: max-content; max-width: 100%; font-size: 1rem; line-height: 1.5; }
461
465
  .scb-viz-print-table th, .scb-viz-print-table td { border: 1px solid #c5c7d0; padding: 8px 12px; text-align: start; }
462
- .scb-viz-print-table thead th { font-weight: 700; }
463
- .scb-viz-print-table tbody th { font-weight: 400; }
466
+ .scb-viz-print-table thead th {
467
+ font-weight: 700;
468
+ white-space: normal;
469
+ overflow-wrap: anywhere;
470
+ word-break: break-word;
471
+ }
472
+ .scb-viz-print-table tbody th {
473
+ font-weight: 400;
474
+ white-space: normal;
475
+ overflow-wrap: anywhere;
476
+ word-break: break-word;
477
+ }
464
478
  .scb-viz-print-table tbody tr:nth-child(odd) { background: #f5f5f5; }
465
479
  .scb-viz-print-table tbody tr:nth-child(even) { background: #fff; }
466
480
  .scb-viz-print-table .align-right { text-align: right; white-space: nowrap; }
@@ -477,8 +491,8 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
477
491
  ${c(this,l,Q).call(this)}
478
492
  </article>
479
493
  </body>
480
- </html>`};et=async function(t){const e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.right="0",e.style.bottom="0",e.style.width="0",e.style.height="0",e.style.border="0",e.style.visibility="hidden",document.body.appendChild(e);const i=()=>{e.remove()},a=e.contentDocument,s=e.contentWindow;if(!a||!s){i();return}a.open(),a.write(t),a.close();const r=Array.from(a.images||[]);await Promise.all(r.map(o=>o.complete?Promise.resolve():new Promise(h=>{o.addEventListener("load",()=>h(null),{once:!0}),o.addEventListener("error",()=>h(null),{once:!0})})));const n=()=>{s.removeEventListener("afterprint",n),i()};s.addEventListener("afterprint",n,{once:!0}),setTimeout(()=>{s.focus(),s.print(),setTimeout(i,1e3)},50)};it=async function(){const t=this._getCurrentPrintableView();let e="";if(t==="table"){const i=this._getResolvedTableData();if(!i?.rows?.length)return;e=c(this,l,Z).call(this,i)}else if(t==="image"){const i=this.shadowRoot?.querySelector(".image-content img"),a=i?.currentSrc||i?.src||this.imageHref;if(!a)return;e=`<img class="viz-image" src="${c(this,l,v).call(this,a)}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}else{const i=this._getExportableVisualElement();if(!i)return;const a=await c(this,l,nt).call(this,i,"png");if(!a)return;e=`<img class="viz-chart-image" src="${a}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}await c(this,l,et).call(this,c(this,l,tt).call(this,e))};st=function(){const t=this._getResolvedTableData();if(!t?.rows?.length)return;const e=this.lang==="en"?",":";",i=[];t.headers?.length&&i.push(t.headers.map(n=>this._normalizeRenderableCell(n).text)),t.rows.forEach(n=>{i.push(n.map(o=>this._normalizeRenderableCell(o).text))});const a=n=>`"${String(n??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,s=`\uFEFF${i.map(n=>n.map(a).join(e)).join(`\r
481
- `)}`,r=new Blob([s],{type:"text/csv;charset=utf-8;"});c(this,l,B).call(this,r,this._buildExportFileName("csv"))};at=async function(t,e){const i=await c(this,l,O).call(this,t);return i?c(this,l,lt).call(this,i,e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};nt=async function(t,e){const i=await c(this,l,O).call(this,t);return i?i.toDataURL(e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};O=async function(t){if(t instanceof HTMLCanvasElement){const n=t.width||Math.round(t.getBoundingClientRect().width),o=t.height||Math.round(t.getBoundingClientRect().height);if(!n||!o)return null;const h=document.createElement("canvas");h.width=n,h.height=o;const d=h.getContext("2d");return d?(d.fillStyle=c(this,l,q).call(this),d.fillRect(0,0,n,o),d.drawImage(t,0,0,n,o),h):null}if(t instanceof HTMLImageElement){const n=t.naturalWidth||t.width,o=t.naturalHeight||t.height;return!n||!o?null:c(this,l,R).call(this,t.currentSrc||t.src,n,o)}const{width:e,height:i,serialized:a}=c(this,l,rt).call(this,t);if(!e||!i||!a)return null;const s=new Blob([a],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(s);try{return await c(this,l,R).call(this,r,e,i)}finally{URL.revokeObjectURL(r)}};rt=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),a=t.viewBox?.baseVal,s=Math.round(a?.width||i.width||Number(t.getAttribute("width"))||0),r=Math.round(a?.height||i.height||Number(t.getAttribute("height"))||0);return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")&&s&&e.setAttribute("width",String(s)),!e.getAttribute("height")&&r&&e.setAttribute("height",String(r)),!e.getAttribute("viewBox")&&s&&r&&e.setAttribute("viewBox",`0 0 ${s} ${r}`),c(this,l,T).call(this,t,e),e.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(n=>n.remove()),{width:s,height:r,serialized:new XMLSerializer().serializeToString(e)}};T=function(t,e){const i=getComputedStyle(t);let a="";for(let n=0;n<i.length;n+=1){const o=i[n],h=i.getPropertyValue(o);h&&(a+=`${o}:${h};`)}a&&e.setAttribute("style",a);const s=Array.from(t.children),r=Array.from(e.children);for(let n=0;n<s.length;n+=1){const o=s[n],h=r[n];o&&h&&c(this,l,T).call(this,o,h)}};R=async function(t,e,i){const a=Math.max(1,Math.min(2,window.devicePixelRatio||1)),s=Math.max(1,Math.round(e)),r=Math.max(1,Math.round(i)),n=document.createElement("canvas");n.width=Math.max(1,Math.round(s*a)),n.height=Math.max(1,Math.round(r*a));const o=n.getContext("2d");if(!o)return null;const h=await c(this,l,ot).call(this,t);return h?(o.scale(a,a),o.fillStyle=c(this,l,q).call(this),o.fillRect(0,0,s,r),o.drawImage(h,0,0,s,r),n):null};ot=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};lt=function(t,e,i){return new Promise(a=>{t.toBlob(s=>a(s),e,i)})};q=function(){const t=this.shadowRoot?.querySelector(".viz-container"),e=getComputedStyle(t??this).backgroundColor;return e&&e!=="rgba(0, 0, 0, 0)"?e:"#ffffff"};B=function(t,e){const i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};H=function(){const t=c(this,l,x).call(this,this.spacing),e=c(this,l,x).call(this,this.spacingTop)??t,i=c(this,l,x).call(this,this.spacingBottom)??t,a=c(this,l,x).call(this,this.spacingLeft),s=c(this,l,x).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),i?this.style.setProperty("--scb-viz-spacing-block-end",i):this.style.removeProperty("--scb-viz-spacing-block-end"),a?this.style.setProperty("--scb-viz-spacing-inline-start",a):this.style.removeProperty("--scb-viz-spacing-inline-start"),s?this.style.setProperty("--scb-viz-spacing-inline-end",s):this.style.removeProperty("--scb-viz-spacing-inline-end")};x=function(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e};V=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};g.styles=ht`
494
+ </html>`};et=async function(t){const e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.right="0",e.style.bottom="0",e.style.width="0",e.style.height="0",e.style.border="0",e.style.visibility="hidden",document.body.appendChild(e);const i=()=>{e.remove()},a=e.contentDocument,s=e.contentWindow;if(!a||!s){i();return}a.open(),a.write(t),a.close();const r=Array.from(a.images||[]);await Promise.all(r.map(o=>o.complete?Promise.resolve():new Promise(h=>{o.addEventListener("load",()=>h(null),{once:!0}),o.addEventListener("error",()=>h(null),{once:!0})})));const n=()=>{s.removeEventListener("afterprint",n),i()};s.addEventListener("afterprint",n,{once:!0}),setTimeout(()=>{s.focus(),s.print(),setTimeout(i,1e3)},50)};it=async function(t){this.setAttribute("data-scb-viz-force-light",""),await new Promise(e=>requestAnimationFrame(()=>e(null)));try{return await t()}finally{this.removeAttribute("data-scb-viz-force-light")}};st=async function(){await c(this,l,it).call(this,async()=>{const t=this._getCurrentPrintableView();let e="";if(t==="table"){const i=this._getResolvedTableData();if(!i?.rows?.length)return;e=c(this,l,Z).call(this,i)}else if(t==="image"){const i=this.shadowRoot?.querySelector(".image-content img"),a=i?.currentSrc||i?.src||this.imageHref;if(!a)return;e=`<img class="viz-image" src="${c(this,l,v).call(this,a)}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}else{const i=this._getExportableVisualElement();if(!i)return;const a=await c(this,l,rt).call(this,i,"png");if(!a)return;e=`<img class="viz-chart-image" src="${a}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}await c(this,l,et).call(this,c(this,l,tt).call(this,e))})};at=function(){const t=this._getResolvedTableData();if(!t?.rows?.length)return;const e=this.lang==="en"?",":";",i=[];t.headers?.length&&i.push(t.headers.map(n=>this._normalizeRenderableCell(n).text)),t.rows.forEach(n=>{i.push(n.map(o=>this._normalizeRenderableCell(o).text))});const a=n=>`"${String(n??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,s=`\uFEFF${i.map(n=>n.map(a).join(e)).join(`\r
495
+ `)}`,r=new Blob([s],{type:"text/csv;charset=utf-8;"});c(this,l,B).call(this,r,this._buildExportFileName("csv"))};nt=async function(t,e){const i=await c(this,l,q).call(this,t);return i?c(this,l,ct).call(this,i,e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};rt=async function(t,e){const i=await c(this,l,q).call(this,t);return i?i.toDataURL(e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};q=async function(t){if(t instanceof HTMLCanvasElement){const n=t.width||Math.round(t.getBoundingClientRect().width),o=t.height||Math.round(t.getBoundingClientRect().height);if(!n||!o)return null;const h=document.createElement("canvas");h.width=n,h.height=o;const d=h.getContext("2d");return d?(d.fillStyle=c(this,l,O).call(this),d.fillRect(0,0,n,o),d.drawImage(t,0,0,n,o),h):null}if(t instanceof HTMLImageElement){const n=t.naturalWidth||t.width,o=t.naturalHeight||t.height;return!n||!o?null:c(this,l,R).call(this,t.currentSrc||t.src,n,o)}const{width:e,height:i,serialized:a}=c(this,l,ot).call(this,t);if(!e||!i||!a)return null;const s=new Blob([a],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(s);try{return await c(this,l,R).call(this,r,e,i)}finally{URL.revokeObjectURL(r)}};ot=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),a=t.viewBox?.baseVal,s=Math.round(a?.width||i.width||Number(t.getAttribute("width"))||0),r=Math.round(a?.height||i.height||Number(t.getAttribute("height"))||0);return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")&&s&&e.setAttribute("width",String(s)),!e.getAttribute("height")&&r&&e.setAttribute("height",String(r)),!e.getAttribute("viewBox")&&s&&r&&e.setAttribute("viewBox",`0 0 ${s} ${r}`),c(this,l,T).call(this,t,e),e.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(n=>n.remove()),{width:s,height:r,serialized:new XMLSerializer().serializeToString(e)}};T=function(t,e){const i=getComputedStyle(t);let a="";for(let n=0;n<i.length;n+=1){const o=i[n],h=i.getPropertyValue(o);h&&(a+=`${o}:${h};`)}a&&e.setAttribute("style",a);const s=Array.from(t.children),r=Array.from(e.children);for(let n=0;n<s.length;n+=1){const o=s[n],h=r[n];o&&h&&c(this,l,T).call(this,o,h)}};R=async function(t,e,i){const a=Math.max(1,Math.min(2,window.devicePixelRatio||1)),s=Math.max(1,Math.round(e)),r=Math.max(1,Math.round(i)),n=document.createElement("canvas");n.width=Math.max(1,Math.round(s*a)),n.height=Math.max(1,Math.round(r*a));const o=n.getContext("2d");if(!o)return null;const h=await c(this,l,lt).call(this,t);return h?(o.scale(a,a),o.fillStyle=c(this,l,O).call(this),o.fillRect(0,0,s,r),o.drawImage(h,0,0,s,r),n):null};lt=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};ct=function(t,e,i){return new Promise(a=>{t.toBlob(s=>a(s),e,i)})};O=function(){const t=this.shadowRoot?.querySelector(".viz-container"),e=getComputedStyle(t??this).backgroundColor;return e&&e!=="rgba(0, 0, 0, 0)"?e:"#ffffff"};B=function(t,e){const i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};H=function(){const t=c(this,l,x).call(this,this.spacing),e=c(this,l,x).call(this,this.spacingTop)??t,i=c(this,l,x).call(this,this.spacingBottom)??t,a=c(this,l,x).call(this,this.spacingLeft),s=c(this,l,x).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),i?this.style.setProperty("--scb-viz-spacing-block-end",i):this.style.removeProperty("--scb-viz-spacing-block-end"),a?this.style.setProperty("--scb-viz-spacing-inline-start",a):this.style.removeProperty("--scb-viz-spacing-inline-start"),s?this.style.setProperty("--scb-viz-spacing-inline-end",s):this.style.removeProperty("--scb-viz-spacing-inline-end")};x=function(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e};V=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};g.styles=dt`
482
496
  :host {
483
497
  display: block;
484
498
  box-sizing: border-box;
@@ -848,7 +862,7 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
848
862
  .diagram-content {
849
863
  width: 100%;
850
864
  max-width: var(--scb-viz-content-max-width, none);
851
- min-width: var(--scb-viz-content-max-width, 720px);
865
+ min-width: var(--scb-viz-content-max-width, 0);
852
866
  min-height: var(--scb-viz-diagram-min-height, 600px);
853
867
  height: var(--scb-viz-diagram-height, auto);
854
868
  overflow: var(--scb-viz-diagram-overflow, visible);
@@ -970,10 +984,16 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
970
984
 
971
985
  .scb-viz-table thead th {
972
986
  font-weight: var(--weight-bold, 700);
987
+ white-space: normal;
988
+ overflow-wrap: anywhere;
989
+ word-break: break-word;
973
990
  }
974
991
 
975
992
  .scb-viz-table tbody th {
976
993
  font-weight: var(--weight-regular, 400);
994
+ white-space: normal;
995
+ overflow-wrap: anywhere;
996
+ word-break: break-word;
977
997
  }
978
998
 
979
999
  .scb-viz-table tbody tr:nth-child(odd) {
@@ -993,6 +1013,21 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
993
1013
  white-space: nowrap;
994
1014
  }
995
1015
 
1016
+ :host([data-scb-viz-force-light]),
1017
+ :host([data-scb-viz-print-preview]) {
1018
+ color-scheme: light;
1019
+ --_scb-viz-text-color: #1f1f1f;
1020
+ --scb-viz-surface-color: #fff;
1021
+ --scb-viz-outline-color: #c5c7d0;
1022
+ --md-sys-color-surface: #fff;
1023
+ --md-sys-color-surface-container: #f5f5f5;
1024
+ --md-sys-color-surface-container-highest: #e7e8ec;
1025
+ --md-sys-color-on-surface: #1f1f1f;
1026
+ --md-sys-color-on-surface-variant: rgba(0, 0, 0, 0.72);
1027
+ --md-sys-color-outline-variant: #c5c7d0;
1028
+ --md-focus-ring-color: #1f1f1f;
1029
+ }
1030
+
996
1031
  :host([data-scb-viz-print-preview]) {
997
1032
  background: transparent;
998
1033
  border: 0;
@@ -1053,6 +1088,17 @@ import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../ve
1053
1088
 
1054
1089
  @media print {
1055
1090
  :host {
1091
+ color-scheme: light;
1092
+ --_scb-viz-text-color: #1f1f1f;
1093
+ --scb-viz-surface-color: #fff;
1094
+ --scb-viz-outline-color: #c5c7d0;
1095
+ --md-sys-color-surface: #fff;
1096
+ --md-sys-color-surface-container: #f5f5f5;
1097
+ --md-sys-color-surface-container-highest: #e7e8ec;
1098
+ --md-sys-color-on-surface: #1f1f1f;
1099
+ --md-sys-color-on-surface-variant: rgba(0, 0, 0, 0.72);
1100
+ --md-sys-color-outline-variant: #c5c7d0;
1101
+ --md-focus-ring-color: #1f1f1f;
1056
1102
  background: transparent;
1057
1103
  border: 0;
1058
1104
  border-radius: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.327",
3
+ "version": "0.1.328",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -394,5 +394,5 @@
394
394
  },
395
395
  "./mvc/*": "./mvc/*"
396
396
  },
397
- "buildHash": "F0133041C4DC6693586D17F7EA72F18AEA80826F854A5A7EE043EB4662DF9672"
397
+ "buildHash": "C726C9859BD31009F76F3D89C5909248229B08C66FBBA16946229ED013F9BEB4"
398
398
  }