/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
class t{constructor(t,e,s){this._scale=t,this._shift=e,this._levelShift=s}getLevelRowColumn(t){const e=this.getLevelShift(t[0]),s=this._shift+e;return s?[t[0]-e,t[1]>>s,t[2]>>s]:t}getLevelShift(t){return Math.min(t,this._levelShift)}getOffset(t,e){let s=0,i=0;const h=this._shift+this.getLevelShift(t[0]);if(h){const l=(1<<h)-1,f=e/(this._scale*(1<<h-1));s=(t[2]&l)*f,i=(t[1]&l)*f}return[s,i]}getScale(t){return this._scale*(1<<this._shift+this.getLevelShift(t))}}export{t as SchemaHelper};
