{"version":3,"file":"Leaflet.GoogleMutant.js","sources":["../src/lru_map.js","../src/Leaflet.GoogleMutant.js"],"sourcesContent":["// This implementation of LRUMap is a copy of https://github.com/rsms/js-lru/ ,\n// trivially adapted for ES6 exports.\n\n/*\nThe MIT License\n\nCopyright (c) 2010-2020 Rasmus Andersson <https://rsms.me/>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\n/**\n * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most\n * recently used items while discarding least recently used items when its limit\n * is reached.\n *\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\n * See README.md for details.\n *\n * Illustration of the design:\n *\n *       entry             entry             entry             entry\n *       ______            ______            ______            ______\n *      | head |.newer => |      |.newer => |      |.newer => | tail |\n *      |  A   |          |  B   |          |  C   |          |  D   |\n *      |______| <= older.|______| <= older.|______| <= older.|______|\n *\n *  removed  <--  <--  <--  <--  <--  <--  <--  <--  <--  <--  <--  added\n */\n\nconst NEWER = Symbol(\"newer\");\nconst OLDER = Symbol(\"older\");\n\nexport class LRUMap {\n\tconstructor(limit, entries) {\n\t\tif (typeof limit !== \"number\") {\n\t\t\t// called as (entries)\n\t\t\tentries = limit;\n\t\t\tlimit = 0;\n\t\t}\n\n\t\tthis.size = 0;\n\t\tthis.limit = limit;\n\t\tthis.oldest = this.newest = undefined;\n\t\tthis._keymap = new Map();\n\n\t\tif (entries) {\n\t\t\tthis.assign(entries);\n\t\t\tif (limit < 1) {\n\t\t\t\tthis.limit = this.size;\n\t\t\t}\n\t\t}\n\t}\n\n\t_markEntryAsUsed(entry) {\n\t\tif (entry === this.newest) {\n\t\t\t// Already the most recenlty used entry, so no need to update the list\n\t\t\treturn;\n\t\t}\n\t\t// HEAD--------------TAIL\n\t\t//   <.older   .newer>\n\t\t//  <--- add direction --\n\t\t//   A  B  C  <D>  E\n\t\tif (entry[NEWER]) {\n\t\t\tif (entry === this.oldest) {\n\t\t\t\tthis.oldest = entry[NEWER];\n\t\t\t}\n\t\t\tentry[NEWER][OLDER] = entry[OLDER]; // C <-- E.\n\t\t}\n\t\tif (entry[OLDER]) {\n\t\t\tentry[OLDER][NEWER] = entry[NEWER]; // C. --> E\n\t\t}\n\t\tentry[NEWER] = undefined; // D --x\n\t\tentry[OLDER] = this.newest; // D. --> E\n\t\tif (this.newest) {\n\t\t\tthis.newest[NEWER] = entry; // E. <-- D\n\t\t}\n\t\tthis.newest = entry;\n\t}\n\n\tassign(entries) {\n\t\tlet entry,\n\t\t\tlimit = this.limit || Number.MAX_VALUE;\n\t\tthis._keymap.clear();\n\t\tlet it = entries[Symbol.iterator]();\n\t\tfor (let itv = it.next(); !itv.done; itv = it.next()) {\n\t\t\tlet e = new Entry(itv.value[0], itv.value[1]);\n\t\t\tthis._keymap.set(e.key, e);\n\t\t\tif (!entry) {\n\t\t\t\tthis.oldest = e;\n\t\t\t} else {\n\t\t\t\tentry[NEWER] = e;\n\t\t\t\te[OLDER] = entry;\n\t\t\t}\n\t\t\tentry = e;\n\t\t\tif (limit-- == 0) {\n\t\t\t\tthrow new Error(\"overflow\");\n\t\t\t}\n\t\t}\n\t\tthis.newest = entry;\n\t\tthis.size = this._keymap.size;\n\t}\n\n\tget(key) {\n\t\t// First, find our cache entry\n\t\tvar entry = this._keymap.get(key);\n\t\tif (!entry) return; // Not cached. Sorry.\n\t\t// As <key> was found in the cache, register it as being requested recently\n\t\tthis._markEntryAsUsed(entry);\n\t\treturn entry.value;\n\t}\n\n\tset(key, value) {\n\t\tvar entry = this._keymap.get(key);\n\n\t\tif (entry) {\n\t\t\t// update existing\n\t\t\tentry.value = value;\n\t\t\tthis._markEntryAsUsed(entry);\n\t\t\treturn this;\n\t\t}\n\n\t\t// new entry\n\t\tthis._keymap.set(key, (entry = new Entry(key, value)));\n\n\t\tif (this.newest) {\n\t\t\t// link previous tail to the new tail (entry)\n\t\t\tthis.newest[NEWER] = entry;\n\t\t\tentry[OLDER] = this.newest;\n\t\t} else {\n\t\t\t// we're first in -- yay\n\t\t\tthis.oldest = entry;\n\t\t}\n\n\t\t// add new entry to the end of the linked list -- it's now the freshest entry.\n\t\tthis.newest = entry;\n\t\t++this.size;\n\t\tif (this.size > this.limit) {\n\t\t\t// we hit the limit -- remove the head\n\t\t\tthis.shift();\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tshift() {\n\t\t// todo: handle special case when limit == 1\n\t\tvar entry = this.oldest;\n\t\tif (entry) {\n\t\t\tif (this.oldest[NEWER]) {\n\t\t\t\t// advance the list\n\t\t\t\tthis.oldest = this.oldest[NEWER];\n\t\t\t\tthis.oldest[OLDER] = undefined;\n\t\t\t} else {\n\t\t\t\t// the cache is exhausted\n\t\t\t\tthis.oldest = undefined;\n\t\t\t\tthis.newest = undefined;\n\t\t\t}\n\t\t\t// Remove last strong reference to <entry> and remove links from the purged\n\t\t\t// entry being returned:\n\t\t\tentry[NEWER] = entry[OLDER] = undefined;\n\t\t\tthis._keymap.delete(entry.key);\n\t\t\t--this.size;\n\t\t\treturn [entry.key, entry.value];\n\t\t}\n\t}\n\n\t// -------------------------------------------------------------------------------------\n\t// Following code (until end of class definition) is optional and can be removed without\n\t// breaking the core functionality.\n\n\tfind(key) {\n\t\tlet e = this._keymap.get(key);\n\t\treturn e ? e.value : undefined;\n\t}\n\n\thas(key) {\n\t\treturn this._keymap.has(key);\n\t}\n\n\tdelete(key) {\n\t\tvar entry = this._keymap.get(key);\n\t\tif (!entry) return;\n\t\tthis._keymap.delete(entry.key);\n\t\tif (entry[NEWER] && entry[OLDER]) {\n\t\t\t// relink the older entry with the newer entry\n\t\t\tentry[OLDER][NEWER] = entry[NEWER];\n\t\t\tentry[NEWER][OLDER] = entry[OLDER];\n\t\t} else if (entry[NEWER]) {\n\t\t\t// remove the link to us\n\t\t\tentry[NEWER][OLDER] = undefined;\n\t\t\t// link the newer entry to head\n\t\t\tthis.oldest = entry[NEWER];\n\t\t} else if (entry[OLDER]) {\n\t\t\t// remove the link to us\n\t\t\tentry[OLDER][NEWER] = undefined;\n\t\t\t// link the newer entry to head\n\t\t\tthis.newest = entry[OLDER];\n\t\t} else {\n\t\t\t// if(entry[OLDER] === undefined && entry.newer === undefined) {\n\t\t\tthis.oldest = this.newest = undefined;\n\t\t}\n\n\t\tthis.size--;\n\t\treturn entry.value;\n\t}\n\n\tclear() {\n\t\t// Not clearing links should be safe, as we don't expose live links to user\n\t\tthis.oldest = this.newest = undefined;\n\t\tthis.size = 0;\n\t\tthis._keymap.clear();\n\t}\n\n\tkeys() {\n\t\treturn new KeyIterator(this.oldest);\n\t}\n\n\tvalues() {\n\t\treturn new ValueIterator(this.oldest);\n\t}\n\n\tentries() {\n\t\treturn this;\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn new EntryIterator(this.oldest);\n\t}\n\n\tforEach(fun, thisObj) {\n\t\tif (typeof thisObj !== \"object\") {\n\t\t\tthisObj = this;\n\t\t}\n\t\tlet entry = this.oldest;\n\t\twhile (entry) {\n\t\t\tfun.call(thisObj, entry.value, entry.key, this);\n\t\t\tentry = entry[NEWER];\n\t\t}\n\t}\n\n\t/** Returns a JSON (array) representation */\n\ttoJSON() {\n\t\tvar s = new Array(this.size),\n\t\t\ti = 0,\n\t\t\tentry = this.oldest;\n\t\twhile (entry) {\n\t\t\ts[i++] = { key: entry.key, value: entry.value };\n\t\t\tentry = entry[NEWER];\n\t\t}\n\t\treturn s;\n\t}\n\n\t/** Returns a String representation */\n\ttoString() {\n\t\tvar s = \"\",\n\t\t\tentry = this.oldest;\n\t\twhile (entry) {\n\t\t\ts += String(entry.key) + \":\" + entry.value;\n\t\t\tentry = entry[NEWER];\n\t\t\tif (entry) {\n\t\t\t\ts += \" < \";\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}\n}\n\nfunction Entry(key, value) {\n\tthis.key = key;\n\tthis.value = value;\n\tthis[NEWER] = undefined;\n\tthis[OLDER] = undefined;\n}\n\nfunction EntryIterator(oldestEntry) {\n\tthis.entry = oldestEntry;\n}\nEntryIterator.prototype[Symbol.iterator] = function () {\n\treturn this;\n};\nEntryIterator.prototype.next = function () {\n\tlet ent = this.entry;\n\tif (ent) {\n\t\tthis.entry = ent[NEWER];\n\t\treturn { done: false, value: [ent.key, ent.value] };\n\t} else {\n\t\treturn { done: true, value: undefined };\n\t}\n};\n\nfunction KeyIterator(oldestEntry) {\n\tthis.entry = oldestEntry;\n}\nKeyIterator.prototype[Symbol.iterator] = function () {\n\treturn this;\n};\nKeyIterator.prototype.next = function () {\n\tlet ent = this.entry;\n\tif (ent) {\n\t\tthis.entry = ent[NEWER];\n\t\treturn { done: false, value: ent.key };\n\t} else {\n\t\treturn { done: true, value: undefined };\n\t}\n};\n\nfunction ValueIterator(oldestEntry) {\n\tthis.entry = oldestEntry;\n}\nValueIterator.prototype[Symbol.iterator] = function () {\n\treturn this;\n};\nValueIterator.prototype.next = function () {\n\tlet ent = this.entry;\n\tif (ent) {\n\t\tthis.entry = ent[NEWER];\n\t\treturn { done: false, value: ent.value };\n\t} else {\n\t\treturn { done: true, value: undefined };\n\t}\n};\n","// GoogleMutant by Iván Sánchez Ortega <ivan@sanchezortega.es>\n\n// Based on https://github.com/shramov/leaflet-plugins\n// GridLayer like https://avinmathew.com/leaflet-and-google-maps/ , but using MutationObserver instead of jQuery\n\n/*\n\"THE BEER-WARE LICENSE\":\n<ivan@sanchezortega.es> wrote this file. As long as you retain this notice you\ncan do whatever you want with this stuff. If we meet some day, and you think\nthis stuff is worth it, you can buy me a beer in return.\n*/\n\nimport { LRUMap } from \"./lru_map.js\";\n\nfunction waitForAPI(callback, context) {\n\tlet checkCounter = 0,\n\t\tintervalId = null;\n\n\tintervalId = setInterval(function () {\n\t\tif (checkCounter >= 20) {\n\t\t\tclearInterval(intervalId);\n\t\t\tthrow new Error(\"window.google not found after 10 seconds\");\n\t\t}\n\t\tif (!!window.google && !!window.google.maps && !!window.google.maps.Map) {\n\t\t\tclearInterval(intervalId);\n\t\t\tcallback.call(context);\n\t\t}\n\t\t++checkCounter;\n\t}, 500);\n}\n\n// 🍂class GridLayer.GoogleMutant\n// 🍂extends GridLayer\nL.GridLayer.GoogleMutant = L.GridLayer.extend({\n\toptions: {\n\t\tmaxZoom: 21, // can be 23, but ugly if more than maxNativeZoom\n\t\t// 🍂option type: String = 'roadmap'\n\t\t// Google's map type. Valid values are 'roadmap', 'satellite' or 'terrain'. 'hybrid' is not really supported.\n\t\ttype: \"roadmap\",\n\t\tmaxNativeZoom: 21,\n\t},\n\n\tinitialize: function (options) {\n\t\tL.GridLayer.prototype.initialize.call(this, options);\n\n\t\t// Couple data structures indexed by tile key\n\t\tthis._tileCallbacks = {}; // Callbacks for promises for tiles that are expected\n\t\tthis._lru = new LRUMap(100); // Tile LRU cache\n\n\t\tthis._imagesPerTile = this.options.type === \"hybrid\" ? 2 : 1;\n\n\t\tthis._boundOnMutatedImage = this._onMutatedImage.bind(this);\n\t},\n\n\tonAdd: function (map) {\n\t\tL.GridLayer.prototype.onAdd.call(this, map);\n\t\tthis._initMutantContainer();\n\n\t\t// Attribution and logo nodes are not mutated a second time if the\n\t\t// mutant is removed and re-added to the map, hence they are\n\t\t// not cleaned up on layer removal, so they can be added here.\n\t\tif (this._logoContainer) {\n\t\t\tmap._controlCorners.bottomleft.appendChild(this._logoContainer);\n\t\t}\n\t\tif (this._attributionContainer) {\n\t\t\tmap._controlCorners.bottomright.appendChild(this._attributionContainer);\n\t\t}\n\n\t\twaitForAPI(() => {\n\t\t\tif (!this._map) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._initMutant();\n\n\t\t\t//handle layer being added to a map for which there are no Google tiles at the given zoom\n\t\t\tgoogle.maps.event.addListenerOnce(this._mutant, \"idle\", () => {\n\t\t\t\tif (!this._map) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._checkZoomLevels();\n\t\t\t\tthis._mutantIsReady = true;\n\t\t\t});\n\t\t});\n\t},\n\n\tonRemove: function (map) {\n\t\tL.GridLayer.prototype.onRemove.call(this, map);\n\t\tthis._observer.disconnect();\n\t\tmap._container.removeChild(this._mutantContainer);\n\t\tif (this._logoContainer) {\n\t\t\tL.DomUtil.remove(this._logoContainer);\n\t\t}\n\t\tif (this._attributionContainer) {\n\t\t\tL.DomUtil.remove(this._attributionContainer);\n\t\t}\n\t\tif (this._mutant) {\n\t\t\tgoogle.maps.event.clearListeners(this._mutant, \"idle\");\n\t\t}\n\t},\n\n\t// 🍂method addGoogleLayer(name: String, options?: Object): this\n\t// Adds layer with the given name and options to the google Map instance.\n\t// `name`: one of the google maps API layers, with it's constructor available in `google.maps` object.\n\t// currently following values supported: 'TrafficLayer', 'TransitLayer', 'BicyclingLayer'.\n\t// `options`: see https://developers.google.com/maps/documentation/javascript/reference/map\n\taddGoogleLayer: function (googleLayerName, options) {\n\t\tif (!this._subLayers) this._subLayers = {};\n\t\tthis.whenReady(() => {\n\t\t\tvar Constructor = google.maps[googleLayerName];\n\t\t\tvar googleLayer = new Constructor(options);\n\t\t\tgoogleLayer.setMap(this._mutant);\n\t\t\tthis._subLayers[googleLayerName] = googleLayer;\n\t\t});\n\t\treturn this;\n\t},\n\n\t// 🍂method removeGoogleLayer(name: String): this\n\t// Removes layer with the given name from the google Map instance.\n\tremoveGoogleLayer: function (googleLayerName) {\n\t\tthis.whenReady(() => {\n\t\t\tvar googleLayer = this._subLayers && this._subLayers[googleLayerName];\n\t\t\tif (googleLayer) {\n\t\t\t\tgoogleLayer.setMap(null);\n\t\t\t\tdelete this._subLayers[googleLayerName];\n\t\t\t}\n\t\t});\n\t\treturn this;\n\t},\n\n\t_initMutantContainer: function () {\n\t\tif (!this._mutantContainer) {\n\t\t\tthis._mutantContainer = L.DomUtil.create(\n\t\t\t\t\"div\",\n\t\t\t\t\"leaflet-google-mutant leaflet-top leaflet-left\"\n\t\t\t);\n\t\t\tthis._mutantContainer.id = \"_MutantContainer_\" + L.Util.stamp(this._mutantContainer);\n\t\t\tthis._mutantContainer.style.pointerEvents = \"none\";\n\t\t\tthis._mutantContainer.style.visibility = \"hidden\";\n\n\t\t\tL.DomEvent.off(this._mutantContainer);\n\t\t}\n\t\tthis._map.getContainer().appendChild(this._mutantContainer);\n\n\t\tthis.setOpacity(this.options.opacity);\n\t\tconst style = this._mutantContainer.style;\n\t\tif (this._map.options.zoomSnap < 1) {\n\t\t\t// Fractional zoom needs a bigger mutant container in order to load more (smaller) tiles\n\t\t\tstyle.width = \"180%\";\n\t\t\tstyle.height = \"180%\";\n\t\t} else {\n\t\t\tstyle.width = \"100%\";\n\t\t\tstyle.height = \"100%\";\n\t\t}\n\t\tstyle.zIndex = -1;\n\n\t\tthis._attachObserver(this._mutantContainer);\n\t},\n\n\t_initMutant: function () {\n\t\tif (this._mutant) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar map = new google.maps.Map(this._mutantContainer, {\n\t\t\tcenter: { lat: 0, lng: 0 },\n\t\t\tzoom: 0,\n\t\t\ttilt: 0,\n\t\t\tmapTypeId: this.options.type,\n\t\t\tdisableDefaultUI: true,\n\t\t\tkeyboardShortcuts: false,\n\t\t\tdraggable: false,\n\t\t\tdisableDoubleClickZoom: true,\n\t\t\tscrollwheel: false,\n\t\t\tstyles: this.options.styles || [],\n\t\t\tbackgroundColor: \"transparent\",\n\t\t});\n\n\t\tthis._mutant = map;\n\n\t\tthis._update();\n\n\t\t// 🍂event spawned\n\t\t// Fired when the mutant has been created.\n\t\tthis.fire(\"spawned\", { mapObject: map });\n\n\t\tthis._waitControls();\n\t\tthis.once('controls_ready', this._setupAttribution);\n\t},\n\n\t_attachObserver: function _attachObserver(node) {\n\t\tif (!this._observer) this._observer = new MutationObserver(this._onMutations.bind(this));\n\n\t\t// pass in the target node, as well as the observer options\n\t\tthis._observer.observe(node, { childList: true, subtree: true });\n\n\t\t// if we are reusing an old _mutantContainer, we must manually detect\n\t\t// all existing tiles in it\n\t\tArray.prototype.forEach.call(node.querySelectorAll(\"img\"), this._boundOnMutatedImage);\n\t},\n\n\t_waitControls: function () {\n\t\tconst id = setInterval(() => {\n\t\t\tconst layoutManager = this._mutant.__gm.layoutManager;\n\t\t\tif (!layoutManager) { return; }\n\t\t\tclearInterval(id);\n\t\t\tlet positions;\n\t\t\t// iterate through obfuscated key names to find positions set (atm: layoutManager.o)\n\t\t\tObject.keys(layoutManager).forEach(function(key) {\n\t\t\t\tconst el = layoutManager[key];\n\t\t\t\tif (el.get) {\n\t\t\t\t\tif (el.get(1) instanceof Node) {\n\t\t\t\t\t\tpositions = el;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t// 🍂event controls_ready\n\t\t\t// Fired when controls positions get available (passed in `positions` property).\n\t\t\tthis.fire(\"controls_ready\", { positions });\n\t\t}, 50);\n\t},\n\n\t_setupAttribution: function (ev) {\n\t\t// https://developers.google.com/maps/documentation/javascript/reference/control#ControlPosition\n\t\tconst pos = google.maps.ControlPosition;\n\t\tconst ctr = this._attributionContainer = ev.positions.get(pos.BOTTOM_RIGHT);\n\t\tL.DomUtil.addClass(ctr, \"leaflet-control leaflet-control-attribution\");\n\t\tL.DomEvent.disableClickPropagation(ctr);\n\t\tctr.style.height = \"14px\";\n\t\tthis._map._controlCorners.bottomright.appendChild(ctr);\n\n\t\tthis._logoContainer = ev.positions.get(pos.BOTTOM_LEFT);\n\t\tthis._logoContainer.style.pointerEvents = \"auto\";\n\t\tthis._map._controlCorners.bottomleft.appendChild(this._logoContainer);\n\t},\n\n\t_onMutations: function _onMutations(mutations) {\n\t\tfor (var i = 0; i < mutations.length; ++i) {\n\t\t\tvar mutation = mutations[i];\n\t\t\tfor (var j = 0; j < mutation.addedNodes.length; ++j) {\n\t\t\t\tvar node = mutation.addedNodes[j];\n\n\t\t\t\tif (node instanceof HTMLImageElement) {\n\t\t\t\t\tthis._onMutatedImage(node);\n\t\t\t\t} else if (node instanceof HTMLElement) {\n\t\t\t\t\tArray.prototype.forEach.call(\n\t\t\t\t\t\tnode.querySelectorAll(\"img\"),\n\t\t\t\t\t\tthis._boundOnMutatedImage\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Only images which 'src' attrib match this will be considered for moving around.\n\t// Looks like some kind of string-based protobuf, maybe??\n\t// Only the roads (and terrain, and vector-based stuff) match this pattern\n\t_roadRegexp: /!1i(\\d+)!2i(\\d+)!3i(\\d+)!/,\n\n\t// On the other hand, raster imagery matches this other pattern\n\t_satRegexp: /x=(\\d+)&y=(\\d+)&z=(\\d+)/,\n\n\t// On small viewports, when zooming in/out, a static image is requested\n\t// This will not be moved around, just removed from the DOM.\n\t_staticRegExp: /StaticMapService\\.GetMapImage/,\n\n\t_onMutatedImage: function _onMutatedImage(imgNode) {\n\t\tlet coords;\n\t\tlet match = imgNode.src.match(this._roadRegexp);\n\t\tlet sublayer = 0;\n\n\t\tif (match) {\n\t\t\tcoords = {\n\t\t\t\tz: match[1],\n\t\t\t\tx: match[2],\n\t\t\t\ty: match[3],\n\t\t\t};\n\t\t\tif (this._imagesPerTile > 1) {\n\t\t\t\timgNode.style.zIndex = 1;\n\t\t\t\tsublayer = 1;\n\t\t\t}\n\t\t} else {\n\t\t\tmatch = imgNode.src.match(this._satRegexp);\n\t\t\tif (match) {\n\t\t\t\tcoords = {\n\t\t\t\t\tx: match[1],\n\t\t\t\t\ty: match[2],\n\t\t\t\t\tz: match[3],\n\t\t\t\t};\n\t\t\t}\n\t\t\t// imgNode.style.zIndex = 0;\n\t\t\tsublayer = 0;\n\t\t}\n\n\t\tif (coords) {\n\t\t\tvar tileKey = this._tileCoordsToKey(coords);\n\t\t\timgNode.style.position = \"absolute\";\n\n\t\t\tvar key = tileKey + \"/\" + sublayer;\n\t\t\t// Cache img so it can also be used in subsequent tile requests\n\t\t\tthis._lru.set(key, imgNode);\n\n\t\t\tif (key in this._tileCallbacks && this._tileCallbacks[key]) {\n\t\t\t\t// Use the tile for *all* pending callbacks. They'll be cloned anyway.\n\t\t\t\tthis._tileCallbacks[key].forEach((callback) => callback(imgNode));\n\t\t\t\tdelete this._tileCallbacks[key];\n\t\t\t}\n\t\t}\n\t},\n\n\tcreateTile: function (coords, done) {\n\t\tconst key = this._tileCoordsToKey(coords),\n\t\t\ttileContainer = L.DomUtil.create(\"div\");\n\n\t\ttileContainer.style.textAlign = \"left\";\n\t\ttileContainer.dataset.pending = this._imagesPerTile;\n\t\tdone = done.bind(this, null, tileContainer);\n\n\t\tfor (var i = 0; i < this._imagesPerTile; ++i) {\n\t\t\tconst key2 = key + \"/\" + i,\n\t\t\t\timgNode = this._lru.get(key2);\n\t\t\tif (imgNode) {\n\t\t\t\ttileContainer.appendChild(this._clone(imgNode));\n\t\t\t\t--tileContainer.dataset.pending;\n\t\t\t} else {\n\t\t\t\tthis._tileCallbacks[key2] = this._tileCallbacks[key2] || [];\n\t\t\t\tthis._tileCallbacks[key2].push(\n\t\t\t\t\tfunction (c /*, k2*/) {\n\t\t\t\t\t\treturn function (imgNode) {\n\t\t\t\t\t\t\tc.appendChild(this._clone(imgNode));\n\t\t\t\t\t\t\t--c.dataset.pending;\n\t\t\t\t\t\t\tif (!parseInt(c.dataset.pending)) {\n\t\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}.bind(this);\n\t\t\t\t\t}.bind(this)(tileContainer /*, key2*/)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!parseInt(tileContainer.dataset.pending)) {\n\t\t\tL.Util.requestAnimFrame(done);\n\t\t}\n\t\treturn tileContainer;\n\t},\n\n\t_clone: function (imgNode) {\n\t\tconst clonedImgNode = imgNode.cloneNode(true);\n\t\tclonedImgNode.style.visibility = \"visible\";\n\t\treturn clonedImgNode;\n\t},\n\n\t_checkZoomLevels: function () {\n\t\t//setting the zoom level on the Google map may result in a different zoom level than the one requested\n\t\t//(it won't go beyond the level for which they have data).\n\t\tconst zoomLevel = this._map.getZoom(),\n\t\t\tgMapZoomLevel = this._mutant.getZoom();\n\n\t\tif (!zoomLevel || !gMapZoomLevel) return;\n\n\t\tif (\n\t\t\tgMapZoomLevel !== zoomLevel || //zoom levels are out of sync, Google doesn't have data\n\t\t\tgMapZoomLevel > this.options.maxNativeZoom\n\t\t) {\n\t\t\t//at current location, Google does have data (contrary to maxNativeZoom)\n\t\t\t//Update maxNativeZoom\n\t\t\tthis._setMaxNativeZoom(gMapZoomLevel);\n\t\t}\n\t},\n\n\t_setMaxNativeZoom: function (zoomLevel) {\n\t\tif (zoomLevel !== this.options.maxNativeZoom) {\n\t\t\tthis.options.maxNativeZoom = zoomLevel;\n\t\t\tthis._resetView();\n\t\t}\n\t},\n\n\t_update: function (center) {\n\t\t// zoom level check needs to happen before super's implementation (tile addition/creation)\n\t\t// otherwise tiles may be missed if maxNativeZoom is not yet correctly determined\n\t\tif (this._mutant) {\n\t\t\tcenter = center || this._map.getCenter();\n\t\t\tconst _center = new google.maps.LatLng(center.lat, center.lng),\n\t\t\t\tzoom = Math.round(this._map.getZoom()),\n\t\t\t\tmutantZoom = this._mutant.getZoom();\n\n\t\t\tthis._mutant.setCenter(_center);\n\n\t\t\t//ignore fractional zoom levels\n\t\t\tif (zoom !== mutantZoom) {\n\t\t\t\tthis._mutant.setZoom(zoom);\n\n\t\t\t\tif (this._mutantIsReady) this._checkZoomLevels();\n\t\t\t\t//else zoom level check will be done later by 'idle' handler\n\t\t\t}\n\t\t}\n\n\t\tL.GridLayer.prototype._update.call(this, center);\n\t},\n\n\t// @method whenReady(fn: Function, context?: Object): this\n\t// Runs the given function `fn` when the mutant gets initialized, or immediately\n\t// if it's already initialized, optionally passing a function context.\n\twhenReady: function (callback, context) {\n\t\tif (this._mutant) {\n\t\t\tcallback.call(context || this, { target: this });\n\t\t} else {\n\t\t\tthis.on(\"spawned\", callback, context);\n\t\t}\n\t\treturn this;\n\t},\n});\n\n// 🍂factory gridLayer.googleMutant(options)\n// Returns a new `GridLayer.GoogleMutant` given its options\nL.gridLayer.googleMutant = function (options) {\n\treturn new L.GridLayer.GoogleMutant(options);\n};\n"],"names":["const","let","this"],"mappings":";;;;;;;;;;;;;;;;;;CAAA;CACA;AACA;CACA;CACA;AACA;CACA;AACA;CACA;CACA;CACA;CACA;CACA;CACA;AACA;CACA;CACA;AACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACA;CACAA,IAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;CAC9BA,IAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAC9B;CACO,IAAM,MAAM,GAClB,eAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,CAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;CACjC;CACA,EAAG,OAAO,GAAG,KAAK,CAAC;CACnB,EAAG,KAAK,GAAG,CAAC,CAAC;CACb,EAAG;AACH;CACA,CAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;CAChB,CAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;CACrB,CAAE,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