From e0717ca4167c061600e771ffcb469b7853b1d037 Mon Sep 17 00:00:00 2001 From: Joe Davies Date: Mon, 30 Nov 2020 12:22:00 +0100 Subject: [PATCH 1/3] recover csv fields list for data-driven dropdowns --- build/gridviz.js | 31 +++++++++++++------------------ examples/netherlands/index.html | 1 + examples/portugal/index.html | 1 + readme.md | 4 ++-- src/js/gridviz.js | 28 +++++++++++----------------- 5 files changed, 28 insertions(+), 37 deletions(-) diff --git a/build/gridviz.js b/build/gridviz.js index babaadb37..f7ca8f344 100644 --- a/build/gridviz.js +++ b/build/gridviz.js @@ -73922,7 +73922,7 @@ function viewer(options) { title: "Legend", titleWidth: 50, format: ".0s", - cells: 13, + cells: 5, shapeWidth: 30 }; viewer._gridLegend; //legend stored here @@ -74863,23 +74863,17 @@ function viewer(options) { */ function addGridToCache(csv, res) { if (csv) { - for (let i = 0; i < csv.length; i++) { - let x, y; - if (viewer._mobile) { - x = viewer.mobileCoordScale(parseFloat(csv[i].x)); - y = viewer.mobileCoordScale(parseFloat(csv[i].y)); - } else { - x = csv[i].x; - y = csv[i].y; + if (viewer._mobile) { + for (let i = 0; i < csv.length; i++) { + //scale mobile coordinates to avoid d3 pan/zoom bug + let point = csv[i]; + point.x = viewer.mobileCoordScale(parseFloat(csv[i].x)); + point.y = viewer.mobileCoordScale(parseFloat(csv[i].y)); + if (!gridCaches[res]) gridCaches[res] = []; + gridCaches[res].push(point); } - let value = csv[i][viewer.colorField_]; - let point = { - x, - y, - [viewer.colorField_]: value - }; - if (!gridCaches[res]) gridCaches[res] = []; - gridCaches[res].push(point); + } else { + if (!gridCaches[res]) gridCaches[res] = csv } } } @@ -75773,6 +75767,7 @@ function viewer(options) { //https://observablehq.com/@gabgrz/color-legend function createContinuousLegend() { + let container; if (document.getElementById("gridviz-legend")) { container = Object(d3_selection__WEBPACK_IMPORTED_MODULE_8__["select"])("#gridviz-legend"); @@ -77827,4 +77822,4 @@ function formatNumber(n) { /******/ }); }); -//# sourceMappingURL=data:application/json;charset=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ImdcIikuYXR0cihcImNsYXNzXCIsIFwidGlja1wiKSxcbiAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KFwibGluZVwiKSxcbiAgICAgICAgdGV4dCA9IHRpY2suc2VsZWN0KFwidGV4dFwiKTtcblxuICAgIHBhdGggPSBwYXRoLm1lcmdlKHBhdGguZW50ZXIoKS5pbnNlcnQoXCJwYXRoXCIsIFwiLnRpY2tcIilcbiAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImRvbWFpblwiKVxuICAgICAgICAuYXR0cihcInN0cm9rZVwiLCBcImN1cnJlbnRDb2xvclwiKSk7XG5cbiAgICB0aWNrID0gdGljay5tZXJnZSh0aWNrRW50ZXIpO1xuXG4gICAgbGluZSA9IGxpbmUubWVyZ2UodGlja0VudGVyLmFwcGVuZChcImxpbmVcIilcbiAgICAgICAgLmF0dHIoXCJzdHJva2VcIiwgXCJjdXJyZW50Q29sb3JcIilcbiAgICAgICAgLmF0dHIoeCArIFwiMlwiLCBrICogdGlja1NpemVJbm5lcikpO1xuXG4gICAgdGV4dCA9IHRleHQubWVyZ2UodGlja0VudGVyLmFwcGVuZChcInRleHRcIilcbiAgICAgICAgLmF0dHIoXCJmaWxsXCIsIFwiY3VycmVudENvbG9yXCIpXG4gICAgICAgIC5hdHRyKHgsIGsgKiBzcGFjaW5nKVxuICAgICAgICAuYXR0cihcImR5XCIsIG9yaWVudCA9PT0gdG9wID8gXCIwZW1cIiA6IG9yaWVudCA9PT0gYm90dG9tID8gXCIwLjcxZW1cIiA6IFwiMC4zMmVtXCIpKTtcblxuICAgIGlmIChjb250ZXh0ICE9PSBzZWxlY3Rpb24pIHtcbiAgICAgIHBhdGggPSBwYXRoLnRyYW5zaXRpb24oY29udGV4dCk7XG4gICAgICB0aWNrID0gdGljay50cmFuc2l0aW9uKGNvbnRleHQpO1xuICAgICAgbGluZSA9IGxpbmUudHJhbnNpdGlvbihjb250ZXh0KTtcbiAgICAgIHRleHQgPSB0ZXh0LnRyYW5zaX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kpIC0gMSwgaiA9IE1hdGgucm91bmQoaikgKyAxO1xuICAgICAgaWYgKHUgPiAwKSBmb3IgKDsgaSA8IGo7ICsraSkge1xuICAgICAgICBmb3IgKGsgPSAxLCBwID0gcG93cyhpKTsgayA8IGJhc2U7ICsraykge1xuICAgICAgICAgIHQgPSBwICogaztcbiAgICAgICAgICBpZiAodCA8IHUpIGNvbnRpbnVlO1xuICAgICAgICAgIGlmICh0ID4gdikgYnJlYWs7XG4gICAgICAgICAgei5wdXNoKHQpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgZm9yICg7IGkgPCBqOyArK2kpIHtcbiAgICAgICAgZm9yIChrID0gYmFzZSAtIDEsIHAgPSBwb3dzKGkpOyBrID49IDE7IC0taykge1xuICAgICAgICAgIHQgPSBwICogaztcbiAgICAgICAgICBpZiAodCA8IHUpIGNvbnRpbnVlO1xuICAgICAgICAgIGlmICh0ID4gdikgYnJlYWs7XG4gICAgICAgICAgei5wdXNoKHQpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHogPSB0aWNrcyhpLCBqLCBNYXRoLm1pbihqIC0gaSwgbikpLm1hcChwb3dzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gciA/IHoucmV2ZXJzZSgpIDogejtcbiAgfTtcblxuICBzY2FsZS50aWNrRm9ybWF0ID0gZnVuY3Rpb24oY291bnQsIHNwZWNpZmllcikge1xuICAgIGlmIChzcGVjaWZpZXIgPT0gbnVsbCkgc3BlY2lmaWVyID0gYmFzZSA9PT0gMTAgPyBcIi4wZVwiIDogXCIsXCI7XG4gICAgaWYgKHR5cGVvZiBzcGVjaWZpZXIgIT09IFwiZnVuY3Rpb25cIikgc3BlY2lmaWVyID0gZm9ybWF0KHNwZWNpZmllcik7XG4gICAgaWYgKGNvdW50ID09PSBJbmZpbml0eSkgcmV0dXJuIHNwZWNpZmllcjtcbiAgICBpZiAoY291bnQgPT0gbnVsbCkgY291bnQgPSAxMDtcbiAgIC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zEgKiBuNDMgLSBuMjEgKiBuMzIgKiBuNDMgKSAqIGRldEludjtcblxuXHRcdHRlWyA0IF0gPSB0MTIgKiBkZXRJbnY7XG5cdFx0dGVbIDUgXSA9ICggbjEzICogbjM0ICogbjQxIC0gbjE0ICogbjMzICogbjQxICsgbjE0ICogbjMxICogbjQzIC0gbjExICogbjM0ICogbjQzIC0gbjEzICogbjMxICogbjQ0ICsgbjExICogbjMzICogbjQ0ICkgKiBkZXRJbnY7XG5cdFx0dGVbIDYgXSA9ICggbjE0ICogbjMyICogbjQxIC0gbjEyICogbjM0ICogbjQxIC0gbjE0ICogbjMxICogbjQyICsgbjExICogbjM0ICogbjQyICsgbjEyICogbjMxICogbjQ0IC0gbjExICogbjMyICogbjQ0ICkgKiBkZXRJbnY7XG5cdFx0dGVbIDcgXSA9ICggbjEyICogbjMzICogbjQxIC0gbjEzICogbjMyICogbjQxICsgbjEzICogbjMxICogbjQyIC0gbjExICogbjMzICogbjQyIC0gbjEyICogbjMxICogbjQzICsgbjExICogbjMyICogbjQzICkgKiBkZXRJbnY7XG5cblx0XHR0ZVsgOCBdID0gdDEzICogZGV0SW52O1xuXHRcdHRlWyA5IF0gPSAoIG4xNCAqIG4yMyAqIG40MSAtIG4xMyAqIG4yNCAqIG40MSAtIG4xNCAqIG4yMSAqIG40MyArIG4xMSAqIG4yNCAqIG40MyArIG4xMyAqIG4yMSAqIG40NCAtIG4xMSAqIG4yMyAqIG40NCApICogZGV0SW52O1xuXHRcdHRlWyAxMCBdID0gKCBuMTIgKiBuMjQgKiBuNDEgLSBuMTQgKiBuMjIgKiBuNDEgKyBuMTQgKiBuMjEgKiBuNDIgLSBuMTEgKiBuMjQgKiBuNDIgLSBuMTIgKiBuMjEgKiBuNDQgKyBuMTEgKiBuMjIgKiBuNDQgKSAqIGRldEludjtcblx0XHR0ZVsgMTEgXSA9ICggbjEzICogbjIyICogbjQxIC0gbjEyICogbjIzICogbjQxIC0gbjEzICogbjIxICogbjQyICsgbjExICogb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mN0aW9uKG9iamVjdHMsIGJib3gsIG4pIHtcbiAgdmFyIHgwID0gYmJveFswXSxcbiAgICAgIHkwID0gYmJveFsxXSxcbiAgICAgIHgxID0gYmJveFsyXSxcbiAgICAgIHkxID0gYmJveFszXSxcbiAgICAgIGt4ID0geDEgLSB4MCA/IChuIC0gMSkgLyAoeDEgLSB4MCkgOiAxLFxuICAgICAga3kgPSB5MSAtIHkwID8gKG4gLSAxKSAvICh5MSAtIHkwKSA6IDE7XG5cbiAgZnVuY3Rpb24gcXVhbnRpemVQb2ludChpbnB1dCkge1xuICAgIHJldHVybiBbTWF0aC5yb3VuZCgoaW5wdXRbMF0gLSB4MCkgKiBreCksIE1hdGgucm91bmQoKGlucHV0WzFdIC0geTApICoga3kpXTtcbiAgfVxuXG4gIGZ1bmN0aW9uIHF1YW50aXplUG9pbnRzKGlucHV0LCBtKSB7XG4gICAgdmFyIGkgPSAtMSxcbiAgICAgICAgaiA9IDAsXG4gICAgICAgIG4gPSBpbnB1dC5sZW5ndGgsXG4gICAgICAgIG91dHB1dCA9IG5ldyBBcnJheShuKSwgLy8gcGVzc2ltaXN0aWNcbiAgICAgICAgcGksXG4gICAgICAgIHB4LFxuICAgICAgICBweSxcbiAgICAgICAgeCxcbiAgICAgICAgeTtcblxuICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICBwaSA9IGlucHV0W2ldO1xuICAgICAgeCA9IE1hdGgucm91bmQoKHBpWzBdIC0geDApICoga3gpO1xuICAgICAgeSA9IE1hdGgucm91bmQoKHBpWzFdIC0geTApICoga3kpO1xuICAgICAgaWYgKHggIT09IHB4IHx8IHkgIT09IHB5KSBvdXRwdXRbaisrXSA9IFtweCA9IHgsIHB5ID0geV07IC8vIG5vbi1jb2luY2lkZW50IHBvaW50c1xuICAgIH1cblxuICAgIG91dHB1dC5sZW5ndGggPSBqO1xuICAgIHdoaWxlIChqIDwgbSkgaiA9IG91dHB1dC5wdXNoKFtvdXRwdXRbMF1bMF0sIG91dHB1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ICAgbGV0IHhEb21haW4gPSBleHRlbnQoY3N2Lm1hcChjID0+IHBhcnNlRmxvYXQoYy54KSkpO1xuICAgICAgICAgICAgICAgIGxldCB5RG9tYWluID0gZXh0ZW50KGNzdi5tYXAoYyA9PiBwYXJzZUZsb2F0KGMueSkpKTtcbiAgICAgICAgICAgICAgICBsZXQgZG9tYWluID0gW1xuICAgICAgICAgICAgICAgICAgbWluKFt4RG9tYWluLCB5RG9tYWluXSwgYXJyYXkgPT4gbWluKGFycmF5KSksXG4gICAgICAgICAgICAgICAgICBtYXgoW3hEb21haW4sIHlEb21haW5dLCBhcnJheSA9PiBtYXgoYXJyYXkpKVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUgPSBkM3NjYWxlLnNjYWxlTGluZWFyKCkuZG9tYWluKGRvbWFpbikucmFuZ2UoWy0xLCAxXSk7XG4gICAgICAgICAgICAgICAgLy8gdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUgPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZTtcbiAgICAgICAgICAgICAgICAvLyB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSA9IGQzc2NhbGUuc2NhbGVMaW5lYXIoKS5kb21haW4oeURvbWFpbikucmFuZ2UoWy0xLCAxXSk7XG4gICAgICAgICAgICAgICAgLy91cGRhdGUgY2VsbCBzaXplcyBhbmQgcmF5Y2FzdGVyIHRvIGZpdCBuZXcgd2ViZ2wtZnJpZW5kbHkgY29vcmRzXG4gICAgICAgICAgICAgICAgbGV0IG5ld1Jlc29sdXRpb24gPSAwLjAwMzsgLy9UT0RPIGRlZmluZSByZXNvbHV0aW9uIGJhc2VkIG9uIHNjYWxlXG4gICAgICAgICAgICAgICAgdmlld2VyLnJlc29sdXRpb25fID0gbmV3UmVzb2x1dGlvbjtcbiAgICAgICAgICAgICAgICBncmlkLmNlbGxTaXplID0gbmV3UmVzb2x1dGlvbjtcbiAgICAgICAgICAgICAgICBncmlkQ29uZmlnLnBvaW50U2l6ZSA9IG5ld1Jlc29sdXRpb247XG4gICAgICAgICAgICAgICAgZ3JpZENvbmZpZy5yYXljYXN0ZXJUaHJlc2hvbGQgPSBuZXdSZXNvbHV0aW9uO1xuICAgICAgICAgICAgICAgIHJheWNhc3Rlci5wYXJhbXMuUG9pbnRzLnRocmVzaG9sZCA9IG5ld1Jlc29sdXRpb247XG4gICAgICAgICAgICAgICAgLy9zY2FsZSBjZW50ZXIgY29vcmRzXG4gICAgICAgICAgICAgICAgdmlld2VyLmNlbnRlcl9bMF0gPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSh2aWV3ZXIuY2VudGVyX1swXSk7XG4gICAgICAgICAgICAgICAgdmlld2VyLmNlbnRlcl9bMV0gPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSh2aWV3ZXIuY2VudGVyX1sxXSk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAvLyBhZGQgcG9pbnRzIHRvIGNhY2hlXG4gICAgICAgICAgICAgIGFkZEdyaWRUb0NhY2hlKGNzdiwgZ3JpZC5jZWxsU2l6ZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gY29uc29sZS5lcnJvcihcbiAgICAgICAgICAgICAgICBcIkluY29ycmVjdCBjc3YgZm9ybWF0LiBQbGVhc2UgdXNlIGNvb3JkaW5hdGUgY29sdW1ucyB3aXRoIG5hbWVzICd4JyBhbmQgJ3knXCJcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gYWRkIEhUTUxFbGVtZW50cyB0byBET01cbiAgICAgICAgICAgIGFkZEluaXRpYWxFbGVtZW50c1RvRE9NKCk7XG4gICAgICAgICAgICAvLyBkZWZpbmUgdmlld2VyIGNsaWNrLCBkcm9wZG93biBjaGFuZ2UgYW5kIHNjcmVlbiByZXNpemUgZXZlbnRzXG4gICAgICAg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b2x1dGlvbl9dLmxlbmd0aCAvIDIpO1xuICAgICAgICAgICAgICBsZXQgYyA9IGdyaWRDYWNoZXNbdmlld2VyLnJlc29sdXRpb25fXVtpbmRleF07XG4gICAgICAgICAgICAgIGlmICh2aWV3ZXIuX21vYmlsZSkge1xuICAgICAgICAgICAgICAgIHZpZXdlci5jZW50ZXJfID0gW1xuICAgICAgICAgICAgICAgICAgdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUocGFyc2VGbG9hdChjLngpKSxcbiAgICAgICAgICAgICAgICAgIHZpZXdlci5tb2JpbGVDb29yZFNjYWxlKHBhcnNlRmxvYXQoYy55KSlcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZpZXdlci5jZW50ZXJfID0gW1xuICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChjLngpLFxuICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChjLnkpXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBkZWZpbmUgcGFuICYgem9vbVxuICAgICAgICAgICAgYWRkUGFuQW5kWm9vbSgpO1xuXG4gICAgICAgICAgICAvL2FkZCBjZWxscyB0byB2aWV3ZXJcbiAgICAgICAgICAgIGFkZFBvaW50c1RvU2NlbmUoKTtcblxuICAgICAgICAgICAgaWYgKHZpZXdlci5jb2xvckZpZWxkU2VsZWN0b3JfKSB7XG4gICAgICAgICAgICAgIGNyZWF0ZUNvbG9yRmllbGREcm9wZG93bigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHZpZXdlci5zaXplRmllbGRTZWxlY3Rvcl8pIHtcbiAgICAgICAgICAgICAgY3JlYXRlU2l6ZUZpZWxkRHJvcGRvd24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBVdGlscy5oaWRlTG9hZGluZygpO1xuIC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ICAgKiBAcGFyYW0ge1N0cmluZ30gdXJsIG9mIG51dHMyanNvbiBmaWxlXG4gICAqL1xuICBmdW5jdGlvbiBsb2FkTnV0czJqc29uKHVybCkge1xuICAgIGpzb24odXJsKS50aGVuKFxuICAgICAganNvbiA9PiB7XG4gICAgICAgIGxldCBuZXdBcnJheTtcbiAgICAgICAgaWYgKHZpZXdlci5udXRzMmpzb25Db3VudHJ5Xykge1xuICAgICAgICAgIG5ld0FycmF5ID0ganNvbi5vYmplY3RzLm51dHNyZy5nZW9tZXRyaWVzLmZpbHRlcigodiwgaSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIHYucHJvcGVydGllcy5pZC5pbmRleE9mKHZpZXdlci5udXRzMmpzb25Db3VudHJ5XykgIT09IC0xOyAvL2FwcGx5IHVzZXItZGVmaW5lZCBmaWx0ZXJcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBuZXdBcnJheSA9IGpzb24ub2JqZWN0cy5udXRzcmcuZ2VvbWV0cmllcy5maWx0ZXIoKHYsIGkpID0+IHtcbiAgICAgICAgICAgIHJldHVybiB2LnByb3BlcnRpZXMuaWQgIT09IFwiVFJcIjsgLy9vbWl0IFR1cmtleVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGpzb24ub2JqZWN0cy5udXRzYm4uZ2VvbWV0cmllcyA9IG5ld0FycmF5O1xuICAgICAgICAvL3RvcG9qc29uIHRvIGdlb2pzb25cbiAgICAgICAgbGV0IGZlYXR1cmVzID0gZmVhdHVyZShqc29uLCBqc29uLm9iamVjdHMubnV0c2JuKS5mZWF0dXJlcztcbiAgICAgICAgLy9hZGQgbGluZSBnZW9tZXRyaWVzIHRvIHZpZXdlclxuICAgICAgICBhZGROdXRzMmpzb25Ub1NjZW5lKGZlYXR1cmVzLCB0cnVlKTtcbiAgICAgIH0sXG4gICAgICBlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gIC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eS5jb29yZGluYXRlcy5sZW5ndGg7IGMrKykge1xuICAgICAgICBjb29yZHMgPSBbXTtcbiAgICAgICAgaWYgKGZlYXR1cmUuZ2VvbWV0cnkudHlwZSA9PSBcIlBvbHlnb25cIikge1xuICAgICAgICAgIGZvciAobGV0IHMgPSAwOyBzIDwgZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXS5sZW5ndGg7IHMrKykge1xuICAgICAgICAgICAgbGV0IHh5ejtcbiAgICAgICAgICAgIGlmICh2aWV3ZXIuemVyb3NSZW1vdmVkXykge1xuICAgICAgICAgICAgICAvLyByZW1vdmUgemVyb3MgZnJvbSBudXRzMmpzb24gY29vcmRpbmF0ZXMgdG8gbWF0Y2ggZ3JpZERhdGFcbiAgICAgICAgICAgICAgbGV0IGQgPSBOdW1iZXIoJzFFJyArIHZpZXdlci56ZXJvc1JlbW92ZWRfKTtcbiAgICAgICAgICAgICAgeHl6ID0ge1xuICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bMF0gLyBkLFxuICAgICAgICAgICAgICAgIHk6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bMV0gLyBkLFxuICAgICAgICAgICAgICAgIHo6IENPTlNUQU5UUy5saW5lX3pcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHh5eiA9IHtcbiAgICAgICAgICAgICAgICB4OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdWzBdLFxuICAgICAgICAgICAgICAgIHk6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bMV0sXG4gICAgICAgICAgICAgICAgejogQ09OU1RBTlRTLmxpbmVfelxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb29yZHMucHVzaCh4eXopO1xuICAgICAgICAgIH1cbiAgICAgICAgICBib3VuZGFyaWVzR3JvdXAuYWRkKGNyZWF0ZUxpbmVGcm9tQ29vcmRzKGNvb3JkcykpO1xuICAgICAgICB9IGVsc2UgaWYgKGZlYXR1cmUuZ2VvbWV0cnkudHlwZSA9PSBcIk11bHRpUG9seWdvblwiKSB7XG4gICAgICAgICAgZm9yIChsZXQgcyA9IDA7IHMgPCBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdLmxlbmd0aDsgcysrKSB7XG4gICAgICAgICAgICAvL2VhY2ggcG9seWdvbiBpbiBtdWx0aXBvbHlnb246XG4gICAgICAgICAgICBjb29yZHMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgIGxldCBtID0gMDtcbiAgICAgICAgICAgICAgbSA8IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc10ubGVuZ3RoO1xuICAgICAgICAgICAgICBtKytcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBsZXQgeHl6O1xuICAgICAgICAgICAgICBpZiAodmlld2VyLnplcm9zUmVtb3ZlZF8pIHtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IE51bWJlcignMUUnICsgdmlld2VyLnplcm9zUmVtb3ZlZF8pO1xuICAgICAgICAgICAgICAgIHh5eiA9IHtcbiAgICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bbV1bMF0gLyBkLFxuICAgICAgICAgICAgICAgICAgeTogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVttXVsxXSAvIGQsXG4gICAgICAgICAgICAgICAgICB6OiBDT05TVEFOVFMubGluZV96XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgICAgICB4OiBmZWF0dXJlLmdlb21ldHJ5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GluYXRlc1tjXVtzXVsxXSAvIGQsXG4gICAgICAgICAgICAgICAgejogbGF5ZXJaXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgICAgeDogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVswXSxcbiAgICAgICAgICAgICAgICB5OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdWzFdLFxuICAgICAgICAgICAgICAgIHo6IGxheWVyWlxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb29yZHMucHVzaCh4eXopO1xuICAgICAgICAgIH1cbiAgICAgICAgICBnZW9qc29uR3JvdXAuYWRkKGNyZWF0ZUxpbmVGcm9tQ29vcmRzKGNvb3JkcykpO1xuICAgICAgICB9IGVsc2UgaWYgKGZlYXR1cmUuZ2VvbWV0cnkudHlwZSA9PSBcIk11bHRpUG9seWdvblwiKSB7XG4gICAgICAgICAgZm9yIChsZXQgcyA9IDA7IHMgPCBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdLmxlbmd0aDsgcysrKSB7XG4gICAgICAgICAgICAvL2VhY2ggcG9seWdvbiBpbiBtdWx0aXBvbHlnb246XG4gICAgICAgICAgICBsZXQgY29vcmRzID0gW107XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICBsZXQgbSA9IDA7XG4gICAgICAgICAgICAgIG0gPCBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdLmxlbmd0aDtcbiAgICAgICAgICAgICAgbSsrXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgbGV0IHh5ejtcbiAgICAgICAgICAgICAgaWYgKHJlbW92ZVplcm9zICYmIHZpZXdlci56ZXJvc1JlbW92ZWRfKSB7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSBOdW1iZXIoJzFFJyArIHZpZXdlci56ZXJvc1JlbW92ZWRfKTtcbiAgICAgICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgICAgICB4OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdW21dWzBdIC8gZCxcbiAgICAgICAgICAgICAgICAgIHk6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bbV1bMV0gLyBkLFxuICAgICAgICAgICAgICAgICAgejogbGF5ZXJaXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgICAgICB4OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdW21dWzBdLFxuICAgICAgICAgICAgICAgICAgeTogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVttXVsxXSxcbiAgICAgICAgICAgICAgICAgIHo6IGxheWVyWlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29vcmRzLnB1c2goeHl6KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGdlb2pzb25Hcm91cC5hZGQoY3JlYXRlTGluZUZyb21Db29yZHMoY29vcmRzKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGZlYXR1cmUuZ2VvbWV0cnkudHlwZSA9PSBcIkxpbmVTdHJpbmdcIikge1xuICAgICAgICAgIGxldCB4eXo7XG4gICAgICAgICAgaWYgKHJlbW92ZVplcm9zICYmIHZpZXdlci56ZXJvc1JlbW92ZWRfKSB7XG4gICAgICAgICAgICBsZXQgZCA9IE51bWJlcignMUUnICsgdmlld2VyLnplcm9zUmVtb3ZlZF8pO1xuICAgICAgICAgICAgeHl6ID0ge1xuICAgICAgICAgICAgICB4OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3J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sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlUHVPclwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUHVycGxlLW9yYW5nZVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVJkQnVcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIlJlZC1ibHVlXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlUmRHeVwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUmVkLWdyZXlcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVSZFlsQnVcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIlJlZC15ZWxsb3ctYmx1ZVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVJkWWxHblwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUmVkLXllbGxvdy1ncmVlblwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVNwZWN0cmFsXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJTcGVjdHJhbFwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZUJsdWVzXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJCbHVlc1wiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZUdyZWVuc1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiR3JlZW5zXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlR3JleXNcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIkdyZXlzXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVl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lB1cnBsZS1yZWRcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVSZFB1XCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJSZWQtcHVycGxlXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlWWxHbkJ1XCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJZZWxsb3ctZ3JlZW4tYmx1ZVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVlsR25cIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIlllbGxvdy1ncmVlblwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVlsT3JCclwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiWWVsbG93LW9yYW5nZS1icm93blwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVlsT3JSZFwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiWWVsbG93LW9yYW5nZS1yZWRcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVSYWluYm93XCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJSYWluYm93XCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlU2luZWJvd1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiU2luZWJvd1wiXG4gICAgICB9XG4gICAgXTtcbiAgICBsZXQgZHJvcGRvd25fY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICBkcm9wZG93bl9jb250YWluZXIuaWQgPSBcImdyaWR2aXotY29sb3JzY2hlbWUtZHJvcGRvd24tY29udGFpbmVyXCI7XG4gICAgZHJvcGRvd25fY29udGFp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ICB9XG4gIH1cblxuICBmdW5jdGlvbiB6b29tSGFuZGxlcihldmVudCkge1xuICAgIGxldCBzY2FsZSA9IGV2ZW50LnRyYW5zZm9ybS5rO1xuICAgIGlmIChldmVudC5zb3VyY2VFdmVudCkge1xuICAgICAgbGV0IG5ld196ID0gZ2V0WkZyb21TY2FsZShzY2FsZSk7XG4gICAgICAvL2lmIHpvb21cbiAgICAgIGlmIChuZXdfeiAhPT0gY2FtZXJhLnBvc2l0aW9uLnopIHtcbiAgICAgICAgLy8gSGFuZGxlIGEgem9vbSBldmVudFxuICAgICAgICBjb25zdCB7IGNsaWVudFgsIGNsaWVudFkgfSA9IGV2ZW50LnNvdXJjZUV2ZW50O1xuICAgICAgICAvLyBDb2RlIGZyb20gV2VzdExhbmdsZXkgaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvMTMwNTUyMTQvbW91c2UtY2FudmFzLXgteS10by10aHJlZS1qcy13b3JsZC14LXktei8xMzA5MTY5NCMxMzA5MTY5NFxuICAgICAgICBjb25zdCB2ZWN0b3IgPSBuZXcgVmVjdG9yMyhcbiAgICAgICAgICAoY2xpZW50WCAvIHZpZXdlci53aWR0aF8pICogMiAtIDEsXG4gICAgICAgICAgLShjbGllbnRZIC8gdmlld2VyLmhlaWdodF8pICogMiArIDEsXG4gICAgICAgICAgMVxuICAgICAgICApO1xuICAgICAgICB2ZWN0b3IudW5wcm9qZWN0KGNhbWVyYSk7XG4gICAgICAgIGNvbnN0IGRpciA9IHZlY3Rvci5zdWIoY2FtZXJhLnBvc2l0aW9uKS5ub3JtYWxpemUoKTtcbiAgICAgICAgY29uc3QgZGlzdGFuY2UgPSAobmV3X3ogLSBjYW1lcmEucG9zaXRpb24ueikgLyBkaXIuejtcbiAgICAgICAgY29uc3QgcG9zID0gY2FtZXJhLnBvc2l0aW9uLmNsb25lKCkuYWRkKGRpci5tdWx0aXBseVNjYWxhcihkaXN0YW5jZSkpO1xuICAgICAgICAvLyBTZXQgd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tcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIC8vY2hhbmdlIG51dHMgc2ltcGxpZmljYXRpb24gKG9yIG5vdCkgYmFzZWQgb24gY3VycmVudCBzY2FsZVxuICAgIC8vVVJMIHRoZW1lczogMjAxNi8zMDM1LzIwTS8wLmpzb25cbiAgICBpZiAodmlld2VyLm51dHMyanNvbl8pIHtcbiAgICAgIGlmIChcbiAgICAgICAgc2NhbGUgPCBDT05TVEFOVFMubnV0c19zY2FsZV90aHJlc2hvbGQgJiZcbiAgICAgICAgdmlld2VyLm51dHNTaW1wbGlmaWNhdGlvbl8gIT09IFwiMTBNXCJcbiAgICAgICkge1xuICAgICAgICB2aWV3ZXIubnV0c1NpbXBsaWZpY2F0aW9uXyA9IFwiMTBNXCI7XG4gICAgICAgIGxvYWROdXRzMmpzb24oXG4gICAgICAgICAgQ09OU1RBTlRTLm51dHNfYmFzZV9VUkwgK1xuICAgICAgICAgIHZpZXdlci5udXRzMmpzb25FUFNHXyArXG4gICAgICAgICAgXCIvXCIgK1xuICAgICAgICAgIHZpZXdlci5udXRzU2ltcGxpZmljYXRpb25fICtcbiAgICAgICAgICBcIi9cIiArIHZpZXdlci5udXRzTGV2ZWxfICsgXCIuanNvblwiXG4gICAgICAgICk7XG4gICAgICB9IGVsc2UgaWYgKFxuICAgICAgICBzY2FsZSA+IENPTlNUQU5UUy5udXRzX3NjYWxlX3RocmVzaG9sZCAmJlxuICAgICAgICB2aWV3ZXIubnV0c1NpbXBsaWZpY2F0aW9uXyAhPT0gXCIyME1cIlxuICAgICAgKSB7XG4gICAgICAgIHZpZXdlci5udXRzU2ltcGxpZmljYXRpb25fID0gXCIyME1cIjtcbiAgICAgICAgbG9hZE51dHMyanNvbihcbiAgICAgICAgICBDT05TVEFOVFMubnV0c19iYXNlX1VSTCArXG4gICAgICAgICAgdmlld2VyLm51dHMyanNvbkVQU0dfICtcbiAgICAgICAgICBcIi9cIiArXG4gICAgICAgICAgdmlld2VyLm51dH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gICAgICAgIHJldHVybiBcInRyYW5zbGF0ZSggXCIgKyAobWF4VyArIGxhYmVsT2Zmc2V0KSArIFwiLFxcbiAgICAgICAgICAgICAgXCIgKyAoc2hhcGVTaXplW2ldLnkgKyBzaGFwZVNpemVbaV0uaGVpZ2h0IC8gMiArIDUpICsgXCIpXCI7XG4gICAgICAgIH07XG4gICAgICB9KSgpO1xuICAgIH0gZWxzZSBpZiAob3JpZW50ID09PSBcImhvcml6b250YWxcIikge1xuICAgICAgY2VsbFRyYW5zID0gZnVuY3Rpb24gY2VsbFRyYW5zKGQsIGkpIHtcbiAgICAgICAgcmV0dXJuIFwidHJhbnNsYXRlKCBcIiArIGkgKiAobWF4VyArIHNoYXBlUGFkZGluZykgKyBcIiwwKVwiO1xuICAgICAgfTtcbiAgICAgIHRleHRUcmFucyA9IGZ1bmN0aW9uIHRleHRUcmFucyhkLCBpKSB7XG4gICAgICAgIHJldHVybiBcInRyYW5zbGF0ZSggXCIgKyAoc2hhcGVTaXplW2ldLndpZHRoICogdGV4dEFsaWduICsgc2hhcGVTaXplW2ldLngpICsgXCIsXFxuICAgICAgICAgICAgICBcIiArIChtYXhIICsgbGFiZWxPZmZzZXQpICsgXCIpXCI7XG4gICAgICB9O1xuICAgIH1cblxuICAgIGhlbHBlci5kM19wbGFjZW1lbnQob3JpZW50LCBjZWxsLCBjZWxsVHJhbnMsIHRleHQsIHRleHRUcmFucywgbGFiZWxBbGlnbik7XG4gICAgaGVscGVyLmQzX3RpdGxlKHN2ZywgdGl0bGUsIGNsYXNzUHJlZml4LCB0aXRsZVdpZHRoKTtcbiAgICBjZWxsLnRyYW5zaXRpb24oKS5zdHlsZShcIm9wYWNpdHlcIiwgMSk7XG4gIH1cblxuICBsZWdlbmQuc2NhbGUgPSBmdW5jdGlvbiAoXykge1xuICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNjYWxlO1xuICAgIHNjYWxlID0gXztcbiAgICByZXR1cm4gbGVnZW5kO1xuIC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AgIHZhbHVlTmVnYXRpdmUgPSBmYWxzZTtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgICAgaWYgKGMgPSB2YWx1ZS5jaGFyQ29kZUF0KGkpLCAoNDggPCBjICYmIGMgPCA1OClcbiAgICAgICAgICAgICAgICB8fCAodHlwZSA9PT0gXCJ4XCIgJiYgOTYgPCBjICYmIGMgPCAxMDMpXG4gICAgICAgICAgICAgICAgfHwgKHR5cGUgPT09IFwiWFwiICYmIDY0IDwgYyAmJiBjIDwgNzEpKSB7XG4gICAgICAgICAgICAgIHZhbHVlTmVnYXRpdmUgPSB0cnVlO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDb21wdXRlIHRoZSBwcmVmaXggYW5kIHN1ZmZpeC5cbiAgICAgICAgdmFsdWVQcmVmaXggPSAodmFsdWVOZWdhdGl2ZSA/IChzaWduID09PSBcIihcIiA/IHNpZ24gOiBcIi1cIikgOiBzaWduID09PSBcIi1cIiB8fCBzaWduID09PSBcIihcIiA/IFwiXCIgOiBzaWduKSArIHZhbHVlUHJlZml4O1xuICAgICAgICB2YWx1ZVN1ZmZpeCA9IHZhbHVlU3VmZml4ICsgKHR5cGUgPT09IFwic1wiID8gcHJlZml4ZXNbOCArIHByZWZpeEV4cG9uZW50IC8gM10gOiBcIlwiKSArICh2YWx1ZU5lZ2F0aXZlICYmIHNpZ24gPT09IFwiKFwiID8gXCIpXCIgOiBcIlwiKTtcblxuICAgICAgICAvLyBCcmVhayB0aGUgZm9ybWF0dGVkIHZhbHVlIGludG8gdGhlIGludGVnZXIg4oCcdmFsdWXigJ0gcGFydCB0aGF0IGNhbiBiZVxuICAgICAgICAvLyBncm91cGVkLCBhbmQgZnJhY3Rpb25hbCBvciBleHBvbmVudGlhbCDigJxzdWZmaXjigJ0gcGFydCB0aGF0IGlzIG5vdC5cbiAgICAgICAgaWYgKG1he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GJhc2U7XG4gIH07XG5cbiAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykge1xuICAgIHJldHVybiBhcmd1bWVudHMubGVuZ3RoID8gKGRvbWFpbihfKSwgcmVzY2FsZSgpKSA6IGRvbWFpbigpO1xuICB9O1xuXG4gIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oY291bnQpIHtcbiAgICB2YXIgZCA9IGRvbWFpbigpLFxuICAgICAgICB1ID0gZFswXSxcbiAgICAgICAgdiA9IGRbZC5sZW5ndGggLSAxXSxcbiAgICAgICAgcjtcblxuICAgIGlmIChyID0gdiA8IHUpIGkgPSB1LCB1ID0gdiwgdiA9IGk7XG5cbiAgICB2YXIgaSA9IGxvZ3ModSksXG4gICAgICAgIGogPSBsb2dzKHYpLFxuICAgICAgICBwLFxuICAgICAgICBrLFxuICAgICAgICB0LFxuICAgICAgICBuID0gY291bnQgPT0gbnVsbCA/IDEwIDogK2NvdW50LFxuICAgICAgICB6ID0gW107XG5cbiAgICBpZiAoIShiYXNlICUgMSkgJiYgaiAtIGkgPCBuKSB7XG4gICAgICBpID0gTWF0aC5yb3VuZChpKSAtIDEsIGogPSBNYXRoLnJvdW5kKGopICsgMTtcbiAgICAgIGlmICh1ID4gMCkgZm9yICg7IGkgPCBqOyArK2kpIHtcbiAgICAgICAgZm9yIChrID0gMSwgcCA9IHBvd3MoaSk7IGsgPCBiYXNlOyArK2spIHtcbiAgICAgICAgICB0ID0gcCAqIGs7XG4gICAgICAgICAgaWYgKHQgPCB1KSBjb250aW51ZTtcbiAgICAgICAgICBpZiAodCA+IHYpIGJyZWFrO1xuICAgICAgICAgIHoucHVzaCh0KTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGZvciAoOyBpIDwgajsgKytpKSB7XG4gICAgICAgIGZvciAoayA9IGJhc2UgLSAxLCBwID0gcG93cyhpKTsgayA+PSAxOyAtLWspIHtcbiAgICAgICAgICB0ID0gcCAqIGs7XG4gICAgICAgICAgaWYgKHQgPCB1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KCB0aGlzLngsIHYueCApO1xuXHRcdHRoaXMueSA9IE1hdGgubWluKCB0aGlzLnksIHYueSApO1xuXHRcdHRoaXMueiA9IE1hdGgubWluKCB0aGlzLnosIHYueiApO1xuXHRcdHRoaXMudyA9IE1hdGgubWluKCB0aGlzLncsIHYudyApO1xuXG5cdFx0cmV0dXJuIHRoaXM7XG5cblx0fSxcblxuXHRtYXg6IGZ1bmN0aW9uICggdiApIHtcblxuXHRcdHRoaXMueCA9IE1hdGgubWF4KCB0aGlzLngsIHYueCApO1xuXHRcdHRoaXMueSA9IE1hdGgubWF4KCB0aGlzLnksIHYueSApO1xuXHRcdHRoaXMueiA9IE1hdGgubWF4KCB0aGlzLnosIHYueiApO1xuXHRcdHRoaXMudyA9IE1hdGgubWF4KCB0aGlzLncsIHYudyApO1xuXG5cdFx0cmV0dXJuIHRoaXM7XG5cblx0fSxcblxuXHRjbGFtcDogZnVuY3Rpb24gKCBtaW4sIG1heCApIHtcblxuXHRcdC8vIGFzc3VtZXMgbWluIDwgbWF4LCBjb21wb25lbnR3aXNlXG5cblx0XHR0aGlzLnggPSBNYXRoLm1heCggbWluLngsIE1hdGgubWluKCBtYXgueCwgdGhpcy54ICkgKTtcblx0XHR0aGlzLnkgPSBNYXRoLm1heCggbWluLnksIE1hdGgubWluKCBtYXgueSwgdGhpcy55ICkgKTtcblx0XHR0aGlzLnogPSBNYXRoLm1heCggbWluLnosIE1hdGgubWluKCBtYXgueiwgdGhpcy56ICkgKTtcblx0XHR0aGlzLncgPSBNYXRoLm1heCggbWluLncsIE1hdGgubWluKCBtYXgudywgdGhpcy53ICkgKTtcblxuXHRcdHJldHVybiB0aGlzO1xuXG5cdH0sXG5cblx0Y2xhbXBTY2FsYXI6IGZ1bmN0aW9uICggbWluVmFsLCBtYXhWYWwgKSB7XG5cblx0XHR0aGlzLnggPSBNYXRoLm1heCggbWluVmFsLCBNYXRoLm1pbiggbWF4VmFsLCB0aGlzLnggKSApO1xuXHRcdHRoaXMueSA9I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JldHVybiB0aGlzLmlkZW50aXR5KCk7XG5cblx0XHR9XG5cblx0XHR2YXIgZGV0SW52ID0gMSAvIGRldDtcblxuXHRcdHRlWyAwIF0gPSB0MTEgKiBkZXRJbnY7XG5cdFx0dGVbIDEgXSA9ICggbjI0ICogbjMzICogbjQxIC0gbjIzICogbjM0ICogbjQxIC0gbjI0ICogbjMxICogbjQzICsgbjIxICogbjM0ICogbjQzICsgbjIzICogbjMxICogbjQ0IC0gbjIxICogbjMzICogbjQ0ICkgKiBkZXRJbnY7XG5cdFx0dGVbIDIgXSA9ICggbjIyICogbjM0ICogbjQxIC0gbjI0ICogbjMyICogbjQxICsgbjI0ICogbjMxICogbjQyIC0gbjIxICogbjM0ICogbjQyIC0gbjIyICogbjMxICogbjQ0ICsgbjIxICogbjMyICogbjQ0ICkgKiBkZXRJbnY7XG5cdFx0dGVbIDMgXSA9ICggbjIzICogbjMyICogbjQxIC0gbjIyICogbjMzICogbjQxIC0gbjIzICogbjMxICogbjQyICsgbjIxICogbjMzICogbjQyICsgbjIyICogbjMxICogbjQzIC0gbjIxICogbjMyICogbjQzICkgKiBkZXRJbnY7XG5cblx0XHR0ZVsgNCBdID0gdDEyICogZGV0SW52O1xuXHRcdHRlWyA1IF0gPSAoIG4xMyAqIG4zNCAqIG40MSAtIG4xNCAqIG4zMyAqIG40MSArIG4xNCAqIG4zMSAqIG40MyAtIG4xMSAqIG4zNCAqIG40MyAtIG4xMyAqIG4zMSAqIG40NCArIG4xMSAqIG4zMyAqIG40NCApICogZGV0SW52O1xuXHRcdHRlWyA2IF0gPSAoIG4xNCAqIG4zMiAqIG40MSAtIG4xMiAqIG4zNCAqIG40MSAtIG4xNCAqIG4zMSAqIG40MiArIG4xMSAqIG4zNCAqIG40MiArIG4xMiAqIG4zMSAqIG40NCAtIG4xMSAqIG4zMiAqIG40NCApICogZGV0SW52O1xuXHRcdHRlWyA3IF0gPSAoIG4xMiAqIG4zMyAqIG40MSAtIG4xMyAqIG4zMiAqIG40M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biA+IHR5bWF4ICkgfHwgKCB0eW1pbiA+IHRtYXggKSApIHJldHVybiBudWxsO1xuXG5cdFx0Ly8gVGhlc2UgbGluZXMgYWxzbyBoYW5kbGUgdGhlIGNhc2Ugd2hlcmUgdG1pbiBvciB0bWF4IGlzIE5hTlxuXHRcdC8vIChyZXN1bHQgb2YgMCAqIEluZmluaXR5KS4geCAhPT0geCByZXR1cm5zIHRydWUgaWYgeCBpcyBOYU5cblxuXHRcdGlmICggdHltaW4gPiB0bWluIHx8IHRtaW4gIT09IHRtaW4gKSB0bWluID0gdHltaW47XG5cblx0XHRpZiAoIHR5bWF4IDwgdG1heCB8fCB0bWF4ICE9PSB0bWF4ICkgdG1heCA9IHR5bWF4O1xuXG5cdFx0aWYgKCBpbnZkaXJ6ID49IDAgKSB7XG5cblx0XHRcdHR6bWluID0gKCBib3gubWluLnogLSBvcmlnaW4ueiApICogaW52ZGlyejtcblx0XHRcdHR6bWF4ID0gKCBib3gubWF4LnogLSBvcmlnaW4ueiApICogaW52ZGlyejtcblxuXHRcdH0gZWxzZSB7XG5cblx0XHRcdHR6bWluID0gKCBib3gubWF4LnogLSBvcmlnaW4ueiApICogaW52ZGlyejtcblx0XHRcdHR6bWF4ID0gKCBib3gubWluLnogLSBvcmlnaW4ueiApICogaW52ZGlyejtcblxuXHRcdH1cblxuXHRcdGlmICggKCB0bWluID4gdHptYXggKSB8fCAoIHR6bWluID4gdG1heCApICkgcmV0dXJuIG51bGw7XG5cblx0XHRpZiAoIHR6bWluID4gdG1pbiB8fCB0bWluICE9PSB0bWluICkgdG1pbiA9IHR6bWluO1xuXG5cdFx0aWYgKCB0em1heCA8IHRtYXggfHwgdG1heCAhPT0gdG1heCApIHRtYXggPSB0em1heDtcblxuXHRcdC8vcmV0dXJuIHBvaW50IGNsb3Nlc3QgdG8gdGhlIHJheSAocG9zaXRpdmUgc2lkZSlcblxuXHRcdGlmICggdG1heCA8IDAgKSByZXR1cm4gbnVsbDtcblxuXHRcdHJldHVybi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1bmN0aW9uKGFyYykge1xuICAgICAgICAgICAgcG9seWdvbnNCeUFyY1thcmMgPCAwID8gfmFyYyA6IGFyY10uZm9yRWFjaChmdW5jdGlvbihwb2x5Z29uKSB7XG4gICAgICAgICAgICAgIGlmICghcG9seWdvbi5fKSB7XG4gICAgICAgICAgICAgICAgcG9seWdvbi5fID0gMTtcbiAgICAgICAgICAgICAgICBuZWlnaGJvcnMucHVzaChwb2x5Z29uKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfSk7XG5cbiAgcG9seWdvbnMuZm9yRWFjaChmdW5jdGlvbihwb2x5Z29uKSB7XG4gICAgZGVsZXRlIHBvbHlnb24uXztcbiAgfSk7XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBcIk11bHRpUG9seWdvblwiLFxuICAgIGFyY3M6IGdyb3Vwcy5tYXAoZnVuY3Rpb24ocG9seWdvbnMpIHtcbiAgICAgIHZhciBhcmNzID0gW10sIG47XG5cbiAgICAgIC8vIEV4dHJhY3QgdGhlIGV4dGVyaW9yICh1bmlxdWUpIGFyY3MuXG4gICAgICBwb2x5Z29ucy5mb3JFYWNoKGZ1bmN0aW9uKHBvbHlnb24pIHtcbiAgICAgICAgcG9seWdvbi5mb3JFYWNoKGZ1bmN0aW9uKHJpbmcpIHtcbiAgICAgICAgICByaW5nLmZvckVhY2goZnVuY3Rpb24oYXJjKSB7XG4gICAgICAgICAgICBpZiAocG9seWdvbnNCeUFyY1thcmMgPCAwID8gfmFyYyA6IGFyY10ubGVuZ3RoIDwgMikge1xuICAgICAgICAgICAgICBhcmNzLnB1c2goYXJjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9KTtcblxuICAgICAgLy8gU3RpdGNoIHRoZSBhcmNzIGludG8gb25lIG9yIG1vcmUgcmluZ3MuXG4gICAg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AgICAgICAgICAgICBsZXQgZG9tYWluID0gW1xuICAgICAgICAgICAgICAgICAgbWluKFt4RG9tYWluLCB5RG9tYWluXSwgYXJyYXkgPT4gbWluKGFycmF5KSksXG4gICAgICAgICAgICAgICAgICBtYXgoW3hEb21haW4sIHlEb21haW5dLCBhcnJheSA9PiBtYXgoYXJyYXkpKVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUgPSBkM3NjYWxlLnNjYWxlTGluZWFyKCkuZG9tYWluKGRvbWFpbikucmFuZ2UoWy0xLCAxXSk7XG4gICAgICAgICAgICAgICAgLy8gdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUgPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZTtcbiAgICAgICAgICAgICAgICAvLyB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSA9IGQzc2NhbGUuc2NhbGVMaW5lYXIoKS5kb21haW4oeURvbWFpbikucmFuZ2UoWy0xLCAxXSk7XG4gICAgICAgICAgICAgICAgLy91cGRhdGUgY2VsbCBzaXplcyBhbmQgcmF5Y2FzdGVyIHRvIGZpdCBuZXcgd2ViZ2wtZnJpZW5kbHkgY29vcmRzXG4gICAgICAgICAgICAgICAgbGV0IG5ld1Jlc29sdXRpb24gPSAwLjAwMzsgLy9UT0RPIGRlZmluZSByZXNvbHV0aW9uIGJhc2VkIG9uIHNjYWxlXG4gICAgICAgICAgICAgICAgdmlld2VyLnJlc29sdXRpb25fID0gbmV3UmVzb2x1dGlvbjtcbiAgICAgICAgICAgICAgICBncmlkLmNlbGxTaXplID0gbmV3UmVzb2x1dGlvbjtcbiAgICAgICAgICAgICAgICBncmlkQ29uZmlnLnBvaW50U2l6ZSA9IG5ld1Jlc29sdXRpb247XG4gICAgICAgICAgICAgICAgZ3JpZENvbmZpZy5yYXljYXN0ZXJUaHJlc2hvbGQgPSBuZXdSZXNvbHV0aW9uO1xuICAgICAgICAgICAgICAgIHJheWNhc3Rlci5wYXJhbXMuUG9pbnRzLnRocmVzaG9sZCA9IG5ld1Jlc29sdXRpb247XG4gICAgICAgICAgICAgICAgLy9zY2FsZSBjZW50ZXIgY29vcmRzXG4gICAgICAgICAgICAgICAgdmlld2VyLmNlbnRlcl9bMF0gPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSh2aWV3ZXIuY2VudGVyX1swXSk7XG4gICAgICAgICAgICAgICAgdmlld2VyLmNlbnRlcl9bMV0gPSB2aWV3ZXIubW9iaWxlQ29vcmRTY2FsZSh2aWV3ZXIuY2VudGVyX1sxXSk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAvLyBhZGQgcG9pbnRzIHRvIGNhY2hlXG4gICAgICAgICAgICAgIGFkZEdyaWRUb0NhY2hlKGNzdiwgZ3JpZC5jZWxsU2l6ZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gY29uc29sZS5lcnJvcihcbiAgICAgICAgICAgICAgICBcIkluY29ycmVjdCBjc3YgZm9ybWF0LiBQbGVhc2UgdXNlIGNvb3JkaW5hdGUgY29sdW1ucyB3aXRoIG5hbWVzICd4JyBhbmQgJ3knXCJcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gYWRkIEhUTUxFbGVtZW50cyB0byBET01cbiAgICAgICAgICAgIGFkZEluaXRpYWxFbGVtZW50c1RvRE9NKCk7XG4gICAgICAgICAgICAvLyBkZWZpbmUgdmlld2VyIGNsaWNrLCBkcm9wZG93biBjaGFuZ2UgYW5kIHNjcmVlbiByZXNpemUgZXZlbnRzXG4gICAgICAgICAgICBhZGRFdmVudExpc3RlbmVycygpO1xuXG4gICAgICAgICAgICAvL2RlZmluZSBzY2FsZXNcbiAgICAgICAgICAgIHZpZXdlci5jb2xvclZhbHVlc0V4dGVudCA9IGV4dGVudChncmlkQ2FjaGVzW3ZpZXdlci5yZXNvbHV0aW9uX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AgICAgIHZpZXdlci5jZW50ZXJfID0gW1xuICAgICAgICAgICAgICAgICAgdmlld2VyLm1vYmlsZUNvb3JkU2NhbGUocGFyc2VGbG9hdChjLngpKSxcbiAgICAgICAgICAgICAgICAgIHZpZXdlci5tb2JpbGVDb29yZFNjYWxlKHBhcnNlRmxvYXQoYy55KSlcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZpZXdlci5jZW50ZXJfID0gW1xuICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChjLngpLFxuICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChjLnkpXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBkZWZpbmUgcGFuICYgem9vbVxuICAgICAgICAgICAgYWRkUGFuQW5kWm9vbSgpO1xuXG4gICAgICAgICAgICAvL2FkZCBjZWxscyB0byB2aWV3ZXJcbiAgICAgICAgICAgIGFkZFBvaW50c1RvU2NlbmUoKTtcblxuICAgICAgICAgICAgaWYgKHZpZXdlci5jb2xvckZpZWxkU2VsZWN0b3JfKSB7XG4gICAgICAgICAgICAgIGNyZWF0ZUNvbG9yRmllbGREcm9wZG93bigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHZpZXdlci5zaXplRmllbGRTZWxlY3Rvcl8pIHtcbiAgICAgICAgICAgICAgY3JlYXRlU2l6ZUZpZWxkRHJvcGRvd24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBVdGlscy5oaWRlTG9hZGluZygpO1xuICAgICAgICB9LFxuICAgICAgICBlcnIgPT4gY29uc29sZS5sb2coZXJyKVxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29uc29sZS5lcnJvcihcbiAgICAgICAgXCJQbGVhc2Ugc3BlY2lmeSBncmlkIGNlbGwgc2l6ZSBpb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ysrKSB7XG4gICAgICAgICAgICBsZXQgeHl6O1xuICAgICAgICAgICAgaWYgKHZpZXdlci56ZXJvc1JlbW92ZWRfKSB7XG4gICAgICAgICAgICAgIC8vIHJlbW92ZSB6ZXJvcyBmcm9tIG51dHMyanNvbiBjb29yZGluYXRlcyB0byBtYXRjaCBncmlkRGF0YVxuICAgICAgICAgICAgICBsZXQgZCA9IE51bWJlcignMUUnICsgdmlld2VyLnplcm9zUmVtb3ZlZF8pO1xuICAgICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgICAgeDogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVswXSAvIGQsXG4gICAgICAgICAgICAgICAgeTogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVsxXSAvIGQsXG4gICAgICAgICAgICAgICAgejogQ09OU1RBTlRTLmxpbmVfelxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgeHl6ID0ge1xuICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bMF0sXG4gICAgICAgICAgICAgICAgeTogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVsxXSxcbiAgICAgICAgICAgICAgICB6OiBDT05TVEFOVFMubGluZV96XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvb3Jkcy5wdXNoKHh5eik7XG4gICAgICAgICAgfVxuICAgICAgICAgIGJvdW5kYXJpZXNHcm91cC5hZGQoY3JlYXRlTGluZUZyb21Db29yZHMoY29vcmRzKSk7XG4gICAgICAgIH0gZWxzZSBpZiAoZmVhdHVyZS5nZW9tZXRyeS50eXBlID09IFwiTXVsdGlQb2x5Z29uXCIpIHtcbiAgICAgICAgICBmb3IgKGxldCBzID0gMDsgcyA8IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY10ubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgIC8vZWFjaCBwb2x5Z29uIGluIG11bHRpcG9seWdvbjpcbiAgICAgICAgICAgIGNvb3JkcyA9IFtdO1xuICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgbGV0IG0gPSAwO1xuICAgICAgICAgICAgICBtIDwgZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXS5sZW5ndGg7XG4gICAgICAgICAgICAgIG0rK1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGxldCB4eXo7XG4gICAgICAgICAgICAgIGlmICh2aWV3ZXIuemVyb3NSZW1vdmVkXykge1xuICAgICAgICAgICAgICAgIGxldCBkID0gTnVtYmVyKCcxRScgKyB2aWV3ZXIuemVyb3NSZW1vdmVkXyk7XG4gICAgICAgICAgICAgICAgeHl6ID0ge1xuICAgICAgICAgICAgICAgICAgeDogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVttXVswXSAvIGQsXG4gICAgICAgICAgICAgICAgICB5OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdW21dWzFdIC8gZCxcbiAgICAgICAgICAgICAgICAgIHo6IENPTlNUQU5UUy5saW5lX3pcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHh5eiA9IHtcbiAgICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bbV1bMF0sXG4gICAgICAgICAgICAgICAgICB5OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdW21dWzFdLFxuICAgICAgICAgICAgICAgICAgejogQ09OU1RBTlRTLmxpbmVfelxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29vcmRzLnB1c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gICAgICAgIHk6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bMV0sXG4gICAgICAgICAgICAgICAgejogbGF5ZXJaXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvb3Jkcy5wdXNoKHh5eik7XG4gICAgICAgICAgfVxuICAgICAgICAgIGdlb2pzb25Hcm91cC5hZGQoY3JlYXRlTGluZUZyb21Db29yZHMoY29vcmRzKSk7XG4gICAgICAgIH0gZWxzZSBpZiAoZmVhdHVyZS5nZW9tZXRyeS50eXBlID09IFwiTXVsdGlQb2x5Z29uXCIpIHtcbiAgICAgICAgICBmb3IgKGxldCBzID0gMDsgcyA8IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY10ubGVuZ3RoOyBzKyspIHtcbiAgICAgICAgICAgIC8vZWFjaCBwb2x5Z29uIGluIG11bHRpcG9seWdvbjpcbiAgICAgICAgICAgIGxldCBjb29yZHMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgIGxldCBtID0gMDtcbiAgICAgICAgICAgICAgbSA8IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc10ubGVuZ3RoO1xuICAgICAgICAgICAgICBtKytcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBsZXQgeHl6O1xuICAgICAgICAgICAgICBpZiAocmVtb3ZlWmVyb3MgJiYgdmlld2VyLnplcm9zUmVtb3ZlZF8pIHtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IE51bWJlcignMUUnICsgdmlld2VyLnplcm9zUmVtb3ZlZF8pO1xuICAgICAgICAgICAgICAgIHh5eiA9IHtcbiAgICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bbV1bMF0gLyBkLFxuICAgICAgICAgICAgICAgICAgeTogZmVhdHVyZS5nZW9tZXRyeS5jb29yZGluYXRlc1tjXVtzXVttXVsxXSAvIGQsXG4gICAgICAgICAgICAgICAgICB6OiBsYXllclpcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHh5eiA9IHtcbiAgICAgICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bc11bbV1bMF0sXG4gICAgICAgICAgICAgICAgICB5OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdW3NdW21dWzFdLFxuICAgICAgICAgICAgICAgICAgejogbGF5ZXJaXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjb29yZHMucHVzaCh4eXopO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZ2VvanNvbkdyb3VwLmFkZChjcmVhdGVMaW5lRnJvbUNvb3Jkcyhjb29yZHMpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZmVhdHVyZS5nZW9tZXRyeS50eXBlID09IFwiTGluZVN0cmluZ1wiKSB7XG4gICAgICAgICAgbGV0IHh5ejtcbiAgICAgICAgICBpZiAocmVtb3ZlWmVyb3MgJiYgdmlld2VyLnplcm9zUmVtb3ZlZF8pIHtcbiAgICAgICAgICAgIGxldCBkID0gTnVtYmVyKCcxRScgKyB2aWV3ZXIuemVyb3NSZW1vdmVkXyk7XG4gICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAgICAgIHg6IGZlYXR1cmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbY11bMF0gLyBkLFxuICAgICAgICAgICAgICB5OiBmZWF0dXJlLmdlb21ldHJ5LmNvb3JkaW5hdGVzW2NdWzFdIC8gZCxcbiAgICAgICAgICAgICAgejogbGF5ZXJaXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4eXogPSB7XG4gICAgICAgICAg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sdWVcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVSZEd5XCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJSZWQtZ3JleVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVJkWWxCdVwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUmVkLXllbGxvdy1ibHVlXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlUmRZbEduXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJSZWQteWVsbG93LWdyZWVuXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlU3BlY3RyYWxcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIlNwZWN0cmFsXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlQmx1ZXNcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIkJsdWVzXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlR3JlZW5zXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJHcmVlbnNcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVHcmV5c1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiR3JleXNcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVPcmFuZ2VzXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJPcmFuZ2VzXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlUHVycGxlc1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUHVycGxlc1wiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVJlZHNcIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIlJlZHNcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVUdXJib1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiVHVyYm9cIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVWaXJpZGlzXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJWaXJpZGlzXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlSW5mZXJub1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiSW5mZXJub1wiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZU1hZ21hXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJNYWdtYVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVBsYXNtYVwiLFxuICAgICAgICBpbm5lclRleHQ6IFwiUGxhc21hXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlQ2l2aWRpc1wiLFxuICAgICAgICBpbm5lclRleHQ6IFwiQ2l2aWRpc1wiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB2YWx1ZTogXCJpbnRlcnBvbGF0ZVdhcm1cIixcbiAgICAgICAgaW5uZXJUZXh0OiBcIldhcm1cIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdmFsdWU6IFwiaW50ZXJwb2xhdGVDb29sXCIsXG4gICAgICAgIGlubmVyVGV4dDogXCJDb29sXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHZhbHVlOiBcImludGVycG9sYXRlQ3ViZWhlbGl4RGVmYXVsdFwiLFxuICAgICAgICB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lci5udXRzMmpzb25fKSB7XG4gICAgICBpZiAoXG4gICAgICAgIHNjYWxlIDwgQ09OU1RBTlRTLm51dHNfc2NhbGVfdGhyZXNob2xkICYmXG4gICAgICAgIHZpZXdlci5udXRzU2ltcGxpZmljYXRpb25fICE9PSBcIjEwTVwiXG4gICAgICApIHtcbiAgICAgICAgdmlld2VyLm51dHNTaW1wbGlmaWNhdGlvbl8gPSBcIjEwTVwiO1xuICAgICAgICBsb2FkTnV0czJqc29uKFxuICAgICAgICAgIENPTlNUQU5UUy5udXRzX2Jhc2VfVVJMICtcbiAgICAgICAgICB2aWV3ZXIubnV0czJqc29uRVBTR18gK1xuICAgICAgICAgIFwiL1wiICtcbiAgICAgICAgICB2aWV3ZXIubnV0c1NpbXBsaWZpY2F0aW9uXyArXG4gICAgICAgICAgXCIvXCIgKyB2aWV3ZXIubnV0c0xldmVsXyArIFwiLmpzb25cIlxuICAgICAgICApO1xuICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgc2NhbGUgPiBDT05TVEFOVFMubnV0c19zY2FsZV90aHJlc2hvbGQgJiZcbiAgICAgICAgdmlld2VyLm51dHNTaW1wbGlmaWNhdGlvbl8gIT09IFwiMjBNXCJcbiAgICAgICkge1xuICAgICAgICB2aWV3ZXIubnV0c1NpbXBsaWZpY2F0aW9uXyA9IFwiMjBNXCI7XG4gICAgICAgIGxvYWROdXRzMmpzb24oXG4gICAgICAgICAgQ09OU1RBTlRTLm51dHNfYmFzZV9VUkwgK1xuICAgICAgICAgIHZpZXdlci5udXRzMmpzb25FUFNHXyArXG4gICAgICAgICAgXCIvXCIgK1xuICAgICAgICAgIHZpZXdlci5udXRzU2ltcGxpZmljYXRpb25fICtcbiAgICAgICAgICBcIi9cIiArIHZpZXdlci5udXRzTGV2ZWxfICsgXCIuanNvblwiXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIHJldHJpZXZlcyBwbGFjZW5hbWVzIGJ5IHBvcHV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HlsZS5kaXNwbGF5ID0gXCJibG9ja1wiO1xuICAvL2xvYWRpbmdfYmFyLnN0eWxlLmRpc3BsYXkgPSBcImJsb2NrXCI7XG59XG5cbi8qKlxuICogQGRlc2NyaXB0aW9uIGhpZGUgbG9hZGluZyBzcGlubmVyXG4gKiBAZnVuY3Rpb24gaGlkZUxvYWRpbmdcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhpZGVMb2FkaW5nKCkge1xuICBsb2FkaW5nX3NwaW5uZXIuc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiO1xuICAvL2xvYWRpbmdfYmFyLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcbn1cblxuLyoqXG4gKiBAZGVzY3JpcHRpb24gcmV0dXJucyBudW1iZXIgd2l0aCBzcGFjZSBhcyBzZXBhcmF0b3JcbiAqIEBmdW5jdGlvbiBmb3JtYXROdW1iZXJcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZvcm1hdE51bWJlcihuKSB7XG4gIHJldHVybiBuXG4gICAgLnRvTG9jYWxlU3RyaW5nKFwiZW5cIilcbiAgICAucmVwbGFjZSgvLC9naSwgXCIgXCIpXG59XG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/examples/netherlands/index.html b/examples/netherlands/index.html index 720dbec86..da9cf8844 100644 --- a/examples/netherlands/index.html +++ b/examples/netherlands/index.html @@ -48,6 +48,7 @@ .colorFieldSelectorLabel("Colour field: ") .legend({ type: "cells", + orientation: "vertical", width: 130, height: 170, title: "Total Inhabitants per 100m² (2018)", diff --git a/examples/portugal/index.html b/examples/portugal/index.html index 79d15e407..dd1c2ceda 100644 --- a/examples/portugal/index.html +++ b/examples/portugal/index.html @@ -49,6 +49,7 @@ .colorFieldSelectorLabel("Colour field: ") .legend({ title: "Inhabitants per km² (2011)", + orentation: "vertical", titleWidth: 150, cells: 10, format: ',.2r' diff --git a/readme.md b/readme.md index fd17799c4..bd9a6c32a 100644 --- a/readme.md +++ b/readme.md @@ -143,8 +143,8 @@ Here's a barebones example that loads a CSV containing population data for a 5 k | viewer.legend([legendConfig]) | Object | See legendConfig default values below. | | legendConfig.type | String | "continuous" | Type of legend to build. Accepted values are "cells" or "continuous". Cells uses [d3-svg-legend](https://d3-legend.susielu.com/) and continuous uses an implementation of Mike Bostock's [color legend](https://observablehq.com/@d3/color-legend) | | legendConfig.width | int | 140 | width of the legend in pixels | -| legendConfig.height | int | 320 | height of the legend in pixels | -| legendConfig.orientation | int | 320 for "cells" and 50 for "continuous" | height of the legend in pixels. | +| legendConfig.height | int | 320 for "cells" and 50 for "continuous" | height of the legend in pixels | +| legendConfig.orientation | int | For cells legends only | "vertical" or "horizontal" | | legendConfig.title | String | "Legend" | Title text of the legend. | | legendConfig.titleWidth | int | 50 | Width of the title text of the legend. | | legendConfig.format | string | ".0s" | d3.format string used to format the legend values | diff --git a/src/js/gridviz.js b/src/js/gridviz.js index 327d22a43..fb26b298e 100644 --- a/src/js/gridviz.js +++ b/src/js/gridviz.js @@ -79,7 +79,7 @@ export function viewer(options) { title: "Legend", titleWidth: 50, format: ".0s", - cells: 13, + cells: 5, shapeWidth: 30 }; viewer._gridLegend; //legend stored here @@ -1020,23 +1020,17 @@ export function viewer(options) { */ function addGridToCache(csv, res) { if (csv) { - for (let i = 0; i < csv.length; i++) { - let x, y; - if (viewer._mobile) { - x = viewer.mobileCoordScale(parseFloat(csv[i].x)); - y = viewer.mobileCoordScale(parseFloat(csv[i].y)); - } else { - x = csv[i].x; - y = csv[i].y; + if (viewer._mobile) { + for (let i = 0; i < csv.length; i++) { + //scale mobile coordinates to avoid d3 pan/zoom bug + let point = csv[i]; + point.x = viewer.mobileCoordScale(parseFloat(csv[i].x)); + point.y = viewer.mobileCoordScale(parseFloat(csv[i].y)); + if (!gridCaches[res]) gridCaches[res] = []; + gridCaches[res].push(point); } - let value = csv[i][viewer.colorField_]; - let point = { - x, - y, - [viewer.colorField_]: value - }; - if (!gridCaches[res]) gridCaches[res] = []; - gridCaches[res].push(point); + } else { + if (!gridCaches[res]) gridCaches[res] = csv } } } From bead050e5905943e479a2f7c252ea3cd847d27b2 Mon Sep 17 00:00:00 2001 From: Joe Davies Date: Mon, 30 Nov 2020 13:02:27 +0100 Subject: [PATCH 2/3] new npm build --- build/gridviz.min.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/gridviz.min.js b/build/gridviz.min.js index 44ad6564e..5e6185b9f 100644 --- a/build/gridviz.min.js +++ b/build/gridviz.min.js @@ -2,4 +2,4 @@ //!\ DECLARE ALIAS AFTER assign prototype ! Object.assign(eb.prototype,{beforeStart_:eb.prototype.copySampleValue_,afterEnd_:eb.prototype.copySampleValue_}),tb.prototype=Object.assign(Object.create(eb.prototype),{constructor:tb,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,a=e+1,o=r[i],s=r[a];if(void 0===o)switch(this.getSettings_().endingStart){case 2401:i=e,o=2*t-n;break;case 2402:o=t+r[i=r.length-2]-r[i+1];break;default:i=e,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:a=e,s=2*n-t;break;case 2402:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}var c=.5*(n-t),l=this.valueSize;this._weightPrev=c/(t-o),this._weightNext=c/(s-n),this._offsetPrev=i*l,this._offsetNext=a*l},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,f=this._weightNext,d=(n-t)/(r-t),p=d*d,m=p*d,g=-h*m+2*h*p-h*d,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*d+1,y=(-1-f)*m+(1.5+f)*p+.5*d,b=f*m-f*p,x=0;x!==o;++x)i[x]=g*a[l+x]+v*a[c+x]+y*a[s+x]+b*a[u+x];return i}}),nb.prototype=Object.assign(Object.create(eb.prototype),{constructor:nb,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=(n-t)/(r-t),u=1-l,h=0;h!==o;++h)i[h]=a[c+h]*u+a[s+h]*l;return i}}),rb.prototype=Object.assign(Object.create(eb.prototype),{constructor:rb,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(ib,{toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:Ky.convertArray(e.times,Array),values:Ky.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}),Object.assign(ib.prototype,{constructor:ib,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new rb(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new nb(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new tb(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,a=r-1;i!==r&&n[i]t;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=Ky.arraySlice(n,i,a),this.values=Ky.arraySlice(this.values,i*o,a*o)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==r&&Ky.isTypedArray(r)){o=0;for(var c=r.length;o!==c;++o){var l=r[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=2302===this.getInterpolation(),i=1,a=e.length-1,o=1;o0){e[i]=e[a];for(p=a*n,m=i*n,f=0;f!==n;++f)t[m+f]=t[p+f];++i}return i!==e.length&&(this.times=Ky.arraySlice(e,0,i),this.values=Ky.arraySlice(t,0,i*n)),this},clone:function(){var e=Ky.arraySlice(this.times,0),t=Ky.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),ab.prototype=Object.assign(Object.create(ib.prototype),{constructor:ab,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ob.prototype=Object.assign(Object.create(ib.prototype),{constructor:ob,ValueTypeName:"color"}),sb.prototype=Object.assign(Object.create(ib.prototype),{constructor:sb,ValueTypeName:"number"}),cb.prototype=Object.assign(Object.create(eb.prototype),{constructor:cb,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=(n-t)/(r-t),l=s+o;s!==l;s+=4)Oh.slerpFlat(i,0,a,s-o,a,s,c);return i}}),lb.prototype=Object.assign(Object.create(ib.prototype),{constructor:lb,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new cb(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),ub.prototype=Object.assign(Object.create(ib.prototype),{constructor:ub,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),hb.prototype=Object.assign(Object.create(ib.prototype),{constructor:hb,ValueTypeName:"vector"}),Object.assign(fb,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,a=n.length;i!==a;++i)t.push(db(n[i]).scale(r));return new fb(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},i=0,a=n.length;i!==a;++i)t.push(ib.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,a=[],o=0;o1){var l=r[h=c[1]];l||(r[h]=l=[]),l.push(s)}}var u=[];for(var h in r)u.push(fb.CreateFromMorphTargetSequence(h,r[h],t,n));return u},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var a=[],o=[];Ky.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],c=0;c0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(Eb.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)a+=(t=this.getPoint(n/e)).distanceTo(i),r.push(a),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(o>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(a-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(a-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,a=new Fh,o=[],s=[],c=[],l=new Fh,u=new ef;for(n=0;n<=e;n++)r=n/e,o[n]=this.getTangentAt(r),o[n].normalize();s[0]=new Fh,c[0]=new Fh;var h=Number.MAX_VALUE,f=Math.abs(o[0].x),d=Math.abs(o[0].y),p=Math.abs(o[0].z);for(f<=h&&(h=f,a.set(1,0,0)),d<=h&&(h=d,a.set(0,1,0)),p<=h&&a.set(0,0,1),l.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],l),c[0].crossVectors(o[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(o[n-1],o[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(Nh.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(u.makeRotationAxis(l,i))),c[n].crossVectors(o[n],s[n]);if(!0===t)for(i=Math.acos(Nh.clamp(s[0].dot(s[e]),-1,1)),i/=e,o[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(u.makeRotationAxis(o[n],i*n)),c[n].crossVectors(o[n],s[n]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),Ab.prototype=Object.create(Eb.prototype),Ab.prototype.constructor=Ab,Ab.prototype.isEllipseCurve=!0,Ab.prototype.getPoint=function(e,t){for(var n=t||new zh,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(u)/c)+1)*c:0===h&&u===c-1&&(u=c-2,h=1),this.closed||u>0?n=s[(u-1)%c]:(Pb.subVectors(s[0],s[1]).add(s[0]),n=Pb),r=s[u%c],i=s[(u+1)%c],this.closed||u+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(Db(o,s.x,c.x,l.x,u.x),Db(o,s.y,c.y,l.y,u.y)),n},jb.prototype.copy=function(e){Eb.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){Eb.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var u=c.getPoint(1);return this.currentPoint.copy(u),this},copy:function(e){return qb.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=qb.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return qb.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Xb.prototype=Object.assign(Object.create(Yb.prototype),{constructor:Xb,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n0){var a=new Mb(new mb(t));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o0?new Qg(o,s):new tp(o,s);break;case"InstancedMesh":o=i(e.geometry),s=a(e.material);var c=e.count,l=e.instanceMatrix;(r=new ov(o,s,c)).instanceMatrix=new yd(new Float32Array(l.array),16);break;case"LOD":r=new Jg;break;case"Line":r=new dv(i(e.geometry),a(e.material),e.mode);break;case"LineLoop":r=new vv(i(e.geometry),a(e.material));break;case"LineSegments":r=new gv(i(e.geometry),a(e.material));break;case"PointCloud":case"Points":r=new Mv(i(e.geometry),a(e.material));break;case"Sprite":r=new qg(a(e.material));break;case"Group":r=new xg;break;default:r=new bf}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(r.matrixAutoUpdate=e.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.layers&&(r.layers.mask=e.layers),void 0!==e.drawMode&&r.setDrawMode(e.drawMode),void 0!==e.children)for(var u=e.children,h=0;hNumber.EPSILON){if(l<0&&(o=t[a],c=-c,s=t[i],l=-l),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var u=l*(e.x-o.x)-c*(e.y-o.y);if(0===u)return!0;if(u<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return r}var i=gy.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,c,l=[];if(1===a.length)return s=a[0],(c=new Xb).curves=s.curves,l.push(c),l;var u=!i(a[0].getPoints());u=e?!u:u;var h,f,d=[],p=[],m=[],g=0;p[g]=void 0,m[g]=[];for(var v=0,y=a.length;v1){for(var b=!1,x=[],w=0,_=p.length;w<_;w++)d[w]=[];for(w=0,_=p.length;w<_;w++)for(var M=m[w],S=0;S0&&(b||(m=d))}v=0;for(var L=p.length;v0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e=.5)for(var a=0;a!==i;++a)e[t+a]=e[n+a]},_slerp:function(e,t,n,r){Oh.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var a=1-r,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*r}}});var Wx=new RegExp("[\\[\\]\\.:\\/]","g"),qx="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Yx=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Xx=/(WCOD+)?/.source.replace("WCOD",qx),Zx=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Jx=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Qx=new RegExp("^"+Yx+Xx+Zx+Jx+"$"),$x=["material","materials","bones"];function Kx(e,t,n){var r=n||ew.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function ew(e,t,n){this.path=t,this.parsedPath=n||ew.parseTrackName(t),this.node=ew.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function tw(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,a=new Array(i),o={endingStart:2400,endingEnd:2400},s=0;s!==i;++s){var c=r[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function nw(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function rw(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function iw(e,t,n){Rg.call(this,e,t),this.meshPerAttribute=n||1}function aw(e,t,n,r){this.ray=new Wf(e,t),this.near=n||0,this.far=r||1/0,this.camera=null,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function ow(e,t){return e.distance-t.distance}function sw(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var i=e.children,a=0,o=i.length;a=t){var u=t++,h=e[u];n[h.uuid]=l,e[l]=h,n[c]=u,e[u]=s;for(var f=0,d=i;f!==d;++f){var p=r[f],m=p[u],g=p[l];p[l]=m,p[u]=g}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],l=c.uuid,u=r[l];if(void 0!==u)if(delete r[l],u0)for(var c=this._interpolants,l=this._propertyBindings,u=0,h=c.length;u!==h;++u)c[u].evaluate(o),l[u].accumulate(r,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,r=this.loop,i=this._loopCount,a=2202===r;if(0===e)return-1===i?t:a&&1==(1&i)?n-t:t;if(2200===r){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&1==(1&i))return n-t}return t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}),nw.prototype=Object.assign(Object.create(Ch.prototype),{constructor:nw,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var u=0;u!==i;++u){var h=r[u],f=h.name,d=l[f];if(void 0!==d)a[u]=d;else{if(void 0!==(d=a[u])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,f));continue}var p=t&&t._propertyBindings[u].binding.parsedPath;++(d=new jx(ew.create(n,f,p),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,f),a[u]=d}o[u].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&tthis.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new zh),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new zh),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return cw.copy(e).clamp(this.min,this.max).sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var uw=new Fh,hw=new Fh;function fw(e,t){this.start=void 0!==e?e:new Fh,this.end=void 0!==t?t:new Fh}function dw(e){bf.call(this),this.material=e,this.render=function(){}}Object.assign(fw.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Fh),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Fh),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Fh),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){uw.subVectors(e,this.start),hw.subVectors(this.end,this.start);var n=hw.dot(hw),r=hw.dot(uw)/n;return t&&(r=Nh.clamp(r,0,1)),r},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Fh),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),dw.prototype=Object.create(bf.prototype),dw.prototype.constructor=dw,dw.prototype.isImmediateRenderObject=!0;var pw=new Fh,mw=new Fh,gw=new Gh,vw=["a","b","c"];function yw(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,a=void 0!==r?r:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new Fd,l=new Ed(2*o*3,3);c.setAttribute("position",l),gv.call(this,c,new sv({color:i,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}yw.prototype=Object.create(gv.prototype),yw.prototype.constructor=yw,yw.prototype.update=function(){this.object.updateMatrixWorld(!0),gw.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,i=n.faces,a=0,o=0,s=i.length;o1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},Ew.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()};var Aw=new Fh,Lw=new ud,Cw=new ud;function Pw(e,t,n){bf.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Fv(t);r.rotateY(.5*Math.PI),this.material=new vd({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new yd(a,3)),this.add(new tp(r,this.material)),this.update()}function Rw(e,t){this.lightProbe=e,this.size=t;var n={GAMMA_OUTPUT:""},r=new dp({defines:n,uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","vec3 linearToOutput( in vec3 a ) {","\t#ifdef GAMMA_OUTPUT","\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );","\t#else","\t\treturn a;","\t#endif","}","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\toutgoingLight = linearToOutput( outgoingLight );","\tgl_FragColor = vec4( outgoingLight, 1.0 );","}"].join("\n")}),i=new Ey(1,32,16);tp.call(this,i,r),this.onBeforeRender()}function Nw(e,t,n,r){e=e||10,t=t||10,n=new ud(void 0!==n?n:4473924),r=new ud(void 0!==r?r:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],c=[],l=0,u=0,h=-o;l<=t;l++,h+=a){s.push(-o,0,h,o,0,h),s.push(h,0,-o,h,0,o);var f=l===i?n:r;f.toArray(c,u),u+=3,f.toArray(c,u),u+=3,f.toArray(c,u),u+=3,f.toArray(c,u),u+=3}var d=new Fd;d.setAttribute("position",new Ed(s,3)),d.setAttribute("color",new Ed(c,3));var p=new sv({vertexColors:2});gv.call(this,d,p)}function zw(e,t,n,r,i,a){e=e||10,t=t||16,n=n||8,r=r||64,i=new ud(void 0!==i?i:4473924),a=new ud(void 0!==a?a:8947848);var o,s,c,l,u,h,f,d=[],p=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),o=Math.sin(c)*e,s=Math.cos(c)*e,d.push(0,0,0),d.push(o,0,s),f=1&l?i:a,p.push(f.r,f.g,f.b),p.push(f.r,f.g,f.b);for(l=0;l<=n;l++)for(f=1&l?i:a,h=e-e/n*l,u=0;u.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Kw.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Kw,t)}},e_.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},e_.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},e_.prototype.copy=function(e){return bf.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},e_.prototype.clone=function(){return(new this.constructor).copy(this)},t_.prototype=Object.create(gv.prototype),t_.prototype.constructor=t_;function n_(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ob.call(this,e),this.type="catmullrom"}Eb.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Eb.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(qb.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new cp,n=0,r=e.length;n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\t\tvarying vec2 vUv;\n\t\t#ifdef USE_DASH\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\t\t#endif\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\t\t}\n\t\tvoid main() {\n\t\t\t#ifdef USE_COLOR\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\t\t\t#endif\n\t\t\t#ifdef USE_DASH\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t#endif\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\t\t\tvUv = uv;\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\t\t\tif ( perspective ) {\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\t\t\t\t\ttrimSegment( start, end );\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\t\t\t\t\ttrimSegment( end, start );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\t\t\t\toffset += - dir;\n\t\t\t} else if ( position.y > 1.0 ) {\n\t\t\t\toffset += dir;\n\t\t\t}\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\t\t\tclip.xy += offset;\n\t\t\tgl_Position = clip;\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\t\t#ifdef USE_DASH\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\t\t#endif\n\t\tvarying float vLineDistance;\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\t#include \n\t\t\t#ifdef USE_DASH\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\t\t\t#endif\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\t\t\t}\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t\t\t#include \n\t\t\t#include \n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t}\n\t\t"};var o_=function(e){dp.call(this,{type:"LineMaterial",uniforms:fp.clone(Sp.line.uniforms),vertexShader:Sp.line.vertexShader,fragmentShader:Sp.line.fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)};(o_.prototype=Object.create(dp.prototype)).constructor=o_,o_.prototype.isLineMaterial=!0;for(var s_=[],c_=0;c_<256;c_++)s_[c_]=(c_<16?"0":"")+c_.toString(16);var l_,u_,h_={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(s_[255&e]+s_[e>>8&255]+s_[e>>16&255]+s_[e>>24&255]+"-"+s_[255&t]+s_[t>>8&255]+"-"+s_[t>>16&15|64]+s_[t>>24&255]+"-"+s_[63&n|128]+s_[n>>8&255]+"-"+s_[n>>16&255]+s_[n>>24&255]+s_[255&r]+s_[r>>8&255]+s_[r>>16&255]+s_[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*h_.DEG2RAD},radToDeg:function(e){return e*h_.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),h=a((t-r)/2),f=o((t-r)/2),d=a((r-t)/2),p=o((r-t)/2);"XYX"===i?e.set(s*u,c*h,c*f,s*l):"YZY"===i?e.set(c*f,s*u,c*h,s*l):"ZXZ"===i?e.set(c*h,c*f,s*u,s*l):"XZX"===i?e.set(s*u,c*p,c*d,s*l):"YXY"===i?e.set(c*d,s*u,c*p,s*l):"ZYZ"===i?e.set(c*p,c*d,s*u,s*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}},f_=function(e,t){tp.call(this),this.type="LineSegments2",this.geometry=void 0!==e?e:new a_,this.material=void 0!==t?t:new o_({color:16777215*Math.random()})};f_.prototype=Object.assign(Object.create(tp.prototype),{constructor:f_,isLineSegments2:!0,computeLineDistances:(l_=new Fh,u_=new Fh,function(){for(var e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.data.count),i=0,a=0,o=t.data.count;i1&&t.z>1;if(!w&&!_){e.x*=p.x/2,e.y*=p.y/2,t.x*=p.x/2,t.y*=p.y/2,a.start.copy(e),a.start.z=0,a.end.copy(t),a.end.z=0;var M=a.closestPointToPointParameter(r,!0);a.at(M,o);var S=h_.lerp(e.z,t.z,M),T=S>=-1&&S<=1,E=r.distanceTo(o)<.5*m;if(T&&E){a.start.fromBufferAttribute(g,b),a.end.fromBufferAttribute(v,b),a.start.applyMatrix4(y),a.end.applyMatrix4(y);var A=new Fh,L=new Fh;l.distanceSqToSegment(a.start,a.end,L,A),c.push({point:L,pointOnLine:A,distance:l.origin.distanceTo(L),object:this,face:null,faceIndex:b,uv:null,uv2:null})}}}}}()});var d_=function(){a_.call(this),this.type="LineGeometry"};d_.prototype=Object.assign(Object.create(a_.prototype),{constructor:d_,isLineGeometry:!0,setPositions:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r=-1&&a.z<=1?"":"none";var p={distanceToCameraSquared:d(o,e)};c.objects.set(e,p),u.parentNode!==l&&l.appendChild(u),e.onAfterRender(i,t,o)}for(var m=0,g=e.children.length;m{let[e,t]=ze(g.node());!function(e){let t=function(e,t){return new Fh(e/b.width_*2-1,-t/b.height_*2+1,.5)}(...e);c.setFromCamera(t,s);let n=c.intersectObject(l);if(n[0]){let t=function(e){return e.concat().sort(Q("distanceToRay"))}(n)[0];console.log("Intersect",t);let r=t.index,i=w[b.resolution_][r];!function(e){$();let t=e.object.geometry.attributes.color.array;u&&(t[u.colourIndex]=u.color.r,t[u.colourIndex+1]=u.color.g,t[u.colourIndex+2]=u.color.b);let n=3*e.index,r=t[n],i=t[n+1],a=t[n+2];u={colourIndex:n,color:{r:r,g:i,b:a}};let o=new ud(b.highlightColor_);t[n]=o.r,t[n+1]=o.g,t[n+2]=o.b,e.object.geometry.attributes.color.needsUpdate=!0}(t),function(e,t){let n=parseInt(d.style.width.replace("px","")),r=e[0]+15,i=e[1]+-90;r>b.width_-n&&(r-=n+40),i<0&&(i+=100),x.display="block",x.left=r,x.top=i,x.colorValue=E_(parseFloat(t[b.colorField_])),x.coords=[t.x,t.y],x.color=t.color,function(){let e,t;b._mobile?(e=b.mobileCoordScale.invert(x.coords[0]),t=b.mobileCoordScale.invert(x.coords[1])):(e=x.coords[0],t=x.coords[1]),d.style.display=x.display,d.style.left=x.left+"px",d.style.top=x.top+"px",p.style.background=x.color,m.innerHTML=`${b.colorField_}: ${x.colorValue}
\n x: ${e}
\n y: ${t}
`}()}(e,i)}else $(),K()}([e,t])}),g.on("mouseleave",()=>{$()}),b.colorSchemeSelector_&&b.schemesSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.colorSchemeName_=t,U(),B(),b.legend_&&H()})),b.colorScaleSelector_&&function(){let e=[{value:"scaleSequential",innerText:"Sequential"},{value:"scaleSequentialLog",innerText:"Sequential logarithmic"},{value:"scaleSequentialPow",innerText:"Sequential exponential"},{value:"scaleSequentialSqrt",innerText:"Sequential square-root "},{value:"scaleSequentialQuantile",innerText:"Sequential quantile"}],t=document.createElement("div");t.id="gridviz-colorscale-dropdown-container",t.classList.add("gridviz-dropdown"),b.colorScaleSelect=document.createElement("select"),b.colorScaleSelect.classList.add("gridviz-select"),b.colorScaleSelect.id="scales";let n=document.createElement("label");n.for="scales",n.classList.add("gridviz-dropdown-label"),n.innerText=b.colorScaleSelectorLabel_;for(let t=0;t{b.width_=b.container_.clientWidth,b.height_=b.container_.clientHeight,v.setSize(b.width_,b.height_),y.setSize(b.width_,b.height_),s.aspect=b.width_/b.height_,s.updateProjectionMatrix()}),b.homeButton_&&b.homeButtonNode.addEventListener("click",()=>{!function(){if(b.extentX[0],b.extentY[0],b._mobile){let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_);let t=j(b.camera.far_),n=Fn.translate(b.width_/2,b.height_/2).scale(t);b.d3zoom.transform(g,n)}else{let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_)}}()})}function L(){b.colorFieldSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.colorField_=t,B(),b.legend_&&H()}))}function C(){b.sizeFieldSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.sizeField_=t,function(){if(b.sizeValuesExtent){let e=b.sizeValuesExtent;b.sizeScaleFunction_=i[b.sizeScaleName_]().domain(e).range([b.resolution_/3,b.resolution_/1.5])}else b.sizeValuesExtent=Hi(w[b.resolution_],e=>e[b.sizeField_]),b.sizeScaleFunction_=O()}(),function(){let e=[];for(var t=0;t{if(t){if(!(t[0].x&&t[0].y&&t[0][b.colorField_]))return console.error("Incorrect csv format. Please use coordinate columns with names 'x' and 'y'");if(b.cellCount=t.length,b._mobile){let n=Hi(t.map(e=>parseFloat(e.x))),r=Hi(t.map(e=>parseFloat(e.y))),i=[Ki([n,r],e=>Ki(e)),$i([n,r],e=>$i(e))];b.mobileCoordScale=Za().domain(i).range([-1,1]);let a=.003;b.resolution_=a,e.cellSize=a,_.pointSize=a,_.raycasterThreshold=a,c.params.Points.threshold=a,b.center_[0]=b.mobileCoordScale(b.center_[0]),b.center_[1]=b.mobileCoordScale(b.center_[1])}if(function(e,t){if(e)for(let n=0;ne[b.colorField_]),b.colorScaleFunction_=function(){if(b.colors_&&b.thresholdValues_)return bo().domain(b.thresholdValues_).range(b.colors_);{let e;return b.colorScaleFunction_?b.colorScaleFunction_:(e=b.colorValuesExtent,b._defaultColorScaleFunction(e,r[b.colorSchemeName_]))}}(),b.sizeField_&&(b.sizeValuesExtent=Hi(w[b.resolution_],e=>e[b.sizeField_]),b.sizeScaleFunction_=O()),b.extentX=Hi(w[b.resolution_],e=>e.x),b.extentY=Hi(w[b.resolution_],e=>e.y),!b.center_){let e=parseInt(w[b.resolution_].length/2),t=w[b.resolution_][e];b._mobile?b.center_=[b.mobileCoordScale(parseFloat(t.x)),b.mobileCoordScale(parseFloat(t.y))]:b.center_=[parseFloat(t.x),parseFloat(t.y)]}!function(){let e=j(b.camera.far_),t=j(b.camera.near_);if(b.d3zoom=qn().scaleExtent([e,t]).extent([[0,0],[b.width_,b.height_]]).on("zoom",()=>{let e=le;b._mobile?e&&function(e){if(e.sourceEvent){let t=e.transform.k,n=-(e.transform.x-b.width_/2)/t,r=(e.transform.y-b.height_/2)/t,i=W(t);E(n,r,i)}}(e):e&&function(e){let t=e.transform.k;if(e.sourceEvent){let n=W(t);if(n!==s.position.z){const{clientX:t,clientY:r}=e.sourceEvent,i=new Fh(t/b.width_*2-1,-r/b.height_*2+1,1);i.unproject(s);const a=i.sub(s.position).normalize(),o=(n-s.position.z)/a.z,c=s.position.clone().add(a.multiplyScalar(o));E(c.x,c.y,n)}else{const{movementX:t,movementY:n}=e.sourceEvent,r=j(s.position.z);E(s.position.x-t/r,s.position.y+n/r,s.position.z)}}}(e)}).on("end",()=>{le&&function(e){K();let t=j(e.transform.k);b.debugPlacenames_&&console.info(t);b.showPlacenames_&&l&&(t>0&&t551689&&"20M"!==b.nutsSimplification_&&(b.nutsSimplification_="20M",D(M_+b.nuts2jsonEPSG_+"/"+b.nutsSimplification_+"/"+b.nutsLevel_+".json")))}(le)}),g.call(b.d3zoom),b._mobile){let e=j(b.camera.initialZ_);var n=Fn.translate(b.width_/2,b.height_/2).scale(e);b.d3zoom.transform(g,n),E(0,0,b.camera.initialZ_)}else{let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_)}}(),function(){o||(o=new Fd);let e=[],t=[],n=[];for(var r=0;rconsole.log(e)):(console.error("Please specify grid cell size in the units of its coordinate system"),T_())}function O(){return b.sizeScaleFunction_?b.sizeScaleFunction_:b._defaultSizeScaleFunction().domain(b.colorValuesExtent).range([b.resolution_/3,b.resolution_/1.5])}function D(e){ml(e).then(e=>{let t;t=b.nuts2jsonCountry_?e.objects.nutsrg.geometries.filter((e,t)=>-1!==e.properties.id.indexOf(b.nuts2jsonCountry_)):e.objects.nutsrg.geometries.filter((e,t)=>"TR"!==e.properties.id),e.objects.nutsbn.geometries=t,function(e){let t=[],r=!0;if(n){for(var i=n.children.length-1;i>=0;i--)n.remove(n.children[i]);r=!1}else n=new xg,n.renderOrder=999;for(let r=0;r{console.error(e)})}b.legend=function(e){for(let t in e)b.legend_[t]=e[t];return b._gridLegend&&H(),b},b.gridData=function(e){return e&&l?(b.gridData_=e,b.resolution_=e[0].cellSize,_=P(),b.showPlacenames_&&Y(),T(),z(e[0])):e&&(b.gridData_=e),b},b.center=function(e){return e&&b.scene?(b.center_=e,T(),E(e[0],e[1],s.position.z)):e&&(b.center_=e),b},b.zoom=function(e){return e&&b.scene?(b.zoom_=e,T(),E(s.position.x,s.position.y,e)):e&&(b.zoom_=e),b},b.build=function(){if(!b.colors_||!b.thresholdValues_||b.colors_.length===b.thresholdValues_.length||(alert("The number of colors and thesholdvalues must be equal"),!1)){if(b.width_||(b.container_.clientWidth==window.innerWidth?b.width_=b.container_.clientWidth-4:b.width_=b.container_.clientWidth),b.height_||("0"==b.container_.clientHeight?b.height_=window.innerHeight-4:b.height_=b.container_.clientHeight),/Mobi|Android/i.test(navigator.userAgent)&&(b._mobile=!0,b.sourcesHTML_=null,b.sizeFieldSelector_=!1,b.colorFieldSelector_=!1,b.colorScaleSelector_=!1,b.colorSchemeSelector_=!1,b.legend_&&"continuous"==b.legend_.type&&(b.legend_.width=window.screen.width-10,b.legend_.height=50)),function(e,t){S_=document.createElement("div"),S_.id="gridviz-loading-spinner",S_.classList.add("lds-"+t);let n=document.createElement("div");S_.appendChild(n);let r=document.createElement("div");S_.appendChild(r);let i=document.createElement("div");S_.appendChild(i);let a=document.createElement("div");S_.appendChild(a),e.appendChild(S_)}(b.container_,b.loadingIcon_),b.container_.classList.add("gridviz-container"),b.container_.style.width=b.width_,b.container_.style.height=b.height_,!b.resolution_)if(b._mobile){Za().domain();b.resolution_=b.gridData_[0].cellSize}else b.resolution_=b.gridData_[0].cellSize;return _=P(),b.scene=new xf,b.scene.background=new ud(b.backgroundColor_),v||(v=new g_,v.setSize(b.width_,b.height_),v.domElement.style.position="absolute",b.container_.appendChild(v.domElement)),y||function(){y=new Lg;let e=window.devicePixelRatio;y.setPixelRatio(e),y.setSize(b.width_,b.height_),b.container_.appendChild(y.domElement),g=_e(y.domElement)}(),b.camera.near_=N(),b.camera.far_=R(),b.camera.fov_=50,b.camera.aspect_=b.width_/b.height_,b.camera.initialZ_=b.camera.far_/2-1,b.camera.zoom_=b.zoom_||b.camera.initialZ_,s=new mp(b.camera.fov_,b.camera.aspect_,b.camera.near_,b.camera.far_),c=new aw,c.params.Points.threshold=_.raycasterThreshold,x={display:"none"},f=document.createRange().createContextualFragment('
\n
\n
\n
'),b.container_.append(f),d=document.querySelector("#gridviz-tooltip"),p=document.querySelector("#gridviz-pointtip"),m=document.querySelector("#gridviz-labeltip"),h=new bf,b.scene.add(h),(b.colorSchemeSelector_||b.colorScaleSelector_||b.sizeFieldSelector_||b.colorFieldSelector_)&&(b.selectorsContainer=document.createElement("div"),b.selectorsContainer.classList.add("gridviz-selectors"),b.selectorsContainer.classList.add("gridviz-plugin"),b.container_.appendChild(b.selectorsContainer)),b.colorSchemeSelector_&&function(){let e=[{value:"interpolateBrBG",innerText:"Brown-blue-green"},{value:"interpolatePRGn",innerText:"Purple-green"},{value:"interpolatePiYG",innerText:"Pink-green"},{value:"interpolatePuOr",innerText:"Purple-orange"},{value:"interpolateRdBu",innerText:"Red-blue"},{value:"interpolateRdGy",innerText:"Red-grey"},{value:"interpolateRdYlBu",innerText:"Red-yellow-blue"},{value:"interpolateRdYlGn",innerText:"Red-yellow-green"},{value:"interpolateSpectral",innerText:"Spectral"},{value:"interpolateBlues",innerText:"Blues"},{value:"interpolateGreens",innerText:"Greens"},{value:"interpolateGreys",innerText:"Greys"},{value:"interpolateOranges",innerText:"Oranges"},{value:"interpolatePurples",innerText:"Purples"},{value:"interpolateReds",innerText:"Reds"},{value:"interpolateTurbo",innerText:"Turbo"},{value:"interpolateViridis",innerText:"Viridis"},{value:"interpolateInferno",innerText:"Inferno"},{value:"interpolateMagma",innerText:"Magma"},{value:"interpolatePlasma",innerText:"Plasma"},{value:"interpolateCividis",innerText:"Cividis"},{value:"interpolateWarm",innerText:"Warm"},{value:"interpolateCool",innerText:"Cool"},{value:"interpolateCubehelixDefault",innerText:"CubehelixDefault"},{value:"interpolateBuGn",innerText:"Blue-green"},{value:"interpolateBuPu",innerText:"Blue-purple"},{value:"interpolateGnBu",innerText:"Green-blue"},{value:"interpolateOrRd",innerText:"Orange-red"},{value:"interpolatePuBuGn",innerText:"Purple-blue-green"},{value:"interpolatePuBu",innerText:"Purple-blue"},{value:"interpolatePuRd",innerText:"Purple-red"},{value:"interpolateRdPu",innerText:"Red-purple"},{value:"interpolateYlGnBu",innerText:"Yellow-green-blue"},{value:"interpolateYlGn",innerText:"Yellow-green"},{value:"interpolateYlOrBr",innerText:"Yellow-orange-brown"},{value:"interpolateYlOrRd",innerText:"Yellow-orange-red"},{value:"interpolateRainbow",innerText:"Rainbow"},{value:"interpolateSinebow",innerText:"Sinebow"}],t=document.createElement("div");t.id="gridviz-colorscheme-dropdown-container",t.classList.add("gridviz-dropdown"),b.schemesSelect=document.createElement("select"),b.schemesSelect.id="schemes",b.schemesSelect.classList.add("gridviz-select");let n=document.createElement("label");n.for="schemes",n.classList.add("gridviz-dropdown-label"),n.innerText="Colour scheme: ";for(let t=0;t{e.features&&e.features.length>0&&function(e,t){I+=.002;let n=new xg;n.renderOrder=999;for(let r=0;r{console.error(e)})};let I=1;function F(e){let n=new d_,r=[],i=[],a=new ud(b.borderColor_);for(var o=0;o[c,r-o]}),f.append("image").attr("x",c).attr("y",a).attr("width",r-c-o).attr("height",i-a-s).attr("preserveAspectRatio","none").attr("xlink:href",function(e,t=256){const n=document.createElement("CANVAS");n.width=t,n.height=1;const r=n.getContext("2d");for(let n=0;nQi(e.domain(),n/(t-1)))}"function"!=typeof u&&(u=Ua(void 0===u?",f":u))}}else if(e.invertExtent){const t=e.thresholds?e.thresholds():e.quantiles?e.quantiles():e.domain(),n=void 0===u?e=>e:"string"==typeof u?Ua(u):u;d=Za().domain([-1,e.range().length-1]).rangeRound([c,r-o]),f.append("g").selectAll("rect").data(e.range()).join("rect").attr("x",(e,t)=>d(t-1)).attr("y",a).attr("width",(e,t)=>d(t)-d(t-1)).attr("height",i-a-s).attr("fill",e=>e),h=ji(t.length),u=e=>n(t[e],e)}return f.append("g").attr("transform",`translate(0, ${i-s})`).call(function(e){return $c(3,e)}(d).ticks(l,"string"==typeof u?u:void 0).tickFormat("function"==typeof u?u:void 0).tickSize(n).tickValues(h)).call(e=>e.selectAll(".tick line").attr("y1",a+s-i)).call(e=>e.select(".domain").remove()).call(e=>e.append("text").attr("y",a+s-i-10).attr("fill","currentColor").attr("text-anchor","start").attr("font-weight","bold").attr("class","gridviz-continuous-legend-title").text(t)),f.node()}({color:b.colorScaleFunction_,title:b.legend_.title,tickFormat:".0f",width:b.legend_.width}),e.node().appendChild(b._gridLegend)}()}function k({i:e,genLength:t,generatedLabels:n,labelDelimiter:r}){if(0===e){return"Less than "+n[e].split(` ${r} `)[1]}if(e===t-1){return n[e].split(` ${r} `)[0]+" or more"}return n[e]}function H(){var e;(e=".gridviz-legend-svg","string"==typeof e?new be([document.querySelectorAll(e)],[document.documentElement]):new be([null==e?[]:e],ye)).remove();setTimeout(G(),1e3)}function V(){b.animating=!0,requestAnimationFrame(V),y.render(b.scene,s),v.render(b.scene,s)}function j(e){let t=J(b.camera.fov_/2),n=2*(Math.tan(t)*e);return b.height_/n}function W(e){let t=J(b.camera.fov_/2);return b.height_/e/(2*Math.tan(t))}function q(e){let t=function(e){b.resolution_;let t="";b.placenamesCountry_&&(t=t+"GISREGIO.CITIES_TOWNS_RG.CNTR_CODE='"+b.placenamesCountry_+"' AND ");let n=function(e){let t="GISREGIO.CITIES_TOWNS_RG.POPL_2011";if(!b.placenameThresholds_){let n=b.resolution_;return e>0&&e10":e>n&&e<2*n?t+">1000":e>2*n&&e<4*n?t+">2500":e>4*n&&e<8*n?t+">5000":e>8*n&&e<16*n?t+">7500":e>16*n&&e<32*n?t+">10000":e>32*n&&e<64*n?t+">20000":e>64*n&&e<128*n?t+">100000":e>128*n&&e<256*n?t+">250000":e>256*n&&e<512*n?t+">500000":e>512*n&&e<1024*n?t+">750000":e>1024*n?t+">1000000":"1=1"}{let n=Object.keys(b.placenameThresholds_);for(let r=0;r"+b.placenameThresholds_[i];if(e"+b.placenameThresholds_[n[0]];if(e>parseInt(i)&&e"+b.placenameThresholds_[i]}}}(e);b.debugPlacenames_&&console.info(n);return t+n}(e),n=function(){var e=y.domElement;let t=[e.clientLeft,e.clientHeight],n=[e.clientWidth,e.clientTop],r=Z(t),i=Z(n);if(b.zerosRemoved_){let e=Number("1E"+b.zerosRemoved_);return{xmin:r.x*e,ymin:r.y*e,xmax:i.x*e,ymax:i.y*e}}return{xmin:r.x,ymin:r.y,xmax:i.x,ymax:i.y}}(),r="https://ec.europa.eu/regio/regiogis/gis/arcgis/rest/services/Urban/urban_centres_towns-v2/MapServer/0/query?where="+t+"&outSR="+b.placenamesEPSG_+"&inSR="+b.placenamesEPSG_+"&geometry="+n.xmin+","+n.ymin+","+n.xmax+","+n.ymax+"&geometryType=esriGeometryEnvelope&f=json&outFields=GISREGIO.CITIES_TOWNS_RG.STTL_NAME,GISREGIO.CITIES_TOWNS_RG.POPL_2011",i=encodeURI(r);ml(i).then(e=>{e.features&&e.features.length>0&&(Y(),function(e){if(l)for(let t=0;t{console.error(e)})}function Y(){if(l&&l.children.length>0)for(var e=l.children.length-1;e>=0;e--)l.remove(l.children[e])}function X(e){var t=document.createElement("div");t.className="gridviz-placename",t.textContent=e.attributes["GISREGIO.CITIES_TOWNS_RG.STTL_NAME"],t.style.marginTop="-1em";var n=new m_(t);if(b.zerosRemoved_){let t=Number("1E"+b.zerosRemoved_);n.position.set(e.geometry.x/t,e.geometry.y/t,.001)}else n.position.set(e.geometry.x,e.geometry.y,.001);return n}function Z([e,t]){var n=new Fh,r=new Fh;n.set(e/window.innerWidth*2-1,-t/window.innerHeight*2+1,.5),n.unproject(s),n.sub(s.position).normalize();var i=-s.position.z/n.z;return r.copy(s.position).add(n.multiplyScalar(i)),r}function J(e){return e*(Math.PI/180)}const Q=e=>(t,n)=>t[e]>n[e]?1:n[e]>t[e]?-1:0;function $(){h.remove(...h.children)}function K(){d&&x&&(d.style.display="none")}return b}n.d(t,"viewer",(function(){return A_}))}])})); \ No newline at end of file +Object.assign(ew.prototype,{_getValue_unbound:ew.prototype.getValue,_setValue_unbound:ew.prototype.setValue}),Object.assign(function(){this.uuid=Nh.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,c=void 0,l=0,u=arguments.length;l!==u;++l){var h=arguments[l],f=h.uuid,d=r[f];if(void 0===d){d=t++,r[f]=d,e.push(h);for(var p=0,m=s;p!==m;++p)o[p].push(new ew(h,i[p],a[p]))}else if(d=t){var u=t++,h=e[u];n[h.uuid]=l,e[l]=h,n[c]=u,e[u]=s;for(var f=0,d=i;f!==d;++f){var p=r[f],m=p[u],g=p[l];p[l]=m,p[u]=g}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],l=c.uuid,u=r[l];if(void 0!==u)if(delete r[l],u0)for(var c=this._interpolants,l=this._propertyBindings,u=0,h=c.length;u!==h;++u)c[u].evaluate(o),l[u].accumulate(r,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,r=this.loop,i=this._loopCount,a=2202===r;if(0===e)return-1===i?t:a&&1==(1&i)?n-t:t;if(2200===r){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&1==(1&i))return n-t}return t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}),nw.prototype=Object.assign(Object.create(Ch.prototype),{constructor:nw,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var u=0;u!==i;++u){var h=r[u],f=h.name,d=l[f];if(void 0!==d)a[u]=d;else{if(void 0!==(d=a[u])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,f));continue}var p=t&&t._propertyBindings[u].binding.parsedPath;++(d=new jx(ew.create(n,f,p),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,f),a[u]=d}o[u].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&tthis.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new zh),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new zh),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return cw.copy(e).clamp(this.min,this.max).sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var uw=new Fh,hw=new Fh;function fw(e,t){this.start=void 0!==e?e:new Fh,this.end=void 0!==t?t:new Fh}function dw(e){bf.call(this),this.material=e,this.render=function(){}}Object.assign(fw.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Fh),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Fh),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Fh),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){uw.subVectors(e,this.start),hw.subVectors(this.end,this.start);var n=hw.dot(hw),r=hw.dot(uw)/n;return t&&(r=Nh.clamp(r,0,1)),r},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Fh),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),dw.prototype=Object.create(bf.prototype),dw.prototype.constructor=dw,dw.prototype.isImmediateRenderObject=!0;var pw=new Fh,mw=new Fh,gw=new Gh,vw=["a","b","c"];function yw(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,a=void 0!==r?r:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new Fd,l=new Ed(2*o*3,3);c.setAttribute("position",l),gv.call(this,c,new sv({color:i,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}yw.prototype=Object.create(gv.prototype),yw.prototype.constructor=yw,yw.prototype.update=function(){this.object.updateMatrixWorld(!0),gw.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,i=n.faces,a=0,o=0,s=i.length;o1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},Ew.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()};var Aw=new Fh,Lw=new ud,Cw=new ud;function Pw(e,t,n){bf.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Fv(t);r.rotateY(.5*Math.PI),this.material=new vd({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new yd(a,3)),this.add(new tp(r,this.material)),this.update()}function Rw(e,t){this.lightProbe=e,this.size=t;var n={GAMMA_OUTPUT:""},r=new dp({defines:n,uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","vec3 linearToOutput( in vec3 a ) {","\t#ifdef GAMMA_OUTPUT","\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );","\t#else","\t\treturn a;","\t#endif","}","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\toutgoingLight = linearToOutput( outgoingLight );","\tgl_FragColor = vec4( outgoingLight, 1.0 );","}"].join("\n")}),i=new Ey(1,32,16);tp.call(this,i,r),this.onBeforeRender()}function Nw(e,t,n,r){e=e||10,t=t||10,n=new ud(void 0!==n?n:4473924),r=new ud(void 0!==r?r:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],c=[],l=0,u=0,h=-o;l<=t;l++,h+=a){s.push(-o,0,h,o,0,h),s.push(h,0,-o,h,0,o);var f=l===i?n:r;f.toArray(c,u),u+=3,f.toArray(c,u),u+=3,f.toArray(c,u),u+=3,f.toArray(c,u),u+=3}var d=new Fd;d.setAttribute("position",new Ed(s,3)),d.setAttribute("color",new Ed(c,3));var p=new sv({vertexColors:2});gv.call(this,d,p)}function zw(e,t,n,r,i,a){e=e||10,t=t||16,n=n||8,r=r||64,i=new ud(void 0!==i?i:4473924),a=new ud(void 0!==a?a:8947848);var o,s,c,l,u,h,f,d=[],p=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),o=Math.sin(c)*e,s=Math.cos(c)*e,d.push(0,0,0),d.push(o,0,s),f=1&l?i:a,p.push(f.r,f.g,f.b),p.push(f.r,f.g,f.b);for(l=0;l<=n;l++)for(f=1&l?i:a,h=e-e/n*l,u=0;u.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Kw.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Kw,t)}},e_.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},e_.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},e_.prototype.copy=function(e){return bf.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},e_.prototype.clone=function(){return(new this.constructor).copy(this)},t_.prototype=Object.create(gv.prototype),t_.prototype.constructor=t_;function n_(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ob.call(this,e),this.type="catmullrom"}Eb.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Eb.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(qb.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new cp,n=0,r=e.length;n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\t\tvarying vec2 vUv;\n\t\t#ifdef USE_DASH\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\t\t#endif\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\t\t}\n\t\tvoid main() {\n\t\t\t#ifdef USE_COLOR\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\t\t\t#endif\n\t\t\t#ifdef USE_DASH\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t#endif\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\t\t\tvUv = uv;\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\t\t\tif ( perspective ) {\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\t\t\t\t\ttrimSegment( start, end );\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\t\t\t\t\ttrimSegment( end, start );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\t\t\t\toffset += - dir;\n\t\t\t} else if ( position.y > 1.0 ) {\n\t\t\t\toffset += dir;\n\t\t\t}\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\t\t\tclip.xy += offset;\n\t\t\tgl_Position = clip;\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\t\t#ifdef USE_DASH\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\t\t#endif\n\t\tvarying float vLineDistance;\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\t#include \n\t\t\t#ifdef USE_DASH\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\t\t\t#endif\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\t\t\t}\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t\t\t#include \n\t\t\t#include \n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t}\n\t\t"};var o_=function(e){dp.call(this,{type:"LineMaterial",uniforms:fp.clone(Sp.line.uniforms),vertexShader:Sp.line.vertexShader,fragmentShader:Sp.line.fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)};(o_.prototype=Object.create(dp.prototype)).constructor=o_,o_.prototype.isLineMaterial=!0;for(var s_=[],c_=0;c_<256;c_++)s_[c_]=(c_<16?"0":"")+c_.toString(16);var l_,u_,h_={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(s_[255&e]+s_[e>>8&255]+s_[e>>16&255]+s_[e>>24&255]+"-"+s_[255&t]+s_[t>>8&255]+"-"+s_[t>>16&15|64]+s_[t>>24&255]+"-"+s_[63&n|128]+s_[n>>8&255]+"-"+s_[n>>16&255]+s_[n>>24&255]+s_[255&r]+s_[r>>8&255]+s_[r>>16&255]+s_[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*h_.DEG2RAD},radToDeg:function(e){return e*h_.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),h=a((t-r)/2),f=o((t-r)/2),d=a((r-t)/2),p=o((r-t)/2);"XYX"===i?e.set(s*u,c*h,c*f,s*l):"YZY"===i?e.set(c*f,s*u,c*h,s*l):"ZXZ"===i?e.set(c*h,c*f,s*u,s*l):"XZX"===i?e.set(s*u,c*p,c*d,s*l):"YXY"===i?e.set(c*d,s*u,c*p,s*l):"ZYZ"===i?e.set(c*p,c*d,s*u,s*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}},f_=function(e,t){tp.call(this),this.type="LineSegments2",this.geometry=void 0!==e?e:new a_,this.material=void 0!==t?t:new o_({color:16777215*Math.random()})};f_.prototype=Object.assign(Object.create(tp.prototype),{constructor:f_,isLineSegments2:!0,computeLineDistances:(l_=new Fh,u_=new Fh,function(){for(var e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.data.count),i=0,a=0,o=t.data.count;i1&&t.z>1;if(!w&&!_){e.x*=p.x/2,e.y*=p.y/2,t.x*=p.x/2,t.y*=p.y/2,a.start.copy(e),a.start.z=0,a.end.copy(t),a.end.z=0;var M=a.closestPointToPointParameter(r,!0);a.at(M,o);var S=h_.lerp(e.z,t.z,M),T=S>=-1&&S<=1,E=r.distanceTo(o)<.5*m;if(T&&E){a.start.fromBufferAttribute(g,b),a.end.fromBufferAttribute(v,b),a.start.applyMatrix4(y),a.end.applyMatrix4(y);var A=new Fh,L=new Fh;l.distanceSqToSegment(a.start,a.end,L,A),c.push({point:L,pointOnLine:A,distance:l.origin.distanceTo(L),object:this,face:null,faceIndex:b,uv:null,uv2:null})}}}}}()});var d_=function(){a_.call(this),this.type="LineGeometry"};d_.prototype=Object.assign(Object.create(a_.prototype),{constructor:d_,isLineGeometry:!0,setPositions:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r=-1&&a.z<=1?"":"none";var p={distanceToCameraSquared:d(o,e)};c.objects.set(e,p),u.parentNode!==l&&l.appendChild(u),e.onAfterRender(i,t,o)}for(var m=0,g=e.children.length;m{let[e,t]=ze(g.node());!function(e){let t=function(e,t){return new Fh(e/b.width_*2-1,-t/b.height_*2+1,.5)}(...e);c.setFromCamera(t,s);let n=c.intersectObject(l);if(n[0]){let t=function(e){return e.concat().sort(Q("distanceToRay"))}(n)[0];console.log("Intersect",t);let r=t.index,i=w[b.resolution_][r];!function(e){$();let t=e.object.geometry.attributes.color.array;u&&(t[u.colourIndex]=u.color.r,t[u.colourIndex+1]=u.color.g,t[u.colourIndex+2]=u.color.b);let n=3*e.index,r=t[n],i=t[n+1],a=t[n+2];u={colourIndex:n,color:{r:r,g:i,b:a}};let o=new ud(b.highlightColor_);t[n]=o.r,t[n+1]=o.g,t[n+2]=o.b,e.object.geometry.attributes.color.needsUpdate=!0}(t),function(e,t){let n=parseInt(d.style.width.replace("px","")),r=e[0]+15,i=e[1]+-90;r>b.width_-n&&(r-=n+40),i<0&&(i+=100),x.display="block",x.left=r,x.top=i,x.colorValue=E_(parseFloat(t[b.colorField_])),x.coords=[t.x,t.y],x.color=t.color,function(){let e,t;b._mobile?(e=b.mobileCoordScale.invert(x.coords[0]),t=b.mobileCoordScale.invert(x.coords[1])):(e=x.coords[0],t=x.coords[1]),d.style.display=x.display,d.style.left=x.left+"px",d.style.top=x.top+"px",p.style.background=x.color,m.innerHTML=`${b.colorField_}: ${x.colorValue}
\n x: ${e}
\n y: ${t}
`}()}(e,i)}else $(),K()}([e,t])}),g.on("mouseleave",()=>{$()}),b.colorSchemeSelector_&&b.schemesSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.colorSchemeName_=t,U(),B(),b.legend_&&H()})),b.colorScaleSelector_&&function(){let e=[{value:"scaleSequential",innerText:"Sequential"},{value:"scaleSequentialLog",innerText:"Sequential logarithmic"},{value:"scaleSequentialPow",innerText:"Sequential exponential"},{value:"scaleSequentialSqrt",innerText:"Sequential square-root "},{value:"scaleSequentialQuantile",innerText:"Sequential quantile"}],t=document.createElement("div");t.id="gridviz-colorscale-dropdown-container",t.classList.add("gridviz-dropdown"),b.colorScaleSelect=document.createElement("select"),b.colorScaleSelect.classList.add("gridviz-select"),b.colorScaleSelect.id="scales";let n=document.createElement("label");n.for="scales",n.classList.add("gridviz-dropdown-label"),n.innerText=b.colorScaleSelectorLabel_;for(let t=0;t{b.width_=b.container_.clientWidth,b.height_=b.container_.clientHeight,v.setSize(b.width_,b.height_),y.setSize(b.width_,b.height_),s.aspect=b.width_/b.height_,s.updateProjectionMatrix()}),b.homeButton_&&b.homeButtonNode.addEventListener("click",()=>{!function(){if(b.extentX[0],b.extentY[0],b._mobile){let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_);let t=j(b.camera.far_),n=Fn.translate(b.width_/2,b.height_/2).scale(t);b.d3zoom.transform(g,n)}else{let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_)}}()})}function L(){b.colorFieldSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.colorField_=t,B(),b.legend_&&H()}))}function C(){b.sizeFieldSelect.addEventListener("change",(function(e){var t;t=e.currentTarget.value,b.sizeField_=t,function(){if(b.sizeValuesExtent){let e=b.sizeValuesExtent;b.sizeScaleFunction_=i[b.sizeScaleName_]().domain(e).range([b.resolution_/3,b.resolution_/1.5])}else b.sizeValuesExtent=Hi(w[b.resolution_],e=>e[b.sizeField_]),b.sizeScaleFunction_=O()}(),function(){let e=[];for(var t=0;t{if(t){if(!(t[0].x&&t[0].y&&t[0][b.colorField_]))return console.error("Incorrect csv format. Please use coordinate columns with names 'x' and 'y'");if(b.cellCount=t.length,b._mobile){let n=Hi(t.map(e=>parseFloat(e.x))),r=Hi(t.map(e=>parseFloat(e.y))),i=[Ki([n,r],e=>Ki(e)),$i([n,r],e=>$i(e))];b.mobileCoordScale=Za().domain(i).range([-1,1]);let a=.003;b.resolution_=a,e.cellSize=a,_.pointSize=a,_.raycasterThreshold=a,c.params.Points.threshold=a,b.center_[0]=b.mobileCoordScale(b.center_[0]),b.center_[1]=b.mobileCoordScale(b.center_[1])}if(function(e,t){if(e)if(b._mobile)for(let n=0;ne[b.colorField_]),b.colorScaleFunction_=function(){if(b.colors_&&b.thresholdValues_)return bo().domain(b.thresholdValues_).range(b.colors_);{let e;return b.colorScaleFunction_?b.colorScaleFunction_:(e=b.colorValuesExtent,b._defaultColorScaleFunction(e,r[b.colorSchemeName_]))}}(),b.sizeField_&&(b.sizeValuesExtent=Hi(w[b.resolution_],e=>e[b.sizeField_]),b.sizeScaleFunction_=O()),b.extentX=Hi(w[b.resolution_],e=>e.x),b.extentY=Hi(w[b.resolution_],e=>e.y),!b.center_){let e=parseInt(w[b.resolution_].length/2),t=w[b.resolution_][e];b._mobile?b.center_=[b.mobileCoordScale(parseFloat(t.x)),b.mobileCoordScale(parseFloat(t.y))]:b.center_=[parseFloat(t.x),parseFloat(t.y)]}!function(){let e=j(b.camera.far_),t=j(b.camera.near_);if(b.d3zoom=qn().scaleExtent([e,t]).extent([[0,0],[b.width_,b.height_]]).on("zoom",()=>{let e=le;b._mobile?e&&function(e){if(e.sourceEvent){let t=e.transform.k,n=-(e.transform.x-b.width_/2)/t,r=(e.transform.y-b.height_/2)/t,i=W(t);E(n,r,i)}}(e):e&&function(e){let t=e.transform.k;if(e.sourceEvent){let n=W(t);if(n!==s.position.z){const{clientX:t,clientY:r}=e.sourceEvent,i=new Fh(t/b.width_*2-1,-r/b.height_*2+1,1);i.unproject(s);const a=i.sub(s.position).normalize(),o=(n-s.position.z)/a.z,c=s.position.clone().add(a.multiplyScalar(o));E(c.x,c.y,n)}else{const{movementX:t,movementY:n}=e.sourceEvent,r=j(s.position.z);E(s.position.x-t/r,s.position.y+n/r,s.position.z)}}}(e)}).on("end",()=>{le&&function(e){K();let t=j(e.transform.k);b.debugPlacenames_&&console.info(t);b.showPlacenames_&&l&&(t>0&&t551689&&"20M"!==b.nutsSimplification_&&(b.nutsSimplification_="20M",D(M_+b.nuts2jsonEPSG_+"/"+b.nutsSimplification_+"/"+b.nutsLevel_+".json")))}(le)}),g.call(b.d3zoom),b._mobile){let e=j(b.camera.initialZ_);var n=Fn.translate(b.width_/2,b.height_/2).scale(e);b.d3zoom.transform(g,n),E(0,0,b.camera.initialZ_)}else{let e=j(b.camera.initialZ_);b.d3zoom.scaleTo(g,e),b.d3zoom.translateTo(g,parseInt(b.center_[0])+b.width_/2,parseInt(b.center_[1])+b.height_/2),E(b.center_[0],b.center_[1],b.camera.initialZ_)}}(),function(){o||(o=new Fd);let e=[],t=[],n=[];for(var r=0;rconsole.log(e)):(console.error("Please specify grid cell size in the units of its coordinate system"),T_())}function O(){return b.sizeScaleFunction_?b.sizeScaleFunction_:b._defaultSizeScaleFunction().domain(b.colorValuesExtent).range([b.resolution_/3,b.resolution_/1.5])}function D(e){ml(e).then(e=>{let t;t=b.nuts2jsonCountry_?e.objects.nutsrg.geometries.filter((e,t)=>-1!==e.properties.id.indexOf(b.nuts2jsonCountry_)):e.objects.nutsrg.geometries.filter((e,t)=>"TR"!==e.properties.id),e.objects.nutsbn.geometries=t,function(e){let t=[],r=!0;if(n){for(var i=n.children.length-1;i>=0;i--)n.remove(n.children[i]);r=!1}else n=new xg,n.renderOrder=999;for(let r=0;r{console.error(e)})}b.legend=function(e){for(let t in e)b.legend_[t]=e[t];return b._gridLegend&&H(),b},b.gridData=function(e){return e&&l?(b.gridData_=e,b.resolution_=e[0].cellSize,_=P(),b.showPlacenames_&&Y(),T(),z(e[0])):e&&(b.gridData_=e),b},b.center=function(e){return e&&b.scene?(b.center_=e,T(),E(e[0],e[1],s.position.z)):e&&(b.center_=e),b},b.zoom=function(e){return e&&b.scene?(b.zoom_=e,T(),E(s.position.x,s.position.y,e)):e&&(b.zoom_=e),b},b.build=function(){if(!b.colors_||!b.thresholdValues_||b.colors_.length===b.thresholdValues_.length||(alert("The number of colors and thesholdvalues must be equal"),!1)){if(b.width_||(b.container_.clientWidth==window.innerWidth?b.width_=b.container_.clientWidth-4:b.width_=b.container_.clientWidth),b.height_||("0"==b.container_.clientHeight?b.height_=window.innerHeight-4:b.height_=b.container_.clientHeight),/Mobi|Android/i.test(navigator.userAgent)&&(b._mobile=!0,b.sourcesHTML_=null,b.sizeFieldSelector_=!1,b.colorFieldSelector_=!1,b.colorScaleSelector_=!1,b.colorSchemeSelector_=!1,b.legend_&&"continuous"==b.legend_.type&&(b.legend_.width=window.screen.width-10,b.legend_.height=50)),function(e,t){S_=document.createElement("div"),S_.id="gridviz-loading-spinner",S_.classList.add("lds-"+t);let n=document.createElement("div");S_.appendChild(n);let r=document.createElement("div");S_.appendChild(r);let i=document.createElement("div");S_.appendChild(i);let a=document.createElement("div");S_.appendChild(a),e.appendChild(S_)}(b.container_,b.loadingIcon_),b.container_.classList.add("gridviz-container"),b.container_.style.width=b.width_,b.container_.style.height=b.height_,!b.resolution_)if(b._mobile){Za().domain();b.resolution_=b.gridData_[0].cellSize}else b.resolution_=b.gridData_[0].cellSize;return _=P(),b.scene=new xf,b.scene.background=new ud(b.backgroundColor_),v||(v=new g_,v.setSize(b.width_,b.height_),v.domElement.style.position="absolute",b.container_.appendChild(v.domElement)),y||function(){y=new Lg;let e=window.devicePixelRatio;y.setPixelRatio(e),y.setSize(b.width_,b.height_),b.container_.appendChild(y.domElement),g=_e(y.domElement)}(),b.camera.near_=N(),b.camera.far_=R(),b.camera.fov_=50,b.camera.aspect_=b.width_/b.height_,b.camera.initialZ_=b.camera.far_/2-1,b.camera.zoom_=b.zoom_||b.camera.initialZ_,s=new mp(b.camera.fov_,b.camera.aspect_,b.camera.near_,b.camera.far_),c=new aw,c.params.Points.threshold=_.raycasterThreshold,x={display:"none"},f=document.createRange().createContextualFragment('
\n
\n
\n
'),b.container_.append(f),d=document.querySelector("#gridviz-tooltip"),p=document.querySelector("#gridviz-pointtip"),m=document.querySelector("#gridviz-labeltip"),h=new bf,b.scene.add(h),(b.colorSchemeSelector_||b.colorScaleSelector_||b.sizeFieldSelector_||b.colorFieldSelector_)&&(b.selectorsContainer=document.createElement("div"),b.selectorsContainer.classList.add("gridviz-selectors"),b.selectorsContainer.classList.add("gridviz-plugin"),b.container_.appendChild(b.selectorsContainer)),b.colorSchemeSelector_&&function(){let e=[{value:"interpolateBrBG",innerText:"Brown-blue-green"},{value:"interpolatePRGn",innerText:"Purple-green"},{value:"interpolatePiYG",innerText:"Pink-green"},{value:"interpolatePuOr",innerText:"Purple-orange"},{value:"interpolateRdBu",innerText:"Red-blue"},{value:"interpolateRdGy",innerText:"Red-grey"},{value:"interpolateRdYlBu",innerText:"Red-yellow-blue"},{value:"interpolateRdYlGn",innerText:"Red-yellow-green"},{value:"interpolateSpectral",innerText:"Spectral"},{value:"interpolateBlues",innerText:"Blues"},{value:"interpolateGreens",innerText:"Greens"},{value:"interpolateGreys",innerText:"Greys"},{value:"interpolateOranges",innerText:"Oranges"},{value:"interpolatePurples",innerText:"Purples"},{value:"interpolateReds",innerText:"Reds"},{value:"interpolateTurbo",innerText:"Turbo"},{value:"interpolateViridis",innerText:"Viridis"},{value:"interpolateInferno",innerText:"Inferno"},{value:"interpolateMagma",innerText:"Magma"},{value:"interpolatePlasma",innerText:"Plasma"},{value:"interpolateCividis",innerText:"Cividis"},{value:"interpolateWarm",innerText:"Warm"},{value:"interpolateCool",innerText:"Cool"},{value:"interpolateCubehelixDefault",innerText:"CubehelixDefault"},{value:"interpolateBuGn",innerText:"Blue-green"},{value:"interpolateBuPu",innerText:"Blue-purple"},{value:"interpolateGnBu",innerText:"Green-blue"},{value:"interpolateOrRd",innerText:"Orange-red"},{value:"interpolatePuBuGn",innerText:"Purple-blue-green"},{value:"interpolatePuBu",innerText:"Purple-blue"},{value:"interpolatePuRd",innerText:"Purple-red"},{value:"interpolateRdPu",innerText:"Red-purple"},{value:"interpolateYlGnBu",innerText:"Yellow-green-blue"},{value:"interpolateYlGn",innerText:"Yellow-green"},{value:"interpolateYlOrBr",innerText:"Yellow-orange-brown"},{value:"interpolateYlOrRd",innerText:"Yellow-orange-red"},{value:"interpolateRainbow",innerText:"Rainbow"},{value:"interpolateSinebow",innerText:"Sinebow"}],t=document.createElement("div");t.id="gridviz-colorscheme-dropdown-container",t.classList.add("gridviz-dropdown"),b.schemesSelect=document.createElement("select"),b.schemesSelect.id="schemes",b.schemesSelect.classList.add("gridviz-select");let n=document.createElement("label");n.for="schemes",n.classList.add("gridviz-dropdown-label"),n.innerText="Colour scheme: ";for(let t=0;t{e.features&&e.features.length>0&&function(e,t){I+=.002;let n=new xg;n.renderOrder=999;for(let r=0;r{console.error(e)})};let I=1;function F(e){let n=new d_,r=[],i=[],a=new ud(b.borderColor_);for(var o=0;o[c,r-o]}),f.append("image").attr("x",c).attr("y",a).attr("width",r-c-o).attr("height",i-a-s).attr("preserveAspectRatio","none").attr("xlink:href",function(e,t=256){const n=document.createElement("CANVAS");n.width=t,n.height=1;const r=n.getContext("2d");for(let n=0;nQi(e.domain(),n/(t-1)))}"function"!=typeof u&&(u=Ua(void 0===u?",f":u))}}else if(e.invertExtent){const t=e.thresholds?e.thresholds():e.quantiles?e.quantiles():e.domain(),n=void 0===u?e=>e:"string"==typeof u?Ua(u):u;d=Za().domain([-1,e.range().length-1]).rangeRound([c,r-o]),f.append("g").selectAll("rect").data(e.range()).join("rect").attr("x",(e,t)=>d(t-1)).attr("y",a).attr("width",(e,t)=>d(t)-d(t-1)).attr("height",i-a-s).attr("fill",e=>e),h=ji(t.length),u=e=>n(t[e],e)}return f.append("g").attr("transform",`translate(0, ${i-s})`).call(function(e){return $c(3,e)}(d).ticks(l,"string"==typeof u?u:void 0).tickFormat("function"==typeof u?u:void 0).tickSize(n).tickValues(h)).call(e=>e.selectAll(".tick line").attr("y1",a+s-i)).call(e=>e.select(".domain").remove()).call(e=>e.append("text").attr("y",a+s-i-10).attr("fill","currentColor").attr("text-anchor","start").attr("font-weight","bold").attr("class","gridviz-continuous-legend-title").text(t)),f.node()}({color:b.colorScaleFunction_,title:b.legend_.title,tickFormat:".0f",width:b.legend_.width}),e.node().appendChild(b._gridLegend)}()}function k({i:e,genLength:t,generatedLabels:n,labelDelimiter:r}){if(0===e){return"Less than "+n[e].split(` ${r} `)[1]}if(e===t-1){return n[e].split(` ${r} `)[0]+" or more"}return n[e]}function H(){var e;(e=".gridviz-legend-svg","string"==typeof e?new be([document.querySelectorAll(e)],[document.documentElement]):new be([null==e?[]:e],ye)).remove();setTimeout(G(),1e3)}function V(){b.animating=!0,requestAnimationFrame(V),y.render(b.scene,s),v.render(b.scene,s)}function j(e){let t=J(b.camera.fov_/2),n=2*(Math.tan(t)*e);return b.height_/n}function W(e){let t=J(b.camera.fov_/2);return b.height_/e/(2*Math.tan(t))}function q(e){let t=function(e){b.resolution_;let t="";b.placenamesCountry_&&(t=t+"GISREGIO.CITIES_TOWNS_RG.CNTR_CODE='"+b.placenamesCountry_+"' AND ");let n=function(e){let t="GISREGIO.CITIES_TOWNS_RG.POPL_2011";if(!b.placenameThresholds_){let n=b.resolution_;return e>0&&e10":e>n&&e<2*n?t+">1000":e>2*n&&e<4*n?t+">2500":e>4*n&&e<8*n?t+">5000":e>8*n&&e<16*n?t+">7500":e>16*n&&e<32*n?t+">10000":e>32*n&&e<64*n?t+">20000":e>64*n&&e<128*n?t+">100000":e>128*n&&e<256*n?t+">250000":e>256*n&&e<512*n?t+">500000":e>512*n&&e<1024*n?t+">750000":e>1024*n?t+">1000000":"1=1"}{let n=Object.keys(b.placenameThresholds_);for(let r=0;r"+b.placenameThresholds_[i];if(e"+b.placenameThresholds_[n[0]];if(e>parseInt(i)&&e"+b.placenameThresholds_[i]}}}(e);b.debugPlacenames_&&console.info(n);return t+n}(e),n=function(){var e=y.domElement;let t=[e.clientLeft,e.clientHeight],n=[e.clientWidth,e.clientTop],r=Z(t),i=Z(n);if(b.zerosRemoved_){let e=Number("1E"+b.zerosRemoved_);return{xmin:r.x*e,ymin:r.y*e,xmax:i.x*e,ymax:i.y*e}}return{xmin:r.x,ymin:r.y,xmax:i.x,ymax:i.y}}(),r="https://ec.europa.eu/regio/regiogis/gis/arcgis/rest/services/Urban/urban_centres_towns-v2/MapServer/0/query?where="+t+"&outSR="+b.placenamesEPSG_+"&inSR="+b.placenamesEPSG_+"&geometry="+n.xmin+","+n.ymin+","+n.xmax+","+n.ymax+"&geometryType=esriGeometryEnvelope&f=json&outFields=GISREGIO.CITIES_TOWNS_RG.STTL_NAME,GISREGIO.CITIES_TOWNS_RG.POPL_2011",i=encodeURI(r);ml(i).then(e=>{e.features&&e.features.length>0&&(Y(),function(e){if(l)for(let t=0;t{console.error(e)})}function Y(){if(l&&l.children.length>0)for(var e=l.children.length-1;e>=0;e--)l.remove(l.children[e])}function X(e){var t=document.createElement("div");t.className="gridviz-placename",t.textContent=e.attributes["GISREGIO.CITIES_TOWNS_RG.STTL_NAME"],t.style.marginTop="-1em";var n=new m_(t);if(b.zerosRemoved_){let t=Number("1E"+b.zerosRemoved_);n.position.set(e.geometry.x/t,e.geometry.y/t,.001)}else n.position.set(e.geometry.x,e.geometry.y,.001);return n}function Z([e,t]){var n=new Fh,r=new Fh;n.set(e/window.innerWidth*2-1,-t/window.innerHeight*2+1,.5),n.unproject(s),n.sub(s.position).normalize();var i=-s.position.z/n.z;return r.copy(s.position).add(n.multiplyScalar(i)),r}function J(e){return e*(Math.PI/180)}const Q=e=>(t,n)=>t[e]>n[e]?1:n[e]>t[e]?-1:0;function $(){h.remove(...h.children)}function K(){d&&x&&(d.style.display="none")}return b}n.d(t,"viewer",(function(){return A_}))}])})); \ No newline at end of file diff --git a/package.json b/package.json index e7edc7a0d..574016c11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridviz", - "version": "1.0.11", + "version": "1.0.12", "description": "Visualization tool for gridded statistics", "keywords": [ "statistics", From 9a0938b2dfe63f13e5ab07bcf455dfb89e907d2f Mon Sep 17 00:00:00 2001 From: Joe Davies Date: Mon, 30 Nov 2020 17:24:48 +0100 Subject: [PATCH 3/3] update readme --- readme.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/readme.md b/readme.md index bd9a6c32a..29190a5dc 100644 --- a/readme.md +++ b/readme.md @@ -137,19 +137,19 @@ Here's a barebones example that loads a CSV containing population data for a 5 k ### Legend -| Method | Type | Default | Description | +| Method / Object | Type | Default | Description | | ----------------------------- | ------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | viewer.showLegend([value]) | boolean | true | Build d3 colour legend. | -| viewer.legend([legendConfig]) | Object | See legendConfig default values below. | -| legendConfig.type | String | "continuous" | Type of legend to build. Accepted values are "cells" or "continuous". Cells uses [d3-svg-legend](https://d3-legend.susielu.com/) and continuous uses an implementation of Mike Bostock's [color legend](https://observablehq.com/@d3/color-legend) | -| legendConfig.width | int | 140 | width of the legend in pixels | -| legendConfig.height | int | 320 for "cells" and 50 for "continuous" | height of the legend in pixels | -| legendConfig.orientation | int | For cells legends only | "vertical" or "horizontal" | -| legendConfig.title | String | "Legend" | Title text of the legend. | -| legendConfig.titleWidth | int | 50 | Width of the title text of the legend. | -| legendConfig.format | string | ".0s" | d3.format string used to format the legend values | -| legendConfig.cells | int | 5 | Number of cells (for cell legends only) | -| legendConfig.shapeWidth | int | 30 | width in pixels of legend cell (for cell legends only) | +| viewer.legend([**legendConfig**]) | Object | See legendConfig default values below. | +| **legendConfig**.type | String | "continuous" | Type of legend to build. Accepted values are "cells" or "continuous". Cells uses [d3-svg-legend](https://d3-legend.susielu.com/) and continuous uses an implementation of Mike Bostock's [color legend](https://observablehq.com/@d3/color-legend) | +| **legendConfig**.width | int | 140 | width of the legend in pixels | +| **legendConfig**.height | int | 320 for "cells" and 50 for "continuous" | height of the legend in pixels | +| **legendConfig**.orientation | int | For cells legends only | "vertical" or "horizontal" | +| **legendConfig**.title | String | "Legend" | Title text of the legend. | +| **legendConfig**.titleWidth | int | 50 | Width of the title text of the legend. | +| **legendConfig**.format | string | ".0s" | d3.format string used to format the legend values | +| **legendConfig**.cells | int | 5 | Number of cells (for cell legends only) | +| **legendConfig**.shapeWidth | int | 30 | width in pixels of legend cell (for cell legends only) | ## Developer docs