PageSourceSearch

https://level-level.com/wp-content/themes/level-level/dist/webshop-report-B_FjIIBa.js

js level-level.com collected 2026-10-02 03:36:35 UTC 5,022 bytes, 1 lines download raw bytes

1import{g as h}from"./index-D3jsOSc0.js";class u{constructor(s){this.initialize=()=>{this.updateChart(0),this.updateVerticalGridLines(),this.updateHorizontalGridLines(),this.yearButtons.forEach((e,i)=>{e.addEventListener("click",()=>this.handleYearChange(i))}),this.yearButtons.forEach((e,i)=>{e.addEventListener("keydown",a=>{if(a.key==="ArrowLeft"){a.preventDefault();const o=i-1>=0?i-1:this.yearButtons.length-1;this.yearButtons[o].focus(),this.handleYearChange(o)}else if(a.key==="ArrowRight"){a.preventDefault();const o=(i+1)%this.yearButtons.length;this.yearButtons[o].focus(),this.handleYearChange(o)}})}),window.addEventListener("resize",()=>{this.updateVerticalGridLines(),this.updateHorizontalGridLines()})},this.handleYearChange=e=>{e!==this.currentYearIndex&&(this.currentYearIndex=e,this.updateButtonStates(),this.updateTabpanelLabel(),this.updateChart(e))},this.updateTabpanelLabel=()=>{this.chartContainer.setAttribute("aria-labelledby",`webshop-report-year-${this.currentYearIndex}`),this.chartContainerMobile&&this.chartContainerMobile.setAttribute("aria-labelledby",`webshop-report-year-${this.currentYearIndex}`)},this.updateButtonStates=()=>{this.yearButtons.forEach((e,i)=>{const a=i===this.currentYearIndex;e.setAttribute("aria-selected",a?"true":"false"),e.setAttribute("tabindex",a?"0":"-1")})},this.updateChart=e=>{const i=this.chartData.yearsData[e];i&&(this.bars.forEach((a,o)=>{const r=i.values[o]??0;h.to(a,{height:`${r}%`,duration:.5});const t=this.brandLabels[o];t&&(t.style.opacity=r===0?"0.65":"1")}),this.barsMobile.forEach((a,o)=>{const r=i.values[o]??0;h.to(a,{width:`${r}%`,duration:.5});const t=this.brandLabelsMobile[o];t&&(t.style.opacity=r===0?"0.65":"1")}))},this.updateVerticalGridLines=()=>{if(!this.verticalLinesGroup||!this.gridSvg)return;this.verticalLinesGroup.innerHTML="";const e=this.gridSvg.getBoundingClientRect();if(!(e.width===0||e.height===0)&&(this.barWrappers.forEach(i=>{const r=(i.getBoundingClientRect().left-e.left)/e.width*100;if(!isFinite(r))return;const t=document.createElementNS("http://www.w3.org/2000/svg","line");t.setAttribute("x1",`${r}%`),t.setAttribute("y1","0"),t.setAttribute("x2",`${r}%`),t.setAttribute("y2","100%"),t.setAttribute("class","stroke-primary/20"),t.setAttribute("stroke-width","1"),this.verticalLinesGroup.appendChild(t)}),this.barWrappers.length>0)){const r=(this.barWrappers[this.barWrappers.length-1].getBoundingClientRect().right-e.left)/e.width*100;if(!isFinite(r))return;const t=document.createElementNS("http://www.w3.org/2000/svg","line");t.setAttribute("x1",`${r}%`),t.setAttribute("y1","0"),t.setAttribute("x2",`${r}%`),t.setAttribute("y2","100%"),t.setAttribute("class","stroke-primary/20"),t.setAttribute("stroke-width","1"),this.verticalLinesGroup.appendChild(t)}},this.updateHorizontalGridLines=()=>{if(!this.horizontalLinesGroup||!this.gridSvgMobile)return;this.horizontalLinesGroup.innerHTML="";const e=this.gridSvgMobile.getBoundingClientRect();if(!(e.width===0||e.height===0)&&(this.barWrappersMobile.forEach(i=>{const r=(i.getBoundingClientRect().top-e.top)/e.height*100;if(!isFinite(r))return;const t=document.createElementNS("http://www.w3.org/2000/svg","line");t.setAttribute("x1","0"),t.setAttribute("y1",`${r}%`),t.setAttribute("x2","100%"),t.setAttribute("y2",`${r}%`),t.setAttribute("class","stroke-primary/20"),t.setAttribute("stroke-width","1"),this.horizontalLinesGroup.appendChild(t)}),this.barWrappersMobile.length>0)){const r=(this.barWrappersMobile[this.barWrappersMobile.length-1].getBoundingClientRect().bottom-e.top)/e.height*100;if(!isFinite(r))return;const t=document.createElementNS("http://www.w3.org/2000/svg","line");t.setAttribute("x1","0"),t.setAttribute("y1",`${r}%`),t.setAttribute("x2","100%"),t.setAttribute("y2",`${r}%`),t.setAttribute("class","stroke-primary/20"),t.setAttribute("stroke-width","1"),this.horizontalLinesGroup.appendChild(t)}},this.element=s,this.chartContainer=s.querySelector(".js-chart"),this.chartContainerMobile=s.querySelector(".js-chart-mobile"),this.yearButtons=[...s.querySelectorAll(".js-year-btn")],this.bars=[...s.querySelectorAll(".js-bar")],this.barWrappers=[...s.querySelectorAll(".js-bar-wrapper")],this.barsMobile=[...s.querySelectorAll(".js-bar-mobile")],this.barWrappersMobile=[...s.querySelectorAll(".js-bar-wrapper-mobile")],this.brandLabels=[...s.querySelectorAll(".js-brand-label")],this.brandLabelsMobile=[...s.querySelectorAll(".js-brand-label-mobile")],this.gridSvg=s.querySelector(".js-grid-svg"),this.verticalLinesGroup=s.querySelector(".js-vertical-lines"),this.gridSvgMobile=s.querySelector(".js-grid-svg-mobile"),this.horizontalLinesGroup=s.querySelector(".js-vertical-lines-mobile"),this.chartData={brands:[],yearsData:[]},this.currentYearIndex=0;const n=s.querySelector(".js-chart-data");if(!n||!n.textContent){console.error("WebshopReport: Chart data not found");return}try{this.chartData=JSON.parse(n.textContent)}catch(e){console.error("WebshopReport: Failed to parse chart data",e);return}this.initialize()}}export{u as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.