/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/tslib.es6","../../../../core/Accessor","../../../../core/Evented","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass","../../../../chunks/vec4f64","../../../../geometry/projection","../../../../geometry/support/aaBoundingBox","../../../../geometry/support/aaBoundingRect","../II3SMeshView3D"],(function(e,r,t,o,u,s,a,c,n,p,i,l,y,S,d){"use strict";e.I3SQueryFeatureStore=function(e){function t(r){var t;return(t=e.call(this,r)||this).events=new u,t}r._inheritsLoose(t,e);var o=t.prototype;return o.forEach=function(e){this.forAllFeatures((r=>(e(r),d.ForAllFeaturesReturnType.CONTINUE)))},o.forEachBounds=function(e,r,t){const o=this.getFeatureExtent;for(const u of e)r(o(u,t))},o.forEachInBounds=function(e,r){this.forAllFeatures((t=>{const o=this.getFeatureExtent(t,f);return S.intersects(e,y.toRect(o,h))&&r(t),d.ForAllFeaturesReturnType.CONTINUE}),(r=>{if(l.projectBoundingSphere(r.node.mbs,this.sourceSpatialReference,F,this.viewSpatialReference),F[0]>=e[0]&&F[2]<=e[2]&&F[1]>=e[1]&&F[3]<=e[3])return d.ForAllFeaturesReturnType.CONTINUE;const t=Math.max(e[0],Math.min(F[0],e[2])),o=Math.max(e[1],Math.min(F[1],e[3])),u=F[0]-t,s=F[1]-o;return u*u+s*s<=F[3]*F[3]?d.ForAllFeaturesReturnType.CONTINUE:d.ForAllFeaturesReturnType.SKIP}))},t}(o),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"featureAdapter",void 0),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"toArray",void 0),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"forAllFeatures",void 0),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"getFeatureExtent",void 0),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"sourceSpatialReference",void 0),t.__decorate([s.property({constructOnly:!0})],e.I3SQueryFeatureStore.prototype,"viewSpatialReference",void 0),e.I3SQueryFeatureStore=t.__decorate([p.subclass("esri.views.3d.layers.i3s.I3SQueryFeatureStore")],e.I3SQueryFeatureStore);const F=i.create(),f=y.create(),h=S.create();Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
