import { $ } from "./chunk-3RSFVUKZ.js"; import { w2 as w } from "./chunk-6T6G6LCQ.js"; import { r } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/renderers/support/clickToleranceUtils.js function t(t3, e2) { return e2 ? "xoffset" in e2 && e2.xoffset ? Math.max(t3, Math.abs(e2.xoffset)) : "yoffset" in e2 && e2.yoffset ? Math.max(t3, Math.abs(e2.yoffset || 0)) : t3 : t3; } function e(t3) { let e2 = 0, n2 = 0; for (let r3 = 0; r3 < t3.length; r3++) { const s3 = t3[r3].size; "number" == typeof s3 && (e2 += s3, n2++); } return e2 / n2; } function n(t3, n2) { return "number" == typeof t3 ? t3 : t3 && t3.stops && t3.stops.length ? e(t3.stops) : n2; } function r2(t3, e2) { if (!e2) return t3; const r3 = e2.filter((t4) => "size" === t4.type).map((e3) => { const { maxSize: r4, minSize: s4 } = e3; return (n(r4, t3) + n(s4, t3)) / 2; }); let s3 = 0; const o = r3.length; if (0 === o) return t3; for (let n2 = 0; n2 < o; n2++) s3 += r3[n2]; const f = Math.floor(s3 / o); return Math.max(f, t3); } function s(e2) { var _a; const n2 = e2 && e2.renderer, s3 = "touch" === (e2 && e2.event && e2.event.pointerType) ? 9 : 6; if (!n2) return s3; const o = "visualVariables" in n2 ? r2(s3, n2.visualVariables) : s3; if ("simple" === n2.type) return t(o, n2.symbol); if ("unique-value" === n2.type) { let e3 = o; return (_a = n2.uniqueValueInfos) == null ? void 0 : _a.forEach((n3) => { e3 = t(e3, n3.symbol); }), e3; } if ("class-breaks" === n2.type) { let e3 = o; return n2.classBreakInfos.forEach((n3) => { e3 = t(e3, n3.symbol); }), e3; } return "dot-density" === n2.type || n2.type, o; } // node_modules/@arcgis/core/views/support/drapedUtils.js function a(t3, n2, a2, o = new w()) { let s3; if ("2d" === a2.type) s3 = n2 * a2.resolution; else if ("3d" === a2.type) { const i = a2.overlayPixelSizeInMapUnits(t3), o2 = a2.basemapSpatialReference; s3 = r(o2) && !o2.equals(a2.spatialReference) ? $(o2) / $(a2.spatialReference) : n2 * i; } const m = t3.x - s3, p = t3.y - s3, c = t3.x + s3, l = t3.y + s3, { spatialReference: f } = a2; return o.xmin = Math.min(m, c), o.ymin = Math.min(p, l), o.xmax = Math.max(m, c), o.ymax = Math.max(p, l), o.spatialReference = f, o; } var s2 = new w(); export { s, a }; //# sourceMappingURL=chunk-CFZGXSAO.js.map