chunk-2ADIR7NB.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. import {
  2. e2 as e5,
  3. o as o3,
  4. r as r4,
  5. t as t3
  6. } from "./chunk-4KFEVYXL.js";
  7. import {
  8. v,
  9. x,
  10. y
  11. } from "./chunk-5W6F4NR5.js";
  12. import {
  13. e as e4
  14. } from "./chunk-YZUP3MAF.js";
  15. import {
  16. e as e3,
  17. o
  18. } from "./chunk-E3HOL2XO.js";
  19. import {
  20. e as e2
  21. } from "./chunk-SCXOTZ6Q.js";
  22. import {
  23. T,
  24. i as i2
  25. } from "./chunk-H4JLO5B2.js";
  26. import {
  27. a,
  28. j as j2,
  29. o as o2,
  30. z as z3
  31. } from "./chunk-CRGVDJI6.js";
  32. import {
  33. Un,
  34. qn
  35. } from "./chunk-DH2OBAUC.js";
  36. import {
  37. B,
  38. C,
  39. c as c2,
  40. f,
  41. h,
  42. i,
  43. q,
  44. u as u2
  45. } from "./chunk-TERAW6FT.js";
  46. import {
  47. N,
  48. O,
  49. W,
  50. z
  51. } from "./chunk-O4FY3ITT.js";
  52. import {
  53. F,
  54. L,
  55. M,
  56. O as O2,
  57. m,
  58. r as r3,
  59. z as z2
  60. } from "./chunk-XNLG7T2T.js";
  61. import {
  62. n as n2,
  63. r as r2,
  64. t as t2
  65. } from "./chunk-IR4PV7VK.js";
  66. import {
  67. c,
  68. j2 as j
  69. } from "./chunk-ECW2QABR.js";
  70. import {
  71. P,
  72. s as s2,
  73. u
  74. } from "./chunk-MRJEICT6.js";
  75. import {
  76. d,
  77. e,
  78. l3 as l,
  79. n2 as n
  80. } from "./chunk-Y3WMVFTW.js";
  81. import {
  82. s
  83. } from "./chunk-EMJ4ZSM2.js";
  84. import {
  85. r,
  86. t
  87. } from "./chunk-GZT4BVFP.js";
  88. // node_modules/@arcgis/core/geometry/support/axisAngleDegrees.js
  89. function a2(n3 = U) {
  90. return [n3[0], n3[1], n3[2], n3[3]];
  91. }
  92. function k2(n3, r6, t4 = a2()) {
  93. return r3(l2(t4), n3), t4[3] = r6, t4;
  94. }
  95. function g(r6, c3, f2 = a2()) {
  96. return v(b, l2(r6), x2(r6)), v(d2, l2(c3), x2(c3)), y(b, d2, b), y2(f2, m(x(l2(f2), b)));
  97. }
  98. function l2(n3) {
  99. return n3;
  100. }
  101. function x2(n3) {
  102. return M(n3[3]);
  103. }
  104. function y2(n3, r6) {
  105. return n3[3] = r6, n3;
  106. }
  107. var U = [0, 0, 1, 0];
  108. var b = e4();
  109. var d2 = e4();
  110. var w = a2();
  111. // node_modules/@arcgis/core/geometry/support/MeshTransform.js
  112. var T2;
  113. var B2 = T2 = class extends l {
  114. constructor(r6) {
  115. super(r6), this.origin = n2(), this.translation = n2(), this.rotation = a2(), this.scale = r2(1, 1, 1), this.geographic = true;
  116. }
  117. get localMatrix() {
  118. const r6 = e3();
  119. return q(r6, this.scale), f(r6, r6, x2(this.rotation), l2(this.rotation)), c2(r6, r6, this.translation), r6;
  120. }
  121. get localMatrixInverse() {
  122. return h(e3(), this.localMatrix);
  123. }
  124. applyLocal(r6, o4) {
  125. return L(o4, r6, this.localMatrix);
  126. }
  127. applyLocalInverse(r6, o4) {
  128. return L(o4, r6, this.localMatrixInverse);
  129. }
  130. project(r6, o4) {
  131. const t4 = new Float64Array(r6.length), s3 = T.fromTypedArray(t4), e6 = T.fromTypedArray(r6);
  132. if (this.geographic) {
  133. const r7 = O(o4), i4 = e3();
  134. return qn(o4, this.origin, i4, r7), u2(i4, i4, this.localMatrix), t3(s3, e6, i4), Un(t4, r7, 0, t4, o4, 0, t4.length / 3), t4;
  135. }
  136. const { localMatrix: i3, origin: a3 } = this;
  137. C(i3, o) ? e5(s3, e6) : t3(s3, e6, i3);
  138. for (let n3 = 0; n3 < t4.length; n3 += 3)
  139. t4[n3 + 0] += a3[0], t4[n3 + 1] += a3[1], t4[n3 + 2] += a3[2];
  140. return t4;
  141. }
  142. getOriginPoint(r6) {
  143. const [o4, t4, s3] = this.origin;
  144. return new j({ x: o4, y: t4, z: s3, spatialReference: r6 });
  145. }
  146. equals(r6) {
  147. return r(r6) && this.geographic === r6.geographic && F(this.origin, r6.origin) && B(this.localMatrix, r6.localMatrix);
  148. }
  149. clone() {
  150. const r6 = { origin: t2(this.origin), translation: t2(this.translation), rotation: a2(this.rotation), scale: t2(this.scale), geographic: this.geographic };
  151. return new T2(r6);
  152. }
  153. };
  154. e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "origin", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "translation", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "rotation", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "scale", void 0), e([d({ type: Boolean, nonNullable: true, json: { write: true } })], B2.prototype, "geographic", void 0), e([d()], B2.prototype, "localMatrix", null), e([d()], B2.prototype, "localMatrixInverse", null), B2 = T2 = e([n("esri.geometry.support.MeshTransform")], B2);
  155. var L2 = B2;
  156. // node_modules/@arcgis/core/geometry/support/meshUtils/geographicUtils.js
  157. function r5(r6, e6) {
  158. return r6.isGeographic || r6.isWebMercator && (e6?.geographic ?? true);
  159. }
  160. // node_modules/@arcgis/core/geometry/support/meshUtils/projection.js
  161. var g2 = s.getLogger("esri.geometry.support.meshUtils.normalProjection");
  162. function j3(r6, e6, o4, t4, n3) {
  163. return S(t4) ? (B3(Y.TO_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g2.error("Cannot convert spatial reference to PCPF"), n3);
  164. }
  165. function h2(r6, e6, o4, t4, n3) {
  166. return S(t4) ? (B3(Y.FROM_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g2.error("Cannot convert to spatial reference from PCPF"), n3);
  167. }
  168. function M2(r6, e6, o4) {
  169. return Un(r6, e6, 0, o4, O(e6), 0, r6.length / 3), o4;
  170. }
  171. function O3(r6, e6, o4) {
  172. return Un(r6, O(o4), 0, e6, o4, 0, r6.length / 3), e6;
  173. }
  174. function R(r6, o4, t4) {
  175. if (t(r6))
  176. return o4;
  177. const n3 = T.fromTypedArray(r6), f2 = T.fromTypedArray(o4);
  178. return t3(f2, n3, t4), o4;
  179. }
  180. function v2(r6, n3, f2) {
  181. if (t(r6))
  182. return n3;
  183. j2(x3, f2);
  184. const a3 = i2.fromTypedArray(r6), c3 = i2.fromTypedArray(n3);
  185. return r4(c3, a3, x3), z3(x3) || o3(c3, c3), n3;
  186. }
  187. function V(r6, n3, f2) {
  188. if (t(r6))
  189. return n3;
  190. j2(x3, f2);
  191. const a3 = i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), c3 = i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT);
  192. if (r4(c3, a3, x3), z3(x3) || o3(c3, c3), r6 !== n3)
  193. for (let e6 = 3; e6 < r6.length; e6 += 4)
  194. n3[e6] = r6[e6];
  195. return n3;
  196. }
  197. function k3(r6, e6, o4, t4, n3) {
  198. if (!S(t4))
  199. return g2.error("Cannot convert spatial reference to PCPF"), n3;
  200. B3(Y.TO_PCPF, i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT));
  201. for (let f2 = 3; f2 < r6.length; f2 += 4)
  202. n3[f2] = r6[f2];
  203. return n3;
  204. }
  205. function L3(r6, e6, o4, t4, n3) {
  206. if (!S(t4))
  207. return g2.error("Cannot convert to spatial reference from PCPF"), n3;
  208. B3(Y.FROM_PCPF, i2.fromTypedArray(r6, 16), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 16));
  209. for (let f2 = 3; f2 < r6.length; f2 += 4)
  210. n3[f2] = r6[f2];
  211. return n3;
  212. }
  213. function B3(r6, e6, o4, t4, a3, c3) {
  214. if (!e6)
  215. return;
  216. const i3 = o4.count, y3 = O(a3);
  217. if (b2(a3))
  218. for (let s3 = 0; s3 < i3; s3++)
  219. t4.getVec(s3, U2), e6.getVec(s3, w2), qn(y3, U2, W2, y3), a(x3, W2), r6 === Y.FROM_PCPF && o2(x3, x3), O2(w2, w2, x3), c3.setVec(s3, w2);
  220. else
  221. for (let u3 = 0; u3 < i3; u3++) {
  222. t4.getVec(u3, U2), e6.getVec(u3, w2), qn(y3, U2, W2, y3), a(x3, W2);
  223. const a4 = c(o4.get(u3, 1));
  224. let i4 = Math.cos(a4);
  225. r6 === Y.TO_PCPF && (i4 = 1 / i4), x3[0] *= i4, x3[1] *= i4, x3[2] *= i4, x3[3] *= i4, x3[4] *= i4, x3[5] *= i4, r6 === Y.FROM_PCPF && o2(x3, x3), O2(w2, w2, x3), z2(w2, w2), c3.setVec(u3, w2);
  226. }
  227. return c3;
  228. }
  229. function S(r6) {
  230. return b2(r6) || N2(r6);
  231. }
  232. function b2(r6) {
  233. return r6.isWGS84 || u(r6) || P(r6) || s2(r6);
  234. }
  235. function N2(r6) {
  236. return r6.isWebMercator;
  237. }
  238. var Y;
  239. !function(r6) {
  240. r6[r6.TO_PCPF = 0] = "TO_PCPF", r6[r6.FROM_PCPF = 1] = "FROM_PCPF";
  241. }(Y || (Y = {}));
  242. var U2 = n2();
  243. var w2 = n2();
  244. var W2 = e3();
  245. var x3 = e2();
  246. // node_modules/@arcgis/core/geometry/support/meshUtils/georeference.js
  247. function x4(n3, r6, t4) {
  248. return r5(r6.spatialReference, t4) ? B4(n3, r6, t4) : b3(n3, r6, t4);
  249. }
  250. function _2(t4, o4, e6) {
  251. const { position: a3, normal: i3, tangent: l3 } = t4;
  252. if (t(o4))
  253. return { position: a3, normal: i3, tangent: l3 };
  254. const s3 = o4.localMatrix;
  255. return x4({ position: R(a3, new Float64Array(a3.length), s3), normal: r(i3) ? v2(i3, new Float32Array(i3.length), s3) : null, tangent: r(l3) ? V(l3, new Float32Array(l3.length), s3) : null }, o4.getOriginPoint(e6), { geographic: o4.geographic });
  256. }
  257. function k4(n3, r6, t4) {
  258. if (t4?.useTransform) {
  259. const { position: o4, normal: e6, tangent: a3 } = n3;
  260. return { vertexAttributes: { position: o4, normal: e6, tangent: a3 }, transform: new L2({ origin: [r6.x, r6.y, r6.z ?? 0], geographic: r5(r6.spatialReference, t4) }) };
  261. }
  262. return { vertexAttributes: x4(n3, r6, t4), transform: null };
  263. }
  264. function M3(n3, r6, t4) {
  265. return r5(r6.spatialReference, t4) ? G(n3, r6, t4) : Y2(n3, r6, t4);
  266. }
  267. function P2(r6, t4, o4, e6) {
  268. if (t(t4))
  269. return M3(r6, o4, e6);
  270. const a3 = _2(r6, t4, o4.spatialReference);
  271. return o4.equals(t4.getOriginPoint(o4.spatialReference)) ? Y2(a3, o4, e6) : r5(o4.spatialReference, e6) ? G(a3, o4, e6) : Y2(a3, o4, e6);
  272. }
  273. function b3(n3, r6, t4) {
  274. const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l3 = r6.z || 0, { horizontal: s3, vertical: f2 } = C2(t4 ? t4.unit : null, r6.spatialReference);
  275. for (let c3 = 0; c3 < e6.length; c3 += 3)
  276. o4[c3 + 0] = e6[c3 + 0] * s3 + a3, o4[c3 + 1] = e6[c3 + 1] * s3 + i3, o4[c3 + 2] = e6[c3 + 2] * f2 + l3;
  277. return { position: o4, normal: n3.normal, tangent: n3.tangent };
  278. }
  279. function B4(n3, r6, t4) {
  280. const o4 = r6.spatialReference, e6 = O4(r6, t4, D), a3 = new Float64Array(n3.position.length), i3 = L4(n3.position, e6, o4, a3), l3 = j2(I, e6);
  281. return { position: i3, normal: N3(i3, a3, n3.normal, l3, o4), tangent: S2(i3, a3, n3.tangent, l3, o4) };
  282. }
  283. function L4(n3, r6, t4, o4) {
  284. t3(T.fromTypedArray(o4), T.fromTypedArray(n3), r6);
  285. const e6 = new Float64Array(n3.length);
  286. return O3(o4, e6, t4);
  287. }
  288. function N3(r6, t4, o4, e6, a3) {
  289. if (t(o4))
  290. return null;
  291. const i3 = new Float32Array(o4.length);
  292. return r4(i2.fromTypedArray(i3), i2.fromTypedArray(o4), e6), h2(i3, r6, t4, a3, i3), i3;
  293. }
  294. function S2(r6, t4, o4, e6, a3) {
  295. if (t(o4))
  296. return null;
  297. const i3 = new Float32Array(o4.length);
  298. r4(i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT), i2.fromTypedArray(o4, 4 * Float32Array.BYTES_PER_ELEMENT), e6);
  299. for (let n3 = 3; n3 < i3.length; n3 += 4)
  300. i3[n3] = o4[n3];
  301. return L3(i3, r6, t4, a3, i3), i3;
  302. }
  303. function Y2(n3, r6, t4) {
  304. const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l3 = r6.z || 0, { horizontal: s3, vertical: f2 } = C2(t4 ? t4.unit : null, r6.spatialReference);
  305. for (let c3 = 0; c3 < e6.length; c3 += 3)
  306. o4[c3 + 0] = (e6[c3 + 0] - a3) / s3, o4[c3 + 1] = (e6[c3 + 1] - i3) / s3, o4[c3 + 2] = (e6[c3 + 2] - l3) / f2;
  307. return { position: o4, normal: n3.normal, tangent: n3.tangent };
  308. }
  309. function G(n3, r6, t4) {
  310. const o4 = r6.spatialReference;
  311. O4(r6, t4, D);
  312. const e6 = h(H, D), a3 = new Float64Array(n3.position.length), l3 = U3(n3.position, o4, e6, a3), s3 = j2(I, e6);
  313. return { position: l3, normal: q2(n3.normal, n3.position, a3, o4, s3), tangent: V2(n3.tangent, n3.position, a3, o4, s3) };
  314. }
  315. function O4(n3, r6, t4) {
  316. qn(n3.spatialReference, [n3.x, n3.y, n3.z || 0], t4, O(n3.spatialReference));
  317. const { horizontal: o4, vertical: e6 } = C2(r6 ? r6.unit : null, n3.spatialReference);
  318. return i(t4, t4, [o4, o4, e6]), t4;
  319. }
  320. function U3(n3, r6, t4, o4) {
  321. const e6 = M2(n3, r6, o4), a3 = T.fromTypedArray(e6), i3 = new Float64Array(e6.length), l3 = T.fromTypedArray(i3);
  322. return t3(l3, a3, t4), i3;
  323. }
  324. function q2(r6, t4, o4, e6, a3) {
  325. if (t(r6))
  326. return null;
  327. const i3 = j3(r6, t4, o4, e6, new Float32Array(r6.length)), l3 = i2.fromTypedArray(i3);
  328. return r4(l3, l3, a3), i3;
  329. }
  330. function V2(r6, t4, o4, e6, a3) {
  331. if (t(r6))
  332. return null;
  333. const i3 = k3(r6, t4, o4, e6, new Float32Array(r6.length)), l3 = i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT);
  334. return r4(l3, l3, a3), i3;
  335. }
  336. function C2(r6, a3) {
  337. if (t(r6))
  338. return J;
  339. const i3 = a3.isGeographic ? 1 : z(a3), l3 = a3.isGeographic ? 1 : W(a3), s3 = N(1, r6, "meters");
  340. return { horizontal: s3 * i3, vertical: s3 * l3 };
  341. }
  342. var D = e3();
  343. var H = e3();
  344. var I = e2();
  345. var J = { horizontal: 1, vertical: 1 };
  346. export {
  347. a2 as a,
  348. k2 as k,
  349. g,
  350. l2 as l,
  351. x2 as x,
  352. L2 as L,
  353. r5 as r,
  354. j3 as j,
  355. h2 as h,
  356. M2 as M,
  357. O3 as O,
  358. k3 as k2,
  359. L3 as L2,
  360. x4 as x2,
  361. _2 as _,
  362. k4 as k3,
  363. M3 as M2,
  364. P2 as P
  365. };
  366. //# sourceMappingURL=chunk-2ADIR7NB.js.map