scb-wc-test 0.1.284 → 0.1.286

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 Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}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"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.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,n,s){try{customElements.get(i)||e(i,n,s)}catch(l){var c=String(l||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var at=Object.defineProperty,nt=Object.getOwnPropertyDescriptor,q=t=>{throw TypeError(t)},g=(t,e,i,n)=>{for(var s=n>1?void 0:n?nt(e,i):e,c=t.length-1,l;c>=0;c--)(l=t[c])&&(s=(n?l(e,i,s):l(s))||s);return n&&s&&at(e,i,s),s},rt=(t,e,i)=>e.has(t)||q("Cannot "+i),ot=(t,e,i)=>e.has(t)?q("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),r=(t,e,i)=>(rt(t,e,"access private method"),i),a,$,H,P,z,L,N,W,k,I,R,S,A,j,G,U,E,J,V,K,F,O,X,Y,Q,D,y,T;const lt=`<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 at,n as m,r as T,i as nt,x as p,k as W,l as rt,t as ot}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"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.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,s,n){try{customElements.get(i)||e(i,s,n)}catch(a){var h=String(a||"");if(h.indexOf("already been used")===-1&&h.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var lt=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,B=t=>{throw TypeError(t)},u=(t,e,i,s)=>{for(var n=s>1?void 0:s?ct(e,i):e,h=t.length-1,a;h>=0;h--)(a=t[h])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&lt(e,i,n),n},ht=(t,e,i)=>e.has(t)||B("Cannot "+i),dt=(t,e,i)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),o=(t,e,i)=>(ht(t,e,"access private method"),i),r,$,V,H,S,D,P,j,M,q,G,C,k,f,N,U,J,K,X,Q,Y,Z,F,tt,A,L,et,it,O,I,E,x,R;const st=`<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,13 +113,13 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}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 d=class extends et{constructor(){super(...arguments),ot(this,a),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._tableSlotSyncFrame=0,this._actionsMenuOpen=!1,this._diagramReflowFrame=0,this._printCleanup=null,this._printInstanceId="",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=()=>{this._closeActionsMenu(),r(this,a,Q).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await r(this,a,A).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await r(this,a,A).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),r(this,a,j).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"}_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(),r(this,a,O).call(this),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown)}firstUpdated(t){r(this,a,k).call(this),r(this,a,D).call(this),r(this,a,T).call(this),r(this,a,S).call(this),this._syncChipClass(),r(this,a,$).call(this),r(this,a,z).call(this)}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&this._syncChipClass(),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&r(this,a,D).call(this),t.has("containerMaxWidth")&&r(this,a,T).call(this),t.has("variant")&&r(this,a,$).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&r(this,a,S).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&r(this,a,z).call(this)}disconnectedCallback(){this._printCleanup?.(),this._printCleanup=null,super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),r(this,a,H).call(this),r(this,a,P).call(this),r(this,a,I).call(this)}_onTableSlotChange(t){const e=t.target;e&&r(this,a,k).call(this,e)}_onDiagramSlotChange(){r(this,a,S).call(this),r(this,a,z).call(this)}_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!1;const i=e.assignedElements({flatten:!0}),n=[];i.forEach(v=>{if(v.tagName==="TABLE"){n.push(v);return}v.querySelectorAll("table").forEach(u=>n.push(u))});const s=n[0];if(!s)return r(this,a,R).call(this,void 0);const c=[],l=[],o=[],p=v=>v?(v.textContent??"").replace(/\s+/g," ").trim():"",m=v=>v?{html:(v.innerHTML??"").trim(),text:p(v)}:{html:"",text:""},f=s.querySelector("thead tr");f&&Array.from(f.querySelectorAll("th, td")).forEach(u=>c.push(m(u)));const _=Array.from(s.querySelectorAll("tbody tr")),w=_.length>0?_:Array.from(s.querySelectorAll("tr")).filter(v=>v.closest("thead")===null);if(w.forEach(v=>{const u=Array.from(v.querySelectorAll("th, td"));if(u.length===0)return;const x=u[0].tagName==="TH"&&v.closest("thead")===null&&v.closest("tfoot")===null;o.push(x);const C=[];u.forEach(M=>C.push(m(M))),l.push(C)}),!f&&l.length>0){const v=l[0],u=w[0],x=Array.from(u?.querySelectorAll("th, td")??[]);x.length>0&&x.every(M=>M.tagName==="TH")&&u?.closest("tbody")===null&&(c.splice(0,c.length,...v),l.shift(),o.shift())}return r(this,a,R).call(this,{headers:c.length>0?c:void 0,rows:l,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 c=String(s).replace(/[\u00A0\u202F\s]+/g,"").trim();return c?/^-?\d+(?:[.,]\d+)?$/.test(c):!1},n=[];for(let s=0;s<e;s+=1){if(s===0){n.push("left");continue}const c=t.rows.map(o=>this._normalizeRenderableCell(o[s]).text).filter(o=>o!==""&&o!==null&&o!==void 0),l=c.length>0&&c.every(i);n.push(l?"right":"left")}return n}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"420px"}_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())}_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}`}_renderActions(){const t=this._canExportRaster(),e=this._canExportCsv(),i=this.variant==="Standard"||this.variant==="Image",n=this.variant==="Standard"||this.variant==="Table";return h`
116
+ `;let g=class extends nt{constructor(){super(...arguments),dt(this,r),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="auto",this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=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 o(this,r,X).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await o(this,r,k).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await o(this,r,k).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),o(this,r,Q).call(this))},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),o(this,r,C).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){o(this,r,E).call(this),o(this,r,R).call(this),o(this,r,M).call(this),this._syncChipClass(),o(this,r,$).call(this),o(this,r,S).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"))&&o(this,r,E).call(this),t.has("containerMaxWidth")&&o(this,r,R).call(this),t.has("variant")&&o(this,r,$).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&o(this,r,M).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&o(this,r,S).call(this),(t.has("selectedChip")||t.has("variant"))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{o(this,r,C).call(this)})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),o(this,r,V).call(this),o(this,r,H).call(this)}_onTableSlotChange(t){const e=t.target;e&&this._readTableDataFromSlot(e)}_onDiagramSlotChange(){o(this,r,M).call(this),o(this,r,S).call(this),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{o(this,r,C).call(this)})}_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)}}_findFirstTable(t){const e=[];return t.forEach(i=>{if(i.tagName==="TABLE"){e.push(i);return}i.querySelectorAll("table").forEach(s=>e.push(s))}),e[0]??null}_extractTableData(t){if(!t)return;const e=[],i=[],s=[],n=d=>d?(d.textContent??"").replace(/\s+/g," ").trim():"",h=d=>d?{html:(d.innerHTML??"").trim(),text:n(d)}:{html:"",text:""},a=t.querySelector("thead tr");a&&Array.from(a.querySelectorAll("th, td")).forEach(b=>e.push(h(b)));const l=Array.from(t.querySelectorAll("tbody tr")),c=l.length>0?l:Array.from(t.querySelectorAll("tr")).filter(d=>d.closest("thead")===null);if(c.forEach(d=>{const b=Array.from(d.querySelectorAll("th, td"));if(b.length===0)return;const _=b[0].tagName==="TH"&&d.closest("thead")===null&&d.closest("tfoot")===null;s.push(_);const y=[];b.forEach(w=>y.push(h(w))),i.push(y)}),!a&&i.length>0){const d=i[0],b=c[0],_=Array.from(b?.querySelectorAll("th, td")??[]);_.length>0&&_.every(w=>w.tagName==="TH")&&b?.closest("tbody")===null&&(e.splice(0,e.length,...d),i.shift(),s.shift())}return{headers:e.length>0?e:void 0,rows:i,rowHeaderRows:s.length>0?s:void 0}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');e&&(this._slottedTableData=this._extractTableData(this._findFirstTable(e.assignedElements({flatten:!0}))))}_readTableDataFromLightDom(){return this._extractTableData(this._findFirstTable(Array.from(this.querySelectorAll('[slot="table"]'))))}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(n=>n.length)),i=n=>{if(n==null)return!1;if(typeof n=="number")return!0;const h=String(n).replace(/[\u00A0\u202F\s]+/g,"").trim();return h?/^-?\d+(?:[.,]\d+)?$/.test(h):!1},s=[];for(let n=0;n<e;n+=1){if(n===0){s.push("left");continue}const h=t.rows.map(l=>this._normalizeRenderableCell(l[n]).text).filter(l=>l!==""&&l!==null&&l!==void 0),a=h.length>0&&h.every(i);s.push(a?"right":"left")}return s}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"420px"}_getResolvedTableData(){return this.tableData??this._slottedTableData??this._readTableDataFromLightDom()}_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())}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!=="diagram")return;const t=o(this,r,P).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":null}_shouldShowSeriesDifferentiationAction(){if(this._getCurrentPrintableView()!=="diagram")return!1;const t=this._getCurrentHighchartsChart();return t?.series?.length?t.series.some(e=>this._getSeriesDifferentiationGroup(e,t)!==null):!1}_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{color:t?.options?.color??t?.userOptions?.color??t?.color,borderColor:t?.options?.borderColor??t?.borderColor,borderWidth:t?.options?.borderWidth??t?.borderWidth,fillColor:t?.options?.fillColor??t?.fillColor,dashStyle:t?.options?.dashStyle??"Solid",lineWidth:t?.options?.lineWidth??t?.lineWidth,marker:e&&Object.keys(e).length>0?e:{enabled:!1}}}_resolveSeriesBaseColor(t,e,i,s){const n=[s?.color,e?.userOptions?.color,e?.color,t?.options?.colors?.[i]];for(const h of n)if(typeof h=="string"&&h&&!h.startsWith("url("))return h;return"#0F0865"}_ensureSeriesPattern(t,e,i,s){const n=t?.container?.querySelector("svg");if(!(n instanceof SVGSVGElement))return i;const h="http://www.w3.org/2000/svg";let a=n.querySelector("defs");a instanceof SVGDefsElement||(a=document.createElementNS(h,"defs"),n.insertBefore(a,n.firstChild));const l=`scb-viz-pattern-${t?.index??"chart"}-${e}-${s}`;let c=a.querySelector(`[id="${l}"]`);if(!(c instanceof SVGPatternElement)){c=document.createElementNS(h,"pattern"),c.setAttribute("id",l),c.setAttribute("patternUnits","userSpaceOnUse"),c.setAttribute("width","10"),c.setAttribute("height","10");const d=document.createElementNS(h,"rect");d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","10"),d.setAttribute("height","10"),d.setAttribute("fill",i),d.setAttribute("fill-opacity","0.14"),c.appendChild(d);const b=(y,w="1.25")=>{const v=document.createElementNS(h,"path");return v.setAttribute("d",y),v.setAttribute("fill","none"),v.setAttribute("stroke",i),v.setAttribute("stroke-width",w),v.setAttribute("stroke-opacity","0.78"),v.setAttribute("stroke-linecap","square"),v},_=(y,w,v)=>{const z=document.createElementNS(h,"circle");return z.setAttribute("cx",y),z.setAttribute("cy",w),z.setAttribute("r",v),z.setAttribute("fill",i),z.setAttribute("fill-opacity","0.78"),z};switch(s){case"diagonal":c.appendChild(b("M-2,8 l10,-10 M0,10 l10,-10 M8,12 l4,-4"));break;case"dots":c.appendChild(_("2","2","1.2")),c.appendChild(_("7","7","1.2"));break;case"cross":c.appendChild(b("M0,0 L10,10 M10,0 L0,10"));break;case"vertical":c.appendChild(b("M2,0 L2,10 M7,0 L7,10"));break;case"horizontal":c.appendChild(b("M0,2 L10,2 M0,7 L10,7"));break;default:c.appendChild(b("M0,0 L10,0 M0,5 L10,5 M0,10 L10,10","1"));break}a.appendChild(c)}return`url(#${l})`}_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}`}_renderActions(){const t=this._getCurrentPrintableView(),e=this._canExportRaster(),i=this._canExportCsv(),s=e&&(t==="diagram"||t==="image"),n=i&&t==="table",h=this._shouldShowSeriesDifferentiationAction();return p`
117
117
  <div class="actions-row">
118
- ${this.variant==="Standard"&&!this.disableToggle?h`
118
+ ${this.variant==="Standard"&&!this.disableToggle?p`
119
119
  <div class="flipp-wrapper">
120
120
  <scb-segmented-button
121
121
  .value=${this.selectedChip||""}
122
- @change=${s=>this._onSegmentedChange(s)}
122
+ @change=${a=>this._onSegmentedChange(a)}
123
123
  >
124
124
  <scb-segmented-item
125
125
  label=${this.lang==="en"?"Figure":"Diagram"}
@@ -133,7 +133,7 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
133
133
  ></scb-segmented-item>
134
134
  </scb-segmented-button>
135
135
  </div>
136
- `:h`<div></div>`}
136
+ `:p`<div></div>`}
137
137
  <div class="actions-menu">
138
138
  <scb-icon-button
139
139
  icon="more_vert"
@@ -145,7 +145,7 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
145
145
  aria-label=${this.actionsMenuLabel}
146
146
  aria-haspopup="menu"
147
147
  aria-expanded=${this._actionsMenuOpen?"true":"false"}
148
- @click=${s=>this._toggleActionsMenu(s)}
148
+ @click=${a=>this._toggleActionsMenu(a)}
149
149
  ></scb-icon-button>
150
150
  <div
151
151
  class=${`actions-menu-panel ${this._actionsMenuOpen?"actions-menu-panel--open":""}`}
@@ -164,13 +164,12 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
164
164
  <span class="actions-menu-item-label">${this.printLabel}</span>
165
165
  </button>
166
166
  </li>
167
- ${i?h`
167
+ ${s?p`
168
168
  <li>
169
169
  <button
170
170
  type="button"
171
171
  class="actions-menu-item"
172
172
  role="menuitem"
173
- ?disabled=${!t}
174
173
  @click=${this._onDownloadPngClick}
175
174
  >
176
175
  <span class="actions-menu-item-icon" aria-hidden="true">image</span>
@@ -182,7 +181,6 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
182
181
  type="button"
183
182
  class="actions-menu-item"
184
183
  role="menuitem"
185
- ?disabled=${!t}
186
184
  @click=${this._onDownloadJpgClick}
187
185
  >
188
186
  <span class="actions-menu-item-icon" aria-hidden="true">image</span>
@@ -190,13 +188,12 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
190
188
  </button>
191
189
  </li>
192
190
  `:""}
193
- ${n?h`
191
+ ${n?p`
194
192
  <li>
195
193
  <button
196
194
  type="button"
197
195
  class="actions-menu-item"
198
196
  role="menuitem"
199
- ?disabled=${!e}
200
197
  @click=${this._onDownloadCsvClick}
201
198
  >
202
199
  <span class="actions-menu-item-icon" aria-hidden="true">table_view</span>
@@ -204,49 +201,65 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
204
201
  </button>
205
202
  </li>
206
203
  `:""}
204
+ ${h?p`
205
+ <li>
206
+ <button
207
+ type="button"
208
+ class="actions-menu-item"
209
+ role="menuitemcheckbox"
210
+ aria-checked=${this._seriesDifferentiationEnabled?"true":"false"}
211
+ @click=${this._onToggleSeriesDifferentiationClick}
212
+ >
213
+ <span class="actions-menu-item-icon" aria-hidden="true">texture</span>
214
+ <span class="actions-menu-item-label"
215
+ >${this._seriesDifferentiationEnabled?this.disableSeriesDifferentiationLabel:this.enableSeriesDifferentiationLabel}</span
216
+ >
217
+ </button>
218
+ </li>
219
+ `:""}
207
220
  </ul>
208
221
  </div>
209
222
  </div>
210
223
  </div>
211
- `}_renderTable(){const t=this.tableData??this._slottedTableData;if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(o=>o.length)),n=(t.headers??[]).map(o=>this._normalizeRenderableCell(o)),s=t.rows.map(o=>{const p=o.map(m=>this._normalizeRenderableCell(m));for(;p.length<i;)p.push({html:"",text:""});return p}),c=t.rowHeaderRows??[],l=[this.title,this.subtitle].map(o=>typeof o=="string"?o.trim():"").filter(Boolean).join(". ");return h`
224
+ `}_renderTable(){const t=this._getResolvedTableData();if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(l=>l.length)),s=(t.headers??[]).map(l=>this._normalizeRenderableCell(l)),n=t.rows.map(l=>{const c=l.map(d=>this._normalizeRenderableCell(d));for(;c.length<i;)c.push({html:"",text:""});return c}),h=t.rowHeaderRows??[],a=[this.title,this.subtitle].map(l=>typeof l=="string"?l.trim():"").filter(Boolean).join(". ");return p`
212
225
  <table class="scb-viz-table" part="table">
213
- ${l?h`<caption class="visually-hidden">${l}</caption>`:""}
214
- ${n.length>0?h`
226
+ ${a?p`<caption class="visually-hidden">${a}</caption>`:""}
227
+ ${s.length>0?p`
215
228
  <thead>
216
229
  <tr>
217
- ${n.map((o,p)=>{const m=e[p]==="right"?"align-right":"align-left";return h`<th scope="col" class=${m}>${o.html?B(o.html):o.text}</th>`})}
230
+ ${s.map((l,c)=>{const d=e[c]==="right"?"align-right":"align-left";return p`<th scope="col" class=${d}>${l.html?W(l.html):l.text}</th>`})}
218
231
  </tr>
219
232
  </thead>
220
233
  `:""}
221
234
  <tbody>
222
- ${s.map((o,p)=>{const m=c[p]===!0;return h`
235
+ ${n.map((l,c)=>{const d=h[c]===!0;return p`
223
236
  <tr>
224
- ${o.map((f,_)=>{const w=e[_]==="right"?"align-right":"align-left",v=f.html?B(f.html):f.text;return _===0&&m?h`<th scope="row" class=${w}>${v}</th>`:h`<td class=${w}>${v}</td>`})}
237
+ ${l.map((b,_)=>{const y=e[_]==="right"?"align-right":"align-left",w=b.html?W(b.html):b.text;return _===0&&d?p`<th scope="row" class=${y}>${w}</th>`:p`<td class=${y}>${w}</td>`})}
225
238
  </tr>
226
239
  `})}
227
240
  </tbody>
228
241
  </table>
229
- `}_hasMoreAboutStats(){return!!(this.comment||this.source||this.footnote||this.officialStatistics)}_renderMoreAboutStatsContent(){return h`
242
+ `}_hasMoreAboutStats(){return!!(this.comment||this.source||this.footnote||this.officialStatistics)}_renderMoreAboutStatsContent(){return p`
230
243
  <div class="more-about-stats-content">
231
- ${this.comment?h`
244
+ ${this.comment?p`
232
245
  <div class="section">
233
246
  <div class="secondary-label" role="heading" aria-level="3">${this.commentLabel}</div>
234
247
  <div class="body-text">${this.comment}</div>
235
248
  </div>
236
249
  `:""}
237
- ${this.source?h`
250
+ ${this.source?p`
238
251
  <div class="section">
239
252
  <div class="secondary-label" role="heading" aria-level="3">${this.sourceLabel}</div>
240
253
  <div class="body-text">${this.source}</div>
241
254
  </div>
242
255
  `:""}
243
- ${this.footnote?h`
256
+ ${this.footnote?p`
244
257
  <div class="section">
245
258
  <div class="secondary-label" role="heading" aria-level="3">${this.footnoteLabel}</div>
246
259
  <div class="body-text">${this.footnote}</div>
247
260
  </div>
248
261
  `:""}
249
- ${this.officialStatistics?h`
262
+ ${this.officialStatistics?p`
250
263
  <a
251
264
  class="sos-logotype-link"
252
265
  href="https://www.scb.se/sos"
@@ -256,12 +269,12 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
256
269
  aria-label="${this.officialStatisticsAlt}"
257
270
  >
258
271
  <span class="sos-logotype-small" aria-hidden="true">
259
- ${it(lt)}
272
+ ${rt(st)}
260
273
  </span>
261
274
  </a>
262
275
  `:""}
263
276
  </div>
264
- `}_renderMoreAboutStatsScreen(){return this._hasMoreAboutStats()?h`
277
+ `}_renderMoreAboutStatsScreen(){return this._hasMoreAboutStats()?p`
265
278
  <div class="footer-statistics-screen">
266
279
  <scb-divider></scb-divider>
267
280
  <scb-accordion>
@@ -270,16 +283,16 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
270
283
  </scb-accordion-item>
271
284
  </scb-accordion>
272
285
  </div>
273
- `:""}_renderMoreAboutStatsPrint(){return this._hasMoreAboutStats()?h`
286
+ `:""}_renderMoreAboutStatsPrint(){return this._hasMoreAboutStats()?p`
274
287
  <div class="footer-statistics-print print-more-about-stats">
275
288
  <div class="secondary-label print-more-about-stats-heading" role="heading" aria-level="3">
276
289
  ${this.moreAboutStatsLabel}
277
290
  </div>
278
291
  ${this._renderMoreAboutStatsContent()}
279
292
  </div>
280
- `:""}_renderFooter(){return h`
293
+ `:""}_renderFooter(){return p`
281
294
  <div class="footer">
282
- ${this.description?h`
295
+ ${this.description?p`
283
296
  <div class="description section">
284
297
  <div class="secondary-label" role="heading" aria-level="3">${this.descriptionLabel}</div>
285
298
  <div class="body-text">${this.description}</div>
@@ -288,11 +301,11 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
288
301
  ${this._renderMoreAboutStatsScreen()}
289
302
  ${this._renderMoreAboutStatsPrint()}
290
303
  </div>
291
- `}render(){switch(this.variant){case"Table":return h`
304
+ `}render(){switch(this.variant){case"Table":return p`
292
305
  <div part="container" class="viz-container">
293
306
  <div class="header">
294
- ${this.title?h` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
295
- ${this.subtitle?h` <div class="sub-label">${this.subtitle}</div> `:""}
307
+ ${this.title?p` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
308
+ ${this.subtitle?p` <div class="sub-label">${this.subtitle}</div> `:""}
296
309
  </div>
297
310
  ${this._renderActions()}
298
311
  <div class="content">
@@ -313,11 +326,11 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
313
326
  ></slot>
314
327
  <slot></slot>
315
328
  </div>
316
- `;case"Image":return h`
329
+ `;case"Image":return p`
317
330
  <div part="container" class="viz-container">
318
331
  <div class="header">
319
- ${this.title?h` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
320
- ${this.subtitle?h` <div class="sub-label">${this.subtitle}</div> `:""}
332
+ ${this.title?p` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
333
+ ${this.subtitle?p` <div class="sub-label">${this.subtitle}</div> `:""}
321
334
  </div>
322
335
  ${this._renderActions()}
323
336
  <div
@@ -334,11 +347,11 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
334
347
  ></slot>
335
348
  <slot></slot>
336
349
  </div>
337
- `;default:return h`
350
+ `;default:return p`
338
351
  <div part="container" class="viz-container">
339
352
  <div class="header">
340
- ${this.title?h` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
341
- ${this.subtitle?h` <div class="sub-label">${this.subtitle}</div> `:""}
353
+ ${this.title?p` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
354
+ ${this.subtitle?p` <div class="sub-label">${this.subtitle}</div> `:""}
342
355
  </div>
343
356
  ${this._renderActions()}
344
357
  <div class="content">
@@ -386,8 +399,85 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
386
399
  ></slot>
387
400
  <slot></slot>
388
401
  </div>
389
- `}}_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()}};a=new WeakSet;$=function(){if(r(this,a,H).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{r(this,a,z).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};H=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};P=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};z=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(r(this,a,P).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,r(this,a,W).call(this)})}))};L=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};N=function(t){for(const e of t){const i=r(this,a,L).call(this,e);if(i!==void 0)return i;const n=e.querySelector("[data-highcharts-chart]"),s=r(this,a,L).call(this,n);if(s!==void 0)return s}};W=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=r(this,a,N).call(this,e);if(i===void 0)return;const s=window.Highcharts?.charts?.[i];s&&(s.setSize?.(null,null,!1),s.reflow?.())};k=function(t){r(this,a,I).call(this),this._tableSlotSyncFrame=requestAnimationFrame(()=>{this._tableSlotSyncFrame=0,this._readTableDataFromSlot(t)&&this.requestUpdate()})};I=function(){this._tableSlotSyncFrame&&(cancelAnimationFrame(this._tableSlotSyncFrame),this._tableSlotSyncFrame=0)};R=function(t){const e=this._slottedTableData,i=e?JSON.stringify(e):"",n=t?JSON.stringify(t):"";return i===n?!1:(this._slottedTableData=t,!0)};S=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||"420px"):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")};A=async function(t){const e=this._getExportableVisualElement();if(!e)return;const i=await r(this,a,G).call(this,e,t);i&&r(this,a,F).call(this,i,this._buildExportFileName(t==="jpeg"?"jpg":"png"))};j=function(){const t=this._getResolvedTableData();if(!t?.rows?.length)return;const e=this.lang==="en"?",":";",i=[];t.headers?.length&&i.push(t.headers.map(l=>this._normalizeRenderableCell(l).text)),t.rows.forEach(l=>{i.push(l.map(o=>this._normalizeRenderableCell(o).text))});const n=l=>`"${String(l??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,s=`\uFEFF${i.map(l=>l.map(n).join(e)).join(`\r
390
- `)}`,c=new Blob([s],{type:"text/csv;charset=utf-8;"});r(this,a,F).call(this,c,this._buildExportFileName("csv"))};G=async function(t,e){if(t instanceof HTMLCanvasElement)return r(this,a,V).call(this,t,e==="jpeg"?"image/jpeg":"image/png");if(t instanceof HTMLImageElement){const o=t.naturalWidth||t.width,p=t.naturalHeight||t.height;return!o||!p?null:r(this,a,E).call(this,t.src,o,p,e)}const{width:i,height:n,serialized:s}=r(this,a,U).call(this,t);if(!i||!n||!s)return null;const c=new Blob([s],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(c);try{return await r(this,a,E).call(this,l,i,n,e)}finally{URL.revokeObjectURL(l)}};U=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),n=t.viewBox?.baseVal,s=Math.round(n?.width||i.width||Number(t.getAttribute("width"))||0),c=Math.round(n?.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")&&c&&e.setAttribute("height",String(c)),!e.getAttribute("viewBox")&&s&&c&&e.setAttribute("viewBox",`0 0 ${s} ${c}`),{width:s,height:c,serialized:new XMLSerializer().serializeToString(e)}};E=async function(t,e,i,n){const s=Math.max(1,Math.min(2,window.devicePixelRatio||1)),c=Math.max(1,Math.round(e)),l=Math.max(1,Math.round(i)),o=document.createElement("canvas");o.width=Math.max(1,Math.round(c*s)),o.height=Math.max(1,Math.round(l*s));const p=o.getContext("2d");if(!p)return null;const m=await r(this,a,J).call(this,t);return m?(p.scale(s,s),p.fillStyle=r(this,a,K).call(this),p.fillRect(0,0,c,l),p.drawImage(m,0,0,c,l),r(this,a,V).call(this,o,n==="jpeg"?"image/jpeg":"image/png",n==="jpeg"?.92:void 0)):null};J=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};V=function(t,e,i){return new Promise(n=>{t.toBlob(s=>n(s),e,i)})};K=function(){const t=this.shadowRoot?.querySelector(".viz-container"),e=getComputedStyle(t??this).backgroundColor;return e&&e!=="rgba(0, 0, 0, 0)"?e:"#ffffff"};F=function(t,e){const i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=e,document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};O=function(){this._printInstanceId||(d._printInstanceCounter+=1,this._printInstanceId=`scb-viz-print-${d._printInstanceCounter}`),this.setAttribute("data-scb-viz-print-id",this._printInstanceId)};X=function(){this.style.setProperty("--scb-viz-print-scale","1");const t=this.shadowRoot?.querySelector(".viz-container");if(!t)return;const e=1040,i=t.scrollHeight;if(!i||i<=e){this.style.setProperty("--scb-viz-print-scale","1");return}const n=Math.max(.72,Math.min(1,e/i));this.style.setProperty("--scb-viz-print-scale",n.toFixed(3))};Y=function(){r(this,a,O).call(this);const t=[],e=document.documentElement.getAttribute("style"),i=document.body.getAttribute("style"),n=window.scrollX,s=window.scrollY,c=o=>{t.some(p=>p.element===o)||(t.push({element:o,style:o.getAttribute("style")}),o.style.setProperty("display","none","important"))};let l=this;for(;l.parentElement;){const o=l.parentElement;Array.from(o.children).forEach(p=>{p!==l&&p instanceof HTMLElement&&c(p)}),l=o}return document.documentElement.setAttribute("data-scb-viz-print-mode","single"),this.setAttribute("data-scb-viz-print-target",""),this.setAttribute("data-scb-viz-print-preview",""),document.documentElement.style.setProperty("background","#fff"),document.body.style.setProperty("background","#fff"),document.body.style.setProperty("margin","0"),this.offsetHeight,r(this,a,X).call(this),()=>{t.forEach(({element:o,style:p})=>{p===null?o.removeAttribute("style"):o.setAttribute("style",p)}),e===null?document.documentElement.removeAttribute("style"):document.documentElement.setAttribute("style",e),i===null?document.body.removeAttribute("style"):document.body.setAttribute("style",i),document.documentElement.removeAttribute("data-scb-viz-print-mode"),this.removeAttribute("data-scb-viz-print-target"),this.removeAttribute("data-scb-viz-print-preview"),this.style.removeProperty("--scb-viz-print-scale"),window.scrollTo(n,s)}};Q=function(){this._printCleanup?.();const t=r(this,a,Y).call(this);this._printCleanup=t;const e=()=>{window.removeEventListener("afterprint",e),this._printCleanup===t&&(t(),this._printCleanup=null)};window.addEventListener("afterprint",e,{once:!0}),window.print()};D=function(){const t=r(this,a,y).call(this,this.spacing),e=r(this,a,y).call(this,this.spacingTop)??t,i=r(this,a,y).call(this,this.spacingBottom)??t,n=r(this,a,y).call(this,this.spacingLeft),s=r(this,a,y).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"),n?this.style.setProperty("--scb-viz-spacing-inline-start",n):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")};y=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};T=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};d._printInstanceCounter=0;d.styles=Z`
402
+ `}}_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"}};r=new WeakSet;$=function(){if(o(this,r,V).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{o(this,r,S).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};V=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};H=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};S=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(o(this,r,H).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,o(this,r,j).call(this)})}))};D=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};P=function(t){for(const e of t){const i=o(this,r,D).call(this,e);if(i!==void 0)return i;const s=e.querySelector("[data-highcharts-chart]"),n=o(this,r,D).call(this,s);if(n!==void 0)return n}};j=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=o(this,r,P).call(this,e);if(i===void 0)return;const n=window.Highcharts?.charts?.[i];n&&(n.setSize?.(null,null,!1),n.reflow?.(),this._seriesDifferentiationEnabled&&o(this,r,C).call(this))};M=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||"420px"):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")};q=function(t){const e=this._getSeriesDifferentiationSnapshotStore(t),i=["Solid","ShortDash","ShortDot","ShortDashDot","ShortDashDotDot","Dot"],s=["circle","diamond","square","triangle","triangle-down"],n=["diagonal","dots","cross","vertical","horizontal","grid"];let h=!1;t.series?.forEach((a,l)=>{const c=this._getSeriesDifferentiationGroup(a,t);if(!c)return;const d=String(a?.index??l);e.has(d)||e.set(d,this._captureSeriesDifferentiationSnapshot(a));const b=e.get(d),_=this._resolveSeriesBaseColor(t,a,l,b),y=this._ensureSeriesPattern(t,l,_,n[l%n.length]),w={...this._cloneSeriesOptionValue(b?.marker),enabled:!0,symbol:s[l%s.length]},v={color:_};(c==="line"||c==="area")&&(v.dashStyle=i[l%i.length],v.marker=w),c==="area"&&(v.fillColor=y),c==="fill"&&(v.color=y,v.borderColor=_,v.borderWidth=b?.borderWidth??1),a.update(v,!1),h=!0}),h&&t.redraw(!1)};G=function(t){const e=this._seriesDifferentiationSnapshots.get(t);if(!e)return;let i=!1;t.series?.forEach((s,n)=>{if(!this._getSeriesDifferentiationGroup(s,t))return;const a=e.get(String(s?.index??n));if(!a)return;const l=this._resolveSeriesBaseColor(t,s,n,a);s.update({color:a.color??l,borderColor:a.borderColor??l,borderWidth:a.borderWidth,fillColor:a.fillColor,dashStyle:a.dashStyle??"Solid",lineWidth:a.lineWidth,marker:this._cloneSeriesOptionValue(a.marker)},!1),i=!0}),i&&t.redraw(!1)};C=function(){const t=this._getCurrentHighchartsChart();if(t){if(this._seriesDifferentiationEnabled){o(this,r,q).call(this,t);return}o(this,r,G).call(this,t)}};k=async function(t){const e=this._getExportableVisualElement();if(!e)return;const i=await o(this,r,Y).call(this,e,t);i&&o(this,r,I).call(this,i,this._buildExportFileName(t==="jpeg"?"jpg":"png"))};f=function(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};N=function(t){const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(c=>c.length)),s=(t.headers??[]).map(c=>this._normalizeRenderableCell(c)),n=t.rows.map(c=>{const d=c.map(b=>this._normalizeRenderableCell(b));for(;d.length<i;)d.push({html:"",text:""});return d}),h=t.rowHeaderRows??[],a=s.length?`<thead><tr>${s.map((c,d)=>`<th scope="col" class="${e[d]==="right"?"align-right":"align-left"}">${c.html||o(this,r,f).call(this,c.text)}</th>`).join("")}</tr></thead>`:"",l=`<tbody>${n.map((c,d)=>{const b=h[d]===!0;return`<tr>${c.map((y,w)=>{const v=e[w]==="right"?"align-right":"align-left",z=y.html||o(this,r,f).call(this,y.text);return w===0&&b?`<th scope="row" class="${v}">${z}</th>`:`<td class="${v}">${z}</td>`}).join("")}</tr>`}).join("")}</tbody>`;return`<table class="scb-viz-print-table">${a}${l}</table>`};U=function(){const t=[];if(this.description&&t.push(`
403
+ <section class="print-section">
404
+ <h2>${o(this,r,f).call(this,this.descriptionLabel)}</h2>
405
+ <div>${o(this,r,f).call(this,this.description)}</div>
406
+ </section>
407
+ `),this._hasMoreAboutStats()){const e=[];this.comment&&e.push(`
408
+ <section class="print-section print-meta-section">
409
+ <h3>${o(this,r,f).call(this,this.commentLabel)}</h3>
410
+ <div>${o(this,r,f).call(this,this.comment)}</div>
411
+ </section>
412
+ `),this.source&&e.push(`
413
+ <section class="print-section print-meta-section">
414
+ <h3>${o(this,r,f).call(this,this.sourceLabel)}</h3>
415
+ <div>${o(this,r,f).call(this,this.source)}</div>
416
+ </section>
417
+ `),this.footnote&&e.push(`
418
+ <section class="print-section print-meta-section">
419
+ <h3>${o(this,r,f).call(this,this.footnoteLabel)}</h3>
420
+ <div>${o(this,r,f).call(this,this.footnote)}</div>
421
+ </section>
422
+ `),this.officialStatistics&&e.push(`
423
+ <div class="print-sos">${st}</div>
424
+ `),t.push(`
425
+ <section class="print-section print-more-about-stats">
426
+ <h2>${o(this,r,f).call(this,this.moreAboutStatsLabel)}</h2>
427
+ ${e.join("")}
428
+ </section>
429
+ `)}return t.join("")};J=function(t){return`<!doctype html>
430
+ <html lang="${o(this,r,f).call(this,this.lang||"sv")}">
431
+ <head>
432
+ <meta charset="utf-8">
433
+ <meta name="viewport" content="width=device-width, initial-scale=1">
434
+ <title>${o(this,r,f).call(this,this.title||(this.lang==="en"?"Visualization":"Visualisering"))}</title>
435
+ <style>
436
+ :root { color-scheme: light; }
437
+ @page { margin: 16mm; }
438
+ * { box-sizing: border-box; }
439
+ html, body { margin: 0; padding: 0; background: #fff; }
440
+ body {
441
+ font-family: var(--brand-font, Inter, 'Segoe UI', Arial, sans-serif);
442
+ color: var(--md-sys-color-on-surface, #1f1f1f);
443
+ -webkit-print-color-adjust: exact;
444
+ print-color-adjust: exact;
445
+ }
446
+ .viz-print { width: 100%; }
447
+ .viz-header { max-width: 600px; margin-bottom: 24px; }
448
+ .viz-title { font-size: 1.75rem; font-weight: 600; line-height: 1.25; margin: 0; }
449
+ .viz-subtitle { font-size: 1rem; font-weight: 400; line-height: 1.5; margin: 0; }
450
+ .viz-content { width: 100%; }
451
+ .viz-chart-image, .viz-image { display: block; max-width: 100%; height: auto; }
452
+ .print-section { max-width: 600px; margin-top: 16px; }
453
+ .print-section h2, .print-section h3 { margin: 0 0 8px 0; font-size: 1rem; font-weight: 600; line-height: 1.5; }
454
+ .print-section h3 { margin-bottom: 4px; }
455
+ .print-more-about-stats { margin-top: 16px; }
456
+ .print-meta-section { margin-top: 0; margin-bottom: 16px; }
457
+ .print-sos { display: inline-flex; margin-top: 8px; color: inherit; }
458
+ .print-sos svg { height: 24px; width: auto; display: block; }
459
+ .scb-viz-print-table { border-collapse: collapse; width: max-content; max-width: 100%; font-size: 1rem; line-height: 1.5; }
460
+ .scb-viz-print-table th, .scb-viz-print-table td { border: 1px solid #c5c7d0; padding: 8px 12px; text-align: start; }
461
+ .scb-viz-print-table thead th { font-weight: 700; }
462
+ .scb-viz-print-table tbody th { font-weight: 400; }
463
+ .scb-viz-print-table tbody tr:nth-child(odd) { background: #f5f5f5; }
464
+ .scb-viz-print-table tbody tr:nth-child(even) { background: #fff; }
465
+ .scb-viz-print-table .align-right { text-align: right; white-space: nowrap; }
466
+ .scb-viz-print-table .align-left { text-align: left; }
467
+ </style>
468
+ </head>
469
+ <body>
470
+ <article class="viz-print">
471
+ <header class="viz-header">
472
+ ${this.title?`<h1 class="viz-title">${o(this,r,f).call(this,this.title)}</h1>`:""}
473
+ ${this.subtitle?`<div class="viz-subtitle">${o(this,r,f).call(this,this.subtitle)}</div>`:""}
474
+ </header>
475
+ <div class="viz-content">${t}</div>
476
+ ${o(this,r,U).call(this)}
477
+ </article>
478
+ </body>
479
+ </html>`};K=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()},s=e.contentDocument,n=e.contentWindow;if(!s||!n){i();return}s.open(),s.write(t),s.close();const h=Array.from(s.images||[]);await Promise.all(h.map(l=>l.complete?Promise.resolve():new Promise(c=>{l.addEventListener("load",()=>c(null),{once:!0}),l.addEventListener("error",()=>c(null),{once:!0})})));const a=()=>{n.removeEventListener("afterprint",a),i()};n.addEventListener("afterprint",a,{once:!0}),setTimeout(()=>{n.focus(),n.print(),setTimeout(i,1e3)},50)};X=async function(){const t=this._getCurrentPrintableView();let e="";if(t==="table"){const i=this._getResolvedTableData();if(!i?.rows?.length)return;e=o(this,r,N).call(this,i)}else if(t==="image"){const i=this.shadowRoot?.querySelector(".image-content img"),s=i?.currentSrc||i?.src||this.imageHref;if(!s)return;e=`<img class="viz-image" src="${o(this,r,f).call(this,s)}" alt="${o(this,r,f).call(this,this._getImageAltText())}">`}else{const i=this._getExportableVisualElement();if(!i)return;const s=await o(this,r,Z).call(this,i,"png");if(!s)return;e=`<img class="viz-chart-image" src="${s}" alt="${o(this,r,f).call(this,this._getImageAltText())}">`}await o(this,r,K).call(this,o(this,r,J).call(this,e))};Q=function(){const t=this._getResolvedTableData();if(!t?.rows?.length)return;const e=this.lang==="en"?",":";",i=[];t.headers?.length&&i.push(t.headers.map(a=>this._normalizeRenderableCell(a).text)),t.rows.forEach(a=>{i.push(a.map(l=>this._normalizeRenderableCell(l).text))});const s=a=>`"${String(a??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,n=`\uFEFF${i.map(a=>a.map(s).join(e)).join(`\r
480
+ `)}`,h=new Blob([n],{type:"text/csv;charset=utf-8;"});o(this,r,I).call(this,h,this._buildExportFileName("csv"))};Y=async function(t,e){const i=await o(this,r,F).call(this,t);return i?o(this,r,it).call(this,i,e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};Z=async function(t,e){const i=await o(this,r,F).call(this,t);return i?i.toDataURL(e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};F=async function(t){if(t instanceof HTMLCanvasElement){const a=t.width||Math.round(t.getBoundingClientRect().width),l=t.height||Math.round(t.getBoundingClientRect().height);if(!a||!l)return null;const c=document.createElement("canvas");c.width=a,c.height=l;const d=c.getContext("2d");return d?(d.fillStyle=o(this,r,O).call(this),d.fillRect(0,0,a,l),d.drawImage(t,0,0,a,l),c):null}if(t instanceof HTMLImageElement){const a=t.naturalWidth||t.width,l=t.naturalHeight||t.height;return!a||!l?null:o(this,r,L).call(this,t.currentSrc||t.src,a,l)}const{width:e,height:i,serialized:s}=o(this,r,tt).call(this,t);if(!e||!i||!s)return null;const n=new Blob([s],{type:"image/svg+xml;charset=utf-8"}),h=URL.createObjectURL(n);try{return await o(this,r,L).call(this,h,e,i)}finally{URL.revokeObjectURL(h)}};tt=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),s=t.viewBox?.baseVal,n=Math.round(s?.width||i.width||Number(t.getAttribute("width"))||0),h=Math.round(s?.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")&&n&&e.setAttribute("width",String(n)),!e.getAttribute("height")&&h&&e.setAttribute("height",String(h)),!e.getAttribute("viewBox")&&n&&h&&e.setAttribute("viewBox",`0 0 ${n} ${h}`),o(this,r,A).call(this,t,e),e.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(a=>a.remove()),{width:n,height:h,serialized:new XMLSerializer().serializeToString(e)}};A=function(t,e){const i=getComputedStyle(t);let s="";for(let a=0;a<i.length;a+=1){const l=i[a],c=i.getPropertyValue(l);c&&(s+=`${l}:${c};`)}s&&e.setAttribute("style",s);const n=Array.from(t.children),h=Array.from(e.children);for(let a=0;a<n.length;a+=1){const l=n[a],c=h[a];l&&c&&o(this,r,A).call(this,l,c)}};L=async function(t,e,i){const s=Math.max(1,Math.min(2,window.devicePixelRatio||1)),n=Math.max(1,Math.round(e)),h=Math.max(1,Math.round(i)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(n*s)),a.height=Math.max(1,Math.round(h*s));const l=a.getContext("2d");if(!l)return null;const c=await o(this,r,et).call(this,t);return c?(l.scale(s,s),l.fillStyle=o(this,r,O).call(this),l.fillRect(0,0,n,h),l.drawImage(c,0,0,n,h),a):null};et=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};it=function(t,e,i){return new Promise(s=>{t.toBlob(n=>s(n),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"};I=function(t,e){const i=URL.createObjectURL(t),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};E=function(){const t=o(this,r,x).call(this,this.spacing),e=o(this,r,x).call(this,this.spacingTop)??t,i=o(this,r,x).call(this,this.spacingBottom)??t,s=o(this,r,x).call(this,this.spacingLeft),n=o(this,r,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"),s?this.style.setProperty("--scb-viz-spacing-inline-start",s):this.style.removeProperty("--scb-viz-spacing-inline-start"),n?this.style.setProperty("--scb-viz-spacing-inline-end",n):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};R=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=at`
391
481
  :host {
392
482
  display: block;
393
483
  box-sizing: border-box;
@@ -1012,4 +1102,4 @@ import{a as Z,n as b,r as tt,i as et,x as h,k as B,l as it,t as st}from"../../ve
1012
1102
  width: calc(100% / var(--scb-viz-print-scale, 1));
1013
1103
  }
1014
1104
  }
1015
- `;g([b({type:String,reflect:!0})],d.prototype,"variant",2);g([b({type:String,reflect:!0,attribute:"selected-chip"})],d.prototype,"selectedChip",2);g([b({type:String,reflect:!0})],d.prototype,"title",2);g([b({type:String,reflect:!0})],d.prototype,"subtitle",2);g([b({type:String,reflect:!0})],d.prototype,"description",2);g([b({type:String,reflect:!0})],d.prototype,"comment",2);g([b({type:String,reflect:!0})],d.prototype,"source",2);g([b({type:String,reflect:!0})],d.prototype,"footnote",2);g([b({type:String,reflect:!0,attribute:"lang"})],d.prototype,"lang",2);g([b({type:String,reflect:!0,attribute:"image-href"})],d.prototype,"imageHref",2);g([b({type:Boolean,reflect:!0,attribute:"official-statistics"})],d.prototype,"officialStatistics",2);g([b({type:Boolean,reflect:!0,attribute:"disable-toggle"})],d.prototype,"disableToggle",2);g([b({type:String,attribute:"content-max-width"})],d.prototype,"contentMaxWidth",2);g([b({type:String,attribute:"container-max-width"})],d.prototype,"containerMaxWidth",2);g([b({type:String,attribute:"content-height"})],d.prototype,"contentHeight",2);g([b({type:String,reflect:!0,attribute:"toggle-height-mode"})],d.prototype,"toggleHeightMode",2);g([b({attribute:!1})],d.prototype,"tableData",2);g([tt()],d.prototype,"_actionsMenuOpen",2);g([b({type:String,reflect:!0})],d.prototype,"spacing",2);g([b({type:String,attribute:"spacing-top",reflect:!0})],d.prototype,"spacingTop",2);g([b({type:String,attribute:"spacing-bottom",reflect:!0})],d.prototype,"spacingBottom",2);g([b({type:String,attribute:"spacing-left",reflect:!0})],d.prototype,"spacingLeft",2);g([b({type:String,attribute:"spacing-right",reflect:!0})],d.prototype,"spacingRight",2);d=g([st("scb-viz")],d);
1105
+ `;u([m({type:String,reflect:!0})],g.prototype,"variant",2);u([m({type:String,reflect:!0,attribute:"selected-chip"})],g.prototype,"selectedChip",2);u([m({type:String,reflect:!0})],g.prototype,"title",2);u([m({type:String,reflect:!0})],g.prototype,"subtitle",2);u([m({type:String,reflect:!0})],g.prototype,"description",2);u([m({type:String,reflect:!0})],g.prototype,"comment",2);u([m({type:String,reflect:!0})],g.prototype,"source",2);u([m({type:String,reflect:!0})],g.prototype,"footnote",2);u([m({type:String,reflect:!0,attribute:"lang"})],g.prototype,"lang",2);u([m({type:String,reflect:!0,attribute:"image-href"})],g.prototype,"imageHref",2);u([m({type:Boolean,reflect:!0,attribute:"official-statistics"})],g.prototype,"officialStatistics",2);u([m({type:Boolean,reflect:!0,attribute:"disable-toggle"})],g.prototype,"disableToggle",2);u([m({type:String,attribute:"content-max-width"})],g.prototype,"contentMaxWidth",2);u([m({type:String,attribute:"container-max-width"})],g.prototype,"containerMaxWidth",2);u([m({type:String,attribute:"content-height"})],g.prototype,"contentHeight",2);u([m({type:String,reflect:!0,attribute:"toggle-height-mode"})],g.prototype,"toggleHeightMode",2);u([m({attribute:!1})],g.prototype,"tableData",2);u([T()],g.prototype,"_slottedTableData",2);u([T()],g.prototype,"_actionsMenuOpen",2);u([T()],g.prototype,"_seriesDifferentiationEnabled",2);u([m({type:String,reflect:!0})],g.prototype,"spacing",2);u([m({type:String,attribute:"spacing-top",reflect:!0})],g.prototype,"spacingTop",2);u([m({type:String,attribute:"spacing-bottom",reflect:!0})],g.prototype,"spacingBottom",2);u([m({type:String,attribute:"spacing-left",reflect:!0})],g.prototype,"spacingLeft",2);u([m({type:String,attribute:"spacing-right",reflect:!0})],g.prototype,"spacingRight",2);g=u([ot("scb-viz")],g);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.284",
3
+ "version": "0.1.286",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -386,5 +386,5 @@
386
386
  },
387
387
  "./mvc/*": "./mvc/*"
388
388
  },
389
- "buildHash": "04C7A1822968200F73FCBC37D10E3445C1ADEC3783086E1CC09F7402129BF941"
389
+ "buildHash": "537C21A43EDF7AF6971877BD7196089385F693465CF5C92B3DC706161B4CAE4E"
390
390
  }
@@ -12,7 +12,6 @@ export interface ScbVizTableData {
12
12
  }
13
13
  export declare class ScbViz extends LitElement {
14
14
  #private;
15
- private static _printInstanceCounter;
16
15
  variant: 'Standard' | 'Table' | 'Image';
17
16
  selectedChip: 'Diagram' | 'Table' | null;
18
17
  title: string;
@@ -31,12 +30,11 @@ export declare class ScbViz extends LitElement {
31
30
  toggleHeightMode: 'auto' | 'stable';
32
31
  tableData: ScbVizTableData | undefined;
33
32
  private _slottedTableData;
34
- private _tableSlotSyncFrame;
35
33
  private _actionsMenuOpen;
34
+ private _seriesDifferentiationEnabled;
36
35
  private _diagramResizeObserver?;
36
+ private _seriesDifferentiationSnapshots;
37
37
  private _diagramReflowFrame;
38
- private _printCleanup;
39
- private _printInstanceId;
40
38
  /** Vertikalt avstånd ovanför/under komponenten. 0–14 mappar till spacing-tokens, annars CSS-värde. */
41
39
  spacing: undefined;
42
40
  /** Överkantens avstånd. Om satt går före spacing. 0–14 mappar till spacing-tokens, annars CSS-värde. */
@@ -60,6 +58,8 @@ export declare class ScbViz extends LitElement {
60
58
  get downloadPngLabel(): "Download PNG" | "Ladda ner PNG";
61
59
  get downloadJpgLabel(): "Download JPG" | "Ladda ner JPG";
62
60
  get downloadCsvLabel(): "Download CSV" | "Ladda ner CSV";
61
+ get enableSeriesDifferentiationLabel(): "Show symbols and patterns" | "Visa symboler och mönster";
62
+ get disableSeriesDifferentiationLabel(): "Hide symbols and patterns" | "Dölj symboler och mönster";
63
63
  private _getImageAltText;
64
64
  static styles: import('lit').CSSResult;
65
65
  connectedCallback(): void;
@@ -69,7 +69,10 @@ export declare class ScbViz extends LitElement {
69
69
  private _onTableSlotChange;
70
70
  private _onDiagramSlotChange;
71
71
  private _normalizeRenderableCell;
72
+ private _findFirstTable;
73
+ private _extractTableData;
72
74
  private _readTableDataFromSlot;
75
+ private _readTableDataFromLightDom;
73
76
  private _inferTableAlignments;
74
77
  private _getResolvedContentMaxWidth;
75
78
  private _getResolvedDiagramHeight;
@@ -79,6 +82,14 @@ export declare class ScbViz extends LitElement {
79
82
  private _getDiagramAssignedElements;
80
83
  private _findExportableVisualElement;
81
84
  private _getExportableVisualElement;
85
+ private _getCurrentHighchartsChart;
86
+ private _getSeriesDifferentiationGroup;
87
+ private _shouldShowSeriesDifferentiationAction;
88
+ private _getSeriesDifferentiationSnapshotStore;
89
+ private _cloneSeriesOptionValue;
90
+ private _captureSeriesDifferentiationSnapshot;
91
+ private _resolveSeriesBaseColor;
92
+ private _ensureSeriesPattern;
82
93
  private _canExportRaster;
83
94
  private _canExportCsv;
84
95
  private _getExportBaseFileName;
@@ -104,4 +115,6 @@ export declare class ScbViz extends LitElement {
104
115
  private _onDownloadPngClick;
105
116
  private _onDownloadJpgClick;
106
117
  private _onDownloadCsvClick;
118
+ private _onToggleSeriesDifferentiationClick;
119
+ private _getCurrentPrintableView;
107
120
  }