123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591 |
- import {
- M,
- M2,
- c2 as c,
- j2 as j,
- p,
- p2
- } from "./chunk-ECW2QABR.js";
- import {
- k2 as k,
- r as r2
- } from "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import {
- m
- } from "./chunk-IKP3YN53.js";
- import {
- i2 as i,
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/geometry/support/zmUtils.js
- function h(h7, a2, s3 = false) {
- let { hasM: t4, hasZ: e6 } = h7;
- Array.isArray(a2) ? a2.length !== 4 || t4 || e6 ? a2.length === 3 && s3 && !t4 ? (e6 = true, t4 = false) : a2.length === 3 && t4 && e6 && (t4 = false, e6 = false) : (t4 = true, e6 = true) : (e6 = !e6 && a2.hasZ && (!t4 || a2.hasM), t4 = !t4 && a2.hasM && (!e6 || a2.hasZ)), h7.hasZ = e6, h7.hasM = t4;
- }
- // node_modules/@arcgis/core/geometry/Multipoint.js
- var h2;
- function l(t4) {
- return (s3, e6) => s3 == null ? e6 : e6 == null ? s3 : t4(s3, e6);
- }
- function c2(t4) {
- return t4 && (t4.declaredClass === "esri.geometry.SpatialReference" || t4.wkid != null);
- }
- var u = h2 = class extends p {
- constructor(...t4) {
- super(...t4), this.points = [], this.type = "multipoint";
- }
- normalizeCtorArgs(t4, s3) {
- if (!t4 && !s3)
- return null;
- const e6 = {};
- Array.isArray(t4) ? (e6.points = t4, e6.spatialReference = s3) : c2(t4) ? e6.spatialReference = t4 : (t4.points && (e6.points = t4.points), t4.spatialReference && (e6.spatialReference = t4.spatialReference), t4.hasZ && (e6.hasZ = t4.hasZ), t4.hasM && (e6.hasM = t4.hasM));
- const i4 = e6.points && e6.points[0];
- return i4 && (e6.hasZ === void 0 && e6.hasM === void 0 ? (e6.hasZ = i4.length > 2, e6.hasM = false) : e6.hasZ === void 0 ? e6.hasZ = i4.length > 3 : e6.hasM === void 0 && (e6.hasM = i4.length > 3)), e6;
- }
- get cache() {
- return this.commitProperty("points"), this.commitProperty("hasZ"), this.commitProperty("hasM"), this.commitProperty("spatialReference"), {};
- }
- get extent() {
- const t4 = this.points;
- if (!t4.length)
- return null;
- const s3 = new M2(), e6 = this.hasZ, i4 = this.hasM, r7 = e6 ? 3 : 2, o5 = t4[0], a2 = l(Math.min), p3 = l(Math.max);
- let h7, c6, u6, m5, [f5, y2] = o5, [d3, g2] = o5;
- for (let n3 = 0, l5 = t4.length; n3 < l5; n3++) {
- const s4 = t4[n3], [o6, l6] = s4;
- if (f5 = a2(f5, o6), y2 = a2(y2, l6), d3 = p3(d3, o6), g2 = p3(g2, l6), e6 && s4.length > 2) {
- const t5 = s4[2];
- h7 = a2(h7, t5), u6 = p3(u6, t5);
- }
- if (i4 && s4.length > r7) {
- const t5 = s4[r7];
- c6 = a2(c6, t5), m5 = p3(m5, t5);
- }
- }
- return s3.xmin = f5, s3.ymin = y2, s3.xmax = d3, s3.ymax = g2, s3.spatialReference = this.spatialReference, e6 ? (s3.zmin = h7, s3.zmax = u6) : (s3.zmin = null, s3.zmax = null), i4 ? (s3.mmin = c6, s3.mmax = m5) : (s3.mmin = null, s3.mmax = null), s3;
- }
- writePoints(t4, e6) {
- e6.points = m(this.points);
- }
- addPoint(t4) {
- return h(this, t4), Array.isArray(t4) ? this.points.push(t4) : this.points.push(t4.toArray()), this.notifyChange("points"), this;
- }
- clone() {
- const t4 = { points: m(this.points), spatialReference: this.spatialReference };
- return this.hasZ && (t4.hasZ = true), this.hasM && (t4.hasM = true), new h2(t4);
- }
- getPoint(t4) {
- if (!this._validateInputs(t4))
- return null;
- const s3 = this.points[t4], e6 = { x: s3[0], y: s3[1], spatialReference: this.spatialReference };
- let i4 = 2;
- return this.hasZ && (e6.z = s3[2], i4 = 3), this.hasM && (e6.m = s3[i4]), new j(e6);
- }
- removePoint(t4) {
- if (!this._validateInputs(t4))
- return null;
- const s3 = new j(this.points.splice(t4, 1)[0], this.spatialReference);
- return this.notifyChange("points"), s3;
- }
- setPoint(t4, s3) {
- return this._validateInputs(t4) ? (h(this, s3), Array.isArray(s3) || (s3 = s3.toArray()), this.points[t4] = s3, this.notifyChange("points"), this) : this;
- }
- toJSON(t4) {
- return this.write({}, t4);
- }
- _validateInputs(t4) {
- return t4 != null && t4 >= 0 && t4 < this.points.length;
- }
- };
- e([d({ readOnly: true })], u.prototype, "cache", null), e([d()], u.prototype, "extent", null), e([d({ type: [[Number]], json: { write: { isRequired: true } } })], u.prototype, "points", void 0), e([r2("points")], u.prototype, "writePoints", null), u = h2 = e([n("esri.geometry.Multipoint")], u), u.prototype.toJSON.isDefaultToJSON = true;
- var m2 = u;
- // node_modules/@arcgis/core/geometry/support/boundsUtils.js
- function n2(n3) {
- return n3.xmin !== void 0 && n3.ymin !== void 0 && n3.xmax !== void 0 && n3.ymax !== void 0;
- }
- function t2(n3) {
- return n3.points !== void 0;
- }
- function e2(n3) {
- return n3.x !== void 0 && n3.y !== void 0;
- }
- function o(n3) {
- return n3.paths !== void 0;
- }
- function i2(n3) {
- return n3.rings !== void 0;
- }
- function l2(n3) {
- return (t4, e6) => t4 == null ? e6 : e6 == null ? t4 : n3(t4, e6);
- }
- var r3 = l2(Math.min);
- var u2 = l2(Math.max);
- function c3(l5, r7) {
- return o(r7) ? h3(l5, r7.paths, false, false) : i2(r7) ? h3(l5, r7.rings, false, false) : t2(r7) ? s(l5, r7.points, false, false, false, false) : n2(r7) ? g(l5, r7) : (e2(r7) && (l5[0] = r7.x, l5[1] = r7.y, l5[2] = r7.x, l5[3] = r7.y), l5);
- }
- function f(l5, r7) {
- return o(r7) ? h3(l5, r7.paths, true, false) : i2(r7) ? h3(l5, r7.rings, true, false) : t2(r7) ? s(l5, r7.points, true, false, true, false) : n2(r7) ? g(l5, r7, true, false, true, false) : (e2(r7) && (l5[0] = r7.x, l5[1] = r7.y, l5[2] = r7.z, l5[3] = r7.x, l5[4] = r7.y, l5[5] = r7.z), l5);
- }
- function h3(n3, t4, e6, o5) {
- const i4 = e6 ? 3 : 2;
- if (!t4.length || !t4[0].length)
- return null;
- let l5, c6, f5, h7, [g2, s3] = t4[0][0], [x3, m5] = t4[0][0];
- for (let a2 = 0; a2 < t4.length; a2++) {
- const n4 = t4[a2];
- for (let t5 = 0; t5 < n4.length; t5++) {
- const a3 = n4[t5], [d3, v3] = a3;
- if (g2 = r3(g2, d3), s3 = r3(s3, v3), x3 = u2(x3, d3), m5 = u2(m5, v3), e6 && a3.length > 2) {
- const n5 = a3[2];
- l5 = r3(l5, n5), c6 = u2(c6, n5);
- }
- if (o5 && a3.length > i4) {
- const n5 = a3[i4];
- f5 = r3(l5, n5), h7 = u2(c6, n5);
- }
- }
- }
- return e6 ? o5 ? (n3[0] = g2, n3[1] = s3, n3[2] = l5, n3[3] = f5, n3[4] = x3, n3[5] = m5, n3[6] = c6, n3[7] = h7, n3.length = 8, n3) : (n3[0] = g2, n3[1] = s3, n3[2] = l5, n3[3] = x3, n3[4] = m5, n3[5] = c6, n3.length = 6, n3) : o5 ? (n3[0] = g2, n3[1] = s3, n3[2] = f5, n3[3] = x3, n3[4] = m5, n3[5] = h7, n3.length = 6, n3) : (n3[0] = g2, n3[1] = s3, n3[2] = x3, n3[3] = m5, n3.length = 4, n3);
- }
- function g(n3, t4, e6, o5, i4, l5) {
- const r7 = t4.xmin, u6 = t4.xmax, c6 = t4.ymin, f5 = t4.ymax;
- let h7 = t4.zmin, g2 = t4.zmax, s3 = t4.mmin, x3 = t4.mmax;
- return i4 ? (h7 = h7 || 0, g2 = g2 || 0, l5 ? (s3 = s3 || 0, x3 = x3 || 0, n3[0] = r7, n3[1] = c6, n3[2] = h7, n3[3] = s3, n3[4] = u6, n3[5] = f5, n3[6] = g2, n3[7] = x3, n3) : (n3[0] = r7, n3[1] = c6, n3[2] = h7, n3[3] = u6, n3[4] = f5, n3[5] = g2, n3)) : l5 ? (s3 = s3 || 0, x3 = x3 || 0, n3[0] = r7, n3[1] = c6, n3[2] = s3, n3[3] = u6, n3[4] = f5, n3[5] = x3, n3) : (n3[0] = r7, n3[1] = c6, n3[2] = u6, n3[3] = f5, n3);
- }
- function s(n3, t4, e6, o5, i4, l5) {
- const c6 = e6 ? 3 : 2, f5 = o5 && l5, h7 = e6 && i4;
- if (!t4.length || !t4[0].length)
- return null;
- let g2, s3, x3, m5, [a2, d3] = t4[0], [v3, y2] = t4[0];
- for (let p3 = 0; p3 < t4.length; p3++) {
- const n4 = t4[p3], [e7, o6] = n4;
- if (a2 = r3(a2, e7), d3 = r3(d3, o6), v3 = u2(v3, e7), y2 = u2(y2, o6), h7 && n4.length > 2) {
- const t5 = n4[2];
- g2 = r3(g2, t5), s3 = u2(s3, t5);
- }
- if (f5 && n4.length > c6) {
- const t5 = n4[c6];
- x3 = r3(g2, t5), m5 = u2(s3, t5);
- }
- }
- return i4 ? (g2 = g2 || 0, s3 = s3 || 0, l5 ? (x3 = x3 || 0, m5 = m5 || 0, n3[0] = a2, n3[1] = d3, n3[2] = g2, n3[3] = x3, n3[4] = v3, n3[5] = y2, n3[6] = s3, n3[7] = m5, n3) : (n3[0] = a2, n3[1] = d3, n3[2] = g2, n3[3] = v3, n3[4] = y2, n3[5] = s3, n3)) : l5 ? (x3 = x3 || 0, m5 = m5 || 0, n3[0] = a2, n3[1] = d3, n3[2] = x3, n3[3] = v3, n3[4] = y2, n3[5] = m5, n3) : (n3[0] = a2, n3[1] = d3, n3[2] = v3, n3[3] = y2, n3);
- }
- // node_modules/@arcgis/core/geometry/support/coordsUtils.js
- function e3(n3, t4) {
- const e6 = t4[0] - n3[0], r7 = t4[1] - n3[1];
- if (n3.length > 2 && t4.length > 2) {
- const o5 = n3[2] - t4[2];
- return Math.sqrt(e6 * e6 + r7 * r7 + o5 * o5);
- }
- return Math.sqrt(e6 * e6 + r7 * r7);
- }
- function r4(n3, t4, e6) {
- const r7 = n3[0] + e6 * (t4[0] - n3[0]), o5 = n3[1] + e6 * (t4[1] - n3[1]);
- return n3.length > 2 && t4.length > 2 ? [r7, o5, n3[2] + e6 * (t4[2] - n3[2])] : [r7, o5];
- }
- function o2(n3, t4, e6, r7) {
- const [o5, i4] = t4, [s3, l5] = e6[r7], [f5, u6] = e6[r7 + 1], h7 = f5 - s3, c6 = u6 - l5, a2 = h7 * h7 + c6 * c6, g2 = (o5 - s3) * h7 + (i4 - l5) * c6, m5 = Math.min(1, Math.max(0, g2 / a2));
- return n3[0] = s3 + h7 * m5, n3[1] = l5 + c6 * m5, n3;
- }
- function i3(n3, t4) {
- return r4(n3, t4, 0.5);
- }
- function f2(n3, t4, e6) {
- const r7 = n3.length;
- let o5 = 0, i4 = 0, s3 = 0;
- for (let l5 = 0; l5 < r7; l5++) {
- const f5 = n3[l5], u6 = n3[(l5 + 1) % r7];
- let h7 = 2;
- o5 += f5[0] * u6[1] - u6[0] * f5[1], f5.length > 2 && u6.length > 2 && e6 && (i4 += f5[0] * u6[2] - u6[0] * f5[2], h7 = 3), f5.length > h7 && u6.length > h7 && t4 && (s3 += f5[0] * u6[h7] - u6[0] * f5[h7]);
- }
- return o5 <= 0 && i4 <= 0 && s3 <= 0;
- }
- function u3(n3) {
- if ("rings" in n3) {
- for (const t4 of n3.rings)
- t4.length < 3 || t4[0][0] === t4[t4.length - 1][0] && t4[0][1] === t4[t4.length - 1][1] || t4.push([t4[0][0], t4[0][1]]);
- if (n3.rings.length > 0) {
- if (!f2(n3.rings[0], n3.hasM, n3.hasZ))
- for (let t4 = 0; t4 < n3.rings.length; ++t4)
- n3.rings[t4] = n3.rings[t4].reverse();
- }
- }
- }
- function h4(n3) {
- if ("rings" in n3)
- for (const t4 of n3.rings)
- t4.length < 3 || t4[0][0] === t4[t4.length - 1][0] && t4[0][1] === t4[t4.length - 1][1] || t4.push([t4[0][0], t4[0][1]]);
- }
- // node_modules/@arcgis/core/geometry/support/centroid.js
- function l3(n3) {
- return n3 ? n3.hasZ ? [n3.xmax - n3.xmin / 2, n3.ymax - n3.ymin / 2, n3.zmax - n3.zmin / 2] : [n3.xmax - n3.xmin / 2, n3.ymax - n3.ymin / 2] : null;
- }
- function e4(n3) {
- return n3 ? o3(n3.rings, n3.hasZ) : null;
- }
- function o3(n3, t4) {
- if (!n3 || !n3.length)
- return null;
- const l5 = [], e6 = [], o5 = t4 ? [1 / 0, -1 / 0, 1 / 0, -1 / 0, 1 / 0, -1 / 0] : [1 / 0, -1 / 0, 1 / 0, -1 / 0];
- for (let h7 = 0, i4 = n3.length; h7 < i4; h7++) {
- const l6 = r5(n3[h7], t4, o5);
- l6 && e6.push(l6);
- }
- if (e6.sort((n4, l6) => {
- let e7 = n4[2] - l6[2];
- return e7 === 0 && t4 && (e7 = n4[4] - l6[4]), e7;
- }), e6.length && (l5[0] = e6[0][0], l5[1] = e6[0][1], t4 && (l5[2] = e6[0][3]), (l5[0] < o5[0] || l5[0] > o5[1] || l5[1] < o5[2] || l5[1] > o5[3] || t4 && (l5[2] < o5[4] || l5[2] > o5[5])) && (l5.length = 0)), !l5.length) {
- const e7 = n3[0] && n3[0].length ? h5(n3[0], t4) : null;
- if (!e7)
- return null;
- l5[0] = e7[0], l5[1] = e7[1], t4 && e7.length > 2 && (l5[2] = e7[2]);
- }
- return l5;
- }
- function r5(n3, t4, l5) {
- let e6 = 0, o5 = 0, r7 = 0, h7 = 0, i4 = 0;
- const u6 = n3.length ? n3[0][0] : 0, g2 = n3.length ? n3[0][1] : 0, s3 = n3.length && t4 ? n3[0][2] : 0;
- for (let f5 = 0; f5 < n3.length; f5++) {
- const c7 = n3[f5], m5 = n3[(f5 + 1) % n3.length], [x3, a2, y2] = c7, d3 = x3 - u6, p3 = a2 - g2, v3 = t4 ? y2 - s3 : void 0, [z, Z, j3] = m5, U = z - u6, b = Z - g2, k2 = t4 ? j3 - s3 : void 0, q = d3 * b - U * p3;
- if (h7 += q, e6 += (d3 + U) * q, o5 += (p3 + b) * q, t4 && c7.length > 2 && m5.length > 2) {
- const n4 = d3 * k2 - U * v3;
- r7 += (v3 + k2) * n4, i4 += n4;
- }
- x3 < l5[0] && (l5[0] = x3), x3 > l5[1] && (l5[1] = x3), a2 < l5[2] && (l5[2] = a2), a2 > l5[3] && (l5[3] = a2), t4 && (y2 < l5[4] && (l5[4] = y2), y2 > l5[5] && (l5[5] = y2));
- }
- if (h7 > 0 && (h7 *= -1), i4 > 0 && (i4 *= -1), !h7)
- return null;
- h7 *= 0.5, i4 *= 0.5;
- const c6 = [e6 / (6 * h7) + u6, o5 / (6 * h7) + g2, h7];
- return t4 && (l5[4] === l5[5] || i4 === 0 ? (c6[3] = (l5[4] + l5[5]) / 2, c6[4] = 0) : (c6[3] = r7 / (6 * i4) + s3, c6[4] = i4)), c6;
- }
- function h5(l5, e6) {
- const o5 = e6 ? [0, 0, 0] : [0, 0], r7 = e6 ? [0, 0, 0] : [0, 0];
- let h7 = 0, i4 = 0, u6 = 0, g2 = 0;
- for (let s3 = 0, c6 = l5.length; s3 < c6 - 1; s3++) {
- const c7 = l5[s3], f5 = l5[s3 + 1];
- if (c7 && f5) {
- o5[0] = c7[0], o5[1] = c7[1], r7[0] = f5[0], r7[1] = f5[1], e6 && c7.length > 2 && f5.length > 2 && (o5[2] = c7[2], r7[2] = f5[2]);
- const l6 = e3(o5, r7);
- if (l6) {
- h7 += l6;
- const n3 = i3(c7, f5);
- i4 += l6 * n3[0], u6 += l6 * n3[1], e6 && n3.length > 2 && (g2 += l6 * n3[2]);
- }
- }
- }
- return h7 > 0 ? e6 ? [i4 / h7, u6 / h7, g2 / h7] : [i4 / h7, u6 / h7] : l5.length ? l5[0] : null;
- }
- // node_modules/@arcgis/core/geometry/support/extentUtils.js
- function t3(n3) {
- return n3.xmin !== void 0 && n3.ymin !== void 0 && n3.xmax !== void 0 && n3.ymax !== void 0;
- }
- function u4(n3) {
- return n3.points !== void 0;
- }
- function m3(n3) {
- return n3.x !== void 0 && n3.y !== void 0;
- }
- function o4(n3) {
- return n3.paths !== void 0;
- }
- function r6(n3) {
- return n3.rings !== void 0;
- }
- var x = [];
- function a(n3, i4, t4, u6) {
- return { xmin: n3, ymin: i4, xmax: t4, ymax: u6 };
- }
- function c4(n3, i4, t4, u6, m5, o5) {
- return { xmin: n3, ymin: i4, zmin: t4, xmax: u6, ymax: m5, zmax: o5 };
- }
- function s2(n3, i4, t4, u6, m5, o5) {
- return { xmin: n3, ymin: i4, mmin: t4, xmax: u6, ymax: m5, mmax: o5 };
- }
- function e5(n3, i4, t4, u6, m5, o5, r7, x3) {
- return { xmin: n3, ymin: i4, zmin: t4, mmin: u6, xmax: m5, ymax: o5, zmax: r7, mmax: x3 };
- }
- function f3(n3, i4 = false, t4 = false) {
- return i4 ? t4 ? e5(n3[0], n3[1], n3[2], n3[3], n3[4], n3[5], n3[6], n3[7]) : c4(n3[0], n3[1], n3[2], n3[3], n3[4], n3[5]) : t4 ? s2(n3[0], n3[1], n3[2], n3[3], n3[4], n3[5]) : a(n3[0], n3[1], n3[2], n3[3]);
- }
- function l4(n3) {
- return n3 ? t3(n3) ? n3 : m3(n3) ? d2(n3) : r6(n3) ? v(n3) : o4(n3) ? h6(n3) : u4(n3) ? y(n3) : null : null;
- }
- function y(i4) {
- const { hasZ: t4, hasM: u6, points: m5 } = i4;
- return f3(s(x, m5, t4, u6), t4, u6);
- }
- function d2(n3) {
- const { x: i4, y: t4, z: u6, m: m5 } = n3, o5 = m5 != null;
- return u6 != null ? o5 ? e5(i4, t4, u6, m5, i4, t4, u6, m5) : c4(i4, t4, u6, i4, t4, u6) : o5 ? s2(i4, t4, m5, i4, t4, m5) : a(i4, t4, i4, t4);
- }
- function v(n3) {
- const { hasZ: t4, hasM: u6, rings: m5 } = n3, o5 = h3(x, m5, t4, u6);
- return o5 ? f3(o5, t4, u6) : null;
- }
- function h6(n3) {
- const { hasZ: t4, hasM: u6, paths: m5 } = n3, o5 = h3(x, m5, t4, u6);
- return o5 ? f3(o5, t4, u6) : null;
- }
- // node_modules/@arcgis/core/geometry/Polygon.js
- var x2;
- function j2(t4) {
- return !Array.isArray(t4[0]);
- }
- var w = x2 = class extends p {
- constructor(...t4) {
- super(...t4), this.rings = [], this.type = "polygon";
- }
- static fromExtent(t4) {
- const r7 = t4.clone().normalize(), e6 = t4.spatialReference;
- let s3 = false, i4 = false;
- for (const o5 of r7)
- o5.hasZ && (s3 = true), o5.hasM && (i4 = true);
- const n3 = { rings: r7.map((t5) => {
- const r8 = [[t5.xmin, t5.ymin], [t5.xmin, t5.ymax], [t5.xmax, t5.ymax], [t5.xmax, t5.ymin], [t5.xmin, t5.ymin]];
- if (s3 && t5.hasZ) {
- const e7 = t5.zmin + 0.5 * (t5.zmax - t5.zmin);
- for (let t6 = 0; t6 < r8.length; t6++)
- r8[t6].push(e7);
- }
- if (i4 && t5.hasM) {
- const e7 = t5.mmin + 0.5 * (t5.mmax - t5.mmin);
- for (let t6 = 0; t6 < r8.length; t6++)
- r8[t6].push(e7);
- }
- return r8;
- }), spatialReference: e6 };
- return s3 && (n3.hasZ = true), i4 && (n3.hasM = true), new x2(n3);
- }
- normalizeCtorArgs(t4, r7) {
- let e6, s3, i4 = null, n3 = null;
- return t4 && !Array.isArray(t4) ? (i4 = t4.rings ? t4.rings : null, r7 || (t4.spatialReference ? r7 = t4.spatialReference : t4.rings || (r7 = t4)), e6 = t4.hasZ, s3 = t4.hasM) : i4 = t4, i4 = i4 || [], r7 = r7 || k.WGS84, i4.length && i4[0] && i4[0][0] != null && typeof i4[0][0] == "number" && (i4 = [i4]), n3 = i4[0] && i4[0][0], n3 && (e6 === void 0 && s3 === void 0 ? (e6 = n3.length > 2, s3 = n3.length > 3) : e6 === void 0 ? e6 = s3 ? n3.length > 3 : n3.length > 2 : s3 === void 0 && (s3 = e6 ? n3.length > 3 : n3.length > 2)), { rings: i4, spatialReference: r7, hasZ: e6, hasM: s3 };
- }
- get cache() {
- return this.commitProperty("rings"), this.commitProperty("hasZ"), this.commitProperty("hasM"), this.commitProperty("spatialReference"), {};
- }
- get centroid() {
- const t4 = e4(this);
- if (!t4 || isNaN(t4[0]) || isNaN(t4[1]) || this.hasZ && isNaN(t4[2]))
- return null;
- const r7 = new j();
- return r7.x = t4[0], r7.y = t4[1], r7.spatialReference = this.spatialReference, this.hasZ && (r7.z = t4[2]), r7;
- }
- get extent() {
- const { spatialReference: t4 } = this, r7 = v(this);
- if (!r7)
- return null;
- const e6 = new M2(r7);
- return e6.spatialReference = t4, e6;
- }
- get isSelfIntersecting() {
- return p2(this.rings);
- }
- writeRings(t4, r7) {
- r7.rings = m(this.rings);
- }
- addRing(t4) {
- if (!t4)
- return;
- const r7 = this.rings, e6 = r7.length;
- if (j2(t4)) {
- const s3 = [];
- for (let r8 = 0, e7 = t4.length; r8 < e7; r8++)
- s3[r8] = t4[r8].toArray();
- r7[e6] = s3;
- } else
- r7[e6] = t4.concat();
- return this.notifyChange("rings"), this;
- }
- clone() {
- const t4 = new x2();
- return t4.spatialReference = this.spatialReference, t4.rings = m(this.rings), t4.hasZ = this.hasZ, t4.hasM = this.hasM, t4;
- }
- equals(t4) {
- if (this === t4)
- return true;
- if (t(t4))
- return false;
- const e6 = this.spatialReference, n3 = t4.spatialReference;
- if (r(e6) !== r(n3))
- return false;
- if (r(e6) && r(n3) && !e6.equals(n3))
- return false;
- if (this.rings.length !== t4.rings.length)
- return false;
- const o5 = ([t5, r7, e7, s3], [i4, n4, o6, a2]) => t5 === i4 && r7 === n4 && (e7 == null && o6 == null || e7 === o6) && (s3 == null && a2 == null || s3 === a2);
- for (let s3 = 0; s3 < this.rings.length; s3++) {
- const e7 = this.rings[s3], i4 = t4.rings[s3];
- if (!i(e7, i4, o5))
- return false;
- }
- return true;
- }
- contains(t4) {
- if (!t4)
- return false;
- const r7 = M(t4, this.spatialReference);
- return c(this, r(r7) ? r7 : t4);
- }
- isClockwise(t4) {
- let r7;
- return r7 = j2(t4) ? t4.map((t5) => this.hasZ ? this.hasM ? [t5.x, t5.y, t5.z, t5.m] : [t5.x, t5.y, t5.z] : [t5.x, t5.y]) : t4, f2(r7, this.hasM, this.hasZ);
- }
- getPoint(t4, r7) {
- if (!this._validateInputs(t4, r7))
- return null;
- const e6 = this.rings[t4][r7], s3 = this.hasZ, i4 = this.hasM;
- return s3 && !i4 ? new j(e6[0], e6[1], e6[2], void 0, this.spatialReference) : i4 && !s3 ? new j(e6[0], e6[1], void 0, e6[2], this.spatialReference) : s3 && i4 ? new j(e6[0], e6[1], e6[2], e6[3], this.spatialReference) : new j(e6[0], e6[1], this.spatialReference);
- }
- insertPoint(t4, r7, e6) {
- return this._validateInputs(t4, r7, true) ? (h(this, e6), Array.isArray(e6) || (e6 = e6.toArray()), this.rings[t4].splice(r7, 0, e6), this.notifyChange("rings"), this) : this;
- }
- removePoint(t4, r7) {
- if (!this._validateInputs(t4, r7))
- return null;
- const e6 = new j(this.rings[t4].splice(r7, 1)[0], this.spatialReference);
- return this.notifyChange("rings"), e6;
- }
- removeRing(t4) {
- if (!this._validateInputs(t4, null))
- return null;
- const r7 = this.rings.splice(t4, 1)[0], e6 = this.spatialReference, s3 = r7.map((t5) => new j(t5, e6));
- return this.notifyChange("rings"), s3;
- }
- setPoint(t4, r7, e6) {
- return this._validateInputs(t4, r7) ? (h(this, e6), Array.isArray(e6) || (e6 = e6.toArray()), this.rings[t4][r7] = e6, this.notifyChange("rings"), this) : this;
- }
- _validateInputs(t4, r7, e6 = false) {
- if (t4 == null || t4 < 0 || t4 >= this.rings.length)
- return false;
- if (r7 != null) {
- const s3 = this.rings[t4];
- if (e6 && (r7 < 0 || r7 > s3.length))
- return false;
- if (!e6 && (r7 < 0 || r7 >= s3.length))
- return false;
- }
- return true;
- }
- toJSON(t4) {
- return this.write({}, t4);
- }
- };
- e([d({ readOnly: true })], w.prototype, "cache", null), e([d({ readOnly: true })], w.prototype, "centroid", null), e([d({ readOnly: true })], w.prototype, "extent", null), e([d({ readOnly: true })], w.prototype, "isSelfIntersecting", null), e([d({ type: [[[Number]]], json: { write: { isRequired: true } } })], w.prototype, "rings", void 0), e([r2("rings")], w.prototype, "writeRings", null), w = x2 = e([n("esri.geometry.Polygon")], w), w.prototype.toJSON.isDefaultToJSON = true;
- var v2 = w;
- // node_modules/@arcgis/core/geometry/Polyline.js
- var c5;
- function u5(t4) {
- return !Array.isArray(t4[0]);
- }
- var f4 = c5 = class extends p {
- constructor(...t4) {
- super(...t4), this.paths = [], this.type = "polyline";
- }
- normalizeCtorArgs(t4, e6) {
- let s3, r7, i4 = null, a2 = null;
- return t4 && !Array.isArray(t4) ? (i4 = t4.paths ? t4.paths : null, e6 || (t4.spatialReference ? e6 = t4.spatialReference : t4.paths || (e6 = t4)), s3 = t4.hasZ, r7 = t4.hasM) : i4 = t4, i4 = i4 || [], e6 = e6 || k.WGS84, i4.length && i4[0] && i4[0][0] != null && typeof i4[0][0] == "number" && (i4 = [i4]), a2 = i4[0] && i4[0][0], a2 && (s3 === void 0 && r7 === void 0 ? (s3 = a2.length > 2, r7 = false) : s3 === void 0 ? s3 = !r7 && a2.length > 3 : r7 === void 0 && (r7 = !s3 && a2.length > 3)), { paths: i4, spatialReference: e6, hasZ: s3, hasM: r7 };
- }
- get cache() {
- return this.commitProperty("paths"), this.commitProperty("hasZ"), this.commitProperty("hasM"), this.commitProperty("spatialReference"), {};
- }
- get extent() {
- const { spatialReference: t4 } = this, e6 = h6(this);
- if (!e6)
- return null;
- const s3 = new M2(e6);
- return s3.spatialReference = t4, s3;
- }
- writePaths(t4, s3) {
- s3.paths = m(this.paths);
- }
- addPath(t4) {
- if (!t4)
- return;
- const e6 = this.paths, s3 = e6.length;
- if (u5(t4)) {
- const r7 = [];
- for (let e7 = 0, s4 = t4.length; e7 < s4; e7++)
- r7[e7] = t4[e7].toArray();
- e6[s3] = r7;
- } else
- e6[s3] = t4.concat();
- return this.notifyChange("paths"), this;
- }
- clone() {
- const t4 = new c5();
- return t4.spatialReference = this.spatialReference, t4.paths = m(this.paths), t4.hasZ = this.hasZ, t4.hasM = this.hasM, t4;
- }
- getPoint(t4, e6) {
- if (!this._validateInputs(t4, e6))
- return null;
- const s3 = this.paths[t4][e6], r7 = this.hasZ, i4 = this.hasM;
- return r7 && !i4 ? new j(s3[0], s3[1], s3[2], void 0, this.spatialReference) : i4 && !r7 ? new j(s3[0], s3[1], void 0, s3[2], this.spatialReference) : r7 && i4 ? new j(s3[0], s3[1], s3[2], s3[3], this.spatialReference) : new j(s3[0], s3[1], this.spatialReference);
- }
- insertPoint(t4, e6, s3) {
- return this._validateInputs(t4, e6, true) ? (h(this, s3), Array.isArray(s3) || (s3 = s3.toArray()), this.paths[t4].splice(e6, 0, s3), this.notifyChange("paths"), this) : this;
- }
- removePath(t4) {
- if (!this._validateInputs(t4, null))
- return null;
- const e6 = this.paths.splice(t4, 1)[0], s3 = this.spatialReference, r7 = e6.map((t5) => new j(t5, s3));
- return this.notifyChange("paths"), r7;
- }
- removePoint(t4, e6) {
- if (!this._validateInputs(t4, e6))
- return null;
- const s3 = new j(this.paths[t4].splice(e6, 1)[0], this.spatialReference);
- return this.notifyChange("paths"), s3;
- }
- setPoint(t4, e6, s3) {
- return this._validateInputs(t4, e6) ? (h(this, s3), Array.isArray(s3) || (s3 = s3.toArray()), this.paths[t4][e6] = s3, this.notifyChange("paths"), this) : this;
- }
- _validateInputs(t4, e6, s3 = false) {
- if (t4 == null || t4 < 0 || t4 >= this.paths.length)
- return false;
- if (e6 != null) {
- const r7 = this.paths[t4];
- if (s3 && (e6 < 0 || e6 > r7.length))
- return false;
- if (!s3 && (e6 < 0 || e6 >= r7.length))
- return false;
- }
- return true;
- }
- toJSON(t4) {
- return this.write({}, t4);
- }
- };
- e([d({ readOnly: true })], f4.prototype, "cache", null), e([d({ readOnly: true })], f4.prototype, "extent", null), e([d({ type: [[[Number]]], json: { write: { isRequired: true } } })], f4.prototype, "paths", void 0), e([r2("paths")], f4.prototype, "writePaths", null), f4 = c5 = e([n("esri.geometry.Polyline")], f4), f4.prototype.toJSON.isDefaultToJSON = true;
- var m4 = f4;
- export {
- m2 as m,
- o2 as o,
- f2 as f,
- u3 as u,
- h4 as h,
- l3 as l,
- e4 as e,
- c3 as c,
- f as f2,
- l4 as l2,
- v,
- v2,
- m4 as m2
- };
- //# sourceMappingURL=chunk-OWVBLVP3.js.map
|