MapImageLayerView2D-XGLLAYKY.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. import {
  2. n as n4
  3. } from "./chunk-IBW3BDK4.js";
  4. import {
  5. ae
  6. } from "./chunk-OBOLLK7J.js";
  7. import "./chunk-CR67YDNV.js";
  8. import {
  9. a as a3,
  10. s as s3
  11. } from "./chunk-RZPC4VQ3.js";
  12. import "./chunk-3XO4E4TL.js";
  13. import "./chunk-6G6XHVK2.js";
  14. import {
  15. d as d3,
  16. s as s4
  17. } from "./chunk-FJ72FJKM.js";
  18. import "./chunk-3RTOMVBL.js";
  19. import "./chunk-YR7YKE3S.js";
  20. import "./chunk-GSORSXL5.js";
  21. import {
  22. S
  23. } from "./chunk-GONLHNIL.js";
  24. import {
  25. t as t4
  26. } from "./chunk-JFHGSU33.js";
  27. import "./chunk-TWB5CT7V.js";
  28. import "./chunk-H3QCF24A.js";
  29. import {
  30. i as i4
  31. } from "./chunk-EAUVYZHD.js";
  32. import {
  33. f,
  34. u
  35. } from "./chunk-MNZXIBJ7.js";
  36. import "./chunk-YJKEIUMW.js";
  37. import "./chunk-JH3PLIM6.js";
  38. import "./chunk-UFOCENZS.js";
  39. import "./chunk-FCDUTNBY.js";
  40. import "./chunk-GZJP6H3U.js";
  41. import "./chunk-PS4B3D6M.js";
  42. import "./chunk-DO6JJUZG.js";
  43. import "./chunk-54X4RLMR.js";
  44. import "./chunk-MWIFVNKP.js";
  45. import "./chunk-MIWGTTJJ.js";
  46. import "./chunk-LL6JU3GU.js";
  47. import "./chunk-LSDW2622.js";
  48. import "./chunk-ZIWBDWEW.js";
  49. import "./chunk-IQNZZCQJ.js";
  50. import "./chunk-B2HJOMLZ.js";
  51. import "./chunk-II7RCTF3.js";
  52. import "./chunk-VS4BIQ2O.js";
  53. import "./chunk-HWIURR7X.js";
  54. import "./chunk-Q4LKAPDF.js";
  55. import "./chunk-TODU7HVH.js";
  56. import "./chunk-23ONSYIH.js";
  57. import "./chunk-P2L4QEOI.js";
  58. import "./chunk-3T4BXU2T.js";
  59. import "./chunk-SRMDO2KR.js";
  60. import "./chunk-PZKZIMMP.js";
  61. import "./chunk-YLVXZ2PS.js";
  62. import "./chunk-EE6TL7XD.js";
  63. import "./chunk-GDB2KX4Y.js";
  64. import "./chunk-546QCRS4.js";
  65. import "./chunk-QXZVBSBH.js";
  66. import "./chunk-T4GXZJ3D.js";
  67. import "./chunk-773XI6MQ.js";
  68. import "./chunk-ILP23N26.js";
  69. import "./chunk-5NM43FFO.js";
  70. import "./chunk-WFSV2B2I.js";
  71. import "./chunk-M5BTTMP6.js";
  72. import "./chunk-XZA4MVET.js";
  73. import "./chunk-J525NRN3.js";
  74. import "./chunk-MI7HWWFL.js";
  75. import {
  76. c
  77. } from "./chunk-TD4DLRQ7.js";
  78. import {
  79. n as n3
  80. } from "./chunk-AMQJEM7V.js";
  81. import {
  82. i as i2,
  83. r as r3
  84. } from "./chunk-56H3JM63.js";
  85. import "./chunk-Q34L5KZA.js";
  86. import "./chunk-ZHRMTKME.js";
  87. import "./chunk-ZVHTCCQC.js";
  88. import "./chunk-PCGDLSZ4.js";
  89. import "./chunk-CAYFEZCR.js";
  90. import "./chunk-MFFE4I2S.js";
  91. import "./chunk-XBH7TGC2.js";
  92. import "./chunk-K3NA3LQS.js";
  93. import "./chunk-LMCIAW5S.js";
  94. import "./chunk-OTS3UE5B.js";
  95. import "./chunk-6RAL4JPQ.js";
  96. import "./chunk-VAY3LZG7.js";
  97. import "./chunk-4E6K4P67.js";
  98. import {
  99. c as c2
  100. } from "./chunk-LE3RIDC7.js";
  101. import "./chunk-TRK7CKWP.js";
  102. import "./chunk-LGW7TID4.js";
  103. import {
  104. e as e2,
  105. n as n2,
  106. o as o2
  107. } from "./chunk-YASLQAXE.js";
  108. import "./chunk-3OHML7FO.js";
  109. import "./chunk-G5AI6ZNE.js";
  110. import "./chunk-H6ETEALK.js";
  111. import "./chunk-FIYKFRB2.js";
  112. import {
  113. L
  114. } from "./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 {
  124. i as i3
  125. } from "./chunk-MD4XYAEQ.js";
  126. import {
  127. t as t3
  128. } from "./chunk-S7R5EXHN.js";
  129. import "./chunk-QTOOFNRV.js";
  130. import "./chunk-6EU7GFUT.js";
  131. import "./chunk-HZJYXMI6.js";
  132. import "./chunk-UPD4MTCL.js";
  133. import "./chunk-GRBROWI6.js";
  134. import "./chunk-5NKYXKIA.js";
  135. import "./chunk-FTI5VP6T.js";
  136. import {
  137. g as g3
  138. } from "./chunk-RZFGRBD7.js";
  139. import "./chunk-PUSPZYFZ.js";
  140. import "./chunk-EN7YGJWG.js";
  141. import "./chunk-VBNMTM7L.js";
  142. import "./chunk-3D3QEPRE.js";
  143. import "./chunk-JFNNSBWL.js";
  144. import "./chunk-LY74KTXV.js";
  145. import "./chunk-EWE6EXPY.js";
  146. import "./chunk-KUXNUNAI.js";
  147. import "./chunk-KMAHKQ2G.js";
  148. import "./chunk-522WBHUO.js";
  149. import "./chunk-WNCU6BFU.js";
  150. import "./chunk-PIGRDDRG.js";
  151. import "./chunk-XLV7RUSE.js";
  152. import "./chunk-NTUXR253.js";
  153. import "./chunk-C43UE3Z5.js";
  154. import "./chunk-H2KDMZTR.js";
  155. import "./chunk-RMX2AZ4P.js";
  156. import "./chunk-NE3ESGA6.js";
  157. import {
  158. l as l2
  159. } from "./chunk-YIS6BAC3.js";
  160. import "./chunk-7XXXCK2A.js";
  161. import "./chunk-7ZIDBK7B.js";
  162. import {
  163. g as g2
  164. } from "./chunk-PSV473TI.js";
  165. import "./chunk-FONIFA5N.js";
  166. import {
  167. y
  168. } from "./chunk-EG5OI4V4.js";
  169. import "./chunk-65BYCSII.js";
  170. import "./chunk-WZQZRKNH.js";
  171. import {
  172. a as a2
  173. } from "./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 {
  186. i
  187. } from "./chunk-UXF37FQ4.js";
  188. import {
  189. t as t2
  190. } from "./chunk-ZOEK6QHJ.js";
  191. import "./chunk-XNLG7T2T.js";
  192. import "./chunk-IR4PV7VK.js";
  193. import {
  194. d as d2,
  195. v as v2
  196. } from "./chunk-2Z6LERTI.js";
  197. import "./chunk-OWVBLVP3.js";
  198. import "./chunk-AFZ7XSEW.js";
  199. import "./chunk-4NKD334K.js";
  200. import "./chunk-65K7LC56.js";
  201. import "./chunk-ATPLLI5W.js";
  202. import "./chunk-MXB2XLKV.js";
  203. import "./chunk-XH7RUGVZ.js";
  204. import "./chunk-TBBTRX4O.js";
  205. import "./chunk-YBSUITLL.js";
  206. import "./chunk-ALDCDSPV.js";
  207. import "./chunk-DT6EAZQ5.js";
  208. import "./chunk-HNOZUNJ4.js";
  209. import {
  210. U
  211. } from "./chunk-VNFRAYHO.js";
  212. import "./chunk-R5IG2D6H.js";
  213. import "./chunk-VBRY5KJM.js";
  214. import "./chunk-PDKDCAAD.js";
  215. import {
  216. M2 as M,
  217. o
  218. } from "./chunk-ECW2QABR.js";
  219. import "./chunk-GCDJLKH4.js";
  220. import {
  221. k2 as k,
  222. r as r2
  223. } from "./chunk-MRJEICT6.js";
  224. import {
  225. d,
  226. e,
  227. l3 as l,
  228. n2 as n
  229. } from "./chunk-Y3WMVFTW.js";
  230. import "./chunk-SAS7RONY.js";
  231. import "./chunk-WSRBH7BF.js";
  232. import {
  233. v
  234. } from "./chunk-IHXECKQQ.js";
  235. import {
  236. E,
  237. g
  238. } from "./chunk-ULGDPLM2.js";
  239. import {
  240. s,
  241. s3 as s2
  242. } from "./chunk-EMJ4ZSM2.js";
  243. import "./chunk-IKP3YN53.js";
  244. import {
  245. a,
  246. r,
  247. t
  248. } from "./chunk-GZT4BVFP.js";
  249. import "./chunk-A5ICIBVI.js";
  250. // node_modules/@arcgis/core/rest/operations/identify.js
  251. var o3 = (e3) => e3.spatialReference.wkid || JSON.stringify(e3.spatialReference);
  252. function l3(r4, i6) {
  253. const { dpi: n5, gdbVersion: s5, geometry: l4, geometryPrecision: f4, height: p2, layerOption: m3, mapExtent: y4, maxAllowableOffset: c3, returnFieldName: u4, returnGeometry: d4, returnUnformattedValues: g4, returnZ: x2, spatialReference: b, timeExtent: h, tolerance: E2, width: O } = r4.toJSON(), { dynamicLayers: S2, layerDefs: j, layerIds: N } = a4(r4), J = i6 && r(i6.geometry) ? i6.geometry : null, R = { geometryPrecision: f4, maxAllowableOffset: c3, returnFieldName: u4, returnGeometry: d4, returnUnformattedValues: g4, returnZ: x2, tolerance: E2 }, $ = J && J.toJSON() || l4;
  254. if (R.imageDisplay = `${O},${p2},${n5}`, s5 && (R.gdbVersion = s5), $ && (delete $.spatialReference, R.geometry = JSON.stringify($), R.geometryType = v2($)), b ? R.sr = b.wkid || JSON.stringify(b) : $ && $.spatialReference ? R.sr = o3($) : y4 && y4.spatialReference && (R.sr = o3(y4)), R.time = h ? [h.start, h.end].join(",") : null, y4) {
  255. const { xmin: e3, ymin: r5, xmax: t5, ymax: i7 } = y4;
  256. R.mapExtent = `${e3},${r5},${t5},${i7}`;
  257. }
  258. return j && (R.layerDefs = j), S2 && !j && (R.dynamicLayers = S2), R.layers = m3 === "popup" ? "visible" : m3, N && !S2 && (R.layers += `:${N.join(",")}`), R;
  259. }
  260. function a4(r4) {
  261. const { mapExtent: t5, floors: o4, width: l4, sublayers: a7, layerIds: p2, layerOption: m3, gdbVersion: y4 } = r4, c3 = a7?.find((e3) => e3.layer != null)?.layer?.serviceSublayers, u4 = m3 === "popup", d4 = {}, g4 = r3({ extent: t5, width: l4, spatialReference: t5?.spatialReference }), x2 = [], b = (e3) => {
  262. const r5 = g4 === 0, t6 = e3.minScale === 0 || g4 <= e3.minScale, i6 = e3.maxScale === 0 || g4 >= e3.maxScale;
  263. if (e3.visible && (r5 || t6 && i6))
  264. if (e3.sublayers)
  265. e3.sublayers.forEach(b);
  266. else {
  267. if (p2?.includes(e3.id) === false || u4 && (!e3.popupTemplate || !e3.popupEnabled))
  268. return;
  269. x2.unshift(e3);
  270. }
  271. };
  272. if (a7?.forEach(b), a7 && !x2.length)
  273. d4.layerIds = [];
  274. else {
  275. const r5 = i3(x2, c3, y4), t6 = x2.map((e3) => {
  276. const r6 = n3(o4, e3);
  277. return e3.toExportImageJSON(r6);
  278. });
  279. if (r5)
  280. d4.dynamicLayers = JSON.stringify(t6);
  281. else {
  282. if (a7) {
  283. let e3 = x2.map(({ id: e4 }) => e4);
  284. p2 && (e3 = e3.filter((e4) => p2.includes(e4))), d4.layerIds = e3;
  285. } else
  286. p2?.length && (d4.layerIds = p2);
  287. const r6 = f2(o4, x2);
  288. if (r(r6) && r6.length) {
  289. const e3 = {};
  290. for (const t7 of r6)
  291. t7.definitionExpression && (e3[t7.id] = t7.definitionExpression);
  292. Object.keys(e3).length && (d4.layerDefs = JSON.stringify(e3));
  293. }
  294. }
  295. }
  296. return d4;
  297. }
  298. function f2(e3, t5) {
  299. const i6 = !!e3?.length, s5 = t5.filter((e4) => e4.definitionExpression != null || i6 && e4.floorInfo != null);
  300. return s5.length ? s5.map((t6) => {
  301. const i7 = n3(e3, t6), s6 = t3(i7, t6.definitionExpression);
  302. return { id: t6.id, definitionExpression: s6 };
  303. }) : null;
  304. }
  305. // node_modules/@arcgis/core/rest/support/IdentifyParameters.js
  306. var m;
  307. var a5 = m = class extends l {
  308. constructor(t5) {
  309. super(t5), this.dpi = 96, this.floors = null, this.gdbVersion = null, this.geometry = null, this.geometryPrecision = null, this.height = 400, this.layerIds = null, this.layerOption = "top", this.mapExtent = null, this.maxAllowableOffset = null, this.returnFieldName = true, this.returnGeometry = false, this.returnM = false, this.returnUnformattedValues = true, this.returnZ = false, this.spatialReference = null, this.sublayers = null, this.timeExtent = null, this.tolerance = null, this.width = 400;
  310. }
  311. static from(t5) {
  312. return v(m, t5);
  313. }
  314. };
  315. e([d({ type: Number, json: { write: true } })], a5.prototype, "dpi", void 0), e([d()], a5.prototype, "floors", void 0), e([d({ type: String, json: { write: true } })], a5.prototype, "gdbVersion", void 0), e([d({ types: i, json: { read: d2, write: true } })], a5.prototype, "geometry", void 0), e([d({ type: Number, json: { write: true } })], a5.prototype, "geometryPrecision", void 0), e([d({ type: Number, json: { write: true } })], a5.prototype, "height", void 0), e([d({ type: [Number], json: { write: true } })], a5.prototype, "layerIds", void 0), e([d({ type: ["top", "visible", "all", "popup"], json: { write: true } })], a5.prototype, "layerOption", void 0), e([d({ type: M, json: { write: true } })], a5.prototype, "mapExtent", void 0), e([d({ type: Number, json: { write: true } })], a5.prototype, "maxAllowableOffset", void 0), e([d({ type: Boolean, json: { write: true } })], a5.prototype, "returnFieldName", void 0), e([d({ type: Boolean, json: { write: true } })], a5.prototype, "returnGeometry", void 0), e([d({ type: Boolean, json: { write: true } })], a5.prototype, "returnM", void 0), e([d({ type: Boolean, json: { write: true } })], a5.prototype, "returnUnformattedValues", void 0), e([d({ type: Boolean, json: { write: true } })], a5.prototype, "returnZ", void 0), e([d({ type: k, json: { write: true } })], a5.prototype, "spatialReference", void 0), e([d()], a5.prototype, "sublayers", void 0), e([d({ type: y, json: { write: true } })], a5.prototype, "timeExtent", void 0), e([d({ type: Number, json: { write: true } })], a5.prototype, "tolerance", void 0), e([d({ type: Number, json: { write: true } })], a5.prototype, "width", void 0), a5 = m = e([n("esri.rest.support.IdentifyParameters")], a5);
  316. var u2 = a5;
  317. // node_modules/@arcgis/core/rest/support/IdentifyResult.js
  318. var u3 = class extends l {
  319. constructor(r4) {
  320. super(r4), this.displayFieldName = null, this.feature = null, this.layerId = null, this.layerName = null;
  321. }
  322. readFeature(r4, t5) {
  323. return g3.fromJSON({ attributes: { ...t5.attributes }, geometry: { ...t5.geometry } });
  324. }
  325. writeFeature(r4, e3) {
  326. if (!r4)
  327. return;
  328. const { attributes: t5, geometry: s5 } = r4;
  329. t5 && (e3.attributes = { ...t5 }), r(s5) && (e3.geometry = s5.toJSON(), e3.geometryType = t2.toJSON(s5.type));
  330. }
  331. };
  332. e([d({ type: String, json: { write: true } })], u3.prototype, "displayFieldName", void 0), e([d({ type: g3 })], u3.prototype, "feature", void 0), e([o("feature", ["attributes", "geometry"])], u3.prototype, "readFeature", null), e([r2("feature")], u3.prototype, "writeFeature", null), e([d({ type: Number, json: { write: true } })], u3.prototype, "layerId", void 0), e([d({ type: String, json: { write: true } })], u3.prototype, "layerName", void 0), u3 = e([n("esri.rest.support.IdentifyResult")], u3);
  333. var y2 = u3;
  334. // node_modules/@arcgis/core/rest/identify.js
  335. async function i5(u4, f4, i6) {
  336. const c3 = (f4 = a6(f4)).geometry ? [f4.geometry] : [], l4 = n2(u4);
  337. return l4.path += "/identify", L(c3).then((r4) => {
  338. const e3 = l3(f4, { geometry: r4 && r4[0] }), u5 = o2({ ...l4.query, f: "json", ...e3 }), a7 = e2(u5, i6);
  339. return U(l4.path, a7).then(m2).then((t5) => p(t5, f4.sublayers));
  340. });
  341. }
  342. function m2(t5) {
  343. const r4 = t5.data;
  344. r4.results = r4.results || [];
  345. const e3 = { results: [] };
  346. return e3.results = r4.results.map((t6) => y2.fromJSON(t6)), e3;
  347. }
  348. function a6(t5) {
  349. return t5 = u2.from(t5);
  350. }
  351. function p(t5, r4) {
  352. if (!r4?.length)
  353. return t5;
  354. const e3 = new Map();
  355. function s5(t6) {
  356. e3.set(t6.id, t6), t6.sublayers && t6.sublayers.forEach(s5);
  357. }
  358. r4.forEach(s5);
  359. for (const o4 of t5.results)
  360. o4.feature.sourceLayer = e3.get(o4.layerId);
  361. return t5;
  362. }
  363. // node_modules/@arcgis/core/views/layers/MapImageLayerView.js
  364. var x = (x2) => {
  365. let g4 = class extends x2 {
  366. initialize() {
  367. this.exportImageParameters = new c({ layer: this.layer });
  368. }
  369. destroy() {
  370. this.exportImageParameters.destroy(), this.exportImageParameters = null;
  371. }
  372. get exportImageVersion() {
  373. return this.exportImageParameters?.commitProperty("version"), this.commitProperty("timeExtent"), (this._get("exportImageVersion") || 0) + 1;
  374. }
  375. async fetchPopupFeatures(e3, t5) {
  376. const { layer: s5 } = this;
  377. if (!e3)
  378. throw new s2("mapimagelayer:fetchPopupFeatures", "Nothing to fetch without area", { layer: s5 });
  379. const a7 = this.layer.capabilities?.operations?.supportsQuery ?? true;
  380. if (!((this.layer.capabilities?.operations?.supportsIdentify ?? true) && this.layer.version >= 10.5) && !a7)
  381. throw new s2("mapimagelayer:fetchPopupFeatures-not-supported", "query operation is disabled for this service", { layer: s5 });
  382. return a7 ? this._fetchPopupFeaturesUsingQueries(e3, t5) : this._fetchPopupFeaturesUsingIdentify(e3, t5);
  383. }
  384. canResume() {
  385. return !!super.canResume() && !this.timeExtent?.isEmpty;
  386. }
  387. async _fetchPopupFeaturesUsingIdentify(e3, r4) {
  388. const t5 = await this._createIdentifyParameters(e3, r4);
  389. if (t(t5))
  390. return [];
  391. const { results: a7 } = await i5(this.layer.parsedUrl, t5);
  392. return a7.map((e4) => e4.feature);
  393. }
  394. async _createIdentifyParameters(e3, r4) {
  395. const { floors: s5, spatialReference: o4, scale: i6 } = this.view, p2 = r(r4) ? r4.event : null, m3 = await this._collectPopupProviders(this.layer.sublayers, i6, r4);
  396. if (!m3.length)
  397. return null;
  398. await Promise.all(m3.map(({ sublayer: e4 }) => e4.load().catch(() => {
  399. })));
  400. const c3 = Math.min(a("mapimagelayer-popup-identify-max-tolerance"), this.layer.allSublayers.reduce((e4, r5) => r5.renderer ? s3({ renderer: r5.renderer, event: p2 }) : e4, 2)), u4 = this.createFetchPopupFeaturesQueryGeometry(e3, c3), h = i2(i6, o4), d4 = Math.round(u4.width / h), w = new M({ xmin: u4.center.x - h * d4, ymin: u4.center.y - h * d4, xmax: u4.center.x + h * d4, ymax: u4.center.y + h * d4, spatialReference: u4.spatialReference }), P = this.layer.capabilities?.operations?.supportsQuery === false || await new Promise((e4) => {
  401. let r5 = false;
  402. Promise.all(m3.map(async ({ popupTemplate: t5 }) => {
  403. if (t5) {
  404. const s6 = await this._loadArcadeModules(t5);
  405. if (r5)
  406. return;
  407. const a7 = s6?.arcadeUtils.hasGeometryOperations(t5);
  408. a7 && (r5 = true, e4(true));
  409. }
  410. })).finally(() => e4(false));
  411. });
  412. return new u2({ floors: s5, gdbVersion: this.layer.gdbVersion, geometry: e3, height: d4, layerOption: "popup", mapExtent: w, maxAllowableOffset: P ? 0 : h, returnGeometry: true, spatialReference: o4, sublayers: this.layer.sublayers, timeExtent: this.timeExtent, tolerance: c3, width: d4 });
  413. }
  414. async _fetchPopupFeaturesUsingQueries(e3, r4) {
  415. const t5 = await this._collectPopupProviders(this.layer.sublayers, this.view.scale, r4), s5 = r(r4) ? r4.event : null, i6 = t5.map(async ({ sublayer: r5, popupTemplate: t6 }) => {
  416. await r5.load().catch(() => {
  417. });
  418. const o4 = r5.createQuery(), i7 = s3({ renderer: r5.renderer, event: s5 }), p2 = this.createFetchPopupFeaturesQueryGeometry(e3, i7);
  419. if (o4.geometry = p2, o4.outFields = await d3(r5, t6), "floors" in this.view) {
  420. const e4 = this.view?.floors?.clone(), t7 = n3(e4, r5);
  421. r(t7) && (o4.where = o4.where ? `(${o4.where}) AND (${t7})` : t7);
  422. }
  423. const n5 = await this._loadArcadeModules(t6);
  424. n5 && n5.arcadeUtils.hasGeometryOperations(t6) || (o4.maxAllowableOffset = p2.width / i7);
  425. return (await r5.queryFeatures(o4)).features;
  426. });
  427. return (await E(i6)).reduce((e4, r5) => r5.value ? [...e4, ...r5.value] : e4, []).filter((e4) => e4 != null);
  428. }
  429. async _collectPopupProviders(e3, r4, t5) {
  430. const s5 = [], o4 = async (e4) => {
  431. const i7 = e4.minScale === 0 || r4 <= e4.minScale, p2 = e4.maxScale === 0 || r4 >= e4.maxScale;
  432. if (e4.visible && i7 && p2) {
  433. if (e4.sublayers)
  434. e4.sublayers.forEach(o4);
  435. else if (e4.popupEnabled) {
  436. const r5 = s4(e4, { ...t5, defaultPopupTemplateEnabled: false });
  437. r(r5) && s5.unshift({ sublayer: e4, popupTemplate: r5 });
  438. }
  439. }
  440. }, i6 = e3.toArray().reverse().map(o4);
  441. return await Promise.all(i6), s5;
  442. }
  443. _loadArcadeModules(e3) {
  444. if (e3.expressionInfos?.length || Array.isArray(e3.content) && e3.content.some((e4) => e4.type === "expression"))
  445. return a2();
  446. }
  447. };
  448. return e([d()], g4.prototype, "exportImageParameters", void 0), e([d({ readOnly: true })], g4.prototype, "exportImageVersion", null), e([d()], g4.prototype, "layer", void 0), e([d()], g4.prototype, "suspended", void 0), e([d(g2)], g4.prototype, "timeExtent", void 0), g4 = e([n("esri.views.layers.MapImageLayerView")], g4), g4;
  449. };
  450. // node_modules/@arcgis/core/views/2d/layers/MapImageLayerView2D.js
  451. var f3 = s.getLogger("esri.views.2d.layers.MapImageLayerView2D");
  452. var y3 = class extends x(i4(f(u))) {
  453. constructor() {
  454. super(...arguments), this._highlightGraphics = new c2();
  455. }
  456. update(e3) {
  457. this.strategy.update(e3).catch((e4) => {
  458. g(e4) || f3.error(e4);
  459. });
  460. }
  461. attach() {
  462. const { imageMaxWidth: e3, imageMaxHeight: t5, version: r4 } = this.layer, s5 = r4 >= 10.3, a7 = r4 >= 10;
  463. this._bitmapContainer = new t4(), this.container.addChild(this._bitmapContainer);
  464. const o4 = new ae({ view: this.view, graphics: this._highlightGraphics, requestUpdateCallback: () => this.requestUpdate(), container: new n4(this.view.featuresTilingScheme) });
  465. this.container.addChild(o4.container), this.strategy = new S({ container: this._bitmapContainer, fetchSource: this.fetchImage.bind(this), requestUpdate: this.requestUpdate.bind(this), imageMaxWidth: e3, imageMaxHeight: t5, imageRotationSupported: s5, imageNormalizationSupported: a7, hidpi: true }), this.handles.add(l2(() => this.exportImageVersion, () => this.requestUpdate()), "exportImageVersion"), this.handles.add(l2(() => this.view?.floors, () => this.requestUpdate()), "view.floors"), this.requestUpdate();
  466. }
  467. detach() {
  468. this.handles.remove("exportImageVersion"), this.handles.remove("view.floors"), this.strategy.destroy(), this.container.removeAllChildren(), this._bitmapContainer.removeAllChildren();
  469. }
  470. moveStart() {
  471. }
  472. viewChange() {
  473. }
  474. moveEnd() {
  475. this.requestUpdate();
  476. }
  477. highlight(e3, t5) {
  478. return this._highlightGraphics.add(e3), { remove: () => {
  479. this._highlightGraphics.remove(e3);
  480. } };
  481. }
  482. supportsSpatialReference(e3) {
  483. return this.layer.serviceSupportsSpatialReference(e3);
  484. }
  485. createFetchPopupFeaturesQueryGeometry(e3, t5) {
  486. return a3(e3, t5, this.view);
  487. }
  488. async doRefresh() {
  489. this.requestUpdate();
  490. }
  491. isUpdating() {
  492. return this.strategy.updating || this.updateRequested;
  493. }
  494. fetchImage(e3, t5, r4, i6) {
  495. return this.layer.fetchImage(e3, t5, r4, { timeExtent: this.timeExtent, floors: this.view.floors, ...i6 });
  496. }
  497. };
  498. e([d()], y3.prototype, "strategy", void 0), e([d()], y3.prototype, "updating", void 0), y3 = e([n("esri.views.2d.layers.MapImageLayerView2D")], y3);
  499. var v3 = y3;
  500. export {
  501. v3 as default
  502. };
  503. //# sourceMappingURL=MapImageLayerView2D-XGLLAYKY.js.map