123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- import {
- f,
- g
- } from "./chunk-M5BTTMP6.js";
- import {
- L as L2
- } from "./chunk-P4UZNLD5.js";
- import {
- C,
- G,
- L,
- _,
- fe,
- ie,
- ye
- } from "./chunk-FYNVVMWY.js";
- import {
- t as t2
- } from "./chunk-HBMVUVZX.js";
- import {
- Z
- } from "./chunk-O4FY3ITT.js";
- import {
- d
- } from "./chunk-2Z6LERTI.js";
- import {
- l2 as l
- } from "./chunk-OWVBLVP3.js";
- import {
- s
- } from "./chunk-PDKDCAAD.js";
- import {
- c,
- k,
- o
- } from "./chunk-MRJEICT6.js";
- import {
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/layers/graphics/data/utils.js
- 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" });
- var U = Object.freeze({});
- var M = new t2();
- var F = new t2();
- var G2 = new t2();
- var N = { esriGeometryPoint: G, esriGeometryPolyline: L, esriGeometryPolygon: C, esriGeometryMultipoint: _ };
- function O(e2, r2, i, o2 = e2.hasZ, n = e2.hasM) {
- if (t(r2))
- return null;
- const s2 = e2.hasZ && o2, l2 = e2.hasM && n;
- if (i) {
- const t3 = ie(G2, r2, e2.hasZ, e2.hasM, "esriGeometryPoint", i, o2, n);
- return G(t3, s2, l2);
- }
- return G(r2, s2, l2);
- }
- function J(e2, i, o2, n, s2, l2, a = i, m = o2) {
- const c2 = i && a, f2 = o2 && m, g2 = r(n) ? "coords" in n ? n : n.geometry : null;
- if (t(g2))
- return null;
- if (s2) {
- let t3 = fe(F, g2, i, o2, e2, s2, a, m);
- return l2 && (t3 = ie(G2, t3, c2, f2, e2, l2)), N[e2](t3, c2, f2);
- }
- if (l2) {
- const t3 = ie(G2, g2, i, o2, e2, l2, a, m);
- return N[e2](t3, c2, f2);
- }
- return ye(M, g2, i, o2, a, m), N[e2](M, c2, f2);
- }
- async function P(e2, t3, r2) {
- const { outFields: i, orderByFields: o2, groupByFieldsForStatistics: n, outStatistics: s2 } = e2;
- if (i)
- for (let l2 = 0; l2 < i.length; l2++)
- i[l2] = i[l2].trim();
- if (o2)
- for (let l2 = 0; l2 < o2.length; l2++)
- o2[l2] = o2[l2].trim();
- if (n)
- for (let l2 = 0; l2 < n.length; l2++)
- n[l2] = n[l2].trim();
- if (s2)
- for (let l2 = 0; l2 < s2.length; l2++)
- s2[l2].onStatisticField && (s2[l2].onStatisticField = s2[l2].onStatisticField.trim());
- return e2.geometry && !e2.outSR && (e2.outSR = e2.geometry.spatialReference), v(e2, t3, r2);
- }
- async function v(e2, r2, i) {
- if (!e2)
- return null;
- let { where: l2 } = e2;
- if (e2.where = l2 = l2 && l2.trim(), (!l2 || /^1 *= *1$/.test(l2) || r2 && r2 === l2) && (e2.where = null), !e2.geometry)
- return e2;
- let a = await Z2(e2);
- if (e2.distance = 0, e2.units = null, e2.spatialRel === "esriSpatialRelEnvelopeIntersects") {
- const { spatialReference: t3 } = e2.geometry;
- a = l(a), a.spatialReference = t3;
- }
- e2.geometry = a, await f(a.spatialReference, i);
- const m = (await L2(d(a)))[0];
- if (t(m))
- throw U;
- const c2 = m.toJSON(), u = await g(c2, c2.spatialReference, i);
- if (!u)
- throw U;
- return u.spatialReference = i, e2.geometry = u, e2;
- }
- async function Z2(e2) {
- const { geometry: t3, distance: r2, units: o2 } = e2;
- if (r2 == null || "vertexAttributes" in t3)
- return t3;
- 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));
- return (await b())(c2.spatialReference, c2, r2, s2);
- }
- async function b() {
- return (await import("./geometryEngineJSON-XXKTYTFH.js")).geodesicBuffer;
- }
- function x(e2) {
- return e2 && z in e2 ? JSON.parse(JSON.stringify(e2, B)) : e2;
- }
- var z = "_geVersion";
- var B = (e2, t3) => e2 !== z ? t3 : void 0;
- export {
- U,
- O,
- J,
- P,
- v,
- x
- };
- //# sourceMappingURL=chunk-XIEPNAEI.js.map
|