(("undefined"!==typeof self?self:this)["webpackJsonpxmgissupermaptemplate"]=("undefined"!==typeof self?self:this)["webpackJsonpxmgissupermaptemplate"]||[]).push([[6],{b3f7:function(e,t,n){"use strict";function r(e,t){let n=e.length-t,r=0;do{for(let n=t;n>0;n--)e[r+t]+=e[r],r++;n-=t}while(n>0)}function a(e,t,n){let r=0,a=e.length;const i=a/n;while(a>t){for(let n=t;n>0;--n)e[r+t]+=e[r],++r;a-=t}const o=e.slice();for(let s=0;s<i;++s)for(let t=0;t<n;++t)e[n*s+t]=o[(n-t-1)*i+s]}function i(e,t,n,i,o,s){if(!t||1===t)return e;for(let r=0;r<o.length;++r){if(o[r]%8!==0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(o[r]!==o[0])throw new Error("When decoding with predictor, all samples must have the same size.")}const c=o[0]/8,f=2===s?1:o.length;for(let d=0;d<i;++d){if(d*f*n*c>=e.byteLength)break;let i;if(2===t){switch(o[0]){case 8:i=new Uint8Array(e,d*f*n*c,f*n*c);break;case 16:i=new Uint16Array(e,d*f*n*c,f*n*c/2);break;case 32:i=new Uint32Array(e,d*f*n*c,f*n*c/4);break;default:throw new Error(`Predictor 2 not allowed with ${o[0]} bits per sample.`)}r(i,f,c)}else 3===t&&(i=new Uint8Array(e,d*f*n*c,f*n*c),a(i,f,c))}return e}n.d(t,"a",(function(){return o}));class o{async decode(e,t){const n=await this.decodeBlock(t),r=e.Predictor||1;if(1!==r){const t=!e.StripOffsets,a=t?e.TileWidth:e.ImageWidth,o=t?e.TileLength:e.RowsPerStrip||e.ImageLength;return i(n,r,a,o,e.BitsPerSample,e.PlanarConfiguration)}return n}}},ee5b:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n("b3f7");class a extends r["a"]{constructor(){if(super(),"undefined"===typeof createImageBitmap)throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if("undefined"===typeof document&&"undefined"===typeof OffscreenCanvas)throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available")}async decode(e,t){const n=new Blob([t]),r=await createImageBitmap(n);let a;"undefined"!==typeof document?(a=document.createElement("canvas"),a.width=r.width,a.height=r.height):a=new OffscreenCanvas(r.width,r.height);const i=a.getContext("2d");return i.drawImage(r,0,0),i.getImageData(0,0,r.width,r.height).data.buffer}}}}]);
//# sourceMappingURL=xmgissupermaptemplate.umd.min.6.js.map