(("undefined"!==typeof self?self:this)["webpackJsonpxmgissupermaptemplate"]=("undefined"!==typeof self?self:this)["webpackJsonpxmgissupermaptemplate"]||[]).push([[5],{"9a7b":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));var n=r("b3f7");class i extends n["a"]{decodeBlock(e){return e}}},b3f7: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 i(e,t,r){let n=0,i=e.length;const o=i/r;while(i>t){for(let r=t;r>0;--r)e[n+t]+=e[n],++n;i-=t}const s=e.slice();for(let l=0;l<o;++l)for(let t=0;t<r;++t)e[r*l+t]=s[(r-t-1)*o+l]}function o(e,t,r,o,s,l){if(!t||1===t)return e;for(let n=0;n<s.length;++n){if(s[n]%8!==0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(s[n]!==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 f=0;f<o;++f){if(f*c*r*a>=e.byteLength)break;let o;if(2===t){switch(s[0]){case 8:o=new Uint8Array(e,f*c*r*a,c*r*a);break;case 16:o=new Uint16Array(e,f*c*r*a,c*r*a/2);break;case 32:o=new Uint32Array(e,f*c*r*a,c*r*a/4);break;default:throw new Error(`Predictor 2 not allowed with ${s[0]} bits per sample.`)}n(o,c,a)}else 3===t&&(o=new Uint8Array(e,f*c*r*a,c*r*a),i(o,c,a))}return e}r.d(t,"a",(function(){return s}));class s{async decode(e,t){const r=await this.decodeBlock(t),n=e.Predictor||1;if(1!==n){const t=!e.StripOffsets,i=t?e.TileWidth:e.ImageWidth,s=t?e.TileLength:e.RowsPerStrip||e.ImageLength;return o(r,n,i,s,e.BitsPerSample,e.PlanarConfiguration)}return r}}}}]);
//# sourceMappingURL=xmgissupermaptemplate.umd.min.5.js.map