{"version":3,"sources":["node_modules/@arcgis/core/views/2d/tiling/TileKey.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport t from \"../../../core/ObjectPool.js\";\nclass e {\n static getId(t, e, l, o) {\n return \"object\" == typeof t ? `${t.level}/${t.row}/${t.col}/${t.world}` : `${t}/${e}/${l}/${o}`;\n }\n constructor(t, e, l, o) {\n this.set(t, e, l, o);\n }\n get key() {\n return this;\n }\n get id() {\n return this.toString();\n }\n get normalizedId() {\n return `${this.level}/${this.row}/${this.col}`;\n }\n set id(t) {\n this.set(t);\n }\n get hash() {\n const t = 4095 & this.row,\n e = 4095 & this.col,\n l = 63 & this.level;\n return (3 & this.world) << 30 | e << 22 | t << 8 | l;\n }\n acquire(t, e, l, o) {\n this.set(t, e, l, o);\n }\n contains(t) {\n const e = t.level - this.level;\n return e >= 0 && this.row === t.row >> e && this.col === t.col >> e && this.world === t.world;\n }\n containsChild(t) {\n const e = t.level - this.level;\n return e > 0 && this.row === t.row >> e && this.col === t.col >> e && this.world === t.world;\n }\n equals(t) {\n return this.level === t.level && this.row === t.row && this.col === t.col && this.world === t.world;\n }\n clone() {\n return new e(this);\n }\n release() {\n this.level = 0, this.row = 0, this.col = 0, this.world = 0;\n }\n set(t, e, l, o) {\n if (null == t) this.level = 0, this.row = 0, this.col = 0, this.world = 0;else if (\"object\" == typeof t) this.level = t.level || 0, this.row = t.row || 0, this.col = t.col || 0, this.world = t.world || 0;else if (\"string\" == typeof t) {\n const [e, l, o, s] = t.split(\"/\");\n this.level = parseFloat(e), this.row = parseFloat(l), this.col = parseFloat(o), this.world = parseFloat(s);\n } else this.level = +t, this.row = +e, this.col = +l, this.world = +o || 0;\n return this;\n }\n toString() {\n return `${this.level}/${this.row}/${this.col}/${this.world}`;\n }\n getParentKey() {\n return this.level <= 0 ? null : new e(this.level - 1, this.row >> 1, this.col >> 1, this.world);\n }\n getNormalizedNeighbor(t, e, l) {\n const o = this.clone();\n return o.col += t, o.row += e, l.normalizeKey(o), o;\n }\n getChildKeys() {\n const t = this.level + 1,\n l = this.row << 1,\n o = this.col << 1,\n s = this.world;\n return [new e(t, l, o, s), new e(t, l, o + 1, s), new e(t, l + 1, o, s), new e(t, l + 1, o + 1, s)];\n }\n compareRowMajor(t) {\n return this.row < t.row ? -1 : this.row > t.row ? 1 : this.col < t.col ? -1 : this.col > t.col ? 1 : 0;\n }\n}\ne.pool = new t(e, null, null, 25, 50);\nexport { e as default };"],"mappings":"wCAKA,IAAMA,EAAN,MAAMC,CAAE,CACN,OAAO,MAAMC,EAAGF,EAAGG,EAAG,EAAG,CACvB,OAAmB,OAAOD,GAAnB,SAAuB,GAAGA,EAAE,KAAK,IAAIA,EAAE,GAAG,IAAIA,EAAE,GAAG,IAAIA,EAAE,KAAK,GAAK,GAAGA,CAAC,IAAIF,CAAC,IAAIG,CAAC,IAAI,CAAC,EAC/F,CACA,YAAYD,EAAGF,EAAGG,EAAG,EAAG,CACtB,KAAK,IAAID,EAAGF,EAAGG,EAAG,CAAC,CACrB,CACA,IAAI,KAAM,CACR,OAAO,IACT,CACA,IAAI,IAAK,CACP,OAAO,KAAK,SAAS,CACvB,CACA,IAAI,cAAe,CACjB,MAAO,GAAG,KAAK,KAAK,IAAI,KAAK,GAAG,IAAI,KAAK,GAAG,EAC9C,CACA,IAAI,GAAGD,EAAG,CACR,KAAK,IAAIA,CAAC,CACZ,CACA,IAAI,MAAO,CACT,IAAMA,EAAI,KAAO,KAAK,IACpBF,EAAI,KAAO,KAAK,IAChBG,EAAI,GAAK,KAAK,MAChB,OAAQ,EAAI,KAAK,QAAU,GAAKH,GAAK,GAAKE,GAAK,EAAIC,CACrD,CACA,QAAQD,EAAGF,EAAGG,EAAG,EAAG,CAClB,KAAK,IAAID,EAAGF,EAAGG,EAAG,CAAC,CACrB,CACA,SAASD,EAAG,CACV,IAAMF,EAAIE,EAAE,MAAQ,KAAK,MACzB,OAA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