import { e } from "./chunk-WSRBH7BF.js"; // node_modules/@arcgis/core/views/2d/tiling/TileKey.js var e2 = class { constructor(t, e3, l, s) { this.set(t, e3, l, s); } static getId(t, e3, l, s) { return typeof t == "object" ? `${t.level}/${t.row}/${t.col}/${t.world}` : `${t}/${e3}/${l}/${s}`; } get key() { return this; } get id() { return this.toString(); } set id(t) { this.set(t); } get hash() { const t = 4095 & this.row, e3 = 4095 & this.col, l = 63 & this.level; return (3 & this.world) << 30 | e3 << 22 | t << 8 | l; } acquire(t, e3, l, s) { this.set(t, e3, l, s); } contains(t) { const e3 = t.level - this.level; return this.row === t.row >> e3 && this.col === t.col >> e3 && this.world === t.world; } equals(t) { return this.level === t.level && this.row === t.row && this.col === t.col && this.world === t.world; } clone() { return new e2(this); } release() { this.level = 0, this.row = 0, this.col = 0, this.world = 0; } set(t, e3, l, s) { if (t == null) this.level = 0, this.row = 0, this.col = 0, this.world = 0; else if (typeof t == "object") this.level = t.level || 0, this.row = t.row || 0, this.col = t.col || 0, this.world = t.world || 0; else if (typeof t == "string") { const [e4, l2, s2, o] = t.split("/"); this.level = parseFloat(e4), this.row = parseFloat(l2), this.col = parseFloat(s2), this.world = parseFloat(o); } else this.level = +t, this.row = +e3, this.col = +l, this.world = +s || 0; return this; } toString() { return `${this.level}/${this.row}/${this.col}/${this.world}`; } getParentKey() { return this.level <= 0 ? null : new e2(this.level - 1, this.row >> 1, this.col >> 1, this.world); } getChildKeys() { const t = this.level + 1, l = this.row << 1, s = this.col << 1, o = this.world; return [new e2(t, l, s, o), new e2(t, l, s + 1, o), new e2(t, l + 1, s, o), new e2(t, l + 1, s + 1, o)]; } compareRowMajor(t) { return this.row < t.row ? -1 : this.row > t.row ? 1 : this.col < t.col ? -1 : this.col > t.col ? 1 : 0; } }; e2.pool = new e(e2, null, null, 25, 50); export { e2 as e }; //# sourceMappingURL=chunk-FIYKFRB2.js.map