Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rveciana
Last active December 20, 2021 02:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rveciana/9d9ef3282959a41c3e54cedb717bdddf to your computer and use it in GitHub Desktop.
Save rveciana/9d9ef3282959a41c3e54cedb717bdddf to your computer and use it in GitHub Desktop.
Cloud Optimized Geotiff example 1
license: gpl-3.0

This example is explained at the post https://geoexamples.com/other/2019/02/08/cog-tutorial.html

The represented data is a temperature interpolation over Catalonia, and the GeoTIFF is very big. But since it has overlays, only a small amount of data is actually retrieved, making the performance high and the used bandwidth small.

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.rastertools=e.rastertools||{})}(this,function(e){"use strict";function t(e,t,o){return(e-t)/(o-t)}function o(e){for(var t=[],o=e.rows,r=e.cols,l=[],h=0;h<o;h++)for(var a=0;a<r;a++)if("undefined"!=typeof e.cells[h][a]&&e.cells[h][a].edges.length>0){var n=e.cells[h][a],f=(n.cval,p(n)),i=null,c=a,b=h;null!==f&&l.push([f.p[0]+c,f.p[1]+b]);do{if(i=u(e.cells[b][c],f.x,f.y,f.o),null===i)break;if(l.push([i.p[0]+c,i.p[1]+b]),c+=i.x,b+=i.y,f=i,b<0||b>=o||c<0||c>=r||"undefined"==typeof e.cells[b][c]){c-=i.x,b-=i.y;var g=s(e,c,b,i.x,i.y,i.o);if(null===g)break;g.path.forEach(function(e){l.push(e)}),c=g.i,b=g.j,f=g}}while("undefined"!=typeof e.cells[b][c]&&e.cells[b][c].edges.length>0);t.push(l),l=[],e.cells[h][a].edges.length>0&&a--}return t}function s(e,t,o,s,r,p){for(var u=e.cells[o][t],l=u.cval_real,h=t+s,a=o+r,n=[],f=(e.rows,e.cols,!1);!f;){if("undefined"==typeof e.cells[a]||"undefined"==typeof e.cells[a][h])if(a-=r,h-=s,u=e.cells[a][h],l=u.cval_real,r===-1)if(0===p)if(l&w)n.push([h,a]),s=-1,r=0,p=0;else{if(!(l&x)){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h+1,a]),s=1,r=0,p=0}else{if(!(l&w)){if(l&x){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h+u.bottomleft,a]),s=0,r=1,p=0,f=!0;break}n.push([h,a]),s=-1,r=0,p=0}else if(1===r)if(0===p){if(!(l&k)){if(l&v){n.push([h+u.topleft,a+1]),s=0,r=-1,p=0,f=!0;break}n.push([h+u.topright,a+1]),s=0,r=-1,p=1,f=!0;break}n.push([h+1,a+1]),s=1,r=0,p=1}else l&k?(n.push([h+1,a+1]),s=1,r=0,p=1):(n.push([h+1,a+1]),s=1,r=0,p=1);else if(s===-1)if(0===p){if(!(l&v)){if(l&w){n.push([h,a+u.leftbottom]),s=1,r=0,p=0,f=!0;break}n.push([h,a+u.lefttop]),s=1,r=0,p=1,f=!0;break}n.push([h,a+1]),s=0,r=1,p=0}else{if(!(l&v)){console.log("wtf");break}n.push([h,a+1]),s=0,r=1,p=0}else{if(1!==s){console.log("we came from nowhere!");break}if(0===p){if(!(l&x)){n.push([h+1,a+u.rightbottom]),s=-1,r=0,p=0,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}else{if(!(l&x)){if(l&k){n.push([h+1,a+u.righttop]),s=-1,r=0,p=1;break}n.push([h+1,a+u.rightbottom]),s=-1,r=0,p=0,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}}else if(u=e.cells[a][h],l=u.cval_real,s===-1)if(0===p)if("undefined"!=typeof e.cells[a-1]&&"undefined"!=typeof e.cells[a-1][h])s=0,r=-1,p=1;else{if(!(l&w)){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h,a])}else{if(!(l&v)){console.log("found entry from top at "+h+","+a);break}console.log("proceeding in x-direction!")}else if(1===s){if(0===p){console.log("wtf");break}if("undefined"!=typeof e.cells[a+1]&&"undefined"!=typeof e.cells[a+1][h])s=0,r=1,p=0;else{if(!(l&k)){n.push([h+u.topleft,a+1]),s=0,r=-1,p=0,f=!0;break}n.push([h+1,a+1]),s=1,r=0,p=1}}else if(r===-1){if(1!==p){console.log("wtf");break}if("undefined"!=typeof e.cells[a][h+1])s=1,r=0,p=1;else{if(!(l&x)){n.push([h+1,a+u.righttop]),s=-1,r=0,p=1,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}}else{if(1!==r){console.log("where did we came from???");break}if(0!==p){console.log("wtf");break}if("undefined"!=typeof e.cells[a][h-1])s=-1,r=0,p=0;else{if(!(l&v)){n.push([h,a+u.leftbottom]),s=1,r=0,p=0,f=!0;break}n.push([h,a+1]),s=0,r=1,p=0}}if(h+=s,a+=r,h===t&&a===o)break}return{path:n,i:h,j:a,x:s,y:r,o:p}}function r(e,t){delete e.edges[t];for(var o=t+1;o<e.edges.length;o++)e.edges[o-1]=e.edges[o];e.edges.pop()}function p(e){if(e.edges.length>0){var t=e.edges[e.edges.length-1],o=e.cval_real;switch(t){case 0:return o&k?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 1:return o&x?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 2:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 3:return o&w?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 4:return o&k?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 5:return o&x?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 6:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 7:return o&w?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 8:return o&x?{p:[e.bottomright],x:0,y:1,o:1}:{p:[1,e.righttop],x:-1,y:0,o:1};case 9:return o&w?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 10:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.righttop],x:-1,y:0,o:1};case 11:return o&v?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 12:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 13:return o&w?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 14:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 15:return o&v?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 16:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 17:return o&v?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 18:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 19:return o&v?{p:[e.bottomleft,0],x:0,y:1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 20:return o&v?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 21:return o&k?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.topright,1],x:0,y:-1,o:1};case 22:return o&v?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 23:return o&k?{p:[0,e.lefttop],x:1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};default:console.log("edge index out of range!"),console.log(e)}}return null}function u(e,t,o,s){var p,u,t,o,l,h,a,n=e.cval;switch(t){case-1:switch(s){case 0:p=U[n],l=A[n],h=G[n],a=P[n];break;default:p=R[n],l=F[n],h=O[n],a=I[n]}break;case 1:switch(s){case 0:p=Y[n],l=J[n],h=K[n],a=Q[n];break;default:p=Z[n],l=B[n],h=D[n],a=H[n]}break;default:switch(o){case-1:switch(s){case 0:p=$[n],l=N[n],h=C[n],a=j[n];break;default:p=ee[n],l=_[n],h=E[n],a=M[n]}break;case 1:switch(s){case 0:p=X[n],l=T[n],h=V[n],a=L[n];break;default:p=W[n],l=S[n],h=q[n],a=z[n]}}}if(u=e.edges.indexOf(p),"undefined"==typeof e.edges[u])return null;switch(r(e,u),n=e.cval_real,p){case 0:n&k?(t=e.topleft,o=1):(t=1,o=e.righttop);break;case 1:n&x?(t=1,o=e.rightbottom):(t=e.topleft,o=1);break;case 2:n&x?(t=e.topleft,o=1):(t=e.bottomright,o=0);break;case 3:n&w?(t=e.bottomleft,o=0):(t=e.topleft,o=1);break;case 4:n&k?(t=e.topright,o=1):(t=1,o=e.righttop);break;case 5:n&x?(t=1,o=e.rightbottom):(t=e.topright,o=1);break;case 6:n&x?(t=e.topright,o=1):(t=e.bottomright,o=0);break;case 7:n&w?(t=e.bottomleft,o=0):(t=e.topright,o=1);break;case 8:n&x?(t=1,o=e.righttop):(t=e.bottomright,o=0);break;case 9:n&w?(t=e.bottomleft,o=0):(t=1,o=e.righttop);break;case 10:n&w?(t=1,o=e.righttop):(t=0,o=e.leftbottom);break;case 11:n&v?(t=0,o=e.lefttop):(t=1,o=e.righttop);break;case 12:n&x?(t=1,o=e.rightbottom):(t=e.bottomright,o=0);break;case 13:n&w?(t=e.bottomleft,o=0):(t=1,o=e.rightbottom);break;case 14:n&w?(t=1,o=e.rightbottom):(t=0,o=e.leftbottom);break;case 15:n&v?(t=0,o=e.lefttop):(t=1,o=e.rightbottom);break;case 16:n&x?(t=0,o=e.leftbottom):(t=e.bottomright,o=0);break;case 17:n&v?(t=0,o=e.lefttop):(t=e.bottomright,o=0);break;case 18:n&w?(t=e.bottomleft,o=0):(t=0,o=e.leftbottom);break;case 19:n&v?(t=0,o=e.lefttop):(t=e.bottomleft,o=0);break;case 20:n&v?(t=0,o=e.leftbottom):(t=e.topleft,o=1);break;case 21:n&k?(t=e.topright,o=1):(t=0,o=e.leftbottom);break;case 22:n&v?(t=0,o=e.lefttop):(t=e.topleft,o=1);break;case 23:n&k?(t=e.topright,o=1):(t=0,o=e.lefttop);break;default:return console.log("edge index out of range!"),console.log(e),null}return"undefined"!=typeof t&&"undefined"!=typeof o&&"undefined"!=typeof l&&"undefined"!=typeof h&&"undefined"!=typeof a||(console.log("undefined value!"),console.log(e),console.log(t+" "+o+" "+l+" "+h+" "+a)),{p:[t,o],x:l,y:h,o:a}}function l(e,t,o){return(e-t)/(o-t)}function h(e,t){for(var o=e.length-1,s=e[0].length-1,r={rows:o,cols:s,cells:[]},p=0;p<o;++p){r.cells[p]=[];for(var u=0;u<s;++u){var h=0,a=e[p+1][u],n=e[p+1][u+1],f=e[p][u+1],i=e[p][u];if(!(isNaN(a)||isNaN(n)||isNaN(f)||isNaN(i))){h|=a>=t?8:0,h|=n>=t?4:0,h|=f>=t?2:0,h|=i>=t?1:0;var c=!1;if(5==h||10==h){var b=(a+n+f+i)/4;5==h&&b<t?(h=10,c=!0):10==h&&b<t&&(h=5,c=!0)}if(0!=h&&15!=h){var g,d,y,m;g=d=y=m=.5,1==h?(y=1-l(t,a,i),d=1-l(t,f,i)):2==h?(d=l(t,i,f),m=1-l(t,n,f)):3==h?(y=1-l(t,a,i),m=1-l(t,n,f)):4==h?(g=l(t,a,n),m=l(t,f,n)):5==h?(g=l(t,a,n),m=l(t,f,n),d=1-l(t,f,i),y=1-l(t,a,i)):6==h?(d=l(t,i,f),g=l(t,a,n)):7==h?(y=1-l(t,a,i),g=l(t,a,n)):8==h?(y=l(t,i,a),g=1-l(t,n,a)):9==h?(d=1-l(t,f,i),g=1-l(t,n,a)):10==h?(g=1-l(t,n,a),m=1-l(t,n,f),d=l(t,i,f),y=l(t,i,a)):11==h?(g=1-l(t,n,a),m=1-l(t,n,f)):12==h?(y=l(t,i,a),m=l(t,f,n)):13==h?(d=1-l(t,f,i),m=l(t,f,n)):14==h?(y=l(t,i,a),d=l(t,i,f)):console.log("Illegal cval detected: "+h),r.cells[p][u]={cval:h,flipped:c,top:g,right:m,bottom:d,left:y}}}}}return r}function a(e){return 5==e.cval||10==e.cval}function n(e){return 0==e.cval||15==e.cval}function f(e){n(e)||5==e.cval||10==e.cval||(e.cval=15)}function i(e,t){return"top"===t?[e.top,1]:"bottom"===t?[e.bottom,0]:"right"===t?[1,e.right]:"left"===t?[0,e.left]:void 0}function c(e){var t=[],o=0,s=(e.rows,e.cols,1e-7);return e.cells.forEach(function(r,p){r.forEach(function(r,u){if("undefined"!=typeof r&&!a(r)&&!n(r)){var l=b(e.cells,p,u),h=!1;if("mergeable"==l.info)for(var f=l.path[l.path.length-1][0],i=l.path[l.path.length-1][1],c=o-1;c>=0;c--)if(Math.abs(t[c][0][0]-f)<=s&&Math.abs(t[c][0][1]-i)<=s){for(var g=l.path.length-2;g>=0;--g)t[c].unshift(l.path[g]);h=!0;break}h||(t[o++]=l.path)}})}),t}function b(e,t,o){var s,r,p,u=e.length,l=[],h=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],a=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],n=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],c=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],b=(e[t][o],e[t][o]),g=b.cval,p=n[g],d=i(b,p);l.push([o+d[0],t+d[1]]),p=c[g],d=i(b,p),l.push([o+d[0],t+d[1]]),f(b);for(var y=o+h[g],m=t+a[g],v=g;y>=0&&m>=0&&m<u&&(y!=o||m!=t)&&(b=e[m][y],"undefined"!=typeof b);){if(g=b.cval,0==g||15==g)return{path:l,info:"mergeable"};p=c[g],s=h[g],r=a[g],5!=g&&10!=g||(5==g?b.flipped?a[v]==-1?(p="left",s=-1,r=0):(p="right",s=1,r=0):h[v]==-1&&(p="bottom",s=0,r=-1):10==g&&(b.flipped?h[v]==-1?(p="top",s=0,r=1):(p="bottom",s=0,r=-1):1==a[v]&&(p="left",s=-1,r=0))),d=i(b,p),l.push([y+d[0],m+d[1]]),f(b),y+=s,m+=r,v=g}return{path:l,info:"closed"}}var g=function(e,t,o){for(var s={type:"FeatureCollection",features:[]},r=1;r<o.length;r++){for(var p=o[r-1],u=o[r],l=d(e,t,p,u-p),h=0;h<l.length;h++)l[h].reverse();s.features.push({type:"Feature",geometry:{type:"Polygon",coordinates:l},properties:[{lowerValue:p,upperValue:u}]})}return s},d=function(e,t,o,s){if(typeof t!=typeof new Array||6!=t.length)throw new Error("GeoTransform must be a 6 elements array");for(var r=m(e,o,s),p=0;p<r.length;p++)for(var u=0;u<r[p].length;u++){var l=y(r[p][u][0],r[p][u][1],t);r[p][u][0]=l[0],r[p][u][1]=l[1]}return r},y=function(e,t,o){var s=o[0]+e*o[1]+t*o[2],r=o[3]+e*o[4]+t*o[5];return[s,r]},m=function(e,t,s,r){var p={},u={successCallback:null,progressCallback:null,verbose:!1};r=r?r:{};for(var l=Object.keys(u),h=0;h<l.length;h++){var a=l[h],n=r[a];n="undefined"!=typeof n&&null!==n?n:u[a],p[a]=n}p.verbose&&console.log("computing isobands for ["+t+":"+(t+s)+"]");var f=te(e,t,s);p.verbose&&(p.polygons?console.log("returning single polygons for each grid cell"):console.log("returning polygon paths for entire data grid"));var i=o(f);return"function"==typeof p.successCallback&&p.successCallback(i),i},v=64,k=16,x=4,w=1,N=[],C=[],j=[],_=[],E=[],M=[],F=[],O=[],I=[],A=[],G=[],P=[],T=[],V=[],L=[],S=[],q=[],z=[],B=[],D=[],H=[],J=[],K=[],Q=[];F[85]=A[85]=-1,O[85]=G[85]=0,I[85]=P[85]=1,B[85]=J[85]=1,D[85]=K[85]=0,H[85]=Q[85]=1,N[85]=_[85]=0,C[85]=E[85]=-1,j[85]=L[85]=0,S[85]=T[85]=0,q[85]=V[85]=1,M[85]=z[85]=1,J[1]=J[169]=0,K[1]=K[169]=-1,Q[1]=Q[169]=0,T[1]=T[169]=-1,V[1]=V[169]=0,L[1]=L[169]=0,A[4]=A[166]=0,G[4]=G[166]=-1,P[4]=P[166]=1,S[4]=S[166]=1,q[4]=q[166]=0,z[4]=z[166]=0,F[16]=F[154]=0,O[16]=O[154]=1,I[16]=I[154]=1,_[16]=_[154]=1,E[16]=E[154]=0,M[16]=M[154]=1,B[64]=B[106]=0,D[64]=D[106]=1,H[64]=H[106]=0,N[64]=N[106]=-1,C[64]=C[106]=0,j[64]=j[106]=1,B[2]=B[168]=0,D[2]=D[168]=-1,H[2]=H[168]=1,J[2]=J[168]=0,K[2]=K[168]=-1,Q[2]=Q[168]=0,T[2]=T[168]=-1,V[2]=V[168]=0,L[2]=L[168]=0,S[2]=S[168]=-1,q[2]=q[168]=0,z[2]=z[168]=1,F[8]=F[162]=0,O[8]=O[162]=-1,I[8]=I[162]=0,A[8]=A[162]=0,G[8]=G[162]=-1,P[8]=P[162]=1,T[8]=T[162]=1,V[8]=V[162]=0,L[8]=L[162]=1,S[8]=S[162]=1,q[8]=q[162]=0,z[8]=z[162]=0,F[32]=F[138]=0,O[32]=O[138]=1,I[32]=I[138]=1,A[32]=A[138]=0,G[32]=G[138]=1,P[32]=P[138]=0,N[32]=N[138]=1,C[32]=C[138]=0,j[32]=j[138]=0,_[32]=_[138]=1,E[32]=E[138]=0,M[32]=M[138]=1,J[128]=J[42]=0,K[128]=K[42]=1,Q[128]=Q[42]=1,B[128]=B[42]=0,D[128]=D[42]=1,H[128]=H[42]=0,N[128]=N[42]=-1,C[128]=C[42]=0,j[128]=j[42]=1,_[128]=_[42]=-1,E[128]=E[42]=0,M[128]=M[42]=0,A[5]=A[165]=-1,G[5]=G[165]=0,P[5]=P[165]=0,J[5]=J[165]=1,K[5]=K[165]=0,Q[5]=Q[165]=0,S[20]=S[150]=0,q[20]=q[150]=1,z[20]=z[150]=1,_[20]=_[150]=0,E[20]=E[150]=-1,M[20]=M[150]=1,F[80]=F[90]=-1,O[80]=O[90]=0,I[80]=I[90]=1,B[80]=B[90]=1,D[80]=D[90]=0,H[80]=H[90]=1,T[65]=T[105]=0,V[65]=V[105]=1,L[65]=L[105]=0,N[65]=N[105]=0,C[65]=C[105]=-1,j[65]=j[105]=0,F[160]=F[10]=-1,O[160]=O[10]=0,I[160]=I[10]=1,A[160]=A[10]=-1,G[160]=G[10]=0,P[160]=P[10]=0,J[160]=J[10]=1,K[160]=K[10]=0,Q[160]=Q[10]=0,B[160]=B[10]=1,D[160]=D[10]=0,H[160]=H[10]=1,S[130]=S[40]=0,q[130]=q[40]=1,z[130]=z[40]=1,T[130]=T[40]=0,V[130]=V[40]=1,L[130]=L[40]=0,N[130]=N[40]=0,C[130]=C[40]=-1,j[130]=j[40]=0,_[130]=_[40]=0,E[130]=E[40]=-1,M[130]=M[40]=1,A[37]=A[133]=0,G[37]=G[133]=1,P[37]=P[133]=1,J[37]=J[133]=0,K[37]=K[133]=1,Q[37]=Q[133]=0,N[37]=N[133]=-1,C[37]=C[133]=0,j[37]=j[133]=0,_[37]=_[133]=1,E[37]=E[133]=0,M[37]=M[133]=0,S[148]=S[22]=-1,q[148]=q[22]=0,z[148]=z[22]=0,J[148]=J[22]=0,K[148]=K[22]=-1,Q[148]=Q[22]=1,B[148]=B[22]=0,D[148]=D[22]=1,H[148]=H[22]=1,_[148]=_[22]=-1,E[148]=E[22]=0,M[148]=M[22]=1,F[82]=F[88]=0,O[82]=O[88]=-1,I[82]=I[88]=1,S[82]=S[88]=1,q[82]=q[88]=0,z[82]=z[88]=1,T[82]=T[88]=-1,V[82]=V[88]=0,L[82]=L[88]=1,B[82]=B[88]=0,D[82]=D[88]=-1,H[82]=H[88]=0,F[73]=F[97]=0,O[73]=O[97]=1,I[73]=I[97]=0,A[73]=A[97]=0,G[73]=G[97]=-1,P[73]=P[97]=0,T[73]=T[97]=1,V[73]=V[97]=0,L[73]=L[97]=0,N[73]=N[97]=1,C[73]=C[97]=0,j[73]=j[97]=1,F[145]=F[25]=0,O[145]=O[25]=-1,I[145]=I[25]=0,T[145]=T[25]=1,V[145]=V[25]=0,L[145]=L[25]=1,J[145]=J[25]=0,K[145]=K[25]=1,Q[145]=Q[25]=1,_[145]=_[25]=-1,E[145]=E[25]=0,M[145]=M[25]=0,A[70]=A[100]=0,G[70]=G[100]=1,P[70]=P[100]=0,S[70]=S[100]=-1,q[70]=q[100]=0,z[70]=z[100]=1,B[70]=B[100]=0,D[70]=D[100]=-1;H[70]=H[100]=1;N[70]=N[100]=1,C[70]=C[100]=0,j[70]=j[100]=0,A[101]=A[69]=0,G[101]=G[69]=1,P[101]=P[69]=0,N[101]=N[69]=1,C[101]=C[69]=0,j[101]=j[69]=0,J[149]=J[21]=0,K[149]=K[21]=1,Q[149]=Q[21]=1,_[149]=_[21]=-1,E[149]=E[21]=0,M[149]=M[21]=0,S[86]=S[84]=-1,q[86]=q[84]=0,z[86]=z[84]=1,B[86]=B[84]=0,D[86]=D[84]=-1,H[86]=H[84]=1,F[89]=F[81]=0,O[89]=O[81]=-1,I[89]=I[81]=0,T[89]=T[81]=1,V[89]=V[81]=0,L[89]=L[81]=1,F[96]=F[74]=0,O[96]=O[74]=1,I[96]=I[74]=0,A[96]=A[74]=-1,G[96]=G[74]=0,P[96]=P[74]=1,B[96]=B[74]=1,D[96]=D[74]=0,H[96]=H[74]=0,N[96]=N[74]=1,C[96]=C[74]=0,j[96]=j[74]=1,F[24]=F[146]=0,O[24]=O[146]=-1,I[24]=I[146]=1,S[24]=S[146]=1,q[24]=q[146]=0,z[24]=z[146]=1,T[24]=T[146]=0,V[24]=V[146]=1,L[24]=L[146]=1,_[24]=_[146]=0,E[24]=E[146]=-1,M[24]=M[146]=0,A[6]=A[164]=-1,G[6]=G[164]=0,P[6]=P[164]=1,S[6]=S[164]=-1,q[6]=q[164]=0,z[6]=z[164]=0,J[6]=J[164]=0,K[6]=K[164]=-1,Q[6]=Q[164]=1,B[6]=B[164]=1,D[6]=D[164]=0,H[6]=H[164]=0,T[129]=T[41]=0,V[129]=V[41]=1,L[129]=L[41]=1,J[129]=J[41]=0,K[129]=K[41]=1,Q[129]=Q[41]=0,N[129]=N[41]=-1,C[129]=C[41]=0,j[129]=j[41]=0,_[129]=_[41]=0,E[129]=E[41]=-1,M[129]=M[41]=0,S[66]=S[104]=0,q[66]=q[104]=1,z[66]=z[104]=0,T[66]=T[104]=-1,V[66]=V[104]=0,L[66]=L[104]=1,B[66]=B[104]=0,D[66]=D[104]=-1,H[66]=H[104]=0,N[66]=N[104]=0,C[66]=C[104]=-1,j[66]=j[104]=1,F[144]=F[26]=-1,O[144]=O[26]=0,I[144]=I[26]=0,J[144]=J[26]=1,K[144]=K[26]=0,Q[144]=Q[26]=1,B[144]=B[26]=0,D[144]=D[26]=1,H[144]=H[26]=1,_[144]=_[26]=-1,E[144]=E[26]=0,M[144]=M[26]=1,A[36]=A[134]=0,G[36]=G[134]=1,P[36]=P[134]=1,S[36]=S[134]=0,q[36]=q[134]=1,z[36]=z[134]=0,N[36]=N[134]=0,C[36]=C[134]=-1,j[36]=j[134]=1,_[36]=_[134]=1,E[36]=E[134]=0,M[36]=M[134]=0,F[9]=F[161]=-1,O[9]=O[161]=0,I[9]=I[161]=0,A[9]=A[161]=0,G[9]=G[161]=-1,P[9]=P[161]=0,T[9]=T[161]=1,V[9]=V[161]=0,L[9]=L[161]=0,J[9]=J[161]=1,K[9]=K[161]=0,Q[9]=Q[161]=1,F[136]=0,O[136]=1,I[136]=1,A[136]=0,G[136]=1,P[136]=0,S[136]=-1,q[136]=0,z[136]=1,T[136]=-1,V[136]=0,L[136]=0,J[136]=0,K[136]=-1,Q[136]=0,B[136]=0,D[136]=-1,H[136]=1,N[136]=1,C[136]=0,j[136]=0,_[136]=1,E[136]=0,M[136]=1,F[34]=0,O[34]=-1,I[34]=0,A[34]=0,G[34]=-1,P[34]=1,S[34]=1,q[34]=0,z[34]=0,T[34]=1,V[34]=0,L[34]=1,J[34]=0,K[34]=1,Q[34]=1,B[34]=0,D[34]=1,H[34]=0,N[34]=-1,C[34]=0,j[34]=1,_[34]=-1,E[34]=0,M[34]=0,F[35]=0,O[35]=1,I[35]=1,A[35]=0,G[35]=-1,P[35]=1,S[35]=1,q[35]=0,z[35]=0,T[35]=-1,V[35]=0,L[35]=0,J[35]=0,K[35]=-1,Q[35]=0,B[35]=0,D[35]=1,H[35]=0,N[35]=-1,C[35]=0,j[35]=1,_[35]=1,E[35]=0,M[35]=1,F[153]=0,O[153]=1,I[153]=1,T[153]=-1,V[153]=0;L[153]=0;J[153]=0,K[153]=-1,Q[153]=0,_[153]=1,E[153]=0,M[153]=1,A[102]=0,G[102]=-1,P[102]=1,S[102]=1,q[102]=0,z[102]=0,B[102]=0,D[102]=1,H[102]=0,N[102]=-1,C[102]=0,j[102]=1,F[155]=0,O[155]=-1,I[155]=0,T[155]=1,V[155]=0,L[155]=1,J[155]=0,K[155]=1,Q[155]=1,_[155]=-1,E[155]=0,M[155]=0,A[103]=0,G[103]=1,P[103]=0,S[103]=-1,q[103]=0,z[103]=1,B[103]=0,D[103]=-1,H[103]=1,N[103]=1,C[103]=0,j[103]=0,F[152]=0,O[152]=1,I[152]=1,S[152]=-1,q[152]=0,z[152]=1,T[152]=-1,V[152]=0,L[152]=0,J[152]=0,K[152]=-1,Q[152]=0,B[152]=0,D[152]=-1,H[152]=1,_[152]=1,E[152]=0,M[152]=1,F[156]=0,O[156]=-1,I[156]=1,S[156]=1,q[156]=0,z[156]=1,T[156]=-1,V[156]=0,L[156]=0,J[156]=0,K[156]=-1,Q[156]=0,B[156]=0,D[156]=1,H[156]=1,_[156]=-1,E[156]=0,M[156]=1,F[137]=0,O[137]=1,I[137]=1,A[137]=0,G[137]=1,P[137]=0,T[137]=-1,V[137]=0,L[137]=0,J[137]=0,K[137]=-1,Q[137]=0,N[137]=1,C[137]=0,j[137]=0,_[137]=1,E[137]=0,M[137]=1,F[139]=0,O[139]=1,I[139]=1,A[139]=0,G[139]=-1,P[139]=0,T[139]=1,V[139]=0,L[139]=0,J[139]=0,K[139]=1,Q[139]=0,N[139]=-1,C[139]=0,j[139]=0,_[139]=1,E[139]=0,M[139]=1,F[98]=0,O[98]=-1,I[98]=0,A[98]=0,G[98]=-1,P[98]=1,S[98]=1,q[98]=0,z[98]=0,T[98]=1,V[98]=0,L[98]=1,B[98]=0,D[98]=1,H[98]=0,N[98]=-1,C[98]=0,j[98]=1,F[99]=0,O[99]=1,I[99]=0,A[99]=0,G[99]=-1,P[99]=1,S[99]=1,q[99]=0,z[99]=0,T[99]=-1,V[99]=0,L[99]=1,B[99]=0,D[99]=-1,H[99]=0,N[99]=1,C[99]=0,j[99]=1,A[38]=0,G[38]=-1,P[38]=1,S[38]=1,q[38]=0,z[38]=0,J[38]=0,K[38]=1,Q[38]=1,B[38]=0,D[38]=1,H[38]=0,N[38]=-1,C[38]=0,j[38]=1,_[38]=-1,E[38]=0,M[38]=0,A[39]=0,G[39]=1,P[39]=1,S[39]=-1,q[39]=0,z[39]=0,J[39]=0,K[39]=-1,Q[39]=1,B[39]=0,D[39]=1,H[39]=0,N[39]=-1,C[39]=0,j[39]=1,_[39]=1,E[39]=0,M[39]=0;var R=[],U=[],W=[],X=[],Y=[],Z=[],$=[],ee=[];X[1]=Y[1]=18,X[169]=Y[169]=18,W[4]=U[4]=12,W[166]=U[166]=12,R[16]=ee[16]=4,R[154]=ee[154]=4,Z[64]=$[64]=22,Z[106]=$[106]=22,W[2]=Z[2]=17,X[2]=Y[2]=18,W[168]=Z[168]=17,X[168]=Y[168]=18,R[8]=X[8]=9,U[8]=W[8]=12,R[162]=X[162]=9,U[162]=W[162]=12,R[32]=ee[32]=4,U[32]=$[32]=1,R[138]=ee[138]=4,U[138]=$[138]=1,Y[128]=ee[128]=21,Z[128]=$[128]=22,Y[42]=ee[42]=21,Z[42]=$[42]=22,U[5]=Y[5]=14,U[165]=Y[165]=14,W[20]=ee[20]=6,W[150]=ee[150]=6,R[80]=Z[80]=11,R[90]=Z[90]=11,X[65]=$[65]=3,X[105]=$[105]=3,R[160]=Z[160]=11,U[160]=Y[160]=14,R[10]=Z[10]=11,U[10]=Y[10]=14,W[130]=ee[130]=6,X[130]=$[130]=3,W[40]=ee[40]=6,X[40]=$[40]=3,U[101]=$[101]=1,U[69]=$[69]=1,Y[149]=ee[149]=21,Y[21]=ee[21]=21,W[86]=Z[86]=17,W[84]=Z[84]=17,R[89]=X[89]=9,R[81]=X[81]=9,R[96]=$[96]=0,U[96]=Z[96]=15,R[74]=$[74]=0,U[74]=Z[74]=15,R[24]=W[24]=8,X[24]=ee[24]=7,R[146]=W[146]=8,X[146]=ee[146]=7,U[6]=Z[6]=15,W[6]=Y[6]=16,U[164]=Z[164]=15,W[164]=Y[164]=16,X[129]=ee[129]=7,Y[129]=$[129]=20,X[41]=ee[41]=7,Y[41]=$[41]=20,W[66]=$[66]=2,X[66]=Z[66]=19,W[104]=$[104]=2,X[104]=Z[104]=19,R[144]=Y[144]=10,Z[144]=ee[144]=23,R[26]=Y[26]=10,Z[26]=ee[26]=23,U[36]=ee[36]=5,W[36]=$[36]=2,U[134]=ee[134]=5,W[134]=$[134]=2,R[9]=Y[9]=10,U[9]=X[9]=13,R[161]=Y[161]=10,U[161]=X[161]=13,U[37]=ee[37]=5,Y[37]=$[37]=20,U[133]=ee[133]=5,Y[133]=$[133]=20,W[148]=Y[148]=16,Z[148]=ee[148]=23,W[22]=Y[22]=16,Z[22]=ee[22]=23,R[82]=W[82]=8,X[82]=Z[82]=19,R[88]=W[88]=8,X[88]=Z[88]=19,R[73]=$[73]=0,U[73]=X[73]=13,R[97]=$[97]=0,U[97]=X[97]=13,R[145]=X[145]=9,Y[145]=ee[145]=21,R[25]=X[25]=9,Y[25]=ee[25]=21,U[70]=$[70]=1,W[70]=Z[70]=17,U[100]=$[100]=1,W[100]=Z[100]=17,R[34]=X[34]=9,U[34]=W[34]=12,Y[34]=ee[34]=21,Z[34]=$[34]=22,R[136]=ee[136]=4,U[136]=$[136]=1,W[136]=Z[136]=17,X[136]=Y[136]=18,R[35]=ee[35]=4,U[35]=W[35]=12,X[35]=Y[35]=18,Z[35]=$[35]=22,R[153]=ee[153]=4,X[153]=Y[153]=18,U[102]=W[102]=12,Z[102]=$[102]=22,R[155]=X[155]=9,Y[155]=ee[155]=23,U[103]=$[103]=1,W[103]=Z[103]=17,R[152]=ee[152]=4,W[152]=Z[152]=17,X[152]=Y[152]=18,R[156]=W[156]=8,X[156]=Y[156]=18,Z[156]=ee[156]=23,R[137]=ee[137]=4,U[137]=$[137]=1,X[137]=Y[137]=18,R[139]=ee[139]=4,U[139]=X[139]=13,Y[139]=$[139]=20,R[98]=X[98]=9,U[98]=W[98]=12,Z[98]=$[98]=22,R[99]=$[99]=0,U[99]=W[99]=12,X[99]=Z[99]=19,U[38]=W[38]=12,Y[38]=ee[38]=21,Z[38]=$[38]=22,U[39]=ee[39]=5,W[39]=Y[39]=16,Z[39]=$[39]=22;var te=function(e,o,s){for(var r=e.length-1,p=e[0].length-1,u={rows:r,cols:p,cells:[]},l=o+Math.abs(s),h=0;h<r;++h){u.cells[h]=[];for(var a=0;a<p;++a){var n=0,f=e[h+1][a],i=e[h+1][a+1],c=e[h][a+1],b=e[h][a];if(!(isNaN(f)||isNaN(i)||isNaN(c)||isNaN(b))){n|=f<o?0:f>l?128:64,n|=i<o?0:i>l?32:16,n|=c<o?0:c>l?8:4,n|=b<o?0:b>l?2:1;var g=+n,d=0;if(17==n||18==n||33==n||34==n||38==n||68==n||72==n||98==n||102==n||132==n||136==n||137==n||152==n||153==n){var y=(f+i+c+b)/4;d=y>l?2:y<o?0:1,34===n?1===d?n=35:0===d&&(n=136):136===n?1===d?(n=35,d=4):0===d&&(n=34):17===n?1===d?(n=155,d=4):0===d&&(n=153):68===n?1===d?(n=103,d=4):0===d&&(n=102):153===n?1===d&&(n=155):102===n?1===d&&(n=103):152===n?d<2&&(n=156,d=1):137===n?d<2&&(n=139,d=1):98===n?d<2&&(n=99,d=1):38===n?d<2&&(n=39,d=1):18===n?d>0?(n=156,d=4):n=152:33===n?d>0?(n=139,d=4):n=137:72===n?d>0?(n=99,d=4):n=98:132===n&&(d>0?(n=39,d=4):n=38)}if(0!=n&&170!=n){var m,v,k,x,w,N,C,j;m=v=k=x=w=N=C=j=.5;var _=[];1===n?(k=1-t(o,c,b),j=1-t(o,f,b),_.push(X[n])):169===n?(k=t(l,b,c),j=t(l,b,f),_.push(X[n])):4===n?(N=1-t(o,i,c),x=t(o,b,c),_.push(U[n])):166===n?(N=t(l,c,i),x=1-t(l,c,b),_.push(U[n])):16===n?(w=t(o,c,i),v=t(o,f,i),_.push(R[n])):154===n?(w=1-t(l,i,c),v=1-t(l,i,f),_.push(R[n])):64===n?(C=t(o,b,f),m=1-t(o,i,f),_.push(Z[n])):106===n?(C=1-t(l,f,b),m=t(l,f,i),_.push(Z[n])):168===n?(x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),_.push(W[n]),_.push(X[n])):2===n?(x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),_.push(W[n]),_.push(X[n])):162===n?(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),_.push(W[n]),_.push(X[n])):8===n?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),_.push(R[n]),_.push(U[n])):138===n?(w=1-t(o,i,c),N=1-t(l,i,c),m=1-t(l,i,f),v=1-t(o,i,f),_.push(R[n]),_.push(U[n])):32===n?(w=t(l,c,i),N=t(o,c,i),m=t(o,f,i),v=t(l,f,i),_.push(R[n]),_.push(U[n])):42===n?(j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(Y[n]),_.push(Z[n])):128===n&&(j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(Y[n]),_.push(Z[n])),5===n?(N=1-t(o,i,c),j=1-t(o,f,b),_.push(U[n])):165===n?(N=t(l,c,i),j=t(l,b,f),_.push(U[n])):20===n?(x=t(o,b,c),v=t(o,f,i),_.push(W[n])):150===n?(x=1-t(l,c,b),v=1-t(l,i,f),_.push(W[n])):80===n?(w=t(o,c,i),C=t(o,b,f),_.push(R[n])):90===n?(w=1-t(l,i,c),C=1-t(l,f,b),_.push(R[n])):65===n?(k=1-t(o,c,b),m=1-t(o,i,f),_.push(X[n])):105===n?(k=t(l,b,c),m=t(l,f,i),_.push(X[n])):160===n?(w=t(l,c,i),N=t(o,c,i),j=t(o,b,f),C=t(l,b,f),_.push(R[n]),_.push(U[n])):10===n?(w=1-t(o,i,c),N=1-t(l,i,c),j=1-t(l,f,b),C=1-t(o,f,b),_.push(R[n]),_.push(U[n])):130===n?(x=1-t(o,c,b),k=1-t(l,c,b),m=1-t(l,i,f),v=1-t(o,i,f),_.push(W[n]),_.push(X[n])):40===n?(x=t(l,b,c),k=t(o,b,c),m=t(o,f,i),v=t(l,f,i),_.push(W[n]),_.push(X[n])):101===n?(N=t(l,c,i),m=t(l,f,i),_.push(U[n])):69===n?(N=1-t(o,i,c),m=1-t(o,i,f),_.push(U[n])):149===n?(j=t(l,b,f),v=1-t(l,i,f),_.push(Y[n])):21===n?(j=1-t(o,f,b),v=t(o,f,i),_.push(Y[n])):86===n?(x=1-t(l,c,b),C=1-t(l,f,b),_.push(W[n])):84===n?(x=t(o,b,c),C=t(o,b,f),_.push(W[n])):89===n?(w=1-t(l,i,c),k=t(l,b,c),_.push(X[n])):81===n?(w=t(o,c,i),k=1-t(o,c,b),_.push(X[n])):96===n?(w=t(l,c,i),N=t(o,c,i),C=t(o,b,f),m=t(l,f,i),_.push(R[n]),_.push(U[n])):74===n?(w=1-t(o,i,c),N=1-t(l,i,c),C=1-t(l,f,b),m=1-t(o,i,f),_.push(R[n]),_.push(U[n])):24===n?(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),v=t(o,f,i),_.push(R[n]),_.push(X[n])):146===n?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),v=1-t(l,i,f),_.push(R[n]),_.push(X[n])):6===n?(N=1-t(o,i,c),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),_.push(U[n]),_.push(W[n])):164===n?(N=t(l,c,i),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),_.push(U[n]),_.push(W[n])):129===n?(k=1-t(o,c,b),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(X[n]),_.push(Y[n])):41===n?(k=t(l,b,c),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(X[n]),_.push(Y[n])):66===n?(x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=1-t(o,i,f),_.push(W[n]),_.push(X[n])):104===n?(x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=t(l,f,i),_.push(X[n]),_.push($[n])):144===n?(w=t(o,c,i),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f),_.push(R[n]),_.push(Z[n])):26===n?(w=1-t(l,i,c),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i),_.push(R[n]),_.push(Z[n])):36===n?(N=t(l,c,i),x=t(o,b,c),m=t(o,f,i),v=t(l,f,i),_.push(U[n]),_.push(W[n])):134===n?(N=1-t(o,i,c),x=1-t(l,c,b),m=1-t(l,i,f),v=1-t(o,i,f),_.push(U[n]),_.push(W[n])):9===n?(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=1-t(o,f,b),_.push(R[n]),_.push(U[n])):161===n?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=t(l,b,f),_.push(R[n]),_.push(U[n])):37===n?(N=t(l,c,i),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(U[n]),_.push(Y[n])):133===n?(N=1-t(o,i,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(U[n]),_.push(Y[n])):148===n?(x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f),_.push(W[n]),_.push(Z[n])):22===n?(x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i),_.push(W[n]),_.push(Z[n])):82===n?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),_.push(R[n]),_.push(X[n])):88===n?(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),_.push(R[n]),_.push(X[n])):73===n?(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),m=1-t(o,i,f),_.push(R[n]),_.push(U[n])):97===n?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),m=t(l,f,i),_.push(R[n]),_.push(U[n])):145===n?(w=t(o,c,i),k=1-t(o,c,b),j=t(l,b,f),v=1-t(l,i,f),_.push(R[n]),_.push(Y[n])):25===n?(w=1-t(l,i,c),k=t(l,b,c),j=1-t(o,f,b),v=t(o,f,i),_.push(R[n]),_.push(Y[n])):70===n?(N=1-t(o,i,c),x=1-t(l,c,b),C=1-t(l,f,b),m=1-t(o,i,f),_.push(U[n]),_.push(W[n])):100===n?(N=t(l,c,i),x=t(o,b,c),C=t(o,b,f),m=t(l,f,i),_.push(U[n]),_.push(W[n])):34===n?(0===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):35===n?(4===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(X[n]),_.push(Z[n])):136===n?(0===d?(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):153===n?(0===d?(w=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(X[n])):102===n?(0===d?(N=1-t(o,i,c),x=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(U[n]),_.push(Z[n])):155===n?(4===d?(w=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(Y[n])):103===n?(4===d?(N=1-t(o,i,c),x=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(U[n]),_.push(W[n])):152===n?(0===d?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(W[n]),_.push(X[n])):156===n?(4===d?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(X[n]),_.push(Z[n])):137===n?(0===d?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(X[n])):139===n?(4===d?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(Y[n])):98===n?(0===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(Z[n])):99===n?(4===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(X[n])):38===n?(0===d?(N=1-t(o,i,c),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):39===n?(4===d?(N=1-t(o,i,c),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(U[n]),_.push(W[n]),_.push(Z[n])):85===n&&(w=1,N=0,x=1,k=0,j=0,C=1,m=0,v=1),(m<0||m>1||v<0||v>1||w<0||w>1||x<0||x>1||j<0||j>1||C<0||C>1)&&console.log(n+" "+g+" "+f+","+i+","+c+","+b+" "+d+" "+m+" "+v+" "+w+" "+N+" "+x+" "+k+" "+j+" "+C),u.cells[h][a]={cval:n,cval_real:g,flipped:d,topleft:m,topright:v,righttop:w,rightbottom:N,bottomright:x,bottomleft:k,leftbottom:j,lefttop:C,edges:_}}}}}return u},oe=function(e,t,o){for(var s={type:"FeatureCollection",features:[]},r=0;r<o.length;r++){var p=o[r],u=se(e,t,p);s.features.push({type:"Feature",geometry:{type:"MultiLineString",coordinates:u},properties:[{value:p}]})}return s},se=function(e,t,o){if(typeof t!=typeof new Array||6!=t.length)throw new Error("GeoTransform must be a 6 elements array");for(var s=pe(e,o),r=0;r<s.length;r++)for(var p=0;p<s[r].length;p++){var u=re(s[r][p][0],s[r][p][1],t);s[r][p][0]=u[0],s[r][p][1]=u[1]}return s},re=function(e,t,o){var s=o[0]+e*o[1]+t*o[2],r=o[3]+e*o[4]+t*o[5];return[s,r]},pe=function(e,t,o){var s={successCallback:null,progressCallback:null,verbose:!1},r={};o=o?o:{};for(var p=Object.keys(s),u=0;u<p.length;u++){var l=p[u],a=o[l];a="undefined"!=typeof a&&null!==a?a:s[l],r[l]=a}r.verbose&&console.log("computing isocontour for "+t);var n=c(h(e,t));return"function"==typeof r.successCallback&&r.successCallback(n),n};e.isoband=m,e.projectedIsoband=d,e.isobands=g,e.isoline=pe,e.projectedIsoline=se,e.isolines=oe,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GeoTIFF=t():e.GeoTIFF=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=66)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(39)("wks"),i=n(24),o=n(0).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(120),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(0),i=n(1),o=n(17),a=n(10),s=n(11),u=function(e,t,n){var f,c,l,h=e&u.F,d=e&u.G,p=e&u.S,v=e&u.P,m=e&u.B,y=e&u.W,b=d?i:i[t]||(i[t]={}),g=b.prototype,w=d?r:p?r[t]:(r[t]||{}).prototype;d&&(n=t);for(f in n)(c=!h&&w&&void 0!==w[f])&&s(b,f)||(l=c?w[f]:n[f],b[f]=d&&"function"!=typeof w[f]?n[f]:m&&c?o(l,r):y&&w[f]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((b.virtual||(b.virtual={}))[f]=l,e&u.R&&g&&!g[f]&&a(g,f,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(5),i=n(49),o=n(35),a=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(7),i=n(23);e.exports=n(9)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(31),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t){e.exports={}},function(e,t,n){var r=n(73),i=n(33);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(90),o=r(i),a=n(94),s=r(a),u=n(31),f=r(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,f.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(21);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=n(128),f=function(){function e(){(0,o.default)(this,e)}return(0,s.default)(e,[{key:"decode",value:function(e,t){var n=this.decodeBlock(t),r=e.Predictor||1;if(1!==r){var i=!e.StripOffsets,o=i?e.TileWidth:e.ImageWidth,a=i?e.TileLength:e.RowsPerStrip;return(0,u.applyPredictor)(n,r,o,a,e.BitsPerSample)}return n}}]),e}();t.default=f},function(e,t,n){"use strict";var r=n(70)(!0);n(48)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(7).f,i=n(11),o=n(2)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(78);for(var r=n(0),i=n(10),o=n(13),a=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var f=s[u],c=r[f],l=c&&c.prototype;l&&!l[a]&&i(l,a,f),o[f]=o.Array}},function(e,t,n){e.exports=n(97)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(105),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,n){function r(o,a){try{var s=t[o](a),u=s.value}catch(e){return void n(e)}if(!s.done)return i.default.resolve(u).then(function(e){r("next",e)},function(e){r("throw",e)});e(u)}return r("next")})}}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),i);for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},a={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(i)},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(68),o=r(i),a=n(81),s=r(a),u="function"==typeof s.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===u(o.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":u(e)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(8),i=n(0).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(5),i=n(72),o=n(40),a=n(38)("IE_PROTO"),s=function(){},u=function(){var e,t=n(34)("iframe"),r=o.length;for(t.style.display="none",n(53).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(51),i=n(40);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(39)("keys"),i=n(24);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(1),i=n(0),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){t.f=n(2)},function(e,t,n){var r=n(0),i=n(1),o=n(16),a=n(41),s=n(7).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(99),o=r(i),a=n(102),s=r(a);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=(0,s.default)(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){var r=n(18),i=n(2)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=i(t),this.reject=i(n)}var i=n(21);e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.fieldTagNames={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams"},i=t.fieldTags={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=parseInt(o,10));var a=(t.fieldTagTypes={256:"SHORT",257:"SHORT",258:"SHORT",259:"SHORT",262:"SHORT",273:"LONG",274:"SHORT",277:"SHORT",278:"LONG",279:"LONG",282:"RATIONAL",283:"RATIONAL",284:"SHORT",286:"SHORT",287:"RATIONAL",296:"SHORT",305:"ASCII",306:"ASCII",338:"SHORT",339:"SHORT",513:"LONG",514:"LONG",1024:"SHORT",1025:"SHORT",2048:"SHORT",2049:"ASCII",33550:"DOUBLE",33922:"DOUBLE",34665:"LONG",34735:"SHORT",34737:"ASCII"},t.arrayFields=[i.BitsPerSample,i.ExtraSamples,i.SampleFormat,i.StripByteCounts,i.StripOffsets,i.StripRowCounts,i.TileByteCounts,i.TileOffsets],t.fieldTypeNames={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",16:"LONG8",17:"SLONG8",18:"IFD8"}),s=t.fieldTypes={};for(var u in a)a.hasOwnProperty(u)&&(s[a[u]]=parseInt(u,10));var f=(t.photometricInterpretations={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},t.geoKeyNames={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"}),c=t.geoKeys={};for(var l in f)f.hasOwnProperty(l)&&(c[f[l]]=parseInt(l,10));t.parseXml=void 0;"undefined"==typeof window?t.parseXml=function(e){return(new(0,n(123).DOMParser)).parseFromString(e,"text/xml")}:void 0!==window.DOMParser?t.parseXml=function(e){return(new window.DOMParser).parseFromString(e,"text/xml")}:void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")&&(t.parseXml=function(e){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t})},function(e,t,n){"use strict";var r=n(16),i=n(6),o=n(50),a=n(10),s=n(13),u=n(71),f=n(25),c=n(76),l=n(2)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,p,v,m,y){u(n,t,p);var b,g,w,_=function(e){if(!h&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==v,S=!1,O=e.prototype,E=O[l]||O["@@iterator"]||v&&O[v],T=E||_(v),A=v?k?_("entries"):T:void 0,P="Array"==t?O.entries||E:E;if(P&&(w=c(P.call(new e)))!==Object.prototype&&w.next&&(f(w,x,!0),r||"function"==typeof w[l]||a(w,l,d)),k&&E&&"values"!==E.name&&(S=!0,T=function(){return E.call(this)}),r&&!y||!h&&!S&&O[l]||a(O,l,T),s[t]=T,s[x]=d,v)if(b={values:k?T:_("values"),keys:m?T:_("keys"),entries:A},y)for(g in b)g in O||o(O,g,b[g]);else i(i.P+i.F*(h||S),t,b);return b}},function(e,t,n){e.exports=!n(9)&&!n(22)(function(){return 7!=Object.defineProperty(n(34)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=n(10)},function(e,t,n){var r=n(11),i=n(14),o=n(74)(!1),a=n(38)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,f=[];for(n in s)n!=a&&r(s,n)&&f.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(f,n)||f.push(n));return f}},function(e,t,n){var r=n(32),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(51),i=n(40).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(43),i=n(23),o=n(14),a=n(35),s=n(11),u=n(49),f=Object.getOwnPropertyDescriptor;t.f=n(9)?f:function(e,t){if(e=o(e),t=a(t,!0),u)try{return f(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){var r=n(45),i=n(2)("iterator"),o=n(13);e.exports=n(1).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(5),i=n(21),o=n(2)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(17),s=n(112),u=n(53),f=n(34),c=n(0),l=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,y={},b=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},g=function(e){b.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete y[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(b,e,1))}:v&&v.now?r=function(e){v.now(a(b,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=g,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",g,!1)):r="onreadystatechange"in f("script")?function(e){u.appendChild(f("script")).onreadystatechange=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(5),i=n(8),o=n(46);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var o=Object.create(t.prototype);i.__proto__=o}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function o(){}function a(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);G(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function f(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function c(e,t,n,r){if(r?t[f(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&b(i,e,r),y(i,e,n))}}function l(e,t,n){var r=f(t,n);if(!(r>=0))throw i(ae,new Error(e.tagName+"@"+n));for(var o=t.length-1;r<o;)t[r]=t[++r];if(t.length=o,e){var a=e.ownerDocument;a&&(b(a,e,n),n.ownerElement=null)}}function h(e){if(this._features={},e)for(var t in e)this._features=e[t]}function d(){}function p(e){return"<"==e&&"&lt;"||">"==e&&"&gt;"||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function v(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(v(e,t))return!0}while(e=e.nextSibling)}function m(){}function y(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function b(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function g(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function w(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,g(e.ownerDocument,e),t}function _(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return g(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function x(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,g(e.ownerDocument,e,t),t}function k(){this._nsMap={}}function S(){}function O(){}function E(){}function T(){}function A(){}function P(){}function N(){}function I(){}function C(){}function M(){}function D(){}function j(){}function R(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i){var i=r.lookupPrefix(o);if(null==i)var a=[{namespace:o,prefix:null}]}return F(this,n,e,t,a),n.join("")}function L(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case K:i||(i=[]);var o=(i.length,e.attributes),a=o.length,s=e.firstChild,u=e.tagName;n=H===e.namespaceURI||n,t.push("<",u);for(var f=0;f<a;f++){var c=o.item(f);"xmlns"==c.prefix?i.push({prefix:c.localName,namespace:c.value}):"xmlns"==c.nodeName&&i.push({prefix:"",namespace:c.value})}for(var f=0;f<a;f++){var c=o.item(f);if(L(c,n,i)){var l=c.prefix||"",h=c.namespaceURI,d=l?" xmlns:"+l:" xmlns";t.push(d,'="',h,'"'),i.push({prefix:l,namespace:h})}F(c,t,n,r,i)}if(L(e,n,i)){var l=e.prefix||"",h=e.namespaceURI,d=l?" xmlns:"+l:" xmlns";t.push(d,'="',h,'"'),i.push({prefix:l,namespace:h})}if(s||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Q:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case V:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,p),'"');case W:return t.push(e.data.replace(/[<&]/g,p));case q:return t.push("<![CDATA[",e.data,"]]>");case J:return t.push("\x3c!--",e.data,"--\x3e");case ee:var v=e.publicId,m=e.systemId;if(t.push("<!DOCTYPE ",e.name),v)t.push(' PUBLIC "',v),m&&"."!=m&&t.push('" "',m),t.push('">');else if(m&&"."!=m)t.push(' SYSTEM "',m,'">');else{var y=e.internalSubset;y&&t.push(" [",y,"]"),t.push(">")}return;case $:return t.push("<?",e.target," ",e.data,"?>");case Y:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function U(e,t,n){var r;switch(t.nodeType){case K:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case V:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(U(e,i,n)),i=i.nextSibling;return r}function B(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new o),r.ownerDocument=e,r.nodeType){case K:var s=t.attributes,f=r.attributes=new u,c=s.length;f._ownerElement=r;for(var l=0;l<c;l++)r.setAttributeNode(B(e,s.item(l),!0));break;case V:n=!0}if(n)for(var h=t.firstChild;h;)r.appendChild(B(e,h,n)),h=h.nextSibling;return r}function G(e,t,n){e[t]=n}function Z(e){switch(e.nodeType){case K:case te:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Z(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}var H="http://www.w3.org/1999/xhtml",z={},K=z.ELEMENT_NODE=1,V=z.ATTRIBUTE_NODE=2,W=z.TEXT_NODE=3,q=z.CDATA_SECTION_NODE=4,Y=z.ENTITY_REFERENCE_NODE=5,X=z.ENTITY_NODE=6,$=z.PROCESSING_INSTRUCTION_NODE=7,J=z.COMMENT_NODE=8,Q=z.DOCUMENT_NODE=9,ee=z.DOCUMENT_TYPE_NODE=10,te=z.DOCUMENT_FRAGMENT_NODE=11,ne=z.NOTATION_NODE=12,re={},ie={},oe=(re.INDEX_SIZE_ERR=(ie[1]="Index size error",1),re.DOMSTRING_SIZE_ERR=(ie[2]="DOMString size error",2),re.HIERARCHY_REQUEST_ERR=(ie[3]="Hierarchy request error",3)),ae=(re.WRONG_DOCUMENT_ERR=(ie[4]="Wrong document",4),re.INVALID_CHARACTER_ERR=(ie[5]="Invalid character",5),re.NO_DATA_ALLOWED_ERR=(ie[6]="No data allowed",6),re.NO_MODIFICATION_ALLOWED_ERR=(ie[7]="No modification allowed",7),re.NOT_FOUND_ERR=(ie[8]="Not found",8)),se=(re.NOT_SUPPORTED_ERR=(ie[9]="Not supported",9),re.INUSE_ATTRIBUTE_ERR=(ie[10]="Attribute in use",10));re.INVALID_STATE_ERR=(ie[11]="Invalid state",11),re.SYNTAX_ERR=(ie[12]="Syntax error",12),re.INVALID_MODIFICATION_ERR=(ie[13]="Invalid modification",13),re.NAMESPACE_ERR=(ie[14]="Invalid namespace",14),re.INVALID_ACCESS_ERR=(ie[15]="Invalid access",15);i.prototype=Error.prototype,n(re,i),o.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)F(this[r],n,e,t);return n.join("")}},a.prototype.item=function(e){return s(this),this[e]},r(a,o),u.prototype={length:0,item:o.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new i(se);var n=this.getNamedItem(e.nodeName);return c(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new i(se);return t=this.getNamedItemNS(e.namespaceURI,e.localName),c(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return l(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return l(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},h.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new m;if(r.implementation=this,r.childNodes=new o,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new P;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},d.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return _(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return w(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return B(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==W&&e.nodeType==W?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(z,d),n(z,d.prototype),m.prototype={nodeName:"#document",nodeType:Q,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==K&&(this.documentElement=e),_(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),w(this,e)},importNode:function(e,t){return U(this,e,t)},getElementById:function(e){var t=null;return v(this.documentElement,function(n){if(n.nodeType==K&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new k;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new o,(t.attributes=new u)._ownerElement=t,t},createDocumentFragment:function(){var e=new M;return e.ownerDocument=this,e.childNodes=new o,e},createTextNode:function(e){var t=new E;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new T;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new A;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new S;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new C;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new k,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new o,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new S,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(m,d),k.prototype={nodeType:K,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):x(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new a(this,function(t){var n=[];return v(t,function(r){r===t||r.nodeType!=K||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new a(this,function(n){var r=[];return v(n,function(i){i===n||i.nodeType!==K||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},m.prototype.getElementsByTagName=k.prototype.getElementsByTagName,m.prototype.getElementsByTagNameNS=k.prototype.getElementsByTagNameNS,r(k,d),S.prototype.nodeType=V,r(S,d),O.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[oe])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(O,d),E.prototype={nodeName:"#text",nodeType:W,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(E,O),T.prototype={nodeName:"#comment",nodeType:J},r(T,O),A.prototype={nodeName:"#cdata-section",nodeType:q},r(A,O),P.prototype.nodeType=ee,r(P,d),N.prototype.nodeType=ne,r(N,d),I.prototype.nodeType=X,r(I,d),C.prototype.nodeType=Y,r(C,d),M.prototype.nodeName="#document-fragment",M.prototype.nodeType=te,r(M,d),D.prototype.nodeType=$,r(D,d),j.prototype.serializeToString=function(e,t,n){return R.call(e,t,n)},d.prototype.toString=R;try{Object.defineProperty&&(Object.defineProperty(a.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return Z(this)},set:function(e){switch(this.nodeType){case K:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),G=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=h,t.XMLSerializer=j},function(e,t,n){"use strict";function r(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=void 0,a=0,s=0;a<e.length;++a,s+=3)o=256-e[a]/t*256,i[s]=o,i[s+1]=o,i[s+2]=o;return i}function i(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=void 0,a=0,s=0;a<e.length;++a,s+=3)o=e[a]/t*256,i[s]=o,i[s+1]=o,i[s+2]=o;return i}function o(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=t.length/3,a=t.length/3*2,s=0,u=0;s<e.length;++s,u+=3){var f=e[s];i[u]=t[f]/65536*256,i[u+1]=t[f+o]/65536*256,i[u+2]=t[f+a]/65536*256}return i}function a(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,o=0;i<e.length;i+=4,o+=3){var a=e[i],s=e[i+1],u=e[i+2],f=e[i+3];r[o]=(255-a)/256*255*((255-f)/256),r[o+1]=(255-s)/256*255*((255-f)/256),r[o+2]=(255-u)/256*255*((255-f)/256)}return r}function s(e){for(var t=e.width,n=e.height,r=new Uint8ClampedArray(t*n*3),i=0,o=0;i<e.length;i+=3,o+=3){var a=e[i],s=e[i+1],u=e[i+2];r[o]=a+1.402*(u-128),r[o+1]=a-.34414*(s-128)-.71414*(u-128),r[o+2]=a+1.772*(s-128)}return r}function u(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,o=0;i<e.length;i+=3,o+=3){var a=e[i+0],s=e[i+1]<<24>>24,u=e[i+2]<<24>>24,h=(a+16)/116,d=s/500+h,p=h-u/200,v=void 0,m=void 0,y=void 0;d=f*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),h=c*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),p=l*(p*p*p>.008856?p*p*p:(p-16/116)/7.787),v=3.2406*d+-1.5372*h+-.4986*p,m=-.9689*d+1.8758*h+.0415*p,y=.0557*d+-.204*h+1.057*p,v=v>.0031308?1.055*Math.pow(v,1/2.4)-.055:12.92*v,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:12.92*m,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:12.92*y,r[o]=255*Math.max(0,Math.min(1,v)),r[o+1]=255*Math.max(0,Math.min(1,m)),r[o+2]=255*Math.max(0,Math.min(1,y))}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.fromWhiteIsZero=r,t.fromBlackIsZero=i,t.fromPalette=o,t.fromCMYK=a,t.fromYCbCr=s,t.fromCIELab=u;var f=.95047,c=1,l=1.08883},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&f.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return f.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(149),f=n(152);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var c=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),v=["'"].concat(p),m=["%","/","?",";","#"].concat(v),y=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=n(153);r.prototype.parse=function(e,t,n){if(!f.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var l=h.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],this.query=t?k.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var d=c.exec(s);if(d){d=d[0];var p=d.toLowerCase();this.protocol=p,s=s.substr(d.length)}if(n||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===s.substr(0,2);!S||d&&_[d]||(s=s.substr(2),this.slashes=!0)}if(!_[d]&&(S||d&&!x[d])){for(var O=-1,E=0;E<y.length;E++){var T=s.indexOf(y[E]);-1!==T&&(-1===O||T<O)&&(O=T)}var A,P;P=-1===O?s.lastIndexOf("@"):s.lastIndexOf("@",O),-1!==P&&(A=s.slice(0,P),s=s.slice(P+1),this.auth=decodeURIComponent(A)),O=-1;for(var E=0;E<m.length;E++){var T=s.indexOf(m[E]);-1!==T&&(-1===O||T<O)&&(O=T)}-1===O&&(O=s.length),this.host=s.slice(0,O),s=s.slice(O),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var I=this.hostname.split(/\./),E=0,C=I.length;E<C;E++){var M=I[E];if(M&&!M.match(b)){for(var D="",j=0,R=M.length;j<R;j++)M.charCodeAt(j)>127?D+="x":D+=M[j];if(!D.match(b)){var L=I.slice(0,E),F=I.slice(E+1),U=M.match(g);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(s="/"+F.join(".")+s),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=u.toASCII(this.hostname));var B=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+B,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[p])for(var E=0,C=v.length;E<C;E++){var Z=v[E];if(-1!==s.indexOf(Z)){var H=encodeURIComponent(Z);H===Z&&(H=escape(Z)),s=s.split(Z).join(H)}}var z=s.indexOf("#");-1!==z&&(this.hash=s.substr(z),s=s.slice(0,z));var K=s.indexOf("?");if(-1!==K?(this.search=s.substr(K),this.query=s.substr(K+1),t&&(this.query=k.parse(this.query)),s=s.slice(0,K)):t&&(this.search="",this.query={}),s&&(this.pathname=s),x[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",V=this.search||"";this.path=B+V}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(o=k.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||x[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+n+a+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(f.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(n[c]=e[c])}return x[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!x[e.protocol]){for(var l=Object.keys(e),h=0;h<l.length;h++){var d=l[h];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||_[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var v=n.pathname||"",m=n.search||"";n.path=v+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=b||y||n.host&&e.pathname,w=g,k=n.pathname&&n.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],S=n.protocol&&!x[n.protocol];if(S&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),g=g&&(""===p[0]||""===k[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),n.search=e.search,n.query=e.query;else if(!f.isNullOrUndefined(e.search)){if(S){n.hostname=n.host=k.shift();var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return n.search=e.search,n.query=e.query,f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=k.slice(-1)[0],T=(n.host||e.host||k.length>1)&&("."===E||".."===E)||""===E,A=0,P=k.length;P>=0;P--)E=k[P],"."===E?k.splice(P,1):".."===E?(k.splice(P,1),A++):A&&(k.splice(P,1),A--);if(!g&&!w)for(;A--;A)k.unshift("..");!g||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),T&&"/"!==k.join("/").substr(-1)&&k.push("");var N=""===k[0]||k[0]&&"/"===k[0].charAt(0);if(S){n.hostname=n.host=N?"":k.length?k.shift():"";var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return g=g||n.host&&k.length,g&&!N&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(67);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e){switch(e){case x.fieldTypes.BYTE:case x.fieldTypes.ASCII:case x.fieldTypes.SBYTE:case x.fieldTypes.UNDEFINED:return 1;case x.fieldTypes.SHORT:case x.fieldTypes.SSHORT:return 2;case x.fieldTypes.LONG:case x.fieldTypes.SLONG:case x.fieldTypes.FLOAT:return 4;case x.fieldTypes.RATIONAL:case x.fieldTypes.SRATIONAL:case x.fieldTypes.DOUBLE:case x.fieldTypes.LONG8:case x.fieldTypes.SLONG8:case x.fieldTypes.IFD8:return 8;default:throw new RangeError("Invalid field type: "+e)}}function a(e){var t=e.GeoKeyDirectory;if(!t)return null;for(var n={},r=4;r<=4*t[3];r+=4){var i=x.geoKeyNames[t[r]],o=t[r+1]?x.fieldTagNames[t[r+1]]:null,a=t[r+2],s=t[r+3],u=null;if(o){if(void 0===(u=e[o])||null===u)throw new Error("Could not get value of geoKey '"+i+"'.");"string"==typeof u?u=u.substring(s,s+a-1):u.subarray&&(u=u.subarray(s,s+a-1))}else u=s;n[i]=u}return n}function s(e,t,n,r){var i=null,a=null,s=o(t);switch(t){case x.fieldTypes.BYTE:case x.fieldTypes.ASCII:case x.fieldTypes.UNDEFINED:i=new Uint8Array(n),a=e.readUint8;break;case x.fieldTypes.SBYTE:i=new Int8Array(n),a=e.readInt8;break;case x.fieldTypes.SHORT:i=new Uint16Array(n),a=e.readUint16;break;case x.fieldTypes.SSHORT:i=new Int16Array(n),a=e.readInt16;break;case x.fieldTypes.LONG:i=new Uint32Array(n),a=e.readUint32;break;case x.fieldTypes.SLONG:i=new Int32Array(n),a=e.readInt32;break;case x.fieldTypes.LONG8:case x.fieldTypes.IFD8:i=new Array(n),a=e.readUint64;break;case x.fieldTypes.SLONG8:i=new Array(n),a=e.readInt64;break;case x.fieldTypes.RATIONAL:i=new Uint32Array(2*n),a=e.readUint32;break;case x.fieldTypes.SRATIONAL:i=new Int32Array(2*n),a=e.readInt32;break;case x.fieldTypes.FLOAT:i=new Float32Array(n),a=e.readFloat32;break;case x.fieldTypes.DOUBLE:i=new Float64Array(n),a=e.readFloat64;break;default:throw new RangeError("Invalid field type: "+t)}if(t!==x.fieldTypes.RATIONAL&&t!==x.fieldTypes.SRATIONAL)for(var u=0;u<n;++u)i[u]=a.call(e,r+u*s);else for(var f=0;f<n;f+=2)i[f]=a.call(e,r+f*s),i[f+1]=a.call(e,r+(f*s+4));return t===x.fieldTypes.ASCII?String.fromCharCode.apply(null,i):i}Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.writeArrayBuffer=t.fromUrls=t.fromBlob=t.fromFile=t.fromArrayBuffer=t.fromUrl=t.MultiGeoTIFF=t.GeoTIFF=t.rgb=t.globals=void 0;var u=n(12),f=i(u),c=n(15),l=i(c),h=n(27),d=i(h),p=n(44),v=i(p),m=n(28),y=i(m),b=n(3),g=i(b),w=n(4),_=i(w),x=(t.fromUrl=function(){var e=(0,y.default)(d.default.mark(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,N.makeRemoteSource)(t,n)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromArrayBuffer=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,N.makeBufferSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromFile=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,N.makeFileSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromBlob=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,N.makeFileReaderSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromUrls=function(){var e=(0,y.default)(d.default.mark(function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L.fromSource((0,N.makeRemoteSource)(t,o));case 2:return n=e.sent,e.next=5,Promise.all(i.map(function(e){return L.fromSource((0,N.makeRemoteSource)(e,o))}));case 5:return r=e.sent,e.abrupt("return",new F(n,r));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.writeArrayBuffer=function(){var e=(0,y.default)(d.default.mark(function e(t,n){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,M.writeGeotiff)(t,n));case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),n(47)),k=r(x),S=n(125),O=i(S),E=n(145),T=i(E),A=n(146),P=i(A),N=n(147),I=n(156),C=i(I),M=n(159),D=n(64),j=r(D);t.globals=k,t.rgb=j;var R=function(){function e(){(0,g.default)(this,e)}return(0,_.default)(e,[{key:"readRasters",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t,n,r,i,o,a,s,u,f,c,l,h,p,m,y,b,g,w,_,x,k,S,O,E,T,A,P,N,I,C,M,D,j,R,L,F,U,B,G=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=G.window,n=G.width,r=G.height,i=G.resX,o=G.resY,a=G.bbox,e.next=4,this.getImage();case 4:return s=e.sent,u=s,e.next=8,this.getImageCount();case 8:if(f=e.sent,c=s.getBoundingBox(),!t||!a){e.next=12;break}throw new Error('Both "bbox" and "window" passed.');case 12:if(!n&&!r){e.next=23;break}if(t&&(l=s.getOrigin(),h=(0,v.default)(l,2),p=h[0],m=h[1],y=s.getResolution(),b=(0,v.default)(y,2),g=b[0],w=b[1],a=[p+t[0]*g,m+t[1]*w,p+t[2]*g,m+t[3]*w]),_=a||c,!n){e.next=19;break}if(!i){e.next=18;break}throw new Error("Both width and resX passed");case 18:i=(_[2]-_[0])/n;case 19:if(!r){e.next=23;break}if(!o){e.next=22;break}throw new Error("Both width and resY passed");case 22:o=(_[3]-_[1])/r;case 23:if(!i&&!o){e.next=47;break}x=[],k=0;case 26:if(!(k<f)){e.next=35;break}return e.next=29,this.getImage(k);case 29:S=e.sent,O=S.fileDirectory,E=O.SubfileType,T=O.NewSubfileType,(0===k||2===E||1&T)&&x.push(S);case 32:++k,e.next=26;break;case 35:x.sort(function(e,t){return e.getWidth()-t.getWidth()}),A=0;case 37:if(!(A<x.length)){e.next=47;break}if(P=x[A],N=(c[2]-c[0])/P.getWidth(),I=(c[3]-c[1])/P.getHeight(),u=P,!(i&&i>N||o&&o>I)){e.next=44;break}return e.abrupt("break",47);case 44:++A,e.next=37;break;case 47:return C=t,a&&(M=s.getOrigin(),D=(0,v.default)(M,2),j=D[0],R=D[1],L=u.getResolution(s),F=(0,v.default)(L,2),U=F[0],B=F[1],C=[Math.round((a[0]-j)/U),Math.round((a[1]-R)/B),Math.round((a[2]-j)/U),Math.round((a[3]-R)/B)],C=[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]),e.abrupt("return",u.readRasters(Object.assign({},G,{window:C})));case 50:case"end":return e.stop()}},e,this)}));return e}()}]),e}(),L=function(e){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,g.default)(this,t);var a=(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.source=e,a.littleEndian=n,a.bigTiff=r,a.firstIFDOffset=i,a.cache=o.cache||!1,a.fileDirectories=null,a.fileDirectoriesParsing=null,a}return(0,l.default)(t,e),(0,_.default)(t,[{key:"getSlice",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(t,n){var r;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.bigTiff?4048:1024,e.t0=P.default,e.next=4,this.source.fetch(t,void 0!==n?n:r);case 4:return e.t1=e.sent,e.t2=t,e.t3=this.littleEndian,e.t4=this.bigTiff,e.abrupt("return",new e.t0(e.t1,e.t2,e.t3,e.t4));case 9:case"end":return e.stop()}},e,this)}));return e}()},{key:"parseFileDirectories",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t,n,r,i,u,f,c,l,h,p,v,m,y,b,g,w,_,k,S,O;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this.firstIFDOffset,n=this.bigTiff?8:2,r=this.bigTiff?20:12,i=[];case 4:if(0===t){e.next=48;break}return e.next=7,this.getSlice(t);case 7:if(u=e.sent,f=this.bigTiff?u.readUint64(t):u.readUint16(t),c=f*r+(this.bigTiff?16:6),u.covers(t,c)){e.next=14;break}return e.next=13,this.getSlice(t,c);case 13:u=e.sent;case 14:l={},h=t+(this.bigTiff?8:2),p=0;case 17:if(!(p<f)){e.next=44;break}if(v=u.readUint16(h),m=u.readUint16(h+2),y=this.bigTiff?u.readUint64(h+4):u.readUint32(h+4),b=void 0,g=void 0,w=o(m),_=h+(this.bigTiff?12:8),!(w*y<=(this.bigTiff?8:4))){e.next=29;break}b=s(u,m,y,_),e.next=39;break;case 29:if(k=u.readOffset(_),S=o(m)*y,!u.covers(k,S)){e.next=35;break}b=s(u,m,y,k),e.next=39;break;case 35:return e.next=37,this.getSlice(k,S);case 37:O=e.sent,b=s(O,m,y,k);case 39:g=1===y&&-1===x.arrayFields.indexOf(v)&&m!==x.fieldTypes.RATIONAL&&m!==x.fieldTypes.SRATIONAL?b[0]:b,l[x.fieldTagNames[v]]=g;case 41:h+=r,++p,e.next=17;break;case 44:i.push([l,a(l)]),t=u.readOffset(t+n+r*f),e.next=4;break;case 48:return e.abrupt("return",i);case 49:case"end":return e.stop()}},e,this)}));return e}()},{key:"getImage",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.fileDirectories){e.next=5;break}return this.fileDirectoriesParsing||(this.fileDirectoriesParsing=this.parseFileDirectories()),e.next=4,this.fileDirectoriesParsing;case 4:this.fileDirectories=e.sent;case 5:if(t=this.fileDirectories[n]){e.next=8;break}throw new RangeError("Invalid image index");case 8:return e.abrupt("return",new O.default(t[0],t[1],this.dataView,this.littleEndian,this.cache,this.source));case 9:case"end":return e.stop()}},e,this)}));return e}()},{key:"getImageCount",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.fileDirectories){e.next=5;break}return this.fileDirectoriesParsing||(this.fileDirectoriesParsing=this.parseFileDirectories()),e.next=4,this.fileDirectoriesParsing;case 4:this.fileDirectories=e.sent;case 5:return e.abrupt("return",this.fileDirectories.length);case 6:case"end":return e.stop()}},e,this)}));return e}()}],[{key:"fromSource",value:function(){function e(e,t){return n.apply(this,arguments)}var n=(0,y.default)(d.default.mark(function e(n,r){var i,o,a,s,u,f,c,l;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.fetch(0,1024);case 2:if(i=e.sent,o=new T.default(i),a=o.getUint16(0,0),s=void 0,18761!==a){e.next=10;break}s=!0,e.next=15;break;case 10:if(19789!==a){e.next=14;break}s=!1,e.next=15;break;case 14:throw new TypeError("Invalid byte order value.");case 15:if(u=o.getUint16(2,s),f=void 0,42!==u){e.next=21;break}f=!1,e.next=29;break;case 21:if(43!==u){e.next=28;break}if(f=!0,8===(c=o.getUint16(4,s))){e.next=26;break}throw new Error("Unsupported offset byte-size.");case 26:e.next=29;break;case 28:throw new TypeError("Invalid magic number.");case 29:return l=f?o.getUint64(8,s):o.getUint32(4,s),e.abrupt("return",new t(n,s,f,l,r));case 31:case"end":return e.stop()}},e,this)}));return e}()}]),t}(R);t.GeoTIFF=L,t.default=L;var F=function(e){function t(e,n){(0,g.default)(this,t);var r=(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.mainFile=e,r.overviewFiles=n,r.imageFiles=[e].concat(n),r.fileDirectoriesPerFile=null,r.fileDirectoriesPerFileParsing=null,r.imageCount=null,r}return(0,l.default)(t,e),(0,_.default)(t,[{key:"parseFileDirectoriesPerFile",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=[this.mainFile.parseFileDirectories()].concat(this.overviewFiles.map(function(e){return e.parseFileDirectories()})),e.next=3,Promise.all(t);case 3:return this.fileDirectoriesPerFile=e.sent,e.abrupt("return",this.fileDirectoriesPerFile);case 5:case"end":return e.stop()}},e,this)}));return e}()},{key:"getImage",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t,n,r,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.fileDirectoriesPerFile){e.next=5;break}return this.fileDirectoriesPerFileParsing||(this.fileDirectoriesPerFileParsing=this.parseFileDirectoriesPerFile()),e.next=4,this.fileDirectoriesPerFileParsing;case 4:this.fileDirectoriesPerFile=e.sent;case 5:t=o,n=0;case 7:if(!(n<this.fileDirectoriesPerFile.length)){e.next=16;break}if(r=this.fileDirectoriesPerFile[n],!(t<r.length)){e.next=12;break}return i=this.imageFiles[n],e.abrupt("return",new O.default(r[t][0],r[t][1],i.dataView,i.littleEndian,i.cache,i.source));case 12:t-=r.length;case 13:++n,e.next=7;break;case 16:throw new RangeError("Invalid image index");case 17:case"end":return e.stop()}},e,this)}));return e}()},{key:"getImageCount",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.fileDirectoriesPerFile){e.next=5;break}return this.fileDirectoriesPerFileParsing||(this.fileDirectoriesPerFileParsing=this.parseFileDirectoriesPerFile()),e.next=4,this.fileDirectoriesPerFileParsing;case 4:this.fileDirectoriesPerFile=e.sent;case 5:return e.abrupt("return",this.fileDirectoriesPerFile.reduce(function(e,t){return e+t.length},0));case 6:case"end":return e.stop()}},e,this)}));return e}()}]),t}(R);t.MultiGeoTIFF=F,t.Pool=C.default},function(e,t,n){e.exports={default:n(69),__esModule:!0}},function(e,t,n){n(20),n(26),e.exports=n(41).f("iterator")},function(e,t,n){var r=n(32),i=n(33);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),f=s.length;return u<0||u>=f?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===f||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},function(e,t,n){"use strict";var r=n(36),i=n(23),o=n(25),a={};n(10)(a,n(2)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(7),i=n(5),o=n(37);e.exports=n(9)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(18);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(14),i=n(52),o=n(75);e.exports=function(e){return function(t,n,a){var s,u=r(t),f=i(u.length),c=o(a,f);if(e&&n!=n){for(;f>c;)if((s=u[c++])!=s)return!0}else for(;f>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(32),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(11),i=n(77),o=n(38)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(33);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(79),i=n(80),o=n(13),a=n(14);e.exports=n(48)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(82),__esModule:!0}},function(e,t,n){n(83),n(57),n(88),n(89),e.exports=n(1).Symbol},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(9),a=n(6),s=n(50),u=n(84).KEY,f=n(22),c=n(39),l=n(25),h=n(24),d=n(2),p=n(41),v=n(42),m=n(85),y=n(86),b=n(5),g=n(8),w=n(14),_=n(35),x=n(23),k=n(36),S=n(87),O=n(56),E=n(7),T=n(37),A=O.f,P=E.f,N=S.f,I=r.Symbol,C=r.JSON,M=C&&C.stringify,D=d("_hidden"),j=d("toPrimitive"),R={}.propertyIsEnumerable,L=c("symbol-registry"),F=c("symbols"),U=c("op-symbols"),B=Object.prototype,G="function"==typeof I,Z=r.QObject,H=!Z||!Z.prototype||!Z.prototype.findChild,z=o&&f(function(){return 7!=k(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=A(B,t);r&&delete B[t],P(e,t,n),r&&e!==B&&P(B,t,r)}:P,K=function(e){var t=F[e]=k(I.prototype);return t._k=e,t},V=G&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},W=function(e,t,n){return e===B&&W(U,t,n),b(e),t=_(t,!0),b(n),i(F,t)?(n.enumerable?(i(e,D)&&e[D][t]&&(e[D][t]=!1),n=k(n,{enumerable:x(0,!1)})):(i(e,D)||P(e,D,x(1,{})),e[D][t]=!0),z(e,t,n)):P(e,t,n)},q=function(e,t){b(e);for(var n,r=m(t=w(t)),i=0,o=r.length;o>i;)W(e,n=r[i++],t[n]);return e},Y=function(e,t){return void 0===t?k(e):q(k(e),t)},X=function(e){var t=R.call(this,e=_(e,!0));return!(this===B&&i(F,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,D)&&this[D][e])||t)},$=function(e,t){if(e=w(e),t=_(t,!0),e!==B||!i(F,t)||i(U,t)){var n=A(e,t);return!n||!i(F,t)||i(e,D)&&e[D][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=N(w(e)),r=[],o=0;n.length>o;)i(F,t=n[o++])||t==D||t==u||r.push(t);return r},Q=function(e){for(var t,n=e===B,r=N(n?U:w(e)),o=[],a=0;r.length>a;)!i(F,t=r[a++])||n&&!i(B,t)||o.push(F[t]);return o};G||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(U,n),i(this,D)&&i(this[D],e)&&(this[D][e]=!1),z(this,e,x(1,n))};return o&&H&&z(B,e,{configurable:!0,set:t}),K(e)},s(I.prototype,"toString",function(){return this._k}),O.f=$,E.f=W,n(55).f=S.f=J,n(43).f=X,n(54).f=Q,o&&!n(16)&&s(B,"propertyIsEnumerable",X,!0),p.f=function(e){return K(d(e))}),a(a.G+a.W+a.F*!G,{Symbol:I});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=T(d.store),re=0;ne.length>re;)v(ne[re++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(L,e+="")?L[e]:L[e]=I(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!G,"Object",{create:Y,defineProperty:W,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),C&&a(a.S+a.F*(!G||f(function(){var e=I();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(g(t)||void 0!==e)&&!V(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!V(t))return t}),r[1]=t,M.apply(C,r)}}),I.prototype[j]||n(10)(I.prototype,j,I.prototype.valueOf),l(I,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(24)("meta"),i=n(8),o=n(11),a=n(7).f,s=0,u=Object.isExtensible||function(){return!0},f=!n(22)(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},l=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},h=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return f&&p.NEED&&u(e)&&!o(e,r)&&c(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:l,getWeak:h,onFreeze:d}},function(e,t,n){var r=n(37),i=n(54),o=n(43);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,f=0;s.length>f;)u.call(e,a=s[f++])&&t.push(a);return t}},function(e,t,n){var r=n(18);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(14),i=n(55).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},function(e,t,n){n(42)("asyncIterator")},function(e,t,n){n(42)("observable")},function(e,t,n){e.exports={default:n(91),__esModule:!0}},function(e,t,n){n(92),e.exports=n(1).Object.setPrototypeOf},function(e,t,n){var r=n(6);r(r.S,"Object",{setPrototypeOf:n(93).set})},function(e,t,n){var r=n(8),i=n(5),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(17)(Function.call,n(56).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(95),__esModule:!0}},function(e,t,n){n(96);var r=n(1).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(6);r(r.S,"Object",{create:n(36)})},function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(98),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new d(r||[]);return a._invoke=f(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function t(n,i,o,a){var s=r(e[n],e,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&b.call(f,"__await")?Promise.resolve(f.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(f).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function n(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return i=i?i.then(r,r):r()}var i;this._invoke=n}function f(e,t,n){var i=O;return function(o,a){if(i===T)throw new Error("Generator is already running");if(i===A){if("throw"===o)throw a;return v()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=c(s,n);if(u){if(u===P)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===O)throw i=A,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=T;var f=r(e,t,n);if("normal"===f.type){if(i=n.done?A:E,f.arg===P)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(i=A,n.method="throw",n.arg=f.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===m){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=m,c(e,t),"throw"===t.method))return P;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,P;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=m),t.delegate=null,P):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,P)}function l(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function h(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(l,this),this.reset(!0)}function p(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=m,t.done=!0,t};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,y=Object.prototype,b=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},w=g.iterator||"@@iterator",_=g.asyncIterator||"@@asyncIterator",x=g.toStringTag||"@@toStringTag",k="object"==typeof e,S=t.regeneratorRuntime;if(S)return void(k&&(e.exports=S));S=t.regeneratorRuntime=k?e.exports:{},S.wrap=n;var O="suspendedStart",E="suspendedYield",T="executing",A="completed",P={},N={};N[w]=function(){return this};var I=Object.getPrototypeOf,C=I&&I(I(p([])));C&&C!==y&&b.call(C,w)&&(N=C);var M=a.prototype=i.prototype=Object.create(N);o.prototype=M.constructor=a,a.constructor=o,a[x]=o.displayName="GeneratorFunction",S.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},S.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(M),e},S.awrap=function(e){return{__await:e}},s(u.prototype),u.prototype[_]=function(){return this},S.AsyncIterator=u,S.async=function(e,t,r,i){var o=new u(n(e,t,r,i));return S.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},s(M),M[x]="Generator",M[w]=function(){return this},M.toString=function(){return"[object Generator]"},S.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},S.values=p,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(h),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=m)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=b.call(i,"catchLoc"),s=b.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,P):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),P},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),h(n),P}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=m),P}}}(function(){return this}()||Function("return this")())},function(e,t,n){e.exports={default:n(100),__esModule:!0}},function(e,t,n){n(26),n(20),e.exports=n(101)},function(e,t,n){var r=n(45),i=n(2)("iterator"),o=n(13);e.exports=n(1).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(103),__esModule:!0}},function(e,t,n){n(26),n(20),e.exports=n(104)},function(e,t,n){var r=n(5),i=n(58);e.exports=n(1).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){e.exports={default:n(106),__esModule:!0}},function(e,t,n){n(57),n(20),n(26),n(107),n(118),n(119),e.exports=n(1).Promise},function(e,t,n){"use strict";var r,i,o,a,s=n(16),u=n(0),f=n(17),c=n(45),l=n(6),h=n(8),d=n(21),p=n(108),v=n(109),m=n(59),y=n(60).set,b=n(113)(),g=n(46),w=n(61),_=n(114),x=n(62),k=u.TypeError,S=u.process,O=S&&S.versions,E=O&&O.v8||"",T=u.Promise,A="process"==c(S),P=function(){},N=i=g.f,I=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n(2)("species")]=function(e){e(P,P)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==E.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(e){}}(),C=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},M=function(e,t){if(!e._n){e._n=!0;var n=e._c;b(function(){for(var r=e._v,i=1==e._s,o=0;n.length>o;)!function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,f=t.reject,c=t.domain;try{s?(i||(2==e._h&&R(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===t.promise?f(k("Promise-chain cycle")):(o=C(n))?o.call(n,u,f):u(n)):f(r)}catch(e){c&&!a&&c.exit(),f(e)}}(n[o++]);e._c=[],e._n=!1,t&&!e._h&&D(e)})}},D=function(e){y.call(u,function(){var t,n,r,i=e._v,o=j(e);if(o&&(t=w(function(){A?S.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=A||j(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},j=function(e){return 1!==e._h&&0===(e._a||e._c).length},R=function(e){y.call(u,function(){var t;A?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},L=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=C(e))?b(function(){var r={_w:n,_d:!1};try{t.call(e,f(F,r,1),f(L,r,1))}catch(e){L.call(r,e)}}):(n._v=e,n._s=1,M(n,!1))}catch(e){L.call({_w:n,_d:!1},e)}}};I||(T=function(e){p(this,T,"Promise","_h"),d(e),r.call(this);try{e(f(F,this,1),f(L,this,1))}catch(e){L.call(this,e)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(115)(T.prototype,{then:function(e,t){var n=N(m(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=A?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=f(F,e,1),this.reject=f(L,e,1)},g.f=N=function(e){return e===T||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!I,{Promise:T}),n(25)(T,"Promise"),n(116)("Promise"),a=n(1).Promise,l(l.S+l.F*!I,"Promise",{reject:function(e){var t=N(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!I),"Promise",{resolve:function(e){return x(s&&this===a?T:this,e)}}),l(l.S+l.F*!(I&&n(117)(function(e){T.all(e).catch(P)})),"Promise",{all:function(e){var t=this,n=N(t),r=n.resolve,i=n.reject,o=w(function(){var n=[],o=0,a=1;v(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=N(t),r=n.reject,i=w(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(17),i=n(110),o=n(111),a=n(5),s=n(52),u=n(58),f={},c={},t=e.exports=function(e,t,n,l,h){var d,p,v,m,y=h?function(){return e}:u(e),b=r(n,l,t?2:1),g=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(d=s(e.length);d>g;g++)if((m=t?b(a(p=e[g])[0],p[1]):b(e[g]))===f||m===c)return m}else for(v=y.call(e);!(p=v.next()).done;)if((m=i(v,b,p.value,t))===f||m===c)return m};t.BREAK=f,t.RETURN=c},function(e,t,n){var r=n(5);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(13),i=n(2)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(0),i=n(60).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(18)(a);e.exports=function(){var e,t,n,f=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(f)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(f)}}else n=function(){i.call(r,f)};else{var l=!0,h=document.createTextNode("");new o(f).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(0),i=r.navigator;e.exports=i&&i.userAgent||""},function(e,t,n){var r=n(10);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(7),a=n(9),s=n(2)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(2)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(6),i=n(1),o=n(0),a=n(59),s=n(62);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(6),i=n(46),o=n(61);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){e.exports={default:n(121),__esModule:!0}},function(e,t,n){n(122);var r=n(1).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(6);r(r.S+r.F*!n(9),"Object",{defineProperty:n(7).f})},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&a&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+s(n))}||function(){}}if(!e){if(t instanceof o)return t;e=t}var i={},a=e instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function o(){this.cdata=!1}function a(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function u(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function f(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new c,a=n.domBuilder||new o,s=n.errorHandler,u=n.locator,f=n.xmlns||{},l={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&a.setDocumentLocator(u),r.errorHandler=i(s,a,u),r.domBuilder=n.domBuilder||a,/\/x?html?$/.test(t)&&(l.nbsp=" ",l.copy="©",f[""]="http://www.w3.org/1999/xhtml"),f.xml=f.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,f,l):r.errorHandler.error("invalid doc source"),a.doc},o.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,o=i.createElementNS(e,n||t),s=r.length;f(this,o),this.currentElement=o,this.locator&&a(this.locator,o);for(var u=0;u<s;u++){var e=r.getURI(u),c=r.getValue(u),n=r.getQName(u),l=i.createAttributeNS(e,n);this.locator&&a(r.getLocator(u),l),l.value=l.nodeValue=c,o.setAttributeNode(l)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),f(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=u.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&a(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=u.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&a(this.locator,r),f(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&a(this.locator,i),f(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,s(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,s(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,s(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){o.prototype[e]=function(){return null}});var c=n(124).XMLReader,l=t.DOMImplementation=n(63).DOMImplementation;t.XMLSerializer=n(63).XMLSerializer,t.DOMParser=r},function(e,t){function n(){}function r(e,t,n,r,f){function d(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function p(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?d(parseInt(t.substr(1).replace("x","0x"))):(f.error("entity not found:"+e),e)}function v(t){if(t>k){var n=e.substring(k,t).replace(/&#?\w+;/g,p);w&&m(k),r.characters(n,0,t-k),k=t}}function m(t,n){for(;t>=b&&(n=g.exec(e));)y=n.index,b=y+n[0].length,w.lineNumber++;w.columnNumber=t-y+1}for(var y=0,b=0,g=/.*(?:\r\n?|\n)|.*$/g,w=r.locator,_=[{currentNSMap:t}],x={},k=0;;){try{var S=e.indexOf("<",k);if(S<0){if(!e.substr(k).match(/^\s*$/)){var O=r.doc,E=O.createTextNode(e.substr(k));O.appendChild(E),r.currentElement=E}return}switch(S>k&&v(S),e.charAt(S+1)){case"/":var T=e.indexOf(">",S+3),A=e.substring(S+2,T),P=_.pop();T<0?(A=e.substring(S+2).replace(/[\s<].*/,""),f.error("end tag name: "+A+" is not complete:"+P.tagName),T=S+1+A.length):A.match(/\s</)&&(A=A.replace(/[\s<].*/,""),f.error("end tag name: "+A+" maybe not complete"),T=S+1+A.length);var N=P.localNSMap,I=P.tagName==A;if(I||P.tagName&&P.tagName.toLowerCase()==A.toLowerCase()){if(r.endElement(P.uri,P.localName,A),N)for(var C in N)r.endPrefixMapping(C);I||f.fatalError("end tag name: "+A+" is not match the current start tagName:"+P.tagName)}else _.push(P);T++;break;case"?":w&&m(S),T=l(e,S,r);break;case"!":w&&m(S),T=c(e,S,r,f);break;default:w&&m(S);var M=new h,D=_[_.length-1].currentNSMap,T=o(e,S,M,D,p,f),j=M.length;if(!M.closed&&u(e,T,M.tagName,x)&&(M.closed=!0,n.nbsp||f.warning("unclosed xml attribute")),w&&j){for(var R=i(w,{}),L=0;L<j;L++){var F=M[L];m(F.offset),F.locator=i(w,{})}r.locator=R,a(M,r,D)&&_.push(M),r.locator=w}else a(M,r,D)&&_.push(M);"http://www.w3.org/1999/xhtml"!==M.uri||M.closed?T++:T=s(e,T,M.tagName,p,r)}}catch(e){f.error("element parse error: "+e),T=-1}T>k?k=T:v(Math.max(S,k)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function o(e,t,n,r,i,o){for(var a,s,u=++t,f=b;;){var c=e.charAt(u);switch(c){case"=":if(f===g)a=e.slice(t,u),f=_;else{if(f!==w)throw new Error("attribute equal must after attrName");f=_}break;case"'":case'"':if(f===_||f===g){if(f===g&&(o.warning('attribute value must after "="'),a=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(a,s,t-1),f=k}else{if(f!=x)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(a,s,t),o.warning('attribute "'+a+'" missed start quot('+c+")!!"),t=u+1,f=k}break;case"/":switch(f){case b:n.setTagName(e.slice(t,u));case k:case S:case O:f=O,n.closed=!0;case x:case g:case w:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),f==b&&n.setTagName(e.slice(t,u)),u;case">":switch(f){case b:n.setTagName(e.slice(t,u));case k:case S:case O:break;case x:case g:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case w:f===w&&(s=a),f==x?(o.warning('attribute "'+s+'" missed quot(")!!'),n.add(a,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case _:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(f){case b:n.setTagName(e.slice(t,u)),f=S;break;case g:a=e.slice(t,u),f=w;break;case x:var s=e.slice(t,u).replace(/&#?\w+;/g,i);o.warning('attribute "'+s+'" missed quot(")!!'),n.add(a,s,t);case k:f=S}else switch(f){case w:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=u,f=g;break;case k:o.warning('attribute space is required"'+a+'"!!');case S:f=g,t=u;break;case _:f=x,t=u;break;case O:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function a(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value,c=s.indexOf(":");if(c>0)var l=a.prefix=s.slice(0,c),h=s.slice(c+1),d="xmlns"===l&&h;else h=s,l=null,d="xmlns"===s&&"";a.localName=h,!1!==d&&(null==i&&(i={},f(n,n={})),n[d]=i[d]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(var o=e.length;o--;){a=e[o];var l=a.prefix;l&&("xml"===l&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(a.uri=n[l||""]))}var c=r.indexOf(":");c>0?(l=e.prefix=r.slice(0,c),h=e.localName=r.slice(c+1)):(l=null,h=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,h,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,h,r),i)for(l in i)t.endPrefixMapping(l)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf("</"+n+">"),i<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function c(e,t,n,r){switch(e.charAt(t+2)){case"-":if("-"===e.charAt(t+3)){var i=e.indexOf("--\x3e",t+4);return i>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=p(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],f=a>4&&o[4][0],c=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),f&&f.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function l(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function h(e){}function d(e,t){return e.__proto__=t,e}function p(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var v=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=new RegExp("[\\-\\.0-9"+v.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),y=new RegExp("^"+v.source+m.source+"*(?::"+v.source+m.source+"*)?$"),b=0,g=1,w=2,_=3,x=4,k=5,S=6,O=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),f(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},h.prototype={setTagName:function(e){if(!y.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!y.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},d({},d.prototype)instanceof d||(d=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){for(var r=0,i=t;i<n;++i)r+=e[i];return r}function o(e,t,n){switch(e){case 1:switch(t){case 8:return new Uint8Array(n);case 16:return new Uint16Array(n);case 32:return new Uint32Array(n)}break;case 2:switch(t){case 8:return new Int8Array(n);case 16:return new Int16Array(n);case 32:return new Int32Array(n)}break;case 3:switch(t){case 32:return new Float32Array(n);case 64:return new Float64Array(n)}}throw Error("Unsupported data format/bitsPerSample")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(44),s=r(a),u=n(27),f=r(u),c=n(28),l=r(c),h=n(3),d=r(h),p=n(4),v=r(p),m=n(47),y=n(64),b=n(126),g=n(144),w=function(){function e(t,n,r,i,o,a){(0,d.default)(this,e),this.fileDirectory=t,this.geoKeys=n,this.dataView=r,this.littleEndian=i,this.tiles=o?{}:null,this.isTiled=!t.StripOffsets;var s=t.PlanarConfiguration;if(this.planarConfiguration=void 0===s?1:s,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=a}return(0,v.default)(e,[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return this.fileDirectory.SamplesPerPixel}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBytesPerPixel",value:function(){for(var e=0,t=0;t<this.fileDirectory.BitsPerSample.length;++t){var n=this.fileDirectory.BitsPerSample[t];if(n%8!=0)throw new Error("Sample bit-width of "+n+" is not supported.");if(n!==this.fileDirectory.BitsPerSample[0])throw new Error("Differing size of samples in a pixel are not supported.");e+=n}return e/8}},{key:"getSampleByteSize",value:function(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index "+e+" is out of range.");var t=this.fileDirectory.BitsPerSample[e];if(t%8!=0)throw new Error("Sample bit-width of "+t+" is not supported.");return t/8}},{key:"getReaderForSample",value:function(e){var t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,n=this.fileDirectory.BitsPerSample[e];switch(t){case 1:switch(n){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(n){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(n){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getArrayForSample",value:function(e,t){return o(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,this.fileDirectory.BitsPerSample[e],t)}},{key:"getTileOrStrip",value:function(){function e(e,n,r,i){return t.apply(this,arguments)}var t=(0,l.default)(f.default.mark(function e(t,n,r,i){var o,a,s,u,c,l,h,d;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight()),s=void 0,u=this.tiles,1===this.planarConfiguration?s=n*o+t:2===this.planarConfiguration&&(s=r*o*a+n*o+t),c=void 0,l=void 0,this.isTiled?(c=this.fileDirectory.TileOffsets[s],l=this.fileDirectory.TileByteCounts[s]):(c=this.fileDirectory.StripOffsets[s],l=this.fileDirectory.StripByteCounts[s]),e.next=10,this.source.fetch(c,l);case 10:return h=e.sent,d=void 0,null===u?d=i.decode(this.fileDirectory,h):u[s]||(d=i.decode(this.fileDirectory,h),u[s]=d),e.t0=t,e.t1=n,e.t2=r,e.next=18,d;case 18:return e.t3=e.sent,e.abrupt("return",{x:e.t0,y:e.t1,sample:e.t2,data:e.t3});case 20:case"end":return e.stop()}},e,this)}));return e}()},{key:"_readRaster",value:function(){function e(e,n,r,i,o,a,s,u){return t.apply(this,arguments)}var t=(0,l.default)(f.default.mark(function e(t,n,r,o,a,s,u,c){var l,h,d,p,v,m,y,b,w,_,x,k,S,O,E,T,A,P,N=this;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l=this.getTileWidth(),h=this.getTileHeight(),d=Math.max(Math.floor(t[0]/l),0),p=Math.min(Math.ceil(t[2]/l),Math.ceil(this.getWidth()/this.getTileWidth())),v=Math.max(Math.floor(t[1]/h),0),m=Math.min(Math.ceil(t[3]/h),Math.ceil(this.getHeight()/this.getTileHeight())),y=t[2]-t[0],b=this.getBytesPerPixel(),w=[],_=[],x=0;x<n.length;++x)1===this.planarConfiguration?w.push(i(this.fileDirectory.BitsPerSample,0,n[x])/8):w.push(0),_.push(this.getReaderForSample(n[x]));for(k=[],S=this.littleEndian,O=v;O<m;++O)for(E=d;E<p;++E)for(T=function(e){var i=e,s=n[e];2===N.planarConfiguration&&(b=N.getSampleByteSize(s));var u=N.getTileOrStrip(E,O,s,a);k.push(u),u.then(function(e){for(var a=e.data,s=new DataView(a),u=e.y*h,f=e.x*l,c=(e.y+1)*h,d=(e.x+1)*l,p=_[i],v=Math.min(h,h-(c-t[3])),m=Math.min(l,l-(d-t[2])),g=Math.max(0,t[1]-u);g<v;++g)for(var x=Math.max(0,t[0]-f);x<m;++x){var k=(g*l+x)*b,O=p.call(s,k+w[i],S),E=void 0;o?(E=(g+u-t[1])*y*n.length+(x+f-t[0])*n.length+i,r[E]=O):(E=(g+u-t[1])*y+x+f-t[0],r[i][E]=O)}})},A=0;A<n.length;++A)T(A);return e.next=16,Promise.all(k);case 16:if(!(s&&t[2]-t[0]!==s||u&&t[3]-t[1]!==u)){e.next=22;break}return P=void 0,P=o?(0,g.resampleInterleaved)(r,t[2]-t[0],t[3]-t[1],s,u,n.length,c):(0,g.resample)(r,t[2]-t[0],t[3]-t[1],s,u,c),P.width=s,P.height=u,e.abrupt("return",P);case 22:return r.width=s||t[2]-t[0],r.height=u||t[3]-t[1],e.abrupt("return",r);case 25:case"end":return e.stop()}},e,this)}));return e}()},{key:"readRasters",value:function(){function e(){return t.apply(this,arguments)}var t=(0,l.default)(f.default.mark(function e(){var t,n,r,i,a,s,u,c,l,h,d,p,v,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},y=m.window,g=m.samples,w=void 0===g?[]:g,_=m.interleave,x=m.pool,k=void 0===x?null:x,S=m.width,O=m.height,E=m.resampleMethod,T=m.fillValue;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=y||[0,0,this.getWidth(),this.getHeight()],!(t[0]>t[2]||t[1]>t[3])){e.next=3;break}throw new Error("Invalid subsets");case 3:if(n=t[2]-t[0],r=t[3]-t[1],i=n*r,w&&w.length){e.next=10;break}for(a=0;a<this.fileDirectory.SamplesPerPixel;++a)w.push(a);e.next=17;break;case 10:s=0;case 11:if(!(s<w.length)){e.next=17;break}if(!(w[s]>=this.fileDirectory.SamplesPerPixel)){e.next=14;break}return e.abrupt("return",Promise.reject(new RangeError("Invalid sample index '"+w[s]+"'.")));case 14:++s,e.next=11;break;case 17:if(u=void 0,_)c=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,l=Math.max.apply(null,this.fileDirectory.BitsPerSample),u=o(c,l,i*w.length),T&&u.fill(T);else for(u=[],h=0;h<w.length;++h)d=this.getArrayForSample(w[h],i),Array.isArray(T)&&h<T.length?d.fill(T[h]):T&&!Array.isArray(T)&&d.fill(T),u.push(d);return p=k||(0,b.getDecoder)(this.fileDirectory),e.next=22,this._readRaster(t,w,u,_,p,S,O,E);case 22:return v=e.sent,e.abrupt("return",v);case 24:case"end":return e.stop()}},e,this)}));return e}()},{key:"readRGB",value:function(){function e(){return t.apply(this,arguments)}var t=(0,l.default)(f.default.mark(function e(){var t,n,r,i,o,a,s,u,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.window,h=c.pool,d=void 0===h?null:h,p=c.width,v=c.height,b=c.resampleMethod;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l||[0,0,this.getWidth(),this.getHeight()],!(t[0]>t[2]||t[1]>t[3])){e.next=3;break}throw new Error("Invalid subsets");case 3:if((n=this.fileDirectory.PhotometricInterpretation)!==m.photometricInterpretations.RGB){e.next=6;break}return e.abrupt("return",this.readRasters({window:l,interleave:!0,samples:[0,1,2],pool:d}));case 6:r=void 0,e.t0=n,e.next=e.t0===m.photometricInterpretations.WhiteIsZero?10:e.t0===m.photometricInterpretations.BlackIsZero?10:e.t0===m.photometricInterpretations.Palette?10:e.t0===m.photometricInterpretations.CMYK?12:e.t0===m.photometricInterpretations.YCbCr?14:e.t0===m.photometricInterpretations.CIELab?14:16;break;case 10:return r=[0],e.abrupt("break",17);case 12:return r=[0,1,2,3],e.abrupt("break",17);case 14:return r=[0,1,2],e.abrupt("break",17);case 16:throw new Error("Invalid or unsupported photometric interpretation.");case 17:return i={window:t,interleave:!0,samples:r,pool:d,width:p,height:v,resampleMethod:b},o=this.fileDirectory,e.next=21,this.readRasters(i);case 21:a=e.sent,s=Math.pow(2,this.fileDirectory.BitsPerSample[0]),u=void 0,e.t1=n,e.next=e.t1===m.photometricInterpretations.WhiteIsZero?27:e.t1===m.photometricInterpretations.BlackIsZero?29:e.t1===m.photometricInterpretations.Palette?31:e.t1===m.photometricInterpretations.CMYK?33:e.t1===m.photometricInterpretations.YCbCr?35:e.t1===m.photometricInterpretations.CIELab?37:39;break;case 27:return u=(0,y.fromWhiteIsZero)(a,s),e.abrupt("break",40);case 29:return u=(0,y.fromBlackIsZero)(a,s),e.abrupt("break",40);case 31:return u=(0,y.fromPalette)(a,o.ColorMap),e.abrupt("break",40);case 33:return u=(0,y.fromCMYK)(a),e.abrupt("break",40);case 35:return u=(0,y.fromYCbCr)(a),e.abrupt("break",40);case 37:return u=(0,y.fromCIELab)(a),e.abrupt("break",40);case 39:throw new Error("Unsupported photometric interpretation.");case 40:return u.width=a.width,u.height=a.height,e.abrupt("return",u);case 43:case"end":return e.stop()}},e,this)}));return e}()},{key:"getTiePoints",value:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var e=[],t=0;t<this.fileDirectory.ModelTiepoint.length;t+=6)e.push({i:this.fileDirectory.ModelTiepoint[t],j:this.fileDirectory.ModelTiepoint[t+1],k:this.fileDirectory.ModelTiepoint[t+2],x:this.fileDirectory.ModelTiepoint[t+3],y:this.fileDirectory.ModelTiepoint[t+4],z:this.fileDirectory.ModelTiepoint[t+5]});return e}},{key:"getGDALMetadata",value:function(){var e={};if(!this.fileDirectory.GDAL_METADATA)return null;for(var t=this.fileDirectory.GDAL_METADATA,n=(0,m.parseXml)(t.substring(0,t.length-1)),r=n.evaluate("GDALMetadata/Item",n,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),i=0;i<r.snapshotLength;++i){var o=r.snapshotItem(i);e[o.getAttribute("name")]=o.textContent}return e}},{key:"getOrigin",value:function(){var e=this.fileDirectory.ModelTiepoint,t=this.fileDirectory.ModelTransformation;if(e&&6===e.length)return[e[3],e[4],e[5]];if(t)return[t[3],t[7],t[11]];throw new Error("The image does not have an affine transformation.")}},{key:"getResolution",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.fileDirectory.ModelPixelScale,n=this.fileDirectory.ModelTransformation;if(t)return[t[0],-t[1],t[2]];if(n)return[n[0],n[5],n[10]];if(e){var r=e.getResolution(),i=(0,s.default)(r,3),o=i[0],a=i[1],u=i[2];return[o*e.getWidth()/this.getWidth(),a*e.getHeight()/this.getHeight(),u*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var e=this.getOrigin(),t=this.getResolution(),n=e[0],r=e[1],i=n+t[0]*this.getWidth(),o=r+t[1]*this.getHeight();return[Math.min(n,i),Math.min(r,o),Math.max(n,i),Math.max(r,o)]}}]),e}();t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){switch(e.Compression){case void 0:case 1:return new a.default;case 5:return new u.default;case 6:throw new Error("old style JPEG compression is not supported.");case 7:return new c.default(e);case 8:case 32946:return new h.default;case 32773:return new p.default;default:throw new Error("Unknown compression method identifier: "+e.Compression)}}Object.defineProperty(t,"__esModule",{value:!0}),t.getDecoder=i;var o=n(127),a=r(o),s=n(129),u=r(s),f=n(130),c=r(f),l=n(131),h=r(l),d=n(143),p=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=n(12),f=r(u),c=n(15),l=r(c),h=n(19),d=r(h),p=function(e){function t(){return(0,o.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,s.default)(t,[{key:"decodeBlock",value:function(e){return e}}]),t}(d.default);t.default=p},function(e,t,n){"use strict";function r(e,t){var n=e.length-t,r=0;do{for(var i=t;i>0;i--)e[r+t]+=e[r],r++;n-=t}while(n>0)}function i(e,t,n){for(var r=0,i=e.length,o=i/n;i>t;){for(var a=t;a>0;--a)e[r+t]+=e[r],++r;i-=t}for(var s=e.slice(),u=0;u<o;++u)for(var f=0;f<n;++f)e[n*u+f]=s[(n-f-1)*o+u]}function o(e,t,n,o,a){if(!t||1===t)return e;for(var s=0;s<a.length;++s){if(a[s]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(a[s]!==a[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var u=a[0]/8,f=a.length,c=0;c<o;++c){var l=void 0;if(2===t){switch(a[0]){case 8:l=new Uint8Array(e,c*f*n*u,f*n*u);break;case 16:l=new Uint16Array(e,c*f*n*u,f*n*u/2);break;case 32:l=new Uint32Array(e,c*f*n*u,f*n*u/4);break;default:throw new Error("Predictor 2 not allowed with "+a[0]+" bits per sample.")}r(l,f,u)}else 3===t&&(l=new Uint8Array(e,c*f*n*u,n*u),i(l,f,u))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyPredictor=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var r=t%8,i=Math.floor(t/8),o=8-r,a=t+n-8*(i+1),s=8*(i+2)-(t+n),u=8*(i+2)-t;if(s=Math.max(0,s),i>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),g;var f=e[i]&Math.pow(2,8-r)-1;f<<=n-o;var c=f;if(i+1<e.length){var l=e[i+1]>>>s;l<<=Math.max(0,n-u),c+=l}if(a>8&&i+2<e.length){var h=8*(i+3)-(t+n);c+=e[i+2]>>>h}return c}function o(e,t){for(var n=t.length-1;n>=0;n--)e.push(t[n]);return e}function a(e){function t(){c=258,l=y}function n(e){var t=i(e,h,l);return h+=l,t}function r(e,t){return u[c]=t,s[c]=e,c++,c>=Math.pow(2,l)&&l++,c-1}function a(e){for(var t=[],n=e;4096!==n;n=s[n])t.push(u[n]);return t}for(var s=new Uint16Array(4093),u=new Uint8Array(4093),f=0;f<=257;f++)s[f]=4096,u[f]=f;var c=258,l=y,h=0,d=[];t();for(var p=new Uint8Array(e),v=n(p),m=void 0;v!==g;){if(v===b){for(t(),v=n(p);v===b;)v=n(p);if(v>b)throw new Error("corrupted code at scanline "+v);if(v===g)break;o(d,a(v)),m=v}else if(v<c){var w=a(v);o(d,w),r(m,w[w.length-1]),m=v}else{var _=a(m);if(!_)throw new Error("Bogus entry. Not in dictionary, "+m+" / "+c+", position: "+h);o(d,_),d.push(_[_.length-1]),r(m,_[_.length-1]),m=v}c>=Math.pow(2,l)-1&&l++,v=n(p)}return new Uint8Array(d)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),u=r(s),f=n(4),c=r(f),l=n(12),h=r(l),d=n(15),p=r(d),v=n(19),m=r(v),y=9,b=256,g=257,w=function(e){function t(){return(0,u.default)(this,t),(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,c.default)(t,[{key:"decodeBlock",value:function(e){return a(e).buffer}}]),t}(m.default);t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0,r=[],i=16;i>0&&!e[i-1];)--i;r.push({children:[],index:0});for(var o=r[0],a=void 0,s=0;s<i;s++){for(var u=0;u<e[s];u++){for(o=r.pop(),o.children[o.index]=t[n];o.index>0;)o=r.pop();for(o.index++,r.push(o);r.length<=s;)r.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a;n++}s+1<i&&(r.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a)}return r[0].children}function o(e,t,n,r,i,o,a,s,u){function f(){if(O>0)return O--,S>>O&1;if(255===(S=e[k++])){var t=e[k++];if(t)throw new Error("unexpected marker: "+(S<<8|t).toString(16))}return O=7,S>>>7}function c(e){for(var t=e,n=void 0;null!==(n=f());){if("number"==typeof(t=t[n]))return t;if("object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new Error("invalid huffman sequence")}return null}function l(e){for(var t=e,n=0;t>0;){var r=f();if(null===r)return;n=n<<1|r,--t}return n}function h(e){var t=l(e);return t>=1<<e-1?t:t+(-1<<e)+1}function d(e,t){var n=c(e.huffmanTableDC),r=0===n?0:h(n);e.pred+=r,t[0]=e.pred;for(var i=1;i<64;){var o=c(e.huffmanTableAC),a=15&o,s=o>>4;if(0===a){if(s<15)break;i+=16}else{i+=s;t[g[i]]=h(a),i++}}}function p(e,t){var n=c(e.huffmanTableDC),r=0===n?0:h(n)<<u;e.pred+=r,t[0]=e.pred}function v(e,t){t[0]|=f()<<u}function y(e,t){if(E>0)return void E--;for(var n=o,r=a;n<=r;){var i=c(e.huffmanTableAC),s=15&i,f=i>>4;if(0===s){if(f<15){E=l(f)+(1<<f)-1;break}n+=16}else{n+=f;t[g[n]]=h(s)*(1<<u),n++}}}function b(e,t){for(var n=o,r=a,i=0;n<=r;){var s=g[n],d=t[s]<0?-1:1;switch(T){case 0:var p=c(e.huffmanTableAC),v=15&p;if(i=p>>4,0===v)i<15?(E=l(i)+(1<<i),T=4):(i=16,T=1);else{if(1!==v)throw new Error("invalid ACn encoding");A=h(v),T=i?2:3}continue;case 1:case 2:t[s]?t[s]+=(f()<<u)*d:0===--i&&(T=2===T?3:0);break;case 3:t[s]?t[s]+=(f()<<u)*d:(t[s]=A<<u,T=0);break;case 4:t[s]&&(t[s]+=(f()<<u)*d)}n++}4===T&&0===--E&&(T=0)}var w=n.mcusPerLine,_=n.progressive,x=t,k=t,S=0,O=0,E=0,T=0,A=void 0,P=r.length,N=void 0,I=void 0,C=void 0,M=void 0,D=void 0,j=void 0;j=_?0===o?0===s?p:v:0===s?y:b:d;var R=0,L=void 0,F=void 0;F=1===P?r[0].blocksPerLine*r[0].blocksPerColumn:w*n.mcusPerColumn;for(var U=i||F;R<F;){for(I=0;I<P;I++)r[I].pred=0;if(E=0,1===P)for(N=r[0],D=0;D<U;D++)!function(e,t,n){var r=n/e.blocksPerLine|0,i=n%e.blocksPerLine;t(e,e.blocks[r][i])}(N,j,R),R++;else for(D=0;D<U;D++){for(I=0;I<P;I++){N=r[I];var B=N,G=B.h,Z=B.v;for(C=0;C<Z;C++)for(M=0;M<G;M++)!function(e,t,n,r,i){var o=n/w|0,a=n%w,s=o*e.v+r,u=a*e.h+i;t(e,e.blocks[s][u])}(N,j,R,C,M)}if(++R===F)break}if(O=0,(L=e[k]<<8|e[k+1])<65280)throw new Error("marker was not found");if(!(L>=65488&&L<=65495))break;k+=2}return k-x}function a(e,t){for(var n=[],r=t.blocksPerLine,i=t.blocksPerColumn,o=r<<3,a=new Int32Array(64),s=new Uint8Array(64),u=0;u<i;u++){for(var f=u<<3,c=0;c<8;c++)n.push(new Uint8Array(o));for(var l=0;l<r;l++){!function(e,n,r){var i=t.quantizationTable,o=void 0,a=void 0,s=void 0,u=void 0,f=void 0,c=void 0,l=void 0,h=void 0,d=void 0,p=r,v=void 0;for(v=0;v<64;v++)p[v]=e[v]*i[v];for(v=0;v<8;++v){var m=8*v;0!==p[1+m]||0!==p[2+m]||0!==p[3+m]||0!==p[4+m]||0!==p[5+m]||0!==p[6+m]||0!==p[7+m]?(o=E*p[0+m]+128>>8,a=E*p[4+m]+128>>8,s=p[2+m],u=p[6+m],f=T*(p[1+m]-p[7+m])+128>>8,h=T*(p[1+m]+p[7+m])+128>>8,c=p[3+m]<<4,l=p[5+m]<<4,d=o-a+1>>1,o=o+a+1>>1,a=d,d=s*O+u*S+128>>8,s=s*S-u*O+128>>8,u=d,d=f-l+1>>1,f=f+l+1>>1,l=d,d=h+c+1>>1,c=h-c+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=f*k+h*x+2048>>12,f=f*x-h*k+2048>>12,h=d,d=c*_+l*w+2048>>12,c=c*w-l*_+2048>>12,l=d,p[0+m]=o+h,p[7+m]=o-h,p[1+m]=a+l,p[6+m]=a-l,p[2+m]=s+c,p[5+m]=s-c,p[3+m]=u+f,p[4+m]=u-f):(d=E*p[0+m]+512>>10,p[0+m]=d,p[1+m]=d,p[2+m]=d,p[3+m]=d,p[4+m]=d,p[5+m]=d,p[6+m]=d,p[7+m]=d)}for(v=0;v<8;++v){var y=v;0!==p[8+y]||0!==p[16+y]||0!==p[24+y]||0!==p[32+y]||0!==p[40+y]||0!==p[48+y]||0!==p[56+y]?(o=E*p[0+y]+2048>>12,a=E*p[32+y]+2048>>12,s=p[16+y],u=p[48+y],f=T*(p[8+y]-p[56+y])+2048>>12,h=T*(p[8+y]+p[56+y])+2048>>12,c=p[24+y],l=p[40+y],d=o-a+1>>1,o=o+a+1>>1,a=d,d=s*O+u*S+2048>>12,s=s*S-u*O+2048>>12,u=d,d=f-l+1>>1,f=f+l+1>>1,l=d,d=h+c+1>>1,c=h-c+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=f*k+h*x+2048>>12,f=f*x-h*k+2048>>12,h=d,d=c*_+l*w+2048>>12,c=c*w-l*_+2048>>12,l=d,p[0+y]=o+h,p[56+y]=o-h,p[8+y]=a+l,p[48+y]=a-l,p[16+y]=s+c,p[40+y]=s-c,p[24+y]=u+f,p[32+y]=u-f):(d=E*r[v+0]+8192>>14,p[0+y]=d,p[8+y]=d,p[16+y]=d,p[24+y]=d,p[32+y]=d,p[40+y]=d,p[48+y]=d,p[56+y]=d)}for(v=0;v<64;++v){var b=128+(p[v]+8>>4);n[v]=b<0?0:b>255?255:b}}(t.blocks[u][l],s,a);for(var h=0,d=l<<3,p=0;p<8;p++)for(var v=n[f+p],m=0;m<8;m++)v[d+m]=s[h++]}}return n}Object.defineProperty(t,"__esModule",{value:!0});var s=n(12),u=r(s),f=n(15),c=r(f),l=n(3),h=r(l),d=n(4),p=r(d),v=n(31),m=r(v),y=n(19),b=r(y),g=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),w=4017,_=799,x=3406,k=2276,S=1567,O=3784,E=5793,T=2896,A=function(){function e(){(0,h.default)(this,e),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return(0,p.default)(e,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(e){function t(){var t=e[n]<<8|e[n+1];return n+=2,t}var n=0,r=t();if(65496!==r)throw new Error("SOI not found");for(r=t();65497!==r;){switch(r){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var a=function(){var r=t(),i=e.subarray(n,n+r-2);return n+=i.length,i}();65504===r&&74===a[0]&&70===a[1]&&73===a[2]&&70===a[3]&&0===a[4]&&(this.jfif={version:{major:a[5],minor:a[6]},densityUnits:a[7],xDensity:a[8]<<8|a[9],yDensity:a[10]<<8|a[11],thumbWidth:a[12],thumbHeight:a[13],thumbData:a.subarray(14,14+3*a[12]*a[13])}),65518===r&&65===a[0]&&100===a[1]&&111===a[2]&&98===a[3]&&101===a[4]&&0===a[5]&&(this.adobe={version:a[6],flags0:a[7]<<8|a[8],flags1:a[9]<<8|a[10],transformCode:a[11]});break;case 65499:for(var s=t(),u=s+n-2;n<u;){var f=e[n++],c=new Int32Array(64);if(f>>4==0)for(var l=0;l<64;l++){var h=g[l];c[h]=e[n++]}else{if(f>>4!=1)throw new Error("DQT: invalid table spec");for(var d=0;d<64;d++){c[g[d]]=t()}}this.quantizationTables[15&f]=c}break;case 65472:case 65473:case 65474:t();for(var p={extended:65473===r,progressive:65474===r,precision:e[n++],scanLines:t(),samplesPerLine:t(),components:{},componentsOrder:[]},v=e[n++],m=void 0,y=0;y<v;y++){m=e[n];var b=e[n+1]>>4,w=15&e[n+1],_=e[n+2];p.componentsOrder.push(m),p.components[m]={h:b,v:w,quantizationIdx:_},n+=3}!function(e){var t=0,n=0,r=void 0,i=void 0;for(i in e.components)e.components.hasOwnProperty(i)&&(r=e.components[i],t<r.h&&(t=r.h),n<r.v&&(n=r.v));var o=Math.ceil(e.samplesPerLine/8/t),a=Math.ceil(e.scanLines/8/n);for(i in e.components)if(e.components.hasOwnProperty(i)){r=e.components[i];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*r.h/t),u=Math.ceil(Math.ceil(e.scanLines/8)*r.v/n),f=o*r.h,c=a*r.v,l=[],h=0;h<c;h++){for(var d=[],p=0;p<f;p++)d.push(new Int32Array(64));l.push(d)}r.blocksPerLine=s,r.blocksPerColumn=u,r.blocks=l}e.maxH=t,e.maxV=n,e.mcusPerLine=o,e.mcusPerColumn=a}(p),this.frames.push(p);break;case 65476:for(var x=t(),k=2;k<x;){for(var S=e[n++],O=new Uint8Array(16),E=0,T=0;T<16;T++,n++)O[T]=e[n],E+=O[T];for(var A=new Uint8Array(E),P=0;P<E;P++,n++)A[P]=e[n];k+=17+E,S>>4==0?this.huffmanTablesDC[15&S]=i(O,A):this.huffmanTablesAC[15&S]=i(O,A)}break;case 65501:t(),this.resetInterval=t();break;case 65498:t();for(var N=e[n++],I=[],C=this.frames[0],M=0;M<N;M++){var D=C.components[e[n++]],j=e[n++];D.huffmanTableDC=this.huffmanTablesDC[j>>4],D.huffmanTableAC=this.huffmanTablesAC[15&j],I.push(D)}var R=e[n++],L=e[n++],F=e[n++],U=o(e,n,C,I,this.resetInterval,R,L,F>>4,15&F);n+=U;break;case 65535:255!==e[n]&&n--;break;default:if(255===e[n-3]&&e[n-2]>=192&&e[n-2]<=254){n-=3;break}throw new Error("unknown JPEG marker "+r.toString(16))}r=t()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t<this.frames.length;t++){var n=this.frames[t].components,r=!0,i=!1,o=void 0;try{for(var s,u=Object.keys(n)[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var f=s.value;n[f].quantizationTable=this.quantizationTables[n[f].quantizationIdx],delete n[f].quantizationIdx}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}}for(var c=e[0],l=c.components,h=c.componentsOrder,d=[],p=c.samplesPerLine,v=c.scanLines,m=0;m<h.length;m++){var y=l[h[m]];d.push({lines:a(c,y),scaleX:y.h/c.maxH,scaleY:y.v/c.maxV})}for(var b=new Uint8Array(p*v*d.length),g=0,w=0;w<v;++w)for(var _=0;_<p;++_)for(var x=0;x<d.length;++x){var k=d[x];b[g]=k.lines[0|w*k.scaleY][0|_*k.scaleX],++g}return b}}]),e}(),P=function(e){function t(e){(0,h.default)(this,t);var n=(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.reader=new A,e.JPEGTables&&n.reader.parse(e.JPEGTables),n}return(0,c.default)(t,e),(0,p.default)(t,[{key:"decodeBlock",value:function(e){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(e)),this.reader.getResult().buffer}}]),t}(b.default);t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=n(12),f=r(u),c=n(15),l=r(c),h=n(132),d=n(19),p=r(d),v=function(e){function t(){return(0,o.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,s.default)(t,[{key:"decodeBlock",value:function(e){return(0,h.inflate)(new Uint8Array(e)).buffer}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=a.inflateInit2(this.strm,t.windowBits);if(n!==f.Z_OK)throw new Error(c[n]);this.header=new h,a.inflateGetHeader(this.strm,this.header)}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function o(e,t){return t=t||{},t.raw=!0,i(e,t)}var a=n(133),s=n(29),u=n(138),f=n(139),c=n(140),l=n(141),h=n(142),d=Object.prototype.toString;r.prototype.push=function(e,t){var n,r,i,o,c,l,h=this.strm,p=this.options.chunkSize,v=this.options.dictionary,m=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?f.Z_FINISH:f.Z_NO_FLUSH,"string"==typeof e?h.input=u.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new s.Buf8(p),h.next_out=0,h.avail_out=p),n=a.inflate(h,f.Z_NO_FLUSH),n===f.Z_NEED_DICT&&v&&(l="string"==typeof v?u.string2buf(v):"[object ArrayBuffer]"===d.call(v)?new Uint8Array(v):v,n=a.inflateSetDictionary(this.strm,l)),n===f.Z_BUF_ERROR&&!0===m&&(n=f.Z_OK,m=!1),n!==f.Z_STREAM_END&&n!==f.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==f.Z_STREAM_END&&(0!==h.avail_in||r!==f.Z_FINISH&&r!==f.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(h.output,h.next_out),o=h.next_out-i,c=u.buf2string(h.output,i),h.next_out=o,h.avail_out=p-o,o&&s.arraySet(h.output,h.output,i,o,0),this.onData(c)):this.onData(s.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==f.Z_STREAM_END);return n===f.Z_STREAM_END&&(r=f.Z_FINISH),r===f.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===f.Z_OK):r!==f.Z_SYNC_FLUSH||(this.onEnd(f.Z_OK),h.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===f.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=i,t.inflateRaw=o,t.ungzip=i},function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=L,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new b.Buf32(ve),t.distcode=t.distdyn=new b.Buf32(me),t.sane=1,t.back=-1,P):C}function a(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,o(e)):C}function s(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?C:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,a(e))):C}function u(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,n=s(e,t),n!==P&&(e.state=null),n):C}function f(e){return u(e,ye)}function c(e){if(be){var t;for(m=new b.Buf32(512),y=new b.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(x(S,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;x(O,e.lens,0,32,y,0,e.work,{bits:5}),be=!1}e.lencode=m,e.lenbits=9,e.distcode=y,e.distbits=5}function l(e,t,n,r){var i,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new b.Buf8(o.wsize)),r>=o.wsize?(b.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),b.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(b.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function h(e,t){var n,i,o,a,s,u,f,h,d,p,v,m,y,ve,me,ye,be,ge,we,_e,xe,ke,Se,Oe,Ee=0,Te=new b.Buf8(4),Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return C;n=e.state,n.mode===q&&(n.mode=Y),s=e.next_out,o=e.output,f=e.avail_out,a=e.next_in,i=e.input,u=e.avail_in,h=n.hold,d=n.bits,p=u,v=f,ke=P;e:for(;;)switch(n.mode){case L:if(0===n.wrap){n.mode=Y;break}for(;d<16;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(2&n.wrap&&35615===h){n.check=0,Te[0]=255&h,Te[1]=h>>>8&255,n.check=w(n.check,Te,2,0),h=0,d=0,n.mode=F;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=he;break}if((15&h)!==R){e.msg="unknown compression method",n.mode=he;break}if(h>>>=4,d-=4,xe=8+(15&h),0===n.wbits)n.wbits=xe;else if(xe>n.wbits){e.msg="invalid window size",n.mode=he;break}n.dmax=1<<xe,e.adler=n.check=1,n.mode=512&h?V:q,h=0,d=0;break;case F:for(;d<16;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(n.flags=h,(255&n.flags)!==R){e.msg="unknown compression method",n.mode=he;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=he;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(Te[0]=255&h,Te[1]=h>>>8&255,n.check=w(n.check,Te,2,0)),h=0,d=0,n.mode=U;case U:for(;d<32;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.head&&(n.head.time=h),512&n.flags&&(Te[0]=255&h,Te[1]=h>>>8&255,Te[2]=h>>>16&255,Te[3]=h>>>24&255,n.check=w(n.check,Te,4,0)),h=0,d=0,n.mode=B;case B:for(;d<16;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(Te[0]=255&h,Te[1]=h>>>8&255,n.check=w(n.check,Te,2,0)),h=0,d=0,n.mode=G;case G:if(1024&n.flags){for(;d<16;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.length=h,n.head&&(n.head.extra_len=h),512&n.flags&&(Te[0]=255&h,Te[1]=h>>>8&255,n.check=w(n.check,Te,2,0)),h=0,d=0}else n.head&&(n.head.extra=null);n.mode=Z;case Z:if(1024&n.flags&&(m=n.length,m>u&&(m=u),m&&(n.head&&(xe=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),b.arraySet(n.head.extra,i,a,m,xe)),512&n.flags&&(n.check=w(n.check,i,m,a)),u-=m,a+=m,n.length-=m),n.length))break e;n.length=0,n.mode=H;case H:if(2048&n.flags){if(0===u)break e;m=0;do{xe=i[a+m++],n.head&&xe&&n.length<65536&&(n.head.name+=String.fromCharCode(xe))}while(xe&&m<u);if(512&n.flags&&(n.check=w(n.check,i,m,a)),u-=m,a+=m,xe)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=z;case z:if(4096&n.flags){if(0===u)break e;m=0;do{xe=i[a+m++],n.head&&xe&&n.length<65536&&(n.head.comment+=String.fromCharCode(xe))}while(xe&&m<u);if(512&n.flags&&(n.check=w(n.check,i,m,a)),u-=m,a+=m,xe)break e}else n.head&&(n.head.comment=null);n.mode=K;case K:if(512&n.flags){for(;d<16;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(h!==(65535&n.check)){e.msg="header crc mismatch",n.mode=he;break}h=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=q;break;case V:for(;d<32;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}e.adler=n.check=r(h),h=0,d=0,n.mode=W;case W:if(0===n.havedict)return e.next_out=s,e.avail_out=f,e.next_in=a,e.avail_in=u,n.hold=h,n.bits=d,I;e.adler=n.check=1,n.mode=q;case q:if(t===T||t===A)break e;case Y:if(n.last){h>>>=7&d,d-=7&d,n.mode=fe;break}for(;d<3;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}switch(n.last=1&h,h>>>=1,d-=1,3&h){case 0:n.mode=X;break;case 1:if(c(n),n.mode=ne,t===A){h>>>=2,d-=2;break e}break;case 2:n.mode=Q;break;case 3:e.msg="invalid block type",n.mode=he}h>>>=2,d-=2;break;case X:for(h>>>=7&d,d-=7&d;d<32;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=he;break}if(n.length=65535&h,h=0,d=0,n.mode=$,t===A)break e;case $:n.mode=J;case J:if(m=n.length){if(m>u&&(m=u),m>f&&(m=f),0===m)break e;b.arraySet(o,i,a,m,s),u-=m,a+=m,f-=m,s+=m,n.length-=m;break}n.mode=q;break;case Q:for(;d<14;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(n.nlen=257+(31&h),h>>>=5,d-=5,n.ndist=1+(31&h),h>>>=5,d-=5,n.ncode=4+(15&h),h>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=he;break}n.have=0,n.mode=ee;case ee:for(;n.have<n.ncode;){for(;d<3;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.lens[Ae[n.have++]]=7&h,h>>>=3,d-=3}for(;n.have<19;)n.lens[Ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},ke=x(k,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,ke){e.msg="invalid code lengths set",n.mode=he;break}n.have=0,n.mode=te;case te:for(;n.have<n.nlen+n.ndist;){for(;Ee=n.lencode[h&(1<<n.lenbits)-1],me=Ee>>>24,ye=Ee>>>16&255,be=65535&Ee,!(me<=d);){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(be<16)h>>>=me,d-=me,n.lens[n.have++]=be;else{if(16===be){for(Oe=me+2;d<Oe;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(h>>>=me,d-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=he;break}xe=n.lens[n.have-1],m=3+(3&h),h>>>=2,d-=2}else if(17===be){for(Oe=me+3;d<Oe;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}h>>>=me,d-=me,xe=0,m=3+(7&h),h>>>=3,d-=3}else{for(Oe=me+7;d<Oe;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}h>>>=me,d-=me,xe=0,m=11+(127&h),h>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=he;break}for(;m--;)n.lens[n.have++]=xe}}if(n.mode===he)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=he;break}if(n.lenbits=9,Se={bits:n.lenbits},ke=x(S,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,ke){e.msg="invalid literal/lengths set",n.mode=he;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},ke=x(O,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,ke){e.msg="invalid distances set",n.mode=he;break}if(n.mode=ne,t===A)break e;case ne:n.mode=re;case re:if(u>=6&&f>=258){e.next_out=s,e.avail_out=f,e.next_in=a,e.avail_in=u,n.hold=h,n.bits=d,_(e,v),s=e.next_out,o=e.output,f=e.avail_out,a=e.next_in,i=e.input,u=e.avail_in,h=n.hold,d=n.bits,n.mode===q&&(n.back=-1);break}for(n.back=0;Ee=n.lencode[h&(1<<n.lenbits)-1],me=Ee>>>24,ye=Ee>>>16&255,be=65535&Ee,!(me<=d);){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(ye&&0==(240&ye)){for(ge=me,we=ye,_e=be;Ee=n.lencode[_e+((h&(1<<ge+we)-1)>>ge)],me=Ee>>>24,ye=Ee>>>16&255,be=65535&Ee,!(ge+me<=d);){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}h>>>=ge,d-=ge,n.back+=ge}if(h>>>=me,d-=me,n.back+=me,n.length=be,0===ye){n.mode=ue;break}if(32&ye){n.back=-1,n.mode=q;break}if(64&ye){e.msg="invalid literal/length code",n.mode=he;break}n.extra=15&ye,n.mode=ie;case ie:if(n.extra){for(Oe=n.extra;d<Oe;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=oe;case oe:for(;Ee=n.distcode[h&(1<<n.distbits)-1],me=Ee>>>24,ye=Ee>>>16&255,be=65535&Ee,!(me<=d);){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(0==(240&ye)){for(ge=me,we=ye,_e=be;Ee=n.distcode[_e+((h&(1<<ge+we)-1)>>ge)],me=Ee>>>24,ye=Ee>>>16&255,be=65535&Ee,!(ge+me<=d);){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}h>>>=ge,d-=ge,n.back+=ge}if(h>>>=me,d-=me,n.back+=me,64&ye){e.msg="invalid distance code",n.mode=he;break}n.offset=be,n.extra=15&ye,n.mode=ae;case ae:if(n.extra){for(Oe=n.extra;d<Oe;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=he;break}n.mode=se;case se:if(0===f)break e;if(m=v-f,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=he;break}m>n.wnext?(m-=n.wnext,y=n.wsize-m):y=n.wnext-m,m>n.length&&(m=n.length),ve=n.window}else ve=o,y=s-n.offset,m=n.length;m>f&&(m=f),f-=m,n.length-=m;do{o[s++]=ve[y++]}while(--m);0===n.length&&(n.mode=re);break;case ue:if(0===f)break e;o[s++]=n.length,f--,n.mode=re;break;case fe:if(n.wrap){for(;d<32;){if(0===u)break e;u--,h|=i[a++]<<d,d+=8}if(v-=f,e.total_out+=v,n.total+=v,v&&(e.adler=n.check=n.flags?w(n.check,o,v,s-v):g(n.check,o,v,s-v)),v=f,(n.flags?h:r(h))!==n.check){e.msg="incorrect data check",n.mode=he;break}h=0,d=0}n.mode=ce;case ce:if(n.wrap&&n.flags){for(;d<32;){if(0===u)break e;u--,h+=i[a++]<<d,d+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=he;break}h=0,d=0}n.mode=le;case le:ke=N;break e;case he:ke=M;break e;case de:return D;case pe:default:return C}return e.next_out=s,e.avail_out=f,e.next_in=a,e.avail_in=u,n.hold=h,n.bits=d,(n.wsize||v!==e.avail_out&&n.mode<he&&(n.mode<fe||t!==E))&&l(e,e.output,e.next_out,v-e.avail_out)?(n.mode=de,D):(p-=e.avail_in,v-=e.avail_out,e.total_in+=p,e.total_out+=v,n.total+=v,n.wrap&&v&&(e.adler=n.check=n.flags?w(n.check,o,v,e.next_out-v):g(n.check,o,v,e.next_out-v)),e.data_type=n.bits+(n.last?64:0)+(n.mode===q?128:0)+(n.mode===ne||n.mode===$?256:0),(0===p&&0===v||t===E)&&ke===P&&(ke=j),ke)}function d(e){if(!e||!e.state)return C;var t=e.state;return t.window&&(t.window=null),e.state=null,P}function p(e,t){var n;return e&&e.state?(n=e.state,0==(2&n.wrap)?C:(n.head=t,t.done=!1,P)):C}function v(e,t){var n,r,i=t.length;return e&&e.state?(n=e.state,0!==n.wrap&&n.mode!==W?C:n.mode===W&&(r=1,(r=g(r,t,i,0))!==n.check)?M:l(e,t,i,i)?(n.mode=de,D):(n.havedict=1,P)):C}var m,y,b=n(29),g=n(134),w=n(135),_=n(136),x=n(137),k=0,S=1,O=2,E=4,T=5,A=6,P=0,N=1,I=2,C=-2,M=-3,D=-4,j=-5,R=8,L=1,F=2,U=3,B=4,G=5,Z=6,H=7,z=8,K=9,V=10,W=11,q=12,Y=13,X=14,$=15,J=16,Q=17,ee=18,te=19,ne=20,re=21,ie=22,oe=23,ae=24,se=25,ue=26,fe=27,ce=28,le=29,he=30,de=31,pe=32,ve=852,me=592,ye=15,be=!0;t.inflateReset=a,t.inflateReset2=s,t.inflateResetKeep=o,t.inflateInit=f,t.inflateInit2=u,t.inflate=h,t.inflateEnd=d,t.inflateGetHeader=p,t.inflateSetDictionary=v,t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i,o,a,s,u,f,c,l,h,d,p,v,m,y,b,g,w,_,x,k,S,O,E;n=e.state,r=e.next_in,O=e.input,i=r+(e.avail_in-5),o=e.next_out,E=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,f=n.wsize,c=n.whave,l=n.wnext,h=n.window,d=n.hold,p=n.bits,v=n.lencode,m=n.distcode,y=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{p<15&&(d+=O[r++]<<p,p+=8,d+=O[r++]<<p,p+=8),g=v[d&y];t:for(;;){if(w=g>>>24,d>>>=w,p-=w,0===(w=g>>>16&255))E[o++]=65535&g;else{if(!(16&w)){if(0==(64&w)){g=v[(65535&g)+(d&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=65535&g,w&=15,w&&(p<w&&(d+=O[r++]<<p,p+=8),_+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=O[r++]<<p,p+=8,d+=O[r++]<<p,p+=8),g=m[d&b];n:for(;;){if(w=g>>>24,d>>>=w,p-=w,!(16&(w=g>>>16&255))){if(0==(64&w)){g=m[(65535&g)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&g,w&=15,p<w&&(d+=O[r++]<<p,(p+=8)<w&&(d+=O[r++]<<p,p+=8)),(x+=d&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,w=o-a,x>w){if((w=x-w)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,S=h,0===l){if(k+=f-w,w<_){_-=w;do{E[o++]=h[k++]}while(--w);k=o-x,S=E}}else if(l<w){if(k+=f+l-w,(w-=l)<_){_-=w;do{E[o++]=h[k++]}while(--w);if(k=0,l<_){w=l,_-=w;do{E[o++]=h[k++]}while(--w);k=o-x,S=E}}}else if(k+=l-w,w<_){_-=w;do{E[o++]=h[k++]}while(--w);k=o-x,S=E}for(;_>2;)E[o++]=S[k++],E[o++]=S[k++],E[o++]=S[k++],_-=3;_&&(E[o++]=S[k++],_>1&&(E[o++]=S[k++]))}else{k=o-x;do{E[o++]=E[k++],E[o++]=E[k++],E[o++]=E[k++],_-=3}while(_>2);_&&(E[o++]=E[k++],_>1&&(E[o++]=E[k++]))}break}}break}}while(r<i&&o<s);_=p>>3,r-=_,p-=_<<3,d&=(1<<p)-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}},function(e,t,n){"use strict";var r=n(29),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,u,f,c,l,h){var d,p,v,m,y,b,g,w,_,x=h.bits,k=0,S=0,O=0,E=0,T=0,A=0,P=0,N=0,I=0,C=0,M=null,D=0,j=new r.Buf16(16),R=new r.Buf16(16),L=null,F=0;for(k=0;k<=15;k++)j[k]=0;for(S=0;S<u;S++)j[t[n+S]]++;for(T=x,E=15;E>=1&&0===j[E];E--);if(T>E&&(T=E),0===E)return f[c++]=20971520,f[c++]=20971520,h.bits=1,0;for(O=1;O<E&&0===j[O];O++);for(T<O&&(T=O),N=1,k=1;k<=15;k++)if(N<<=1,(N-=j[k])<0)return-1;if(N>0&&(0===e||1!==E))return-1;for(R[1]=0,k=1;k<15;k++)R[k+1]=R[k]+j[k];for(S=0;S<u;S++)0!==t[n+S]&&(l[R[t[n+S]]++]=S);if(0===e?(M=L=l,b=19):1===e?(M=i,D-=257,L=o,F-=257,b=256):(M=a,L=s,b=-1),C=0,S=0,k=O,y=c,A=T,P=0,v=-1,I=1<<T,m=I-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){g=k-P,l[S]<b?(w=0,_=l[S]):l[S]>b?(w=L[F+l[S]],_=M[D+l[S]]):(w=96,_=0),d=1<<k-P,p=1<<A,O=p;do{p-=d,f[y+(C>>P)+p]=g<<24|w<<16|_|0}while(0!==p);for(d=1<<k-1;C&d;)d>>=1;if(0!==d?(C&=d-1,C+=d):C=0,S++,0==--j[k]){if(k===E)break;k=t[n+l[S]]}if(k>T&&(C&m)!==v){for(0===P&&(P=T),y+=O,A=k-P,N=1<<A;A+P<E&&!((N-=j[A+P])<=0);)A++,N<<=1;if(I+=1<<A,1===e&&I>852||2===e&&I>592)return 1;v=C&m,f[v]=T<<24|A<<16|y-c|0}}return 0!==C&&(f[y+C]=k-P<<24|64<<16|0),h.bits=T,0}},function(e,t,n){"use strict";function r(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}var i=n(29),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var s=new i.Buf8(256),u=0;u<256;u++)s[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,n,r,o,a,s=e.length,u=0;for(o=0;o<s;o++)n=e.charCodeAt(o),55296==(64512&n)&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(u),a=0,o=0;a<u;o++)n=e.charCodeAt(o),55296==(64512&n)&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,i,o,a,u=t||e.length,f=new Array(2*u);for(i=0,n=0;n<u;)if((o=e[n++])<128)f[i++]=o;else if((a=s[o])>4)f[i++]=65533,n+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&n<u;)o=o<<6|63&e[n++],a--;a>1?f[i++]=65533:o<65536?f[i++]=o:(o-=65536,f[i++]=55296|o>>10&1023,f[i++]=56320|1023&o)}return r(f,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=n(12),f=r(u),c=n(15),l=r(c),h=n(19),d=r(h),p=function(e){function t(){return(0,o.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,s.default)(t,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),n=[],r=0;r<e.byteLength;++r){var i=t.getInt8(r);if(i<0){var o=t.getUint8(r+1);i=-i;for(var a=0;a<=i;++a)n.push(o);r+=1}else{for(var s=0;s<=i;++s)n.push(t.getUint8(r+s+1));r+=i+1}}return new Uint8Array(n).buffer}}]),t}(d.default);t.default=p},function(e,t,n){"use strict";function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(e).constructor)(t*n*r)}function i(e,t,n,i,o){var a=t/i,s=n/o;return e.map(function(e){for(var u=r(e,i,o),f=0;f<o;++f)for(var c=Math.min(Math.round(s*f),n-1),l=0;l<i;++l){var h=Math.min(Math.round(a*l),t-1),d=e[c*t+h];u[f*i+l]=d}return u})}function o(e,t,n){return(1-n)*e+n*t}function a(e,t,n,i,a){var s=t/i,u=n/a;return e.map(function(e){for(var f=r(e,i,a),c=0;c<a;++c)for(var l=u*c,h=Math.floor(l),d=Math.min(Math.ceil(l),n-1),p=0;p<i;++p){var v=s*p,m=v%1,y=Math.floor(v),b=Math.min(Math.ceil(v),t-1),g=e[h*t+y],w=e[h*t+b],_=e[d*t+y],x=e[d*t+b],k=o(o(g,w,m),o(_,x,m),l%1);f[c*i+p]=k}return f})}function s(e,t,n,r,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(s.toLowerCase()){case"nearest":return i(e,t,n,r,o);case"bilinear":case"linear":return a(e,t,n,r,o);default:throw new Error("Unsupported resampling method: '"+s+"'")}}function u(e,t,n,i,o,a){for(var s=t/i,u=n/o,f=r(e,i,o,a),c=0;c<o;++c)for(var l=Math.min(Math.round(u*c),n-1),h=0;h<i;++h)for(var d=Math.min(Math.round(s*h),t-1),p=0;p<a;++p){var v=e[l*t*a+d*a+p];f[c*i*a+h*a+p]=v}return f}function f(e,t,n,i,a,s){for(var u=t/i,f=n/a,c=r(e,i,a,s),l=0;l<a;++l)for(var h=f*l,d=Math.floor(h),p=Math.min(Math.ceil(h),n-1),v=0;v<i;++v)for(var m=u*v,y=m%1,b=Math.floor(m),g=Math.min(Math.ceil(m),t-1),w=0;w<s;++w){var _=e[d*t*s+b*s+w],x=e[d*t*s+g*s+w],k=e[p*t*s+b*s+w],S=e[p*t*s+g*s+w],O=o(o(_,x,y),o(k,S,y),h%1);c[l*i*s+v*s+w]=O}return c}function c(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(a.toLowerCase()){case"nearest":return u(e,t,n,r,i,o);case"bilinear":case"linear":return f(e,t,n,r,i,o);default:throw new Error("Unsupported resampling method: '"+a+"'")}}Object.defineProperty(t,"__esModule",{value:!0}),t.resampleNearest=i,t.resampleBilinear=a,t.resample=s,t.resampleNearestInterleaved=u,t.resampleBilinearInterleaved=f,t.resampleInterleaved=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=function(){function e(t){(0,o.default)(this,e),this._dataView=new DataView(t)}return(0,s.default)(e,[{key:"getUint64",value:function(e,t){var n=this.getUint32(e,t),r=this.getUint32(e+4,t);return t?n<<32|r:r<<32|n}},{key:"getInt64",value:function(e,t){var n=void 0,r=void 0;return t?(n=this.getInt32(e,t),r=this.getUint32(e+4,t),n<<32|r):(n=this.getUint32(e,t),(r=this.getInt32(e+4,t))<<32|n)}},{key:"getUint8",value:function(e,t){return this._dataView.getUint8(e,t)}},{key:"getInt8",value:function(e,t){return this._dataView.getInt8(e,t)}},{key:"getUint16",value:function(e,t){return this._dataView.getUint16(e,t)}},{key:"getInt16",value:function(e,t){return this._dataView.getInt16(e,t)}},{key:"getUint32",value:function(e,t){return this._dataView.getUint32(e,t)}},{key:"getInt32",value:function(e,t){return this._dataView.getInt32(e,t)}},{key:"getFloat32",value:function(e,t){return this._dataView.getFloat32(e,t)}},{key:"getFloat64",value:function(e,t){return this._dataView.getFloat64(e,t)}},{key:"buffer",get:function(){return this._dataView.buffer}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=function(){function e(t,n,r,i){(0,o.default)(this,e),this._dataView=new DataView(t),this._sliceOffset=n,this._littleEndian=r,this._bigTiff=i}return(0,s.default)(e,[{key:"covers",value:function(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}},{key:"readUint8",value:function(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(e){var t=this.readUint32(e),n=this.readUint32(e+4);return this._littleEndian?t<<32|n:n<<32|t}},{key:"readInt64",value:function(e){var t=void 0,n=void 0;return this._littleEndian?(t=this.readInt32(e),n=this.readUint32(e+4),t<<32|n):(t=this.readUint32(e-this._sliceOffset),(n=this.readInt32(e-this._sliceOffset+4))<<32|t)}},{key:"readOffset",value:function(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}},{key:"sliceOffset",get:function(){return this._sliceOffset}},{key:"sliceTop",get:function(){return this._sliceOffset+this.buffer.byteLength}},{key:"littleEndian",get:function(){return this._littleEndian}},{key:"bigTiff",get:function(){return this._bigTiff}},{key:"buffer",get:function(){return this._dataView.buffer}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var r=t+n,i=new ArrayBuffer(n),o=new Uint8Array(i),a=!0,s=!1,u=void 0;try{for(var f,c=e[Symbol.iterator]();!(a=(f=c.next()).done);a=!0){var l=f.value,h=l.offset-t,d=l.top-r,p=0,v=0,m=void 0;h<0?p=-h:h>0&&(v=h),d<0?m=l.length-p:d>0&&(m=r-l.offset-p);var y=new Uint8Array(l.data,p,m);o.set(y,v)}}catch(e){s=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw u}}return i}function o(e){if(0===e.length)return[];var t=[],n=[];t.push(n);for(var r=0;r<e.length;++r)0===r||e[r]===e[r-1]+1?n.push(e[r]):(n=[e[r]],t.push(n));return t}function a(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.headers,i=void 0===r?{}:r,o=n.blockSize;return new D(function(){var n=(0,S.default)(x.default.mark(function n(r,o){var a,s,u;return x.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,{headers:Object.assign({},i,{Range:"bytes="+r+"-"+(r+o)})});case 2:if(a=t.sent,a.ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==a.status){t.next=21;break}if(!a.arrayBuffer){t.next=14;break}return t.next=11,a.arrayBuffer();case 11:t.t0=t.sent,t.next=17;break;case 14:return t.next=16,a.buffer();case 16:t.t0=t.sent.buffer;case 17:return s=t.t0,t.abrupt("return",{data:s,offset:r,length:o});case 21:if(!a.arrayBuffer){t.next=27;break}return t.next=24,a.arrayBuffer();case 24:t.t1=t.sent,t.next=30;break;case 27:return t.next=29,a.buffer();case 29:t.t1=t.sent.buffer;case 30:return u=t.t1,t.abrupt("return",{data:u,offset:0,length:u.byteLength});case 32:case"end":return t.stop()}},n,t)}));return function(e,t){return n.apply(this,arguments)}}(),{blockSize:o})}function s(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.headers,i=void 0===r?{}:r,o=n.blockSize;return new D(function(){var n=(0,S.default)(x.default.mark(function n(r,o){return x.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){var a=new XMLHttpRequest;a.open("GET",e),a.responseType="arraybuffer",Object.entries(Object.assign({},i,{Range:"bytes="+r+"-"+(r+o)})).forEach(function(e){var t=(0,m.default)(e,2),n=t[0],r=t[1];return a.setRequestHeader(n,r)}),a.onload=function(){var e=a.response;t(206===a.status?{data:e,offset:r,length:o}:{data:e,offset:0,length:e.byteLength})},a.onerror=n,a.send()}));case 1:case"end":return t.stop()}},n,t)}));return function(e,t){return n.apply(this,arguments)}}(),{blockSize:o})}function u(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.headers,i=void 0===r?{}:r,o=n.blockSize;return new D(function(){var n=(0,S.default)(x.default.mark(function n(r,o){return x.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){var a=M.default.parse(e);("http:"===a.protocol?P.default:I.default).get(Object.assign({},a,{headers:Object.assign({},i,{Range:"bytes="+r+"-"+(r+o)})}),function(e){var n=[];e.on("data",function(e){n.push(e)}),e.on("end",function(){var e=E.Buffer.concat(n).buffer;t({data:e,offset:r,length:e.byteLength})})}).on("error",n)}));case 1:case"end":return t.stop()}},n,t)}));return function(e,t){return n.apply(this,arguments)}}(),{blockSize:o})}function f(e,t){var n=t.forceXHR;if("function"==typeof fetch&&!n)return a(e,t);if("undefined"!=typeof XMLHttpRequest)return s(e,t);if(P.default.get)return u(e,t);throw new Error("No remote source available")}function c(e){return{fetch:function(){function t(e,t){return n.apply(this,arguments)}var n=(0,S.default)(x.default.mark(function t(n,r){return x.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.slice(n,n+r));case 1:case"end":return t.stop()}},t,this)}));return t}()}}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return new Promise(function(r,i){(0,T.open)(e,t,n,function(e,t){e?i(e):r(t)})})}function h(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise(function(e,n){T.read.apply(void 0,t.concat([function(t,r,i){t?n(t):e({bytesRead:r,buffer:i})}]))})}function d(e){var t=l(e,"r");return{fetch:function(){function e(e,t){return n.apply(this,arguments)}var n=(0,S.default)(x.default.mark(function e(n,r){var i,o,a;return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return i=e.sent,e.next=5,h(i,E.Buffer.alloc(r),0,r,n);case 5:return o=e.sent,a=o.buffer,e.abrupt("return",a.buffer);case 8:case"end":return e.stop()}},e,this)}));return e}()}}function p(e){return{fetch:function(){function t(e,t){return n.apply(this,arguments)}var n=(0,S.default)(x.default.mark(function t(n,r){return x.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){var o=e.slice(n,n+r),a=new FileReader;a.onload=function(e){return t(e.target.result)},a.onerror=i,a.readAsArrayBuffer(o)}));case 1:case"end":return t.stop()}},t,this)}));return t}()}}Object.defineProperty(t,"__esModule",{value:!0});var v=n(44),m=r(v),y=n(3),b=r(y),g=n(4),w=r(g),_=n(27),x=r(_),k=n(28),S=r(k),O=function(){var e=(0,S.default)(x.default.mark(function e(t){return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){return setTimeout(e,t)}));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();t.makeFetchSource=a,t.makeXHRSource=s,t.makeHttpSource=u,t.makeRemoteSource=f,t.makeBufferSource=c,t.makeFileSource=d,t.makeFileReaderSource=p;var E=n(30),T=n(30),A=n(30),P=r(A),N=n(148),I=r(N),C=n(65),M=r(C),D=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.blockSize,i=void 0===r?65535:r;(0,b.default)(this,e),this.retrievalFunction=t,this.blockSize=i,this.blockRequests=new Map,this.blocks=new Map,this.blockIdsAwaitingRequest=null}return(0,w.default)(e,[{key:"fetch",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,S.default)(x.default.mark(function e(t,n){var r,a,s,u,f,c,l,h,d,p,v,m,y,b,g,w,_,k,E,T,A,P,N,I,C,M=this,D=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t+n,a=Math.floor(t/this.blockSize)*this.blockSize,s=[],u=[],f=[],c=a;c<r;c+=this.blockSize)l=Math.floor(c/this.blockSize),this.blocks.has(l)||this.blockRequests.has(l)||u.push(l),this.blockRequests.has(l)&&f.push(this.blockRequests.get(l)),s.push(l);if(this.blockIdsAwaitingRequest)for(h=0;h<u.length;++h)d=u[h],this.blockIdsAwaitingRequest.add(d);else this.blockIdsAwaitingRequest=new Set(u);if(D){e.next=10;break}return e.next=10,O();case 10:if(!this.blockIdsAwaitingRequest){e.next=33;break}for(p=o(Array.from(this.blockIdsAwaitingRequest).sort()),v=function(e){for(var t=M.requestData(e[0]*M.blockSize,e.length*M.blockSize),n=0;n<e.length;++n)!function(n){var r=e[n];M.blockRequests.set(r,(0,S.default)(x.default.mark(function e(){var i,o,a,s;return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:i=e.sent,o=n*M.blockSize,a=Math.min(o+M.blockSize,i.data.byteLength),s=i.data.slice(o,a),M.blockRequests.delete(r),M.blocks.set(r,{data:s,offset:i.offset+o,length:s.byteLength,top:i.offset+a});case 8:case"end":return e.stop()}},e,M)}))())}(n)},m=!0,y=!1,b=void 0,e.prev=16,g=p[Symbol.iterator]();!(m=(w=g.next()).done);m=!0)_=w.value,v(_);e.next=24;break;case 20:e.prev=20,e.t0=e.catch(16),y=!0,b=e.t0;case 24:e.prev=24,e.prev=25,!m&&g.return&&g.return();case 27:if(e.prev=27,!y){e.next=30;break}throw b;case 30:return e.finish(27);case 31:return e.finish(24);case 32:this.blockIdsAwaitingRequest=null;case 33:for(k=[],E=!0,T=!1,A=void 0,e.prev=37,P=u[Symbol.iterator]();!(E=(N=P.next()).done);E=!0)I=N.value,this.blockRequests.has(I)&&k.push(this.blockRequests.get(I));e.next=45;break;case 41:e.prev=41,e.t1=e.catch(37),T=!0,A=e.t1;case 45:e.prev=45,e.prev=46,!E&&P.return&&P.return();case 48:if(e.prev=48,!T){e.next=51;break}throw A;case 51:return e.finish(48);case 52:return e.finish(45);case 53:return e.next=55,Promise.all(k);case 55:return e.next=57,Promise.all(f);case 57:return C=s.map(function(e){return M.blocks.get(e)}),e.abrupt("return",i(C,t,n));case 59:case"end":return e.stop()}},e,this,[[16,20,24,32],[25,,27,31],[37,41,45,53],[46,,48,52]])}));return e}()},{key:"requestData",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,S.default)(x.default.mark(function e(t,n){var r;return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.retrievalFunction(t,n);case 2:return r=e.sent,r.length?r.length!==r.data.byteLength&&(r.data=r.data.slice(0,r.length)):r.length=r.data.byteLength,r.top=r.offset+r.length,e.abrupt("return",r);case 6:case"end":return e.stop()}},e,this)}));return e}()}]),e}()},function(e,t,n){function r(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}var i=n(30),o=n(65),a=e.exports;for(var s in i)i.hasOwnProperty(s)&&(a[s]=i[s]);a.request=function(e,t){return e=r(e),i.request.call(this,e,t)},a.get=function(e,t){return e=r(e),i.get.call(this,e,t)}},function(e,t,n){(function(e,r){var i;!function(o){function a(e){throw new RangeError(C[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(I,"."),r+s(e.split("."),t).join(".")}function f(e){for(var t,n,r=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function c(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=j(e>>>10&1023|55296),e=56320|1023&e),t+=j(e)}).join("")}function l(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function h(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?D(e/O):e>>1,e+=D(e/t);e>M*k>>1;r+=_)e=D(e/M);return D(r+(M+1)*e/(e+S))}function p(e){var t,n,r,i,o,s,u,f,h,p,v=[],m=e.length,y=0,b=T,g=E;for(n=e.lastIndexOf(A),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&a("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=y,s=1,u=_;i>=m&&a("invalid-input"),f=l(e.charCodeAt(i++)),(f>=_||f>D((w-y)/s))&&a("overflow"),y+=f*s,h=u<=g?x:u>=g+k?k:u-g,!(f<h);u+=_)p=_-h,s>D(w/p)&&a("overflow"),s*=p;t=v.length+1,g=d(y-o,t,0==o),D(y/t)>w-b&&a("overflow"),b+=D(y/t),y%=t,v.splice(y++,0,b)}return c(v)}function v(e){var t,n,r,i,o,s,u,c,l,p,v,m,y,b,g,S=[];for(e=f(e),m=e.length,t=T,n=0,o=E,s=0;s<m;++s)(v=e[s])<128&&S.push(j(v));for(r=i=S.length,i&&S.push(A);r<m;){for(u=w,s=0;s<m;++s)(v=e[s])>=t&&v<u&&(u=v);for(y=r+1,u-t>D((w-n)/y)&&a("overflow"),n+=(u-t)*y,t=u,s=0;s<m;++s)if(v=e[s],v<t&&++n>w&&a("overflow"),v==t){for(c=n,l=_;p=l<=o?x:l>=o+k?k:l-o,!(c<p);l+=_)g=c-p,b=_-p,S.push(j(h(p+g%b,0))),c=D(g/b);S.push(j(h(c,0))),o=d(n,y,r==i),n=0,++r}++n,++t}return S.join("")}function m(e){return u(e,function(e){return P.test(e)?p(e.slice(4).toLowerCase()):e})}function y(e){return u(e,function(e){return N.test(e)?"xn--"+v(e):e})}var b=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof r&&r);var g,w=2147483647,_=36,x=1,k=26,S=38,O=700,E=72,T=128,A="-",P=/^xn--/,N=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=_-x,D=Math.floor,j=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:f,encode:c},decode:p,encode:v,toASCII:y,toUnicode:m},void 0!==(i=function(){return g}.call(t,n,t,e))&&(e.exports=i)}()}).call(t,n(150)(e),n(151))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(154),t.encode=t.stringify=n(155)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var f=e.length;u>0&&f>u&&(f=u);for(var c=0;c<f;++c){var l,h,d,p,v=e[c].replace(s,"%20"),m=v.indexOf(n);m>=0?(l=v.substr(0,m),h=v.substr(m+1)):(l=v,h=""),d=decodeURIComponent(l),p=decodeURIComponent(h),r(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),function(a){var s=encodeURIComponent(i(a))+n;return o(e[a])?r(e[a],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[a]))}).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),o=r(i),a=n(28),s=r(a),u=n(3),f=r(u),c=n(4),l=r(c),h=n(157),d=r(h),p="undefined"!=typeof navigator?navigator.hardwareConcurrency:null,v=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;(0,f.default)(this,e),this.workers=[],this.idleWorkers=[],this.waitQueue=[],this.decoder=null;for(var n=0;n<t;++n){var r=new d.default;this.workers.push(r),this.idleWorkers.push(r)}}return(0,l.default)(e,[{key:"decode",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,s.default)(o.default.mark(function e(t,n){var r,i=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForWorker();case 2:return r=e.sent,e.abrupt("return",new Promise(function(e,o){r.onmessage=function(t){i.finishTask(r),e(t.data[0])},r.onerror=function(e){i.finishTask(r),o(e)},r.postMessage(["decode",t,n],[n])}));case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"waitForWorker",value:function(){function e(){return t.apply(this,arguments)}var t=(0,s.default)(o.default.mark(function e(){var t,n,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.idleWorkers.pop())){e.next=3;break}return e.abrupt("return",t);case 3:return n={},r=new Promise(function(e){n.resolve=e}),this.waitQueue.push(n),e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)}));return e}()},{key:"finishTask",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,s.default)(o.default.mark(function e(t){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=this.waitQueue.pop(),n?n.resolve(t):this.idleWorkers.push(t);case 2:case"end":return e.stop()}},e,this)}));return e}()},{key:"destroy",value:function(){for(var e=0;e<this.workers.length;++e)this.workers[e].terminate()}}]),e}();t.default=v},function(e,t,n){e.exports=function(){return n(158)('!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}([function(e,t,n){var r=n(30)("wks"),o=n(20),i=n(2).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(8),o=n(40),i=n(25),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(2),o=n(1),i=n(24),a=n(7),u=n(5),s=function(e,t,n){var f,c,l,d=e&s.F,h=e&s.G,p=e&s.S,v=e&s.P,b=e&s.B,y=e&s.W,m=h?o:o[t]||(o[t]={}),w=m.prototype,_=h?r:p?r[t]:(r[t]||{}).prototype;h&&(n=t);for(f in n)(c=!d&&_&&void 0!==_[f])&&u(m,f)||(l=c?_[f]:n[f],m[f]=h&&"function"!=typeof _[f]?n[f]:b&&c?i(l,r):y&&_[f]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[f]=l,e&s.R&&w&&!w[f]&&a(w,f,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(3),o=n(13);e.exports=n(4)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(9);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(56),o=n(23);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(71),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(33),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(90),i=r(o),a=n(94),u=r(a),s=n(33),f=r(s);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,f.default)(t)));e.prototype=(0,u.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(12),u=r(a),s=n(97),f=function(){function e(){(0,i.default)(this,e)}return(0,u.default)(e,[{key:"decode",value:function(e,t){var n=this.decodeBlock(t),r=e.Predictor||1;if(1!==r){var o=!e.StripOffsets,i=o?e.TileWidth:e.ImageWidth,a=o?e.TileLength:e.RowsPerStrip;return(0,s.applyPredictor)(n,r,i,a,e.BitsPerSample)}return n}}]),e}();t.default=f},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),o);for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},a={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(o)},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can\'t call method on "+e);return e}},function(e,t,n){var r=n(53);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can\'t convert object to primitive value")}},function(e,t,n){var r=n(8),o=n(55),i=n(31),a=n(29)("IE_PROTO"),u=function(){},s=function(){var e,t=n(41)("iframe"),r=i.length;for(t.style.display="none",n(59).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(43),o=n(31);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(30)("keys"),o=n(20);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(1),o=n(2),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(18)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(3).f,o=n(5),i=n(0)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(74),i=r(o),a=n(80),u=r(a),s="function"==typeof u.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":typeof e};t.default="function"==typeof u.default&&"symbol"===s(i.default)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":void 0===e?"undefined":s(e)}},function(e,t,n){t.f=n(0)},function(e,t,n){var r=n(2),o=n(1),i=n(18),a=n(34),u=n(3).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){e.exports={default:n(51),__esModule:!0}},function(e,t,n){"use strict";var r=n(52)(!0);n(39)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(18),o=n(6),i=n(42),a=n(7),u=n(14),s=n(54),f=n(32),c=n(60),l=n(0)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,v,b,y){s(n,t,p);var m,w,_,g=function(e){if(!d&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",x="values"==v,O=!1,S=e.prototype,E=S[l]||S["@@iterator"]||v&&S[v],A=E||g(v),P=v?x?g("entries"):A:void 0,M="Array"==t?S.entries||E:E;if(M&&(_=c(M.call(new e)))!==Object.prototype&&_.next&&(f(_,k,!0),r||"function"==typeof _[l]||a(_,l,h)),x&&E&&"values"!==E.name&&(O=!0,A=function(){return E.call(this)}),r&&!y||!d&&!O&&S[l]||a(S,l,A),u[t]=A,u[k]=h,v)if(m={values:x?A:g("values"),keys:b?A:g("keys"),entries:P},y)for(w in m)w in S||i(S,w,m[w]);else o(o.P+o.F*(d||O),t,m);return m}},function(e,t,n){e.exports=!n(4)&&!n(19)(function(){return 7!=Object.defineProperty(n(41)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),o=n(2).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){e.exports=n(7)},function(e,t,n){var r=n(5),o=n(10),i=n(57)(!1),a=n(29)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,f=[];for(n in u)n!=a&&r(u,n)&&f.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(f,n)||f.push(n));return f}},function(e,t,n){var r=n(22),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(23);e.exports=function(e){return Object(r(e))}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(43),o=n(31).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(36),o=n(13),i=n(10),a=n(25),u=n(5),s=n(40),f=Object.getOwnPropertyDescriptor;t.f=n(4)?f:function(e,t){if(e=i(e),t=a(t,!0),s)try{return f(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=(0,f.getDecoder)(t),o=r.decode(t,n);e.postMessage([o],[o])}var i=n(50),a=r(i),u=n(68),s=r(u),f=n(69);"undefined"!=typeof self&&self.addEventListener("message",function(e){var t=(0,s.default)(e.data),n=t[0],r=t.slice(1);switch(n){case"decode":o.apply(void 0,[self].concat((0,a.default)(r)))}})},function(e,t,n){"use strict";t.__esModule=!0;var r=n(37),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,o.default)(e)}},function(e,t,n){n(38),n(61),e.exports=n(1).Array.from},function(e,t,n){var r=n(22),o=n(23);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),f=u.length;return s<0||s>=f?e?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===f||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):a-56320+(i-55296<<10)+65536)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(26),o=n(13),i=n(32),a={};n(7)(a,n(0)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(3),o=n(8),i=n(27);e.exports=n(4)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(28);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(10),o=n(44),i=n(58);e.exports=function(e){return function(t,n,a){var u,s=r(t),f=o(s.length),c=i(a,f);if(e&&n!=n){for(;f>c;)if((u=s[c++])!=u)return!0}else for(;f>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(22),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(5),o=n(45),i=n(29)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r=n(24),o=n(6),i=n(45),a=n(62),u=n(63),s=n(44),f=n(64),c=n(65);o(o.S+o.F*!n(67)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,l,d=i(e),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,b=void 0!==v,y=0,m=c(d);if(b&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==m||h==Array&&u(m))for(t=s(d.length),n=new h(t);t>y;y++)f(n,y,b?v(d[y],y):d[y]);else for(l=m.call(d),n=new h;!(o=l.next()).done;y++)f(n,y,b?a(l,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){var r=n(8);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(14),o=n(0)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(3),o=n(13);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(66),o=n(0)("iterator"),i=n(14);e.exports=n(1).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(28),o=n(0)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),o))?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t,n){var r=n(0)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(37),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){return Array.isArray(e)?e:(0,o.default)(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){switch(e.Compression){case void 0:case 1:return new a.default;case 5:return new s.default;case 6:throw new Error("old style JPEG compression is not supported.");case 7:return new c.default(e);case 8:case 32946:return new d.default;case 32773:return new p.default;default:throw new Error("Unknown compression method identifier: "+e.Compression)}}Object.defineProperty(t,"__esModule",{value:!0}),t.getDecoder=o;var i=n(70),a=r(i),u=n(98),s=r(u),f=n(99),c=r(f),l=n(100),d=r(l),h=n(112),p=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(12),u=r(a),s=n(15),f=r(s),c=n(16),l=r(c),d=n(17),h=r(d),p=function(e){function t(){return(0,i.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"decodeBlock",value:function(e){return e}}]),t}(h.default);t.default=p},function(e,t,n){e.exports={default:n(72),__esModule:!0}},function(e,t,n){n(73);var r=n(1).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(6);r(r.S+r.F*!n(4),"Object",{defineProperty:n(3).f})},function(e,t,n){e.exports={default:n(75),__esModule:!0}},function(e,t,n){n(38),n(76),e.exports=n(34).f("iterator")},function(e,t,n){n(77);for(var r=n(2),o=n(7),i=n(14),a=n(0)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<u.length;s++){var f=u[s],c=r[f],l=c&&c.prototype;l&&!l[a]&&o(l,a,f),i[f]=i.Array}},function(e,t,n){"use strict";var r=n(78),o=n(79),i=n(14),a=n(10);e.exports=n(39)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(81),__esModule:!0}},function(e,t,n){n(82),n(87),n(88),n(89),e.exports=n(1).Symbol},function(e,t,n){"use strict";var r=n(2),o=n(5),i=n(4),a=n(6),u=n(42),s=n(83).KEY,f=n(19),c=n(30),l=n(32),d=n(20),h=n(0),p=n(34),v=n(35),b=n(84),y=n(85),m=n(8),w=n(9),_=n(10),g=n(25),k=n(13),x=n(26),O=n(86),S=n(48),E=n(3),A=n(27),P=S.f,M=E.f,T=O.f,j=r.Symbol,C=r.JSON,L=C&&C.stringify,B=h("_hidden"),I=h("toPrimitive"),N={}.propertyIsEnumerable,Z=c("symbol-registry"),D=c("symbols"),R=c("op-symbols"),F=Object.prototype,U="function"==typeof j,z=r.QObject,H=!z||!z.prototype||!z.prototype.findChild,G=i&&f(function(){return 7!=x(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(F,t);r&&delete F[t],M(e,t,n),r&&e!==F&&M(F,t,r)}:M,K=function(e){var t=D[e]=x(j.prototype);return t._k=e,t},W=U&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},q=function(e,t,n){return e===F&&q(R,t,n),m(e),t=g(t,!0),m(n),o(D,t)?(n.enumerable?(o(e,B)&&e[B][t]&&(e[B][t]=!1),n=x(n,{enumerable:k(0,!1)})):(o(e,B)||M(e,B,k(1,{})),e[B][t]=!0),G(e,t,n)):M(e,t,n)},V=function(e,t){m(e);for(var n,r=b(t=_(t)),o=0,i=r.length;i>o;)q(e,n=r[o++],t[n]);return e},Y=function(e,t){return void 0===t?x(e):V(x(e),t)},J=function(e){var t=N.call(this,e=g(e,!0));return!(this===F&&o(D,e)&&!o(R,e))&&(!(t||!o(this,e)||!o(D,e)||o(this,B)&&this[B][e])||t)},X=function(e,t){if(e=_(e),t=g(t,!0),e!==F||!o(D,t)||o(R,t)){var n=P(e,t);return!n||!o(D,t)||o(e,B)&&e[B][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=T(_(e)),r=[],i=0;n.length>i;)o(D,t=n[i++])||t==B||t==s||r.push(t);return r},$=function(e){for(var t,n=e===F,r=T(n?R:_(e)),i=[],a=0;r.length>a;)!o(D,t=r[a++])||n&&!o(F,t)||i.push(D[t]);return i};U||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(R,n),o(this,B)&&o(this[B],e)&&(this[B][e]=!1),G(this,e,k(1,n))};return i&&H&&G(F,e,{configurable:!0,set:t}),K(e)},u(j.prototype,"toString",function(){return this._k}),S.f=X,E.f=q,n(47).f=O.f=Q,n(36).f=J,n(46).f=$,i&&!n(18)&&u(F,"propertyIsEnumerable",J,!0),p.f=function(e){return K(h(e))}),a(a.G+a.W+a.F*!U,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)h(ee[te++]);for(var ne=A(h.store),re=0;ne.length>re;)v(ne[re++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return o(Z,e+="")?Z[e]:Z[e]=j(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in Z)if(Z[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!U,"Object",{create:Y,defineProperty:q,defineProperties:V,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:$}),C&&a(a.S+a.F*(!U||f(function(){var e=j();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(w(t)||void 0!==e)&&!W(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),r[1]=t,L.apply(C,r)}}),j.prototype[I]||n(7)(j.prototype,I,j.prototype.valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(20)("meta"),o=n(9),i=n(5),a=n(3).f,u=0,s=Object.isExtensible||function(){return!0},f=!n(19)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},l=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},d=function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},h=function(e){return f&&p.NEED&&s(e)&&!i(e,r)&&c(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:l,getWeak:d,onFreeze:h}},function(e,t,n){var r=n(27),o=n(46),i=n(36);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,f=0;u.length>f;)s.call(e,a=u[f++])&&t.push(a);return t}},function(e,t,n){var r=n(28);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(10),o=n(47).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(r(e))}},function(e,t){},function(e,t,n){n(35)("asyncIterator")},function(e,t,n){n(35)("observable")},function(e,t,n){e.exports={default:n(91),__esModule:!0}},function(e,t,n){n(92),e.exports=n(1).Object.setPrototypeOf},function(e,t,n){var r=n(6);r(r.S,"Object",{setPrototypeOf:n(93).set})},function(e,t,n){var r=n(9),o=n(8),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can\'t set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(24)(Function.call,n(48).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){e.exports={default:n(95),__esModule:!0}},function(e,t,n){n(96);var r=n(1).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(6);r(r.S,"Object",{create:n(26)})},function(e,t,n){"use strict";function r(e,t){var n=e.length-t,r=0;do{for(var o=t;o>0;o--)e[r+t]+=e[r],r++;n-=t}while(n>0)}function o(e,t,n){for(var r=0,o=e.length,i=o/n;o>t;){for(var a=t;a>0;--a)e[r+t]+=e[r],++r;o-=t}for(var u=e.slice(),s=0;s<i;++s)for(var f=0;f<n;++f)e[n*s+f]=u[(n-f-1)*i+s]}function i(e,t,n,i,a){if(!t||1===t)return e;for(var u=0;u<a.length;++u){if(a[u]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(a[u]!==a[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var s=a[0]/8,f=a.length,c=0;c<i;++c){var l=void 0;if(2===t){switch(a[0]){case 8:l=new Uint8Array(e,c*f*n*s,f*n*s);break;case 16:l=new Uint16Array(e,c*f*n*s,f*n*s/2);break;case 32:l=new Uint32Array(e,c*f*n*s,f*n*s/4);break;default:throw new Error("Predictor 2 not allowed with "+a[0]+" bits per sample.")}r(l,f,s)}else 3===t&&(l=new Uint8Array(e,c*f*n*s,n*s),o(l,f,s))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyPredictor=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=t%8,o=Math.floor(t/8),i=8-r,a=t+n-8*(o+1),u=8*(o+2)-(t+n),s=8*(o+2)-t;if(u=Math.max(0,u),o>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),w;var f=e[o]&Math.pow(2,8-r)-1;f<<=n-i;var c=f;if(o+1<e.length){var l=e[o+1]>>>u;l<<=Math.max(0,n-s),c+=l}if(a>8&&o+2<e.length){var d=8*(o+3)-(t+n);c+=e[o+2]>>>d}return c}function i(e,t){for(var n=t.length-1;n>=0;n--)e.push(t[n]);return e}function a(e){function t(){c=258,l=y}function n(e){var t=o(e,d,l);return d+=l,t}function r(e,t){return s[c]=t,u[c]=e,c++,c>=Math.pow(2,l)&&l++,c-1}function a(e){for(var t=[],n=e;4096!==n;n=u[n])t.push(s[n]);return t}for(var u=new Uint16Array(4093),s=new Uint8Array(4093),f=0;f<=257;f++)u[f]=4096,s[f]=f;var c=258,l=y,d=0,h=[];t();for(var p=new Uint8Array(e),v=n(p),b=void 0;v!==w;){if(v===m){for(t(),v=n(p);v===m;)v=n(p);if(v>m)throw new Error("corrupted code at scanline "+v);if(v===w)break;i(h,a(v)),b=v}else if(v<c){var _=a(v);i(h,_),r(b,_[_.length-1]),b=v}else{var g=a(b);if(!g)throw new Error("Bogus entry. Not in dictionary, "+b+" / "+c+", position: "+d);i(h,g),h.push(g[g.length-1]),r(b,g[g.length-1]),b=v}c>=Math.pow(2,l)-1&&l++,v=n(p)}return new Uint8Array(h)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(11),s=r(u),f=n(12),c=r(f),l=n(15),d=r(l),h=n(16),p=r(h),v=n(17),b=r(v),y=9,m=256,w=257,_=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,p.default)(t,e),(0,c.default)(t,[{key:"decodeBlock",value:function(e){return a(e).buffer}}]),t}(b.default);t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var n=0,r=[],o=16;o>0&&!e[o-1];)--o;r.push({children:[],index:0});for(var i=r[0],a=void 0,u=0;u<o;u++){for(var s=0;s<e[u];s++){for(i=r.pop(),i.children[i.index]=t[n];i.index>0;)i=r.pop();for(i.index++,r.push(i);r.length<=u;)r.push(a={children:[],index:0}),i.children[i.index]=a.children,i=a;n++}u+1<o&&(r.push(a={children:[],index:0}),i.children[i.index]=a.children,i=a)}return r[0].children}function i(e,t,n,r,o,i,a,u,s){function f(){if(S>0)return S--,O>>S&1;if(255===(O=e[x++])){var t=e[x++];if(t)throw new Error("unexpected marker: "+(O<<8|t).toString(16))}return S=7,O>>>7}function c(e){for(var t=e,n=void 0;null!==(n=f());){if("number"==typeof(t=t[n]))return t;if("object"!==(void 0===t?"undefined":(0,b.default)(t)))throw new Error("invalid huffman sequence")}return null}function l(e){for(var t=e,n=0;t>0;){var r=f();if(null===r)return;n=n<<1|r,--t}return n}function d(e){var t=l(e);return t>=1<<e-1?t:t+(-1<<e)+1}function h(e,t){var n=c(e.huffmanTableDC),r=0===n?0:d(n);e.pred+=r,t[0]=e.pred;for(var o=1;o<64;){var i=c(e.huffmanTableAC),a=15&i,u=i>>4;if(0===a){if(u<15)break;o+=16}else{o+=u;t[w[o]]=d(a),o++}}}function p(e,t){var n=c(e.huffmanTableDC),r=0===n?0:d(n)<<s;e.pred+=r,t[0]=e.pred}function v(e,t){t[0]|=f()<<s}function y(e,t){if(E>0)return void E--;for(var n=i,r=a;n<=r;){var o=c(e.huffmanTableAC),u=15&o,f=o>>4;if(0===u){if(f<15){E=l(f)+(1<<f)-1;break}n+=16}else{n+=f;t[w[n]]=d(u)*(1<<s),n++}}}function m(e,t){for(var n=i,r=a,o=0;n<=r;){var u=w[n],h=t[u]<0?-1:1;switch(A){case 0:var p=c(e.huffmanTableAC),v=15&p;if(o=p>>4,0===v)o<15?(E=l(o)+(1<<o),A=4):(o=16,A=1);else{if(1!==v)throw new Error("invalid ACn encoding");P=d(v),A=o?2:3}continue;case 1:case 2:t[u]?t[u]+=(f()<<s)*h:0===--o&&(A=2===A?3:0);break;case 3:t[u]?t[u]+=(f()<<s)*h:(t[u]=P<<s,A=0);break;case 4:t[u]&&(t[u]+=(f()<<s)*h)}n++}4===A&&0===--E&&(A=0)}var _=n.mcusPerLine,g=n.progressive,k=t,x=t,O=0,S=0,E=0,A=0,P=void 0,M=r.length,T=void 0,j=void 0,C=void 0,L=void 0,B=void 0,I=void 0;I=g?0===i?0===u?p:v:0===u?y:m:h;var N=0,Z=void 0,D=void 0;D=1===M?r[0].blocksPerLine*r[0].blocksPerColumn:_*n.mcusPerColumn;for(var R=o||D;N<D;){for(j=0;j<M;j++)r[j].pred=0;if(E=0,1===M)for(T=r[0],B=0;B<R;B++)!function(e,t,n){var r=n/e.blocksPerLine|0,o=n%e.blocksPerLine;t(e,e.blocks[r][o])}(T,I,N),N++;else for(B=0;B<R;B++){for(j=0;j<M;j++){T=r[j];var F=T,U=F.h,z=F.v;for(C=0;C<z;C++)for(L=0;L<U;L++)!function(e,t,n,r,o){var i=n/_|0,a=n%_,u=i*e.v+r,s=a*e.h+o;t(e,e.blocks[u][s])}(T,I,N,C,L)}if(++N===D)break}if(S=0,(Z=e[x]<<8|e[x+1])<65280)throw new Error("marker was not found");if(!(Z>=65488&&Z<=65495))break;x+=2}return x-k}function a(e,t){for(var n=[],r=t.blocksPerLine,o=t.blocksPerColumn,i=r<<3,a=new Int32Array(64),u=new Uint8Array(64),s=0;s<o;s++){for(var f=s<<3,c=0;c<8;c++)n.push(new Uint8Array(i));for(var l=0;l<r;l++){!function(e,n,r){var o=t.quantizationTable,i=void 0,a=void 0,u=void 0,s=void 0,f=void 0,c=void 0,l=void 0,d=void 0,h=void 0,p=r,v=void 0;for(v=0;v<64;v++)p[v]=e[v]*o[v];for(v=0;v<8;++v){var b=8*v;0!==p[1+b]||0!==p[2+b]||0!==p[3+b]||0!==p[4+b]||0!==p[5+b]||0!==p[6+b]||0!==p[7+b]?(i=E*p[0+b]+128>>8,a=E*p[4+b]+128>>8,u=p[2+b],s=p[6+b],f=A*(p[1+b]-p[7+b])+128>>8,d=A*(p[1+b]+p[7+b])+128>>8,c=p[3+b]<<4,l=p[5+b]<<4,h=i-a+1>>1,i=i+a+1>>1,a=h,h=u*S+s*O+128>>8,u=u*O-s*S+128>>8,s=h,h=f-l+1>>1,f=f+l+1>>1,l=h,h=d+c+1>>1,c=d-c+1>>1,d=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=a-u+1>>1,a=a+u+1>>1,u=h,h=f*x+d*k+2048>>12,f=f*k-d*x+2048>>12,d=h,h=c*g+l*_+2048>>12,c=c*_-l*g+2048>>12,l=h,p[0+b]=i+d,p[7+b]=i-d,p[1+b]=a+l,p[6+b]=a-l,p[2+b]=u+c,p[5+b]=u-c,p[3+b]=s+f,p[4+b]=s-f):(h=E*p[0+b]+512>>10,p[0+b]=h,p[1+b]=h,p[2+b]=h,p[3+b]=h,p[4+b]=h,p[5+b]=h,p[6+b]=h,p[7+b]=h)}for(v=0;v<8;++v){var y=v;0!==p[8+y]||0!==p[16+y]||0!==p[24+y]||0!==p[32+y]||0!==p[40+y]||0!==p[48+y]||0!==p[56+y]?(i=E*p[0+y]+2048>>12,a=E*p[32+y]+2048>>12,u=p[16+y],s=p[48+y],f=A*(p[8+y]-p[56+y])+2048>>12,d=A*(p[8+y]+p[56+y])+2048>>12,c=p[24+y],l=p[40+y],h=i-a+1>>1,i=i+a+1>>1,a=h,h=u*S+s*O+2048>>12,u=u*O-s*S+2048>>12,s=h,h=f-l+1>>1,f=f+l+1>>1,l=h,h=d+c+1>>1,c=d-c+1>>1,d=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=a-u+1>>1,a=a+u+1>>1,u=h,h=f*x+d*k+2048>>12,f=f*k-d*x+2048>>12,d=h,h=c*g+l*_+2048>>12,c=c*_-l*g+2048>>12,l=h,p[0+y]=i+d,p[56+y]=i-d,p[8+y]=a+l,p[48+y]=a-l,p[16+y]=u+c,p[40+y]=u-c,p[24+y]=s+f,p[32+y]=s-f):(h=E*r[v+0]+8192>>14,p[0+y]=h,p[8+y]=h,p[16+y]=h,p[24+y]=h,p[32+y]=h,p[40+y]=h,p[48+y]=h,p[56+y]=h)}for(v=0;v<64;++v){var m=128+(p[v]+8>>4);n[v]=m<0?0:m>255?255:m}}(t.blocks[s][l],u,a);for(var d=0,h=l<<3,p=0;p<8;p++)for(var v=n[f+p],b=0;b<8;b++)v[h+b]=u[d++]}}return n}Object.defineProperty(t,"__esModule",{value:!0});var u=n(15),s=r(u),f=n(16),c=r(f),l=n(11),d=r(l),h=n(12),p=r(h),v=n(33),b=r(v),y=n(17),m=r(y),w=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),_=4017,g=799,k=3406,x=2276,O=1567,S=3784,E=5793,A=2896,P=function(){function e(){(0,d.default)(this,e),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return(0,p.default)(e,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(e){function t(){var t=e[n]<<8|e[n+1];return n+=2,t}var n=0,r=t();if(65496!==r)throw new Error("SOI not found");for(r=t();65497!==r;){switch(r){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var a=function(){var r=t(),o=e.subarray(n,n+r-2);return n+=o.length,o}();65504===r&&74===a[0]&&70===a[1]&&73===a[2]&&70===a[3]&&0===a[4]&&(this.jfif={version:{major:a[5],minor:a[6]},densityUnits:a[7],xDensity:a[8]<<8|a[9],yDensity:a[10]<<8|a[11],thumbWidth:a[12],thumbHeight:a[13],thumbData:a.subarray(14,14+3*a[12]*a[13])}),65518===r&&65===a[0]&&100===a[1]&&111===a[2]&&98===a[3]&&101===a[4]&&0===a[5]&&(this.adobe={version:a[6],flags0:a[7]<<8|a[8],flags1:a[9]<<8|a[10],transformCode:a[11]});break;case 65499:for(var u=t(),s=u+n-2;n<s;){var f=e[n++],c=new Int32Array(64);if(f>>4==0)for(var l=0;l<64;l++){var d=w[l];c[d]=e[n++]}else{if(f>>4!=1)throw new Error("DQT: invalid table spec");for(var h=0;h<64;h++){c[w[h]]=t()}}this.quantizationTables[15&f]=c}break;case 65472:case 65473:case 65474:t();for(var p={extended:65473===r,progressive:65474===r,precision:e[n++],scanLines:t(),samplesPerLine:t(),components:{},componentsOrder:[]},v=e[n++],b=void 0,y=0;y<v;y++){b=e[n];var m=e[n+1]>>4,_=15&e[n+1],g=e[n+2];p.componentsOrder.push(b),p.components[b]={h:m,v:_,quantizationIdx:g},n+=3}!function(e){var t=0,n=0,r=void 0,o=void 0;for(o in e.components)e.components.hasOwnProperty(o)&&(r=e.components[o],t<r.h&&(t=r.h),n<r.v&&(n=r.v));var i=Math.ceil(e.samplesPerLine/8/t),a=Math.ceil(e.scanLines/8/n);for(o in e.components)if(e.components.hasOwnProperty(o)){r=e.components[o];for(var u=Math.ceil(Math.ceil(e.samplesPerLine/8)*r.h/t),s=Math.ceil(Math.ceil(e.scanLines/8)*r.v/n),f=i*r.h,c=a*r.v,l=[],d=0;d<c;d++){for(var h=[],p=0;p<f;p++)h.push(new Int32Array(64));l.push(h)}r.blocksPerLine=u,r.blocksPerColumn=s,r.blocks=l}e.maxH=t,e.maxV=n,e.mcusPerLine=i,e.mcusPerColumn=a}(p),this.frames.push(p);break;case 65476:for(var k=t(),x=2;x<k;){for(var O=e[n++],S=new Uint8Array(16),E=0,A=0;A<16;A++,n++)S[A]=e[n],E+=S[A];for(var P=new Uint8Array(E),M=0;M<E;M++,n++)P[M]=e[n];x+=17+E,O>>4==0?this.huffmanTablesDC[15&O]=o(S,P):this.huffmanTablesAC[15&O]=o(S,P)}break;case 65501:t(),this.resetInterval=t();break;case 65498:t();for(var T=e[n++],j=[],C=this.frames[0],L=0;L<T;L++){var B=C.components[e[n++]],I=e[n++];B.huffmanTableDC=this.huffmanTablesDC[I>>4],B.huffmanTableAC=this.huffmanTablesAC[15&I],j.push(B)}var N=e[n++],Z=e[n++],D=e[n++],R=i(e,n,C,j,this.resetInterval,N,Z,D>>4,15&D);n+=R;break;case 65535:255!==e[n]&&n--;break;default:if(255===e[n-3]&&e[n-2]>=192&&e[n-2]<=254){n-=3;break}throw new Error("unknown JPEG marker "+r.toString(16))}r=t()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t<this.frames.length;t++){var n=this.frames[t].components,r=!0,o=!1,i=void 0;try{for(var u,s=Object.keys(n)[Symbol.iterator]();!(r=(u=s.next()).done);r=!0){var f=u.value;n[f].quantizationTable=this.quantizationTables[n[f].quantizationIdx],delete n[f].quantizationIdx}}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}}for(var c=e[0],l=c.components,d=c.componentsOrder,h=[],p=c.samplesPerLine,v=c.scanLines,b=0;b<d.length;b++){var y=l[d[b]];h.push({lines:a(c,y),scaleX:y.h/c.maxH,scaleY:y.v/c.maxV})}for(var m=new Uint8Array(p*v*h.length),w=0,_=0;_<v;++_)for(var g=0;g<p;++g)for(var k=0;k<h.length;++k){var x=h[k];m[w]=x.lines[0|_*x.scaleY][0|g*x.scaleX],++w}return m}}]),e}(),M=function(e){function t(e){(0,d.default)(this,t);var n=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.reader=new P,e.JPEGTables&&n.reader.parse(e.JPEGTables),n}return(0,c.default)(t,e),(0,p.default)(t,[{key:"decodeBlock",value:function(e){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(e)),this.reader.getResult().buffer}}]),t}(m.default);t.default=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(12),u=r(a),s=n(15),f=r(s),c=n(16),l=r(c),d=n(101),h=n(17),p=r(h),v=function(e){function t(){return(0,i.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"decodeBlock",value:function(e){return(0,d.inflate)(new Uint8Array(e)).buffer}}]),t}(p.default);t.default=v},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=u.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=a.inflateInit2(this.strm,t.windowBits);if(n!==f.Z_OK)throw new Error(c[n]);this.header=new d,a.inflateGetHeader(this.strm,this.header)}function o(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function i(e,t){return t=t||{},t.raw=!0,o(e,t)}var a=n(102),u=n(21),s=n(107),f=n(108),c=n(109),l=n(110),d=n(111),h=Object.prototype.toString;r.prototype.push=function(e,t){var n,r,o,i,c,l,d=this.strm,p=this.options.chunkSize,v=this.options.dictionary,b=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?f.Z_FINISH:f.Z_NO_FLUSH,"string"==typeof e?d.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new u.Buf8(p),d.next_out=0,d.avail_out=p),n=a.inflate(d,f.Z_NO_FLUSH),n===f.Z_NEED_DICT&&v&&(l="string"==typeof v?s.string2buf(v):"[object ArrayBuffer]"===h.call(v)?new Uint8Array(v):v,n=a.inflateSetDictionary(this.strm,l)),n===f.Z_BUF_ERROR&&!0===b&&(n=f.Z_OK,b=!1),n!==f.Z_STREAM_END&&n!==f.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==f.Z_STREAM_END&&(0!==d.avail_in||r!==f.Z_FINISH&&r!==f.Z_SYNC_FLUSH)||("string"===this.options.to?(o=s.utf8border(d.output,d.next_out),i=d.next_out-o,c=s.buf2string(d.output,o),d.next_out=i,d.avail_out=p-i,i&&u.arraySet(d.output,d.output,o,i,0),this.onData(c)):this.onData(u.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(b=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==f.Z_STREAM_END);return n===f.Z_STREAM_END&&(r=f.Z_FINISH),r===f.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===f.Z_OK):r!==f.Z_SYNC_FLUSH||(this.onEnd(f.Z_OK),d.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===f.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=o,t.inflateRaw=i,t.ungzip=o},function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function o(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Z,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new m.Buf32(ve),t.distcode=t.distdyn=new m.Buf32(be),t.sane=1,t.back=-1,M):C}function a(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,i(e)):C}function u(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?C:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,a(e))):C}function s(e,t){var n,r;return e?(r=new o,e.state=r,r.window=null,n=u(e,t),n!==M&&(e.state=null),n):C}function f(e){return s(e,ye)}function c(e){if(me){var t;for(b=new m.Buf32(512),y=new m.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(O,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(S,e.lens,0,32,y,0,e.work,{bits:5}),me=!1}e.lencode=b,e.lenbits=9,e.distcode=y,e.distbits=5}function l(e,t,n,r){var o,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new m.Buf8(i.wsize)),r>=i.wsize?(m.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),m.arraySet(i.window,t,n-r,o,i.wnext),r-=o,r?(m.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}function d(e,t){var n,o,i,a,u,s,f,d,h,p,v,b,y,ve,be,ye,me,we,_e,ge,ke,xe,Oe,Se,Ee=0,Ae=new m.Buf8(4),Pe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return C;n=e.state,n.mode===V&&(n.mode=Y),u=e.next_out,i=e.output,f=e.avail_out,a=e.next_in,o=e.input,s=e.avail_in,d=n.hold,h=n.bits,p=s,v=f,xe=M;e:for(;;)switch(n.mode){case Z:if(0===n.wrap){n.mode=Y;break}for(;h<16;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(2&n.wrap&&35615===d){n.check=0,Ae[0]=255&d,Ae[1]=d>>>8&255,n.check=_(n.check,Ae,2,0),d=0,h=0,n.mode=D;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=de;break}if((15&d)!==N){e.msg="unknown compression method",n.mode=de;break}if(d>>>=4,h-=4,ke=8+(15&d),0===n.wbits)n.wbits=ke;else if(ke>n.wbits){e.msg="invalid window size",n.mode=de;break}n.dmax=1<<ke,e.adler=n.check=1,n.mode=512&d?W:V,d=0,h=0;break;case D:for(;h<16;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(n.flags=d,(255&n.flags)!==N){e.msg="unknown compression method",n.mode=de;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=de;break}n.head&&(n.head.text=d>>8&1),512&n.flags&&(Ae[0]=255&d,Ae[1]=d>>>8&255,n.check=_(n.check,Ae,2,0)),d=0,h=0,n.mode=R;case R:for(;h<32;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.head&&(n.head.time=d),512&n.flags&&(Ae[0]=255&d,Ae[1]=d>>>8&255,Ae[2]=d>>>16&255,Ae[3]=d>>>24&255,n.check=_(n.check,Ae,4,0)),d=0,h=0,n.mode=F;case F:for(;h<16;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.head&&(n.head.xflags=255&d,n.head.os=d>>8),512&n.flags&&(Ae[0]=255&d,Ae[1]=d>>>8&255,n.check=_(n.check,Ae,2,0)),d=0,h=0,n.mode=U;case U:if(1024&n.flags){for(;h<16;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.length=d,n.head&&(n.head.extra_len=d),512&n.flags&&(Ae[0]=255&d,Ae[1]=d>>>8&255,n.check=_(n.check,Ae,2,0)),d=0,h=0}else n.head&&(n.head.extra=null);n.mode=z;case z:if(1024&n.flags&&(b=n.length,b>s&&(b=s),b&&(n.head&&(ke=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),m.arraySet(n.head.extra,o,a,b,ke)),512&n.flags&&(n.check=_(n.check,o,b,a)),s-=b,a+=b,n.length-=b),n.length))break e;n.length=0,n.mode=H;case H:if(2048&n.flags){if(0===s)break e;b=0;do{ke=o[a+b++],n.head&&ke&&n.length<65536&&(n.head.name+=String.fromCharCode(ke))}while(ke&&b<s);if(512&n.flags&&(n.check=_(n.check,o,b,a)),s-=b,a+=b,ke)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=G;case G:if(4096&n.flags){if(0===s)break e;b=0;do{ke=o[a+b++],n.head&&ke&&n.length<65536&&(n.head.comment+=String.fromCharCode(ke))}while(ke&&b<s);if(512&n.flags&&(n.check=_(n.check,o,b,a)),s-=b,a+=b,ke)break e}else n.head&&(n.head.comment=null);n.mode=K;case K:if(512&n.flags){for(;h<16;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(d!==(65535&n.check)){e.msg="header crc mismatch",n.mode=de;break}d=0,h=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=V;break;case W:for(;h<32;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}e.adler=n.check=r(d),d=0,h=0,n.mode=q;case q:if(0===n.havedict)return e.next_out=u,e.avail_out=f,e.next_in=a,e.avail_in=s,n.hold=d,n.bits=h,j;e.adler=n.check=1,n.mode=V;case V:if(t===A||t===P)break e;case Y:if(n.last){d>>>=7&h,h-=7&h,n.mode=fe;break}for(;h<3;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}switch(n.last=1&d,d>>>=1,h-=1,3&d){case 0:n.mode=J;break;case 1:if(c(n),n.mode=ne,t===P){d>>>=2,h-=2;break e}break;case 2:n.mode=$;break;case 3:e.msg="invalid block type",n.mode=de}d>>>=2,h-=2;break;case J:for(d>>>=7&h,h-=7&h;h<32;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if((65535&d)!=(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=de;break}if(n.length=65535&d,d=0,h=0,n.mode=X,t===P)break e;case X:n.mode=Q;case Q:if(b=n.length){if(b>s&&(b=s),b>f&&(b=f),0===b)break e;m.arraySet(i,o,a,b,u),s-=b,a+=b,f-=b,u+=b,n.length-=b;break}n.mode=V;break;case $:for(;h<14;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(n.nlen=257+(31&d),d>>>=5,h-=5,n.ndist=1+(31&d),d>>>=5,h-=5,n.ncode=4+(15&d),d>>>=4,h-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=de;break}n.have=0,n.mode=ee;case ee:for(;n.have<n.ncode;){for(;h<3;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.lens[Pe[n.have++]]=7&d,d>>>=3,h-=3}for(;n.have<19;)n.lens[Pe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Oe={bits:n.lenbits},xe=k(x,n.lens,0,19,n.lencode,0,n.work,Oe),n.lenbits=Oe.bits,xe){e.msg="invalid code lengths set",n.mode=de;break}n.have=0,n.mode=te;case te:for(;n.have<n.nlen+n.ndist;){for(;Ee=n.lencode[d&(1<<n.lenbits)-1],be=Ee>>>24,ye=Ee>>>16&255,me=65535&Ee,!(be<=h);){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(me<16)d>>>=be,h-=be,n.lens[n.have++]=me;else{if(16===me){for(Se=be+2;h<Se;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(d>>>=be,h-=be,0===n.have){e.msg="invalid bit length repeat",n.mode=de;break}ke=n.lens[n.have-1],b=3+(3&d),d>>>=2,h-=2}else if(17===me){for(Se=be+3;h<Se;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}d>>>=be,h-=be,ke=0,b=3+(7&d),d>>>=3,h-=3}else{for(Se=be+7;h<Se;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}d>>>=be,h-=be,ke=0,b=11+(127&d),d>>>=7,h-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=de;break}for(;b--;)n.lens[n.have++]=ke}}if(n.mode===de)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=de;break}if(n.lenbits=9,Oe={bits:n.lenbits},xe=k(O,n.lens,0,n.nlen,n.lencode,0,n.work,Oe),n.lenbits=Oe.bits,xe){e.msg="invalid literal/lengths set",n.mode=de;break}if(n.distbits=6,n.distcode=n.distdyn,Oe={bits:n.distbits},xe=k(S,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Oe),n.distbits=Oe.bits,xe){e.msg="invalid distances set",n.mode=de;break}if(n.mode=ne,t===P)break e;case ne:n.mode=re;case re:if(s>=6&&f>=258){e.next_out=u,e.avail_out=f,e.next_in=a,e.avail_in=s,n.hold=d,n.bits=h,g(e,v),u=e.next_out,i=e.output,f=e.avail_out,a=e.next_in,o=e.input,s=e.avail_in,d=n.hold,h=n.bits,n.mode===V&&(n.back=-1);break}for(n.back=0;Ee=n.lencode[d&(1<<n.lenbits)-1],be=Ee>>>24,ye=Ee>>>16&255,me=65535&Ee,!(be<=h);){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(ye&&0==(240&ye)){for(we=be,_e=ye,ge=me;Ee=n.lencode[ge+((d&(1<<we+_e)-1)>>we)],be=Ee>>>24,ye=Ee>>>16&255,me=65535&Ee,!(we+be<=h);){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}d>>>=we,h-=we,n.back+=we}if(d>>>=be,h-=be,n.back+=be,n.length=me,0===ye){n.mode=se;break}if(32&ye){n.back=-1,n.mode=V;break}if(64&ye){e.msg="invalid literal/length code",n.mode=de;break}n.extra=15&ye,n.mode=oe;case oe:if(n.extra){for(Se=n.extra;h<Se;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,h-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ie;case ie:for(;Ee=n.distcode[d&(1<<n.distbits)-1],be=Ee>>>24,ye=Ee>>>16&255,me=65535&Ee,!(be<=h);){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(0==(240&ye)){for(we=be,_e=ye,ge=me;Ee=n.distcode[ge+((d&(1<<we+_e)-1)>>we)],be=Ee>>>24,ye=Ee>>>16&255,me=65535&Ee,!(we+be<=h);){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}d>>>=we,h-=we,n.back+=we}if(d>>>=be,h-=be,n.back+=be,64&ye){e.msg="invalid distance code",n.mode=de;break}n.offset=me,n.extra=15&ye,n.mode=ae;case ae:if(n.extra){for(Se=n.extra;h<Se;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,h-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=de;break}n.mode=ue;case ue:if(0===f)break e;if(b=v-f,n.offset>b){if((b=n.offset-b)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=de;break}b>n.wnext?(b-=n.wnext,y=n.wsize-b):y=n.wnext-b,b>n.length&&(b=n.length),ve=n.window}else ve=i,y=u-n.offset,b=n.length;b>f&&(b=f),f-=b,n.length-=b;do{i[u++]=ve[y++]}while(--b);0===n.length&&(n.mode=re);break;case se:if(0===f)break e;i[u++]=n.length,f--,n.mode=re;break;case fe:if(n.wrap){for(;h<32;){if(0===s)break e;s--,d|=o[a++]<<h,h+=8}if(v-=f,e.total_out+=v,n.total+=v,v&&(e.adler=n.check=n.flags?_(n.check,i,v,u-v):w(n.check,i,v,u-v)),v=f,(n.flags?d:r(d))!==n.check){e.msg="incorrect data check",n.mode=de;break}d=0,h=0}n.mode=ce;case ce:if(n.wrap&&n.flags){for(;h<32;){if(0===s)break e;s--,d+=o[a++]<<h,h+=8}if(d!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=de;break}d=0,h=0}n.mode=le;case le:xe=T;break e;case de:xe=L;break e;case he:return B;case pe:default:return C}return e.next_out=u,e.avail_out=f,e.next_in=a,e.avail_in=s,n.hold=d,n.bits=h,(n.wsize||v!==e.avail_out&&n.mode<de&&(n.mode<fe||t!==E))&&l(e,e.output,e.next_out,v-e.avail_out)?(n.mode=he,B):(p-=e.avail_in,v-=e.avail_out,e.total_in+=p,e.total_out+=v,n.total+=v,n.wrap&&v&&(e.adler=n.check=n.flags?_(n.check,i,v,e.next_out-v):w(n.check,i,v,e.next_out-v)),e.data_type=n.bits+(n.last?64:0)+(n.mode===V?128:0)+(n.mode===ne||n.mode===X?256:0),(0===p&&0===v||t===E)&&xe===M&&(xe=I),xe)}function h(e){if(!e||!e.state)return C;var t=e.state;return t.window&&(t.window=null),e.state=null,M}function p(e,t){var n;return e&&e.state?(n=e.state,0==(2&n.wrap)?C:(n.head=t,t.done=!1,M)):C}function v(e,t){var n,r,o=t.length;return e&&e.state?(n=e.state,0!==n.wrap&&n.mode!==q?C:n.mode===q&&(r=1,(r=w(r,t,o,0))!==n.check)?L:l(e,t,o,o)?(n.mode=he,B):(n.havedict=1,M)):C}var b,y,m=n(21),w=n(103),_=n(104),g=n(105),k=n(106),x=0,O=1,S=2,E=4,A=5,P=6,M=0,T=1,j=2,C=-2,L=-3,B=-4,I=-5,N=8,Z=1,D=2,R=3,F=4,U=5,z=6,H=7,G=8,K=9,W=10,q=11,V=12,Y=13,J=14,X=15,Q=16,$=17,ee=18,te=19,ne=20,re=21,oe=22,ie=23,ae=24,ue=25,se=26,fe=27,ce=28,le=29,de=30,he=31,pe=32,ve=852,be=592,ye=15,me=!0;t.inflateReset=a,t.inflateReset2=u,t.inflateResetKeep=i,t.inflateInit=f,t.inflateInit2=s,t.inflate=d,t.inflateEnd=h,t.inflateGetHeader=p,t.inflateSetDictionary=v,t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";function r(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){a=n>2e3?2e3:n,n-=a;do{o=o+t[r++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){var i=o,a=r+n;e^=-1;for(var u=r;u<a;u++)e=e>>>8^i[255&(e^t[u])];return-1^e}var o=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u,s,f,c,l,d,h,p,v,b,y,m,w,_,g,k,x,O,S,E;n=e.state,r=e.next_in,S=e.input,o=r+(e.avail_in-5),i=e.next_out,E=e.output,a=i-(t-e.avail_out),u=i+(e.avail_out-257),s=n.dmax,f=n.wsize,c=n.whave,l=n.wnext,d=n.window,h=n.hold,p=n.bits,v=n.lencode,b=n.distcode,y=(1<<n.lenbits)-1,m=(1<<n.distbits)-1;e:do{p<15&&(h+=S[r++]<<p,p+=8,h+=S[r++]<<p,p+=8),w=v[h&y];t:for(;;){if(_=w>>>24,h>>>=_,p-=_,0===(_=w>>>16&255))E[i++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=v[(65535&w)+(h&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}g=65535&w,_&=15,_&&(p<_&&(h+=S[r++]<<p,p+=8),g+=h&(1<<_)-1,h>>>=_,p-=_),p<15&&(h+=S[r++]<<p,p+=8,h+=S[r++]<<p,p+=8),w=b[h&m];n:for(;;){if(_=w>>>24,h>>>=_,p-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=b[(65535&w)+(h&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&w,_&=15,p<_&&(h+=S[r++]<<p,(p+=8)<_&&(h+=S[r++]<<p,p+=8)),(k+=h&(1<<_)-1)>s){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=_,p-=_,_=i-a,k>_){if((_=k-_)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,O=d,0===l){if(x+=f-_,_<g){g-=_;do{E[i++]=d[x++]}while(--_);x=i-k,O=E}}else if(l<_){if(x+=f+l-_,(_-=l)<g){g-=_;do{E[i++]=d[x++]}while(--_);if(x=0,l<g){_=l,g-=_;do{E[i++]=d[x++]}while(--_);x=i-k,O=E}}}else if(x+=l-_,_<g){g-=_;do{E[i++]=d[x++]}while(--_);x=i-k,O=E}for(;g>2;)E[i++]=O[x++],E[i++]=O[x++],E[i++]=O[x++],g-=3;g&&(E[i++]=O[x++],g>1&&(E[i++]=O[x++]))}else{x=i-k;do{E[i++]=E[x++],E[i++]=E[x++],E[i++]=E[x++],g-=3}while(g>2);g&&(E[i++]=E[x++],g>1&&(E[i++]=E[x++]))}break}}break}}while(r<o&&i<u);g=p>>3,r-=g,p-=g<<3,h&=(1<<p)-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=i<u?u-i+257:257-(i-u),n.hold=h,n.bits=p}},function(e,t,n){"use strict";var r=n(21),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,s,f,c,l,d){var h,p,v,b,y,m,w,_,g,k=d.bits,x=0,O=0,S=0,E=0,A=0,P=0,M=0,T=0,j=0,C=0,L=null,B=0,I=new r.Buf16(16),N=new r.Buf16(16),Z=null,D=0;for(x=0;x<=15;x++)I[x]=0;for(O=0;O<s;O++)I[t[n+O]]++;for(A=k,E=15;E>=1&&0===I[E];E--);if(A>E&&(A=E),0===E)return f[c++]=20971520,f[c++]=20971520,d.bits=1,0;for(S=1;S<E&&0===I[S];S++);for(A<S&&(A=S),T=1,x=1;x<=15;x++)if(T<<=1,(T-=I[x])<0)return-1;if(T>0&&(0===e||1!==E))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+I[x];for(O=0;O<s;O++)0!==t[n+O]&&(l[N[t[n+O]]++]=O);if(0===e?(L=Z=l,m=19):1===e?(L=o,B-=257,Z=i,D-=257,m=256):(L=a,Z=u,m=-1),C=0,O=0,x=S,y=c,P=A,M=0,v=-1,j=1<<A,b=j-1,1===e&&j>852||2===e&&j>592)return 1;for(;;){w=x-M,l[O]<m?(_=0,g=l[O]):l[O]>m?(_=Z[D+l[O]],g=L[B+l[O]]):(_=96,g=0),h=1<<x-M,p=1<<P,S=p;do{p-=h,f[y+(C>>M)+p]=w<<24|_<<16|g|0}while(0!==p);for(h=1<<x-1;C&h;)h>>=1;if(0!==h?(C&=h-1,C+=h):C=0,O++,0==--I[x]){if(x===E)break;x=t[n+l[O]]}if(x>A&&(C&b)!==v){for(0===M&&(M=A),y+=S,P=x-M,T=1<<P;P+M<E&&!((T-=I[P+M])<=0);)P++,T<<=1;if(j+=1<<P,1===e&&j>852||2===e&&j>592)return 1;v=C&b,f[v]=A<<24|P<<16|y-c|0}}return 0!==C&&(f[y+C]=x-M<<24|64<<16|0),d.bits=A,0}},function(e,t,n){"use strict";function r(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}var o=n(21),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var u=new o.Buf8(256),s=0;s<256;s++)u[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;u[254]=u[254]=1,t.string2buf=function(e){var t,n,r,i,a,u=e.length,s=0;for(i=0;i<u;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new o.Buf8(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new o.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,o,i,a,s=t||e.length,f=new Array(2*s);for(o=0,n=0;n<s;)if((i=e[n++])<128)f[o++]=i;else if((a=u[i])>4)f[o++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<s;)i=i<<6|63&e[n++],a--;a>1?f[o++]=65533:i<65536?f[o++]=i:(i-=65536,f[o++]=55296|i>>10&1023,f[o++]=56320|1023&i)}return r(f,o)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+u[e[n]]>t?n:t}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(12),u=r(a),s=n(15),f=r(s),c=n(16),l=r(c),d=n(17),h=r(d),p=function(e){function t(){return(0,i.default)(this,t),(0,f.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),n=[],r=0;r<e.byteLength;++r){var o=t.getInt8(r);if(o<0){var i=t.getUint8(r+1);o=-o;for(var a=0;a<=o;++a)n.push(i);r+=1}else{for(var u=0;u<=o;++u)n.push(t.getUint8(r+u+1));r+=o+1}}return new Uint8Array(n).buffer}}]),t}(h.default);t.default=p}]);',n.p+"09e85599ca3689ca398c.decoder.worker.min.js")}},function(e,t,n){"use strict";var r=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;n=new i,n.append(e),n=n.getBlob()}catch(t){n=new Blob([e])}return new Worker(r.createObjectURL(n))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},function(e,t,n){"use strict";var r=n(47),i=n(160),o=(0,i.invert)(r.fieldTagNames),a=(0,i.invert)(r.geoKeyNames),s={};(0,i.assign)(s,o),(0,i.assign)(s,a);var u=(0,i.invert)(r.fieldTypeNames),f={nextZero:function(e,t){for(var n=t;0!==e[n];)n++;return n},readUshort:function(e,t){return e[t]<<8|e[t+1]},readShort:function(e,t){var n=f.ui8;return n[0]=e[t+1],n[1]=e[t+0],f.i16[0]},readInt:function(e,t){var n=f.ui8;return n[0]=e[t+3],n[1]=e[t+2],n[2]=e[t+1],n[3]=e[t+0],f.i32[0]},readUint:function(e,t){var n=f.ui8;return n[0]=e[t+3],n[1]=e[t+2],n[2]=e[t+1],n[3]=e[t+0],f.ui32[0]},readASCII:function(e,t,n){return n.map(function(n){return String.fromCharCode(e[t+n])}).join("")},readFloat:function(e,t){var n=f.ui8;return(0,i.times)(4,function(r){n[r]=e[t+3-r]}),f.fl32[0]},readDouble:function(e,t){var n=f.ui8;return(0,i.times)(8,function(r){n[r]=e[t+7-r]}),f.fl64[0]},writeUshort:function(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n>>0&255},writeASCII:function(e,t,n){(0,i.times)(n.length,function(r){e[t+r]=n.charCodeAt(r)})},ui8:new Uint8Array(8)};f.fl64=new Float64Array(f.ui8.buffer),f.writeDouble=function(e,t,n){f.fl64[0]=n,(0,i.times)(8,function(n){e[t+n]=f.ui8[7-n]})};var c=function(e,t,n,o){var a=n,s=Object.keys(o).filter(function(e){return void 0!==e&&null!==e&&"undefined"!==e});e.writeUshort(t,a,s.length),a+=2;var f=a+12*s.length+4;return s.forEach(function(n){var s=null;"number"==typeof n?s=n:"string"==typeof n&&(s=parseInt(n,10));var c=r.fieldTagTypes[s],l=u[c];if(null==c||void 0===c||void 0===c)throw new Error("unknown type of tag: "+s);var h=o[n];if(void 0===h)throw new Error("failed to get value for key "+n);"ASCII"===c&&"string"==typeof h&&!1===(0,i.endsWith)(h,"\0")&&(h+="\0");var d=h.length;e.writeUshort(t,a,s),a+=2,e.writeUshort(t,a,l),a+=2,e.writeUint(t,a,d),a+=4;var p=[-1,1,1,2,4,8,0,0,0,0,0,0,8][l]*d,v=a;p>4&&(e.writeUint(t,a,f),v=f),"ASCII"===c?e.writeASCII(t,v,h):"SHORT"===c?(0,i.times)(d,function(n){e.writeUshort(t,v+2*n,h[n])}):"LONG"===c?(0,i.times)(d,function(n){e.writeUint(t,v+4*n,h[n])}):"RATIONAL"===c?(0,i.times)(d,function(n){e.writeUint(t,v+8*n,Math.round(1e4*h[n])),e.writeUint(t,v+8*n+4,1e4)}):"DOUBLE"===c&&(0,i.times)(d,function(n){e.writeDouble(t,v+8*n,h[n])}),p>4&&(p+=1&p,f+=p),a+=4}),[a,f]},l=function(e){var t=new Uint8Array(1e3),n=4,r=f;t[0]=77,t[1]=77,t[3]=42;var i=8;if(r.writeUint(t,n,i),n+=4,e.forEach(function(n,o){var a=c(r,t,i,n);i=a[1],o<e.length-1&&r.writeUint(t,a[0],i)}),t.slice)return t.slice(0,i).buffer;for(var o=new Uint8Array(i),a=0;a<i;a++)o[a]=t[a];return o.buffer},h=function(e,t,n,r){if(void 0===n||null===n)throw new Error("you passed into encodeImage a width of type "+n);if(void 0===t||null===t)throw new Error("you passed into encodeImage a width of type "+t);var o={256:[t],257:[n],273:[1e3],278:[n],305:"geotiff.js"};if(r)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);var s=new Uint8Array(l([o])),u=new Uint8Array(e),f=o[277],c=new Uint8Array(1e3+t*n*f);return(0,i.times)(s.length,function(e){c[e]=s[e]}),(0,i.forEach)(u,function(e,t){c[1e3+t]=e}),c.buffer},d=function(e){var t={};for(var n in e)"StripOffsets"!==n&&(s[n]||console.error(n,"not in name2code:",Object.keys(s)),t[s[n]]=e[n]);return t},p=function(e){return Array.isArray(e)?e:[e]},v=[["Compression",1],["PlanarConfiguration",1],["XPosition",0],["YPosition",0],["ResolutionUnit",1],["ExtraSamples",0],["GeoAsciiParams","WGS 84\0"],["ModelTiepoint",[0,0,0,-180,90,0]],["GTModelTypeGeoKey",2],["GTRasterTypeGeoKey",1],["GeographicTypeGeoKey",4326],["GeogCitationGeoKey","WGS 84"]],m=function(e,t){var n="number"==typeof e[0],o=void 0,a=void 0,u=void 0,f=void 0;n?(o=t.height||t.ImageLength,u=t.width||t.ImageWidth,a=e.length/(o*u),f=e):(a=e.length,o=e[0].length,u=e[0][0].length,f=[],(0,i.times)(o,function(t){(0,i.times)(u,function(n){(0,i.times)(a,function(r){f.push(e[r][t][n])})})})),t.ImageLength=o,delete t.height,t.ImageWidth=u,delete t.width,t.BitsPerSample||(t.BitsPerSample=(0,i.times)(a,function(){return 8})),v.forEach(function(e){var n=e[0];if(!t[n]){var r=e[1];t[n]=r}}),t.PhotometricInterpretation||(t.PhotometricInterpretation=3===t.BitsPerSample.length?2:1),t.SamplesPerPixel||(t.SamplesPerPixel=[a]),t.StripByteCounts||(t.StripByteCounts=[a*o*u]),t.ModelPixelScale||(t.ModelPixelScale=[360/u,180/o,0]),t.SampleFormat||(t.SampleFormat=(0,i.times)(a,function(){return 1}));var c=Object.keys(t).filter(function(e){return(0,i.endsWith)(e,"GeoKey")}).sort(function(e,t){return s[e]-s[t]});if(!t.GeoKeyDirectory){var l=c.length,m=[1,1,0,l];c.forEach(function(e){var n=Number(s[e]);m.push(n);var i=void 0,o=void 0,a=void 0;"SHORT"===r.fieldTagTypes[n]?(i=1,o=0,a=t[e]):"GeogCitationGeoKey"===e?(i=t.GeoAsciiParams.length,o=Number(s.GeoAsciiParams),a=0):console.log("[geotiff.js] couldn't get TIFFTagLocation for "+e),m.push(o),m.push(i),m.push(a)}),t.GeoKeyDirectory=m}for(var y in c)c.hasOwnProperty(y)&&delete t[y];["Compression","ExtraSamples","GeographicTypeGeoKey","GTModelTypeGeoKey","GTRasterTypeGeoKey","ImageLength","ImageWidth","PhotometricInterpretation","PlanarConfiguration","ResolutionUnit","SamplesPerPixel","XPosition","YPosition"].forEach(function(e){t[e]&&(t[e]=p(t[e]))});var b=d(t);return h(f,u,o,b)};e.exports={writeGeotiff:m}},function(e,t,n){"use strict";function r(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function i(e,t){for(var n=[],r=e.length,i=0;i<r;i+=t){for(var o=[],a=i;a<i+t;a++)o.push(e[a]);n.push(o)}return n}function o(e,t){return!(e.length<t.length)&&e.substr(e.length-t.length)===t}function a(e,t){for(var n=e.length,r=0;r<n;r++)t(e[r],r)}function s(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r]=n}return t}function u(e){for(var t=[],n=0;n<e;n++)t.push(n);return t}function f(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n}function c(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}function l(e){return e.length?c(e).map(l):e}Object.defineProperty(t,"__esModule",{value:!0}),t.assign=r,t.chunk=i,t.endsWith=o,t.forEach=a,t.invert=s,t.range=u,t.times=f,t.toArray=c,t.toArrayRecursively=l}])});
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<script src="geotiff.bundle.min.js"></script>
<script src="d3-marching-squares.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
</head>
<body>
<script>
(async function() {
const tiff = await GeoTIFF.fromUrl("sample.tiff");
let image = await tiff.getImage(3);
let rasterData = await image.readRasters({samples: [0]});
rasterData = rasterData[0];
let data = new Array(image.getHeight());
for (let j = 0; j<image.getHeight(); j++){
data[j] = new Array(image.getWidth());
for (let i = 0; i<image.getWidth(); i++){
data[j][i] = rasterData[i + j*image.getWidth()];
}
}
let intervals = [-2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20];
let bands = rastertools.isobands(data, [0, 1, 0, 0, 0, 1], intervals);
let colorScale = d3.scaleSequential(d3.interpolateBuPu);
let canvas = d3.select("body").append("canvas")
.attr("width", 680)
.attr("height", 500);
let context = canvas.node().getContext("2d");
let path = d3.geoPath()
.context(context);
bands.features.forEach(function(d, i) {
context.beginPath();
context.globalAlpha = 0.7;
context.fillStyle = colorScale((2 + intervals[i])/22);
path(d);
context.fill();
});
})();
</script>
</body>
This file has been truncated, but you can view the full file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment