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