SymbolTileRenderer-5NOPNHXV.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  1. import {
  2. c as c3,
  3. i,
  4. o as o3
  5. } from "./chunk-3XO4E4TL.js";
  6. import {
  7. o as o4
  8. } from "./chunk-YAHCECWP.js";
  9. import "./chunk-6G6XHVK2.js";
  10. import {
  11. i as i2
  12. } from "./chunk-GSORSXL5.js";
  13. import {
  14. W
  15. } from "./chunk-H3QCF24A.js";
  16. import "./chunk-YJKEIUMW.js";
  17. import "./chunk-JH3PLIM6.js";
  18. import "./chunk-FCDUTNBY.js";
  19. import "./chunk-LL6JU3GU.js";
  20. import "./chunk-ZIWBDWEW.js";
  21. import "./chunk-IQNZZCQJ.js";
  22. import {
  23. m
  24. } from "./chunk-II7RCTF3.js";
  25. import "./chunk-VS4BIQ2O.js";
  26. import "./chunk-HWIURR7X.js";
  27. import {
  28. he
  29. } from "./chunk-Q4LKAPDF.js";
  30. import "./chunk-TODU7HVH.js";
  31. import {
  32. E,
  33. I
  34. } from "./chunk-23ONSYIH.js";
  35. import {
  36. s
  37. } from "./chunk-D6FGJON6.js";
  38. import "./chunk-3T4BXU2T.js";
  39. import "./chunk-YLVXZ2PS.js";
  40. import "./chunk-EE6TL7XD.js";
  41. import {
  42. c as c2,
  43. f as f3
  44. } from "./chunk-GDB2KX4Y.js";
  45. import "./chunk-546QCRS4.js";
  46. import "./chunk-QXZVBSBH.js";
  47. import "./chunk-773XI6MQ.js";
  48. import "./chunk-WFSV2B2I.js";
  49. import "./chunk-J525NRN3.js";
  50. import {
  51. F
  52. } from "./chunk-MI7HWWFL.js";
  53. import "./chunk-ZHRMTKME.js";
  54. import {
  55. n as n3
  56. } from "./chunk-MFFE4I2S.js";
  57. import {
  58. n as n2
  59. } from "./chunk-XBH7TGC2.js";
  60. import {
  61. f as f2,
  62. o as o2
  63. } from "./chunk-K3NA3LQS.js";
  64. import "./chunk-4E6K4P67.js";
  65. import "./chunk-LGW7TID4.js";
  66. import "./chunk-3OHML7FO.js";
  67. import "./chunk-G5AI6ZNE.js";
  68. import "./chunk-FIYKFRB2.js";
  69. import "./chunk-FYNVVMWY.js";
  70. import "./chunk-Q52DVFYK.js";
  71. import "./chunk-HBMVUVZX.js";
  72. import "./chunk-CRGVDJI6.js";
  73. import {
  74. z
  75. } from "./chunk-6P6NA7JB.js";
  76. import "./chunk-XLV7RUSE.js";
  77. import "./chunk-NTUXR253.js";
  78. import "./chunk-RMX2AZ4P.js";
  79. import "./chunk-NE3ESGA6.js";
  80. import "./chunk-YIS6BAC3.js";
  81. import "./chunk-7XXXCK2A.js";
  82. import "./chunk-FONIFA5N.js";
  83. import "./chunk-WJW5DUN6.js";
  84. import "./chunk-PJ7ZQ4VD.js";
  85. import "./chunk-WDLTDV2L.js";
  86. import "./chunk-TERAW6FT.js";
  87. import {
  88. u
  89. } from "./chunk-N2663GRX.js";
  90. import "./chunk-O4FY3ITT.js";
  91. import "./chunk-WEMIK25H.js";
  92. import "./chunk-JXW4QTJA.js";
  93. import "./chunk-XNLG7T2T.js";
  94. import "./chunk-IR4PV7VK.js";
  95. import "./chunk-2Z6LERTI.js";
  96. import "./chunk-OWVBLVP3.js";
  97. import "./chunk-ALDCDSPV.js";
  98. import "./chunk-DT6EAZQ5.js";
  99. import "./chunk-HNOZUNJ4.js";
  100. import "./chunk-PDKDCAAD.js";
  101. import "./chunk-ECW2QABR.js";
  102. import "./chunk-GCDJLKH4.js";
  103. import "./chunk-MRJEICT6.js";
  104. import {
  105. e,
  106. n2 as n
  107. } from "./chunk-Y3WMVFTW.js";
  108. import "./chunk-SAS7RONY.js";
  109. import "./chunk-WSRBH7BF.js";
  110. import "./chunk-IHXECKQQ.js";
  111. import {
  112. D,
  113. g
  114. } from "./chunk-ULGDPLM2.js";
  115. import "./chunk-EMJ4ZSM2.js";
  116. import "./chunk-IKP3YN53.js";
  117. import {
  118. a,
  119. c,
  120. f,
  121. l,
  122. o,
  123. r,
  124. t
  125. } from "./chunk-GZT4BVFP.js";
  126. import "./chunk-A5ICIBVI.js";
  127. // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/MetricReader.js
  128. var e2 = 6;
  129. var r2 = 4294967296;
  130. var o5 = class {
  131. constructor(t2) {
  132. this._head = t2, this._cursor = t2;
  133. }
  134. static from(t2) {
  135. const s2 = i3.from(new Float32Array(t2));
  136. return new o5(s2);
  137. }
  138. get id() {
  139. return this._cursor.id;
  140. }
  141. get baseZoom() {
  142. return this._cursor.baseZoom;
  143. }
  144. get anchorX() {
  145. return this._cursor.anchorX;
  146. }
  147. get anchorY() {
  148. return this._cursor.anchorY;
  149. }
  150. get directionX() {
  151. return this._cursor.directionX;
  152. }
  153. get directionY() {
  154. return this._cursor.directionY;
  155. }
  156. get size() {
  157. return this._cursor.size;
  158. }
  159. get materialKey() {
  160. return this._cursor.materialKey;
  161. }
  162. get boundsCount() {
  163. return this._cursor.boundsCount;
  164. }
  165. computedMinZoom() {
  166. return this._cursor.computedMinZoom();
  167. }
  168. setComputedMinZoom(t2) {
  169. return this._cursor.setComputedMinZoom(t2);
  170. }
  171. boundsComputedAnchorX(t2) {
  172. return this._cursor.boundsComputedAnchorX(t2);
  173. }
  174. boundsComputedAnchorY(t2) {
  175. return this._cursor.boundsComputedAnchorY(t2);
  176. }
  177. setBoundsComputedAnchorX(t2, s2) {
  178. return this._cursor.setBoundsComputedAnchorX(t2, s2);
  179. }
  180. setBoundsComputedAnchorY(t2, s2) {
  181. return this._cursor.setBoundsComputedAnchorY(t2, s2);
  182. }
  183. boundsX(t2) {
  184. return this._cursor.boundsX(t2);
  185. }
  186. boundsY(t2) {
  187. return this._cursor.boundsY(t2);
  188. }
  189. boundsWidth(t2) {
  190. return this._cursor.boundsWidth(t2);
  191. }
  192. boundsHeight(t2) {
  193. return this._cursor.boundsHeight(t2);
  194. }
  195. link(s2) {
  196. if (r(s2._head))
  197. return this._cursor.link(s2._head);
  198. }
  199. getCursor() {
  200. return this.copy();
  201. }
  202. copy() {
  203. const t2 = new o5(this._head?.copy());
  204. if (!t2._head)
  205. return t2;
  206. let s2 = t2._head, e4 = t2._head._link;
  207. for (; e4; )
  208. s2._link = e4.copy(), s2 = e4, e4 = s2._link;
  209. return t2;
  210. }
  211. peekId() {
  212. return this._cursor.peekId() ?? this._cursor._link.peekId();
  213. }
  214. nextId() {
  215. const t2 = this.id;
  216. for (; t2 === this.id; )
  217. if (!this.next())
  218. return false;
  219. return true;
  220. }
  221. save() {
  222. this._savedCursor = this._cursor, this._savedOffset = this._cursor._offset;
  223. }
  224. restore() {
  225. this._cursor = this._savedCursor, this._cursor._offset = this._savedOffset;
  226. }
  227. next() {
  228. if (!this._cursor)
  229. return false;
  230. if (!this._cursor.next()) {
  231. if (!this._cursor._link)
  232. return false;
  233. this._cursor = this._cursor._link, this._cursor._offset = 0;
  234. }
  235. return true;
  236. }
  237. lookup(t2) {
  238. for (this._cursor = this._head; this._cursor && !this._cursor.lookup(t2); ) {
  239. if (!this._cursor._link)
  240. return false;
  241. this._cursor = this._cursor._link;
  242. }
  243. return !!this._cursor;
  244. }
  245. delete(s2) {
  246. let e4 = this._head, r3 = null;
  247. for (; e4; ) {
  248. if (e4.delete(s2))
  249. return e4.isEmpty() && r(r3) && (r3._link = e4._link), true;
  250. r3 = e4, e4 = e4._link;
  251. }
  252. return false;
  253. }
  254. };
  255. var i3 = class {
  256. constructor(t2) {
  257. this._offset = -1, this._link = null, this._count = 0, this._deletedCount = 0, this._offsets = { instance: null }, this._buffer = t2;
  258. }
  259. static from(t2) {
  260. return new i3(new Float32Array(t2));
  261. }
  262. isEmpty() {
  263. return this._deletedCount === this.count;
  264. }
  265. get count() {
  266. return this._count || (this._count = this._computeCount()), this._count;
  267. }
  268. get id() {
  269. return this._buffer[this._offset + 0];
  270. }
  271. set id(t2) {
  272. this._buffer[this._offset + 0] = t2;
  273. }
  274. get baseZoom() {
  275. return this._buffer[this._offset + 1];
  276. }
  277. get anchorX() {
  278. return this._buffer[this._offset + 2];
  279. }
  280. get anchorY() {
  281. return this._buffer[this._offset + 3];
  282. }
  283. get directionX() {
  284. return this._buffer[this._offset + 4];
  285. }
  286. get directionY() {
  287. return this._buffer[this._offset + 5];
  288. }
  289. get size() {
  290. return this._buffer[this._offset + 6];
  291. }
  292. get materialKey() {
  293. return this._buffer[this._offset + 7];
  294. }
  295. computedMinZoom() {
  296. return this._buffer[this._offset + 8];
  297. }
  298. setComputedMinZoom(t2) {
  299. this._buffer[this._offset + 8] = t2;
  300. }
  301. get boundsCount() {
  302. return this._buffer[this._offset + 9];
  303. }
  304. boundsComputedAnchorX(t2) {
  305. return this._buffer[this._offset + 10 + t2 * e2 + 0];
  306. }
  307. boundsComputedAnchorY(t2) {
  308. return this._buffer[this._offset + 10 + t2 * e2 + 1];
  309. }
  310. setBoundsComputedAnchorX(t2, s2) {
  311. this._buffer[this._offset + 10 + t2 * e2 + 0] = s2;
  312. }
  313. setBoundsComputedAnchorY(t2, s2) {
  314. this._buffer[this._offset + 10 + t2 * e2 + 1] = s2;
  315. }
  316. boundsX(t2) {
  317. return this._buffer[this._offset + 10 + t2 * e2 + 2];
  318. }
  319. boundsY(t2) {
  320. return this._buffer[this._offset + 10 + t2 * e2 + 3];
  321. }
  322. boundsWidth(t2) {
  323. return this._buffer[this._offset + 10 + t2 * e2 + 4];
  324. }
  325. boundsHeight(t2) {
  326. return this._buffer[this._offset + 10 + t2 * e2 + 5];
  327. }
  328. link(t2) {
  329. let s2 = this;
  330. for (; s2._link; )
  331. s2 = s2._link;
  332. s2._link = t2;
  333. }
  334. getCursor() {
  335. return this.copy();
  336. }
  337. copy() {
  338. const t2 = new i3(this._buffer);
  339. return t2._link = this._link, t2._offset = this._offset, t2._deletedCount = this._deletedCount, t2._offsets = this._offsets, t2._count = this._count, t2;
  340. }
  341. peekId() {
  342. const t2 = this._offset + 10 + this.boundsCount * e2 + 0;
  343. return t2 >= this._buffer.length ? 0 : this._buffer[t2];
  344. }
  345. next() {
  346. let t2 = 0;
  347. for (; this._offset < this._buffer.length && t2++ < 100 && (this._offset === -1 ? this._offset = 0 : this._offset += 10 + this.boundsCount * e2, this.id === r2); )
  348. ;
  349. return this.id !== r2 && this._offset < this._buffer.length;
  350. }
  351. delete(t2) {
  352. const s2 = this._offset, e4 = this.lookup(t2);
  353. if (e4)
  354. for (this.id = 4294967295, ++this._deletedCount; this.next() && this.id === t2; )
  355. this.id = 4294967295, ++this._deletedCount;
  356. return this._offset = s2, e4;
  357. }
  358. lookup(t2) {
  359. const e4 = this._offset;
  360. if (t(this._offsets.instance)) {
  361. this._offsets.instance = new Map();
  362. const t3 = this.copy();
  363. t3._offset = -1;
  364. let s2 = 0;
  365. for (; t3.next(); )
  366. t3.id !== s2 && (this._offsets.instance.set(t3.id, t3._offset), s2 = t3.id);
  367. }
  368. return !!this._offsets.instance.has(t2) && (this._offset = this._offsets.instance.get(t2), this.id !== r2 || (this._offset = e4, false));
  369. }
  370. _computeCount() {
  371. const t2 = this._offset;
  372. let s2 = 0;
  373. for (this._offset = -1; this.next(); )
  374. s2++;
  375. return this._offset = t2, s2;
  376. }
  377. };
  378. // node_modules/@arcgis/core/views/2d/engine/webgl/cpuMapped/FreeList.js
  379. var a2 = class {
  380. constructor(t2) {
  381. if (!Array.isArray(t2))
  382. return void (this.data = t2);
  383. this.data = t2[0];
  384. let e4 = this;
  385. for (let n7 = 1; n7 < t2.length; n7++)
  386. e4.next = new a2([t2[n7]]), e4 = e4.next;
  387. }
  388. *values() {
  389. let t2 = this;
  390. for (; t2; )
  391. yield t2.data, t2 = t2.next;
  392. }
  393. forEach(t2) {
  394. let a6 = this;
  395. for (; a6; )
  396. t2(a6.data), a6 = a6.next;
  397. }
  398. find(t2) {
  399. return t2(this.data) ? this : this.next?.find(t2);
  400. }
  401. max(t2, a6 = this) {
  402. const e4 = t2(this.data) > t2(a6.data) ? this : a6;
  403. return this.next ? this.next.max(t2, e4) : e4;
  404. }
  405. remove(t2, a6 = null) {
  406. return this === t2 ? a6 ? (a6.next = this.next, a6) : this.next : this.next.remove(t2, this);
  407. }
  408. get last() {
  409. return this.next ? this.next.last : this;
  410. }
  411. };
  412. var e3 = class {
  413. constructor(e4) {
  414. this._head = null, t(e4) || (this._head = new a2(e4));
  415. }
  416. get head() {
  417. return this._head;
  418. }
  419. maxAvailableSpace() {
  420. if (t(this._head))
  421. return 0;
  422. const a6 = this._head.max((t2) => t2.end - t2.start);
  423. return a6.data.end - a6.data.start;
  424. }
  425. firstFit(a6) {
  426. if (t(this._head))
  427. return null;
  428. let e4 = null, n7 = this._head;
  429. for (; n7; ) {
  430. const t2 = n7.data.end - n7.data.start;
  431. if (t2 === a6)
  432. return e4 ? e4.next = n7.next : this._head = n7.next, n7.data.start;
  433. if (t2 > a6) {
  434. const t3 = n7.data.start;
  435. return n7.data.start += a6, t3;
  436. }
  437. e4 = n7, n7 = n7.next;
  438. }
  439. return null;
  440. }
  441. free(e4, n7) {
  442. const r3 = e4 + n7;
  443. if (t(this._head)) {
  444. const t2 = new a2({ start: e4, end: r3 });
  445. return void (this._head = t2);
  446. }
  447. if (r3 <= this._head.data.start) {
  448. if (r3 === this._head.data.start)
  449. return void (this._head.data.start -= n7);
  450. const t2 = new a2({ start: e4, end: r3 });
  451. return t2.next = this._head, void (this._head = t2);
  452. }
  453. let s2 = this._head, d2 = s2.next;
  454. for (; d2; ) {
  455. if (d2.data.start >= r3) {
  456. if (s2.data.end === e4) {
  457. if (s2.data.end += n7, s2.data.end === d2.data.start) {
  458. const t3 = d2.data.end - d2.data.start;
  459. return s2.data.end += t3, void (s2.next = d2.next);
  460. }
  461. return;
  462. }
  463. if (d2.data.start === r3)
  464. return void (d2.data.start -= n7);
  465. const t2 = new a2({ start: e4, end: r3 });
  466. return t2.next = s2.next, void (s2.next = t2);
  467. }
  468. s2 = d2, d2 = d2.next;
  469. }
  470. if (e4 === s2.data.end)
  471. return void (s2.data.end += n7);
  472. const i5 = new a2({ start: e4, end: r3 });
  473. s2.next = i5;
  474. }
  475. };
  476. // node_modules/@arcgis/core/views/2d/engine/webgl/FeatureDisplayList.js
  477. var n4 = class {
  478. constructor(t2, e4, i5, n7, a6) {
  479. this.target = t2, this.geometryType = e4, this.materialKey = i5, this.indexFrom = n7, this.indexCount = a6;
  480. }
  481. get indexEnd() {
  482. return this.indexFrom + this.indexCount;
  483. }
  484. extend(t2) {
  485. this.indexCount += t2;
  486. }
  487. };
  488. var a3 = class {
  489. constructor(t2, e4) {
  490. this.geometryType = 0, this._target = t2, this.geometryType = e4;
  491. }
  492. static from(e4, i5, n7, d2) {
  493. const r3 = new a3(e4, i5);
  494. if (r(d2))
  495. for (const t2 of d2)
  496. n7.seekIndex(t2), r3.addRecord(n7);
  497. else
  498. for (; n7.next(); )
  499. r3.addRecord(n7);
  500. return r3;
  501. }
  502. addRecord(t2) {
  503. const a6 = this._target, d2 = this.geometryType, r3 = t2.materialKey;
  504. let s2 = t2.indexFrom, o7 = t2.indexCount;
  505. const h2 = t2.vertexFrom, x = t2.vertexCount;
  506. if (o7 || (s2 = h2, o7 = x), t(this._head)) {
  507. const t3 = new n4(a6, d2, r3, s2, o7);
  508. return void (this._head = new a2(t3));
  509. }
  510. let m2 = null, c7 = this._head;
  511. for (; c7; ) {
  512. if (s2 < c7.data.indexFrom)
  513. return this._insert(r3, s2, o7, m2, c7);
  514. m2 = c7, c7 = c7.next;
  515. }
  516. this._insert(r3, s2, o7, m2, null);
  517. }
  518. forEach(e4) {
  519. r(this._head) && this._head.forEach(e4);
  520. }
  521. *infos() {
  522. if (r(this._head))
  523. for (const t2 of this._head.values())
  524. yield t2;
  525. }
  526. _insert(a6, d2, r3, s2, o7) {
  527. if (t(s2) && t(o7)) {
  528. const t2 = new n4(this._target, this.geometryType, a6, d2, r3);
  529. this._head = new a2(t2);
  530. }
  531. return t(s2) && r(o7) ? this._insertAtHead(a6, d2, r3, o7) : r(s2) && t(o7) ? this._insertAtEnd(a6, d2, r3, s2) : r(s2) && r(o7) ? this._insertAtMiddle(a6, d2, r3, s2, o7) : void 0;
  532. }
  533. _insertAtHead(t2, e4, a6, d2) {
  534. const r3 = e4 + a6;
  535. if (t2 === d2.data.materialKey && r3 === d2.data.indexFrom)
  536. d2.data.indexFrom = e4, d2.data.indexCount += a6;
  537. else {
  538. const r4 = new n4(this._target, this.geometryType, t2, e4, a6);
  539. this._head = new a2(r4), this._head.next = d2;
  540. }
  541. }
  542. _insertAtEnd(t2, e4, a6, d2) {
  543. if (d2.data.materialKey === t2 && d2.data.indexEnd === e4)
  544. d2.data.indexCount += a6;
  545. else {
  546. const r3 = new n4(this._target, this.geometryType, t2, e4, a6), s2 = new a2(r3);
  547. d2.next = s2;
  548. }
  549. }
  550. _insertAtMiddle(t2, e4, a6, d2, r3) {
  551. const s2 = e4 + a6;
  552. if (d2.data.materialKey === t2 && d2.data.indexEnd === e4)
  553. d2.data.indexCount += a6, d2.data.materialKey === r3.data.materialKey && d2.data.indexEnd === r3.data.indexFrom && (d2.data.indexCount += r3.data.indexCount, d2.next = r3.next);
  554. else if (t2 === r3.data.materialKey && s2 === r3.data.indexFrom)
  555. r3.data.indexFrom = e4, r3.data.indexCount += a6;
  556. else {
  557. const s3 = new n4(this._target, this.geometryType, t2, e4, a6), o7 = new a2(s3);
  558. d2.next = o7, o7.next = r3;
  559. }
  560. }
  561. };
  562. // node_modules/@arcgis/core/views/2d/engine/webgl/BufferPool.js
  563. var i4 = a("esri-2d-log-allocations");
  564. var n5 = class {
  565. constructor(t2) {
  566. this._array = t2;
  567. }
  568. get array() {
  569. return this._array;
  570. }
  571. get length() {
  572. return this._array.length;
  573. }
  574. static create(t2) {
  575. const e4 = _.acquire(t2);
  576. return new n5(e4);
  577. }
  578. expand(t2) {
  579. const e4 = _.acquire(t2);
  580. e4.set(this._array), _.release(this._array), this._array = e4;
  581. }
  582. destroy() {
  583. _.release(this._array);
  584. }
  585. set(t2, e4) {
  586. this._array.set(t2._array, e4);
  587. }
  588. slice() {
  589. const t2 = _.acquire(this._array.byteLength);
  590. return t2.set(this._array), new n5(t2);
  591. }
  592. };
  593. var o6 = class {
  594. constructor() {
  595. this._data = new ArrayBuffer(o6.BYTE_LENGTH), this._freeList = new e3({ start: 0, end: this._data.byteLength });
  596. }
  597. static get BYTE_LENGTH() {
  598. return 64e6;
  599. }
  600. get buffer() {
  601. return this._data;
  602. }
  603. allocate(t2) {
  604. const e4 = this._freeList.firstFit(t2);
  605. return t(e4) ? null : new Uint32Array(this._data, e4, t2 / Uint32Array.BYTES_PER_ELEMENT);
  606. }
  607. free(t2) {
  608. this._freeList.free(t2.byteOffset, t2.byteLength);
  609. }
  610. };
  611. var c4 = class {
  612. constructor() {
  613. this._bytesAllocated = 0, this._pages = [], this._pagesByBuffer = new Map(), this._addPage();
  614. }
  615. get _bytesTotal() {
  616. return this._pages.length * o6.BYTE_LENGTH;
  617. }
  618. acquire(t2) {
  619. if (this._bytesAllocated += t2, i4 && console.log(`Allocating ${t2}, (${this._bytesAllocated} / ${this._bytesTotal})`), t2 > o6.BYTE_LENGTH)
  620. return new Uint32Array(t2 / Uint32Array.BYTES_PER_ELEMENT);
  621. for (const r3 of this._pages) {
  622. const s2 = r3.allocate(t2);
  623. if (r(s2))
  624. return s2;
  625. }
  626. return f(this._addPage().allocate(t2), "Expected to allocate page");
  627. }
  628. release(t2) {
  629. this._bytesAllocated -= t2.byteLength, i4 && console.log(`Freeing ${t2.byteLength}, (${this._bytesAllocated} / ${this._bytesTotal})`);
  630. const e4 = this._pagesByBuffer.get(t2.buffer);
  631. e4 && e4.free(t2);
  632. }
  633. _addPage() {
  634. const t2 = new o6();
  635. return this._pages.push(t2), this._pagesByBuffer.set(t2.buffer, t2), t2;
  636. }
  637. };
  638. var _ = new c4();
  639. // node_modules/@arcgis/core/views/2d/engine/webgl/cpuMapped/Buffer.js
  640. var a4 = 1.25;
  641. var u2 = 32767;
  642. var d = u2 << 16 | u2;
  643. var f4 = class {
  644. constructor(t2, i5, e4) {
  645. const s2 = n5.create(i5 * e4 * Uint32Array.BYTES_PER_ELEMENT);
  646. this.size = i5, this.strideInt = e4, this.bufferType = t2, this.dirty = { start: 1 / 0, end: 0 }, this._gpu = null, this._cpu = s2, this.clear();
  647. }
  648. get elementSize() {
  649. return this._cpu.length / this.strideInt;
  650. }
  651. get invalidated() {
  652. return this.bufferSize && !this._gpu;
  653. }
  654. get invalidatedComputeBuffer() {
  655. return this.bufferSize && !this._gpuComputeTriangles;
  656. }
  657. invalidate() {
  658. this._invalidateTriangleBuffer(), o(this._gpu, (t2) => t2.dispose()), this._gpu = null;
  659. }
  660. _invalidateTriangleBuffer() {
  661. o(this._gpuComputeTriangles, (t2) => t2.dispose()), this._gpuComputeTriangles = null;
  662. }
  663. destroy() {
  664. o(this._gpu, (t2) => t2.dispose()), o(this._gpuComputeTriangles, (t2) => t2.dispose()), o(this._cpu, (t2) => t2.destroy()), o(this._cpu2, (t2) => t2.destroy());
  665. }
  666. clear() {
  667. this.dirty.start = 1 / 0, this.dirty.end = 0, this.freeList = new e3({ start: 0, end: this._cpu.length / this.strideInt }), this.fillPointer = 0;
  668. }
  669. ensure(t2) {
  670. if (this.maxAvailableSpace() >= t2)
  671. return;
  672. if (t2 * this.strideInt > this._cpu.length - this.fillPointer) {
  673. this.invalidate();
  674. const i5 = this._cpu.length / this.strideInt, e4 = Math.round((i5 + t2) * a4), r3 = e4 * this.strideInt;
  675. this._cpu.expand(r3 * Uint32Array.BYTES_PER_ELEMENT), this.freeList.free(i5, e4 - i5);
  676. }
  677. }
  678. set(t2, i5) {
  679. this._cpu.array[t2] !== i5 && (this._cpu.array[t2] = i5, this.dirty.start = Math.min(t2, this.dirty.start), this.dirty.end = Math.max(t2, this.dirty.end));
  680. }
  681. getGPUBuffer(t2, e4 = false) {
  682. if (!this.bufferSize)
  683. return null;
  684. if (e4) {
  685. if (this.bufferType !== "index")
  686. throw new Error("Tired to get triangle buffer, but target is not an index buffer");
  687. return t(this._gpuComputeTriangles) && (this._gpuComputeTriangles = this._createComputeBuffer(t2)), this._gpuComputeTriangles;
  688. }
  689. return t(this._gpu) && (this._gpu = this._createBuffer(t2)), this._gpu;
  690. }
  691. getCPUBuffer() {
  692. if (!this._cpu2) {
  693. const t2 = this._cpu.slice();
  694. this._cpu2 = t2;
  695. }
  696. return this._cpu2.length !== this._cpu.length && this._cpu2.expand(this._cpu.length * this._cpu.array.BYTES_PER_ELEMENT), this._cpu2.set(this._cpu), this._cpu2;
  697. }
  698. get bufferSize() {
  699. return this._cpu.length / this.strideInt;
  700. }
  701. maxAvailableSpace() {
  702. return this.freeList.maxAvailableSpace();
  703. }
  704. insert(t2, i5, r3, s2) {
  705. const h2 = r3 * this.strideInt;
  706. if (!h2)
  707. return 0;
  708. const n7 = i5 * this.strideInt * Uint32Array.BYTES_PER_ELEMENT, a6 = new Uint32Array(t2, n7, h2), u4 = f(this.freeList.firstFit(r3), "First fit region must be defined") * this.strideInt, d2 = h2, f6 = u4 / this.strideInt - i5;
  709. if (s2 !== 0)
  710. for (let e4 = 0; e4 < a6.length; e4++)
  711. a6[e4] += s2;
  712. return this._cpu.array.set(a6, u4), this.dirty.start = Math.min(this.dirty.start, u4), this.dirty.end = Math.max(this.dirty.end, u4 + d2), this.fillPointer = Math.max(this.fillPointer, u4 + d2), f6;
  713. }
  714. free(t2, i5, e4) {
  715. const r3 = t2 * this.strideInt, s2 = (t2 + i5) * this.strideInt;
  716. if (e4 === true)
  717. for (let h2 = t2; h2 !== t2 + i5; h2++)
  718. this._cpu.array[h2 * this.strideInt] = d;
  719. this.dirty.start = Math.min(this.dirty.start, r3), this.dirty.end = Math.max(this.dirty.end, s2), this.freeList.free(t2, i5);
  720. }
  721. upload() {
  722. if (this.dirty.end) {
  723. if (this._invalidateTriangleBuffer(), t(this._gpu))
  724. return this.dirty.start = 1 / 0, void (this.dirty.end = 0);
  725. this._gpu.setSubDataFromView(this._cpu.array, this.dirty.start, this.dirty.start, this.dirty.end), this.dirty.start = 1 / 0, this.dirty.end = 0;
  726. }
  727. }
  728. _createBuffer(t2) {
  729. const i5 = F.DYNAMIC_DRAW;
  730. return this.bufferType === "index" ? c2.createIndex(t2, i5, this._cpu.array) : c2.createVertex(t2, i5, this._cpu.array);
  731. }
  732. _createComputeBuffer(t2) {
  733. const i5 = F.DYNAMIC_DRAW, e4 = new Uint32Array(this.fillPointer / 3);
  734. for (let r3 = 0; r3 < this.fillPointer; r3 += 3)
  735. e4[r3 / 3] = this._cpu.array[r3];
  736. return c2.createIndex(t2, i5, e4);
  737. }
  738. };
  739. // node_modules/@arcgis/core/views/2d/engine/webgl/cpuMapped/Geometry.js
  740. var h = 0;
  741. var u3 = 1;
  742. var c5 = class {
  743. constructor(e4, t2) {
  744. this._vaos = new Map(), this._indicesInvalid = false, this.geometryType = e4;
  745. }
  746. destroy() {
  747. for (const [t2, r3] of this._vaos)
  748. r(r3) && r3.dispose(false);
  749. this._indexBuffer = l(this._indexBuffer), this._vertexBuffer = l(this._vertexBuffer);
  750. }
  751. insert(e4, t2, i5) {
  752. if (!e4.records.byteLength)
  753. return;
  754. const s2 = e4.stride;
  755. if (this._vertexBuffer && this._indexBuffer) {
  756. const i6 = e4.indices.byteLength / 4, f6 = e4.vertices.byteLength / s2;
  757. this._indexBuffer.ensure(i6), this._vertexBuffer.ensure(f6);
  758. const { vertices: n7, indices: d2 } = e4, h2 = i.from(e4.records), u4 = this._vertexBuffer.insert(n7, 0, n7.byteLength / s2, 0), c7 = this._indexBuffer.insert(d2, 0, d2.byteLength / 4, u4);
  759. if (h2.forEach((e5) => {
  760. e5.indexFrom += c7, e5.vertexFrom += u4;
  761. }), f(this._records, "Expected records to be defined").link(h2), t2)
  762. this._indicesInvalid = true;
  763. else if (this._displayList) {
  764. const e5 = h2.getCursor();
  765. for (; e5.next(); )
  766. this._displayList.addRecord(e5);
  767. }
  768. } else {
  769. const r3 = e4.indices.byteLength / 4, i6 = e4.vertices.byteLength / s2, f6 = s2 / Uint32Array.BYTES_PER_ELEMENT;
  770. this._records = i.from(e4.records), this._indexBuffer = new f4("index", r3, 1), this._vertexBuffer = new f4("vertex", i6, f6), this._indexBuffer.insert(e4.indices, 0, e4.indices.byteLength / 4, 0), this._vertexBuffer.insert(e4.vertices, 0, e4.vertices.byteLength / s2, 0), t2 && (this._indicesInvalid = true);
  771. }
  772. }
  773. remove(e4) {
  774. if (!t(this._records))
  775. for (const t2 of e4) {
  776. const e5 = this._records.getCursor();
  777. if (!e5.lookup(t2))
  778. continue;
  779. const r3 = e5.indexFrom, i5 = e5.vertexFrom;
  780. let s2 = e5.indexCount, f6 = e5.vertexCount;
  781. for (; e5.next() && e5.id === t2; )
  782. s2 += e5.indexCount, f6 += e5.vertexCount;
  783. this._indexBuffer.free(r3, s2), this._vertexBuffer.free(i5, f6, true), this._records.delete(t2);
  784. }
  785. }
  786. getVAO(e4, t2, r3, f6) {
  787. if (!this._vertexBuffer || !this._indexBuffer || t(this._records) || !this._vertexBuffer.bufferSize)
  788. return null;
  789. const n7 = f6 ? u3 : h;
  790. let o7 = this._vaos.get(n7);
  791. (this._vertexBuffer.invalidated || this._indexBuffer.invalidated || f6 && this._indexBuffer.invalidatedComputeBuffer) && (o(o7, (e5) => e5.dispose(false)), o7 = null), this._vertexBuffer.upload(), this._indexBuffer.upload();
  792. const c7 = this._indexBuffer.getGPUBuffer(e4, n7 === 1), _2 = this._vertexBuffer.getGPUBuffer(e4);
  793. return o7 || (o7 = new f3(e4, r3, t2, { geometry: _2 }, c7), this._vaos.set(n7, o7)), o7;
  794. }
  795. forEachCommand(e4) {
  796. if (!t(this._records)) {
  797. if (this._sortIndices(this._records), !this._displayList) {
  798. const e5 = this._cursorIndexOrder;
  799. this._displayList = a3.from(this, this.geometryType, this._records.getCursor(), e5);
  800. }
  801. this._displayList.forEach(e4);
  802. }
  803. }
  804. _sortIndices(e4) {
  805. const t2 = !!this._indexBuffer.bufferSize;
  806. if (!this._indicesInvalid)
  807. return;
  808. this._indicesInvalid = false;
  809. let r3 = 0;
  810. const i5 = e4.getCursor(), s2 = [], f6 = [], n7 = [];
  811. for (; i5.next(); )
  812. f6.push(i5.index), n7.push(i5.sortKey), s2.push(i5.id);
  813. f6.sort((e5, t3) => {
  814. const r4 = n7[t3], i6 = n7[e5];
  815. return i6 === r4 ? s2[t3] - s2[e5] : r4 - i6;
  816. });
  817. const o7 = e4.getCursor(), d2 = t2 ? this._indexBuffer.getCPUBuffer() : this._vertexBuffer.getCPUBuffer();
  818. for (const h2 of f6) {
  819. if (!o7.seekIndex(h2))
  820. throw new Error("Expected to find index");
  821. if (t2) {
  822. const { indexFrom: e5, indexCount: t3 } = o7;
  823. o7.indexFrom = r3;
  824. for (let i6 = 0; i6 < t3; i6++)
  825. this._indexBuffer.set(r3++, d2.array[e5 + i6]);
  826. } else {
  827. const { vertexFrom: e5, vertexCount: t3 } = o7, i6 = this._vertexBuffer.strideInt, s3 = e5 * i6, f7 = s3 + t3 * i6;
  828. o7.vertexFrom = r3 / i6;
  829. for (let n8 = s3; n8 < f7; n8++)
  830. this._vertexBuffer.set(r3++, d2.array[n8]);
  831. }
  832. }
  833. this._cursorIndexOrder = f6, this._displayList = null;
  834. }
  835. };
  836. // node_modules/@arcgis/core/views/2d/engine/webgl/FeatureTile.js
  837. var l2 = 50;
  838. var f5 = 4;
  839. var S = 100;
  840. var g2 = 0;
  841. var y = class extends c3 {
  842. constructor(t2, r3, s2, i5, a6) {
  843. super(t2, r3, s2), this.instanceId = g2++, this.patchCount = 0, this._renderState = { current: { geometry: new Map(), metrics: null }, next: null, swap: false, swapFrames: 0, locked: false }, this._patches = new s(S), this._bufferPatches = new s(S), this._lastCommitTime = 0, this.transforms.labelMat2d = n2(), this._store = i5, this._requestLabelUpdate = a6;
  844. }
  845. destroy() {
  846. super.destroy(), this._renderState.current.geometry.forEach((e4) => e4.destroy());
  847. }
  848. get labelMetrics() {
  849. return this._renderState.current.metrics;
  850. }
  851. get hasData() {
  852. return !!this._renderState.current.geometry.size;
  853. }
  854. getGeometry(e4) {
  855. return this._renderState.current.geometry.get(e4);
  856. }
  857. setTransform(e4, t2) {
  858. super.setTransform(e4, t2);
  859. const r3 = this.transforms.labelMat2d, s2 = e4.getScreenTransform(r3, t2), i5 = n3();
  860. z(i5, [this.x, this.y], s2), f2(r3, i5), o2(r3, e4.viewMat2d, r3);
  861. }
  862. patch(e4, r3) {
  863. this.patchCount++, a("esri-2d-update-debug") && e4.clear === true && console.debug(this.key.id, "FeatureTile:patch:clear", e4.clear), e4.clear && this._patches.size >= l2 && this._dropPatches();
  864. const s2 = e4, i5 = s2.addOrUpdate && this.key.id !== s2.addOrUpdate.tileKeyOrigin;
  865. r3 && i5 ? this._bufferPatches.enqueue(s2) : (s2.sort = s2.sort && !r3, this._patches.enqueue(s2)), this.requestRender();
  866. }
  867. commit(e4) {
  868. if (this._lastCommitTime !== e4.time) {
  869. this._lastCommitTime = e4.time;
  870. for (let e5 = 0; e5 < f5; e5++)
  871. this._updateMesh(), this.isReady && this._updateBufferMesh();
  872. this._renderState.swap && (this._swapRenderStates(), this.requestRender());
  873. }
  874. }
  875. lock() {
  876. this._renderState.locked = true;
  877. }
  878. unlock() {
  879. this._renderState.locked = false, this._flushUpdates(), this._swap();
  880. }
  881. _swapRenderStates() {
  882. if (this._renderState.next) {
  883. if (this._renderState.locked)
  884. return this._renderState.swap = true, void this.requestRender();
  885. this._renderState.swap = true, this._swap();
  886. }
  887. }
  888. _swap() {
  889. this._renderState.swap && (this._renderState.swap = false, r(this._renderState.next) && (this._renderState.current.geometry.forEach((e4) => e4.destroy()), this._renderState.current = this._renderState.next, this._renderState.next = null, this._requestLabelUpdate()));
  890. }
  891. _flushUpdates() {
  892. let e4 = this._patches.maxSize;
  893. for (; this._patches.size && e4--; )
  894. this._updateMesh(), this._swap();
  895. }
  896. _updateBufferMesh() {
  897. const e4 = this._bufferPatches.peek();
  898. if (!r(e4) || !e4.clear || this._renderState.next === null)
  899. for (; this._bufferPatches.size; ) {
  900. const e5 = this._bufferPatches.dequeue();
  901. r(e5) && this._patchBuffer(e5);
  902. }
  903. }
  904. _updateMesh() {
  905. const e4 = this._patches.dequeue();
  906. r(e4) && (e4.clear === true && (r(this._renderState.next) && (this._renderState.next.geometry.forEach((e5) => e5.destroy()), this._renderState.next = null), this._renderState.next = { geometry: new Map(), metrics: null }, a("esri-2d-update-debug") && console.debug(this.key.id, "FeatureTile:_updateMesh - Creating new renderState")), this.requestRender(), this._patch(e4), e4.end && (a("esri-2d-update-debug") && console.debug(this.key.id, "FeatureTile:_updateMesh - Encountered end message"), this.ready(), this._swapRenderStates()));
  907. }
  908. _patch(e4) {
  909. he((t2) => {
  910. this._remove(t2, e4.remove), this._insert(t2, e4, false);
  911. });
  912. }
  913. _patchBuffer(e4) {
  914. he((t2) => {
  915. this._insert(t2, e4, true);
  916. });
  917. }
  918. _insert(e4, r3, a6) {
  919. try {
  920. const n7 = c(this._renderState.next, this._renderState.current), h2 = r3.addOrUpdate?.data[e4], d2 = n7.geometry;
  921. if (t(h2))
  922. return;
  923. d2.has(e4) || (a("esri-2d-update-debug") && console.debug(this.key.id, `FeatureTile:_insert - Creating geometry buffer ${e4}`), d2.set(e4, new c5(e4, this.stage))), a("esri-2d-update-debug") && console.debug(this.key.id, `FeatureTile:_insert - Inserting into ${e4}, version=${r3.addOrUpdate.version} stride=${h2.stride}`), d2.get(e4).insert(h2, r3.sort, a6), e4 === E.LABEL && this._insertLabelMetrics(r3.type, h2.metrics, r3.clear);
  924. } catch (n7) {
  925. }
  926. }
  927. _insertLabelMetrics(e4, t2, r3) {
  928. const a6 = c(this._renderState.next, this._renderState.current);
  929. if (t(t2))
  930. return;
  931. const n7 = o5.from(t2);
  932. if (t(a6.metrics))
  933. a6.metrics = n7;
  934. else {
  935. if (e4 === "update") {
  936. const e5 = n7.getCursor();
  937. for (; e5.next(); )
  938. a6.metrics.delete(e5.id);
  939. }
  940. a6.metrics.link(n7);
  941. }
  942. }
  943. _remove(e4, t2) {
  944. const r3 = c(this._renderState.next, this._renderState.current).geometry.get(e4);
  945. t2 && t2.length && r3 && (r3.remove(t2), this._removeLabelMetrics(t2));
  946. }
  947. _removeLabelMetrics(e4) {
  948. const { metrics: t2 } = c(this._renderState.next, this._renderState.current);
  949. if (!t(t2) && e4.length)
  950. for (const r3 of e4)
  951. for (; t2.delete(r3); )
  952. ;
  953. }
  954. _dropPatches() {
  955. const e4 = new Array();
  956. let t2 = false;
  957. for (; this._patches.size; ) {
  958. const r3 = this._patches.dequeue();
  959. if (t(r3))
  960. break;
  961. if (r3.clear) {
  962. if (t2)
  963. break;
  964. t2 = true;
  965. }
  966. e4.push(r3);
  967. }
  968. this._patches.clear(), e4.forEach((e5) => this._patches.enqueue(e5));
  969. }
  970. };
  971. // node_modules/@arcgis/core/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js
  972. var a5 = a("featurelayer-order-by-server-enabled");
  973. var n6 = class extends o3 {
  974. constructor(e4, t2, i5, s2) {
  975. super(e4), this._pointToCallbacks = [], this._layer = i5, this._layerView = t2, this._onUpdate = s2;
  976. }
  977. renderChildren(e4) {
  978. if (this.attributeView.update(), this.hasAnimation) {
  979. e4.painter.effects.integrate.draw(e4, e4.attributeView);
  980. }
  981. super.renderChildren(e4);
  982. }
  983. hasEmptyAttributeView() {
  984. return this.attributeView.isEmpty();
  985. }
  986. isUpdating() {
  987. return this.attributeView.isUpdating();
  988. }
  989. hitTest(e4) {
  990. const i5 = D();
  991. return this._pointToCallbacks.push({ point: e4, resolver: i5 }), this.requestRender(), i5.promise;
  992. }
  993. onTileData(e4, t2) {
  994. const i5 = a5 && "orderBy" in this._layer && this._layer.orderBy, s2 = i5?.length && !i5[0].valueExpression && i5[0].field, r3 = i5 && this._layerView.orderByFields === s2;
  995. e4.patch(t2, r3), this.contains(e4) || this.addChild(e4), this.requestRender();
  996. }
  997. onTileError(e4) {
  998. this.contains(e4) || this.addChild(e4);
  999. }
  1000. updateTransitionProperties(e4, t2) {
  1001. super.updateTransitionProperties(e4, t2), this._layerView.featureEffectView.transitionStep(e4, t2), this._layerView.featureEffectView.transitioning && this.requestRender();
  1002. }
  1003. doRender(e4) {
  1004. const { minScale: t2, maxScale: i5 } = this._layer, s2 = e4.state.scale;
  1005. s2 <= (t2 || 1 / 0) && s2 >= i5 && super.doRender(e4);
  1006. }
  1007. onAttributeStoreUpdate() {
  1008. this.hasLabels && this._layerView.view.labelManager.requestUpdate(), this._onUpdate();
  1009. }
  1010. get hasAnimation() {
  1011. return this.hasLabels;
  1012. }
  1013. setStencilReference(e4) {
  1014. const { rendererSchema: t2 } = e4.rendererInfo;
  1015. if (t2.type === "dot-density" && t2.dotSize > 1) {
  1016. const e5 = 1;
  1017. for (const t3 of this.children)
  1018. t3.stencilRef = t3.key.level + e5;
  1019. } else
  1020. super.setStencilReference(e4);
  1021. }
  1022. get hasLabels() {
  1023. if ("sublayers" in this._layer)
  1024. return this._layer.sublayers.some((e5) => e5.labelingInfo && e5.labelingInfo.length && e5.labelsVisible);
  1025. const e4 = this._layer.featureReduction, t2 = e4 && "labelingInfo" in e4 && e4.labelsVisible && e4.labelingInfo && e4.labelingInfo.length;
  1026. return this._layer.labelingInfo && this._layer.labelingInfo.length && this._layer.labelsVisible || !!t2;
  1027. }
  1028. prepareRenderPasses(e4) {
  1029. const t2 = e4.registerRenderPass({ name: "label", brushes: [W.label], target: () => this.hasLabels ? this.children : null, drawPhase: I.LABEL | I.LABEL_ALPHA }), s2 = e4.registerRenderPass({ name: "geometry", brushes: [W.fill, W.dotDensity, W.line, W.marker, W.heatmap, W.pieChart, W.text], target: () => this.children, enableDefaultDraw: () => !this._layerView.featureEffectView.hasEffects, effects: [{ apply: e4.effects.outsideEffect, enable: () => this._layerView.featureEffectView.hasEffects, args: () => this._layerView.featureEffectView.excludedEffects }, { apply: e4.effects.insideEffect, enable: () => this._layerView.featureEffectView.hasEffects, args: () => this._layerView.featureEffectView.includedEffects }, { apply: e4.effects.hittest, enable: () => !!this._pointToCallbacks.length, args: () => this._pointToCallbacks }] }), a6 = e4.registerRenderPass({ name: "highlight", brushes: [W.fill, W.dotDensity, W.line, W.marker, W.pieChart, W.text], target: () => this.children, drawPhase: I.HIGHLIGHT, enableDefaultDraw: () => false, effects: [{ apply: e4.effects.highlight, enable: () => !!this._layerView.hasHighlight() }] });
  1030. return [...super.prepareRenderPasses(e4), s2, a6, t2];
  1031. }
  1032. };
  1033. // node_modules/@arcgis/core/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js
  1034. var p = class extends o4 {
  1035. constructor() {
  1036. super(...arguments), this.type = "symbol";
  1037. }
  1038. install(e4) {
  1039. const t2 = () => this.notifyChange("updating"), i5 = new n6(this.tileInfoView, this.layerView, this.layer, t2);
  1040. this.featuresView = i5, e4.addChild(i5);
  1041. }
  1042. uninstall(e4) {
  1043. e4.removeChild(this.featuresView), this.featuresView.destroy(), this.featuresView = null;
  1044. }
  1045. fetchResource(e4, t2) {
  1046. const { url: s2 } = e4, r3 = this.featuresView.stage;
  1047. try {
  1048. return r3.resourceManager.fetchResource(s2, { signal: t2.signal });
  1049. } catch (a6) {
  1050. return g(a6) ? Promise.resolve({ width: 0, height: 0 }) : Promise.reject(a6);
  1051. }
  1052. }
  1053. isUpdating() {
  1054. const e4 = super.isUpdating(), i5 = !this.featuresView || this.featuresView.isUpdating(), s2 = this.featuresView?.hasEmptyAttributeView(), r3 = e4 || i5 || e4 && s2;
  1055. return a("esri-2d-log-updating") && console.log(`Updating SymbolTileRenderer ${r3}
  1056. -> updatingTiles ${e4}
  1057. -> hasFeaturesView ${!!this.featuresView}
  1058. -> updatingFeaturesView ${i5}`), r3;
  1059. }
  1060. hitTest(e4) {
  1061. return this.featuresView.hitTest(e4);
  1062. }
  1063. supportsRenderer(e4) {
  1064. return e4 != null && ["simple", "class-breaks", "unique-value", "dot-density", "dictionary", "heatmap", "pie-chart"].includes(e4.type);
  1065. }
  1066. onConfigUpdate(e4) {
  1067. let t2 = null;
  1068. if ("visualVariables" in e4) {
  1069. const i5 = (i2(e4).visualVariables || []).map((e5) => {
  1070. const t3 = e5.clone();
  1071. return "normalizationField" in e5 && (t3.normalizationField = null), e5.valueExpression && e5.valueExpression !== "$view.scale" && (t3.valueExpression = null, t3.field = "nop"), t3;
  1072. });
  1073. t2 = m(i5);
  1074. }
  1075. this.featuresView.setRendererInfo(e4, t2, this.layerView.featureEffect);
  1076. }
  1077. onTileData(e4) {
  1078. const t2 = this.tiles.get(e4.tileKey);
  1079. t2 && e4.data && this.featuresView.onTileData(t2, e4.data), this.layerView.view.labelManager.requestUpdate();
  1080. }
  1081. onTileError(e4) {
  1082. const t2 = this.tiles.get(e4.tileKey);
  1083. t2 && this.featuresView.onTileError(t2);
  1084. }
  1085. forceAttributeTextureUpload() {
  1086. this.featuresView.attributeView.forceTextureUpload();
  1087. }
  1088. lockGPUUploads() {
  1089. this.featuresView.attributeView.lockTextureUpload(), this.tiles.forEach((e4) => e4.lock());
  1090. }
  1091. unlockGPUUploads() {
  1092. this.featuresView.attributeView.unlockTextureUpload(), this.tiles.forEach((e4) => e4.unlock());
  1093. }
  1094. async getMaterialItems(e4) {
  1095. return this.featuresView.getMaterialItems(e4);
  1096. }
  1097. invalidateLabels() {
  1098. this.featuresView.hasLabels && this.layerView.view.labelManager.requestUpdate();
  1099. }
  1100. createTile(e4) {
  1101. const t2 = this.tileInfoView.getTileBounds(u(), e4), i5 = () => this.layerView.view.labelManager.requestUpdate();
  1102. return new y(e4, t2[0], t2[3], this.featuresView.attributeView, i5);
  1103. }
  1104. disposeTile(e4) {
  1105. this.featuresView.removeChild(e4), e4.destroy(), this.layerView.view.labelManager.requestUpdate();
  1106. }
  1107. };
  1108. p = e([n("esri.views.2d.layers.features.tileRenderers.SymbolTileRenderer")], p);
  1109. var c6 = p;
  1110. export {
  1111. c6 as default
  1112. };
  1113. //# sourceMappingURL=SymbolTileRenderer-5NOPNHXV.js.map