PageSourceSearch

https://www.preventio.de/_next/static/chunks/3082.e2a95c48b7abc0ba.js

js preventio.de collected 2026-10-09 22:43:00 UTC 7,652 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3082],{3082:function(t,e,a){a.d(e,{drawGif:function(){return f},loadGifImage:function(){return c}});let i=[0,4,2,1],o=[8,8,4,2];class r{constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){let e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t="",e=0;do{e=this.data[this.pos++];for(let a=e;--a>=0;t+=String.fromCharCode(this.data[this.pos++]));}while(0!==e);return t}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let a=0;0!==t;a+=t+1,t=this.data[this.pos+a])e+=t;let a=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let i=t;--i>=0;a[e++]=this.data[this.pos++]);return a}skipSubBlocks(){for(;0!==this.data[this.pos];this.pos+=this.data[this.pos]+1);this.pos++}}let l={x:0,y:0};function s(t,e){let a=[];for(let i=0;i<e;i++)a.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return a}async function n(t,e,a,r,l,n){let h=e.frames[r(!0)];h.left=t.nextTwoBytes(),h.top=t.nextTwoBytes(),h.width=t.nextTwoBytes(),h.height=t.nextTwoBytes();let g=t.nextByte(),f=(128&g)==128;h.sortFlag=(32&g)==32,h.reserved=(24&g)>>>3,f&&(h.localColorTable=s(t,1<<(7&g)+1));let c=t=>{let{r:i,g:o,b:r}=(f?h.localColorTable:e.globalColorTable)[t];return t!==l(null)?{r:i,g:o,b:r,a:255}:{r:i,g:o,b:r,a:a?~~((i+o+r)/3):0}},d=(()=>{try{return new ImageData(h.width,h.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw EvalError("GIF frame size is to large");let p=t.nextByte(),u=t.readSubBlocksBin(),w=1<<p,m=(t,e)=>{let a=t>>>3,i=7&t;return(u[a]+(u[a+1]<<8)+(u[a+2]<<16)&(1<<e)-1<<i)>>>i};if((64&g)==64){for(let a=0,l=p+1,s=0,g=[[0]],f=0;f<4;f++){if(i[f]<h.height){let t=0,e=0,r=!1;for(;!r;){let n=a;if(a=m(s,l),s+=l+1,a===w){l=p+1,g.length=w+2;for(let t=0;t<g.length;t++)g[t]=t<w?[t]:[]}else{for(let r of(a>=g.length?g.push(g[n].concat(g[n][0])):n!==w&&g.push(g[n].concat(g[a][0])),g[a])){let{r:a,g:l,b:s,a:n}=c(r);d.data.set([a,l,s,n],i[f]*h.width+o[f]*e+t%(4*h.width)),t+=4}g.length===1<<l&&l<12&&l++}t===4*h.width*(e+1)&&(e++,i[f]+o[f]*e>=h.height&&(r=!0))}}n?.(t.pos/(t.data.length-1),r(!1)+1,d,{x:h.left,y:h.top},{width:e.width,height:e.height})}h.image=d,h.bitmap=await createImageBitmap(d)}else{let a=0,i=p+1,o=0,l=-4,s=!1,g=[[0]];for(;!s;){let t=a;if(a=m(o,i),o+=i,a===w){i=p+1,g.length=w+2;for(let t=0;t<g.length;t++)g[t]=t<w?[t]:[]}else{if(a===w+1){s=!0;break}for(let e of(a>=g.length?g.push(g[t].concat(g[t][0])):t!==w&&g.push(g[t].concat(g[a][0])),g[a])){let{r:t,g:a,b:i,a:o}=c(e);d.data.set([t,a,i,o],l+=4)}g.length>=1<<i&&i<12&&i++}}h.image=d,h.bitmap=await createImageBitmap(d),n?.((t.pos+1)/t.data.length,r(!1)+1,h.image,{x:h.left,y:h.top},{width:e.width,height:e.height})}}async function h(t,e,a,i,o,r){switch(t.nextByte()){case 59:return!0;case 44:await n(t,e,a,i,o,r);break;case 33:!function(t,e,a,i){switch(t.nextByte()){case 249:{let o=e.frames[a(!1)];t.pos++;let r=t.nextByte();o.GCreserved=(224&r)>>>5,o.disposalMethod=(28&r)>>>2,o.userInputDelayFlag=(2&r)==2,o.delayTime=10*t.nextTwoBytes();let l=t.nextByte();(1&r)==1&&i(l),t.pos++;break}case 255:{t.pos++;let a={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(a);break}case 254:e.comments.push([a(!1),t.readSubBlocks()]);break;case 1:if(0===e.globalColorTable.length)throw EvalError("plain text extension without global color table");t.pos++,e.frames[a(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,i,o);break;default:throw EvalError("undefined block found")}return!1}async function g(t,e,a){a||(a=!1);let i=await fetch(t);if(!i.ok&&404===i.status)throw EvalError("file not found");
1let o=await i.arrayBuffer(),l={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},n=new r(new Uint8ClampedArray(o));if("GIF89a"!==n.getString(6))throw Error("not a supported GIF file");l.width=n.nextTwoBytes(),l.height=n.nextTwoBytes();let g=n.nextByte(),f=(128&g)==128;l.colorRes=(112&g)>>>4,l.sortFlag=(8&g)==8;let c=n.nextByte();l.pixelAspectRatio=n.nextByte(),0!==l.pixelAspectRatio&&(l.pixelAspectRatio=(l.pixelAspectRatio+15)/64),f&&(l.globalColorTable=s(n,1<<(7&g)+1));let d=(()=>{try{return new ImageData(l.width,l.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw Error("GIF frame size is to large");let{r:p,g:u,b:w}=l.globalColorTable[c];d.data.set(f?[p,u,w,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);l.backgroundImage=d;let m=-1,y=!0,x=-1,b=t=>(t&&(y=!0),m),B=t=>(null!=t&&(x=t),x);try{do y&&(l.frames.push({left:0,top:0,width:0,height:0,disposalMethod:0,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),m++,x=-1,y=!1);while(!await h(n,l,a,b,B,e));for(let t of(l.frames.length--,l.frames)){if(t.userInputDelayFlag&&0===t.delayTime){l.totalTime=1/0;break}l.totalTime+=t.delayTime}return l}catch(t){if(t instanceof EvalError)throw Error(`error while parsing frame ${m} "${t.message}"`);throw t}}function f(t){let{context:e,radius:a,particle:i,delta:o}=t,r=i.image;if(!r?.gifData||!r.gif)return;let s=new OffscreenCanvas(r.gifData.width,r.gifData.height),n=s.getContext("2d");if(!n)throw Error("could not create offscreen canvas context");n.imageSmoothingQuality="low",n.imageSmoothingEnabled=!1,n.clearRect(l.x,l.y,s.width,s.height),void 0===i.gifLoopCount&&(i.gifLoopCount=r.gifLoopCount??0);let h=i.gifFrame??0,g={x:-(.5*r.gifData.width),y:-(.5*r.gifData.height)},f=r.gifData.frames[h];if(void 0===i.gifTime&&(i.gifTime=0),f.bitmap){switch(e.scale(a/r.gifData.width,a/r.gifData.height),f.disposalMethod){case 4:case 5:case 6:case 7:case 0:n.drawImage(f.bitmap,f.left,f.top),e.drawImage(s,g.x,g.y),n.clearRect(l.x,l.y,s.width,s.height);break;case 1:n.drawImage(f.bitmap,f.left,f.top),e.drawImage(s,g.x,g.y);break;case 2:n.drawImage(f.bitmap,f.left,f.top),e.drawImage(s,g.x,g.y),n.clearRect(l.x,l.y,s.width,s.height),r.gifData.globalColorTable.length?n.putImageData(r.gifData.backgroundImage,g.x,g.y):n.putImageData(r.gifData.frames[0].image,g.x+f.left,g.y+f.top);break;case 3:{let t=n.getImageData(l.x,l.y,s.width,s.height);n.drawImage(f.bitmap,f.left,f.top),e.drawImage(s,g.x,g.y),n.clearRect(l.x,l.y,s.width,s.height),n.putImageData(t,l.x,l.y)}}if(i.gifTime+=o.value,i.gifTime>f.delayTime){if(i.gifTime-=f.delayTime,++h>=r.gifData.frames.length){if(--i.gifLoopCount<=0)return;h=0,n.clearRect(l.x,l.y,s.width,s.height)}i.gifFrame=h}e.scale(r.gifData.width/a,r.gifData.height/a)}}async function c(t){if("gif"!==t.type){let{loadImage:e}=await Promise.resolve().then(a.bind(a,4471));await e(t);return}t.loading=!0;try{t.gifData=await g(t.source),t.gifLoopCount=function(t){for(let e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}(t.gifData)??0,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}}}]);

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.