ImageryLayerView2D-UETKHQEW.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. import {
  2. d as d3,
  3. y as y2
  4. } from "./chunk-TQFDJPI3.js";
  5. import {
  6. n as n2
  7. } from "./chunk-IBW3BDK4.js";
  8. import {
  9. ae
  10. } from "./chunk-OBOLLK7J.js";
  11. import "./chunk-CR67YDNV.js";
  12. import "./chunk-3XO4E4TL.js";
  13. import "./chunk-6G6XHVK2.js";
  14. import {
  15. s as s4
  16. } from "./chunk-FJ72FJKM.js";
  17. import "./chunk-3RTOMVBL.js";
  18. import "./chunk-YR7YKE3S.js";
  19. import "./chunk-GSORSXL5.js";
  20. import {
  21. S
  22. } from "./chunk-GONLHNIL.js";
  23. import {
  24. t as t2
  25. } from "./chunk-JFHGSU33.js";
  26. import {
  27. i
  28. } from "./chunk-TWB5CT7V.js";
  29. import {
  30. a,
  31. m as m2
  32. } from "./chunk-H3QCF24A.js";
  33. import {
  34. i as i2
  35. } from "./chunk-EAUVYZHD.js";
  36. import {
  37. f as f2,
  38. u
  39. } from "./chunk-MNZXIBJ7.js";
  40. import {
  41. s as s3
  42. } from "./chunk-YJKEIUMW.js";
  43. import "./chunk-JH3PLIM6.js";
  44. import "./chunk-UFOCENZS.js";
  45. import "./chunk-FCDUTNBY.js";
  46. import "./chunk-GZJP6H3U.js";
  47. import "./chunk-PS4B3D6M.js";
  48. import "./chunk-DO6JJUZG.js";
  49. import "./chunk-54X4RLMR.js";
  50. import "./chunk-MWIFVNKP.js";
  51. import "./chunk-MIWGTTJJ.js";
  52. import "./chunk-LL6JU3GU.js";
  53. import "./chunk-LSDW2622.js";
  54. import "./chunk-ZIWBDWEW.js";
  55. import "./chunk-IQNZZCQJ.js";
  56. import "./chunk-B2HJOMLZ.js";
  57. import "./chunk-II7RCTF3.js";
  58. import "./chunk-VS4BIQ2O.js";
  59. import "./chunk-HWIURR7X.js";
  60. import "./chunk-Q4LKAPDF.js";
  61. import "./chunk-TODU7HVH.js";
  62. import {
  63. I
  64. } from "./chunk-23ONSYIH.js";
  65. import "./chunk-P2L4QEOI.js";
  66. import "./chunk-3T4BXU2T.js";
  67. import "./chunk-SRMDO2KR.js";
  68. import "./chunk-PZKZIMMP.js";
  69. import "./chunk-YLVXZ2PS.js";
  70. import {
  71. F
  72. } from "./chunk-Y4GPJDDM.js";
  73. import {
  74. M as M2,
  75. m
  76. } from "./chunk-FUB4YNLX.js";
  77. import {
  78. f
  79. } from "./chunk-EE6TL7XD.js";
  80. import "./chunk-GDB2KX4Y.js";
  81. import "./chunk-546QCRS4.js";
  82. import "./chunk-QXZVBSBH.js";
  83. import "./chunk-T4GXZJ3D.js";
  84. import "./chunk-773XI6MQ.js";
  85. import "./chunk-ILP23N26.js";
  86. import "./chunk-5NM43FFO.js";
  87. import "./chunk-WFSV2B2I.js";
  88. import "./chunk-M5BTTMP6.js";
  89. import "./chunk-XZA4MVET.js";
  90. import "./chunk-J525NRN3.js";
  91. import "./chunk-MI7HWWFL.js";
  92. import "./chunk-Q34L5KZA.js";
  93. import "./chunk-ZHRMTKME.js";
  94. import "./chunk-ZVHTCCQC.js";
  95. import "./chunk-PCGDLSZ4.js";
  96. import "./chunk-CAYFEZCR.js";
  97. import "./chunk-MFFE4I2S.js";
  98. import "./chunk-XBH7TGC2.js";
  99. import "./chunk-K3NA3LQS.js";
  100. import "./chunk-LMCIAW5S.js";
  101. import "./chunk-OTS3UE5B.js";
  102. import "./chunk-6RAL4JPQ.js";
  103. import "./chunk-VAY3LZG7.js";
  104. import "./chunk-4E6K4P67.js";
  105. import {
  106. c
  107. } from "./chunk-LE3RIDC7.js";
  108. import "./chunk-TRK7CKWP.js";
  109. import "./chunk-LGW7TID4.js";
  110. import "./chunk-3OHML7FO.js";
  111. import "./chunk-G5AI6ZNE.js";
  112. import "./chunk-H6ETEALK.js";
  113. import "./chunk-FIYKFRB2.js";
  114. import "./chunk-P4UZNLD5.js";
  115. import "./chunk-FYNVVMWY.js";
  116. import "./chunk-Q52DVFYK.js";
  117. import "./chunk-HBMVUVZX.js";
  118. import "./chunk-CRGVDJI6.js";
  119. import "./chunk-QOV6ITMI.js";
  120. import "./chunk-DH2OBAUC.js";
  121. import "./chunk-TNLRDNTC.js";
  122. import "./chunk-6P6NA7JB.js";
  123. import "./chunk-S7R5EXHN.js";
  124. import "./chunk-QTOOFNRV.js";
  125. import "./chunk-6EU7GFUT.js";
  126. import "./chunk-HZJYXMI6.js";
  127. import "./chunk-UPD4MTCL.js";
  128. import "./chunk-GRBROWI6.js";
  129. import "./chunk-5NKYXKIA.js";
  130. import "./chunk-FTI5VP6T.js";
  131. import {
  132. g as g3
  133. } from "./chunk-RZFGRBD7.js";
  134. import "./chunk-PUSPZYFZ.js";
  135. import "./chunk-EN7YGJWG.js";
  136. import "./chunk-VBNMTM7L.js";
  137. import "./chunk-3D3QEPRE.js";
  138. import "./chunk-JFNNSBWL.js";
  139. import {
  140. b
  141. } from "./chunk-UD63WBG3.js";
  142. import "./chunk-LY74KTXV.js";
  143. import "./chunk-EWE6EXPY.js";
  144. import "./chunk-KUXNUNAI.js";
  145. import "./chunk-KMAHKQ2G.js";
  146. import "./chunk-522WBHUO.js";
  147. import "./chunk-WNCU6BFU.js";
  148. import "./chunk-PIGRDDRG.js";
  149. import "./chunk-BJHM4JNS.js";
  150. import "./chunk-F6A2QQ26.js";
  151. import "./chunk-XLV7RUSE.js";
  152. import "./chunk-NTUXR253.js";
  153. import "./chunk-C43UE3Z5.js";
  154. import "./chunk-H2KDMZTR.js";
  155. import {
  156. d as d2
  157. } from "./chunk-RMX2AZ4P.js";
  158. import "./chunk-NE3ESGA6.js";
  159. import {
  160. U,
  161. l,
  162. w
  163. } from "./chunk-YIS6BAC3.js";
  164. import "./chunk-7XXXCK2A.js";
  165. import "./chunk-7ZIDBK7B.js";
  166. import {
  167. g as g2
  168. } from "./chunk-PSV473TI.js";
  169. import "./chunk-FONIFA5N.js";
  170. import "./chunk-EG5OI4V4.js";
  171. import "./chunk-65BYCSII.js";
  172. import "./chunk-WZQZRKNH.js";
  173. import "./chunk-LRDX4TO7.js";
  174. import "./chunk-6A4U74YA.js";
  175. import "./chunk-RBZL6SRZ.js";
  176. import "./chunk-WJW5DUN6.js";
  177. import "./chunk-PJ7ZQ4VD.js";
  178. import "./chunk-WDLTDV2L.js";
  179. import "./chunk-TERAW6FT.js";
  180. import "./chunk-N2663GRX.js";
  181. import "./chunk-O4FY3ITT.js";
  182. import "./chunk-WEMIK25H.js";
  183. import "./chunk-7N4X6GF3.js";
  184. import "./chunk-JXW4QTJA.js";
  185. import "./chunk-UXF37FQ4.js";
  186. import "./chunk-ZOEK6QHJ.js";
  187. import "./chunk-XNLG7T2T.js";
  188. import "./chunk-IR4PV7VK.js";
  189. import "./chunk-2Z6LERTI.js";
  190. import "./chunk-OWVBLVP3.js";
  191. import "./chunk-AFZ7XSEW.js";
  192. import "./chunk-4NKD334K.js";
  193. import "./chunk-65K7LC56.js";
  194. import "./chunk-ATPLLI5W.js";
  195. import "./chunk-MXB2XLKV.js";
  196. import "./chunk-XH7RUGVZ.js";
  197. import "./chunk-TBBTRX4O.js";
  198. import "./chunk-YBSUITLL.js";
  199. import {
  200. j as j2
  201. } from "./chunk-ALDCDSPV.js";
  202. import "./chunk-DT6EAZQ5.js";
  203. import "./chunk-HNOZUNJ4.js";
  204. import {
  205. U as U2
  206. } from "./chunk-VNFRAYHO.js";
  207. import "./chunk-R5IG2D6H.js";
  208. import "./chunk-VBRY5KJM.js";
  209. import "./chunk-PDKDCAAD.js";
  210. import {
  211. M2 as M,
  212. j2 as j
  213. } from "./chunk-ECW2QABR.js";
  214. import "./chunk-GCDJLKH4.js";
  215. import "./chunk-MRJEICT6.js";
  216. import {
  217. d,
  218. e,
  219. n2 as n,
  220. y3 as y
  221. } from "./chunk-Y3WMVFTW.js";
  222. import "./chunk-SAS7RONY.js";
  223. import "./chunk-WSRBH7BF.js";
  224. import "./chunk-IHXECKQQ.js";
  225. import {
  226. g,
  227. x
  228. } from "./chunk-ULGDPLM2.js";
  229. import {
  230. s,
  231. s3 as s2
  232. } from "./chunk-EMJ4ZSM2.js";
  233. import "./chunk-IKP3YN53.js";
  234. import {
  235. e as e2,
  236. r,
  237. t
  238. } from "./chunk-GZT4BVFP.js";
  239. import "./chunk-A5ICIBVI.js";
  240. // node_modules/@arcgis/core/views/2d/layers/imagery/ImageryView2D.js
  241. var d4 = s.getLogger("esri.views.2d.layers.imagery.ImageryView2D");
  242. var u2 = class extends y {
  243. constructor() {
  244. super(...arguments), this.attached = false, this.container = new s3(), this.updateRequested = false, this.type = "imagery", this._bitmapView = new t2();
  245. }
  246. destroy() {
  247. this.attached && (this.detach(), this.attached = false), this.updateRequested = false;
  248. }
  249. get updating() {
  250. return !this.attached || this.isUpdating();
  251. }
  252. update(e3) {
  253. this.strategy.update(e3).catch((e4) => {
  254. g(e4) || d4.error(e4);
  255. });
  256. }
  257. hitTest(e3) {
  258. return new g3({ attributes: {}, geometry: e3.clone(), layer: this.layer });
  259. }
  260. attach() {
  261. this.container.addChild(this._bitmapView);
  262. const e3 = this.layer.version >= 10, t4 = this.layer.version >= 10.1 ? this.layer.imageMaxHeight : 2048, r2 = this.layer.version >= 10.1 ? this.layer.imageMaxWidth : 2048;
  263. this.strategy = new S({ container: this._bitmapView, imageNormalizationSupported: e3, imageMaxHeight: t4, imageMaxWidth: r2, fetchSource: this._fetchImage.bind(this), requestUpdate: () => this.requestUpdate() });
  264. }
  265. detach() {
  266. this.strategy.destroy(), this._bitmapView.removeAllChildren(), this.container.removeAllChildren(), this.updateRequested = false;
  267. }
  268. redraw() {
  269. this.strategy.updateExports((e3) => {
  270. e3.source instanceof HTMLImageElement ? e3.requestRender() : this.layer.applyRenderer({ pixelBlock: e3.source.pixelBlock }).then((t4) => {
  271. const r2 = e3.source;
  272. r2.pixelBlock = t4.pixelBlock, r2.filter = (e4) => this.layer.applyFilter(e4), this.container.requestRender();
  273. });
  274. });
  275. }
  276. requestUpdate() {
  277. this.updateRequested || (this.updateRequested = true, this.view.requestUpdate());
  278. }
  279. isUpdating() {
  280. return this.strategy.updating || this.updateRequested;
  281. }
  282. getPixelData() {
  283. if (this.updating)
  284. return null;
  285. const e3 = this.strategy.bitmaps;
  286. if (e3.length === 1 && e3[0].source)
  287. return { extent: e3[0].source.extent, pixelBlock: e3[0].source.originalPixelBlock };
  288. if (e3.length > 1) {
  289. const t4 = this.view.extent, r2 = e3.map((e4) => e4.source).filter((e4) => e4.extent && e4.extent.intersects(t4)).map((e4) => ({ extent: e4.extent, pixelBlock: e4.originalPixelBlock })), i3 = f(r2, t4);
  290. return r(i3) ? { extent: i3.extent, pixelBlock: i3.pixelBlock } : null;
  291. }
  292. return null;
  293. }
  294. _fetchImage(e3, t4, r2, i3) {
  295. return (i3 = i3 || {}).timeExtent = this.timeExtent, i3.requestAsImageElement = true, this.layer.fetchImage(e3, t4, r2, i3).then((e4) => e4.imageElement ? e4.imageElement : this.layer.applyRenderer(e4.pixelData, { signal: i3.signal }).then((t5) => {
  296. const r3 = new i(t5.pixelBlock, t5.extent.clone(), e4.pixelData.pixelBlock);
  297. return r3.filter = (e5) => this.layer.applyFilter(e5), r3;
  298. }));
  299. }
  300. };
  301. e([d()], u2.prototype, "attached", void 0), e([d()], u2.prototype, "container", void 0), e([d()], u2.prototype, "layer", void 0), e([d()], u2.prototype, "strategy", void 0), e([d()], u2.prototype, "timeExtent", void 0), e([d()], u2.prototype, "view", void 0), e([d()], u2.prototype, "updateRequested", void 0), e([d()], u2.prototype, "updating", null), e([d()], u2.prototype, "type", void 0), u2 = e([n("esri.views.2d.layers.imagery.ImageryView2D")], u2);
  302. var y3 = u2;
  303. // node_modules/@arcgis/core/views/2d/engine/imagery/RasterVFContainer.js
  304. var t3 = class extends a {
  305. constructor() {
  306. super(...arguments), this.symbolTypes = ["triangle"];
  307. }
  308. get requiresDedicatedFBO() {
  309. return false;
  310. }
  311. prepareRenderPasses(s5) {
  312. const t4 = s5.registerRenderPass({ name: "imagery (vf)", brushes: [m2], target: () => this.children, drawPhase: I.MAP });
  313. return [...super.prepareRenderPasses(s5), t4];
  314. }
  315. doRender(e3) {
  316. this.visible && e3.drawPhase === I.MAP && this.symbolTypes.forEach((r2) => {
  317. e3.renderPass = r2, super.doRender(e3);
  318. });
  319. }
  320. };
  321. // node_modules/@arcgis/core/views/2d/layers/imagery/ImageryVFStrategy.js
  322. var p = s.getLogger("esri.views.2d.layers.imagery.VectorFieldView2D");
  323. var m3 = class extends y {
  324. constructor(e3) {
  325. super(e3), this.update = x((e4, t4) => this._update(e4, t4).catch((e5) => {
  326. g(e5) || p.error(e5);
  327. }));
  328. }
  329. get updating() {
  330. return !!this._loading;
  331. }
  332. redraw(e3) {
  333. if (!this.container.children.length)
  334. return;
  335. const t4 = this.container.children[0];
  336. t4.symbolizerParameters = e3, t4.invalidateVAO(), this.container.symbolTypes = e3.style === "wind_speed" ? ["scalar", "triangle"] : e3.style === "simple_scalar" ? ["scalar"] : ["triangle"], this.container.requestRender();
  337. }
  338. async _update(e3, t4, r2) {
  339. if (!e3.stationary)
  340. return;
  341. const { extent: i3, spatialReference: s5 } = e3.state, o = new M({ xmin: i3.xmin, ymin: i3.ymin, xmax: i3.xmax, ymax: i3.ymax, spatialReference: s5 }), [a2, n3] = e3.state.size;
  342. this._loading = this.fetchPixels(o, a2, n3, r2);
  343. const c2 = await this._loading;
  344. this._addToDisplay(c2, t4, e3.state), this._loading = null;
  345. }
  346. _addToDisplay(e3, t4, r2) {
  347. if (t(e3.pixelBlock))
  348. return this.container.children.forEach((e4) => e4.destroy()), void this.container.removeAllChildren();
  349. const { extent: s5, pixelBlock: o } = e3, a2 = new y2(o);
  350. a2.offset = [0, 0], a2.symbolizerParameters = t4, a2.rawPixelData = e3, a2.invalidateVAO(), a2.x = s5.xmin, a2.y = s5.ymax, a2.pixelRatio = r2.pixelRatio, a2.rotation = r2.rotation, a2.resolution = r2.resolution, a2.width = o.width * t4.symbolTileSize, a2.height = o.height * t4.symbolTileSize, this.container.children.forEach((e4) => e4.destroy()), this.container.removeAllChildren(), this.container.symbolTypes = t4.style === "wind_speed" ? ["scalar", "triangle"] : t4.style === "simple_scalar" ? ["scalar"] : ["triangle"], this.container.addChild(a2);
  351. }
  352. };
  353. e([d()], m3.prototype, "fetchPixels", void 0), e([d()], m3.prototype, "container", void 0), e([d()], m3.prototype, "_loading", void 0), e([d()], m3.prototype, "updating", null), m3 = e([n("esri.views.2d.layers.imagery.ImageryVFStrategy")], m3);
  354. var d5 = m3;
  355. // node_modules/@arcgis/core/views/2d/layers/imagery/VectorFieldView2D.js
  356. var f3 = class extends d2 {
  357. constructor() {
  358. super(...arguments), this.attached = false, this.container = new t3(), this.type = "imageryVF", this._dataParameters = { exportParametersVersion: 0, bbox: "", symbolTileSize: 0, time: "" }, this._fetchpixels = async (e3, t4, r2, i3) => {
  359. const n3 = await this._projectFullExtentPromise, { symbolTileSize: l2 } = this.layer.renderer, { extent: c2, width: m5, height: p2 } = M2(e3, t4, r2, l2, n3);
  360. if (r(n3) && !n3.intersects(e3))
  361. return { extent: c2, pixelBlock: null };
  362. const h = { bbox: `${c2.xmin}, ${c2.ymin}, ${c2.xmax}, ${c2.ymax}`, exportParametersVersion: this.layer.exportImageServiceParameters.version, symbolTileSize: l2, time: JSON.stringify(this.timeExtent || "") };
  363. if (this._canReuseVectorFieldData(h)) {
  364. const e4 = this.getPixelData();
  365. if (r(e4)) {
  366. if (`${e4.extent.xmin}, ${e4.extent.ymin}, ${e4.extent.xmax}, ${e4.extent.ymax}` === h.bbox)
  367. return e4;
  368. }
  369. }
  370. const { pixelData: u3 } = await this.layer.fetchImage(c2, m5, p2, { timeExtent: this.timeExtent, requestAsImageElement: false, signal: i3 });
  371. if (this._dataParameters = h, t(u3.pixelBlock))
  372. return { extent: c2, pixelBlock: null };
  373. return { extent: c2, pixelBlock: this.layer.rasterInfo.dataType === "vector-uv" ? e2(m(u3.pixelBlock, "vector-uv")) : u3.pixelBlock };
  374. };
  375. }
  376. get updating() {
  377. return !this.attached || this._strategy.updating;
  378. }
  379. attach() {
  380. this._projectFullExtentPromise = this._getProjectedFullExtent(this.view.spatialReference), this._strategy = new d5({ container: this.container, fetchPixels: this._fetchpixels }), this.handles.add(l(() => this.layer.renderer, (e3) => this._updateSymbolizerParams(e3), w), "vector-field-view-update");
  381. }
  382. detach() {
  383. this._strategy.destroy(), this.container.children.forEach((e3) => e3.destroy()), this.container.removeAllChildren(), this.handles.remove("vector-field-view-update"), this._strategy = this.container = this._projectFullExtentPromise = null;
  384. }
  385. getPixelData() {
  386. if (this.updating || !this.container.children.length)
  387. return null;
  388. const { extent: e3, pixelBlock: t4 } = this.container.children[0].rawPixelData;
  389. return { extent: e3, pixelBlock: t4 };
  390. }
  391. hitTest(e3) {
  392. return new g3({ attributes: {}, geometry: e3.clone(), layer: this.layer });
  393. }
  394. update(e3) {
  395. this._strategy.update(e3, this._symbolizerParams);
  396. }
  397. redraw() {
  398. this._updateSymbolizerParams(this.layer.renderer), this._strategy.redraw(this._symbolizerParams);
  399. }
  400. _canReuseVectorFieldData(e3) {
  401. const t4 = this._dataParameters.exportParametersVersion === e3.exportParametersVersion, r2 = this._dataParameters.time === e3.time, i3 = this._dataParameters.symbolTileSize === e3.symbolTileSize, s5 = this._dataParameters.bbox === e3.bbox;
  402. return t4 && r2 && i3 && s5;
  403. }
  404. async _getProjectedFullExtent(e3) {
  405. try {
  406. return await F(this.layer.fullExtent, e3);
  407. } catch (t4) {
  408. try {
  409. const t5 = (await U2(this.layer.url, { query: { option: "footprints", outSR: e3.wkid || JSON.stringify(e3.toJSON()), f: "json" } })).data.featureCollection.layers[0].layerDefinition.extent;
  410. return t5 ? M.fromJSON(t5) : null;
  411. } catch {
  412. return null;
  413. }
  414. }
  415. }
  416. _updateSymbolizerParams(e3) {
  417. e3.type === "vector-field" && (this._symbolizerParams = this.layer.symbolizer.generateWebGLParameters({ pixelBlock: null }));
  418. }
  419. };
  420. e([d()], f3.prototype, "attached", void 0), e([d()], f3.prototype, "container", void 0), e([d()], f3.prototype, "layer", void 0), e([d()], f3.prototype, "timeExtent", void 0), e([d()], f3.prototype, "type", void 0), e([d()], f3.prototype, "view", void 0), e([d()], f3.prototype, "updating", null), f3 = e([n("esri.views.2d.layers.imagery.VectorFieldView2D")], f3);
  421. var g4 = f3;
  422. // node_modules/@arcgis/core/views/layers/ImageryLayerView.js
  423. var m4 = (m5) => {
  424. let c2 = class extends m5 {
  425. constructor() {
  426. super(...arguments), this.view = null;
  427. }
  428. async fetchPopupFeatures(e3, s5) {
  429. const { layer: p2 } = this;
  430. if (!e3)
  431. throw new s2("imagerylayerview:fetchPopupFeatures", "Nothing to fetch without area", { layer: p2 });
  432. const { popupEnabled: a2 } = p2, m6 = s4(p2, s5);
  433. if (!a2 || t(m6))
  434. throw new s2("imagerylayerview:fetchPopupFeatures", "Missing required popupTemplate or popupEnabled", { popupEnabled: a2, popupTemplate: m6 });
  435. const c3 = await m6.getRequiredFields(), l2 = new b();
  436. l2.timeExtent = this.timeExtent, l2.geometry = e3, l2.outFields = c3, l2.outSpatialReference = e3.spatialReference;
  437. const y4 = this.view.resolution, h = this.view.type === "2d" ? new j(y4, y4, this.view.spatialReference) : new j(0.5 * y4, 0.5 * y4, this.view.spatialReference), { returnTopmostRaster: w2, showNoDataRecords: d6 } = m6.layerOptions || { returnTopmostRaster: true, showNoDataRecords: false }, f4 = { returnDomainValues: true, returnTopmostRaster: w2, pixelSize: h, showNoDataRecords: d6, signal: r(s5) ? s5.signal : null };
  438. return p2.queryVisibleRasters(l2, f4).then((e4) => e4);
  439. }
  440. canResume() {
  441. return !!super.canResume() && !this.timeExtent?.isEmpty;
  442. }
  443. };
  444. return e([d()], c2.prototype, "layer", void 0), e([d()], c2.prototype, "suspended", void 0), e([d(g2)], c2.prototype, "timeExtent", void 0), e([d()], c2.prototype, "view", void 0), c2 = e([n("esri.views.layers.ImageryLayerView")], c2), c2;
  445. };
  446. // node_modules/@arcgis/core/views/2d/layers/ImageryLayerView2D.js
  447. var g5 = class extends m4(i2(f2(u))) {
  448. constructor() {
  449. super(...arguments), this._exportImageVersion = -1, this._highlightGraphics = new c(), this.subview = null;
  450. }
  451. get pixelData() {
  452. return this.updating ? null : "getPixelData" in this.subview ? this.subview.getPixelData() : null;
  453. }
  454. get updating() {
  455. return !!(!this.subview || "updating" in this.subview && this.subview.updating);
  456. }
  457. async hitTest(e3, i3) {
  458. return this.subview ? [{ type: "graphic", graphic: this.subview.hitTest(e3), layer: this.layer, mapPoint: e3 }] : null;
  459. }
  460. update(e3) {
  461. this.subview?.update(e3);
  462. }
  463. attach() {
  464. this.layer.increaseRasterJobHandlerUsage(), this._setSubView(), this.view && (this._highlightView = new ae({ view: this.view, graphics: this._highlightGraphics, requestUpdateCallback: () => this.requestUpdate(), container: new n2(this.view.featuresTilingScheme) }), this.container.addChild(this._highlightView.container)), this.handles.add([l(() => this.layer.blendMode ?? "normal", (e3) => this.subview.container.blendMode = e3, w), l(() => this.layer.effect ?? null, (e3) => this.subview.container.effect = e3, w), l(() => this.layer.exportImageServiceParameters.version, (e3) => {
  465. e3 && this._exportImageVersion !== e3 && (this._exportImageVersion = e3, this.requestUpdate());
  466. }, U), l(() => this.timeExtent, (e3) => {
  467. this.subview.timeExtent = e3, "redraw" in this.subview ? this.requestUpdate() : this.subview.redrawOrRefetch();
  468. }, U), this.layer.on("redraw", () => {
  469. "redraw" in this.subview ? this.subview.redraw() : this.subview.redrawOrRefetch();
  470. }), l(() => this.layer.renderer, () => this._setSubView())], "imagerylayerview-update");
  471. }
  472. detach() {
  473. this.layer.decreaseRasterJobHandlerUsage(), this.container.removeAllChildren(), this._detachSubview(this.subview), this.subview?.destroy(), this.handles.remove("imagerylayerview-update"), this.subview = null, this._highlightView?.destroy(), this._exportImageVersion = -1;
  474. }
  475. moveStart() {
  476. }
  477. viewChange() {
  478. }
  479. moveEnd() {
  480. this.requestUpdate();
  481. }
  482. highlight(e3, r2) {
  483. if (!((Array.isArray(e3) ? e3[0] : j2.isCollection(e3) ? e3.getItemAt(0) : e3) instanceof g3))
  484. return { remove: () => {
  485. } };
  486. let s5 = [];
  487. return Array.isArray(e3) || j2.isCollection(e3) ? s5 = e3.map((e4) => e4.clone()) : e3 instanceof g3 && (s5 = [e3.clone()]), this._highlightGraphics.addMany(s5), { remove: () => {
  488. this._highlightGraphics.removeMany(s5);
  489. } };
  490. }
  491. async doRefresh() {
  492. this.requestUpdate();
  493. }
  494. isUpdating() {
  495. return !this.subview || this.subview.updating;
  496. }
  497. _setSubView() {
  498. if (!this.view)
  499. return;
  500. const e3 = this.layer.renderer?.type;
  501. let i3 = "imagery";
  502. if (e3 === "vector-field" ? i3 = "imageryVF" : e3 === "flow" && (i3 = "flow"), this.subview) {
  503. if (this.subview.type === i3)
  504. return this._attachSubview(this.subview), void (this.subview.type === "flow" && this.subview.redrawOrRefetch());
  505. this._detachSubview(this.subview), this.subview?.destroy();
  506. }
  507. this.subview = i3 === "imagery" ? new y3({ layer: this.layer, view: this.view, timeExtent: this.timeExtent }) : i3 === "imageryVF" ? new g4({ layer: this.layer, view: this.view, timeExtent: this.timeExtent }) : new d3({ layer: this.layer, layerView: this }), this._attachSubview(this.subview), this.requestUpdate();
  508. }
  509. _attachSubview(e3) {
  510. e3 && !e3.attached && (e3.attach(), e3.attached = true, this.container.addChildAt(e3.container, 0), e3.container.blendMode = this.layer.blendMode, e3.container.effect = this.layer.effect);
  511. }
  512. _detachSubview(e3) {
  513. e3?.attached && (this.container.removeChild(e3.container), e3.detach(), e3.attached = false);
  514. }
  515. };
  516. e([d()], g5.prototype, "pixelData", null), e([d({ readOnly: true })], g5.prototype, "updating", null), e([d()], g5.prototype, "subview", void 0), g5 = e([n("esri.views.2d.layers.ImageryLayerView2D")], g5);
  517. var b2 = g5;
  518. export {
  519. b2 as default
  520. };
  521. //# sourceMappingURL=ImageryLayerView2D-UETKHQEW.js.map