(window.webpackJsonpPMA=window.webpackJsonpPMA||[]).push([[5],{290:function(e,t,r){"use strict";function n(e,t){let r=e.length-t,n=0;do{for(let r=t;r>0;r--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function o(e,t,r){let n=0,o=e.length;const i=o/r;for(;o>t;){for(let r=t;r>0;--r)e[n+t]+=e[n],++n;o-=t}const s=e.slice();for(let t=0;t<i;++t)for(let n=0;n<r;++n)e[r*t+n]=s[(r-n-1)*i+t]}r.d(t,"a",(function(){return i}));class i{async decode(e,t){const r=await this.decodeBlock(t),i=e.Predictor||1;if(1!==i){const t=!e.StripOffsets;return function(e,t,r,i,s,l){if(!t||1===t)return e;for(let e=0;e<s.length;++e){if(s[e]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(s[e]!==s[0])throw new Error("When decoding with predictor, all samples must have the same size.")}const a=s[0]/8,c=2===l?1:s.length;for(let l=0;l<i&&!(l*c*r*a>=e.byteLength);++l){let i;if(2===t){switch(s[0]){case 8:i=new Uint8Array(e,l*c*r*a,c*r*a);break;case 16:i=new Uint16Array(e,l*c*r*a,c*r*a/2);break;case 32:i=new Uint32Array(e,l*c*r*a,c*r*a/4);break;default:throw new Error(`Predictor 2 not allowed with ${s[0]} bits per sample.`)}n(i,c)}else 3===t&&(i=new Uint8Array(e,l*c*r*a,c*r*a),o(i,c,a))}return e}(r,i,t?e.TileWidth:e.ImageWidth,t?e.TileLength:e.RowsPerStrip||e.ImageLength,e.BitsPerSample,e.PlanarConfiguration)}return r}}},299:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(290);class o extends n.a{decodeBlock(e){const t=new DataView(e),r=[];for(let n=0;n<e.byteLength;++n){let e=t.getInt8(n);if(e<0){const o=t.getUint8(n+1);e=-e;for(let t=0;t<=e;++t)r.push(o);n+=1}else{for(let o=0;o<=e;++o)r.push(t.getUint8(n+o+1));n+=e+1}}return new Uint8Array(r).buffer}}}}]);
//# sourceMappingURL=5.js.map