{"version":3,"sources":["node_modules/@arcgis/core/geometry/support/geodesicUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport \"../../geometry.js\";\nimport e from \"../../core/Error.js\";\nimport { convertUnit as t } from \"../../core/unitUtils.js\";\nimport { ensureClass as n } from \"../../core/accessorSupport/ensureType.js\";\nimport { toRadians as s, spheroids as i, wktSpheroidRegex as r } from \"./geodesicConstants.js\";\nimport { isGeographic as a, equals as o, isWebMercator as c } from \"./spatialReferenceUtils.js\";\nimport h from \"../SpatialReference.js\";\nimport l from \"../Polyline.js\";\nimport p from \"../Polygon.js\";\nimport f from \"../Point.js\";\nfunction u(e) {\n if (!e) return null;\n const t = e.wkid;\n if (t) return i[t];\n const n = e.wkt2 ?? e.wkt;\n return n ? m(n) : null;\n}\nfunction m(e) {\n const t = r.exec(e);\n if (!t || 2 !== t.length) return null;\n const n = t[1].split(\",\");\n if (!n || n.length < 3) return null;\n const s = parseFloat(n[1]),\n i = parseFloat(n[2]);\n if (isNaN(s) || isNaN(i)) return null;\n return {\n a: s,\n f: 0 === i ? 0 : 1 / i\n };\n}\nfunction d(e) {\n const t = u(e);\n if (g(t)) return t;\n const n = t.a * (1 - t.f);\n return Object.assign(t, {\n b: n,\n eSq: 1 - (n / t.a) ** 2,\n radius: (2 * t.a + n) / 3,\n densificationRatio: 1e4 / ((2 * t.a + n) / 3)\n });\n}\nfunction g(e) {\n return null != e && \"b\" in e && \"eSq\" in e && \"radius\" in e;\n}\nfunction M(e) {\n return null != e && e < 0 ? e + 360 : e;\n}\nfunction w(e, t, n) {\n const {\n a: i,\n eSq: r\n } = d(n),\n a = Math.sqrt(r),\n o = Math.sin(t[1] * s),\n c = i * t[0] * s;\n let h;\n if (r > 0) {\n h = i * ((1 - r) * (o / (1 - r * (o * o)) - 1 / (2 * a) * Math.log((1 - a * o) / (1 + a * o)))) * .5;\n } else h = i * o;\n return e[0] = c, e[1] = h, e;\n}\nfunction y(e) {\n return a(e) && !!u(e);\n}\nfunction v(n, s = \"square-meters\") {\n if (n.some(e => !y(e.spatialReference))) throw new e(\"geodesic-areas:invalid-spatial-reference\", \"the input geometries spatial reference is not supported\");\n const i = [];\n for (let e = 0; e < n.length; e++) {\n const t = n[e],\n s = t.spatialReference,\n {\n radius: r,\n densificationRatio: a\n } = d(s),\n o = r * a;\n i.push(z(t, o));\n }\n const r = [],\n a = [0, 0],\n o = [0, 0];\n for (let e = 0; e < i.length; e++) {\n const {\n rings: n,\n spatialReference: c\n } = i[e];\n let h = 0;\n for (let e = 0; e < n.length; e++) {\n const t = n[e];\n w(a, t[0], c), w(o, t[t.length - 1], c);\n let s = o[0] * a[1] - a[0] * o[1];\n for (let e = 0; e < t.length - 1; e++) w(a, t[e + 1], c), w(o, t[e], c), s += o[0] * a[1] - a[0] * o[1];\n h += s;\n }\n h = t(h, \"square-meters\", s), r.push(h / -2);\n }\n return r;\n}\nfunction R(n, s = \"meters\") {\n if (!n) throw new e(\"geodesic-lengths:invalid-geometries\", \"the input geometries type is not supported\");\n if (n.some(e => !y(e.spatialReference))) throw new e(\"geodesic-lengths:invalid-spatial-reference\", \"the input geometries spatial reference is not supported\");\n const i = [];\n for (let e = 0; e < n.length; e++) {\n const r = n[e],\n {\n spatialReference: a\n } = r,\n o = \"polyline\" === r.type ? r.paths : r.rings;\n let c = 0;\n for (let e = 0; e < o.length; e++) {\n const t = o[e];\n let n = 0;\n for (let e = 1; e < t.length; e++) {\n const s = t[e - 1][0],\n i = t[e][0],\n r = t[e - 1][1],\n o = t[e][1];\n if (r !== o || s !== i) {\n const e = new b();\n q(e, [s, r], [i, o], a), n += e.distance;\n }\n }\n c += n;\n }\n c = t(c, \"meters\", s), i.push(c);\n }\n return i;\n}\nfunction z(t, s) {\n if (\"polyline\" !== t.type && \"polygon\" !== t.type) throw new e(\"geodesic-densify:invalid-geometry\", \"the input geometry is neither polyline nor polygon\");\n const {\n spatialReference: i\n } = t;\n if (!y(i)) throw new e(\"geodesic-densify:invalid-spatial-reference\", \"the input geometry spatial reference is not supported\");\n const r = \"polyline\" === t.type ? t.paths : t.rings,\n a = [],\n o = [0, 0],\n c = new b();\n for (const e of r) {\n const t = [];\n a.push(t), t.push([e[0][0], e[0][1]]);\n let n,\n r,\n h = e[0][0],\n l = e[0][1];\n for (let a = 0; a < e.length - 1; a++) {\n if (n = e[a + 1][0], r = e[a + 1][1], h === n && l === r) continue;\n const p = [h, l];\n q(c, [h, l], [n, r], i);\n const {\n azimuth: f,\n distance: u\n } = c,\n m = u / s;\n if (m > 1) {\n for (let e = 1; e <= m - 1; e++) {\n j(o, p, f, e * s, i), t.push(o.slice());\n }\n j(o, p, f, (u + Math.floor(m - 1) * s) / 2, i), t.push(o.slice());\n }\n j(o, p, f, u, i), t.push(o.slice()), h = o[0], l = o[1];\n }\n }\n const f = n(h, i);\n return \"polyline\" === t.type ? new l({\n paths: a,\n spatialReference: f\n }) : new p({\n rings: a,\n spatialReference: f\n });\n}\nclass b {\n constructor(e = 0, t = void 0, n = void 0) {\n this.distance = e, this.azimuth = t, this.reverseAzimuth = n;\n }\n}\nfunction j(e, t, n, i, r) {\n const a = t[0],\n o = t[1],\n c = a * s,\n h = o * s,\n l = (n ?? 0) * s,\n {\n a: p,\n b: f,\n f: u\n } = d(r),\n m = Math.sin(l),\n g = Math.cos(l),\n M = (1 - u) * Math.tan(h),\n w = 1 / Math.sqrt(1 + M * M),\n y = M * w,\n v = Math.atan2(M, g),\n R = w * m,\n z = R * R,\n b = 1 - z,\n j = b * (p * p - f * f) / (f * f),\n q = 1 + j / 16384 * (4096 + j * (j * (320 - 175 * j) - 768)),\n x = j / 1024 * (256 + j * (j * (74 - 47 * j) - 128));\n let A,\n N,\n S,\n P,\n k = i / (f * q),\n F = 2 * Math.PI;\n for (; Math.abs(k - F) > 1e-12;) S = Math.cos(2 * v + k), A = Math.sin(k), N = Math.cos(k), P = x * A * (S + x / 4 * (N * (2 * S * S - 1) - x / 6 * S * (4 * A * A - 3) * (4 * S * S - 3))), F = k, k = i / (f * q) + P;\n const U = y * A - w * N * g,\n C = Math.atan2(y * N + w * A * g, (1 - u) * Math.sqrt(z + U * U)),\n E = Math.atan2(A * m, w * N - y * A * g),\n G = u / 16 * b * (4 + u * (4 - 3 * b)),\n I = C / s,\n O = (c + (E - (1 - G) * u * R * (k + G * A * (S + G * N * (2 * S * S - 1))))) / s;\n return e[0] = O, e[1] = I, e;\n}\nfunction q(e, t, n, i) {\n const r = t[0] * s,\n a = t[1] * s,\n o = n[0] * s,\n c = n[1] * s,\n {\n a: h,\n b: l,\n f: p,\n radius: f\n } = d(i),\n u = o - r,\n m = Math.atan((1 - p) * Math.tan(a)),\n g = Math.atan((1 - p) * Math.tan(c)),\n M = Math.sin(m),\n w = Math.cos(m),\n y = Math.sin(g),\n v = Math.cos(g);\n let R,\n z,\n b,\n j,\n q,\n x,\n A,\n N,\n S,\n P,\n k = 1e3,\n F = u;\n do {\n if (A = Math.sin(F), N = Math.cos(F), b = Math.sqrt(v * A * (v * A) + (w * y - M * v * N) * (w * y - M * v * N)), 0 === b) return e.distance = 0, e.azimuth = void 0, e.reverseAzimuth = void 0, e;\n q = M * y + w * v * N, x = Math.atan2(b, q), S = w * v * A / b, z = 1 - S * S, j = q - 2 * M * y / z, isNaN(j) && (j = 0), P = p / 16 * z * (4 + p * (4 - 3 * z)), R = F, F = u + (1 - P) * p * S * (x + P * b * (j + P * q * (2 * j * j - 1)));\n } while (Math.abs(F - R) > 1e-12 && --k > 0);\n if (0 === k) {\n const t = f,\n n = Math.acos(Math.sin(a) * Math.sin(c) + Math.cos(a) * Math.cos(c) * Math.cos(o - r)) * t,\n i = o - r,\n h = Math.sin(i) * Math.cos(c),\n l = Math.cos(a) * Math.sin(c) - Math.sin(a) * Math.cos(c) * Math.cos(i),\n p = Math.atan2(h, l);\n return e.azimuth = p / s, e.distance = n, e.reverseAzimuth = void 0, e;\n }\n const U = z * (h * h - l * l) / (l * l),\n C = U / 1024 * (256 + U * (U * (74 - 47 * U) - 128)),\n E = l * (1 + U / 16384 * (4096 + U * (U * (320 - 175 * U) - 768))) * (x - C * b * (j + C / 4 * (q * (2 * j * j - 1) - C / 6 * j * (4 * b * b - 3) * (4 * j * j - 3)))),\n G = Math.atan2(v * Math.sin(F), w * y - M * v * Math.cos(F)),\n I = Math.atan2(w * Math.sin(F), w * y * Math.cos(F) - M * v);\n return e.azimuth = G / s, e.distance = E, e.reverseAzimuth = I / s, e;\n}\nfunction x(n, s, i = \"meters\") {\n if (!n || !s) throw new e(\"geodesic-distance:missing-parameters\", \"one or both input parameters are missing\");\n if (!n.spatialReference || !s.spatialReference) throw new e(\"geodesic-distance:invalid-parameters\", \"one or both input points do not have a spatial reference\");\n if (!o(n.spatialReference, s.spatialReference)) throw new e(\"geodesic-distance:invalid-parameters\", \"spatial references of input parameters do not match\");\n const {\n spatialReference: r\n } = n;\n if (!y(r)) throw new e(\"geodesic-distance:not-supported\", \"input geometry spatial reference is not supported\");\n if (n.x === s.x && n.y === s.y) return new b(0, 0, 0);\n const a = new b();\n return q(a, [n.x, n.y], [s.x, s.y], r), a.distance = t(a.distance, \"meters\", i), a.azimuth = M(a.azimuth), a.reverseAzimuth = M(a.reverseAzimuth), a;\n}\nfunction A(t, n, s) {\n if (!t || null == n || null == s) throw new e(\"point-from-distance:missing-parameters\", \"one or more input parameters are missing or undefined\");\n if (s < 0 || s > 360) throw new e(\"point-from-distance:-of-bounds\", \"azimuth is restricted to angles between, and including, 0° to 360° degrees\");\n if (!t.spatialReference) throw new e(\"point-from-distance:missing-spatial-reference\", \"the input point must have a spatial reference\");\n const {\n spatialReference: i\n } = t;\n if (!y(i)) throw new e(\"geodesic-distance:not-supported\", \"input geometry spatial reference is not supported\");\n const r = [0, 0];\n return j(r, [t.x, t.y], s, n, i), new f({\n x: r[0],\n y: r[1],\n spatialReference: i\n });\n}\nfunction N(e) {\n return y(e) ? e : c(e) ? h.WGS84 : null;\n}\nexport { b as InverseGeodeticSolverResult, j as directGeodeticSolver, v as geodesicAreas, N as geodesicCompatibleSpatialReference, z as geodesicDensify, x as geodesicDistance, R as geodesicLengths, q as inverseGeodeticSolver, y as isSupported, A as pointFromDistance };"],"mappings":"mRAcA,SAASA,GAAE,EAAG,CACZ,GAAI,CAAC,EAAG,OAAO,KACf,IAAMC,EAAI,EAAE,KACZ,GAAIA,EAAG,OAAOC,EAAED,CAAC,EACjB,IAAME,EAAI,EAAE,MAAQ,EAAE,IACtB,OAAOA,EAAIC,GAAED,CAAC,EAAI,IACpB,CACA,SAASC,GAAE,EAAG,CACZ,IAAMH,EAAIA,EAAE,KAAK,CAAC,EAClB,GAAI,CAACA,GAAWA,EAAE,SAAR,EAAgB,OAAO,KACjC,IAAME,EAAIF,EAAE,CAAC,EAAE,MAAM,GAAG,EACxB,GAAI,CAACE,GAAKA,EAAE,OAAS,EAAG,OAAO,KAC/B,IAAME,EAAI,WAAWF,EAAE,CAAC,CAAC,EACvB,EAAI,WAAWA,EAAE,CAAC,CAAC,EACrB,OAAI,MAAME,CAAC,GAAK,MAAM,CAAC,EAAU,KAC1B,CACL,EAAGA,EACH,EAAS,IAAN,EAAU,EAAI,EAAI,CACvB,CACF,CACA,SAASH,EAAE,EAAG,CACZ,IAAMD,EAAID,GAAE,CAAC,EACb,GAAIM,GAAEL,CAAC,EAAG,OAAOA,EACjB,IAAME,EAAIF,EAAE,GAAK,EAAIA,EAAE,GACvB,OAAO,OAAO,OAAOA,EAAG,CACtB,EAAGE,EACH,IAAK,GAAKA,EAAIF,EAAE,IAAM,EACtB,QAAS,EAAIA,EAAE,EAAIE,GAAK,EACxB,mBAAoB,MAAQ,EAAIF,EAAE,EAAIE,GAAK,EAC7C,CAAC,CACH,CACA,SAASG,GAAE,EAAG,CACZ,OAAe,GAAR,MAAa,MAAO,GAAK,QAAS,GAAK,WAAY,CAC5D,CAIA,SAASC,EAAE,EAAGC,EAAGC,EAAG,CAClB,GAAM,CACF,EAAGC,EACH,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AAIoB,CAAC,EAAGjC,EAAIU,EAAIiB,EAAId,EAAI,KAAK,IAAIoB,CAAC,CAAC,EAC3DhB,EAAI,KAAK,MAAMjB,EAAI,KAAK,IAAIiC,CAAC,EAAGjC,EAAIU,EAAI,KAAK,IAAIuB,CAAC,EAAIN,EAAId,CAAC,EAC7D,OAAO,EAAE,QAAUwB,EAAIlC,EAAG,EAAE,SAAWiC,EAAG,EAAE,eAAiBnB,EAAId,EAAG,CACtE,CA4BA,SAASoC,GAAE,EAAG,CACZ,OAAOC,EAAE,CAAC,EAAI,EAAIC,EAAE,CAAC,EAAIC,EAAE,MAAQ,IACrC","names":["u","t","d","n","m","s","g","w","t","n","i","r","d","a","o","c","h","y","P","u","v","s","e","z","I","R","b","q","l","p","f","m","j","g","M","x","A","N","S","k","F","U","C","E","G","O","N","y","O","g"],"x_google_ignoreList":[0]}