this is a testpage
'),undefined,'\\t'));\nvar p = new DOMParser();\nvar s2=''+s+''\nvar start2= new Date().getTime();\nvar o2 = p.parseFromString(s2,'text/html').querySelector('#content')\nvar end2=new Date().getTime();\nconsole.log(\"MILLISECONDS\",end2-start2);\n// */\n\n\n//# sourceURL=webpack://GeoRaster/./node_modules/txml/tXml.js?"); - -/***/ }), - -/***/ "./node_modules/url/url.js": -/*!*********************************!*\ - !*** ./node_modules/url/url.js ***! - \*********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/*\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/punycode/punycode.js\");\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,\n\n /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = [\n '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'\n ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [\n '{', '}', '|', '\\\\', '^', '`'\n ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\n * Characters that are never ever allowed in a hostname.\n * Note that any invalid chars are also handled, but these\n * are the ones that are *expected* to be seen, so we fast-path\n * them.\n */\n nonHostChars = [\n '%', '/', '?', ';', '#'\n ].concat(autoEscape),\n hostEndingChars = [\n '/', '?', '#'\n ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file: true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = __webpack_require__(/*! qs */ \"./node_modules/qs/lib/index.js\");\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n /*\n * Copy chrome, IE, opera backslash-handling behavior.\n * Back slashes before the query string get converted to forward slashes\n * See: https://code.google.com/p/chromium/issues/detail?id=25916\n */\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\n */\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n /*\n * figure out if it's got a host\n * user@server is *always* interpreted as a hostname, and url\n * resolution will treat //foo/bar as host=foo,path=bar because that's\n * how the browser resolves relative URLs.\n */\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@/]+@[^@/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) {\n\n /*\n * there's a hostname.\n * the first instance of /, ?, ;, or # ends the host.\n *\n * If there is an @ in the hostname, then non-host chars *are* allowed\n * to the left of the last @ sign, unless some host-ending character\n * comes *before* the @-sign.\n * URLs are obnoxious.\n *\n * ex:\n * http://a@b@c/ => user:a@b host:c\n * http://a@b?@c => user:a host:c path:/?@c\n */\n\n /*\n * v0.12 TODO(isaacs): This is not quite how Chrome does things.\n * Review our test case against browsers more comprehensively.\n */\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\n }\n\n /*\n * at this point, either we have an explicit point where the\n * auth portion cannot go past, or the last @ char is the decider.\n */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) { hostEnd = rest.length; }\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n /*\n * we replace non-ASCII char with a temporary placeholder\n * we need this to make sure size of hostname is not\n * broken by replacing non-ASCII by nothing\n */\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n /*\n * IDNA Support: Returns a punycoded representation of \"domain\".\n * It only converts parts of the domain name that\n * have non-ASCII characters, i.e. it doesn't matter if\n * you call it with a domain that already is ASCII-only.\n */\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n\n /*\n * First, make 100% sure that any \"autoEscape\" chars get\n * escaped, even if encodeURIComponent doesn't think they\n * need to be.\n */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) { continue; }\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n // to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n /*\n * ensure it's an object, and not a string url.\n * If it's an obj, this is a no-op.\n * this way, you can call url_format() on strings\n * to clean up potentially wonky urls.\n */\n if (typeof obj === 'string') { obj = urlParse(obj); }\n if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }\n return obj.format();\n}\n\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }\n if (search && search.charAt(0) !== '?') { search = '?' + search; }\n\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) { return relative; }\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function (relative) {\n if (typeof relative === 'string') {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') { result[rkey] = relative[rkey]; }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.pathname = '/';\n result.path = result.pathname;\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n /*\n * if it's a known url protocol, then changing\n * the protocol does weird things\n * first, if it's not file:, then we MUST have a host,\n * and if there was a path\n * to begin with, then we MUST have a path.\n * if it is file:, then the host is dropped,\n * because that's known to be hostless.\n * anything else is assumed to be absolute.\n */\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift())) { }\n if (!relative.host) { relative.host = ''; }\n if (!relative.hostname) { relative.hostname = ''; }\n if (relPath[0] !== '') { relPath.unshift(''); }\n if (relPath.length < 2) { relPath.unshift(''); }\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n /*\n * if the url is a non-slashed url, then relative\n * links like ../.. should be able\n * to crawl up to the hostname, as well. This is strange.\n * result.protocol has already been set by now.\n * Later on, put the first path part into the host field.\n */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') { srcPath[0] = result.host; } else { srcPath.unshift(result.host); }\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') { relPath[0] = relative.host; } else { relPath.unshift(relative.host); }\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\n if (!srcPath) { srcPath = []; }\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\n result.pathname = null;\n // to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n /*\n * if a url ENDs in . or .., then it must get a trailing slash.\n * however, if it ends in anything else non-slashy,\n * then it must NOT get a trailing slash.\n */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n /*\n * strip single dots, resolve double dots to parent dir\n * if the path tries to go above the root, `up` ends up > 0\n */\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\n\n//# sourceURL=webpack://GeoRaster/./node_modules/url/url.js?"); - -/***/ }), - -/***/ "./node_modules/util-deprecate/browser.js": -/*!************************************************!*\ - !*** ./node_modules/util-deprecate/browser.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(global) {\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://GeoRaster/./node_modules/util-deprecate/browser.js?"); - -/***/ }), - -/***/ "./node_modules/webpack/buildin/global.js": -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://GeoRaster/(webpack)/buildin/global.js?"); - -/***/ }), - -/***/ "./node_modules/webpack/buildin/module.js": -/*!***********************************!*\ - !*** (webpack)/buildin/module.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack://GeoRaster/(webpack)/buildin/module.js?"); - -/***/ }), - -/***/ "./node_modules/worker-loader/dist/workers/InlineWorker.js": -/*!*****************************************************************!*\ - !*** ./node_modules/worker-loader/dist/workers/InlineWorker.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string\n\nvar URL = window.URL || window.webkitURL;\n\nmodule.exports = function (content, url) {\n try {\n try {\n var blob;\n\n try {\n // BlobBuilder = Deprecated, but widely implemented\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n\n blob = new BlobBuilder();\n\n blob.append(content);\n\n blob = blob.getBlob();\n } catch (e) {\n // The proposed API\n blob = new Blob([content]);\n }\n\n return new Worker(URL.createObjectURL(blob));\n } catch (e) {\n return new Worker('data:application/javascript,' + encodeURIComponent(content));\n }\n } catch (e) {\n if (!url) {\n throw Error('Inline worker is not supported');\n }\n\n return new Worker(url);\n }\n};\n\n//# sourceURL=webpack://GeoRaster/./node_modules/worker-loader/dist/workers/InlineWorker.js?"); - -/***/ }), - -/***/ "./node_modules/xdim/src/prepared-select-funcs.js": -/*!********************************************************!*\ - !*** ./node_modules/xdim/src/prepared-select-funcs.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = {\n \"1\": function ({ point }) { const parent = this.data; const index = point[this.d0v0]; return { parent, index, value: parent[index] }; },\n \"2\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]; return { parent, index, value: parent[index] }; },\n \"3\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]; return { parent, index, value: parent[index] }; },\n \"4\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]; return { parent, index, value: parent[index] }; },\n \"5\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]+this.m0v4*point[this.d0v4]; return { parent, index, value: parent[index] }; },\n \"1,1\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = point[this.d1v0]; return { parent, index, value: parent[index] }; },\n \"1,2\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]; return { parent, index, value: parent[index] }; },\n \"1,3\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]; return { parent, index, value: parent[index] }; },\n \"1,4\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]; return { parent, index, value: parent[index] }; },\n \"1,5\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]+this.m1v4*point[this.d1v4]; return { parent, index, value: parent[index] }; },\n \"1,1,1\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = point[this.d2v0]; return { parent, index, value: parent[index] }; },\n \"1,1,2\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]; return { parent, index, value: parent[index] }; },\n \"1,1,3\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]; return { parent, index, value: parent[index] }; },\n \"1,1,4\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]; return { parent, index, value: parent[index] }; },\n \"1,1,5\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]+this.m2v4*point[this.d2v4]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = point[this.d3v0]; return { parent, index, value: parent[index] }; },\n \"1,1,1,2\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]; return { parent, index, value: parent[index] }; },\n \"1,1,1,3\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]; return { parent, index, value: parent[index] }; },\n \"1,1,1,4\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]; return { parent, index, value: parent[index] }; },\n \"1,1,1,5\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]+this.m3v4*point[this.d3v4]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1,1\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = point[this.d4v0]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1,2\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1,3\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1,4\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]; return { parent, index, value: parent[index] }; },\n \"1,1,1,1,5\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]+this.m4v4*point[this.d4v4]; return { parent, index, value: parent[index] }; }\n}\n\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/prepared-select-funcs.js?"); - -/***/ }), - -/***/ "./node_modules/xdim/src/prepared-update-funcs.js": -/*!********************************************************!*\ - !*** ./node_modules/xdim/src/prepared-update-funcs.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = {\n \"1\": function ({ point, value }) { this.data[point[this.d0v0]] = value; },\n \"2\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]] = value; },\n \"3\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]] = value; },\n \"4\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]] = value; },\n \"5\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]+this.m0v4*point[this.d0v4]] = value; },\n \"1,1\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]] = value; },\n \"1,2\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]] = value; },\n \"1,3\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]] = value; },\n \"1,4\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]] = value; },\n \"1,5\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]+this.m1v4*point[this.d1v4]] = value; },\n \"1,1,1\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]] = value; },\n \"1,1,2\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]] = value; },\n \"1,1,3\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]] = value; },\n \"1,1,4\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]] = value; },\n \"1,1,5\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]+this.m2v4*point[this.d2v4]] = value; },\n \"1,1,1,1\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]] = value; },\n \"1,1,1,2\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]] = value; },\n \"1,1,1,3\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]] = value; },\n \"1,1,1,4\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]] = value; },\n \"1,1,1,5\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]+this.m3v4*point[this.d3v4]] = value; },\n \"1,1,1,1,1\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][point[this.d4v0]] = value; },\n \"1,1,1,1,2\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]] = value; },\n \"1,1,1,1,3\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]] = value; },\n \"1,1,1,1,4\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]] = value; },\n \"1,1,1,1,5\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]+this.m4v4*point[this.d4v4]] = value; }\n}\n\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/prepared-update-funcs.js?"); - -/***/ }), - -/***/ "./node_modules/xdim/src/xdim.js": -/*!***************************************!*\ - !*** ./node_modules/xdim/src/xdim.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("const layoutCache = {};\nconst { wrapNextFunction } = __webpack_require__(/*! iter-fun */ \"./node_modules/iter-fun/index.js\");\nconst preparedSelectFunctions = __webpack_require__(/*! ./prepared-select-funcs.js */ \"./node_modules/xdim/src/prepared-select-funcs.js\");\nconst preparedUpdateFunctions = __webpack_require__(/*! ./prepared-update-funcs.js */ \"./node_modules/xdim/src/prepared-update-funcs.js\");\n\nconst ARRAY_TYPES = {\n Array,\n Int8Array,\n Uint8Array,\n Uint8ClampedArray,\n Int16Array,\n Uint16Array,\n Float32Array,\n Float64Array\n};\n\ntry {\n ARRAY_TYPES.BigInt64Array = BigInt64Array;\n ARRAY_TYPES.BigUint64Array = BigUint64Array;\n} catch (error) {\n // pass\n}\n\nfunction parseDimensions(str) {\n const dims = {};\n const re = /[A-Za-z]+/g;\n let arr;\n while ((arr = re.exec(str)) !== null) {\n const [match] = arr;\n dims[match] = {\n name: match\n };\n }\n return dims;\n}\n\nfunction normalizeLayoutString(str) {\n const alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n let i = 0;\n return str.replace(/[A-Za-z]+/g, () => alphabet[i++]);\n}\n\nconst parseVectors = str => str.match(/\\[[^\\]]+\\]/g);\n\n// \"[row]\" to \"row\"\nconst removeBraces = str => (str.startsWith(\"[\") && str.endsWith(\"]\") ? str.substring(1, str.length - 1) : str);\n\n// \"(row)\" to \"row\"\nconst removeParentheses = str => (str.startsWith(\"(\") && str.endsWith(\")\") ? str.substring(1, str.length - 1) : str);\n\n// sort of like parsing a CSV except instead of \" for quotes use (\nconst matchSequences = str => str.match(/(\\(.*?\\)|[^\\(,\\s]+)(?=\\s*,|\\s*$)/g);\n\nconst parseSequences = str => {\n // unwrap [...]\n str = removeBraces(str);\n\n // unwrap (...)\n str = removeParentheses(str);\n\n const seqs = matchSequences(str);\n\n if (seqs.length === 1) {\n return {\n type: \"Vector\",\n dim: seqs[0]\n };\n } else {\n return {\n type: \"Matrix\",\n parts: seqs.map(parseSequences)\n };\n }\n};\n\nfunction checkValidity(str) {\n const invalid = str.match(/[^ A-Za-z,\\[\\]]/g);\n if (invalid) {\n throw new Error(\"The following invalid characters were used: \" + invalid.map(c => `\"${c}\"`).join(\", \"));\n } else {\n return true;\n }\n}\n\nfunction parse(str, { useLayoutCache = true } = { useLayoutCache: true }) {\n if (useLayoutCache && str in layoutCache) return layoutCache[str];\n\n checkValidity(str);\n\n const vectors = parseVectors(str);\n const dims = vectors.map(parseSequences);\n const result = {\n type: \"Layout\",\n summary: dims.map(it => (it.type === \"Matrix\" ? it.parts.length : 1)),\n dims\n };\n\n if (useLayoutCache) layoutCache[str] = result;\n\n return result;\n}\n\nfunction update({ useLayoutCache = true, data, layout, point, sizes = {}, value }) {\n if (typeof layout === \"string\") layout = parse(layout, { useLayoutCache });\n\n const { dims } = layout;\n for (let idim = 0; idim < dims.length; idim++) {\n const last = idim === dims.length - 1;\n const arr = dims[idim];\n let offset;\n if (arr.type === \"Vector\") {\n offset = point[arr.dim];\n } else {\n // arr.type assumed to be \"Matrix\"\n const { parts } = arr;\n offset = 0;\n let multiplier = 1;\n for (let i = parts.length - 1; i >= 0; i--) {\n const part = parts[i];\n const { dim } = part;\n offset += multiplier * point[dim];\n if (i > 0) {\n if (!(dim in sizes)) throw new Error(`you cannot calculate the location without knowing the size of the \"${dim}\" dimension.`);\n multiplier *= sizes[dim];\n }\n }\n }\n if (last) {\n data[offset] = value;\n } else {\n data = data[offset];\n }\n }\n}\n\nfunction prepareUpdate({ useLayoutCache = true, data, layout, sizes = {} }) {\n if (typeof layout === \"string\") {\n layout = parse(layout, { useLayoutCache });\n }\n const { dims } = layout;\n const numDims = dims.length;\n const multipliers = getMultipliers({ useLayoutCache, layout, sizes });\n const end = numDims - 1;\n\n const key = layout.summary.toString();\n if (key in preparedUpdateFunctions) {\n const _this = { data };\n layout.dims.map((it, depth) => {\n if (it.type === \"Vector\") {\n _this[`d${depth}v0`] = it.dim;\n } else if (it.type === \"Matrix\") {\n it.parts.forEach((part, ipart) => {\n _this[`d${depth}v${ipart}`] = part.dim;\n _this[`m${depth}v${ipart}`] = multipliers[part.dim];\n });\n }\n });\n\n return preparedUpdateFunctions[key].bind(_this);\n }\n\n return ({ point, value }) => {\n let currentData = data;\n for (let idim = 0; idim < numDims; idim++) {\n const last = idim === end;\n const arr = dims[idim];\n let offset;\n if (arr.type === \"Vector\") {\n offset = point[arr.dim];\n } else {\n // arr.type assumed to be \"Matrix\"\n offset = arr.parts.reduce((acc, { dim }) => acc + multipliers[dim] * point[dim], 0);\n }\n if (last) {\n currentData[offset] = value;\n } else {\n currentData = currentData[offset];\n }\n }\n };\n}\n\nfunction iterClip({ data, layout, order, rect = {}, sizes = {}, useLayoutCache = true }) {\n if (!data) throw new Error(\"[xdim] must specify data\");\n if (!layout) throw new Error(\"[xdim] must specify layout\");\n const points = iterPoints({ order, sizes, rect });\n return wrapNextFunction(function next() {\n const { value: point, done } = points.next();\n if (done) {\n return { done: true };\n } else {\n const { value } = select({ data, layout, point, sizes, useLayoutCache });\n return { done: false, value };\n }\n });\n}\n\nfunction validateRect({ rect = {} }) {\n if (rect) {\n for (let key in rect) {\n const value = rect[key];\n if (value.length !== 2) throw new Error(`[xdim] uh oh. invalid hyper-rectangle`);\n const [start, end] = value;\n if (start > end) throw new Error(`[xdim] uh oh. invalid range for \"${key}\". Start of ${start} can't be greater than end of ${end}.`);\n if (start < 0) throw new Error(`[xdim] uh oh. invalid hyper-rectangle with start ${start}`);\n }\n }\n}\n\nfunction clip({ useLayoutCache = true, data, layout, rect, sizes = {}, flat = false, validate = true }) {\n if (validate) validateRect({ rect });\n\n if (typeof layout === \"string\") layout = parse(layout, { useLayoutCache });\n\n let datas = [data];\n\n layout.dims.forEach(arr => {\n let new_datas = [];\n datas.forEach(data => {\n if (arr.type === \"Vector\") {\n const [start, end] = rect[arr.dim];\n new_datas = new_datas.concat(data.slice(start, end + 1));\n } else {\n // only 2 types so must be arr.type === \"Matrix\"\n const { parts } = arr;\n let offsets = [0];\n let multiplier = 1;\n for (let i = parts.length - 1; i >= 0; i--) {\n const part = parts[i];\n // assume part.type === \"Vector\"\n const { dim } = part;\n const [start, end] = rect[dim];\n const new_offsets = [];\n for (let n = start; n <= end; n++) {\n offsets.forEach(offset => {\n new_offsets.push(offset + multiplier * n);\n });\n }\n offsets = new_offsets;\n multiplier *= sizes[dim];\n }\n offsets.forEach(offset => {\n new_datas.push(data[offset]);\n });\n }\n });\n datas = new_datas;\n });\n\n if (flat) {\n return {\n data: datas\n };\n }\n\n // prepareResult\n const out_sizes = Object.fromEntries(Object.entries(rect).map(([dim, [start, end]]) => [dim, end - start + 1]));\n\n const { data: out_data } = prepareData({\n layout,\n sizes: out_sizes\n });\n\n const max_depth = layout.dims.length;\n\n const step = (arr, depth) => {\n if (depth === max_depth) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = datas.shift();\n }\n } else {\n arr.forEach(sub => step(sub, depth + 1));\n }\n };\n step(out_data, 1);\n\n return { data: out_data };\n}\n\nfunction getMultipliers({ useLayoutCache = true, layout, sizes }) {\n if (typeof layout === \"string\") {\n layout = parse(layout, { useLayoutCache });\n }\n const { dims } = layout;\n const numDims = dims.length;\n let multipliers = {};\n for (let idim = 0; idim < numDims; idim++) {\n const arr = dims[idim];\n if (arr.type === \"Vector\") {\n multipliers[arr.dim] = 1;\n } else {\n // arr.type assumed to be \"Matrix\"\n const { parts } = arr;\n let multiplier = 1;\n for (let i = parts.length - 1; i >= 0; i--) {\n const { dim } = parts[i];\n multipliers[dim] = multiplier;\n multiplier *= sizes[parts[i].dim];\n }\n }\n }\n return multipliers;\n}\n\nfunction prepareSelect({ useLayoutCache = true, data, layout, sizes = {} }) {\n if (typeof layout === \"string\") {\n layout = parse(layout, { useLayoutCache });\n }\n const { dims } = layout;\n const numDims = dims.length;\n const multipliers = getMultipliers({ useLayoutCache, layout, sizes });\n const end = numDims - 1;\n\n const key = layout.summary.toString();\n if (key in preparedSelectFunctions) {\n const _this = { data };\n layout.dims.map((it, depth) => {\n if (it.type === \"Vector\") {\n _this[`d${depth}v0`] = it.dim;\n } else if (it.type === \"Matrix\") {\n it.parts.forEach((part, ipart) => {\n _this[`d${depth}v${ipart}`] = part.dim;\n _this[`m${depth}v${ipart}`] = multipliers[part.dim];\n });\n }\n });\n\n return preparedSelectFunctions[key].bind(_this);\n }\n\n return ({ point }) => {\n let currentData = data;\n for (let idim = 0; idim < numDims; idim++) {\n const last = idim === end;\n const arr = dims[idim];\n let offset;\n if (arr.type === \"Vector\") {\n offset = point[arr.dim];\n } else {\n // arr.type assumed to be \"Matrix\"\n offset = arr.parts.reduce((acc, { dim }) => acc + multipliers[dim] * point[dim], 0);\n }\n if (last) {\n return {\n index: offset,\n parent: currentData,\n value: currentData[offset]\n };\n } else {\n currentData = currentData[offset];\n }\n }\n };\n}\n\nfunction select({ useLayoutCache = true, data, layout, point, sizes = {} }) {\n // converts layout expression to a layout object\n if (typeof layout === \"string\") {\n layout = parse(layout, { useLayoutCache });\n }\n\n let parent;\n let index;\n let value = data;\n // dims are arrays\n const { dims } = layout;\n const len = dims.length;\n for (let idim = 0; idim < len; idim++) {\n const arr = dims[idim];\n if (arr.type === \"Vector\") {\n const i = point[arr.dim];\n parent = value;\n index = i;\n value = value[i];\n } else {\n // only 2 types so must be a Matrix\n const { parts } = arr;\n let offset = 0;\n let multiplier = 1;\n for (let i = parts.length - 1; i >= 0; i--) {\n const part = parts[i];\n if (part.type === \"Vector\") {\n const { dim } = part;\n offset += multiplier * point[dim];\n if (i > 0) {\n if (!(dim in sizes)) throw new Error(`you cannot calculate the location without knowing the size of the \"${dim}\" dimension.`);\n multiplier *= sizes[dim];\n }\n }\n }\n parent = value;\n index = offset;\n value = value[offset];\n }\n }\n\n return { index, value, parent };\n}\n\n// add dimensions to an array until the limit reaches zero\nfunction addDims({ arr, fill = undefined, lens, arrayTypes }) {\n // no new dimensions to add\n if (lens.length === 0) return arr;\n\n const len = lens[0];\n if (lens.length === 1) {\n const lastArrayType = arrayTypes ? arrayTypes[arrayTypes.length - 1] : \"Array\";\n for (let i = 0; i < arr.length; i++) {\n arr[i] = new ARRAY_TYPES[lastArrayType](len).fill(fill);\n }\n } else {\n for (let i = 0; i < arr.length; i++) {\n const sub = new Array(len).fill(fill);\n arr[i] = sub;\n addDims({ arr: sub, fill, lens: lens.slice(1), arrayTypes });\n }\n }\n return arr;\n}\n\n// to-do: maybe only call fill if not undefined or default typed array value?\nfunction createMatrix({ fill = undefined, shape, arrayTypes }) {\n const len = shape[0];\n if (shape.length === 1) {\n if (Array.isArray(arrayTypes) && arrayTypes.length !== 1) throw new Error(\"[xdim] shape and arrayTypes have different lengths\");\n const arrayType = Array.isArray(arrayTypes) ? arrayTypes[0] : \"Array\";\n return new ARRAY_TYPES[arrayType](len).fill(fill);\n }\n const arr = new Array(len).fill(fill);\n return addDims({ arr, fill, lens: shape.slice(1), arrayTypes });\n}\n\n// generates an in-memory data structure to hold the data\nfunction prepareData({ fill = undefined, layout, useLayoutCache = true, sizes, arrayTypes }) {\n if (typeof layout === \"string\") layout = parse(layout, { useLayoutCache });\n\n // console.log(\"layout:\", layout);\n const shape = layout.dims.map(it => {\n if (it.type === \"Vector\") {\n return sizes[it.dim];\n } else if (it.type === \"Matrix\") {\n return it.parts.reduce((total, part) => {\n if (!(part.dim in sizes)) throw new Error(`[xdim] could not find \"${part.dim}\" in sizes: { ${Object.keys(sizes).join(\", \")} }`);\n return total * sizes[part.dim];\n }, 1);\n }\n });\n\n const data = createMatrix({ fill, shape, arrayTypes });\n\n return { data, shape, arrayTypes };\n}\n\n// assume positive step\nfunction iterRange({ start = 0, end = 100 }) {\n let i = start - 1;\n end = end + 1;\n return wrapNextFunction(function next() {\n i++;\n if (i === end) {\n return { done: true };\n } else {\n return { done: false, value: i };\n }\n });\n}\n\n// iterate over all the points, saving memory vs array\nfunction iterPoints({ order, sizes, rect = {} }) {\n // names sorted by shortest dimension to longest dimension\n const names = Array.isArray(order) ? order : Object.keys(sizes).sort((a, b) => sizes[a] - sizes[b]);\n\n const iters = new Array(names.length);\n const current = {};\n for (let i = 0; i < names.length - 1; i++) {\n const name = names[i];\n const [start, end] = rect[name] || [0, sizes[name] - 1];\n iters[i] = iterRange({ start: start + 1, end });\n current[name] = start;\n }\n const lastName = names[names.length - 1];\n const [start, end] = rect[lastName] || [0, sizes[lastName] - 1];\n iters[iters.length - 1] = iterRange({ start: start, end });\n current[lastName] = start - 1;\n\n // permutate\n return wrapNextFunction(function next() {\n for (let i = iters.length - 1; i >= 0; i--) {\n const { value, done } = iters[i].next();\n\n if (done) {\n if (i === 0) {\n // we have exhausted all of the permutations\n return { done: true };\n }\n } else {\n // add iters for the remaining dims\n for (let ii = i + 1; ii < iters.length; ii++) {\n const nameii = names[ii];\n const [start, end] = rect[nameii] || [0, sizes[nameii] - 1];\n iters[ii] = iterRange({ start: start + 1, end });\n current[nameii] = start;\n }\n\n current[names[i]] = value;\n\n return { value: current, done: false };\n }\n }\n });\n}\n\nfunction transform({ data, fill = undefined, from, to, sizes, useLayoutCache = true }) {\n if (typeof from === \"string\") from = parse(from, { useLayoutCache });\n if (typeof to === \"string\") to = parse(to, { useLayoutCache });\n\n const { data: out_data } = prepareData({ fill, layout: to, sizes });\n\n const update = prepareUpdate({\n useLayoutCache,\n data: out_data,\n layout: to,\n sizes\n });\n\n const points = iterPoints({ sizes });\n\n for (point of points) {\n const { value } = select({\n data,\n layout: from,\n point,\n sizes\n });\n\n // insert into new frame\n update({\n point,\n value\n });\n }\n\n return { data: out_data };\n}\n\nmodule.exports = {\n addDims,\n checkValidity,\n createMatrix,\n iterClip,\n iterRange,\n iterPoints,\n matchSequences,\n parse,\n parseDimensions,\n parseSequences,\n parseVectors,\n prepareData,\n prepareSelect,\n prepareUpdate,\n removeBraces,\n removeParentheses,\n select,\n transform,\n update,\n clip,\n validateRect\n};\n\n\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/xdim.js?"); - -/***/ }), - -/***/ "./node_modules/xtend/immutable.js": -/*!*****************************************!*\ - !*** ./node_modules/xtend/immutable.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n\n\n//# sourceURL=webpack://GeoRaster/./node_modules/xtend/immutable.js?"); - -/***/ }), - -/***/ "./src/index.js": -/*!**********************!*\ - !*** ./src/index.js ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n/* global Blob */\n/* global URL */\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _crossFetch = __webpack_require__(/*! cross-fetch */ \"./node_modules/cross-fetch/dist/browser-ponyfill.js\");\n\nvar _crossFetch2 = _interopRequireDefault(_crossFetch);\n\nvar _worker = __webpack_require__(/*! ./worker.js */ \"./src/worker.js\");\n\nvar _worker2 = _interopRequireDefault(_worker);\n\nvar _parseData = __webpack_require__(/*! ./parseData.js */ \"./src/parseData.js\");\n\nvar _parseData2 = _interopRequireDefault(_parseData);\n\nvar _utils = __webpack_require__(/*! ./utils.js */ \"./src/utils.js\");\n\nvar _geotiff = __webpack_require__(/*! geotiff */ \"./node_modules/geotiff/src/geotiff.js\");\n\nvar _georasterToCanvas = __webpack_require__(/*! georaster-to-canvas */ \"./node_modules/georaster-to-canvas/index.js\");\n\nvar _georasterToCanvas2 = _interopRequireDefault(_georasterToCanvas);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction urlExists(url) {\n try {\n return (0, _crossFetch2.default)(url, { method: 'HEAD' }).then(function (response) {\n return response.status === 200;\n }).catch(function (error) {\n return false;\n });\n } catch (error) {\n return Promise.resolve(false);\n }\n}\n\nfunction getValues(geotiff, options) {\n var left = options.left,\n top = options.top,\n right = options.right,\n bottom = options.bottom,\n width = options.width,\n height = options.height,\n resampleMethod = options.resampleMethod;\n // note this.image and this.geotiff both have a readRasters method;\n // they are not the same thing. use this.geotiff for experimental version\n // that reads from best overview\n\n return geotiff.readRasters({\n window: [left, top, right, bottom],\n width: width,\n height: height,\n resampleMethod: resampleMethod || 'bilinear'\n }).then(function (rasters) {\n /*\n The result appears to be an array with a width and height property set.\n We only need the values, assuming the user remembers the width and height.\n Ex: [[0,27723,...11025,12924], width: 10, height: 10]\n */\n return rasters.map(function (raster) {\n return (0, _utils.unflatten)(raster, { height: height, width: width });\n });\n });\n};\n\nvar GeoRaster = function () {\n function GeoRaster(data, metadata, debug) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, GeoRaster);\n\n if (debug) console.log('starting GeoRaster.constructor with', data, metadata);\n\n this._web_worker_is_available = typeof window !== 'undefined' && typeof window.Worker !== 'undefined';\n this._blob_is_available = typeof Blob !== 'undefined';\n this._url_is_available = typeof URL !== 'undefined';\n this._options = options;\n\n // check if should convert to buffer\n if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object' && data.constructor && data.constructor.name === 'Buffer' && Buffer.isBuffer(data) === false) {\n data = new Buffer(data);\n }\n\n this.readOnDemand = false;\n if (typeof data === 'string') {\n if (debug) console.log('data is a url');\n this._data = data;\n this._url = data;\n this.rasterType = 'geotiff';\n this.sourceType = 'url';\n this.readOnDemand = true;\n } else if (typeof Blob !== 'undefined' && data instanceof Blob) {\n this._data = data;\n this.rasterType = 'geotiff';\n this.sourceType = 'Blob';\n } else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(data)) {\n // this is node\n if (debug) console.log('data is a buffer');\n this._data = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);\n this.rasterType = 'geotiff';\n this.sourceType = 'Buffer';\n } else if (data instanceof ArrayBuffer) {\n // this is browser\n this._data = data;\n this.rasterType = 'geotiff';\n this.sourceType = 'ArrayBuffer';\n this._metadata = metadata;\n } else if (Array.isArray(data) && metadata) {\n this._data = data;\n this.rasterType = 'object';\n this._metadata = metadata;\n }\n if (metadata && metadata.readOnDemand !== undefined) {\n this.readOnDemand = metadata.readOnDemand;\n }\n\n if (debug) console.log('this after construction:', this);\n }\n\n _createClass(GeoRaster, [{\n key: 'preinitialize',\n value: function preinitialize(debug) {\n var _this = this;\n\n if (debug) console.log('starting preinitialize');\n if (this._url) {\n // initialize these outside worker to avoid weird worker error\n // I don't see how cache option is passed through with fromUrl,\n // though constantinius says it should work: https://github.com/geotiffjs/geotiff.js/issues/61\n var ovrURL = this._url + '.ovr';\n return urlExists(ovrURL).then(function (ovrExists) {\n if (debug) console.log('overview exists:', ovrExists);\n _this._options = Object.assign({}, { cache: true, forceXHR: false }, _this._options);\n if (debug) console.log('options:', _this._options);\n if (ovrExists) {\n return (0, _geotiff.fromUrls)(_this._url, [ovrURL], _this._options);\n } else {\n return (0, _geotiff.fromUrl)(_this._url, _this._options);\n }\n });\n } else {\n // no pre-initialization steps required if not using a Cloud Optimized GeoTIFF\n return Promise.resolve();\n }\n }\n }, {\n key: 'initialize',\n value: function initialize(debug) {\n var _this2 = this;\n\n return this.preinitialize(debug).then(function (geotiff) {\n return new Promise(function (resolve, reject) {\n if (debug) console.log('starting GeoRaster.initialize');\n if (debug) console.log('this', _this2);\n\n if (_this2.rasterType === 'object' || _this2.rasterType === 'geotiff' || _this2.rasterType === 'tiff') {\n var parseDataArgs = {\n data: _this2._data,\n options: _this2._options,\n rasterType: _this2.rasterType,\n sourceType: _this2.sourceType,\n readOnDemand: _this2.readOnDemand,\n metadata: _this2._metadata\n };\n if (_this2._web_worker_is_available && !_this2.readOnDemand) {\n var worker = new _worker2.default();\n worker.onmessage = function (e) {\n if (debug) console.log('main thread received message:', e);\n var data = e.data;\n for (var key in data) {\n _this2[key] = data[key];\n }\n if (_this2.readOnDemand) {\n if (_this2._url) _this2._geotiff = geotiff;\n _this2.getValues = function (options) {\n return getValues(this._geotiff, options);\n };\n }\n _this2.toCanvas = function (options) {\n return (0, _georasterToCanvas2.default)(this, options);\n };\n resolve(_this2);\n };\n if (debug) console.log('about to postMessage');\n if (_this2._data instanceof ArrayBuffer) {\n worker.postMessage(parseDataArgs, [_this2._data]);\n } else {\n worker.postMessage(parseDataArgs);\n }\n } else {\n if (debug) console.log('web worker is not available');\n (0, _parseData2.default)(parseDataArgs, debug).then(function (result) {\n if (debug) console.log('result:', result);\n if (_this2.readOnDemand) {\n if (_this2._url) result._geotiff = geotiff;\n result.getValues = function (options) {\n return getValues(this._geotiff, options);\n };\n }\n result.toCanvas = function (options) {\n return (0, _georasterToCanvas2.default)(this, options);\n };\n resolve(result);\n }).catch(reject);\n }\n } else {\n reject('couldn\\'t find a way to parse');\n }\n });\n });\n }\n }]);\n\n return GeoRaster;\n}();\n\nvar parseGeoraster = function parseGeoraster(input, metadata, debug) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n if (debug) console.log('starting parseGeoraster with ', input, metadata);\n\n if (input === undefined) {\n var errorMessage = '[Georaster.parseGeoraster] Error. You passed in undefined to parseGeoraster. We can\\'t make a raster out of nothing!';\n throw Error(errorMessage);\n }\n\n return new GeoRaster(input, metadata, debug, options).initialize(debug);\n};\n\nif ( true && typeof module.exports !== 'undefined') {\n module.exports = parseGeoraster;\n}\n\n/*\n The following code allows you to use GeoRaster without requiring\n*/\nif (typeof window !== 'undefined') {\n window['parseGeoraster'] = parseGeoraster;\n} else if (typeof self !== 'undefined') {\n self['parseGeoraster'] = parseGeoraster; // jshint ignore:line\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/node-libs-browser/node_modules/buffer/index.js */ \"./node_modules/node-libs-browser/node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://GeoRaster/./src/index.js?"); - -/***/ }), - -/***/ "./src/parseData.js": -/*!**************************!*\ - !*** ./src/parseData.js ***! - \**************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = parseData;\n\nvar _geotiff = __webpack_require__(/*! geotiff */ \"./node_modules/geotiff/src/geotiff.js\");\n\nvar _geotiffPalette = __webpack_require__(/*! geotiff-palette */ \"./node_modules/geotiff-palette/index.js\");\n\nvar _calcImageStats = __webpack_require__(/*! calc-image-stats */ \"./node_modules/calc-image-stats/dist/calc-image-stats.min.js\");\n\nvar _calcImageStats2 = _interopRequireDefault(_calcImageStats);\n\nvar _utils = __webpack_require__(/*! ./utils.js */ \"./src/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction processResult(result) {\n var stats = (0, _calcImageStats2.default)(result.values, {\n height: result.height,\n layout: '[band][row][column]',\n noData: result.noDataValue,\n precise: false,\n stats: ['max', 'min', 'range'],\n width: result.width\n });\n\n result.maxs = stats.bands.map(function (band) {\n return band.max;\n });\n result.mins = stats.bands.map(function (band) {\n return band.min;\n });\n result.ranges = stats.bands.map(function (band) {\n return band.range;\n });\n\n return result;\n}\n\n/* We're not using async because trying to avoid dependency on babel's polyfill\nThere can be conflicts when GeoRaster is used in another project that is also\nusing @babel/polyfill */\nfunction parseData(data, debug) {\n return new Promise(function (resolve, reject) {\n try {\n if (debug) console.log('starting parseData with', data);\n if (debug) console.log('\\tGeoTIFF:', typeof GeoTIFF === 'undefined' ? 'undefined' : _typeof(GeoTIFF));\n\n var result = {};\n\n var height = void 0,\n width = void 0;\n\n if (data.rasterType === 'object') {\n result.values = data.data;\n result.height = height = data.metadata.height || result.values[0].length;\n result.width = width = data.metadata.width || result.values[0][0].length;\n result.pixelHeight = data.metadata.pixelHeight;\n result.pixelWidth = data.metadata.pixelWidth;\n result.projection = data.metadata.projection;\n result.xmin = data.metadata.xmin;\n result.ymax = data.metadata.ymax;\n result.noDataValue = data.metadata.noDataValue;\n result.numberOfRasters = result.values.length;\n result.xmax = result.xmin + result.width * result.pixelWidth;\n result.ymin = result.ymax - result.height * result.pixelHeight;\n result._data = null;\n resolve(processResult(result));\n } else if (data.rasterType === 'geotiff') {\n result._data = data.data;\n var initArgs = [data.data];\n var initFunction = _geotiff.fromArrayBuffer;\n if (data.sourceType === 'url') {\n initFunction = _geotiff.fromUrl;\n initArgs.push(data.options);\n } else if (data.sourceType === 'Blob') {\n initFunction = _geotiff.fromBlob;\n }\n\n if (debug) console.log('data.rasterType is geotiff');\n resolve(initFunction.apply(undefined, initArgs).then(function (geotiff) {\n if (debug) console.log('geotiff:', geotiff);\n return geotiff.getImage().then(function (image) {\n try {\n if (debug) console.log('image:', image);\n\n var fileDirectory = image.fileDirectory;\n\n var _ref = image.getGeoKeys() || {},\n GeographicTypeGeoKey = _ref.GeographicTypeGeoKey,\n ProjectedCSTypeGeoKey = _ref.ProjectedCSTypeGeoKey;\n\n result.projection = ProjectedCSTypeGeoKey || GeographicTypeGeoKey || data.metadata.projection;\n if (debug) console.log('projection:', result.projection);\n\n result.height = height = image.getHeight();\n if (debug) console.log('result.height:', result.height);\n result.width = width = image.getWidth();\n if (debug) console.log('result.width:', result.width);\n\n var _image$getResolution = image.getResolution(),\n _image$getResolution2 = _slicedToArray(_image$getResolution, 2),\n resolutionX = _image$getResolution2[0],\n resolutionY = _image$getResolution2[1];\n\n result.pixelHeight = Math.abs(resolutionY);\n result.pixelWidth = Math.abs(resolutionX);\n\n var _image$getOrigin = image.getOrigin(),\n _image$getOrigin2 = _slicedToArray(_image$getOrigin, 2),\n originX = _image$getOrigin2[0],\n originY = _image$getOrigin2[1];\n\n result.xmin = originX;\n result.xmax = result.xmin + width * result.pixelWidth;\n result.ymax = originY;\n result.ymin = result.ymax - height * result.pixelHeight;\n\n result.noDataValue = fileDirectory.GDAL_NODATA ? parseFloat(fileDirectory.GDAL_NODATA) : null;\n\n result.numberOfRasters = fileDirectory.SamplesPerPixel;\n\n if (fileDirectory.ColorMap) {\n result.palette = (0, _geotiffPalette.getPalette)(image);\n }\n\n if (!data.readOnDemand) {\n return image.readRasters().then(function (rasters) {\n result.values = rasters.map(function (valuesInOneDimension) {\n return (0, _utils.unflatten)(valuesInOneDimension, { height: height, width: width });\n });\n return processResult(result);\n });\n } else {\n result._geotiff = geotiff;\n return result;\n }\n } catch (error) {\n reject(error);\n console.error('[georaster] error parsing georaster:', error);\n }\n });\n }));\n }\n } catch (error) {\n reject(error);\n console.error('[georaster] error parsing georaster:', error);\n }\n });\n}\n\n//# sourceURL=webpack://GeoRaster/./src/parseData.js?"); - -/***/ }), - -/***/ "./src/utils.js": -/*!**********************!*\ - !*** ./src/utils.js ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nfunction countIn1D(array) {\n return array.reduce(function (counts, value) {\n if (counts[value] === undefined) {\n counts[value] = 1;\n } else {\n counts[value]++;\n }\n return counts;\n }, {});\n}\n\nfunction countIn2D(rows) {\n return rows.reduce(function (counts, values) {\n values.forEach(function (value) {\n if (counts[value] === undefined) {\n counts[value] = 1;\n } else {\n counts[value]++;\n }\n });\n return counts;\n }, {});\n}\n\n/*\nTakes in a flattened one dimensional typed array\nrepresenting two-dimensional pixel values\nand returns an array of typed arrays with the same buffer.\n*/\nfunction unflatten(valuesInOneDimension, size) {\n var height = size.height,\n width = size.width;\n\n var valuesInTwoDimensions = [];\n for (var y = 0; y < height; y++) {\n var start = y * width;\n var end = start + width;\n valuesInTwoDimensions.push(valuesInOneDimension.subarray(start, end));\n }\n return valuesInTwoDimensions;\n}\n\nmodule.exports = { countIn1D: countIn1D, countIn2D: countIn2D, unflatten: unflatten };\n\n//# sourceURL=webpack://GeoRaster/./src/utils.js?"); - -/***/ }), - -/***/ "./src/worker.js": -/*!***********************!*\ - !*** ./src/worker.js ***! - \***********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("module.exports=function(){return __webpack_require__(/*! !./node_modules/worker-loader/dist/workers/InlineWorker.js */ \"./node_modules/worker-loader/dist/workers/InlineWorker.js\")(\"/******/ (function(modules) { // webpackBootstrap\\n/******/ \\t// The module cache\\n/******/ \\tvar installedModules = {};\\n/******/\\n/******/ \\t// The require function\\n/******/ \\tfunction __webpack_require__(moduleId) {\\n/******/\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tif(installedModules[moduleId]) {\\n/******/ \\t\\t\\treturn installedModules[moduleId].exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = installedModules[moduleId] = {\\n/******/ \\t\\t\\ti: moduleId,\\n/******/ \\t\\t\\tl: false,\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\\n/******/\\n/******/ \\t\\t// Flag the module as loaded\\n/******/ \\t\\tmodule.l = true;\\n/******/\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/\\n/******/\\n/******/ \\t// expose the modules object (__webpack_modules__)\\n/******/ \\t__webpack_require__.m = modules;\\n/******/\\n/******/ \\t// expose the module cache\\n/******/ \\t__webpack_require__.c = installedModules;\\n/******/\\n/******/ \\t// define getter function for harmony exports\\n/******/ \\t__webpack_require__.d = function(exports, name, getter) {\\n/******/ \\t\\tif(!__webpack_require__.o(exports, name)) {\\n/******/ \\t\\t\\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\\n/******/ \\t\\t}\\n/******/ \\t};\\n/******/\\n/******/ \\t// define __esModule on exports\\n/******/ \\t__webpack_require__.r = function(exports) {\\n/******/ \\t\\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\\n/******/ \\t\\t\\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\\n/******/ \\t\\t}\\n/******/ \\t\\tObject.defineProperty(exports, '__esModule', { value: true });\\n/******/ \\t};\\n/******/\\n/******/ \\t// create a fake namespace object\\n/******/ \\t// mode & 1: value is a module id, require it\\n/******/ \\t// mode & 2: merge all properties of value into the ns\\n/******/ \\t// mode & 4: return value when already ns object\\n/******/ \\t// mode & 8|1: behave like require\\n/******/ \\t__webpack_require__.t = function(value, mode) {\\n/******/ \\t\\tif(mode & 1) value = __webpack_require__(value);\\n/******/ \\t\\tif(mode & 8) return value;\\n/******/ \\t\\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\\n/******/ \\t\\tvar ns = Object.create(null);\\n/******/ \\t\\t__webpack_require__.r(ns);\\n/******/ \\t\\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\\n/******/ \\t\\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\\n/******/ \\t\\treturn ns;\\n/******/ \\t};\\n/******/\\n/******/ \\t// getDefaultExport function for compatibility with non-harmony modules\\n/******/ \\t__webpack_require__.n = function(module) {\\n/******/ \\t\\tvar getter = module && module.__esModule ?\\n/******/ \\t\\t\\tfunction getDefault() { return module['default']; } :\\n/******/ \\t\\t\\tfunction getModuleExports() { return module; };\\n/******/ \\t\\t__webpack_require__.d(getter, 'a', getter);\\n/******/ \\t\\treturn getter;\\n/******/ \\t};\\n/******/\\n/******/ \\t// Object.prototype.hasOwnProperty.call\\n/******/ \\t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\\n/******/\\n/******/ \\t// __webpack_public_path__\\n/******/ \\t__webpack_require__.p = \\\"\\\";\\n/******/\\n/******/\\n/******/ \\t// Load entry module and return exports\\n/******/ \\treturn __webpack_require__(__webpack_require__.s = \\\"./src/worker.js\\\");\\n/******/ })\\n/************************************************************************/\\n/******/ ({\\n\\n/***/ \\\"./node_modules/base64-js/index.js\\\":\\n/*!*****************************************!*\\\\\\n !*** ./node_modules/base64-js/index.js ***!\\n \\\\*****************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nexports.byteLength = byteLength\\\\nexports.toByteArray = toByteArray\\\\nexports.fromByteArray = fromByteArray\\\\n\\\\nvar lookup = []\\\\nvar revLookup = []\\\\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\\\\n\\\\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\\\\nfor (var i = 0, len = code.length; i < len; ++i) {\\\\n lookup[i] = code[i]\\\\n revLookup[code.charCodeAt(i)] = i\\\\n}\\\\n\\\\n// Support decoding URL-safe base64 strings, as Node.js does.\\\\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\\\\nrevLookup['-'.charCodeAt(0)] = 62\\\\nrevLookup['_'.charCodeAt(0)] = 63\\\\n\\\\nfunction getLens (b64) {\\\\n var len = b64.length\\\\n\\\\n if (len % 4 > 0) {\\\\n throw new Error('Invalid string. Length must be a multiple of 4')\\\\n }\\\\n\\\\n // Trim off extra bytes after placeholder bytes are found\\\\n // See: https://github.com/beatgammit/base64-js/issues/42\\\\n var validLen = b64.indexOf('=')\\\\n if (validLen === -1) validLen = len\\\\n\\\\n var placeHoldersLen = validLen === len\\\\n ? 0\\\\n : 4 - (validLen % 4)\\\\n\\\\n return [validLen, placeHoldersLen]\\\\n}\\\\n\\\\n// base64 is 4/3 + up to two characters of the original data\\\\nfunction byteLength (b64) {\\\\n var lens = getLens(b64)\\\\n var validLen = lens[0]\\\\n var placeHoldersLen = lens[1]\\\\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\\\n}\\\\n\\\\nfunction _byteLength (b64, validLen, placeHoldersLen) {\\\\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\\\n}\\\\n\\\\nfunction toByteArray (b64) {\\\\n var tmp\\\\n var lens = getLens(b64)\\\\n var validLen = lens[0]\\\\n var placeHoldersLen = lens[1]\\\\n\\\\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\\\\n\\\\n var curByte = 0\\\\n\\\\n // if there are placeholders, only get up to the last complete 4 chars\\\\n var len = placeHoldersLen > 0\\\\n ? validLen - 4\\\\n : validLen\\\\n\\\\n var i\\\\n for (i = 0; i < len; i += 4) {\\\\n tmp =\\\\n (revLookup[b64.charCodeAt(i)] << 18) |\\\\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\\\\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\\\\n revLookup[b64.charCodeAt(i + 3)]\\\\n arr[curByte++] = (tmp >> 16) & 0xFF\\\\n arr[curByte++] = (tmp >> 8) & 0xFF\\\\n arr[curByte++] = tmp & 0xFF\\\\n }\\\\n\\\\n if (placeHoldersLen === 2) {\\\\n tmp =\\\\n (revLookup[b64.charCodeAt(i)] << 2) |\\\\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\\\\n arr[curByte++] = tmp & 0xFF\\\\n }\\\\n\\\\n if (placeHoldersLen === 1) {\\\\n tmp =\\\\n (revLookup[b64.charCodeAt(i)] << 10) |\\\\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\\\\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\\\\n arr[curByte++] = (tmp >> 8) & 0xFF\\\\n arr[curByte++] = tmp & 0xFF\\\\n }\\\\n\\\\n return arr\\\\n}\\\\n\\\\nfunction tripletToBase64 (num) {\\\\n return lookup[num >> 18 & 0x3F] +\\\\n lookup[num >> 12 & 0x3F] +\\\\n lookup[num >> 6 & 0x3F] +\\\\n lookup[num & 0x3F]\\\\n}\\\\n\\\\nfunction encodeChunk (uint8, start, end) {\\\\n var tmp\\\\n var output = []\\\\n for (var i = start; i < end; i += 3) {\\\\n tmp =\\\\n ((uint8[i] << 16) & 0xFF0000) +\\\\n ((uint8[i + 1] << 8) & 0xFF00) +\\\\n (uint8[i + 2] & 0xFF)\\\\n output.push(tripletToBase64(tmp))\\\\n }\\\\n return output.join('')\\\\n}\\\\n\\\\nfunction fromByteArray (uint8) {\\\\n var tmp\\\\n var len = uint8.length\\\\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\\\\n var parts = []\\\\n var maxChunkLength = 16383 // must be multiple of 3\\\\n\\\\n // go through the array every three bytes, we'll deal with trailing stuff later\\\\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\\\\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\\\\n }\\\\n\\\\n // pad the end with zeros, but make sure to not forget the extra bytes\\\\n if (extraBytes === 1) {\\\\n tmp = uint8[len - 1]\\\\n parts.push(\\\\n lookup[tmp >> 2] +\\\\n lookup[(tmp << 4) & 0x3F] +\\\\n '=='\\\\n )\\\\n } else if (extraBytes === 2) {\\\\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\\\\n parts.push(\\\\n lookup[tmp >> 10] +\\\\n lookup[(tmp >> 4) & 0x3F] +\\\\n lookup[(tmp << 2) & 0x3F] +\\\\n '='\\\\n )\\\\n }\\\\n\\\\n return parts.join('')\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/base64-js/index.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/builtin-status-codes/browser.js\\\":\\n/*!******************************************************!*\\\\\\n !*** ./node_modules/builtin-status-codes/browser.js ***!\\n \\\\******************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"module.exports = {\\\\n \\\\\\\"100\\\\\\\": \\\\\\\"Continue\\\\\\\",\\\\n \\\\\\\"101\\\\\\\": \\\\\\\"Switching Protocols\\\\\\\",\\\\n \\\\\\\"102\\\\\\\": \\\\\\\"Processing\\\\\\\",\\\\n \\\\\\\"200\\\\\\\": \\\\\\\"OK\\\\\\\",\\\\n \\\\\\\"201\\\\\\\": \\\\\\\"Created\\\\\\\",\\\\n \\\\\\\"202\\\\\\\": \\\\\\\"Accepted\\\\\\\",\\\\n \\\\\\\"203\\\\\\\": \\\\\\\"Non-Authoritative Information\\\\\\\",\\\\n \\\\\\\"204\\\\\\\": \\\\\\\"No Content\\\\\\\",\\\\n \\\\\\\"205\\\\\\\": \\\\\\\"Reset Content\\\\\\\",\\\\n \\\\\\\"206\\\\\\\": \\\\\\\"Partial Content\\\\\\\",\\\\n \\\\\\\"207\\\\\\\": \\\\\\\"Multi-Status\\\\\\\",\\\\n \\\\\\\"208\\\\\\\": \\\\\\\"Already Reported\\\\\\\",\\\\n \\\\\\\"226\\\\\\\": \\\\\\\"IM Used\\\\\\\",\\\\n \\\\\\\"300\\\\\\\": \\\\\\\"Multiple Choices\\\\\\\",\\\\n \\\\\\\"301\\\\\\\": \\\\\\\"Moved Permanently\\\\\\\",\\\\n \\\\\\\"302\\\\\\\": \\\\\\\"Found\\\\\\\",\\\\n \\\\\\\"303\\\\\\\": \\\\\\\"See Other\\\\\\\",\\\\n \\\\\\\"304\\\\\\\": \\\\\\\"Not Modified\\\\\\\",\\\\n \\\\\\\"305\\\\\\\": \\\\\\\"Use Proxy\\\\\\\",\\\\n \\\\\\\"307\\\\\\\": \\\\\\\"Temporary Redirect\\\\\\\",\\\\n \\\\\\\"308\\\\\\\": \\\\\\\"Permanent Redirect\\\\\\\",\\\\n \\\\\\\"400\\\\\\\": \\\\\\\"Bad Request\\\\\\\",\\\\n \\\\\\\"401\\\\\\\": \\\\\\\"Unauthorized\\\\\\\",\\\\n \\\\\\\"402\\\\\\\": \\\\\\\"Payment Required\\\\\\\",\\\\n \\\\\\\"403\\\\\\\": \\\\\\\"Forbidden\\\\\\\",\\\\n \\\\\\\"404\\\\\\\": \\\\\\\"Not Found\\\\\\\",\\\\n \\\\\\\"405\\\\\\\": \\\\\\\"Method Not Allowed\\\\\\\",\\\\n \\\\\\\"406\\\\\\\": \\\\\\\"Not Acceptable\\\\\\\",\\\\n \\\\\\\"407\\\\\\\": \\\\\\\"Proxy Authentication Required\\\\\\\",\\\\n \\\\\\\"408\\\\\\\": \\\\\\\"Request Timeout\\\\\\\",\\\\n \\\\\\\"409\\\\\\\": \\\\\\\"Conflict\\\\\\\",\\\\n \\\\\\\"410\\\\\\\": \\\\\\\"Gone\\\\\\\",\\\\n \\\\\\\"411\\\\\\\": \\\\\\\"Length Required\\\\\\\",\\\\n \\\\\\\"412\\\\\\\": \\\\\\\"Precondition Failed\\\\\\\",\\\\n \\\\\\\"413\\\\\\\": \\\\\\\"Payload Too Large\\\\\\\",\\\\n \\\\\\\"414\\\\\\\": \\\\\\\"URI Too Long\\\\\\\",\\\\n \\\\\\\"415\\\\\\\": \\\\\\\"Unsupported Media Type\\\\\\\",\\\\n \\\\\\\"416\\\\\\\": \\\\\\\"Range Not Satisfiable\\\\\\\",\\\\n \\\\\\\"417\\\\\\\": \\\\\\\"Expectation Failed\\\\\\\",\\\\n \\\\\\\"418\\\\\\\": \\\\\\\"I'm a teapot\\\\\\\",\\\\n \\\\\\\"421\\\\\\\": \\\\\\\"Misdirected Request\\\\\\\",\\\\n \\\\\\\"422\\\\\\\": \\\\\\\"Unprocessable Entity\\\\\\\",\\\\n \\\\\\\"423\\\\\\\": \\\\\\\"Locked\\\\\\\",\\\\n \\\\\\\"424\\\\\\\": \\\\\\\"Failed Dependency\\\\\\\",\\\\n \\\\\\\"425\\\\\\\": \\\\\\\"Unordered Collection\\\\\\\",\\\\n \\\\\\\"426\\\\\\\": \\\\\\\"Upgrade Required\\\\\\\",\\\\n \\\\\\\"428\\\\\\\": \\\\\\\"Precondition Required\\\\\\\",\\\\n \\\\\\\"429\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\",\\\\n \\\\\\\"431\\\\\\\": \\\\\\\"Request Header Fields Too Large\\\\\\\",\\\\n \\\\\\\"451\\\\\\\": \\\\\\\"Unavailable For Legal Reasons\\\\\\\",\\\\n \\\\\\\"500\\\\\\\": \\\\\\\"Internal Server Error\\\\\\\",\\\\n \\\\\\\"501\\\\\\\": \\\\\\\"Not Implemented\\\\\\\",\\\\n \\\\\\\"502\\\\\\\": \\\\\\\"Bad Gateway\\\\\\\",\\\\n \\\\\\\"503\\\\\\\": \\\\\\\"Service Unavailable\\\\\\\",\\\\n \\\\\\\"504\\\\\\\": \\\\\\\"Gateway Timeout\\\\\\\",\\\\n \\\\\\\"505\\\\\\\": \\\\\\\"HTTP Version Not Supported\\\\\\\",\\\\n \\\\\\\"506\\\\\\\": \\\\\\\"Variant Also Negotiates\\\\\\\",\\\\n \\\\\\\"507\\\\\\\": \\\\\\\"Insufficient Storage\\\\\\\",\\\\n \\\\\\\"508\\\\\\\": \\\\\\\"Loop Detected\\\\\\\",\\\\n \\\\\\\"509\\\\\\\": \\\\\\\"Bandwidth Limit Exceeded\\\\\\\",\\\\n \\\\\\\"510\\\\\\\": \\\\\\\"Not Extended\\\\\\\",\\\\n \\\\\\\"511\\\\\\\": \\\\\\\"Network Authentication Required\\\\\\\"\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/builtin-status-codes/browser.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/calc-image-stats/dist/calc-image-stats.min.js\\\":\\n/*!********************************************************************!*\\\\\\n !*** ./node_modules/calc-image-stats/dist/calc-image-stats.min.js ***!\\n \\\\********************************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\neval(\\\"var __WEBPACK_AMD_DEFINE_RESULT__;var d=Object.defineProperty;var f=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var p=(e,o,c)=>o in e?d(e,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[o]=c,w=(e,o)=>{for(var c in o||(o={}))b.call(o,c)&&p(e,c,o[c]);if(f)for(var c of f(o))g.call(o,c)&&p(e,c,o[c]);return e};var m=(e,o)=>d(e,\\\\\\\"name\\\\\\\",{value:o,configurable:!0});var S=(e,o)=>{var c={};for(var n in e)b.call(e,n)&&o.indexOf(n)<0&&(c[n]=e[n]);if(e!=null&&f)for(var n of f(e))o.indexOf(n)<0&&g.call(e,n)&&(c[n]=e[n]);return c};const calcStats=__webpack_require__(/*! calc-stats */ \\\\\\\"./node_modules/calc-stats/calc-stats.js\\\\\\\"),guessImageLayout=__webpack_require__(/*! guess-image-layout */ \\\\\\\"./node_modules/guess-image-layout/guess-image-layout.js\\\\\\\"),xdim=__webpack_require__(/*! xdim */ \\\\\\\"./node_modules/xdim/src/xdim.js\\\\\\\"),range=m(e=>new Array(e).fill(0).map((o,c)=>c),\\\\\\\"range\\\\\\\");function calcImageStats(e,k={}){var i=k,{bands:o,height:c,precise:n=!1,stats:j,width:r,layout:t}=i,q=S(i,[\\\\\\\"bands\\\\\\\",\\\\\\\"height\\\\\\\",\\\\\\\"precise\\\\\\\",\\\\\\\"stats\\\\\\\",\\\\\\\"width\\\\\\\",\\\\\\\"layout\\\\\\\"]);if(typeof e.then==\\\\\\\"function\\\\\\\")throw new Error(\\\\\\\"[calc-image-stats] you passed in a promise as the data values. please resolve the promise first before calling calcImageStats\\\\\\\");const s=guessImageLayout({bands:o,data:e,height:c,layout:t,width:r});o!=null||(o=s.bands),c!=null||(c=s.height),t!=null||(t=s.layout),r!=null||(r=s.width);const I=range(o).map(l=>{let a;const u=w({precise:n,stats:j},q);if([\\\\\\\"[band][row,column]\\\\\\\",\\\\\\\"[band][column,row]\\\\\\\"].includes(t))a=e[l];else if([\\\\\\\"[band][row][column]\\\\\\\",\\\\\\\"[band][column][row]\\\\\\\"].includes(t))a=e[l],u.chunked=!0;else if(o===1&&[\\\\\\\"[band,row,column]\\\\\\\",\\\\\\\"[row,column,band]\\\\\\\",\\\\\\\"[column,band,row]\\\\\\\",\\\\\\\"[column,row,band]\\\\\\\"].includes(t))a=e;else{const x={band:[l,l]},R={band:o,column:r,row:c};a=xdim.iterClip({data:e,layout:t,rect:x,sizes:R})}return calcStats(a,u)});return{depth:o,height:c,width:r,bands:I}}m(calcImageStats,\\\\\\\"calcImageStats\\\\\\\"), true&&!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return calcImageStats}).call(exports, __webpack_require__, exports, module),\\\\n\\\\t\\\\t\\\\t\\\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)), true&&(module.exports=calcImageStats,module.exports.default=calcImageStats,module.exports.calcImageStats=calcImageStats),typeof self==\\\\\\\"object\\\\\\\"&&(self.calcImageStats=calcImageStats),typeof window==\\\\\\\"object\\\\\\\"&&(self.calcImageStats=calcImageStats);\\\\n//# sourceMappingURL=calc-image-stats.min.js.map\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/calc-image-stats/dist/calc-image-stats.min.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/calc-stats/calc-stats.js\\\":\\n/*!***********************************************!*\\\\\\n !*** ./node_modules/calc-stats/calc-stats.js ***!\\n \\\\***********************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\neval(\\\"var __WEBPACK_AMD_DEFINE_RESULT__;const { getOrCreateIterator } = __webpack_require__(/*! iter-fun */ \\\\\\\"./node_modules/iter-fun/index.js\\\\\\\");\\\\nconst { add, compare, divide, mean, multiply, pow, sort, subtract, sum } = __webpack_require__(/*! preciso */ \\\\\\\"./node_modules/preciso/preciso.js\\\\\\\");\\\\nconst mediana = __webpack_require__(/*! mediana */ \\\\\\\"./node_modules/mediana/src/index.js\\\\\\\");\\\\n\\\\nconst computeVariance = ({ count, histogram, mean_value, precise = false }) => {\\\\n if (precise) {\\\\n mean_value = mean_value.toString();\\\\n const reduced = Object.values(histogram).reduce((sum, { n, ct }) => {\\\\n const diff = subtract(n.toString(), mean_value);\\\\n return add(sum, multiply(ct.toString(), pow(diff, \\\\\\\"2\\\\\\\")));\\\\n }, \\\\\\\"0\\\\\\\");\\\\n return divide(reduced, count.toString());\\\\n } else {\\\\n return (\\\\n Object.values(histogram).reduce((sum, { n, ct }) => {\\\\n return sum + ct * Math.pow(n - mean_value, 2);\\\\n }, 0) / count\\\\n );\\\\n }\\\\n};\\\\n\\\\nfunction calcStats(\\\\n data,\\\\n {\\\\n async = false,\\\\n chunked = false,\\\\n noData = undefined,\\\\n filter = undefined,\\\\n calcCount = true,\\\\n calcHistogram = true,\\\\n calcInvalid = true,\\\\n calcMax = true,\\\\n calcMean = true,\\\\n calcMedian = true,\\\\n calcMin = true,\\\\n calcMode = true,\\\\n calcModes = true,\\\\n calcProduct = true,\\\\n calcRange = true,\\\\n calcStd = true,\\\\n calcSum = true,\\\\n calcValid = true,\\\\n calcVariance = true,\\\\n calcUniques = true,\\\\n precise = false,\\\\n precise_max_decimal_digits = 100,\\\\n stats\\\\n } = { debugLevel: 0 }\\\\n) {\\\\n if (stats) {\\\\n // validate stats argument\\\\n stats.forEach(stat => {\\\\n if (\\\\n ![\\\\n \\\\\\\"count\\\\\\\",\\\\n \\\\\\\"histogram\\\\\\\",\\\\n \\\\\\\"invalid\\\\\\\",\\\\n \\\\\\\"max\\\\\\\",\\\\n \\\\\\\"mean\\\\\\\",\\\\n \\\\\\\"median\\\\\\\",\\\\n \\\\\\\"min\\\\\\\",\\\\n \\\\\\\"mode\\\\\\\",\\\\n \\\\\\\"modes\\\\\\\",\\\\n \\\\\\\"product\\\\\\\",\\\\n \\\\\\\"range\\\\\\\",\\\\n \\\\\\\"sum\\\\\\\",\\\\n \\\\\\\"std\\\\\\\",\\\\n \\\\\\\"valid\\\\\\\",\\\\n \\\\\\\"variance\\\\\\\",\\\\n \\\\\\\"uniques\\\\\\\"\\\\n ].includes(stat)\\\\n ) {\\\\n console.warn(`[calc-stats] skipping unknown stat \\\\\\\"${stat}\\\\\\\"`);\\\\n }\\\\n });\\\\n calcCount = stats.includes(\\\\\\\"count\\\\\\\");\\\\n calcHistogram = stats.includes(\\\\\\\"histogram\\\\\\\");\\\\n calcInvalid = stats.includes(\\\\\\\"invalid\\\\\\\");\\\\n calcMax = stats.includes(\\\\\\\"max\\\\\\\");\\\\n calcMean = stats.includes(\\\\\\\"mean\\\\\\\");\\\\n calcMedian = stats.includes(\\\\\\\"median\\\\\\\");\\\\n calcMin = stats.includes(\\\\\\\"min\\\\\\\");\\\\n calcMode = stats.includes(\\\\\\\"mode\\\\\\\");\\\\n calcModes = stats.includes(\\\\\\\"modes\\\\\\\");\\\\n calcProduct = stats.includes(\\\\\\\"product\\\\\\\");\\\\n calcRange = stats.includes(\\\\\\\"range\\\\\\\");\\\\n calcStd = stats.includes(\\\\\\\"std\\\\\\\");\\\\n calcSum = stats.includes(\\\\\\\"sum\\\\\\\");\\\\n calcValid = stats.includes(\\\\\\\"valid\\\\\\\");\\\\n calcVariance = stats.includes(\\\\\\\"variance\\\\\\\");\\\\n calcUniques = stats.includes(\\\\\\\"uniques\\\\\\\");\\\\n }\\\\n\\\\n const iter = getOrCreateIterator(data);\\\\n\\\\n let needHistogram = calcHistogram || calcMedian || calcMode || calcModes || calcVariance || calcStd || calcUniques;\\\\n let needValid =\\\\n calcCount ||\\\\n calcMean ||\\\\n calcMedian ||\\\\n calcProduct ||\\\\n calcValid ||\\\\n calcVariance ||\\\\n calcStd ||\\\\n typeof filter === \\\\\\\"function\\\\\\\";\\\\n let needInvalid = calcCount || calcInvalid || typeof filter === \\\\\\\"function\\\\\\\";\\\\n let needSum = calcSum || calcMean || calcVariance || calcStd;\\\\n let needMin = calcMin || calcRange;\\\\n let needMax = calcMax || calcRange;\\\\n let needProduct = calcProduct;\\\\n let valid = 0;\\\\n let invalid = 0;\\\\n let index = 0;\\\\n let min;\\\\n let max;\\\\n let product;\\\\n let sum = precise ? \\\\\\\"0\\\\\\\" : 0;\\\\n const histogram = {};\\\\n\\\\n // after it processes filtering\\\\n let process;\\\\n if (precise) {\\\\n process = value => {\\\\n value = value.toString();\\\\n if (needValid) valid++;\\\\n if (needMin && (min === undefined || compare(value, min) === \\\\\\\"<\\\\\\\")) min = value;\\\\n if (needMax && (max === undefined || compare(value, max) === \\\\\\\">\\\\\\\")) max = value;\\\\n if (needProduct) product = valid === 1 ? value : multiply(product, value);\\\\n if (needSum) sum = add(sum, value);\\\\n if (needHistogram) {\\\\n if (value in histogram) histogram[value].ct++;\\\\n else histogram[value] = { n: value.toString(), ct: 1 };\\\\n }\\\\n };\\\\n } else {\\\\n process = value => {\\\\n if (needValid) valid++;\\\\n if (needMin && (min === undefined || value < min)) min = value;\\\\n if (needMax && (max === undefined || value > max)) max = value;\\\\n if (needProduct) product = valid === 1 ? value : product * value;\\\\n if (needSum) sum += value;\\\\n if (needHistogram) {\\\\n if (value in histogram) histogram[value].ct++;\\\\n else histogram[value] = { n: value, ct: 1 };\\\\n }\\\\n };\\\\n }\\\\n\\\\n let step;\\\\n if (typeof noData === \\\\\\\"number\\\\\\\" && typeof filter === \\\\\\\"function\\\\\\\") {\\\\n step = value => {\\\\n index++;\\\\n if (typeof value === \\\\\\\"number\\\\\\\" && !isNaN(value) && value !== noData && filter({ valid, index, value }) === true) {\\\\n process(value);\\\\n } else if (needInvalid) {\\\\n invalid++;\\\\n }\\\\n };\\\\n } else if (typeof noData === \\\\\\\"number\\\\\\\") {\\\\n step = value => {\\\\n if (typeof value === \\\\\\\"number\\\\\\\" && !isNaN(value) && value !== noData) {\\\\n process(value);\\\\n } else if (needInvalid) {\\\\n invalid++;\\\\n }\\\\n };\\\\n } else if (typeof filter === \\\\\\\"function\\\\\\\") {\\\\n step = value => {\\\\n index++;\\\\n if (typeof value === \\\\\\\"number\\\\\\\" && !isNaN(value) && filter({ valid, index, value }) === true) {\\\\n process(value);\\\\n } else if (needInvalid) {\\\\n invalid++;\\\\n }\\\\n };\\\\n } else {\\\\n step = value => {\\\\n if (typeof value === \\\\\\\"number\\\\\\\" && !isNaN(value)) {\\\\n process(value);\\\\n } else if (needInvalid) {\\\\n invalid++;\\\\n }\\\\n };\\\\n }\\\\n\\\\n const finish = () => {\\\\n const results = {};\\\\n if (calcCount) results.count = precise ? add(invalid.toString(), valid.toString()) : invalid + valid;\\\\n if (calcValid) results.valid = precise ? valid.toString() : valid;\\\\n if (calcInvalid) results.invalid = precise ? invalid.toString() : invalid;\\\\n if (calcMedian) {\\\\n results.median = mediana.calculate({ counts: histogram, precise, total: valid });\\\\n }\\\\n if (calcMin) results.min = min; // should already be a string if precise\\\\n if (calcMax) results.max = max; // should already be a string if precise\\\\n if (calcProduct) results.product = product; // should already be a string if precise\\\\n if (calcSum) results.sum = sum; // should already be a string if precise\\\\n if (calcRange) results.range = precise ? subtract(max.toString(), min.toString()) : max - min;\\\\n if (calcMean || calcVariance || calcStd) {\\\\n const mean_value = precise\\\\n ? divide(sum, valid.toString(), { max_decimal_digits: precise_max_decimal_digits })\\\\n : sum / valid;\\\\n if (calcMean) results.mean = mean_value;\\\\n if (calcVariance || calcStd) {\\\\n const variance = computeVariance({ count: valid, histogram, mean_value, precise });\\\\n if (calcVariance) results.variance = variance;\\\\n if (calcStd) results.std = precise ? Math.sqrt(Number(variance)).toString() : Math.sqrt(variance);\\\\n }\\\\n }\\\\n if (calcHistogram) {\\\\n if (precise) {\\\\n Object.values(histogram).forEach(obj => {\\\\n obj.ct = obj.ct.toString();\\\\n });\\\\n }\\\\n results.histogram = histogram;\\\\n }\\\\n if (calcMode || calcModes) {\\\\n let highest_count = 0;\\\\n let modes = [];\\\\n for (let key in histogram) {\\\\n const { n, ct } = histogram[key];\\\\n if (ct === highest_count) {\\\\n modes.push(precise ? n.toString() : n);\\\\n } else if (ct > highest_count) {\\\\n highest_count = ct;\\\\n modes = [precise ? n.toString() : n];\\\\n }\\\\n }\\\\n\\\\n if (calcModes) results.modes = modes;\\\\n\\\\n // compute mean value of all the most popular numbers\\\\n if (calcMode) {\\\\n results.mode = precise ? mean(modes) : modes.reduce((acc, n) => acc + n, 0) / modes.length;\\\\n }\\\\n }\\\\n if (calcUniques) {\\\\n if (precise) {\\\\n results.uniques = sort(Object.keys(histogram));\\\\n } else {\\\\n results.uniques = Object.values(histogram)\\\\n .map(({ n }) => n)\\\\n .sort((a, b) => a - b);\\\\n }\\\\n }\\\\n\\\\n return results;\\\\n };\\\\n\\\\n if (chunked) {\\\\n if (async) {\\\\n return (async () => {\\\\n for await (let value of iter) {\\\\n for (let v of value) {\\\\n step(v);\\\\n }\\\\n }\\\\n return finish();\\\\n })();\\\\n } else {\\\\n for (let value of iter) {\\\\n for (let v of value) {\\\\n step(v);\\\\n }\\\\n }\\\\n return finish();\\\\n }\\\\n } else {\\\\n if (async) {\\\\n return (async () => {\\\\n for await (let value of iter) step(value);\\\\n return finish();\\\\n })();\\\\n } else {\\\\n for (let value of iter) step(value);\\\\n return finish();\\\\n }\\\\n }\\\\n}\\\\n\\\\nif (true) {\\\\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\\\\n return calcStats;\\\\n }).call(exports, __webpack_require__, exports, module),\\\\n\\\\t\\\\t\\\\t\\\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\\\n}\\\\n\\\\nif (true) {\\\\n module.exports = calcStats;\\\\n module.exports.default = calcStats;\\\\n module.exports.calcStats = calcStats;\\\\n}\\\\n\\\\nif (typeof self === \\\\\\\"object\\\\\\\") {\\\\n self.calcStats = calcStats;\\\\n}\\\\n\\\\nif (typeof window === \\\\\\\"object\\\\\\\") {\\\\n window.calcStats = calcStats;\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/calc-stats/calc-stats.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/call-bind/callBound.js\\\":\\n/*!*********************************************!*\\\\\\n !*** ./node_modules/call-bind/callBound.js ***!\\n \\\\*********************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \\\\\\\"./node_modules/get-intrinsic/index.js\\\\\\\");\\\\n\\\\nvar callBind = __webpack_require__(/*! ./ */ \\\\\\\"./node_modules/call-bind/index.js\\\\\\\");\\\\n\\\\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\\\\n\\\\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\\\\n\\\\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\\\\n\\\\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\\\\n\\\\t\\\\treturn callBind(intrinsic);\\\\n\\\\t}\\\\n\\\\treturn intrinsic;\\\\n};\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/call-bind/callBound.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/call-bind/index.js\\\":\\n/*!*****************************************!*\\\\\\n !*** ./node_modules/call-bind/index.js ***!\\n \\\\*****************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nvar bind = __webpack_require__(/*! function-bind */ \\\\\\\"./node_modules/function-bind/index.js\\\\\\\");\\\\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \\\\\\\"./node_modules/get-intrinsic/index.js\\\\\\\");\\\\n\\\\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\\\\nvar $call = GetIntrinsic('%Function.prototype.call%');\\\\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\\\\n\\\\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\\\\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\\\\nvar $max = GetIntrinsic('%Math.max%');\\\\n\\\\nif ($defineProperty) {\\\\n\\\\ttry {\\\\n\\\\t\\\\t$defineProperty({}, 'a', { value: 1 });\\\\n\\\\t} catch (e) {\\\\n\\\\t\\\\t// IE 8 has a broken defineProperty\\\\n\\\\t\\\\t$defineProperty = null;\\\\n\\\\t}\\\\n}\\\\n\\\\nmodule.exports = function callBind(originalFunction) {\\\\n\\\\tvar func = $reflectApply(bind, $call, arguments);\\\\n\\\\tif ($gOPD && $defineProperty) {\\\\n\\\\t\\\\tvar desc = $gOPD(func, 'length');\\\\n\\\\t\\\\tif (desc.configurable) {\\\\n\\\\t\\\\t\\\\t// original length, plus the receiver, minus any additional arguments (after the receiver)\\\\n\\\\t\\\\t\\\\t$defineProperty(\\\\n\\\\t\\\\t\\\\t\\\\tfunc,\\\\n\\\\t\\\\t\\\\t\\\\t'length',\\\\n\\\\t\\\\t\\\\t\\\\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\\\\n\\\\t\\\\t\\\\t);\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\treturn func;\\\\n};\\\\n\\\\nvar applyBind = function applyBind() {\\\\n\\\\treturn $reflectApply(bind, $apply, arguments);\\\\n};\\\\n\\\\nif ($defineProperty) {\\\\n\\\\t$defineProperty(module.exports, 'apply', { value: applyBind });\\\\n} else {\\\\n\\\\tmodule.exports.apply = applyBind;\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/call-bind/index.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/core-util-is/lib/util.js\\\":\\n/*!***********************************************!*\\\\\\n !*** ./node_modules/core-util-is/lib/util.js ***!\\n \\\\***********************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\neval(\\\"// Copyright Joyent, Inc. and other Node contributors.\\\\n//\\\\n// Permission is hereby granted, free of charge, to any person obtaining a\\\\n// copy of this software and associated documentation files (the\\\\n// \\\\\\\"Software\\\\\\\"), to deal in the Software without restriction, including\\\\n// without limitation the rights to use, copy, modify, merge, publish,\\\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\\\n// persons to whom the Software is furnished to do so, subject to the\\\\n// following conditions:\\\\n//\\\\n// The above copyright notice and this permission notice shall be included\\\\n// in all copies or substantial portions of the Software.\\\\n//\\\\n// THE SOFTWARE IS PROVIDED \\\\\\\"AS IS\\\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\\\n\\\\n// NOTE: These type checking functions intentionally don't use `instanceof`\\\\n// because it is fragile and can be easily faked with `Object.create()`.\\\\n\\\\nfunction isArray(arg) {\\\\n if (Array.isArray) {\\\\n return Array.isArray(arg);\\\\n }\\\\n return objectToString(arg) === '[object Array]';\\\\n}\\\\nexports.isArray = isArray;\\\\n\\\\nfunction isBoolean(arg) {\\\\n return typeof arg === 'boolean';\\\\n}\\\\nexports.isBoolean = isBoolean;\\\\n\\\\nfunction isNull(arg) {\\\\n return arg === null;\\\\n}\\\\nexports.isNull = isNull;\\\\n\\\\nfunction isNullOrUndefined(arg) {\\\\n return arg == null;\\\\n}\\\\nexports.isNullOrUndefined = isNullOrUndefined;\\\\n\\\\nfunction isNumber(arg) {\\\\n return typeof arg === 'number';\\\\n}\\\\nexports.isNumber = isNumber;\\\\n\\\\nfunction isString(arg) {\\\\n return typeof arg === 'string';\\\\n}\\\\nexports.isString = isString;\\\\n\\\\nfunction isSymbol(arg) {\\\\n return typeof arg === 'symbol';\\\\n}\\\\nexports.isSymbol = isSymbol;\\\\n\\\\nfunction isUndefined(arg) {\\\\n return arg === void 0;\\\\n}\\\\nexports.isUndefined = isUndefined;\\\\n\\\\nfunction isRegExp(re) {\\\\n return objectToString(re) === '[object RegExp]';\\\\n}\\\\nexports.isRegExp = isRegExp;\\\\n\\\\nfunction isObject(arg) {\\\\n return typeof arg === 'object' && arg !== null;\\\\n}\\\\nexports.isObject = isObject;\\\\n\\\\nfunction isDate(d) {\\\\n return objectToString(d) === '[object Date]';\\\\n}\\\\nexports.isDate = isDate;\\\\n\\\\nfunction isError(e) {\\\\n return (objectToString(e) === '[object Error]' || e instanceof Error);\\\\n}\\\\nexports.isError = isError;\\\\n\\\\nfunction isFunction(arg) {\\\\n return typeof arg === 'function';\\\\n}\\\\nexports.isFunction = isFunction;\\\\n\\\\nfunction isPrimitive(arg) {\\\\n return arg === null ||\\\\n typeof arg === 'boolean' ||\\\\n typeof arg === 'number' ||\\\\n typeof arg === 'string' ||\\\\n typeof arg === 'symbol' || // ES6 symbol\\\\n typeof arg === 'undefined';\\\\n}\\\\nexports.isPrimitive = isPrimitive;\\\\n\\\\nexports.isBuffer = __webpack_require__(/*! buffer */ \\\\\\\"./node_modules/node-libs-browser/node_modules/buffer/index.js\\\\\\\").Buffer.isBuffer;\\\\n\\\\nfunction objectToString(o) {\\\\n return Object.prototype.toString.call(o);\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/core-util-is/lib/util.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/function-bind/implementation.js\\\":\\n/*!******************************************************!*\\\\\\n !*** ./node_modules/function-bind/implementation.js ***!\\n \\\\******************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\n/* eslint no-invalid-this: 1 */\\\\n\\\\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\\\\nvar slice = Array.prototype.slice;\\\\nvar toStr = Object.prototype.toString;\\\\nvar funcType = '[object Function]';\\\\n\\\\nmodule.exports = function bind(that) {\\\\n var target = this;\\\\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\\\\n throw new TypeError(ERROR_MESSAGE + target);\\\\n }\\\\n var args = slice.call(arguments, 1);\\\\n\\\\n var bound;\\\\n var binder = function () {\\\\n if (this instanceof bound) {\\\\n var result = target.apply(\\\\n this,\\\\n args.concat(slice.call(arguments))\\\\n );\\\\n if (Object(result) === result) {\\\\n return result;\\\\n }\\\\n return this;\\\\n } else {\\\\n return target.apply(\\\\n that,\\\\n args.concat(slice.call(arguments))\\\\n );\\\\n }\\\\n };\\\\n\\\\n var boundLength = Math.max(0, target.length - args.length);\\\\n var boundArgs = [];\\\\n for (var i = 0; i < boundLength; i++) {\\\\n boundArgs.push('$' + i);\\\\n }\\\\n\\\\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\\\\n\\\\n if (target.prototype) {\\\\n var Empty = function Empty() {};\\\\n Empty.prototype = target.prototype;\\\\n bound.prototype = new Empty();\\\\n Empty.prototype = null;\\\\n }\\\\n\\\\n return bound;\\\\n};\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/function-bind/implementation.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/function-bind/index.js\\\":\\n/*!*********************************************!*\\\\\\n !*** ./node_modules/function-bind/index.js ***!\\n \\\\*********************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nvar implementation = __webpack_require__(/*! ./implementation */ \\\\\\\"./node_modules/function-bind/implementation.js\\\\\\\");\\\\n\\\\nmodule.exports = Function.prototype.bind || implementation;\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/function-bind/index.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff-palette/index.js\\\":\\n/*!***********************************************!*\\\\\\n !*** ./node_modules/geotiff-palette/index.js ***!\\n \\\\***********************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"const getPalette = (image, { debug = false } = { debug: false }) => {\\\\n if (debug) console.log(\\\\\\\"starting getPalette with image\\\\\\\", image);\\\\n const { fileDirectory } = image;\\\\n const {\\\\n BitsPerSample,\\\\n ColorMap,\\\\n ImageLength,\\\\n ImageWidth,\\\\n PhotometricInterpretation,\\\\n SampleFormat,\\\\n SamplesPerPixel\\\\n } = fileDirectory;\\\\n\\\\n if (!ColorMap) {\\\\n throw new Error(\\\\\\\"[geotiff-palette]: the image does not contain a color map, so we can't make a palette.\\\\\\\");\\\\n }\\\\n\\\\n const count = Math.pow(2, BitsPerSample);\\\\n if (debug) console.log(\\\\\\\"[geotiff-palette]: count:\\\\\\\", count);\\\\n\\\\n const bandSize = ColorMap.length / 3;\\\\n if (debug) console.log(\\\\\\\"[geotiff-palette]: bandSize:\\\\\\\", bandSize);\\\\n\\\\n if (bandSize !== count) {\\\\n throw new Error(\\\\\\\"[geotiff-palette]: can't handle situations where the color map has more or less values than the number of possible values in a raster\\\\\\\");\\\\n }\\\\n\\\\n const greenOffset = bandSize;\\\\n const redOffset = greenOffset + bandSize;\\\\n\\\\n const result = [];\\\\n for (let i = 0; i < count; i++) {\\\\n // colorMap[mapIndex] / 65536 * 256 equals colorMap[mapIndex] / 256\\\\n // because (1 / 2^16) * (2^8) equals 1 / 2^8\\\\n result.push([\\\\n Math.floor(ColorMap[i] / 256), // red\\\\n Math.floor(ColorMap[greenOffset + i] / 256), // green\\\\n Math.floor(ColorMap[redOffset + i] / 256), // blue\\\\n 255 // alpha value is always 255\\\\n ]);\\\\n }\\\\n if (debug) console.log(\\\\\\\"[geotiff-palette]: result is \\\\\\\", result);\\\\n return result;\\\\n}\\\\n\\\\nmodule.exports = { getPalette };\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff-palette/index.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/basedecoder.js\\\":\\n/*!*************************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/basedecoder.js ***!\\n \\\\*************************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return BaseDecoder; });\\\\n/* harmony import */ var _predictor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../predictor */ \\\\\\\"./node_modules/geotiff/src/predictor.js\\\\\\\");\\\\n\\\\n\\\\nclass BaseDecoder {\\\\n decode(fileDirectory, buffer) {\\\\n const decoded = this.decodeBlock(buffer);\\\\n const predictor = fileDirectory.Predictor || 1;\\\\n if (predictor !== 1) {\\\\n const isTiled = !fileDirectory.StripOffsets;\\\\n const tileWidth = isTiled ? fileDirectory.TileWidth : fileDirectory.ImageWidth;\\\\n const tileHeight = isTiled ? fileDirectory.TileLength : (\\\\n fileDirectory.RowsPerStrip || fileDirectory.ImageLength\\\\n );\\\\n return Object(_predictor__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"applyPredictor\\\\\\\"])(\\\\n decoded, predictor, tileWidth, tileHeight, fileDirectory.BitsPerSample,\\\\n fileDirectory.PlanarConfiguration,\\\\n );\\\\n }\\\\n return decoded;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/basedecoder.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/deflate.js\\\":\\n/*!*********************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/deflate.js ***!\\n \\\\*********************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return DeflateDecoder; });\\\\n/* harmony import */ var pako_lib_inflate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! pako/lib/inflate */ \\\\\\\"./node_modules/pako/lib/inflate.js\\\\\\\");\\\\n/* harmony import */ var pako_lib_inflate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(pako_lib_inflate__WEBPACK_IMPORTED_MODULE_0__);\\\\n/* harmony import */ var _basedecoder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basedecoder */ \\\\\\\"./node_modules/geotiff/src/compression/basedecoder.js\\\\\\\");\\\\n\\\\n\\\\n\\\\nclass DeflateDecoder extends _basedecoder__WEBPACK_IMPORTED_MODULE_1__[\\\\\\\"default\\\\\\\"] {\\\\n decodeBlock(buffer) {\\\\n return Object(pako_lib_inflate__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"inflate\\\\\\\"])(new Uint8Array(buffer)).buffer;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/deflate.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/index.js\\\":\\n/*!*******************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/index.js ***!\\n \\\\*******************************************************/\\n/*! exports provided: getDecoder */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"getDecoder\\\\\\\", function() { return getDecoder; });\\\\n/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ \\\\\\\"./node_modules/geotiff/src/compression/raw.js\\\\\\\");\\\\n/* harmony import */ var _lzw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lzw */ \\\\\\\"./node_modules/geotiff/src/compression/lzw.js\\\\\\\");\\\\n/* harmony import */ var _jpeg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jpeg */ \\\\\\\"./node_modules/geotiff/src/compression/jpeg.js\\\\\\\");\\\\n/* harmony import */ var _deflate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./deflate */ \\\\\\\"./node_modules/geotiff/src/compression/deflate.js\\\\\\\");\\\\n/* harmony import */ var _packbits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./packbits */ \\\\\\\"./node_modules/geotiff/src/compression/packbits.js\\\\\\\");\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nfunction getDecoder(fileDirectory) {\\\\n switch (fileDirectory.Compression) {\\\\n case undefined:\\\\n case 1: // no compression\\\\n return new _raw__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"]();\\\\n case 5: // LZW\\\\n return new _lzw__WEBPACK_IMPORTED_MODULE_1__[\\\\\\\"default\\\\\\\"]();\\\\n case 6: // JPEG\\\\n throw new Error('old style JPEG compression is not supported.');\\\\n case 7: // JPEG\\\\n return new _jpeg__WEBPACK_IMPORTED_MODULE_2__[\\\\\\\"default\\\\\\\"](fileDirectory);\\\\n case 8: // Deflate as recognized by Adobe\\\\n case 32946: // Deflate GDAL default\\\\n return new _deflate__WEBPACK_IMPORTED_MODULE_3__[\\\\\\\"default\\\\\\\"]();\\\\n case 32773: // packbits\\\\n return new _packbits__WEBPACK_IMPORTED_MODULE_4__[\\\\\\\"default\\\\\\\"]();\\\\n default:\\\\n throw new Error(`Unknown compression method identifier: ${fileDirectory.Compression}`);\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/index.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/jpeg.js\\\":\\n/*!******************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/jpeg.js ***!\\n \\\\******************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return JpegDecoder; });\\\\n/* harmony import */ var _basedecoder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basedecoder */ \\\\\\\"./node_modules/geotiff/src/compression/basedecoder.js\\\\\\\");\\\\n\\\\n\\\\n/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\\\\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\\\\n/*\\\\n Copyright 2011 notmasteryet\\\\n Licensed under the Apache License, Version 2.0 (the \\\\\\\"License\\\\\\\");\\\\n you may not use this file except in compliance with the License.\\\\n You may obtain a copy of the License at\\\\n http://www.apache.org/licenses/LICENSE-2.0\\\\n Unless required by applicable law or agreed to in writing, software\\\\n distributed under the License is distributed on an \\\\\\\"AS IS\\\\\\\" BASIS,\\\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\\\n See the License for the specific language governing permissions and\\\\n limitations under the License.\\\\n*/\\\\n\\\\n// - The JPEG specification can be found in the ITU CCITT Recommendation T.81\\\\n// (www.w3.org/Graphics/JPEG/itu-t81.pdf)\\\\n// - The JFIF specification can be found in the JPEG File Interchange Format\\\\n// (www.w3.org/Graphics/JPEG/jfif3.pdf)\\\\n// - The Adobe Application-Specific JPEG markers in the Supporting the DCT Filters\\\\n// in PostScript Level 2, Technical Note #5116\\\\n// (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)\\\\n\\\\n\\\\nconst dctZigZag = new Int32Array([\\\\n 0,\\\\n 1, 8,\\\\n 16, 9, 2,\\\\n 3, 10, 17, 24,\\\\n 32, 25, 18, 11, 4,\\\\n 5, 12, 19, 26, 33, 40,\\\\n 48, 41, 34, 27, 20, 13, 6,\\\\n 7, 14, 21, 28, 35, 42, 49, 56,\\\\n 57, 50, 43, 36, 29, 22, 15,\\\\n 23, 30, 37, 44, 51, 58,\\\\n 59, 52, 45, 38, 31,\\\\n 39, 46, 53, 60,\\\\n 61, 54, 47,\\\\n 55, 62,\\\\n 63,\\\\n]);\\\\n\\\\nconst dctCos1 = 4017; // cos(pi/16)\\\\nconst dctSin1 = 799; // sin(pi/16)\\\\nconst dctCos3 = 3406; // cos(3*pi/16)\\\\nconst dctSin3 = 2276; // sin(3*pi/16)\\\\nconst dctCos6 = 1567; // cos(6*pi/16)\\\\nconst dctSin6 = 3784; // sin(6*pi/16)\\\\nconst dctSqrt2 = 5793; // sqrt(2)\\\\nconst dctSqrt1d2 = 2896;// sqrt(2) / 2\\\\n\\\\nfunction buildHuffmanTable(codeLengths, values) {\\\\n let k = 0;\\\\n const code = [];\\\\n let length = 16;\\\\n while (length > 0 && !codeLengths[length - 1]) {\\\\n --length;\\\\n }\\\\n code.push({ children: [], index: 0 });\\\\n\\\\n let p = code[0];\\\\n let q;\\\\n for (let i = 0; i < length; i++) {\\\\n for (let j = 0; j < codeLengths[i]; j++) {\\\\n p = code.pop();\\\\n p.children[p.index] = values[k];\\\\n while (p.index > 0) {\\\\n p = code.pop();\\\\n }\\\\n p.index++;\\\\n code.push(p);\\\\n while (code.length <= i) {\\\\n code.push(q = { children: [], index: 0 });\\\\n p.children[p.index] = q.children;\\\\n p = q;\\\\n }\\\\n k++;\\\\n }\\\\n if (i + 1 < length) {\\\\n // p here points to last code\\\\n code.push(q = { children: [], index: 0 });\\\\n p.children[p.index] = q.children;\\\\n p = q;\\\\n }\\\\n }\\\\n return code[0].children;\\\\n}\\\\n\\\\nfunction decodeScan(data, initialOffset,\\\\n frame, components, resetInterval,\\\\n spectralStart, spectralEnd,\\\\n successivePrev, successive) {\\\\n const { mcusPerLine, progressive } = frame;\\\\n\\\\n const startOffset = initialOffset;\\\\n let offset = initialOffset;\\\\n let bitsData = 0;\\\\n let bitsCount = 0;\\\\n function readBit() {\\\\n if (bitsCount > 0) {\\\\n bitsCount--;\\\\n return (bitsData >> bitsCount) & 1;\\\\n }\\\\n bitsData = data[offset++];\\\\n if (bitsData === 0xFF) {\\\\n const nextByte = data[offset++];\\\\n if (nextByte) {\\\\n throw new Error(`unexpected marker: ${((bitsData << 8) | nextByte).toString(16)}`);\\\\n }\\\\n // unstuff 0\\\\n }\\\\n bitsCount = 7;\\\\n return bitsData >>> 7;\\\\n }\\\\n function decodeHuffman(tree) {\\\\n let node = tree;\\\\n let bit;\\\\n while ((bit = readBit()) !== null) { // eslint-disable-line no-cond-assign\\\\n node = node[bit];\\\\n if (typeof node === 'number') {\\\\n return node;\\\\n }\\\\n if (typeof node !== 'object') {\\\\n throw new Error('invalid huffman sequence');\\\\n }\\\\n }\\\\n return null;\\\\n }\\\\n function receive(initialLength) {\\\\n let length = initialLength;\\\\n let n = 0;\\\\n while (length > 0) {\\\\n const bit = readBit();\\\\n if (bit === null) {\\\\n return undefined;\\\\n }\\\\n n = (n << 1) | bit;\\\\n --length;\\\\n }\\\\n return n;\\\\n }\\\\n function receiveAndExtend(length) {\\\\n const n = receive(length);\\\\n if (n >= 1 << (length - 1)) {\\\\n return n;\\\\n }\\\\n return n + (-1 << length) + 1;\\\\n }\\\\n function decodeBaseline(component, zz) {\\\\n const t = decodeHuffman(component.huffmanTableDC);\\\\n const diff = t === 0 ? 0 : receiveAndExtend(t);\\\\n component.pred += diff;\\\\n zz[0] = component.pred;\\\\n let k = 1;\\\\n while (k < 64) {\\\\n const rs = decodeHuffman(component.huffmanTableAC);\\\\n const s = rs & 15;\\\\n const r = rs >> 4;\\\\n if (s === 0) {\\\\n if (r < 15) {\\\\n break;\\\\n }\\\\n k += 16;\\\\n } else {\\\\n k += r;\\\\n const z = dctZigZag[k];\\\\n zz[z] = receiveAndExtend(s);\\\\n k++;\\\\n }\\\\n }\\\\n }\\\\n function decodeDCFirst(component, zz) {\\\\n const t = decodeHuffman(component.huffmanTableDC);\\\\n const diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);\\\\n component.pred += diff;\\\\n zz[0] = component.pred;\\\\n }\\\\n function decodeDCSuccessive(component, zz) {\\\\n zz[0] |= readBit() << successive;\\\\n }\\\\n let eobrun = 0;\\\\n function decodeACFirst(component, zz) {\\\\n if (eobrun > 0) {\\\\n eobrun--;\\\\n return;\\\\n }\\\\n let k = spectralStart;\\\\n const e = spectralEnd;\\\\n while (k <= e) {\\\\n const rs = decodeHuffman(component.huffmanTableAC);\\\\n const s = rs & 15;\\\\n const r = rs >> 4;\\\\n if (s === 0) {\\\\n if (r < 15) {\\\\n eobrun = receive(r) + (1 << r) - 1;\\\\n break;\\\\n }\\\\n k += 16;\\\\n } else {\\\\n k += r;\\\\n const z = dctZigZag[k];\\\\n zz[z] = receiveAndExtend(s) * (1 << successive);\\\\n k++;\\\\n }\\\\n }\\\\n }\\\\n let successiveACState = 0;\\\\n let successiveACNextValue;\\\\n function decodeACSuccessive(component, zz) {\\\\n let k = spectralStart;\\\\n const e = spectralEnd;\\\\n let r = 0;\\\\n while (k <= e) {\\\\n const z = dctZigZag[k];\\\\n const direction = zz[z] < 0 ? -1 : 1;\\\\n switch (successiveACState) {\\\\n case 0: { // initial state\\\\n const rs = decodeHuffman(component.huffmanTableAC);\\\\n const s = rs & 15;\\\\n r = rs >> 4;\\\\n if (s === 0) {\\\\n if (r < 15) {\\\\n eobrun = receive(r) + (1 << r);\\\\n successiveACState = 4;\\\\n } else {\\\\n r = 16;\\\\n successiveACState = 1;\\\\n }\\\\n } else {\\\\n if (s !== 1) {\\\\n throw new Error('invalid ACn encoding');\\\\n }\\\\n successiveACNextValue = receiveAndExtend(s);\\\\n successiveACState = r ? 2 : 3;\\\\n }\\\\n continue; // eslint-disable-line no-continue\\\\n }\\\\n case 1: // skipping r zero items\\\\n case 2:\\\\n if (zz[z]) {\\\\n zz[z] += (readBit() << successive) * direction;\\\\n } else {\\\\n r--;\\\\n if (r === 0) {\\\\n successiveACState = successiveACState === 2 ? 3 : 0;\\\\n }\\\\n }\\\\n break;\\\\n case 3: // set value for a zero item\\\\n if (zz[z]) {\\\\n zz[z] += (readBit() << successive) * direction;\\\\n } else {\\\\n zz[z] = successiveACNextValue << successive;\\\\n successiveACState = 0;\\\\n }\\\\n break;\\\\n case 4: // eob\\\\n if (zz[z]) {\\\\n zz[z] += (readBit() << successive) * direction;\\\\n }\\\\n break;\\\\n default:\\\\n break;\\\\n }\\\\n k++;\\\\n }\\\\n if (successiveACState === 4) {\\\\n eobrun--;\\\\n if (eobrun === 0) {\\\\n successiveACState = 0;\\\\n }\\\\n }\\\\n }\\\\n function decodeMcu(component, decodeFunction, mcu, row, col) {\\\\n const mcuRow = (mcu / mcusPerLine) | 0;\\\\n const mcuCol = mcu % mcusPerLine;\\\\n const blockRow = (mcuRow * component.v) + row;\\\\n const blockCol = (mcuCol * component.h) + col;\\\\n decodeFunction(component, component.blocks[blockRow][blockCol]);\\\\n }\\\\n function decodeBlock(component, decodeFunction, mcu) {\\\\n const blockRow = (mcu / component.blocksPerLine) | 0;\\\\n const blockCol = mcu % component.blocksPerLine;\\\\n decodeFunction(component, component.blocks[blockRow][blockCol]);\\\\n }\\\\n\\\\n const componentsLength = components.length;\\\\n let component;\\\\n let i;\\\\n let j;\\\\n let k;\\\\n let n;\\\\n let decodeFn;\\\\n if (progressive) {\\\\n if (spectralStart === 0) {\\\\n decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;\\\\n } else {\\\\n decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;\\\\n }\\\\n } else {\\\\n decodeFn = decodeBaseline;\\\\n }\\\\n\\\\n let mcu = 0;\\\\n let marker;\\\\n let mcuExpected;\\\\n if (componentsLength === 1) {\\\\n mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;\\\\n } else {\\\\n mcuExpected = mcusPerLine * frame.mcusPerColumn;\\\\n }\\\\n\\\\n const usedResetInterval = resetInterval || mcuExpected;\\\\n\\\\n while (mcu < mcuExpected) {\\\\n // reset interval stuff\\\\n for (i = 0; i < componentsLength; i++) {\\\\n components[i].pred = 0;\\\\n }\\\\n eobrun = 0;\\\\n\\\\n if (componentsLength === 1) {\\\\n component = components[0];\\\\n for (n = 0; n < usedResetInterval; n++) {\\\\n decodeBlock(component, decodeFn, mcu);\\\\n mcu++;\\\\n }\\\\n } else {\\\\n for (n = 0; n < usedResetInterval; n++) {\\\\n for (i = 0; i < componentsLength; i++) {\\\\n component = components[i];\\\\n const { h, v } = component;\\\\n for (j = 0; j < v; j++) {\\\\n for (k = 0; k < h; k++) {\\\\n decodeMcu(component, decodeFn, mcu, j, k);\\\\n }\\\\n }\\\\n }\\\\n mcu++;\\\\n\\\\n // If we've reached our expected MCU's, stop decoding\\\\n if (mcu === mcuExpected) {\\\\n break;\\\\n }\\\\n }\\\\n }\\\\n\\\\n // find marker\\\\n bitsCount = 0;\\\\n marker = (data[offset] << 8) | data[offset + 1];\\\\n if (marker < 0xFF00) {\\\\n throw new Error('marker was not found');\\\\n }\\\\n\\\\n if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx\\\\n offset += 2;\\\\n } else {\\\\n break;\\\\n }\\\\n }\\\\n\\\\n return offset - startOffset;\\\\n}\\\\n\\\\nfunction buildComponentData(frame, component) {\\\\n const lines = [];\\\\n const { blocksPerLine, blocksPerColumn } = component;\\\\n const samplesPerLine = blocksPerLine << 3;\\\\n const R = new Int32Array(64);\\\\n const r = new Uint8Array(64);\\\\n\\\\n // A port of poppler's IDCT method which in turn is taken from:\\\\n // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,\\\\n // \\\\\\\"Practical Fast 1-D DCT Algorithms with 11 Multiplications\\\\\\\",\\\\n // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,\\\\n // 988-991.\\\\n function quantizeAndInverse(zz, dataOut, dataIn) {\\\\n const qt = component.quantizationTable;\\\\n let v0;\\\\n let v1;\\\\n let v2;\\\\n let v3;\\\\n let v4;\\\\n let v5;\\\\n let v6;\\\\n let v7;\\\\n let t;\\\\n const p = dataIn;\\\\n let i;\\\\n\\\\n // dequant\\\\n for (i = 0; i < 64; i++) {\\\\n p[i] = zz[i] * qt[i];\\\\n }\\\\n\\\\n // inverse DCT on rows\\\\n for (i = 0; i < 8; ++i) {\\\\n const row = 8 * i;\\\\n\\\\n // check for all-zero AC coefficients\\\\n if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0\\\\n && p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0\\\\n && p[7 + row] === 0) {\\\\n t = ((dctSqrt2 * p[0 + row]) + 512) >> 10;\\\\n p[0 + row] = t;\\\\n p[1 + row] = t;\\\\n p[2 + row] = t;\\\\n p[3 + row] = t;\\\\n p[4 + row] = t;\\\\n p[5 + row] = t;\\\\n p[6 + row] = t;\\\\n p[7 + row] = t;\\\\n continue; // eslint-disable-line no-continue\\\\n }\\\\n\\\\n // stage 4\\\\n v0 = ((dctSqrt2 * p[0 + row]) + 128) >> 8;\\\\n v1 = ((dctSqrt2 * p[4 + row]) + 128) >> 8;\\\\n v2 = p[2 + row];\\\\n v3 = p[6 + row];\\\\n v4 = ((dctSqrt1d2 * (p[1 + row] - p[7 + row])) + 128) >> 8;\\\\n v7 = ((dctSqrt1d2 * (p[1 + row] + p[7 + row])) + 128) >> 8;\\\\n v5 = p[3 + row] << 4;\\\\n v6 = p[5 + row] << 4;\\\\n\\\\n // stage 3\\\\n t = (v0 - v1 + 1) >> 1;\\\\n v0 = (v0 + v1 + 1) >> 1;\\\\n v1 = t;\\\\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 128) >> 8;\\\\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 128) >> 8;\\\\n v3 = t;\\\\n t = (v4 - v6 + 1) >> 1;\\\\n v4 = (v4 + v6 + 1) >> 1;\\\\n v6 = t;\\\\n t = (v7 + v5 + 1) >> 1;\\\\n v5 = (v7 - v5 + 1) >> 1;\\\\n v7 = t;\\\\n\\\\n // stage 2\\\\n t = (v0 - v3 + 1) >> 1;\\\\n v0 = (v0 + v3 + 1) >> 1;\\\\n v3 = t;\\\\n t = (v1 - v2 + 1) >> 1;\\\\n v1 = (v1 + v2 + 1) >> 1;\\\\n v2 = t;\\\\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\\\\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\\\\n v7 = t;\\\\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\\\\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\\\\n v6 = t;\\\\n\\\\n // stage 1\\\\n p[0 + row] = v0 + v7;\\\\n p[7 + row] = v0 - v7;\\\\n p[1 + row] = v1 + v6;\\\\n p[6 + row] = v1 - v6;\\\\n p[2 + row] = v2 + v5;\\\\n p[5 + row] = v2 - v5;\\\\n p[3 + row] = v3 + v4;\\\\n p[4 + row] = v3 - v4;\\\\n }\\\\n\\\\n // inverse DCT on columns\\\\n for (i = 0; i < 8; ++i) {\\\\n const col = i;\\\\n\\\\n // check for all-zero AC coefficients\\\\n if (p[(1 * 8) + col] === 0 && p[(2 * 8) + col] === 0 && p[(3 * 8) + col] === 0\\\\n && p[(4 * 8) + col] === 0 && p[(5 * 8) + col] === 0 && p[(6 * 8) + col] === 0\\\\n && p[(7 * 8) + col] === 0) {\\\\n t = ((dctSqrt2 * dataIn[i + 0]) + 8192) >> 14;\\\\n p[(0 * 8) + col] = t;\\\\n p[(1 * 8) + col] = t;\\\\n p[(2 * 8) + col] = t;\\\\n p[(3 * 8) + col] = t;\\\\n p[(4 * 8) + col] = t;\\\\n p[(5 * 8) + col] = t;\\\\n p[(6 * 8) + col] = t;\\\\n p[(7 * 8) + col] = t;\\\\n continue; // eslint-disable-line no-continue\\\\n }\\\\n\\\\n // stage 4\\\\n v0 = ((dctSqrt2 * p[(0 * 8) + col]) + 2048) >> 12;\\\\n v1 = ((dctSqrt2 * p[(4 * 8) + col]) + 2048) >> 12;\\\\n v2 = p[(2 * 8) + col];\\\\n v3 = p[(6 * 8) + col];\\\\n v4 = ((dctSqrt1d2 * (p[(1 * 8) + col] - p[(7 * 8) + col])) + 2048) >> 12;\\\\n v7 = ((dctSqrt1d2 * (p[(1 * 8) + col] + p[(7 * 8) + col])) + 2048) >> 12;\\\\n v5 = p[(3 * 8) + col];\\\\n v6 = p[(5 * 8) + col];\\\\n\\\\n // stage 3\\\\n t = (v0 - v1 + 1) >> 1;\\\\n v0 = (v0 + v1 + 1) >> 1;\\\\n v1 = t;\\\\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 2048) >> 12;\\\\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 2048) >> 12;\\\\n v3 = t;\\\\n t = (v4 - v6 + 1) >> 1;\\\\n v4 = (v4 + v6 + 1) >> 1;\\\\n v6 = t;\\\\n t = (v7 + v5 + 1) >> 1;\\\\n v5 = (v7 - v5 + 1) >> 1;\\\\n v7 = t;\\\\n\\\\n // stage 2\\\\n t = (v0 - v3 + 1) >> 1;\\\\n v0 = (v0 + v3 + 1) >> 1;\\\\n v3 = t;\\\\n t = (v1 - v2 + 1) >> 1;\\\\n v1 = (v1 + v2 + 1) >> 1;\\\\n v2 = t;\\\\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\\\\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\\\\n v7 = t;\\\\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\\\\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\\\\n v6 = t;\\\\n\\\\n // stage 1\\\\n p[(0 * 8) + col] = v0 + v7;\\\\n p[(7 * 8) + col] = v0 - v7;\\\\n p[(1 * 8) + col] = v1 + v6;\\\\n p[(6 * 8) + col] = v1 - v6;\\\\n p[(2 * 8) + col] = v2 + v5;\\\\n p[(5 * 8) + col] = v2 - v5;\\\\n p[(3 * 8) + col] = v3 + v4;\\\\n p[(4 * 8) + col] = v3 - v4;\\\\n }\\\\n\\\\n // convert to 8-bit integers\\\\n for (i = 0; i < 64; ++i) {\\\\n const sample = 128 + ((p[i] + 8) >> 4);\\\\n if (sample < 0) {\\\\n dataOut[i] = 0;\\\\n } else if (sample > 0XFF) {\\\\n dataOut[i] = 0xFF;\\\\n } else {\\\\n dataOut[i] = sample;\\\\n }\\\\n }\\\\n }\\\\n\\\\n for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) {\\\\n const scanLine = blockRow << 3;\\\\n for (let i = 0; i < 8; i++) {\\\\n lines.push(new Uint8Array(samplesPerLine));\\\\n }\\\\n for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) {\\\\n quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);\\\\n\\\\n let offset = 0;\\\\n const sample = blockCol << 3;\\\\n for (let j = 0; j < 8; j++) {\\\\n const line = lines[scanLine + j];\\\\n for (let i = 0; i < 8; i++) {\\\\n line[sample + i] = r[offset++];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return lines;\\\\n}\\\\n\\\\nclass JpegStreamReader {\\\\n constructor() {\\\\n this.jfif = null;\\\\n this.adobe = null;\\\\n\\\\n this.quantizationTables = [];\\\\n this.huffmanTablesAC = [];\\\\n this.huffmanTablesDC = [];\\\\n this.resetFrames();\\\\n }\\\\n\\\\n resetFrames() {\\\\n this.frames = [];\\\\n }\\\\n\\\\n parse(data) {\\\\n let offset = 0;\\\\n // const { length } = data;\\\\n function readUint16() {\\\\n const value = (data[offset] << 8) | data[offset + 1];\\\\n offset += 2;\\\\n return value;\\\\n }\\\\n function readDataBlock() {\\\\n const length = readUint16();\\\\n const array = data.subarray(offset, offset + length - 2);\\\\n offset += array.length;\\\\n return array;\\\\n }\\\\n function prepareComponents(frame) {\\\\n let maxH = 0;\\\\n let maxV = 0;\\\\n let component;\\\\n let componentId;\\\\n for (componentId in frame.components) {\\\\n if (frame.components.hasOwnProperty(componentId)) {\\\\n component = frame.components[componentId];\\\\n if (maxH < component.h) {\\\\n maxH = component.h;\\\\n }\\\\n if (maxV < component.v) {\\\\n maxV = component.v;\\\\n }\\\\n }\\\\n }\\\\n const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);\\\\n const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);\\\\n for (componentId in frame.components) {\\\\n if (frame.components.hasOwnProperty(componentId)) {\\\\n component = frame.components[componentId];\\\\n const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);\\\\n const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);\\\\n const blocksPerLineForMcu = mcusPerLine * component.h;\\\\n const blocksPerColumnForMcu = mcusPerColumn * component.v;\\\\n const blocks = [];\\\\n for (let i = 0; i < blocksPerColumnForMcu; i++) {\\\\n const row = [];\\\\n for (let j = 0; j < blocksPerLineForMcu; j++) {\\\\n row.push(new Int32Array(64));\\\\n }\\\\n blocks.push(row);\\\\n }\\\\n component.blocksPerLine = blocksPerLine;\\\\n component.blocksPerColumn = blocksPerColumn;\\\\n component.blocks = blocks;\\\\n }\\\\n }\\\\n frame.maxH = maxH;\\\\n frame.maxV = maxV;\\\\n frame.mcusPerLine = mcusPerLine;\\\\n frame.mcusPerColumn = mcusPerColumn;\\\\n }\\\\n\\\\n let fileMarker = readUint16();\\\\n if (fileMarker !== 0xFFD8) { // SOI (Start of Image)\\\\n throw new Error('SOI not found');\\\\n }\\\\n\\\\n fileMarker = readUint16();\\\\n while (fileMarker !== 0xFFD9) { // EOI (End of image)\\\\n switch (fileMarker) {\\\\n case 0xFF00: break;\\\\n case 0xFFE0: // APP0 (Application Specific)\\\\n case 0xFFE1: // APP1\\\\n case 0xFFE2: // APP2\\\\n case 0xFFE3: // APP3\\\\n case 0xFFE4: // APP4\\\\n case 0xFFE5: // APP5\\\\n case 0xFFE6: // APP6\\\\n case 0xFFE7: // APP7\\\\n case 0xFFE8: // APP8\\\\n case 0xFFE9: // APP9\\\\n case 0xFFEA: // APP10\\\\n case 0xFFEB: // APP11\\\\n case 0xFFEC: // APP12\\\\n case 0xFFED: // APP13\\\\n case 0xFFEE: // APP14\\\\n case 0xFFEF: // APP15\\\\n case 0xFFFE: { // COM (Comment)\\\\n const appData = readDataBlock();\\\\n\\\\n if (fileMarker === 0xFFE0) {\\\\n if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49\\\\n && appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\\\\\\\\x00'\\\\n this.jfif = {\\\\n version: { major: appData[5], minor: appData[6] },\\\\n densityUnits: appData[7],\\\\n xDensity: (appData[8] << 8) | appData[9],\\\\n yDensity: (appData[10] << 8) | appData[11],\\\\n thumbWidth: appData[12],\\\\n thumbHeight: appData[13],\\\\n thumbData: appData.subarray(14, 14 + (3 * appData[12] * appData[13])),\\\\n };\\\\n }\\\\n }\\\\n // TODO APP1 - Exif\\\\n if (fileMarker === 0xFFEE) {\\\\n if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F\\\\n && appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\\\\\\\\x00'\\\\n this.adobe = {\\\\n version: appData[6],\\\\n flags0: (appData[7] << 8) | appData[8],\\\\n flags1: (appData[9] << 8) | appData[10],\\\\n transformCode: appData[11],\\\\n };\\\\n }\\\\n }\\\\n break;\\\\n }\\\\n\\\\n case 0xFFDB: { // DQT (Define Quantization Tables)\\\\n const quantizationTablesLength = readUint16();\\\\n const quantizationTablesEnd = quantizationTablesLength + offset - 2;\\\\n while (offset < quantizationTablesEnd) {\\\\n const quantizationTableSpec = data[offset++];\\\\n const tableData = new Int32Array(64);\\\\n if ((quantizationTableSpec >> 4) === 0) { // 8 bit values\\\\n for (let j = 0; j < 64; j++) {\\\\n const z = dctZigZag[j];\\\\n tableData[z] = data[offset++];\\\\n }\\\\n } else if ((quantizationTableSpec >> 4) === 1) { // 16 bit\\\\n for (let j = 0; j < 64; j++) {\\\\n const z = dctZigZag[j];\\\\n tableData[z] = readUint16();\\\\n }\\\\n } else {\\\\n throw new Error('DQT: invalid table spec');\\\\n }\\\\n this.quantizationTables[quantizationTableSpec & 15] = tableData;\\\\n }\\\\n break;\\\\n }\\\\n\\\\n case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)\\\\n case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)\\\\n case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT)\\\\n readUint16(); // skip data length\\\\n const frame = {\\\\n extended: (fileMarker === 0xFFC1),\\\\n progressive: (fileMarker === 0xFFC2),\\\\n precision: data[offset++],\\\\n scanLines: readUint16(),\\\\n samplesPerLine: readUint16(),\\\\n components: {},\\\\n componentsOrder: [],\\\\n };\\\\n\\\\n const componentsCount = data[offset++];\\\\n let componentId;\\\\n // let maxH = 0;\\\\n // let maxV = 0;\\\\n for (let i = 0; i < componentsCount; i++) {\\\\n componentId = data[offset];\\\\n const h = data[offset + 1] >> 4;\\\\n const v = data[offset + 1] & 15;\\\\n const qId = data[offset + 2];\\\\n frame.componentsOrder.push(componentId);\\\\n frame.components[componentId] = {\\\\n h,\\\\n v,\\\\n quantizationIdx: qId,\\\\n };\\\\n offset += 3;\\\\n }\\\\n prepareComponents(frame);\\\\n this.frames.push(frame);\\\\n break;\\\\n }\\\\n\\\\n case 0xFFC4: { // DHT (Define Huffman Tables)\\\\n const huffmanLength = readUint16();\\\\n for (let i = 2; i < huffmanLength;) {\\\\n const huffmanTableSpec = data[offset++];\\\\n const codeLengths = new Uint8Array(16);\\\\n let codeLengthSum = 0;\\\\n for (let j = 0; j < 16; j++, offset++) {\\\\n codeLengths[j] = data[offset];\\\\n codeLengthSum += codeLengths[j];\\\\n }\\\\n const huffmanValues = new Uint8Array(codeLengthSum);\\\\n for (let j = 0; j < codeLengthSum; j++, offset++) {\\\\n huffmanValues[j] = data[offset];\\\\n }\\\\n i += 17 + codeLengthSum;\\\\n\\\\n if ((huffmanTableSpec >> 4) === 0) {\\\\n this.huffmanTablesDC[huffmanTableSpec & 15] = buildHuffmanTable(\\\\n codeLengths, huffmanValues,\\\\n );\\\\n } else {\\\\n this.huffmanTablesAC[huffmanTableSpec & 15] = buildHuffmanTable(\\\\n codeLengths, huffmanValues,\\\\n );\\\\n }\\\\n }\\\\n break;\\\\n }\\\\n\\\\n case 0xFFDD: // DRI (Define Restart Interval)\\\\n readUint16(); // skip data length\\\\n this.resetInterval = readUint16();\\\\n break;\\\\n\\\\n case 0xFFDA: { // SOS (Start of Scan)\\\\n readUint16(); // skip length\\\\n const selectorsCount = data[offset++];\\\\n const components = [];\\\\n const frame = this.frames[0];\\\\n for (let i = 0; i < selectorsCount; i++) {\\\\n const component = frame.components[data[offset++]];\\\\n const tableSpec = data[offset++];\\\\n component.huffmanTableDC = this.huffmanTablesDC[tableSpec >> 4];\\\\n component.huffmanTableAC = this.huffmanTablesAC[tableSpec & 15];\\\\n components.push(component);\\\\n }\\\\n const spectralStart = data[offset++];\\\\n const spectralEnd = data[offset++];\\\\n const successiveApproximation = data[offset++];\\\\n const processed = decodeScan(data, offset,\\\\n frame, components, this.resetInterval,\\\\n spectralStart, spectralEnd,\\\\n successiveApproximation >> 4, successiveApproximation & 15);\\\\n offset += processed;\\\\n break;\\\\n }\\\\n\\\\n case 0xFFFF: // Fill bytes\\\\n if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.\\\\n offset--;\\\\n }\\\\n break;\\\\n\\\\n default:\\\\n if (data[offset - 3] === 0xFF\\\\n && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {\\\\n // could be incorrect encoding -- last 0xFF byte of the previous\\\\n // block was eaten by the encoder\\\\n offset -= 3;\\\\n break;\\\\n }\\\\n throw new Error(`unknown JPEG marker ${fileMarker.toString(16)}`);\\\\n }\\\\n fileMarker = readUint16();\\\\n }\\\\n }\\\\n\\\\n getResult() {\\\\n const { frames } = this;\\\\n if (this.frames.length === 0) {\\\\n throw new Error('no frames were decoded');\\\\n } else if (this.frames.length > 1) {\\\\n console.warn('more than one frame is not supported');\\\\n }\\\\n\\\\n // set each frame's components quantization table\\\\n for (let i = 0; i < this.frames.length; i++) {\\\\n const cp = this.frames[i].components;\\\\n for (const j of Object.keys(cp)) {\\\\n cp[j].quantizationTable = this.quantizationTables[cp[j].quantizationIdx];\\\\n delete cp[j].quantizationIdx;\\\\n }\\\\n }\\\\n\\\\n const frame = frames[0];\\\\n const { components, componentsOrder } = frame;\\\\n const outComponents = [];\\\\n const width = frame.samplesPerLine;\\\\n const height = frame.scanLines;\\\\n\\\\n for (let i = 0; i < componentsOrder.length; i++) {\\\\n const component = components[componentsOrder[i]];\\\\n outComponents.push({\\\\n lines: buildComponentData(frame, component),\\\\n scaleX: component.h / frame.maxH,\\\\n scaleY: component.v / frame.maxV,\\\\n });\\\\n }\\\\n\\\\n const out = new Uint8Array(width * height * outComponents.length);\\\\n let oi = 0;\\\\n for (let y = 0; y < height; ++y) {\\\\n for (let x = 0; x < width; ++x) {\\\\n for (let i = 0; i < outComponents.length; ++i) {\\\\n const component = outComponents[i];\\\\n out[oi] = component.lines[0 | y * component.scaleY][0 | x * component.scaleX];\\\\n ++oi;\\\\n }\\\\n }\\\\n }\\\\n return out;\\\\n }\\\\n}\\\\n\\\\nclass JpegDecoder extends _basedecoder__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"] {\\\\n constructor(fileDirectory) {\\\\n super();\\\\n this.reader = new JpegStreamReader();\\\\n if (fileDirectory.JPEGTables) {\\\\n this.reader.parse(fileDirectory.JPEGTables);\\\\n }\\\\n }\\\\n\\\\n decodeBlock(buffer) {\\\\n this.reader.resetFrames();\\\\n this.reader.parse(new Uint8Array(buffer));\\\\n return this.reader.getResult().buffer;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/jpeg.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/lzw.js\\\":\\n/*!*****************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/lzw.js ***!\\n \\\\*****************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return LZWDecoder; });\\\\n/* harmony import */ var _basedecoder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basedecoder */ \\\\\\\"./node_modules/geotiff/src/compression/basedecoder.js\\\\\\\");\\\\n\\\\n\\\\n\\\\nconst MIN_BITS = 9;\\\\nconst CLEAR_CODE = 256; // clear code\\\\nconst EOI_CODE = 257; // end of information\\\\nconst MAX_BYTELENGTH = 12;\\\\n\\\\nfunction getByte(array, position, length) {\\\\n const d = position % 8;\\\\n const a = Math.floor(position / 8);\\\\n const de = 8 - d;\\\\n const ef = (position + length) - ((a + 1) * 8);\\\\n let fg = (8 * (a + 2)) - (position + length);\\\\n const dg = ((a + 2) * 8) - position;\\\\n fg = Math.max(0, fg);\\\\n if (a >= array.length) {\\\\n console.warn('ran off the end of the buffer before finding EOI_CODE (end on input code)');\\\\n return EOI_CODE;\\\\n }\\\\n let chunk1 = array[a] & ((2 ** (8 - d)) - 1);\\\\n chunk1 <<= (length - de);\\\\n let chunks = chunk1;\\\\n if (a + 1 < array.length) {\\\\n let chunk2 = array[a + 1] >>> fg;\\\\n chunk2 <<= Math.max(0, (length - dg));\\\\n chunks += chunk2;\\\\n }\\\\n if (ef > 8 && a + 2 < array.length) {\\\\n const hi = ((a + 3) * 8) - (position + length);\\\\n const chunk3 = array[a + 2] >>> hi;\\\\n chunks += chunk3;\\\\n }\\\\n return chunks;\\\\n}\\\\n\\\\nfunction appendReversed(dest, source) {\\\\n for (let i = source.length - 1; i >= 0; i--) {\\\\n dest.push(source[i]);\\\\n }\\\\n return dest;\\\\n}\\\\n\\\\nfunction decompress(input) {\\\\n const dictionaryIndex = new Uint16Array(4093);\\\\n const dictionaryChar = new Uint8Array(4093);\\\\n for (let i = 0; i <= 257; i++) {\\\\n dictionaryIndex[i] = 4096;\\\\n dictionaryChar[i] = i;\\\\n }\\\\n let dictionaryLength = 258;\\\\n let byteLength = MIN_BITS;\\\\n let position = 0;\\\\n\\\\n function initDictionary() {\\\\n dictionaryLength = 258;\\\\n byteLength = MIN_BITS;\\\\n }\\\\n function getNext(array) {\\\\n const byte = getByte(array, position, byteLength);\\\\n position += byteLength;\\\\n return byte;\\\\n }\\\\n function addToDictionary(i, c) {\\\\n dictionaryChar[dictionaryLength] = c;\\\\n dictionaryIndex[dictionaryLength] = i;\\\\n dictionaryLength++;\\\\n return dictionaryLength - 1;\\\\n }\\\\n function getDictionaryReversed(n) {\\\\n const rev = [];\\\\n for (let i = n; i !== 4096; i = dictionaryIndex[i]) {\\\\n rev.push(dictionaryChar[i]);\\\\n }\\\\n return rev;\\\\n }\\\\n\\\\n const result = [];\\\\n initDictionary();\\\\n const array = new Uint8Array(input);\\\\n let code = getNext(array);\\\\n let oldCode;\\\\n while (code !== EOI_CODE) {\\\\n if (code === CLEAR_CODE) {\\\\n initDictionary();\\\\n code = getNext(array);\\\\n while (code === CLEAR_CODE) {\\\\n code = getNext(array);\\\\n }\\\\n\\\\n if (code === EOI_CODE) {\\\\n break;\\\\n } else if (code > CLEAR_CODE) {\\\\n throw new Error(`corrupted code at scanline ${code}`);\\\\n } else {\\\\n const val = getDictionaryReversed(code);\\\\n appendReversed(result, val);\\\\n oldCode = code;\\\\n }\\\\n } else if (code < dictionaryLength) {\\\\n const val = getDictionaryReversed(code);\\\\n appendReversed(result, val);\\\\n addToDictionary(oldCode, val[val.length - 1]);\\\\n oldCode = code;\\\\n } else {\\\\n const oldVal = getDictionaryReversed(oldCode);\\\\n if (!oldVal) {\\\\n throw new Error(`Bogus entry. Not in dictionary, ${oldCode} / ${dictionaryLength}, position: ${position}`);\\\\n }\\\\n appendReversed(result, oldVal);\\\\n result.push(oldVal[oldVal.length - 1]);\\\\n addToDictionary(oldCode, oldVal[oldVal.length - 1]);\\\\n oldCode = code;\\\\n }\\\\n\\\\n if (dictionaryLength + 1 >= (2 ** byteLength)) {\\\\n if (byteLength === MAX_BYTELENGTH) {\\\\n oldCode = undefined;\\\\n } else {\\\\n byteLength++;\\\\n }\\\\n }\\\\n code = getNext(array);\\\\n }\\\\n return new Uint8Array(result);\\\\n}\\\\n\\\\nclass LZWDecoder extends _basedecoder__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"] {\\\\n decodeBlock(buffer) {\\\\n return decompress(buffer, false).buffer;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/lzw.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/packbits.js\\\":\\n/*!**********************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/packbits.js ***!\\n \\\\**********************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return PackbitsDecoder; });\\\\n/* harmony import */ var _basedecoder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basedecoder */ \\\\\\\"./node_modules/geotiff/src/compression/basedecoder.js\\\\\\\");\\\\n\\\\n\\\\n\\\\nclass PackbitsDecoder extends _basedecoder__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"] {\\\\n decodeBlock(buffer) {\\\\n const dataView = new DataView(buffer);\\\\n const out = [];\\\\n\\\\n for (let i = 0; i < buffer.byteLength; ++i) {\\\\n let header = dataView.getInt8(i);\\\\n if (header < 0) {\\\\n const next = dataView.getUint8(i + 1);\\\\n header = -header;\\\\n for (let j = 0; j <= header; ++j) {\\\\n out.push(next);\\\\n }\\\\n i += 1;\\\\n } else {\\\\n for (let j = 0; j <= header; ++j) {\\\\n out.push(dataView.getUint8(i + j + 1));\\\\n }\\\\n i += header + 1;\\\\n }\\\\n }\\\\n return new Uint8Array(out).buffer;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/packbits.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/compression/raw.js\\\":\\n/*!*****************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/compression/raw.js ***!\\n \\\\*****************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return RawDecoder; });\\\\n/* harmony import */ var _basedecoder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basedecoder */ \\\\\\\"./node_modules/geotiff/src/compression/basedecoder.js\\\\\\\");\\\\n\\\\n\\\\n\\\\nclass RawDecoder extends _basedecoder__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"] {\\\\n decodeBlock(buffer) {\\\\n return buffer;\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/compression/raw.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/dataslice.js\\\":\\n/*!***********************************************!*\\\\\\n !*** ./node_modules/geotiff/src/dataslice.js ***!\\n \\\\***********************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return DataSlice; });\\\\nclass DataSlice {\\\\n constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\\\\n this._dataView = new DataView(arrayBuffer);\\\\n this._sliceOffset = sliceOffset;\\\\n this._littleEndian = littleEndian;\\\\n this._bigTiff = bigTiff;\\\\n }\\\\n\\\\n get sliceOffset() {\\\\n return this._sliceOffset;\\\\n }\\\\n\\\\n get sliceTop() {\\\\n return this._sliceOffset + this.buffer.byteLength;\\\\n }\\\\n\\\\n get littleEndian() {\\\\n return this._littleEndian;\\\\n }\\\\n\\\\n get bigTiff() {\\\\n return this._bigTiff;\\\\n }\\\\n\\\\n get buffer() {\\\\n return this._dataView.buffer;\\\\n }\\\\n\\\\n covers(offset, length) {\\\\n return this.sliceOffset <= offset && this.sliceTop >= offset + length;\\\\n }\\\\n\\\\n readUint8(offset) {\\\\n return this._dataView.getUint8(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readInt8(offset) {\\\\n return this._dataView.getInt8(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readUint16(offset) {\\\\n return this._dataView.getUint16(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readInt16(offset) {\\\\n return this._dataView.getInt16(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readUint32(offset) {\\\\n return this._dataView.getUint32(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readInt32(offset) {\\\\n return this._dataView.getInt32(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readFloat32(offset) {\\\\n return this._dataView.getFloat32(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readFloat64(offset) {\\\\n return this._dataView.getFloat64(\\\\n offset - this._sliceOffset, this._littleEndian,\\\\n );\\\\n }\\\\n\\\\n readUint64(offset) {\\\\n const left = this.readUint32(offset);\\\\n const right = this.readUint32(offset + 4);\\\\n let combined;\\\\n if (this._littleEndian) {\\\\n combined = left + 2 ** 32 * right;\\\\n if (!Number.isSafeInteger(combined)) {\\\\n throw new Error(\\\\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\\\\n );\\\\n }\\\\n return combined;\\\\n }\\\\n combined = 2 ** 32 * left + right;\\\\n if (!Number.isSafeInteger(combined)) {\\\\n throw new Error(\\\\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\\\\n );\\\\n }\\\\n\\\\n return combined;\\\\n }\\\\n\\\\n // adapted from https://stackoverflow.com/a/55338384/8060591\\\\n readInt64(offset) {\\\\n let value = 0;\\\\n const isNegative =\\\\n (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80) >\\\\n 0;\\\\n let carrying = true;\\\\n for (let i = 0; i < 8; i++) {\\\\n let byte = this._dataView.getUint8(\\\\n offset + (this._littleEndian ? i : 7 - i)\\\\n );\\\\n if (isNegative) {\\\\n if (carrying) {\\\\n if (byte !== 0x00) {\\\\n byte = ~(byte - 1) & 0xff;\\\\n carrying = false;\\\\n }\\\\n } else {\\\\n byte = ~byte & 0xff;\\\\n }\\\\n }\\\\n value += byte * 256 ** i;\\\\n }\\\\n if (isNegative) {\\\\n value = -value;\\\\n }\\\\n return value\\\\n }\\\\n\\\\n readOffset(offset) {\\\\n if (this._bigTiff) {\\\\n return this.readUint64(offset);\\\\n }\\\\n return this.readUint32(offset);\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/dataslice.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/dataview64.js\\\":\\n/*!************************************************!*\\\\\\n !*** ./node_modules/geotiff/src/dataview64.js ***!\\n \\\\************************************************/\\n/*! exports provided: default */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"default\\\\\\\", function() { return DataView64; });\\\\nclass DataView64 {\\\\n constructor(arrayBuffer) {\\\\n this._dataView = new DataView(arrayBuffer);\\\\n }\\\\n\\\\n get buffer() {\\\\n return this._dataView.buffer;\\\\n }\\\\n\\\\n getUint64(offset, littleEndian) {\\\\n const left = this.getUint32(offset, littleEndian);\\\\n const right = this.getUint32(offset + 4, littleEndian);\\\\n let combined;\\\\n if (littleEndian) {\\\\n combined = left + 2 ** 32 * right;\\\\n if (!Number.isSafeInteger(combined)) {\\\\n throw new Error(\\\\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\\\\n );\\\\n }\\\\n return combined;\\\\n }\\\\n combined = 2 ** 32 * left + right;\\\\n if (!Number.isSafeInteger(combined)) {\\\\n throw new Error(\\\\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\\\\n );\\\\n }\\\\n\\\\n return combined;\\\\n }\\\\n\\\\n // adapted from https://stackoverflow.com/a/55338384/8060591\\\\n getInt64(offset, littleEndian) {\\\\n let value = 0;\\\\n const isNegative =\\\\n (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\\\\n let carrying = true;\\\\n for (let i = 0; i < 8; i++) {\\\\n let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\\\\n if (isNegative) {\\\\n if (carrying) {\\\\n if (byte !== 0x00) {\\\\n byte = ~(byte - 1) & 0xff;\\\\n carrying = false;\\\\n }\\\\n } else {\\\\n byte = ~byte & 0xff;\\\\n }\\\\n }\\\\n value += byte * 256 ** i;\\\\n }\\\\n if (isNegative) {\\\\n value = -value;\\\\n }\\\\n return value;\\\\n }\\\\n\\\\n getUint8(offset, littleEndian) {\\\\n return this._dataView.getUint8(offset, littleEndian);\\\\n }\\\\n\\\\n getInt8(offset, littleEndian) {\\\\n return this._dataView.getInt8(offset, littleEndian);\\\\n }\\\\n\\\\n getUint16(offset, littleEndian) {\\\\n return this._dataView.getUint16(offset, littleEndian);\\\\n }\\\\n\\\\n getInt16(offset, littleEndian) {\\\\n return this._dataView.getInt16(offset, littleEndian);\\\\n }\\\\n\\\\n getUint32(offset, littleEndian) {\\\\n return this._dataView.getUint32(offset, littleEndian);\\\\n }\\\\n\\\\n getInt32(offset, littleEndian) {\\\\n return this._dataView.getInt32(offset, littleEndian);\\\\n }\\\\n\\\\n getFloat32(offset, littleEndian) {\\\\n return this._dataView.getFloat32(offset, littleEndian);\\\\n }\\\\n\\\\n getFloat64(offset, littleEndian) {\\\\n return this._dataView.getFloat64(offset, littleEndian);\\\\n }\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/geotiff/src/dataview64.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/geotiff/src/geotiff.js\\\":\\n/*!*********************************************!*\\\\\\n !*** ./node_modules/geotiff/src/geotiff.js ***!\\n \\\\*********************************************/\\n/*! exports provided: globals, rgb, getDecoder, setLogger, GeoTIFF, default, MultiGeoTIFF, fromUrl, fromArrayBuffer, fromFile, fromBlob, fromUrls, writeArrayBuffer, Pool */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"GeoTIFF\\\\\\\", function() { return GeoTIFF; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"MultiGeoTIFF\\\\\\\", function() { return MultiGeoTIFF; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"fromUrl\\\\\\\", function() { return fromUrl; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"fromArrayBuffer\\\\\\\", function() { return fromArrayBuffer; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"fromFile\\\\\\\", function() { return fromFile; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"fromBlob\\\\\\\", function() { return fromBlob; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"fromUrls\\\\\\\", function() { return fromUrls; });\\\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"writeArrayBuffer\\\\\\\", function() { return writeArrayBuffer; });\\\\n/* harmony import */ var _geotiffimage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geotiffimage */ \\\\\\\"./node_modules/geotiff/src/geotiffimage.js\\\\\\\");\\\\n/* harmony import */ var _dataview64__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataview64 */ \\\\\\\"./node_modules/geotiff/src/dataview64.js\\\\\\\");\\\\n/* harmony import */ var _dataslice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataslice */ \\\\\\\"./node_modules/geotiff/src/dataslice.js\\\\\\\");\\\\n/* harmony import */ var _pool__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pool */ \\\\\\\"./node_modules/geotiff/src/pool.js\\\\\\\");\\\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"Pool\\\\\\\", function() { return _pool__WEBPACK_IMPORTED_MODULE_3__[\\\\\\\"default\\\\\\\"]; });\\\\n\\\\n/* harmony import */ var _source__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./source */ \\\\\\\"./node_modules/geotiff/src/source.js\\\\\\\");\\\\n/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./globals */ \\\\\\\"./node_modules/geotiff/src/globals.js\\\\\\\");\\\\n/* harmony import */ var _geotiffwriter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./geotiffwriter */ \\\\\\\"./node_modules/geotiff/src/geotiffwriter.js\\\\\\\");\\\\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"globals\\\\\\\", function() { return _globals__WEBPACK_IMPORTED_MODULE_5__; });\\\\n/* harmony import */ var _rgb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./rgb */ \\\\\\\"./node_modules/geotiff/src/rgb.js\\\\\\\");\\\\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"rgb\\\\\\\", function() { return _rgb__WEBPACK_IMPORTED_MODULE_7__; });\\\\n/* harmony import */ var _compression__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./compression */ \\\\\\\"./node_modules/geotiff/src/compression/index.js\\\\\\\");\\\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"getDecoder\\\\\\\", function() { return _compression__WEBPACK_IMPORTED_MODULE_8__[\\\\\\\"getDecoder\\\\\\\"]; });\\\\n\\\\n/* harmony import */ var _logging__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logging */ \\\\\\\"./node_modules/geotiff/src/logging.js\\\\\\\");\\\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\\\\\"setLogger\\\\\\\", function() { return _logging__WEBPACK_IMPORTED_MODULE_9__[\\\\\\\"setLogger\\\\\\\"]; });\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nfunction getFieldTypeLength(fieldType) {\\\\n switch (fieldType) {\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].BYTE: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SBYTE: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].UNDEFINED:\\\\n return 1;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SHORT: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SSHORT:\\\\n return 2;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].LONG: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SLONG: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].FLOAT: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].IFD:\\\\n return 4;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].RATIONAL: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SRATIONAL: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].DOUBLE:\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].LONG8: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SLONG8: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].IFD8:\\\\n return 8;\\\\n default:\\\\n throw new RangeError(`Invalid field type: ${fieldType}`);\\\\n }\\\\n}\\\\n\\\\nfunction parseGeoKeyDirectory(fileDirectory) {\\\\n const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;\\\\n if (!rawGeoKeyDirectory) {\\\\n return null;\\\\n }\\\\n\\\\n const geoKeyDirectory = {};\\\\n for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\\\\n const key = _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"geoKeyNames\\\\\\\"][rawGeoKeyDirectory[i]];\\\\n const location = (rawGeoKeyDirectory[i + 1])\\\\n ? (_globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTagNames\\\\\\\"][rawGeoKeyDirectory[i + 1]]) : null;\\\\n const count = rawGeoKeyDirectory[i + 2];\\\\n const offset = rawGeoKeyDirectory[i + 3];\\\\n\\\\n let value = null;\\\\n if (!location) {\\\\n value = offset;\\\\n } else {\\\\n value = fileDirectory[location];\\\\n if (typeof value === 'undefined' || value === null) {\\\\n throw new Error(`Could not get value of geoKey '${key}'.`);\\\\n } else if (typeof value === 'string') {\\\\n value = value.substring(offset, offset + count - 1);\\\\n } else if (value.subarray) {\\\\n value = value.subarray(offset, offset + count);\\\\n if (count === 1) {\\\\n value = value[0];\\\\n }\\\\n }\\\\n }\\\\n geoKeyDirectory[key] = value;\\\\n }\\\\n return geoKeyDirectory;\\\\n}\\\\n\\\\nfunction getValues(dataSlice, fieldType, count, offset) {\\\\n let values = null;\\\\n let readMethod = null;\\\\n const fieldTypeLength = getFieldTypeLength(fieldType);\\\\n\\\\n switch (fieldType) {\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].BYTE: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].UNDEFINED:\\\\n values = new Uint8Array(count); readMethod = dataSlice.readUint8;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SBYTE:\\\\n values = new Int8Array(count); readMethod = dataSlice.readInt8;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SHORT:\\\\n values = new Uint16Array(count); readMethod = dataSlice.readUint16;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SSHORT:\\\\n values = new Int16Array(count); readMethod = dataSlice.readInt16;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].LONG: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].IFD:\\\\n values = new Uint32Array(count); readMethod = dataSlice.readUint32;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SLONG:\\\\n values = new Int32Array(count); readMethod = dataSlice.readInt32;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].LONG8: case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].IFD8:\\\\n values = new Array(count); readMethod = dataSlice.readUint64;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SLONG8:\\\\n values = new Array(count); readMethod = dataSlice.readInt64;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].RATIONAL:\\\\n values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SRATIONAL:\\\\n values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].FLOAT:\\\\n values = new Float32Array(count); readMethod = dataSlice.readFloat32;\\\\n break;\\\\n case _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].DOUBLE:\\\\n values = new Float64Array(count); readMethod = dataSlice.readFloat64;\\\\n break;\\\\n default:\\\\n throw new RangeError(`Invalid field type: ${fieldType}`);\\\\n }\\\\n\\\\n // normal fields\\\\n if (!(fieldType === _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].RATIONAL || fieldType === _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SRATIONAL)) {\\\\n for (let i = 0; i < count; ++i) {\\\\n values[i] = readMethod.call(\\\\n dataSlice, offset + (i * fieldTypeLength),\\\\n );\\\\n }\\\\n } else { // RATIONAL or SRATIONAL\\\\n for (let i = 0; i < count; i += 2) {\\\\n values[i] = readMethod.call(\\\\n dataSlice, offset + (i * fieldTypeLength),\\\\n );\\\\n values[i + 1] = readMethod.call(\\\\n dataSlice, offset + ((i * fieldTypeLength) + 4),\\\\n );\\\\n }\\\\n }\\\\n\\\\n if (fieldType === _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII) {\\\\n return String.fromCharCode.apply(null, values);\\\\n }\\\\n return values;\\\\n}\\\\n\\\\n/**\\\\n * Data class to store the parsed file directory, geo key directory and\\\\n * offset to the next IFD\\\\n */\\\\nclass ImageFileDirectory {\\\\n constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {\\\\n this.fileDirectory = fileDirectory;\\\\n this.geoKeyDirectory = geoKeyDirectory;\\\\n this.nextIFDByteOffset = nextIFDByteOffset;\\\\n }\\\\n}\\\\n\\\\n/**\\\\n * Error class for cases when an IFD index was requested, that does not exist\\\\n * in the file.\\\\n */\\\\nclass GeoTIFFImageIndexError extends Error {\\\\n constructor(index) {\\\\n super(`No image at index ${index}`);\\\\n this.index = index;\\\\n }\\\\n}\\\\n\\\\n\\\\nclass GeoTIFFBase {\\\\n /**\\\\n * (experimental) Reads raster data from the best fitting image. This function uses\\\\n * the image with the lowest resolution that is still a higher resolution than the\\\\n * requested resolution.\\\\n * When specified, the `bbox` option is translated to the `window` option and the\\\\n * `resX` and `resY` to `width` and `height` respectively.\\\\n * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\\\\n * image is called and the result returned.\\\\n * @see GeoTIFFImage.readRasters\\\\n * @param {Object} [options={}] optional parameters\\\\n * @param {Array} [options.window=whole image] the subset to read data from.\\\\n * @param {Array} [options.bbox=whole image] the subset to read data from in\\\\n * geographical coordinates.\\\\n * @param {Array} [options.samples=all samples] the selection of samples to read from.\\\\n * @param {Boolean} [options.interleave=false] whether the data shall be read\\\\n * in one single array or separate\\\\n * arrays.\\\\n * @param {Number} [options.pool=null] The optional decoder pool to use.\\\\n * @param {Number} [options.width] The desired width of the output. When the width is not the\\\\n * same as the images, resampling will be performed.\\\\n * @param {Number} [options.height] The desired height of the output. When the width is not the\\\\n * same as the images, resampling will be performed.\\\\n * @param {String} [options.resampleMethod='nearest'] The desired resampling method.\\\\n * @param {Number|Number[]} [options.fillValue] The value to use for parts of the image\\\\n * outside of the images extent. When multiple\\\\n * samples are requested, an array of fill values\\\\n * can be passed.\\\\n * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\\\\n */\\\\n async readRasters(options = {}) {\\\\n const { window: imageWindow, width, height } = options;\\\\n let { resX, resY, bbox } = options;\\\\n\\\\n const firstImage = await this.getImage();\\\\n let usedImage = firstImage;\\\\n const imageCount = await this.getImageCount();\\\\n const imgBBox = firstImage.getBoundingBox();\\\\n\\\\n if (imageWindow && bbox) {\\\\n throw new Error('Both \\\\\\\"bbox\\\\\\\" and \\\\\\\"window\\\\\\\" passed.');\\\\n }\\\\n\\\\n // if width/height is passed, transform it to resolution\\\\n if (width || height) {\\\\n // if we have an image window (pixel coordinates), transform it to a BBox\\\\n // using the origin/resolution of the first image.\\\\n if (imageWindow) {\\\\n const [oX, oY] = firstImage.getOrigin();\\\\n const [rX, rY] = firstImage.getResolution();\\\\n\\\\n bbox = [\\\\n oX + (imageWindow[0] * rX),\\\\n oY + (imageWindow[1] * rY),\\\\n oX + (imageWindow[2] * rX),\\\\n oY + (imageWindow[3] * rY),\\\\n ];\\\\n }\\\\n\\\\n // if we have a bbox (or calculated one)\\\\n\\\\n const usedBBox = bbox || imgBBox;\\\\n\\\\n if (width) {\\\\n if (resX) {\\\\n throw new Error('Both width and resX passed');\\\\n }\\\\n resX = (usedBBox[2] - usedBBox[0]) / width;\\\\n }\\\\n if (height) {\\\\n if (resY) {\\\\n throw new Error('Both width and resY passed');\\\\n }\\\\n resY = (usedBBox[3] - usedBBox[1]) / height;\\\\n }\\\\n }\\\\n\\\\n // if resolution is set or calculated, try to get the image with the worst acceptable resolution\\\\n if (resX || resY) {\\\\n const allImages = [];\\\\n for (let i = 0; i < imageCount; ++i) {\\\\n const image = await this.getImage(i);\\\\n const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;\\\\n if (i === 0 || subfileType === 2 || newSubfileType & 1) {\\\\n allImages.push(image);\\\\n }\\\\n }\\\\n\\\\n allImages.sort((a, b) => a.getWidth() - b.getWidth());\\\\n for (let i = 0; i < allImages.length; ++i) {\\\\n const image = allImages[i];\\\\n const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\\\\n const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\\\\n\\\\n usedImage = image;\\\\n if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\\\\n break;\\\\n }\\\\n }\\\\n }\\\\n\\\\n let wnd = imageWindow;\\\\n if (bbox) {\\\\n const [oX, oY] = firstImage.getOrigin();\\\\n const [imageResX, imageResY] = usedImage.getResolution(firstImage);\\\\n\\\\n wnd = [\\\\n Math.round((bbox[0] - oX) / imageResX),\\\\n Math.round((bbox[1] - oY) / imageResY),\\\\n Math.round((bbox[2] - oX) / imageResX),\\\\n Math.round((bbox[3] - oY) / imageResY),\\\\n ];\\\\n wnd = [\\\\n Math.min(wnd[0], wnd[2]),\\\\n Math.min(wnd[1], wnd[3]),\\\\n Math.max(wnd[0], wnd[2]),\\\\n Math.max(wnd[1], wnd[3]),\\\\n ];\\\\n }\\\\n\\\\n return usedImage.readRasters({ ...options, window: wnd });\\\\n }\\\\n}\\\\n\\\\n\\\\n/**\\\\n * The abstraction for a whole GeoTIFF file.\\\\n * @augments GeoTIFFBase\\\\n */\\\\nclass GeoTIFF extends GeoTIFFBase {\\\\n /**\\\\n * @constructor\\\\n * @param {Source} source The datasource to read from.\\\\n * @param {Boolean} littleEndian Whether the image uses little endian.\\\\n * @param {Boolean} bigTiff Whether the image uses bigTIFF conventions.\\\\n * @param {Number} firstIFDOffset The numeric byte-offset from the start of the image\\\\n * to the first IFD.\\\\n * @param {Object} [options] further options.\\\\n * @param {Boolean} [options.cache=false] whether or not decoded tiles shall be cached.\\\\n */\\\\n constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\\\\n super();\\\\n this.source = source;\\\\n this.littleEndian = littleEndian;\\\\n this.bigTiff = bigTiff;\\\\n this.firstIFDOffset = firstIFDOffset;\\\\n this.cache = options.cache || false;\\\\n this.ifdRequests = [];\\\\n this.ghostValues = null;\\\\n }\\\\n\\\\n async getSlice(offset, size) {\\\\n const fallbackSize = this.bigTiff ? 4048 : 1024;\\\\n return new _dataslice__WEBPACK_IMPORTED_MODULE_2__[\\\\\\\"default\\\\\\\"](\\\\n await this.source.fetch(\\\\n offset, typeof size !== 'undefined' ? size : fallbackSize,\\\\n ), offset, this.littleEndian, this.bigTiff,\\\\n );\\\\n }\\\\n\\\\n /**\\\\n * Instructs to parse an image file directory at the given file offset.\\\\n * As there is no way to ensure that a location is indeed the start of an IFD,\\\\n * this function must be called with caution (e.g only using the IFD offsets from\\\\n * the headers or other IFDs).\\\\n * @param {number} offset the offset to parse the IFD at\\\\n * @returns {ImageFileDirectory} the parsed IFD\\\\n */\\\\n async parseFileDirectoryAt(offset) {\\\\n const entrySize = this.bigTiff ? 20 : 12;\\\\n const offsetSize = this.bigTiff ? 8 : 2;\\\\n\\\\n let dataSlice = await this.getSlice(offset);\\\\n const numDirEntries = this.bigTiff ?\\\\n dataSlice.readUint64(offset) :\\\\n dataSlice.readUint16(offset);\\\\n\\\\n // if the slice does not cover the whole IFD, request a bigger slice, where the\\\\n // whole IFD fits: num of entries + n x tag length + offset to next IFD\\\\n const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);\\\\n if (!dataSlice.covers(offset, byteSize)) {\\\\n dataSlice = await this.getSlice(offset, byteSize);\\\\n }\\\\n\\\\n const fileDirectory = {};\\\\n\\\\n // loop over the IFD and create a file directory object\\\\n let i = offset + (this.bigTiff ? 8 : 2);\\\\n for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\\\\n const fieldTag = dataSlice.readUint16(i);\\\\n const fieldType = dataSlice.readUint16(i + 2);\\\\n const typeCount = this.bigTiff ?\\\\n dataSlice.readUint64(i + 4) :\\\\n dataSlice.readUint32(i + 4);\\\\n\\\\n let fieldValues;\\\\n let value;\\\\n const fieldTypeLength = getFieldTypeLength(fieldType);\\\\n const valueOffset = i + (this.bigTiff ? 12 : 8);\\\\n\\\\n // check whether the value is directly encoded in the tag or refers to a\\\\n // different external byte range\\\\n if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\\\\n fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);\\\\n } else {\\\\n // resolve the reference to the actual byte range\\\\n const actualOffset = dataSlice.readOffset(valueOffset);\\\\n const length = getFieldTypeLength(fieldType) * typeCount;\\\\n\\\\n // check, whether we actually cover the referenced byte range; if not,\\\\n // request a new slice of bytes to read from it\\\\n if (dataSlice.covers(actualOffset, length)) {\\\\n fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);\\\\n } else {\\\\n const fieldDataSlice = await this.getSlice(actualOffset, length);\\\\n fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);\\\\n }\\\\n }\\\\n\\\\n // unpack single values from the array\\\\n if (typeCount === 1 && _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"arrayFields\\\\\\\"].indexOf(fieldTag) === -1 &&\\\\n !(fieldType === _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].RATIONAL || fieldType === _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].SRATIONAL)) {\\\\n value = fieldValues[0];\\\\n } else {\\\\n value = fieldValues;\\\\n }\\\\n\\\\n // write the tags value to the file directly\\\\n fileDirectory[_globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTagNames\\\\\\\"][fieldTag]] = value;\\\\n }\\\\n const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);\\\\n const nextIFDByteOffset = dataSlice.readOffset(\\\\n offset + offsetSize + (entrySize * numDirEntries),\\\\n );\\\\n\\\\n return new ImageFileDirectory(\\\\n fileDirectory,\\\\n geoKeyDirectory,\\\\n nextIFDByteOffset,\\\\n );\\\\n }\\\\n\\\\n async requestIFD(index) {\\\\n // see if we already have that IFD index requested.\\\\n if (this.ifdRequests[index]) {\\\\n // attach to an already requested IFD\\\\n return this.ifdRequests[index];\\\\n } else if (index === 0) {\\\\n // special case for index 0\\\\n this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);\\\\n return this.ifdRequests[index];\\\\n } else if (!this.ifdRequests[index - 1]) {\\\\n // if the previous IFD was not yet loaded, load that one first\\\\n // this is the recursive call.\\\\n try {\\\\n this.ifdRequests[index - 1] = this.requestIFD(index - 1);\\\\n } catch (e) {\\\\n // if the previous one already was an index error, rethrow\\\\n // with the current index\\\\n if (e instanceof GeoTIFFImageIndexError) {\\\\n throw new GeoTIFFImageIndexError(index);\\\\n }\\\\n // rethrow anything else\\\\n throw e;\\\\n }\\\\n }\\\\n // if the previous IFD was loaded, we can finally fetch the one we are interested in.\\\\n // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\\\\n this.ifdRequests[index] = (async () => {\\\\n const previousIfd = await this.ifdRequests[index - 1];\\\\n if (previousIfd.nextIFDByteOffset === 0) {\\\\n throw new GeoTIFFImageIndexError(index);\\\\n }\\\\n return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\\\\n })();\\\\n return this.ifdRequests[index];\\\\n }\\\\n\\\\n /**\\\\n * Get the n-th internal subfile of an image. By default, the first is returned.\\\\n *\\\\n * @param {Number} [index=0] the index of the image to return.\\\\n * @returns {GeoTIFFImage} the image at the given index\\\\n */\\\\n async getImage(index = 0) {\\\\n const ifd = await this.requestIFD(index);\\\\n return new _geotiffimage__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"](\\\\n ifd.fileDirectory, ifd.geoKeyDirectory,\\\\n this.dataView, this.littleEndian, this.cache, this.source,\\\\n );\\\\n }\\\\n\\\\n /**\\\\n * Returns the count of the internal subfiles.\\\\n *\\\\n * @returns {Number} the number of internal subfile images\\\\n */\\\\n async getImageCount() {\\\\n let index = 0;\\\\n // loop until we run out of IFDs\\\\n let hasNext = true;\\\\n while (hasNext) {\\\\n try {\\\\n await this.requestIFD(index);\\\\n ++index;\\\\n } catch (e) {\\\\n if (e instanceof GeoTIFFImageIndexError) {\\\\n hasNext = false;\\\\n } else {\\\\n throw e;\\\\n }\\\\n }\\\\n }\\\\n return index;\\\\n }\\\\n\\\\n /**\\\\n * Get the values of the COG ghost area as a parsed map.\\\\n * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\\\\n * @returns {Object} the parsed ghost area or null, if no such area was found\\\\n */\\\\n async getGhostValues() {\\\\n const offset = this.bigTiff ? 16 : 8;\\\\n if (this.ghostValues) {\\\\n return this.ghostValues;\\\\n }\\\\n const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\\\\n const heuristicAreaSize = detectionString.length + 100;\\\\n let slice = await this.getSlice(offset, heuristicAreaSize);\\\\n if (detectionString === getValues(slice, _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII, detectionString.length, offset)) {\\\\n const valuesString = getValues(slice, _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII, heuristicAreaSize, offset);\\\\n const firstLine = valuesString.split('\\\\\\\\n')[0];\\\\n const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\\\\n if (metadataSize > heuristicAreaSize) {\\\\n slice = await this.getSlice(offset, metadataSize);\\\\n }\\\\n const fullString = getValues(slice, _globals__WEBPACK_IMPORTED_MODULE_5__[\\\\\\\"fieldTypes\\\\\\\"].ASCII, metadataSize, offset);\\\\n this.ghostValues = {};\\\\n fullString\\\\n .split('\\\\\\\\n')\\\\n .filter(line => line.length > 0)\\\\n .map(line => line.split('='))\\\\n .forEach(([key, value]) => {\\\\n this.ghostValues[key] = value;\\\\n });\\\\n }\\\\n return this.ghostValues;\\\\n }\\\\n\\\\n /**\\\\n * Parse a (Geo)TIFF file from the given source.\\\\n *\\\\n * @param {source~Source} source The source of data to parse from.\\\\n * @param {object} options Additional options.\\\\n */\\\\n static async fromSource(source, options) {\\\\n const headerData = await source.fetch(0, 1024);\\\\n const dataView = new _dataview64__WEBPACK_IMPORTED_MODULE_1__[\\\\\\\"default\\\\\\\"](headerData);\\\\n\\\\n const BOM = dataView.getUint16(0, 0);\\\\n let littleEndian;\\\\n if (BOM === 0x4949) {\\\\n littleEndian = true;\\\\n } else if (BOM === 0x4D4D) {\\\\n littleEndian = false;\\\\n } else {\\\\n throw new TypeError('Invalid byte order value.');\\\\n }\\\\n\\\\n const magicNumber = dataView.getUint16(2, littleEndian);\\\\n let bigTiff;\\\\n if (magicNumber === 42) {\\\\n bigTiff = false;\\\\n } else if (magicNumber === 43) {\\\\n bigTiff = true;\\\\n const offsetByteSize = dataView.getUint16(4, littleEndian);\\\\n if (offsetByteSize !== 8) {\\\\n throw new Error('Unsupported offset byte-size.');\\\\n }\\\\n } else {\\\\n throw new TypeError('Invalid magic number.');\\\\n }\\\\n\\\\n const firstIFDOffset = bigTiff\\\\n ? dataView.getUint64(8, littleEndian)\\\\n : dataView.getUint32(4, littleEndian);\\\\n return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\\\\n }\\\\n\\\\n /**\\\\n * Closes the underlying file buffer\\\\n * N.B. After the GeoTIFF has been completely processed it needs\\\\n * to be closed but only if it has been constructed from a file.\\\\n */\\\\n close() {\\\\n if (typeof this.source.close === 'function') {\\\\n return this.source.close();\\\\n }\\\\n return false;\\\\n }\\\\n}\\\\n\\\\n\\\\n/* harmony default export */ __webpack_exports__[\\\\\\\"default\\\\\\\"] = (GeoTIFF);\\\\n\\\\n/**\\\\n * Wrapper for GeoTIFF files that have external overviews.\\\\n * @augments GeoTIFFBase\\\\n */\\\\nclass MultiGeoTIFF extends GeoTIFFBase {\\\\n /**\\\\n * Construct a new MultiGeoTIFF from a main and several overview files.\\\\n * @param {GeoTIFF} mainFile The main GeoTIFF file.\\\\n * @param {GeoTIFF[]} overviewFiles An array of overview files.\\\\n */\\\\n constructor(mainFile, overviewFiles) {\\\\n super();\\\\n this.mainFile = mainFile;\\\\n this.overviewFiles = overviewFiles;\\\\n this.imageFiles = [mainFile].concat(overviewFiles);\\\\n\\\\n this.fileDirectoriesPerFile = null;\\\\n this.fileDirectoriesPerFileParsing = null;\\\\n this.imageCount = null;\\\\n }\\\\n\\\\n async parseFileDirectoriesPerFile() {\\\\n const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\\\\n .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));\\\\n\\\\n this.fileDirectoriesPerFile = await Promise.all(requests);\\\\n return this.fileDirectoriesPerFile;\\\\n }\\\\n\\\\n /**\\\\n * Get the n-th internal subfile of an image. By default, the first is returned.\\\\n *\\\\n * @param {Number} [index=0] the index of the image to return.\\\\n * @returns {GeoTIFFImage} the image at the given index\\\\n */\\\\n async getImage(index = 0) {\\\\n await this.getImageCount();\\\\n await this.parseFileDirectoriesPerFile();\\\\n let visited = 0;\\\\n let relativeIndex = 0;\\\\n for (let i = 0; i < this.imageFiles.length; i++) {\\\\n const imageFile = this.imageFiles[i];\\\\n for (let ii = 0; ii < this.imageCounts[i]; ii++) {\\\\n if (index === visited) {\\\\n const ifd = await imageFile.requestIFD(relativeIndex);\\\\n return new _geotiffimage__WEBPACK_IMPORTED_MODULE_0__[\\\\\\\"default\\\\\\\"](\\\\n ifd.fileDirectory, imageFile.geoKeyDirectory,\\\\n imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,\\\\n );\\\\n }\\\\n visited++;\\\\n relativeIndex++;\\\\n }\\\\n relativeIndex = 0;\\\\n }\\\\n\\\\n throw new RangeError('Invalid image index');\\\\n }\\\\n\\\\n /**\\\\n * Returns the count of the internal subfiles.\\\\n *\\\\n * @returns {Number} the number of internal subfile images\\\\n */\\\\n async getImageCount() {\\\\n if (this.imageCount !== null) {\\\\n return this.imageCount;\\\\n }\\\\n const requests = [this.mainFile.getImageCount()]\\\\n .concat(this.overviewFiles.map((file) => file.getImageCount()));\\\\n this.imageCounts = await Promise.all(requests);\\\\n this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\\\\n return this.imageCount;\\\\n }\\\\n}\\\\n\\\\n\\\\n\\\\n/**\\\\n * Creates a new GeoTIFF from a remote URL.\\\\n * @param {string} url The URL to access the image from\\\\n * @param {object} [options] Additional options to pass to the source.\\\\n * See {@link makeRemoteSource} for details.\\\\n * @returns {Promise.this is a testpage
'),undefined,'\\\\\\\\t'));\\\\nvar p = new DOMParser();\\\\nvar s2=''+s+''\\\\nvar start2= new Date().getTime();\\\\nvar o2 = p.parseFromString(s2,'text/html').querySelector('#content')\\\\nvar end2=new Date().getTime();\\\\nconsole.log(\\\\\\\"MILLISECONDS\\\\\\\",end2-start2);\\\\n// */\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/txml/tXml.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/url/url.js\\\":\\n/*!*********************************!*\\\\\\n !*** ./node_modules/url/url.js ***!\\n \\\\*********************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"/*\\\\n * Copyright Joyent, Inc. and other Node contributors.\\\\n *\\\\n * Permission is hereby granted, free of charge, to any person obtaining a\\\\n * copy of this software and associated documentation files (the\\\\n * \\\\\\\"Software\\\\\\\"), to deal in the Software without restriction, including\\\\n * without limitation the rights to use, copy, modify, merge, publish,\\\\n * distribute, sublicense, and/or sell copies of the Software, and to permit\\\\n * persons to whom the Software is furnished to do so, subject to the\\\\n * following conditions:\\\\n *\\\\n * The above copyright notice and this permission notice shall be included\\\\n * in all copies or substantial portions of the Software.\\\\n *\\\\n * THE SOFTWARE IS PROVIDED \\\\\\\"AS IS\\\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\\\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\\\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\\\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\\\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\\\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\\\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\\\\n */\\\\n\\\\n\\\\n\\\\nvar punycode = __webpack_require__(/*! punycode */ \\\\\\\"./node_modules/punycode/punycode.js\\\\\\\");\\\\n\\\\nfunction Url() {\\\\n this.protocol = null;\\\\n this.slashes = null;\\\\n this.auth = null;\\\\n this.host = null;\\\\n this.port = null;\\\\n this.hostname = null;\\\\n this.hash = null;\\\\n this.search = null;\\\\n this.query = null;\\\\n this.pathname = null;\\\\n this.path = null;\\\\n this.href = null;\\\\n}\\\\n\\\\n// Reference: RFC 3986, RFC 1808, RFC 2396\\\\n\\\\n/*\\\\n * define these here so at least they only have to be\\\\n * compiled once on the first module load.\\\\n */\\\\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\\\\n portPattern = /:[0-9]*$/,\\\\n\\\\n // Special case for a simple path URL\\\\n simplePathPattern = /^(\\\\\\\\/\\\\\\\\/?(?!\\\\\\\\/)[^?\\\\\\\\s]*)(\\\\\\\\?[^\\\\\\\\s]*)?$/,\\\\n\\\\n /*\\\\n * RFC 2396: characters reserved for delimiting URLs.\\\\n * We actually just auto-escape these.\\\\n */\\\\n delims = [\\\\n '<', '>', '\\\\\\\"', '`', ' ', '\\\\\\\\r', '\\\\\\\\n', '\\\\\\\\t'\\\\n ],\\\\n\\\\n // RFC 2396: characters not allowed for various reasons.\\\\n unwise = [\\\\n '{', '}', '|', '\\\\\\\\\\\\\\\\', '^', '`'\\\\n ].concat(delims),\\\\n\\\\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\\\\n autoEscape = ['\\\\\\\\''].concat(unwise),\\\\n /*\\\\n * Characters that are never ever allowed in a hostname.\\\\n * Note that any invalid chars are also handled, but these\\\\n * are the ones that are *expected* to be seen, so we fast-path\\\\n * them.\\\\n */\\\\n nonHostChars = [\\\\n '%', '/', '?', ';', '#'\\\\n ].concat(autoEscape),\\\\n hostEndingChars = [\\\\n '/', '?', '#'\\\\n ],\\\\n hostnameMaxLen = 255,\\\\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\\\\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\\\\n // protocols that can allow \\\\\\\"unsafe\\\\\\\" and \\\\\\\"unwise\\\\\\\" chars.\\\\n unsafeProtocol = {\\\\n javascript: true,\\\\n 'javascript:': true\\\\n },\\\\n // protocols that never have a hostname.\\\\n hostlessProtocol = {\\\\n javascript: true,\\\\n 'javascript:': true\\\\n },\\\\n // protocols that always contain a // bit.\\\\n slashedProtocol = {\\\\n http: true,\\\\n https: true,\\\\n ftp: true,\\\\n gopher: true,\\\\n file: true,\\\\n 'http:': true,\\\\n 'https:': true,\\\\n 'ftp:': true,\\\\n 'gopher:': true,\\\\n 'file:': true\\\\n },\\\\n querystring = __webpack_require__(/*! qs */ \\\\\\\"./node_modules/qs/lib/index.js\\\\\\\");\\\\n\\\\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\\\\n if (url && typeof url === 'object' && url instanceof Url) { return url; }\\\\n\\\\n var u = new Url();\\\\n u.parse(url, parseQueryString, slashesDenoteHost);\\\\n return u;\\\\n}\\\\n\\\\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\\\\n if (typeof url !== 'string') {\\\\n throw new TypeError(\\\\\\\"Parameter 'url' must be a string, not \\\\\\\" + typeof url);\\\\n }\\\\n\\\\n /*\\\\n * Copy chrome, IE, opera backslash-handling behavior.\\\\n * Back slashes before the query string get converted to forward slashes\\\\n * See: https://code.google.com/p/chromium/issues/detail?id=25916\\\\n */\\\\n var queryIndex = url.indexOf('?'),\\\\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\\\\n uSplit = url.split(splitter),\\\\n slashRegex = /\\\\\\\\\\\\\\\\/g;\\\\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\\\\n url = uSplit.join(splitter);\\\\n\\\\n var rest = url;\\\\n\\\\n /*\\\\n * trim before proceeding.\\\\n * This is to support parse stuff like \\\\\\\" http://foo.com \\\\\\\\n\\\\\\\"\\\\n */\\\\n rest = rest.trim();\\\\n\\\\n if (!slashesDenoteHost && url.split('#').length === 1) {\\\\n // Try fast path regexp\\\\n var simplePath = simplePathPattern.exec(rest);\\\\n if (simplePath) {\\\\n this.path = rest;\\\\n this.href = rest;\\\\n this.pathname = simplePath[1];\\\\n if (simplePath[2]) {\\\\n this.search = simplePath[2];\\\\n if (parseQueryString) {\\\\n this.query = querystring.parse(this.search.substr(1));\\\\n } else {\\\\n this.query = this.search.substr(1);\\\\n }\\\\n } else if (parseQueryString) {\\\\n this.search = '';\\\\n this.query = {};\\\\n }\\\\n return this;\\\\n }\\\\n }\\\\n\\\\n var proto = protocolPattern.exec(rest);\\\\n if (proto) {\\\\n proto = proto[0];\\\\n var lowerProto = proto.toLowerCase();\\\\n this.protocol = lowerProto;\\\\n rest = rest.substr(proto.length);\\\\n }\\\\n\\\\n /*\\\\n * figure out if it's got a host\\\\n * user@server is *always* interpreted as a hostname, and url\\\\n * resolution will treat //foo/bar as host=foo,path=bar because that's\\\\n * how the browser resolves relative URLs.\\\\n */\\\\n if (slashesDenoteHost || proto || rest.match(/^\\\\\\\\/\\\\\\\\/[^@/]+@[^@/]+/)) {\\\\n var slashes = rest.substr(0, 2) === '//';\\\\n if (slashes && !(proto && hostlessProtocol[proto])) {\\\\n rest = rest.substr(2);\\\\n this.slashes = true;\\\\n }\\\\n }\\\\n\\\\n if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) {\\\\n\\\\n /*\\\\n * there's a hostname.\\\\n * the first instance of /, ?, ;, or # ends the host.\\\\n *\\\\n * If there is an @ in the hostname, then non-host chars *are* allowed\\\\n * to the left of the last @ sign, unless some host-ending character\\\\n * comes *before* the @-sign.\\\\n * URLs are obnoxious.\\\\n *\\\\n * ex:\\\\n * http://a@b@c/ => user:a@b host:c\\\\n * http://a@b?@c => user:a host:c path:/?@c\\\\n */\\\\n\\\\n /*\\\\n * v0.12 TODO(isaacs): This is not quite how Chrome does things.\\\\n * Review our test case against browsers more comprehensively.\\\\n */\\\\n\\\\n // find the first instance of any hostEndingChars\\\\n var hostEnd = -1;\\\\n for (var i = 0; i < hostEndingChars.length; i++) {\\\\n var hec = rest.indexOf(hostEndingChars[i]);\\\\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\\\\n }\\\\n\\\\n /*\\\\n * at this point, either we have an explicit point where the\\\\n * auth portion cannot go past, or the last @ char is the decider.\\\\n */\\\\n var auth, atSign;\\\\n if (hostEnd === -1) {\\\\n // atSign can be anywhere.\\\\n atSign = rest.lastIndexOf('@');\\\\n } else {\\\\n /*\\\\n * atSign must be in auth portion.\\\\n * http://a@b/c@d => host:b auth:a path:/c@d\\\\n */\\\\n atSign = rest.lastIndexOf('@', hostEnd);\\\\n }\\\\n\\\\n /*\\\\n * Now we have a portion which is definitely the auth.\\\\n * Pull that off.\\\\n */\\\\n if (atSign !== -1) {\\\\n auth = rest.slice(0, atSign);\\\\n rest = rest.slice(atSign + 1);\\\\n this.auth = decodeURIComponent(auth);\\\\n }\\\\n\\\\n // the host is the remaining to the left of the first non-host char\\\\n hostEnd = -1;\\\\n for (var i = 0; i < nonHostChars.length; i++) {\\\\n var hec = rest.indexOf(nonHostChars[i]);\\\\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\\\\n }\\\\n // if we still have not hit it, then the entire thing is a host.\\\\n if (hostEnd === -1) { hostEnd = rest.length; }\\\\n\\\\n this.host = rest.slice(0, hostEnd);\\\\n rest = rest.slice(hostEnd);\\\\n\\\\n // pull out port.\\\\n this.parseHost();\\\\n\\\\n /*\\\\n * we've indicated that there is a hostname,\\\\n * so even if it's empty, it has to be present.\\\\n */\\\\n this.hostname = this.hostname || '';\\\\n\\\\n /*\\\\n * if hostname begins with [ and ends with ]\\\\n * assume that it's an IPv6 address.\\\\n */\\\\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\\\\n\\\\n // validate a little.\\\\n if (!ipv6Hostname) {\\\\n var hostparts = this.hostname.split(/\\\\\\\\./);\\\\n for (var i = 0, l = hostparts.length; i < l; i++) {\\\\n var part = hostparts[i];\\\\n if (!part) { continue; }\\\\n if (!part.match(hostnamePartPattern)) {\\\\n var newpart = '';\\\\n for (var j = 0, k = part.length; j < k; j++) {\\\\n if (part.charCodeAt(j) > 127) {\\\\n /*\\\\n * we replace non-ASCII char with a temporary placeholder\\\\n * we need this to make sure size of hostname is not\\\\n * broken by replacing non-ASCII by nothing\\\\n */\\\\n newpart += 'x';\\\\n } else {\\\\n newpart += part[j];\\\\n }\\\\n }\\\\n // we test again with ASCII char only\\\\n if (!newpart.match(hostnamePartPattern)) {\\\\n var validParts = hostparts.slice(0, i);\\\\n var notHost = hostparts.slice(i + 1);\\\\n var bit = part.match(hostnamePartStart);\\\\n if (bit) {\\\\n validParts.push(bit[1]);\\\\n notHost.unshift(bit[2]);\\\\n }\\\\n if (notHost.length) {\\\\n rest = '/' + notHost.join('.') + rest;\\\\n }\\\\n this.hostname = validParts.join('.');\\\\n break;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n if (this.hostname.length > hostnameMaxLen) {\\\\n this.hostname = '';\\\\n } else {\\\\n // hostnames are always lower case.\\\\n this.hostname = this.hostname.toLowerCase();\\\\n }\\\\n\\\\n if (!ipv6Hostname) {\\\\n /*\\\\n * IDNA Support: Returns a punycoded representation of \\\\\\\"domain\\\\\\\".\\\\n * It only converts parts of the domain name that\\\\n * have non-ASCII characters, i.e. it doesn't matter if\\\\n * you call it with a domain that already is ASCII-only.\\\\n */\\\\n this.hostname = punycode.toASCII(this.hostname);\\\\n }\\\\n\\\\n var p = this.port ? ':' + this.port : '';\\\\n var h = this.hostname || '';\\\\n this.host = h + p;\\\\n this.href += this.host;\\\\n\\\\n /*\\\\n * strip [ and ] from the hostname\\\\n * the host field still retains them, though\\\\n */\\\\n if (ipv6Hostname) {\\\\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\\\\n if (rest[0] !== '/') {\\\\n rest = '/' + rest;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * now rest is set to the post-host stuff.\\\\n * chop off any delim chars.\\\\n */\\\\n if (!unsafeProtocol[lowerProto]) {\\\\n\\\\n /*\\\\n * First, make 100% sure that any \\\\\\\"autoEscape\\\\\\\" chars get\\\\n * escaped, even if encodeURIComponent doesn't think they\\\\n * need to be.\\\\n */\\\\n for (var i = 0, l = autoEscape.length; i < l; i++) {\\\\n var ae = autoEscape[i];\\\\n if (rest.indexOf(ae) === -1) { continue; }\\\\n var esc = encodeURIComponent(ae);\\\\n if (esc === ae) {\\\\n esc = escape(ae);\\\\n }\\\\n rest = rest.split(ae).join(esc);\\\\n }\\\\n }\\\\n\\\\n // chop off from the tail first.\\\\n var hash = rest.indexOf('#');\\\\n if (hash !== -1) {\\\\n // got a fragment string.\\\\n this.hash = rest.substr(hash);\\\\n rest = rest.slice(0, hash);\\\\n }\\\\n var qm = rest.indexOf('?');\\\\n if (qm !== -1) {\\\\n this.search = rest.substr(qm);\\\\n this.query = rest.substr(qm + 1);\\\\n if (parseQueryString) {\\\\n this.query = querystring.parse(this.query);\\\\n }\\\\n rest = rest.slice(0, qm);\\\\n } else if (parseQueryString) {\\\\n // no query string, but parseQueryString still requested\\\\n this.search = '';\\\\n this.query = {};\\\\n }\\\\n if (rest) { this.pathname = rest; }\\\\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\\\\n this.pathname = '/';\\\\n }\\\\n\\\\n // to support http.request\\\\n if (this.pathname || this.search) {\\\\n var p = this.pathname || '';\\\\n var s = this.search || '';\\\\n this.path = p + s;\\\\n }\\\\n\\\\n // finally, reconstruct the href based on what has been validated.\\\\n this.href = this.format();\\\\n return this;\\\\n};\\\\n\\\\n// format a parsed object into a url string\\\\nfunction urlFormat(obj) {\\\\n /*\\\\n * ensure it's an object, and not a string url.\\\\n * If it's an obj, this is a no-op.\\\\n * this way, you can call url_format() on strings\\\\n * to clean up potentially wonky urls.\\\\n */\\\\n if (typeof obj === 'string') { obj = urlParse(obj); }\\\\n if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }\\\\n return obj.format();\\\\n}\\\\n\\\\nUrl.prototype.format = function () {\\\\n var auth = this.auth || '';\\\\n if (auth) {\\\\n auth = encodeURIComponent(auth);\\\\n auth = auth.replace(/%3A/i, ':');\\\\n auth += '@';\\\\n }\\\\n\\\\n var protocol = this.protocol || '',\\\\n pathname = this.pathname || '',\\\\n hash = this.hash || '',\\\\n host = false,\\\\n query = '';\\\\n\\\\n if (this.host) {\\\\n host = auth + this.host;\\\\n } else if (this.hostname) {\\\\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\\\\n if (this.port) {\\\\n host += ':' + this.port;\\\\n }\\\\n }\\\\n\\\\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\\\\n query = querystring.stringify(this.query);\\\\n }\\\\n\\\\n var search = this.search || (query && ('?' + query)) || '';\\\\n\\\\n if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\\\\n\\\\n /*\\\\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\\\\n * unless they had them to begin with.\\\\n */\\\\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\\\\n host = '//' + (host || '');\\\\n if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }\\\\n } else if (!host) {\\\\n host = '';\\\\n }\\\\n\\\\n if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }\\\\n if (search && search.charAt(0) !== '?') { search = '?' + search; }\\\\n\\\\n pathname = pathname.replace(/[?#]/g, function (match) {\\\\n return encodeURIComponent(match);\\\\n });\\\\n search = search.replace('#', '%23');\\\\n\\\\n return protocol + host + pathname + search + hash;\\\\n};\\\\n\\\\nfunction urlResolve(source, relative) {\\\\n return urlParse(source, false, true).resolve(relative);\\\\n}\\\\n\\\\nUrl.prototype.resolve = function (relative) {\\\\n return this.resolveObject(urlParse(relative, false, true)).format();\\\\n};\\\\n\\\\nfunction urlResolveObject(source, relative) {\\\\n if (!source) { return relative; }\\\\n return urlParse(source, false, true).resolveObject(relative);\\\\n}\\\\n\\\\nUrl.prototype.resolveObject = function (relative) {\\\\n if (typeof relative === 'string') {\\\\n var rel = new Url();\\\\n rel.parse(relative, false, true);\\\\n relative = rel;\\\\n }\\\\n\\\\n var result = new Url();\\\\n var tkeys = Object.keys(this);\\\\n for (var tk = 0; tk < tkeys.length; tk++) {\\\\n var tkey = tkeys[tk];\\\\n result[tkey] = this[tkey];\\\\n }\\\\n\\\\n /*\\\\n * hash is always overridden, no matter what.\\\\n * even href=\\\\\\\"\\\\\\\" will remove it.\\\\n */\\\\n result.hash = relative.hash;\\\\n\\\\n // if the relative url is empty, then there's nothing left to do here.\\\\n if (relative.href === '') {\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n // hrefs like //foo/bar always cut to the protocol.\\\\n if (relative.slashes && !relative.protocol) {\\\\n // take everything except the protocol from relative\\\\n var rkeys = Object.keys(relative);\\\\n for (var rk = 0; rk < rkeys.length; rk++) {\\\\n var rkey = rkeys[rk];\\\\n if (rkey !== 'protocol') { result[rkey] = relative[rkey]; }\\\\n }\\\\n\\\\n // urlParse appends trailing / to urls like http://www.example.com\\\\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\\\\n result.pathname = '/';\\\\n result.path = result.pathname;\\\\n }\\\\n\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n if (relative.protocol && relative.protocol !== result.protocol) {\\\\n /*\\\\n * if it's a known url protocol, then changing\\\\n * the protocol does weird things\\\\n * first, if it's not file:, then we MUST have a host,\\\\n * and if there was a path\\\\n * to begin with, then we MUST have a path.\\\\n * if it is file:, then the host is dropped,\\\\n * because that's known to be hostless.\\\\n * anything else is assumed to be absolute.\\\\n */\\\\n if (!slashedProtocol[relative.protocol]) {\\\\n var keys = Object.keys(relative);\\\\n for (var v = 0; v < keys.length; v++) {\\\\n var k = keys[v];\\\\n result[k] = relative[k];\\\\n }\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n result.protocol = relative.protocol;\\\\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\\\\n var relPath = (relative.pathname || '').split('/');\\\\n while (relPath.length && !(relative.host = relPath.shift())) { }\\\\n if (!relative.host) { relative.host = ''; }\\\\n if (!relative.hostname) { relative.hostname = ''; }\\\\n if (relPath[0] !== '') { relPath.unshift(''); }\\\\n if (relPath.length < 2) { relPath.unshift(''); }\\\\n result.pathname = relPath.join('/');\\\\n } else {\\\\n result.pathname = relative.pathname;\\\\n }\\\\n result.search = relative.search;\\\\n result.query = relative.query;\\\\n result.host = relative.host || '';\\\\n result.auth = relative.auth;\\\\n result.hostname = relative.hostname || relative.host;\\\\n result.port = relative.port;\\\\n // to support http.request\\\\n if (result.pathname || result.search) {\\\\n var p = result.pathname || '';\\\\n var s = result.search || '';\\\\n result.path = p + s;\\\\n }\\\\n result.slashes = result.slashes || relative.slashes;\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\\\\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\\\\n mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname),\\\\n removeAllDots = mustEndAbs,\\\\n srcPath = result.pathname && result.pathname.split('/') || [],\\\\n relPath = relative.pathname && relative.pathname.split('/') || [],\\\\n psychotic = result.protocol && !slashedProtocol[result.protocol];\\\\n\\\\n /*\\\\n * if the url is a non-slashed url, then relative\\\\n * links like ../.. should be able\\\\n * to crawl up to the hostname, as well. This is strange.\\\\n * result.protocol has already been set by now.\\\\n * Later on, put the first path part into the host field.\\\\n */\\\\n if (psychotic) {\\\\n result.hostname = '';\\\\n result.port = null;\\\\n if (result.host) {\\\\n if (srcPath[0] === '') { srcPath[0] = result.host; } else { srcPath.unshift(result.host); }\\\\n }\\\\n result.host = '';\\\\n if (relative.protocol) {\\\\n relative.hostname = null;\\\\n relative.port = null;\\\\n if (relative.host) {\\\\n if (relPath[0] === '') { relPath[0] = relative.host; } else { relPath.unshift(relative.host); }\\\\n }\\\\n relative.host = null;\\\\n }\\\\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\\\\n }\\\\n\\\\n if (isRelAbs) {\\\\n // it's absolute.\\\\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\\\\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\\\\n result.search = relative.search;\\\\n result.query = relative.query;\\\\n srcPath = relPath;\\\\n // fall through to the dot-handling below.\\\\n } else if (relPath.length) {\\\\n /*\\\\n * it's relative\\\\n * throw away the existing file, and take the new path instead.\\\\n */\\\\n if (!srcPath) { srcPath = []; }\\\\n srcPath.pop();\\\\n srcPath = srcPath.concat(relPath);\\\\n result.search = relative.search;\\\\n result.query = relative.query;\\\\n } else if (relative.search != null) {\\\\n /*\\\\n * just pull out the search.\\\\n * like href='?foo'.\\\\n * Put this after the other two cases because it simplifies the booleans\\\\n */\\\\n if (psychotic) {\\\\n result.host = srcPath.shift();\\\\n result.hostname = result.host;\\\\n /*\\\\n * occationaly the auth can get stuck only in host\\\\n * this especially happens in cases like\\\\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\\\\n */\\\\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\\\\n if (authInHost) {\\\\n result.auth = authInHost.shift();\\\\n result.hostname = authInHost.shift();\\\\n result.host = result.hostname;\\\\n }\\\\n }\\\\n result.search = relative.search;\\\\n result.query = relative.query;\\\\n // to support http.request\\\\n if (result.pathname !== null || result.search !== null) {\\\\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\\\\n }\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n if (!srcPath.length) {\\\\n /*\\\\n * no path at all. easy.\\\\n * we've already handled the other stuff above.\\\\n */\\\\n result.pathname = null;\\\\n // to support http.request\\\\n if (result.search) {\\\\n result.path = '/' + result.search;\\\\n } else {\\\\n result.path = null;\\\\n }\\\\n result.href = result.format();\\\\n return result;\\\\n }\\\\n\\\\n /*\\\\n * if a url ENDs in . or .., then it must get a trailing slash.\\\\n * however, if it ends in anything else non-slashy,\\\\n * then it must NOT get a trailing slash.\\\\n */\\\\n var last = srcPath.slice(-1)[0];\\\\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\\\\n\\\\n /*\\\\n * strip single dots, resolve double dots to parent dir\\\\n * if the path tries to go above the root, `up` ends up > 0\\\\n */\\\\n var up = 0;\\\\n for (var i = srcPath.length; i >= 0; i--) {\\\\n last = srcPath[i];\\\\n if (last === '.') {\\\\n srcPath.splice(i, 1);\\\\n } else if (last === '..') {\\\\n srcPath.splice(i, 1);\\\\n up++;\\\\n } else if (up) {\\\\n srcPath.splice(i, 1);\\\\n up--;\\\\n }\\\\n }\\\\n\\\\n // if the path is allowed to go above the root, restore leading ..s\\\\n if (!mustEndAbs && !removeAllDots) {\\\\n for (; up--; up) {\\\\n srcPath.unshift('..');\\\\n }\\\\n }\\\\n\\\\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\\\\n srcPath.unshift('');\\\\n }\\\\n\\\\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\\\\n srcPath.push('');\\\\n }\\\\n\\\\n var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');\\\\n\\\\n // put the host back\\\\n if (psychotic) {\\\\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\\\\n result.host = result.hostname;\\\\n /*\\\\n * occationaly the auth can get stuck only in host\\\\n * this especially happens in cases like\\\\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\\\\n */\\\\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\\\\n if (authInHost) {\\\\n result.auth = authInHost.shift();\\\\n result.hostname = authInHost.shift();\\\\n result.host = result.hostname;\\\\n }\\\\n }\\\\n\\\\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\\\\n\\\\n if (mustEndAbs && !isAbsolute) {\\\\n srcPath.unshift('');\\\\n }\\\\n\\\\n if (srcPath.length > 0) {\\\\n result.pathname = srcPath.join('/');\\\\n } else {\\\\n result.pathname = null;\\\\n result.path = null;\\\\n }\\\\n\\\\n // to support request.http\\\\n if (result.pathname !== null || result.search !== null) {\\\\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\\\\n }\\\\n result.auth = relative.auth || result.auth;\\\\n result.slashes = result.slashes || relative.slashes;\\\\n result.href = result.format();\\\\n return result;\\\\n};\\\\n\\\\nUrl.prototype.parseHost = function () {\\\\n var host = this.host;\\\\n var port = portPattern.exec(host);\\\\n if (port) {\\\\n port = port[0];\\\\n if (port !== ':') {\\\\n this.port = port.substr(1);\\\\n }\\\\n host = host.substr(0, host.length - port.length);\\\\n }\\\\n if (host) { this.hostname = host; }\\\\n};\\\\n\\\\nexports.parse = urlParse;\\\\nexports.resolve = urlResolve;\\\\nexports.resolveObject = urlResolveObject;\\\\nexports.format = urlFormat;\\\\n\\\\nexports.Url = Url;\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/url/url.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/util-deprecate/browser.js\\\":\\n/*!************************************************!*\\\\\\n !*** ./node_modules/util-deprecate/browser.js ***!\\n \\\\************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\neval(\\\"/* WEBPACK VAR INJECTION */(function(global) {\\\\n/**\\\\n * Module exports.\\\\n */\\\\n\\\\nmodule.exports = deprecate;\\\\n\\\\n/**\\\\n * Mark that a method should not be used.\\\\n * Returns a modified function which warns once by default.\\\\n *\\\\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\\\\n *\\\\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\\\\n * will throw an Error when invoked.\\\\n *\\\\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\\\\n * will invoke `console.trace()` instead of `console.error()`.\\\\n *\\\\n * @param {Function} fn - the function to deprecate\\\\n * @param {String} msg - the string to print to the console when `fn` is invoked\\\\n * @returns {Function} a new \\\\\\\"deprecated\\\\\\\" version of `fn`\\\\n * @api public\\\\n */\\\\n\\\\nfunction deprecate (fn, msg) {\\\\n if (config('noDeprecation')) {\\\\n return fn;\\\\n }\\\\n\\\\n var warned = false;\\\\n function deprecated() {\\\\n if (!warned) {\\\\n if (config('throwDeprecation')) {\\\\n throw new Error(msg);\\\\n } else if (config('traceDeprecation')) {\\\\n console.trace(msg);\\\\n } else {\\\\n console.warn(msg);\\\\n }\\\\n warned = true;\\\\n }\\\\n return fn.apply(this, arguments);\\\\n }\\\\n\\\\n return deprecated;\\\\n}\\\\n\\\\n/**\\\\n * Checks `localStorage` for boolean values for the given `name`.\\\\n *\\\\n * @param {String} name\\\\n * @returns {Boolean}\\\\n * @api private\\\\n */\\\\n\\\\nfunction config (name) {\\\\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\\\\n try {\\\\n if (!global.localStorage) return false;\\\\n } catch (_) {\\\\n return false;\\\\n }\\\\n var val = global.localStorage[name];\\\\n if (null == val) return false;\\\\n return String(val).toLowerCase() === 'true';\\\\n}\\\\n\\\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\\\\\"./node_modules/webpack/buildin/global.js\\\\\\\")))\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/util-deprecate/browser.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/webpack/buildin/global.js\\\":\\n/*!***********************************!*\\\\\\n !*** (webpack)/buildin/global.js ***!\\n \\\\***********************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"var g;\\\\n\\\\n// This works in non-strict mode\\\\ng = (function() {\\\\n\\\\treturn this;\\\\n})();\\\\n\\\\ntry {\\\\n\\\\t// This works if eval is allowed (see CSP)\\\\n\\\\tg = g || new Function(\\\\\\\"return this\\\\\\\")();\\\\n} catch (e) {\\\\n\\\\t// This works if the window reference is available\\\\n\\\\tif (typeof window === \\\\\\\"object\\\\\\\") g = window;\\\\n}\\\\n\\\\n// g can still be undefined, but nothing to do about it...\\\\n// We return undefined, instead of nothing here, so it's\\\\n// easier to handle this case. if(!global) { ...}\\\\n\\\\nmodule.exports = g;\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/(webpack)/buildin/global.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/webpack/buildin/module.js\\\":\\n/*!***********************************!*\\\\\\n !*** (webpack)/buildin/module.js ***!\\n \\\\***********************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"module.exports = function(module) {\\\\n\\\\tif (!module.webpackPolyfill) {\\\\n\\\\t\\\\tmodule.deprecate = function() {};\\\\n\\\\t\\\\tmodule.paths = [];\\\\n\\\\t\\\\t// module.parent = undefined by default\\\\n\\\\t\\\\tif (!module.children) module.children = [];\\\\n\\\\t\\\\tObject.defineProperty(module, \\\\\\\"loaded\\\\\\\", {\\\\n\\\\t\\\\t\\\\tenumerable: true,\\\\n\\\\t\\\\t\\\\tget: function() {\\\\n\\\\t\\\\t\\\\t\\\\treturn module.l;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t});\\\\n\\\\t\\\\tObject.defineProperty(module, \\\\\\\"id\\\\\\\", {\\\\n\\\\t\\\\t\\\\tenumerable: true,\\\\n\\\\t\\\\t\\\\tget: function() {\\\\n\\\\t\\\\t\\\\t\\\\treturn module.i;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t});\\\\n\\\\t\\\\tmodule.webpackPolyfill = 1;\\\\n\\\\t}\\\\n\\\\treturn module;\\\\n};\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/(webpack)/buildin/module.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/xdim/src/prepared-select-funcs.js\\\":\\n/*!********************************************************!*\\\\\\n !*** ./node_modules/xdim/src/prepared-select-funcs.js ***!\\n \\\\********************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"module.exports = {\\\\n \\\\\\\"1\\\\\\\": function ({ point }) { const parent = this.data; const index = point[this.d0v0]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"2\\\\\\\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"3\\\\\\\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"4\\\\\\\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"5\\\\\\\": function ({ point }) { const parent = this.data; const index = this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]+this.m0v4*point[this.d0v4]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = point[this.d1v0]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,2\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,3\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,4\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,5\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]]; const index = this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]+this.m1v4*point[this.d1v4]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = point[this.d2v0]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,2\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,3\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,4\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,5\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]]; const index = this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]+this.m2v4*point[this.d2v4]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = point[this.d3v0]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,2\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,3\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,4\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,5\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]]; const index = this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]+this.m3v4*point[this.d3v4]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1,1\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = point[this.d4v0]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1,2\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1,3\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1,4\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]; return { parent, index, value: parent[index] }; },\\\\n \\\\\\\"1,1,1,1,5\\\\\\\": function ({ point }) { const parent = this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]]; const index = this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]+this.m4v4*point[this.d4v4]; return { parent, index, value: parent[index] }; }\\\\n}\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/prepared-select-funcs.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/xdim/src/prepared-update-funcs.js\\\":\\n/*!********************************************************!*\\\\\\n !*** ./node_modules/xdim/src/prepared-update-funcs.js ***!\\n \\\\********************************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"module.exports = {\\\\n \\\\\\\"1\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]] = value; },\\\\n \\\\\\\"2\\\\\\\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]] = value; },\\\\n \\\\\\\"3\\\\\\\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]] = value; },\\\\n \\\\\\\"4\\\\\\\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]] = value; },\\\\n \\\\\\\"5\\\\\\\": function ({ point, value }) { this.data[this.m0v0*point[this.d0v0]+this.m0v1*point[this.d0v1]+this.m0v2*point[this.d0v2]+this.m0v3*point[this.d0v3]+this.m0v4*point[this.d0v4]] = value; },\\\\n \\\\\\\"1,1\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]] = value; },\\\\n \\\\\\\"1,2\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]] = value; },\\\\n \\\\\\\"1,3\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]] = value; },\\\\n \\\\\\\"1,4\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]] = value; },\\\\n \\\\\\\"1,5\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][this.m1v0*point[this.d1v0]+this.m1v1*point[this.d1v1]+this.m1v2*point[this.d1v2]+this.m1v3*point[this.d1v3]+this.m1v4*point[this.d1v4]] = value; },\\\\n \\\\\\\"1,1,1\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]] = value; },\\\\n \\\\\\\"1,1,2\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]] = value; },\\\\n \\\\\\\"1,1,3\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]] = value; },\\\\n \\\\\\\"1,1,4\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]] = value; },\\\\n \\\\\\\"1,1,5\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][this.m2v0*point[this.d2v0]+this.m2v1*point[this.d2v1]+this.m2v2*point[this.d2v2]+this.m2v3*point[this.d2v3]+this.m2v4*point[this.d2v4]] = value; },\\\\n \\\\\\\"1,1,1,1\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]] = value; },\\\\n \\\\\\\"1,1,1,2\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]] = value; },\\\\n \\\\\\\"1,1,1,3\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]] = value; },\\\\n \\\\\\\"1,1,1,4\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]] = value; },\\\\n \\\\\\\"1,1,1,5\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][this.m3v0*point[this.d3v0]+this.m3v1*point[this.d3v1]+this.m3v2*point[this.d3v2]+this.m3v3*point[this.d3v3]+this.m3v4*point[this.d3v4]] = value; },\\\\n \\\\\\\"1,1,1,1,1\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][point[this.d4v0]] = value; },\\\\n \\\\\\\"1,1,1,1,2\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]] = value; },\\\\n \\\\\\\"1,1,1,1,3\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]] = value; },\\\\n \\\\\\\"1,1,1,1,4\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]] = value; },\\\\n \\\\\\\"1,1,1,1,5\\\\\\\": function ({ point, value }) { this.data[point[this.d0v0]][point[this.d1v0]][point[this.d2v0]][point[this.d3v0]][this.m4v0*point[this.d4v0]+this.m4v1*point[this.d4v1]+this.m4v2*point[this.d4v2]+this.m4v3*point[this.d4v3]+this.m4v4*point[this.d4v4]] = value; }\\\\n}\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/prepared-update-funcs.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/xdim/src/xdim.js\\\":\\n/*!***************************************!*\\\\\\n !*** ./node_modules/xdim/src/xdim.js ***!\\n \\\\***************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\neval(\\\"const layoutCache = {};\\\\nconst { wrapNextFunction } = __webpack_require__(/*! iter-fun */ \\\\\\\"./node_modules/iter-fun/index.js\\\\\\\");\\\\nconst preparedSelectFunctions = __webpack_require__(/*! ./prepared-select-funcs.js */ \\\\\\\"./node_modules/xdim/src/prepared-select-funcs.js\\\\\\\");\\\\nconst preparedUpdateFunctions = __webpack_require__(/*! ./prepared-update-funcs.js */ \\\\\\\"./node_modules/xdim/src/prepared-update-funcs.js\\\\\\\");\\\\n\\\\nconst ARRAY_TYPES = {\\\\n Array,\\\\n Int8Array,\\\\n Uint8Array,\\\\n Uint8ClampedArray,\\\\n Int16Array,\\\\n Uint16Array,\\\\n Float32Array,\\\\n Float64Array\\\\n};\\\\n\\\\ntry {\\\\n ARRAY_TYPES.BigInt64Array = BigInt64Array;\\\\n ARRAY_TYPES.BigUint64Array = BigUint64Array;\\\\n} catch (error) {\\\\n // pass\\\\n}\\\\n\\\\nfunction parseDimensions(str) {\\\\n const dims = {};\\\\n const re = /[A-Za-z]+/g;\\\\n let arr;\\\\n while ((arr = re.exec(str)) !== null) {\\\\n const [match] = arr;\\\\n dims[match] = {\\\\n name: match\\\\n };\\\\n }\\\\n return dims;\\\\n}\\\\n\\\\nfunction normalizeLayoutString(str) {\\\\n const alphabet = \\\\\\\"abcdefghijklmnopqrstuvwxyz\\\\\\\";\\\\n let i = 0;\\\\n return str.replace(/[A-Za-z]+/g, () => alphabet[i++]);\\\\n}\\\\n\\\\nconst parseVectors = str => str.match(/\\\\\\\\[[^\\\\\\\\]]+\\\\\\\\]/g);\\\\n\\\\n// \\\\\\\"[row]\\\\\\\" to \\\\\\\"row\\\\\\\"\\\\nconst removeBraces = str => (str.startsWith(\\\\\\\"[\\\\\\\") && str.endsWith(\\\\\\\"]\\\\\\\") ? str.substring(1, str.length - 1) : str);\\\\n\\\\n// \\\\\\\"(row)\\\\\\\" to \\\\\\\"row\\\\\\\"\\\\nconst removeParentheses = str => (str.startsWith(\\\\\\\"(\\\\\\\") && str.endsWith(\\\\\\\")\\\\\\\") ? str.substring(1, str.length - 1) : str);\\\\n\\\\n// sort of like parsing a CSV except instead of \\\\\\\" for quotes use (\\\\nconst matchSequences = str => str.match(/(\\\\\\\\(.*?\\\\\\\\)|[^\\\\\\\\(,\\\\\\\\s]+)(?=\\\\\\\\s*,|\\\\\\\\s*$)/g);\\\\n\\\\nconst parseSequences = str => {\\\\n // unwrap [...]\\\\n str = removeBraces(str);\\\\n\\\\n // unwrap (...)\\\\n str = removeParentheses(str);\\\\n\\\\n const seqs = matchSequences(str);\\\\n\\\\n if (seqs.length === 1) {\\\\n return {\\\\n type: \\\\\\\"Vector\\\\\\\",\\\\n dim: seqs[0]\\\\n };\\\\n } else {\\\\n return {\\\\n type: \\\\\\\"Matrix\\\\\\\",\\\\n parts: seqs.map(parseSequences)\\\\n };\\\\n }\\\\n};\\\\n\\\\nfunction checkValidity(str) {\\\\n const invalid = str.match(/[^ A-Za-z,\\\\\\\\[\\\\\\\\]]/g);\\\\n if (invalid) {\\\\n throw new Error(\\\\\\\"The following invalid characters were used: \\\\\\\" + invalid.map(c => `\\\\\\\"${c}\\\\\\\"`).join(\\\\\\\", \\\\\\\"));\\\\n } else {\\\\n return true;\\\\n }\\\\n}\\\\n\\\\nfunction parse(str, { useLayoutCache = true } = { useLayoutCache: true }) {\\\\n if (useLayoutCache && str in layoutCache) return layoutCache[str];\\\\n\\\\n checkValidity(str);\\\\n\\\\n const vectors = parseVectors(str);\\\\n const dims = vectors.map(parseSequences);\\\\n const result = {\\\\n type: \\\\\\\"Layout\\\\\\\",\\\\n summary: dims.map(it => (it.type === \\\\\\\"Matrix\\\\\\\" ? it.parts.length : 1)),\\\\n dims\\\\n };\\\\n\\\\n if (useLayoutCache) layoutCache[str] = result;\\\\n\\\\n return result;\\\\n}\\\\n\\\\nfunction update({ useLayoutCache = true, data, layout, point, sizes = {}, value }) {\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") layout = parse(layout, { useLayoutCache });\\\\n\\\\n const { dims } = layout;\\\\n for (let idim = 0; idim < dims.length; idim++) {\\\\n const last = idim === dims.length - 1;\\\\n const arr = dims[idim];\\\\n let offset;\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n offset = point[arr.dim];\\\\n } else {\\\\n // arr.type assumed to be \\\\\\\"Matrix\\\\\\\"\\\\n const { parts } = arr;\\\\n offset = 0;\\\\n let multiplier = 1;\\\\n for (let i = parts.length - 1; i >= 0; i--) {\\\\n const part = parts[i];\\\\n const { dim } = part;\\\\n offset += multiplier * point[dim];\\\\n if (i > 0) {\\\\n if (!(dim in sizes)) throw new Error(`you cannot calculate the location without knowing the size of the \\\\\\\"${dim}\\\\\\\" dimension.`);\\\\n multiplier *= sizes[dim];\\\\n }\\\\n }\\\\n }\\\\n if (last) {\\\\n data[offset] = value;\\\\n } else {\\\\n data = data[offset];\\\\n }\\\\n }\\\\n}\\\\n\\\\nfunction prepareUpdate({ useLayoutCache = true, data, layout, sizes = {} }) {\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") {\\\\n layout = parse(layout, { useLayoutCache });\\\\n }\\\\n const { dims } = layout;\\\\n const numDims = dims.length;\\\\n const multipliers = getMultipliers({ useLayoutCache, layout, sizes });\\\\n const end = numDims - 1;\\\\n\\\\n const key = layout.summary.toString();\\\\n if (key in preparedUpdateFunctions) {\\\\n const _this = { data };\\\\n layout.dims.map((it, depth) => {\\\\n if (it.type === \\\\\\\"Vector\\\\\\\") {\\\\n _this[`d${depth}v0`] = it.dim;\\\\n } else if (it.type === \\\\\\\"Matrix\\\\\\\") {\\\\n it.parts.forEach((part, ipart) => {\\\\n _this[`d${depth}v${ipart}`] = part.dim;\\\\n _this[`m${depth}v${ipart}`] = multipliers[part.dim];\\\\n });\\\\n }\\\\n });\\\\n\\\\n return preparedUpdateFunctions[key].bind(_this);\\\\n }\\\\n\\\\n return ({ point, value }) => {\\\\n let currentData = data;\\\\n for (let idim = 0; idim < numDims; idim++) {\\\\n const last = idim === end;\\\\n const arr = dims[idim];\\\\n let offset;\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n offset = point[arr.dim];\\\\n } else {\\\\n // arr.type assumed to be \\\\\\\"Matrix\\\\\\\"\\\\n offset = arr.parts.reduce((acc, { dim }) => acc + multipliers[dim] * point[dim], 0);\\\\n }\\\\n if (last) {\\\\n currentData[offset] = value;\\\\n } else {\\\\n currentData = currentData[offset];\\\\n }\\\\n }\\\\n };\\\\n}\\\\n\\\\nfunction iterClip({ data, layout, order, rect = {}, sizes = {}, useLayoutCache = true }) {\\\\n if (!data) throw new Error(\\\\\\\"[xdim] must specify data\\\\\\\");\\\\n if (!layout) throw new Error(\\\\\\\"[xdim] must specify layout\\\\\\\");\\\\n const points = iterPoints({ order, sizes, rect });\\\\n return wrapNextFunction(function next() {\\\\n const { value: point, done } = points.next();\\\\n if (done) {\\\\n return { done: true };\\\\n } else {\\\\n const { value } = select({ data, layout, point, sizes, useLayoutCache });\\\\n return { done: false, value };\\\\n }\\\\n });\\\\n}\\\\n\\\\nfunction validateRect({ rect = {} }) {\\\\n if (rect) {\\\\n for (let key in rect) {\\\\n const value = rect[key];\\\\n if (value.length !== 2) throw new Error(`[xdim] uh oh. invalid hyper-rectangle`);\\\\n const [start, end] = value;\\\\n if (start > end) throw new Error(`[xdim] uh oh. invalid range for \\\\\\\"${key}\\\\\\\". Start of ${start} can't be greater than end of ${end}.`);\\\\n if (start < 0) throw new Error(`[xdim] uh oh. invalid hyper-rectangle with start ${start}`);\\\\n }\\\\n }\\\\n}\\\\n\\\\nfunction clip({ useLayoutCache = true, data, layout, rect, sizes = {}, flat = false, validate = true }) {\\\\n if (validate) validateRect({ rect });\\\\n\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") layout = parse(layout, { useLayoutCache });\\\\n\\\\n let datas = [data];\\\\n\\\\n layout.dims.forEach(arr => {\\\\n let new_datas = [];\\\\n datas.forEach(data => {\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n const [start, end] = rect[arr.dim];\\\\n new_datas = new_datas.concat(data.slice(start, end + 1));\\\\n } else {\\\\n // only 2 types so must be arr.type === \\\\\\\"Matrix\\\\\\\"\\\\n const { parts } = arr;\\\\n let offsets = [0];\\\\n let multiplier = 1;\\\\n for (let i = parts.length - 1; i >= 0; i--) {\\\\n const part = parts[i];\\\\n // assume part.type === \\\\\\\"Vector\\\\\\\"\\\\n const { dim } = part;\\\\n const [start, end] = rect[dim];\\\\n const new_offsets = [];\\\\n for (let n = start; n <= end; n++) {\\\\n offsets.forEach(offset => {\\\\n new_offsets.push(offset + multiplier * n);\\\\n });\\\\n }\\\\n offsets = new_offsets;\\\\n multiplier *= sizes[dim];\\\\n }\\\\n offsets.forEach(offset => {\\\\n new_datas.push(data[offset]);\\\\n });\\\\n }\\\\n });\\\\n datas = new_datas;\\\\n });\\\\n\\\\n if (flat) {\\\\n return {\\\\n data: datas\\\\n };\\\\n }\\\\n\\\\n // prepareResult\\\\n const out_sizes = Object.fromEntries(Object.entries(rect).map(([dim, [start, end]]) => [dim, end - start + 1]));\\\\n\\\\n const { data: out_data } = prepareData({\\\\n layout,\\\\n sizes: out_sizes\\\\n });\\\\n\\\\n const max_depth = layout.dims.length;\\\\n\\\\n const step = (arr, depth) => {\\\\n if (depth === max_depth) {\\\\n for (let i = 0; i < arr.length; i++) {\\\\n arr[i] = datas.shift();\\\\n }\\\\n } else {\\\\n arr.forEach(sub => step(sub, depth + 1));\\\\n }\\\\n };\\\\n step(out_data, 1);\\\\n\\\\n return { data: out_data };\\\\n}\\\\n\\\\nfunction getMultipliers({ useLayoutCache = true, layout, sizes }) {\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") {\\\\n layout = parse(layout, { useLayoutCache });\\\\n }\\\\n const { dims } = layout;\\\\n const numDims = dims.length;\\\\n let multipliers = {};\\\\n for (let idim = 0; idim < numDims; idim++) {\\\\n const arr = dims[idim];\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n multipliers[arr.dim] = 1;\\\\n } else {\\\\n // arr.type assumed to be \\\\\\\"Matrix\\\\\\\"\\\\n const { parts } = arr;\\\\n let multiplier = 1;\\\\n for (let i = parts.length - 1; i >= 0; i--) {\\\\n const { dim } = parts[i];\\\\n multipliers[dim] = multiplier;\\\\n multiplier *= sizes[parts[i].dim];\\\\n }\\\\n }\\\\n }\\\\n return multipliers;\\\\n}\\\\n\\\\nfunction prepareSelect({ useLayoutCache = true, data, layout, sizes = {} }) {\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") {\\\\n layout = parse(layout, { useLayoutCache });\\\\n }\\\\n const { dims } = layout;\\\\n const numDims = dims.length;\\\\n const multipliers = getMultipliers({ useLayoutCache, layout, sizes });\\\\n const end = numDims - 1;\\\\n\\\\n const key = layout.summary.toString();\\\\n if (key in preparedSelectFunctions) {\\\\n const _this = { data };\\\\n layout.dims.map((it, depth) => {\\\\n if (it.type === \\\\\\\"Vector\\\\\\\") {\\\\n _this[`d${depth}v0`] = it.dim;\\\\n } else if (it.type === \\\\\\\"Matrix\\\\\\\") {\\\\n it.parts.forEach((part, ipart) => {\\\\n _this[`d${depth}v${ipart}`] = part.dim;\\\\n _this[`m${depth}v${ipart}`] = multipliers[part.dim];\\\\n });\\\\n }\\\\n });\\\\n\\\\n return preparedSelectFunctions[key].bind(_this);\\\\n }\\\\n\\\\n return ({ point }) => {\\\\n let currentData = data;\\\\n for (let idim = 0; idim < numDims; idim++) {\\\\n const last = idim === end;\\\\n const arr = dims[idim];\\\\n let offset;\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n offset = point[arr.dim];\\\\n } else {\\\\n // arr.type assumed to be \\\\\\\"Matrix\\\\\\\"\\\\n offset = arr.parts.reduce((acc, { dim }) => acc + multipliers[dim] * point[dim], 0);\\\\n }\\\\n if (last) {\\\\n return {\\\\n index: offset,\\\\n parent: currentData,\\\\n value: currentData[offset]\\\\n };\\\\n } else {\\\\n currentData = currentData[offset];\\\\n }\\\\n }\\\\n };\\\\n}\\\\n\\\\nfunction select({ useLayoutCache = true, data, layout, point, sizes = {} }) {\\\\n // converts layout expression to a layout object\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") {\\\\n layout = parse(layout, { useLayoutCache });\\\\n }\\\\n\\\\n let parent;\\\\n let index;\\\\n let value = data;\\\\n // dims are arrays\\\\n const { dims } = layout;\\\\n const len = dims.length;\\\\n for (let idim = 0; idim < len; idim++) {\\\\n const arr = dims[idim];\\\\n if (arr.type === \\\\\\\"Vector\\\\\\\") {\\\\n const i = point[arr.dim];\\\\n parent = value;\\\\n index = i;\\\\n value = value[i];\\\\n } else {\\\\n // only 2 types so must be a Matrix\\\\n const { parts } = arr;\\\\n let offset = 0;\\\\n let multiplier = 1;\\\\n for (let i = parts.length - 1; i >= 0; i--) {\\\\n const part = parts[i];\\\\n if (part.type === \\\\\\\"Vector\\\\\\\") {\\\\n const { dim } = part;\\\\n offset += multiplier * point[dim];\\\\n if (i > 0) {\\\\n if (!(dim in sizes)) throw new Error(`you cannot calculate the location without knowing the size of the \\\\\\\"${dim}\\\\\\\" dimension.`);\\\\n multiplier *= sizes[dim];\\\\n }\\\\n }\\\\n }\\\\n parent = value;\\\\n index = offset;\\\\n value = value[offset];\\\\n }\\\\n }\\\\n\\\\n return { index, value, parent };\\\\n}\\\\n\\\\n// add dimensions to an array until the limit reaches zero\\\\nfunction addDims({ arr, fill = undefined, lens, arrayTypes }) {\\\\n // no new dimensions to add\\\\n if (lens.length === 0) return arr;\\\\n\\\\n const len = lens[0];\\\\n if (lens.length === 1) {\\\\n const lastArrayType = arrayTypes ? arrayTypes[arrayTypes.length - 1] : \\\\\\\"Array\\\\\\\";\\\\n for (let i = 0; i < arr.length; i++) {\\\\n arr[i] = new ARRAY_TYPES[lastArrayType](len).fill(fill);\\\\n }\\\\n } else {\\\\n for (let i = 0; i < arr.length; i++) {\\\\n const sub = new Array(len).fill(fill);\\\\n arr[i] = sub;\\\\n addDims({ arr: sub, fill, lens: lens.slice(1), arrayTypes });\\\\n }\\\\n }\\\\n return arr;\\\\n}\\\\n\\\\n// to-do: maybe only call fill if not undefined or default typed array value?\\\\nfunction createMatrix({ fill = undefined, shape, arrayTypes }) {\\\\n const len = shape[0];\\\\n if (shape.length === 1) {\\\\n if (Array.isArray(arrayTypes) && arrayTypes.length !== 1) throw new Error(\\\\\\\"[xdim] shape and arrayTypes have different lengths\\\\\\\");\\\\n const arrayType = Array.isArray(arrayTypes) ? arrayTypes[0] : \\\\\\\"Array\\\\\\\";\\\\n return new ARRAY_TYPES[arrayType](len).fill(fill);\\\\n }\\\\n const arr = new Array(len).fill(fill);\\\\n return addDims({ arr, fill, lens: shape.slice(1), arrayTypes });\\\\n}\\\\n\\\\n// generates an in-memory data structure to hold the data\\\\nfunction prepareData({ fill = undefined, layout, useLayoutCache = true, sizes, arrayTypes }) {\\\\n if (typeof layout === \\\\\\\"string\\\\\\\") layout = parse(layout, { useLayoutCache });\\\\n\\\\n // console.log(\\\\\\\"layout:\\\\\\\", layout);\\\\n const shape = layout.dims.map(it => {\\\\n if (it.type === \\\\\\\"Vector\\\\\\\") {\\\\n return sizes[it.dim];\\\\n } else if (it.type === \\\\\\\"Matrix\\\\\\\") {\\\\n return it.parts.reduce((total, part) => {\\\\n if (!(part.dim in sizes)) throw new Error(`[xdim] could not find \\\\\\\"${part.dim}\\\\\\\" in sizes: { ${Object.keys(sizes).join(\\\\\\\", \\\\\\\")} }`);\\\\n return total * sizes[part.dim];\\\\n }, 1);\\\\n }\\\\n });\\\\n\\\\n const data = createMatrix({ fill, shape, arrayTypes });\\\\n\\\\n return { data, shape, arrayTypes };\\\\n}\\\\n\\\\n// assume positive step\\\\nfunction iterRange({ start = 0, end = 100 }) {\\\\n let i = start - 1;\\\\n end = end + 1;\\\\n return wrapNextFunction(function next() {\\\\n i++;\\\\n if (i === end) {\\\\n return { done: true };\\\\n } else {\\\\n return { done: false, value: i };\\\\n }\\\\n });\\\\n}\\\\n\\\\n// iterate over all the points, saving memory vs array\\\\nfunction iterPoints({ order, sizes, rect = {} }) {\\\\n // names sorted by shortest dimension to longest dimension\\\\n const names = Array.isArray(order) ? order : Object.keys(sizes).sort((a, b) => sizes[a] - sizes[b]);\\\\n\\\\n const iters = new Array(names.length);\\\\n const current = {};\\\\n for (let i = 0; i < names.length - 1; i++) {\\\\n const name = names[i];\\\\n const [start, end] = rect[name] || [0, sizes[name] - 1];\\\\n iters[i] = iterRange({ start: start + 1, end });\\\\n current[name] = start;\\\\n }\\\\n const lastName = names[names.length - 1];\\\\n const [start, end] = rect[lastName] || [0, sizes[lastName] - 1];\\\\n iters[iters.length - 1] = iterRange({ start: start, end });\\\\n current[lastName] = start - 1;\\\\n\\\\n // permutate\\\\n return wrapNextFunction(function next() {\\\\n for (let i = iters.length - 1; i >= 0; i--) {\\\\n const { value, done } = iters[i].next();\\\\n\\\\n if (done) {\\\\n if (i === 0) {\\\\n // we have exhausted all of the permutations\\\\n return { done: true };\\\\n }\\\\n } else {\\\\n // add iters for the remaining dims\\\\n for (let ii = i + 1; ii < iters.length; ii++) {\\\\n const nameii = names[ii];\\\\n const [start, end] = rect[nameii] || [0, sizes[nameii] - 1];\\\\n iters[ii] = iterRange({ start: start + 1, end });\\\\n current[nameii] = start;\\\\n }\\\\n\\\\n current[names[i]] = value;\\\\n\\\\n return { value: current, done: false };\\\\n }\\\\n }\\\\n });\\\\n}\\\\n\\\\nfunction transform({ data, fill = undefined, from, to, sizes, useLayoutCache = true }) {\\\\n if (typeof from === \\\\\\\"string\\\\\\\") from = parse(from, { useLayoutCache });\\\\n if (typeof to === \\\\\\\"string\\\\\\\") to = parse(to, { useLayoutCache });\\\\n\\\\n const { data: out_data } = prepareData({ fill, layout: to, sizes });\\\\n\\\\n const update = prepareUpdate({\\\\n useLayoutCache,\\\\n data: out_data,\\\\n layout: to,\\\\n sizes\\\\n });\\\\n\\\\n const points = iterPoints({ sizes });\\\\n\\\\n for (point of points) {\\\\n const { value } = select({\\\\n data,\\\\n layout: from,\\\\n point,\\\\n sizes\\\\n });\\\\n\\\\n // insert into new frame\\\\n update({\\\\n point,\\\\n value\\\\n });\\\\n }\\\\n\\\\n return { data: out_data };\\\\n}\\\\n\\\\nmodule.exports = {\\\\n addDims,\\\\n checkValidity,\\\\n createMatrix,\\\\n iterClip,\\\\n iterRange,\\\\n iterPoints,\\\\n matchSequences,\\\\n parse,\\\\n parseDimensions,\\\\n parseSequences,\\\\n parseVectors,\\\\n prepareData,\\\\n prepareSelect,\\\\n prepareUpdate,\\\\n removeBraces,\\\\n removeParentheses,\\\\n select,\\\\n transform,\\\\n update,\\\\n clip,\\\\n validateRect\\\\n};\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/xdim/src/xdim.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./node_modules/xtend/immutable.js\\\":\\n/*!*****************************************!*\\\\\\n !*** ./node_modules/xtend/immutable.js ***!\\n \\\\*****************************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"module.exports = extend\\\\n\\\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\\\n\\\\nfunction extend() {\\\\n var target = {}\\\\n\\\\n for (var i = 0; i < arguments.length; i++) {\\\\n var source = arguments[i]\\\\n\\\\n for (var key in source) {\\\\n if (hasOwnProperty.call(source, key)) {\\\\n target[key] = source[key]\\\\n }\\\\n }\\\\n }\\\\n\\\\n return target\\\\n}\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./node_modules/xtend/immutable.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/parseData.js\\\":\\n/*!**************************!*\\\\\\n !*** ./src/parseData.js ***!\\n \\\\**************************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nObject.defineProperty(exports, \\\\\\\"__esModule\\\\\\\", {\\\\n value: true\\\\n});\\\\n\\\\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\\\\\\\"return\\\\\\\"]) _i[\\\\\\\"return\\\\\\\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\\\\\\\"Invalid attempt to destructure non-iterable instance\\\\\\\"); } }; }();\\\\n\\\\nvar _typeof = typeof Symbol === \\\\\\\"function\\\\\\\" && typeof Symbol.iterator === \\\\\\\"symbol\\\\\\\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \\\\\\\"function\\\\\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\\\\\"symbol\\\\\\\" : typeof obj; };\\\\n\\\\nexports.default = parseData;\\\\n\\\\nvar _geotiff = __webpack_require__(/*! geotiff */ \\\\\\\"./node_modules/geotiff/src/geotiff.js\\\\\\\");\\\\n\\\\nvar _geotiffPalette = __webpack_require__(/*! geotiff-palette */ \\\\\\\"./node_modules/geotiff-palette/index.js\\\\\\\");\\\\n\\\\nvar _calcImageStats = __webpack_require__(/*! calc-image-stats */ \\\\\\\"./node_modules/calc-image-stats/dist/calc-image-stats.min.js\\\\\\\");\\\\n\\\\nvar _calcImageStats2 = _interopRequireDefault(_calcImageStats);\\\\n\\\\nvar _utils = __webpack_require__(/*! ./utils.js */ \\\\\\\"./src/utils.js\\\\\\\");\\\\n\\\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\\\n\\\\nfunction processResult(result) {\\\\n var stats = (0, _calcImageStats2.default)(result.values, {\\\\n height: result.height,\\\\n layout: '[band][row][column]',\\\\n noData: result.noDataValue,\\\\n precise: false,\\\\n stats: ['max', 'min', 'range'],\\\\n width: result.width\\\\n });\\\\n\\\\n result.maxs = stats.bands.map(function (band) {\\\\n return band.max;\\\\n });\\\\n result.mins = stats.bands.map(function (band) {\\\\n return band.min;\\\\n });\\\\n result.ranges = stats.bands.map(function (band) {\\\\n return band.range;\\\\n });\\\\n\\\\n return result;\\\\n}\\\\n\\\\n/* We're not using async because trying to avoid dependency on babel's polyfill\\\\nThere can be conflicts when GeoRaster is used in another project that is also\\\\nusing @babel/polyfill */\\\\nfunction parseData(data, debug) {\\\\n return new Promise(function (resolve, reject) {\\\\n try {\\\\n if (debug) console.log('starting parseData with', data);\\\\n if (debug) console.log('\\\\\\\\tGeoTIFF:', typeof GeoTIFF === 'undefined' ? 'undefined' : _typeof(GeoTIFF));\\\\n\\\\n var result = {};\\\\n\\\\n var height = void 0,\\\\n width = void 0;\\\\n\\\\n if (data.rasterType === 'object') {\\\\n result.values = data.data;\\\\n result.height = height = data.metadata.height || result.values[0].length;\\\\n result.width = width = data.metadata.width || result.values[0][0].length;\\\\n result.pixelHeight = data.metadata.pixelHeight;\\\\n result.pixelWidth = data.metadata.pixelWidth;\\\\n result.projection = data.metadata.projection;\\\\n result.xmin = data.metadata.xmin;\\\\n result.ymax = data.metadata.ymax;\\\\n result.noDataValue = data.metadata.noDataValue;\\\\n result.numberOfRasters = result.values.length;\\\\n result.xmax = result.xmin + result.width * result.pixelWidth;\\\\n result.ymin = result.ymax - result.height * result.pixelHeight;\\\\n result._data = null;\\\\n resolve(processResult(result));\\\\n } else if (data.rasterType === 'geotiff') {\\\\n result._data = data.data;\\\\n var initArgs = [data.data];\\\\n var initFunction = _geotiff.fromArrayBuffer;\\\\n if (data.sourceType === 'url') {\\\\n initFunction = _geotiff.fromUrl;\\\\n initArgs.push(data.options);\\\\n } else if (data.sourceType === 'Blob') {\\\\n initFunction = _geotiff.fromBlob;\\\\n }\\\\n\\\\n if (debug) console.log('data.rasterType is geotiff');\\\\n resolve(initFunction.apply(undefined, initArgs).then(function (geotiff) {\\\\n if (debug) console.log('geotiff:', geotiff);\\\\n return geotiff.getImage().then(function (image) {\\\\n try {\\\\n if (debug) console.log('image:', image);\\\\n\\\\n var fileDirectory = image.fileDirectory;\\\\n\\\\n var _ref = image.getGeoKeys() || {},\\\\n GeographicTypeGeoKey = _ref.GeographicTypeGeoKey,\\\\n ProjectedCSTypeGeoKey = _ref.ProjectedCSTypeGeoKey;\\\\n\\\\n result.projection = ProjectedCSTypeGeoKey || GeographicTypeGeoKey || data.metadata.projection;\\\\n if (debug) console.log('projection:', result.projection);\\\\n\\\\n result.height = height = image.getHeight();\\\\n if (debug) console.log('result.height:', result.height);\\\\n result.width = width = image.getWidth();\\\\n if (debug) console.log('result.width:', result.width);\\\\n\\\\n var _image$getResolution = image.getResolution(),\\\\n _image$getResolution2 = _slicedToArray(_image$getResolution, 2),\\\\n resolutionX = _image$getResolution2[0],\\\\n resolutionY = _image$getResolution2[1];\\\\n\\\\n result.pixelHeight = Math.abs(resolutionY);\\\\n result.pixelWidth = Math.abs(resolutionX);\\\\n\\\\n var _image$getOrigin = image.getOrigin(),\\\\n _image$getOrigin2 = _slicedToArray(_image$getOrigin, 2),\\\\n originX = _image$getOrigin2[0],\\\\n originY = _image$getOrigin2[1];\\\\n\\\\n result.xmin = originX;\\\\n result.xmax = result.xmin + width * result.pixelWidth;\\\\n result.ymax = originY;\\\\n result.ymin = result.ymax - height * result.pixelHeight;\\\\n\\\\n result.noDataValue = fileDirectory.GDAL_NODATA ? parseFloat(fileDirectory.GDAL_NODATA) : null;\\\\n\\\\n result.numberOfRasters = fileDirectory.SamplesPerPixel;\\\\n\\\\n if (fileDirectory.ColorMap) {\\\\n result.palette = (0, _geotiffPalette.getPalette)(image);\\\\n }\\\\n\\\\n if (!data.readOnDemand) {\\\\n return image.readRasters().then(function (rasters) {\\\\n result.values = rasters.map(function (valuesInOneDimension) {\\\\n return (0, _utils.unflatten)(valuesInOneDimension, { height: height, width: width });\\\\n });\\\\n return processResult(result);\\\\n });\\\\n } else {\\\\n result._geotiff = geotiff;\\\\n return result;\\\\n }\\\\n } catch (error) {\\\\n reject(error);\\\\n console.error('[georaster] error parsing georaster:', error);\\\\n }\\\\n });\\\\n }));\\\\n }\\\\n } catch (error) {\\\\n reject(error);\\\\n console.error('[georaster] error parsing georaster:', error);\\\\n }\\\\n });\\\\n}\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./src/parseData.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/utils.js\\\":\\n/*!**********************!*\\\\\\n !*** ./src/utils.js ***!\\n \\\\**********************/\\n/*! no static exports found */\\n/***/ (function(module, exports, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"\\\\n\\\\nfunction countIn1D(array) {\\\\n return array.reduce(function (counts, value) {\\\\n if (counts[value] === undefined) {\\\\n counts[value] = 1;\\\\n } else {\\\\n counts[value]++;\\\\n }\\\\n return counts;\\\\n }, {});\\\\n}\\\\n\\\\nfunction countIn2D(rows) {\\\\n return rows.reduce(function (counts, values) {\\\\n values.forEach(function (value) {\\\\n if (counts[value] === undefined) {\\\\n counts[value] = 1;\\\\n } else {\\\\n counts[value]++;\\\\n }\\\\n });\\\\n return counts;\\\\n }, {});\\\\n}\\\\n\\\\n/*\\\\nTakes in a flattened one dimensional typed array\\\\nrepresenting two-dimensional pixel values\\\\nand returns an array of typed arrays with the same buffer.\\\\n*/\\\\nfunction unflatten(valuesInOneDimension, size) {\\\\n var height = size.height,\\\\n width = size.width;\\\\n\\\\n var valuesInTwoDimensions = [];\\\\n for (var y = 0; y < height; y++) {\\\\n var start = y * width;\\\\n var end = start + width;\\\\n valuesInTwoDimensions.push(valuesInOneDimension.subarray(start, end));\\\\n }\\\\n return valuesInTwoDimensions;\\\\n}\\\\n\\\\nmodule.exports = { countIn1D: countIn1D, countIn2D: countIn2D, unflatten: unflatten };\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./src/utils.js?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/worker.js\\\":\\n/*!***********************!*\\\\\\n !*** ./src/worker.js ***!\\n \\\\***********************/\\n/*! no exports provided */\\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\\n\\n\\\"use strict\\\";\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony import */ var _parseData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parseData.js */ \\\\\\\"./src/parseData.js\\\\\\\");\\\\n/* harmony import */ var _parseData_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_parseData_js__WEBPACK_IMPORTED_MODULE_0__);\\\\n\\\\n\\\\n// this is a bit of a hack to trick geotiff to work with web worker\\\\n// eslint-disable-next-line no-unused-vars\\\\nconst window = self;\\\\n\\\\nonmessage = e => {\\\\n const data = e.data;\\\\n _parseData_js__WEBPACK_IMPORTED_MODULE_0___default()(data).then(result => {\\\\n const transferBuffers = [];\\\\n if ( result.values ) {\\\\n let last;\\\\n result.values.forEach(a => a.forEach(({buffer}) => {\\\\n if (buffer instanceof ArrayBuffer && buffer !== last) {\\\\n transferBuffers.push(buffer);\\\\n last = buffer;\\\\n }\\\\n }));\\\\n }\\\\n if (result._data instanceof ArrayBuffer) {\\\\n transferBuffers.push(result._data);\\\\n }\\\\n postMessage(result, transferBuffers);\\\\n close();\\\\n });\\\\n};\\\\n\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./src/worker.js?\\\");\\n\\n/***/ }),\\n\\n/***/ 0:\\n/*!**********************!*\\\\\\n !*** util (ignored) ***!\\n \\\\**********************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"/* (ignored) */\\\\n\\\\n//# sourceURL=webpack://GeoRaster/util_(ignored)?\\\");\\n\\n/***/ }),\\n\\n/***/ 1:\\n/*!**********************!*\\\\\\n !*** util (ignored) ***!\\n \\\\**********************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"/* (ignored) */\\\\n\\\\n//# sourceURL=webpack://GeoRaster/util_(ignored)?\\\");\\n\\n/***/ }),\\n\\n/***/ 2:\\n/*!********************************!*\\\\\\n !*** ./util.inspect (ignored) ***!\\n \\\\********************************/\\n/*! no static exports found */\\n/***/ (function(module, exports) {\\n\\neval(\\\"/* (ignored) */\\\\n\\\\n//# sourceURL=webpack://GeoRaster/./util.inspect_(ignored)?\\\");\\n\\n/***/ })\\n\\n/******/ });\",null);};\n\n//# sourceURL=webpack://GeoRaster/./src/worker.js?"); - -/***/ }), - -/***/ 0: -/*!**********************!*\ - !*** util (ignored) ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/* (ignored) */\n\n//# sourceURL=webpack://GeoRaster/util_(ignored)?"); - -/***/ }), - -/***/ 1: -/*!**********************!*\ - !*** util (ignored) ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/* (ignored) */\n\n//# sourceURL=webpack://GeoRaster/util_(ignored)?"); - -/***/ }), - -/***/ 2: -/*!********************************!*\ - !*** ./util.inspect (ignored) ***! - \********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/* (ignored) */\n\n//# sourceURL=webpack://GeoRaster/./util.inspect_(ignored)?"); - -/***/ }) - -/******/ }); -}); \ No newline at end of file diff --git a/dist/georaster.browser.bundle.min.js b/dist/georaster.browser.bundle.min.js index 8288f5c..a04f436 100644 --- a/dist/georaster.browser.bundle.min.js +++ b/dist/georaster.browser.bundle.min.js @@ -1,10 +1,10 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GeoRaster=e():t.GeoRaster=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=107)}([function(t,e,r){"use strict";const n=r(73);t.exports=function(t){return"+"===t[0]&&(t=t.substring(1)),(t=(t=n(t)).replace(/^0+(?=\d)/,"")).includes(".")&&(t=t.replace(/\.?0+$/,"")),""===t&&(t="0"),"-0"===t&&(t="0"),t}},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(15),s=r(32);function a(t,e,r){t=i(t),e=i(e);const a="-"!==t[0],u="-"!==e[0],c=o(t),l=o(e);if(c||l)return a==u?"Infinity":"-Infinity";if("0"===e)throw new Error("[preciso] division by zero");if(""===t||"0"===t)return"0";const f=a!==u?"-":"";return a||(t=n(t)),u||(e=n(e)),f+s(t,e,r)}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a}));const n=Symbol("thread.errors"),i=Symbol("thread.events"),o=Symbol("thread.terminate"),s=Symbol("thread.transferable"),a=Symbol("thread.worker")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";const n=r(0);function i(t){return"-"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=e.length,i=t.indexOf("."),o=e.indexOf("."),s=-1===i?r:i,a=-1===o?n:o,u=s-a;let c=u<0?-1*u:0,l=u<=0?0:u,f=Math.max(s,a)+1+Math.max(r-s,n-a)-1,h=0;for(;h"===y){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==m)for(let e=t.length;e<=v;e++)m+="0";m+=t,g=o(g,s),v=0}else{if("<"===y){""===m&&b++,v++;continue}if("="===y){if(""!==m)for(let t=0;t 0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===A||".."===A)||""===A,k=0,T=_.length;T>=0;T--)"."===(A=_[T])?_.splice(T,1):".."===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!w&&!x)for(;k--;k)_.unshift("..");!w||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var O,C=""===_[0]||_[0]&&"/"===_[0].charAt(0);S&&(r.hostname=C?"":_.length?_.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!C&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},function(t,e,r){(function(t){var n=r(136),i=r(70),o=r(138),s=r(139),a=r(39),u=e;u.request=function(e,r){e="string"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(3))},,function(t,e,r){(e=t.exports=r(61)).Stream=e,e.Readable=e,e.Writable=r(65),e.Duplex=r(14),e.Transform=r(67),e.PassThrough=r(122)},function(t,e,r){var n=r(7),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,l=r(145)(),f=r(147)(),h=Object.getPrototypeOf||(f?function(t){return t.__proto__}:null),d={},p="undefined"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l&&h?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&h?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&h?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&h?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&h?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":n,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y["%Error.prototype%"]=g}var m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(45),v=r(149),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return _(t,E,(function(t,e,r,n){i[i.length]=r?_(n,k,"$1"):e||t})),i},O=function(t,e){var r,i=t;if(v(m,i)&&(i="%"+(r=m[i])[0]+"%"),v(y,i)){var a=y[i];if(a===d&&(a=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:a}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=T(t),i=r.length>0?r[0]:"",s=O("%"+i+"%",e),u=s.name,c=s.value,l=!1,f=s.alias;f&&(i=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h "===y){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==m)for(let e=t.length;e<=v;e++)m+="0";m+=t,g=o(g,s),v=0}else{if("<"===y){""===m&&b++,v++;continue}if("="===y){if(""!==m)for(let t=0;t>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(a[r])}function h(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,u,c,f,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,y=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===y&&(r=s.Z_OK,y=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,f=o.buf2string(h.output,u),h.next_out=c,h.avail_out=d-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(y=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=f,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},function(t,e,r){"use strict";var n=r(26);class i extends n.a{constructor(){super(t=>(this._observers.add(t),()=>this._observers.delete(t))),this._observers=new Set}next(t){for(const e of this._observers)e.next(t)}error(t){for(const e of this._observers)e.error(t)}complete(){for(const t of this._observers)t.complete()}}e.a=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const n=()=>{};function i(){let t,e=!1,r=n;return[new Promise(n=>{e?n(t):r=n}),n=>{e=!0,t=n,r(t)}]}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(2);function i(t){return t&&"object"==typeof t&&t[n.d]}},function(t,e,r){var n=r(40),i=r(39),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},function(t,e,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var r=0;r>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r