import { p } from "./chunk-IUM6FPF7.js"; import { l } from "./chunk-KUO7OCMN.js"; import { o as o2 } from "./chunk-XO5VJRK4.js"; import "./chunk-IASFQ7K7.js"; import "./chunk-TFHLTN6F.js"; import { m } from "./chunk-4PNYPUDB.js"; import "./chunk-RDMCXRET.js"; import "./chunk-BQHWPTT7.js"; import { s } from "./chunk-PJNBFKPF.js"; import "./chunk-C7742RNZ.js"; import "./chunk-BWATQC2Y.js"; import "./chunk-SWMSD4RP.js"; import "./chunk-UVVU4UUO.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-TJNOJH33.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-OSHI574D.js"; import "./chunk-44GMIOGP.js"; import "./chunk-75U5LM2V.js"; import "./chunk-ZHRAUKVQ.js"; import "./chunk-RZK6A2GY.js"; import "./chunk-4NQ74ZR6.js"; import "./chunk-X4LLOW7U.js"; import "./chunk-Z4JTBD7M.js"; import "./chunk-HZRKBTHJ.js"; import "./chunk-CXCDYJ5R.js"; import "./chunk-GAOW3WRZ.js"; import "./chunk-QCKFNSN2.js"; import { e, n5 as n } from "./chunk-6SOHRC7T.js"; import "./chunk-U2XHEJM7.js"; import "./chunk-SQOPWYIT.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-V6P2MAQQ.js"; import "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { o, r } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/views/2d/layers/features/processors/HeatmapProcessor.js var p2 = class { constructor(e2, t) { this.offset = e2, this.extent = t; } }; function c(e2) { const t = e2.key, s2 = /* @__PURE__ */ new Map(), r2 = 256, i = o2, o3 = e2.tileInfoView.tileInfo.isWrappable; return s2.set(l(t, -1, -1, o3).id, new p2([-i, -i], [i - r2, i - r2, i, i])), s2.set(l(t, 0, -1, o3).id, new p2([0, -i], [0, i - r2, i, i])), s2.set(l(t, 1, -1, o3).id, new p2([i, -i], [0, i - r2, r2, i])), s2.set(l(t, -1, 0, o3).id, new p2([-i, 0], [i - r2, 0, i, i])), s2.set(l(t, 1, 0, o3).id, new p2([i, 0], [0, 0, r2, i])), s2.set(l(t, -1, 1, o3).id, new p2([-i, i], [i - r2, 0, i, r2])), s2.set(l(t, 0, 1, o3).id, new p2([0, i], [0, 0, i, r2])), s2.set(l(t, 1, 1, o3).id, new p2([i, i], [0, 0, r2, r2])), s2; } var l2 = class extends p { constructor() { super(...arguments), this.type = "heatmap", this._tileKeyToFeatureSets = /* @__PURE__ */ new Map(); } initialize() { this.handles.add([this.tileStore.on("update", this.onTileUpdate.bind(this))]); } async update(e2, t) { const s2 = t.schema.processors[0]; if ("heatmap" !== s2.type) return; m(this._schema, s2) && (e2.mesh = true, this._schema = s2); } onTileUpdate(e2) { for (const t of e2.removed) this._tileKeyToFeatureSets.delete(t.key.id); } onTileClear(e2) { const t = { clear: true }; return this._tileKeyToFeatureSets.delete(e2.key.id), this.remoteClient.invoke("tileRenderer.onTileData", { tileKey: e2.id, data: t }); } async onTileMessage(e2, r2, i) { this._tileKeyToFeatureSets.has(e2.key.id) || this._tileKeyToFeatureSets.set(e2.key.id, /* @__PURE__ */ new Map()); const a = this._tileKeyToFeatureSets.get(e2.key.id); if (r(r2.addOrUpdate) && r2.addOrUpdate.hasFeatures && a.set(r2.addOrUpdate.instance, r2), r2.end) { const t = [], r3 = c(e2); this._tileKeyToFeatureSets.forEach((i2, o3) => { if (o3 === e2.key.id) i2.forEach((e3) => o(e3.addOrUpdate, (e4) => t.push(e4))); else if (r3.has(o3)) { const e3 = r3.get(o3), [a3, n3] = e3.offset; i2.forEach((e4) => o(e4.addOrUpdate, (e5) => { const s2 = e5.transform(a3, n3, 1, 1); t.push(s2); })); } }); const a2 = s(t, this._schema.mesh, 512, 512), n2 = { tileKey: e2.key.id, intensityInfo: a2 }, d = [a2.matrix]; return this.remoteClient.invoke("tileRenderer.onTileData", n2, { ...i, transferList: d }); } } onTileError(e2, t, s2) { return this.remoteClient.invoke("tileRenderer.onTileError", { tileKey: e2.id, error: t }, s2); } }; l2 = e([n("esri.views.2d.layers.features.processors.HeatmapProcessor")], l2); var h = l2; export { h as default }; //# sourceMappingURL=HeatmapProcessor-44PJINTD.js.map