PageSourceSearch

https://www.brottsoffermyndigheten.se/Dist/brom/5976.5d9b9cf15e74ee103c4c.js

js brottsoffermyndigheten.se collected 2026-10-02 04:26:30 UTC 2,803 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkbrom_web=globalThis.webpackChunkbrom_web||[]).push([[5976],{5976:(t,e,i)=>{i.d(e,{A:()=>h});var r=i(8257);class l{static getAltText(t){return t.altText?.length?t.altText:t.properties?.alt?t.properties.alt:""}static getCropDataByAlias(t,e){if(!t)return null;if(t.crops){let i=t.crops.find((t=>t.alias===e));if(i)return{url:this.getCropUrl(t,i.width,i.height),width:i.width,height:i.height,alt:this.getAltText(t)}}return{url:t.url,alt:this.getAltText(t),width:null,height:null}}static getCropDataByAliases(t,e){if(!t)return null;if(t.crops){const i=[];e.forEach((e=>{let r=t.crops.find((t=>t.alias===e));r&&i.push({url:this.getCropUrl(t,r.width,r.height),width:r.width,height:r.height,alt:t.properties?.alt?t.properties.alt:""})}))}return[{url:t.url,width:null,height:null,alt:this.getAltText(t)}]}static getCropUrlByAlias(t,e){if(!t)return"";if(t.crops){let i=t.crops.find((t=>t.alias===e));if(i)return this.getCropUrl(t,i.width,i.height)}return t.url}static getCropData(t,e,i){return t?{url:this.getCropUrl(t,e,i),width:e,height:i}:null}static getCropUrl(t,e,i){if(!t)return"";const r=new URLSearchParams({});return e&&e>0&&r.append("width",e),i&&i>0&&r.append("height",i),t.focalPoint&&r.append("rxy",`${t.focalPoint.left},${t.focalPoint.top}`),`${t.url}?${r.toString()}`}static getSrcsetBySizes(t,e,i){if(e){const r=e.replaceAll(/\(.*?\)/g,"")?.replace(/\s/g,"").replaceAll("px","").split(","),l=[];return r.forEach((e=>{const r=i?this.getCropUrl(t,e,Math.round(e/i)):this.getCropUrl(t,e,Math.round(e*(t.height/t.width)));l.push({url:r,srcString:`${r} ${e}w`,width:e,height:i?Math.round(e/i):Math.round(e*(t.height/t.width))})})),l}return[]}}const a=["src","loading","width","height","alt","srcset","sizes"],h={__name:"image-element",props:{data:{type:Object},alias:{type:String,default:null},ratio:{type:Number,default:null},width:{type:Number,default:null},height:{type:Number,default:null},sizes:{type:String,default:null},loading:{type:String,default:null},classes:{type:String,default:null}},setup(t){const e=t,i=(0,r.EW)((()=>{if(e.data){const t=Array.isArray(e.data)?e.data[0]:e.data;if(e.sizes){const i={url:e.data.url,srcset:null,sizes:e.sizes,width:e.width??t.width,height:e.height??t.height,alt:l.getAltText(t)},r=l.getSrcsetBySizes(t,e.sizes,e.ratio);if(r.length){let t=r[0];i.width=t.width,i.height=t.height,i.url=t.url,i.srcset=r.map((t=>t.srcString)).toString("")}return i}if(e.alias)return l.getCropDataByAlias(t,e.alias);if(e.width&&e.width>0||e.height&&e.height>0)return l.getCropData(t,e.width,e.height)}return null}));return(l,h)=>((0,r.uX)(),(0,r.CE)("img",{src:i.value?.url,loading:t.loading,width:i.value?.width,height:i.value?.height,alt:i.value?.alt,srcset:i.value?.srcset,sizes:i.value?.sizes,class:(0,r.C4)(e.classes)},null,10,a))}}}}]);

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.