/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import t from"../../../geometry/Multipoint.js";import{getEndpoint as e}from"../../../geometry/support/curves/curveUtils.js";function n(t){if(!t)return"mouse";if("pointerType"in t)return t.pointerType;if("native"in t&&t.native&&"pointerType"in t.native){const e=t.native.pointerType;if("pen"===e||"touch"===e)return e}return"mouse"}function i(t){const{originalEvent:e,stopPropagation:n}=t;e&&n&&"stopPropagation"in e&&e.stopPropagation()}function o(n){if("multipoint"===n.type||"point"===n.type)return n;const i=new t({spatialReference:n.spatialReference});return"polyline"===n.type?i.points=n.curvePaths?.flatMap(t=>t.map(t=>e(t)))??n.paths.flat():"polygon"===n.type&&(i.points=n.curveRings?.flatMap(t=>t.map(t=>e(t)))??n.rings.flat()),i}export{n as getPointerType,i as markHandled,o as multipointFromGeometry};
