ry-vue-map
Version:
ry公共组件库
1 lines • 1.82 kB
JavaScript
(("undefined"!==typeof self?self:this)["webpackJsonpryui"]=("undefined"!==typeof self?self:this)["webpackJsonpryui"]||[]).push([[4],{"45bf":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){const t=new DataView(e),r=[];for(let n=0;n<e.byteLength;++n){let e=t.getInt8(n);if(e<0){const i=t.getUint8(n+1);e=-e;for(let t=0;t<=e;++t)r.push(i);n+=1}else{for(let i=0;i<=e;++i)r.push(t.getUint8(n+i+1));n+=e+1}}return new Uint8Array(r).buffer}}},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 f=s[0]/8,a=2===l?1:s.length;for(let c=0;c<o;++c){if(c*a*r*f>=e.byteLength)break;let o;if(2===t){switch(s[0]){case 8:o=new Uint8Array(e,c*a*r*f,a*r*f);break;case 16:o=new Uint16Array(e,c*a*r*f,a*r*f/2);break;case 32:o=new Uint32Array(e,c*a*r*f,a*r*f/4);break;default:throw new Error(`Predictor 2 not allowed with ${s[0]} bits per sample.`)}n(o,a,f)}else 3===t&&(o=new Uint8Array(e,c*a*r*f,a*r*f),i(o,a,f))}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}}}}]);