// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports","./GeohashCell"],function(t,u){class v{constructor(a){this._fields=a;this._depth=this._size=0;this._root=u.GeohashCell.create(this._fields,0,0,0)}destroy(){}get size(){return this._size}get depth(){return this._depth}find(a,k,g){return this._root.find(a,k,g,0,0,0)}insert(a,k,g,r,b,p,q){let h=this._root,e=0,l=0,m=0;for(;null!==h;){h.insert(a,k,g,r,b,q);if(e>=p)break;var d=Math.ceil((e+1)/2),f=Math.floor((e+1)/2);const c=1-e%2;var n=30-(3*d+2*f);d=30-(2*d+3*f);n=(r&7*c+3*(1-c)<> n;d=(b&3*c+7*(1-c)<>d;f=n+d*(8*c+4*(1-c));const w=2*c+3*(1-c);l=l<<3*c+2*(1-c)|n;m=m<=r)k.push(a),a=a.next;else{var h=Math.ceil((b+ 1)/2),e=Math.floor((b+1)/2);b=1-b%2;var l=30-(3*h+2*e),m=30-(2*h+3*e),d=~((1<>l);e=Math.max(q,(g.yLL&f)>>m);l=Math.min(p+8*b+4*(1-b),(g.xTR&d)>>l);m=Math.min(q+4*b+8*(1-b),(g.yTR&f)>>m);for(d=f=null;e<=m;e++)for(let n=h;n<=l;n++){const c=a.children[n-p+(e-q)*(8*b+4*(1-b))];c&&(f||(f=c,f.next=a.next),d&&(d.next=c),d=c,c.next=a.next)}a=f||a.next}}return k}}t.GeohashTree=v;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});