chunk-CFZGXSAO.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import {
  2. $
  3. } from "./chunk-3RSFVUKZ.js";
  4. import {
  5. w2 as w
  6. } from "./chunk-6T6G6LCQ.js";
  7. import {
  8. r
  9. } from "./chunk-YXWMMD76.js";
  10. // node_modules/@arcgis/core/renderers/support/clickToleranceUtils.js
  11. function t(t3, e2) {
  12. 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;
  13. }
  14. function e(t3) {
  15. let e2 = 0, n2 = 0;
  16. for (let r3 = 0; r3 < t3.length; r3++) {
  17. const s3 = t3[r3].size;
  18. "number" == typeof s3 && (e2 += s3, n2++);
  19. }
  20. return e2 / n2;
  21. }
  22. function n(t3, n2) {
  23. return "number" == typeof t3 ? t3 : t3 && t3.stops && t3.stops.length ? e(t3.stops) : n2;
  24. }
  25. function r2(t3, e2) {
  26. if (!e2)
  27. return t3;
  28. const r3 = e2.filter((t4) => "size" === t4.type).map((e3) => {
  29. const { maxSize: r4, minSize: s4 } = e3;
  30. return (n(r4, t3) + n(s4, t3)) / 2;
  31. });
  32. let s3 = 0;
  33. const o = r3.length;
  34. if (0 === o)
  35. return t3;
  36. for (let n2 = 0; n2 < o; n2++)
  37. s3 += r3[n2];
  38. const f = Math.floor(s3 / o);
  39. return Math.max(f, t3);
  40. }
  41. function s(e2) {
  42. var _a;
  43. const n2 = e2 && e2.renderer, s3 = "touch" === (e2 && e2.event && e2.event.pointerType) ? 9 : 6;
  44. if (!n2)
  45. return s3;
  46. const o = "visualVariables" in n2 ? r2(s3, n2.visualVariables) : s3;
  47. if ("simple" === n2.type)
  48. return t(o, n2.symbol);
  49. if ("unique-value" === n2.type) {
  50. let e3 = o;
  51. return (_a = n2.uniqueValueInfos) == null ? void 0 : _a.forEach((n3) => {
  52. e3 = t(e3, n3.symbol);
  53. }), e3;
  54. }
  55. if ("class-breaks" === n2.type) {
  56. let e3 = o;
  57. return n2.classBreakInfos.forEach((n3) => {
  58. e3 = t(e3, n3.symbol);
  59. }), e3;
  60. }
  61. return "dot-density" === n2.type || n2.type, o;
  62. }
  63. // node_modules/@arcgis/core/views/support/drapedUtils.js
  64. function a(t3, n2, a2, o = new w()) {
  65. let s3;
  66. if ("2d" === a2.type)
  67. s3 = n2 * a2.resolution;
  68. else if ("3d" === a2.type) {
  69. const i = a2.overlayPixelSizeInMapUnits(t3), o2 = a2.basemapSpatialReference;
  70. s3 = r(o2) && !o2.equals(a2.spatialReference) ? $(o2) / $(a2.spatialReference) : n2 * i;
  71. }
  72. const m = t3.x - s3, p = t3.y - s3, c = t3.x + s3, l = t3.y + s3, { spatialReference: f } = a2;
  73. 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;
  74. }
  75. var s2 = new w();
  76. export {
  77. s,
  78. a
  79. };
  80. //# sourceMappingURL=chunk-CFZGXSAO.js.map