chunk-XIEPNAEI.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. import {
  2. f,
  3. g
  4. } from "./chunk-M5BTTMP6.js";
  5. import {
  6. L as L2
  7. } from "./chunk-P4UZNLD5.js";
  8. import {
  9. C,
  10. G,
  11. L,
  12. _,
  13. fe,
  14. ie,
  15. ye
  16. } from "./chunk-FYNVVMWY.js";
  17. import {
  18. t as t2
  19. } from "./chunk-HBMVUVZX.js";
  20. import {
  21. Z
  22. } from "./chunk-O4FY3ITT.js";
  23. import {
  24. d
  25. } from "./chunk-2Z6LERTI.js";
  26. import {
  27. l2 as l
  28. } from "./chunk-OWVBLVP3.js";
  29. import {
  30. s
  31. } from "./chunk-PDKDCAAD.js";
  32. import {
  33. c,
  34. k,
  35. o
  36. } from "./chunk-MRJEICT6.js";
  37. import {
  38. r,
  39. t
  40. } from "./chunk-GZT4BVFP.js";
  41. // node_modules/@arcgis/core/layers/graphics/data/utils.js
  42. var j = new s({ esriSRUnit_Meter: "meters", esriSRUnit_Kilometer: "kilometers", esriSRUnit_Foot: "feet", esriSRUnit_StatuteMile: "miles", esriSRUnit_NauticalMile: "nautical-miles", esriSRUnit_USNauticalMile: "us-nautical-miles" });
  43. var U = Object.freeze({});
  44. var M = new t2();
  45. var F = new t2();
  46. var G2 = new t2();
  47. var N = { esriGeometryPoint: G, esriGeometryPolyline: L, esriGeometryPolygon: C, esriGeometryMultipoint: _ };
  48. function O(e2, r2, i, o2 = e2.hasZ, n = e2.hasM) {
  49. if (t(r2))
  50. return null;
  51. const s2 = e2.hasZ && o2, l2 = e2.hasM && n;
  52. if (i) {
  53. const t3 = ie(G2, r2, e2.hasZ, e2.hasM, "esriGeometryPoint", i, o2, n);
  54. return G(t3, s2, l2);
  55. }
  56. return G(r2, s2, l2);
  57. }
  58. function J(e2, i, o2, n, s2, l2, a = i, m = o2) {
  59. const c2 = i && a, f2 = o2 && m, g2 = r(n) ? "coords" in n ? n : n.geometry : null;
  60. if (t(g2))
  61. return null;
  62. if (s2) {
  63. let t3 = fe(F, g2, i, o2, e2, s2, a, m);
  64. return l2 && (t3 = ie(G2, t3, c2, f2, e2, l2)), N[e2](t3, c2, f2);
  65. }
  66. if (l2) {
  67. const t3 = ie(G2, g2, i, o2, e2, l2, a, m);
  68. return N[e2](t3, c2, f2);
  69. }
  70. return ye(M, g2, i, o2, a, m), N[e2](M, c2, f2);
  71. }
  72. async function P(e2, t3, r2) {
  73. const { outFields: i, orderByFields: o2, groupByFieldsForStatistics: n, outStatistics: s2 } = e2;
  74. if (i)
  75. for (let l2 = 0; l2 < i.length; l2++)
  76. i[l2] = i[l2].trim();
  77. if (o2)
  78. for (let l2 = 0; l2 < o2.length; l2++)
  79. o2[l2] = o2[l2].trim();
  80. if (n)
  81. for (let l2 = 0; l2 < n.length; l2++)
  82. n[l2] = n[l2].trim();
  83. if (s2)
  84. for (let l2 = 0; l2 < s2.length; l2++)
  85. s2[l2].onStatisticField && (s2[l2].onStatisticField = s2[l2].onStatisticField.trim());
  86. return e2.geometry && !e2.outSR && (e2.outSR = e2.geometry.spatialReference), v(e2, t3, r2);
  87. }
  88. async function v(e2, r2, i) {
  89. if (!e2)
  90. return null;
  91. let { where: l2 } = e2;
  92. if (e2.where = l2 = l2 && l2.trim(), (!l2 || /^1 *= *1$/.test(l2) || r2 && r2 === l2) && (e2.where = null), !e2.geometry)
  93. return e2;
  94. let a = await Z2(e2);
  95. if (e2.distance = 0, e2.units = null, e2.spatialRel === "esriSpatialRelEnvelopeIntersects") {
  96. const { spatialReference: t3 } = e2.geometry;
  97. a = l(a), a.spatialReference = t3;
  98. }
  99. e2.geometry = a, await f(a.spatialReference, i);
  100. const m = (await L2(d(a)))[0];
  101. if (t(m))
  102. throw U;
  103. const c2 = m.toJSON(), u = await g(c2, c2.spatialReference, i);
  104. if (!u)
  105. throw U;
  106. return u.spatialReference = i, e2.geometry = u, e2;
  107. }
  108. async function Z2(e2) {
  109. const { geometry: t3, distance: r2, units: o2 } = e2;
  110. if (r2 == null || "vertexAttributes" in t3)
  111. return t3;
  112. const n = t3.spatialReference, s2 = o2 ? j.fromJSON(o2) : Z(n), c2 = n && (o(n) || k(n)) ? t3 : await f(n, c).then(() => g(t3, c));
  113. return (await b())(c2.spatialReference, c2, r2, s2);
  114. }
  115. async function b() {
  116. return (await import("./geometryEngineJSON-XXKTYTFH.js")).geodesicBuffer;
  117. }
  118. function x(e2) {
  119. return e2 && z in e2 ? JSON.parse(JSON.stringify(e2, B)) : e2;
  120. }
  121. var z = "_geVersion";
  122. var B = (e2, t3) => e2 !== z ? t3 : void 0;
  123. export {
  124. U,
  125. O,
  126. J,
  127. P,
  128. v,
  129. x
  130. };
  131. //# sourceMappingURL=chunk-XIEPNAEI.js.map