/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["require","exports","../../../chunks/_rollupPluginBabelHelpers"],(function(e,n,t){"use strict";function r(){return o.apply(this,arguments)}function o(){return(o=t._asyncToGenerator((function*(){return new Promise(((n,t)=>e(["../../../geometry/geometryEngineJSON"],n,t)))}))).apply(this,arguments)}function i(){return s.apply(this,arguments)}function s(){return(s=t._asyncToGenerator((function*(){return r().then((({contains:e,intersects:n,overlaps:t,simplify:r})=>({contains:e,intersects:n,overlaps:t,simplify:r})))}))).apply(this,arguments)}function a(e){return c.apply(this,arguments)}function c(){return(c=t._asyncToGenerator((function*(e){const{selector:n,candidates:t,currentSelection:r,options:o,view:s}=e;if(!(t&&t.length&&r&&s))return{added:[],removed:[]};const{overlaps:a,intersects:c,contains:u}=o,{spatialReference:l}=s;if(!n){return{added:[],removed:r.removeAll()}}const p=n,d=yield i(),y=[],f=[];return t.forEach((e=>{const n=e.geometry,t=a&&!!d.overlaps(l,p,n),o=c&&!!d.intersects(l,p,n),i=u&&!!d.contains(l,p,n),s=r.includes(e);t||o||i?!s&&y.push(e):s&&f.push(e)})),r.removeMany(f),r.addMany(y),{added:y,removed:f}}))).apply(this,arguments)}n.getGeometryEngineOperations=i,n.importGeometryEngine=r,n.updateSelection=a,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
