define(["./Math-e73894ab","./when-422ea0ae","./Check-741c5f3c","./defaultValue-81eec7ed"],(function(e,t,r,a){"use strict";class i{static upsample(t,r,a,n,s,h){var l=t.tileXYToRectangle(s.x,s.y,s.z),g=t.tileXYToRectangle(h.x,h.y,h.z);let o=new Int16Array(a*n);for(var u=0;u=h&&(v=h-1,f=h-2);var H=0|c,p=H+1;p>=l&&(p=l-1,H=l-2);var w=u-f,d=c-H;H=l-1-H,p=l-1-p;var m=i.getHeight(e,t,r,a,n,H*h+f),y=i.getHeight(e,t,r,a,n,H*h+v),C=i.getHeight(e,t,r,a,n,p*h+f),I=i.getHeight(e,t,r,a,n,p*h+v);return i.triangleInterpolateHeight(w,d,m,y,C,I)}static getHeight(e,t,r,a,i,n){n*=a;var s,h=0;if(i)for(s=0;s=0;--s)h=h*r+e[n+s];return h}static triangleInterpolateHeight(e,t,r,a,i,n){return t