chunk-JKFWEHNK.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. import {
  2. e
  3. } from "./chunk-EDHROVWI.js";
  4. import {
  5. s as s4,
  6. t as t2
  7. } from "./chunk-3IRT3YKJ.js";
  8. import {
  9. f,
  10. l,
  11. s as s3,
  12. y
  13. } from "./chunk-RMDDCMKS.js";
  14. import {
  15. s2 as s,
  16. s3 as s2
  17. } from "./chunk-E5O6P5I2.js";
  18. import {
  19. c,
  20. r,
  21. t
  22. } from "./chunk-YXWMMD76.js";
  23. // node_modules/@arcgis/core/layers/graphics/featureConversionUtils.js
  24. function h(t3, e2) {
  25. return t3 ? e2 ? 4 : 3 : e2 ? 3 : 2;
  26. }
  27. var d = s.getLogger("esri.layers.graphics.featureConversionUtils");
  28. var m = { esriGeometryPoint: 0, esriGeometryPolyline: 2, esriGeometryPolygon: 3, esriGeometryMultipoint: 0 };
  29. var g = (t3, e2, o, n, r2, s5) => {
  30. t3[o] = r2, t3[o + 1] = s5;
  31. };
  32. var y2 = (t3, e2, o, n, r2, s5) => {
  33. t3[o] = r2, t3[o + 1] = s5, t3[o + 2] = e2[n + 2];
  34. };
  35. var p = (t3, e2, o, n, r2, s5) => {
  36. t3[o] = r2, t3[o + 1] = s5, t3[o + 2] = e2[n + 3];
  37. };
  38. var I = (t3, e2, o, n, r2, s5) => {
  39. t3[o] = r2, t3[o + 1] = s5, t3[o + 2] = e2[n + 2], t3[o + 3] = e2[n + 3];
  40. };
  41. function b(t3, e2, o, n) {
  42. if (t3) {
  43. if (o)
  44. return e2 && n ? I : y2;
  45. if (e2 && n)
  46. return p;
  47. } else if (e2 && n)
  48. return y2;
  49. return g;
  50. }
  51. function w({ scale: t3, translate: e2 }, o) {
  52. return Math.round((o - e2[0]) / t3[0]);
  53. }
  54. function M({ scale: t3, translate: e2 }, o) {
  55. return Math.round((e2[1] - o) / t3[1]);
  56. }
  57. function T({ scale: t3, translate: e2 }, o, n) {
  58. return o * t3[n] + e2[n];
  59. }
  60. function F(t3, e2, o) {
  61. return t3 ? e2 ? o ? E(t3) : Z(t3) : o ? k(t3) : P(t3) : null;
  62. }
  63. function P(t3) {
  64. const e2 = t3.coords;
  65. return { x: e2[0], y: e2[1] };
  66. }
  67. function x(t3, e2) {
  68. return t3.coords[0] = e2.x, t3.coords[1] = e2.y, t3;
  69. }
  70. function Z(t3) {
  71. const e2 = t3.coords;
  72. return { x: e2[0], y: e2[1], z: e2[2] };
  73. }
  74. function j(t3, e2) {
  75. return t3.coords[0] = e2.x, t3.coords[1] = e2.y, t3.coords[2] = e2.z, t3;
  76. }
  77. function k(t3) {
  78. const e2 = t3.coords;
  79. return { x: e2[0], y: e2[1], m: e2[2] };
  80. }
  81. function v(t3, e2) {
  82. return t3.coords[0] = e2.x, t3.coords[1] = e2.y, t3.coords[2] = e2.m, t3;
  83. }
  84. function E(t3) {
  85. const e2 = t3.coords;
  86. return { x: e2[0], y: e2[1], z: e2[2], m: e2[3] };
  87. }
  88. function z(t3, e2) {
  89. return t3.coords[0] = e2.x, t3.coords[1] = e2.y, t3.coords[2] = e2.z, t3.coords[3] = e2.m, t3;
  90. }
  91. function S(t3, e2, n, r2) {
  92. let s5 = P;
  93. n && r2 ? s5 = E : n ? s5 = Z : r2 && (s5 = k);
  94. for (const c2 of e2) {
  95. const { geometry: e3, attributes: n2 } = c2, r3 = r(e3) ? s5(e3) : null;
  96. t3.push({ attributes: n2, geometry: r3 });
  97. }
  98. return t3;
  99. }
  100. function V(t3, e2) {
  101. return t3 && e2 ? z : t3 ? j : e2 ? v : x;
  102. }
  103. function Y(t3, e2, n, r2, s5) {
  104. const c2 = V(n, r2);
  105. for (const { geometry: u, attributes: l2 } of e2) {
  106. const e3 = r(u) ? c2(new t2(), u) : null;
  107. t3.push(new s4(e3, l2, null, s5 ? l2[s5] : void 0));
  108. }
  109. return t3;
  110. }
  111. function _(t3, e2, o = V(null != e2.z, null != e2.m)) {
  112. return o(t3, e2);
  113. }
  114. function L(t3, e2, n, r2) {
  115. for (const { geometry: s5, attributes: c2 } of e2)
  116. t3.push({ attributes: c2, geometry: r(s5) ? O(s5, n, r2) : null });
  117. return t3;
  118. }
  119. function O(t3, e2, o) {
  120. if (t(t3))
  121. return null;
  122. const r2 = h(e2, o), s5 = [];
  123. for (let n = 0; n < t3.coords.length; n += r2) {
  124. const e3 = [];
  125. for (let o2 = 0; o2 < r2; o2++)
  126. e3.push(t3.coords[n + o2]);
  127. s5.push(e3);
  128. }
  129. return e2 ? o ? { points: s5, hasZ: e2, hasM: o } : { points: s5, hasZ: e2 } : o ? { points: s5, hasM: o } : { points: s5 };
  130. }
  131. function U(t3, e2, n, r2, s5) {
  132. const c2 = h(n, r2);
  133. for (const { geometry: u, attributes: l2 } of e2) {
  134. const e3 = r(u) ? A(new t2(), u, c2) : null;
  135. t3.push(new s4(e3, l2, null, s5 ? l2[s5] : void 0));
  136. }
  137. return t3;
  138. }
  139. function A(t3, e2, o = h(e2.hasZ, e2.hasM)) {
  140. t3.lengths[0] = e2.points.length;
  141. const n = t3.coords;
  142. let r2 = 0;
  143. for (const s5 of e2.points)
  144. for (let t4 = 0; t4 < o; t4++)
  145. n[r2++] = s5[t4];
  146. return t3;
  147. }
  148. function q(t3, e2, n, r2) {
  149. for (const { geometry: s5, attributes: c2 } of e2)
  150. t3.push({ attributes: c2, geometry: r(s5) ? $(s5, n, r2) : null });
  151. return t3;
  152. }
  153. function $(t3, e2, o) {
  154. if (!t3)
  155. return null;
  156. const n = h(e2, o), { coords: r2, lengths: s5 } = t3, c2 = [];
  157. let u = 0;
  158. for (const l2 of s5) {
  159. const t4 = [];
  160. for (let e3 = 0; e3 < l2; e3++) {
  161. const e4 = [];
  162. for (let t5 = 0; t5 < n; t5++)
  163. e4.push(r2[u++]);
  164. t4.push(e4);
  165. }
  166. c2.push(t4);
  167. }
  168. return e2 ? o ? { paths: c2, hasZ: e2, hasM: o } : { paths: c2, hasZ: e2 } : o ? { paths: c2, hasM: o } : { paths: c2 };
  169. }
  170. function R(t3, e2, n, r2, s5) {
  171. const c2 = h(n, r2);
  172. for (const { geometry: u, attributes: l2 } of e2) {
  173. const e3 = r(u) ? C(new t2(), u, c2) : null;
  174. t3.push(new s4(e3, l2, null, s5 ? l2[s5] : void 0));
  175. }
  176. return t3;
  177. }
  178. function C(t3, e2, o = h(e2.hasZ, e2.hasM)) {
  179. const { lengths: n, coords: r2 } = t3;
  180. let s5 = 0;
  181. for (const c2 of e2.paths) {
  182. for (const t4 of c2)
  183. for (let e3 = 0; e3 < o; e3++)
  184. r2[s5++] = t4[e3];
  185. n.push(c2.length);
  186. }
  187. return t3;
  188. }
  189. function B(t3, e2, n, r2) {
  190. for (const { geometry: s5, attributes: c2, centroid: u } of e2) {
  191. const e3 = r(s5) ? D(s5, n, r2) : null;
  192. if (r(u)) {
  193. const o = P(u);
  194. t3.push({ attributes: c2, centroid: o, geometry: e3 });
  195. } else
  196. t3.push({ attributes: c2, geometry: e3 });
  197. }
  198. return t3;
  199. }
  200. function D(t3, e2, o) {
  201. if (!t3)
  202. return null;
  203. const n = h(e2, o), { coords: r2, lengths: s5 } = t3, c2 = [];
  204. let u = 0;
  205. for (const l2 of s5) {
  206. const t4 = [];
  207. for (let e3 = 0; e3 < l2; e3++) {
  208. const e4 = [];
  209. for (let t5 = 0; t5 < n; t5++)
  210. e4.push(r2[u++]);
  211. t4.push(e4);
  212. }
  213. c2.push(t4);
  214. }
  215. return e2 ? o ? { rings: c2, hasZ: e2, hasM: o } : { rings: c2, hasZ: e2 } : o ? { rings: c2, hasM: o } : { rings: c2 };
  216. }
  217. function H(t3, e2, n, r2, s5) {
  218. for (const { geometry: c2, centroid: u, attributes: l2 } of e2) {
  219. const e3 = r(c2) ? J(new t2(), c2, n, r2) : null, f2 = s5 ? l2[s5] : void 0;
  220. r(u) ? t3.push(new s4(e3, l2, x(new t2(), u), f2)) : t3.push(new s4(e3, l2, null, f2));
  221. }
  222. return t3;
  223. }
  224. function J(t3, e2, o = e2.hasZ, n = e2.hasM) {
  225. return K(t3, e2.rings, o, n), t3;
  226. }
  227. function K(t3, e2, o, n) {
  228. const r2 = h(o, n), { lengths: s5, coords: c2 } = t3;
  229. let u = 0;
  230. Tt(t3);
  231. for (const l2 of e2) {
  232. for (const t4 of l2)
  233. for (let e3 = 0; e3 < r2; e3++)
  234. c2[u++] = t4[e3];
  235. s5.push(l2.length);
  236. }
  237. return t3;
  238. }
  239. var Q = [];
  240. var W = [];
  241. function X(t3, e2, o, n, r2) {
  242. Q[0] = t3;
  243. const [s5] = tt(W, Q, e2, o, n, r2);
  244. return Ft(Q), Ft(W), s5;
  245. }
  246. function tt(e2, o, n, r2, s5, c2) {
  247. if (Ft(e2), !n) {
  248. for (const t3 of o) {
  249. const o2 = c2 ? t3.attributes[c2] : void 0;
  250. e2.push(new s4(null, t3.attributes, null, o2));
  251. }
  252. return e2;
  253. }
  254. switch (n) {
  255. case "esriGeometryPoint":
  256. return Y(e2, o, r2, s5, c2);
  257. case "esriGeometryMultipoint":
  258. return U(e2, o, r2, s5, c2);
  259. case "esriGeometryPolyline":
  260. return R(e2, o, r2, s5, c2);
  261. case "esriGeometryPolygon":
  262. return H(e2, o, r2, s5, c2);
  263. default:
  264. d.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${n}'`)), Ft(e2);
  265. }
  266. return e2;
  267. }
  268. function et(e2, o, n, r2, s5, c2) {
  269. const u = e2.length;
  270. switch (n) {
  271. case "esriGeometryPoint":
  272. Y(e2, o, r2, s5, c2);
  273. break;
  274. case "esriGeometryMultipoint":
  275. U(e2, o, r2, s5, c2);
  276. break;
  277. case "esriGeometryPolyline":
  278. R(e2, o, r2, s5, c2);
  279. break;
  280. case "esriGeometryPolygon":
  281. H(e2, o, r2, s5, c2);
  282. break;
  283. default:
  284. d.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${n}'`));
  285. }
  286. for (let t3 = 0; t3 < o.length; t3++)
  287. e2[t3 + u].geometryType = n, e2[t3 + u].insertAfter = o[t3].insertAfter, e2[t3 + u].groupId = o[t3].groupId;
  288. return e2;
  289. }
  290. function ot(t3, e2, o, n) {
  291. W[0] = t3, ct(Q, W, e2, o, n);
  292. const r2 = Q[0];
  293. return Ft(Q), Ft(W), r2;
  294. }
  295. function nt(e2, o, r2) {
  296. if (t(e2))
  297. return null;
  298. const i = new t2();
  299. if ("hasZ" in e2 && null == o && (o = e2.hasZ), "hasM" in e2 && null == r2 && (r2 = e2.hasM), s3(e2)) {
  300. return V(null != o ? o : null != e2.z, null != r2 ? r2 : null != e2.m)(i, e2);
  301. }
  302. return y(e2) ? J(i, e2, o, r2) : f(e2) ? C(i, e2, h(o, r2)) : l(e2) ? A(i, e2, h(o, r2)) : void d.error("convertFromGeometry:unknown-geometry", new s2(`Unable to parse unknown geometry type '${e2}'`));
  303. }
  304. function rt(e2, o, r2, s5) {
  305. const c2 = e2 && ("coords" in e2 ? e2 : e2.geometry);
  306. if (t(c2))
  307. return null;
  308. switch (o) {
  309. case "esriGeometryPoint": {
  310. let t3 = P;
  311. return r2 && s5 ? t3 = E : r2 ? t3 = Z : s5 && (t3 = k), t3(c2);
  312. }
  313. case "esriGeometryMultipoint":
  314. return O(c2, r2, s5);
  315. case "esriGeometryPolyline":
  316. return $(c2, r2, s5);
  317. case "esriGeometryPolygon":
  318. return D(c2, r2, s5);
  319. default:
  320. return d.error("convertToGeometry:unknown-geometry", new s2(`Unable to parse unknown geometry type '${o}'`)), null;
  321. }
  322. }
  323. function st(t3, e2) {
  324. for (const o of e2)
  325. t3.push({ attributes: o.attributes });
  326. return t3;
  327. }
  328. function ct(e2, o, r2, s5, c2) {
  329. if (Ft(e2), t(r2))
  330. return st(e2, o);
  331. switch (r2) {
  332. case "esriGeometryPoint":
  333. return S(e2, o, s5, c2);
  334. case "esriGeometryMultipoint":
  335. return L(e2, o, s5, c2);
  336. case "esriGeometryPolyline":
  337. return q(e2, o, s5, c2);
  338. case "esriGeometryPolygon":
  339. return B(e2, o, s5, c2);
  340. default:
  341. d.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${r2}'`));
  342. }
  343. return e2;
  344. }
  345. function ut(t3) {
  346. const { objectIdFieldName: e2, spatialReference: o, transform: n, fields: r2, hasM: s5, hasZ: c2, features: u, geometryType: l2, exceededTransferLimit: i, uniqueIdField: f2, queryGeometry: a, queryGeometryType: h2 } = t3, d2 = { features: ct([], u, l2, c2, s5), fields: r2, geometryType: l2, objectIdFieldName: e2, spatialReference: o, uniqueIdField: f2, queryGeometry: rt(a, h2, false, false) };
  347. return n && (d2.transform = n), i && (d2.exceededTransferLimit = i), s5 && (d2.hasM = s5), c2 && (d2.hasZ = c2), d2;
  348. }
  349. function lt(e2, o) {
  350. var _a;
  351. const n = new e(), { hasM: r2, hasZ: s5, features: c2, objectIdFieldName: u, spatialReference: l2, geometryType: i, exceededTransferLimit: a, transform: h2, fields: m2 } = e2;
  352. return m2 && (n.fields = m2), n.geometryType = i != null ? i : null, n.objectIdFieldName = (_a = u != null ? u : o) != null ? _a : null, n.spatialReference = l2 != null ? l2 : null, n.objectIdFieldName ? (c2 && tt(n.features, c2, i, s5, r2, n.objectIdFieldName), a && (n.exceededTransferLimit = a), r2 && (n.hasM = r2), s5 && (n.hasZ = s5), h2 && (n.transform = h2), n) : (d.error(new s2("optimized-features:invalid-objectIdFieldName", "objectIdFieldName is missing")), n);
  353. }
  354. function it(t3) {
  355. const { transform: e2, features: n, hasM: r2, hasZ: s5 } = t3;
  356. if (!e2)
  357. return t3;
  358. for (const c2 of n)
  359. r(c2.geometry) && pt(c2.geometry, c2.geometry, r2, s5, e2), r(c2.centroid) && pt(c2.centroid, c2.centroid, r2, s5, e2);
  360. return t3.transform = null, t3;
  361. }
  362. function ft(t3, e2) {
  363. const { geometryType: o, features: n, hasM: r2, hasZ: s5 } = e2;
  364. if (!t3)
  365. return e2;
  366. for (let c2 = 0; c2 < n.length; c2++) {
  367. const e3 = n[c2], u = e3.weakClone();
  368. u.geometry = new t2(), at(u.geometry, e3.geometry, r2, s5, o, t3), e3.centroid && (u.centroid = new t2(), at(u.centroid, e3.centroid, r2, s5, "esriGeometryPoint", t3)), n[c2] = u;
  369. }
  370. return e2.transform = t3, e2;
  371. }
  372. function at(t3, e2, o, r2, s5, c2, u = o, l2 = r2) {
  373. if (Tt(t3), t(e2) || !e2.coords.length)
  374. return null;
  375. const i = m[s5], { coords: f2, lengths: a } = e2, d2 = h(o, r2), g2 = h(o && u, r2 && l2), y3 = b(o, r2, u, l2);
  376. if (!a.length)
  377. return y3(t3.coords, f2, 0, 0, w(c2, f2[0]), M(c2, f2[1])), Tt(t3, d2, 0), t3;
  378. let p2, I2, N, G, T2 = 0, F2 = 0, P2 = F2;
  379. for (const n of a) {
  380. if (n < i)
  381. continue;
  382. let e3 = 0;
  383. F2 = P2, N = p2 = w(c2, f2[T2]), G = I2 = M(c2, f2[T2 + 1]), y3(t3.coords, f2, F2, T2, N, G), e3++, T2 += d2, F2 += g2;
  384. for (let o2 = 1; o2 < n; o2++, T2 += d2)
  385. N = w(c2, f2[T2]), G = M(c2, f2[T2 + 1]), N === p2 && G === I2 || (y3(t3.coords, f2, F2, T2, N - p2, G - I2), F2 += g2, e3++, p2 = N, I2 = G);
  386. e3 >= i && (t3.lengths.push(e3), P2 = F2);
  387. }
  388. return Ft(t3.coords, P2), t3.coords.length ? t3 : null;
  389. }
  390. function ht(t3, e2, o, n, r2, s5, c2 = o, u = n) {
  391. if (Tt(t3), !e2 || !e2.coords.length)
  392. return null;
  393. const l2 = m[r2], { coords: i, lengths: f2 } = e2, a = h(o, n), d2 = h(o && c2, n && u), g2 = b(o, n, c2, u);
  394. if (!f2.length)
  395. return g2(t3.coords, i, 0, 0, i[0], i[1]), Tt(t3, a, 0), t3;
  396. let y3 = 0;
  397. const p2 = s5 * s5;
  398. for (const h2 of f2) {
  399. if (h2 < l2) {
  400. y3 += h2 * a;
  401. continue;
  402. }
  403. const e3 = t3.coords.length / d2, o2 = y3, n2 = y3 + (h2 - 1) * a;
  404. g2(t3.coords, i, t3.coords.length, o2, i[o2], i[o2 + 1]), mt(t3.coords, i, a, p2, g2, o2, n2), g2(t3.coords, i, t3.coords.length, n2, i[n2], i[n2 + 1]);
  405. const r3 = t3.coords.length / d2 - e3;
  406. r3 >= l2 ? t3.lengths.push(r3) : Ft(t3.coords, e3 * d2), y3 += h2 * a;
  407. }
  408. return t3.coords.length ? t3 : null;
  409. }
  410. function dt(t3, e2, o, n) {
  411. const r2 = t3[e2], s5 = t3[e2 + 1], c2 = t3[o], u = t3[o + 1], l2 = t3[n], i = t3[n + 1];
  412. let f2 = c2, a = u, h2 = l2 - f2, d2 = i - a;
  413. if (0 !== h2 || 0 !== d2) {
  414. const t4 = ((r2 - f2) * h2 + (s5 - a) * d2) / (h2 * h2 + d2 * d2);
  415. t4 > 1 ? (f2 = l2, a = i) : t4 > 0 && (f2 += h2 * t4, a += d2 * t4);
  416. }
  417. return h2 = r2 - f2, d2 = s5 - a, h2 * h2 + d2 * d2;
  418. }
  419. function mt(t3, e2, o, n, r2, s5, c2) {
  420. let u, l2 = n, i = 0;
  421. for (let f2 = s5 + o; f2 < c2; f2 += o)
  422. u = dt(e2, f2, s5, c2), u > l2 && (i = f2, l2 = u);
  423. l2 > n && (i - s5 > o && mt(t3, e2, o, n, r2, s5, i), r2(t3, e2, t3.length, i, e2[i], e2[i + 1]), c2 - i > o && mt(t3, e2, o, n, r2, i, c2));
  424. }
  425. function gt(t3, e2, o, r2) {
  426. if (t(e2) || !e2.coords || !e2.coords.length)
  427. return null;
  428. const s5 = h(o, r2);
  429. let c2 = Number.POSITIVE_INFINITY, u = Number.POSITIVE_INFINITY, l2 = Number.NEGATIVE_INFINITY, i = Number.NEGATIVE_INFINITY;
  430. if (e2 && e2.coords) {
  431. const t4 = e2.coords;
  432. for (let e3 = 0; e3 < t4.length; e3 += s5) {
  433. const o2 = t4[e3], n = t4[e3 + 1];
  434. c2 = Math.min(c2, o2), l2 = Math.max(l2, o2), u = Math.min(u, n), i = Math.max(i, n);
  435. }
  436. }
  437. return t3[0] = c2, t3[1] = u, t3[2] = l2, t3[3] = i, t3;
  438. }
  439. function pt(t3, e2, o, n, s5) {
  440. var _a, _b, _c, _d, _e, _f, _g, _h;
  441. const { coords: c2, lengths: u } = e2, l2 = h(o, n);
  442. if (!c2.length)
  443. return t3 !== e2 && Tt(t3), t3;
  444. c(s5);
  445. const { originPosition: i, scale: f2, translate: a } = s5, d2 = Pt;
  446. d2.originPosition = i;
  447. const m2 = d2.scale;
  448. m2[0] = (_a = f2[0]) != null ? _a : 1, m2[1] = -((_b = f2[1]) != null ? _b : 1), m2[2] = (_c = f2[2]) != null ? _c : 1, m2[3] = (_d = f2[3]) != null ? _d : 1;
  449. const g2 = d2.translate;
  450. if (g2[0] = (_e = a[0]) != null ? _e : 0, g2[1] = (_f = a[1]) != null ? _f : 0, g2[2] = (_g = a[2]) != null ? _g : 0, g2[3] = (_h = a[3]) != null ? _h : 0, !u.length) {
  451. for (let e3 = 0; e3 < l2; ++e3)
  452. t3.coords[e3] = T(d2, c2[e3], e3);
  453. return t3 !== e2 && Tt(t3, l2, 0), t3;
  454. }
  455. let y3 = 0;
  456. for (let r2 = 0; r2 < u.length; r2++) {
  457. const e3 = u[r2];
  458. t3.lengths[r2] = e3;
  459. for (let r3 = 0; r3 < l2; ++r3)
  460. t3.coords[y3 + r3] = T(d2, c2[y3 + r3], r3);
  461. let o2 = t3.coords[y3], n2 = t3.coords[y3 + 1];
  462. y3 += l2;
  463. for (let r3 = 1; r3 < e3; r3++, y3 += l2) {
  464. o2 += c2[y3] * m2[0], n2 += c2[y3 + 1] * m2[1], t3.coords[y3] = o2, t3.coords[y3 + 1] = n2;
  465. for (let e4 = 2; e4 < l2; ++e4)
  466. t3.coords[y3 + e4] = T(d2, c2[y3 + e4], e4);
  467. }
  468. }
  469. return t3 !== e2 && Tt(t3, c2.length, u.length), t3;
  470. }
  471. function It(t3, e2, o, n, r2, s5) {
  472. if (Tt(t3), t3.lengths.push(...e2.lengths), o === r2 && n === s5)
  473. for (let c2 = 0; c2 < e2.coords.length; c2++)
  474. t3.coords.push(e2.coords[c2]);
  475. else {
  476. const c2 = h(o, n), u = b(o, n, r2, s5), l2 = e2.coords;
  477. for (let e3 = 0; e3 < l2.length; e3 += c2)
  478. u(t3.coords, l2, t3.coords.length, e3, l2[e3], l2[e3 + 1]);
  479. }
  480. return t3;
  481. }
  482. function wt(t3, e2, o, n) {
  483. let r2 = 0, s5 = t3[n * e2], c2 = t3[n * (e2 + 1)];
  484. for (let u = 1; u < o; u++) {
  485. const o2 = s5 + t3[n * (e2 + u)], l2 = c2 + t3[n * (e2 + u) + 1], i = (o2 - s5) * (l2 + c2);
  486. s5 = o2, c2 = l2, r2 += i;
  487. }
  488. return 0.5 * r2;
  489. }
  490. function Mt(t3, e2) {
  491. const { coords: o, lengths: n } = t3;
  492. let r2 = 0, s5 = 0;
  493. for (let c2 = 0; c2 < n.length; c2++) {
  494. const t4 = n[c2];
  495. s5 += wt(o, r2, t4, e2), r2 += t4;
  496. }
  497. return Math.abs(s5);
  498. }
  499. function Gt(t3, e2) {
  500. if (t(t3))
  501. return null;
  502. const o = t3.clone(), r2 = t3.coords, s5 = t3.lengths;
  503. let c2 = 0;
  504. for (let n = 0; n < s5.length; n++) {
  505. const t4 = s5[n];
  506. let u = r2[e2 * c2], l2 = r2[e2 * c2 + 1];
  507. for (let n2 = 1; n2 < t4; n2++) {
  508. const t5 = u + r2[e2 * (c2 + n2)], s6 = l2 + r2[e2 * (c2 + n2) + 1];
  509. o.coords[e2 * (c2 + n2)] = t5, o.coords[e2 * (c2 + n2) + 1] = s6, u = t5, l2 = s6;
  510. }
  511. c2 += t4;
  512. }
  513. return o;
  514. }
  515. function Tt(t3, e2 = 0, o = 0) {
  516. Ft(t3.lengths, o), Ft(t3.coords, e2);
  517. }
  518. function Ft(t3, e2 = 0) {
  519. t3.length !== e2 && (t3.length = e2);
  520. }
  521. var Pt = { originPosition: "lowerLeft", scale: [1, 1, 1, 1], translate: [0, 0, 0, 0] };
  522. export {
  523. w,
  524. M,
  525. F,
  526. _,
  527. O,
  528. $,
  529. C,
  530. D,
  531. J,
  532. K,
  533. X,
  534. tt,
  535. et,
  536. ot,
  537. nt,
  538. rt,
  539. ut,
  540. lt,
  541. it,
  542. ft,
  543. at,
  544. ht,
  545. gt,
  546. pt,
  547. It,
  548. Mt,
  549. Gt
  550. };
  551. //# sourceMappingURL=chunk-JKFWEHNK.js.map