chunk-Q4LKAPDF.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. import {
  2. x
  3. } from "./chunk-TODU7HVH.js";
  4. import {
  5. E,
  6. L,
  7. S
  8. } from "./chunk-23ONSYIH.js";
  9. import {
  10. e as e2,
  11. n
  12. } from "./chunk-YLVXZ2PS.js";
  13. import {
  14. t as t2
  15. } from "./chunk-J525NRN3.js";
  16. import {
  17. C,
  18. F,
  19. G
  20. } from "./chunk-MI7HWWFL.js";
  21. import {
  22. e
  23. } from "./chunk-WSRBH7BF.js";
  24. import {
  25. s,
  26. s3 as s2
  27. } from "./chunk-EMJ4ZSM2.js";
  28. import {
  29. t
  30. } from "./chunk-GZT4BVFP.js";
  31. // node_modules/@arcgis/core/views/2d/engine/webgl/color.js
  32. function i(r, n2 = 0, t3 = false) {
  33. const o = r[n2 + 3];
  34. return r[n2 + 0] *= o, r[n2 + 1] *= o, r[n2 + 2] *= o, t3 || (r[n2 + 3] *= 255), r;
  35. }
  36. function f(r) {
  37. if (!r)
  38. return 0;
  39. const { r: t3, g: o, b: u3, a: i3 } = r;
  40. return x(t3 * i3, o * i3, u3 * i3, 255 * i3);
  41. }
  42. function s3(r) {
  43. if (!r)
  44. return 0;
  45. const [t3, o, u3, i3] = r;
  46. return x(t3 * (i3 / 255), o * (i3 / 255), u3 * (i3 / 255), i3);
  47. }
  48. function a(n2, t3, o = 0) {
  49. if (t(t3))
  50. return n2[o + 0] = 0, n2[o + 1] = 0, n2[o + 2] = 0, void (n2[o + 3] = 0);
  51. const { r: u3, g: i3, b: c2, a: e3 } = t3;
  52. n2[o + 0] = u3 * e3 / 255, n2[o + 1] = i3 * e3 / 255, n2[o + 2] = c2 * e3 / 255, n2[o + 3] = e3;
  53. }
  54. // node_modules/@arcgis/core/views/2d/engine/webgl/SymbolProperties.js
  55. var h = class {
  56. constructor() {
  57. this.color = [0, 0, 0, 0], this.haloColor = [0, 0, 0, 0], this.haloSize = 0, this.size = 12, this.angle = 0, this.offsetX = 0, this.offsetY = 0, this.hAnchor = 0, this.vAnchor = 0;
  58. }
  59. acquire(o, h2, s4, t3, i3, l, r, e3, c2) {
  60. this.color = o, this.haloColor = h2, this.haloSize = s4, this.size = t3, this.angle = i3, this.offsetX = l, this.offsetY = r, this.hAnchor = e3, this.vAnchor = c2;
  61. }
  62. release() {
  63. this.color[0] = this.color[1] = this.color[2] = this.color[3] = 0, this.haloColor[0] = this.haloColor[1] = this.haloColor[2] = this.haloColor[3] = 0, this.haloSize = 0, this.size = 0, this.angle = 0, this.offsetX = 0, this.offsetY = 0, this.hAnchor = 0, this.vAnchor = 0;
  64. }
  65. };
  66. h.pool = new e(h);
  67. // node_modules/@arcgis/core/views/2d/engine/webgl/Utils.js
  68. var E2 = s.getLogger("esri.views.2d.engine.webgl.Utils");
  69. var S2 = "geometry";
  70. var A = [{ name: S2, strideInBytes: 36 }];
  71. var N = [{ name: S2, strideInBytes: 12 }];
  72. var M2 = [{ name: S2, strideInBytes: 36 }];
  73. var D2 = [{ name: S2, strideInBytes: 24 }];
  74. var _ = [{ name: S2, strideInBytes: 12 }];
  75. var U = [{ name: S2, strideInBytes: 40 }];
  76. var v = [{ name: S2, strideInBytes: 36 }];
  77. var R = [{ name: S2, strideInBytes: 36 }];
  78. function B(e3) {
  79. const t3 = {};
  80. for (const r of e3)
  81. t3[r.name] = r.strideInBytes;
  82. return t3;
  83. }
  84. var C2 = B(A);
  85. var b = B(N);
  86. var O = B(M2);
  87. var F2 = B(D2);
  88. var x2 = B(_);
  89. var z = B(U);
  90. var P2 = B(v);
  91. var j = B(R);
  92. function G2(e3, t3) {
  93. switch (e3) {
  94. case E.MARKER:
  95. return t3 === S.HEATMAP ? b : C2;
  96. case E.FILL:
  97. switch (t3) {
  98. case S.DOT_DENSITY:
  99. return x2;
  100. case S.SIMPLE:
  101. case S.OUTLINE_FILL_SIMPLE:
  102. return F2;
  103. default:
  104. return O;
  105. }
  106. case E.LINE:
  107. return z;
  108. case E.TEXT:
  109. return P2;
  110. case E.LABEL:
  111. return j;
  112. }
  113. }
  114. var $ = [S2];
  115. var k = [S2];
  116. var V = [S2];
  117. var Y = [S2];
  118. var H = [S2];
  119. function q(e3) {
  120. switch (e3) {
  121. case E.MARKER:
  122. return $;
  123. case E.FILL:
  124. return k;
  125. case E.LINE:
  126. return V;
  127. case E.TEXT:
  128. return Y;
  129. case E.LABEL:
  130. return H;
  131. }
  132. }
  133. function X(e3) {
  134. switch (e3 % 4) {
  135. case 0:
  136. case 2:
  137. return 4;
  138. case 1:
  139. case 3:
  140. return 1;
  141. }
  142. }
  143. function K(e3, t3) {
  144. switch (t3 % 4) {
  145. case 0:
  146. case 2:
  147. return new Uint32Array(Math.floor(e3 * t3 / 4));
  148. case 1:
  149. case 3:
  150. return new Uint8Array(e3 * t3);
  151. }
  152. }
  153. function W(e3, t3) {
  154. switch (t3 % 4) {
  155. case 0:
  156. case 2:
  157. return new Uint32Array(e3);
  158. case 1:
  159. case 3:
  160. return new Uint8Array(e3);
  161. }
  162. }
  163. function J(e3) {
  164. return e3 != null;
  165. }
  166. function Q(e3) {
  167. return typeof e3 == "number";
  168. }
  169. function ee(t3) {
  170. switch (t3) {
  171. case "butt":
  172. return e2.BUTT;
  173. case "round":
  174. return e2.ROUND;
  175. case "square":
  176. return e2.SQUARE;
  177. default:
  178. return E2.error(new s2("mapview-invalid-type", `Cap type ${t3} is not a valid option. Defaulting to round`)), e2.ROUND;
  179. }
  180. }
  181. function te(t3) {
  182. switch (t3) {
  183. case "miter":
  184. return n.MITER;
  185. case "bevel":
  186. return n.BEVEL;
  187. case "round":
  188. return n.ROUND;
  189. default:
  190. return E2.error(new s2("mapview-invalid-type", `Join type ${t3} is not a valid option. Defaulting to round`)), n.ROUND;
  191. }
  192. }
  193. function re(e3) {
  194. switch (e3) {
  195. case "opacity":
  196. return L.OPACITY;
  197. case "color":
  198. return L.COLOR;
  199. case "rotation":
  200. return L.ROTATION;
  201. case "size":
  202. return L.SIZE;
  203. default:
  204. return E2.error(`Cannot interpret unknown vv: ${e3}`), null;
  205. }
  206. }
  207. function ae(e3, t3, r, n2, a2, s4, i3) {
  208. for (const c2 in s4) {
  209. const t4 = s4[c2].stride, n3 = X(t4), i4 = s4[c2].data, o2 = r[c2].data, u3 = t4 * a2.vertexCount / n3, l = t4 * e3 / n3, m = t4 * a2.vertexFrom / n3;
  210. for (let e4 = 0; e4 < u3; ++e4)
  211. o2[e4 + l] = i4[e4 + m];
  212. }
  213. const o = a2.indexCount;
  214. for (let c2 = 0; c2 < o; ++c2)
  215. n2[c2 + t3] = i3[c2 + a2.indexFrom] - a2.vertexFrom + e3;
  216. }
  217. var se = { [S2]: F.STATIC_DRAW };
  218. function ie(e3, t3) {
  219. const r = [];
  220. for (let n2 = 0; n2 < 5; ++n2) {
  221. const a2 = q(n2), s4 = {};
  222. for (const e4 of a2)
  223. s4[e4] = { data: t3(n2, e4) };
  224. r.push({ data: e3(n2), buffers: s4 });
  225. }
  226. return r;
  227. }
  228. function ue(e3) {
  229. switch (e3) {
  230. case C.BYTE:
  231. case C.UNSIGNED_BYTE:
  232. return 1;
  233. case C.SHORT:
  234. case C.UNSIGNED_SHORT:
  235. return 2;
  236. case C.FLOAT:
  237. case C.INT:
  238. case C.UNSIGNED_INT:
  239. return 4;
  240. }
  241. }
  242. function le(t3) {
  243. switch (t3) {
  244. case G.UNSIGNED_BYTE:
  245. return 1;
  246. case G.UNSIGNED_SHORT_4_4_4_4:
  247. return 2;
  248. case G.FLOAT:
  249. return 4;
  250. default:
  251. return void E2.error(new s2("webgl-utils", `Unable to handle type ${t3}`));
  252. }
  253. }
  254. function me(t3) {
  255. switch (t3) {
  256. case G.UNSIGNED_BYTE:
  257. return Uint8Array;
  258. case G.UNSIGNED_SHORT_4_4_4_4:
  259. return Uint16Array;
  260. case G.FLOAT:
  261. return Float32Array;
  262. default:
  263. return void E2.error(new s2("webgl-utils", `Unable to handle type ${t3}`));
  264. }
  265. }
  266. function fe(e3) {
  267. const t3 = {};
  268. for (const r in e3) {
  269. const n2 = e3[r];
  270. let a2 = 0;
  271. t3[r] = n2.map((e4) => {
  272. const t4 = new t2(e4.name, e4.count, e4.type, a2, 0, e4.normalized || false);
  273. return a2 += e4.count * ue(e4.type), t4;
  274. }), t3[r].forEach((e4) => e4.stride = a2);
  275. }
  276. return t3;
  277. }
  278. var pe = (e3) => {
  279. const t3 = new Map();
  280. for (const r in e3)
  281. for (const n2 of e3[r])
  282. t3.set(n2.name, n2.location);
  283. return t3;
  284. };
  285. var de = (e3) => {
  286. const t3 = {};
  287. for (const r in e3) {
  288. const n2 = e3[r];
  289. t3[r] = n2.length ? n2[0].stride : 0;
  290. }
  291. return t3;
  292. };
  293. var ye = new Map();
  294. var ge = (e3, t3) => {
  295. if (!ye.has(e3)) {
  296. const r = fe(t3), n2 = { strides: de(r), bufferLayouts: r, attributes: pe(t3) };
  297. ye.set(e3, n2);
  298. }
  299. return ye.get(e3);
  300. };
  301. function he(e3) {
  302. e3(E.FILL), e3(E.LINE), e3(E.MARKER), e3(E.TEXT), e3(E.LABEL);
  303. }
  304. var Ie = (e3) => "path" in e3 && Re(e3.path);
  305. var Te = (e3) => "url" in e3 && e3.url || "imageData" in e3 && e3.imageData;
  306. var Ee = (e3) => "imageData" in e3 && e3.imageData && "contentType" in e3 && e3.contentType ? `data:${e3.contentType};base64,${e3.imageData}` : "url" in e3 ? e3.url : null;
  307. var Se = (e3) => e3.startsWith("data:image/gif");
  308. var we = (e3) => "url" in e3 && e3.url && (e3.url.includes(".gif") || Se(e3.url)) || "contentType" in e3 && e3.contentType === "image/gif" || "imageData" in e3 && Se(e3.imageData);
  309. var Le = (e3) => e3.startsWith("data:image/png");
  310. var Ae = (e3) => "url" in e3 && e3.url && (e3.url.includes(".png") || Le(e3.url)) || "contentType" in e3 && e3.contentType === "image/png" || "imageData" in e3 && Le(e3.imageData);
  311. var Ne = (e3) => e3.type && e3.type.toLowerCase().includes("3d");
  312. function Me(e3) {
  313. switch (e3.type) {
  314. case "line": {
  315. const t3 = e3;
  316. return t3.cim.type === "CIMSolidStroke" && !t3.dashTemplate;
  317. }
  318. case "fill":
  319. return e3.cim.type === "CIMSolidFill";
  320. case "esriSFS":
  321. return e3.style === "esriSFSSolid" || e3.style === "esriSFSNull";
  322. case "esriSLS":
  323. return e3.style === "esriSLSSolid" || e3.style === "esriSLSNull";
  324. default:
  325. return false;
  326. }
  327. }
  328. var De = (e3) => e3.includes("data:image/svg+xml");
  329. function _e(e3) {
  330. switch ("cim" in e3 ? e3.cim.type : e3.type) {
  331. case "esriSMS":
  332. case "esriPMS":
  333. case "CIMPointSymbol":
  334. return false;
  335. case "CIMVectorMarker":
  336. case "CIMCharacterMarker":
  337. case "CIMPictureMarker":
  338. return Be(e3);
  339. default:
  340. return true;
  341. }
  342. }
  343. function Ue(e3) {
  344. const t3 = "maxVVSize" in e3 && e3.maxVVSize, r = "width" in e3 && e3.width || "size" in e3 && e3.size || 0;
  345. return t3 || r;
  346. }
  347. function ve(e3) {
  348. const t3 = [];
  349. for (let r = 0; r < e3.length; r++)
  350. t3.push(e3.charCodeAt(r));
  351. return t3;
  352. }
  353. var Re = (e3) => !!e3 && (e3 = e3.trim(), !!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e3) && /[\dz]$/i.test(e3) && e3.length > 4));
  354. var Be = (e3) => e3.type === "fill" && e3?.cim?.markerPlacement?.type === "CIMMarkerPlacementInsidePolygon";
  355. export {
  356. i,
  357. f,
  358. s3 as s,
  359. a,
  360. G2 as G,
  361. X,
  362. K,
  363. W,
  364. J,
  365. Q,
  366. ee,
  367. te,
  368. re,
  369. ae,
  370. se,
  371. ie,
  372. le,
  373. me,
  374. ge,
  375. he,
  376. Ie,
  377. Te,
  378. Ee,
  379. we,
  380. Ae,
  381. Ne,
  382. Me,
  383. De,
  384. _e,
  385. Ue,
  386. ve,
  387. Be
  388. };
  389. //# sourceMappingURL=chunk-Q4LKAPDF.js.map