/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
async function t(t,e){if("2d"===t.type)return t.hitTest(e);const r=await t.hitTest(e);if(0===r.results.length)return r;const s=r.results[0],u=(s.distance??0)*(1+n),i=r.results.findIndex(t=>(t.distance??0)>u);return-1!==i&&(r.results=r.results.slice(0,i)),s&&r.ground.distance>u&&(r.ground.mapPoint=null),r}const n=.05;function e(t){return"graphic"===t?.type}function r(t){return t.find(e)??null}function s(t){return t.filter(e)}export{s as filterGraphicHits,r as findFirstGraphicHit,t as hitTestSelectSimilarDistance};
